API reference
Conditions, formations & modes
The dimensions that shape the field independently of the forces themselves — when a force acts, a bias on every particle, how the field is drawn, and its colour.
Conditions
Gate any force with data-when; it acts only while the condition holds.
-
activeper body - Only while the body is engaged..
-
fastper particle - Only on fast-moving matter (v² > 0.9)..
-
slowper particle - Only on calm matter (v² < 0.22)..
-
hotper particle - Only on energized matter (heat > 0.3)..
-
coolper particle - Only on calm, un-energized matter (heat < 0.08)..
-
scrollingper body - Only while the page is scrolling..
Formations
A formation is a single global bias on every particle at once. Switch it live with
field.setFormation(name).
-
ambientresting drift - Ambient — the Hero state.
-
wellsmatter pools - Wells — the Work state.
-
lanesa current carries - Lanes — the Writing state.
-
scatterenergy dispersed - Scatter — the Practice state.
-
accretioneverything gathers - Accretion — the Contact state.
Render modes
The same physics, drawn differently. Set render or call field.setRender(mode).
-
dots - The default — each particle a soft dot, cool centre → warm edge → accent.
-
trails - Light-painting — particle history persists and fades.
-
links - Constellation — lines drawn between nearby particles.
-
metaballs - A liquid iso-surface — the swarm rendered as one molten skin via marching squares, not dots.
-
voronoi - Shattered glass — each particle owns a cell; the walls are the boundaries between nearest-neighbour regions.
-
streamlines - Draws the force field itself — a grid of arrows along the net push. A diagnostic view.
Palettes
The colour template the travelling accent journeys through. Swap with field.setPalette(name).
-
ours -
heatmap -
infrared -
spectrum