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 color.
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, REPLACES the dots.
-
flow - The dots AND the streamline arrows together in the one underlay canvas — particles drifting along the visible flow. No second blended surface, so it stays cheap.
Overlay readings
Field Surfaces, the front layer — line-drawn diagnostics over the content. Set
overlay or call field.setOverlay(reading); readings are
additive — pass a stack (['grid','path'], or space-separated in the
attribute) and they compose over whatever the underlay is drawing.
-
streamlines - Arrows along the net push a still probe would feel — vector flow, felt.
-
force-vectors - The same arrows scaled by raw magnitude — strong forces read strong, weak stay faint.
-
field-lines - Arrows along the structure-only field (dipoles / monopoles) — the geometry, not the felt push.
-
grid - A reference lattice displaced by the local field — space itself made visible, bending where the field is strong.
-
temperature - Iso-contour rings of accumulated particle heat — the thermal field, drawn as lines so it never paints over content.
-
energy - Iso-contour rings of kinetic energy (½m·|v|²) — where the motion is.
-
path - Streamline curves traced from seeded probes — where the field would carry a particle over distance.
-
data - A numeric density readout beside each measuring body — the --d measurement made legible.
Palettes
The color template the travelling accent journeys through. Swap with field.setPalette(name).
-
ours -
heatmap -
infrared -
spectrum