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.
Workspace
crates/bezier-easing: the published Rust library.examples/wasm-demo: an HTML canvas demo powered by the Rust library compiled to WebAssembly.
Installation
[]
= "0.3"
Usage
use bezier_easing;
let ease = bezier_easing.unwrap;
assert_eq!;
assert!;
assert_eq!;
The default floating point type is f64. Use suffixed arguments to create an f32 easing function:
use bezier_easing;
let ease = bezier_easing.unwrap;
assert!;
WASM Example
Online demo: https://hlhr202.github.io/bezier-easing-rs/
Open the local URL printed by serve to view the canvas animation.
Publishing
Run the release checks before publishing the library crate:
Publish only after the dry run succeeds:
License
MIT