kitgit

tirbofish/dropbear · commit

a591388d497bbc26838ef4c1f34796e5977aef24

material and model API (such as comparison and swapping) jarvis, run github actions

Unverified

tk <4tkbytes@pm.me> · 2025-11-10 12:26

view full diff

diff --git a/build.gradle.kts b/build.gradle.kts
index 5ed1930..693f382 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -108,7 +108,7 @@ kotlin {
     sourceSets {
         commonMain {
             dependencies {
-                implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.0")
+                api("org.jetbrains.kotlinx:kotlinx-datetime:0.6.0")
             }
         }
         nativeMain {
diff --git a/dropbear-engine/src/asset.rs b/dropbear-engine/src/asset.rs
index fddd772..5adadb7 100644
--- a/dropbear-engine/src/asset.rs
+++ b/dropbear-engine/src/asset.rs
@@ -1,4 +1,7 @@
-use std::sync::{Arc, atomic::{AtomicU64, Ordering}, LazyLock};
+use std::sync::{
+    Arc, LazyLock,
+    atomic::{AtomicU64, Ordering},
+};
 
 use dashmap::DashMap;
 
@@ -15,7 +18,9 @@ impl AssetHandle {
     ///
     /// This function does not guarantee if the raw value exists in the registry.
     /// You will have to check yourself.
-    pub fn new(raw: u64) -> Self { Self(raw) }
+    pub fn new(raw: impl Into<u64>) -> Self {
+        Self(raw.into())
+    }
     /// Returns the raw/primitive [`u64`] value.
     pub fn raw(&self) -> u64 {
         self.0
@@ -88,10 +93,12 @@ impl AssetRegistry {
         }
     }
 
+    /// Adds a pointer to the asset registry.
     pub fn add_pointer(&self, pointer_kind: PointerKind, pointer: usize) {
         self.pointers.insert(pointer_kind, pointer);
     }
 
+    /// Attempts to fetch a pointer from the [`AssetRegistry`] by its given [`PointerKind`]
     pub fn get_pointer(&self, pointer_kind: PointerKind) -> Option<usize> {
         self.pointers.get(&pointer_kind).map(|entry| *entry.value())
     }

Large diffs are not rendered by default. Showing the first 50 of 2516 lines. Show full diff