Expand description
Cohesion dynamics — spring-based physics keeping glyphs bound to their formation.
Cohesion drives how tightly glyphs cling to their target positions. At cohesion=1.0 they snap instantly; at 0.0 they drift freely under chaos forces. Temperature adds thermal jitter that makes formations feel alive and organic. When cohesion reaches zero, the entity dissolves in an outward burst.
Structs§
- Cohesion
Manager - Manages cohesion for all glyphs in an entity.
- Glyph
Cohesion - Per-glyph cohesion spring connecting the glyph to its formation slot.
Functions§
- cohesion_
pull - Calculate how far a glyph at
actualshould move towardtargetgiven cohesion strength [0, 1] and elapsed time dt. - cohesion_
to_ spring - Convert cohesion [0, 1] to spring stiffness and damping.
- dissolution_
burst - Emit a formation dissolution burst. Returns outward velocity vectors for each glyph.