Canvas in Browser

2d bird

In the 2D canvas, the createCanvas() function contains the two parameters of "windowWidth" and "windowHeight"

createCanvas(windowWidth, windowHeight);

2d canvas code

In the 3D canvas, the createCanvas() function contains three parameters "windowWidth", "windowHeight" and the third parameter of "WEBGL", which turns a 2D canvas into a 3D canvas.

createCanvas(windowWidth, windowHeight, WEBGL);

3d canvas code

Continue Reading

Coordinates

Learn More

Colours

Learn More

2D Shapes

Learn More