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

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

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

  • Which components 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 camera and the perspective camera

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

Creating a scene

In the previous chapter you've already created a THREE.Scene() ...

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