Mina
A simple, expressive, framework-independent animation library for Rust.
Features
- Animate the properties of any standard
struct
. - Concise, CSS-like syntax for frames and timing.
- State-based animators, à la CSS transitions.
- Easings included, no math required.
- GUI agnostic - you write the event loop and decide what the properties mean.
Goals
- Simple: Creating and experimenting with animations should be easy.
- Smooth: Animations should blend well, behave intuitively and never look janky.
- Adaptable: Be able to animate simple properties out of the box, and less-simple properties with a few small tweaks.
- Versatile: Incorporate into any app with a timer or event loop.
Timeline Example
Note: This is example, and all other examples on this page, include only the code used to create the timelines and/or animators. The full examples will always be available in the examples directory.
let timeline = timeline!;
See the full example (uses nannou).
Animator Example
const EFFECT_SCALE: f32 = 2.0;
let animator = animator!;
The above is taken from the widget example using iced.
Roadmap
- Standalone timelines with builder-style syntax
- State-based animators
- CSS-like grammar using proc macros
- Tie up loose ends in macro grammar (per-keyframe easing, idents for duration/delay, etc.)
- GUI-specific sub-crates for plug-and-play integration
- Expand examples/integration crates to include more GUI libraries
- Decouple from
enum-map
dependency - Built-in palette support (for color interpolation)