I prepared the meshes to recevice the shadows, but i can’t ses the shadows of objetcts and the circle of light. What is ‘shadow.camera’ exactly and what is it doing?
// the cube needs to cast a shadow
cube.castShadow = true;
MeshBasicMaterial doesn’t react to lights or shadows. It can cast shadows, but not receive them. Change to MeshStandardMaterial.
Next:
// this is set in radians
spotLight.angle = Math.PI / 4;
Finally, you need to increase the shadow far distance. You can see that the CameraHelper doesn’t stretch as far as the plane. Setting the shadow far distance with SpotLight is a bit tricky.
If you set this:
spotLight.distance = 10;
Then this is ignored.
//spotLight.shadow.camera.far = 15;
Use one or the other, not both.
To create shadows, three.js places a camera at the position of the light and draws a second, black and white copy of the scene from that angle. This is saved to a texture and then overlayed on the scene to darken it and add shadows. This example show the shadow texture (AKA map) in the top left: