Skip to main content

animato_core/
lib.rs

1//! # animato-core
2//!
3//! Core traits and easing system for the Animato animation library.
4//!
5//! This crate is the foundation every other Animato crate builds on.
6//! It is fully `no_std`-compatible with zero external dependencies
7//! (unless the optional `serde` feature is enabled).
8//!
9//! ## Quick Start
10//!
11//! ```rust
12//! use animato_core::{Interpolate, Easing};
13//!
14//! // Easing a value from 0.0 to 1.0 at the midpoint
15//! let t = 0.5_f32;
16//! let eased = Easing::EaseOutCubic.apply(t);
17//! assert!(eased > t); // EaseOut front-loads motion
18//! ```
19//!
20//! ## Feature Flags
21//!
22//! | Feature | Effect |
23//! |---------|--------|
24//! | `std`   | Enables std-dependent extensions (none in this crate today — reserved for future use) |
25//! | `serde` | Derives `Serialize`/`Deserialize` on `Easing` |
26//!
27//! ## `no_std` Usage
28//!
29//! ```toml
30//! [dependencies]
31//! animato-core = { version = "0.6", default-features = false }
32//! ```
33//!
34//! All items in this crate are available in `no_std` environments.
35
36#![cfg_attr(not(feature = "std"), no_std)]
37#![deny(missing_docs)]
38#![deny(missing_debug_implementations)]
39
40pub mod easing;
41/// Internal math shim — `no_std`/`std` portable math functions.
42#[doc(hidden)]
43pub mod math;
44pub mod traits;
45
46// Flatten the most important items to the crate root for convenience.
47pub use easing::Easing;
48pub use traits::{Animatable, Interpolate, Playable, Update};