Expressions Adobe After Effects
If you aren’t yet familiar with this expression, don’t even dare tell anyone you’re a motion designer. The Elastic expression will help you to make your animation more lively, vibrant, and less rigid. This expression is present almost in any decent script with animator tools like Motion Tools, DUIK and others. This tool is so important that we all are waiting for it to be added to the standard After Effects tools for a long time already. But for now, we still have to add an expression to keyframes properties:
Problem solving: You have added the expression, but nothing happens?
There may be several reasons for this:
amp = .1; // Amplitude
freq = 2.0; // Frequency
decay = 2.0; // Decay
Elastic and Bounce
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 && t < 1){
v = velocityAtTime(key(n).time - thisComp.frameDuration/10);
value + v*amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
}else{value}