xxxxxxxxxx
var count=0
function setup() {
createCanvas(400, 400);
background('#FFFFFC');
rectMode(CENTER)
frameRate(1)
}
function draw() {
background('#FFFFFC');
if(count%2==0){
push()
noStroke()
fill('#000000')
rect(width/2+50,height/2,150,50)
pop()
push()
noFill()
strokeWeight(1)
stroke('#000000')
rect(width/2,height/2,200,50)
pop()
}
else{
push()
noStroke()
fill('#FF4000')
rect(width/2-50,height/2,150,50)
pop()
push()
noFill()
strokeWeight(1)
stroke('#FF4000')
rect(width/2,height/2,200,50)
pop()
}
count++
}