Skip to content

Commit f45894b

Browse files
committed
minor adjustment
1 parent 9fa3edc commit f45894b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/js/loaders/GLTFLoader.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,11 @@ THREE.GLTFLoader = ( function () {
263263
case 'spot':
264264
lightNode = new THREE.SpotLight( color );
265265
// Handle spotlight properties.
266-
var spot = light.spot || {};
267-
var innerConeAngle = spot.innerConeAngle !== undefined ? spot.innerConeAngle : 0;
268-
var outerConeAngle = spot.outerConeAngle !== undefined ? spot.outerConeAngle : Math.PI / 4.0;
269-
lightNode.angle = outerConeAngle;
270-
lightNode.penumbra = 1.0 - innerConeAngle / outerConeAngle;
266+
light.spot = light.spot || {};
267+
light.spot.innerConeAngle = light.spot.innerConeAngle !== undefined ? light.spot.innerConeAngle : 0;
268+
light.spot.outerConeAngle = light.spot.outerConeAngle !== undefined ? light.spot.outerConeAngle : Math.PI / 4.0;
269+
lightNode.angle = light.spot.outerConeAngle;
270+
lightNode.penumbra = 1.0 - light.spot.innerConeAngle / light.spot.outerConeAngle;
271271
lightNode.target.position.set( 0, 0, 1 );
272272
lightNode.add( lightNode.target );
273273
break;

0 commit comments

Comments
 (0)