xxxxxxxxxx
function setup() {
createCanvas(windowWidth, windowHeight)
background("white")
noLoop()
angleMode(DEGREES)
}
function draw() {
drawTileGrid();
//drawOneTile();
}
function drawTileGrid() {
for (let x = 0; x < windowWidth+100; x += 100) {
for (let y = 0; y < windowHeight+100; y += 100) {
noStroke();
// if (random() > 0.1) {
// continue;
// }
drawTileA(x,y)
}
}
}
function drawTileA(x,y) {
push();
translate(x, y);
rotate(random([0,90, 180, 270]));
fill("#27AE60");
rectMode(CENTER)
rect(0, 0, 100, 100)
fill("#EC7063 ");
beginShape();
vertex(50, -50);
vertex(0, 25);
vertex(0, -25);
vertex(-50, 50);
endShape();
pop()
}