memoscan
← all memos

Memo 0x99d8d3fd…2cb5e5 on Ethereum

let seed=parseInt(tokenData.hash.slice(0,16));function rnd(){seed^=seed<<13;seed^=seed>>17;seed^=seed<<5;return(seed<0?~seed+1:seed)%1e3/1e3}var stylesheet=document.createElement("style");stylesheet.innerText="@media (orientation: portrait) {#unigrids {width: 100vw;display: block;margin: 0 auto;}}@media (orientation: landscape) {#unigrids {height: 100vh;display: block;margin: 0 auto;}}";document.head.appendChild(stylesheet);let colors=[["#0c0f0a","#ff206e","#fbff12","#41ead4","#ffffff"],["#000000","#111111","#232323","#575757","#7a7a7a"],["#ffffff","#e3e3e3","#aaaaaa","#dbdbdb","#e5e5e5"],["#114b5f","#1a936f","#88d498","#c6dabf","#f3e9d2"],["#2b2d42","#8d99ae","#edf2f4","#ef233c","#d90429"],["#e63946","#f1faee","#a8dadc","#457b9d","#1d3557"],["#f72585","#7209b7","#3a0ca3","#4361ee","#4cc9f0"],["#003049","#d62828","#f77f00","#fcbf49","#eae2b7"],["#0b132b","#1c2541","#3a506b","#5bc0be","#6fffe9"],["#00296b","#003f88","#00509d","#fdc500","#ffd500"],["#000000","#14213d","#fca311","#e5e5e5","#ffffff"],["#8dd635","#8cff00","#052233","#093954","#054f77"],["#562c2c","#f2542d","#f5dfbb","#0e9594","#127475"],["#011627","#fdfffc","#2ec4b6","#e71d36","#ff9f1c"]];function shuffle(array){var currentIndex=array.length,temporaryValue,randomIndex;while(0!==currentIndex){randomIndex=Math.floor(rnd()*currentIndex);currentIndex-=1;temporaryValue=array[currentIndex];array[currentIndex]=array[randomIndex];array[randomIndex]=temporaryValue}return array}colors.forEach(function(c,i){colors[i]=shuffle(c)});const rCol=rnd();let colorPointer;if(rCol<.03){colorPointer=0}else if(rCol>=.03&&rCol<.08){colorPointer=1}else if(rCol>=.08&&rCol<.13){colorPointer=2}else if(rCol>=.13&&rCol<.19875){colorPointer=3}else if(rCol>=.19875&&rCol<.2675){colorPointer=4}else if(rCol>=.2675&&rCol<.33625){colorPointer=5}else if(rCol>=.33625&&rCol<.405){colorPointer=6}else if(rCol>=.405&&rCol<.49){colorPointer=7}else if(rCol>=.49&&rCol<.575){colorPointer=8}else if(rCol>=.575&&rCol<.66){colorPointer=9}else if(rCol>=.66&&rCol<.745){colorPointer=10}else if(rCol>=.745&&rCol<.83){colorPointer=11}else if(rCol>=.83&&rCol<.915){colorPointer=12}else{colorPointer=13}const numColRnd=rnd();let numColors;if(numColRnd<.1){numColors=2}else if(numColRnd>=.1&&numColRnd<.3){numColors=3}else if(numColRnd>=.3&&numColRnd<.5){numColors=4}else{numColors=5}function genColor(){let col="";col=colors[colorPointer][parseInt((rnd()*(numColors-1)).toFixed(0))];return col}function genArc(row,col,indexLetter){const col1=genColor();let svg=document.createElementNS("http://www.w3.org/2000/svg","svg");svg.setAttribute("viewBox","0 0 20 20");svg.setAttribute("width",1);svg.setAttribute("height",1);svg.setAttribute("x",col-1);svg.setAttribute("y",row-1);svg.setAttribute("shape-rendering","geometricPrecision");svg.setAttribute("stroke-width","0");if(indexLetter){svg.setAttribute("id","letterHider"+indexLetter)}let path=document.createElementNS("http://www.w3.org/2000/svg","path");const rotArc=genArc?rnd():0;path.setAttribute("d",rotArc>=.5?"M0,20 Q1,1 20,0 Z M 0,20 L 20,20 L 20,0 Z":"M0,20 Q19,19 20,0 Z M 0,0 L 0,20 L 20,0 Z");path.setAttribute("fill",col1);svg.appendChild(path);container.appendChild(svg)}function revealLetter(index){var letterHider=document.querySelector("#letterHider"+index);letterHider.setAttribute("visibility","hidden")}function genTri(row,col,indexLetter){const col1=genColor();let svg=document.createElementNS("http://www.w3.org/2000/svg","svg");svg.setAttribute("viewBox","0 0 2 2");svg.setAttribute("width",1);svg.setAttribute("height",1);svg.setAttribute("x",col-1);svg.setAttribute("y",row-1);if(indexLetter){svg.setAttribute("id","letterHider"+indexLetter)}let tri=document.createElementNS("http://www.w3.org/2000/svg","polygon");tri.setAttribute("fill",col1);var tri2=null;if(indexLetter){tri2=document.createElementNS("http://www.w3.org/2000/svg","polygon");tri2.setAttribute("fill",letbg)}const rot=rnd();if(rot>=.5){tri.setAttribute("points","0,0 0,2 2,2");tri2?tri2.setAttribute("points","0,0 2,0 2,2"):null}else{tri.setAttribute("points","0,2 2,0 2,2");tri2?tri2.setAttribute("points","0,0 0,2 2,0"):null}svg.appendChild(tri);tri2?svg.appendChild(tri2):null;container.appendChild(svg)}var letcolor=null;function genLetter(row,col,colbg){letcolor=letcolor?letcolor:genColor();while(colbg==letcolor){letcolor=genColor()}let svg=document.createElementNS("http://www.w3.org/2000/svg","svg");svg.setAttribute("viewBox","0 0 2 2");svg.setAttribute("width","1");svg.setAttribute("height","1");svg.setAttribute("x",col-1);svg.setAttribute("y",row-1);let letter=document.createElementNS("http://www.w3.org/2000/svg","text");letter.innerHTML=String.fromCharCode(rnd()*25+65);letter.setAttribute("x","1");letter.setAttribute("y","1");letter.setAttribute("font-size","1");letter.setAttribute("fill",letcolor);letter.setAttribute("text-anchor","middle");letter.setAttribute("dominant-baseline","central");svg.appendChild(letter);container.appendChild(svg)}var numColsAndRows;var rs=rnd();if(rs>=0&&rs<.3){numColsAndRows=5}else if(rs>=.3&&rs<.55){numColsAndRows=10}else if(rs>=.55&&rs<.8){numColsAndRows=15}else{numColsAndRows=20}let container=document.createElementNS("http://www.w3.org/2000/svg","svg");container.setAttribute("viewBox","0 0 "+numColsAndRows+" "+numColsAndRows);container.setAttribute("version","1.1");container.setAttribute("id","unigrids");container.setAttribute("shape-rendering","crispEdges");container.setAttribute("xmlns","http://www.w3.org/2000/svg");container.setAttribute("stroke-width","0");const letbg=genColor();const shape=rnd();for(let i=1;i<=Math.pow(numColsAndRows,2);i++){var row=Math.ceil(i/numColsAndRows);var col=i-(row-1)*numColsAndRows;let square=document.createElementNS("http://www.w3.org/2000/svg","rect");let bgcol=genColor();square.setAttribute("x",col-1);square.setAttribute("y",row-1);square.setAttribute("width","1");square.setAttribute("height","1");square.setAttribute("stroke-width","0");square.setAttribute("fill",i>Math.pow(numColsAndRows,2)-3?letbg:bgcol);container.appendChild(square);if(i>Math.pow(numColsAndRows,2)-3){genLetter(row,col,letbg)}var r=rnd();if(shape<.075){genArc(row,col,i>Math.pow(numColsAndRows,2)-3?i-(Math.pow(numColsAndRows,2)-3):null)}else if(shape>=.075&&shape<.15){genTri(row,col,i>Math.pow(numColsAndRows,2)-3?i-(Math.pow(numColsAndRows,2)-3):null)}else if(shape>=.15&&shape<.65){if(r>=.5){genArc(row,col,i>Math.pow(numColsAndRows,2)-3?i-(Math.pow(numColsAndRows,2)-3):null)}else{genTri(row,col,i>Math.pow(numColsAndRows,2)-3?i-(Math.pow(numColsAndRows,2)-3):null)}}else if(shape>=.65&&shape<.825){if(r>=.25){genArc(row,col,i>Math.pow(numColsAndRows,2)-3?i-(Math.pow(numColsAndRows,2)-3):null)}else{genTri(row,col,i>Math.pow(numColsAndRows,2)-3?i-(Math.pow(numColsAndRows,2)-3):null)}}else{if(r>=.25){genTri(row,col,i>Math.pow(numColsAndRows,2)-3?i-(Math.pow(numColsAndRows,2)-3):null)}else{genArc(row,col,i>Math.pow(numColsAndRows,2)-3?i-(Math.pow(numColsAndRows,2)-3):null)}}}document.body.appendChild(container);let startedA=false;let startedS=false;function toggleAnimation(){if(!startedA){startedA=true;const shapes=document.querySelectorAll("rect, path, polygon");shapes.forEach(function(s){(function r(){const t=rnd()*2;let col=genColor();while(s.getAttribute("fill")==col){col=genColor()}let style="transition: all "+t+"s; fill: "+col+";";s.style=style;s.setAttribute("fill",col);if(startedA)setTimeout(function(){if(startedA)r()},parseInt((t*1e3).toFixed(0)))})()})}else{startedA=false}}function toggleSound(){if(!startedS){startedS=true;setTimeout(function(){draw2()},100)}else{startedS=false;Timers.forEach(function(t){clearInterval(t)})}}container.addEventListener("click",function(){toggleAnimation()});if(window.screen.width<1024){container.addEventListener("click",function(){toggleSound()})}else{document.body.addEventListener("keyup",function(e){if(e.keyCode===32){toggleSound()}})}document.querySelector("#letterHider1").addEventListener("click",function(e){revealLetter(1);e.stopPropagation()});document.querySelector("#letterHider2").addEventListener("click",function(e){revealLetter(2);e.stopPropagation()});document.querySelector("#letterHider3").addEventListener("click",function(e){revealLetter(3);e.stopPropagation()});function createAudioContext(desiredSampleRate){var AudioCtor=window.AudioContext||window.webkitAudioContext;desiredSampleRate=typeof desiredSampleRate==="number"?desiredSampleRate:48e3;var context=new AudioCtor;if(/(iPhone|iPad)/i.test(navigator.userAgent)&&context.sampleRate!==desiredSampleRate){var buffer=context.createBuffer(1,1,desiredSampleRate);var dummy=context.createBufferSource();dummy.buffer=buffer;dummy.connect(context.destination);dummy.start(0);dummy.disconnect();context.close();context=new AudioCtor}return context}var audioContext=new createAudioContext;var mixGain=audioContext.createGain();var filterGain=audioContext.createGain();const volume=.5;function kick(){var osc2=audioContext.createOscillator();var gainOsc2=audioContext.createGain();osc2.type="sine";gainOsc2.gain.setValueAtTime(volume,audioContext.currentTime);gainOsc2.gain.exponentialRampToValueAtTime(.001,audioContext.currentTime+.5);gainOsc2.connect(audioContext.destination);osc2.frequency.setValueAtTime(50,audioContext.currentTime);osc2.connect(gainOsc2);osc2.start(audioContext.currentTime);osc2.stop(audioContext.currentTime+.5)}function snare(){mixGain.gain.value=volume;var osc3=audioContext.createOscillator();var gainOsc3=audioContext.createGain();filterGain.gain.setValueAtTime(.21,audioContext.currentTime);filterGain.gain.exponentialRampToValueAtTime(.01,audioContext.currentTime+.2);osc3.type="triangle";osc3.frequency.value=100;gainOsc3.gain.setValueAtTime(0,audioContext.currentTime);osc3.connect(gainOsc3);gainOsc3.connect(mixGain);osc3.start(audioContext.currentTime);osc3.stop(audioContext.currentTime+.2);var node=audioContext.createBufferSource(),buffer=audioContext.createBuffer(1,4096,audioContext.sampleRate),data=buffer.getChannelData(0);var filter=audioContext.createBiquadFilter();filter.type="peaking";filter.frequency.setValueAtTime(1e3,audioContext.currentTime);filter.frequency.linearRampToValueAtTime(100,audioContext.currentTime+.05);for(var i=0;i<4096;i++){data[i]=Math.random()}node.buffer=buffer;node.loop=true;node.connect(filter);filter.connect(filterGain);filterGain.connect(mixGain);node.start(audioContext.currentTime);node.stop(audioContext.currentTime+.2)}const rhmusic=rnd();let rh;if(rhmusic>=0&&rhmusic<.333333){rh=1/4}else if(rhmusic>=.333333&&rhmusic<.666666){rh=1/5}else{rh=1/6}var context=new createAudioContext;function arso(init){var melody=cmusic.melody;var noteLength=rh;var attack=1/64;function scheduleNote(note,time){var oscillator=context.createOscillator();var gain=context.createGain();oscillator.frequency.value=mtof(note);oscillator.connect(gain);gain.connect(context.destination);gain.gain.setValueAtTime(0,time);gain.gain.linearRampToValueAtTime(init?0:volume,time+attack);gain.gain.linearRampToValueAtTime(0,time+noteLength);oscillator.start(time);oscillator.stop(time+noteLength)}for(var i=0;i<melody.length;i++){scheduleNote(melody[i],context.currentTime+1/8*i)}}var context2=new createAudioContext;function arso2(init){var melody=cmusic.melody2;var noteLength=rh;var attack=1/64;function scheduleNote(note,time){var oscillator=context2.createOscillator();var gain=context2.createGain();oscillator.frequency.value=mtof2(note);oscillator.connect(gain);gain.connect(context2.destination);gain.gain.setValueAtTime(0,time);gain.gain.linearRampToValueAtTime(init?0:volume,time+attack);gain.gain.linearRampToValueAtTime(0,time+noteLength);oscillator.start(time);oscillator.stop(time+noteLength)}for(var i=0;i<melody.length;i++){scheduleNote(melody[i],context2.currentTime+1/8*i)}}function mtof(note){return Math.pow(2,(note-69)/12)*cmusic.freq}function mtof2(note){return Math.pow(2,(note-69)/12)*cmusic.freq2}mixGain.connect(audioContext.destination);filterGain.gain.value=0;var Timers=[];const music=[{melody:[67,68,59,52,73],melody2:[0,54,0,0,47],freq:194,freq2:238},{melody:[73,52,59,68,67],melody2:[47,0,0,54,0],freq:199,freq2:233},{melody:[22,81,70,59,68,77,66,75],melody2:[38,0,69,0,0,57],freq:102,freq2:172},{melody:[75,66,77,68,59,70,81,22],melody2:[57,0,0,69,0,38],freq:97,freq2:177},{melody:[73,68,0,62,73,68,0,62],melody2:[55,0,51,56,61,64,57],freq:165,freq2:148},{melody:[62,0,68,73,62,0,68,73],melody2:[57,64,61,56,51,0,55],freq:159,freq2:143},{melody:[71,59,59,62,62],melody2:[54,42,58,40,40,57],freq:175,freq2:238},{melody:[62,62,59,59,71],melody2:[57,40,40,58,42,54],freq:170,freq2:233}];const rmusic=rnd();let cmusic;if(rmusic>=0&&rmusic<.125){cmusic=music[0]}else if(rmusic>=.125&&rmusic<.25){cmusic=music[1]}else if(rmusic>=.25&&rmusic<.375){cmusic=music[2]}else if(rmusic>=.375&&rmusic<.5){cmusic=music[3]}else if(rmusic>=.5&&rmusic<.625){cmusic=music[4]}else if(rmusic>=.625&&rmusic<.75){cmusic=music[5]}else if(rmusic>=.75&&rmusic<.875){cmusic=music[6]}else{cmusic=music[7]}var frq=rnd()*1.25;while(frq<.75){frq=rnd()*1.25}function draw2(){Timers.push(setInterval(function(){snare()},1e3/1*frq));Timers.push(setInterval(function(){kick()},1e3/2*frq));arso(true);Timers.push(setInterval(function(){arso()},1e3/.5*frq));context2=new createAudioContext;arso2(true);Timers.push(setInterval(function(){arso2()},1e3/1*frq))}