Working with the camera

Three.js has a number of camera controls you can use to control the camera throughout a scene. These controls are located in the Three.js distribution and can be found in the examples/js/controls directory. In this section, we'll look in more detail at the following controls:




These are controls that behave like those in first-person shooters. Move around with the keyboard and look around with the mouse.


These are flight simulator-like controls. Move and steer with the keyboard and the mouse.


This is a simpler version of FlyControls. Allows you to move around and roll around the z axis.


These are the most used controls, allowing ...

Get Learning Three.js – the JavaScript 3D Library for WebGL - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.