pub struct Animation<'a> {Show 16 fields
pub node_id: u32,
pub animation_id: u32,
pub property: AnimatedProperty,
pub slot: u8,
pub direction: PlaybackDirection,
pub fill: FillMode,
pub play_state: PlayState,
pub interpolation: Option<ColorInterpolation>,
pub start_time_nanos: u64,
pub delay_ms: f32,
pub duration_ms: f32,
pub iterations: f32,
pub origin_x: f32,
pub origin_y: f32,
pub events: AnimationEvents,
pub keyframes: Cow<'a, [Keyframe]>,
}Expand description
One animation the Renderer plays to its end on its own frame clock, described once.
The key is (node_id, property, slot): a second animation with the same key replaces
the first, and of the ones in effect on one property the highest slot is what shows.
Timing follows Web Animations Level 1, which is what CSS transitions and animations
are defined by.
Fields§
§node_id: u32§animation_id: u32The Host’s own name for the animation, returned in every event about it.
property: AnimatedProperty§slot: u8§direction: PlaybackDirection§fill: FillMode§play_state: PlayState§interpolation: Option<ColorInterpolation>For Color, Background and BorderColor only, and required there.
start_time_nanos: u64On the Renderer’s frame clock. Zero starts it on the first frame that draws it.
delay_ms: f32May be negative, which starts it partway through.
duration_ms: f32§iterations: f32Infinite for infinite.
origin_x: f32For Transform only: the origin, as a fraction of the node’s size.
origin_y: f32§events: AnimationEvents§keyframes: Cow<'a, [Keyframe]>At least two, the first at offset 0 and the last at 1.