Skip to content
Related Articles
Open in App
Not now

Related Articles

p5.js Lights, Camera Complete Reference

Improve Article
Save Article
Like Article
  • Last Updated : 30 Dec, 2021
Improve Article
Save Article
Like Article

Camera() Method: The camera() function sets the camera position for a 3D sketch. Its parameters define the position for the camera, the middle of the sketch (where the camera is pointing), and an up direction (the orientation of the camera).

This function simulates the movements of the camera, allowing objects to be viewed from various angles.

Syntax:

new camera([x], [y], [z], [centerX], [centerY], [centerZ], [upX], [upY], [upZ])

Lights() Function: The lights() function sets the default ambient and directional light. The default values are ambientLight(128, 128, 128) and directionalLight(128, 128, 128, 0, 0, -1)

Syntax:

lights()

Interaction

Lights

Material

Camera

My Personal Notes arrow_drop_up
Like Article
Save Article
Related Articles

Start Your Coding Journey Now!