tirbofish/dropbear · commit
51bd99fb844aa18e8e4fceb86572a8f2cfa714bb
asset server
Signature present but could not be verified.
Unverified
@@ -60,6 +60,7 @@ libloading = "0.8" indexmap = "2.11" sha2 = "0.10" wesl = "0.2" +dashmap = "6.1" [workspace.dependencies.image] version = "0.25" @@ -39,6 +39,7 @@ backtrace.workspace = true os_info.workspace = true rustc_version_runtime.workspace = true ron.workspace = true +dashmap.workspace = true [target.'cfg(not(target_os = "android"))'.dependencies] rfd.workspace = true @@ -0,0 +1,74 @@ +use std::sync::Arc; + +use dashmap::DashMap; + +use crate::model::{Material, MaterialComponent, Mesh, MeshComponent}; + +pub type Handle = u64; + +pub struct AssetCache { + materials: DashMap<MaterialComponent, Arc<Material>>, + meshes: DashMap<MeshComponent, Arc<Mesh>>, +} + +impl AssetCache { + pub fn new() -> Self { + Self { + materials: DashMap::new(), + meshes: DashMap::new(), + } + }
Large diffs are not rendered by default. Showing the first 50 of 1112 lines. Show full diff