pub struct FrameRate { /* private fields */ }
Expand description
Frame-Rate definition
Implementations§
source§impl FrameRate
impl FrameRate
sourcepub fn from_fps(fps: f64) -> Self
pub fn from_fps(fps: f64) -> Self
Frame rate defined by the FPS (Frame-Per-Second)
Panics
This function will panic if fps
is negative, zero or not finite.
sourcepub fn from_frame_duration(duration: Duration) -> Self
pub fn from_frame_duration(duration: Duration) -> Self
Frame rate defined by the duration of each frame
sourcepub fn from_total_duration(duration: Duration) -> Self
pub fn from_total_duration(duration: Duration) -> Self
Frame rate defined by the total duration of the animation
The actual FPS will then depend on the number of frame