pub struct TweenSequence<T> { /* private fields */ }Expand description
Enables creating an animation whose value is defined by a sequence of tweens.
Each TweenSequenceItem has a weight that defines its percentage of the
animation’s duration. Each tween defines the animation’s value during the
interval indicated by its weight.
Implementations§
Source§impl<T> TweenSequence<T>
impl<T> TweenSequence<T>
Sourcepub fn new(items: Vec<TweenSequenceItem<T>>) -> TweenSequence<T>
pub fn new(items: Vec<TweenSequenceItem<T>>) -> TweenSequence<T>
Construct a TweenSequence.
The items parameter must be a list of one or more
TweenSequenceItems.
There’s a small cost associated with building a TweenSequence so
it’s best to reuse one, rather than rebuilding it on every frame, when
that’s possible.
Trait Implementations§
Source§impl<T> Animatable<T> for TweenSequence<T>where
T: 'static,
impl<T> Animatable<T> for TweenSequence<T>where
T: 'static,
Source§fn transform(&self, app: &App, t: f64) -> T
fn transform(&self, app: &App, t: f64) -> T
Returns the value of the object at point
t. Read moreSource§fn evaluate(&self, app: &App, animation: AnyAnimation<f64>) -> Twhere
Self: Sized,
fn evaluate(&self, app: &App, animation: AnyAnimation<f64>) -> Twhere
Self: Sized,
The current value of this object for the given animation. Read more
Source§fn animate(
self,
app: &mut App,
parent: Retained<AnyAnimation<f64>>,
) -> Retained<AnyAnimation<T>>
fn animate( self, app: &mut App, parent: Retained<AnyAnimation<f64>>, ) -> Retained<AnyAnimation<T>>
Returns a new animation that is driven by the given animation but
that takes on values determined by this object. The new animation keeps
parent; whoever keeps the result keeps both.Source§fn chain<P>(self, parent: P) -> ChainedEvaluation<P, Self>
fn chain<P>(self, parent: P) -> ChainedEvaluation<P, Self>
Returns a new
Animatable whose value is determined by first
evaluating the given parent and then evaluating this object at the
result.Source§impl<T> Clone for TweenSequence<T>where
T: Clone,
impl<T> Clone for TweenSequence<T>where
T: Clone,
Source§fn clone(&self) -> TweenSequence<T>
fn clone(&self) -> TweenSequence<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> !RefUnwindSafe for TweenSequence<T>
impl<T> !Send for TweenSequence<T>
impl<T> !Sync for TweenSequence<T>
impl<T> !UnwindSafe for TweenSequence<T>
impl<T> Forget for TweenSequence<T>
impl<T> Freeze for TweenSequence<T>where
*const RcInner<[TweenSequenceItem<T>]> is !null: Freeze,
PhantomData<RcInner<[TweenSequenceItem<T>]>>: Freeze,
*const RcInner<[Interval]> is !null: Freeze,
PhantomData<RcInner<[Interval]>>: Freeze,
impl<T> Move for TweenSequence<T>
impl<T> Unpin for TweenSequence<T>
impl<T> UnsafeUnpin for TweenSequence<T>where
*const RcInner<[TweenSequenceItem<T>]> is !null: UnsafeUnpin,
PhantomData<RcInner<[TweenSequenceItem<T>]>>: UnsafeUnpin,
*const RcInner<[Interval]> is !null: UnsafeUnpin,
PhantomData<RcInner<[Interval]>>: UnsafeUnpin,
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