Reference pan()

pan()

Rotates the camera left and right.

Panning rotates the camera without changing its position. The rotation happens in the camera’s "local" space.

The parameter, angle, is the angle the camera should rotate. Passing a positive angle, as in myCamera.pan(0.001), rotates the camera to the right. Passing a negative angle, as in myCamera.pan(-0.001), rotates the camera to the left.

Note: Angles are interpreted based on the current angleMode().

Examples

Syntax

pan(angle)

Parameters

angle
Number:

amount to rotate in the current angleMode().

Notice any errors or typos? Please let us know. Please feel free to edit src/webgl/p5.Camera.js and open a pull request!

Related References