xxxxxxxxxx
30
let size = 100;
function setup() {
createCanvas(600,600);
background(240);
let grid = width/size;
let all = [];
strokeWeight(2);
for (let i = 0; i < 3; i++) {
let a = createVector(0, 0);
let b = createVector(size, 0);
let c = createVector(size, size);
let d = createVector(0, size);
let co = [color("#1A1B41"), color("#F1FFE7"),color("#C2E7DA")];
let test = new Tile(a, b, c, d, 0.75, co);
all.push(test);
}
for (let i = 0;i< grid;i++) {
for (let j = 0;j < grid;j++) {
push()
translate(i*size,j*size);
all[floor(random(all.length))].show();
pop()
}
}
}
function draw() {}