tirbofish/dropbear · diff
fix: magna-carta parser
fix: reset animation state on animation change so its legs don't look like its snapped
fix: collider wireframe finally renders now (fixes #90)
fix: kcc contains a CharacterMovementResult now
refactor: included a world + entity in all InspectableComponents
jarvis, run github actions
Signature present but could not be verified.
Unverified
@@ -33,6 +33,9 @@ pub struct AnimationComponent { #[serde(skip)] pub available_animations: Vec<String>, + + #[serde(skip)] + pub last_animation_index: Option<usize>, } #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] @@ -72,6 +75,7 @@ impl Default for AnimationComponent { bone_buffer: None, bind_group: None, available_animations: vec![], + last_animation_index: None, } } } @@ -89,6 +93,11 @@ impl AnimationComponent { .map(|v| v.name.clone()) .collect::<Vec<_>>(); + if self.active_animation_index != self.last_animation_index { + self.local_pose.clear(); + self.last_animation_index = self.active_animation_index; + } + let Some(anim_idx) = self.active_animation_index else { self.reset_to_bind_pose(model); return; @@ -66,7 +66,13 @@ impl Component for AnimationComponent { } impl InspectableComponent for AnimationComponent { - fn inspect(&mut self, ui: &mut Ui, _graphics: Arc<SharedGraphicsContext>) { + fn inspect( + &mut self, + _world: &World, + _entity: Entity, + ui: &mut Ui, + _graphics: Arc<SharedGraphicsContext>, + ) {
Large diffs are not rendered by default. Showing the first 50 of 3151 lines. Show full diff