Skip to content

BurstConfig

Defined in: src/modules/particles/particles.ts:40

Configuration for burst (and the per-emission config of an emitter).

optional angle?: number

Defined in: src/modules/particles/particles.ts:42

Centre launch direction (radians). Omit for a full-circle radial spray.


colors: string | readonly string[]

Defined in: src/modules/particles/particles.ts:44

Fill colour, or a palette to pick from per particle.


count: number

Defined in: src/modules/particles/particles.ts:46

Number of particles to spawn.


optional damping?: number

Defined in: src/modules/particles/particles.ts:48

Fractional velocity decay per second (0 = none, 1 = fully damped in 1s).


optional fadeOut?: boolean

Defined in: src/modules/particles/particles.ts:53

Fade alpha 1 → 0 over life (adds OpacityDef). The curve is the system-global fadeEasing of makeParticleSystem (default linear).


optional gravity?: object

Defined in: src/modules/particles/particles.ts:55

Constant acceleration (world units / second²) applied to velocity each tick.

x: number

y: number


optional jitter?: number

Defined in: src/modules/particles/particles.ts:60

Jitter (radians) added to each particle’s launch direction. Defaults to a small 0.4 in radial mode (no angle) and to spread in cone mode.


lifetimeMs: Range

Defined in: src/modules/particles/particles.ts:62

Lifetime range (ms).


position: object

Defined in: src/modules/particles/particles.ts:64

Emission centre in world coords.

x: number

y: number


optional renderOrder?: number

Defined in: src/modules/particles/particles.ts:66

RenderOrderDef value. Default 0.


optional rng?: RandomFn

Defined in: src/modules/particles/particles.ts:68

Random source for all sampling. Default Math.random; pass a seeded rng for determinism.


optional shape?: EmissionShape

Defined in: src/modules/particles/particles.ts:70

Where particles spawn relative to position. Default { kind: 'point' }.


optional shrink?: boolean | { to: number; }

Defined in: src/modules/particles/particles.ts:75

Shrink scale 1 → to over life (adds ScaleDef); true shrinks to 0. The curve is the system-global shrinkEasing of makeParticleSystem.


size: Range

Defined in: src/modules/particles/particles.ts:77

Square particle size range (px); width and height are sampled together.


speed: Range

Defined in: src/modules/particles/particles.ts:79

Initial speed range (world units / second).


optional spin?: number

Defined in: src/modules/particles/particles.ts:81

Angular velocity (radians / second); adds RotationDef and spins the particle.


optional spread?: number

Defined in: src/modules/particles/particles.ts:83

Cone half-width (radians) around angle. Default Math.PI (full circle).