euv_engine/asset/enum.rs
1/// Categorizes the type of a game asset for appropriate loading and storage.
2#[derive(Clone, Copy, Debug, Default, Eq, Hash, PartialEq)]
3pub enum AssetType {
4 /// An image asset (PNG, JPEG, SVG, etc.) loaded as `HtmlImageElement`.
5 #[default]
6 Image,
7 /// An audio asset loaded as an `AudioBuffer` for Web Audio playback.
8 Audio,
9 /// A generic binary data asset loaded as a `Vec<u8>`.
10 Data,
11}
12
13/// Represents the loading state of an asset in the cache.
14#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
15pub enum AssetState {
16 /// The asset has been requested but is still loading.
17 #[default]
18 Loading,
19 /// The asset has been successfully loaded and is ready for use.
20 Loaded,
21 /// The asset failed to load.
22 Error,
23}