Skip to main content

rust_motion_animation/
lib.rs

1//! # rust-motion-animation
2//!
3//! Remotion-compatible animation primitives for Rust Motion.
4//!
5//! Provides:
6//! - [`interpolate`] — maps a value from one range to another (Remotion `interpolate()`)
7//! - [`spring`]       — physics-based spring animation (Remotion `spring()`)
8//! - [`easing`]       — common easing functions (Remotion `Easing`)
9//! - [`interpolate_colors`] — color interpolation
10//! - [`transform`]    — CSS transform builder (`makeTransform`, `interpolateStyles`)
11
12pub mod chop;
13pub mod easing;
14pub mod interpolate;
15pub mod interpolate_colors;
16pub mod random;
17pub mod spring;
18pub mod transform;
19pub mod typography;
20
21pub use chop::{AudioEnvelopeChop, LagChop, LfoChop, LfoWave, MathChop, MathOp};
22pub use easing::{bezier, EasingFn};
23pub use interpolate::{interpolate, ExtrapolateType, InterpolateOptions};
24pub use interpolate_colors::{interpolate_colors, interpolate_colors_range};
25pub use random::{random, RandomSeed};
26pub use spring::{
27    measure_spring, spring, spring_with_options, SpringConfig, SpringError, SpringOptions,
28};
29pub use transform::{
30    interpolate_styles, make_transform, matrix, matrix3d, perspective, rotate, rotate3d, rotate_x,
31    rotate_y, rotate_z, scale, scale3d, scale_x, scale_y, scale_z, skew, skew_x, skew_y, translate,
32    translate3d, translate_x, translate_y, translate_z, StyleMap, StyleValue, TransformOp,
33};
34pub use typography::{scramble_text, typewriter_text, typewriter_words};