pub struct AnimSequence {
pub(super) animations: Vec<AnimNode>,
pub(super) cursor_sec: f64,
}Expand description
Dynamic sequential animation container.
push erases each direct child’s Rust type while retaining its runtime
composition hierarchy in this sequence’s local coordinates.
Fields§
§animations: Vec<AnimNode>§cursor_sec: f64Implementations§
Source§impl AnimSequence
impl AnimSequence
fn eval_at_content_sec(&self, target_sec: f64, output: &mut Vec<DynOutput>)
Sourcepub fn push<A: Unplaced + 'static>(&mut self, animation: A) -> &mut Self
pub fn push<A: Unplaced + 'static>(&mut self, animation: A) -> &mut Self
Append an animation at the current cursor and advance by its local extent.
Sourcepub fn extend(&mut self, sequence: AnimSequence) -> &mut Self
pub fn extend(&mut self, sequence: AnimSequence) -> &mut Self
Append another sequence’s direct children at the current cursor.
Sourcepub fn forward(&mut self, secs: f64) -> &mut Self
pub fn forward(&mut self, secs: f64) -> &mut Self
Advance the cursor without adding an animation.
Sourcepub fn forward_to(&mut self, target_sec: f64) -> &mut Self
pub fn forward_to(&mut self, target_sec: f64) -> &mut Self
Advance the cursor to target_sec without adding an animation.
Sourcepub fn hold(&mut self, secs: f64) -> &mut Self
pub fn hold(&mut self, secs: f64) -> &mut Self
Advance the cursor while holding the state immediately before it.
Sourcepub fn hold_to(&mut self, target_sec: f64) -> &mut Self
pub fn hold_to(&mut self, target_sec: f64) -> &mut Self
Advance the cursor to target_sec while holding its current state.
Sourcepub fn cursor_sec(&self) -> f64
pub fn cursor_sec(&self) -> f64
Current cursor position.
Sourcepub fn duration_secs(&self) -> f64
pub fn duration_secs(&self) -> f64
Current sequence duration.
Sourcepub fn built_animations(&self) -> &[AnimNode]
pub fn built_animations(&self) -> &[AnimNode]
Borrow the direct child animations in local sequence coordinates.
Sourcepub fn into_built_animations(self) -> Vec<AnimNode>
pub fn into_built_animations(self) -> Vec<AnimNode>
Consume this sequence into its direct child animations.
Trait Implementations§
Source§impl Default for AnimSequence
impl Default for AnimSequence
Source§impl<A: Unplaced + 'static> FromIterator<A> for AnimSequence
impl<A: Unplaced + 'static> FromIterator<A> for AnimSequence
Source§fn from_iter<I: IntoIterator<Item = A>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = A>>(iter: I) -> Self
Source§impl IntoAnimNode for AnimSequence
impl IntoAnimNode for AnimSequence
Source§fn into_anim_node(self) -> AnimNode
fn into_anim_node(self) -> AnimNode
Lower placements to children, discarding covered point animations and excluding earlier endpoints when a final point supplies the final frame.
Auto Trait Implementations§
impl !RefUnwindSafe for AnimSequence
impl !Send for AnimSequence
impl !Sync for AnimSequence
impl !UnwindSafe for AnimSequence
impl Freeze for AnimSequence
impl Unpin for AnimSequence
impl UnsafeUnpin for AnimSequence
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
§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<A> PlaybackExt for Awhere
A: Unplaced,
impl<A> PlaybackExt for Awhere
A: Unplaced,
Source§fn with_rate_func(self, rate_func: fn(f64) -> f64) -> Paramed<Self>
fn with_rate_func(self, rate_func: fn(f64) -> f64) -> Paramed<Self>
Source§fn with_duration(self, duration_secs: f64) -> Paramed<Self>
fn with_duration(self, duration_secs: f64) -> Paramed<Self>
Source§fn with_enabled(self, enabled: bool) -> Paramed<Self>
fn with_enabled(self, enabled: bool) -> Paramed<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> TransformedExt for T
impl<T> TransformedExt for T
Source§fn transformed<G>(self, transform: G) -> Transformed<Self, G>
fn transformed<G>(self, transform: G) -> Transformed<Self, G>
self wrapped with transform stored exactly as G.