[−][src]Enum sprite::Animation
Animations supported by Sprite
Variants
MoveTo(f64, Scalar, Scalar)
duration, x, y
Move sprite to specified position
MoveBy(f64, Scalar, Scalar)
duration, x, y
Move sprite to specified position, relatively
RotateTo(f64, Scalar)
duration, deg
Rotate sprite to specified degree
RotateBy(f64, Scalar)
duration, deg
Rotate sprite to specified degree, relatively
ScaleTo(f64, Scalar, Scalar)
duration, sx, sy
Scale sprite to specified scale
ScaleBy(f64, Scalar, Scalar)
duration, sx, sy
Scale sprite to specified scale, relatively
FlipX(bool)
Flip sprite in x direction
FlipY(bool)
Flip sprite in y direction
Set the sprite's visibility to true
Set the sprite's visibility to false
Toggle the sprite's visibility
duration, times
FadeIn(f64)
duration
Fade in the sprite, set its opacity from 0 to 1 in dt
seconds
FadeOut(f64)
duration
Fade out the sprite, set its opacity from 1 to 0 in dt
seconds
duration, opacity
Set the sprite's opacity to specified value in dt
seconds
Ease(EaseFunction, Box<Animation>)
ease_function, animation
Tweening the animation with ease function
Methods
impl Animation
[src]
pub fn to_state<I: ImageSize>(&self, sprite: &Sprite<I>) -> AnimationState
[src]
Generate a new state from Animation with specified Sprite
Trait Implementations
impl Clone for Animation
[src]
impl PartialEq<Animation> for Animation
[src]
impl StructuralPartialEq for Animation
[src]
Auto Trait Implementations
impl RefUnwindSafe for Animation
impl Send for Animation
impl Sync for Animation
impl Unpin for Animation
impl UnwindSafe for Animation
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
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>,