API reference

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

I

interfaceParticleSystemOptions

@codexo/exojs-particles / particles / stable

Options for ParticleSystem's constructor - orthogonal config that's independent of the texture source. Texture / frames / spritesheet live in positional arguments to enforce mutual exclusivity at the type level (you can't pass both a texture and a spritesheet by accident).

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

Options for ParticleSystem's constructor - orthogonal config that's independent of the texture source. Texture / frames / spritesheet live in positional arguments to enforce mutual exclusivity at the type level (you can't pass both a texture and a spritesheet by accident).

Properties3
capacity?: number
Maximum particle count. Fixed at construction. Default 4096.
device?: GPUDevice
Direct GPU device. Lets advanced consumers wire a GPUDevice owned outside an Application (or a mock device in tests). When omitted, the backend reference is captured automatically on the first ParticleSystem.render call - WebGpuBackend ⇒ GPU mode, anything else (incl. WebGL2) ⇒ CPU mode.
How this system's particles become vertices. Fixed at construction. A mode with gpuEligible === false forces the system onto the CPU path - silently, exactly like an update module without a wgsl() implementation, and observable through ParticleSystem.gpuMode. **Ownership.** A mode passed here belongs to the system: the system destroys it in ParticleSystem.destroy, which destroys the mode's material and geometry and releases the GPU resources cached against them. Pass one mode instance per system. Handing the same instance to two systems is not supported - destroying either one pulls the material out from under the other, which then silently rebuilds a fresh material and pays for a fresh shader compile mid-life. Two systems that should share one program simply omit this option; the default mode is shared for exactly that reason and is not owned by any system.
Source