oscillating

A knob that sweeps between min and max on its own, for any slot that takes a prop.

oscillating(opts: {rate?: number; min?: Expr | number; max?: Expr | number; offset?: number; clock?: SignalClock}): Scalar

Import motion from shaders/std and use motion.oscillating.

Same options as oscillate. By default it follows the page clock. Pass clock: 'node' to follow the layer's own speed prop instead, after declaring animatedTime on the definition.

Parameters

NameTypeNotes
opts{rate?: number; min?: Expr | number; max?: Expr | number; offset?: number; clock?: SignalClock}

Example

map: warps.twirl({center: p('center'), intensity: motion.oscillating({rate: 0.25, min: 0.4, max: 1.6, clock: 'node'})})

Tip. Inside map: it always follows the layer's clock, so declare animatedTime: {speed: 'speed'} there.

See also

  • oscillate — A smooth back-and-forth between min and max.
  • pulsing — A knob that switches on and off in a rhythm, for any slot that takes a prop.