0xbb54…a250

All memos sent from and to 0xbb54…a250.

window.onload=function(){0===tokenData.tokenId&&(tokenData.hash="0xb1c3e8a576cb5fd0fbf341c3d988fd81607a8fb0c02ae7ecb6d8767b17e11650");class Random{constructor(){this.useA=!1;let t=function(t){let $=parseInt(t.substr(0,8),16),e=parseInt(t.substr(8,8),16),r=parseInt(t.substr(16,8),16),_=parseInt(t.substr(24,8),16);return function(){r|=0;let t=(($|=0)+(e|=0)|0)+(_|=0)|0;return _=_+1|0,$=e^e>>>9,e=r+(r<<3)|0,r=(r=r<<21|r>>>11)+t|0,(t>>>0)/4294967296}};this.prngA=new t(tokenData.hash.substr(2,32)),this.prngB=new t(tokenData.hash.substr(34,32));for(let $=0;$<1e6;$+=2)this.prngA(),this.prngB()}random_dec(){return this.useA=!this.useA,this.useA?this.prngA():this.prngB()}random_num(t,$){return t+($-t)*this.random_dec()}random_int(t,$){return Math.floor(this.random_num(t,$+1))}}let R=new Random;var resolution,resolutionH,seed=parseInt(tokenData.hash.slice(0,16),16),w=window.innerWidth,h=window.innerHeight,dimDif=8.5/11,size=h,sizeW=h*dimDif;w<h*dimDif&&(size=w/dimDif,sizeW=w);var turbulence=R.random_int(0,300),bg=document.createElement("div");bg.style.width=sizeW+"px",bg.style.height=size+"px",bg.style.backgroundColor="#ffffff",bg.setAttribute("id","bg"),bg.style.padding="0px",bg.style.margin="auto",bg.style.display="block",bg.style.position="absolute",bg.style.top="0",bg.style.bottom="0",bg.style.left="0",bg.style.right="0",bg.style.overflow="hidden",document.body.appendChild(bg);var svg=document.createElementNS("http://www.w3.org/2000/svg","svg");svg.setAttribute("width",sizeW),svg.setAttribute("height",size),svg.setAttribute("id","svgPaper"),svg.style.padding="0px",svg.style.margin="auto",svg.style.display="block",svg.style.position="absolute",svg.style.top="0",svg.style.bottom="0",svg.style.left="0",svg.style.right="0",svg.style.overflow="hidden";var svg2=document.createElementNS("http://www.w3.org/2000/svg","svg");svg2.setAttribute("width",sizeW),svg2.setAttribute("height",size),svg2.setAttribute("id","svgPrint"),svg2.style.padding="0px",svg2.style.margin="auto",svg2.style.display="block",svg2.style.position="absolute",svg2.style.top="0",svg2.style.bottom="0",svg2.style.left="0",svg2.style.right="0",svg2.style.overflow="hidden";var rect=document.createElementNS("http://www.w3.org/2000/svg","rect");rect.setAttribute("width",sizeW),rect.setAttribute("height",size),rect.setAttribute("fill","#000000"),svg.appendChild(rect);var filter=document.createElementNS("http://www.w3.org/2000/svg","filter");filter.setAttribute("id","turbulence");var feTurbulence=document.createElementNS("http://www.w3.org/2000/svg","feTurbulence");feTurbulence.setAttribute("type","fractalNoise"),feTurbulence.setAttribute("baseFrequency",".5, .7"),feTurbulence.setAttribute("result","turbulence"),feTurbulence.setAttribute("seed",turbulence+""),filter.appendChild(feTurbulence);var feComposite=document.createElementNS("http://www.w3.org/2000/svg","feComposite");feComposite.setAttribute("in","SourceGraphic"),feComposite.setAttribute("in2","turbulence"),feComposite.setAttribute("operator","arithmetic"),feComposite.setAttribute("k1",".1"),feComposite.setAttribute("k2",".1"),feComposite.setAttribute("k3",".1"),feComposite.setAttribute("k4",".2"),filter.appendChild(feComposite),svg.appendChild(filter),rect.setAttribute("filter","url(#turbulence)"),document.body.appendChild(svg);var one=[[0,1,0,0,1,0],[1,1,1,1,1,0],[0,0,0,0,1,0],],two=[[0,1,0,0,1,0],[1,0,0,1,1,0],[1,0,1,0,1,0],[0,1,0,0,1,0],],three=[[1,0,0,0,1,0],[1,0,1,0,1,0],[1,0,1,0,1,0],[0,1,0,1,0,0],],four=[[0,0,1,1,0,0],[0,1,0,1,0,0],[1,1,1,1,1,0],[0,0,0,1,0,0],],five=[[1,1,1,0,1,0],[1,0,1,0,1,0],[1,0,1,0,1,0],[1,0,0,1,0,0],],six=[[0,1,1,1,0,0],[1,0,1,0,1,0],[1,0,1,0,1,0],[1,0,0,1,0,0],],seven=[[1,0,0,0,0,0],[1,0,0,1,1,0],[1,0,1,0,0,0],[1,1,0,0,0,0],],eight=[[0,1,0,1,0,0],[1,0,1,0,1,0],[1,0,1,0,1,0],[0,1,0,1,0,0],],nine=[[0,1,0,0,1,0],[1,0,1,0,1,0],[1,0,1,0,1,0],[0,1,1,1,0,0],],zero=[[0,1,1,1,0,0],[1,0,0,0,1,0],[1,0,0,0,1,0],[0,1,1,1,0,0],],gridCountWidth=384,gridCountHeight=Math.floor(gridCountWidth/dimDif),sectionW=R.random_int(1,5),sectionH=R.random_int(1,5),subW=R.random_int(1,3),subH=R.random_int(1,3),margin=1,sections=[],sectionCellW=Math.floor(gridCountWidth/sectionW-margin),sectionCellH=Math.floor(gridCountHeight/sectionH-margin);for(i=0;i<sectionW;i++)for(j=0,sections[i]=[];j<sectionH;j++)if(R.random_dec()>.75){var sectionCellWX=Math.floor(sectionCellW/subW-margin/2),sectionCellHX=Math.floor(sectionCellH/subH-margin/2);for(m=0,sections[i][j]=[];m<subW;m++)for(n=0,sections[i][j][m]=[];n<subH;n++)sections[i][j][m][n]=[i*sectionCellW+margin*i+margin/2+(m*sectionCellWX+margin*m),j*sectionCellH+margin*j+margin/2+(n*sectionCellHX+margin*n)]}else sections[i][j]=[margin/2+(i*sectionCellW+margin*i),margin/2+(j*sectionCellH+margin*j)];var timeStart=R.random_num(0,360),freqX=1,freqY=1,rr=R.random_dec(),bgLight=.6*R.random_dec()+.1,bgLightInt=R.random_dec()/10;R.random_dec()>.85&&(bgLight=0,bgLightInt=0);var doodleInt=R.random_num(0,20),rRadius=.9,rRadiusx=R.random_dec(),rRadiusBool=!1,time=0,factor=R.random_num(.6,2.8);0===bgLightInt&&(factor=R.random_num(.6,1.2));var rfactor=R.random_dec(),dithers=R.random_dec(),subTotal=subW+subW;function generateLayer(t,$,e,r,_,l,o){rfactor>.1&&(factor=R.random_num(.6,2.8),(0===bgLightInt||subTotal<=2)&&(factor=R.random_num(.6,1.2))),rRadiusx>.75&&(rRadius=R.random_num(.8,1.6),rRadiusBool=!0);for(var s=[],a=0;a<r;a++){s[a]=[];for(var u=0;u<_;u++)s[a][u]=[bgLight]}if(rfactor>.1&&(bgLight+=bgLightInt),bgLight>.6&&(bgLight=.1),!0===t)s=l;else{function d(){for(var t=0,$=Math.floor(r/2.01),e=Math.floor(_/2.01),l=0;l<r;l++)for(var a=0;a<_;a++){var u=Math.round(Math.sin(t*freqX+(doodler=o/doodleInt*Math.PI+timeStart))*$+$),d=Math.round(Math.cos(t*freqY)*e+e);if(rr>.5)var u=Math.round(Math.sin(t*freqX)*$+$),d=Math.round(Math.cos(t*freqY+doodler)*e+e);s[u][d]=[1],t+=1}}d()}function c(){for(var t=0;t<r;t++)for(var $=0;$<_;$++){try{l=s[t][$]}catch(e){}var l,o=l[0],a=o/factor-Math.round(o);s[t][$][0]=o;try{var o=(l=s[t+1][$])[0];o+=7*a/16,s[t+1][$][0]=o}catch(u){}try{var o=(l=s[t-1][$+1])[0];o+=3*a/16,s[t-1][$+1][0]=o}catch(d){}try{var o=(l=s[t][$+1])[0];o+=5*a/16,s[t][$+1][0]=o}catch(c){}try{var o=(l=s[t+1][$+1])[0];o+=1*a/16,s[t+1][$+1][0]=o}catch(b){}}}function b(){for(var l=sizeW/gridCountWidth,o=size/gridCountHeight,a=e;a<_+e;a++)for(var u=$;u<r+$;u++){var d=s[u-$][a-e];function c(t,$,e){var r=u*l,_=a*o,s=document.createElementNS("http://www.w3.org/2000/svg","rect");s.setAttributeNS(null,"x",r),s.setAttributeNS(null,"y",_),s.setAttributeNS(null,"height",l*$),s.setAttributeNS(null,"width",o*e),s.setAttributeNS(null,"fill",t),svg2.appendChild(s)}function b($,e,r){var _=u*l,s=a*o,d=document.createElementNS("http://www.w3.org/2000/svg","ellipse");d.setAttributeNS(null,"rx",l/2*r),d.setAttributeNS(null,"ry",l/2*e),!0===t?(d.setAttributeNS(null,"cx",_+l/2-r/2),d.setAttributeNS(null,"cy",s+l/2-e/2)):(d.setAttributeNS(null,"cx",_+l/2-r/2+(R.random_dec()/2-.5)),d.setAttributeNS(null,"cy",s+l/2-e/2+(R.random_dec()/2-.5))),d.setAttributeNS(null,"fill",$),d.setAttributeNS(null,"opacity",.9),svg2.append(d)}!0===rRadiusBool&&!0===t&&(rRadius=1),dithers>.5?d>.5&&b("black",rRadius,rRadius):(d>=.8&&b("black",rRadius,rRadius),d>=.5&&d<.7&&b("black",rRadius,rRadius),d>=.1&&d<.2&&b("black",rRadius,rRadius))}}!0===t||c(),b(),document.body.appendChild(svg2)}function typeset(text,startX,startY){var variable,spacing=startX,leading=startY,textSplit=text.split("");for(i=0;i<text.length;i++)generateLayer(!0,spacing,leading,(variable="1"===textSplit[i]?one:"2"===textSplit[i]?two:"3"===textSplit[i]?three:"4"===textSplit[i]?four:"5"===textSplit[i]?five:"6"===textSplit[i]?six:"7"===textSplit[i]?seven:"8"===textSplit[i]?eight:"9"===textSplit[i]?nine:"0"===textSplit[i]?zero:eval(textSplit[i]+"L")).length,6,variable),(spacing+=variable.length+1)>=gridCountWidth/sectionW+startX-2*margin&&(leading+=7,spacing=startX)}for(z=0;z<sections.length;z++)for(w=0;w<sections[z].length;w++)if(sections[z][w][0].constructor===Array){var sectionCellWX=Math.floor(sectionCellW/subW-margin),sectionCellHX=Math.floor(sectionCellH/subH-margin);for(m=0;m<subW;m++)for(n=0;n<subH;n++)typeset(time+"",sections[z][w][m][n][0]+3,sections[z][w][m][n][1]+3),generateLayer(!1,sections[z][w][m][n][0]+3,sections[z][w][m][n][1]+9,sectionCellWX-6,sectionCellHX-12,null,time),time+=1}else typeset(time+"",sections[z][w][0]+3,sections[z][w][1]+3),generateLayer(!1,sections[z][w][0]+3,sections[z][w][1]+9,sectionCellW-6,sectionCellH-12,null,time),time+=1};
circles is a generative script composed on a letter-sized piece of paper (8.5” x 11”). while circles is a digital artwork, the material of the piece refers to the dithering found when printing on common b/w laser printers. each output is a step by step guide on how to draw a circle ... programmatic interferences of time and light distorts each attempt to render a circle(s) creating compositions of imperfection with hopes to create something new.
const seed=parseInt(tokenData.hash.slice(0,16),16);p5.disableFriendlyErrors=!0;let mainCanvas,g,R,params,backgroundPattern,patternSize,DEFAULT_SIZE=1600,MAX_SIZE=5e3,WIDTH=Math.min(window.innerWidth,MAX_SIZE),HEIGHT=Math.min(window.innerHeight,MAX_SIZE),DIM=Math.min(WIDTH,HEIGHT),M=DIM/DEFAULT_SIZE;function setup(){mainCanvas=createCanvas(WIDTH,HEIGHT),colorMode(HSB,360,100,100,100),R=new Random,backgroundPattern=R.random_choice(["Mameshibori","Ichimatsu","Shippo","Tatewaku","Seikaiha"]),patternSize=R.random_int(2,10),"Ichimatsu"==backgroundPattern&&patternSize%2==1&&(patternSize+=1),g=new GenerativemasksJP(!0,!0,!0),params=getParams(),console.log(params),angleMode(DEGREES),pixelDensity(1),grainBuffer=createGraphics(width,height,WEBGL),grainShader=grainBuffer.createShader(vert,frag)}function getParams(){return{seed:seed,colorSchme:g.colorScheme,backgroundPattern:backgroundPattern,patternSize:patternSize}}function draw(){clear();const e=g.createMask(seed,width),t=getTexture(width,height);push(),imageMode(CENTER),image(e,width/2,height/2);const a=window.navigator.userAgent.toLowerCase();-1!=a.indexOf("chrome")?drawingContext.globalAlpha=1:-1!=a.indexOf("safari")&&(drawingContext.globalAlpha=.2),image(t,width/2,height/2),-1!=a.indexOf("safari")&&(drawingContext.globalAlpha=1),e.remove(),t.remove(),pop(),grainBuffer.clear(),grainBuffer.reset(),grainBuffer.push(),grainBuffer.shader(grainShader),grainShader.setUniform("noiseSeed",seed),grainShader.setUniform("source",mainCanvas),grainShader.setUniform("noiseAmount",1/15*M),grainBuffer.rectMode(CENTER),grainBuffer.noStroke(),grainBuffer.rect(0,0,width,height),grainBuffer.pop(),push(),image(grainBuffer,0,0),pop(),noLoop()}class GenerativemasksJP{constructor(e,t){this.inst=createGraphics(0,0),this.inst.colorMode(RGB,255),this.cSize=DEFAULT_SIZE;const a=this.cSize/10;this.sRadius=3*(this.cSize-2*a)/4,this.needShadow=e,this.needBackdrop=t,this.defaultRGBs=[{name:"Golden Thread Butterfly",scheme:"f19b4e-7f6640-dc5845-637055-e4d6c8-929e79-472c2a"},{name:"Navy Lion Peony",scheme:"83834f-e0c786-30363d-db2f38-66989c-e9ded1-628152"},{name:"Chacoal Wind",scheme:"151015-511a28-8e563a-fcfbfa-bf9969-718282"},{name:"Wisteria Spring",scheme:"e6bc8a-da4742-202125-909062-dba380-dcc6b9"},{name:"Fragrant Ground",scheme:"73924d-eb9f48-b19564-aabcb2-f0e3d7-6b4b2b"},{name:"Lagenaria Siceraria",scheme:"f0ebe1-d8ccb3-cd2a41-8bc08f-f69fac-c4714c"},{name:"Tang grass",scheme:"f9f5ec-d8ae6a-d4824b-588c92-89bfb3-b55847"},{name:"Pearl and Dragon",scheme:"dad7c3-c7895a-343530-899c63-60827d-d6b58a"},{name:"Red Dragon",scheme:"e5e9e9-da2034-8db4bb-4f6a31-6ab26d-e4bc89"},{name:"Phoenix Peony",scheme:"3c3e46-ddded7-c07552-5b6984-809c73-c3ae98"},{name:"Kara Ori",scheme:"4d4638-f77843-fbc836-d8b85a-6c6e47-b0e3ee"},{name:"Yu-Zen Dyeing",scheme:"f5da30-338ab6-8a8740-73563f-332321-e0dfdf"},{name:"Costumes",scheme:"e84343-c38d73-b68542-bbc273-4395c7-7186c0"},{name:"Bird and Flower",scheme:"abb163-e9e1cb-9b7c4a-74a7a0-e46641-5a5925"},{name:"Dull Itchy Bird",scheme:"7aa467-695643-9a7b55-d4393a-ddb19e-394b3a"},{name:"Orange Pendulum",scheme:"f6532d-cec4a4-3d4532-5e9682-becbbc-f7ac66"},{name:"Black Linen Thread",scheme:"dd8458-76b661-ddd66d-0f0b0c-4d493b-f3f4ee"},{name:"Beginning",scheme:"ba3f4c-eb213b-e2d1a5-fccb7d-80cddd"},{name:"Asagi Red",scheme:"f7b4b3-cdd2c5-95b0a0-f9836f-6898a0"},{name:"Sarasa",scheme:"e9f1f6-db353d-6a8e89-34504a-6a87cc"},{name:"Night Blossom",scheme:"fffbf4-313f5f-cd464c-fca8bd-fa718d"},{name:"Silk Road",scheme:"ebe7e0-68bdc1-f8be44-5c6a92-a9625e"},{name:"Feast of Flags",scheme:"ff8978-fccc6f-4facc2-3292b7-7879ab"}];let r=R.random_choice(this.defaultRGBs);this.colorScheme=r.name,this.palette=this.setPalette(r.scheme)}setPalette(e){const t=e.replace(/.*\//g,"");this.chkRgbStrings(t)?this.palette=this.getPalette(t):this.setRandomPalette()}setRandomPalette(){let e=R.random_choice(this.defaultRGBs);this.palette_string=e.name_en,this.palette=this.getPalette(e.scheme)}getPalette(e){const t=e.split("-");for(let e=0;e<t.length;e++)t[e]=this.inst.color("#"+t[e]);return this.shuffle(t)}chkRgbStrings(e){const t=e.replace(/.*\//g,"");return!!new RegExp(/^(([0-9]|[a-fA-F]){6}-){2,}([0-9]|[a-fA-F]){6}$/).test(t)}createMask(e,t){this.maskCv=createGraphics(t,t),this.inst.randomSeed(e),this.inst.noiseSeed(e),this.maskCv.randomSeed(e),this.maskCv.noiseSeed(e),this.setRandomPalette();const a=this.palette[0],r=this.palette.shift();this.sw=30,this.maskCv.pixelDensity(1),this.maskCv.colorMode(RGB,255),this.maskCv.angleMode(DEGREES),this.maskCv.clear(),this.maskCv.fill(a),this.maskCv.stroke(a),this.maskCv.scale(t/this.cSize),this.maskCv.strokeWeight(this.sw);const i=this.maskCv.random(100,400)*this.maskCv.random(.5,2);this.drawShape(this.cSize/2,this.cSize/2,this.sRadius,i,this.maskCv),this.palette.push(r);const n=createGraphics(t,t);if(this.needBackdrop)for(let e=0;e<3;e++){blendMode(BURN),push();let e=R.random_num(0,width/5),t=R.random_num(0,height/5),a=sqrt(2)*max(width,height)/2,r=R.random_num(0,360),i=width/2+e+cos(r)*a,n=height/2+t+sin(r)*a,s=width/2+e+cos(r+180)*a,o=height/2+t+sin(r+180)*a,c=drawingContext.createLinearGradient(i,n,s,o),h=R.random_choice(this.palette);h.setAlpha(50);let d=R.random_choice(this.palette);h.setAlpha(0);let l=color(h),m=color(hue(d),saturation(h),constrain(brightness(h)-20,0,100));c.addColorStop(0,l),c.addColorStop(1,m),drawingContext.fillStyle=c,noStroke(),rect(0,0,width,height),pop,blendMode(BLEND)}else n.clear();return this.needShadow&&(n.drawingContext.shadowColor=this.inst.color(0,127.5),n.drawingContext.shadowBlur=t/20,n.drawingContext.shadowOffsetY=t/40),n.image(this.maskCv,0,0),this.maskCv.remove(),n}drawShape(e,t,a,r,i){const n=new Array;let s=new Array,o=this.cSize,c=0,h=this.cSize/2,d=-this.cSize,l=this.cSize,m=-this.cSize;for(let a=0;a<360;a+=1){let n=i.noise(e,t,abs(a-180)/r);o=min(n,o),c=max(n,c),s.push(n)}for(let e=0;e<s.length;e++){let t=map(s[e],0,c,0,this.cSize/2*.9-this.sw*M),a=e;t=constrain(t,this.cSize/8,this.cSize/2);let r=i.cos(a)*t,o=i.sin(a)*t;n.push(createVector(r,o)),h=min(h,r),d=max(d,r),l=min(l,o),m=max(m,o)}const p=lerp(h,d,.5),f=lerp(l,m,.5);i.push(),i.strokeWeight(this.sw),i.translate(e,t),i.rotate(90),i.beginShape();for(let e of n)i.vertex(e.x-p,e.y-f);i.endShape(CLOSE),i.pop(),i.drawingContext.clip();let u=this.createGraphic(this.cSize/2,this.cSize,2);i.push(),i.translate(this.cSize/2,0),i.image(u,0,0),i.push(),i.scale(-1,1),i.image(u,0,0),i.pop(),i.pop(),u.remove()}drawJapanesePattern(e,t,a,r,i,n){switch(i.push(),i.translate(e,t),params.backgroundPattern){case"Mameshibori":this.drawMameshibori(a,r,i,n);break;case"Ichimatsu":this.drawIchimatsu(a,r,i,n);break;case"Shippo":this.drawShippo(a,r,i,n);break;case"Tatewaku":this.drawTatewaku(a,r,i,n);break;case"Seikaiha":this.drawSeikaiha(a,r,i,n)}i.pop()}drawMameshibori(e,t,a,r){let i=color(R.random_choice(this.palette));a.fill(i);let n=e/r,s=n/R.random_num(1.5,4);for(let e=0;e<=a.height;e+=n)for(let t=0;t<=a.width;t+=n){a.push(),a.translate(t,e),a.noStroke();let r=R.random_num(0,n/20)*(R.random_num(0,1)>.5?-1:1),i=noise(t,e),o=cos(360*i)*r,c=sin(360*i)*r;a.rotate(360*i),a.shearX(15*i),a.circle(o,c,s),a.pop()}}drawIchimatsu(e,t,a,r){let i=color(R.random_choice(this.palette)),n=0,s=e/r;for(let e=0;e<=a.height;e+=s)for(let t=0;t<=a.width;t+=s)a.push(),a.translate(t,e),a.noStroke(),a.fill(i),a.rectMode(CENTER),n++%2==0&&a.rect(t,e,2*s,2*s),a.pop()}drawShippo(e,t,a,r){let i=color(R.random_choice(this.palette)),n=e/r;a.push(),a.strokeWeight(n/R.random_num(15,30));for(let e=0;e<=a.height;e+=n)for(let t=0;t<=a.width;t+=n)a.push(),a.translate(t,e),a.noFill(),a.stroke(i),a.circle(0,0,n),a.stroke(i),a.circle(n/2,n/2,n),a.pop();a.pop()}drawTatewaku(e,t,a,r){let i=color(R.random_choice(this.palette)),n=e/r;a.stroke(i),a.strokeWeight(n*M*R.random_num(1/4,2));for(let e=0;e<r;e++)for(let t=0;t<r;t++){let r=e%2==1?180:0;a.push(),a.translate(n*(e+.5),3*n*t),a.noFill(),a.beginShape();for(let e=0;e<300;e++)a.vertex(n/4*sin(1.2*e+r),3*n/300*e);a.endShape(),a.pop()}}drawSeikaiha(e,t,a,r){let i=color(R.random_choice(this.palette)),n=i;for(;i==n;)n=color(R.random_choice(this.palette));let s=0,o=e/r;for(let e=0;e<=a.height;e+=o/4){for(let t=s%2==0?-o/2:0;t<=a.width+o;t+=o){a.push(),a.translate(t,e);let r=0;for(let e=1;e>0;e-=1/8)a.fill((s+r++)%2==0?i:n),a.noStroke(),a.circle(0,0,o*e);a.pop()}s++}}createGraphic(e,t,a){let r=createGraphics(e,t);return r.colorMode(HSB,360,100,100,100),r.angleMode(DEGREES),"Seikaiha"==params.backgroundPattern?(this.drawJapanesePattern(0,0,r.width,r.height,r,params.patternSize),this.recursiveGraphic(0,0,e,t,r,a)):(this.recursiveGraphic(0,0,e,t,r,a),this.drawJapanesePattern(0,0,r.width,r.height,r,params.patternSize),this.recursiveGraphic(0,0,e,t,r,a)),r}recursiveGraphic(e,t,a,r,i,n){for(let a=0;a<n;a++){let a=int(R.random_num(3,6)),s=a,o=r/a,c=r/s;for(let r=0;r<s;r++)for(let s=0;s<a;s++){let a=e+o*s,h=t+c*r;R.random_num(0,100)<90&&min(o,c)>i.height/5&&n>0?this.recursiveGraphic(a,h,o,c,i,n-1):this.drawPatterns(a,h,o,c,i)}}}drawPatterns(e,t,a,r,i){if(dist(e,t,0,i.height/2)>sqrt(2)*max(i.height,i.width)/2)return;let n,s,o=360*int(R.random_num(0,4))/4;o%180==0?(n=a,s=r):(n=r,s=a);let c=int(R.random_num(2,7));i.push(),i.translate(e+a/2,t+r/2),i.rotate(o),i.translate(-n/2,-s/2);let h=int(R.random_num(0,9));for(let e=c;e>0;e--)i.push(),i.scale(e/c),this.drawPattern(0,0,n,s,i,h,c/e),i.pop();i.pop()}drawPattern(e,t,a,r,i,n,s){i.drawingContext.shadowColor=color(0,0,0,33),i.drawingContext.shadowBlur=width/10;let o,c=R.random_choice(this.palette),h=R.random_choice(this.palette);for(;h==c;)h=R.random_choice(this.palette);switch(o=n<4?i.drawingContext.createLinearGradient(0,0,a,r):i.drawingContext.createRadialGradient(a/2,r/2,0,a/2,r/2,max(a,r)),o.addColorStop(0,h),o.addColorStop(1,c),i.drawingContext.fillStyle=o,i.stroke(0,0,20),i.strokeWeight(.2*M),n){case 0:i.arc(0,0,2*a,2*r,0,90,PIE);break;case 1:i.triangle(0,0,0,+r,+a,0);break;case 2:i.rect(0,0,a,r/2);break;case 3:i.triangle(0,0,a,r,a,t);break;case 4:i.circle(a/2,r/2,min(a,r));break;case 5:i.rectMode(CENTER),i.rect(a/2,r/2,min(a,r)),i.rectMode(CORNER);break;case 6:i.scale(s),i.circle(a,r,1*min(a,r)/s);break;case 7:i.scale(s),i.rectMode(CORNER),i.rect(a,r,1*min(a,r)/s),i.rectMode(CORNER);break;case 8:i.arc(0,0,a,r,0,90,PIE),i.scale(s),i.arc(a,r,a,r,180,270,PIE)}}shuffle(e){for(let t=e.length-1;t>=0;t--){let a=floor(R.random_num(0,1)*(t+1));[e[t],e[a]]=[e[a],e[t]]}return e}}const vert="\nprecision highp float;\nattribute vec3 aPosition;\nattribute vec2 aTexCoord;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\n\nvarying vec2 vVertTexCoord;\n\nvoid main(void) {\n vec4 positionVec4 = vec4(aPosition, 1.0);\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n vVertTexCoord = aTexCoord;\n}\n",frag="\nprecision highp float;\nvarying vec2 vVertTexCoord;\n\nuniform sampler2D source;\nuniform float noiseSeed;\nuniform float noiseAmount;\n \nfloat rand(vec2 n) { \n return fract(cos(dot(n, vec2(12.9898, 4.1414))) * 43758.5453);\n}\n\nvoid main() {\n // GorillaSun's grain algorithm\n vec4 inColor = texture2D(source, vVertTexCoord);\n gl_FragColor = clamp(inColor + vec4(\n mix(-noiseAmount, noiseAmount, fract(noiseSeed + rand(vVertTexCoord * 1234.5678))),\n mix(-noiseAmount, noiseAmount, fract(noiseSeed + rand(vVertTexCoord * 876.54321))),\n mix(-noiseAmount, noiseAmount, fract(noiseSeed + rand(vVertTexCoord * 3214.5678))),\n 0.\n ), 0., 1.);\n}\n";function getTexture(e,t){const a=createGraphics(e,t);a.randomSeed(seed),a.colorMode(HSB,360,100,100,100),a.angleMode(DEGREES),a.strokeWeight(.1*M);for(let r=0;r<e;r+=20*e/DEFAULT_SIZE)for(let i=0;i<t;i+=20*t/DEFAULT_SIZE){let n=a.random(75,105),s=max(e,t)/2;a.stroke(0,0,0,a.random(15)),a.line(r+a.cos(n)*s,i+a.sin(n)*s,r+a.cos(n+180)*s,i+a.sin(n+180)*s)}return a}class Random{constructor(){this.useA=!1;let e=function(e){let t=parseInt(e.substr(0,8),16),a=parseInt(e.substr(8,8),16),r=parseInt(e.substr(16,8),16),i=parseInt(e.substr(24,8),16);return function(){t|=0,a|=0,r|=0,i|=0;let e=(t+a|0)+i|0;return i=i+1|0,t=a^a>>>9,a=r+(r<<3)|0,r=r<<21|r>>>11,r=r+e|0,(e>>>0)/4294967296}};this.prngA=new e(tokenData.hash.substr(2,32)),this.prngB=new e(tokenData.hash.substr(34,32));for(let e=0;e<1e6;e+=2)this.prngA(),this.prngB()}random_dec(){return this.useA=!this.useA,this.useA?this.prngA():this.prngB()}random_num(e,t){return e+(t-e)*this.random_dec()}random_int(e,t){return Math.floor(this.random_num(e,t+1))}random_bool(e){return this.random_dec()<e}random_choice(e){return e[this.random_int(0,e.length-1)]}}
const seed=parseInt(tokenData.hash.slice(0,16),16);p5.disableFriendlyErrors=!0;let mainCanvas,g,R,params,backgroundPattern,patternSize,DEFAULT_SIZE=1600,MAX_SIZE=5e3,WIDTH=Math.min(window.innerWidth,MAX_SIZE),HEIGHT=Math.min(window.innerHeight,MAX_SIZE),DIM=Math.min(WIDTH,HEIGHT),M=DIM/DEFAULT_SIZE;function setup(){mainCanvas=createCanvas(WIDTH,HEIGHT),colorMode(HSB,360,100,100,100),R=new Random,backgroundPattern=R.random_choice(["Mameshibori","Ichimatsu","Shippo","Tatewaku","Seikaiha"]),patternSize=R.random_int(2,10),"Ichimatsu"==backgroundPattern&&patternSize%2==1&&(patternSize+=1),g=new GenerativemasksJP(!0,!0,!0),params=getParams(),console.log(params),angleMode(DEGREES),pixelDensity(1),grainBuffer=createGraphics(width,height,WEBGL),grainShader=grainBuffer.createShader(vert,frag)}function getParams(){return{seed:seed,colorSchme:g.colorScheme,backgroundPattern:backgroundPattern,patternSize:patternSize}}function draw(){clear();const e=g.createMask(seed,width),t=getTexture(width,height);push(),imageMode(CENTER),image(e,width/2,height/2),image(t,width/2,height/2),e.remove(),t.remove(),pop(),grainBuffer.clear(),grainBuffer.reset(),grainBuffer.push(),grainBuffer.shader(grainShader),grainShader.setUniform("noiseSeed",seed),grainShader.setUniform("source",mainCanvas),grainShader.setUniform("noiseAmount",1/15*M),grainBuffer.rectMode(CENTER),grainBuffer.noStroke(),grainBuffer.rect(0,0,width,height),grainBuffer.pop(),push(),image(grainBuffer,0,0),pop(),noLoop()}class GenerativemasksJP{constructor(e,t){this.inst=createGraphics(0,0),this.inst.colorMode(RGB,255),this.cSize=DEFAULT_SIZE;const a=this.cSize/10;this.sRadius=3*(this.cSize-2*a)/4,this.needShadow=e,this.needBackdrop=t,this.defaultRGBs=[{name:"Golden Thread Butterfly",scheme:"f19b4e-7f6640-dc5845-637055-e4d6c8-929e79-472c2a"},{name:"Navy Lion Peony",scheme:"83834f-e0c786-30363d-db2f38-66989c-e9ded1-628152"},{name:"Chacoal Wind",scheme:"151015-511a28-8e563a-fcfbfa-bf9969-718282"},{name:"Wisteria Spring",scheme:"e6bc8a-da4742-202125-909062-dba380-dcc6b9"},{name:"Fragrant Ground",scheme:"73924d-eb9f48-b19564-aabcb2-f0e3d7-6b4b2b"},{name:"Lagenaria Siceraria",scheme:"f0ebe1-d8ccb3-cd2a41-8bc08f-f69fac-c4714c"},{name:"Tang grass",scheme:"f9f5ec-d8ae6a-d4824b-588c92-89bfb3-b55847"},{name:"Pearl and Dragon",scheme:"dad7c3-c7895a-343530-899c63-60827d-d6b58a"},{name:"Red Dragon",scheme:"e5e9e9-da2034-8db4bb-4f6a31-6ab26d-e4bc89"},{name:"Phoenix Peony",scheme:"3c3e46-ddded7-c07552-5b6984-809c73-c3ae98"},{name:"Kara Ori",scheme:"4d4638-f77843-fbc836-d8b85a-6c6e47-b0e3ee"},{name:"Yu-Zen Dyeing",scheme:"f5da30-338ab6-8a8740-73563f-332321-e0dfdf"},{name:"Costumes",scheme:"e84343-c38d73-b68542-bbc273-4395c7-7186c0"},{name:"Bird and Flower",scheme:"abb163-e9e1cb-9b7c4a-74a7a0-e46641-5a5925"},{name:"Dull Itchy Bird",scheme:"7aa467-695643-9a7b55-d4393a-ddb19e-394b3a"},{name:"Orange Pendulum",scheme:"f6532d-cec4a4-3d4532-5e9682-becbbc-f7ac66"},{name:"Black Linen Thread",scheme:"dd8458-76b661-ddd66d-0f0b0c-4d493b-f3f4ee"},{name:"Beginning",scheme:"ba3f4c-eb213b-e2d1a5-fccb7d-80cddd"},{name:"Asagi Red",scheme:"f7b4b3-cdd2c5-95b0a0-f9836f-6898a0"},{name:"Sarasa",scheme:"e9f1f6-db353d-6a8e89-34504a-6a87cc"},{name:"Night Blossom",scheme:"fffbf4-313f5f-cd464c-fca8bd-fa718d"},{name:"Silk Road",scheme:"ebe7e0-68bdc1-f8be44-5c6a92-a9625e"},{name:"Feast of Flags",scheme:"ff8978-fccc6f-4facc2-3292b7-7879ab"}];let r=R.random_choice(this.defaultRGBs);this.colorScheme=r.name,this.palette=this.setPalette(r.scheme)}setPalette(e){const t=e.replace(/.*\//g,"");this.chkRgbStrings(t)?this.palette=this.getPalette(t):this.setRandomPalette()}setRandomPalette(){let e=R.random_choice(this.defaultRGBs);this.palette_string=e.name_en,this.palette=this.getPalette(e.scheme)}getPalette(e){const t=e.split("-");for(let e=0;e<t.length;e++)t[e]=this.inst.color("#"+t[e]);return this.shuffle(t)}chkRgbStrings(e){const t=e.replace(/.*\//g,"");return!!new RegExp(/^(([0-9]|[a-fA-F]){6}-){2,}([0-9]|[a-fA-F]){6}$/).test(t)}createMask(e,t){this.maskCv=createGraphics(t,t),this.inst.randomSeed(e),this.inst.noiseSeed(e),this.maskCv.randomSeed(e),this.maskCv.noiseSeed(e),this.setRandomPalette();const a=this.palette[0],r=this.palette.shift();this.sw=30,this.maskCv.pixelDensity(1),this.maskCv.colorMode(RGB,255),this.maskCv.angleMode(DEGREES),this.maskCv.clear(),this.maskCv.fill(a),this.maskCv.stroke(a),this.maskCv.scale(t/this.cSize),this.maskCv.strokeWeight(this.sw);const i=this.maskCv.random(100,400)*this.maskCv.random(.5,2);this.drawShape(this.cSize/2,this.cSize/2,this.sRadius,i,this.maskCv),this.palette.push(r);const n=createGraphics(t,t);if(this.needBackdrop)for(let e=0;e<3;e++){blendMode(BURN),push();let e=R.random_num(0,width/5),t=R.random_num(0,height/5),a=sqrt(2)*max(width,height)/2,r=R.random_num(0,360),i=width/2+e+cos(r)*a,n=height/2+t+sin(r)*a,s=width/2+e+cos(r+180)*a,o=height/2+t+sin(r+180)*a,c=drawingContext.createLinearGradient(i,n,s,o),h=R.random_choice(this.palette);h.setAlpha(50);let d=R.random_choice(this.palette);h.setAlpha(0);let l=color(h),m=color(hue(d),saturation(h),constrain(brightness(h)-20,0,100));c.addColorStop(0,l),c.addColorStop(1,m),drawingContext.fillStyle=c,noStroke(),rect(0,0,width,height),pop,blendMode(BLEND)}else n.clear();return this.needShadow&&(n.drawingContext.shadowColor=this.inst.color(0,127.5),n.drawingContext.shadowBlur=t/20,n.drawingContext.shadowOffsetY=t/40),n.image(this.maskCv,0,0),this.maskCv.remove(),n}drawShape(e,t,a,r,i){const n=new Array;let s=new Array,o=this.cSize,c=0,h=this.cSize/2,d=-this.cSize,l=this.cSize,m=-this.cSize;for(let a=0;a<360;a+=1){let n=i.noise(e,t,abs(a-180)/r);o=min(n,o),c=max(n,c),s.push(n)}for(let e=0;e<s.length;e++){let t=map(s[e],0,c,0,this.cSize/2*.9-this.sw*M),a=e;t=constrain(t,this.cSize/8,this.cSize/2);let r=i.cos(a)*t,o=i.sin(a)*t;n.push(createVector(r,o)),h=min(h,r),d=max(d,r),l=min(l,o),m=max(m,o)}const p=lerp(h,d,.5),f=lerp(l,m,.5);i.push(),i.strokeWeight(this.sw),i.translate(e,t),i.rotate(90),i.beginShape();for(let e of n)i.vertex(e.x-p,e.y-f);i.endShape(CLOSE),i.pop(),i.drawingContext.clip();let u=this.createGraphic(this.cSize/2,this.cSize,2);i.push(),i.translate(this.cSize/2,0),i.image(u,0,0),i.push(),i.scale(-1,1),i.image(u,0,0),i.pop(),i.pop(),u.remove()}drawJapanesePattern(e,t,a,r,i,n){switch(i.push(),i.translate(e,t),params.backgroundPattern){case"Mameshibori":this.drawMameshibori(a,r,i,n);break;case"Ichimatsu":this.drawIchimatsu(a,r,i,n);break;case"Shippo":this.drawShippo(a,r,i,n);break;case"Tatewaku":this.drawTatewaku(a,r,i,n);break;case"Seikaiha":this.drawSeikaiha(a,r,i,n)}i.pop()}drawMameshibori(e,t,a,r){let i=color(R.random_choice(this.palette));a.fill(i);let n=e/r,s=n/R.random_num(1.5,4);for(let e=0;e<=a.height;e+=n)for(let t=0;t<=a.width;t+=n){a.push(),a.translate(t,e),a.noStroke();let r=R.random_num(0,n/20)*(R.random_num(0,1)>.5?-1:1),i=noise(t,e),o=cos(360*i)*r,c=sin(360*i)*r;a.rotate(360*i),a.shearX(15*i),a.circle(o,c,s),a.pop()}}drawIchimatsu(e,t,a,r){let i=color(R.random_choice(this.palette)),n=0,s=e/r;for(let e=0;e<=a.height;e+=s)for(let t=0;t<=a.width;t+=s)a.push(),a.translate(t,e),a.noStroke(),a.fill(i),a.rectMode(CENTER),n++%2==0&&a.rect(t,e,2*s,2*s),a.pop()}drawShippo(e,t,a,r){let i=color(R.random_choice(this.palette)),n=e/r;a.push(),a.strokeWeight(n/R.random_num(15,30));for(let e=0;e<=a.height;e+=n)for(let t=0;t<=a.width;t+=n)a.push(),a.translate(t,e),a.noFill(),a.stroke(i),a.circle(0,0,n),a.stroke(i),a.circle(n/2,n/2,n),a.pop();a.pop()}drawTatewaku(e,t,a,r){let i=color(R.random_choice(this.palette)),n=e/r;a.stroke(i),a.strokeWeight(n*M*R.random_num(1/4,2));for(let e=0;e<r;e++)for(let t=0;t<r;t++){let r=e%2==1?180:0;a.push(),a.translate(n*(e+.5),3*n*t),a.noFill(),a.beginShape();for(let e=0;e<300;e++)a.vertex(n/4*sin(1.2*e+r),3*n/300*e);a.endShape(),a.pop()}}drawSeikaiha(e,t,a,r){let i=color(R.random_choice(this.palette)),n=i;for(;i==n;)n=color(R.random_choice(this.palette));let s=0,o=e/r;for(let e=0;e<=a.height;e+=o/4){for(let t=s%2==0?-o/2:0;t<=a.width+o;t+=o){a.push(),a.translate(t,e);let r=0;for(let e=1;e>0;e-=1/8)a.fill((s+r++)%2==0?i:n),a.noStroke(),a.circle(0,0,o*e);a.pop()}s++}}createGraphic(e,t,a){let r=createGraphics(e,t);return r.colorMode(HSB,360,100,100,100),r.angleMode(DEGREES),"Seikaiha"==params.backgroundPattern?(this.drawJapanesePattern(0,0,r.width,r.height,r,params.patternSize),this.recursiveGraphic(0,0,e,t,r,a)):(this.recursiveGraphic(0,0,e,t,r,a),this.drawJapanesePattern(0,0,r.width,r.height,r,params.patternSize),this.recursiveGraphic(0,0,e,t,r,a)),r}recursiveGraphic(e,t,a,r,i,n){for(let a=0;a<n;a++){let a=int(R.random_num(3,6)),s=a,o=r/a,c=r/s;for(let r=0;r<s;r++)for(let s=0;s<a;s++){let a=e+o*s,h=t+c*r;R.random_num(0,100)<90&&min(o,c)>i.height/5&&n>0?this.recursiveGraphic(a,h,o,c,i,n-1):this.drawPatterns(a,h,o,c,i)}}}drawPatterns(e,t,a,r,i){if(dist(e,t,0,i.height/2)>sqrt(2)*max(i.height,i.width)/2)return;let n,s,o=360*int(R.random_num(0,4))/4;o%180==0?(n=a,s=r):(n=r,s=a);let c=int(R.random_num(2,7));i.push(),i.translate(e+a/2,t+r/2),i.rotate(o),i.translate(-n/2,-s/2);let h=int(R.random_num(0,9));for(let e=c;e>0;e--)i.push(),i.scale(e/c),this.drawPattern(0,0,n,s,i,h,c/e),i.pop();i.pop()}drawPattern(e,t,a,r,i,n,s){i.drawingContext.shadowColor=color(0,0,0,33),i.drawingContext.shadowBlur=width/10;let o,c=R.random_choice(this.palette),h=R.random_choice(this.palette);for(;h==c;)h=R.random_choice(this.palette);switch(o=n<4?i.drawingContext.createLinearGradient(0,0,a,r):i.drawingContext.createRadialGradient(a/2,r/2,0,a/2,r/2,max(a,r)),o.addColorStop(0,h),o.addColorStop(1,c),i.drawingContext.fillStyle=o,i.stroke(0,0,20),i.strokeWeight(.2*M),n){case 0:i.arc(0,0,2*a,2*r,0,90,PIE);break;case 1:i.triangle(0,0,0,+r,+a,0);break;case 2:i.rect(0,0,a,r/2);break;case 3:i.triangle(0,0,a,r,a,t);break;case 4:i.circle(a/2,r/2,min(a,r));break;case 5:i.rectMode(CENTER),i.rect(a/2,r/2,min(a,r)),i.rectMode(CORNER);break;case 6:i.scale(s),i.circle(a,r,1*min(a,r)/s);break;case 7:i.scale(s),i.rectMode(CORNER),i.rect(a,r,1*min(a,r)/s),i.rectMode(CORNER);break;case 8:i.arc(0,0,a,r,0,90,PIE),i.scale(s),i.arc(a,r,a,r,180,270,PIE)}}shuffle(e){for(let t=e.length-1;t>=0;t--){let a=floor(R.random_num(0,1)*(t+1));[e[t],e[a]]=[e[a],e[t]]}return e}}const vert="\nprecision highp float;\nattribute vec3 aPosition;\nattribute vec2 aTexCoord;\n\nuniform mat4 uModelViewMatrix;\nuniform mat4 uProjectionMatrix;\n\nvarying vec2 vVertTexCoord;\n\nvoid main(void) {\n vec4 positionVec4 = vec4(aPosition, 1.0);\n gl_Position = uProjectionMatrix * uModelViewMatrix * positionVec4;\n vVertTexCoord = aTexCoord;\n}\n",frag="\nprecision highp float;\nvarying vec2 vVertTexCoord;\n\nuniform sampler2D source;\nuniform float noiseSeed;\nuniform float noiseAmount;\n \nfloat rand(vec2 n) { \n return fract(cos(dot(n, vec2(12.9898, 4.1414))) * 43758.5453);\n}\n\nvoid main() {\n // GorillaSun's grain algorithm\n vec4 inColor = texture2D(source, vVertTexCoord);\n gl_FragColor = clamp(inColor + vec4(\n mix(-noiseAmount, noiseAmount, fract(noiseSeed + rand(vVertTexCoord * 1234.5678))),\n mix(-noiseAmount, noiseAmount, fract(noiseSeed + rand(vVertTexCoord * 876.54321))),\n mix(-noiseAmount, noiseAmount, fract(noiseSeed + rand(vVertTexCoord * 3214.5678))),\n 0.\n ), 0., 1.);\n}\n";function getTexture(e,t){const a=createGraphics(e,t);a.randomSeed(seed),a.colorMode(HSB,360,100,100,100),a.angleMode(DEGREES),a.strokeWeight(.1*M);for(let r=0;r<e;r+=20*e/DEFAULT_SIZE)for(let i=0;i<t;i+=20*t/DEFAULT_SIZE){let n=a.random(75,105),s=max(e,t)/2;a.stroke(0,0,0,a.random(15)),a.line(r+a.cos(n)*s,i+a.sin(n)*s,r+a.cos(n+180)*s,i+a.sin(n+180)*s)}return a}class Random{constructor(){this.useA=!1;let e=function(e){let t=parseInt(e.substr(0,8),16),a=parseInt(e.substr(8,8),16),r=parseInt(e.substr(16,8),16),i=parseInt(e.substr(24,8),16);return function(){t|=0,a|=0,r|=0,i|=0;let e=(t+a|0)+i|0;return i=i+1|0,t=a^a>>>9,a=r+(r<<3)|0,r=r<<21|r>>>11,r=r+e|0,(e>>>0)/4294967296}};this.prngA=new e(tokenData.hash.substr(2,32)),this.prngB=new e(tokenData.hash.substr(34,32));for(let e=0;e<1e6;e+=2)this.prngA(),this.prngB()}random_dec(){return this.useA=!this.useA,this.useA?this.prngA():this.prngB()}random_num(e,t){return e+(t-e)*this.random_dec()}random_int(e,t){return Math.floor(this.random_num(e,t+1))}random_bool(e){return this.random_dec()<e}random_choice(e){return e[this.random_int(0,e.length-1)]}}
Generativemasks Japan Edition’ is a continuation of that algorithm and a new expression based on research of Japanese colours and patterns conducted with Junya Yamamine. We developed a video expression with an awareness of colour, design, and shading, referring to traditional Japanese patterns (和柄 Wagara) such as kimonos, folding screen paintings, and woodblock prints(浮世絵 Ukiyo-e). This research led to a special edition of ‘Generativemasks’ inspired by masks as ornaments of the Web3 era. "With the spread of new information technologies such as NFT, DAO, and with PFP (Profile Picture) in the spotlight, Takawo began to gain notoriety with his ‘Generativemasks’ themed as Masks for the Web 3.0 Era. However, as mentioned above, he has appeared from within the context of Japanese media art and has also advocated and continues to practice Daily Coding as an activity to connect programming with daily life, coming, climate, and indigenous culture since 2019. This time, he uses diverse cultures as a source of inspiration in his coding flexibly, and he has created a special edition of Generativemasks based on the study of traditional Japanese patterns and colours. This is an experiment for him to further develop his coding practice and training as a visual art form." - Junya Yamamine, curator
(()=>{"use strict";const t=new class{constructor(){this.useA=!1;let t=function(t){let e=parseInt(t.substr(0,8),16),n=parseInt(t.substr(8,8),16),r=parseInt(t.substr(16,8),16),o=parseInt(t.substr(24,8),16);return function(){e|=0,n|=0,r|=0,o|=0;let t=(e+n|0)+o|0;return o=o+1|0,e=n^n>>>9,n=r+(r<<3)|0,r=r<<21|r>>>11,r=r+t|0,(t>>>0)/4294967296}};this.prngA=new t(tokenData.hash.substr(2,32)),this.prngB=new t(tokenData.hash.substr(34,32));for(let t=0;t<1e6;t+=2)this.prngA(),this.prngB()}random_dec(){return this.useA=!this.useA,this.useA?this.prngA():this.prngB()}};function e(){return t.random_dec()}function n(t,n){return t+e()*(n-t)}function r(t){return t[Math.floor(e()*t.length)]}function o(t){let n=0;const r=e(),o=t.reduce(((t,[e,n])=>t+n),0);return(t.map((([t,e])=>(n+=1*e/o??1,[t,e,n]))).find((([t,e,n])=>r<n))??t[t.length-1])[0]}function a(t){for(let n=t.length-1;n>0;n--){const r=Math.floor(e()*(n+1));[t[n],t[r]]=[t[r],t[n]]}return t}let l,i=!1;const s=(t,n)=>{var r,o,a,s;if(i)r=l,i=!1;else{do{s=(o=e()-1)*o+(a=e()-1)*a}while(s>=1);r=o*(s=Math.sqrt(-2*Math.log(s)/s)),l=a*s,i=!0}return r*(n||1)+(t||0)};function c(t,e=0,n=0){return{tG:t.tG.map((([t,r])=>[t+e,r+n]))}}function d(t){t.tG=t.tG.map((([t,e])=>[t,1-e])).reverse()}function u(t,e,n,r){return t.map((t=>({...t,...r,layerHeight:t.noLayerHeight?void 0:1,tG:t.tG.map((([t,e])=>({y:n?1-t:t,x:e}))),isInverted:e})))}const h=[[-.12,.1],[-.06,.2],[0,.4],[.06,.2],[.12,.1]],f=[[-.15,.1],[-.075,.2],[0,.4],[.075,.2],[.15,.1]],g=[[-.225,.2],[-.15,.2],[-.075,.2],[0,.2],[.075,.2]],m=[[-.2,.2],[-.1,.2],[0,.2],[.1,.2],[.2,.2]],y=[[-.18,.2],[-.12,.2],[-.06,.2],[0,.2],[.06,.2]],p=[[-.12,.2],[-.06,.2],[0,.2],[.06,.2],[.12,.2]],M=[[-.24,.2],[-.18,.2],[-.12,.15],[-.06,.15],[0,.15],[.06,.1],[.12,.05]],G=[[-.15,.2],[-.075,.2],[0,.2],[.075,.2],[.15,.2]],x=[[-.12,.1],[-.06,.2],[0,.4],[.06,.2],[.12,.1]],b=[[-.12,.2],[-.09,.2],[-.06,.2],[-.03,.2],[0,.2]],D=[[0,.25],[.05,.25],[.1,.25],[.15,.25]],w=[[{code:"A",getLayers:(t,e,n,r,o,a)=>{const l={td:20,tm:.02,dd:100,dm:.0075};let i=!1,s=!1;e()>=.65&&(e()<.5?i=!0:s=!0);const g=r(h),m=r(h),y=r(f),p=r(f);let M=.75;!i&&s&&(M=.4),i&&s&&(M=.6),M+=g+m,t&&(M=1-M);let G=[{tG:[[.025,-.15],[.1,0],[.15,.1],[.5,.9],[.55,.95],[.6,1],[.65,1.15]]},{tG:[[-.2,-.15],[-.12,0],[0,.1],[.2,.4],[.35,.6],[.5,1],[.525,1.15]]},{tG:[[-.2,-.1],[-.12,.5],[0,.6],[.2,.75],[.3,1],[.35,1.15]]}].map((t=>c(t,g,y)));i&&G.forEach(d);let x=[{tG:[[1.15,-.15],[1.07,0],[1,.15],[.8,.3],[.75,.55],[.7,.6],[.6,.8],[.6,1],[.65,1.15]]},{tG:[[1.2,-.15],[1.12,0],[1,.2],[.85,.3],[.75,.6],[.7,1],[.7,1.15]]},t?void 0:{tG:[[1.2,-.1],[1.12,.05],[1,.25],[.9,.3],[.8,.6],[.85,1],[.875,1.15]]}].filter(Boolean).map((t=>c(t,m,p)));return s&&x.forEach(d),{layers:u(G,!t,t,l).concat(u(x,t,t,l)),sunX:M}}},.24],[{code:"B",getLayers:(t,e,n,r,o,a)=>{const l=e()>=.5,i=r(g),s=r(m);let h=1.5+i;t&&(h=1-h);const f=[{tG:[[1.15,-.2],[.95,0],[.65,.25],[.55,.45],[.6,.7],[.85,1],[1.1,1.2]]},{tG:[[1.05,-.2],[.75,0],[.375,.35],[.425,.75],[.7,1],[.95,1.2]]},{tG:[[.75,-.2],[.55,0],[.425,.15],[.25,.55],[.275,.7],[.55,1],[.85,1.2]]},{tG:[[.175,-.2],[.2,0],[.1,.15],[.35,.75],[.2,1],[.1875,1.05],[.225,1.2]]}].map((t=>c(t,i,s)));return l&&f.forEach(d),{layers:u(f,!t,t,{td:20,tm:.02,dd:100,dm:.0075}),sunX:h}}},.12],[{code:"C",getLayers:(t,e,n,r,o,a)=>{const l={td:20,tm:.02,dd:100,dm:.0075},i=e()>=.6,s=e()>=.6,h=r(y),f=r(p);let g=1.2;s&&(g=.7),g+=h+f,t&&(g=1-g);const m=[.35,.45];let M=[{tG:[[.675,0],[.725,.2],[.55,.35],[...m]],noLayerHeight:!0},{tG:[[.6,0],[.5,.1],[...m],[.4,.5],[.4,.55],[.35,.675],[.6,1]]},{tG:[[.5,0],[.225,.5],[.275,.65],[.5,1]]},{tG:[[-.18,.675],[0,.75],[.15,.8],[.35,1]]}].map((t=>c(t,h)));i&&M.forEach(d);let G=[{tG:[[1.12,.5],[1,.6],[.85,.7],[.7,1]]},{tG:[[1.12,.7],[1,.8],[.85,.925],[.8,1]]}].map((t=>c(t,f)));return s&&G.forEach(d),{layers:u(M,!t,t,l).concat(u(G,t,t,l)),sunX:g}}},.2],[{code:"D",getLayers:(t,e,n,r,o,a)=>{const l=e()>=.6,i=r(M),s=r(G);let h=2+i;t&&(h=1-h);const f=[.62,.45],g=[.93,1.05],m=[{tG:[[.5,-.15],[.45,0],[.4,.1],[...f],[.9,.7],[.99,.85],[.95,1],[...g],[.95,1.15]],noLayerHeight:!0},{tG:[[.9,-.15],[.8,0],[...f],[.4,1],[.3,1.15]]},{tG:[[.2,-.15],[.25,0],[.35,.5],[.9,1],[...g],[1.05,1.15]]},{tG:[[0,-.15],[.1,0],[.25,.65],[.6,1],[.75,1.15]]}].map((t=>c(t,i,s)));return l&&m.forEach(d),{layers:u(m,!t,t,{td:20,tm:.02,dd:100,dm:.0075}),sunX:h}}},.12],[{code:"E",getLayers:(t,e,n,r,o,a)=>{const l={td:20,tm:.02,dd:100,dm:.0075},i=e()>=.7,s=!!i&&e()>=.7,h=r(x),f=r(x);let g=.7;i&&s&&(g=.3),i&&!s&&(g=.5),g+=h+f,t&&(g=1-g);let m=[{tG:[[.55,0],[.55,.1],[.3,.3],[.3,.4],[0,.65],[-.12,.7]]},{tG:[[.25,0],[.35,.15],[.3,.3],[0,.5],[-.12,.575]]}].map((t=>c(t,h)));i&&m.forEach(d);let y=[{tG:[[1.12,.425],[1,.5],[.63,.7],[.35,1],[.3,1.12]]},{tG:[[1.12,.65],[1,.7],[.75,.8],[.65,1],[.61,1.12]]},{tG:[[1.12,.5],[1,.55],[.8875,.65],[.8,1],[.775,1.12]]}].map((t=>c(t,f)));return s&&y.forEach(d),{layers:u(m,!t,t,l).concat(u(y,t,t,l)),sunX:g}}},.14],[{code:"F",getLayers:(t,e,n,r,o,a)=>{const l={td:30,tm:.04,dd:150,dm:.002},i=r(b),s=-1*r(b);let d=.25;function h(t,n,r,o){let a=0,l=.03,i=r+l;for(;!(Math.abs(i-r)>.05&&(null==o||Math.abs(o-i)>.05))&&a++<100;){const a=t+(n/2+e()*(n/2)),s=Math.min(Math.abs(a-r),null==o?Number.MAX_SAFE_INTEGER:Math.abs(o-a));s>l&&(l=s,i=a)}return i}function f(t){const n=.4+.4*e(),r=t[1][0],o=t[2][0]-t[1][0],a=n-(.05+.1*e()),l=n+(.05+.1*e()),i=e();let s;s=i<.3?-.15:i<.5?.05:i<.7?.125:.25;const c=h(r+o*a,s,t[1][0]),d=h(r+o*a,s,c,t[2][0]);return[t[0],t[1],[c,a],[d,l],t[2],t[3]]}d+=i+s,t&&(d=1-d);const g=[c({tG:f([[.15,-.15],[.2,0],[.65,1],[.75,1.15]])},i,r(D)),c({tG:f([[.2,-.15],[.1,0],[.55,1],[.6,1.15]])},i,r(D))],m=[c({tG:f([[.3,-.15],[.35,0],[.75,1],[.8,1.15]])},s,r(D)),c({tG:f([[.475,-.15],[.5,0],[.9,1],[.95,1.15]])},s,r(D))];return{layers:u(g,!t,t,l).concat(u(m,t,t,l)),sunX:d}}},.18]],v={name:"Grainy",xDis:4,yDis:1,xDen:750,yDen:320,eYDis:0,aDRP:1,xDisp:(t,n)=>n?0:-1*r([128,128,64,32,16,4,2,1,1,0,0,-1,-1])*Math.sin(50*e()/25)*t/2e3};let k,B;function I(t,e,r,o,a){if(!o)return 0;null==k&&(k=function(){const t=Math.PI/2,e=()=>n(.06,.18),r=e(),o=[[-1*t,r],[t,r]];let a=-1*t+r;for(;a<-1*t+1.5;){const t=e();a+=t,o.unshift([a,t]),a+=t}for(a=t-r;a>1*t-1.5;){const t=e();a-=t,o.push([a,t]),a-=t}return o}()),null==B&&(B=n(.15,.2));const l=Math.atan((t-r.center.x*P)/(e-r.center.y*N));for(const t of k)if(l>t[0]-t[1]&&l<t[0]+t[1])return Math.max(0,Math.min(1,1-a(Math.abs(l-t[0])/t[1],B)));return 0}const{code:L,primary:E,secondary:A}=r([{code:"A",primary:{c:[177,90,10],bg:[186,100,16,.5],fg:[[360,100,83],[48,87,53],[31,93,50],[270,100,66]]},secondary:{c:[177,90,10],bg:[186,100,16,.5],fg:[[360,71,95],[48,93,93],[31,44,89],[270,13,89]]}},{code:"B",primary:{c:[190,100,12],bg:[192,95,17,.5],fg:[[43,100,71],[148,83,60],[163,57,56]]},secondary:{c:[190,100,12],bg:[192,95,17,.5],fg:[[43,70,96],[148,54,95],[163,100,98]]}},{code:"C",primary:{c:[196,100,10],bg:[198,95,16,.5],fg:[[39,92,46],[330,50,66],[337,68,51]]},secondary:{c:[196,100,10],bg:[198,95,16,.5],fg:[[39,70,96],[330,38,88],[337,100,96]]}},{code:"D",primary:{c:[207,82,22],bg:[207,58,30,.5],fg:[[328,67,75],[41,83,52],[335,76,58],[266,35,52],[172,83,65]]},secondary:{c:[207,82,22],bg:[207,58,30,.5],fg:[[328,73,97],[41,63,92],[335,47,94],[266,4,87],[172,29,90]]}},{code:"E",primary:{c:[210,91,26],bg:[202,86,31,.5],fg:[[360,100,66],[306,82,66],[31,96,62],[254,88,73]]},secondary:{c:[210,91,26],bg:[202,86,31,.5],fg:[[360,65,89],[306,49,92],[31,54,91],[254,100,98]]}},{code:"F",primary:{c:[212,55,14],bg:[212,54,22,.5],fg:[[33,98,52],[46,99,51],[192,68,46],[196,75,79]]},secondary:{c:[212,55,14],bg:[212,54,22,.5],fg:[[33,94,90],[46,78,94],[192,17,94],[196,44,97]]}},{code:"G",primary:{c:[219,36,17],bg:[219,34,23,.5],fg:[[2,84,69],[312,56,54],[282,80,80],[236,100,65]]},secondary:{c:[219,36,17],bg:[219,34,23,.5],fg:[[2,67,90],[312,100,94],[282,100,97],[236,100,96]]}},{code:"H",primary:{c:[232,100,54],bg:[220,100,54,.5],fg:[[342,95,85],[28,100,68],[301,82,71],[191,90,76]]},secondary:{c:[232,100,54],bg:[220,100,54,.5],fg:[[342,100,99],[28,100,94],[301,25,92],[191,85,96]]}},{code:"I",primary:{c:[262,36,18],bg:[261,32,28,.5],fg:[[334,97,87],[38,89,55],[264,43,54],[203,90,76]]},secondary:{c:[262,36,18],bg:[261,32,28,.5],fg:[[334,97,93],[38,99,95],[264,59,96],[203,100,98]]}}]),S=o([["Layered",.85],["Gradient",.15]]);let R=e(),H="None";R>=.66&&(H="Moderate"),R>=.76&&(H="Severe"),R>=.86&&(H="Total");const C=16/9,X=C,P=1.8838383838383836,N=1,T=.06,z=.1714,_=v,F=o(w),Y=e()>=.5,{layers:j,sunX:U}=F.getLayers(Y,e,r,o,s,n),W={None:0,Moderate:.25,Severe:.5,Total:1}[H],q=function(t,e){var n;return{center:{x:-.2,y:t+=(n=e(0,.025),-.05,.05,Math.min(.05,Math.max(-.05,n)))}}}(U,s);let O=parseInt(new URLSearchParams(window.location.search).get("size")??0,10)||Math.min(window.innerHeight/C,window.innerWidth);const $=()=>O;function J(t,e){if(t<0||t>P||e<0||e>N)return!0}const K=()=>{const t={td:1,tm:0,dd:1,dm:0,layerHeight:.7,isBackground:!0};return[{tG:[{x:0,y:0},{x:1,y:0}],...t},{tG:[{x:0,y:0},{x:1,y:0}],...t,isInverted:!0}]};parseInt(new URLSearchParams(window.location.search).get("size")??0,10),new p5((t=>{let o,l,i,c,d,u,h,f,g;const m=[];let y,p;function M(){o=!0,l=1,i=!1,c=!0,t.frameRate(60)}function G(t){const n=e()<.5;if(1===t.fg.length)return null==t.l?[t.fg[0],t.fg[0]]:n?[t.fg[0],t.l]:[t.l,t.fg[0]];let o,a;for(;!o||!a;)o=r(t.fg),a=r(t.fg.filter((t=>t.join(",")!==o.join(","))).filter((t=>(n?t[0]-o[0]:o[0]-t[0])<180)));return[n?o:a,n?a:o]}function x(t,e,n){let[r,o,a,l]=t,[i,s,c,d]=e;Math.abs(r-i)>180&&(r<i?r+=360:i+=360);const u=[(r+n*(i-r))%360,o+n*(s-o),a+n*(c-a)];return null==l&&null==d||u.push((l??1)+n*((d??1)-(l??1))),u}function b(t,e,n){if(e.noStroke(),!n&&!o&&!i)return void e.noLoop();if(n||e.loop(),!n&&i){if(d<0)return void(-30===d?(c=!0,d=0):d--);if(d>u-1)return void(d===u-1+30?(c=!1,d=u-1):d++)}let r,a,s,g;(n||o&&1===l)&&e.background(...E.c);for(let u=0;u<f[0].length;u++)for(let m=0;m<f.length;m++)if(n||o&&f[m][u]===l-1||i&&h[m][u]===d){r=Math.round((T+1.6577777777777776*m/(P/z))*t()),s=Math.round((T+.88*u/(N/z))*t()),a=Math.round((T+1.6577777777777776*(m+1)/(P/z))*t()),g=Math.round((T+.88*(u+1)/(N/z))*t());const l=n&&h[m][u]<d||o&&h[m][u]<d||i&&h[m][u]===d&&c;e.fill(...l?A.c:E.c),e.rectMode(e.CORNERS),e.rect(s,r,g,a)}for(const l of m)for(const u of l.columnLayers)for(let f=0;f<u.length;f++)for(let m=0;m<u[f].length;m++){if(null==u[f][m])continue;const{x:M,y:G,isInSun:b,resolutionThreshold:D}=u[f][m],w=1e3/e.pixelDensity();if(t()<w&&D>Math.max(100,t())/w)continue;const v=Math.floor(M/z),k=Math.floor(G/z),B=(T+1.6577777777777776/P*M)*t(),I=(T+.88/N*G)*t();if(!n&&(o||i)&&(B<r||B>a||I<s||I>g))continue;const L=n&&h[v][k]<d||o&&h[v][k]<d||i&&c;let R=l.isBackground?1:((u[f].length-m)/u[f].length)**_.aDRP;if(b&&(R*=1-b),R>.001){let n;if("Layered"===S)n=e.color(...L?l.alternateColor:l.color);else if("Gradient"===S){const t=L?p:y;n=l.isBackground?e.color(...L?A.bg:E.bg):x(t[0],t[1],M/P)}e.fill(e.hue(n),e.saturation(n),e.lightness(n),e.alpha(n)*R),e.ellipse(I,B,.001*t())}}if(!n){if(o){if(l===u)return e.noLoop(),o=!1,!0;l++}i&&(d+=c?1:-1)}}t.setup=()=>{!function(){g=[...K(),...j];for(let t=0;t<g.length;t++){const o=g[t],a={template:[],detail:[],columnLayers:[],height:o.layerHeight??0,isBackground:o.isBackground,isInverted:o.isInverted,color:o.isBackground?E.bg:r(E.fg),alternateColor:o.isBackground?A.bg:r(A.fg)},l=P/o.td;a.template=new Array(o.td+1).fill(void 0);for(const{x:t,y:e}of o.tG)a.template[Math.round(t*o.td)]={x:Math.round(t*o.td)/o.td*P,y:e,isGuideline:!0};for(let t=0;t<a.template.length;t++){const e=t*l;if(null==a.template[t]){const r=o.tG.findIndex((e=>e.x>t/o.td))-1,l=o.tG[r];if(null==l)continue;const i=o.tG[r+1];if(null==i)continue;const s=l.y+(i.y-l.y)*(e-l.x*P)/(i.x*P-l.x*P);let c;for(;;){if(o.isBackground){c=s;break}if(c=s+n(-o.tm,o.tm),l.y===i.y)break;if(!(c>=Math.max(l.y,i.y)||c<=Math.min(l.y,i.y)))break}a.template[t]={x:e,y:c}}}a.template=a.template.filter(Boolean);let i,c=a.template[0].y;for(let t=1;t<a.template.length;t++){i=a.template[t].y;const e=a.template[t].x,r=Math.round(o.dd/o.td),s=l/r;for(let l=0;l<r;l++){const r=a.template[t-1].x+l*s;a.detail.push({x:r,y:c});const d=s*(i-c)/(e-r);c+=n(d-o.dm,d+o.dm)}}a.detail.push({x:a.template[a.template.length-1].x,y:c});for(let r=0;r<3;r++){const r=[],l=Math.min(...a.detail.map((t=>t.y))),i=Math.max(...a.detail.map((t=>t.y))),c=!a.isInverted||a.isBackground?Math.min(i+a.height,N):Math.max(l-a.height,0),d=1/_.xDen,u=Math.round(a.detail[0].x*_.xDen/P),h=Math.round(a.detail[a.detail.length-1].x*_.xDen/P)-u;for(let l=0;l<h;l++){const i=(u+l)*d*P,f=(a.detail.length-1)*l/(h-1)%1,g=Math.floor((a.detail.length-1)*l/(h-1)),m=Math.ceil((a.detail.length-1)*l/(h-1));let y,p;a.isBackground?a.isInverted?(y=1-a.height+n(-.3,.3),p=1):(y=0,p=a.height+n(-.3,.3)):(y=a.detail[g].y+f*(a.detail[m].y-a.detail[g].y),p=a.isInverted?c-(1-c)*e():c+(1-c)*e());const M=!a.isInverted||a.isBackground?Math.round(_.yDen*(p-y))*1.25**t:Math.round(_.yDen*(y-p))*1.25**t,G=!a.isInverted||a.isBackground?1/(M-1)*(p-y):1/(M-1)*(y-p);y+=n(-_.eYDis*G,_.eYDis*G);const x=[];for(let t=0;t<M;t++){const r=!a.isInverted||a.isBackground?y+t*G+G*n(-_.yDis/2,_.yDis/2):y-t*G+G*n(-_.yDis/2,_.yDis/2),l=i+(d/2+d*n(.5*-_.xDis,.5*_.xDis)+_.xDisp(t,a.isBackground))*P;x.push(J(l,r)?void 0:{x:l,y:r,isInSun:I(l,r,q,o.isBackground,s),resolutionThreshold:e()})}r.push(x)}a.columnLayers.push(r)}m.push(a)}}(),y=G(E),p=a(G(A)),h=new Array(Math.ceil(P/z)).fill(0).map((t=>new Array(Math.ceil(N/z)).fill(0))),u=h.flat().length;const o=a(new Array(u).fill(0).map(((t,e)=>e)));for(let t=0;t<h.length;t++)for(let e=0;e<h[t].length;e++)h[t][e]=o[t*h[t].length+e];f=new Array(Math.ceil(P/z)).fill(0).map((t=>new Array(Math.ceil(N/z)).fill(0)));const l=a(new Array(u).fill(0).map(((t,e)=>e)));for(let t=0;t<f.length;t++)for(let e=0;e<f[t].length;e++)f[t][e]=l[t*f[t].length+e];M(),d=Math.floor(W*u),t.randomSeed(1e3*e()),t.noiseSeed(1e3*e()),t.noiseDetail(2),t.createCanvas(Math.round(1*$()),Math.round(X*$())),t.colorMode(t.HSL),t.angleMode(t.DEGREES),t.frameRate(60)},t.draw=()=>{b($,t)},t.windowResized=()=>{var e;[/HeadlessChrome/i].some((t=>navigator.userAgent.match(t)))||(M(),e=Math.min(window.innerHeight/X,window.innerWidth),O=e,t.resizeCanvas(1*$(),X*$()))},t.keyPressed=()=>{const e={48:0,49:.25,50:.5,51:.75,52:1}[t.keyCode];if(null!=e&&(M(),d=Math.floor(e*u),console.log(`Setting glitch percentage to ${Math.round(100*e)}%`),t.loop()),83===t.keyCode){if(o)return;i&&(i=!1,t.frameRate(60)),console.log("Downloading print...");const e=t.createGraphics(Math.round(3946),Math.round(7015.11111111111));e.colorMode(t.HSL),e.angleMode(t.DEGREES),e.pixelDensity(1),b((()=>3946),e,!0),e.save("corral-print.png"),console.log("Download of print complete.")}},t.mouseClicked=()=>{o||(i?(i=!1,t.frameRate(60)):(i=!0,t.frameRate(10),t.loop()))}}))})();
A generative artwork reminding us of the importance of gathering together to confine our impact on ecosystems. [Co(r)ral](https://www.phaust.art/co-r-ral) highlights the process of coral bleaching and our ability to act to reverse it. Co(r)ral builds upon [Pointila](https://www.phaust.art/pointila) – a long form generative art collection released on Art Blocks in September 2022. Pointila explored how dots reminiscent of Pointillist painting could create a range of generative landscapes in different styles. Co(r)ral dives beneath the ocean. Its verticality a reminder of hidden depths. Its colours inspired by the vibrancy of coral reefs. Like those reefs, it is dynamic: existing between a healthy, colourful state and a damaged, bleached state. Just as coral can recover from bleaching if temperatures drop and conditions normalise so Co(r)ral loops between those states – a reminder of our responsibility to act to reverse the damage. Co(r)ral can be displayed in triptych to highlight the change in state. It can be displayed as a looping, live artwork or as a single interactive piece. Clicking on a live piece will trigger an animation loop between its healthy, colourful state and its stressed bleach state. Clicking again will pause the loop. When viewed up close, you can see the distinct dots that create the piece.
function loadScript(e,t){var a=document.getElementsByTagName("head")[0],n=document.createElement("script");n.type="text/javascript",n.src=e,n.onreadystatechange=t,n.onload=t,a.appendChild(n)}const gw=tokenData.preferredIPFSGateway;for(let e=0;e<tokenData.externalAssetDependencies.length;e++)loadScript(`${gw}${tokenData.externalAssetDependencies[e].cid}`);const svg=document.createElementNS("http://www.w3.org/2000/svg","svg");svg.setAttribute("viewBox","0 0 600 800"),svg.setAttribute("role","img"),svg.style.maxWidth="100vh",svg.style.maxHeight="100vh",document.body.appendChild(svg);const width=svg.viewBox.baseVal.width-20,height=svg.viewBox.baseVal.height-30;function render(e,t,a,n){e.innerHTML="";let s=chooseRnd(["GhostWhite","black"]);e.viewBox.baseVal.width,e.viewBox.baseVal.height;const d=document.createElementNS(e.namespaceURI,"rect");d.setAttribute("x",0),d.setAttribute("y",0),d.setAttribute("width","100%"),d.setAttribute("height","100%"),d.setAttribute("fill",s),e.appendChild(d),R.random_dec()<.93||"black"!=s?(drawEmotionGrid(e,t,a,n,s),drawText(e,t,a,n,s)):(drawRandomText(e,t,a,n,s),drawGlyph(e,t,a,n,s))}window.addEventListener("load",function(e){let t=Math.floor(35*R.random_dec());fetchData(t)}),window.addEventListener("keydown",function(e){"s"==e.key&&saveSVG(svg,"HYPERTYPE_"+Date.now()+".svg")});