API reference

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

C

classSpawnModule

@codexo/exojs-particles / particles / stable

Per-frame particle spawner. Subclasses decide how many particles to emit each tick (rate-based, burst, on-demand) and write their initial values directly into the system's typed-array slots. Implementation pattern: ```ts apply(system, dt) { const count = this.computeSpawnCount(dt); for (let i = 0; i < count; i++) { const slot = system.spawn(); if (slot < 0) break; // capacity exhausted system.posX[slot] = ...; system.velX[slot] = ...; system.lifetime[slot] = ...; // ...etc } } ``` Spawn modules run before integration each frame. Multiple modules can be registered on one system and execute in registration order.

0
props
2
methods
0
events
Import
import { SpawnModule } from '@codexo/exojs-particles'

Per-frame particle spawner. Subclasses decide how many particles to emit each tick (rate-based, burst, on-demand) and write their initial values directly into the system's typed-array slots.

Implementation pattern:

```ts apply(system, dt) { const count = this.computeSpawnCount(dt); for (let i = 0; i \< count; i++) { const slot = system.spawn(); if (slot \< 0) break; // capacity exhausted system.posX[slot] = ...; system.velX[slot] = ...; system.lifetime[slot] = ...; // ...etc } } ```

Spawn modules run before integration each frame. Multiple modules can be registered on one system and execute in registration order.

Constructors 1
new(): SpawnModule
Methods 2
apply(system: ParticleSystem, dt: number): void
destroy(): void
Source