Browse Source

Add getter for min/max distances

Popov72 5 years ago
parent
commit
82dee17da2
1 changed files with 11 additions and 0 deletions
  1. 11 0
      src/Lights/Shadows/cascadedShadowGenerator.ts

+ 11 - 0
src/Lights/Shadows/cascadedShadowGenerator.ts

@@ -492,6 +492,15 @@ export class CascadedShadowGenerator implements IShadowGenerator {
         this._breaksAreDirty = true;
         this._breaksAreDirty = true;
     }
     }
 
 
+    /** Gets the minimal and maximal distances used in the cascade break computation */
+    public get minDistance(): number {
+        return this._minDistance;
+    }
+
+    public get maxDistance(): number {
+        return this._maxDistance;
+    }
+
     /**
     /**
      * Gets the class name of that object
      * Gets the class name of that object
      * @returns "ShadowGenerator"
      * @returns "ShadowGenerator"
@@ -766,6 +775,8 @@ export class CascadedShadowGenerator implements IShadowGenerator {
             return;
             return;
         }
         }
 
 
+        this._autoCalcDepthBounds = value;
+
         if (!value) {
         if (!value) {
             if (this._depthReducer) {
             if (this._depthReducer) {
                 this._depthReducer.deactivate();
                 this._depthReducer.deactivate();