pub struct MaterialSpring {
pub stiffness: f64,
pub damping_ratio: f64,
}Expand description
A Material 3 Expressive spring preset: stiffness plus damping_ratio
(mass implicitly 1.0 — see the module docs). 1.0 is critically damped
(no overshoot); values below 1.0 overshoot before settling.
Fields§
§stiffness: f64§damping_ratio: f64Implementations§
Source§impl MaterialSpring
impl MaterialSpring
Sourcepub const SPATIAL_FAST: Self
pub const SPATIAL_FAST: Self
Fast spatial spring for size/position/shape morphs — feeds
motion_scheme’s fast_spatial.
Sourcepub const SPATIAL_DEFAULT: Self
pub const SPATIAL_DEFAULT: Self
Default spatial spring for size/position/shape morphs — feeds
motion_scheme’s default_spatial.
Sourcepub const SPATIAL_SLOW: Self
pub const SPATIAL_SLOW: Self
Slow spatial spring for size/position/shape morphs — feeds
motion_scheme’s slow_spatial.
Sourcepub const AOSP_SPATIAL: Self
pub const AOSP_SPATIAL: Self
AOSP spatial spring (matches AOSP notification-list expansion — no
overshoot). No MotionScheme slot; a crate-reachable constant only.
Sourcepub const EXPRESSIVE_SPATIAL_FAST: Self
pub const EXPRESSIVE_SPATIAL_FAST: Self
Fast expressive spatial spring with slight overshoot. No
MotionScheme slot; a crate-reachable constant only.
Sourcepub const EXPRESSIVE_SPATIAL_DEFAULT: Self
pub const EXPRESSIVE_SPATIAL_DEFAULT: Self
Default expressive spatial spring with slight overshoot. No
MotionScheme slot; a crate-reachable constant only.
Sourcepub const EXPRESSIVE_SPATIAL_PRESS: Self
pub const EXPRESSIVE_SPATIAL_PRESS: Self
Interactive press-scale spring (floating toolbar / button morph
recipe). No MotionScheme slot; a crate-reachable constant only.
Sourcepub const EXPRESSIVE_SPATIAL_SLOW: Self
pub const EXPRESSIVE_SPATIAL_SLOW: Self
Slow expressive spatial spring with slight overshoot. No
MotionScheme slot; a crate-reachable constant only.
Sourcepub const EFFECTS_FAST: Self
pub const EFFECTS_FAST: Self
Fast effects spring for color/opacity (no overshoot) — feeds
motion_scheme’s fast_effects.
Sourcepub const EFFECTS_DEFAULT: Self
pub const EFFECTS_DEFAULT: Self
Default effects spring for color/opacity (no overshoot) — feeds
motion_scheme’s default_effects.
Sourcepub const EFFECTS_SLOW: Self
pub const EFFECTS_SLOW: Self
Slow effects spring for color/opacity (no overshoot) — feeds
motion_scheme’s slow_effects.
Trait Implementations§
Source§impl Clone for MaterialSpring
impl Clone for MaterialSpring
impl Copy for MaterialSpring
Source§impl Debug for MaterialSpring
impl Debug for MaterialSpring
Source§impl From<MaterialSpring> for MotionSpring
impl From<MaterialSpring> for MotionSpring
Source§fn from(spring: MaterialSpring) -> Self
fn from(spring: MaterialSpring) -> Self
Source§impl PartialEq for MaterialSpring
impl PartialEq for MaterialSpring
impl StructuralPartialEq for MaterialSpring
Auto Trait Implementations§
impl Freeze for MaterialSpring
impl RefUnwindSafe for MaterialSpring
impl Send for MaterialSpring
impl Sync for MaterialSpring
impl Unpin for MaterialSpring
impl UnsafeUnpin for MaterialSpring
impl UnwindSafe for MaterialSpring
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.