pub struct EmotionTimeline {
pub keyframes: Vec<EmotionKeyframe>,
pub duration: f32,
pub loop_mode: TimelineLoop,
}Expand description
A keyframe-driven timeline of emotion weights.
Fields§
§keyframes: Vec<EmotionKeyframe>Keyframes, always kept sorted by time.
duration: f32Total duration in seconds.
loop_mode: TimelineLoopHow time is mapped past duration.
Implementations§
Source§impl EmotionTimeline
impl EmotionTimeline
Sourcepub fn new(duration: f32, loop_mode: TimelineLoop) -> Self
pub fn new(duration: f32, loop_mode: TimelineLoop) -> Self
Create an empty timeline.
Sourcepub fn add_keyframe(&mut self, kf: EmotionKeyframe)
pub fn add_keyframe(&mut self, kf: EmotionKeyframe)
Insert a keyframe, keeping keyframes sorted by time.
Auto Trait Implementations§
impl Freeze for EmotionTimeline
impl RefUnwindSafe for EmotionTimeline
impl Send for EmotionTimeline
impl Sync for EmotionTimeline
impl Unpin for EmotionTimeline
impl UnsafeUnpin for EmotionTimeline
impl UnwindSafe for EmotionTimeline
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more