xxxxxxxxxx
22
//Draw a rectangle to the screen about every half a second. In between, just draw the background. What information do you need to accomplish this?
let framecount = 0
function setup() {
createCanvas(400, 400);
}
function draw() {
background(250);
rectMode(CENTER)
framecount++;
fill (0);
if (framecount < 30) {
rect (width/2, height /2 , 100,50 )
}
if (framecount == 60) {
framecount = 0;
}
}