LearnNewsExamplesServices
Frontmatter
id8672
titleImplement Cluster Drift (Flow Fields)
stateClosed
labels
enhancementaiperformance
assigneestobiu
createdAtJan 15, 2026, 3:39 AM
updatedAtJan 15, 2026, 3:49 AM
githubUrlhttps://github.com/neomjs/neo/issues/8672
authortobiu
commentsCount1
parentIssue8661
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 15, 2026, 3:49 AM

Implement Cluster Drift (Flow Fields)

Closed v11.22.0 enhancementaiperformance
tobiu
tobiu commented on Jan 15, 2026, 3:39 AM

Objective

Replace simple linear velocity/bounce for Parent nodes with organic Flow Field movement.

Tasks

  1. Flow Field: Implement 2D Simplex Noise or Perlin Noise (or a simple sine-sum field) to generate a velocity vector field across the canvas.
  2. Parent Movement: PARENT nodes (Cluster Centers) should sample this field to determine their velocity (vx, vy). This will make them drift in "currents".
  3. Child Propagation: Since Children seek Parents, they will naturally form "tails" or swarms following these currents.

Technical Details

  • Can use a lightweight pseudo-noise function (no heavy library needed).
  • Update updatePhysics to apply flow vectors to Parents.
tobiu assigned to @tobiu on Jan 15, 2026, 3:39 AM
tobiu added the enhancement label on Jan 15, 2026, 3:39 AM
tobiu added the ai label on Jan 15, 2026, 3:39 AM
tobiu added the performance label on Jan 15, 2026, 3:39 AM
tobiu added parent issue #8661 on Jan 15, 2026, 3:39 AM
tobiu referenced in commit a809e84 - "feat: Implement Cluster Drift (Flow Fields) for Neural Swarm (#8672)" on Jan 15, 2026, 3:47 AM
tobiu
tobiu Jan 15, 2026, 3:48 AM

Input from Gemini 3 Pro:

✦ I have implemented the Cluster Drift using Flow Fields.

Changes:

  1. Flow Field: Replaced the random drift for PARENT nodes with a calculated Vector Field.
  2. Algorithm: Uses a combined Sine/Cosine function based on spatial position (x, y) and time to generate organic, swirling currents.
  3. Dynamics: Parent nodes now "swim" along these currents. Since Child nodes are physically attracted to Parents (Cohesion), the entire cluster moves as a fluid swarm rather than a static group.

The result is a more biological, "living system" movement pattern.

tobiu closed this issue on Jan 15, 2026, 3:49 AM