let url = "https://coolors.co/e52b16-e58e14-012a36-116d77-7e52a0";
createCanvas(windowWidth, windowHeight);
pallete = createPallete(url);
strokeCol = color("#FFEAF7");
rectRec(offsetX, offsetY, width - offsetX, offsetY,width - offsetX, height - offsetY,offsetX, height - offsetY,);
function rectRec(x1, y1, x2, y2, x3, y3, x4, y4) {
let p1 = createVector(x1, y1);
let p2 = createVector(x2, y2);
let p3 = createVector(x3, y3);
let p4 = createVector(x4, y4);
let v1 = p5.Vector.sub(p2, p1);
let v2 = p5.Vector.sub(p3, p2);
let v3 = p5.Vector.sub(p4, p3);
let v4 = p5.Vector.sub(p1, p4);
let w = v1.mag() + v3.mag();
let h = v2.mag() + v4.mag();
let col = pallete[Math.round(noise(millis()/1000, ((100 + x1)/10 * (100+y1)/10)/1000) * pallete.length)];
let r1 = p5.Vector.lerp(p1, p2, gauss());
let r2 = p5.Vector.lerp(p3, p4, gauss());
rectRec(x1, y1, r1.x, r1.y, r2.x, r2.y, x4, y4);
rectRec(r1.x, r1.y, x2, y2, x3, y3, r2.x, r2.y);
let r1 = p5.Vector.lerp(p4, p1, gauss());
let r2 = p5.Vector.lerp(p2, p3, gauss());
rectRec(x1, y1, x2, y2, r2.x, r2.y, r1.x, r1.y);
rectRec(r1.x, r1.y, r2.x, r2.y, x3, y3, x4, y4);
let n = noise(millis()/1000);
function createPallete(_url) {
let slash_index = _url.lastIndexOf('/');
let pallate_str = _url.slice(slash_index + 1);
let arr = pallate_str.split('-');
for (let i = 0; i < arr.length; i++) {