Browse Source

WebGLRenderer: Filling *Shadow with null instead of undefined.

Mr.doob 9 years ago
parent
commit
8d6e5aa97f
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/renderers/WebGLRenderer.js

+ 3 - 3
src/renderers/WebGLRenderer.js

@@ -2673,10 +2673,10 @@ THREE.WebGLRenderer = function ( parameters ) {
 					uniforms.shadowMatrix = light.shadow.matrix;
 					uniforms.shadowMatrix = light.shadow.matrix;
 
 
 					_lights.shadows[ shadowsLength ++ ] = light;
 					_lights.shadows[ shadowsLength ++ ] = light;
-					_lights.directionalShadow[ directionalLength ] = light.shadow.map;
 
 
 				}
 				}
 
 
+				_lights.directionalShadow[ directionalLength ] = light.shadow.map;
 				_lights.directional[ directionalLength ++ ] = uniforms;
 				_lights.directional[ directionalLength ++ ] = uniforms;
 
 
 			} else if ( light instanceof THREE.SpotLight ) {
 			} else if ( light instanceof THREE.SpotLight ) {
@@ -2708,10 +2708,10 @@ THREE.WebGLRenderer = function ( parameters ) {
 					uniforms.shadowMatrix = light.shadow.matrix;
 					uniforms.shadowMatrix = light.shadow.matrix;
 
 
 					_lights.shadows[ shadowsLength ++ ] = light;
 					_lights.shadows[ shadowsLength ++ ] = light;
-					_lights.spotShadow[ spotLength ] = light.shadow.map;
 
 
 				}
 				}
 
 
+				_lights.spotShadow[ spotLength ] = light.shadow.map;
 				_lights.spot[ spotLength ++ ] = uniforms;
 				_lights.spot[ spotLength ++ ] = uniforms;
 
 
 			} else if ( light instanceof THREE.PointLight ) {
 			} else if ( light instanceof THREE.PointLight ) {
@@ -2739,10 +2739,10 @@ THREE.WebGLRenderer = function ( parameters ) {
 					uniforms.shadowMatrix.identity().setPosition( _vector3 );
 					uniforms.shadowMatrix.identity().setPosition( _vector3 );
 
 
 					_lights.shadows[ shadowsLength ++ ] = light;
 					_lights.shadows[ shadowsLength ++ ] = light;
-					_lights.pointShadow[ pointLength ] = light.shadow.map;
 
 
 				}
 				}
 
 
+				_lights.pointShadow[ pointLength ] = light.shadow.map;
 				_lights.point[ pointLength ++ ] = uniforms;
 				_lights.point[ pointLength ++ ] = uniforms;
 
 
 			} else if ( light instanceof THREE.HemisphereLight ) {
 			} else if ( light instanceof THREE.HemisphereLight ) {