pub struct AnimStack {
animations: Vec<AnimNode>,
duration_secs: f64,
}Expand description
Dynamic overlay animation container.
Unlike AnimSequence, every pushed animation keeps its own local start
time and the stack duration is the maximum child extent.
Fields§
§animations: Vec<AnimNode>§duration_secs: f64Implementations§
Source§impl AnimStack
impl AnimStack
Sourcepub fn push<A: IntoAnimNode + 'static>(&mut self, animation: A) -> &mut Self
pub fn push<A: IntoAnimNode + 'static>(&mut self, animation: A) -> &mut Self
Add an animation without advancing the other children.
Sourcepub fn extend(&mut self, stack: AnimStack) -> &mut Self
pub fn extend(&mut self, stack: AnimStack) -> &mut Self
Add all direct child animations from another dynamic stack.
Sourcepub fn duration_secs(&self) -> f64
pub fn duration_secs(&self) -> f64
Current maximum child extent.
Sourcepub fn built_animations(&self) -> &[AnimNode]
pub fn built_animations(&self) -> &[AnimNode]
Borrow the direct child animations in local stack coordinates.
Sourcepub fn into_built_animations(self) -> Vec<AnimNode>
pub fn into_built_animations(self) -> Vec<AnimNode>
Consume this stack into its direct child animations.
Trait Implementations§
Source§impl<A: IntoAnimNode + 'static> FromIterator<A> for AnimStack
impl<A: IntoAnimNode + 'static> FromIterator<A> for AnimStack
Source§fn from_iter<I: IntoIterator<Item = A>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = A>>(iter: I) -> Self
Creates a value from an iterator. Read more
Source§impl IntoAnimNode for AnimStack
impl IntoAnimNode for AnimStack
Source§fn into_anim_node(self) -> AnimNode
fn into_anim_node(self) -> AnimNode
Lower this definition into its local runtime representation.
Auto Trait Implementations§
impl !RefUnwindSafe for AnimStack
impl !Send for AnimStack
impl !Sync for AnimStack
impl !UnwindSafe for AnimStack
impl Freeze for AnimStack
impl Unpin for AnimStack
impl UnsafeUnpin for AnimStack
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
§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> ⓘ
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§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>
Converts this type into the system output type.
§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>
Change the animation’s rate function.
Source§fn with_duration(self, duration_secs: f64) -> Paramed<Self>
fn with_duration(self, duration_secs: f64) -> Paramed<Self>
Change the animation’s duration.
Source§fn with_enabled(self, enabled: bool) -> Paramed<Self>
fn with_enabled(self, enabled: bool) -> Paramed<Self>
Enable or disable this animation’s output.
§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>
Return
self wrapped with transform stored exactly as G.