Struct style::animation::KeyframesAnimationState [] [src]

pub struct KeyframesAnimationState {
    pub started_at: f64,
    pub duration: f64,
    pub delay: f64,
    pub iteration_state: KeyframesIterationState,
    pub running_state: KeyframesRunningState,
    pub direction: AnimationDirection,
    pub current_direction: AnimationDirection,
    pub expired: bool,
    pub cascade_style: Arc<ComputedValues>,
}

This structure represents the current keyframe animation state, i.e., the duration, the current and maximum iteration count, and the state (either playing or paused).

Fields

The time this animation started at.

The duration of this animation.

The delay of the animation.

The current iteration state for the animation.

Werther this animation is paused.

The declared animation direction of this animation.

The current animation direction. This can only be normal or reverse.

Werther this keyframe animation is outdated due to a restyle.

The original cascade style, needed to compute the generated keyframes of the animation.

Methods

impl KeyframesAnimationState
[src]

[src]

Performs a tick in the animation state, i.e., increments the counter of the current iteration count, updates times and then toggles the direction if appropriate.

Returns true if the animation should keep running.

[src]

Updates the appropiate state from other animation.

This happens when an animation is re-submitted to layout, presumably because of an state change.

There are some bits of state we can't just replace, over all taking in account times, so here's that logic.

Trait Implementations

impl Clone for KeyframesAnimationState
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for KeyframesAnimationState
[src]

[src]

Formats the value using the given formatter. Read more