xxxxxxxxxx
20
let blockSize;
function setup() {
createCanvas(400, 400);
}
function draw() {
background(220);
//square(0,0,100)
//square(100,0,100)
//square(200,0,100)
//square(300,0,100)
blockSize = constrain(mouseX,4,width);
for (let x=0; x<width; x+=blockSize){
square(x,0,blockSize)
}
}