| **Looping Expression**
on May 28, 2020 at 2:13:35 pm |

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 :)

| **Re: Looping Expression** on May 31, 2020 at 9:02:03 am |

Simple method would be pre-comp the layer and apply keyframe on time-remapping and apply loopOut() to time-remapping.

==================================================================================================

Thanks in Advance...

- Adirai Maji