use crate::ecs::material::resources::MaterialRegistry;
use crate::ecs::prefab::resources::{AnimationCache, MeshCache, PrefabCache};
use crate::render::wgpu::texture_cache::{SamplerSettings, TextureUsage};
use std::collections::HashMap;
#[cfg(feature = "scene_graph")]
use crate::ecs::scene::registry::AssetRegistry;
#[derive(Default)]
pub struct AssetState {
pub mesh_cache: MeshCache,
pub animation_cache: AnimationCache,
pub prefab_cache: PrefabCache,
pub material_registry: MaterialRegistry,
pub texture_sources: HashMap<String, TextureSourceBytes>,
#[cfg(feature = "scene_graph")]
pub asset_registry: AssetRegistry,
}
#[derive(Debug, Clone)]
pub struct TextureSourceBytes {
pub data: TextureSourceData,
pub usage: TextureUsage,
pub sampler: SamplerSettings,
}
#[derive(Debug, Clone)]
pub enum TextureSourceData {
Rgba {
rgba: Vec<u8>,
width: u32,
height: u32,
},
Png(Vec<u8>),
}