Pārlūkot izejas kodu

WebGLLights: Clean up.

Mr.doob 9 gadi atpakaļ
vecāks
revīzija
c8ec3f9161
1 mainītis faili ar 11 papildinājumiem un 9 dzēšanām
  1. 11 9
      src/renderers/webgl/WebGLLights.js

+ 11 - 9
src/renderers/webgl/WebGLLights.js

@@ -18,6 +18,14 @@ THREE.WebGLLights = function () {
 
 
 		switch ( light.type ) {
 		switch ( light.type ) {
 
 
+			case 'HemisphereLight':
+				uniforms = {
+					direction: new THREE.Vector3(),
+					skyColor: new THREE.Color(),
+					groundColor: new THREE.Color()
+				};
+				break;
+
 			case 'DirectionalLight':
 			case 'DirectionalLight':
 				uniforms = {
 				uniforms = {
 					direction: new THREE.Vector3(),
 					direction: new THREE.Vector3(),
@@ -42,16 +50,10 @@ THREE.WebGLLights = function () {
 					direction: new THREE.Vector3(),
 					direction: new THREE.Vector3(),
 					color: new THREE.Color(),
 					color: new THREE.Color(),
 					distance: 0,
 					distance: 0,
+					angleCos: 0,
+					exponent: 0,
 					decay: 0,
 					decay: 0,
-					angleCos: 0
-				};
-				break;
-
-			case 'HemisphereLight':
-				uniforms = {
-					direction: new THREE.Vector3(),
-					skyColor: new THREE.Color(),
-					groundColor: new THREE.Color()
+					shadow: -1
 				};
 				};
 				break;
 				break;