let COLS = createCols("https://coolors.co/eb300f-fe7688-fff566-212121-306e42-0d3b66");
const s = min(windowWidth, windowHeight) * 0.9;
PALETTE = shuffle(COLS, true);
PALETTE = PALETTE.slice(0, 3);
typo(width /2 - width / 3.2, height /2, width / 4, height /4 / 2 * 7, true);
typo(width * 0.49, height /2, width / 4, height /4 / 2 * 7, false);
typo(width /2 + width / 3.2, height /2, width / 4, height /4 / 2 * 7, true);
circlePattern(width * 0.6, height * 0.75, d);
function typo(cx, cy, w, h, isp)
[[-9, -9],[-9, -9],[0, 1],[-1, -1], [-1, 2], [-1, -9],[2, -9]] :
[[-1, 2],[-1, -9],[3, 1],[-9, -1], [0, 2], [-9, -9],[-9, -9]] ;
const xNum = structure[0].length;
const yNum = structure.length;
translate(cx - w /2, cy - h / 2);
for(let yi = 0; yi < yNum; yi++)
for(let xi = 0; xi < xNum; xi++)
const isDraw = structure[yi][xi];
const x = xSpan * (xi + 0.5);
const y = ySpan * (yi + 0.5);
patternColors(shuffle(PALETTE));
pattern(randPattern(xSpan));
patternAngle(int(random(4)) * PI / 4);
rotate(isDraw * HALF_PI);
if(rn > 0.66)rectPattern(0, 0, xSpan, ySpan, xSpan, 0, 0, 0);
else if(rn > 0.33) arcPattern(xSpan / 2, ySpan / 2, xSpan * 2, ySpan * 2, PI, TAU / 4 * 3);
else trianglePattern(xSpan / 2, ySpan / 2, -xSpan / 2, ySpan / 2, xSpan / 2, -ySpan / 2);
rectPattern(0, 0, xSpan, ySpan);
PTN.stripe(t / int(random(6, 12))),
PTN.stripeCircle(t / int(random(6, 12))),
PTN.stripePolygon(int(random(3, 7)), int(random(6, 12))),
PTN.stripeRadial(TAU / int(random(6, 30))),
PTN.wave(t / int(random(1, 3)), t / int(random(10, 20)), t / 5, t / 10),
PTN.dot(t / 10, t / 10 * random(0.2, 1)),
PTN.checked(t / int(random(5, 20)), t / int(random(5, 20))),
PTN.cross(t / int(random(10, 20)), t / int(random(20, 40))),
PTN.triangle(t / int(random(5, 20)), t / int(random(5, 20)))
let slaIndex = url.lastIndexOf("/");
let colStr = url.slice(slaIndex + 1);
let colArr = colStr.split("-");
for(let i = 0; i < colArr.length; i++)colArr[i] = "#" + colArr[i];