xxxxxxxxxx
function setup() {
createCanvas(300, 200);
noLoop(); // Sadece bir kere çalıştırılacak
background(220); // Canvas arkaplanını temizle
let colors = [
color(252, 133, 53),
color(203, 29, 37),
color(16, 45, 101),
color(253, 234, 121),
color(0, 158, 219)
];
for (let i = 0; i < 25; i++) {
let x = i % 5 * 60; // Karelerin yatay konumu
let y = floor(i / 5) * 40; // Karelerin dikey konumu
let c = random(colors); // Rastgele renk seçimi
fill(c);
rect(x, y, 60, 40); // Kare çizimi
}
}