xxxxxxxxxx
24
let cSize = 40; let rSize = 50;
let img;
function preload(){
img = loadImage('./CODEART.png');
}
function setup() {
createCanvas(800, 200);
}
function draw() {
background(220);
for(let x = 0; x < width; x+=cSize){
for(let y = 0; y < height; y+=rSize){
rect(x, y, cSize, rSize);
}
}
img.resize(800,200);
image(img,0,0);
}