p5.js Lights, Camera Complete Reference
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
- p5.js ambientLight()Function
- p5.js specularColor()Function
- p5.js directionalLight()Function
- p5.js pointLight()Function
- p5.js lights()Function
- p5.js lightFalloff()Function
- p5.js noLights()Function
Material
- p5.js normalMaterial()Function
- p5.js texture()Function
- p5.js ambientMaterial()Function
- p5.js emissiveMaterial()Function
- p5.js specularMaterial()Function
- p5.js shininess()Function
Please Login to comment...