找到每一段 p5.js 代码的简单解释。
Looking for p5.sound? Go to the p5.sound reference!
Sets the position and orientation of the current camera in a 3D sketch.
Creates a new p5.Camera object and sets it as the current (active) camera.
Sets the frustum of the current camera in a 3D sketch.
Enables or disables perspective for lines in 3D sketches.
Sets an orthographic projection for the current camera in a 3D sketch.
Sets a perspective projection for the current camera in a 3D sketch.
Sets the current (active) camera of a 3D sketch.
Adds a grid and an axes icon to clarify orientation in 3D sketches.
Turns off debugMode() in a 3D sketch.
Allows the user to orbit around a 3D sketch using a mouse, trackpad, or touchscreen.
Creates a light that shines from all directions.
Creates a light that shines in one direction.
Creates an ambient light from an image.
Sets the falloff rate for pointLight() and spotLight().
Places an ambient and directional light in the scene
Removes all lights from the sketch.
Creates an immersive 3D background.
Creates a light that shines from a point in all directions.
Sets the specular color for lights.
Creates a light that shines from a point in one direction.
Sets the ambient color of shapes’ surface material.
Get the shader used when no lights or materials are applied.
Get the default shader used with lights, materials, and textures.
Get the shader used by normalMaterial().
Get the shader used when drawing the strokes of shapes.
Creates a p5.Shader object to be used with the filter() function.
Creates a new p5.Shader object.
Sets the emissive color of shapes’ surface material.
Loads vertex and fragment shaders to create a p5.Shader object.
Sets the amount of "metalness" of a specularMaterial().
Sets the current material as a normal material.
Restores the default shaders.
Sets the p5.Shader object to apply while drawing.
Sets the amount of gloss ("shininess") of a specularMaterial().
Sets the specular color of shapes’ surface material.
Sets the texture that will be used on shapes.
Changes the coordinate system used for textures when they’re applied to custom shapes.
Changes the way textures behave when a shape’s uv coordinates go beyond the texture.
Sets the position and orientation of the camera.
The x-coordinate of the place where the camera looks.
The y-coordinate of the place where the camera looks.
The camera’s x-coordinate.
The camera’s y-coordinate.
The camera’s z-coordinate.
Sets the camera's frustum.
Points the camera at a location.
Moves the camera along its "local" axes without changing its orientation.
Sets an orthographic projection for the camera.
Rotates the camera left and right.
Sets a perspective projection for the camera.
Rotates the camera in a clockwise/counter-clockwise direction.
Sets the camera’s position, orientation, and projection by copying another camera.
Sets the camera’s position in "world" space without changing its orientation.
Sets the camera’s position and orientation to values that are in-between those of two other cameras.
Rotates the camera up and down.
The x-component of the camera's "up" vector.
The y-component of the camera's "up" vector.
The z-component of the camera's "up" vector.
Copies the shader from one drawing context to another.
Logs the hooks available in this shader, and their current implementation.
Returns a new shader, based on the original, but with custom snippets of shader code replacing default behaviour.
Sets the shader’s uniform (global) variables.