浏览代码

Add getter for min/max distances

Popov72 5 年之前
父节点
当前提交
82dee17da2
共有 1 个文件被更改,包括 11 次插入0 次删除
  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;
     }
 
+    /** 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
      * @returns "ShadowGenerator"
@@ -766,6 +775,8 @@ export class CascadedShadowGenerator implements IShadowGenerator {
             return;
         }
 
+        this._autoCalcDepthBounds = value;
+
         if (!value) {
             if (this._depthReducer) {
                 this._depthReducer.deactivate();