FORUMS: list search recent posts

Looping an expression itself.

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
John Winthrop
Looping an expression itself.
on Sep 30, 2016 at 9:34:27 pm

I am using this expression to make a square jiggle and decay to a stop in the y dimension.

freq =3;
amplitude = 15;
decay = 5;

s = amplitude*Math.sin(freq*time*2*Math.PI)/Math.exp(decay*time);
scale + [0,s]


How can I make this expression essentially RESTART every second? I though using "loopOut ( the expression)" would do it but it did not.


Return to posts index

Dan Ebberts
Re: Looping an expression itself.
on Sep 30, 2016 at 10:10:16 pm

This should work:

freq =3;
amplitude = 15;
decay = 5;
t = time%1;

s = amplitude*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
scale + [0,s]


Dan



Return to posts index

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