memoscan
← all memos

Memo 0x4e5f9fa5…6dd498 on Ethereum

function generateCircleBlock(e,a,g,n,r){return new Promise(r=>{const d=document.createElement("div");d.id="circle-block"+e,d.style.position="absolute",d.style.top=a,d.style.left=g,d.style.width=n,d.style.height=n,document.getElementById("sktch").appendChild(d),r()})}function generateOuterBlankCircle(e,a){return new Promise(g=>{const n=document.createElement("div");n.style.position="absolute",n.style.borderRadius="50%";const r=parseInt(a.slice(0,-2))/32;n.style.boxShadow=r+"em "+r+"em "+4*r+"em #c1c1c1, -"+r+"em -"+r+"em "+4*r+"em #fff",n.style.width="100%",n.style.height="100%",n.style.zIndex=2,n.id="outer-blank"+e,n.classList.add("blankColor"),n.classList.add("simplePulseAnim"),n.classList.add("center-flex"),document.getElementById("circle-block"+e).appendChild(n),g()})}function generateOuterColorCircle(e,a,g,n){return new Promise(r=>{const d=document.createElement("div");d.style.position="relative",d.style.borderRadius="50%";const i=parseInt(g.slice(0,-2))/64;d.style.boxShadow=i+"em "+i+"em "+4*i+"em #c1c1c1, -"+i+"em -"+i+"em "+4*i+"em #fff",d.style.width="75%",d.style.height="75%",d.style.opacity=.85,d.style.zIndex=3,d.id="outer-color"+e,d.classList.add(a.random_choice(isSpinning)),d.classList.add(getColor(a,n)),d.classList.add("center-flex"),document.getElementById("outer-blank"+e).appendChild(d),r()})}function generateInnerBlankCircle(e,a){return new Promise(g=>{const n=document.createElement("div");n.style.position="relative",n.style.borderRadius="50%";const r=parseInt(a.slice(0,-2))/64;n.style.boxShadow=r+"em "+r+"em "+4*r+"em #c1c1c1, -"+r+"em -"+r+"em "+4*r+"em #fff",n.style.width="62%",n.style.height="62%",n.style.zIndex=4,n.id="inner-blank"+e,n.classList.add("blankColor"),n.classList.add("center-flex"),document.getElementById("outer-color"+e).appendChild(n),g()})}function generateInnerColorCircle(e,a,g,n){return new Promise(r=>{const d=document.createElement("div");d.style.position="relative",d.style.borderRadius="50%";const i=parseInt(g.slice(0,-2))/64;d.style.boxShadow=i+"em "+i+"em "+4*i+"em #c1c1c1, -"+i+"em -"+i+"em "+4*i+"em #fff",d.style.width="51%",d.style.height="51%",d.style.zIndex=5,d.id="inner-color"+e,d.classList.add(getColor(a,n)),d.classList.add("center-flex"),document.getElementById("inner-blank"+e).appendChild(d),r()})}function generatePupil(e,a,g){return new Promise(a=>{const g=document.createElement("div");g.style.position="relative",g.style.borderRadius="50%",g.style.width="42%",g.style.height="42%",g.style.backgroundColor="#555",g.style.zIndex=6,g.id="pupil"+e,document.getElementById("inner-color"+e).appendChild(g),a()})}function getLoopRange(e){for(let a=0;a<256;a+=1){let g=e+(a+256);if(g>=256&&g<=512)return g}}function getSizeRange(e){return e>=42&&e<=178?e:e+42}function getColor(e,a){switch(a){case 78:return"blankColor";case 79:return"golden";case 100:return"grim";case 7:return"rainbow";default:return"g"+e.random_int(1,180)}}class Random{constructor(e){this.seed=e}random_dec(){return this.seed^=this.seed<<13,this.seed^=this.seed>>17,this.seed^=this.seed<<5,(this.seed<0?1+~this.seed:this.seed)%1e3/1e3}random_between(e,a){return e+(a-e)*this.random_dec()}random_int(e,a){return Math.floor(this.random_between(e,a+1))}random_choice(e){return e[Math.floor(this.random_between(0,.99*e.length))]}}