Expand description
../README.md
Modules§
- keyframes
- Start
Animationconstructing with this module.
Structs§
- Animation
- Running keyframes animation started at a specific time.
- Inertial
- A value that smoothly goes to the target during a specific time.
The target can be changed at any time. No jumps will occur.
It’s expected that time is always increasing.
Every method receives
current_timeas a parameter to allow testing, and has a consistent behavior during a single animation frame.
Enums§
- Easing
- The easing functions are used to provide a smooth transition between two values over time. See: https://easings.net/ for more information.
Traits§
- Animated
- An animated value that changes over time.
It’s a common trait for
AnimationandInertial. - Distance
- Distance trait for calculating the distance between two values.
It’s necessary for animation along a path in
Keyframes::poly_to. The lib provides implementations for primitive types and tuples. - Keyframes
- A transition of a value over time. It works like an animation template, or set of keyframes.
- Mix
- Mix trait for linear interpolation between two values.
- Stationary
- A value that doesn’t change over time. It allows using a static value as an always finished animation.
- Time
- Time trait should be implemented for types that represent animation time.
It’s implemented for
f32,f64,std::time::Instant, andstd::time::SystemTimeby default. You can implement it for your own types.
Derive Macros§
- Mix
- Derive the
Mixtrait for a struct. It interpolates each field of the struct with theMixtrait.