What lighting types are provided in Three.js?
Several different lights are available in Three.js that all have specific behavior and usages. In this chapter, we’ll discuss the following set of lights:
THREE.AmbientLight
: This is a basic light, the color of which is added to the current color of the objects in the scene.THREE.PointLight
: This is a single point in space from which light spreads in all directions. This light can be used to create shadows.THREE.SpotLight
: This light source has a cone-like effect like that of a desk lamp, a spotlight in the ceiling, or a torch. This light can cast shadows.THREE.DirectionalLight
: This is also called infinite light. The light rays from this light can be seen as parallel, similar to the light from the Sun. This light can also be used to create shadows.THREE.HemisphereLight
: This is a special light and can be used to create more natural-looking outdoor lighting by simulating a reflective surface and a faintly...