Validates and freezes the options into scalar fields, allocates the pool and the scratch vectors, and seeds the stream. This is the only allocating operation on the type.
RangeError on any out-of-domain option — see
ParticleEmitterOptions for each field's domain. Options are checked
eagerly because an emitter is authored once and stepped thousands of times:
a NaN lifetime should fail where it was written, not as an invisible
never-expiring particle ten seconds later.
ReadonlypoolThe storage this emitter drives. Read it to render, inspect, or checksum.
ReadonlyrandomThis emitter's seeded stream (§33). Exposed for §34-style snapshotting via clone().
Whether billboards rotate from velocity (atan2(vy, vx)).
Plane height for §36 MVP collision, or undefined when collision is off.
§36 collisions option, as constructed.
Spawns that found the pool full and were discarded. A non-zero value means
maxParticles is smaller than emissionRate × lifetime — the honest signal
that the budget, not the authoring, is shaping the effect.
Emitter-local time in seconds: the sum of every deltaSeconds stepped so far.
Fractional remainder of the emission accumulator, in [0, 1).
Particles successfully spawned since construction or ParticleEmitter.reset.
The GPU-applied radial field, or undefined.
The bound GPU driver, or null — non-null exactly when this is a
simulation: "gpu" emitter that has been wired
(ParticleEmitter.bindGpuSimulation).
Whether this emitter records position-history trails.
Instance-stream stride this emitter's renderable must allocate —
8 by default, 10 when R-32 appearance is opted in.
Live particle count — pool.aliveCount.
§36's simulation option, as constructed.
Softness in [0, 1]. 0 keeps the default 8-float stream.
Texture handle or true, or undefined when untextured.
Trail ribbon head width in world units, or -1 to use particle size.
The trail store, or undefined when trails are disabled.
Tail width as a fraction of the head width.
Wires a simulation: "gpu" emitter to its device driver (module header,
"GPU mode"; the contract and posture live on
ParticleGpuSimulation).
Binding is once: the driver owns device state this emitter's whole history flows into, and a mid-life swap would splice two unrelated device histories. A driver whose device died takes the particle state with it — build a new emitter (§34 posture).
Spawns up to count particles immediately, using the same draw order as
automatic emission, and returns how many were actually created (the rest are
counted as dropped).
This is the §36 "burst" primitive exposed directly, for effects driven by game events rather than by the burst schedule.
Current size of live particle index, including multi-stop ramps when
configured. Endpoints come from the pool slot (spawn values).
Returns the emitter to its just-constructed state: pool emptied, stream rewound to its seed, elapsed time, accumulator, burst schedule, and counters zeroed. Stepping a reset emitter with the same deltas reproduces the original run bit for bit (§33, §34).
Advances the simulation by deltaSeconds (§7a: seconds), sampling force
fields at absolute simulation time time.
time defaults to ParticleEmitter.elapsedTime, which makes a
standalone emitter self-consistent; the §39 loop passes the simulation
clock instead. It is used only for field sampling — bursts and emission
are scheduled on emitter-local elapsed time, so an emitter behaves the same
whether it was created at simulation time 0 or 900.
deltaSeconds === 0 is a legal no-op step: nothing moves, nothing ages, no
burst window opens (the window [elapsed, elapsed) is empty) and the
accumulator gains nothing.
A seeded, fixed-capacity CPU particle emitter. See the module documentation for the step order, the closed forms, the draw-order contract, and the determinism and allocation guarantees.