pub struct BuildAnimationCtx {
pub time: f64,
pub scenario_time: f64,
pub scene_duration: f64,
pub fps: u32,
}Expand description
Frame-level context passed into the builder so animations can be resolved
per-node and merged into the resulting CssStyle. When None, the box
tree is built without any animation overrides (resting state).
Fields§
§time: f64§scenario_time: f64Seconds since the scenario started, as opposed to time, which
restarts at every scene. Only the audio-reactive binding reads it:
the audio analysis is indexed on the scenario’s timeline, so using
time gave a scene starting at t=73 s the analysis at 73 s into that
scene. Every animation stays on time, which is what a delay, a
stagger or a preset is written against.
scene_duration: f64§fps: u32Frames per second of the output video. Required to convert the
shutter fraction (in MotionBlurConfig) into an absolute temporal
offset: shutter_window = shutter / fps seconds.
Trait Implementations§
Source§impl Clone for BuildAnimationCtx
impl Clone for BuildAnimationCtx
Source§fn clone(&self) -> BuildAnimationCtx
fn clone(&self) -> BuildAnimationCtx
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BuildAnimationCtx
Auto Trait Implementations§
impl Freeze for BuildAnimationCtx
impl RefUnwindSafe for BuildAnimationCtx
impl Send for BuildAnimationCtx
impl Sync for BuildAnimationCtx
impl Unpin for BuildAnimationCtx
impl UnsafeUnpin for BuildAnimationCtx
impl UnwindSafe for BuildAnimationCtx
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
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> ⓘ
Converts
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> ⓘ
Converts
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