pub struct AnimationManager { /* private fields */ }Expand description
Animation frame manager
Implementations§
Source§impl AnimationManager
impl AnimationManager
Sourcepub fn record_frame(&mut self, timestamp: f64)
pub fn record_frame(&mut self, timestamp: f64)
Records a frame
Sourcepub fn current_fps(&self) -> f64
pub fn current_fps(&self) -> f64
Returns the current FPS
Sourcepub fn average_frame_time(&self) -> f64
pub fn average_frame_time(&self) -> f64
Returns the average frame time in milliseconds
Sourcepub fn is_below_target(&self) -> bool
pub fn is_below_target(&self) -> bool
Checks if the frame rate is below target
Sourcepub fn stats(&self) -> AnimationStats
pub fn stats(&self) -> AnimationStats
Returns frame statistics
Auto Trait Implementations§
impl Freeze for AnimationManager
impl RefUnwindSafe for AnimationManager
impl Send for AnimationManager
impl Sync for AnimationManager
impl Unpin for AnimationManager
impl UnsafeUnpin for AnimationManager
impl UnwindSafe for AnimationManager
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