Description
bezier-easing is a small JavaScript library that implements cubic Bezier easing curves for animations. It works like the CSS transition-timing-function. You pass in the two control points with BezierEasing(x1, y1, x2, y2), and you get a function that takes a progress value on the X axis and returns the eased Y value. Finding Y for a given X means solving a Bezier curve, which is not trivial, so the library combines dichotomic search, Newton-Raphson iteration and sampling to stay fast and precise. The implementation is based on the approaches used in Firefox and Chrome for CSS transitions. js. Ports exist in Rust, C#, C++, Kotlin and Haxe. Contributors run the tests with npm test and the benchmark to check that changes do not slow the library down. The project is released under the MIT license.…
Highlights
- Cubic Bezier easing like CSS transitions
- Fast lookup with Newton-Raphson and sampling
- Based on Firefox and Chrome approaches
- Ports to Rust, C#, C++, Kotlin and Haxe
- MIT licensed
Ratings & Reviews
No ratings yet
Be the first to rate Bezier Easing.
People also visit
Bezier Easing FAQ
What is bezier-easing?
A JavaScript library that creates cubic Bezier easing functions for animations, matching the behaviour of CSS cubic-bezier timing.
How do I use it?
Create an easing with BezierEasing(x1, y1, x2, y2), using the same values you would write in CSS cubic-bezier, then call the returned function with a progress value.
Is it accurate?
The library focuses on performance and precision, and it is based on the approaches used in Firefox and Chrome.
Which projects use it?
The README lists React Native's Easing.bezier, React Native Reanimated, Motion, Popmotion, lottie-web and Velocity.js, among others.
What license is it under?
MIT.
What are the best Bezier Easing alternatives?
Popular alternatives to Bezier Easing include Tween.js, SVG Path Properties and Rubato. See all Bezier Easing alternatives






