August 2018
Intermediate to advanced
528 pages
10h 58m
English
So far, you've seen how to create a camera and what the various arguments mean. In Chapter 1, Creating Your First 3D Scene with Three.js, you also saw that you need to position your camera somewhere in the scene, and that the view from that camera is rendered. Normally, the camera is pointed to the center of the scene: position (0,0,0). We can, however, easily change what the camera is looking at, as follows:
camera.lookAt(new THREE.Vector3(x,y,z));
I've added an example where the camera moves, and the point it is looking at is marked with a red dot, as follows:

If you open the 08-cameras-lookat ...
Read now
Unlock full access