pub mod easing;
mod progress;
mod transition;
pub use easing::Easing;
pub use progress::AnimateProgress;
pub use transition::*;
mod animate;
pub use animate::*;
mod lerp;
pub use lerp::Lerp;
mod animate_state;
pub use animate_state::*;
mod stagger;
pub use stagger::Stagger;
mod keyframes;
pub use keyframes::*;
use crate::{state::StateWatcher, window::WindowId};
pub trait Animation {
fn run(&self);
fn stop(&self);
fn is_running(&self) -> bool;
fn running_watcher(&self) -> Box<dyn StateWatcher<Value = bool>>;
fn init_window(&self, _window_id: WindowId) {}
fn dyn_clone(&self) -> Box<dyn Animation>;
}
impl Clone for Box<dyn Animation> {
fn clone(&self) -> Self { self.dyn_clone() }
}