pulsing
A knob that switches on and off in a rhythm, for any slot that takes a prop.
pulsing(opts: {period: number; duty: number; soften?: number; clock?: SignalClock}): Scalar
Import motion from shaders/std and use motion.pulsing.
period is seconds per cycle, duty the on fraction, soften the edge ease, as in pulseTrain. Follows the page clock unless clock: 'node' is set.
Parameters
| Name | Type | Notes |
|---|---|---|
opts | {period: number; duty: number; soften?: number; clock?: SignalClock} |
Example
effect: effects.color.saturate(motion.pulsing({period: 2, duty: 0.5, soften: 0.1})) // color, then gray, then color
Tip. Inside
map:it always follows the layer's clock, so declareanimatedTime: {speed: 'speed'}there.
See also
pulseTrain— An on/off rhythm: 1 for the first part of each cycle, 0 for the rest.oscillating— A knob that sweeps betweenminandmaxon its own, for any slot that takes a prop.