Skip to main content

Module tween

Module tween 

Source
Expand description

Tween / animation system.

Provides typed interpolation between values, 30+ easing functions, multi-track keyframe timelines, and composable animation sequences. Every interpolation can be driven by a MathFunction instead of a simple t ∈ [0,1].

§Quick start

use proof_engine::tween::{Tween, Easing};
use glam::Vec3;

let tween = Tween::new(Vec3::ZERO, Vec3::ONE, 2.0, Easing::EaseInOutCubic);
let pos = tween.sample(1.0); // halfway through → roughly Vec3(0.5, 0.5, 0.5)

Re-exports§

pub use easing::Easing;
pub use sequence::TweenSequence;
pub use sequence::SequenceBuilder;
pub use keyframe::KeyframeTrack;
pub use keyframe::Keyframe;

Modules§

easing
40+ easing functions following Robert Penner’s equations.
game_tweens
Game-specific tween presets — ready-to-call functions that wire the tween engine to specific game events: menu navigation, combat, screen transitions, stat changes, level ups, death, victory, and more.
keyframe
Keyframe tracks — time-stamped values with interpolated playback.
sequence
Tween sequences — chains and parallel groups of tweens.
tween_manager
TweenManager — central hub for managing active tweens across the entire game.

Structs§

AnimationGroup
Runs multiple f32 tweens in parallel, identified by string key.
Tween
A single interpolation from from to to over duration seconds.
TweenState
A running tween with its own clock.
Tweens
Convenience methods for common tween patterns.

Traits§

Lerp
Values that can be linearly interpolated.