View all expressions
Motion

Bounce Expression

Creates a bounce effect when an object comes to rest.


amp = 50;
freq = 2;
decay = 5;
n = 0;
if (numKeys > 0 && time > key(numKeys).time) {
   t = time - key(numKeys).time;
   n = Math.sin(freq * t * Math.PI * 2) * amp * Math.exp(-decay * t);
}
value + [n, n];

Bounce Expression

Practical use case

A ball bounces to a stop after falling, using this expression to animate its bounce motion.

Check out similar expressions

Data-driven video workflows for After Effects are easier with Plainly.

a mesh of elegant lines transparent image