wave(lo: number, hi: number, t: number, func?: (x: number)=>number): number
Interpolate between 2 values (Optionally takes a custom periodic function, which default to Math.sin).// bounce color between 2 values as time goes on onUpdate("colorful", (c) => { c.color.r = wave(0, 255, time()) c.color.g = wave(0, 255, time() + 1) c.color.b = wave(0, 255, time() + 2) })