Appearance
anim-format (runtime format) / ParticleConfig
Interface: ParticleConfig
Properties
| Property | Type | Description |
|---|---|---|
emit | object | - |
emit.bursts? | object[] | one-off puffs: count particles at t seconds |
emit.duration? | number | the stream stops after this many seconds (emitter time incl. prewarm); none = never |
emit.max | number | at most this many alive at once (the oldest go first) |
emit.prewarm? | number | the first frame looks as if the stream had run this many seconds |
emit.rate | number | particles per second (the steady stream) |
life | [number, number] | seconds, [min, max] |
look | object | - |
look.alignToMotion? | boolean | turn each particle to its direction of travel |
look.alpha | ParticleNumberStop[] | alpha over life, 0..1 |
look.color | ParticleColorStop[] | colour over life; one stop = flat |
look.colorJitter? | number | ± brightness jitter per particle, 0..1 |
look.hueJitter? | number | ± hue turn per particle, degrees (180 = any colour) |
look.rotation? | [number, number] | start rotation range (degrees) and spin speed range (degrees / s) |
look.size | object | diameter in px at birth / death; jitter = ± fraction per particle |
look.size.end | number | - |
look.size.jitter? | number | - |
look.size.start | number | - |
look.size.stops? | ParticleNumberStop[] | - |
look.spin? | [number, number] | - |
look.stretch? | number | stretch along the motion by speed × this (seconds), for rain / sparks |
look.texture | | ParticleBuiltinTexture | { asset: string; frameMode?: "life" | "random"; frames?: number; } | a built-in texture, or {asset} / {sheet} resolved by the renderer |
motion | object | - |
motion.alongNormal? | boolean | shoot along the shape's outward normal instead of angle (spread still applies) |
motion.angle | number | emission direction, degrees |
motion.drag? | number | linear drag, 1 / s (velocity × e^(−drag·age)); with gravity it reaches gravity / drag |
motion.gravity? | object | constant acceleration, px / s² (gravity, wind …) |
motion.gravity.x | number | - |
motion.gravity.y | number | - |
motion.speed | [number, number] | start speed, px / s, [min, max] |
motion.spread | number | full width of the spread fan, degrees (360 = all round) |
motion.turbulence? | object | smooth wandering: amount px, scale px per noise cell, speed cells / s |
motion.turbulence.amount | number | - |
motion.turbulence.scale | number | - |
motion.turbulence.speed | number | - |
motion.vortex? | number | turning about the emitter's centre, degrees / s |
seed | number | 32-bit integer; same seed = same result |
shape | object | - |
shape.fromEdge? | boolean | rect / ellipse: born on the outline instead of inside |
shape.h? | number | - |
shape.inner? | number | ring: inner size as a fraction of the outer (0..1) |
shape.kind | ParticleShapeKind | - |
shape.points? | number[] | path: polyline points x0,y0,x1,y1,… in emitter space |
shape.w? | number | width / height of a line, rect, ellipse or ring (centred on the origin) |
space | "world" | "local" | world: once born a particle stays where it was born (a moving emitter leaves a trail); local: the whole cloud moves with the emitter |