Parcourir la source

Fix: display not updated when switching between debug/no debug

Popov72 il y a 5 ans
Parent
commit
3a0bd166ed
1 fichiers modifiés avec 10 ajouts et 1 suppressions
  1. 10 1
      src/Lights/Shadows/cascadedShadowGenerator.ts

+ 10 - 1
src/Lights/Shadows/cascadedShadowGenerator.ts

@@ -459,7 +459,16 @@ export class CascadedShadowGenerator implements IShadowGenerator {
         this._initCascades();
     }
 
-    public debug = false;
+    protected _debug = false;
+
+    public get debug(): boolean {
+        return this._debug;
+    }
+
+    public set debug(dbg: boolean) {
+        this._debug = dbg;
+        this._light._markMeshesAsLightDirty();
+    }
 
     private _lambda = 0.5;