1681-engine / index / DriftOptions
Interface: DriftOptions ​
Defined in: src/ambient/life/Drift.ts:16
Properties ​
count ​
count: number;Defined in: src/ambient/life/Drift.ts:19
Bodies in the pool; a body off screen is hidden and re-used, never freed.
depth? ​
optional depth?: number;Defined in: src/ambient/life/Drift.ts:36
Depth in the world layer (default 900_000: over the bodies and props, under the weather and the names).
from? ​
optional from?: LifeSource;Defined in: src/ambient/life/Drift.ts:29
Where a body sets off from, if anywhere in particular: a canopy on screen a leaf falls from (and lands just under), a patch of ground ash or embers lift off. Null when there is none in view now.
kind ​
kind: DriftKind;Defined in: src/ambient/life/Drift.ts:17
looks ​
looks: readonly readonly string[][];Defined in: src/ambient/life/Drift.ts:24
The looks, each a list of frames; body i wears looks[i % looks.length]. A leaf tumbles through its frames and lies on the first; an ember cools from its first to its last; the others wear the first.
random? ​
optional random?: () => number;Defined in: src/ambient/life/Drift.ts:39
Returns ​
number
snap? ​
optional snap?: boolean;Defined in: src/ambient/life/Drift.ts:38
Positions on whole world pixels (default true).
sourceOnly? ​
optional sourceOnly?: boolean;Defined in: src/ambient/life/Drift.ts:34
Only from from (a drift over certain ground): a body waits rather than drift in from the view's edge. Default false — a leaf with no canopy in view still blows in from the edge.