0x740da587…dd20sent to0xa7d8d9ef…d270·#15,499,407·view on Etherscan
var noisePos,p,varStroke,noiseColor,hash=tokenData.hash;class Random{constructor(){this.useA=!1;let a=function(a){let c=parseInt(a.substr(0,8),16),d=parseInt(a.substr(8,8),16),e=parseInt(a.substr(16,8),16),f=parseInt(a.substr(24,8),16);return function(){e|=0;let a=((c|=0)+(d|=0)|0)+(f|=0)|0;return f=f+1|0,c=d^d>>>9,d=e+(e<<3)|0,e=e<<21|e>>>11,e=e+a|0,(a>>>0)/4294967296}};this.prngA=new a(tokenData.hash.substr(2,32)),this.prngB=new a(tokenData.hash.substr(34,32));for(let c=0;c<1e6;c+=2)this.prngA(),this.prngB()}random_dec(){return this.useA=!this.useA,this.useA?this.prngA():this.prngB()}random_num(a,c){return a+(c-a)*this.random_dec()}random_int(a,c){return Math.floor(this.random_num(a,c+1))}}let R=new Random,Seed=999999999*R.random_num(0,1),b;var n1=R.random_num(10,150),n2=R.random_num(80,130),colorParameter=R.random_num(0,100),c1=R.random_num(50,255),c2=R.random_num(50,255),c3=R.random_num(50,255),dC=R.random_num(-20,20),dS=R.random_num(-20,20),mult=R.random_num(-50,50),div1=R.random_num(2,10),div2=R.random_num(-10,10),div3=R.random_num(-10,10),div4=R.random_num(-10,10),divParameter=R.random_num(0,1),strokeParameter=R.random_num(0,1),noiseParameter=R.random_num(0,1),strokeP=R.random_num(0,1);xx1=R.random_num(.01,.06),xx2=R.random_num(.02,.06),xxc=R.random_num(.01,.05),noiseX=R.random_num(1,.001),noiseY=R.random_num(1,.001);let backgroundColor=["#F5F5DC","#FDF5E6","#FAF0E6","#FAEBD7","#FFEBCD","#FFFFF0","#FFF8DC","#FFF5EE","rgb(210,210,180)"],choiceBackgroundColor=R.random_int(0,8),parameterTextura=R.random_num(0,1);function setup(){createCanvas(windowWidth,windowHeight),setPg(),pg.angleMode(DEGREES),pg.background(backgroundColor[choiceBackgroundColor]),pg.noiseSeed(R.random_num(100,1e4))}function draw(){pg.push(),sketch(),pg.pop(),parameterTextura>.5?(pg.push(),texturBlack(0),pg.pop(),pg.push(),texturWhite(255),pg.pop()):(pg.push(),textur3(),pg.pop()),border(),noLoop(),drawPg()}function border(){pg.noFill(),pg.push(),pg.translate(-0,-0),pg.stroke(225,255),pg.strokeWeight(15),pg.rect(0,0,pg.width,pg.height),pg.pop()}function textur(){for(let a=0;a<=pg.width;a+=3)for(let c=0;c<2*pg.height;c+=R.random_num(0,5))pg.stroke(75,85),pg.point(a,c,1e-5),pg.push(),pg.stroke(255,100),pg.point(a+5,c+5,1e-5),pg.pop()}function texturBlack(c){pg.strokeWeight(1),resetRandom();for(let a=0;a<pg.height;a+=3)pg.stroke(c,R.random_num(0,30)),pg.line(0,a,pg.width,a),pg.line(a,0,a,pg.height)}function texturWhite(c){pg.strokeWeight(1),resetRandom();for(let a=0;a<pg.height;a+=3)pg.stroke(c,R.random_num(0,30)),pg.line(0,a+10,pg.width,a+10),pg.line(a+10,0,a+10,pg.height)}function textur3(){pg.strokeWeight(1);for(let a=0;a<=pg.width;a+=3)for(let c=0;c<pg.height;c+=R.random_num(0,5))pg.stroke(75,85),pg.point(a,c),pg.push(),pg.stroke(255,100),pg.point(a+5,c+5),pg.pop()}function sketch(){for(let a=100;a<pg.width-R.random_num(10,100);a+=R.random_num(.05,2.5))for(let c=100;c<pg.height-R.random_num(20,100);c+=R.random_num(.05,3)){p=noiseParameter>.8?pg.cos((a+c)*div1)/pg.sin(a/c*div2):noiseParameter>.6?pg.cos((a-c)*div3)*pg.cos(c*a*div4):noiseParameter>.4?pg.sin(a*div3)*pg.sin(c*div4):noiseParameter>.2?pg.sin((a+c/a)*div3)*tan(c/a*div4):pg.sin((a+c/a)*div3)/pg.cos(c/a*div4),varStroke=strokeP>.75?6*pg.cos((a/dC-c/dS)*mult)*pg.sin((a-c)/dS):strokeP>.5?6*pg.cos((a/dC-c/dS)*mult)*pg.cos((a-c)/dS):strokeP>.25?6*pg.cos((a/dC-c/dS)*mult)*pg.sin(a/dS):6*pg.sin((a/dC-c/dS)*mult)*pg.sin((a-c)/dS);let e=strokeParameter>.33&&strokeParameter<=.66?0:60,d=pg.noise(.01*a,.1*c)*R.random_num(150,255);strokeParameter>.66?(noisePos=pg.noise((xx1,c*xx2*n1**p)),pg.strokeWeight(varStroke)):strokeParameter>.33?(noisePos=pg.noise(a*xx1,c*xx2)*n2,pg.strokeWeight(noisePos/R.random_num(10,50))):strokeParameter>.16?a<pg.width/2?(noisePos=pg.noise((xx1,c*xx2*n1**p)),pg.strokeWeight(varStroke)):(noisePos=pg.noise(a*xx1,c*xx2)*n2,pg.strokeWeight(noisePos/R.random_num(10,50))):a>pg.width/2+20?(noisePos=pg.noise((xx1,c*xx2*n1**p)),pg.strokeWeight(varStroke)):(noisePos=pg.noise(a*xx1,c*xx2)*n2,pg.strokeWeight(noisePos/R.random_num(10,50))),colorParameter/(b=divParameter>.05?1:divParameter>.04?cos(a/dC-c/dS)/cos(a+c):divParameter>.03?cos(a/dC-c/dS)*cos(a+c):divParameter>.02?cos((a+c)/dS):sin((a-c)/dC))>95?(pg.stroke(R.random_num(100,200),d-c2,250-c1),pg.point(a,c+noisePos-pg.height/20),pg.stroke(250-c3,d-c2,d-c3),pg.point(a-noisePos-e+pg.height/20,c,.5)):colorParameter/b>90?(pg.stroke(c1,d,c2),pg.point(a,c+noisePos-pg.height/20),pg.stroke(d,d,c3),pg.point(a-noisePos-e+pg.height/20,c,.5)):colorParameter/b>85?(pg.stroke(d-c1,d,c2),pg.point(a,c+noisePos-pg.height/20),pg.stroke(c1,c2,d),pg.point(a-noisePos-e+pg.height/20,c,.5)):colorParameter/b>80?(pg.stroke(c3,d-c1,d-c2,d),pg.point(a,c+noisePos-pg.height/20),pg.stroke(250-c1,d-c2,c2,d),pg.point(a-noisePos-e+pg.height/20,c,.5)):colorParameter/b>75?(pg.stroke(d+c1,d-c1,250-c3),pg.point(a,c+noisePos-pg.height/20),pg.stroke(d-c1,d-c2,d,d),pg.point(a-noisePos-e+pg.height/20,c,.5)):colorParameter/b>70?(pg.stroke(d-c1,d+c3,100),pg.point(a,c+noisePos-pg.height/20),pg.stroke(d,100,c3),pg.point(a-noisePos-e+pg.height/20,c,.5)):colorParameter/b>65?(pg.stroke(d,R.random_num(20,150),c2),pg.point(a,c+noisePos-pg.height/20),pg.stroke(250,d,d),pg.point(a-noisePos-e+pg.height/20,c,.5)):colorParameter/b>60?(pg.stroke(200,d-c1,250),pg.point(a,c+noisePos-pg.height/20),pg.stroke(d,d-c1,c3),pg.point(a-noisePos-e+pg.height/20,c,.5)):colorParameter/b>55?(pg.stroke(R.random_num(20,150),d,R.random_num(20,150)),pg.point(a,c+noisePos-pg.height/20),pg.stroke(250,d,c3),pg.point(a-noisePos-e+pg.height/20,c,.5)):colorParameter/b>50?(pg.stroke(R.random_num(20,150),d-50,d),pg.point(a,c+noisePos-pg.height/20),pg.stroke(d,d-c1,c2),pg.point(a-noisePos-e+pg.height/20,c,.5)):colorParameter/b>45?(pg.stroke(d-c1,R.random_num(20,150)+d,R.random_num(20,150)+d),pg.point(a,c+noisePos-pg.height/20),pg.stroke(0),pg.point(a-noisePos-e+pg.height/20,c,.5)):colorParameter/b>40?(pg.stroke(d-c1,d-c2,d-c3,d),pg.point(a,c+noisePos-pg.height/20),pg.stroke(d-c3,c2,d-c1,d),pg.point(a-noisePos-e+pg.height/20,c,.5)):colorParameter/b>35?(pg.stroke(d),pg.point(a,c+noisePos-pg.height/20),pg.stroke(0),pg.point(a-noisePos-e+pg.height/20,c,.5)):colorParameter/b>30?(pg.stroke(d,0,0),pg.point(a,c+noisePos-pg.height/20),pg.stroke(d),pg.point(a-noisePos-e+pg.height/20,c,.5)):colorParameter/b>25?(pg.stroke(d+c3,d-c2,c1),pg.point(a,c+noisePos-pg.height/20),pg.stroke(d-c2,d-c1,c3),pg.point(a-noisePos-e+pg.height/20,c,.5)):colorParameter/b>20?(pg.stroke(c1,c1,d),pg.point(a,c+noisePos-pg.height/20),pg.stroke(255),pg.point(a-noisePos-e+pg.height/20,c,.5)):colorParameter/b>15?(pg.stroke(d+c1,c2,d),pg.point(a,c+noisePos-pg.height/20),pg.stroke(d,0,d),pg.point(a-noisePos-e+pg.height/20,c,.5)):colorParameter/b>10?(pg.stroke(R.random_num(20,150),R.random_num(100,255),d),pg.point(a,c+noisePos-pg.height/20),pg.stroke(d-c3,d-c1,d-c2),pg.point(a-noisePos-e+pg.height/20,c,.5)):colorParameter/b>5?(pg.stroke(100,d,d),pg.point(a,c+noisePos-pg.height/20),pg.stroke(100,d,c2),pg.point(a-noisePos-e+pg.height/20,c,.5)):(pg.stroke(d-c3,d-100,0),pg.point(a,c+noisePos-pg.height/20),pg.stroke(d-c2,c1,200),pg.point(a-noisePos-e+pg.height/20,c,.5),pg.point(a,c+noisePos-40),pg.stroke(250-c1,d-c3,R.random_num(0,200)),pg.point(a-noisePos-e+50,c,.5))}}function resetRandom(){noiseSeed(Seed),randomSeed(Seed)}function setPg(){let a;1==(ar=getAspectRatio())?a=createVector(931,1133):2==ar?a=createVector(1280,720):3==ar&&(a=createVector(9933/9,14043/9)),pg=createGraphics(a.x,a.y),pd=PixelDensity(),pg.pixelDensity(pd),print("Pixel Density: "+pd),print("Final resolution: "+round(a.x*pd)+"x"+round(a.y*pd)+"pixels")}function generateFileName(){return"Stains On A Canvas.png"}function keyPressed(){"s"==key&&(print("Saving image... "+(fileName=generateFileName())),print("Final resolution: "+round(pg.width*pd)+"x"+round(pg.height*pd)+"pixels"),save(pg,fileName)),"1"==key?(window.location.hash=ar+"1",location.reload()):"2"==key?(window.location.hash=ar+"2",location.reload()):"3"==key?(window.location.hash=ar+"3",location.reload()):"4"==key?(window.location.hash=ar+"4",location.reload()):"5"==key?(window.location.hash=ar+"5",location.reload()):"6"==key?(window.location.hash=ar+"6",location.reload()):"7"==key?(window.location.hash=ar+"7",location.reload()):"8"==key?(window.location.hash=ar+"8",location.reload()):"9"==key&&(window.location.hash=ar+"9",location.reload())}function saveFrame(){save(buffer,generateFileName())}function PixelDensity(){let a=window.location.hash.split("");switch(a=a[a.length-1]){case"1":return 1;case"2":return 2;case"3":return 3;case"4":return 4;case"5":return 5;case"6":return 6;case"7":return 7;case"8":return 8;case"9":return 9;default:return pixelDensity()}}function getAspectRatio(){let a=window.location.hash.split("");switch(a=a[a.length-2]){case"1":default:return 1;case"2":return 2;case"3":return 3}}function drawPg(){imageMode(CENTER),width>=height?image(pg,width/2,height/2,pg.width*height/pg.height,height):image(pg,width/2,height/2,width,pg.height*width/pg.width)}