Skip to main content

Module cohesion

Module cohesion 

Source
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§

CohesionManager
Manages cohesion for all glyphs in an entity.
GlyphCohesion
Per-glyph cohesion spring connecting the glyph to its formation slot.

Functions§

cohesion_pull
Calculate how far a glyph at actual should move toward target given 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.