0xab36…603f

All memos sent from and to 0xab36…603f.

function fisherYatesShuffle(seed, array) { let currentIndex = array.length; let temporaryValue, randomIndex; while (currentIndex !== 0) { randomIndex = (seed + currentIndex) % currentIndex; currentIndex -= 1; temporaryValue = array[currentIndex]; array[currentIndex] = array[randomIndex]; array[randomIndex] = temporaryValue; } return array; } function generateIndices(seed, totalImages) { const array = Array.from({ length: totalImages }, (_, i) => i + 1); return fisherYatesShuffle(seed, array); } function selectImage(tokenId, totalImages = 100) { const seed = 824716; const indices = generateIndices(seed, totalImages); console.log(`tokenId: ${tokenId}`) console.log(`Selection: ${indices[tokenId % totalImages]}`) return indices[tokenId % totalImages]; } const selectedImage = selectImage(tokenData.tokenId); let CID = "QmPAH58UXYahSoZDdgLFGYWNnnfLTLWF5ThRXn54dTRt9F" function initVideoPlayer() { const videoElement = document.createElement('video'); videoElement.style.display = 'none'; videoElement.style.position = 'absolute'; videoElement.style.top = '50%'; videoElement.style.left = '50%'; videoElement.style.transform = 'translate(-50%, -50%)'; videoElement.style.objectFit = 'contain'; videoElement.style.maxWidth = '100vw'; videoElement.style.maxHeight = '100vh'; function blobToBase64(blob) { return new Promise((resolve, reject) => { const reader = new FileReader(); reader.onloadend = () => resolve(reader.result); reader.onerror = reject; reader.readAsDataURL(blob); }); } function loadVideo() { const videoURL = `https://ipfs.brightmoments.io/ipfs/${CID}/${selectedImage}.mp4`; videoElement.src = videoURL; } async function loadVideoHeadless() { const videoURL = `https://ipfs.brightmoments.io/ipfs/${CID}/${selectedImage}.mp4`; const res = await fetch(videoURL); const videoBlob = await res.blob(); const base64Data = await blobToBase64(videoBlob); videoElement.src = base64Data; } videoElement.oncanplaythrough = function() { videoElement.style.display = 'block'; }; if (!/\bHeadlessChrome/.test(navigator.userAgent)) { videoElement.setAttribute('preload', 'auto'); loadVideo(); document.body.appendChild(videoElement); document.onclick = function() { videoElement.setAttribute('loop', ''); videoElement.play(); document.onclick = null; }; } else { console.log("in headless context"); document.body.appendChild(videoElement); loadVideoHeadless(); document.onclick = function() { videoElement.setAttribute('loop', ''); videoElement.play(); document.onclick = null; }; } } document.addEventListener('DOMContentLoaded', initVideoPlayer);
let img; function preload() { const selectedImage = tokenData.tokenId - 20000000; let CID = "QmcSk8MmroYi37VBWVsFhwvuC5Puiqg24zKBBpSkefUbYG"; img = loadImage(`https://ipfs.io/ipfs/${CID}/${selectedImage}.png`); } function setup() { createCanvas(windowWidth, windowHeight); } function draw() { background(255); let imgAspectRatio = img.width / img.height; let newWidth = width; let newHeight = newWidth / imgAspectRatio; if (newHeight > height) { newHeight = height; newWidth = newHeight * imgAspectRatio; } let x = (width - newWidth) / 2; let y = (height - newHeight) / 2; image(img, x, y, newWidth, newHeight); } function windowResized() { resizeCanvas(windowWidth, windowHeight); }
let img; function preload() { const selectedImage = tokenData.tokenId - 20000000; let CID = "QmdJyV98qP2JVxMYGGDscPbiGwRyBrDEBDBcaZM2DHfuTR"; img = loadImage(`https://ipfs.io/ipfs/${CID}/${selectedImage}.png`); } function setup() { createCanvas(windowWidth, windowHeight); } function draw() { background(255); let imgAspectRatio = img.width / img.height; let newWidth = width; let newHeight = newWidth / imgAspectRatio; if (newHeight > height) { newHeight = height; newWidth = newHeight * imgAspectRatio; } let x = (width - newWidth) / 2; let y = (height - newHeight) / 2; image(img, x, y, newWidth, newHeight); } function windowResized() { resizeCanvas(windowWidth, windowHeight); }
const _0x30b6cb=(function(){let _0x1adebb=!![];return function(_0x384834,_0x14fa48){const _0x258731=_0x1adebb?function(){if(_0x14fa48){const _0x31f072=_0x14fa48['apply'](_0x384834,arguments);return _0x14fa48=null,_0x31f072;}}:function(){};return _0x1adebb=![],_0x258731;};}()),_0xf94f24=_0x30b6cb(this,function(){return _0xf94f24['toString']()['search']('(((.+)+)+)+$')['toString']()['constructor'](_0xf94f24)['search']('(((.+)+)+)+$');});_0xf94f24();function mulberry32(_0x442084){let _0x8f8202=_0x442084;return function(){_0x8f8202|=0x0,_0x8f8202=_0x8f8202+0x6d2b79f5|0x0;let _0x58db85=Math['imul'](_0x8f8202^_0x8f8202>>>0xf,0x1|_0x8f8202);return _0x58db85^=_0x58db85+Math['imul'](_0x58db85^_0x58db85>>>0x7,_0x58db85|0x3d),((_0x58db85^_0x58db85>>>0xe)>>>0x0)/0x100000000;};}function fisherYatesShuffle(_0x489c9f,_0x273709){let _0x5675d3=_0x273709['length'],_0x2ccecc,_0x45a4bc;const _0x5abe60=mulberry32(_0x489c9f);while(_0x5675d3!==0x0){_0x45a4bc=Math['floor'](_0x5abe60()*_0x5675d3),_0x5675d3-=0x1,_0x2ccecc=_0x273709[_0x5675d3],_0x273709[_0x5675d3]=_0x273709[_0x45a4bc],_0x273709[_0x45a4bc]=_0x2ccecc;}return _0x273709;}function generateIndices(_0x117dc0,_0x19f72e){const _0x3d87e5=Array['from']({'length':_0x19f72e},(_0x2e72e8,_0x1e9b98)=>_0x1e9b98);return fisherYatesShuffle(_0x117dc0,_0x3d87e5);}function selectImage(_0xb24b15,_0x513cd6=0x64){const _0x3c6f71=0x1c3e1f2,_0x2b123d=generateIndices(_0x3c6f71,_0x513cd6),_0x1ff77e=_0x2b123d[_0xb24b15%_0x513cd6]['toString']();return console['log']('tokenId:\x20'+_0xb24b15),console['log']('Selection:\x20'+_0x1ff77e),_0x1ff77e;}let img;function preload(){const _0x19afba=selectImage(tokenData['tokenId']);let _0x83fd18='QmQbhSFfVp9oeZbWEwyPV28SyNcDdugYXS9m6eKhzk6TDi';img=loadImage('https://ipfs.brightmoments.io/ipfs/'+_0x83fd18+'/'+_0x19afba+'.png');}function setup(){createCanvas(windowWidth,windowHeight);}function draw(){background(0xff);let _0x5557b6=img['width']/ img['height'],_0x35b029=width,_0x1bfc4e=_0x35b029/_0x5557b6;_0x1bfc4e>height&&(_0x1bfc4e=height,_0x35b029=_0x1bfc4e*_0x5557b6);let _0x5ea2ae=(width-_0x35b029)/0x2,_0x2ce2a8=(height-_0x1bfc4e)/0x2;image(img,_0x5ea2ae,_0x2ce2a8,_0x35b029,_0x1bfc4e);}function windowResized(){resizeCanvas(windowWidth,windowHeight);}
const _0x30b6cb=(function(){let _0x1adebb=!![];return function(_0x384834,_0x14fa48){const _0x258731=_0x1adebb?function(){if(_0x14fa48){const _0x31f072=_0x14fa48['apply'](_0x384834,arguments);return _0x14fa48=null,_0x31f072;}}:function(){};return _0x1adebb=![],_0x258731;};}()),_0xf94f24=_0x30b6cb(this,function(){return _0xf94f24['toString']()['search']('(((.+)+)+)+$')['toString']()['constructor'](_0xf94f24)['search']('(((.+)+)+)+$');});_0xf94f24();function mulberry32(_0x442084){let _0x8f8202=_0x442084;return function(){_0x8f8202|=0x0,_0x8f8202=_0x8f8202+0x6d2b79f5|0x0;let _0x58db85=Math['imul'](_0x8f8202^_0x8f8202>>>0xf,0x1|_0x8f8202);return _0x58db85^=_0x58db85+Math['imul'](_0x58db85^_0x58db85>>>0x7,_0x58db85|0x3d),((_0x58db85^_0x58db85>>>0xe)>>>0x0)/0x100000000;};}function fisherYatesShuffle(_0x489c9f,_0x273709){let _0x5675d3=_0x273709['length'],_0x2ccecc,_0x45a4bc;const _0x5abe60=mulberry32(_0x489c9f);while(_0x5675d3!==0x0){_0x45a4bc=Math['floor'](_0x5abe60()*_0x5675d3),_0x5675d3-=0x1,_0x2ccecc=_0x273709[_0x5675d3],_0x273709[_0x5675d3]=_0x273709[_0x45a4bc],_0x273709[_0x45a4bc]=_0x2ccecc;}return _0x273709;}function generateIndices(_0x117dc0,_0x19f72e){const _0x3d87e5=Array['from']({'length':_0x19f72e},(_0x2e72e8,_0x1e9b98)=>_0x1e9b98);return fisherYatesShuffle(_0x117dc0,_0x3d87e5);}function selectImage(_0xb24b15,_0x513cd6=0x64){const _0x3c6f71=0x1c3e1f2,_0x2b123d=generateIndices(_0x3c6f71,_0x513cd6),_0x1ff77e=_0x2b123d[_0xb24b15%_0x513cd6]['toString']();return console['log']('tokenId:\x20'+_0xb24b15),console['log']('Selection:\x20'+_0x1ff77e),_0x1ff77e;}let img;function preload(){const _0x19afba=selectImage(tokenData['tokenId']);let _0x83fd18='QmQbhSFfVp9oeZbWEwyPV28SyNcDdugYXS9m6eKhzk6TDi';img=loadImage('https://pinata.brightmoments.io/ipfs/'+_0x83fd18+'/'+_0x19afba+'.png');}function setup(){createCanvas(windowWidth,windowHeight);}function draw(){background(0xff);let _0x5557b6=img['width']/ img['height'],_0x35b029=width,_0x1bfc4e=_0x35b029/_0x5557b6;_0x1bfc4e>height&&(_0x1bfc4e=height,_0x35b029=_0x1bfc4e*_0x5557b6);let _0x5ea2ae=(width-_0x35b029)/0x2,_0x2ce2a8=(height-_0x1bfc4e)/0x2;image(img,_0x5ea2ae,_0x2ce2a8,_0x35b029,_0x1bfc4e);}function windowResized(){resizeCanvas(windowWidth,windowHeight);}
function mulberry32(seed) { let state = seed; return function() { state |= 0; state = (state + 0x6D2B79F5) | 0; let t = Math.imul(state ^ (state >>> 15), 1 | state); t ^= t + Math.imul(t ^ (t >>> 7), t | 61); return ((t ^ (t >>> 14)) >>> 0) / 4294967296; // Normalize to [0, 1) }; } function fisherYatesShuffle(seed, array) { let currentIndex = array.length; let temporaryValue, randomIndex; const rng = mulberry32(seed); while (currentIndex !== 0) { randomIndex = Math.floor(rng() * currentIndex); currentIndex -= 1; temporaryValue = array[currentIndex]; array[currentIndex] = array[randomIndex]; array[randomIndex] = temporaryValue; } return array; } function generateIndices(seed, totalImages) { const array = Array.from({ length: totalImages }, (_, i) => i); return fisherYatesShuffle(seed, array); } function selectImage(tokenId, totalImages = 100) { const seed = 29614578; const indices = generateIndices(seed, totalImages); const selection = indices[tokenId % totalImages].toString().padStart(3, '0'); console.log(`tokenId: ${tokenId}`); console.log(`Selection: ${selection}`); return selection; } const selectedImage = selectImage(tokenData.tokenId); let img; let CID = "QmQbhSFfVp9oeZbWEwyPV28SyNcDdugYXS9m6eKhzk6TDi"; function preload() { img = loadImage(`https://pinata.brightmoments.io/ipfs/${CID}/${selectedImage}.png`); } function setup() { createCanvas(windowWidth, windowHeight); } function draw() { background(255); let imgAspectRatio = img.width / img.height; let newWidth = width; let newHeight = newWidth / imgAspectRatio; if (newHeight > height) { newHeight = height; newWidth = newHeight * imgAspectRatio; } let x = (width - newWidth) / 2; let y = (height - newHeight) / 2; image(img, x, y, newWidth, newHeight); } function windowResized() { resizeCanvas(windowWidth, windowHeight); } // let tokenData = { tokenId : 19000000, tokenhash : "QmShbQd2SXzdSCjVmDu5RpLrSJ6tJy3toqP3EzQyNeKoE7" } // 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);}
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);}
function mulberry32(seed) { let state = seed; return function() { state |= 0; state = (state + 0x6D2B79F5) | 0; let t = Math.imul(state ^ (state >>> 15), 1 | state); t ^= t + Math.imul(t ^ (t >>> 7), t | 61); return ((t ^ (t >>> 14)) >>> 0) / 4294967296; // Normalize to [0, 1) }; } function fisherYatesShuffle(seed, array) { let currentIndex = array.length; let temporaryValue, randomIndex; const rng = mulberry32(seed); while (currentIndex !== 0) { randomIndex = Math.floor(rng() * currentIndex); currentIndex -= 1; temporaryValue = array[currentIndex]; array[currentIndex] = array[randomIndex]; array[randomIndex] = temporaryValue; } return array; } function generateIndices(seed, totalImages) { const array = Array.from({ length: totalImages }, (_, i) => i + 1); return fisherYatesShuffle(seed, array); } function selectImage(tokenId, totalImages = 539) { const seed = 29614569; const indices = generateIndices(seed, totalImages); const selection = indices[tokenId % totalImages].toString().padStart(3, '0'); console.log(`tokenId: ${tokenId}`); console.log(`Selection: ${selection}`); return selection; } const selectedImage = selectImage(tokenData.tokenId); let img; let CID = "QmShbQd2SXzdSCjVmDu5RpLrSJ6tJy3toqP3EzQyNeKoE7"; function preload() { img = loadImage(`https://ipfs.brightmoments.io/ipfs/${CID}/${selectedImage}.png`); } function setup() { createCanvas(windowWidth, windowHeight); } function draw() { background(255); let imgAspectRatio = img.width / img.height; let newWidth = width; let newHeight = newWidth / imgAspectRatio; if (newHeight > height) { newHeight = height; newWidth = newHeight * imgAspectRatio; } let x = (width - newWidth) / 2; let y = (height - newHeight) / 2; image(img, x, y, newWidth, newHeight); } function windowResized() { resizeCanvas(windowWidth, windowHeight); }
function mulberry32(seed) { let state = seed; return function() { state |= 0; state = (state + 0x6D2B79F5) | 0; let t = Math.imul(state ^ (state >>> 15), 1 | state); t ^= t + Math.imul(t ^ (t >>> 7), t | 61); return ((t ^ (t >>> 14)) >>> 0) / 4294967296; // Normalize to [0, 1) }; } function fisherYatesShuffle(seed, array) { let currentIndex = array.length; let temporaryValue, randomIndex; const rng = mulberry32(seed); while (currentIndex !== 0) { randomIndex = Math.floor(rng() * currentIndex); currentIndex -= 1; temporaryValue = array[currentIndex]; array[currentIndex] = array[randomIndex]; array[randomIndex] = temporaryValue; } return array; } function generateIndices(seed, totalImages) { const array = Array.from({ length: totalImages }, (_, i) => i + 1); return fisherYatesShuffle(seed, array); } function selectImage(tokenId, totalImages = 539) { const seed = 29614569; const indices = generateIndices(seed, totalImages); const selection = indices[tokenId % totalImages].toString().padStart(3, '0'); console.log(`tokenId: ${tokenId}`); console.log(`Selection: ${selection}`); return selection; } const selectedImage = selectImage(tokenData.tokenId); let img; let CID = "QmShbQd2SXzdSCjVmDu5RpLrSJ6tJy3toqP3EzQyNeKoE7"; function preload() { img = loadImage(`https://pinata.brightmoments.io/ipfs/${CID}/${selectedImage}.png`); } function setup() { createCanvas(windowWidth, windowHeight); } function draw() { background(255); let imgAspectRatio = img.width / img.height; let newWidth = width; let newHeight = newWidth / imgAspectRatio; if (newHeight > height) { newHeight = height; newWidth = newHeight * imgAspectRatio; } let x = (width - newWidth) / 2; let y = (height - newHeight) / 2; image(img, x, y, newWidth, newHeight); } function windowResized() { resizeCanvas(windowWidth, windowHeight); }
function mulberry32(seed) { let state = seed; return function() { state |= 0; state = (state + 0x6D2B79F5) | 0; let t = Math.imul(state ^ (state >>> 15), 1 | state); t ^= t + Math.imul(t ^ (t >>> 7), t | 61); return ((t ^ (t >>> 14)) >>> 0) / 4294967296; // Normalize to [0, 1) }; } function fisherYatesShuffle(seed, array) { let currentIndex = array.length; let temporaryValue, randomIndex; const rng = mulberry32(seed); while (currentIndex !== 0) { randomIndex = Math.floor(rng() * currentIndex); currentIndex -= 1; temporaryValue = array[currentIndex]; array[currentIndex] = array[randomIndex]; array[randomIndex] = temporaryValue; } return array; } function generateIndices(seed, totalImages) { const array = Array.from({ length: totalImages }, (_, i) => i + 1); return fisherYatesShuffle(seed, array); } function selectImage(tokenId, totalImages = 539) { const seed = 29614569; const indices = generateIndices(seed, totalImages); const selection = indices[tokenId % totalImages].toString().padStart(3, '0'); console.log(`tokenId: ${tokenId}`); console.log(`Selection: ${selection}`); return selection; } let tokenId = 8; const selectedImage = selectImage(tokenId); let img; let CID = "QmShbQd2SXzdSCjVmDu5RpLrSJ6tJy3toqP3EzQyNeKoE7"; function preload() { img = loadImage(`https://pinata.brightmoments.io/ipfs/${CID}/${selectedImage}.png`); } function setup() { createCanvas(windowWidth, windowHeight); } function draw() { background(255); let imgAspectRatio = img.width / img.height; let newWidth = width; let newHeight = newWidth / imgAspectRatio; if (newHeight > height) { newHeight = height; newWidth = newHeight * imgAspectRatio; } let x = (width - newWidth) / 2; let y = (height - newHeight) / 2; image(img, x, y, newWidth, newHeight); } function windowResized() { resizeCanvas(windowWidth, windowHeight); }
let hash=tokenData.hash;let mintNumber=parseInt(tokenData.tokenId)%1000000;console.log("Hash: "+hash);console.log("Edition: "+mintNumber);class Rand{constructor(e,f){const a=Uint32Array.of(9,7,5,3);this.R=(e=1)=>e*(e=a[3],a[3]=a[2],a[2]=a[1],e^=e<<11,a[0]^=e^e>>>8^(a[1]=a[0])>>>19,a[0]/2**32),[...e+f+"ThxPiter"].map((e=>this.R(a[3]^=23205*e.charCodeAt())))}d(){return this.R()}n(e,f){return e+(f-e)*this.d()}i(e,f){return~~this.n(e,f+1)}b(e){return this.d()>e?1:0}c(e){return e[this.i(0,e.length-1)]}w(e){let f=0;for(let a=0;a<e.length;++a)f+=e[a][0];const a=this.d()*f;f=0;for(let d=0;d<e.length-1;++d)if(f+=e[d][0],f>=a)return e[d];return e[e.length-1]}}R=new Rand(hash,"StuckInALoop");let paused=!1;const pals=[[1,"Lola","463f3a","8a817c","bcb8b1","f4f3ee","e0afa0"],[1,"Cowabunga Dude","072ac8","1e96fc","a2d6f9","ff7b00","ff9500","ffaa00","ffb700","ffd000","ffdd00","ffea00"],[1,"Vintage Television","080708","3772ff","df2935","fdca40","e6e8e6"],[1,"Camper Van","001219","005f73","0a9396","94d2bd","e9d8a6","ee9b00","ca6702","bb3e03","ae2012","9b2226"],[1,"Pickle Breath","007f5f","2b9348","55a630","80b918","aacc00","bfd200","d4d700","dddf00","eeef20","ffff3f"],[1,"Expired Raspberry","ffbc42","d81159","8f2d56","218380","73d2de"],[1,"Peach Wave","f94144","f3722c","f8961e","f9844a","f9c74f","90be6d","43aa8b","4d908e","577590","277da1"],[1,"Rainbow Dust ","3c153b","8b1e3f","db4c40","ffc857","bce784","5dd39e","348aa7"],[1,"Tangerplant","ff6d00","ff7900","ff8500","ff9100","ff9e00","240046","3c096c","5a189a","7b2cbf","9d4edd"],[1,"Cyber Snack","f72585","7209b7","3a0ca3","4361ee","4cc9f0"],[1,"Tastes Like Burning","03071e","370617","6a040f","9d0208","d00000","dc2f02","e85d04","f48c06","faa307","ffba08"],[1,"Lagoonies Never Say Die","d9ed92","b5e48c","99d98c","76c893","52b69a","34a0a4","168aad","1a759f","1e6091","184e77"],[1,"The Other Venice","264653","2a9d8f","e9c46a","f4a261","e76f51"],[1,"Radio Tower","176bff","fdc552","f9d4d2","72754b","ff7348","fffbee","333333"],[1,"Naptime","d00000","ffba08","3f88c5","032b43","136f63"],[1,"Grape Waterslide","3c1642","086375","1dd3b0","affc41","b2ff9e"],[1,"The Black Parade","2b2d42","8d99ae","edf2f4","ef233c","d90429"],[1,"Two cream One sugar","f3e9dc","c08552","5e3023","895737","dab49d"],[1,"Ferris Wheel","ff595e","ffca3a","8ac926","1982c4","6a4c93"],[1,"Electric Boogaloo","ffbe0b","fb5607","ff006e","8338ec","3a86ff"],[1,"Vegetarian","dad7cd","a3b18a","588157","3a5a40","344e41"],[1,"Black & White","f8f9fa","e9ecef","dee2e6","ced4da","adb5bd","6c757d","495057","343a40","212529"]],pal=R.w(pals);console.log("Palette: "+pal[1]);const motions=["p.xz*=Rot(time*.05);","p.yz*=Rot(time*.05);","p.xy*=Rot(time*.05);","p.xz*=Rot(-time*.05);","p.yz*=Rot(-time*.05);","p.xy*=Rot(-time*.05);"];let motion=R.c(motions);const gridsize=R.i(3,6);const vertexShaderSource =`#version 300 es\nin vec2 aVertexPosition;void main(){gl_Position=vec4(aVertexPosition,0.0,1.0);}`;let fragmentShaderSource =`#version 300 es\n#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec2 u_resolution;uniform float u_time;uniform sampler2D u_tex0;uniform float u_rot;\n#define AA ${(paused?4:1)}\n#define BLUR 60.\n#define PI 3.14159265359\n#define TAU PI*2.\n#define MS 256\n#define MD 100.\n#define SD .0001\n#define FB ${R.d()* 6+6}\n#define LL 2.\n#define S smoothstep\nfloat Hash21(vec2 p){p=fract(p*vec2(${R.d()*123.34+123.34},${R.d()*456.21+456.21}));p+=dot(p,p+${R.d()*45.32+45.32});return fract(p.x*p.y);}vec4 toLinear(vec4 sRGB){bvec4 co=lessThan(sRGB,vec4(0.04045));vec4 hi=pow((sRGB+vec4(0.055))/vec4(1.055),vec4(2.4));vec4 lo=sRGB/vec4(12.92);return mix(hi,lo,co);}mat2 Rot(float a){return mat2(cos(a),-sin(a),sin(a),cos(a));}float Smin(float a,float b,float k){float h=max(k-abs(a-b),0.0)/k;return min(a,b)-h*h*k*(1.0/4.0);}float Box(vec3 p,vec3 b,float xz,float xy,float yz){for(float i=0.; i < FB; i++){p.xz*=Rot(xz);p.xy*=Rot(xy);p.yz*=Rot(yz);p=abs(p);}vec3 q=abs(p)-b;return length(max(q,0.0))+min(max(q.x,max(q.y,q.z)),0.0);}float Light(vec2 uv,float flare){float d=length(uv);float m=.2/d;float rays=max(0.,1.-abs(uv.x*uv.y*1000.));m+=rays*flare;uv*=Rot(3.14159/4.);rays=max(0.,1.-abs(uv.x*uv.y*1000.));m+=rays*.3*flare;m*=S(1.25,.2,d);return m;}vec3 LightLayer(vec2 uv,vec3 c){vec3 col=vec3(0.);vec2 gv=fract(uv)-.5;vec2 id=floor(uv);for(int y=-1;y<=1;y++){for(int x=-1;x<=1;x++){vec2 off=vec2(x,y);float n=Hash21(id+off);float size =fract(n*145.32);float light=Light(gv-off-vec2(n,fract(n*34.42))+.5,S(.85,1.,size)* .5);col+=light*size*c;}}return col;}vec3 Lights(vec2 uv,float time,vec3 c){vec3 col=vec3(0.);for(float i=0.; i<1.; i+=1./LL){float depth=fract(i);float scale=mix(20.,.5,depth); float fade=depth*S(1.,.95,depth); col+=LightLayer(uv*scale+i*643.3,c)*fade;}return col;}float Swirls(vec3 p){float res=0.;float o=${R.n(.3,.8)};vec3 p1=p;for(int i=0;i<20;++i){p=o*abs(p)/dot(p,p)-o;p.yz=vec2(p.y*p.y-p.z*p.z,1.5*p.y*p.z);p=p.zxy;res+=exp(-20.*abs(dot(p,p1)));}return res;}float GetDist(vec3 p,float time){${motion}float b1=Box(p+vec3(0.0,0.0,0.0),vec3(.45),${R.d()* Math.PI*2},${R.d()* Math.PI*2},${R.d()* Math.PI*2});float b2=Box(p-vec3(0.0,0.0,0.0),vec3(.45),${R.d()* Math.PI*2},${R.d()* Math.PI*2},${R.d()* Math.PI*2});return Smin(b1,b2,0.2);}float RayMarch(vec3 ro,vec3 rd,float side,float time){float dO=0.;for(int i=0; i<MS; i++){vec3 p=ro+rd*dO;float dS=GetDist(p,time)*side;dO+=dS;if(dO>MD||abs(dS)<SD)break;}return dO;}vec3 GetNormal(vec3 p,float time){float d=GetDist(p,time);vec2 e=vec2(.0075,0);vec3 n=d-vec3(GetDist(p-e.xyy,time),GetDist(p-e.yxy,time),GetDist(p-e.yyx,time));return normalize(n);}vec3 GetRayDir(vec2 uv,vec3 p,vec3 l,float z){vec3 f=normalize(l-p),r=normalize(cross(vec3(0,1,0),f)),u=cross(f,r),c=f*z,i=c+uv.x*r+uv.y*u,d=normalize(i);return d;}vec3 Render(vec2 uv,vec3 ro,vec3 rd,float time){vec3 col=vec3(0.);float d=RayMarch(ro,rd,1.,time);float IOR=1.52;if(d<MD){vec3 p=ro+rd*d;vec3 n=GetNormal(p,time);vec3 r=reflect(rd,n);vec3 rdIn=refract(rd,n,1./IOR);vec3 pEnter=p-n*SD*5.;float dIn=RayMarch(pEnter,rdIn,-1.,time);vec3 pExit=pEnter+rdIn*dIn;vec3 nExit=-GetNormal(pExit,time);float dens=.15;float optDist=exp(-dIn*dens);vec3 rdOut=refract(rdIn,nExit,IOR)*optDist;if(dot(rdOut,rdOut)==0.)rdOut=reflect(rdIn,nExit);rdOut=clamp(rdOut,-1.,1.);float dif=dot(n,normalize(vec3(1,2,3)))*.5+.5;vec4 t1=texture(u_tex0,rdOut.xy);vec4 t2=texture(u_tex0,n.xy);float fresnel=pow(1.+dot(rd,n),3.);vec3 lights=Lights(rdOut.xy,time,t2.rgb);${motion}float swirls=Swirls(p*1.5);col=mix(t1.rgb*t1.rgb,vec3(1),fresnel);col*=swirls;col*=(lights);}return col;}out vec4 fragColor;void main(){vec2 uv=vec2(0.);float time=u_time;vec4 col=vec4(0.0);vec4 tot=vec4(0.0);vec3 lp=vec3(0,0,0);for(int m=0; m<AA; m++){for(int n=0; n<AA; n++){vec2 o=vec2(float(m),float(n))/float(AA)-0.5;uv=(2.0*(gl_FragCoord.xy+o)-u_resolution.xy)/min(u_resolution.x,u_resolution.y); float dd=0.5+0.5*sin(gl_FragCoord.x*416.0)*sin(gl_FragCoord.y*647.0);time=u_time-0.5*(1.0/BLUR)*(float(m*2+n)+dd)/float(AA*AA);vec3 ro=vec3(1.,0.,1.);vec3 rd=GetRayDir(uv,ro,vec3(0,0,0),4.);col=vec4(Render(uv+0.0001,ro,rd,time),1.0); tot+=pow(col,vec4(0.4545));}}tot/=float(AA*AA);tot=clamp(tot,0.1,1.0);tot=tot*tot*(3.0-2.0*tot);tot+=tot*.15;tot=toLinear(tot);vec3 x=min(vec3(1.),tot.rgb/1.);tot=vec4(pow(clamp((x*(2.51*x+.03))/(x*(2.43*x+.59)+.14),0.,1.),vec3(1./2.20)),1.);fragColor=vec4(tot);}`;document.addEventListener("keydown",(e=>{const r=e.key;"s"===r&&(init(),render(),save()),"p"===r&&pause()}));const save=e=>{console.log("saving"),canvas.toBlob((e=>{const r=document.createElement("a");r.href=URL.createObjectURL(e),r.setAttribute("download","IfYouCouldDoItAllAgain_("+pal[1]+")_"+mintNumber+".png"),r.click()}),"image/png",1)},compileShader=(e,r,t)=>{const a=e.createShader(t);e.shaderSource(a,r),e.compileShader(a);if(!e.getShaderParameter(a,e.COMPILE_STATUS))throw"could not compile shader:"+e.getShaderInfoLog(a);return a},createProgram=(e,r,t)=>{const a=e.createProgram();e.attachShader(a,r),e.attachShader(a,t),e.linkProgram(a);if(!e.getProgramParameter(a,e.LINK_STATUS))throw"program failed to link:"+e.getProgramInfoLog(a);return a},init=e=>{const r=new Float32Array([-1,1,1,1,1,-1,-1,1,1,-1,-1,-1]),t=gl.createBuffer();gl.bindBuffer(gl.ARRAY_BUFFER,t),gl.bufferData(gl.ARRAY_BUFFER,r,gl.STATIC_DRAW);const a=compileShader(gl,vertexShaderSource,gl.VERTEX_SHADER),o=compileShader(gl,fragmentShaderSource,gl.FRAGMENT_SHADER);program=createProgram(gl,a,o),program.aVertexPosition=gl.getAttribLocation(program,"aVertexPosition"),gl.enableVertexAttribArray(program.aVertexPosition),gl.vertexAttribPointer(program.aVertexPosition,2,gl.FLOAT,!1,0,0),gl.useProgram(program),gl.bindBuffer(gl.ARRAY_BUFFER,t);for(var n=[offscreen0],l=[],g=0;g<n.length;++g){var i=gl.createTexture();gl.bindTexture(gl.TEXTURE_2D,i),gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_S,gl.REPEAT),gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_WRAP_T,gl.REPEAT),gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MIN_FILTER,gl.NEAREST),gl.texParameteri(gl.TEXTURE_2D,gl.TEXTURE_MAG_FILTER,gl.NEAREST),gl.texImage2D(gl.TEXTURE_2D,0,gl.RGBA,gl.RGBA,gl.UNSIGNED_BYTE,n[g]),l.push(i)}gl.activeTexture(gl.TEXTURE0),gl.bindTexture(gl.TEXTURE_2D,l[0])},render=e=>{gl.viewport(0,0,canvas.width,canvas.height),gl.clearColor(1,1,1,1),gl.clear(gl.COLOR_BUFFER_BIT),program.uPosition=gl.getUniformLocation(program,"u_resolution"),gl.uniform2fv(program.uPosition,[gl.canvas.width,gl.canvas.height]),program.uTime=gl.getUniformLocation(program,"u_time"),gl.uniform1f(program.uTime,.001*ctime),program.uTex0=gl.getUniformLocation(program,"u_tex0"),gl.uniform1i(program.uTex0,0),gl.drawArrays(gl.TRIANGLES,0,6),paused||(ctime=e-pdelta,requestAnimationFrame(render))};let colorcount=0;const createCell=(e,r,t,a,o)=>{if(o>0)R.d()>.5?(createCell(e,r,t,a/2,o-1),createCell(e,r+a/2,t,a/2,o-1)):(createCell(e,r,t/2,a,o-1),createCell(e+t/2,r,t/2,a,o-1));else{const n=txt0.createLinearGradient(e-t/2,r,t,a);colorcount++,n.addColorStop(0,"#"+pal.slice(2)[colorcount%(pal.length-2)]),colorcount++,n.addColorStop(1,"#"+pal.slice(2)[colorcount%(pal.length-2)]),txt0.fillStyle=n,o<2&&R.b(.85)&&(txt0.fillStyle="#FFFFFF"),txt0.fillRect(e-1,r-1,t+1,a+1)}},generateBg=e=>{offscreen0.width=canvas.width,offscreen0.height=canvas.height,createCell(0,0,canvas.width,canvas.height,gridsize)},updateAA=e=>{fragmentShaderSource=fragmentShaderSource.replace(/#define AA \d/gms,`#define AA ${e}`),init(),render()},pause=(e,r)=>{paused=!paused,0==paused?(pdelta+=performance.now()-ptime,ptime=0,updateAA(minAA),render()):(ptime=performance.now(),updateAA(maxAA))};let program,minAA=1,maxAA=4,ctime=0,ptime=0,pdelta=0;const canvas=document.createElement("canvas");innerWidth<.75*innerHeight?(canvas.width=innerWidth,canvas.height=1.333*canvas.width):(canvas.height=innerHeight,canvas.width=.75*canvas.height);const gl=canvas.getContext("webgl2",{antialias:!0});document.body.appendChild(canvas);const offscreen0=document.createElement("canvas"),txt0=offscreen0.getContext("2d");offscreen0.width=canvas.width,offscreen0.height=canvas.height,createCell(0,0,canvas.width,canvas.height,gridsize),init(),render();canvas.addEventListener('click',function(){console.log('pause');pause()});
Time moves forward, and although it can seemingly pause, it can never move in a different direction. However, the way we experience time is cyclical. Year after year, month after month, day after day, our lives seem to happen in loops. No matter what paths we take in life, sometimes we end up right back where we started. In *If You Could Do It All Again* a simple 2D grid of colors is blended, reflected, and refracted through a rotating glass-like structure in 3D space. With a slow and hypnotic motion causing the viewer to stop and focus on the canvas. Their experienced time is, in a sense, paused; a contradiction to the moving image in front of them. *If You Could Do It All Again* is coded in GLSL and Javascript within a single fragment shader, using a technique known as Raymarching. Each pixel reacts to the mathematics and logic within the shader software. Programming a system to carefully color every point on the canvas. Keyboard Commands: [P] or click/tap on the canvas to pause the animation and enable anti-aliasing [S] to save an image
Technologies colliding, mythologies melding, capacitors becoming gears, transistors the wings of angels. The microscopic becoming monumental, the fantastic morphing into the real. Ancient Automata reflect algorithmic hallucinations of a generative possibility, informed through centuries of cultural representation, appropriation and emergent desires. Ancient Automata is a ‘middle form’ generative AI collection developed with MidJourney 5.2. Nine Renaissance artists (Giotto, Masaccio, Piero della Francesca, Giovanni Bellini, Jan van Eyck, Andrea Mantegna, Hieronymus Bosch, Pieter Bruegel the Elder, Hans Holbein the Younger) and thirteen color palettes (red, blue, yellow, green, orange, lavender, primary, secondary, gray, metallic, earth, pastel, spectrum) influence 468 unique outputs. The artist manually added an additional expressive mood feature (solemn, neutral, joyful) to each of the images. All 468 outputs are included in an image pool without artist curation. Images are randomly selected at time of mint, ensuring only a single instance of each of the 100 final tokens. Images are each 5824px x 3264px.
const _0x2a0ca1=_0x1a44;(function(_0x358b3e,_0x4791b3){const _0x57c393=_0x1a44,_0x3eecbc=_0x358b3e();while(!![]){try{const _0x1b3bd4=-parseInt(_0x57c393(0xe0))/0x1+parseInt(_0x57c393(0xdd))/0x2*(parseInt(_0x57c393(0xdc))/0x3)+-parseInt(_0x57c393(0xe5))/0x4+-parseInt(_0x57c393(0xee))/0x5*(-parseInt(_0x57c393(0xea))/0x6)+parseInt(_0x57c393(0xe3))/0x7+-parseInt(_0x57c393(0xdb))/0x8*(-parseInt(_0x57c393(0xe6))/0x9)+-parseInt(_0x57c393(0xd9))/0xa*(parseInt(_0x57c393(0xe7))/0xb);if(_0x1b3bd4===_0x4791b3)break;else _0x3eecbc['push'](_0x3eecbc['shift']());}catch(_0x1d23b4){_0x3eecbc['push'](_0x3eecbc['shift']());}}}(_0x2e84,0x61046));function fys(_0x522161,_0x35bb8b){let _0x3ba923=_0x35bb8b['length'],_0x144056,_0xb92a89;while(_0x3ba923!==0x0){_0xb92a89=(_0x522161+_0x3ba923)%_0x3ba923,_0x3ba923-=0x1,_0x144056=_0x35bb8b[_0x3ba923],_0x35bb8b[_0x3ba923]=_0x35bb8b[_0xb92a89],_0x35bb8b[_0xb92a89]=_0x144056;}return _0x35bb8b;}function _0x1a44(_0x42a552,_0x3c23d3){const _0x2e846a=_0x2e84();return _0x1a44=function(_0x1a4479,_0x44f422){_0x1a4479=_0x1a4479-0xd8;let _0x371b6c=_0x2e846a[_0x1a4479];return _0x371b6c;},_0x1a44(_0x42a552,_0x3c23d3);}function generateIndices(_0x480621,_0x43644c){const _0x1399f7=_0x1a44,_0x2a6fc0=Array[_0x1399f7(0xe1)]({'length':_0x43644c},(_0x2960d5,_0x4f9e4e)=>_0x4f9e4e);return fys(_0x480621,_0x2a6fc0);}function selectImage(_0x5c22d7,_0x59ab7b=0x1d3){const _0xe4eabe=_0x1a44,_0x21f808=0xbb782,_0x3134c1=generateIndices(_0x21f808,_0x59ab7b);return console[_0xe4eabe(0xd8)](_0xe4eabe(0xde)+_0x5c22d7),console[_0xe4eabe(0xd8)](_0xe4eabe(0xeb)+_0x3134c1[_0x5c22d7%_0x59ab7b]),_0x3134c1[_0x5c22d7%_0x59ab7b];}const selectedImage=selectImage(tokenData[_0x2a0ca1(0xed)]);function _0x2e84(){const _0x304c64=['tokenId','5ycjSta','.png','length','log','20RGMvsX','text','2012896mLQXyM','27549bAFoJc','154hJjRge','tokenId:\x20','split','467960MretjJ','from','then','4183235sUNmZP','QmXdp6nbwBRsfH42z8GU7WuPrFvUS4hV1k59EzJLY8rVCL','874708KQpPNl','9plWjQY','4915581RRsOVX','https://ipfs.brightmoments.io/ipfs','height','2528718HwVhgN','Selection:\x20','width'];_0x2e84=function(){return _0x304c64;};return _0x2e84();}let img,CID=_0x2a0ca1(0xe4),baseURL=_0x2a0ca1(0xe8);function preload(){const _0x5d5eb3=_0x2a0ca1;img=loadImage(baseURL+'/'+CID+'/'+selectedImage+_0x5d5eb3(0xef));}function setup(){createCanvas(windowWidth,windowHeight);}function draw(){const _0x290b7e=_0x2a0ca1;background(0xff);let _0x39ed41=img[_0x290b7e(0xec)]/ img[_0x290b7e(0xe9)],_0x17048b=width,_0x3f6826=_0x17048b/_0x39ed41;_0x3f6826>height&&(_0x3f6826=height,_0x17048b=_0x3f6826*_0x39ed41);let _0xfa0f55=(width-_0x17048b)/0x2,_0x2b8c24=(height-_0x3f6826)/0x2;image(img,_0xfa0f55,_0x2b8c24,_0x17048b,_0x3f6826);}function windowResized(){resizeCanvas(windowWidth,windowHeight);}function getDataById(_0xec50ec){const _0x547148=_0x2a0ca1;return fetch(baseURL+'/'+CID+'/output.csv')[_0x547148(0xe2)](_0x5108ad=>_0x5108ad[_0x547148(0xda)]())[_0x547148(0xe2)](_0x300bc7=>{const _0xd2410c=_0x547148,_0x248fee=_0x300bc7[_0xd2410c(0xdf)]('\x0a');for(let _0x47063b=0x1;_0x47063b<_0x248fee[_0xd2410c(0xf0)];_0x47063b++){const _0x5f106c=_0x248fee[_0x47063b][_0xd2410c(0xdf)](',');if(_0x5f106c[0x0]==_0xec50ec)return{'Artist\x20Influence':_0x5f106c[0x1],'Color\x20Palette':_0x5f106c[0x2],'Expressive\x20Mood':_0x5f106c[0x3]};}return null;});}getDataById(selectedImage)[_0x2a0ca1(0xe2)](_0x47b88b=>console[_0x2a0ca1(0xd8)](_0x47b88b));