ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Looping Expression

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Gigi Marzo
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 :)


Return to posts index

Adirai Maji
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


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2020 CreativeCOW.net All Rights Reserved
[TOP]