easeInCubic
It starts slowly and ends fast. A firm start or stop. The common default. easeInCubic reaches 50% of its travel at 79% of the time and 90% at 97%. Its peak speed is 3x the average.
Demo
easeInCubic
linear
easeInCubic
linear
Your system asks for reduced motion, so nothing plays. The charts above show the whole move.
Code
animation-timing-function: linear(0, 0, 0.0001, 0.0004, 0.001, 0.002, 0.0034, 0.0054, 0.008, 0.0114, 0.0156, 0.0208, 0.027, 0.0343, 0.0429, 0.0527, 0.064, 0.0768, 0.0911, 0.1072, 0.125, 0.1447, 0.1664, 0.1901, 0.216, 0.2441, 0.2746, 0.3075, 0.343, 0.3811, 0.4219, 0.4655, 0.512, 0.5615, 0.6141, 0.6699, 0.729, 0.7915, 0.8574, 0.9269, 1);animation-timing-function: cubic-bezier(0.33, 0, 0.67, 0);Least-squares fit; the worst gap is 0.2 points of travel. The linear() string is exact.
el.animate({ translate: ['0 0', '240px 0'] }, { duration: 600, easing: 'cubic-bezier(0.33, 0, 0.67, 0)', fill: 'both' });import { easeInCubic } from '../../core/motion/curves.js';
import { curveToLinear } from '../../core/motion/springs.js';
const easing = curveToLinear(easeInCubic, { tolerance: 0.002 }); // the linear() string above
const x = easeInCubic(u); // per-frame code, u in 0..1Numbers
- 50% of travel
- 79%of the time
- 90% of travel
- 97%of the time
- After 10% of time
- 0.1%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
- exactworst gap 0.2 points
Use and avoid
Use for
- Exits and build-ups that leave the frame at speed.
Avoid for
- Entrances: the first frames barely move, so the viewer waits.
- Long travel across the frame: the stop is abrupt for the distance.
Nearest vawe ease
launch, curve gap 0.0444.