pub trait Timeline {
type Target;
// Required methods
fn start_with(&mut self, values: &Self::Target);
fn update(&self, values: &mut Self::Target, time: f32);
}Expand description
An animator timeline.
Required Associated Types§
Required Methods§
sourcefn start_with(&mut self, values: &Self::Target)
fn start_with(&mut self, values: &Self::Target)
Changes this timeline to start with a different set of values from the defaults that it was originally configured with.
Does not affect delay, repeat, or other timing properties; only the keyframes at the 0% position are changed. If the timeline repeats or reverses, the new start value will affect only the forward direction of the first cycle, and the timeline will loop or reverse back to the starting value with which it was originally configured.
This is typically used when blending animations; the newly-active timeline begins where the previously-active timeline ended or was interrupted.
Arguments
values- New values where the timeline should start, replacing previous defaults.
sourcefn update(&self, values: &mut Self::Target, time: f32)
fn update(&self, values: &mut Self::Target, time: f32)
Updates a set of animator values to represent the timeline at a given time.
Properties that are not included in the timeline will not be updated.
Arguments
target- Target containing animatable values to update.time- Time in the same unit scale as the timeline’s duration, generally seconds.