Struct Animator

Source
pub struct Animator {
    pub area: Area,
    pub theme_update_id: usize,
    pub last_values: Vec<(InstanceType, AnimLastValue)>,
    /* private fields */
}

Fields§

§area: Area§theme_update_id: usize§last_values: Vec<(InstanceType, AnimLastValue)>

Implementations§

Source§

impl Animator

Source

pub fn init<F>(&mut self, cx: &mut Cx, cb: F)
where F: Fn(&Cx) -> Anim,

Source

pub fn set_anim_as_last_values(&mut self, anim: &Anim)

Source

pub fn end(&mut self)

Source

pub fn end_and_set(&mut self, anim: Anim)

Source

pub fn term_anim_playing(&mut self) -> bool

Source

pub fn play_anim(&mut self, cx: &mut Cx, anim: Anim)

Source

pub fn set_area(&mut self, cx: &mut Cx, area: Area)

Source

pub fn update_anim_track(&mut self, cx: &mut Cx, time: f64) -> Option<f64>

Source

pub fn find_track_index(&mut self, ident: InstanceType) -> Option<usize>

Source

pub fn calc_float( &mut self, cx: &mut Cx, ident: InstanceFloat, time: f64, ) -> f32

Source

pub fn last_float(&self, _cx: &Cx, ident: InstanceFloat) -> f32

Source

pub fn _last_float( ident: InstanceFloat, last_float: &Vec<(InstanceType, AnimLastValue)>, ) -> f32

Source

pub fn set_last_float(&mut self, ident: InstanceFloat, value: f32)

Source

pub fn _set_last_float( ident: InstanceFloat, value: f32, last_values: &mut Vec<(InstanceType, AnimLastValue)>, )

Source

pub fn calc_vec2(&mut self, cx: &mut Cx, ident: InstanceVec2, time: f64) -> Vec2

Source

pub fn last_vec2(&self, _cx: &Cx, ident: InstanceVec2) -> Vec2

Source

pub fn _last_vec2( ident: InstanceVec2, last_values: &Vec<(InstanceType, AnimLastValue)>, ) -> Vec2

Source

pub fn set_last_vec2(&mut self, ident: InstanceVec2, value: Vec2)

Source

pub fn _set_last_vec2( ident: InstanceVec2, value: Vec2, last_values: &mut Vec<(InstanceType, AnimLastValue)>, )

Source

pub fn calc_vec3(&mut self, cx: &mut Cx, ident: InstanceVec3, time: f64) -> Vec3

Source

pub fn last_vec3(&self, _cx: &Cx, ident: InstanceVec3) -> Vec3

Source

pub fn _last_vec3( ident: InstanceVec3, last_values: &Vec<(InstanceType, AnimLastValue)>, ) -> Vec3

Source

pub fn set_last_vec3(&mut self, ident: InstanceVec3, value: Vec3)

Source

pub fn _set_last_vec3( ident: InstanceVec3, value: Vec3, last_values: &mut Vec<(InstanceType, AnimLastValue)>, )

Source

pub fn calc_vec4(&mut self, cx: &mut Cx, ident: InstanceVec4, time: f64) -> Vec4

Source

pub fn last_vec4(&self, _cx: &Cx, ident: InstanceVec4) -> Vec4

Source

pub fn _last_vec4( ident: InstanceVec4, last_values: &Vec<(InstanceType, AnimLastValue)>, ) -> Vec4

Source

pub fn set_last_vec4(&mut self, ident: InstanceVec4, value: Vec4)

Source

pub fn _set_last_vec4( ident: InstanceVec4, value: Vec4, last_values: &mut Vec<(InstanceType, AnimLastValue)>, )

Source

pub fn calc_color( &mut self, cx: &mut Cx, ident: InstanceColor, time: f64, ) -> Color

Source

pub fn last_color(&self, _cx: &Cx, ident: InstanceColor) -> Color

Source

pub fn _last_color( ident: InstanceColor, last_values: &Vec<(InstanceType, AnimLastValue)>, ) -> Color

Source

pub fn set_last_color(&mut self, ident: InstanceColor, value: Color)

Source

pub fn _set_last_color( ident: InstanceColor, value: Color, last_values: &mut Vec<(InstanceType, AnimLastValue)>, )

Source

pub fn last_area(&mut self, _cx: &mut Cx, _area: Area, _time: f64)

Source

pub fn calc_area(&mut self, cx: &mut Cx, area: Area, time: f64)

Trait Implementations§

Source§

impl Clone for Animator

Source§

fn clone(&self) -> Animator

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for Animator

Source§

fn default() -> Animator

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.