pub struct AnimStack {
animations: Vec<AnimationCell>,
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<AnimationCell>§duration_secs: f64Implementations§
Source§impl AnimStack
impl AnimStack
fn eval_at_sec_into(&self, target_sec: f64, output: &mut Vec<DynItem>)
Sourcepub fn push<A: Animation + 'static>(&mut self, animation: A) -> &mut Self
pub fn push<A: Animation + '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) -> &[AnimationCell]
pub fn built_animations(&self) -> &[AnimationCell]
Borrow the direct child animations in local stack coordinates.
Sourcepub fn into_built_animations(self) -> Vec<AnimationCell>
pub fn into_built_animations(self) -> Vec<AnimationCell>
Consume this stack into its direct child animations.
Trait Implementations§
Source§impl Animation for AnimStack
impl Animation for AnimStack
Source§fn build(self) -> AnimationCell
fn build(self) -> AnimationCell
Lower this definition into its local runtime representation.
Source§impl EvalDyn for AnimStack
impl EvalDyn for AnimStack
fn eval_alpha_dyn_into(&self, alpha: f64, output: &mut Vec<DynItem>)
Source§fn step_dyn(&mut self, time: &SegmentTime)
fn step_dyn(&mut self, time: &SegmentTime)
Advance one logic step. No-op by default (functional segments and
containers without iterative leaves step for free).
fn info_kind(&self) -> AnimationInfoKind
fn content_duration_secs(&self) -> f64
fn child_infos(&self) -> Vec<AnimationInfo>
Source§fn sample_dyn(&self, time: &SegmentTime, output: &mut Vec<DynItem>)
fn sample_dyn(&self, time: &SegmentTime, output: &mut Vec<DynItem>)
Sample at a full time context. Default rides the pure alpha path for
containers and functional leaves; iterative leaves override it via the
blanket impl below.
Auto Trait Implementations§
impl Freeze for AnimStack
impl !RefUnwindSafe for AnimStack
impl !Send for AnimStack
impl !Sync for AnimStack
impl Unpin for AnimStack
impl UnsafeUnpin for AnimStack
impl !UnwindSafe for AnimStack
Blanket Implementations§
Source§impl<A> AnimationExt for Awhere
A: Placeable,
impl<A> AnimationExt for Awhere
A: Placeable,
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.
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>
§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§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.