interface ParticlesOptions {
    ageRange?: [number, number];
    angleRange?: [number, number];
    forceField?: Vector2D;
    generationRate?: number;
    maxParticles?: number;
    mouseOff?: boolean;
    origin?: [number, number];
    overlay?: boolean;
    rgba?: [number, number, number, number];
    speedRange?: [number, number];
}

Properties

ageRange?: [number, number]

Min and max age of particles in seconds

angleRange?: [number, number]

Min and max angles in radians

[-Math.PI, Math.PI]
forceField?: Vector2D

Constant force [fx, fy] or a force field texture (Work In Progress)

generationRate?: number

Particle generation rate

0.5
maxParticles?: number

Maximum number of particles

100_000
mouseOff?: boolean

Disable mouse interaction

false
origin?: [number, number]

Initial origin, will update as per mouse position if mouseOff is not set

[0, 0]
overlay?: boolean

Overlay mode

false
rgba?: [number, number, number, number]

Particle Color

[1, 0, 0, 1] -> red
speedRange?: [number, number]

Speed range [minSpeed, maxSpeed]