pub struct CharAnimationTiming {Show 19 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>,
pub rotate_from: Option<f64>,
pub rotate_origin: RotateOrigin,
pub scale_jitter: Option<f64>,
pub baseline_jitter: Option<f64>,
pub reflow: bool,
pub reflow_easing: EasingType,
}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.
rotate_from: Option<f64>Tilt (degrees) each unit starts at, straightening to 0 by the end of
its own animation — the “staircase word reveal” where every letter
settles from a lean. Composes with the preset instead of replacing
it, the same rule scale_from follows; char_rotate_in already
owns a rotation curve and ignores this. Unset means no tilt (the
historical behaviour).
rotate_origin: RotateOriginPivot rotate_from turns each unit around. Only meaningful
alongside rotate_from.
scale_jitter: Option<f64>Deterministic per-unit size noise: each unit is additionally born at
1.0 ± scale_jitter and converges to its own normal scale by the
end of its animation, on top of whatever the preset already does —
“letters born at different sizes, then aligning”. Derived from
seed and the unit’s index, like jitter; unset means no size
noise (the historical behaviour).
baseline_jitter: Option<f64>Deterministic per-unit baseline noise, as a fraction of font-size:
each unit is additionally born offset by up to
±baseline_jitter × font-size from its laid-out baseline and settles
onto it by the end of its animation. Derived from seed and the
unit’s index, like jitter; unset means no baseline noise (the
historical behaviour).
reflow: boolWhen true, a unit that hasn’t started its own animation yet
contributes no width to its line, and one that’s mid-animation
contributes a share eased in by reflow_easing — so the line grows
as units arrive instead of reserving its final width from the first
frame. Combined with text-align: center, this is what keeps a
centred line centred while it’s being written instead of growing
from a fixed left edge. Default false keeps the historical
behaviour: every unit’s slot is reserved from frame one, only its
paint (opacity/position/scale/blur) animates.
reflow_easing: EasingTypeEasing curve for the width a unit contributes to its line while
reflow is on — independent from easing, which times the unit’s
own visual entrance. Only meaningful alongside reflow.
Trait Implementations§
Source§impl Clone for CharAnimationTiming
impl Clone for CharAnimationTiming
Source§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