pub struct Animator { /* private fields */ }Implementations§
Source§impl Animator
impl Animator
pub fn new() -> Self
pub fn with_clip(self, clip: Animation) -> Self
pub fn with_machine(self, machine: StateMachine) -> Self
pub fn with_spring(self, spring: SpringMachine) -> Self
pub fn with_autoplay(self, on: bool) -> Self
pub fn set_clip(&mut self, clip: Animation)
pub fn play(&mut self)
pub fn pause(&mut self)
pub fn toggle_play(&mut self)
pub fn fire(&mut self, trigger: impl Into<String>)
pub fn set_boolean(&mut self, name: impl Into<String>, value: bool)
pub fn set_number(&mut self, name: impl Into<String>, value: f32)
pub fn advance(&mut self, dt: f64) -> bool
Sourcepub fn finish(&mut self) -> bool
pub fn finish(&mut self) -> bool
Jump to the end of the current clip and stop.
Used when the host has reduced motion enabled. State machines and springs are paused in place because they have no single final frame.
pub fn advance_frame(&mut self) -> bool
pub fn offset(&self) -> Point
pub fn width(&self) -> Option<f32>
pub fn height(&self) -> Option<f32>
pub fn background(&self) -> Option<Color>
pub fn opacity(&self) -> Option<f32>
pub fn elapsed(&self) -> f64
pub fn is_playing(&self) -> bool
pub fn state_name(&self) -> String
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Animator
impl !Send for Animator
impl !Sync for Animator
impl !UnwindSafe for Animator
impl Freeze for Animator
impl Unpin for Animator
impl UnsafeUnpin for Animator
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