Working with Light Sources in Three.js

In Chapter 1, Creating Your First 3D Scene with Three.js, you learned about the basics of Three.js, and in Chapter 2The Basic Components that Make Up a Three.js Application, we looked a bit deeper at the most important parts of the scene: the geometries, meshes, and cameras. You might have noticed that we skipped exploring the details of lights in that chapter even though they make up an important part of every Three.js scene. Without lights, we won't see anything rendered (unless you use basic or wireframe materials). Since Three.js contains a large number of lights, each of which has a specific use, we'll use this chapter to explain the various details of the lights and prepare you for the upcoming ...

Get Learn Three.js - Third 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.