Create a cubic bezier easing function from two control points. Equivalent to CSS cubic-bezier(x1, y1, x2, y2).
cubic-bezier(x1, y1, x2, y2)
The start point is always (0, 0) and the end point is always (1, 1); only the two inner control points are specified.
X of the first control point (should be in [0, 1]).
Y of the first control point.
X of the second control point (should be in [0, 1]).
Y of the second control point.
A function mapping progress x ∈ [0, 1] → eased value.
x ∈ [0, 1]
// Equivalent to CSS ease-in-outconst ease = cubicBezier(0.42, 0, 0.58, 1);ease(0.5); // ~0.5 (symmetric curve)// Material Design standard curveconst standard = cubicBezier(0.4, 0.0, 0.2, 1.0); Copy
// Equivalent to CSS ease-in-outconst ease = cubicBezier(0.42, 0, 0.58, 1);ease(0.5); // ~0.5 (symmetric curve)// Material Design standard curveconst standard = cubicBezier(0.4, 0.0, 0.2, 1.0);
Create a cubic bezier easing function from two control points. Equivalent to CSS
cubic-bezier(x1, y1, x2, y2).The start point is always (0, 0) and the end point is always (1, 1); only the two inner control points are specified.