O'Reilly logo

Learning Three.js: The JavaScript 3D Library for WebGL by Jos Dirksen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Learning about the basic lights

We'll start with the most basic of the lights: the AmbientLight.

AmbientLight – a globally applied light source

When you create an AmbientLight source, the color is applied globally. There isn't a specific direction that this light comes from and the AmbientLight source doesn't contribute to any shadows. You don't use an AmbientLight as the single source of light in a scene. You will use it together with the other light sources, such as a SpotLight or a DirectionalLight, to soften the shadows or add some color to the scene. The easiest way to understand this is by looking at the 01-ambient-light.html example in the chapter-03 folder. In this example you will get a simple user interface that can be used to modify the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required