Creates a new p5.Camera object and sets it as the current (active) camera.
The new camera is initialized with a default position (0, 0, 800) and a default perspective projection. Its properties can be controlled with p5.Camera methods such as myCamera.lookAt(0, 0, 0).
Note: Every 3D sketch starts with a default camera initialized. This camera can be controlled with the functions camera(), perspective(), ortho(), and frustum() if it's the only camera in the scene.
Note: createCamera() can only be used in WebGL mode.
Examples
Returns
p5.Camera: the new camera.
This page is generated from the comments in src/webgl/p5.Camera.js . Please feel free to edit it and submit a pull request!