Enum freya_hooks::Animation
source · pub enum Animation {
BounceIn(RefCell<Tweener<f64, i32, BounceIn>>),
SineIn(RefCell<Tweener<f64, i32, SineIn>>),
SineInOut(RefCell<Tweener<f64, i32, SineInOut>>),
Linear(RefCell<Tweener<f64, i32, Linear>>),
}
Expand description
Animation mode and configuration.
Variants§
BounceIn(RefCell<Tweener<f64, i32, BounceIn>>)
SineIn(RefCell<Tweener<f64, i32, SineIn>>)
SineInOut(RefCell<Tweener<f64, i32, SineInOut>>)
Linear(RefCell<Tweener<f64, i32, Linear>>)
Implementations§
source§impl Animation
impl Animation
sourcepub fn new_bounce_in(range: RangeInclusive<f64>, time: i32) -> Self
pub fn new_bounce_in(range: RangeInclusive<f64>, time: i32) -> Self
New BounceIn Animation
sourcepub fn new_sine_in(range: RangeInclusive<f64>, time: i32) -> Self
pub fn new_sine_in(range: RangeInclusive<f64>, time: i32) -> Self
New SineIn Animation
sourcepub fn new_sine_in_out(range: RangeInclusive<f64>, time: i32) -> Self
pub fn new_sine_in_out(range: RangeInclusive<f64>, time: i32) -> Self
New SineInOut Animation
sourcepub fn new_linear(range: RangeInclusive<f64>, time: i32) -> Self
pub fn new_linear(range: RangeInclusive<f64>, time: i32) -> Self
New Linear Animation
sourcepub fn initial_value(&self) -> f64
pub fn initial_value(&self) -> f64
Get the initial value of the animation.
sourcepub fn final_value(&self) -> f64
pub fn final_value(&self) -> f64
Get the final value of the animation.
sourcepub fn move_value(&mut self, index: i32) -> f64
pub fn move_value(&mut self, index: i32) -> f64
Move the animation to the given index.