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