Reference setCamera()

setCamera()

Sets the current (active) camera of a 3D sketch.

setCamera() allows for switching between multiple cameras created with createCamera().

Note: setCamera() can only be used in WebGL mode.

Examples

Syntax

setCamera(cam)

Parameters

cam
p5.Camera:

camera that should be made active.

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