O'Reilly logo

Learning Three.js – the JavaScript 3D Library for WebGL - Second Edition 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

Chapter 2. Basic Components That Make Up a Three.js Scene

In the previous chapter, you learned the basics of Three.js. We showed a couple of examples, and you created your first complete Three.js scene. In this chapter, we'll dive a bit deeper into Three.js and explain the basic components that make up a Three.js scene. In this chapter, you'll explore the following topics:

  • The components that are used in a Three.js scene
  • What you can do with the THREE.Scene object
  • How geometries and meshes are related
  • The difference between the orthographic and perspective cameras

We start with looking at how you can create a scene and add objects.

Creating a scene

In the previous chapter, you created THREE.Scene, so you already know the basics of Three.js. We saw that ...

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