TimelineFunc

Trait TimelineFunc 

Source
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§

Source

fn start_sec(&self) -> Option<f64>

The start sec of the timeline(the start sec of the first animation.)

Source

fn end_sec(&self) -> Option<f64>

The end sec of the timeline(the end sec of the last animation.)

Source

fn seal(&mut self)

Seal the timeline func(submit the planning static anim)

Source

fn cur_sec(&self) -> f64

The current sec of the timeline.

Source

fn forward(&mut self, secs: f64)

Forward the timeline by secs

Source

fn show(&mut self)

Show the item

Source

fn hide(&mut self)

Hide the item

Source

fn get_animation_infos(&self) -> Vec<AnimationInfo>

Get the animation infos

Source

fn type_name(&self) -> &str

The type name of the timeline

Source

fn eval_primitives_at_sec( &self, target_sec: f64, ) -> Option<(usize, Vec<CoreItem>)>

Evaluate timeline’s primitives at target sec

Provided Methods§

Source

fn range_sec(&self) -> Option<Range<f64>>

The range of the timeline.

Source

fn forward_to(&mut self, target_sec: f64)

Forward the timeline to target_sec

Implementors§