vaweGitHub

Easingvawe After Effects eases

leave

A decelerating exit: it eases away and slows into its end. The house exit is launch. leave reaches 50% of its travel at 40% of the time and 90% at 70%. Its peak speed is 1.95x the average.

Exit

Demo

Progress against time, with the playhead0100.51progress50%90%Speed against time, in multiples of average speed0100.51speed, x average
Dashed: linear, and 1× speed. The dot and the line move with the object below.
Spacing: 24 equal steps of time
leave
linear
Bunched shapes are slow. Wide gaps are fast. Past the right line means overshoot.
leave
linear

Your system asks for reduced motion, so nothing plays. The charts above show the whole move.

Four interface motions with this ease
Card enters
Modal scales in
Toast drops
Menu slides
2 s film from the vawe renderer: leave against linear.

Code

css linear() (exact)
animation-timing-function: linear(0, 0.0019, 0.0078, 0.018, 0.0327, 0.052, 0.076, 0.1047, 0.138, 0.1755, 0.2167, 0.2609, 0.3075, 0.3555, 0.4041, 0.4525, 0.5, 0.5461, 0.5902, 0.6322, 0.6718, 0.7088, 0.7432, 0.7751, 0.8044, 0.8312, 0.8557, 0.8779, 0.8978, 0.9157, 0.9316, 0.9456, 0.9577, 0.9682, 0.977, 0.9843, 0.9901, 0.9945, 0.9976, 0.9994, 1);
cubic-bezier (exact)
animation-timing-function: cubic-bezier(0.3333, 0, 0.4, 1);

Exact: the two After Effects handles are the two control points. EASE.leave uses the linear() string above.

web animations api
el.animate({ translate: ['0 0', '240px 0'] }, { duration: 600, easing: 'linear(0, 0.0019, 0.0078, 0.018, 0.0327, 0.052, 0.076, 0.1047, 0.138, 0.1755, 0.2167, 0.2609, 0.3075, 0.3555, 0.4041, 0.4525, 0.5, 0.5461, 0.5902, 0.6322, 0.6718, 0.7088, 0.7432, 0.7751, 0.8044, 0.8312, 0.8557, 0.8779, 0.8978, 0.9157, 0.9316, 0.9456, 0.9577, 0.9682, 0.977, 0.9843, 0.9901, 0.9945, 0.9976, 0.9994, 1)', fill: 'both' });
vawe
import { EASE } from '../../core/motion/presets.js';

// 0.3 s: 0.6 of a 0.5 s entrance. fill forwards, never both: a backwards fill would cover the entrance.
el.animate(
  [{ translate: '0 0', opacity: 1 }, { translate: '0 -0.3em', opacity: 0 }],
  { duration: 300, easing: EASE.leave, fill: 'forwards' },
);

// the helper does the same from the entrance's length: leave(el, { ease: 'leave' })
// per-frame code (window.seek, vawe.onFrame): easeFn('leave')(u)

Numbers

50% of travel
40%of the time
90% of travel
70%of the time
After 10% of time
3.27%of the travel is done
Peak speed
1.95xtimes the average
Overshoot
0%stays inside the end
Undershoot
0%never below the start
linear() points
41at a 0.002 tolerance
cubic-bezier
exactbuilt from two handles

After Effects handles

Set these in After Effects under Keyframe Velocity: the outgoing handle on the first key, the incoming handle on the second. Influence is how far along the segment the handle reaches, in per cent of its duration. Speed is the pace at the key as a multiple of the segment’s average (0 stops dead, 1 is straight).

HandleNameInfluenceSpeedReal handles near it
out (first key)easyEase33.33%0x33.35%
in (second key)long60%0x6.2%

Measured on 1,339 Lottie segments (2,678 handles) and 27 HyperFrames segments. Near means influence within 10 points and speed within 0.3. Both handles together: 9 segments (0.67%), 0.97% of the 616 entrances and 0% of the 57 exits.

vawe: key table
import { keys } from '../../core/motion/presets.js';

// out handle on the first key, in handle on the second
keys(el, 'translate', [
  [0, '0 6vh', { out: 'easyEase' }],
  [0.6, '0 0', { in: 'long' }],
]);

Use and avoid

Use for

  • An exit that is a settle or a hand-off into the next shot, when the page says so.
  • Outside reference: 57 of 57 Lottie exits end at 1.5x the average or slower.

Avoid for

  • A plain exit. Exits run 0.35 to 0.6 of the entrance and accelerate: use launch.
  • Entrances. It is built to finish, not to start.
Jobs for leave, from the job table
JobDuration
Exit0.35 to 0.6 of the entrance (0.3 s after a 0.5 s one); 0.18 to 0.3 s when the entrance length is unknown

Video components that use leave

1 video components set EASE.leave. The first four play here.

More easing