memoscan
← all memos

Memo 0xe6f911a2…204c22 on Ethereum

let dot=0;function sfc32(p,t,r,_){return function(){var n=((p|=0)+(t|=0)|0)+(_|=0)|0;return _=_+1|0,p=t^t>>>9,t=(r|=0)+(r<<3)|0,r=(r=r<<21|r>>>11)+n|0,(n>>>0)/4294967296}}let prng=new sfc32(parseInt(tokenData.hash.substr(2,8),16),parseInt(tokenData.hash.substr(10,8),16),parseInt(tokenData.hash.substr(18,8),16),parseInt(tokenData.hash.substr(27,8),16));function rI(p,t){return parseInt(t*p())}function rgbC(p){return"rgb("+p[0]+","+p[1]+","+p[2]+")"}let pal=[[[158,0,89],[93,127,218],[182,156,211],[239,121,138]],[[158,0,89],[93,127,218],[182,156,211],[239,121,138]],[[33,33,33],[237,237,237],[255,66,179],[90,255,87]],[[45,35,45],[230,230,230],[237,123,132],[98,144,200]],[[253,187,229],[98,29,64],[218,223,247],[100,94,157]],[[230,134,57],[220,204,187],[250,188,75],[252,80,56]],[[242,237,235],[78,89,140],[250,188,42],[216,17,89]]];function getPaletteName(p){return JSON.stringify(p)===JSON.stringify([[242,237,235],[78,89,140],[250,188,42],[216,17,89]])?"Poppy":JSON.stringify(p)===JSON.stringify([[230,134,57],[220,204,187],[250,188,75],[252,80,56]])?"Omelet":JSON.stringify(p)===JSON.stringify([[253,187,229],[98,29,64],[218,223,247],[100,94,157]])?"Bubblegum":JSON.stringify(p)===JSON.stringify([[45,35,45],[230,230,230],[237,123,132],[98,144,200]])?"Salmon":JSON.stringify(p)===JSON.stringify([[33,33,33],[237,237,237],[255,66,179],[90,255,87]])?"Lenny":JSON.stringify(p)===JSON.stringify([[158,0,89],[93,127,218],[182,156,211],[239,121,138]])?"Preserves":"Unknown"}let s_R=1/650,p=genParams();function genParams(){let p=pal.splice(rI(prng,pal.length),1)[0],t=JSON.parse(JSON.stringify(p)),r=getPaletteName(p),_=p.splice(rI(prng,p.length),1)[0],n=p.splice(rI(prng,p.length),1)[0],h=p.splice(rI(prng,p.length),1)[0],e=p.splice(rI(prng,p.length),1)[0],D=t.splice(rI(prng,t.length),1)[0],L=t.splice(rI(prng,t.length),1)[0],i=t.splice(rI(prng,t.length),1)[0],s=t.splice(rI(prng,t.length),1)[0],o=[.37,.375,.38],g=o.splice(rI(prng,o.length),1)[0],u=2*(1+rI(prng,5));return 6==u&&(u=4),{paletteName:r,h_DL:g,m_V:rI(prng,4),d_L:0==rI(prng,5),f_O:0==rI(prng,2),h_G:0!=rI(prng,3),q_S:u,o_A:rI(prng,5)+3,o_B:rI(prng,5)+3,o_C:rI(prng,5)+3,bg_CA:rgbC(h),su_CA:rgbC(_),al_CA:rgbC(n),fg_CA:rgbC(e),st_SA:rI(prng,3)+3,st_DA:rI(prng,2),bg_CB:rgbC(i),su_CB:rgbC(D),al_CB:rgbC(L),fg_CB:rgbC(s),st_SB:rI(prng,8)+3,st_DB:rI(prng,2)}}let FOUR_K=4e3;function setup(){let p=Math.min(window.innerWidth,window.innerHeight);createCanvas(p,p),p=Math.max(p,FOUR_K),pg=createGraphics(p,p),noLoop()}function draw(){pg.background(255),colorMode(HSB,100);let t=1e3,r=Math.min(window.innerWidth,window.innerHeight);r=Math.max(r,FOUR_K),r*=1;let _=r/t,n=0*r,h=t/p.q_S;for(let r=0;r<p.q_S;r++)for(let e=0;e<p.q_S;e++){p.st_SA=rI(prng,3)+3,p.st_SB=rI(prng,8)+3,p.st_DA=rI(prng,2),p.st_DB=rI(prng,2);let D=parseInt(p.st_SA*s_R*t),L=D+parseInt(p.st_DA*s_R*t),i=parseInt(p.st_SB*s_R*t),s=i+parseInt(p.st_DB*s_R*t),o=r*h;for(let r=o;r<=o+h;r++){let o=e*h;for(let e=o;e<=o+h;e++){if(wSA(e,t)){if(r%L||e%L)continue;pg.strokeWeight(Math.trunc(_*D))}else{if(r%s||e%s)continue;pg.strokeWeight(Math.trunc(_*i))}let h=sC(e,r,t);if(p.h_G){let _=500,n=t*p.h_DL,D=1-Math.sqrt(Math.pow(e-_,2)+Math.pow(r-n,2))/t;D=(D+2)/3,h=color(hue(h)*D,saturation(h),brightness(h))}pg.stroke(h);let o=of(e,r,t)*_;o+=n,pg.point(Math.trunc(_*e)+o,Math.trunc(_*r)+o),dot++}}}r=Math.min(window.innerWidth,window.innerHeight),pg.width=r,pg.height=r,image(pg,0,0)}function of(t,r,_){const n=2*(wSA(t,r,_)?p.st_SA:p.st_SB);if(wRWD(t,r,_)||wRW(t,r,_)){return((t^r)<<t^r)%n==0&&p.f_O?p.o_A:p.o_C}if(wMRA(t,r,_)||wMRB(t,r,_)||wMRC(t,r,_)){return((t^r)<<t^r)%n==0&&p.f_O?p.o_B:p.o_C}if(wSB(t,r,_)){return((r^t)<<r^t)%n==0&&p.f_O?p.o_C:p.o_A}if(wGB(t,r,_)||wGBR(t,r,_)){return((r^t)<<r^t)%n==0&&p.f_O?p.o_A:p.o_B}return 0}function sC(t,r,_){if(wRWD(t,r,_)){let r;return r=wSA(t,_)?p.su_CA:p.su_CB,color(hue(r),saturation(r),1.75*brightness(r))}if(wRW(t,r,_))return wSA(t,_)?p.su_CA:p.su_CB;if(wMRA(t,r,_))return wSA(t,_)?p.al_CA:p.al_CB;if(wMRB(t,r,_)){let r;return r=wSA(t,_)?p.al_CA:p.al_CB,color(hue(r),1.5*saturation(r),.5*brightness(r))}if(wMRC(t,r,_)){let r;return r=wSA(t,_)?3==p.m_V?p.bg_CA:p.al_CA:3==p.m_V?p.bg_CB:p.al_CB,color(hue(r),saturation(r),4*brightness(r))}if(wSB(t,r,_))return wSA(t,_)?p.bg_CA:p.bg_CB;if(wGBR(t,r,_)){let r;return r=wSA(t,_)?p.fg_CA:p.fg_CB,color(hue(r),1.25*saturation(r),.75*brightness(r))}return wGB(t,r,_)?wSA(t,_)?p.fg_CA:p.fg_CB:255}function sBSDL(p){return p/2}function wSA(t,r){return!p.d_L||t<=sBSDL(r)}function hL(t,r){return p.h_DL*r}function sT(p,t){return t/2}function wRWD(t,r,_){return wP(t,r,_,[[.51,1],[.504,p.h_DL],[.496,p.h_DL],[.49,1]])}function wRW(t,r,_){return wP(t,r,_,[[1,1],[1,27/28],[.8,24/28],[.65,p.h_DL*(1.6+p.h_DL)],[.55,p.h_DL*(1.3+p.h_DL)],[.52,p.h_DL],[.48,p.h_DL],[.45,p.h_DL*(1.3+p.h_DL)],[.35,p.h_DL*(1.6+p.h_DL)],[.2,24/28],[0,27/28],[0,1]])}function wSC(t,r,_){let n=_/5,h=t-_/2,e=r-_*p.h_DL*.8;return h*h+e*e<=n*n}function wMRA(t,r,_){let n=[[0,1.1*p.h_DL],[0,.6*p.h_DL],[.1,.8*p.h_DL],[.3,.5*p.h_DL],[.48,p.h_DL],[.52,p.h_DL],[.7,.8*p.h_DL],[.8,.7*p.h_DL],[.9,.5*p.h_DL],[1,.7*p.h_DL],[1,1.1*p.h_DL],[.7,p.h_DL],[.52,1.01*p.h_DL],[.48,1.01*p.h_DL]],h=[[0,1.1*p.h_DL],[0,p.h_DL],[0,.7*p.h_DL],[.1,.52*p.h_DL],[.2,.81*p.h_DL],[.3,.63*p.h_DL],[.48,p.h_DL],[.52,p.h_DL],[.7,.68*p.h_DL],[.8,.78*p.h_DL],[1,.53*p.h_DL],[1,p.h_DL],[1,1.1*p.h_DL],[.52,p.h_DL],[.48,p.h_DL]],e=[[0,1.02*p.h_DL],[0,p.h_DL],[0,.75*p.h_DL],[.1,.5*p.h_DL],[.15,.63*p.h_DL],[.25,.4*p.h_DL],[.48,p.h_DL],[.52,p.h_DL],[.55,p.h_DL],[.85,.37*p.h_DL],[1,.5*p.h_DL],[1,p.h_DL],[1,1.02*p.h_DL],[.52,p.h_DL],[.48,p.h_DL]],D=[[.42,p.h_DL],[5/6,.5*p.h_DL],[1,.8*p.h_DL],[1,1.03*p.h_DL]];return 0==p.m_V?wP(t,r,_,n):1==p.m_m_V?wP(t,r,_,h):2==p.m_V?wP(t,r,_,e):wP(t,r,_,D)}function wMRB(t,r,_){let n=[[0,p.h_DL],[0,.7*p.h_DL],[1/9,.5*p.h_DL],[.4,.9*p.h_DL],[1/3,p.h_DL],[.4,p.h_DL],[.8,.5*p.h_DL],[1,p.h_DL]],h=[[0,p.h_DL],[.2,.6*p.h_DL],[.4,p.h_DL],[.48,p.h_DL],[.52,p.h_DL],[.6,p.h_DL],[.8,.6*p.h_DL],[1,p.h_DL]],e=[[0,p.h_DL],[0,.85*p.h_DL],[.2,.43*p.h_DL],[.3,.7*p.h_DL],[.3,p.h_DL],[.32,p.h_DL],[.46,p.h_DL],[.64,.5*p.h_DL],[.9,p.h_DL]],D=[[0,1.03*p.h_DL],[0,.8*p.h_DL],[1/6,.5*p.h_DL],[.58,p.h_DL]];return 0==p.m_V?wP(t,r,_,n):1==p.m_m_V?wP(t,r,_,h):2==p.m_V?wP(t,r,_,e):wP(t,r,_,D)}function wMRC(t,r,_){let n=[[0,p.h_DL],[0,.5*p.h_DL],[.1,.3*p.h_DL],[.2,.5*p.h_DL],[1/3,.8*p.h_DL],[.4,.8*p.h_DL],[.6,.6*p.h_DL],[1,p.h_DL]],h=[[.3,p.h_DL],[.5,.7*p.h_DL],[.7,p.h_DL]],e=[[0,p.h_DL],[0,.625*p.h_DL],[.05,.5*p.h_DL],[.25,p.h_DL],[.48,p.h_DL],[.52,p.h_DL],[.7,.45*p.h_DL],[.85,.6*p.h_DL],[1,.35*p.h_DL],[1,p.h_DL],[.52,p.h_DL],[.48,p.h_DL]];return 0==p.m_V?wP(t,r,_,n):1==p.m_m_V?wP(t,r,_,h):2==p.m_V?wP(t,r,_,e):r<=_*p.h_DL&&wSC(t,r,_)}function wGBR(t,r,_){return wP(t,r,_,[[1,1],[1,1.6*p.h_DL],[.55,p.h_DL*(1.3+p.h_DL)],[.45,p.h_DL*(1.3+p.h_DL)],[0,1.6*p.h_DL],[0,1]])}function wGB(p,t,r){return t>hL(p,r)}function wSB(p,t,r){return t<=hL(p,r)}function fP(p){return p.map((p=>[1-p[0],p[1]]))}function wP(p,t,r,_){let n=!1;for(let h=0,e=_.length-1;h<_.length;e=h++){const D=_[h][0]*r,L=_[h][1]*r,i=_[e][0]*r,s=_[e][1]*r;L>t!=s>t&&p<(i-D)*(t-L)/(s-L)+D&&(n=!n)}return n}function getFeatures(){var t={};let r;return t["Color Palette"]=p.paletteName,t["Flat Colors"]=!p.h_G,t["Quilt Size"]=`${p.q_S}x${p.q_S}`,t["Double-quilted"]=p.d_L,0==p.m_V?r="Are we there yet?":1==p.m_V?r="Lost in thought":2==p.m_V?r="Should have offline'd this podcast":3==p.m_V&&(r="What a beautiful view"),t["Trip Status"]=r,t}function mouseClicked(){alert(`${dot} dots, that's a long drive.\n\nadditional features:\n${JSON.stringify(getFeatures())}`)}