Skip to main content

Module animate

Module animate 

Source
Expand description

Time-driven value animation: easing curves, a stateful Tween, and a periodic oscillator.

The trig-based easing curves and the oscillator’s sine wave go through retroglyph_core’s math shim, so they use std’s float intrinsics or libm’s software implementation depending on which backend feature is on. Time-driven value animations.

Structs§

Tween
A retargetable animation from one f32 value to another over a fixed duration, reshaped by an Easing curve.

Enums§

Easing
A normalized easing curve: reshapes a linear progress fraction (0.0..=1.0) into an eased one, the same named curves as CSS transitions and https://easings.net.

Functions§

oscillate
A continuous sine wave sampled at elapsed, completing one full cycle every period, mapped from its natural -1.0..=1.0 range to 0.0..=1.0.
oscillate_with_phase
oscillate, offset by phase full cycles.