View all expressions
Motion

Squash and Stretch Animation Expression

Creates a squash-and-stretch effect at the start of a layer’s timeline, with adjustable duration, speed, and amplitude.


maxDev = 10; // Max deviation in pixelss
pd = 30; // Base speed of oscillation
duration = 2; // Duration in seconds
t = time - inPoint;
decay = Math.log(100) / duration;
if (t < duration) {
x = scale[0] + maxDev * Math.sin(spd * t) / Math.exp(decay * t);
y = (scale[0] * scale[1]) / x;
[x, y]; }
else {
scale;}

Squash and Stretch Animation Expression

Practical use case

Ideal for adding a lively, cartoony effect to bouncing or landing animations.

Check out similar expressions

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

a mesh of elegant lines transparent image