ReadonlyparticleReadonlyparticleReadonlyparticleReadonlyparticleReadonlyparticleReadonlyparticleReadonlyrandomReadonlyspaceLive particle bodies. Read-only — do not mutate.
Per-particle age in seconds, indexed parallel to active.
Read-only — do not mutate. Useful for renderers that fade particles
by age / lifetime.
Per-particle lifetime in seconds, indexed parallel to active. Read-only — do not mutate.
Number of bodies currently in the recycle pool.
Total spawn count over the lifetime of this emitter.
Remove every body (live + pooled) from the space, drop the listener,
and mark the emitter unusable. Subsequent update / emit calls
throw.
Spawn count particles immediately. Returns the live bodies that were
spawned (length may be < count when the emitter is full and
overflowPolicy is "drop-new").
Kill every live particle. Bodies return to the pool.
Mark a body for death at the start of the next update() call. Safe to
call from inside collision callbacks. No-op if the body is not a live
particle of this emitter.
Advance lifetimes, fire onUpdate, kill expired / out-of-bounds
particles, and run continuous / periodic spawning.
Call once per frame, before space.step(). dt should match the
step size you'll pass to space.step().
Physics-aware particle emitter — a pooled, lifecycle-managed swarm of dynamic bodies. Each particle is a real Body with a Circle or Polygon shape, so it collides with the world, reacts to gravity / fluids / forces, and triggers callbacks like any other body.
Example