Creating a scene
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 |
Renderer | Uses the |
THREE.Scene
serves as the container for the lights and the objects. THREE.Scene
itself doesn't have that many options and functions.
Note
THREE.Scene
is a structure that is sometimes also called a scene graph. A scene graph is a structure that can hold all the necessary information...