easeInOutQuart
It is slow at both ends and fast in the middle. A strong ease: most of the travel happens in the fast section. easeInOutQuart reaches 50% of its travel at 50% of the time and 90% at 67%. Its peak speed is 4x the average.
Demo
easeInOutQuart
linear
easeInOutQuart
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.0003, 0.0008, 0.002, 0.0041, 0.0075, 0.0128, 0.0205, 0.0313, 0.0458, 0.0648, 0.0893, 0.12, 0.1582, 0.2048, 0.261, 0.3281, 0.4073, 0.5, 0.5927, 0.672, 0.739, 0.7952, 0.8418, 0.88, 0.9107, 0.9352, 0.9542, 0.9688, 0.9795, 0.9872, 0.9925, 0.996, 0.998, 0.9992, 0.9997, 1, 1, 1);animation-timing-function: cubic-bezier(0.77, 0, 0.23, 1);Least-squares fit; the worst gap is 2.0 points of travel. Use linear() when the end of the curve matters.
el.animate({ translate: ['0 0', '240px 0'] }, { duration: 600, easing: 'linear(0, 0, 0.0001, 0.0003, 0.0008, 0.002, 0.0041, 0.0075, 0.0128, 0.0205, 0.0313, 0.0458, 0.0648, 0.0893, 0.12, 0.1582, 0.2048, 0.261, 0.3281, 0.4073, 0.5, 0.5927, 0.672, 0.739, 0.7952, 0.8418, 0.88, 0.9107, 0.9352, 0.9542, 0.9688, 0.9795, 0.9872, 0.9925, 0.996, 0.998, 0.9992, 0.9997, 1, 1, 1)', fill: 'both' });import { easeInOutQuart } from '../../core/motion/curves.js';
import { curveToLinear } from '../../core/motion/springs.js';
const easing = curveToLinear(easeInOutQuart, { tolerance: 0.002 }); // the linear() string above
const x = easeInOutQuart(u); // per-frame code, u in 0..1Numbers
- 50% of travel
- 50%of the time
- 90% of travel
- 67%of the time
- After 10% of time
- 0.08%of the travel is done
- Peak speed
- 4xtimes 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 2.0 points
Use and avoid
Use for
- Moves between two resting positions: camera pushes, slides and loops.
- Panels and overlays that need a clear stop.
Avoid for
- Quick UI feedback under 200 ms: the slow start delays the response.
- Short moves under 150 ms: the slow part is too short to see.
Nearest vawe ease
swap, curve gap 0.0134.