// ██████╗ ██╗ ██╗██████╗ ██╗ ███████╗██╗ ██╗ // ██╔══██╗██║ ██║██╔══██╗██║ ██╔════╝╚██╗██╔╝ // ██║ ██║██║ ██║██████╔╝██║ █████╗ ╚███╔╝ // ██║ ██║██║ ██║██╔═══╝ ██║ ██╔══╝ ██╔██╗ // ██████╔╝╚██████╔╝██║ ███████╗███████╗██╔╝ ██╗ // ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝╚══════╝╚═╝ ╚═╝ // ______________________________________________________ // | | // | 001 | // || // | | // | This OBJKT takes its own description metadata and | // | executes it as code to render its output | // | | // | It's ALSO able to take instructions from another | // | OBJKT its connected to, but only if you own it too | // | | // | Collect both pieces and see the art rendered | // | together, uniquely based on your wallet! | // | | // | This is a collaboration between | // | Yazid & Eltono | // || // | | // | 16 Aug 2021 | // |______________________________________________________|
let margeExt = cellHeight / 22;
let pash = (cellHeight - 20);
let pasl = (cellWidth - 20);
let epais = cellHeight / 14;
let marge = (epais / 2) + margeExt;
let pointsx = [];
let pointsy = [];
let nordres = [];
let nordres_tri = [];
let nordre = 0;
let xpoint = (pasl - epais) / (2 + 1);
let ypoint = (pash - epais) / (2 + 1);
for (let i = 0; i < 2 + 2; i = i + 1){
for (let j = 0; j < 2 + 2; j = j + 1){
pointsx.push(i * xpoint);
pointsy.push(j * ypoint);
nordres.push(nordre);
nordre = nordre + 1;
}
}
shuffle(nordres, true);
let nbsegment = 0;
for(let i = 0; i < 1;i = i + 1){
for(let j = 0; j < 1; j = j + 1){
for(let s = 0; s < 3; s = s + 1){
if(epais != 0){
stroke(pieceColors[s]);
strokeWeight(epais);
strokeCap(ROUND);
strokeJoin(ROUND);
}
noFill();
shuffle(nordres, true);
nordres_tri=[];
for ( let k = 0; k < 4 + 1; k = k + 1){
nordres_tri.push(nordres[k]);
}
nordres_tri.sort();
beginShape();
for ( let k = 0; k < 4; k = k + 1){
let X = pointsx[nordres_tri[k]] + marge + i * pasl;
let Y = pointsy[nordres_tri[k]] + marge + j * pash;
vertex(X,Y);
}
endShape(CLOSE);
}
}
}