8a0b6bdf8404f4bd0bfe8375238efd798f8f9e7a6a4b43e585e7c6ea8d6cb3ea
Ordinals NFT
Copy
Included in Block
Time
02-23-2023 18:07:36 (Local)
Sponsored
Transaction Fees
0.00001665
BTC
Confirmations
94284
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>noise</title>
<!--
Generative supports the most popular creative coding libraries. Simply uncomment the library you want to use below.
Are we missing an important library? Let us know @generative_xyz.
-->
<script sandbox="allow-scripts" type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.5.0/p5.min.js"></script>
<!-- c2.min.js@1.0.0
<script sandbox="allow-scripts" type="text/javascript" src="https://cdn.generative.xyz/ajax/libs/c2/1.0.0/c2.min.js"></script>
-->
<!-- chromajs@2.4.2
<script sandbox="allow-scripts" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/chroma-js/2.4.2/chroma.min.js"></script>
-->
<!-- p5.grain.js@0.6.1
<script sandbox="allow-scripts" type="text/javascript" src="https://cdn.generative.xyz/ajax/libs/p5.grain/0.6.1/p5.grain.min.js"></script>
-->
<!-- threejs@r124
<script sandbox="allow-scripts" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r124/three.min.js"></script>
-->
<!-- tonejs@14.8.49
<script sandbox="allow-scripts" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/tone/14.8.49/Tone.js"></script>
-->
<script type="text/javascript">
let nextLineY = 30;
let colors = [];
let colors2 = [];
function setup() {
cSize = min(windowHeight, windowWidth);
createCanvas(cSize, cSize);
for (let i = 0; i < 5; i++) {
colors.push(color(mathrand(255, 0), mathrand(255, 0), mathrand(255, 0), mathrand(255, 0)))
colors2.push(color(mathrand(255, 0), mathrand(255, 0), mathrand(255, 0)))
}
noLoop();
}
function draw() {
console.log(height, width)
while (nextLineY < height) {
drawLine(0, nextLineY)
nextLineY = nextLineY + 3
}
}
function drawLine(x, y) {
let nextRectX = x;
noStroke()
while (nextRectX < width) {
let rectWidth = mathrand(2, 1);
let rectHight = mathrand(3, 1);
fill(colors[mathrand(colors.length - 1, 0)])
rect(nextRectX, y - rectHight / 2, rectWidth, rectHight);
nextRectX = nextRectX + rectWidth;
// if (rectHight / 2 + y > nextLineY) {
// nextLineY = rectHight / 2 + y;
// }
}
let numberOfBigBlocks = mathrand(45, 7);
for (let i = 0; i < numberOfBigBlocks; i++) {
stroke(colors2[mathrand(colors2.length - 1, 0)]);
strokeWeight(mathrand(3, 1))
noFill()
rectWidth = mathrand(20, 1);
rectHight = mathrand(35, 1);
rect(mathrand(width, 0), y - rectHight / 2, rectWidth, rectHight);
}
}
function mathrand(max, min, float = false) {
const val = mathRand() * (max - min + 1) + min;
if (float) return val;
return Math.floor(val);
}
</script>
<script id="snippet-random-code" type="text/javascript">
// DO NOT EDIT THIS SECTION
let seed = window.location.href.split('/').find(t => t.includes('i0'));
if (seed == null) {
const alphabet = "0123456789abcdefghijklmnopqrstuvwsyz";
seed = new URLSearchParams(window.location.search).get("seed") || Array(64).fill(0).map(_ => alphabet[(Math.random() * alphabet.length) | 0]).join('') + "i0";
} else {
let pattern = "seed=";
for (let i = 0; i < seed.length - pattern.length; ++i) {
if (seed.substring(i, i + pattern.length) == pattern) {
seed = seed.substring(i + pattern.length);
break;
}
}
}
function cyrb128($) {
let _ = 1779033703, u = 3144134277, i = 1013904242, l = 2773480762;
for (let n = 0, r; n < $.length; n++) _ = u ^ Math.imul(_ ^ (r = $.charCodeAt(n)), 597399067), u = i ^ Math.imul(u ^ r, 2869860233), i = l ^ Math.imul(i ^ r, 951274213), l = _ ^ Math.imul(l ^ r, 2716044179);
return _ = Math.imul(i ^ _ >>> 18, 597399067), u = Math.imul(l ^ u >>> 22, 2869860233), i = Math.imul(_ ^ i >>> 17, 951274213), l = Math.imul(u ^ l >>> 19, 2716044179), [(_ ^ u ^ i ^ l) >>> 0, (u ^ _) >>> 0, (i ^ _) >>> 0, (l ^ _) >>> 0]
}
function sfc32($, _, u, i) {
return function () {
u >>>= 0, i >>>= 0;
var l = ($ >>>= 0) + (_ >>>= 0) | 0;
return $ = _ ^ _ >>> 9, _ = u + (u << 3) | 0, u = (u = u << 21 | u >>> 11) + (l = l + (i = i + 1 | 0) | 0) | 0, (l >>> 0) / 4294967296
}
}
// IMPORTANT: Instead of Math.random(), use this function mathRand() for random number generation.
// This function generates a random number between 0 and 1 with on-chain seed.
let mathRand = sfc32(...cyrb128(seed));
</script>
<style>
body {
margin: 0;
padding: 0;
/* leave it to hide the scrollbars */
overflow: hidden;
}
</style>
</head>
<body>
<script type="text/javascript">
const rand = mathRand();
// ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ Add traits here ↓↓↓↓↓↓↓↓↓↓↓↓↓↓
function T1(rand) {
// calculate rarity by yourself
if (rand > 0.5) {
return true;
} else {
return false
}
}
// window.$generativeTraits contain list traits for token
// you need to populate a $generativeTraits object in the window object
window.$generativeTraits = {
"T1": T1(rand),
}
// ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ Add traits here ↑↑↑↑↑↑↑↑↑↑↑↑↑↑
// ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ Add your code here ↓↓↓↓↓↓↓↓↓↓↓↓↓↓
// const container = document.createElement("div")
// container.innerHTML = "<span>seed: " + seed + "</span><br>";
// document.body.prepend(container)
// ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ Add your code here ↑↑↑↑↑↑↑↑↑↑↑↑↑↑
</script>
</body>
</html>