Enum style::animation::Animation
[−]
[src]
pub enum Animation { Transition(OpaqueNode, f64, AnimationFrame, bool), Keyframes(OpaqueNode, Atom, KeyframesAnimationState), }
State relating to an animation.
Variants
Transition(OpaqueNode, f64, AnimationFrame, bool)
A transition is just a single frame triggered at a time, with a reflow.
the f64 field is the start time as returned by time::precise_time_s()
.
The bool
field is werther this animation should no longer run.
Keyframes(OpaqueNode, Atom, KeyframesAnimationState)
A keyframes animation is identified by a name, and can have a node-dependent state (i.e. iteration count, etc.).
Methods
impl Animation
[src]
pub fn mark_as_expired(&mut self)
[src]
Mark this animation as expired.
pub fn is_expired(&self) -> bool
[src]
Whether this animation is expired.
pub fn node(&self) -> &OpaqueNode
[src]
The opaque node that owns the animation.
pub fn is_paused(&self) -> bool
[src]
Whether this animation is paused. A transition can never be paused.
pub fn is_transition(&self) -> bool
[src]
Whether this animation is a transition.
Trait Implementations
impl Clone for Animation
[src]
fn clone(&self) -> Animation
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more