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 more