Renderer · interface
BoltSegments
The arcs a batch draws, as plain arrays with a live count.
Explained in Hello world.
interface BoltSegmentsimport type { BoltSegments } from '@driftengine/core';In depth
Fillable from outside, and that is the answer to wanting bolts without a pool. BoltPool
advances rather than evaluates, so it cannot serve a consumer that renders one plan twice, once
against a wall clock and once against a frame index, and expects the same pixels. Nothing here
requires the pool: write from, to, along, fade, seed and brightness from any
function of a seed and an absolute time, set count, and hand it to the batch. That is exactly
the route a consumer already took with ParticleInstances, and it works for the same reason:
the material is the valuable half and it is separable from whatever decides where things are.
Reported from outside, where the pool's own note that a stateless variant is not built read as "there is no way to do this" rather than "there is no second pool". There is no second pool and none is needed.
Properties
| Name | Type | Description |
|---|---|---|
from | Float32Array | from and to per segment, three floats each, live segments first. |
to | Float32Array | |
along | Float32Array | Per segment: normalised distance along its arc, and the arc's own fade. |
fade | Float32Array | |
seed | Float32Array | Per segment: the arc's seed, and how bright the caller asked for it. |
brightness | Float32Array | |
count | number | How many segments of the above are live. |
capacity | number |