[Go to site: main page, start]

Interface VFXParticleGeneratorData

interface VFXParticleGeneratorData {
    alpha: { max: number; min: number };
    area: object | null;
    blend: number;
    config: ParticleGeneratorConfiguration;
    count: number;
    duration?: number;
    elevation: number;
    fade: { in: number; out: number } | null;
    initial: number;
    lifetime: { max: number | null; min: number };
    mode: string;
    perFrame?: number;
    pointSourceMask: any;
    rotation?: ParticleGeneratorRotationOptions;
    scale: { max: number; min: number };
    sort: number;
    spawnRate: number;
    textures: string[];
    velocity: { angle: number; speed: number; x: number; y: number } | null;
}
Index

Properties

alpha: { max: number; min: number }

Alpha range [min, max] (default 1)

area: object | null

Spawn area; a point, rect, circle, ring, or line object. Supports reference resolution (e.g. {reference: "target"}).

blend: number

PIXI blend mode (default NORMAL = 0)

Additional ParticleGenerator configuration passed directly to the constructor. Can include orbit, follow, constraints, drift, blur, clip, anchor, callbacks, and any other ParticleGeneratorConfiguration fields. When effects are built directly in code, this can also include a custom batchable shaderClass that is compatible with SpriteMesh and whose plugin was already registered. Values here override any explicitly-set schema fields of the same name.

count: number

Target particle count (default 50)

duration?: number

How long the generator runs in ms before soft-stopping to let existing particles expire. If absent, runs until the component is explicitly stopped.

elevation: number

Layer elevation for the particle container (default 0)

fade: { in: number; out: number } | null

Fade-in and fade-out durations in ms (default null)

initial: number

Proportion of count to spawn immediately on start [0, 1] (default 0.25)

lifetime: { max: number | null; min: number }

Particle lifetime in ms. If max is null, min is used as a fixed value. Otherwise, spawns with a random lifetime in [min, max] (default min 1000).

mode: string

Generator mode: "ambient" or "effect" (default "effect")

perFrame?: number

Deprecated since v14. Migrated to spawnRate.

pointSourceMask: any

An optional mask for clipping particles to wall boundaries. Accepts either a pre-computed PointSourcePolygon (shared via VFXReferenceField resolution) or a serializable config object {x, y, type, radius} from which a polygon is computed at draw time. Supports reference resolution for efficient reuse across multiple components within the same effect.

Rotation configuration for particles.

scale: { max: number; min: number }

Scale range [min, max] (default 1)

sort: number

Sort order within the elevation layer (default 0)

spawnRate: number

Maximum particles spawned per second during auto-spawn (default 300)

textures: string[]

Texture paths for particles

velocity: { angle: number; speed: number; x: number; y: number } | null

Initial particle velocity. Specify either x/y components or speed (px/s) and angle (degrees). (default null)