anim
A framework independent animation library for rust, works nicely with Iced and the others.
Showcase



How to install?
Include anim in your Cargo.toml dependencies:
[]
= "0.1"
Note: anim turns on iced-backend feature by default. You need to disable default features if you do not work with iced.
[]
= { ="0.1", = false }
How to use?
There are 3 important concepts in anim:
-
AnimatableTypes derived fromAnimatablemeans that its values can be calculated based on timing progress, with which you can createAnimationobjects. -
AnimationTheAnimationgenerates values based on its timing progress. You can construct a bigAnimationfrom small ones. -
TimelineWithTimelineyou can control your animations' lifetime.
For simple scenarios, you just need Options.
use ;
Then, build and start your animation:
use Duration;
use ;
let mut timeline = new.easing
.duration
.begin_animation;
loop
For complex scenarios, please look at examples to gain some ideas.
How to run the examples?
Example #1: color-example
This example shows you color animations:
Example #2: size-example
This example shows you size animations:
Example #3: animated-splash
This example shows you rain dop splash animations:
License
MIT