euv_engine/sprite/enum.rs
1/// Defines how an animation behaves when it reaches the last frame.
2#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
3pub enum AnimationMode {
4 /// The animation loops back to the first frame after the last frame.
5 #[default]
6 Loop,
7 /// The animation plays once and stops on the last frame.
8 Once,
9 /// The animation plays forward then backward alternately.
10 PingPong,
11}
12
13/// Represents the current playback state of an animation.
14#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
15pub enum AnimationState {
16 /// The animation is currently playing.
17 #[default]
18 Playing,
19 /// The animation is paused and can be resumed.
20 Paused,
21 /// The animation has finished (reached the end in `Once` mode).
22 Finished,
23}