Working with Basic Lights: DirectionalLight
Explore how to use the THREE.DirectionalLight in Three.js to simulate distant light sources such as the sun. Understand its properties including intensity and shadow casting, and learn to define shadow areas using an orthographic camera approach. This lesson helps you enhance 3D scene realism by applying consistent parallel lighting and shadow control.
The THREE.DirectionalLight
This type of light source can be considered as a light that is very far away. All the light rays it sends out are parallel to each other. A good example of this is the Sun. The Sun is so far away that the light rays we receive on Earth are (almost) parallel to each other. The main difference between THREE.DirectionalLight and THREE.SpotLight is that this light won’t diminish the farther it gets from the source as it does with THREE.SpotLight (we can fine-tune this with the ...