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

GLTFLoader: Reset spotlight default position.

Don McCurdy 6 жил өмнө
parent
commit
4a44e2581f

+ 4 - 0
examples/js/loaders/GLTFLoader.js

@@ -365,6 +365,10 @@ THREE.GLTFLoader = ( function () {
 
 		}
 
+		// Some lights (e.g. spot) default to a position other than the origin. Reset the position
+		// here, because node-level parsing will only override position if explicitly specified.
+		lightNode.position.set( 0, 0, 0 );
+
 		lightNode.decay = 2;
 
 		if ( lightDef.intensity !== undefined ) lightNode.intensity = lightDef.intensity;