pub struct LoopingAnimation<T: Interpolate> { /* private fields */ }Expand description
Animation with loop support
§Example
use armas_basic::animation::{LoopingAnimation, LoopMode};
let mut anim = LoopingAnimation::new(0.0_f32, 1.0, 1.0, LoopMode::PingPong);
anim.update(0.5);
let value = anim.value();Implementations§
Source§impl<T: Interpolate> LoopingAnimation<T>
impl<T: Interpolate> LoopingAnimation<T>
Trait Implementations§
Source§impl<T: Clone + Interpolate> Clone for LoopingAnimation<T>
impl<T: Clone + Interpolate> Clone for LoopingAnimation<T>
Source§fn clone(&self) -> LoopingAnimation<T>
fn clone(&self) -> LoopingAnimation<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> Freeze for LoopingAnimation<T>where
T: Freeze,
impl<T> RefUnwindSafe for LoopingAnimation<T>where
T: RefUnwindSafe,
impl<T> Send for LoopingAnimation<T>where
T: Send,
impl<T> Sync for LoopingAnimation<T>where
T: Sync,
impl<T> Unpin for LoopingAnimation<T>where
T: Unpin,
impl<T> UnsafeUnpin for LoopingAnimation<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for LoopingAnimation<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more