API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classSpawnOnDeath
Sub-emitter: triggers a child SpawnModule on a target system at the dying particle's position. Use for explosion-on-impact, sparks at end of life, multi-stage VFX. The child module receives a synthesized `dt` of 0 - it must spawn immediately rather than rely on rate accumulation. BurstSpawn works naturally; RateSpawn is the wrong fit here. Position is the only field taken from the dying particle - child distributions decide everything else, and their sampled positions are treated as offsets from the death position. To keep child particles riding the parent's velocity, configure the child's velocity distribution to match, or read ParticleDeathContext.velocityX in a custom death module - see that type's docs for how it can be one frame stale on the GPU backend.
import { SpawnOnDeath } from '@codexo/exojs-particles'Sub-emitter: triggers a child SpawnModule on a target system at the dying particle's position. Use for explosion-on-impact, sparks at end of life, multi-stage VFX.
The child module receives a synthesized `dt` of 0 - it must spawn immediately rather than rely on rate accumulation. BurstSpawn works naturally; RateSpawn is the wrong fit here.
Position is the only field taken from the dying particle - child distributions decide everything else, and their sampled positions are treated as offsets from the death position. To keep child particles riding the parent's velocity, configure the child's velocity distribution to match, or read ParticleDeathContext.velocityX in a custom death module - see that type's docs for how it can be one frame stale on the GPU backend.
new(targetSystem: ParticleSystemThe central coordinator of the particle pipeline. `ParticleSystem` is a Drawable that owns: - **Particle storage** - one channel per attribute (position, veloc…, spawner: SpawnModulePer-frame particle spawner. Subclasses decide how many particles to emit each tick (rate-based, burst, on-demand) and fill each emitted particle's initial valu…, count: number): SpawnOnDeathdestroy(): voidonDeath(_system: ParticleSystemThe central coordinator of the particle pipeline. `ParticleSystem` is a Drawable that owns: - **Particle storage** - one channel per attribute (position, veloc…, death: ParticleDeathContextThe state of one particle at the moment it expired. A snapshot, not a view: it is copied out of the simulation when the particle dies and stays valid for the w…): voidcount: number