pub enum AnimatedValue<T: Lerp> {
Static(T),
Track(AnimationTrack<T>),
}Expand description
A value that is either constant or animated over time.
Use Static for values that never change, and
Track for values driven by a keyframe
AnimationTrack.
Evaluated at build time via value_at(Duration::ZERO) to
set initial filter parameters. Per-frame updates are wired up in issue
#363.
Variants§
Static(T)
A constant value, independent of time.
Track(AnimationTrack<T>)
A time-varying value driven by a keyframe track.
Implementations§
Source§impl<T: Lerp> AnimatedValue<T>
impl<T: Lerp> AnimatedValue<T>
Sourcepub fn value_at(&self, t: Duration) -> T
pub fn value_at(&self, t: Duration) -> T
Evaluates the value at time t.
Static(v)— returns a clone ofvregardless oft.Track(track)— delegates toAnimationTrack::value_at.
Trait Implementations§
Source§impl<T: Clone + Lerp> Clone for AnimatedValue<T>
impl<T: Clone + Lerp> Clone for AnimatedValue<T>
Source§fn clone(&self) -> AnimatedValue<T>
fn clone(&self) -> AnimatedValue<T>
Returns a duplicate of the value. Read more
1.0.0 · 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> Freeze for AnimatedValue<T>where
T: Freeze,
impl<T> RefUnwindSafe for AnimatedValue<T>where
T: RefUnwindSafe,
impl<T> Send for AnimatedValue<T>where
T: Send,
impl<T> Sync for AnimatedValue<T>where
T: Sync,
impl<T> Unpin for AnimatedValue<T>where
T: Unpin,
impl<T> UnsafeUnpin for AnimatedValue<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for AnimatedValue<T>where
T: UnwindSafe,
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