0xf1da6e2d…0013sent to0x1353fd9d…e4e8·#17,077,367·view on Etherscan
//Memory Loss by Andrew Mitchell
class Random{constructor(){this.useA=!1;let e=function(e){let t=parseInt(e.substr(0,8),16),r=parseInt(e.substr(8,8),16),n=parseInt(e.substr(16,8),16),c=parseInt(e.substr(24,8),16);return function(){n|=0;let e=((t|=0)+(r|=0)|0)+(c|=0)|0;return c=c+1|0,t=r^r>>>9,r=n+(n<<3)|0,n=(n=n<<21|n>>>11)+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 t=0;t<1e6;t+=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)]}}class Mediator{constructor(){}call(e,t,r,n,c,o=0,s=1){n.push(),n.translate(t,r),this.applyRotation(radians(o),n),this.resize(s,n),n.translate(-t,-r),e(c),n.pop()}applyRotation(e,t){t.rotate(e)}resize(e,t){t.scale(e,e)}}let colorPalettes=[["112b73","133081","0f2562","1e87c3","1c7ab0","1f89c7","52a588","5bae91","4a967c","484068","4c446f","443c62","abcfad","7d91ac","36867f"],["c4bf95","c8c49d","ccc8a4","5a780d","526e0c","56740b","799341","7e9a42","a4885c","a68c64","adb279","acaf83","c8c148","bc8f2d"],["eb6521","ed763b","e06324","c74618","bf4418","cf400c","a56a32","a46932","d7c314","decb1b","111d6f","a6bcc1","860f21","2b3706"],["e3d6c7","eee6dd","e0d3c2","eadfd1","c0022d","b6022c","ca0231","721543","5a1136","7da29d","85a8a3","1d4260","1b3e5a","eb85c7","854c8c"],["aa805c","ae8765","ae8d6f","542840","5a2b45","482337","b10726","a60724","417708","52831e","72a277","002ad2","776b9a","c9d191"],["12151d","101219","0e1016","ceb31b","cbb11a","c7ad1a","7f0b25","750a21","be7113","b46c13","397748","cb4b46","408175","d7d98b"],["f8f9fa","e9ecef","dee2e6","ced4da","adb5bd","6c757d","495057","343a40","212529"],["d7d9c5","d5d7c1","d9dbc7","d9dbc7","b32b44","b62b44","b92d46","c58481","c78885","c68480"],["1e6fe8","2674e8","246fe0","1764d9","2a5314","264a12","785019","6e4a17","6350b6","6856b8","851a54","77184c","a48a15","9e8410","9f3a04","953704"],["9c4a6e","f8f1f4","9d4b6f","ebd5df","debaca","e4c8d4","ddbbca","b1597f","cb90a9","d09ab1"],["e8d2a9","ead3a9","ead5ae","e7cfa2","e8d1a6","e8d3ab","b6201e","b3211e","3f799f","40779c","a49228","a08e27","5e6d33","596831"],["dbc7a6","ddcaac","e1cdad","0d1228","0a0e1f","101632","d70200","e00400","c30704","48694c","446448","405e44","d6b32b","d7b52d","122948","102641"],["06142c","071631","06142d","051229","e2d2ac","e3d4b1","e3d5b5","a6b15d","a4af5a","568047","547e45","e8ae77","a77d4d","b1443d","276687"]],random=new Random,mediator=new Mediator,backgroundColor,r1,r2,r3,r4,r5,r6,r7,pgBeziers,finalCanvas,temporaryCanvas,incrementDegree,start,end,curveDirectionLeft,curveDirectionRight,curveFunctionRight,curveFunctionLeft,curveDegreeLeft,curveDegreeRight,curveRadiusRight,curveRadiusLeft,smallerDimension,textColor,circleX,w20,circleFunction,d,i,section,colorPalette,circleRadius,nWidthMax,nWidthMin,black="#0E0E10",black2="#403f42",white="#fdfff5";function shuffle2(e){for(let t=0;t<3;t++)for(let r=e.length-1;r>0;r--){let n=random.random_int(0,e.length-1),c=e[r],o=e[n];e[r]=o,e[n]=c}return e}function setup(){noiseSeed(random.random_int(0,1e4)),incrementDegree=.1,createCanvas(500,500),pgBeziers=createGraphics(500,500),temporaryCanvas=createGraphics(500,500),finalCanvas=createGraphics(500,500),pixelDensity(6),pgBeziers.pixelDensity(6),temporaryCanvas.pixelDensity(6),finalCanvas.pixelDensity(6),strokeJoin(CURVE),colorPalettes=shuffle2(colorPalettes),smallerDimension=windowWidth<windowHeight?windowWidth:windowHeight,backgroundColor="#"+(colorPalette=random.random_choice(colorPalettes))[0];let e=colorPalette[0];pgBeziers.background(backgroundColor),textColor="#"+colorPalette[colorPalette.length-1],colorPalette=shuffle2(colorPalette);for(let t=0;t<colorPalette.length;t++)colorPalette[t]="#"+colorPalette[t];nWidthMin=0,nWidthMax=500,circleFunction=Math.cos,curveFunctionRight=Math.sin,curveFunctionLeft=Math.sin,curveDirectionLeft=random.random_choice([-1,1]),curveDirectionRight=random.random_choice([-1,1]),circleX=0,w20=25,w40=12.5,w80=6.25,ww20=525,h20=height/20,h30=height/30,d=100,i=-8*w20,section=1,curveDegreeRight=PI,curveDegreeLeft=PI,_strokeWeight=2,pgBeziers.noFill(),r1=random.random_bool(.8)?random.random_int(12,25):random.random_int(12,30),r2=(r2=random.random_bool(.98)?random.random_int(-5,-5)+r1:random.random_int(12,25))<10?r1:r2,r3=1.5,r4=1.4,r5=1.3,r6=1.2,r7=1.1,getX=function(e,t){return e/r1},getY=function(e,t){return t/r2};let r={};r.ColorPalette=e,console.log(r)}function draw(){switch(section){case 1:a(),i>height&§ion++,i+=1.5*_strokeWeight;break;case 2:a(),i>2*height&§ion++,i+=2*_strokeWeight;break;case 3:a(),i>4*height&&(section=4,push(),fill(textColor),stroke("#000000"),500===width?textSize(12):textSize(24),text("Loading...",width/2-28,height/2),pop()),i+=2*_strokeWeight;break;case 4:temporaryCanvas.image(pgBeziers,0,0,width,height),temporaryCanvas.filter(BLUR,10),temporaryCanvas.filter(POSTERIZE,5),section++;break;case 5:finalCanvas.tint(255,128),finalCanvas.image(temporaryCanvas,0,0,width,height),finalCanvas.tint(255,128),finalCanvas.image(pgBeziers,0,0,width,height),finalCanvas.filter(ERODE),finalCanvas.image(pgBeziers,0,0,width,height),finalCanvas.filter(ERODE),finalCanvas.image(pgBeziers,0,0,width,height),finalCanvas.filter(DILATE),finalCanvas.image(pgBeziers,0,0,width,height),finalCanvas.filter(DILATE),clear(),tint(255,255),image(finalCanvas,0,0,width,height),document.getElementsByTagName("canvas")[0].style.width=smallerDimension+"px",document.getElementsByTagName("canvas")[0].style.height=smallerDimension+"px",document.getElementById("defaultCanvas0").style.filter="brightness(1.2) contrast(1.2)",noLoop()}document.getElementsByTagName("canvas")[0].style.width=smallerDimension+"px",document.getElementsByTagName("canvas")[0].style.height=smallerDimension+"px",document.getElementById("defaultCanvas0").style.filter="brightness(1.2) contrast(1.2)"}function a(){circleRadius=random.random_int(width,2*width),curveRadiusRight=random.random_int(0,100),curveRadiusLeft=random.random_int(0,100),start=nWidthMin+(circleX=circleRadius*circleFunction(d))+curveDirectionLeft*curveRadiusLeft*curveFunctionLeft(curveDegreeLeft),end=nWidthMax+circleX+curveDirectionRight*curveRadiusRight*curveFunctionRight(curveDegreeRight),d+=incrementDegree,curveDegreeRight+=incrementDegree,curveDegreeLeft+=incrementDegree;let e=-w20,t=start,r=end,n=width+w20,c=i,o=-w20,s=-w20,$=i;for(let l=0;l<=400;l++){let _=l/400,f=pgBeziers.bezierPoint(e,t,r,n,_),m=pgBeziers.bezierPoint(c,o,s,$,_);f>-w20&&m>-w20&&f<ww20&&m<ww20&&(splat(f,m,r3),splat(f,m-1,r4),splat(f,m-2,r5),splat(f,m-3,r6),splat(f,m-4,r7))}image(pgBeziers,0,0,width,height)}function splat(e,t,r){pgBeziers.push();let n=noise(getX(e,t),getY(e,t)),c=10*n*random.random_int(-1,1);random.random_int(-1,1),pgBeziers.translate(e,t),pgBeziers.rotate(radians(720*n)),pgBeziers.translate(-e,-t);let o=n;o=o<.2?.5*r:o<.4?2*r:o<.6?r:1.5*r,pgBeziers.strokeWeight(o);let s=color(colorPalette[Math.floor(n*colorPalette.length)]);s.setAlpha(255*n),pgBeziers.stroke(s),pgBeziers.bezier(e,t,e,t,e,t+c,e+10,t),pgBeziers.pop()}let value=1;function mouseClicked(){section>4&&(0===value?(clear(),image(finalCanvas,0,0,width,height),value=1):(clear(),image(temporaryCanvas,0,0,width,height),value=0))}function fitToWidth(){document.getElementsByTagName("canvas")[0].style.width=smallerDimension+"px",document.getElementsByTagName("canvas")[0].style.height=smallerDimension+"px"}