pub struct Animation {
pub name: String,
pub channels: Vec<Channel>,
pub looping: bool,
}Expand description
A named, reusable animation clip: a set of TRS channels over time.
Fields§
§name: String§channels: Vec<Channel>§looping: boolExplicit loop flag (viewer/export may honour it).
Implementations§
Source§impl Animation
impl Animation
pub fn new(name: impl Into<String>) -> Self
pub fn duration(&self) -> f32
Sourcepub fn channel(&self, target: &Target, path: ChannelPath) -> Option<&Channel>
pub fn channel(&self, target: &Target, path: ChannelPath) -> Option<&Channel>
Find the channel for a target/path pair.
pub fn channel_mut( &mut self, target: &Target, path: ChannelPath, ) -> Option<&mut Channel>
Sourcepub fn get_or_create(
&mut self,
target: Target,
path: ChannelPath,
) -> &mut Channel
pub fn get_or_create( &mut self, target: Target, path: ChannelPath, ) -> &mut Channel
Get or create the channel for a target/path pair.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Animation
impl<'de> Deserialize<'de> for Animation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Animation
Auto Trait Implementations§
impl Freeze for Animation
impl RefUnwindSafe for Animation
impl Send for Animation
impl Sync for Animation
impl Unpin for Animation
impl UnsafeUnpin for Animation
impl UnwindSafe for Animation
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