2
0
Эх сурвалжийг харах

WebGLRenderer: Fixed setupLights()

Mr.doob 9 жил өмнө
parent
commit
fef02a5ce1

+ 5 - 7
src/renderers/WebGLRenderer.js

@@ -2564,16 +2564,14 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 		viewMatrix = camera.matrixWorldInverse,
 
-		directionalCurrent = _lights.directional.length;
-		directionalLength = 0,
+		directionalCurrent = _lights.directional.length,
+		pointCurrent = _lights.point.length,
+		spotCurrent = _lights.spot.length,
+		hemiCurrent = _lights.hemi.length,
 
-		pointCurrent = _lights.point.length;
+		directionalLength = 0,
 		pointLength = 0,
-
-		spotCurrent = _lights.spot.length;
 		spotLength = 0,
-
-		hemiCurrent = _lights.hemi.length;
 		hemiLength = 0;
 
 		for ( l = 0, ll = lights.length; l < ll; l ++ ) {