memoscan
← all memos

Memo 0xd467b7a8…7e0611 on Ethereum

!function(e){"use strict";const a=[{a:33.33,n:"summer.jpg",c:["#fffff3","#0c8ecd","#0976aa","#075175",.85,"#00122c","#022346","#ff0962","#01408d"]},{a:33.33,n:"Magma Mambo",c:["#dca23e","#1b1f20","#111314","#414849",.85,"#080a0a","#2b3131","#1d2323","#aa1403"]},{a:33.34,n:"Lunar Chuckles",c:["#292929","#000000","#000000","#000000",.95,"#000000","#0b0b0b","#232323","#131313"]},{a:31.66,n:"Blueprint",c:["#f7f7f7","#2c52e5","#2a4edb","#3c69f7",.9,"#1d3aab","#4d6de9","#2341b5"]},{a:33.33,n:"Salsa Blush",c:["#030303","#a70312","#8d0310","#56020a",.85,"#7b1315","#8c4353","#5b8c85","#6ccfa3"]},{a:35.01,n:"Elephant Pajamas",c:["#e9e6de","#c7c7bf","#c7c7bf","#dad7d0",.95,"#b5b5af","#d8d9d3","#cbc8bf","#bbb6ae","#c4c1b8","#b9b9ad"]},{a:100,n:"Sgt. Pepe",c:["#5b8344","#472a2c","#472a2c","#311d1e",.85,"#211213","#e6c679","#e2dedd","#c29e84","#9d4c31","#dbad3d","#e8773f","#6e6083"]},{a:5.8,n:"Shades of Hey!",c:["#f3efe2","#1a1a1a","#131313","#515151",.85,"#000000","#e8e3d5","#020202","#8a8881","#d8d3c3","#f1eddf"]},{a:6.2,n:"Unigrids",c:["#1d3557","#eef2ed","#e5e8e3","#f1faee",.9,"#3a6d8d","#f1faee","#457b9d","#e63946","#a8dadc"]},{a:6.4,n:"Beatboxes",c:["#ffffff","#10002b","#0b001d","#565d7a",.85,"#030009","#d51fa5","#ff005c","#13f4ef","#c0fdff","#bc00dd"]},{a:6.6,n:"Terra Echoes",c:["#4b473b","#cf8a6d","#ad654f","#955542",.85,"#955542","#b1a992","#7e8b82","#b8cec1","#dbd3bc"]},{a:6.9,n:"Coral Reef",c:["#fdceaa","#27363b","#1b2529","#56747c",.85,"#0b1012","#99b998","#f4837d","#eb4960"]},{a:7.35,n:"Dino Disco",c:["#120d09","#ffffff","#f1f1ef","#d6d6d6",.8,"#d3d3d3","#e22d26","#123553","#e2af22"]},{a:7.9,n:"Forest Whisper",c:["#d2d6c2","#223f37","#1c362f","#4c7c6d",.85,"#12231e","#2b2b2b","#d78748","#5a7f69","#772f1d","#eee9d1","#e3c180","#884a37","#bd5126"]},{a:8,n:"Serenity",c:["#cfcec9","#cfcec9","#cac9c4","#a0998f",.95,"#c8c7c1","#d8a989","#1e1f22","#8e6c60","#e0deda","#a0360e","#655851","#d7a98a","#5b4839","#ce6d48"]},{a:8.3,n:"Dusk Riverbed",c:["#f4e4cb","#103863","#0c2f54","#225d93",.85,"#051728","#e0bc89","#cb9e61","#a97f67","#946e62","#65595b","#304761","#4e4653","#2a4569"]},{a:8.35,n:"Galactic Latte",c:["#797d81","#251a19","#2d201f","#4c3938",.85,"#110c0b","#fb8502","#043b56","#c03411","#e8eaec","#6cbfd5"]},{a:8.7,n:"Desert Mirage",c:["#000207","#f9dfc2","#d3b99f","#917b69",.85,"#8c7561","#698f90","#11212e","#cd5234","#e28459","#edbb90","#ffffff"]},{a:9.5,n:"Citrus Slate",c:["#e6dfd2","#144958","#0f3b48","#1e6170",.85,"#082226","#ab5127","#5e6e72","#c9bbab","#f5bf57","#de9a08"]},{a:10,n:"Night Owl Doodles",c:["#dbcfbc","#252132","#281a26","#655e82",.85,"#160e15","#3d283b","#5a373d","#77564e","#8c6c60","#aeb9a2","#91a18f","#70897d","#576766","#464d55","#3a3c4a"]}],t={Crumb:[.06,.06],Pebbit:[.12,.1],Craglet:[.22,.1],Stonelet:[.32,.12],Rockling:[.44,.14],Boulderette:[.58,.17],Mountlet:[.8,.6]};function c(e,c){let n=0|e.slice(0,16);n||(n=2654435769);const o=()=>(n^=n<<13,n^=n>>17,n^=n<<5,(n<0?1+~n:n)%1e3/1e3),r={},d=!(o()<.7);let f=!0,l=!1;const i=o();i<.05?l=!0:i<.9&&(f=!1),r.Traced=f?l?"No Fill":"Border":"No Border";const b=o();let s;s=b<.1?-.2:b<.15?-.1:b<.65?0:b<.9?.2:.4;const u=o();let h;h=u<.16?1+(10*o()|0):u<.28?11+(27*o()|0):u<.58?38+(27*o()|0):u<.95?65+(26*o()|0):91+(11*o()|0),h/=100;const p="UltraMaxis"==c?a.slice(0,3):"HyperMaxis"==c?a.slice(3,6):"Sgt. Pepe"==c?a.slice(6,7):a.slice(7);let g;{let e=100*o(),a=0;for(const t of p)if(a+=t.a,e<a){g=t;break}g=g||p[p.length-1]}r.Palette=g.n,o();const m=[1e3*o(),1e3*o()];o();const y=o();return r.Size=y<.07?"Crumb":y<.21?"Pebbit":y<.44?"Stonelet":y<.73?"Rockling":y<.87?"Boulderette":y<.96?"Craglet":"Mountlet",{T:r,a:o,edge:d,border:f,noFill:l,u:s,v:h,pal:g,R:m,B:t[r.Size],poolShare:g.a}}function n(e){return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16)]}e.PetPebble={render:function(e,a,t,o,r){const d=c(e,a),{a:f,T:l,pal:i,border:b,noFill:s,v:u,B:h}=d,p=i.c,g=(p[0],p.slice(5)),m=p[5],y=p[4],M=t.getContext("2d"),S=t.width,C=t.height;M.setTransform(1,0,0,1,0,0),M.globalAlpha=1,M.globalCompositeOperation="source-over",M.lineJoin="round";const w=1.5/1300*C*1.6,P=M.createRadialGradient(S/2,C/2,30*S/800,S/2,C/2,S/2);P.addColorStop(0,p[1]),P.addColorStop(1,p[2]),M.fillStyle=P,M.fillRect(0,0,S,C);const k=function(e,a,t,c,o){const r=4e3,d=512,f=new Float32Array(r),l=new Float32Array(r),i=new Float32Array(d*d);for(let a=0;a<r;a++)f[a]=e();for(let a=0;a<r;a++)l[a]=e();for(let a=0;a<d*d;a++)i[a]=e();const b=new Float64Array(4001),s=new Float64Array(4001);for(let e=0;e<r;e++)b[e+1]=b[e]+f[e],s[e+1]=s[e]+l[e];const u=(e,a,t,c)=>{if(c-t>=1){let a=0|t,n=Math.min(r,Math.max(a+1,0|c));return(e[n]-e[a])/(n-a)}const n=Math.min(3998.999,(t+c)/2),o=0|n,d=n-o;return a[o]*(1-d)+a[o+1]*d},h=new Float32Array(o),p=new Float32Array(c);for(let e=0;e<o;e++)h[e]=u(b,f,e*r/o,(e+1)*r/o);for(let e=0;e<c;e++)p[e]=u(s,l,e*r/c,(e+1)*r/c);const g=document.createElement("canvas");g.width=c,g.height=o;const m=g.getContext("2d"),y=m.createImageData(c,o),M=y.data,S=n(a),C=S[0],w=S[1],P=S[2],k=511;for(let e=0;e<o;e++){const a=.55*h[e],n=e/o*k,r=0|n,f=n-r,l=r*d,b=Math.min(r+1,k)*d;for(let n=0;n<c;n++){const o=n/c*k,r=0|o,d=o-r,s=Math.min(r+1,k),u=(i[l+r]*(1-d)+i[l+s]*d)*(1-f)+(i[b+r]*(1-d)+i[b+s]*d)*f,h=a+.55*p[n]+.25*u,g=4*(e*c+n);M[g]=C,M[g+1]=w,M[g+2]=P,M[g+3]=Math.min(255,255*t*h)}}return m.putImageData(y,0,0),g}(f,p[3],n(p[0])[0]<26?.5:.32,S,C);M.drawImage(k,0,0);let v=S*(h[0]+h[1]*f())/2,x=C*(h[0]+h[1]*f())/2;v=Math.max(v,14*S/1e3),x=Math.max(x,14*C/1e3);const T=S/2+.04*S*(f()-.5)*2,D=C/2+.04*C*(f()-.5)*2,A=2*f()*Math.PI,I=function(e,a,t){const c=.15,n=.025,o=()=>e()<.5?1:-1,r=new Path2D,d=[-a+.1*a*e(),.1*t*e()*o()];r.moveTo(d[0],d[1]);const f=[a*c*e()*o(),-t+t*c*e()];r.quadraticCurveTo(d[0]+e()*n*a*o(),f[1]+e()*n*t*o(),f[0],f[1]);const l=[a-a*c*e(),t*c*e()*o()];r.quadraticCurveTo(l[0]+e()*n*a*o(),f[1]+e()*n*t*o(),l[0],l[1]);const i=[a*c*e()*o(),t-t*c*e()];return r.quadraticCurveTo(l[0]+e()*n*a*o(),i[1]+e()*n*t*o(),i[0],i[1]),r.quadraticCurveTo(d[0]+e()*n*a*o(),i[1]+e()*n*t*o(),d[0],d[1]),r}(f,v,x);let E=0;if(f()<u&&(E=5+(f()*g.length|0)),r){const e=0|r;1===e?E=0:e>=2&&e-2<g.length&&(E=e-2+5)}const F=p[E],R=new Path2D;return R.addPath(I,(new DOMMatrix).translate(T,D).rotate(A/Math.PI*180)),s||(M.save(),M.clip(R),M.globalAlpha=y,M.fillStyle=F,M.fillRect(0,0,S,C),M.restore()),b&&(M.save(),M.globalAlpha=y,M.lineWidth=w,M.strokeStyle=s?F:m,M.stroke(R),M.restore()),l["Rock Colour"]=F.toUpperCase(),l["Collection Name"]=o||"Pet Pebble",{T:l,pal:i,poolShare:d.poolShare,rockIdx:E,accentCount:g.length,v:u,used:{"background centre":p[1],"background edge":p[2],"fabric tint":p[3],"rock body":F,...b?{stroke:s?F:m}:{}}}},drawTraits:c,rockOptions:function(e,a){const t=c(e,a),n=t.pal.c,o=n.slice(5),r=[{choice:1,hex:n[0].toUpperCase(),label:"base"}];return o.forEach((e,a)=>r.push({choice:2+a,hex:e.toUpperCase(),label:"accent "+(a+1)})),{palette:t.pal.n,options:r}},randomHash:function(){const e=new Uint8Array(32);return crypto.getRandomValues(e),"0x"+Array.from(e,e=>e.toString(16).padStart(2,"0")).join("")},PALETTES:a,ROCK_SIZE:t,MINT_TYPES:["MemeMaxis","HyperMaxis","UltraMaxis","Sgt. Pepe"]}}(window),function(){if("undefined"!=typeof hash&&"undefined"!=typeof window){var e="MemeMaxis";try{if("string"==typeof tokenData&&tokenData)try{var a=JSON.parse(tokenData);a&&a.palettes&&(e=String(a.palettes))}catch(a){for(var t=window.PetPebble.MINT_TYPES,c=0;c<t.length;c++)if(tokenData.indexOf(t[c])>=0){e=t[c];break}}}catch(e){}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",n):n()}function n(){var a=document.getElementById("c");a||((a=document.createElement("canvas")).width=a.height=2e3,document.body.appendChild(a));try{window.PetPebble.render(hash,e,a,"Pet Pebble","undefined"!=typeof rockColour?0|rockColour:0)}catch(e){}}}();