Skip to main content

Crate animato_driver

Crate animato_driver 

Source
Expand description

§animato-driver

Runtime management for Animato animations.

§Quick Start

use animato_driver::{AnimationDriver, MockClock, Clock};
use animato_tween::Tween;
use animato_core::{Easing, Update};

let mut driver = AnimationDriver::new();
let id = driver.add(
    Tween::new(0.0_f32, 100.0)
        .duration(1.0)
        .easing(Easing::EaseOutCubic)
        .build()
);

let mut clock = MockClock::new(1.0 / 60.0);
for _ in 0..61 {
    driver.tick(clock.delta());
}
assert!(!driver.is_active(id));

Re-exports§

pub use clock::Clock;
pub use clock::ManualClock;
pub use clock::MockClock;
pub use clock::WallClock;
pub use driver::AnimationDriver;
pub use driver::AnimationId;
pub use scroll::ScrollClock;
pub use scroll::ScrollDriver;

Modules§

clock
Time sources for driving animations.
driver
AnimationDriver — owns and ticks multiple animations simultaneously.
scroll
Scroll-position-driven animation.