effect-motion
API Referenceeffect-motionNamespacesParticlesInterfaces

EmitterConfig

The emitter configuration an author writes. Ranged props are drawn once

Interface: EmitterConfig

Defined in: packages/motion/src/particles/Particle.ts:58

The emitter configuration an author writes. Ranged props are drawn once per particle at birth; gravity is a shared force; over-life curves are deterministic functions of particle age.

Properties

angle

readonly angle: Range;

Defined in: packages/motion/src/particles/Particle.ts:65

launch angle range (degrees; 0 = up, counterclockwise-positive)


drift?

readonly optional drift?: Range;

Defined in: packages/motion/src/particles/Particle.ts:88

fill mode only — magnitude of each particle's small isotropic drift velocity (px/sec). Replaces speed+angle launch for evenly-spread floating fields. [min, max] of the speed; direction is uniform.


gravity

readonly gravity: number;

Defined in: packages/motion/src/particles/Particle.ts:74

shared screen-downward (-y) acceleration (px/sec²); not ranged


life

readonly life: Range;

Defined in: packages/motion/src/particles/Particle.ts:67

lifetime range (seconds)


opacity?

readonly optional opacity?: Range;

Defined in: packages/motion/src/particles/Particle.ts:72

birth opacity range (0..1), drawn per particle; the over-life opacity curve (if any) multiplies this baseline. Omit → every particle 1.


opacityOverLife?

readonly optional opacityOverLife?: OverLife;

Defined in: packages/motion/src/particles/Particle.ts:92

optional over-life opacity curve (0..1)


palette

readonly palette: readonly Color[];

Defined in: packages/motion/src/particles/Particle.ts:76

colors drawn from uniformly at birth


region?

readonly optional region?: {
  h: number;
  w: number;
};

Defined in: packages/motion/src/particles/Particle.ts:82

fill mode only — the rectangular region particles scatter across and wrap around, in the field's local coordinates. The animator defaults this to the whole frame when the author doesn't set it.

h

readonly h: number;

w

readonly w: number;

size

readonly size: Range;

Defined in: packages/motion/src/particles/Particle.ts:69

birth size range (px radius)


sizeOverLife?

readonly optional sizeOverLife?: OverLife;

Defined in: packages/motion/src/particles/Particle.ts:90

optional over-life size curve (multiplies drawn size)


speed

readonly speed: Range;

Defined in: packages/motion/src/particles/Particle.ts:63

launch speed range (px/sec)


x

readonly x: number;

Defined in: packages/motion/src/particles/Particle.ts:60

emitter origin


y

readonly y: number;

Defined in: packages/motion/src/particles/Particle.ts:61

On this page