tirbofish/dropbear · diff
knocked off a lot of issues and features and bugs:
worked on issues:
- #55: Fix directional lighting
- #57: Splitting AdoptedEntity into a Mesh type and a Material type to use as components
- #58: Asset Server
- #60 - Cannot rebuild project/enter play mode after gradle build error
- #63: Error console dock
also added an about screen
i reckon its ready to merge back to main...
Signature present but could not be verified.
Unverified
@@ -61,6 +61,7 @@ indexmap = "2.11" sha2 = "0.10" wesl = "0.2" dashmap = "6.1" +open = "5.3" [workspace.dependencies.image] version = "0.25" @@ -4,10 +4,10 @@ use dashmap::DashMap; use crate::model::{Material, MaterialComponent, Mesh, MeshComponent}; -/// A typedef for a Asset handle. -pub type Handle = u64; +/// A typedef for a Asset handle. +pub type Handle = u64; -/// A cache that holds all the assets loaded at that moment in time. +/// 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>>, @@ -21,10 +21,14 @@ impl AssetCache { } } - /// Fetches the material based off the handle. - /// - /// If it doesn't exist, it will run the loader as a function. - pub fn get_or_load_material<F>(&self, handle: MaterialComponent, loader: F) -> anyhow::Result<Arc<Material>> + /// Fetches the material based off the handle. + /// + /// If it doesn't exist, it will run the loader as a function. + pub fn get_or_load_material<F>( + &self, + handle: MaterialComponent, + loader: F, + ) -> anyhow::Result<Arc<Material>> where F: FnOnce() -> anyhow::Result<Material>, { @@ -43,8 +47,8 @@ impl AssetCache {
Large diffs are not rendered by default. Showing the first 50 of 1243 lines. Show full diff