Hello,
I’m doing my first steps with three.js and I’m playing around with the following code:
var scene = new THREE.Scene();
var camera = new THREE.PerspectiveCamera(45, window.innerWidth / window.innerHeight, 0.1, 1000);
var renderer = new THREE.WebGLRenderer();
renderer.setClearColor(0xEEEEEE);
renderer.setSize(window.innerWidth, window.innerHeight);
renderer.shadowMap.enabled=true;
renderer.shadowMap.type=THREE.PCFSoftShadowMap;
// Adding a plane (phong-material
// Adding a cube (phong-material)
// adding a sphere (phong material)
var spotLight = new THREE.SpotLight({color: 0x800000, intensity:0.0} );
spotLight.position.set( 40, 60, 10);
spotLight.castShadow=true;
spotLight.shadow.mapSize.width=1024;
spotLight.shadow.mapSize.height=1024;
scene.add( spotLight );
I get stuck with the intensity parameter. No matter what I try, it doesn’t have any effect on the scene.
I have tried with this parameter stand alone or together with the color parameter.
Maybe the intensity have some effect when used with other parameters. But I can’t read anything in the documentation…
Maybe someone can help ?
Thanks in advance!
Greetings,
Andy