kitgit

tirbofish/dropbear · diff

51c2405 · Thribhu K

perf: optimised editor/scene.rs fix: reapplied editor's rendering system to the runtime to get the texture fix

Unverified

diff --git a/crates/dropbear-engine/src/animation.rs b/crates/dropbear-engine/src/animation.rs
index ec651e8..c1b1841 100644
--- a/crates/dropbear-engine/src/animation.rs
+++ b/crates/dropbear-engine/src/animation.rs
@@ -4,6 +4,7 @@ use crate::model::{AnimationInterpolation, ChannelValues, Model, NodeTransform};
 use glam::Mat4;
 use std::collections::HashMap;
 use std::sync::Arc;
+use dropbear_utils::Dirty;
 
 #[repr(C)]
 #[derive(Copy, Clone, Default, Debug, bytemuck::Pod, bytemuck::Zeroable)]
@@ -35,7 +36,7 @@ pub struct AnimationComponent {
     #[serde(skip)]
     pub local_pose: HashMap<usize, NodeTransform>,
     #[serde(skip)]
-    pub skinning_matrices: Vec<Mat4>,
+    pub skinning_matrices: Dirty<Vec<Mat4>>,
 
     #[serde(skip)]
     pub skinning_buffer: Option<ResizableBuffer<Mat4>>,
@@ -53,7 +54,7 @@ pub struct AnimationComponent {
     pub last_animation_index: Option<usize>,
 
     #[serde(skip)]
-    pub morph_weights: HashMap<usize, Vec<f32>>,
+    pub morph_weights: Dirty<HashMap<usize, Vec<f32>>>,
 
     #[serde(skip)]
     pub morph_weight_count: u32,
@@ -69,14 +70,14 @@ impl Clone for AnimationComponent {
             is_playing: self.is_playing,
             animation_settings: self.animation_settings.clone(),
             local_pose: HashMap::new(),
-            skinning_matrices: Vec::new(),
+            skinning_matrices: Dirty::new(Vec::new()),
             skinning_buffer: None,
             morph_deltas_buffer: None,
             morph_weights_buffer: None,
             morph_info_buffer: None,
             available_animations: Vec::new(),
             last_animation_index: None,
-            morph_weights: HashMap::new(),
+            morph_weights: Dirty::new(HashMap::new()),
             morph_weight_count: 0,
         }
     }
@@ -115,10 +116,10 @@ impl Default for AnimationComponent {
             is_playing: true,
             animation_settings: HashMap::new(),

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