pub struct ResolvedCharAnimation {Show 14 fields
pub preset: CharAnimPreset,
pub granularity: TextAnimGranularity,
pub stagger: f32,
pub duration: f32,
pub easing: EasingType,
pub delay: f32,
pub overshoot: f32,
pub blur: f32,
pub direction: TextAnimDirection,
pub distance: f32,
pub scale_from: Option<f32>,
pub jitter: f32,
pub seed: u32,
pub ink_from: Option<String>,
}Expand description
Resolved char animation config ready for the text renderer.
Fields§
§preset: CharAnimPreset§granularity: TextAnimGranularity§stagger: f32§duration: f32§easing: EasingType§delay: f32§overshoot: f32§blur: f32Starting blur sigma in px (char_blur_in only; 0 elsewhere).
direction: TextAnimDirectionTravel direction for the presets whose motion is a translate.
distance: f32Multiplier on the preset’s own travel distance (1.0 = as tuned).
scale_from: Option<f32>Scale each unit starts at, or None for no scaling.
jitter: f32±fraction of stagger each unit’s start is nudged by (0 = even).
seed: u32Seed for the deterministic jitter offsets.
ink_from: Option<String>Colour each unit starts at before settling to the text’s own.
Implementations§
Source§impl ResolvedCharAnimation
impl ResolvedCharAnimation
Sourcepub fn unit_start(&self, idx: usize) -> f64
pub fn unit_start(&self, idx: usize) -> f64
When unit idx starts, in seconds, including its jitter nudge.
The nudge is a pure function of (idx, seed) — deliberately not an
RNG. Frames are rendered out of order, in parallel, and sometimes in
separate processes (--frames a-b segments), so anything stateful
here would make a unit jump between neighbouring frames.
It is also clamped so a unit never starts before the effect’s own
delay: a negative start would make the first units appear already
half-animated on frame 0.
Trait Implementations§
Source§impl Clone for ResolvedCharAnimation
impl Clone for ResolvedCharAnimation
Source§fn clone(&self) -> ResolvedCharAnimation
fn clone(&self) -> ResolvedCharAnimation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ResolvedCharAnimation
impl RefUnwindSafe for ResolvedCharAnimation
impl Send for ResolvedCharAnimation
impl Sync for ResolvedCharAnimation
impl Unpin for ResolvedCharAnimation
impl UnsafeUnpin for ResolvedCharAnimation
impl UnwindSafe for ResolvedCharAnimation
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,
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