Your system asks for reduced motion, so VFX-JS draws nothing. Demos on this site show plain HTML.

Class

ParticleEffect

effects/src/particle.ts:405 ↗
import { ParticleEffect } from "@vfx-js/effects";

Effect interface.

Lifecycle hooks:

  • init: called once on effect register
  • update: called every frame, before render
  • render: called every frame. Bypassed if omitted
  • dispose: called once on removal

outputRect declares the rect this stage writes into, in element-local physical px. Defaults to the source rect (no growth).

Implements
Effect
Interface members
disposeinitoutputRectrender

Constructors

new ParticleEffect()

new ParticleEffect(initial?: Partial<ParticleParams> = {}): ParticleEffect

Accessors

maxCount

get maxCount(): number

params

get params(): Readonly<ParticleParams>

Read-only view of the current params. Use setParam(key, value) to mutate so values like count are sanitized. (External tools such as tweakpane bind directly to the underlying object and skip the validation; the type marker is for programmatic use.)

Methods

setParam

setParam(updates: Partial<ParticleParams>): void

Validated bulk setter. Pass any subset of params; bad inputs (NaN / negative count, etc) are coerced to valid values before applying.