|
@@ -20,9 +20,7 @@ SpotLightShadow.prototype = Object.assign( Object.create( LightShadow.prototype
|
|
|
|
|
|
updateMatrices: function ( light, viewCamera, viewportIndex ) {
|
|
|
|
|
|
- var camera = this.camera,
|
|
|
- lookTarget = this._lookTarget,
|
|
|
- lightPositionWorld = this._lightPositionWorld;
|
|
|
+ var camera = this.camera;
|
|
|
|
|
|
var fov = _Math.RAD2DEG * 2 * light.angle;
|
|
|
var aspect = this.mapSize.width / this.mapSize.height;
|
|
@@ -37,13 +35,6 @@ SpotLightShadow.prototype = Object.assign( Object.create( LightShadow.prototype
|
|
|
|
|
|
}
|
|
|
|
|
|
- lightPositionWorld.setFromMatrixPosition( light.matrixWorld );
|
|
|
- camera.position.copy( lightPositionWorld );
|
|
|
-
|
|
|
- lookTarget.setFromMatrixPosition( light.target.matrixWorld );
|
|
|
- camera.lookAt( lookTarget );
|
|
|
- camera.updateMatrixWorld();
|
|
|
-
|
|
|
LightShadow.prototype.updateMatrices.call( this, light, viewCamera, viewportIndex );
|
|
|
|
|
|
}
|