vaweGitHub

EasingClassic eases

easeInOutCubic

It is slow at both ends and fast in the middle. The usual default curve: a firm start or stop that most viewers read as natural.

easeInOutCubic reaches 50% of its travel at 50% of the time and 90% at 71%. Its peak speed is 3x the average.

Classic easesfamily: cubicpeak 3x

Progress against time0100.51progress50%90%
The dashed line is linear. The dots mark 50% and 90% of the travel.
Velocity, in multiples of average speed01200.51speed, x average
The dashed line is 1x, the speed of linear.

Live demo

The blue box uses the exact linear() string below, in your browser. The grey box is linear.

easeInOutCubic
linear

Your system asks for reduced motion, so the boxes rest at the end of the move.

Numbers

50% of travel
50%of the time
90% of travel
71%of the time
After 10% of time
0.4%of the travel is done
Peak speed
3xtimes the average
Overshoot
0%stays inside the end
Undershoot
0%never below the start
linear() points
41at a 0.002 tolerance
cubic-bezier
closeworst gap 0.9 points

Copy the code

css linear() (exact)
animation-timing-function: linear(0, 0.0001, 0.0005, 0.0017, 0.004, 0.0078, 0.0135, 0.0214, 0.032, 0.0456, 0.0625, 0.0832, 0.108, 0.1373, 0.1715, 0.2109, 0.256, 0.3071, 0.3645, 0.4287, 0.5, 0.5713, 0.6355, 0.6929, 0.744, 0.7891, 0.8285, 0.8627, 0.892, 0.9168, 0.9375, 0.9544, 0.968, 0.9786, 0.9865, 0.9922, 0.996, 0.9983, 0.9995, 0.9999, 1);
cubic-bezier (nearest fit)
animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);

Least-squares fit to the easeInOutCubic curve; the worst gap is 0.9 points of travel. It is close, not exact: use linear() when the end of the curve matters.

web animations api
el.animate({ translate: ['0 0', '240px 0'] }, { duration: 600, easing: 'linear(0, 0.0001, 0.0005, 0.0017, 0.004, 0.0078, 0.0135, 0.0214, 0.032, 0.0456, 0.0625, 0.0832, 0.108, 0.1373, 0.1715, 0.2109, 0.256, 0.3071, 0.3645, 0.4287, 0.5, 0.5713, 0.6355, 0.6929, 0.744, 0.7891, 0.8285, 0.8627, 0.892, 0.9168, 0.9375, 0.9544, 0.968, 0.9786, 0.9865, 0.9922, 0.996, 0.9983, 0.9995, 0.9999, 1)', fill: 'both' });
vawe
import { easeInOutCubic } from '../../core/motion/curves.js';
import { curveToLinear } from '../../core/motion/springs.js';

const easing = curveToLinear(easeInOutCubic, { tolerance: 0.002 }); // the linear() string above
const x = easeInOutCubic(u);                                         // per-frame code, u in 0..1

When to use it, and when to avoid it

Use it for

  • Moves between two resting positions: camera pushes, slides and loops.
  • For cubic: general UI and card moves between 200 and 500 ms.

Avoid it for

  • Quick UI feedback under 200 ms: the slow start delays the response.
  • For cubic: long travel across the frame: the stop is abrupt for the distance.

The nearest vawe ease

The closest of the nine vawe After Effects eases is settle, an RMS gap of 0.014 in progress. After Effects and vawe set the shape with two handles, so it can be tuned where a named curve cannot.