pub enum Easing {
Linear,
Bezier(f64, f64, f64, f64),
Power(Ease, f64),
Sine(Ease),
Circle(Ease),
Exponential(Ease),
Back(Ease, f64),
ElasticOut(f64),
BounceOut,
}Expand description
An easing curve: a function from progress (0 to 1) to eased progress. Back and elastic curves leave that range on purpose, which is the overshoot they exist to show.
Variants§
Linear
Progress unchanged.
Bezier(f64, f64, f64, f64)
A CSS-style cubic Bézier through (0, 0) and (1, 1) with these two control points.
Power(Ease, f64)
A power curve: 2 is quadratic, 3 cubic.
Sine(Ease)
A quarter of a sine wave.
Circle(Ease)
A quarter of a circle.
Exponential(Ease)
An exponential curve.
Back(Ease, f64)
A curve that backs up past its start or runs past its end by overshoot
(1.70158 overshoots by a tenth).
ElasticOut(f64)
A spring-like wobble around the end, bounciness 1 for the classic curve.
BounceOut
A ball dropped on the end value.
Implementations§
Trait Implementations§
impl Copy for Easing
impl StructuralPartialEq for Easing
Auto Trait Implementations§
impl Forget for Easing
impl Freeze for Easing
impl Move for Easing
impl RefUnwindSafe for Easing
impl Send for Easing
impl Sync for Easing
impl Unpin for Easing
impl UnsafeUnpin for Easing
impl UnwindSafe for Easing
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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