[−][src]Struct raylib::ease::Tween
A manager for a tween on a single f32
value.
Methods
impl Tween
[src]
pub fn new(
easer: EaseFn,
start_value: f32,
end_value: f32,
duration: f32
) -> Tween
[src]
easer: EaseFn,
start_value: f32,
end_value: f32,
duration: f32
) -> Tween
Creates a new Tween
given the easing function, value bounds, and duration.
pub fn reset(&mut self)
[src]
Resets the tween to the beginning.
pub fn has_completed(&self) -> bool
[src]
Returns true if the tween has completed.
pub fn apply(&mut self, time_advance: f32) -> f32
[src]
Returns the new value after applying the tween, advancing time by time_advance
.
pub fn reverse(&mut self)
[src]
Reverses the tween, adjusting the current time position such that it will retrace its steps so far.
pub fn current_time(&self) -> f32
[src]
Returns the current time position of the tween.
pub fn start_value(&self) -> f32
[src]
Returns the starting value of the tween.
pub fn end_value(&self) -> f32
[src]
Returns the ending value of the tween.
pub fn duration(&self) -> f32
[src]
Returns the duration of the tween.
Auto Trait Implementations
impl RefUnwindSafe for Tween
impl Send for Tween
impl Sync for Tween
impl Unpin for Tween
impl UnwindSafe for Tween
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,