memoscan
← all memos

Memo 0x92b26f50…c9a87a on Ethereum

,bt);z("Lavender",Mt);z("GreenInThe trees",Lt);z("bleuets1new",St);z("Blue Autumn 2",yt);z("Summer classic b",mt);z("Spring classic2",At);z("redBlueDark4b",vt);z("Impressionnist4b2",xt);z("pinkSakuraEtcB",Pt);z("Pink2",Tt);z("Autumn new pale",_t);z("Autumn gold 2c",pt);z("blueblue2",wt);z("garden2",Ct);z("bleuetsnew",Dt);const fe={skipPattern:!1,color:"hsl( 125, 50%, 50% )",countLines:1e6,alpha:.4,lengthA:20,rotationType:0};class Sa{constructor(){this._isFirst=!0,this.isNewHash=!1}generate(){if(console.log(`[${a.id}] Generating params...`),this._idx=-1,this.isNewHash||this._isFirst){const e=[2,4,8];let t=e[a.rand()*e.length>>0];c.compositionsData.divider=t;const s=a.rand()*ye.length>>0;c.paletteData.palette=s,a.palettes=[s];const i=Array.from({length:ye.length},(n,l)=>l+1).filter(n=>n!==s);for(let n=0;n<3;n++){const l=Math.floor(a.rand()*i.length);a.palettes.push(i[l]),i.splice(l,1)}a.idxPalette=0,t<8&&(c.gridPatternData.linesGridAlpha=.7),this.isBroken=!0,this.isBrokenVerticaly=!0,this.isExtraBrokenVerticaly=!1,t<=4?t==4?(this.isBroken=a.rand()<.5,this.isBrokenVerticaly=a.rand()<.25):t==2&&(this.isBroken=a.rand()<.5,this.isBrokenVerticaly=a.rand()<.25):(this.isBroken=a.rand()<.8,this.isBrokenVerticaly=a.rand()<.5,this.isExtraBrokenVerticaly=a.rand()<.25,!this.isBroken&&this.isBrokenVerticaly&&this.isExtraBrokenVerticaly&&(this.isBroken=!0)),this.isSmallTrees=!1}(this._isFirst||this.divider!==c.compositionsData.divider)&&(this.divider=c.compositionsData.divider,this.divider==4?(c.gridData.divisions.chance=.96,c.gridData.divisions.friction=.93,c.gridData.divisions.maxDivisions=6):this.divider==2?(c.gridData.divisions.chance=.98,c.gridData.divisions.friction=.95,c.gridData.divisions.maxDivisions=7):this.divider==8&&(c.gridData.divisions.chance=.83,c.gridData.divisions.friction=.89,c.gridData.divisions.maxDivisions=5),this.isBroken=a.rand()<.5,this.isBroken=!0),this._isFirst=!1,this.isNewHash=!1,this.refreshLayers()}refreshLayers(){this.layers=[];const e=c.compositionsData.layers;this.layers.push(this._createLayer(e.background));for(let s=0;s<5;s++)this.layers.push(this._createLayer(e[`greenLayer${s+1}`]));const t=this._createTreesLayer();c.compositionsData.putTreesBefore?this.layers.splice(this.layers.length-1,0,t):this.layers.push(t),this.layers.push(this._createLayer(e.windLayer));for(let s=0;s<4;s++)s==2&&this.layers.push(this._createFlowersLayer()),this.layers.push(this._createLayer(e[`flowerLayer${s+1}`]));this.layers.push(this._createLayer(e.blueWindLayer)),this.layers.push(this._createLayer(e.greenFlowerLayer)),this.layers.push(this._createLayer(e.bonusLayer))}_createLayer(e){let t={};for(const s in e.params)t[s]=e.params[s].value;if(t.type="vege",t.id=++this._idx,t.patternId="classic",t={...fe,...t},e.noise){t.noise={};for(const s in e.noise.params)t.noise[s]=e.noise.params[s].value}return t}_createTreesLayer(){let e={};return e.id=++this._idx,e={...fe,...e},e.patternId="tree",e.skipPattern=!1,e}_createFlowersLayer(){let e={};return e.id=++this._idx,e={...fe,...e},e.patternId="flowers",e.skipPattern=!1,e}_createGridLayer(){let e={};return e.id=++this._idx,e={...fe,...e},e.patternId="grid",e.skipPattern=!1,e}}function Da(){const r=document.createElement("div");r.className="ryokans-menu",r.style.display="none";const e=document.createElement("style");e.innerHTML=` .ryokans-menu-action-button { width: 60px; height: 60px; border: 1px solid #fff; color: #fff; background: transparent; display: flex; align-items: center; justify-content: center; font-size: 0.5em; cursor: pointer; margin: 5px; transition: background 0.2s, color 0.2s; text-align: center; opacity: .35; background: rgba(0,0,0,0.8); } .ryokans-menu-action-button:hover { background: rgba(255,255,255,0.1); } `,document.head.appendChild(e);const t=new URLSearchParams(window.location.search),s=t.get("fullscreen")==="true",i=t.get("dpr")||"0.5",n=[s?{label:"Centered",onClick:()=>{const u=new URL(window.location.href);u.searchParams.set("fullscreen","false"),window.location.href=u.toString()}}:{label:"Fullscreen",onClick:()=>{const u=new URL(window.location.href);u.searchParams.set("fullscreen","true"),window.location.href=u.toString()}},i==="1"?{label:"LD",onClick:()=>{const u=new URL(window.location.href);u.searchParams.set("dpr","0.5"),window.location.href=u.toString()}}:{label:"HD",onClick:()=>{const u=new URL(window.location.href);u.searchParams.set("dpr","1"),window.location.href=u.toString()}},t.get("fixed")==="true"?{label:"Animated",onClick:()=>{const u=new URL(window.location.href);u.searchParams.set("fixed","false"),window.location.href=u.toString()}}:{label:"Fixed",onClick:()=>{const u=new URL(window.location.href);u.searchParams.set("fixed","true"),window.location.href=u.toString()}}];n.push({label:"Save",onClick:()=>{zt(a.gl.canvas)}}),document.body.appendChild(r),n.forEach(({label:u,onClick:f})=>{const g=document.createElement("button");g.className="ryokans-menu-action-button",g.innerText=u,g.onclick=f,r.appendChild(g)});let l=null;function o(){r.style.display="flex",r.style.justifyContent="center",r.style.alignItems="center",r.style.position="fixed",r.style.left="0",r.style.right="0",r.style.bottom="10px",r.style.top="",r.style.zIndex="1000",l&&clearTimeout(l),l=setTimeout(h,2e3)}function h(){r.style.display="none"}function d(){o()}window.addEventListener("mousemove",d),window.addEventListener("touchstart",d),h()}function Ca(){const r=a.sketch,e=a.generator,t=a.artwork;document.body.style.backgroundColor="#17140b",a.renderStartTime=performance.now(),t.init().then(async function(){r.setBgColor(c.backgroundData.globalBackgroundColor),r.clear(),ht.resetHash(),e.generate(),console.warn("First rand: ",a.rand()),console.warn("First rand 2: ",a.rand2()),c.isDirty=!0,a.seed=a.rand()*1e3,await t.generate(),await t.prerenderAnimated(),a.loader?.update(),Da(),await t.renderMoments(),r.artwork=t.texture,r.renderWebGL({options:c.postprocessData,displayArtwork:t!=null}),a.onRender.dispatch();let s=0;const i=async()=>{await t.regenerateAndRenderGrids(),await t.reRenderAnimated(),s=0,Be.add(n)},n=()=>{s+=1,s%1400===0&&(Be.remove(n),i())};!a.isRender&&!a.isFixed&&Be.add(n)}),Gt.add(()=>{t.renderAnimated(),r.artwork=t.textureAnimated,r.renderWebGL({options:c.postprocessData,displayArtwork:t!=null})})}class Aa{constructor(e,t={}){this.options={color:"#fff",width:"30%",...t},this.steps=7,this.step=1/this.steps,this.progress=0,this.progressRender=.001,this.progressRenderLocal=.001,this._isVisible=!1,this.element=document.createElement("div"),this.element.className="ryokan-loader",this.element.style.width="30%",this.element.style.zIndex="9999",this.element.style.position="absolute",this.element.style.bottom=0,this.element.style.left="50%",this.element.style.transform="translate(-50%, -50%)",this.element.style.backgroundColor="#17140B",this.element.style.padding="20px",this.element.style.border="1px solid #fff",this.barContainer=document.createElement("div"),this.barContainer.className="ryokan-loader-bar-container",this.barContainer.style.height="4px",this.barContainer.style.backgroundColor="#000",this.barContainer.style.opacity=.8,this.barContainer.style.overflow="hidden",this.barContainer.style.position="relative",this.bar=document.createElement("div"),this.bar.className="ryokan-loader-bar",this.bar.style.height="100%",this.bar.style.width="0%",this.bar.style.backgroundColor="#fff",this.bar.style.transition="width 0.3s ease-in-out",this.bar.style.position="absolute",this.bar.style.left="0",this.bar.style.top="0",this.barContainer.appendChild(this.bar),this.element.appendChild(this.barContainer),e&&(typeof e=="string"?document.querySelector(e).appendChild(this.element):e.appendChild(this.element)),this.setProgress(0)}update(){return this.progress+=this.step,this.setProgress(this.progress),this}setProgress(e){const t=Math.max(0,Math.min(1,e));return this.bar.style.width=`${t*100>>0}%`,this}setProgressRender(e){this.progressRender=e}setProgressRenderLocal(e){this.progressRenderLocal=e}getElement(){return this.element}show(){this._isVisible=!0,this.setProgress(0),this.element.style.display="block"}hide(){this._isVisible&&(this._isVisible=!1,this.element.style.display="none")}}ht.start(ls);ft.init(Oe);c.registerGUI(ft);a.data=c;c.init();new Gi(c);const qe=new kr(a.size.width,a.size.height);qe.initWebGL();qe.setBgColor(c.backgroundData.globalBackgroundColor);a.sketch=qe;const Pa=new La;a.artwork=Pa;const Ta=new Sa;a.generator=Ta;function za(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}if(za()){const r=document.createElement("div");r.innerText="Please open this page on a desktop for the full experience.",r.style.position="fixed",r.style.top="50%",r.style.left="50%",r.style.transform="translate(-50%, -50%)",r.style.backgroundColor="rgba(0,0,0,0.85)",r.style.color="#fff",r.style.padding="24px 32px",r.style.fontSize="12px",r.style.textAlign="center",r.style.maxWidth="90vw",document.body.appendChild(r)}else{const r=new Aa(document.body,{color:"#000",height:"10px"});a.loader=r,a.loader.show(),Ca()}