TimeTrail

An Echo-style temporal trail — whatever moves sheds a smooth, decaying long-exposure ghost trail (frame-difference Motion mode works on opaque images and video; Alpha mode trails a shape's coverage), with optional zoom-feedback tunnels and rainbow light-painting

Props

  • trailSource

    What sheds the trail — Motion trails whatever changes frame-to-frame (works on opaque images and video), Alpha trails the child's transparency coverage (best for a clean shape over empty canvas)

    Type
    "motion" | "alpha"
    Default
    motion
  • motionThreshold

    How much a pixel must change between frames to shed a trail (Motion source only) — lower catches subtle movement, higher only fast motion

    Type
    number
    Default
    0.06
  • trailLength

    How long the trail lingers, in seconds — the time constant of the fade (the star control)

    Type
    number
    Default
    0.6
  • diffusion

    How much the trail smears and softens as it fades — 0 keeps crisp ghost frames, higher melts them together

    Type
    number
    Default
    1
  • trailOpacity

    Overall strength of the trail behind the live frame

    Type
    number
    Default
    1
  • trailBlend

    How the trail combines with the frame — Add / Screen build glowing light-painting trails, Multiply lays down dark ink ghosts, plus the full standard blend set

    Type
    "normal" | "add" | "screen" | "multiply" | "overlay" | "softLight" | "hardLight" | "darken" | "lighten" | "colorDodge" | "colorBurn" | "linearBurn" | "difference" | "exclusion" | "hue" | "saturation" | "color" | "luminosity"
    Default
    normal
  • driftX

    Sideways drift of the trail per second — smears the trail in a direction

    Type
    number
    Default
    0
  • driftY

    Vertical drift of the trail per second

    Type
    number
    Default
    0
  • zoom

    Per-frame zoom of the trail around the centre — above 1 pulls the trail into an outward tunnel, below 1 sucks it inward

    Type
    number
    Default
    1
  • tintMode

    color the trail — Color tints it a single hue, Rainbow cycles hue as the trail ages

    Type
    "none" | "color" | "rainbow"
    Default
    none
  • tint

    Trail tint color (used in Color mode)

    Type
    string
    Default
    #33aaff
  • speed

    Simulation speed. 0 freezes the trail in place.

    Type
    number
    Default
    1

Usage

<Shader>
  <TimeTrail>
    <Circle />
  </TimeTrail>
</Shader>