瀏覽代碼

Merge pull request #11164 from Mugen87/dev

SpotLightShadow: Fixed #11158
Mr.doob 8 年之前
父節點
當前提交
f891c79f70
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/lights/SpotLightShadow.js

+ 3 - 3
src/lights/SpotLightShadow.js

@@ -20,11 +20,11 @@ SpotLightShadow.prototype = Object.assign( Object.create( LightShadow.prototype
 
 	update: function ( light ) {
 
+		var camera = this.camera;
+
 		var fov = _Math.RAD2DEG * 2 * light.angle;
 		var aspect = this.mapSize.width / this.mapSize.height;
-		var far = light.distance || 500;
-
-		var camera = this.camera;
+		var far = light.distance || camera.far;
 
 		if ( fov !== camera.fov || aspect !== camera.aspect || far !== camera.far ) {