kitgit

tirbofish/dropbear · commit

cf77be1dd3793de44fcaa6a7c0a47c09f3d9fb87

feature: implemented an import scale (fixes #59) fix: locked axis ci: removed mold support from windows and macos jarvis, run github actions

Unverified

Thribhu K <4tkbytes@pm.me> · 2026-01-11 15:12

view full diff

diff --git a/.cargo/config.toml b/.cargo/config.toml
index 00d1e99..5c0c649 100644
--- a/.cargo/config.toml
+++ b/.cargo/config.toml
@@ -1,6 +1,3 @@
 [target.x86_64-unknown-linux-gnu]
 linker = "clang"
-rustflags = ["-C", "link-arg=-fuse-ld=mold"]
-
-[target.x86_64-pc-windows-msvc]
 rustflags = ["-C", "link-arg=-fuse-ld=mold"]
\ No newline at end of file
diff --git a/dropbear-engine/src/entity.rs b/dropbear-engine/src/entity.rs
index 9525702..31d12fe 100644
--- a/dropbear-engine/src/entity.rs
+++ b/dropbear-engine/src/entity.rs
@@ -172,6 +172,7 @@ pub struct MeshRenderer {
     pub material_overrides: Vec<MaterialOverride>,
     original_material_snapshots: HashMap<String, MaterialSnapshot>,
     texture_identifier_cache: HashMap<String, String>,
+    import_scale: f32,
 }
 
 #[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
@@ -196,12 +197,12 @@ impl MeshRenderer {
         label: Option<&str>,
     ) -> anyhow::Result<Self> {
         let path = path.as_ref().to_path_buf();
-        let handle = Model::load(graphics, &path, label).await?;
+        let handle = Model::load(graphics, &path, label, None).await?;
         Ok(Self::from_handle(handle))
     }
 
-    /// Creates a new [`MeshRenderer`] instance from a [`LoadedModel`] handle
-    pub fn from_handle(handle: LoadedModel) -> Self {
+    /// Creates a new [`MeshRenderer`] instance from a [`LoadedModel`] handle with an explicit per-renderer import scale.
+    pub fn from_handle_with_import_scale(handle: LoadedModel, import_scale: f32) -> Self {
         Self {
             handle,
             instance: Instance::new(DVec3::ZERO, DQuat::IDENTITY, DVec3::ONE),
@@ -210,9 +211,15 @@ impl MeshRenderer {
             material_overrides: Vec::new(),
             original_material_snapshots: HashMap::new(),
             texture_identifier_cache: HashMap::new(),
+            import_scale,
         }
     }
 
+    /// Creates a new [`MeshRenderer`] instance from a [`LoadedModel`] handle
+    pub fn from_handle(handle: LoadedModel) -> Self {

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