0x7d330020…da62sent to0x99a9b7c1…b069·#16,780,005·view on Etherscan
const hash=tokenData.hash,ID=parseFloat(tokenData.tokenId)%1e3,initPRNG=()=>Uint32Array.from([0,0,0,0].map((_,i)=>parseInt(hash.substr(8*i+2,8),16)));let xS=initPRNG();const prng=a=>{let s,t=xS[3];return xS[3]=xS[2],xS[2]=xS[1],xS[1]=s=xS[0],t^=t<<11,t^=t>>>8,xS[0]=t^s^s>>>19,Math.floor(a*(xS[0]/4294967296))},prand=(a,b)=>a+prng(b-a),fract=a=>a-Math.floor(a),PI=Math.PI,D2G=PI/180;let AGE=0;const RATIO=1.5,DW=1600,DH=2400,R=DW/3e3;let WIDTH,HEIGHT,PD=1,SPEED,DENSITY,CUTCORNER,REBOUND,SI,FLIPPED,VGS,VGIRO2,HUE,HUEVAR,SIDESLIST,BLACK,OVER,FULLGRID,BGGRID,FRAMEGRID,WHITE,SAT,graphics,graphics2,decals,bg,scene,sc2,overlay,LW,BGLW,SLIDERS;function randGlobals(){for(xS=initPRNG(),console.clear(),console.log('UMK #️⃣'+ID+' by Fernando Jerez 2023'),console.log("💊"+hash),stop=!1,initTime=millis(),SPEED=1,DENSITY=prand(7,9)/10,CUTCORNER=!prng(4),REBOUND=prng(4)?0:1,SI=!prng(3),FLIPPED=SI&&prng(2),VGS=[prand(0,10)/100,prand(0,10)/100,prand(0,10)/100,prand(0,10)/100],prng(4)&&(prng(2)?(VGS[0]=VGS[1],VGS[2]=VGS[3]):(VGS[0]=VGS[3],VGS[1]=VGS[2]));VGS[0]+VGS[1]+VGS[2]+VGS[3]<.03;)VGS[prng(4)]=prand(0,10)/100;VGIRO2=prand(5,10)/100;do{HUE=prng(360),HUE>80&&(HUE=prng(360))}while(4==Math.round(HUE/60));HUEVAR=30,SIDESLIST=[2,3,4,6,8,30,40,60],CUTCORNER&&!prng(25)&&(SIDESLIST=[1]),SIDESLIST=getSides(),BLACK=!prng(13),WHITE=!prng(23)||BLACK&&!prng(9),OVER=prand(20,340),FULLGRID=prng(2),BGGRID=prng(5),FRAMEGRID=prng(WHITE?3:5),SAT=10*prand(5,10),AGE=prand(0,11)/10}let stop=!1,initTime=0,GUI={draw:!1,save:!1,reset:!1,x:0,y:0};function setup(){createCanvas(DW,DH),drawingContext.imageSmoothingEnabled=!0,PD=pixelDensity(1),colorMode(HSB,360,100,100,100),canvasResize(),graphics=makeGraphics(DW,DH),graphics2=makeGraphics(DW,DH),bg=makeGraphics(DW,DH),decals=makeGraphics(DW,DH),scene=makeGraphics(DW,DH),sc2=makeGraphics(800,1200),overlay=makeGraphics(DW,DH),resetScene()}function draw(){drawingContext.imageSmoothingEnabled=!0,SPEED<130&&(SPEED*=1.02);let speed=SPEED/(1+LW.walkers.length);for(let i=0;!stop&&i<speed;i++)LW.move(),LW.display(),i<30&&BGLW.step();scene.blendMode(BLEND),scene.background(0),scene.image(bg,0,0),graphics2.clear(),SLIDERS.step(),scene.image(graphics2,0,0),scene.imageMode(CENTER),scene.push(),scene.translate(800,1200),FLIPPED||scene.image(graphics,SI?.5*-LW.w:0,0),SI&&(scene.push(),scene.scale(-1,1),scene.image(graphics,.5*-LW.w,0),scene.pop()),FLIPPED&&scene.image(graphics,SI?.5*-LW.w:0,0),scene.pop(),scene.imageMode(CORNER),scene.image(decals,0,0),scene.blendMode(OVERLAY),scene.image(overlay,0,0),scene.blendMode(BLEND),push(),translate(WIDTH/2,HEIGHT/2),width<640?(sc2.image(scene,0,0,sc2.width,sc2.height),image(sc2,0,0,WIDTH,HEIGHT)):image(scene,0,0,WIDTH,HEIGHT),pop(),stop||0!=LW.walkers.length||0!=BGLW.walkers.length||(stop=!0),GUI.draw&&(fill(HUE,50,80,50),strokeWeight(1),rect(GUI.x,GUI.y,50,70),buttonGUI(GUI.x+80,GUI.y,110,70,"SAVE",0,35,35,0),buttonGUI(GUI.x-80,GUI.y,110,70,"RESET",35,0,0,35))}function buttonGUI(x,y,w,h,t,a=0,b=0,c=0,d=0){rectMode(CENTER),textAlign(CENTER,CENTER),textSize(20),stroke(0);let mx=mouseX+w/2,my=mouseY+h/2,hover=mx>x&&mx<x+w&&my>y&&my<y+h;GUI[t]=hover,fill(0,0,hover?0:100,90),rect(x,y,w,h,a,b,c,d),fill(0,0,hover?100:0),text(t,x,y,w,h,a,b,c,d)}function mousePressed(){GUI.draw=!0,GUI.x=mouseX,GUI.y=mouseY}function mouseReleased(){GUI.draw=!1,GUI.SAVE&&scene.save("ultramechanika.png"),GUI.RESET&&resetScene()}function keyPressed(){!stop||"s"!=key&&"S"!=key||scene.save("ultramechanika.png"),"r"!=key&&"R"!=key||resetScene()}function windowResized(){canvasResize()}function resetScene(){graphics.clear(),graphics2.clear(),bg.clear(),decals.clear(),randGlobals(),imageMode(CENTER),noiseSeed(prng(2147483647)),noiseDetail(4),SLIDERS=new SliderList,LW=new NWList(graphics,1),paintNoise(bg),randomBlood(bg),LW.walkers.push(new NoiseWalker(LW.g,LW.frame.x+.2*LW.frame.w+prng(.6*LW.frame.w),LW.frame.y+.2*LW.frame.h+prng(.6*LW.frame.h),prand(-360,360)*PI/180,LW.frame,0,!0,LW.scale)),BGLW=new WalkerList(bg),overlay.clear(),overlay.noStroke(),WHITE?overlay.fill(0,0,100,40):overlay.fill((HUE+OVER)%360,100,100,12),overlay.rect(0,0,DW,DH),makeClouds(overlay)}