Search⌘ K
AI Features

Creating a Scene with Basic Functionality

Explore how to create a basic Three.js scene by understanding essential components like the camera, lights, meshes, and renderer. Learn to set up a scene graph including grouping objects, and implement a render loop with interactive controls for viewing 3D scenes dynamically.

Creating a scene

We have learned how to create THREE.Scene, so we already know some of the basics of Three.js. We saw that for a scene to show anything, we need four different types of objects:

  • Camera: This determines which part of THREE.Scene is rendered onscreen.

  • Lights: These have an effect on how materials are shown and are used when creating shadow effects.

  • Meshes: These are the main objects that are rendered from the perspective of the camera. These objects contain the vertices and faces that make up the geometry (for example, a sphere or a cube) and contain a material, which defines what the geometry looks like. 

  • ...