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.

This page is generated from the comments in src/webgl/p5.Camera.js . Please feel free to edit it and submit a pull request!

Related References