Enum lay_rs::engine::animation::TimingFunction
source · pub enum TimingFunction {
Easing(Easing, f32),
Spring(Spring),
}
Expand description
Possible timing functions for an animation.
Variants§
Implementations§
source§impl TimingFunction
impl TimingFunction
pub fn linear(duration: f32) -> Self
pub fn ease_in(duration: f32) -> Self
pub fn ease_out(duration: f32) -> Self
pub fn ease_in_out(duration: f32) -> Self
pub fn ease_out_quad(duration: f32) -> Self
pub fn ease_in_quad(duration: f32) -> Self
pub fn ease_in_out_quad(duration: f32) -> Self
pub fn ease_out_cubic(duration: f32) -> Self
pub fn ease_in_cubic(duration: f32) -> Self
pub fn ease_in_out_cubic(duration: f32) -> Self
pub fn ease_out_quart(duration: f32) -> Self
pub fn ease_in_quart(duration: f32) -> Self
pub fn ease_in_out_quart(duration: f32) -> Self
pub fn spring(duration: f32, bounce: f32) -> Self
pub fn spring_with_initial_velocity( duration: f32, bounce: f32, initial_velocity: f32, ) -> Self
pub fn update_at(&mut self, elapsed: f32) -> (f32, f32)
pub fn done(&self, start: f32, current: f32) -> bool
Trait Implementations§
source§impl Clone for TimingFunction
impl Clone for TimingFunction
source§fn clone(&self) -> TimingFunction
fn clone(&self) -> TimingFunction
Returns a copy 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 moresource§impl Debug for TimingFunction
impl Debug for TimingFunction
source§impl Default for TimingFunction
impl Default for TimingFunction
source§impl From<Easing> for TimingFunction
impl From<Easing> for TimingFunction
impl Copy for TimingFunction
Auto Trait Implementations§
impl Freeze for TimingFunction
impl RefUnwindSafe for TimingFunction
impl Send for TimingFunction
impl Sync for TimingFunction
impl Unpin for TimingFunction
impl UnwindSafe for TimingFunction
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