Using a perspective camera

Three.js provides two cameras: a camera that renders the scene with a perspective projection (as we see images in the real world) and a camera that renders the scene with an orthogonal projection (fake 3D often used in games; for more information on this type of camera, check out the upcoming Using an orthographic camera recipe). In this recipe, we'll look at the first of these two cameras and explain how you can use the perspective camera in your own scene.

Getting ready

Working with the properties of a camera can be a bit confusing at times. To help you better understand the steps or this recipe, we've created a simple page that shows you the effect each of the camera properties has. Open up 03.03-use-an-perspective-camera.html ...

Get Three.js Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.