@motion-script/core / TrailsEffect
Interface: TrailsEffect
Defined in: attributes/shape/effects/implementations/trails.ts:31
Motion trails — the node echoed along its own motion, each tap delay seconds
further back and faded by a decay factor.
The node-level counterpart of the video echo filter, and it shares that
filter's vocabulary deliberately: same fields, same meaning, different scope.
Where echo reaches back into a decoded video's own frames, this echoes what
the node drew — so it trails text, shapes, a whole subtree, or a 3D view.
Velocity-derived, not frame-buffered, exactly like MotionBlurEffect.
Each tap reconstructs where the node was by undoing delay × n of its sampled
motion, which keeps the effect a pure function of the playhead: motion is
sampled on every advanced frame rather than every rendered one, so a
backward scrub lands on the same trail a forward play would. A frame-history
implementation cannot do that — seeking replays the scene generator without
drawing the frames it passes through, so there is no history to rebuild from.
The trade is that a tap extrapolates along the current velocity rather than
following the node's actual past path, so a trail spanning a sharp curve
straightens out. Motion blur makes the same approximation across one frame;
here it spans echoes × delay, so keep the trail short relative to how fast
the path turns.
A node that is not moving has no trail and renders untouched, rather than
stacking echoes copies of itself into a glow.
Extends
Properties
blend
blend:
"color"|"multiply"|"screen"|"overlay"|"darken"|"lighten"|"color-dodge"|"color-burn"|"hard-light"|"soft-light"|"difference"|"exclusion"|"hue"|"saturation"|"luminosity"|"normal"
Defined in: attributes/shape/effects/implementations/trails.ts:40
How the taps composite onto each other.
decay
decay:
number
Defined in: attributes/shape/effects/implementations/trails.ts:38
Per-tap alpha multiplier; tap n is drawn at decay ** n.
delay
delay:
number
Defined in: attributes/shape/effects/implementations/trails.ts:36
How far back each successive tap reaches, in seconds.
echoes
echoes:
number
Defined in: attributes/shape/effects/implementations/trails.ts:34
Number of echo taps drawn behind the node. 0 = off.
mode?
optionalmode?:EffectMode
Defined in: attributes/shape/effects/effect-data.ts:83
Inherited from
type
type:
"trails"
Defined in: attributes/shape/effects/implementations/trails.ts:32