API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classSpawnOnDeath

@codexo/exojs-particles / particles / stable

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 forwarded — child distributions decide everything else. To keep child particles riding the parent's velocity, configure the child's velocity distribution to match.

3
props
2
methods
0
events
Import
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 forwarded — child distributions decide everything else. To keep child particles riding the parent's velocity, configure the child's velocity distribution to match.

Constructors 1
new(targetSystem: ParticleSystem, spawner: SpawnModule, count: number): SpawnOnDeath
Methods 2
destroy(): void
onDeath(parent: ParticleSystem, slot: number): void
Properties 3
count: number
spawner: SpawnModule
targetSystem: ParticleSystem
Source