Enum sprite::Animation[][src]

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

Animations supported by Sprite

Variants

MoveTo(f64ScalarScalar)

Tuple Fields

0: f64
1: Scalar
2: Scalar

duration, x, y

Move sprite to specified position

MoveBy(f64ScalarScalar)

Tuple Fields

0: f64
1: Scalar
2: Scalar

duration, x, y

Move sprite to specified position, relatively

RotateTo(f64Scalar)

Tuple Fields

0: f64
1: Scalar

duration, deg

Rotate sprite to specified degree

RotateBy(f64Scalar)

Tuple Fields

0: f64
1: Scalar

duration, deg

Rotate sprite to specified degree, relatively

ScaleTo(f64ScalarScalar)

Tuple Fields

0: f64
1: Scalar
2: Scalar

duration, sx, sy

Scale sprite to specified scale

ScaleBy(f64ScalarScalar)

Tuple Fields

0: f64
1: Scalar
2: Scalar

duration, sx, sy

Scale sprite to specified scale, relatively

FlipX(bool)

Tuple Fields

0: bool

Flip sprite in x direction

FlipY(bool)

Tuple Fields

0: bool

Flip sprite in y direction

Show

Set the sprite’s visibility to true

Hide

Set the sprite’s visibility to false

ToggleVisibility

Toggle the sprite’s visibility

Tuple Fields

0: f64
1: usize

duration, times

FadeIn(f64)

Tuple Fields

0: f64

duration

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

FadeOut(f64)

Tuple Fields

0: f64

duration

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

FadeTo(f64f64)

Tuple Fields

0: f64
1: f64

duration, opacity

Set the sprite’s opacity to specified value in dt seconds

Ease(EaseFunctionBox<Animation>)

Tuple Fields

ease_function, animation

Tweening the animation with ease function

Implementations

Generate a new state from Animation with specified Sprite

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.