From 4a44e2581fb2b05f1ba17f0c510a96581f26a99b Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Fri, 11 Jan 2019 17:35:18 -0800 Subject: [PATCH] GLTFLoader: Reset spotlight default position. --- examples/js/loaders/GLTFLoader.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/js/loaders/GLTFLoader.js b/examples/js/loaders/GLTFLoader.js index d011eb7cd52524..0c330270e96af7 100644 --- a/examples/js/loaders/GLTFLoader.js +++ b/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;