pub struct Animator { /* private fields */ }Expand description
Manages multiple animations.
Implementations§
Source§impl Animator
impl Animator
Sourcepub fn create(&mut self, from: f32, to: f32, duration_ms: u32) -> u64
pub fn create(&mut self, from: f32, to: f32, duration_ms: u32) -> u64
Create a new animation and return its ID.
Sourcepub fn get(&self, id: u64) -> Option<&AnimationInstance>
pub fn get(&self, id: u64) -> Option<&AnimationInstance>
Get an animation by ID.
Sourcepub fn get_mut(&mut self, id: u64) -> Option<&mut AnimationInstance>
pub fn get_mut(&mut self, id: u64) -> Option<&mut AnimationInstance>
Get a mutable animation by ID.
Sourcepub fn cleanup_completed(&mut self)
pub fn cleanup_completed(&mut self)
Remove all completed animations.
Sourcepub fn has_running(&self) -> bool
pub fn has_running(&self) -> bool
Check if any animations are running.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Animator
impl RefUnwindSafe for Animator
impl Send for Animator
impl Sync for Animator
impl Unpin for Animator
impl UnsafeUnpin for Animator
impl UnwindSafe for Animator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more