pub struct Transition {
    pub start_time: f64,
    pub delay: f64,
    pub property_animation: PropertyAnimation,
    pub state: AnimationState,
    pub is_new: bool,
    pub reversing_adjusted_start_value: AnimationValue,
    pub reversing_shortening_factor: f64,
}Expand description
A CSS Transition
Fields§
§start_time: f64The start time of this transition, which is the current value of the animation timeline when this transition was created plus any animation delay.
delay: f64The delay used for this transition.
property_animation: PropertyAnimationThe internal style PropertyAnimation for this transition.
state: AnimationStateThe state of this transition.
is_new: boolWhether or not this transition is new and or has already been tracked by the script thread.
reversing_adjusted_start_value: AnimationValueIf this Transition has been replaced by a new one this field is
used to help produce better reversed transitions.
reversing_shortening_factor: f64If this Transition has been replaced by a new one this field is
used to help produce better reversed transitions.
Implementations§
Source§impl Transition
 
impl Transition
fn new( start_time: f64, delay: f64, duration: f64, from: AnimationValue, to: AnimationValue, timing_function: &TimingFunction, ) -> Self
fn update_for_possibly_reversed_transition( &mut self, replaced_transition: &Transition, delay: f64, now: f64, )
Sourcepub fn has_ended(&self, time: f64) -> bool
 
pub fn has_ended(&self, time: f64) -> bool
Whether or not this animation has ended at the provided time. This does not take into account canceling i.e. when an animation or transition is canceled due to changes in the style.
Sourcepub fn calculate_value(&self, time: f64) -> AnimationValue
 
pub fn calculate_value(&self, time: f64) -> AnimationValue
Update the given animation at a given point of progress.
Trait Implementations§
Source§impl Clone for Transition
 
impl Clone for Transition
Source§fn clone(&self) -> Transition
 
fn clone(&self) -> Transition
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Transition
 
impl Debug for Transition
Source§impl MallocSizeOf for Transition
 
impl MallocSizeOf for Transition
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
 
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Auto Trait Implementations§
impl Freeze for Transition
impl RefUnwindSafe for Transition
impl Send for Transition
impl Sync for Transition
impl Unpin for Transition
impl UnwindSafe for Transition
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