xxxxxxxxxx
18
let rectLen = 1;
function setup() {
createCanvas(400, 400);
rectMode(CENTER);
noFill();
}
function draw() {
background(255);
rect(width/2, height/2, rectLen, rectLen);
rectLen = rectLen * 1.05;
if(rectLen > width) {
rectLen = 1;
}
line(0, 0, width, height);
line(width, 0, 0, height);
}