API reference

The 34 forces

Compose them on any data-body element, space-separated. Each card is generated from the engine's own catalog — the law, the attributes it reads, and a real-world use.

Canonical nine

The bounded, UI-legible verbs — what a body does to nearby matter. (9)

attract live
v += û · (1 − d/r)² · S · 0.5 (+ orbital swirl)

A soft gravity-like well, optionally bent into a spiral.

data-strengthdata-range

A hero word that pulls the field into orbit around it.

repel live
v −= û · (1 − d/r)² · S · 0.5

Soft outward push — carves a void.

data-strengthdata-range

A dismiss control that opens a clean void in the field.

swirl live
v += û⊥ · (1 − d/r)^1.4 · S · 0.45 · spin (+ 0.12 inward)

Tangential swirl with light inward retention.

data-strengthdata-rangedata-spin

A loading state that spins the field into a swirl.

stream live
v += ĥ · (1 − d/r)^1.1 · S · 0.5

A steady directional current along a heading.

data-strengthdata-rangedata-angle

A scroll cue that combs the field downwind like a current.

viscosity
v −= v · (1 − d/r) · (0.05 + 0.07·S)

Viscosity — thickens the medium, bleeding momentum.

data-strengthdata-range

A modal backdrop the field thickens behind — motion settles.

jet
feed: v += û·(1 − d/r)²·(0.25 + 0.15·S); at the nozzle (<24px): relaunch as a jet

A conduit — draws matter in, jets it out along a heading.

data-strengthdata-rangedata-angle

A call-to-action that draws matter in and jets it back out.

tether live
v += û · (d − rest) · k; v *= 0.985, rest = 0.6·r

A tether with a rest length — holds matter at a shell radius.

data-strengthdata-range

A pinned element the field tethers to at a rest radius.

wall
inside box: push out the shallower axis, v_axis ← −0.85·v_axis

An axis-aligned bouncing wall — sparks on hard impact.

no params

A card the field bounces off — a wall that sparks on impact.

sink
capture within absorbR; at capacity, release everything (supernova)

Captures matter, holds it (conserved), then releases it.

data-absorbdata-max

A cart that accretes matter, then releases it on checkout (a supernova).

Natural primitives

Real physical laws in a consistent unit system. (8)

gravity live
F = G·M·d̂ / (d² + ε²), ε = r_s = 2GM/c²; |v| ≤ c

True softened inverse-square — a real 1/d² law.

data-strengthdata-range

A heavy headline with a true 1/d² pull — a real well.

charge
F = −σ·q·GM·d̂ / (d² + ε²)

The signed sibling of gravity — like repels, opposite attracts.

data-strengthdata-rangedata-spin

Two states that demix charged matter into +/− domains.

magnetism
v ← rotate(v, θ), θ = q·spin·B·(1 − d/r)

The Lorentz force — curves a moving charge, doing no work.

data-strengthdata-rangedata-spin

A region that curves moving charge into cyclotron arcs.

thermal
v += √(2T) · ξ, T = S·(1 − d/r), ξ ~ N(0,1) per axis

Langevin/Brownian agitation — a real temperature in the medium.

data-strengthdata-range

A "hot" badge that agitates the field with Brownian heat.

collide
overlapping, approaching discs exchange normal momentum (e = S)

Elastic pairwise collision — the hard-sphere billiard force.

data-strengthdata-range

A dense cluster where particles ricochet like billiards.

diffuse
deposit φ; v += ∇φ · S; field blurs ∂φ/∂t = D∇²φ

A pheromone field — deposit a mark and follow the diffused gradient.

data-strengthdata-range

A trail particles lay down and follow — stigmergy.

propagate
pulse φ at the source; v += r̂·|∇φ|·S (ride the front out); ∂²φ/∂t² = c²∇²φ

A travelling wave — particles ride the expanding front.

data-strengthdata-range

A button that fires a real shock wave across the field.

memory
M(x) += λ where matter sits; v += û · (1 − d/r)² · S · 0.5 · (1 + μ·M)

The field remembers — occupancy wears in paths that pull harder.

data-strengthdata-range

A frequently-used path that wears in and starts pulling harder.

Designed extended

Pure per-particle effects — bends, gates, phase changes, modifiers. (17)

lens
v ← rotate(v, θ_max · (1 − d/r) · sign)

Rotates velocity, preserving speed — bends paths without adding energy.

data-strengthdata-rangedata-spin

A link that bends a passing flow into caustics — no capture.

gate
if v·n < 0: v −= 2(v·n)·n

A one-way membrane — passes along its heading, reflects the reverse.

data-angle

A one-way membrane: matter passes through but not back.

buoyancy live
v_y −= (ρ_med − ρ_p)·g, ρ_p = base / (size·(1 + heat))

A constant lift/sink by density — light matter rises, dense settles.

data-strengthdata-range

A feed where light/hot items rise and dense ones settle.

shear
v∥ += S · (offset⊥ / r) · (1 − d/r)

A laminar velocity gradient — flow grows with perpendicular offset.

data-strengthdata-rangedata-angle

A divider with laminar flow — layers slide past each other.

crystallize
if heat < ½: v += (node − p)·k; v *= 0.9

Snaps cool matter onto a lattice; melts and frees it when hot.

data-strengthdata-range

A "cool" section where matter snaps onto a lattice.

align
v += (ĥ·|v| − v)·k, ĥ = neighbour-mean heading (or the body heading)

Steers toward a heading, preserving speed — flock alignment.

data-strengthdata-rangedata-angle

A nav where particles flock to a shared heading.

wind
v += curl(ψ)·S, ψ = sin(x·s + 0.2t)·cos(y·s − 0.2t)

Divergence-free curl-noise turbulence.

data-strengthdata-range

A hero with divergence-free turbulence drifting through it.

cohesion
neighbours: push if d < r₀, pull if r₀ < d < r₁

Short-range pressure + mid-range pull — surface tension.

data-strengthdata-range

A tag group that behaves like a droplet — a swarm with a skin.

pressure
ρ = Σ W(d, h); v += −k·(ρ − ρ₀)·∇W (push down the density gradient)

SPH density relaxation — incompressible even-fill via mutual repulsion.

data-strengthdata-range

A dense cluster that relaxes to an even fill, like a settling fluid.

hunt
predator: v += seek(nearest prey)·S; prey: v += flee(nearest predator)·S

Two-species pursuit — predators seek prey, prey flee predators.

data-strengthdata-range

A two-species swarm that chases and scatters — a living ecosystem.

spawn
while engaged: emit S·2 particles/frame along the heading, each living ~90 frames

A source [S] — creates matter along the heading, budgeted by a lifespan + pool ceiling.

data-strengthdata-angle

A nozzle that jets matter into the field — a literal fountain or a star seeding the void.

morph
assign p → target t (hash of gx); v += (t − p)·k + jitter·(1 − arrived)

Matter assembles into a mark / chart / logo — never words (§11).

data-strengthdata-target

A logo or chart that assembles from drifting matter — a mark, never words.

resonate
modifier: scales sibling S by S(t) = 1 + sin(ω·t)

Pulses its sibling forces with a time-varying strength.

data-strengthdata-spin

Pair with attract: a well that breathes (pulsing strength).

spotlight
modifier: gates siblings outside an angular cone of the heading

A directional gate — confines sibling forces to a beam.

data-angle

Pair with stream: a directed beam confined to a cone.

pigment
on overlap: c_p ← mix(c_p, tint, rate); the colour advects with matter

Conserved colour transport — matter takes on and carries a tint.

data-rangedata-color

A section that stains passing matter its own colour, carried away.

fieldflow
n̂ = netField/|netField|; v += (n̂·|v| − v)·k_steer + n̂·gain·a_accel, gain = S·(1 − d/r)

Follow the field lines — steer onto and stream down the net field a body radiates.

data-strengthdata-range

A magnet or charge whose field lines the swarm threads, like plasma along a solar prominence.