pub struct AnimationManager { /* private fields */ }Expand description
Manages all active animations and advances them each frame.
Implementations§
Source§impl AnimationManager
impl AnimationManager
Sourcepub fn start(
&mut self,
window_id: u32,
property: AnimationProperty,
easing: EasingFunction,
duration_ms: u32,
) -> u32
pub fn start( &mut self, window_id: u32, property: AnimationProperty, easing: EasingFunction, duration_ms: u32, ) -> u32
Start a new animation. Returns the animation ID.
Sourcepub fn get_current_value(&self, animation_id: u32) -> Option<i64>
pub fn get_current_value(&self, animation_id: u32) -> Option<i64>
Get the current interpolated value for an animation by ID.
Sourcepub fn is_complete(&self, animation_id: u32) -> bool
pub fn is_complete(&self, animation_id: u32) -> bool
Check whether an animation has completed.
Sourcepub fn remove_completed(&mut self)
pub fn remove_completed(&mut self)
Remove all completed animations.
Sourcepub fn has_active_animations(&self) -> bool
pub fn has_active_animations(&self) -> bool
Returns true if there are any active (non-completed) animations.
Sourcepub fn active_count(&self) -> usize
pub fn active_count(&self) -> usize
Get the number of active animations.
Sourcepub fn get_window_animations(&self, window_id: u32) -> Vec<&Animation>
pub fn get_window_animations(&self, window_id: u32) -> Vec<&Animation>
Get all animations for a specific window.