Reactive Scale Bounce

Adds a bouncy reaction to the layer's scale when triggered by a keyframe.

Code

n = 0;
if (numKeys > 0) {
  n = nearestKey(time).index;
  if (key(n).time > time){n--}
}
if (n > 0){
  t = time - key(n).time;
  amp = 20;
  freq = 4;
  decay = 3;
  reaction = amp*Math.sin(freq*t*2*Math.PI)/Math.exp(decay*t);
  [value[0] + reaction, value[1] + reaction];
} else {
  value;
}
bouncescalereactive effectanimation

How to Use

Apply to the Scale property. The layer scales up or down in a bouncy fashion immediately after passing a scale keyframe.