tirbofish/dropbear · diff
Merge pull request #62 from 4tkbytes/entity-split
refactor: changing from AdoptedEntity to more component based system
Signature present but could not be verified.
Unverified
@@ -60,6 +60,8 @@ libloading = "0.8" indexmap = "2.11" sha2 = "0.10" wesl = "0.2" +dashmap = "6.1" +open = "5.3" [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,77 @@ +use std::sync::Arc; + +use dashmap::DashMap; + +use crate::model::{Material, MaterialComponent, Mesh, MeshComponent}; + +/// A typedef for a Asset handle. +pub type Handle = u64; + +/// A cache that holds all the assets loaded at that moment in time. +pub struct AssetCache { + materials: DashMap<MaterialComponent, Arc<Material>>, + meshes: DashMap<MeshComponent, Arc<Mesh>>, +} + +impl AssetCache { + pub fn new() -> Self { + Self { + materials: DashMap::new(),
Large diffs are not rendered by default. Showing the first 50 of 3117 lines. Show full diff