Skip to main content

Interface: ParticleSystemOptions

Defined in: src/mobjects/particles/ParticleSystem.ts:69

Options for creating a ParticleSystem.

Properties​

endColor?​

optional endColor: string

Defined in: src/mobjects/particles/ParticleSystem.ts:95

Color at death. Default: white.


endSize?​

optional endSize: number

Defined in: src/mobjects/particles/ParticleSystem.ts:91

Size at death. Default: 0.


forces?​

optional forces: ParticleForces

Defined in: src/mobjects/particles/ParticleSystem.ts:87

Forces applied each step. Default: none.


lifetime?​

optional lifetime: number

Defined in: src/mobjects/particles/ParticleSystem.ts:75

Base lifetime in seconds. Default: 2.


lifetimeSpread?​

optional lifetimeSpread: number

Defined in: src/mobjects/particles/ParticleSystem.ts:77

Random +/- lifetime variation in seconds. Default: 0.


maxParticles?​

optional maxParticles: number

Defined in: src/mobjects/particles/ParticleSystem.ts:73

Maximum living particles. Emission stops at the cap. Default: 500.


position?​

optional position: Vector3Tuple

Defined in: src/mobjects/particles/ParticleSystem.ts:79

Emitter origin [x, y, z]. Default: [0, 0, 0].


positionSpread?​

optional positionSpread: Vector3Tuple

Defined in: src/mobjects/particles/ParticleSystem.ts:81

Random +/- spawn offset per axis from the origin. Default: [0, 0, 0].


seed?​

optional seed: number

Defined in: src/mobjects/particles/ParticleSystem.ts:99

Seed for the deterministic PRNG. Default: 0.


spawnRate?​

optional spawnRate: number

Defined in: src/mobjects/particles/ParticleSystem.ts:71

Particles emitted per second. Default: 20.


startColor?​

optional startColor: string

Defined in: src/mobjects/particles/ParticleSystem.ts:93

Color at birth. Default: white.


startSize?​

optional startSize: number

Defined in: src/mobjects/particles/ParticleSystem.ts:89

Size at birth. Default: 8.


useOklab?​

optional useOklab: boolean

Defined in: src/mobjects/particles/ParticleSystem.ts:97

Interpolate color in Oklab space for a smoother blend. Default: false.


velocity?​

optional velocity: Vector3Tuple

Defined in: src/mobjects/particles/ParticleSystem.ts:83

Initial velocity [x, y, z] in units/sec. Default: [0, 1, 0].


velocitySpread?​

optional velocitySpread: Vector3Tuple

Defined in: src/mobjects/particles/ParticleSystem.ts:85

Random +/- velocity variation per axis. Default: [0, 0, 0].