A spotlight in Three.js revision 70

Simple example of creating a spotlight in Three.js rev. 70.
var light = new THREE.SpotLight( 0x4aa592, 2, 4500 );

		        light.position.set( 0, 20, 1 );

		        light.castShadow = true;
		        light.shadowMapWidth = 1024;
		        light.shadowMapHeight = 1024;
		        light.shadowMapDarkness = 0.98;
			
		        scene.add(light);

Responses

0 Replies