pub struct MaterialSpringEasing { /* private fields */ }Expand description
Bridges a physical spring to FerroUI’s normalized-progress IEasing interface.
Use the matching duration; the same spring with an unrelated duration changes its physical
speed. This adapter starts with zero velocity because IEasing has no velocity channel.
Controls needing interruption continuity use MaterialSpringState instead.
Implementations§
Source§impl MaterialSpringEasing
impl MaterialSpringEasing
pub fn new( spec: MaterialSpringSpec, duration: TimeSpan, reduced_motion: bool, ) -> Self
Sourcepub fn spring_spec(&self) -> MaterialSpringSpec
pub fn spring_spec(&self) -> MaterialSpringSpec
Parameters consumed by the velocity-preserving Material property transitions.
Trait Implementations§
Source§impl Clone for MaterialSpringEasing
impl Clone for MaterialSpringEasing
Source§impl Debug for MaterialSpringEasing
impl Debug for MaterialSpringEasing
Source§impl IEasing for MaterialSpringEasing
impl IEasing for MaterialSpringEasing
The easing as the render thread evaluates it: a key frame animation of
the compositor runs there. An easing without parameters returns
itself; one with parameters returns a copy with the parameters it has
now.
Source§fn derives_from_easing(&self) -> bool
fn derives_from_easing(&self) -> bool
Whether the object is an easing class: upstream, a class deriving from
the
Easing base class, which code tests for with a cast. True for
every easing of this module and by default, because implementing this
trait is how an easing class is written here; an object that stands
for a bare implementation of the contract (not an easing class)
answers false.Auto Trait Implementations§
impl Freeze for MaterialSpringEasing
impl RefUnwindSafe for MaterialSpringEasing
impl Send for MaterialSpringEasing
impl Sync for MaterialSpringEasing
impl Unpin for MaterialSpringEasing
impl UnsafeUnpin for MaterialSpringEasing
impl UnwindSafe for MaterialSpringEasing
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more