Skip to content

struct

Tweener

pub struct Tweener {
    /* private fields */
}

Smoothly animates objects between successive scene states: whenever an object's target transform or color changes and it has a non-zero transition_ms, it eases from where it currently appears.

Methods

set_targets

pub fn set_targets(&mut self, objects: &[Object3D], now: f64)

Record new targets at time now (milliseconds).

sample

pub fn sample(&self, now: f64) -> Vec<(Transform, Color)>

Displayed transform and color for each object at now.

is_active

pub fn is_active(&self, now: f64) -> bool

Whether any transition is still running.

Trait implementations