#[repr(C)]pub struct Easing {
pub x1: f32,
pub y1: f32,
pub x2: f32,
pub y2: f32,
}
Expand description
This module contains the animation related data structures
Fields§
§x1: f32
§y1: f32
§x2: f32
§y2: f32
Implementations§
source§impl Easing
impl Easing
Easing functions are used to interpolate between two values over a period of time. The default easing function is ease out. The easing is calculated using a bezier curve with 2 control points.
pub fn ease_out() -> Self
pub fn ease_in() -> Self
pub fn ease_in_out() -> Self
pub fn linear() -> Self
pub fn ease_out_quad() -> Self
pub fn ease_in_quad() -> Self
pub fn ease_in_out_quad() -> Self
pub fn ease_out_cubic() -> Self
pub fn ease_in_cubic() -> Self
pub fn ease_in_out_cubic() -> Self
pub fn ease_out_quart() -> Self
pub fn ease_in_quart() -> Self
pub fn ease_in_out_quart() -> Self
pub fn ease_out_quint() -> Self
pub fn ease_in_quint() -> Self
pub fn ease_in_out_quint() -> Self
Trait Implementations§
source§impl From<Easing> for TimingFunction
impl From<Easing> for TimingFunction
impl Copy 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 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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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