Three.js - Controls



You can move the camera around the scene using camera controls. Three.js has many camera controls you can use to control the camera throughout a scene. You have to get the controls separately from GitHub. The Three.js library does not include these.

Sr.No Controls & Description
1

Orbit Controls

Orbit controls allow the camera to orbit around the center of the scene.

2

Trackball Controls

TrackballControls is similar to Orbit controls. However, it does not maintain a constant camera up vector.

3

Fly Controls

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

4

PointerLock Controls

The PointerLockControls implements the inbuilt browsers Pointer Lock API.

In this chapter, we have seen the most useful controls. Some developers are creating more useful controls for Three.js. You can see some other controls here, well documented and easy to use.

Advertisements