Expand description
§Soy
Rust interpolation library.
§Usage
The main trait used for interpolation is [soy::Lerper]. It requires a
single method, calculate, which calculates interpolation progression at a
given time.
Example implementing linear interpolation, taken directly from soy’s
implementation:
struct Linear;
impl soy::Lerper for Linear {
fn calculate(&self, t: f32) -> {
t
}
}Structs§
Constants§
- EASE
- Ease function, same as CSS’s “ease” timing-function.
- EASE_IN
- Ease in function, same as CSS’s “ease-in” timing-function.
- EASE_
IN_ OUT - Ease in-out function, same as CSS’s “ease-in-out” timing-function.
- EASE_
OUT - Ease out function, same as CSS’s “ease-out” timing-function.
Traits§
- Lerper
- Trait implemented by all interpolating methods.
Functions§
- cubic_
bezier - Wrapper around
Bezier::new. - lerp
- Interpolate between two values given an interpolation method.