pub struct SpritePlayer { /* private fields */ }Expand description
Uses the same clock, pause/speed/seek semantics and bounded events as skeletal animation. Frame IDs are authored drawing/atlas IDs; no texture API is required.
Implementations§
Source§impl SpritePlayer
impl SpritePlayer
pub fn new( clip: SpriteClip, mode: LoopMode, events: Vec<AnimationEvent>, ) -> Result<SpritePlayer, AnimationError>
pub fn frame(&self) -> u32
pub fn timeline(&self) -> &Timeline
pub fn timeline_mut(&mut self) -> &mut Timeline
pub fn advance<const N: usize>( &mut self, dt: f32, out: &mut EventBuffer<N>, ) -> Result<(), AnimationError>
Trait Implementations§
Source§impl Clone for SpritePlayer
impl Clone for SpritePlayer
Source§fn clone(&self) -> SpritePlayer
fn clone(&self) -> SpritePlayer
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 Freeze for SpritePlayer
impl RefUnwindSafe for SpritePlayer
impl Send for SpritePlayer
impl Sync for SpritePlayer
impl Unpin for SpritePlayer
impl UnwindSafe for SpritePlayer
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