#![deny(missing_docs)]
#![deny(missing_debug_implementations)]
mod batch;
mod color;
mod driver;
mod easing;
mod error;
mod keyframe;
mod path;
mod physics;
mod spring;
mod timeline;
mod tween;
mod types;
mod wasm_dom;
pub use batch::TweenBatch;
pub use color::{ColorTween, interpolate_color};
pub use driver::{RafDriver, ScrollDriver};
pub use easing::{available_easings, ease, parse_easing_for_js};
pub use keyframe::{KeyframeTrack, KeyframeTrack2D, KeyframeTrack3D, KeyframeTrack4D};
pub use path::{MorphPath, MotionPath};
pub use physics::{DragState, GestureRecognizer, Inertia, Inertia2D};
pub use spring::{Spring, Spring2D, Spring3D, Spring4D};
pub use tween::{Tween, Tween2D, Tween3D, Tween4D};
pub use wasm_dom::{Draggable, FlipAnimation, LayoutAnimator, Observer, ScrollSmoother, SplitText};
use wasm_bindgen::prelude::*;
#[wasm_bindgen(js_name = initAnimato)]
pub fn init_animato() {
#[cfg(all(target_arch = "wasm32", feature = "panic-hook"))]
console_error_panic_hook::set_once();
}
#[wasm_bindgen]
pub fn version() -> String {
env!("CARGO_PKG_VERSION").to_owned()
}
#[wasm_bindgen(js_name = snapTo)]
pub fn snap_to(value: f32, grid: f32) -> f32 {
animato_tween::snap_to(value, grid)
}
#[wasm_bindgen(js_name = roundTo)]
pub fn round_to(value: f32, decimals: u32) -> f32 {
animato_tween::round_to(value, decimals)
}