- Documentation
Quick Jump: , , , , , , , , , , , ,
ProcessingJS
Shapes
See also: , , , , , , , , ,
Complex Shapes
See also: ,
Colors
- Set the background color
- Set the fill color for shapes
- Turn off fill for shapes
- Set the outline color for shapes
- Change the thickness of lines and outlines
- Turn off outlines for shapes
- Store a color in a variable
- Blend two colors together
- Find color between 2 colors
See also: , , , , , , ,
Text
- Draw some text
- Changes the font of text
- Change the size of text
See also: , , , ,
Transforms
- Rotate shapes by an angle
- Scale shapes in both dimensions
- Translate shapes by an offset
See also: , ,
Environment
- / The size of the canvas
- Called repeatedly during program execution.
- Plays one of the allowed sounds.
See also: , , , /
Mouse
- Current coordinates of the mouse
- Past coordinates of the mouse
- Which button is pressed
- Whether mouse is being pressed
- Called when mouse is clicked
- Called when mouse is pressed
- Called when mouse is released
- Called when mouse is moved
- Called when mouse is dragged
- Called when mouse moves over canvas
- Called when mouse moves out of canvas
Keyboard
- Number representing which key is pressed
- Represents when a special key is pressed
- True if a key is being pressed, false otherwise
- Called when a key is pressed
- Called when a key is released
- Called when a key is typed
Math
- Generate a random number
- Calculates the distance between two points
- Constrain value between min and max
- Return the minimum of two numbers
- Return the maximum of two numbers
- Take the absolute value of a number
- Take the logarithm of a number
- Raise a number to an exponent
- Square a number
- Take the square root of a number
- Return nearest integer
- Return nearest integer of greater/equal value
- Return nearest integer of lesser/equal value
- An object that describes a 2-dimensional vector
See also: , , , , , , ,
Trigonometry
- Take the cosine of an angle
- Take the sine of an angle
- Take the tangent of an angle
See also: , , , , , ,
Date & Time
- / / Current date
- / / Current time
- Milliseconds elapsed since program start
Debugging
- Print to your browser's developer console
- Print to the canvas console
- Print to the canvas console
JavaScript
- Define a new function
- Only run code if a certain condition is true
- Only run code while a certain condition is true
- Repeat code a fixed number of times
- Make an array of 5 numbers
Our documentation does not cover the many ways to use JavaScript. Learn more at:
This reference is based on and is licensed under the