Enum sprite::Animation [] [src]

pub enum Animation {
    MoveTo(f64, Scalar, Scalar),
    MoveBy(f64, Scalar, Scalar),
    RotateTo(f64, Scalar),
    RotateBy(f64, Scalar),
    ScaleTo(f64, Scalar, Scalar),
    ScaleBy(f64, Scalar, Scalar),
    FlipX(bool),
    FlipY(bool),
    Show,
    Hide,
    ToggleVisibility,
    Blink(f64usize),
    FadeIn(f64),
    FadeOut(f64),
    FadeTo(f64f64),
    Ease(EaseFunctionBox<Animation>),
}

Animations supported by Sprite

Variants

duration, x, y

Move sprite to specified position

duration, x, y

Move sprite to specified position, relatively

duration, deg

Rotate sprite to specified degree

duration, deg

Rotate sprite to specified degree, relatively

duration, sx, sy

Scale sprite to specified scale

duration, sx, sy

Scale sprite to specified scale, relatively

Flip sprite in x direction

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

duration

Fade in the sprite, set its opacity from 0 to 1 in dt seconds

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_function, animation

Tweening the animation with ease function

Methods

impl Animation
[src]

Generate a new state from Animation with specified Sprite

Trait Implementations

impl Clone for Animation
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Animation
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.