3

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 2, The 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 we use basic or wireframe materials). Since Three.js contains several different light sources, each of which has a specific use, we’ll use this chapter to explain the various details of lights and prepare you for the upcoming ...

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