August 2018
Intermediate to advanced
528 pages
10h 58m
English
The last subject we'll explore in this chapter is lens flares. You are probably already familiar with lens flares. For instance, they appear when you take a photograph directly into the sun or another bright light source. In most cases, you want to avoid this, but for games and 3D-generated images, it provides a nice effect that makes scenes look a bit more realistic.
Three.js also has support for lens flares and makes it very easy to add them to your scene. In this last section, we're going to add a lens flare to a scene and create the output as you can see in the following screenshot; you can see this for yourself by opening 07-lensflares.html:
We can create a lens flare by instantiating the THREE.LensFlare ...
Read now
Unlock full access