Mode:
Duration:
1
2
3
4
5
6
7
8
9
10
11
function setup() {
createCanvas(400, 200);
}
function draw() {
background(255);
if(mouseIsPressed) {
rect(150, 50, 100, 100);
} else {
rect(150, 50, 50, 50);
}
}Coding works best on desktop or with an external keyboard.