API reference

Presets

A preset expands to several co-located bodies — one primitive each, sharing the element's rectangle. It's pure composition: the engine never grows to add one.

Usage

HTML
<div data-preset="blackhole"></div>

The 8 presets

blackhole

A well, an accretion disk, an event horizon, and lensing.

attractswirlsinklens

A dramatic focal element — the field pours in, circles, and is swallowed.

whitehole

An emission horizon that throws matter out.

repelstream

A source that only emits — the field is pushed away and downwind.

star

Hydrostatic equilibrium — gravity balanced by thermal pressure.

gravitythermal

A balanced body — gravity’s pull held off by thermal pressure.

quasar

An accreting black hole with polar jets.

attractswirlsinklensjet

An accreting core with bright jets firing from its poles.

galaxy

A spiral disk that settles into a plane.

attractswirlviscositylens

A spiral that winds the field into arms and settles into a disk.

nebula

A warm, slow cloud with rising wisps.

thermalviscositybuoyancy

A warm, slow cloud — the field churns and light wisps rise.

tornado

A funnel with an updraft, calmed at the edges.

swirlstreamviscosity

A funnel that swirls the field up its axis, ragged at the edges.

fountain

A class-[S] source jetting matter up, arcing home under gravity.

spawngravity

A literal fountain — matter sprays upward and falls back in an arc.