pub struct Timeline { /* private fields */ }Expand description
A timeline for a animations.
Implementations§
Source§impl Timeline
impl Timeline
Sourcepub fn show(&mut self) -> &mut Self
pub fn show(&mut self) -> &mut Self
Show the item.
This will start planning an static anim if there isn’t an planning static anim.
Sourcepub fn hide(&mut self) -> &mut Self
pub fn hide(&mut self) -> &mut Self
Hide the item.
This will submit a static anim if there is an planning static anim.
Sourcepub fn forward_to(&mut self, target_sec: f64) -> &mut Self
pub fn forward_to(&mut self, target_sec: f64) -> &mut Self
Forward the timeline to target_sec if the current sec is smaller than it.
Sourcepub fn play<T: AnyExtractCoreItem>(
&mut self,
anim: AnimationCell<T>,
) -> &mut Self
pub fn play<T: AnyExtractCoreItem>( &mut self, anim: AnimationCell<T>, ) -> &mut Self
Plays an anim.
Trait Implementations§
Source§impl TimelineFunc for Timeline
impl TimelineFunc for Timeline
Source§fn start_sec(&self) -> Option<f64>
fn start_sec(&self) -> Option<f64>
The start sec of the timeline(the start sec of the first animation.)
Source§fn end_sec(&self) -> Option<f64>
fn end_sec(&self) -> Option<f64>
The end sec of the timeline(the end sec of the last animation.)
Source§fn get_animation_infos(&self) -> Vec<AnimationInfo>
fn get_animation_infos(&self) -> Vec<AnimationInfo>
Get the animation infos
Source§fn eval_primitives_at_sec(
&self,
target_sec: f64,
) -> Option<(usize, Vec<CoreItem>)>
fn eval_primitives_at_sec( &self, target_sec: f64, ) -> Option<(usize, Vec<CoreItem>)>
Evaluate timeline’s primitives at target sec
Source§fn forward_to(&mut self, target_sec: f64)
fn forward_to(&mut self, target_sec: f64)
Forward the timeline to
target_secAuto Trait Implementations§
impl Freeze for Timeline
impl !RefUnwindSafe for Timeline
impl !Send for Timeline
impl !Sync for Timeline
impl Unpin for Timeline
impl UnsafeUnpin for Timeline
impl !UnwindSafe for Timeline
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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