pub(crate) struct TransitionState {
pub(crate) elapsed_s: f32,
pub(crate) total_s: f32,
}Expand description
One in-flight transition. total_s is the configured duration
(typically 2.7 s, mirror of MD2’s default f_transition_time).
Fields§
§elapsed_s: f32§total_s: f32Implementations§
Source§impl TransitionState
impl TransitionState
pub(crate) fn new(total_s: f32) -> Self
pub(crate) fn tick(&mut self, delta_s: f32)
Sourcepub(crate) fn eased(&self) -> f32
pub(crate) fn eased(&self) -> f32
Eased progress in [0, 1] — feeds the renderer’s blend uniform.
Sourcepub(crate) fn is_complete(&self) -> bool
pub(crate) fn is_complete(&self) -> bool
true once the timer has reached or passed the configured
duration. The engine drops fading_out and clears the renderer’s
secondary chain at this point.
Trait Implementations§
Source§impl Clone for TransitionState
impl Clone for TransitionState
Source§fn clone(&self) -> TransitionState
fn clone(&self) -> TransitionState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TransitionState
impl Debug for TransitionState
impl Copy for TransitionState
Auto Trait Implementations§
impl Freeze for TransitionState
impl RefUnwindSafe for TransitionState
impl Send for TransitionState
impl Sync for TransitionState
impl Unpin for TransitionState
impl UnwindSafe for TransitionState
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,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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