memoscan
← all memos

Memo 0x854f0ef3…e390ac on Ethereum

function mulberry32(_0x261f6a){let _0x5a3420=_0x261f6a;return function(){_0x5a3420|=0x0,_0x5a3420=_0x5a3420+0x6d2b79f5|0x0;let _0x4e8f92=Math['imul'](_0x5a3420^_0x5a3420>>>0xf,0x1|_0x5a3420);return _0x4e8f92^=_0x4e8f92+Math['imul'](_0x4e8f92^_0x4e8f92>>>0x7,_0x4e8f92|0x3d),((_0x4e8f92^_0x4e8f92>>>0xe)>>>0x0)/0x100000000;};}function fisherYatesShuffle(_0x2421a6,_0x201d4d){let _0x54b896=_0x201d4d['length'],_0x170f40,_0x476859;const _0x36a898=mulberry32(_0x2421a6);while(_0x54b896!==0x0){_0x476859=Math['floor'](_0x36a898()*_0x54b896),_0x54b896-=0x1,_0x170f40=_0x201d4d[_0x54b896],_0x201d4d[_0x54b896]=_0x201d4d[_0x476859],_0x201d4d[_0x476859]=_0x170f40;}return _0x201d4d;}function generateIndices(_0x493300,_0x3a9b45){const _0x208627=Array['from']({'length':_0x3a9b45},(_0xbaa671,_0xa3ef79)=>_0xa3ef79+0x1);return fisherYatesShuffle(_0x493300,_0x208627);}function selectImage(_0x913b38,_0x1776f7=0x21b){const _0x30fb03=(function(){let _0x444164=!![];return function(_0x51c571,_0x5d54dc){const _0x4af36f=_0x444164?function(){if(_0x5d54dc){const _0x4289c9=_0x5d54dc['apply'](_0x51c571,arguments);return _0x5d54dc=null,_0x4289c9;}}:function(){};return _0x444164=![],_0x4af36f;};}()),_0x5a9423=_0x30fb03(this,function(){return _0x5a9423['toString']()['search']('(((.+)+)+)+$')['toString']()['constructor'](_0x5a9423)['search']('(((.+)+)+)+$');});_0x5a9423();const _0x55d6d1=0x1c3e1e9,_0x53264a=generateIndices(_0x55d6d1,_0x1776f7),_0x438918=_0x53264a[_0x913b38%_0x1776f7]['toString']()['padStart'](0x3,'0');return console['log']('tokenId:\x20'+_0x913b38),console['log']('Selection:\x20'+_0x438918),_0x438918;}const selectedImage=selectImage(tokenData['tokenId']);let img,CID='QmShbQd2SXzdSCjVmDu5RpLrSJ6tJy3toqP3EzQyNeKoE7';function preload(){img=loadImage('https://ipfs.brightmoments.io/ipfs/'+CID+'/'+selectedImage+'.png');}function setup(){createCanvas(windowWidth,windowHeight);}function draw(){background(0xff);let _0x32cd97=img['width']/ img['height'],_0x4fd0f0=width,_0x12033a=_0x4fd0f0/_0x32cd97;_0x12033a>height&&(_0x12033a=height,_0x4fd0f0=_0x12033a*_0x32cd97);let _0x37de8c=(width-_0x4fd0f0)/0x2,_0x59cb9e=(height-_0x12033a)/0x2;image(img,_0x37de8c,_0x59cb9e,_0x4fd0f0,_0x12033a);}function windowResized(){resizeCanvas(windowWidth,windowHeight);}