JelloSwift icon indicating copy to clipboard operation
JelloSwift copied to clipboard

JelloSwift for MindMap is it possible?

Open serbuk opened this issue 2 years ago • 2 comments

Great library! Can it be used to build a tree layout for a "dynamic" mind map UI? Our requirement is that the nodes are draggable. When the user drags one node positions of the rest nodes should adapt to the change.

Soft-body physics is nice for "gamification" of the app.

serbuk avatar Apr 08 '22 05:04 serbuk

I'm thinking it could be done, JelloSwift has support for whole-body constraining, and it should be trivial do use a PressureComponent along with some internal springs on nodes to keep them from collapsing. Collisions between linked bodies can be enabled to allow for non-overlapping behavior. Playing around with the RestDistance of each constraint could allow for springy behavior only when nodes get too close or too far from each other.

Depending on the number of nodes, the simulation could get unstable and bodies could fling everywhere, but tuning Body.velDaping property could alleviate some of that.

LuizZak avatar Apr 18 '22 22:04 LuizZak

Thank you for the reply!

serbuk avatar Apr 19 '22 14:04 serbuk