#easing #bezier #animation #port #curve #github #function

bezier_easing

This is a rust port of Gaëtan Renaudeau's bezier-easing from https://github.com/gre/bezier-easing

2 releases

0.1.1 Jan 26, 2024
0.1.0 Jan 26, 2024

#23 in #bezier

Download history 3/week @ 2024-11-02 5/week @ 2024-12-14 17/week @ 2024-12-21 7/week @ 2024-12-28 16/week @ 2025-01-04 59/week @ 2025-01-11 54/week @ 2025-01-18 84/week @ 2025-01-25 50/week @ 2025-02-01

249 downloads per month

MIT license

8KB
146 lines

Bezier Easing for Rust

This is a rust port of gre/bezier-easing.

Bezier easing provides a way to create custom easing functions (ease-in, ease-out, ease-in-out...) for use in animations.

By providing the coordinates of the bezier curve's control points, you can create your own easing functions that follow the curve you've defined.

Usage

use bezier_easing::bezier_easing;

let ease = bezier_easing(0.25, 0.1, 0.25, 1.0);
assert_eq!(ease(0.0), 0.0);
assert_eq!(ease(0.5), 0.3125);
assert_eq!(ease(1.0), 1.0);

License

MIT

Acknowledgements

No runtime deps