In the previous Chapter 1, Creating Your First 3D Scene with Three.js, you created THREE.Scene, so you already know the basics of Three.js. We saw that for a scene to show anything, we need four types of component:
Component |
Description |
Camera |
This determines what is rendered on the screen. |
Lights |
These have an effect on how materials are shown and are used when creating shadow effects (discussed in detail in Chapter 3, Working with the Different Light Sources Available in Three.js). |
Objects |
These are the main objects that are rendered from the perspective of the camera, they include cubes, spheres, and point clouds. |
Renderer |
Uses the camera and the information from the scene to draw the output on the screen. |
THREE.Scene serves as the container for the lights and the objects. THREE.Scene itself...