xxxxxxxxxx
24
function setup() {
createCanvas(windowWidth, windowHeight);
}
function draw() {
background(220);
//x starts at 0 and then adds by 1 until it reaches the value of the width
//x turns into adding by 60
for(let x = 0; x < width/2 ; x += 50) {
//rect(x, height/10, x, x);
for(let y = 10; y < height; y += 50){
fill(255,0,0)
rect(x, 50, 50, 50);
fill(0, 0, 255)
ellipse(x, 50, 25, 25)
}
}
fill(0,255,0)
rect(mouseX, mouseY, 60, 60)
}