Bladeren bron

retain closer variable naming

Garrett Johnson 5 jaren geleden
bovenliggende
commit
4f968755d0
1 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  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';
 
 const _cameraToLightMatrix = new Matrix4();
-const _frustum = new Frustum();
+const _lightSpaceFrustum = new Frustum();
 const _center = new Vector3();
 const _bbox = new FrustumBoundingBox();
 
@@ -166,11 +166,11 @@ export default class CSM {
 
 			const light = this.lights[ i ];
 			_cameraToLightMatrix.multiplyMatrices( light.shadow.camera.matrixWorldInverse, cameraMatrix );
-			this.frustums[ i ].toSpace( _cameraToLightMatrix, _frustum );
+			this.frustums[ i ].toSpace( _cameraToLightMatrix, _lightSpaceFrustum );
 
 			light.shadow.camera.updateMatrixWorld( true );
 
-			_bbox.fromFrustum( _frustum );
+			_bbox.fromFrustum( _lightSpaceFrustum );
 			_bbox.getSize();
 			_bbox.getCenter( this.lightMargin );