pub enum MotionCurve {
Standard(Spring),
Expressive(SampledSpring),
}Expand description
A resolved transition; use the same curve for timing and interpolation.
Variants§
Standard(Spring)
Expressive(SampledSpring)
Implementations§
Source§impl MotionCurve
impl MotionCurve
Sourcepub fn spring(self) -> Option<Spring>
pub fn spring(self) -> Option<Spring>
The analytic spring behind this curve: Standard’s m3e spring. md3.io specifies Expressive as sampled curves, not spring parameters, so an Expressive curve has none.
pub fn duration(self) -> Duration
pub fn ease(self) -> impl Fn(f32) -> f32 + Copy + 'static
Trait Implementations§
Source§impl Clone for MotionCurve
impl Clone for MotionCurve
Source§fn clone(&self) -> MotionCurve
fn clone(&self) -> MotionCurve
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 moreimpl Copy for MotionCurve
Source§impl Debug for MotionCurve
impl Debug for MotionCurve
Source§impl PartialEq for MotionCurve
impl PartialEq for MotionCurve
impl StructuralPartialEq for MotionCurve
Auto Trait Implementations§
impl Freeze for MotionCurve
impl RefUnwindSafe for MotionCurve
impl Send for MotionCurve
impl Sync for MotionCurve
impl Unpin for MotionCurve
impl UnsafeUnpin for MotionCurve
impl UnwindSafe for MotionCurve
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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