浏览代码

retain closer variable naming

Garrett Johnson 5 年之前
父节点
当前提交
4f968755d0
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      examples/jsm/csm/CSM.js

+ 3 - 3
examples/jsm/csm/CSM.js

@@ -20,7 +20,7 @@ import FrustumBoundingBox from './FrustumBoundingBox.js';
 import Shader from './Shader.js';
 import Shader from './Shader.js';
 
 
 const _cameraToLightMatrix = new Matrix4();
 const _cameraToLightMatrix = new Matrix4();
-const _frustum = new Frustum();
+const _lightSpaceFrustum = new Frustum();
 const _center = new Vector3();
 const _center = new Vector3();
 const _bbox = new FrustumBoundingBox();
 const _bbox = new FrustumBoundingBox();
 
 
@@ -166,11 +166,11 @@ export default class CSM {
 
 
 			const light = this.lights[ i ];
 			const light = this.lights[ i ];
 			_cameraToLightMatrix.multiplyMatrices( light.shadow.camera.matrixWorldInverse, cameraMatrix );
 			_cameraToLightMatrix.multiplyMatrices( light.shadow.camera.matrixWorldInverse, cameraMatrix );
-			this.frustums[ i ].toSpace( _cameraToLightMatrix, _frustum );
+			this.frustums[ i ].toSpace( _cameraToLightMatrix, _lightSpaceFrustum );
 
 
 			light.shadow.camera.updateMatrixWorld( true );
 			light.shadow.camera.updateMatrixWorld( true );
 
 
-			_bbox.fromFrustum( _frustum );
+			_bbox.fromFrustum( _lightSpaceFrustum );
 			_bbox.getSize();
 			_bbox.getSize();
 			_bbox.getCenter( this.lightMargin );
 			_bbox.getCenter( this.lightMargin );