API reference

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

I

interfaceParticleBatch

@codexo/exojs-particles / particles / stable

The live particles of one system, addressed by semantic channel. This is the bulk surface an UpdateModule and a ParticleRenderMode operate on. Channels are named for what they mean; how they are packed - one array per component today, something else tomorrow - is the simulation's business and may change. A loop reads the channel it needs once and then indexes plain typed arrays, so naming costs nothing per particle. Indices `[0, count)` are the range worth visiting. A batch can contain dead slots, so a loop that must not touch them checks isAlive; a purely arithmetic pass over dead slots is harmless and can skip the check.

9
props
1
methods
0
events
Import
import { ParticleBatch } from '@codexo/exojs-particles'

The live particles of one system, addressed by semantic channel.

This is the bulk surface an UpdateModule and a ParticleRenderMode operate on. Channels are named for what they mean; how they are packed - one array per component today, something else tomorrow - is the simulation's business and may change. A loop reads the channel it needs once and then indexes plain typed arrays, so naming costs nothing per particle.

Indices `[0, count)` are the range worth visiting. A batch can contain dead slots, so a loop that must not touch them checks isAlive; a purely arithmetic pass over dead slots is harmless and can skip the check.

Methods1
isAlive(index: number): boolean
Whether the slot at index currently holds a live particle.
Properties9
capacity: number
Fixed number of slots this system can ever hold.
color: Uint32Array
Packed 0xAABBGGRR tint, one entry per slot.
count: number
Upper bound of the range that can hold live particles.
frame: Uint16Array
Atlas frame selector, one entry per slot. Anything that is not a declared frame index shows frame 0.
Source