Graphics Reference
In-Depth Information
In this recipe, we'll show you how to configure THREE.OrthographicCamera so
that you can create this fake 3D effect for your own scenes.
Getting ready
For this recipe, the only object from Three.js we use is
THREE.OrthographicCamera . This camera is available in the standard Three.js
distribution, so there is no need to include any external JavaScript files. We've
provided an example that shows the Three.Orthographic Camera in action. You can
use this camera to better understand the properties you can use to configure the
camera. If you open 03.04-use-an-orthographic-camera.html , you can see
a number of cubes that are rendered with THREE.OrthographicCamera . With the
menu in the top-right section, you can tune the configuration of the camera.
Now, let's look at the steps you need to take to set up this camera.
How to do it...
To set up an orthographic camera in Three.js, we need to perform a couple of very
simple steps:
1. The first thing we need to do is create the camera instance:
camera = new THREE.OrthographicCamera();
Search WWH ::




Custom Search