Complete set of RPE easing functions (28 types) with helpers for evaluation, derivatives, integrals, and bezier curves. Compatible with RPE easingType 1–28.
import { easing, EASING_NAMES, resolveEasingType } from './easing';// Evaluate CubicOut at 50% progressconst v = easing(8, 0.5); // ~0.875// Look up by nameconst t = resolveEasingType('backOut'); // 20// Use a sub-range [0.2, 0.8] of SineInOutconst v2 = easing(6, 0.5, 0.2, 0.8);// Custom cubic-bezier (like CSS)const v3 = easing(1, 0.5, 0, 1, undefined, [0.4, 0.0, 0.2, 1.0]);// Resolve an easing name to a number before storing in an eventconst easingType = resolveEasingType('elasticOut'); // 24 Copy
import { easing, EASING_NAMES, resolveEasingType } from './easing';// Evaluate CubicOut at 50% progressconst v = easing(8, 0.5); // ~0.875// Look up by nameconst t = resolveEasingType('backOut'); // 20// Use a sub-range [0.2, 0.8] of SineInOutconst v2 = easing(6, 0.5, 0.2, 0.8);// Custom cubic-bezier (like CSS)const v3 = easing(1, 0.5, 0, 1, undefined, [0.4, 0.0, 0.2, 1.0]);// Resolve an easing name to a number before storing in an eventconst easingType = resolveEasingType('elasticOut'); // 24
Complete set of RPE easing functions (28 types) with helpers for evaluation, derivatives, integrals, and bezier curves. Compatible with RPE easingType 1–28.
Easing type reference
Usage examples