Special lights

In this section on special lights, we'll discuss two additional lights provided by Three.js. First, we'll discuss THREE.HemisphereLight, which helps in creating more natural lighting for outdoor scenes, then we'll look at THREE.AreaLight, which emits lights from a large area instead of a single point, and finally, we'll show you how you can add a lens flare effect to your scene.

THREE.HemisphereLight

The first special light we're going to look at is THREE.HemisphereLight. With THREE.HemisphereLight, we can create more natural-looking outdoor lighting. Without this light, we could simulate the outdoors by creating THREE.DirectionalLight, which emulates the sun, and maybe add additional THREE.AmbientLight to provide some general color ...

Get Learning Three.js – the JavaScript 3D Library for WebGL - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.