pub struct AnimationDriver { /* private fields */ }
Expand description
The AnimationDriver
Implementations§
Source§impl AnimationDriver
impl AnimationDriver
Sourcepub fn update_animations(&self, new_tick: Instant)
pub fn update_animations(&self, new_tick: Instant)
Iterates through all animations based on the new time tick and updates their state. This should be called by the windowing system driver for every frame.
Sourcepub fn has_active_animations(&self) -> bool
pub fn has_active_animations(&self) -> bool
Returns true if there are any active or ready animations. This is used by the windowing system to determine if a new animation frame is required or not. Returns false otherwise.
Sourcepub fn set_has_active_animations(&self)
pub fn set_has_active_animations(&self)
Tell the driver that there are active animations
Sourcepub fn current_tick(&self) -> Instant
pub fn current_tick(&self) -> Instant
The current instant that is to be used for animation using this function register the current binding as a dependency
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AnimationDriver
impl !RefUnwindSafe for AnimationDriver
impl Send for AnimationDriver
impl !Sync for AnimationDriver
impl Unpin for AnimationDriver
impl UnwindSafe for AnimationDriver
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