pub struct TransitionLibrary(/* private fields */);Expand description
Provides factory methods for creating common transition types.
Implementations§
Source§impl TransitionLibrary
impl TransitionLibrary
Sourcepub fn accelerate_decelerate(
&self,
duration: f64,
final_value: f64,
acceleration_ratio: f64,
deceleration_ratio: f64,
) -> Result<Transition>
pub fn accelerate_decelerate( &self, duration: f64, final_value: f64, acceleration_ratio: f64, deceleration_ratio: f64, ) -> Result<Transition>
Creates a transition that accelerates then decelerates.
duration is measured in seconds.
The sum of acceleration_ratio and deceleration_ratio must be <= 1.0.
Sourcepub fn linear(&self, duration: f64, final_value: f64) -> Result<Transition>
pub fn linear(&self, duration: f64, final_value: f64) -> Result<Transition>
Creates a linear transition to the final value over duration seconds.
Sourcepub fn instantaneous(&self, final_value: f64) -> Result<Transition>
pub fn instantaneous(&self, final_value: f64) -> Result<Transition>
Creates an instantaneous transition that jumps to the final value.
Trait Implementations§
Source§impl Clone for TransitionLibrary
impl Clone for TransitionLibrary
Source§fn clone(&self) -> TransitionLibrary
fn clone(&self) -> TransitionLibrary
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 moreAuto Trait Implementations§
impl !Send for TransitionLibrary
impl !Sync for TransitionLibrary
impl Freeze for TransitionLibrary
impl RefUnwindSafe for TransitionLibrary
impl Unpin for TransitionLibrary
impl UnsafeUnpin for TransitionLibrary
impl UnwindSafe for TransitionLibrary
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