SpringScalarNaturalMotionAnimation
struct · ferroui-base · v0.5.0
struct SpringScalarNaturalMotionAnimation
A spring animation of scalar values (WinUI SpringScalarNaturalMotionAnimation): each component moves on a damped harmonic oscillator of the given damping ratio and period.
Members
new
fn new(compositor: &Rc<Compositor>) -> Rc<SpringScalarNaturalMotionAnimation>
damping_ratio
fn damping_ratio(self: &Self) -> f32
The damping ratio of the spring: 1 (the default) comes to rest as fast as possible without overshooting, less overshoots and oscillates, more comes to rest slower; 0 oscillates forever.
set_damping_ratio
fn set_damping_ratio(self: &Self, value: f32)
Sets the damping ratio. Panics when it is negative or not a number.
period
fn period(self: &Self) -> Duration
The period of the oscillation of the spring without damping; a shorter period is a stiffer spring.
set_period
fn set_period(self: &Self, value: Duration)
Sets the period. Panics when it is zero.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyErasedDestructorIntoEitherDerefICompositionAnimationBaseICompositionAnimationAsCompositionObject
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.