Crates.io | bezier_easing |
lib.rs | bezier_easing |
version | 0.1.1 |
source | src |
created_at | 2024-01-26 07:02:38.384227 |
updated_at | 2024-01-26 10:37:33.792186 |
description | This is a rust port of Gaƫtan Renaudeau's bezier-easing from https://github.com/gre/bezier-easing |
homepage | |
repository | https://github.com/hlhr202/bezier-easing-rs |
max_upload_size | |
id | 1115273 |
size | 8,086 |
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.
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);
MIT