-
Using the loop expression to loop an expression
Hi all,
I’ve been using some great code of Dan Ebberts for keyframe overshoot
freq = 3;
decay = 5;n = 0;
if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time > time) n--;
}
if (n > 0){
t = time - key(n).time;
amp = velocityAtTime(key(n).time - .001);
w = freq*Math.PI*2;
value + amp*(Math.sin(t*w)/Math.exp(decay*t)/w);
}else
valueIt’s been working a treat, but I now want to to loop. I tried adding
loopOut(type = "cycle", numKeyframes = 0)
on the next line but it didn’t work.
What should I do to make the keyframes repeat indefinitely?
Thanks in advance.
Cheers,
Rob