kitgit

tirbofish/dropbear · diff

308bda5 · tk

attempting to optimise model FPS. got 260 with FPS with no objects and 30 fps with 322 entities. damn thats pretty good :) works on #39 jarvis, run github actions

Unverified

diff --git a/Cargo.toml b/Cargo.toml
index 64b1587..13950d8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -60,6 +60,7 @@ boa_engine = "0.20"
 backtrace = "0.3"
 gltf = "1"
 os_info = "3.12"
+rustc_version_runtime = "0.3"
 
 [workspace.dependencies.image]
 version = "0.25"
diff --git a/dropbear-engine/Cargo.toml b/dropbear-engine/Cargo.toml
index 0f198f4..9324376 100644
--- a/dropbear-engine/Cargo.toml
+++ b/dropbear-engine/Cargo.toml
@@ -36,6 +36,7 @@ tokio.workspace = true
 async-trait.workspace = true
 backtrace.workspace = true
 os_info.workspace = true
+rustc_version_runtime.workspace = true
 
 [target.'cfg(not(target_os = "android"))'.dependencies]
 rfd.workspace = true
diff --git a/dropbear-engine/src/entity.rs b/dropbear-engine/src/entity.rs
index 6865cc9..28792e8 100644
--- a/dropbear-engine/src/entity.rs
+++ b/dropbear-engine/src/entity.rs
@@ -9,10 +9,17 @@ use crate::{
     model::{LazyModel, LazyType, Model},
 };
 
+/// A type that represents a position, rotation and scale of an entity
+///
+/// This type is the most primitive model, as it implements most traits.
+#[repr(C)]
 #[derive(Debug, Clone, Deserialize, Serialize, Copy, PartialEq)]
 pub struct Transform {
+    /// The position of the entity as [`DVec3`]
     pub position: DVec3,
+    /// The rotation of the entity as [`DQuat`]
     pub rotation: DQuat,
+    /// The scale of the entity as [`DVec3`]
     pub scale: DVec3,
 }
 
@@ -27,30 +34,42 @@ impl Default for Transform {
 }
 
 impl Transform {

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