vaweGitHub

Easingvawe After Effects eases

snap

A snap: 80 per cent of the travel by a fifth of the move, then a long, soft stop. Fast kinetic type moves this way. snap reaches 50% of its travel at 7% of the time and 90% at 32%. Its peak speed is 8.06x the average.

Demo

Progress against time, with the playhead0100.51progress50%90%Speed against time, in multiples of average speed01800.51speed, x average
Dashed: linear, and 1× speed. The dot and the line move with the object below.
Spacing: 24 equal steps of time
snap
linear
Bunched shapes are slow. Wide gaps are fast. Past the right line means overshoot.
snap
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: snap against linear.

Code

css linear() (exact)
animation-timing-function: linear(0, 0.1005, 0.1994, 0.2922, 0.3753, 0.4471, 0.508, 0.5595, 0.6032, 0.6405, 0.6727, 0.7008, 0.7254, 0.7473, 0.7668, 0.7842, 0.8, 0.8143, 0.8273, 0.8392, 0.8502, 0.8602, 0.8695, 0.8781, 0.886, 0.8934, 0.9003, 0.9067, 0.9127, 0.9183, 0.9236, 0.9285, 0.9331, 0.9374, 0.9415, 0.9453, 0.9489, 0.9523, 0.9555, 0.9585, 0.9613, 0.964, 0.9665, 0.9689, 0.9711, 0.9732, 0.9752, 0.9771, 0.9788, 0.9805, 0.982, 0.9835, 0.9849, 0.9862, 0.9874, 0.9886, 0.9896, 0.9906, 0.9916, 0.9924, 0.9932, 0.994, 0.9947, 0.9953, 0.9959, 0.9965, 0.997, 0.9974, 0.9978, 0.9982, 0.9985, 0.9988, 0.9991, 0.9993, 0.9995, 0.9997, 0.9998, 0.9999, 0.9999, 1, 1);
cubic-bezier (exact)
animation-timing-function: cubic-bezier(0.1, 0.8, 0.1, 1);

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

web animations api
el.animate({ translate: ['0 0', '240px 0'] }, { duration: 600, easing: 'linear(0, 0.1005, 0.1994, 0.2922, 0.3753, 0.4471, 0.508, 0.5595, 0.6032, 0.6405, 0.6727, 0.7008, 0.7254, 0.7473, 0.7668, 0.7842, 0.8, 0.8143, 0.8273, 0.8392, 0.8502, 0.8602, 0.8695, 0.8781, 0.886, 0.8934, 0.9003, 0.9067, 0.9127, 0.9183, 0.9236, 0.9285, 0.9331, 0.9374, 0.9415, 0.9453, 0.9489, 0.9523, 0.9555, 0.9585, 0.9613, 0.964, 0.9665, 0.9689, 0.9711, 0.9732, 0.9752, 0.9771, 0.9788, 0.9805, 0.982, 0.9835, 0.9849, 0.9862, 0.9874, 0.9886, 0.9896, 0.9906, 0.9916, 0.9924, 0.9932, 0.994, 0.9947, 0.9953, 0.9959, 0.9965, 0.997, 0.9974, 0.9978, 0.9982, 0.9985, 0.9988, 0.9991, 0.9993, 0.9995, 0.9997, 0.9998, 0.9999, 0.9999, 1, 1)', fill: 'both' });
vawe
import { EASE } from '../../core/motion/presets.js';

el.animate(
  [{ translate: '0 4vh', opacity: 0 }, { translate: '0 0', opacity: 1 }],
  { duration: 500, easing: EASE.snap, fill: 'both' },
);

// per-frame code (window.seek, vawe.onFrame): easeFn('snap')(u)

Numbers

50% of travel
7%of the time
90% of travel
32%of the time
After 10% of time
60.32%of the travel is done
Peak speed
8.06xtimes the average
Overshoot
0%stays inside the end
Undershoot
0%never below the start
linear() points
81at 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)custom10%8x0.19%
in (second key)custom90%0x7.13%

Measured on 1,339 Lottie segments (2,678 handles) and 27 HyperFrames segments. Near means influence within 10 points and speed within 0.3. No Lottie segment has both handles near this pair.

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: { influence: 10, speed: 8 } }],
  [0.6, '0 0', { in: { influence: 90, speed: 0 } }],
]);

Use and avoid

Use for

  • Kinetic type that lands in 1 to 3 frames, as in fast type films (median move 0.3 s).

Avoid for

  • A camera move. A camera takes land under 2 s, and settle or glide at 2 s or more.
Jobs for snap, from the job table
JobDuration
Fast kinetic type or an object that snaps in0.15 to 0.3 s (5 to 9 frames); an object pop adds overshoot 0.18 to 0.3

More easing