pub struct Sine { /* private fields */ }
Expand description
Controls an AnimatedFloat using a Sine wave, typically endlessly. Useful for flashing a notification, or creating a throbbing animation effect without using a Script.
Implementations
sourceimpl Sine
impl Sine
sourcepub fn new(start: f32, end: f32, speed: f32, cycles: f32, offset: f32) -> Sine
pub fn new(start: f32, end: f32, speed: f32, cycles: f32, offset: f32) -> Sine
@param start The starting value for the animated float. @param end The last value for the animated float. @param speed The speed (in seconds) it takes to go from the start value to the end value. @param cycles The number of animation cycles to go through. A value of 0 will cycle forever, whereas a value of 1 will go from the start position, to the end position, and back to start. @param offset The number of seconds to offset the animation. Useful for offseting the animation for a series of sine behaviors.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Sine
impl !Send for Sine
impl !Sync for Sine
impl Unpin for Sine
impl !UnwindSafe for Sine
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
fn into_color(self) -> To
fn into_color(self) -> To
Convert into color
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.