소스 검색

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();