pub struct AnimationPlayer<T = AnimationValue> { /* private fields */ }Implementations§
Source§impl<T> AnimationPlayer<T>
impl<T> AnimationPlayer<T>
pub fn new(timeline: Arc<CompiledTimeline<T>>) -> AnimationPlayer<T>
pub fn from_compiled(timeline: CompiledTimeline<T>) -> AnimationPlayer<T>
pub fn timeline(&self) -> &CompiledTimeline<T>
pub fn playback(&self) -> PlaybackState
pub fn playback_mut(&mut self) -> &mut PlaybackState
pub fn with_loop_mode(self, loop_mode: LoopMode) -> AnimationPlayer<T>
pub fn repeat(self) -> AnimationPlayer<T>
pub fn ping_pong(self) -> AnimationPlayer<T>
pub fn once(self) -> AnimationPlayer<T>
pub fn with_playback_rate(self, playback_rate: f64) -> AnimationPlayer<T>
Sourcepub fn with_start_delay(self, delay: f64) -> AnimationPlayer<T>
pub fn with_start_delay(self, delay: f64) -> AnimationPlayer<T>
Wait delay seconds before playing from the start.
Sourcepub fn with_loop_delay(self, delay: f64) -> AnimationPlayer<T>
pub fn with_loop_delay(self, delay: f64) -> AnimationPlayer<T>
Hold delay seconds at each end before looping.
Sourcepub fn passed_markers(&self) -> &[TimelineMarker]
pub fn passed_markers(&self) -> &[TimelineMarker]
The markers the playhead passed in the last tick, in order.
pub fn play(&mut self)
pub fn pause(&mut self)
pub fn stop(&mut self)
pub fn seek(&mut self, time: f64)
Source§impl<T> AnimationPlayer<T>where
T: Copy + Interpolate,
impl<T> AnimationPlayer<T>where
T: Copy + Interpolate,
pub fn sample(&self) -> Vec<SampledAnimationValue<T>>
pub fn sample_into<'a>( &self, samples: &'a mut SampleBuffer<T>, ) -> SampleBatch<'a, T>
pub fn tick_into<'a>( &mut self, delta_seconds: f64, samples: &'a mut SampleBuffer<T>, ) -> AnimationTick<'a, T>
Trait Implementations§
Source§impl<T> Clone for AnimationPlayer<T>where
T: Clone,
impl<T> Clone for AnimationPlayer<T>where
T: Clone,
Source§fn clone(&self) -> AnimationPlayer<T>
fn clone(&self) -> AnimationPlayer<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T> Debug for AnimationPlayer<T>where
T: Debug,
impl<T> Debug for AnimationPlayer<T>where
T: Debug,
Source§impl<T> PartialEq for AnimationPlayer<T>where
T: PartialEq,
impl<T> PartialEq for AnimationPlayer<T>where
T: PartialEq,
impl<T> StructuralPartialEq for AnimationPlayer<T>where
T: PartialEq,
Auto Trait Implementations§
impl<T> Forget for AnimationPlayer<T>
impl<T> Freeze for AnimationPlayer<T>
impl<T> Move for AnimationPlayer<T>
impl<T> RefUnwindSafe for AnimationPlayer<T>
impl<T> Send for AnimationPlayer<T>
impl<T> Sync for AnimationPlayer<T>
impl<T> Unpin for AnimationPlayer<T>
impl<T> UnsafeUnpin for AnimationPlayer<T>
impl<T> UnwindSafe for AnimationPlayer<T>
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