xxxxxxxxxx
let virtualShape;
function setup() {
createCanvas(800, 800);
virtualShape = { x: 10, y: 10, width: 50, height: 50 };
noLoop();
}
function draw() {
strokeWeight(1);
stroke(0);
for (let i = 0; i < 8; i++) {
for (let j = 0; j < 8; j++) {
for (let k = 0; k < 5; k++) {
rect(virtualShape.x + (virtualShape.height + 10) * i + 5 * k, virtualShape.y + (virtualShape.width + 10) * j + 5 * k, virtualShape.width - 10 * k, virtualShape.height - 10 * k);
}
}
}
}