Skip to main content

AnimationAccess

Trait AnimationAccess 

Source
pub trait AnimationAccess {
    // Required method
    fn get_spring_value(&self, id: u64, generation: u32) -> Option<f32>;

    // Provided methods
    fn get_keyframe_value(&self, _id: u64) -> Option<f32> { ... }
    fn get_timeline_value(
        &self,
        _timeline_id: u64,
        _property: &str,
    ) -> Option<f32> { ... }
}
Expand description

Trait for accessing animation values (springs, keyframes, timelines)

Required Methods§

Source

fn get_spring_value(&self, id: u64, generation: u32) -> Option<f32>

Get a spring’s current value

Provided Methods§

Source

fn get_keyframe_value(&self, _id: u64) -> Option<f32>

Get a keyframe animation’s current value

Source

fn get_timeline_value(&self, _timeline_id: u64, _property: &str) -> Option<f32>

Get a timeline’s current value for a given property

Implementations on Foreign Types§

Source§

impl AnimationAccess for AnimationScheduler

Implement AnimationAccess for AnimationScheduler

This allows the scheduler to be used directly with ValueContext for resolving dynamic animation values at render time.

Source§

fn get_spring_value(&self, id: u64, generation: u32) -> Option<f32>

Source§

fn get_keyframe_value(&self, id: u64) -> Option<f32>

Source§

fn get_timeline_value(&self, timeline_id: u64, _property: &str) -> Option<f32>

Implementors§

Source§

impl AnimationAccess for SchedulerHandle

Implement AnimationAccess for SchedulerHandle

This allows the handle to be used with ValueContext for resolving dynamic animation values at render time.