Struct panim_loader::PropertiesAnimation
source · pub struct PropertiesAnimation {
pub version: (u16, u16, u16),
pub fps: f32,
pub animations: Vec<Animation>,
}Expand description
A Properties Animation file containing all the animations for all exported properties of all objects in the scene.
Fields§
§version: (u16, u16, u16)Version of the file format as a tuple of semver (major, minor, patch).
fps: f32The number of frames per second.
animations: Vec<Animation>The list of animations.
Implementations§
source§impl PropertiesAnimation
impl PropertiesAnimation
sourcepub fn from_bytes(bytes: &[u8]) -> Result<PropertiesAnimation, Error>
pub fn from_bytes(bytes: &[u8]) -> Result<PropertiesAnimation, Error>
Parses a Properties Animation file from a byte slice.
sourcepub fn from_file(path: &str) -> Result<PropertiesAnimation, Error>
pub fn from_file(path: &str) -> Result<PropertiesAnimation, Error>
Parses a Properties Animation file from a file path.
sourcepub fn get_animation_value_at_time(
&self,
animation: &Animation,
elapsed_time: f32
) -> f32
pub fn get_animation_value_at_time( &self, animation: &Animation, elapsed_time: f32 ) -> f32
Returns the value of the animation at the given time (in seconds).
Trait Implementations§
source§impl Clone for PropertiesAnimation
impl Clone for PropertiesAnimation
source§fn clone(&self) -> PropertiesAnimation
fn clone(&self) -> PropertiesAnimation
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for PropertiesAnimation
impl Debug for PropertiesAnimation
source§impl PartialEq<PropertiesAnimation> for PropertiesAnimation
impl PartialEq<PropertiesAnimation> for PropertiesAnimation
source§fn eq(&self, other: &PropertiesAnimation) -> bool
fn eq(&self, other: &PropertiesAnimation) -> bool
This method tests for
self and other values to be equal, and is used
by ==.