pub struct TweenConfig {
pub duration: Duration,
pub p1: (f32, f32),
pub p2: (f32, f32),
}Expand description
Cubic-bezier tween: P0=(0,0), P3=(1,1), with two control points.
Fields§
§duration: Duration§p1: (f32, f32)§p2: (f32, f32)Implementations§
Source§impl TweenConfig
impl TweenConfig
Sourcepub const EASE_QUICK: Self
pub const EASE_QUICK: Self
100 ms ease-out. For micro-interactions where physics is overkill.
Sourcepub const EASE_STANDARD: Self
pub const EASE_STANDARD: Self
200 ms ease-in-out. Symmetric default tween.
Sourcepub const EASE_EMPHASIZED: Self
pub const EASE_EMPHASIZED: Self
350 ms slow-out, fast-end. For larger displacements where the final settle should feel decisive.
Trait Implementations§
Source§impl Clone for TweenConfig
impl Clone for TweenConfig
Source§fn clone(&self) -> TweenConfig
fn clone(&self) -> TweenConfig
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 moreSource§impl Debug for TweenConfig
impl Debug for TweenConfig
impl Copy for TweenConfig
Auto Trait Implementations§
impl Freeze for TweenConfig
impl RefUnwindSafe for TweenConfig
impl Send for TweenConfig
impl Sync for TweenConfig
impl Unpin for TweenConfig
impl UnsafeUnpin for TweenConfig
impl UnwindSafe for TweenConfig
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§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.