pub struct AnimationTiming {
pub delay: f64,
pub duration: f64,
pub repeat: bool,
pub overshoot: Option<f64>,
pub spring: Option<SpringConfig>,
pub amplitude: Option<f64>,
}Expand description
Timing configuration for preset animations.
Fields§
§delay: f64Delay before animation starts (seconds).
duration: f64Animation duration (seconds).
repeat: boolLoop the animation continuously.
overshoot: Option<f64>Overshoot/anticipation intensity for scale_in/scale_out (0.0 = none, default 0.08 = 8%).
spring: Option<SpringConfig>Spring physics for the preset’s motion keyframes (translate/scale/
rotate — opacity keeps its ease to avoid alpha overshoot flashes).
bounce_in / elastic_in use their built-in springs as defaults;
this overrides them.
amplitude: Option<f64>Travel of an oscillating preset, in pixels (float_3d only; default
12). Threaded through to_preset_config into PresetConfig::amplitude,
which expand_preset_inner already reads — this field is what makes
an author-supplied amplitude actually reach it instead of the
hardcoded default on every element.
Implementations§
Source§impl AnimationTiming
impl AnimationTiming
Sourcepub fn to_preset_config(&self) -> PresetConfig
pub fn to_preset_config(&self) -> PresetConfig
Convert to PresetConfig for compatibility with resolve_animations.
Trait Implementations§
Source§impl Clone for AnimationTiming
impl Clone for AnimationTiming
Source§fn clone(&self) -> AnimationTiming
fn clone(&self) -> AnimationTiming
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AnimationTiming
impl Debug for AnimationTiming
Source§impl Default for AnimationTiming
impl Default for AnimationTiming
Source§impl<'de> Deserialize<'de> for AnimationTiming
impl<'de> Deserialize<'de> for AnimationTiming
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>,
Source§impl JsonSchema for AnimationTiming
impl JsonSchema for AnimationTiming
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl PartialEq for AnimationTiming
impl PartialEq for AnimationTiming
Source§impl Serialize for AnimationTiming
impl Serialize for AnimationTiming
impl StructuralPartialEq for AnimationTiming
Auto Trait Implementations§
impl Freeze for AnimationTiming
impl RefUnwindSafe for AnimationTiming
impl Send for AnimationTiming
impl Sync for AnimationTiming
impl Unpin for AnimationTiming
impl UnsafeUnpin for AnimationTiming
impl UnwindSafe for AnimationTiming
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more