Fix debug draw overlay visibility - simple canvas display toggle

- Fixed debug draw overlay not disappearing when checkbox unchecked
- Added canvas.style.display control in onToggleDebugMode
- Kept existing canvas-based PlanckDebugDraw system
- Both canvas overlay and PIXI debug layer are now properly toggled
- Debug physics bodies now properly show/hide with checkbox
This commit is contained in:
Karl Pannek 2025-07-18 23:05:55 +02:00
parent 38eb5ad182
commit e784b27848
2 changed files with 10 additions and 13 deletions

View file

@ -29,6 +29,11 @@ function (Parent, Settings, domController, Box2D, nc, PlanckDebugDraw, debugLaye
this.setupDebugDraw();
}
// Show/hide the debug canvas overlay
if (this.debugCanvas) {
this.debugCanvas.style.display = this.debugMode ? 'block' : 'none';
}
debugLayer.container.visible = this.debugMode;
};