pub trait TimelineFunc: Any {
// Required methods
fn start_sec(&self) -> Option<f64>;
fn end_sec(&self) -> Option<f64>;
fn seal(&mut self);
fn cur_sec(&self) -> f64;
fn forward(&mut self, secs: f64);
fn show(&mut self);
fn hide(&mut self);
fn get_animation_infos(&self) -> Vec<AnimationInfo>;
fn type_name(&self) -> &str;
fn eval_primitives_at_sec(
&self,
target_sec: f64,
) -> Option<(usize, Vec<CoreItem>)>;
// Provided methods
fn range_sec(&self) -> Option<Range<f64>> { ... }
fn forward_to(&mut self, target_sec: f64) { ... }
}Expand description
Functions for a timeline
Required Methods§
Sourcefn start_sec(&self) -> Option<f64>
fn start_sec(&self) -> Option<f64>
The start sec of the timeline(the start sec of the first animation.)
Sourcefn end_sec(&self) -> Option<f64>
fn end_sec(&self) -> Option<f64>
The end sec of the timeline(the end sec of the last animation.)
Sourcefn get_animation_infos(&self) -> Vec<AnimationInfo>
fn get_animation_infos(&self) -> Vec<AnimationInfo>
Get the animation infos
Provided Methods§
Sourcefn forward_to(&mut self, target_sec: f64)
fn forward_to(&mut self, target_sec: f64)
Forward the timeline to target_sec