Expand description
A high-performance, framework-agnostic animation library for Rust.
xen-animation centralizes the lifecycle of every animated value behind
a single AnimationManager: callers report the current target value
each frame, and the manager takes care of starting, easing, retargeting,
and finishing the transition on its own. It has no rendering or
windowing dependencies, so it can be reused across GUI frameworks, game
engines, or any other application that needs frame-based interpolation.
Structs§
- Anim
Value - Generic animatable payload; every property (color, scale, opacity…) is flattened into up to 4 floats so the manager can interpolate anything without knowing what it represents.
- Animation
Manager - Central, Qt-style animation driver, generic over any hashable key type so it can be reused outside of any specific GUI framework. Callers never own a timer themselves; they only report their current target value and the manager owns the entire lifecycle (starting, easing, retargeting, finishing).
- Cubic
Bezier - A CSS-compatible cubic-bezier timing function. The curve’s start and end
points are implicitly (0,0) and (1,1); only the two control points are
stored, matching the
cubic-bezier(x1, y1, x2, y2)CSS syntax. - Transition
- Describes how a single animated value should move from its current value to a new target: how long it takes, how long to wait before starting, and the easing curve applied over that duration.
- Transition
Overrides - Per-group transition overrides layered on top of a base
Transition. Each field takes priority over the general transition for its own property group, so e.g. colors and transforms can animate with different durations/easings while sharing one base transition. - Transition
Property - Which groups of style properties
Style::transitionshould animate.
Enums§
- Easing
- A named or custom timing function used to shape how progress
[0.0, 1.0]maps to eased progress over the course of acrate::Transition.