phase
How far through a repeating cycle the clock is, 0..1.
phase(t: Expr, period: Expr | number): Expr
Import motion from shaders/std and use motion.phase.
period is the cycle length in seconds. The value ramps from 0 to 1 and snaps back.
Parameters
| Name | Type | Notes |
|---|---|---|
t | Expr | |
period | Expr | number |
Example
const sweep = motion.phase(animatedTime(params), params.uniforms.period)