but like to modify
Code: Select all
freq = 1.0; //oscillations per second
amplitude = 50;
decay = 0.7;
amplitude*Math.sin(freq*time*2*Math.PI)/Math.exp(decay*time)
i found this
Code: Select all
from = -45; //one end of your oscillation
to = 45; //the other end of your oscillation
period = 1.5; //time between oscillation points (multiply by 2 for a round trip)
t = time % (period * 2)
if (t > period) t = 2 * period - t;
ease(t, 0, period, from, to)
