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

Using the available cameras for different uses

There are two different camera types in the Three.js library: the orthographic camera and the perspective camera. In Chapter 3, Working with the Different Light Sources Available in Three.js, we'll have a more detailed look at how to work with these cameras, so for this chapter I'll stick to the basics. The best way to explain the difference between these cameras is by looking at a couple of examples.

The orthographic camera versus the perspective camera

In the examples for this chapter you can find an example called 07-both-cameras.html. When you open this example, you'll see something like the following screenshot:

This is called a perspective view and is the most natural view. As you can see from ...

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