pub enum Easing {
Linear,
EaseIn,
EaseOut,
EaseInOut,
CubicBezier(f32, f32, f32, f32),
}Expand description
Easing curve sampled by Easing::apply. The curves match common
CSS / native-control timings:
Linear- uniform speed; not common in UI but useful for tests.EaseIn- cubic ease-in (slow start).EaseOut- cubic ease-out (fast start, slow settle); matches the Cocoa AppKit / Material 3 short-transition curve.EaseInOut- cubic ease-in-out.CubicBezier(p1x, p1y, p2x, p2y)- CSScubic-bezier(...)form.
Variants§
Linear
f(t) = t.
EaseIn
f(t) = t^3.
EaseOut
f(t) = 1 - (1 - t)^3.
EaseInOut
f(t) = 0.5*(2t)^3 for t < 0.5, mirrored above.
CubicBezier(f32, f32, f32, f32)
CSS cubic-bezier(p1x, p1y, p2x, p2y). Anchors are implicit
(0, 0) and (1, 1).
Implementations§
Trait Implementations§
impl Copy for Easing
impl StructuralPartialEq for Easing
Auto Trait Implementations§
impl Freeze 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> 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.