kitgit

tirbofish/dropbear · commit

2f1a9ea9fd2a3e97a2b075e41ee780da5f2925b4

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...

Unverified

tk <4tkbytes@pm.me> · 2025-11-01 15:36

view full diff

diff --git a/Cargo.toml b/Cargo.toml
index 03a7d19..ea72445 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -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"
diff --git a/dropbear-engine/src/asset.rs b/dropbear-engine/src/asset.rs
index 58dad98..1c5d958 100644
--- a/dropbear-engine/src/asset.rs
+++ b/dropbear-engine/src/asset.rs
@@ -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