pub struct AnimSequence {
animations: Vec<AnimationCell>,
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<AnimationCell>§cursor_sec: f64Implementations§
Source§impl AnimSequence
impl AnimSequence
fn eval_at_sec_into(&self, target_sec: f64, output: &mut Vec<DynItem>)
Sourcepub fn push<A: Placeable + 'static>(&mut self, animation: A) -> &mut Self
pub fn push<A: Placeable + '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) -> &[AnimationCell]
pub fn built_animations(&self) -> &[AnimationCell]
Borrow the direct child animations in local sequence coordinates.
Sourcepub fn into_built_animations(self) -> Vec<AnimationCell>
pub fn into_built_animations(self) -> Vec<AnimationCell>
Consume this sequence into its direct child animations.
Trait Implementations§
Source§impl Animation for AnimSequence
impl Animation for AnimSequence
Source§fn build(self) -> AnimationCell
fn build(self) -> AnimationCell
Lower this definition into its local runtime representation.
Source§impl Default for AnimSequence
impl Default for AnimSequence
Source§fn default() -> AnimSequence
fn default() -> AnimSequence
Returns the “default value” for a type. Read more
Source§impl EvalDyn for AnimSequence
impl EvalDyn for AnimSequence
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 AnimSequence
impl !RefUnwindSafe for AnimSequence
impl !Send for AnimSequence
impl !Sync for AnimSequence
impl Unpin for AnimSequence
impl UnsafeUnpin for AnimSequence
impl !UnwindSafe for AnimSequence
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.