pub struct CharAnimationTiming {Show 13 fields
pub delay: f64,
pub duration: f64,
pub stagger: f64,
pub granularity: TextAnimGranularity,
pub easing: EasingType,
pub overshoot: Option<f64>,
pub blur: Option<f64>,
pub direction: TextAnimDirection,
pub distance: Option<f64>,
pub scale_from: Option<f64>,
pub jitter: Option<f64>,
pub seed: Option<u32>,
pub ink_from: Option<String>,
}Expand description
Timing configuration for char animation effect variants (used inside style.animation).
Fields§
§delay: f64Delay before animation starts (seconds).
duration: f64Duration of each unit’s animation in seconds.
stagger: f64Delay between each unit (char or word) in seconds.
granularity: TextAnimGranularityGranularity: animate per character or per word.
easing: EasingTypeEasing function for each unit’s animation.
overshoot: Option<f64>Overshoot intensity for char_scale_in/char_bounce (0.0 = none, default 0.08 = 8%).
blur: Option<f64>Starting blur sigma in px for char_blur_in — the word (or char) begins blurred by this amount and settles to sharp (sigma 0) by the end of its unit animation. Unused by the other five char presets. Defaults to 14px sigma, chosen to read clearly at 100px+ display type without collapsing into a featureless blob (see render proof in issue #118).
direction: TextAnimDirectionWhich way each unit travels in from. Only char_slide_up and
char_blur_in have a travel axis to redirect; the other presets
ignore it. Default up — the historical behaviour.
distance: Option<f64>Multiplier on how far each unit travels, 1.0 being each preset’s
own tuned distance (0.8em for slide_up, 0.12em for blur_in).
Use ~0.5 for a tighter arrival, ~1.85 for a pronounced staircase.
scale_from: Option<f64>Scale each unit starts at, growing to 1.0 over its animation —
combined with, not instead of, the preset’s own motion. 0.82 gives
the punchy “number pops in” arrival, 0.92 a barely-perceptible
settle. Unset means no scaling (the historical behaviour); the
scale-based presets (char_scale_in, char_bounce) own their scale
curve outright and ignore this.
jitter: Option<f64>Randomises each unit’s start time by up to ±jitter × stagger, so
the units arrive in uneven bursts instead of a metronomic march.
This is what separates a streaming-token look from a typewriter:
language models don’t emit words on a clock. 0 (default) keeps the
exact even spacing.
The offsets are derived from seed and the unit’s index, never from
a live RNG — a frame must render identically no matter which
process, thread or --frames segment computes it.
seed: Option<u32>Seed for jitter. Changing it reshuffles the arrival rhythm without
changing its statistics.
ink_from: Option<String>Colour each unit starts at before settling to the text’s own colour over its animation. A dim grey here reproduces the way freshly streamed tokens read as unsettled before the eye accepts them.
Trait Implementations§
Source§impl Clone for CharAnimationTiming
impl Clone for CharAnimationTiming
Source§fn clone(&self) -> CharAnimationTiming
fn clone(&self) -> CharAnimationTiming
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 CharAnimationTiming
impl Debug for CharAnimationTiming
Source§impl Default for CharAnimationTiming
impl Default for CharAnimationTiming
Source§impl<'de> Deserialize<'de> for CharAnimationTiming
impl<'de> Deserialize<'de> for CharAnimationTiming
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 CharAnimationTiming
impl JsonSchema for CharAnimationTiming
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 CharAnimationTiming
impl PartialEq for CharAnimationTiming
Source§impl Serialize for CharAnimationTiming
impl Serialize for CharAnimationTiming
impl StructuralPartialEq for CharAnimationTiming
Auto Trait Implementations§
impl Freeze for CharAnimationTiming
impl RefUnwindSafe for CharAnimationTiming
impl Send for CharAnimationTiming
impl Sync for CharAnimationTiming
impl Unpin for CharAnimationTiming
impl UnsafeUnpin for CharAnimationTiming
impl UnwindSafe for CharAnimationTiming
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