Struct style::animation::Transition
source · 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: f64
The start time of this transition, which is the current value of the animation timeline when this transition was created plus any animation delay.
delay: f64
The delay used for this transition.
property_animation: PropertyAnimation
The internal style PropertyAnimation
for this transition.
state: AnimationState
The state of this transition.
is_new: bool
Whether or not this transition is new and or has already been tracked by the script thread.
reversing_adjusted_start_value: AnimationValue
If this Transition
has been replaced by a new one this field is
used to help produce better reversed transitions.
reversing_shortening_factor: f64
If 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 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) -> Option<AnimationValue>
pub fn calculate_value(&self, time: f64) -> Option<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> 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