pub struct SpringChoice {
pub kind: SpringKind,
pub mass: Option<f64>,
pub stiffness: f64,
pub damping: f64,
pub velocity: Option<f64>,
}Expand description
A mass on a damped spring, released toward its target. The easing is the spring’s motion
over the time it takes to stay within a thousandth of the target; an entrance or exit
without a duration lasts that long.
Fields§
§kind: SpringKindspring.
mass: Option<f64>The mass, above 0. Default 1.
stiffness: f64The spring constant, above 0.
damping: f64The damping coefficient, above 0.
velocity: Option<f64>The velocity at the start, in distances to the target per second. Default 0.
Trait Implementations§
Source§impl Clone for SpringChoice
impl Clone for SpringChoice
Source§impl Debug for SpringChoice
impl Debug for SpringChoice
Source§impl<'de> Deserialize<'de> for SpringChoice
impl<'de> Deserialize<'de> for SpringChoice
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SpringChoice
impl PartialEq for SpringChoice
Source§impl Serialize for SpringChoice
impl Serialize for SpringChoice
impl StructuralPartialEq for SpringChoice
Auto Trait Implementations§
impl Forget for SpringChoice
impl Freeze for SpringChoice
impl Move for SpringChoice
impl RefUnwindSafe for SpringChoice
impl Send for SpringChoice
impl Sync for SpringChoice
impl Unpin for SpringChoice
impl UnsafeUnpin for SpringChoice
impl UnwindSafe for SpringChoice
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