-
Looping Expression
Hi, I’m approaching to world of animation. So I’d like to loop an expression.
I’ll try to be clearer,
I have this expression (bounce, to apply to scale and/or position) and I want to loop (cycle) it.amp = .06;
freq = 2;
decay = 7;n = 0;
if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time > time){
n--;
}
}
if (n == 0){
t = 0;
}else{
t = time - key(n).time;
}if (n > 0){
v = velocityAtTime(key(n).time - thisComp.frameDuration/10);
value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{
value;
}and I’d like to loop with simple expression like that:
loopOut ("pingpong")How I do it?
Thank u in advance 🙂