0x6a4a…a79e

All memos sent from and to 0x6a4a…a79e.

<!doctype html><html><head><meta charset="utf-8"><title>smear</title><style> * { margin: 0; padding: 0; box-sizing: border-box; } body, html { width: 100%; height: 100%; overflow: hidden; background: #000; } smear-partition { display: block; width: 100%; height: 100%; position: relative; } smear-canvas { display: block; position: absolute; } smear-canvas canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: -moz-crisp-edges; image-rendering: crisp-edges; -ms-interpolation-mode: nearest-neighbor; } .smear-container { position: absolute; overflow: hidden; } .smear-container canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; } </style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="smear-container" data-x="0" data-y="0" data-width="0.26736042944785277" data-height="0.04206840490797546" data-start-edge="bottom" data-speed="42" data-source-interval="625" data-pixel-size="4" data-color-fg="#FFFFFF" data-color-bg="#CCCCCC" data-source-type="linear-gradient" style="left: 0px; top: 0px; width: 174.319px; height: 27.4286px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.04206840490797546" data-width="0.26736042944785277" data-height="0.23374539877300612" data-start-edge="bottom" data-speed="62" data-source-interval="957" data-pixel-size="6" data-color-fg="#FF0000" data-color-bg="#000000" data-source-type="linear-gradient" style="left: 0px; top: 27.4286px; width: 174.319px; height: 152.402px;"><canvas></canvas></div><div class="smear-container" data-x="0.26736042944785277" data-y="0" data-width="0.2326733128834356" data-height="0.07483312883435583" data-start-edge="left" data-speed="90" data-source-interval="502" data-pixel-size="3" data-color-fg="#FF0000" data-color-bg="#FFFFFF" data-source-type="linear-gradient" style="left: 174.319px; top: 0px; width: 151.703px; height: 48.7912px;"><canvas></canvas></div><div class="smear-container" data-x="0.26736042944785277" data-y="0.07483312883435583" data-width="0.2326733128834356" data-height="0.20098006134969323" data-start-edge="left" data-speed="88" data-source-interval="1281" data-pixel-size="3" data-color-fg="#FFFFFF" data-color-bg="#CCCCCC" data-source-type="linear-gradient" style="left: 174.319px; top: 48.7912px; width: 151.703px; height: 131.039px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.27581288343558286" data-width="0.2191027607361963" data-height="0.2296993865030675" data-start-edge="top" data-speed="29" data-source-interval="1048" data-pixel-size="2" data-color-fg="#FFFFFF" data-color-bg="#FF00CC" data-source-type="linear-gradient" style="left: 0px; top: 179.83px; width: 142.855px; height: 149.764px;"><canvas></canvas></div><div class="smear-container" data-x="0.2191027607361963" data-y="0.27581288343558286" data-width="0.18658895705521472" data-height="0.2296993865030675" data-start-edge="bottom" data-speed="42" data-source-interval="749" data-pixel-size="2" data-color-fg="#87CEEB" data-color-bg="#000000" data-source-type="linear-gradient" style="left: 142.855px; top: 179.83px; width: 121.656px; height: 149.764px;"><canvas></canvas></div><div class="smear-container" data-x="0.40569171779141106" data-y="0.27581288343558286" data-width="0.09434171779141105" data-height="0.2296993865030675" data-start-edge="left" data-speed="42" data-source-interval="1344" data-pixel-size="4" data-color-fg="#FF0000" data-color-bg="#FFFFFF" data-source-type="linear-gradient" style="left: 264.511px; top: 179.83px; width: 61.5108px; height: 149.764px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.5055122699386503" data-width="0.20362576687116565" data-height="0.31282361963190186" data-start-edge="top" data-speed="56" data-source-interval="1054" data-pixel-size="5" data-color-fg="#FFFF00" data-color-bg="#FF0000" data-source-type="linear-gradient" style="left: 0px; top: 329.594px; width: 132.764px; height: 203.961px;"><canvas></canvas></div><div class="smear-container" data-x="0.20362576687116565" data-y="0.5055122699386503" data-width="0.12831150306748465" data-height="0.08207745398773006" data-start-edge="left" data-speed="57" data-source-interval="1083" data-pixel-size="5" data-color-fg="#FF0000" data-color-bg="#0000FF" data-source-type="linear-gradient" style="left: 132.764px; top: 329.594px; width: 83.6591px; height: 53.5145px;"><canvas></canvas></div><div class="smear-container" data-x="0.20362576687116565" data-y="0.587590490797546" data-width="0.12831150306748465" data-height="0.23074539877300612" data-start-edge="left" data-speed="58" data-source-interval="1959" data-pixel-size="5" data-color-fg="#0000FF" data-color-bg="#FF69B4" data-source-type="linear-gradient" style="left: 132.764px; top: 383.109px; width: 83.6591px; height: 150.446px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.818335889570552" data-width="0.33193711656441716" data-height="0.18166411042944786" data-start-edge="bottom" data-speed="45" data-source-interval="1925" data-pixel-size="4" data-color-fg="#FFFFFF" data-color-bg="#FF00CC" data-source-type="linear-gradient" style="left: 0px; top: 533.555px; width: 216.423px; height: 118.445px;"><canvas></canvas></div><div class="smear-container" data-x="0.33193711656441716" data-y="0.5055122699386503" data-width="0.16809662576687118" data-height="0.08321319018404909" data-start-edge="bottom" data-speed="77" data-source-interval="1315" data-pixel-size="1" data-color-fg="#FFFF00" data-color-bg="#FF0000" data-source-type="linear-gradient" style="left: 216.423px; top: 329.594px; width: 109.599px; height: 54.255px;"><canvas></canvas></div><div class="smear-container" data-x="0.33193711656441716" data-y="0.5887254601226993" data-width="0.16809662576687118" data-height="0.4112745398773006" data-start-edge="bottom" data-speed="32" data-source-interval="1084" data-pixel-size="4" data-color-fg="#FF0000" data-color-bg="#000000" data-source-type="linear-gradient" style="left: 216.423px; top: 383.849px; width: 109.599px; height: 268.151px;"><canvas></canvas></div><div class="smear-container" data-x="0.5000337423312883" data-y="0" data-width="0.10356579754601228" data-height="0.2063558282208589" data-start-edge="top" data-speed="68" data-source-interval="1593" data-pixel-size="6" data-color-fg="#FF0000" data-color-bg="#0000FF" data-source-type="linear-gradient" style="left: 326.022px; top: 0px; width: 67.5249px; height: 134.544px;"><canvas></canvas></div><div class="smear-container" data-x="0.6035996932515337" data-y="0" data-width="0.22001687116564417" data-height="0.2063558282208589" data-start-edge="right" data-speed="75" data-source-interval="1416" data-pixel-size="3" data-color-fg="#333333" data-color-bg="#000000" data-source-type="linear-gradient" style="left: 393.547px; top: 0px; width: 143.451px; height: 134.544px;"><canvas></canvas></div><div class="smear-container" data-x="0.5000337423312883" data-y="0.2063558282208589" data-width="0.32358282208588957" data-height="0.11754018404907976" data-start-edge="top" data-speed="56" data-source-interval="1355" data-pixel-size="1" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="linear-gradient" style="left: 326.022px; top: 134.544px; width: 210.976px; height: 76.6362px;"><canvas></canvas></div><div class="smear-container" data-x="0.823616564417178" data-y="0" data-width="0.17638343558282207" data-height="0.09563542944785276" data-start-edge="bottom" data-speed="29" data-source-interval="850" data-pixel-size="5" data-color-fg="#0000FF" data-color-bg="#666666" data-source-type="linear-gradient" style="left: 536.998px; top: 0px; width: 115.002px; height: 62.3543px;"><canvas></canvas></div><div class="smear-container" data-x="0.823616564417178" data-y="0.09563542944785276" data-width="0.17638343558282207" data-height="0.228260736196319" data-start-edge="left" data-speed="57" data-source-interval="1012" data-pixel-size="6" data-color-fg="#0000FF" data-color-bg="#FF69B4" data-source-type="linear-gradient" style="left: 536.998px; top: 62.3543px; width: 115.002px; height: 148.826px;"><canvas></canvas></div><div class="smear-container" data-x="0.5000337423312883" data-y="0.3238957055214724" data-width="0.2551963190184049" data-height="0.2782116564417178" data-start-edge="right" data-speed="30" data-source-interval="1568" data-pixel-size="5" data-color-fg="#FF0000" data-color-bg="#0000FF" data-source-type="linear-gradient" style="left: 326.022px; top: 211.18px; width: 166.388px; height: 181.394px;"><canvas></canvas></div><div class="smear-container" data-x="0.7552300613496933" data-y="0.3238957055214724" data-width="0.24476993865030675" data-height="0.2782116564417178" data-start-edge="right" data-speed="36" data-source-interval="940" data-pixel-size="5" data-color-fg="#FF0000" data-color-bg="#0000FF" data-source-type="linear-gradient" style="left: 492.41px; top: 211.18px; width: 159.59px; height: 181.394px;"><canvas></canvas></div><div class="smear-container" data-x="0.5000337423312883" data-y="0.6021073619631903" data-width="0.1659601226993865" data-height="0.05102009202453987" data-start-edge="left" data-speed="92" data-source-interval="1385" data-pixel-size="1" data-color-fg="#0000FF" data-color-bg="#000000" data-source-type="linear-gradient" style="left: 326.022px; top: 392.574px; width: 108.206px; height: 33.2651px;"><canvas></canvas></div><div class="smear-container" data-x="0.5000337423312883" data-y="0.6531273006134969" data-width="0.1659601226993865" data-height="0.16317791411042945" data-start-edge="bottom" data-speed="44" data-source-interval="822" data-pixel-size="3" data-color-fg="#FF0000" data-color-bg="#FFFFFF" data-source-type="linear-gradient" style="left: 326.022px; top: 425.839px; width: 108.206px; height: 106.392px;"><canvas></canvas></div><div class="smear-container" data-x="0.6659938650306748" data-y="0.6021073619631903" data-width="0.16075460122699387" data-height="0.21419785276073622" data-start-edge="top" data-speed="51" data-source-interval="1626" data-pixel-size="4" data-color-fg="#FF0000" data-color-bg="#000000" data-source-type="linear-gradient" style="left: 434.228px; top: 392.574px; width: 104.812px; height: 139.657px;"><canvas></canvas></div><div class="smear-container" data-x="0.5000337423312883" data-y="0.8163052147239264" data-width="0.14462315950920246" data-height="0.18369478527607364" data-start-edge="left" data-speed="51" data-source-interval="1230" data-pixel-size="3" data-color-fg="#87CEEB" data-color-bg="#000000" data-source-type="linear-gradient" style="left: 326.022px; top: 532.231px; width: 94.2943px; height: 119.769px;"><canvas></canvas></div><div class="smear-container" data-x="0.6446564417177914" data-y="0.8163052147239264" data-width="0.1820920245398773" data-height="0.18369478527607364" data-start-edge="bottom" data-speed="53" data-source-interval="1623" data-pixel-size="1" data-color-fg="#FFFFFF" data-color-bg="#CCCCCC" data-source-type="linear-gradient" style="left: 420.316px; top: 532.231px; width: 118.724px; height: 119.769px;"><canvas></canvas></div><div class="smear-container" data-x="0.8267484662576686" data-y="0.6021073619631903" data-width="0.17325153374233127" data-height="0.3978926380368098" data-start-edge="bottom" data-speed="48" data-source-interval="1146" data-pixel-size="1" data-color-fg="#FFFFFF" data-color-bg="#FF00CC" data-source-type="linear-gradient" style="left: 539.04px; top: 392.574px; width: 112.96px; height: 259.426px;"><canvas></canvas></div></div><script> class SmearCanvas { constructor(c) { this.container = c; this.canvas = c.querySelector("canvas") || document.createElement("canvas"); if (!c.querySelector("canvas")) c.appendChild(this.canvas); this.ctx = this.canvas.getContext("2d"); this.ctx.imageSmoothingEnabled = false; this.imageData = null; this.lastTime = 0; this.animationId = null; this.speed = parseInt(c.dataset.speed) || 50; this.pixelSize = parseInt(c.dataset.pixelSize) || 2; this.sourceInterval = parseInt(c.dataset.sourceInterval) || 1000; this.colorFg = c.dataset.colorFg || "#FFFFFF"; this.colorBg = c.dataset.colorBg || "#000000"; this.sourceType = c.dataset.sourceType || "noise"; this.startEdge = c.dataset.startEdge || "top"; this.fgRGB = this.hexToRGB(this.colorFg); this.bgRGB = this.hexToRGB(this.colorBg); this.moveSpeed = (1000 / 60) / this.speed; this.subPixelX = 0; this.subPixelY = 0; this.leadX = 0; this.leadY = 0; this.initDirection(); this.lastDirectionChange = 0; this.nextDirectionInterval = this.randomInterval(); this.sourceParams = this.generateSourceParams(); this.lastSourceTime = 0; this.resize(); this.initCanvas(); this.generateSourceEdge(); this.initLeadPosition(); this.startAnimation(); this.resizeObserver = new ResizeObserver(() => this.resize()); this.resizeObserver.observe(this.container); } generateSourceParams() { return { steps: 3 + Math.floor(Math.random() * 6), stripeWidth: 2 + Math.floor(Math.random() * 8), checkSize: 1 + Math.floor(Math.random() * 4), phase: 0, dashLength: 3 + Math.floor(Math.random() * 10), gapLength: 2 + Math.floor(Math.random() * 6), density: 0.05 + Math.random() * 0.25, frequency: 1 + Math.random() * 4, sinePhase: Math.random() * Math.PI * 2, seed1: Math.random() * 100, seed2: Math.random() * 100, seed3: Math.random() * 100, counter: Math.floor(Math.random() * 65536), caRule: Math.random() > 0.5 ? 30 : 110 }; } initDirection() { switch (this.startEdge) { case "top": this.dx = 0; this.dy = 1; break; case "bottom": this.dx = 0; this.dy = -1; break; case "left": this.dx = 1; this.dy = 0; break; case "right": this.dx = -1; this.dy = 0; break; default: this.dx = 0; this.dy = 1; } } initLeadPosition() { switch (this.startEdge) { case "top": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = 1; break; case "bottom": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = this.internalHeight - 2; break; case "left": this.leadX = 1; this.leadY = Math.floor(this.internalHeight / 2); break; case "right": this.leadX = this.internalWidth - 2; this.leadY = Math.floor(this.internalHeight / 2); break; } } resize() { var rect = this.container.getBoundingClientRect(); if (rect.width === 0 || rect.height === 0) return; this.internalWidth = Math.ceil(rect.width / this.pixelSize); this.internalHeight = Math.ceil(rect.height / this.pixelSize); var oldImageData = this.imageData; var oldWidth = this.canvas.width; var oldHeight = this.canvas.height; this.canvas.width = this.internalWidth; this.canvas.height = this.internalHeight; this.imageData = this.ctx.createImageData(this.internalWidth, this.internalHeight); if (oldImageData && oldWidth > 0 && oldHeight > 0) { var minW = Math.min(oldWidth, this.internalWidth); var minH = Math.min(oldHeight, this.internalHeight); for (var y = 0; y < minH; y++) { for (var x = 0; x < minW; x++) { var oi = (y * oldWidth + x) * 4; var ni = (y * this.internalWidth + x) * 4; this.imageData.data[ni] = oldImageData.data[oi]; this.imageData.data[ni + 1] = oldImageData.data[oi + 1]; this.imageData.data[ni + 2] = oldImageData.data[oi + 2]; this.imageData.data[ni + 3] = oldImageData.data[oi + 3]; } } } } hexToRGB(hex) { var r = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); return r ? { r: parseInt(r[1], 16), g: parseInt(r[2], 16), b: parseInt(r[3], 16) } : { r: 255, g: 255, b: 255 }; } lerpColor(t) { return { r: Math.round(this.bgRGB.r + (this.fgRGB.r - this.bgRGB.r) * t), g: Math.round(this.bgRGB.g + (this.fgRGB.g - this.bgRGB.g) * t), b: Math.round(this.bgRGB.b + (this.fgRGB.b - this.bgRGB.b) * t) }; } getSourceValue(pos, length) { var t = pos / length; switch (this.sourceType) { case "noise": return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; case "linear-gradient": return this.lerpColor(t); case "stepped-gradient": var steps = this.sourceParams.steps || 5; return this.lerpColor(Math.floor(t * steps) / (steps - 1)); case "random-gradient": if (!this.gradientCache || this.gradientCache.length !== length) this.generateRandomGradient(length); return this.lerpColor(this.gradientCache[pos]); case "stripes": return (Math.floor(pos / (this.sourceParams.stripeWidth || 4)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "checkerboard": return ((Math.floor(pos / (this.sourceParams.checkSize || 2)) + (this.sourceParams.phase || 0)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "dashes": var cycle = (this.sourceParams.dashLength || 6) + (this.sourceParams.gapLength || 3); return (pos % cycle < (this.sourceParams.dashLength || 6)) ? this.fgRGB : this.bgRGB; case "dots": return Math.random() < (this.sourceParams.density || 0.15) ? this.fgRGB : this.bgRGB; case "sine": var sv = (Math.sin((t * (this.sourceParams.frequency || 2) * Math.PI * 2) + (this.sourceParams.sinePhase || 0)) + 1) / 2; return this.lerpColor(sv); case "perlin": var p1 = Math.sin(t * 3.7 + this.sourceParams.seed1) * 0.5; var p2 = Math.sin(t * 7.3 + this.sourceParams.seed2) * 0.25; var p3 = Math.sin(t * 13.1 + this.sourceParams.seed3) * 0.125; return this.lerpColor(Math.max(0, Math.min(1, (p1 + p2 + p3 + 0.875) / 1.75))); case "binary-counter": return ((this.sourceParams.counter >> (pos % 16)) & 1) ? this.fgRGB : this.bgRGB; case "cellular-automata": if (!this.caState || this.caState.length !== length) this.initCellularAutomata(length); return this.caState[pos] ? this.fgRGB : this.bgRGB; default: return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; } } generateRandomGradient(length) { var np = 3 + Math.floor(Math.random() * 4); var cp = [0]; for (var i = 1; i < np - 1; i++) cp.push(Math.random()); cp.push(1); cp.sort((a, b) => a - b); var cv = cp.map(() => Math.random()); this.gradientCache = []; for (var i = 0; i < length; i++) { var t = i / length; var si = 0; for (var j = 0; j < cp.length - 1; j++) { if (t >= cp[j] && t <= cp[j + 1]) { si = j; break; } } var st = (t - cp[si]) / (cp[si + 1] - cp[si]); this.gradientCache.push(cv[si] + (cv[si + 1] - cv[si]) * st); } } initCellularAutomata(length) { this.caState = []; for (var i = 0; i < length; i++) this.caState.push(Math.random() > 0.5); } evolveCellularAutomata() { if (!this.caState) return; var rule = this.sourceParams.caRule || 30; var os = [...this.caState]; var len = this.caState.length; for (var i = 0; i < len; i++) { var p = (os[(i - 1 + len) % len] ? 4 : 0) + (os[i] ? 2 : 0) + (os[(i + 1) % len] ? 1 : 0); this.caState[i] = ((rule >> p) & 1) === 1; } } updateSourceParams() { switch (this.sourceType) { case "checkerboard": this.sourceParams.phase = (this.sourceParams.phase + 1) % 2; break; case "sine": this.sourceParams.sinePhase += 0.5; break; case "binary-counter": this.sourceParams.counter++; break; case "cellular-automata": this.evolveCellularAutomata(); break; case "random-gradient": this.gradientCache = null; break; case "perlin": this.sourceParams.seed1 += 0.3; this.sourceParams.seed2 += 0.2; this.sourceParams.seed3 += 0.1; break; } } randomInterval() { return 100 + Math.random() * 900; } changeDirection() { var dirs = [[0, 1], [1, 1], [1, 0], [1, -1], [0, -1], [-1, -1], [-1, 0], [-1, 1]]; var idx = dirs.findIndex(d => d[0] === this.dx && d[1] === this.dy); if (idx === -1) idx = 0; idx = Math.random() > 0.5 ? (idx + 1) % 8 : (idx + 7) % 8; this.dx = dirs[idx][0]; this.dy = dirs[idx][1]; } initCanvas() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var isH = (this.startEdge === "top" || this.startEdge === "bottom"); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { var idx = (y * w + x) * 4; var col = this.getSourceValue(isH ? x : y, isH ? w : h); data[idx] = col.r; data[idx + 1] = col.g; data[idx + 2] = col.b; data[idx + 3] = 255; } } this.ctx.putImageData(this.imageData, 0, 0); } generateSourceEdge() { if (!this.imageData) return; this.updateSourceParams(); var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var gen = (getIdx, len) => { for (var i = 0; i < len; i++) { var idx = getIdx(i); var c = this.getSourceValue(i, len); data[idx] = c.r; data[idx + 1] = c.g; data[idx + 2] = c.b; data[idx + 3] = 255; } }; switch (this.startEdge) { case "top": gen(x => x * 4, w); break; case "bottom": gen(x => ((h - 1) * w + x) * 4, w); break; case "left": gen(y => (y * w) * 4, h); break; case "right": gen(y => (y * w + (w - 1)) * 4, h); break; } } getSourceEdgeCoord(x, y) { switch (this.startEdge) { case "top": return y === 0; case "bottom": return y === this.internalHeight - 1; case "left": return x === 0; case "right": return x === this.internalWidth - 1; } return false; } smear() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; this.subPixelX += this.dx * this.moveSpeed; this.subPixelY += this.dy * this.moveSpeed; var moveX = Math.trunc(this.subPixelX), moveY = Math.trunc(this.subPixelY); if (moveX === 0 && moveY === 0) return; this.subPixelX -= moveX; this.subPixelY -= moveY; this.leadX += moveX; this.leadY += moveY; if (this.leadX <= 0 || this.leadX >= w - 1) { this.dx = -this.dx; this.leadX = Math.max(0, Math.min(w - 1, this.leadX)); } if (this.leadY <= 0 || this.leadY >= h - 1) { this.dy = -this.dy; this.leadY = Math.max(0, Math.min(h - 1, this.leadY)); } var oldData = new Uint8ClampedArray(data); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { if (this.getSourceEdgeCoord(x, y)) continue; var srcX = Math.max(0, Math.min(w - 1, x - moveX)); var srcY = Math.max(0, Math.min(h - 1, y - moveY)); var dstIdx = (y * w + x) * 4, srcIdx = (srcY * w + srcX) * 4; data[dstIdx] = oldData[srcIdx]; data[dstIdx + 1] = oldData[srcIdx + 1]; data[dstIdx + 2] = oldData[srcIdx + 2]; data[dstIdx + 3] = oldData[srcIdx + 3]; } } } startAnimation() { var fi = 1000 / 60; var animate = (ts) => { if (!this.lastTime) this.lastTime = ts; if (!this.lastSourceTime) this.lastSourceTime = ts; if (!this.lastDirectionChange) this.lastDirectionChange = ts; if (ts - this.lastDirectionChange >= this.nextDirectionInterval) { this.changeDirection(); this.lastDirectionChange = ts; this.nextDirectionInterval = this.randomInterval(); } if (ts - this.lastSourceTime >= this.sourceInterval) { this.generateSourceEdge(); this.lastSourceTime = ts; } if (ts - this.lastTime >= fi) { this.smear(); if (this.imageData) this.ctx.putImageData(this.imageData, 0, 0); this.lastTime = ts; } this.animationId = requestAnimationFrame(animate); }; this.animationId = requestAnimationFrame(animate); } } function layoutSmears() { var vw = window.innerWidth, vh = window.innerHeight; document.querySelectorAll(".smear-container").forEach(function(div) { var x = parseFloat(div.dataset.x || 0); var y = parseFloat(div.dataset.y || 0); var w = parseFloat(div.dataset.width || 0); var h = parseFloat(div.dataset.height || 0); div.style.left = (x * vw) + "px"; div.style.top = (y * vh) + "px"; div.style.width = (w * vw) + "px"; div.style.height = (h * vh) + "px"; }); } function initSmears() { document.querySelectorAll(".smear-container").forEach(function(c) { if (!c._smearInstance) c._smearInstance = new SmearCanvas(c); }); } window.addEventListener("load", function() { layoutSmears(); initSmears(); }); window.addEventListener("resize", layoutSmears); layoutSmears(); initSmears(); </script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#241a17;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#494949;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#494949;--color3-2:#000;--color4-1:#494949;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #241a17; --color2-1: #494949; --color3-1: #494949; --color4-1: #494949;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-left" data-x="0" data-y="0" data-width="0.28" data-height="0.12444917759999999" style="left: 0px; top: 0px; width: 182.56px; height: 81.1409px; --clip-path: polygon(0% 0%, 123% 0%, 111% 60%, 0% 93%); background-size: 365.12px 81.1409px; animation-duration: 49s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.12444917759999999" data-width="0.28" data-height="0.2212429823999999" style="left: 0px; top: 81.1409px; width: 182.56px; height: 144.25px; --clip-path: polygon(0% -4%, 111% -23%, 126% 94%, 0% 99%); background-size: 365.12px 144.25px; animation-duration: 96s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.3456921599999999" data-width="0.14" data-height="0.19445183999999996" style="left: 0px; top: 225.391px; width: 91.28px; height: 126.783px; --clip-path: polygon(0% -1%, 144% -30%, 140% 88%, 0% 134%); background-size: 182.56px 126.783px; animation-duration: 77s;"></div><div class="gradient-container gradient-left" data-x="0.14" data-y="0.3456921599999999" data-width="0.14" data-height="0.19445183999999996" style="left: 91.28px; top: 225.391px; width: 91.28px; height: 126.783px; --clip-path: polygon(44% -30%, 153% -7%, 108% 86%, 40% 88%); background-size: 182.56px 126.783px; animation-duration: 28s;"></div><div class="gradient-container gradient-up" data-x="0" data-y="0.5401439999999998" data-width="0.11566799999999998" data-height="0.04065600000000004" style="left: 0px; top: 352.174px; width: 75.4155px; height: 26.5077px; --clip-path: polygon(0% 161%, 124% 194%, 38% 102%, 0% 181%); background-size: 75.4155px 53.0154px; animation-duration: 75s;"></div><div class="gradient-container gradient-up" data-x="0.11566799999999998" data-y="0.5401439999999998" data-width="0.02713200000000001" data-height="0.04065600000000004" style="left: 75.4155px; top: 352.174px; width: 17.6901px; height: 26.5077px; --clip-path: polygon(103% 194%, 132% -106%, -160% 96%, -265% 102%); background-size: 17.6901px 53.0154px; animation-duration: 4s;"></div><div class="gradient-container gradient-down" data-x="0.14279999999999998" data-y="0.5401439999999998" data-width="0.13445600000000002" data-height="0.04065600000000004" style="left: 93.1056px; top: 352.174px; width: 87.6653px; height: 26.5077px; --clip-path: polygon(6% -106%, 143% -56%, 42% 32%, -52% 96%); background-size: 87.6653px 53.0154px; animation-duration: 73s;"></div><div class="gradient-container gradient-down" data-x="0.277256" data-y="0.5401439999999998" data-width="0.0027439999999999886" data-height="0.04065600000000004" style="left: 180.771px; top: 352.174px; width: 1.78909px; height: 26.5077px; --clip-path: polygon(2107% -56%, 510% -65%, 2941% -6%, -2858% 32%); background-size: 1.78909px 53.0154px; animation-duration: 74s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.5807999999999999" data-width="0.27440000000000003" data-height="0.18251200000000004" style="left: 0px; top: 378.682px; width: 178.909px; height: 118.998px; --clip-path: polygon(0% 18%, 124% 6%, 77% 70%, 0% 80%); background-size: 357.818px 118.998px; animation-duration: 53s;"></div><div class="gradient-container gradient-up" data-x="0.27440000000000003" data-y="0.5807999999999999" data-width="0.005599999999999983" data-height="0.18251200000000004" style="left: 178.909px; top: 378.682px; width: 3.6512px; height: 118.998px; --clip-path: polygon(1200% 6%, 1492% -24%, -246% 90%, -1149% 70%); background-size: 3.6512px 237.996px; animation-duration: 86s;"></div><div class="gradient-container gradient-up" data-x="0" data-y="0.763312" data-width="0.09519999999999999" data-height="0.019836960000000004" style="left: 0px; top: 497.679px; width: 62.0704px; height: 12.9337px; --clip-path: polygon(0% -189%, 71% -403%, 111% 306%, 0% 425%); background-size: 62.0704px 25.8674px; animation-duration: 52s;"></div><div class="gradient-container gradient-up" data-x="0" data-y="0.78314896" data-width="0.09519999999999999" data-height="0.09685104000000003" style="left: 0px; top: 510.613px; width: 62.0704px; height: 63.1469px; --clip-path: polygon(0% 67%, 111% 42%, 89% 129%, 0% 62%); background-size: 62.0704px 126.294px; animation-duration: 1s;"></div><div class="gradient-container gradient-left" data-x="0.09519999999999999" data-y="0.763312" data-width="0.15153599999999998" data-height="0.11668800000000003" style="left: 62.0704px; top: 497.679px; width: 98.8015px; height: 76.0806px; --clip-path: polygon(-18% -69%, 88% -60%, 102% 104%, -7% 124%); background-size: 197.603px 76.0806px; animation-duration: 88s;"></div><div class="gradient-container gradient-right" data-x="0.24673599999999998" data-y="0.763312" data-width="0.03326400000000001" data-height="0.11668800000000003" style="left: 160.872px; top: 497.679px; width: 21.6881px; height: 76.0806px; --clip-path: polygon(-53% -60%, 42% -16%, 143% 122%, 8% 104%); background-size: 43.3763px 76.0806px; animation-duration: 32s;"></div><div class="gradient-container gradient-down" data-x="0.28" data-y="0" data-width="0.46656" data-height="0.46640000000000004" style="left: 182.56px; top: 0px; width: 304.197px; height: 304.093px; --clip-path: polygon(14% 0%, 113% 0%, 83% 110%, 15% 112%); background-size: 304.197px 608.186px; animation-duration: 48s;"></div><div class="gradient-container gradient-up" data-x="0.74656" data-y="0" data-width="0.10943999999999997" data-height="0.41509599999999997" style="left: 486.757px; top: 0px; width: 71.3549px; height: 270.643px; --clip-path: polygon(54% 0%, 154% 0%, 130% 84%, -23% 86%); background-size: 71.3549px 541.285px; animation-duration: 2s;"></div><div class="gradient-container gradient-right" data-x="0.74656" data-y="0.41509599999999997" data-width="0.10943999999999997" data-height="0.05130400000000005" style="left: 486.757px; top: 270.643px; width: 71.3549px; height: 33.4502px; --clip-path: polygon(-23% -117%, 130% -125%, 97% 204%, -71% 194%); background-size: 142.71px 33.4502px; animation-duration: 27s;"></div><div class="gradient-container gradient-down" data-x="0.856" data-y="0" data-width="0.14400000000000004" data-height="0.46640000000000004" style="left: 558.112px; top: 0px; width: 93.888px; height: 304.093px; --clip-path: polygon(41% 0%, 100% 0%, 100% 89%, -2% 111%); background-size: 93.888px 608.186px; animation-duration: 41s;"></div><div class="gradient-container gradient-right" data-x="0.28" data-y="0.46640000000000004" data-width="0.72" data-height="0.41359999999999997" style="left: 182.56px; top: 304.093px; width: 469.44px; height: 269.667px; --clip-path: polygon(9% 13%, 100% -12%, 100% 82%, 2% 106%); background-size: 938.88px 269.667px; animation-duration: 82s;"></div><div class="gradient-container gradient-down" data-x="0" data-y="0.88" data-width="0.36" data-height="0.12000000000000001" style="left: 0px; top: 573.76px; width: 234.72px; height: 78.24px; --clip-path: polygon(0% -30%, 106% 64%, 89% 100%, 0% 100%); background-size: 234.72px 156.48px; animation-duration: 64s;"></div><div class="gradient-container gradient-left" data-x="0.36" data-y="0.88" data-width="0.03993599999999999" data-height="0.015600000000000001" style="left: 234.72px; top: 573.76px; width: 26.0383px; height: 10.1712px; --clip-path: polygon(51% 495%, -30% 162%, 221% 214%, -68% 269%); background-size: 52.0765px 10.1712px; animation-duration: 95s;"></div><div class="gradient-container gradient-up" data-x="0.36" data-y="0.8956" data-width="0.03993599999999999" data-height="0.04440000000000001" style="left: 234.72px; top: 583.931px; width: 26.0383px; height: 28.9488px; --clip-path: polygon(-68% 59%, 221% 40%, 200% 156%, -33% 68%); background-size: 26.0383px 57.8976px; animation-duration: 22s;"></div><div class="gradient-container gradient-up" data-x="0.36" data-y="0.94" data-width="0.03993599999999999" data-height="0.060000000000000005" style="left: 234.72px; top: 612.88px; width: 26.0383px; height: 39.12px; --clip-path: polygon(-33% -23%, 200% 41%, 145% 100%, -96% 100%); background-size: 26.0383px 78.24px; animation-duration: 78s;"></div><div class="gradient-container gradient-right" data-x="0.39993599999999996" data-y="0.88" data-width="0.018031103999999996" data-height="0.12000000000000001" style="left: 260.758px; top: 573.76px; width: 11.7563px; height: 78.24px; --clip-path: polygon(-288% 21%, 540% -28%, 113% 100%, 100% 100%); background-size: 23.5126px 78.24px; animation-duration: 8s;"></div><div class="gradient-container gradient-left" data-x="0.4179671039999999" data-y="0.88" data-width="0.16227993599999996" data-height="0.12000000000000001" style="left: 272.515px; top: 573.76px; width: 105.807px; height: 78.24px; --clip-path: polygon(49% -28%, 63% -47%, 97% 100%, 1% 100%); background-size: 211.613px 78.24px; animation-duration: 69s;"></div><div class="gradient-container gradient-down" data-x="0.5802470399999999" data-y="0.88" data-width="0.029352959999999997" data-height="0.1068" style="left: 378.321px; top: 573.76px; width: 19.1381px; height: 69.6336px; --clip-path: polygon(-203% -53%, 337% -27%, -69% 100%, 63% 100%); background-size: 19.1381px 139.267px; animation-duration: 74s;"></div><div class="gradient-container gradient-left" data-x="0.5802470399999999" data-y="0.9868" data-width="0.029352959999999997" data-height="0.013200000000000012" style="left: 378.321px; top: 643.394px; width: 19.1381px; height: 8.6064px; --clip-path: polygon(63% 0%, -69% 0%, -114% 100%, -17% 100%); background-size: 38.2763px 8.6064px; animation-duration: 54s;"></div><div class="gradient-container gradient-up" data-x="0.6096" data-y="0.88" data-width="0.39039999999999997" data-height="0.12000000000000001" style="left: 397.459px; top: 573.76px; width: 254.541px; height: 78.24px; --clip-path: polygon(18% -24%, 100% -61%, 100% 100%, -16% 100%); background-size: 254.541px 156.48px; animation-duration: 17s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>smear</title><style> * { margin: 0; padding: 0; box-sizing: border-box; } body, html { width: 100%; height: 100%; overflow: hidden; background: #000; } smear-partition { display: block; width: 100%; height: 100%; position: relative; } smear-canvas { display: block; position: absolute; } smear-canvas canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: -moz-crisp-edges; image-rendering: crisp-edges; -ms-interpolation-mode: nearest-neighbor; } .smear-container { position: absolute; overflow: hidden; } .smear-container canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; } </style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="smear-container" data-x="0" data-y="0" data-width="0.08880920245398773" data-height="0.14860138036809814" data-start-edge="bottom" data-speed="58" data-source-interval="1608" data-pixel-size="2" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 0px; top: 0px; width: 57.9036px; height: 96.8881px;"><canvas></canvas></div><div class="smear-container" data-x="0.08880920245398773" data-y="0" data-width="0.0954978527607362" data-height="0.14860138036809814" data-start-edge="top" data-speed="81" data-source-interval="1002" data-pixel-size="5" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 57.9036px; top: 0px; width: 62.2646px; height: 96.8881px;"><canvas></canvas></div><div class="smear-container" data-x="0.1843067484662577" data-y="0" data-width="0.17743865030674846" data-height="0.14860138036809814" data-start-edge="bottom" data-speed="83" data-source-interval="1207" data-pixel-size="1" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 120.168px; top: 0px; width: 115.69px; height: 96.8881px;"><canvas></canvas></div><div class="smear-container" data-x="0.36174539877300615" data-y="0" data-width="0.05122300613496932" data-height="0.14860138036809814" data-start-edge="top" data-speed="88" data-source-interval="1909" data-pixel-size="1" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 235.858px; top: 0px; width: 33.3974px; height: 96.8881px;"><canvas></canvas></div><div class="smear-container" data-x="0.4129693251533742" data-y="0" data-width="0.18249079754601227" data-height="0.14860138036809814" data-start-edge="bottom" data-speed="33" data-source-interval="1208" data-pixel-size="3" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 269.256px; top: 0px; width: 118.984px; height: 96.8881px;"><canvas></canvas></div><div class="smear-container" data-x="0.5954601226993865" data-y="0" data-width="0.22768865030674848" data-height="0.14860138036809814" data-start-edge="bottom" data-speed="26" data-source-interval="1821" data-pixel-size="1" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 388.24px; top: 0px; width: 148.453px; height: 96.8881px;"><canvas></canvas></div><div class="smear-container" data-x="0.8231472392638037" data-y="0" data-width="0.05489861963190184" data-height="0.14860138036809814" data-start-edge="left" data-speed="40" data-source-interval="528" data-pixel-size="6" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 536.692px; top: 0px; width: 35.7939px; height: 96.8881px;"><canvas></canvas></div><div class="smear-container" data-x="0.8780460122699386" data-y="0" data-width="0.12195352760736196" data-height="0.14860138036809814" data-start-edge="right" data-speed="95" data-source-interval="1122" data-pixel-size="4" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 572.486px; top: 0px; width: 79.5137px; height: 96.8881px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.14860138036809814" data-width="0.08880920245398773" data-height="0.09729769938650307" data-start-edge="right" data-speed="49" data-source-interval="821" data-pixel-size="3" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 0px; top: 96.8881px; width: 57.9036px; height: 63.4381px;"><canvas></canvas></div><div class="smear-container" data-x="0.08880920245398773" data-y="0.14860138036809814" data-width="0.0954978527607362" data-height="0.09729769938650307" data-start-edge="top" data-speed="97" data-source-interval="715" data-pixel-size="6" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 57.9036px; top: 96.8881px; width: 62.2646px; height: 63.4381px;"><canvas></canvas></div><div class="smear-container" data-x="0.1843067484662577" data-y="0.14860138036809814" data-width="0.17743865030674846" data-height="0.09729769938650307" data-start-edge="left" data-speed="78" data-source-interval="1444" data-pixel-size="6" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 120.168px; top: 96.8881px; width: 115.69px; height: 63.4381px;"><canvas></canvas></div><div class="smear-container" data-x="0.36174539877300615" data-y="0.14860138036809814" data-width="0.05122300613496932" data-height="0.09729769938650307" data-start-edge="top" data-speed="69" data-source-interval="1164" data-pixel-size="5" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 235.858px; top: 96.8881px; width: 33.3974px; height: 63.4381px;"><canvas></canvas></div><div class="smear-container" data-x="0.4129693251533742" data-y="0.14860138036809814" data-width="0.18249079754601227" data-height="0.09729769938650307" data-start-edge="top" data-speed="38" data-source-interval="757" data-pixel-size="6" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 269.256px; top: 96.8881px; width: 118.984px; height: 63.4381px;"><canvas></canvas></div><div class="smear-container" data-x="0.5954601226993865" data-y="0.14860138036809814" data-width="0.22768865030674848" data-height="0.09729769938650307" data-start-edge="top" data-speed="43" data-source-interval="1439" data-pixel-size="1" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 388.24px; top: 96.8881px; width: 148.453px; height: 63.4381px;"><canvas></canvas></div><div class="smear-container" data-x="0.8231472392638037" data-y="0.14860138036809814" data-width="0.05489861963190184" data-height="0.09729769938650307" data-start-edge="right" data-speed="49" data-source-interval="1016" data-pixel-size="3" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 536.692px; top: 96.8881px; width: 35.7939px; height: 63.4381px;"><canvas></canvas></div><div class="smear-container" data-x="0.8780460122699386" data-y="0.14860138036809814" data-width="0.12195352760736196" data-height="0.09729769938650307" data-start-edge="left" data-speed="39" data-source-interval="638" data-pixel-size="3" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 572.486px; top: 96.8881px; width: 79.5137px; height: 63.4381px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.24589877300613497" data-width="0.08880920245398773" data-height="0.21365030674846627" data-start-edge="right" data-speed="58" data-source-interval="1689" data-pixel-size="2" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 0px; top: 160.326px; width: 57.9036px; height: 139.3px;"><canvas></canvas></div><div class="smear-container" data-x="0.08880920245398773" data-y="0.24589877300613497" data-width="0.0954978527607362" data-height="0.21365030674846627" data-start-edge="left" data-speed="87" data-source-interval="685" data-pixel-size="2" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 57.9036px; top: 160.326px; width: 62.2646px; height: 139.3px;"><canvas></canvas></div><div class="smear-container" data-x="0.1843067484662577" data-y="0.24589877300613497" data-width="0.17743865030674846" data-height="0.21365030674846627" data-start-edge="top" data-speed="48" data-source-interval="1937" data-pixel-size="2" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 120.168px; top: 160.326px; width: 115.69px; height: 139.3px;"><canvas></canvas></div><div class="smear-container" data-x="0.36174539877300615" data-y="0.24589877300613497" data-width="0.05122300613496932" data-height="0.21365030674846627" data-start-edge="right" data-speed="37" data-source-interval="535" data-pixel-size="5" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 235.858px; top: 160.326px; width: 33.3974px; height: 139.3px;"><canvas></canvas></div><div class="smear-container" data-x="0.4129693251533742" data-y="0.24589877300613497" data-width="0.18249079754601227" data-height="0.21365030674846627" data-start-edge="top" data-speed="60" data-source-interval="1361" data-pixel-size="3" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 269.256px; top: 160.326px; width: 118.984px; height: 139.3px;"><canvas></canvas></div><div class="smear-container" data-x="0.5954601226993865" data-y="0.24589877300613497" data-width="0.22768865030674848" data-height="0.21365030674846627" data-start-edge="top" data-speed="60" data-source-interval="1474" data-pixel-size="4" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 388.24px; top: 160.326px; width: 148.453px; height: 139.3px;"><canvas></canvas></div><div class="smear-container" data-x="0.8231472392638037" data-y="0.24589877300613497" data-width="0.05489861963190184" data-height="0.21365030674846627" data-start-edge="top" data-speed="52" data-source-interval="1025" data-pixel-size="2" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 536.692px; top: 160.326px; width: 35.7939px; height: 139.3px;"><canvas></canvas></div><div class="smear-container" data-x="0.8780460122699386" data-y="0.24589877300613497" data-width="0.12195352760736196" data-height="0.21365030674846627" data-start-edge="right" data-speed="56" data-source-interval="1353" data-pixel-size="3" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 572.486px; top: 160.326px; width: 79.5137px; height: 139.3px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.45955061349693255" data-width="0.08880920245398773" data-height="0.2400644171779141" data-start-edge="right" data-speed="97" data-source-interval="1403" data-pixel-size="3" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 0px; top: 299.627px; width: 57.9036px; height: 156.522px;"><canvas></canvas></div><div class="smear-container" data-x="0.08880920245398773" data-y="0.45955061349693255" data-width="0.0954978527607362" data-height="0.2400644171779141" data-start-edge="top" data-speed="80" data-source-interval="1746" data-pixel-size="3" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 57.9036px; top: 299.627px; width: 62.2646px; height: 156.522px;"><canvas></canvas></div><div class="smear-container" data-x="0.1843067484662577" data-y="0.45955061349693255" data-width="0.17743865030674846" data-height="0.2400644171779141" data-start-edge="bottom" data-speed="68" data-source-interval="1106" data-pixel-size="6" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 120.168px; top: 299.627px; width: 115.69px; height: 156.522px;"><canvas></canvas></div><div class="smear-container" data-x="0.36174539877300615" data-y="0.45955061349693255" data-width="0.05122300613496932" data-height="0.2400644171779141" data-start-edge="bottom" data-speed="61" data-source-interval="1663" data-pixel-size="5" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 235.858px; top: 299.627px; width: 33.3974px; height: 156.522px;"><canvas></canvas></div><div class="smear-container" data-x="0.4129693251533742" data-y="0.45955061349693255" data-width="0.18249079754601227" data-height="0.2400644171779141" data-start-edge="left" data-speed="97" data-source-interval="652" data-pixel-size="4" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 269.256px; top: 299.627px; width: 118.984px; height: 156.522px;"><canvas></canvas></div><div class="smear-container" data-x="0.5954601226993865" data-y="0.45955061349693255" data-width="0.22768865030674848" data-height="0.2400644171779141" data-start-edge="top" data-speed="47" data-source-interval="565" data-pixel-size="5" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 388.24px; top: 299.627px; width: 148.453px; height: 156.522px;"><canvas></canvas></div><div class="smear-container" data-x="0.8231472392638037" data-y="0.45955061349693255" data-width="0.05489861963190184" data-height="0.2400644171779141" data-start-edge="right" data-speed="69" data-source-interval="1798" data-pixel-size="2" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 536.692px; top: 299.627px; width: 35.7939px; height: 156.522px;"><canvas></canvas></div><div class="smear-container" data-x="0.8780460122699386" data-y="0.45955061349693255" data-width="0.12195352760736196" data-height="0.2400644171779141" data-start-edge="top" data-speed="67" data-source-interval="1512" data-pixel-size="2" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 572.486px; top: 299.627px; width: 79.5137px; height: 156.522px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.6996150306748466" data-width="0.08880920245398773" data-height="0.07005306748466257" data-start-edge="left" data-speed="54" data-source-interval="589" data-pixel-size="6" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 0px; top: 456.149px; width: 57.9036px; height: 45.6746px;"><canvas></canvas></div><div class="smear-container" data-x="0.08880920245398773" data-y="0.6996150306748466" data-width="0.0954978527607362" data-height="0.07005306748466257" data-start-edge="top" data-speed="96" data-source-interval="1993" data-pixel-size="4" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 57.9036px; top: 456.149px; width: 62.2646px; height: 45.6746px;"><canvas></canvas></div><div class="smear-container" data-x="0.1843067484662577" data-y="0.6996150306748466" data-width="0.17743865030674846" data-height="0.07005306748466257" data-start-edge="bottom" data-speed="86" data-source-interval="693" data-pixel-size="3" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 120.168px; top: 456.149px; width: 115.69px; height: 45.6746px;"><canvas></canvas></div><div class="smear-container" data-x="0.36174539877300615" data-y="0.6996150306748466" data-width="0.05122300613496932" data-height="0.07005306748466257" data-start-edge="left" data-speed="54" data-source-interval="878" data-pixel-size="5" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 235.858px; top: 456.149px; width: 33.3974px; height: 45.6746px;"><canvas></canvas></div><div class="smear-container" data-x="0.4129693251533742" data-y="0.6996150306748466" data-width="0.18249079754601227" data-height="0.07005306748466257" data-start-edge="bottom" data-speed="25" data-source-interval="1447" data-pixel-size="4" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 269.256px; top: 456.149px; width: 118.984px; height: 45.6746px;"><canvas></canvas></div><div class="smear-container" data-x="0.5954601226993865" data-y="0.6996150306748466" data-width="0.22768865030674848" data-height="0.07005306748466257" data-start-edge="left" data-speed="80" data-source-interval="971" data-pixel-size="2" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 388.24px; top: 456.149px; width: 148.453px; height: 45.6746px;"><canvas></canvas></div><div class="smear-container" data-x="0.8231472392638037" data-y="0.6996150306748466" data-width="0.05489861963190184" data-height="0.07005306748466257" data-start-edge="bottom" data-speed="44" data-source-interval="1618" data-pixel-size="5" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 536.692px; top: 456.149px; width: 35.7939px; height: 45.6746px;"><canvas></canvas></div><div class="smear-container" data-x="0.8780460122699386" data-y="0.6996150306748466" data-width="0.12195352760736196" data-height="0.07005306748466257" data-start-edge="left" data-speed="45" data-source-interval="1270" data-pixel-size="5" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 572.486px; top: 456.149px; width: 79.5137px; height: 45.6746px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.7696687116564417" data-width="0.08880920245398773" data-height="0.14959754601226993" data-start-edge="right" data-speed="60" data-source-interval="602" data-pixel-size="1" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 0px; top: 501.824px; width: 57.9036px; height: 97.5376px;"><canvas></canvas></div><div class="smear-container" data-x="0.08880920245398773" data-y="0.7696687116564417" data-width="0.0954978527607362" data-height="0.14959754601226993" data-start-edge="bottom" data-speed="79" data-source-interval="554" data-pixel-size="5" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 57.9036px; top: 501.824px; width: 62.2646px; height: 97.5376px;"><canvas></canvas></div><div class="smear-container" data-x="0.1843067484662577" data-y="0.7696687116564417" data-width="0.17743865030674846" data-height="0.14959754601226993" data-start-edge="left" data-speed="47" data-source-interval="977" data-pixel-size="6" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 120.168px; top: 501.824px; width: 115.69px; height: 97.5376px;"><canvas></canvas></div><div class="smear-container" data-x="0.36174539877300615" data-y="0.7696687116564417" data-width="0.05122300613496932" data-height="0.14959754601226993" data-start-edge="right" data-speed="52" data-source-interval="1478" data-pixel-size="1" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 235.858px; top: 501.824px; width: 33.3974px; height: 97.5376px;"><canvas></canvas></div><div class="smear-container" data-x="0.4129693251533742" data-y="0.7696687116564417" data-width="0.18249079754601227" data-height="0.14959754601226993" data-start-edge="left" data-speed="39" data-source-interval="1342" data-pixel-size="1" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 269.256px; top: 501.824px; width: 118.984px; height: 97.5376px;"><canvas></canvas></div><div class="smear-container" data-x="0.5954601226993865" data-y="0.7696687116564417" data-width="0.22768865030674848" data-height="0.14959754601226993" data-start-edge="right" data-speed="88" data-source-interval="677" data-pixel-size="6" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 388.24px; top: 501.824px; width: 148.453px; height: 97.5376px;"><canvas></canvas></div><div class="smear-container" data-x="0.8231472392638037" data-y="0.7696687116564417" data-width="0.05489861963190184" data-height="0.14959754601226993" data-start-edge="top" data-speed="51" data-source-interval="1902" data-pixel-size="4" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 536.692px; top: 501.824px; width: 35.7939px; height: 97.5376px;"><canvas></canvas></div><div class="smear-container" data-x="0.8780460122699386" data-y="0.7696687116564417" data-width="0.12195352760736196" data-height="0.14959754601226993" data-start-edge="left" data-speed="79" data-source-interval="1399" data-pixel-size="4" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 572.486px; top: 501.824px; width: 79.5137px; height: 97.5376px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.9192653374233128" data-width="0.08880920245398773" data-height="0.055230828220858896" data-start-edge="bottom" data-speed="50" data-source-interval="1785" data-pixel-size="3" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 0px; top: 599.361px; width: 57.9036px; height: 36.0105px;"><canvas></canvas></div><div class="smear-container" data-x="0.08880920245398773" data-y="0.9192653374233128" data-width="0.0954978527607362" data-height="0.055230828220858896" data-start-edge="top" data-speed="75" data-source-interval="526" data-pixel-size="1" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 57.9036px; top: 599.361px; width: 62.2646px; height: 36.0105px;"><canvas></canvas></div><div class="smear-container" data-x="0.1843067484662577" data-y="0.9192653374233128" data-width="0.17743865030674846" data-height="0.055230828220858896" data-start-edge="left" data-speed="60" data-source-interval="522" data-pixel-size="3" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 120.168px; top: 599.361px; width: 115.69px; height: 36.0105px;"><canvas></canvas></div><div class="smear-container" data-x="0.36174539877300615" data-y="0.9192653374233128" data-width="0.05122300613496932" data-height="0.055230828220858896" data-start-edge="left" data-speed="84" data-source-interval="915" data-pixel-size="4" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 235.858px; top: 599.361px; width: 33.3974px; height: 36.0105px;"><canvas></canvas></div><div class="smear-container" data-x="0.4129693251533742" data-y="0.9192653374233128" data-width="0.18249079754601227" data-height="0.055230828220858896" data-start-edge="right" data-speed="54" data-source-interval="1626" data-pixel-size="2" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 269.256px; top: 599.361px; width: 118.984px; height: 36.0105px;"><canvas></canvas></div><div class="smear-container" data-x="0.5954601226993865" data-y="0.9192653374233128" data-width="0.22768865030674848" data-height="0.055230828220858896" data-start-edge="right" data-speed="90" data-source-interval="1804" data-pixel-size="5" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 388.24px; top: 599.361px; width: 148.453px; height: 36.0105px;"><canvas></canvas></div><div class="smear-container" data-x="0.8231472392638037" data-y="0.9192653374233128" data-width="0.05489861963190184" data-height="0.055230828220858896" data-start-edge="left" data-speed="56" data-source-interval="1416" data-pixel-size="1" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 536.692px; top: 599.361px; width: 35.7939px; height: 36.0105px;"><canvas></canvas></div><div class="smear-container" data-x="0.8780460122699386" data-y="0.9192653374233128" data-width="0.12195352760736196" data-height="0.055230828220858896" data-start-edge="right" data-speed="73" data-source-interval="1911" data-pixel-size="4" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 572.486px; top: 599.361px; width: 79.5137px; height: 36.0105px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.9744969325153373" data-width="0.08880920245398773" data-height="0.02550352760736196" data-start-edge="right" data-speed="46" data-source-interval="1810" data-pixel-size="5" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="checkerboard" style="left: 0px; top: 635.372px; width: 57.9036px; height: 16.6283px;"><canvas></canvas></div></div><script> class SmearCanvas { constructor(c) { this.container = c; this.canvas = c.querySelector("canvas") || document.createElement("canvas"); if (!c.querySelector("canvas")) c.appendChild(this.canvas); this.ctx = this.canvas.getContext("2d"); this.ctx.imageSmoothingEnabled = false; this.imageData = null; this.lastTime = 0; this.animationId = null; this.speed = parseInt(c.dataset.speed) || 50; this.pixelSize = parseInt(c.dataset.pixelSize) || 2; this.sourceInterval = parseInt(c.dataset.sourceInterval) || 1000; this.colorFg = c.dataset.colorFg || "#FFFFFF"; this.colorBg = c.dataset.colorBg || "#000000"; this.sourceType = c.dataset.sourceType || "noise"; this.startEdge = c.dataset.startEdge || "top"; this.fgRGB = this.hexToRGB(this.colorFg); this.bgRGB = this.hexToRGB(this.colorBg); this.moveSpeed = (1000 / 60) / this.speed; this.subPixelX = 0; this.subPixelY = 0; this.leadX = 0; this.leadY = 0; this.initDirection(); this.lastDirectionChange = 0; this.nextDirectionInterval = this.randomInterval(); this.sourceParams = this.generateSourceParams(); this.lastSourceTime = 0; this.resize(); this.initCanvas(); this.generateSourceEdge(); this.initLeadPosition(); this.startAnimation(); this.resizeObserver = new ResizeObserver(() => this.resize()); this.resizeObserver.observe(this.container); } generateSourceParams() { return { steps: 3 + Math.floor(Math.random() * 6), stripeWidth: 2 + Math.floor(Math.random() * 8), checkSize: 1 + Math.floor(Math.random() * 4), phase: 0, dashLength: 3 + Math.floor(Math.random() * 10), gapLength: 2 + Math.floor(Math.random() * 6), density: 0.05 + Math.random() * 0.25, frequency: 1 + Math.random() * 4, sinePhase: Math.random() * Math.PI * 2, seed1: Math.random() * 100, seed2: Math.random() * 100, seed3: Math.random() * 100, counter: Math.floor(Math.random() * 65536), caRule: Math.random() > 0.5 ? 30 : 110 }; } initDirection() { switch (this.startEdge) { case "top": this.dx = 0; this.dy = 1; break; case "bottom": this.dx = 0; this.dy = -1; break; case "left": this.dx = 1; this.dy = 0; break; case "right": this.dx = -1; this.dy = 0; break; default: this.dx = 0; this.dy = 1; } } initLeadPosition() { switch (this.startEdge) { case "top": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = 1; break; case "bottom": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = this.internalHeight - 2; break; case "left": this.leadX = 1; this.leadY = Math.floor(this.internalHeight / 2); break; case "right": this.leadX = this.internalWidth - 2; this.leadY = Math.floor(this.internalHeight / 2); break; } } resize() { var rect = this.container.getBoundingClientRect(); if (rect.width === 0 || rect.height === 0) return; this.internalWidth = Math.ceil(rect.width / this.pixelSize); this.internalHeight = Math.ceil(rect.height / this.pixelSize); var oldImageData = this.imageData; var oldWidth = this.canvas.width; var oldHeight = this.canvas.height; this.canvas.width = this.internalWidth; this.canvas.height = this.internalHeight; this.imageData = this.ctx.createImageData(this.internalWidth, this.internalHeight); if (oldImageData && oldWidth > 0 && oldHeight > 0) { var minW = Math.min(oldWidth, this.internalWidth); var minH = Math.min(oldHeight, this.internalHeight); for (var y = 0; y < minH; y++) { for (var x = 0; x < minW; x++) { var oi = (y * oldWidth + x) * 4; var ni = (y * this.internalWidth + x) * 4; this.imageData.data[ni] = oldImageData.data[oi]; this.imageData.data[ni + 1] = oldImageData.data[oi + 1]; this.imageData.data[ni + 2] = oldImageData.data[oi + 2]; this.imageData.data[ni + 3] = oldImageData.data[oi + 3]; } } } } hexToRGB(hex) { var r = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); return r ? { r: parseInt(r[1], 16), g: parseInt(r[2], 16), b: parseInt(r[3], 16) } : { r: 255, g: 255, b: 255 }; } lerpColor(t) { return { r: Math.round(this.bgRGB.r + (this.fgRGB.r - this.bgRGB.r) * t), g: Math.round(this.bgRGB.g + (this.fgRGB.g - this.bgRGB.g) * t), b: Math.round(this.bgRGB.b + (this.fgRGB.b - this.bgRGB.b) * t) }; } getSourceValue(pos, length) { var t = pos / length; switch (this.sourceType) { case "noise": return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; case "linear-gradient": return this.lerpColor(t); case "stepped-gradient": var steps = this.sourceParams.steps || 5; return this.lerpColor(Math.floor(t * steps) / (steps - 1)); case "random-gradient": if (!this.gradientCache || this.gradientCache.length !== length) this.generateRandomGradient(length); return this.lerpColor(this.gradientCache[pos]); case "stripes": return (Math.floor(pos / (this.sourceParams.stripeWidth || 4)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "checkerboard": return ((Math.floor(pos / (this.sourceParams.checkSize || 2)) + (this.sourceParams.phase || 0)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "dashes": var cycle = (this.sourceParams.dashLength || 6) + (this.sourceParams.gapLength || 3); return (pos % cycle < (this.sourceParams.dashLength || 6)) ? this.fgRGB : this.bgRGB; case "dots": return Math.random() < (this.sourceParams.density || 0.15) ? this.fgRGB : this.bgRGB; case "sine": var sv = (Math.sin((t * (this.sourceParams.frequency || 2) * Math.PI * 2) + (this.sourceParams.sinePhase || 0)) + 1) / 2; return this.lerpColor(sv); case "perlin": var p1 = Math.sin(t * 3.7 + this.sourceParams.seed1) * 0.5; var p2 = Math.sin(t * 7.3 + this.sourceParams.seed2) * 0.25; var p3 = Math.sin(t * 13.1 + this.sourceParams.seed3) * 0.125; return this.lerpColor(Math.max(0, Math.min(1, (p1 + p2 + p3 + 0.875) / 1.75))); case "binary-counter": return ((this.sourceParams.counter >> (pos % 16)) & 1) ? this.fgRGB : this.bgRGB; case "cellular-automata": if (!this.caState || this.caState.length !== length) this.initCellularAutomata(length); return this.caState[pos] ? this.fgRGB : this.bgRGB; default: return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; } } generateRandomGradient(length) { var np = 3 + Math.floor(Math.random() * 4); var cp = [0]; for (var i = 1; i < np - 1; i++) cp.push(Math.random()); cp.push(1); cp.sort((a, b) => a - b); var cv = cp.map(() => Math.random()); this.gradientCache = []; for (var i = 0; i < length; i++) { var t = i / length; var si = 0; for (var j = 0; j < cp.length - 1; j++) { if (t >= cp[j] && t <= cp[j + 1]) { si = j; break; } } var st = (t - cp[si]) / (cp[si + 1] - cp[si]); this.gradientCache.push(cv[si] + (cv[si + 1] - cv[si]) * st); } } initCellularAutomata(length) { this.caState = []; for (var i = 0; i < length; i++) this.caState.push(Math.random() > 0.5); } evolveCellularAutomata() { if (!this.caState) return; var rule = this.sourceParams.caRule || 30; var os = [...this.caState]; var len = this.caState.length; for (var i = 0; i < len; i++) { var p = (os[(i - 1 + len) % len] ? 4 : 0) + (os[i] ? 2 : 0) + (os[(i + 1) % len] ? 1 : 0); this.caState[i] = ((rule >> p) & 1) === 1; } } updateSourceParams() { switch (this.sourceType) { case "checkerboard": this.sourceParams.phase = (this.sourceParams.phase + 1) % 2; break; case "sine": this.sourceParams.sinePhase += 0.5; break; case "binary-counter": this.sourceParams.counter++; break; case "cellular-automata": this.evolveCellularAutomata(); break; case "random-gradient": this.gradientCache = null; break; case "perlin": this.sourceParams.seed1 += 0.3; this.sourceParams.seed2 += 0.2; this.sourceParams.seed3 += 0.1; break; } } randomInterval() { return 100 + Math.random() * 900; } changeDirection() { var dirs = [[0, 1], [1, 1], [1, 0], [1, -1], [0, -1], [-1, -1], [-1, 0], [-1, 1]]; var idx = dirs.findIndex(d => d[0] === this.dx && d[1] === this.dy); if (idx === -1) idx = 0; idx = Math.random() > 0.5 ? (idx + 1) % 8 : (idx + 7) % 8; this.dx = dirs[idx][0]; this.dy = dirs[idx][1]; } initCanvas() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var isH = (this.startEdge === "top" || this.startEdge === "bottom"); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { var idx = (y * w + x) * 4; var col = this.getSourceValue(isH ? x : y, isH ? w : h); data[idx] = col.r; data[idx + 1] = col.g; data[idx + 2] = col.b; data[idx + 3] = 255; } } this.ctx.putImageData(this.imageData, 0, 0); } generateSourceEdge() { if (!this.imageData) return; this.updateSourceParams(); var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var gen = (getIdx, len) => { for (var i = 0; i < len; i++) { var idx = getIdx(i); var c = this.getSourceValue(i, len); data[idx] = c.r; data[idx + 1] = c.g; data[idx + 2] = c.b; data[idx + 3] = 255; } }; switch (this.startEdge) { case "top": gen(x => x * 4, w); break; case "bottom": gen(x => ((h - 1) * w + x) * 4, w); break; case "left": gen(y => (y * w) * 4, h); break; case "right": gen(y => (y * w + (w - 1)) * 4, h); break; } } getSourceEdgeCoord(x, y) { switch (this.startEdge) { case "top": return y === 0; case "bottom": return y === this.internalHeight - 1; case "left": return x === 0; case "right": return x === this.internalWidth - 1; } return false; } smear() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; this.subPixelX += this.dx * this.moveSpeed; this.subPixelY += this.dy * this.moveSpeed; var moveX = Math.trunc(this.subPixelX), moveY = Math.trunc(this.subPixelY); if (moveX === 0 && moveY === 0) return; this.subPixelX -= moveX; this.subPixelY -= moveY; this.leadX += moveX; this.leadY += moveY; if (this.leadX <= 0 || this.leadX >= w - 1) { this.dx = -this.dx; this.leadX = Math.max(0, Math.min(w - 1, this.leadX)); } if (this.leadY <= 0 || this.leadY >= h - 1) { this.dy = -this.dy; this.leadY = Math.max(0, Math.min(h - 1, this.leadY)); } var oldData = new Uint8ClampedArray(data); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { if (this.getSourceEdgeCoord(x, y)) continue; var srcX = Math.max(0, Math.min(w - 1, x - moveX)); var srcY = Math.max(0, Math.min(h - 1, y - moveY)); var dstIdx = (y * w + x) * 4, srcIdx = (srcY * w + srcX) * 4; data[dstIdx] = oldData[srcIdx]; data[dstIdx + 1] = oldData[srcIdx + 1]; data[dstIdx + 2] = oldData[srcIdx + 2]; data[dstIdx + 3] = oldData[srcIdx + 3]; } } } startAnimation() { var fi = 1000 / 60; var animate = (ts) => { if (!this.lastTime) this.lastTime = ts; if (!this.lastSourceTime) this.lastSourceTime = ts; if (!this.lastDirectionChange) this.lastDirectionChange = ts; if (ts - this.lastDirectionChange >= this.nextDirectionInterval) { this.changeDirection(); this.lastDirectionChange = ts; this.nextDirectionInterval = this.randomInterval(); } if (ts - this.lastSourceTime >= this.sourceInterval) { this.generateSourceEdge(); this.lastSourceTime = ts; } if (ts - this.lastTime >= fi) { this.smear(); if (this.imageData) this.ctx.putImageData(this.imageData, 0, 0); this.lastTime = ts; } this.animationId = requestAnimationFrame(animate); }; this.animationId = requestAnimationFrame(animate); } } function layoutSmears() { var vw = window.innerWidth, vh = window.innerHeight; document.querySelectorAll(".smear-container").forEach(function(div) { var x = parseFloat(div.dataset.x || 0); var y = parseFloat(div.dataset.y || 0); var w = parseFloat(div.dataset.width || 0); var h = parseFloat(div.dataset.height || 0); div.style.left = (x * vw) + "px"; div.style.top = (y * vh) + "px"; div.style.width = (w * vw) + "px"; div.style.height = (h * vh) + "px"; }); } function initSmears() { document.querySelectorAll(".smear-container").forEach(function(c) { if (!c._smearInstance) c._smearInstance = new SmearCanvas(c); }); } window.addEventListener("load", function() { layoutSmears(); initSmears(); }); window.addEventListener("resize", layoutSmears); layoutSmears(); initSmears(); </script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#7200ff;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#241a17;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#FF00CC;--color3-2:#000;--color4-1:#00ff0c;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #7200ff; --color2-1: #241a17; --color3-1: #FF00CC; --color4-1: #00ff0c;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-down" data-x="0" data-y="0" data-width="0.42" data-height="0.35" style="left: 0px; top: 0px; width: 273.84px; height: 228.2px; --clip-path: polygon(0% 0%, 106% 0%, 114% 103%, 0% 85%); background-size: 273.84px 456.4px; animation-duration: 24s;"></div><div class="gradient-container gradient-right" data-x="0.42" data-y="0" data-width="0.2726" data-height="0.27649999999999997" style="left: 273.84px; top: 0px; width: 177.735px; height: 180.278px; --clip-path: polygon(9% 0%, 88% 0%, 110% 117%, 5% 80%); background-size: 355.47px 180.278px; animation-duration: 73s;"></div><div class="gradient-container gradient-down" data-x="0.42" data-y="0.27649999999999997" data-width="0.2726" data-height="0.0735" style="left: 273.84px; top: 180.278px; width: 177.735px; height: 47.922px; --clip-path: polygon(5% -74%, 110% 63%, 95% 42%, 22% 113%); background-size: 177.735px 95.844px; animation-duration: 73s;"></div><div class="gradient-container gradient-left" data-x="0.6926" data-y="0" data-width="0.30740000000000006" data-height="0.35" style="left: 451.575px; top: 0px; width: 200.425px; height: 228.2px; --clip-path: polygon(-10% 0%, 100% 0%, 100% 99%, -4% 88%); background-size: 400.85px 228.2px; animation-duration: 76s;"></div><div class="gradient-container gradient-down" data-x="0" data-y="0.35" data-width="0.37" data-height="0.08450000000000002" style="left: 0px; top: 228.2px; width: 241.24px; height: 55.094px; --clip-path: polygon(0% -62%, 98% -16%, 101% 115%, 0% 74%); background-size: 241.24px 110.188px; animation-duration: 3s;"></div><div class="gradient-container gradient-right" data-x="0" data-y="0.4345" data-width="0.37" data-height="0.5655" style="left: 0px; top: 283.294px; width: 241.24px; height: 368.706px; --clip-path: polygon(0% -4%, 101% 2%, 91% 100%, 0% 100%); background-size: 482.48px 368.706px; animation-duration: 29s;"></div><div class="gradient-container gradient-right" data-x="0.37" data-y="0.35" data-width="0.63" data-height="0.41600000000000004" style="left: 241.24px; top: 228.2px; width: 410.76px; height: 271.232px; --clip-path: polygon(-1% -3%, 100% -1%, 100% 89%, -2% 118%); background-size: 821.52px 271.232px; animation-duration: 89s;"></div><div class="gradient-container gradient-down" data-x="0.37" data-y="0.766" data-width="0.63" data-height="0.23399999999999999" style="left: 241.24px; top: 499.432px; width: 410.76px; height: 152.568px; --clip-path: polygon(-2% 32%, 100% -19%, 100% 100%, -5% 100%); background-size: 410.76px 305.136px; animation-duration: 36s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>smear</title><style> * { margin: 0; padding: 0; box-sizing: border-box; } body, html { width: 100%; height: 100%; overflow: hidden; background: #000; } smear-partition { display: block; width: 100%; height: 100%; position: relative; } smear-canvas { display: block; position: absolute; } smear-canvas canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: -moz-crisp-edges; image-rendering: crisp-edges; -ms-interpolation-mode: nearest-neighbor; } .smear-container { position: absolute; overflow: hidden; } .smear-container canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; } </style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="smear-container" data-x="0" data-y="0" data-width="0.19847389750000002" data-height="0.16191587" data-start-edge="bottom" data-speed="83" data-source-interval="1468" data-pixel-size="2" data-color-fg="#800080" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 0px; width: 79.389559px; height: 64.766348px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.16191587" data-width="0.19847389750000002" data-height="0.0417727225" data-start-edge="bottom" data-speed="62" data-source-interval="1409" data-pixel-size="2" data-color-fg="#FF0000" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 64.766348px; width: 79.389559px; height: 16.709089px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.2036885925" data-width="0.19847389750000002" data-height="0.1259691825" data-start-edge="top" data-speed="65" data-source-interval="1500" data-pixel-size="4" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 81.475437px; width: 79.389559px; height: 50.387673px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.32965777500000004" data-width="0.19847389750000002" data-height="0.043748604999999996" data-start-edge="right" data-speed="61" data-source-interval="1485" data-pixel-size="2" data-color-fg="#FF0000" data-color-bg="#FFFFFF" data-source-type="noise" style="left: 0px; top: 131.86311px; width: 79.389559px; height: 17.499442px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.3734063775" data-width="0.19847389750000002" data-height="0.282739905" data-start-edge="right" data-speed="66" data-source-interval="1044" data-pixel-size="6" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 149.362551px; width: 79.389559px; height: 113.095962px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.6561462825" data-width="0.19847389750000002" data-height="0.30476417" data-start-edge="bottom" data-speed="55" data-source-interval="1018" data-pixel-size="1" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="noise" style="left: 0px; top: 262.458513px; width: 79.389559px; height: 121.905668px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.9609104525" data-width="0.19847389750000002" data-height="0.0390895475" data-start-edge="bottom" data-speed="98" data-source-interval="1830" data-pixel-size="1" data-color-fg="#87CEEB" data-color-bg="#808080" data-source-type="noise" style="left: 0px; top: 384.364181px; width: 79.389559px; height: 15.635819px;"><canvas></canvas></div><div class="smear-container" data-x="0.19847389750000002" data-y="0" data-width="0.1156565675" data-height="0.62802895" data-start-edge="left" data-speed="30" data-source-interval="1073" data-pixel-size="4" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="noise" style="left: 79.389559px; top: 0px; width: 46.262627px; height: 251.21158px;"><canvas></canvas></div><div class="smear-container" data-x="0.19847389750000002" data-y="0.62802895" data-width="0.1156565675" data-height="0.37197105" data-start-edge="bottom" data-speed="64" data-source-interval="1893" data-pixel-size="6" data-color-fg="#FF0000" data-color-bg="#FFFFFF" data-source-type="noise" style="left: 79.389559px; top: 251.21158px; width: 46.262627px; height: 148.78842px;"><canvas></canvas></div><div class="smear-container" data-x="0.314130465" data-y="0" data-width="0.15383941" data-height="0.2022402575" data-start-edge="bottom" data-speed="94" data-source-interval="1745" data-pixel-size="1" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="noise" style="left: 125.652186px; top: 0px; width: 61.535764px; height: 80.896103px;"><canvas></canvas></div><div class="smear-container" data-x="0.314130465" data-y="0.2022402575" data-width="0.15383941" data-height="0.20353637500000002" data-start-edge="bottom" data-speed="34" data-source-interval="1138" data-pixel-size="4" data-color-fg="#87CEEB" data-color-bg="#000000" data-source-type="noise" style="left: 125.652186px; top: 80.896103px; width: 61.535764px; height: 81.41455px;"><canvas></canvas></div><div class="smear-container" data-x="0.314130465" data-y="0.4057766325" data-width="0.15383941" data-height="0.16253" data-start-edge="top" data-speed="81" data-source-interval="1385" data-pixel-size="2" data-color-fg="#0000FF" data-color-bg="#666666" data-source-type="noise" style="left: 125.652186px; top: 162.310653px; width: 61.535764px; height: 65.012px;"><canvas></canvas></div><div class="smear-container" data-x="0.314130465" data-y="0.5683066325" data-width="0.15383941" data-height="0.04719358" data-start-edge="bottom" data-speed="59" data-source-interval="1535" data-pixel-size="6" data-color-fg="#0000FF" data-color-bg="#666666" data-source-type="noise" style="left: 125.652186px; top: 227.322653px; width: 61.535764px; height: 18.877432px;"><canvas></canvas></div><div class="smear-container" data-x="0.314130465" data-y="0.6155002125" data-width="0.15383941" data-height="0.21595069" data-start-edge="bottom" data-speed="76" data-source-interval="1932" data-pixel-size="4" data-color-fg="#0000FF" data-color-bg="#666666" data-source-type="noise" style="left: 125.652186px; top: 246.200085px; width: 61.535764px; height: 86.380276px;"><canvas></canvas></div><div class="smear-container" data-x="0.314130465" data-y="0.8314509025" data-width="0.15383941" data-height="0.10505622" data-start-edge="bottom" data-speed="48" data-source-interval="1127" data-pixel-size="4" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="noise" style="left: 125.652186px; top: 332.580361px; width: 61.535764px; height: 42.022488px;"><canvas></canvas></div><div class="smear-container" data-x="0.314130465" data-y="0.9365071225" data-width="0.15383941" data-height="0.0634928775" data-start-edge="left" data-speed="33" data-source-interval="1341" data-pixel-size="3" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="noise" style="left: 125.652186px; top: 374.602849px; width: 61.535764px; height: 25.397151px;"><canvas></canvas></div><div class="smear-container" data-x="0.467969875" data-y="0" data-width="0.21074902250000002" data-height="1" data-start-edge="left" data-speed="60" data-source-interval="555" data-pixel-size="1" data-color-fg="#FF8000" data-color-bg="#000000" data-source-type="noise" style="left: 187.18795px; top: 0px; width: 84.299609px; height: 400px;"><canvas></canvas></div><div class="smear-container" data-x="0.6787188974999999" data-y="0" data-width="0.135995925" data-height="0.047445890000000004" data-start-edge="right" data-speed="59" data-source-interval="580" data-pixel-size="4" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="noise" style="left: 271.487559px; top: 0px; width: 54.39837px; height: 18.978356px;"><canvas></canvas></div><div class="smear-container" data-x="0.6787188974999999" data-y="0.047445890000000004" data-width="0.135995925" data-height="0.30038351750000003" data-start-edge="bottom" data-speed="84" data-source-interval="1047" data-pixel-size="3" data-color-fg="#FF0000" data-color-bg="#0000FF" data-source-type="noise" style="left: 271.487559px; top: 18.978356px; width: 54.39837px; height: 120.153407px;"><canvas></canvas></div><div class="smear-container" data-x="0.6787188974999999" data-y="0.3478294075" data-width="0.135995925" data-height="0.0685246125" data-start-edge="right" data-speed="78" data-source-interval="1662" data-pixel-size="1" data-color-fg="#87CEEB" data-color-bg="#000000" data-source-type="noise" style="left: 271.487559px; top: 139.131763px; width: 54.39837px; height: 27.409845px;"><canvas></canvas></div><div class="smear-container" data-x="0.6787188974999999" data-y="0.4163540225" data-width="0.135995925" data-height="0.340749955" data-start-edge="top" data-speed="27" data-source-interval="1482" data-pixel-size="3" data-color-fg="#FF0000" data-color-bg="#000000" data-source-type="noise" style="left: 271.487559px; top: 166.541609px; width: 54.39837px; height: 136.299982px;"><canvas></canvas></div><div class="smear-container" data-x="0.6787188974999999" data-y="0.7571039775" data-width="0.135995925" data-height="0.1023745925" data-start-edge="left" data-speed="30" data-source-interval="1882" data-pixel-size="6" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="noise" style="left: 271.487559px; top: 302.841591px; width: 54.39837px; height: 40.949837px;"><canvas></canvas></div><div class="smear-container" data-x="0.6787188974999999" data-y="0.8594785675" data-width="0.135995925" data-height="0.14052143250000002" data-start-edge="right" data-speed="87" data-source-interval="935" data-pixel-size="5" data-color-fg="#0000FF" data-color-bg="#666666" data-source-type="noise" style="left: 271.487559px; top: 343.791427px; width: 54.39837px; height: 56.208573px;"><canvas></canvas></div><div class="smear-container" data-x="0.8147148249999999" data-y="0" data-width="0.185285175" data-height="0.10588475750000001" data-start-edge="right" data-speed="57" data-source-interval="1902" data-pixel-size="4" data-color-fg="#FFFFFF" data-color-bg="#FF00CC" data-source-type="noise" style="left: 325.88593px; top: 0px; width: 74.11407px; height: 42.353903px;"><canvas></canvas></div><div class="smear-container" data-x="0.8147148249999999" data-y="0.10588475750000001" data-width="0.185285175" data-height="0.43209110250000005" data-start-edge="bottom" data-speed="69" data-source-interval="1969" data-pixel-size="2" data-color-fg="#87CEEB" data-color-bg="#808080" data-source-type="noise" style="left: 325.88593px; top: 42.353903px; width: 74.11407px; height: 172.836441px;"><canvas></canvas></div><div class="smear-container" data-x="0.8147148249999999" data-y="0.5379758575" data-width="0.185285175" data-height="0.46202414249999996" data-start-edge="top" data-speed="86" data-source-interval="724" data-pixel-size="6" data-color-fg="#FF0000" data-color-bg="#0000FF" data-source-type="noise" style="left: 325.88593px; top: 215.190343px; width: 74.11407px; height: 184.809657px;"><canvas></canvas></div></div><script> class SmearCanvas { constructor(c) { this.container = c; this.canvas = c.querySelector("canvas") || document.createElement("canvas"); if (!c.querySelector("canvas")) c.appendChild(this.canvas); this.ctx = this.canvas.getContext("2d"); this.ctx.imageSmoothingEnabled = false; this.imageData = null; this.lastTime = 0; this.animationId = null; this.speed = parseInt(c.dataset.speed) || 50; this.pixelSize = parseInt(c.dataset.pixelSize) || 2; this.sourceInterval = parseInt(c.dataset.sourceInterval) || 1000; this.colorFg = c.dataset.colorFg || "#FFFFFF"; this.colorBg = c.dataset.colorBg || "#000000"; this.sourceType = c.dataset.sourceType || "noise"; this.startEdge = c.dataset.startEdge || "top"; this.fgRGB = this.hexToRGB(this.colorFg); this.bgRGB = this.hexToRGB(this.colorBg); this.moveSpeed = (1000 / 60) / this.speed; this.subPixelX = 0; this.subPixelY = 0; this.leadX = 0; this.leadY = 0; this.initDirection(); this.lastDirectionChange = 0; this.nextDirectionInterval = this.randomInterval(); this.sourceParams = this.generateSourceParams(); this.lastSourceTime = 0; this.resize(); this.initCanvas(); this.generateSourceEdge(); this.initLeadPosition(); this.startAnimation(); this.resizeObserver = new ResizeObserver(() => this.resize()); this.resizeObserver.observe(this.container); } generateSourceParams() { return { steps: 3 + Math.floor(Math.random() * 6), stripeWidth: 2 + Math.floor(Math.random() * 8), checkSize: 1 + Math.floor(Math.random() * 4), phase: 0, dashLength: 3 + Math.floor(Math.random() * 10), gapLength: 2 + Math.floor(Math.random() * 6), density: 0.05 + Math.random() * 0.25, frequency: 1 + Math.random() * 4, sinePhase: Math.random() * Math.PI * 2, seed1: Math.random() * 100, seed2: Math.random() * 100, seed3: Math.random() * 100, counter: Math.floor(Math.random() * 65536), caRule: Math.random() > 0.5 ? 30 : 110 }; } initDirection() { switch (this.startEdge) { case "top": this.dx = 0; this.dy = 1; break; case "bottom": this.dx = 0; this.dy = -1; break; case "left": this.dx = 1; this.dy = 0; break; case "right": this.dx = -1; this.dy = 0; break; default: this.dx = 0; this.dy = 1; } } initLeadPosition() { switch (this.startEdge) { case "top": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = 1; break; case "bottom": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = this.internalHeight - 2; break; case "left": this.leadX = 1; this.leadY = Math.floor(this.internalHeight / 2); break; case "right": this.leadX = this.internalWidth - 2; this.leadY = Math.floor(this.internalHeight / 2); break; } } resize() { var rect = this.container.getBoundingClientRect(); if (rect.width === 0 || rect.height === 0) return; this.internalWidth = Math.ceil(rect.width / this.pixelSize); this.internalHeight = Math.ceil(rect.height / this.pixelSize); var oldImageData = this.imageData; var oldWidth = this.canvas.width; var oldHeight = this.canvas.height; this.canvas.width = this.internalWidth; this.canvas.height = this.internalHeight; this.imageData = this.ctx.createImageData(this.internalWidth, this.internalHeight); if (oldImageData && oldWidth > 0 && oldHeight > 0) { var minW = Math.min(oldWidth, this.internalWidth); var minH = Math.min(oldHeight, this.internalHeight); for (var y = 0; y < minH; y++) { for (var x = 0; x < minW; x++) { var oi = (y * oldWidth + x) * 4; var ni = (y * this.internalWidth + x) * 4; this.imageData.data[ni] = oldImageData.data[oi]; this.imageData.data[ni + 1] = oldImageData.data[oi + 1]; this.imageData.data[ni + 2] = oldImageData.data[oi + 2]; this.imageData.data[ni + 3] = oldImageData.data[oi + 3]; } } } } hexToRGB(hex) { var r = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); return r ? { r: parseInt(r[1], 16), g: parseInt(r[2], 16), b: parseInt(r[3], 16) } : { r: 255, g: 255, b: 255 }; } lerpColor(t) { return { r: Math.round(this.bgRGB.r + (this.fgRGB.r - this.bgRGB.r) * t), g: Math.round(this.bgRGB.g + (this.fgRGB.g - this.bgRGB.g) * t), b: Math.round(this.bgRGB.b + (this.fgRGB.b - this.bgRGB.b) * t) }; } getSourceValue(pos, length) { var t = pos / length; switch (this.sourceType) { case "noise": return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; case "linear-gradient": return this.lerpColor(t); case "stepped-gradient": var steps = this.sourceParams.steps || 5; return this.lerpColor(Math.floor(t * steps) / (steps - 1)); case "random-gradient": if (!this.gradientCache || this.gradientCache.length !== length) this.generateRandomGradient(length); return this.lerpColor(this.gradientCache[pos]); case "stripes": return (Math.floor(pos / (this.sourceParams.stripeWidth || 4)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "checkerboard": return ((Math.floor(pos / (this.sourceParams.checkSize || 2)) + (this.sourceParams.phase || 0)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "dashes": var cycle = (this.sourceParams.dashLength || 6) + (this.sourceParams.gapLength || 3); return (pos % cycle < (this.sourceParams.dashLength || 6)) ? this.fgRGB : this.bgRGB; case "dots": return Math.random() < (this.sourceParams.density || 0.15) ? this.fgRGB : this.bgRGB; case "sine": var sv = (Math.sin((t * (this.sourceParams.frequency || 2) * Math.PI * 2) + (this.sourceParams.sinePhase || 0)) + 1) / 2; return this.lerpColor(sv); case "perlin": var p1 = Math.sin(t * 3.7 + this.sourceParams.seed1) * 0.5; var p2 = Math.sin(t * 7.3 + this.sourceParams.seed2) * 0.25; var p3 = Math.sin(t * 13.1 + this.sourceParams.seed3) * 0.125; return this.lerpColor(Math.max(0, Math.min(1, (p1 + p2 + p3 + 0.875) / 1.75))); case "binary-counter": return ((this.sourceParams.counter >> (pos % 16)) & 1) ? this.fgRGB : this.bgRGB; case "cellular-automata": if (!this.caState || this.caState.length !== length) this.initCellularAutomata(length); return this.caState[pos] ? this.fgRGB : this.bgRGB; default: return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; } } generateRandomGradient(length) { var np = 3 + Math.floor(Math.random() * 4); var cp = [0]; for (var i = 1; i < np - 1; i++) cp.push(Math.random()); cp.push(1); cp.sort((a, b) => a - b); var cv = cp.map(() => Math.random()); this.gradientCache = []; for (var i = 0; i < length; i++) { var t = i / length; var si = 0; for (var j = 0; j < cp.length - 1; j++) { if (t >= cp[j] && t <= cp[j + 1]) { si = j; break; } } var st = (t - cp[si]) / (cp[si + 1] - cp[si]); this.gradientCache.push(cv[si] + (cv[si + 1] - cv[si]) * st); } } initCellularAutomata(length) { this.caState = []; for (var i = 0; i < length; i++) this.caState.push(Math.random() > 0.5); } evolveCellularAutomata() { if (!this.caState) return; var rule = this.sourceParams.caRule || 30; var os = [...this.caState]; var len = this.caState.length; for (var i = 0; i < len; i++) { var p = (os[(i - 1 + len) % len] ? 4 : 0) + (os[i] ? 2 : 0) + (os[(i + 1) % len] ? 1 : 0); this.caState[i] = ((rule >> p) & 1) === 1; } } updateSourceParams() { switch (this.sourceType) { case "checkerboard": this.sourceParams.phase = (this.sourceParams.phase + 1) % 2; break; case "sine": this.sourceParams.sinePhase += 0.5; break; case "binary-counter": this.sourceParams.counter++; break; case "cellular-automata": this.evolveCellularAutomata(); break; case "random-gradient": this.gradientCache = null; break; case "perlin": this.sourceParams.seed1 += 0.3; this.sourceParams.seed2 += 0.2; this.sourceParams.seed3 += 0.1; break; } } randomInterval() { return 100 + Math.random() * 900; } changeDirection() { var dirs = [[0, 1], [1, 1], [1, 0], [1, -1], [0, -1], [-1, -1], [-1, 0], [-1, 1]]; var idx = dirs.findIndex(d => d[0] === this.dx && d[1] === this.dy); if (idx === -1) idx = 0; idx = Math.random() > 0.5 ? (idx + 1) % 8 : (idx + 7) % 8; this.dx = dirs[idx][0]; this.dy = dirs[idx][1]; } initCanvas() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var isH = (this.startEdge === "top" || this.startEdge === "bottom"); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { var idx = (y * w + x) * 4; var col = this.getSourceValue(isH ? x : y, isH ? w : h); data[idx] = col.r; data[idx + 1] = col.g; data[idx + 2] = col.b; data[idx + 3] = 255; } } this.ctx.putImageData(this.imageData, 0, 0); } generateSourceEdge() { if (!this.imageData) return; this.updateSourceParams(); var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var gen = (getIdx, len) => { for (var i = 0; i < len; i++) { var idx = getIdx(i); var c = this.getSourceValue(i, len); data[idx] = c.r; data[idx + 1] = c.g; data[idx + 2] = c.b; data[idx + 3] = 255; } }; switch (this.startEdge) { case "top": gen(x => x * 4, w); break; case "bottom": gen(x => ((h - 1) * w + x) * 4, w); break; case "left": gen(y => (y * w) * 4, h); break; case "right": gen(y => (y * w + (w - 1)) * 4, h); break; } } getSourceEdgeCoord(x, y) { switch (this.startEdge) { case "top": return y === 0; case "bottom": return y === this.internalHeight - 1; case "left": return x === 0; case "right": return x === this.internalWidth - 1; } return false; } smear() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; this.subPixelX += this.dx * this.moveSpeed; this.subPixelY += this.dy * this.moveSpeed; var moveX = Math.trunc(this.subPixelX), moveY = Math.trunc(this.subPixelY); if (moveX === 0 && moveY === 0) return; this.subPixelX -= moveX; this.subPixelY -= moveY; this.leadX += moveX; this.leadY += moveY; if (this.leadX <= 0 || this.leadX >= w - 1) { this.dx = -this.dx; this.leadX = Math.max(0, Math.min(w - 1, this.leadX)); } if (this.leadY <= 0 || this.leadY >= h - 1) { this.dy = -this.dy; this.leadY = Math.max(0, Math.min(h - 1, this.leadY)); } var oldData = new Uint8ClampedArray(data); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { if (this.getSourceEdgeCoord(x, y)) continue; var srcX = Math.max(0, Math.min(w - 1, x - moveX)); var srcY = Math.max(0, Math.min(h - 1, y - moveY)); var dstIdx = (y * w + x) * 4, srcIdx = (srcY * w + srcX) * 4; data[dstIdx] = oldData[srcIdx]; data[dstIdx + 1] = oldData[srcIdx + 1]; data[dstIdx + 2] = oldData[srcIdx + 2]; data[dstIdx + 3] = oldData[srcIdx + 3]; } } } startAnimation() { var fi = 1000 / 60; var animate = (ts) => { if (!this.lastTime) this.lastTime = ts; if (!this.lastSourceTime) this.lastSourceTime = ts; if (!this.lastDirectionChange) this.lastDirectionChange = ts; if (ts - this.lastDirectionChange >= this.nextDirectionInterval) { this.changeDirection(); this.lastDirectionChange = ts; this.nextDirectionInterval = this.randomInterval(); } if (ts - this.lastSourceTime >= this.sourceInterval) { this.generateSourceEdge(); this.lastSourceTime = ts; } if (ts - this.lastTime >= fi) { this.smear(); if (this.imageData) this.ctx.putImageData(this.imageData, 0, 0); this.lastTime = ts; } this.animationId = requestAnimationFrame(animate); }; this.animationId = requestAnimationFrame(animate); } } function layoutSmears() { var vw = window.innerWidth, vh = window.innerHeight; document.querySelectorAll(".smear-container").forEach(function(div) { var x = parseFloat(div.dataset.x || 0); var y = parseFloat(div.dataset.y || 0); var w = parseFloat(div.dataset.width || 0); var h = parseFloat(div.dataset.height || 0); div.style.left = (x * vw) + "px"; div.style.top = (y * vh) + "px"; div.style.width = (w * vw) + "px"; div.style.height = (h * vh) + "px"; }); } function initSmears() { document.querySelectorAll(".smear-container").forEach(function(c) { if (!c._smearInstance) c._smearInstance = new SmearCanvas(c); }); } window.addEventListener("load", function() { layoutSmears(); initSmears(); }); window.addEventListener("resize", layoutSmears); layoutSmears(); initSmears(); </script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#ff0000;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#00ff0c;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#494949;--color3-2:#000;--color4-1:#1d1d1d;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #ff0000; --color2-1: #00ff0c; --color3-1: #494949; --color4-1: #1d1d1d;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-right" data-x="0" data-y="0" data-width="0.1" data-height="0.049" style="left: 0px; top: 0px; width: 40px; height: 19.6px; --clip-path: polygon(0% 0%, 59% 0%, 77% 155%, 0% 72%); background-size: 80px 19.6px; animation-duration: 36s;"></div><div class="gradient-container gradient-right" data-x="0" data-y="0.049" data-width="0.1" data-height="0.301" style="left: 0px; top: 19.6px; width: 40px; height: 120.4px; --clip-path: polygon(0% -5%, 77% 9%, 144% 125%, 0% 79%); background-size: 80px 120.4px; animation-duration: 48s;"></div><div class="gradient-container gradient-left" data-x="0.1" data-y="0" data-width="0.20358" data-height="0.006999999999999999" style="left: 40px; top: 0px; width: 81.432px; height: 2.8px; --clip-path: polygon(-20% 0%, 95% 0%, 111% 100%, 18% 100%); background-size: 162.864px 2.8px; animation-duration: 46s;"></div><div class="gradient-container gradient-right" data-x="0.30358" data-y="0" data-width="0.02098979999999999" data-height="0.006999999999999999" style="left: 121.432px; top: 0px; width: 8.39592px; height: 2.8px; --clip-path: polygon(-45% 0%, -173% 0%, 137% 100%, 102% 100%); background-size: 16.79184px 2.8px; animation-duration: 88s;"></div><div class="gradient-container gradient-right" data-x="0.3245698" data-y="0" data-width="0.009430199999999993" data-height="0.006999999999999999" style="left: 129.82792px; top: 0px; width: 3.77208px; height: 2.8px; --clip-path: polygon(-607% 0%, -743% 0%, 620% 100%, 82% 100%); background-size: 7.54416px 2.8px; animation-duration: 94s;"></div><div class="gradient-container gradient-left" data-x="0.1" data-y="0.006999999999999999" data-width="0.05148" data-height="0.11318999999999999" style="left: 40px; top: 2.8px; width: 20.592px; height: 45.276px; --clip-path: polygon(71% 0%, 127% 0%, 253% 165%, 103% 76%); background-size: 41.184px 45.276px; animation-duration: 55s;"></div><div class="gradient-container gradient-up" data-x="0.15148" data-y="0.006999999999999999" data-width="0.18252" data-height="0.11318999999999999" style="left: 60.592px; top: 2.8px; width: 73.008px; height: 45.276px; --clip-path: polygon(7% 0%, 127% 0%, 100% 161%, 43% 165%); background-size: 73.008px 90.552px; animation-duration: 65s;"></div><div class="gradient-container gradient-right" data-x="0.1" data-y="0.12018999999999998" data-width="0.23399999999999999" data-height="0.22981" style="left: 40px; top: 48.076px; width: 93.6px; height: 91.924px; --clip-path: polygon(23% -12%, 100% 30%, 117% 126%, 19% 133%); background-size: 187.2px 91.924px; animation-duration: 29s;"></div><div class="gradient-container gradient-right" data-x="0.33399999999999996" data-y="0" data-width="0.29104199999999997" data-height="0.196" style="left: 133.6px; top: 0px; width: 116.4168px; height: 78.4px; --clip-path: polygon(-27% 0%, 118% 0%, 107% 68%, 17% 118%); background-size: 232.8336px 78.4px; animation-duration: 71s;"></div><div class="gradient-container gradient-up" data-x="0.33399999999999996" data-y="0.196" data-width="0.29104199999999997" data-height="0.154" style="left: 133.6px; top: 78.4px; width: 116.4168px; height: 61.6px; --clip-path: polygon(17% 23%, 107% -40%, 102% 60%, 13% 139%); background-size: 116.4168px 123.2px; animation-duration: 1s;"></div><div class="gradient-container gradient-left" data-x="0.625042" data-y="0" data-width="0.3416579999999999" data-height="0.35" style="left: 250.0168px; top: 0px; width: 136.6632px; height: 140px; --clip-path: polygon(16% 0%, 116% 0%, 88% 117%, 2% 82%); background-size: 273.3264px 140px; animation-duration: 37s;"></div><div class="gradient-container gradient-down" data-x="0.9666999999999999" data-y="0" data-width="0.03330000000000005" data-height="0.0217" style="left: 386.68px; top: 0px; width: 13.32px; height: 8.68px; --clip-path: polygon(159% 0%, 100% 0%, 100% 100%, 169% 100%); background-size: 13.32px 17.36px; animation-duration: 66s;"></div><div class="gradient-container gradient-left" data-x="0.9666999999999999" data-y="0.0217" data-width="0.03330000000000005" data-height="0.1953" style="left: 386.68px; top: 8.68px; width: 13.32px; height: 78.12px; --clip-path: polygon(169% 0%, 100% 0%, 100% 83%, 110% 82%); background-size: 26.64px 78.12px; animation-duration: 74s;"></div><div class="gradient-container gradient-up" data-x="0.9666999999999999" data-y="0.217" data-width="0.03330000000000005" data-height="0.11704" style="left: 386.68px; top: 86.8px; width: 13.32px; height: 46.816px; --clip-path: polygon(110% -30%, 100% -29%, 100% 91%, 187% 92%); background-size: 13.32px 93.632px; animation-duration: 49s;"></div><div class="gradient-container gradient-up" data-x="0.9666999999999999" data-y="0.33403999999999995" data-width="0.03330000000000005" data-height="0.015960000000000002" style="left: 386.68px; top: 133.616px; width: 13.32px; height: 6.384px; --clip-path: polygon(187% -59%, 100% -64%, 100% 350%, -126% 473%); background-size: 13.32px 12.768px; animation-duration: 9s;"></div><div class="gradient-container gradient-down" data-x="0" data-y="0.35" data-width="0.75" data-height="0.65" style="left: 0px; top: 140px; width: 300px; height: 260px; --clip-path: polygon(0% -10%, 98% 3%, 89% 100%, 0% 100%); background-size: 300px 520px; animation-duration: 21s;"></div><div class="gradient-container gradient-up" data-x="0.75" data-y="0.35" data-width="0.22" data-height="0.2145" style="left: 300px; top: 140px; width: 88px; height: 85.8px; --clip-path: polygon(-8% 8%, 113% -19%, 124% 70%, -22% 134%); background-size: 88px 171.6px; animation-duration: 56s;"></div><div class="gradient-container gradient-left" data-x="0.97" data-y="0.35" data-width="0.03" data-height="0.2145" style="left: 388px; top: 140px; width: 12px; height: 85.8px; --clip-path: polygon(98% -19%, 100% 19%, 100% 110%, 175% 70%); background-size: 24px 85.8px; animation-duration: 31s;"></div><div class="gradient-container gradient-right" data-x="0.75" data-y="0.5645" data-width="0.25" data-height="0.00871" style="left: 300px; top: 225.8px; width: 100px; height: 3.484px; --clip-path: polygon(-19% 839%, 100% 238%, 100% -84%, 15% -460%); background-size: 200px 3.484px; animation-duration: 22s;"></div><div class="gradient-container gradient-left" data-x="0.75" data-y="0.57321" data-width="0.19" data-height="0.12376909999999999" style="left: 300px; top: 229.284px; width: 76px; height: 49.50764px; --clip-path: polygon(20% -39%, 84% -47%, 74% 161%, 6% 132%); background-size: 152px 49.50764px; animation-duration: 78s;"></div><div class="gradient-container gradient-right" data-x="0.94" data-y="0.57321" data-width="0.06" data-height="0.12376909999999999" style="left: 376px; top: 229.284px; width: 24px; height: 49.50764px; --clip-path: polygon(-49% -47%, 100% -13%, 100% 114%, -82% 161%); background-size: 48px 49.50764px; animation-duration: 25s;"></div><div class="gradient-container gradient-down" data-x="0.75" data-y="0.6969791000000001" data-width="0.25" data-height="0.14545003199999998" style="left: 300px; top: 278.79164px; width: 100px; height: 58.180013px; --clip-path: polygon(4% 28%, 100% 12%, 100% 60%, 11% 135%); background-size: 100px 116.360026px; animation-duration: 82s;"></div><div class="gradient-container gradient-up" data-x="0.75" data-y="0.842429132" data-width="0.25" data-height="0.15757086799999998" style="left: 300px; top: 336.971653px; width: 100px; height: 63.028347px; --clip-path: polygon(11% 32%, 100% -37%, 100% 100%, -32% 100%); background-size: 100px 126.056694px; animation-duration: 77s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#c6c6c6;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#241a17;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#494949;--color3-2:#000;--color4-1:#c6c6c6;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #c6c6c6; --color2-1: #241a17; --color3-1: #494949; --color4-1: #c6c6c6;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-up" data-x="0" data-y="0" data-width="0.81" data-height="0.0192" style="left: 0px; top: 0px; width: 288.36px; height: 6.8352px; --clip-path: polygon(0% 0%, 99% 0%, 94% 100%, 0% 100%); background-size: 288.36px 13.6704px; animation-duration: 88s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.0192" data-width="0.49248" data-height="0.451584" style="left: 0px; top: 6.8352px; width: 175.323px; height: 160.764px; --clip-path: polygon(0% 0%, 85% 0%, 111% 113%, 0% 89%); background-size: 350.646px 160.764px; animation-duration: 15s;"></div><div class="gradient-container gradient-right" data-x="0.49248" data-y="0.0192" data-width="0.27702000000000004" data-height="0.451584" style="left: 175.323px; top: 6.8352px; width: 98.6191px; height: 160.764px; --clip-path: polygon(-27% 0%, 85% 0%, 81% 112%, 20% 113%); background-size: 197.238px 160.764px; animation-duration: 45s;"></div><div class="gradient-container gradient-right" data-x="0.7695000000000001" data-y="0.0192" data-width="0.040500000000000015" data-height="0.451584" style="left: 273.942px; top: 6.8352px; width: 14.418px; height: 160.764px; --clip-path: polygon(-102% 0%, -23% 0%, -97% 87%, -129% 112%); background-size: 28.836px 160.764px; animation-duration: 19s;"></div><div class="gradient-container gradient-up" data-x="0" data-y="0.4707839999999999" data-width="0.1053" data-height="0.30331392" style="left: 0px; top: 167.599px; width: 37.4868px; height: 107.98px; --clip-path: polygon(0% -17%, 89% -14%, 29% 74%, 0% 91%); background-size: 37.4868px 215.96px; animation-duration: 67s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.77409792" data-width="0.1053" data-height="0.18590208000000003" style="left: 0px; top: 275.579px; width: 37.4868px; height: 66.1811px; --clip-path: polygon(0% -14%, 29% -43%, 27% 110%, 0% 115%); background-size: 74.9736px 66.1811px; animation-duration: 8s;"></div><div class="gradient-container gradient-right" data-x="0.1053" data-y="0.4707839999999999" data-width="0.549666" data-height="0.48921600000000004" style="left: 37.4868px; top: 167.599px; width: 195.681px; height: 174.161px; --clip-path: polygon(-2% -9%, 105% 6%, 87% 89%, -14% 104%); background-size: 391.362px 174.161px; animation-duration: 5s;"></div><div class="gradient-container gradient-right" data-x="0.6549659999999999" data-y="0.4707839999999999" data-width="0.155034" data-height="0.48921600000000004" style="left: 233.168px; top: 167.599px; width: 55.1921px; height: 174.161px; --clip-path: polygon(18% 6%, 48% -12%, 117% 109%, -48% 89%); background-size: 110.384px 174.161px; animation-duration: 29s;"></div><div class="gradient-container gradient-right" data-x="0.81" data-y="0" data-width="0.18999999999999997" data-height="0.24182784000000002" style="left: 288.36px; top: 0px; width: 67.64px; height: 86.0907px; --clip-path: polygon(-5% 0%, 100% 0%, 100% 93%, 30% 76%); background-size: 135.28px 86.0907px; animation-duration: 1s;"></div><div class="gradient-container gradient-up" data-x="0.81" data-y="0.24182784000000002" data-width="0.07409999999999999" data-height="0.010076159999999997" style="left: 288.36px; top: 86.0907px; width: 26.3796px; height: 3.58711px; --clip-path: polygon(76% -586%, 153% 80%, 12% 457%, -81% 115%); background-size: 26.3796px 7.17423px; animation-duration: 2s;"></div><div class="gradient-container gradient-up" data-x="0.8841" data-y="0.24182784000000002" data-width="0.11589999999999998" data-height="0.010076159999999997" style="left: 314.74px; top: 86.0907px; width: 41.2604px; height: 3.58711px; --clip-path: polygon(34% 80%, 100% -157%, 100% -643%, -56% 457%); background-size: 41.2604px 7.17423px; animation-duration: 77s;"></div><div class="gradient-container gradient-right" data-x="0.81" data-y="0.251904" data-width="0.18999999999999997" data-height="0.36249599999999993" style="left: 288.36px; top: 89.6778px; width: 67.64px; height: 129.049px; --clip-path: polygon(-31% 0%, 100% -21%, 100% 114%, -22% 103%); background-size: 135.28px 129.049px; animation-duration: 64s;"></div><div class="gradient-container gradient-up" data-x="0.81" data-y="0.6144" data-width="0.18999999999999997" data-height="0.051840000000000004" style="left: 288.36px; top: 218.726px; width: 67.64px; height: 18.455px; --clip-path: polygon(-22% 19%, 100% 95%, 100% 85%, -12% 189%); background-size: 67.64px 36.9101px; animation-duration: 83s;"></div><div class="gradient-container gradient-left" data-x="0.81" data-y="0.6662399999999999" data-width="0.18999999999999997" data-height="0.21738240000000003" style="left: 288.36px; top: 237.181px; width: 67.64px; height: 77.3881px; --clip-path: polygon(-12% 21%, 100% -3%, 100% 97%, -2% 113%); background-size: 135.28px 77.3881px; animation-duration: 59s;"></div><div class="gradient-container gradient-down" data-x="0.81" data-y="0.8836223999999999" data-width="0.18999999999999997" data-height="0.07637759999999999" style="left: 288.36px; top: 314.57px; width: 67.64px; height: 27.1904px; --clip-path: polygon(-2% 37%, 100% -10%, 100% 43%, 14% 156%); background-size: 67.64px 54.3809px; animation-duration: 72s;"></div><div class="gradient-container gradient-right" data-x="0" data-y="0.96" data-width="0.51" data-height="0.04000000000000003" style="left: 0px; top: 341.76px; width: 181.56px; height: 14.24px; --clip-path: polygon(0% 71%, 91% -136%, 92% 100%, 0% 100%); background-size: 363.12px 14.24px; animation-duration: 70s;"></div><div class="gradient-container gradient-up" data-x="0.51" data-y="0.96" data-width="0.02650704" data-height="0.04000000000000003" style="left: 181.56px; top: 341.76px; width: 9.43651px; height: 14.24px; --clip-path: polygon(-179% -136%, 1% -30%, 392% 100%, -155% 100%); background-size: 9.43651px 28.48px; animation-duration: 30s;"></div><div class="gradient-container gradient-down" data-x="0.53650704" data-y="0.96" data-width="0.41527696" data-height="0.04000000000000003" style="left: 190.997px; top: 341.76px; width: 147.839px; height: 14.24px; --clip-path: polygon(-6% -30%, 84% 16%, 97% 100%, 19% 100%); background-size: 147.839px 28.48px; animation-duration: 2s;"></div><div class="gradient-container gradient-left" data-x="0.951784" data-y="0.96" data-width="0.038416000000000006" data-height="0.04000000000000003" style="left: 338.835px; top: 341.76px; width: 13.6761px; height: 14.24px; --clip-path: polygon(-171% 16%, 100% 54%, 100% 100%, -29% 100%); background-size: 27.3522px 14.24px; animation-duration: 44s;"></div><div class="gradient-container gradient-left" data-x="0.9902000000000001" data-y="0.96" data-width="0.009799999999999993" data-height="0.006800000000000005" style="left: 352.511px; top: 341.76px; width: 3.4888px; height: 2.4208px; --clip-path: polygon(0% 316%, 100% -640%, 100% -921%, 0% 289%); background-size: 6.9776px 2.4208px; animation-duration: 72s;"></div><div class="gradient-container gradient-right" data-x="0.9902000000000001" data-y="0.9667999999999999" data-width="0.009799999999999993" data-height="0.0007071600000000004" style="left: 352.511px; top: 344.181px; width: 3.4888px; height: 0.251749px; --clip-path: polygon(0% 1822%, 100% -9818%, 100% -9818%, 0% 1822%); background-size: 6.9776px 0.251749px; animation-duration: 80s;"></div><div class="gradient-container gradient-up" data-x="0.9902000000000001" data-y="0.9675071599999999" data-width="0.009799999999999993" data-height="0.02286484000000001" style="left: 352.511px; top: 344.433px; width: 3.4888px; height: 8.13988px; --clip-path: polygon(0% 53%, 100% -307%, 100% 100%, 0% 100%); background-size: 3.4888px 16.2798px; animation-duration: 100s;"></div><div class="gradient-container gradient-down" data-x="0.9902000000000001" data-y="0.990372" data-width="0.002939999999999998" data-height="0.009628000000000008" style="left: 352.511px; top: 352.572px; width: 1.04664px; height: 3.42757px; --clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); background-size: 1.04664px 6.85514px; animation-duration: 84s;"></div><div class="gradient-container gradient-left" data-x="0.9931400000000001" data-y="0.990372" data-width="0.006859999999999996" data-height="0.009628000000000008" style="left: 353.558px; top: 352.572px; width: 2.44216px; height: 3.42757px; --clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); background-size: 4.88432px 3.42757px; animation-duration: 14s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>smear</title><style> * { margin: 0; padding: 0; box-sizing: border-box; } body, html { width: 100%; height: 100%; overflow: hidden; background: #000; } smear-partition { display: block; width: 100%; height: 100%; position: relative; } smear-canvas { display: block; position: absolute; } smear-canvas canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: -moz-crisp-edges; image-rendering: crisp-edges; -ms-interpolation-mode: nearest-neighbor; } .smear-container { position: absolute; overflow: hidden; } .smear-container canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; } </style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="smear-container" data-x="0" data-y="0" data-width="0.99975" data-height="0.37264044943820224" data-start-edge="right" data-speed="75" data-source-interval="1999" data-pixel-size="1" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="dashes" style="left: 0px; top: 0px; width: 355.911px; height: 132.66px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.37264044943820224" data-width="0.99975" data-height="0.22657275280898875" data-start-edge="left" data-speed="36" data-source-interval="1614" data-pixel-size="3" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dashes" style="left: 0px; top: 132.66px; width: 355.911px; height: 80.6599px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.5992134831460674" data-width="0.99975" data-height="0.4005365168539326" data-start-edge="top" data-speed="87" data-source-interval="1945" data-pixel-size="2" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="dashes" style="left: 0px; top: 213.32px; width: 355.911px; height: 142.591px;"><canvas></canvas></div></div><script> class SmearCanvas { constructor(c) { this.container = c; this.canvas = c.querySelector("canvas") || document.createElement("canvas"); if (!c.querySelector("canvas")) c.appendChild(this.canvas); this.ctx = this.canvas.getContext("2d"); this.ctx.imageSmoothingEnabled = false; this.imageData = null; this.lastTime = 0; this.animationId = null; this.speed = parseInt(c.dataset.speed) || 50; this.pixelSize = parseInt(c.dataset.pixelSize) || 2; this.sourceInterval = parseInt(c.dataset.sourceInterval) || 1000; this.colorFg = c.dataset.colorFg || "#FFFFFF"; this.colorBg = c.dataset.colorBg || "#000000"; this.sourceType = c.dataset.sourceType || "noise"; this.startEdge = c.dataset.startEdge || "top"; this.fgRGB = this.hexToRGB(this.colorFg); this.bgRGB = this.hexToRGB(this.colorBg); this.moveSpeed = (1000 / 60) / this.speed; this.subPixelX = 0; this.subPixelY = 0; this.leadX = 0; this.leadY = 0; this.initDirection(); this.lastDirectionChange = 0; this.nextDirectionInterval = this.randomInterval(); this.sourceParams = this.generateSourceParams(); this.lastSourceTime = 0; this.resize(); this.initCanvas(); this.generateSourceEdge(); this.initLeadPosition(); this.startAnimation(); this.resizeObserver = new ResizeObserver(() => this.resize()); this.resizeObserver.observe(this.container); } generateSourceParams() { return { steps: 3 + Math.floor(Math.random() * 6), stripeWidth: 2 + Math.floor(Math.random() * 8), checkSize: 1 + Math.floor(Math.random() * 4), phase: 0, dashLength: 3 + Math.floor(Math.random() * 10), gapLength: 2 + Math.floor(Math.random() * 6), density: 0.05 + Math.random() * 0.25, frequency: 1 + Math.random() * 4, sinePhase: Math.random() * Math.PI * 2, seed1: Math.random() * 100, seed2: Math.random() * 100, seed3: Math.random() * 100, counter: Math.floor(Math.random() * 65536), caRule: Math.random() > 0.5 ? 30 : 110 }; } initDirection() { switch (this.startEdge) { case "top": this.dx = 0; this.dy = 1; break; case "bottom": this.dx = 0; this.dy = -1; break; case "left": this.dx = 1; this.dy = 0; break; case "right": this.dx = -1; this.dy = 0; break; default: this.dx = 0; this.dy = 1; } } initLeadPosition() { switch (this.startEdge) { case "top": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = 1; break; case "bottom": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = this.internalHeight - 2; break; case "left": this.leadX = 1; this.leadY = Math.floor(this.internalHeight / 2); break; case "right": this.leadX = this.internalWidth - 2; this.leadY = Math.floor(this.internalHeight / 2); break; } } resize() { var rect = this.container.getBoundingClientRect(); if (rect.width === 0 || rect.height === 0) return; this.internalWidth = Math.ceil(rect.width / this.pixelSize); this.internalHeight = Math.ceil(rect.height / this.pixelSize); var oldImageData = this.imageData; var oldWidth = this.canvas.width; var oldHeight = this.canvas.height; this.canvas.width = this.internalWidth; this.canvas.height = this.internalHeight; this.imageData = this.ctx.createImageData(this.internalWidth, this.internalHeight); if (oldImageData && oldWidth > 0 && oldHeight > 0) { var minW = Math.min(oldWidth, this.internalWidth); var minH = Math.min(oldHeight, this.internalHeight); for (var y = 0; y < minH; y++) { for (var x = 0; x < minW; x++) { var oi = (y * oldWidth + x) * 4; var ni = (y * this.internalWidth + x) * 4; this.imageData.data[ni] = oldImageData.data[oi]; this.imageData.data[ni + 1] = oldImageData.data[oi + 1]; this.imageData.data[ni + 2] = oldImageData.data[oi + 2]; this.imageData.data[ni + 3] = oldImageData.data[oi + 3]; } } } } hexToRGB(hex) { var r = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); return r ? { r: parseInt(r[1], 16), g: parseInt(r[2], 16), b: parseInt(r[3], 16) } : { r: 255, g: 255, b: 255 }; } lerpColor(t) { return { r: Math.round(this.bgRGB.r + (this.fgRGB.r - this.bgRGB.r) * t), g: Math.round(this.bgRGB.g + (this.fgRGB.g - this.bgRGB.g) * t), b: Math.round(this.bgRGB.b + (this.fgRGB.b - this.bgRGB.b) * t) }; } getSourceValue(pos, length) { var t = pos / length; switch (this.sourceType) { case "noise": return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; case "linear-gradient": return this.lerpColor(t); case "stepped-gradient": var steps = this.sourceParams.steps || 5; return this.lerpColor(Math.floor(t * steps) / (steps - 1)); case "random-gradient": if (!this.gradientCache || this.gradientCache.length !== length) this.generateRandomGradient(length); return this.lerpColor(this.gradientCache[pos]); case "stripes": return (Math.floor(pos / (this.sourceParams.stripeWidth || 4)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "checkerboard": return ((Math.floor(pos / (this.sourceParams.checkSize || 2)) + (this.sourceParams.phase || 0)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "dashes": var cycle = (this.sourceParams.dashLength || 6) + (this.sourceParams.gapLength || 3); return (pos % cycle < (this.sourceParams.dashLength || 6)) ? this.fgRGB : this.bgRGB; case "dots": return Math.random() < (this.sourceParams.density || 0.15) ? this.fgRGB : this.bgRGB; case "sine": var sv = (Math.sin((t * (this.sourceParams.frequency || 2) * Math.PI * 2) + (this.sourceParams.sinePhase || 0)) + 1) / 2; return this.lerpColor(sv); case "perlin": var p1 = Math.sin(t * 3.7 + this.sourceParams.seed1) * 0.5; var p2 = Math.sin(t * 7.3 + this.sourceParams.seed2) * 0.25; var p3 = Math.sin(t * 13.1 + this.sourceParams.seed3) * 0.125; return this.lerpColor(Math.max(0, Math.min(1, (p1 + p2 + p3 + 0.875) / 1.75))); case "binary-counter": return ((this.sourceParams.counter >> (pos % 16)) & 1) ? this.fgRGB : this.bgRGB; case "cellular-automata": if (!this.caState || this.caState.length !== length) this.initCellularAutomata(length); return this.caState[pos] ? this.fgRGB : this.bgRGB; default: return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; } } generateRandomGradient(length) { var np = 3 + Math.floor(Math.random() * 4); var cp = [0]; for (var i = 1; i < np - 1; i++) cp.push(Math.random()); cp.push(1); cp.sort((a, b) => a - b); var cv = cp.map(() => Math.random()); this.gradientCache = []; for (var i = 0; i < length; i++) { var t = i / length; var si = 0; for (var j = 0; j < cp.length - 1; j++) { if (t >= cp[j] && t <= cp[j + 1]) { si = j; break; } } var st = (t - cp[si]) / (cp[si + 1] - cp[si]); this.gradientCache.push(cv[si] + (cv[si + 1] - cv[si]) * st); } } initCellularAutomata(length) { this.caState = []; for (var i = 0; i < length; i++) this.caState.push(Math.random() > 0.5); } evolveCellularAutomata() { if (!this.caState) return; var rule = this.sourceParams.caRule || 30; var os = [...this.caState]; var len = this.caState.length; for (var i = 0; i < len; i++) { var p = (os[(i - 1 + len) % len] ? 4 : 0) + (os[i] ? 2 : 0) + (os[(i + 1) % len] ? 1 : 0); this.caState[i] = ((rule >> p) & 1) === 1; } } updateSourceParams() { switch (this.sourceType) { case "checkerboard": this.sourceParams.phase = (this.sourceParams.phase + 1) % 2; break; case "sine": this.sourceParams.sinePhase += 0.5; break; case "binary-counter": this.sourceParams.counter++; break; case "cellular-automata": this.evolveCellularAutomata(); break; case "random-gradient": this.gradientCache = null; break; case "perlin": this.sourceParams.seed1 += 0.3; this.sourceParams.seed2 += 0.2; this.sourceParams.seed3 += 0.1; break; } } randomInterval() { return 100 + Math.random() * 900; } changeDirection() { var dirs = [[0, 1], [1, 1], [1, 0], [1, -1], [0, -1], [-1, -1], [-1, 0], [-1, 1]]; var idx = dirs.findIndex(d => d[0] === this.dx && d[1] === this.dy); if (idx === -1) idx = 0; idx = Math.random() > 0.5 ? (idx + 1) % 8 : (idx + 7) % 8; this.dx = dirs[idx][0]; this.dy = dirs[idx][1]; } initCanvas() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var isH = (this.startEdge === "top" || this.startEdge === "bottom"); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { var idx = (y * w + x) * 4; var col = this.getSourceValue(isH ? x : y, isH ? w : h); data[idx] = col.r; data[idx + 1] = col.g; data[idx + 2] = col.b; data[idx + 3] = 255; } } this.ctx.putImageData(this.imageData, 0, 0); } generateSourceEdge() { if (!this.imageData) return; this.updateSourceParams(); var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var gen = (getIdx, len) => { for (var i = 0; i < len; i++) { var idx = getIdx(i); var c = this.getSourceValue(i, len); data[idx] = c.r; data[idx + 1] = c.g; data[idx + 2] = c.b; data[idx + 3] = 255; } }; switch (this.startEdge) { case "top": gen(x => x * 4, w); break; case "bottom": gen(x => ((h - 1) * w + x) * 4, w); break; case "left": gen(y => (y * w) * 4, h); break; case "right": gen(y => (y * w + (w - 1)) * 4, h); break; } } getSourceEdgeCoord(x, y) { switch (this.startEdge) { case "top": return y === 0; case "bottom": return y === this.internalHeight - 1; case "left": return x === 0; case "right": return x === this.internalWidth - 1; } return false; } smear() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; this.subPixelX += this.dx * this.moveSpeed; this.subPixelY += this.dy * this.moveSpeed; var moveX = Math.trunc(this.subPixelX), moveY = Math.trunc(this.subPixelY); if (moveX === 0 && moveY === 0) return; this.subPixelX -= moveX; this.subPixelY -= moveY; this.leadX += moveX; this.leadY += moveY; if (this.leadX <= 0 || this.leadX >= w - 1) { this.dx = -this.dx; this.leadX = Math.max(0, Math.min(w - 1, this.leadX)); } if (this.leadY <= 0 || this.leadY >= h - 1) { this.dy = -this.dy; this.leadY = Math.max(0, Math.min(h - 1, this.leadY)); } var oldData = new Uint8ClampedArray(data); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { if (this.getSourceEdgeCoord(x, y)) continue; var srcX = Math.max(0, Math.min(w - 1, x - moveX)); var srcY = Math.max(0, Math.min(h - 1, y - moveY)); var dstIdx = (y * w + x) * 4, srcIdx = (srcY * w + srcX) * 4; data[dstIdx] = oldData[srcIdx]; data[dstIdx + 1] = oldData[srcIdx + 1]; data[dstIdx + 2] = oldData[srcIdx + 2]; data[dstIdx + 3] = oldData[srcIdx + 3]; } } } startAnimation() { var fi = 1000 / 60; var animate = (ts) => { if (!this.lastTime) this.lastTime = ts; if (!this.lastSourceTime) this.lastSourceTime = ts; if (!this.lastDirectionChange) this.lastDirectionChange = ts; if (ts - this.lastDirectionChange >= this.nextDirectionInterval) { this.changeDirection(); this.lastDirectionChange = ts; this.nextDirectionInterval = this.randomInterval(); } if (ts - this.lastSourceTime >= this.sourceInterval) { this.generateSourceEdge(); this.lastSourceTime = ts; } if (ts - this.lastTime >= fi) { this.smear(); if (this.imageData) this.ctx.putImageData(this.imageData, 0, 0); this.lastTime = ts; } this.animationId = requestAnimationFrame(animate); }; this.animationId = requestAnimationFrame(animate); } } function layoutSmears() { var vw = window.innerWidth, vh = window.innerHeight; document.querySelectorAll(".smear-container").forEach(function(div) { var x = parseFloat(div.dataset.x || 0); var y = parseFloat(div.dataset.y || 0); var w = parseFloat(div.dataset.width || 0); var h = parseFloat(div.dataset.height || 0); div.style.left = (x * vw) + "px"; div.style.top = (y * vh) + "px"; div.style.width = (w * vw) + "px"; div.style.height = (h * vh) + "px"; }); } function initSmears() { document.querySelectorAll(".smear-container").forEach(function(c) { if (!c._smearInstance) c._smearInstance = new SmearCanvas(c); }); } window.addEventListener("load", function() { layoutSmears(); initSmears(); }); window.addEventListener("resize", layoutSmears); layoutSmears(); initSmears(); </script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>smear</title><style> * { margin: 0; padding: 0; box-sizing: border-box; } body, html { width: 100%; height: 100%; overflow: hidden; background: #000; } smear-partition { display: block; width: 100%; height: 100%; position: relative; } smear-canvas { display: block; position: absolute; } smear-canvas canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: -moz-crisp-edges; image-rendering: crisp-edges; -ms-interpolation-mode: nearest-neighbor; } .smear-container { position: absolute; overflow: hidden; } .smear-container canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; } </style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="smear-container" data-x="0" data-y="0" data-width="0.05703358895705521" data-height="0.9994892638036811" data-start-edge="left" data-speed="31" data-source-interval="1544" data-pixel-size="4" data-color-fg="#87CEEB" data-color-bg="#808080" data-source-type="cellular-automata" style="left: 0px; top: 0px; width: 37.1859px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.05703358895705521" data-y="0" data-width="0.0629111963190184" data-height="0.9994892638036811" data-start-edge="bottom" data-speed="72" data-source-interval="1421" data-pixel-size="3" data-color-fg="#FFFFFF" data-color-bg="#CCCCCC" data-source-type="cellular-automata" style="left: 37.1859px; top: 0px; width: 41.0181px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.1199447852760736" data-y="0" data-width="0.01966855828220859" data-height="0.9994892638036811" data-start-edge="top" data-speed="57" data-source-interval="1656" data-pixel-size="3" data-color-fg="#FF0000" data-color-bg="#FFFFFF" data-source-type="cellular-automata" style="left: 78.204px; top: 0px; width: 12.8239px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.1396133435582822" data-y="0" data-width="0.007884033742331289" data-height="0.9994892638036811" data-start-edge="top" data-speed="42" data-source-interval="867" data-pixel-size="5" data-color-fg="#FFFFFF" data-color-bg="#FF00CC" data-source-type="cellular-automata" style="left: 91.0279px; top: 0px; width: 5.14039px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.14749739263803682" data-y="0" data-width="0.057230981595092024" data-height="0.9994892638036811" data-start-edge="bottom" data-speed="43" data-source-interval="1013" data-pixel-size="3" data-color-fg="#87CEEB" data-color-bg="#808080" data-source-type="cellular-automata" style="left: 96.1683px; top: 0px; width: 37.3146px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.20472852760736196" data-y="0" data-width="0.0561840490797546" data-height="0.9994892638036811" data-start-edge="left" data-speed="34" data-source-interval="1909" data-pixel-size="5" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="cellular-automata" style="left: 133.483px; top: 0px; width: 36.632px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.2609125766871166" data-y="0" data-width="0.028207515337423314" data-height="0.9994892638036811" data-start-edge="left" data-speed="59" data-source-interval="1599" data-pixel-size="4" data-color-fg="#FFFF00" data-color-bg="#FF0000" data-source-type="cellular-automata" style="left: 170.115px; top: 0px; width: 18.3913px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.2891196319018405" data-y="0" data-width="0.006676871165644172" data-height="0.9994892638036811" data-start-edge="right" data-speed="56" data-source-interval="1149" data-pixel-size="4" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="cellular-automata" style="left: 188.506px; top: 0px; width: 4.35332px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.29579754601227" data-y="0" data-width="0.009470076687116564" data-height="0.9994892638036811" data-start-edge="left" data-speed="29" data-source-interval="889" data-pixel-size="1" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="cellular-automata" style="left: 192.86px; top: 0px; width: 6.17449px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.30526687116564416" data-y="0" data-width="0.057450153374233134" data-height="0.9994892638036811" data-start-edge="bottom" data-speed="59" data-source-interval="550" data-pixel-size="3" data-color-fg="#FF8000" data-color-bg="#000000" data-source-type="cellular-automata" style="left: 199.034px; top: 0px; width: 37.4575px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.36271779141104293" data-y="0" data-width="0.024365950920245398" data-height="0.9994892638036811" data-start-edge="right" data-speed="43" data-source-interval="765" data-pixel-size="6" data-color-fg="#FF0000" data-color-bg="#FFFFFF" data-source-type="cellular-automata" style="left: 236.492px; top: 0px; width: 15.8866px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.38708282208588957" data-y="0" data-width="0.04216840490797546" data-height="0.9994892638036811" data-start-edge="top" data-speed="71" data-source-interval="1712" data-pixel-size="5" data-color-fg="#FF0000" data-color-bg="#0000FF" data-source-type="cellular-automata" style="left: 252.378px; top: 0px; width: 27.4938px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.4292515337423313" data-y="0" data-width="0.012867791411042944" data-height="0.9994892638036811" data-start-edge="left" data-speed="29" data-source-interval="1942" data-pixel-size="3" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="cellular-automata" style="left: 279.872px; top: 0px; width: 8.3898px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.4421196319018405" data-y="0" data-width="0.03732990797546012" data-height="0.9994892638036811" data-start-edge="bottom" data-speed="77" data-source-interval="1584" data-pixel-size="2" data-color-fg="#800080" data-color-bg="#000000" data-source-type="cellular-automata" style="left: 288.262px; top: 0px; width: 24.3391px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.4794493865030675" data-y="0" data-width="0.01734861963190184" data-height="0.9994892638036811" data-start-edge="top" data-speed="68" data-source-interval="1925" data-pixel-size="5" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="cellular-automata" style="left: 312.601px; top: 0px; width: 11.3113px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.4967975460122699" data-y="0" data-width="0.043667638036809814" data-height="0.9994892638036811" data-start-edge="left" data-speed="62" data-source-interval="1908" data-pixel-size="6" data-color-fg="#800080" data-color-bg="#000000" data-source-type="cellular-automata" style="left: 323.912px; top: 0px; width: 28.4713px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.5404647239263803" data-y="0" data-width="0.04132039877300613" data-height="0.9994892638036811" data-start-edge="top" data-speed="92" data-source-interval="611" data-pixel-size="6" data-color-fg="#87CEEB" data-color-bg="#808080" data-source-type="cellular-automata" style="left: 352.383px; top: 0px; width: 26.9409px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.5817852760736196" data-y="0" data-width="0.0381888036809816" data-height="0.9994892638036811" data-start-edge="top" data-speed="96" data-source-interval="682" data-pixel-size="3" data-color-fg="#0000FF" data-color-bg="#FF69B4" data-source-type="cellular-automata" style="left: 379.324px; top: 0px; width: 24.8991px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.6199754601226993" data-y="0" data-width="0.04303742331288344" data-height="0.9994892638036811" data-start-edge="left" data-speed="31" data-source-interval="1913" data-pixel-size="3" data-color-fg="#FF0000" data-color-bg="#0000FF" data-source-type="cellular-automata" style="left: 404.224px; top: 0px; width: 28.0604px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.6630122699386503" data-y="0" data-width="0.03149325153374233" data-height="0.9994892638036811" data-start-edge="left" data-speed="73" data-source-interval="673" data-pixel-size="5" data-color-fg="#800080" data-color-bg="#000000" data-source-type="cellular-automata" style="left: 432.284px; top: 0px; width: 20.5336px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.6945061349693251" data-y="0" data-width="0.02069861963190184" data-height="0.9994892638036811" data-start-edge="left" data-speed="68" data-source-interval="1330" data-pixel-size="2" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="cellular-automata" style="left: 452.818px; top: 0px; width: 13.4955px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.7152039877300613" data-y="0" data-width="0.03316595092024539" data-height="0.9994892638036811" data-start-edge="top" data-speed="37" data-source-interval="1224" data-pixel-size="4" data-color-fg="#FFFFFF" data-color-bg="#CCCCCC" data-source-type="cellular-automata" style="left: 466.313px; top: 0px; width: 21.6242px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.7483696319018405" data-y="0" data-width="0.008185398773006135" data-height="0.9994892638036811" data-start-edge="top" data-speed="76" data-source-interval="1700" data-pixel-size="5" data-color-fg="#FFFFFF" data-color-bg="#FF00CC" data-source-type="cellular-automata" style="left: 487.937px; top: 0px; width: 5.33688px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.7565552147239264" data-y="0" data-width="0.02729432515337423" data-height="0.9994892638036811" data-start-edge="bottom" data-speed="71" data-source-interval="1396" data-pixel-size="1" data-color-fg="#0000FF" data-color-bg="#FF69B4" data-source-type="cellular-automata" style="left: 493.274px; top: 0px; width: 17.7959px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.7838496932515338" data-y="0" data-width="0.015531134969325153" data-height="0.9994892638036811" data-start-edge="right" data-speed="98" data-source-interval="1348" data-pixel-size="2" data-color-fg="#87CEEB" data-color-bg="#000000" data-source-type="cellular-automata" style="left: 511.07px; top: 0px; width: 10.1263px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.7993803680981596" data-y="0" data-width="0.027825613496932515" data-height="0.9994892638036811" data-start-edge="bottom" data-speed="89" data-source-interval="644" data-pixel-size="6" data-color-fg="#FFFF00" data-color-bg="#FF0000" data-source-type="cellular-automata" style="left: 521.196px; top: 0px; width: 18.1423px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.827207055214724" data-y="0" data-width="0.008737254601226993" data-height="0.9994892638036811" data-start-edge="bottom" data-speed="67" data-source-interval="1082" data-pixel-size="1" data-color-fg="#FF0000" data-color-bg="#000000" data-source-type="cellular-automata" style="left: 539.339px; top: 0px; width: 5.69669px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.8359432515337423" data-y="0" data-width="0.048324233128834354" data-height="0.9994892638036811" data-start-edge="top" data-speed="65" data-source-interval="1077" data-pixel-size="5" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="cellular-automata" style="left: 545.035px; top: 0px; width: 31.5074px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.8842684049079754" data-y="0" data-width="0.011310122699386502" data-height="0.9994892638036811" data-start-edge="top" data-speed="48" data-source-interval="598" data-pixel-size="5" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="cellular-automata" style="left: 576.543px; top: 0px; width: 7.3742px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.8955782208588957" data-y="0" data-width="0.051080061349693257" data-height="0.9994892638036811" data-start-edge="bottom" data-speed="70" data-source-interval="509" data-pixel-size="4" data-color-fg="#0000FF" data-color-bg="#000000" data-source-type="cellular-automata" style="left: 583.917px; top: 0px; width: 33.3042px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.9466579754601228" data-y="0" data-width="0.04214401840490798" data-height="0.9994892638036811" data-start-edge="left" data-speed="47" data-source-interval="564" data-pixel-size="6" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="cellular-automata" style="left: 617.221px; top: 0px; width: 27.4779px; height: 651.667px;"><canvas></canvas></div><div class="smear-container" data-x="0.9888021472392637" data-y="0" data-width="0.010686687116564416" data-height="0.9994892638036811" data-start-edge="left" data-speed="47" data-source-interval="723" data-pixel-size="4" data-color-fg="#FFFFFF" data-color-bg="#FF00CC" data-source-type="cellular-automata" style="left: 644.699px; top: 0px; width: 6.96772px; height: 651.667px;"><canvas></canvas></div></div><script> class SmearCanvas { constructor(c) { this.container = c; this.canvas = c.querySelector("canvas") || document.createElement("canvas"); if (!c.querySelector("canvas")) c.appendChild(this.canvas); this.ctx = this.canvas.getContext("2d"); this.ctx.imageSmoothingEnabled = false; this.imageData = null; this.lastTime = 0; this.animationId = null; this.speed = parseInt(c.dataset.speed) || 50; this.pixelSize = parseInt(c.dataset.pixelSize) || 2; this.sourceInterval = parseInt(c.dataset.sourceInterval) || 1000; this.colorFg = c.dataset.colorFg || "#FFFFFF"; this.colorBg = c.dataset.colorBg || "#000000"; this.sourceType = c.dataset.sourceType || "noise"; this.startEdge = c.dataset.startEdge || "top"; this.fgRGB = this.hexToRGB(this.colorFg); this.bgRGB = this.hexToRGB(this.colorBg); this.moveSpeed = (1000 / 60) / this.speed; this.subPixelX = 0; this.subPixelY = 0; this.leadX = 0; this.leadY = 0; this.initDirection(); this.lastDirectionChange = 0; this.nextDirectionInterval = this.randomInterval(); this.sourceParams = this.generateSourceParams(); this.lastSourceTime = 0; this.resize(); this.initCanvas(); this.generateSourceEdge(); this.initLeadPosition(); this.startAnimation(); this.resizeObserver = new ResizeObserver(() => this.resize()); this.resizeObserver.observe(this.container); } generateSourceParams() { return { steps: 3 + Math.floor(Math.random() * 6), stripeWidth: 2 + Math.floor(Math.random() * 8), checkSize: 1 + Math.floor(Math.random() * 4), phase: 0, dashLength: 3 + Math.floor(Math.random() * 10), gapLength: 2 + Math.floor(Math.random() * 6), density: 0.05 + Math.random() * 0.25, frequency: 1 + Math.random() * 4, sinePhase: Math.random() * Math.PI * 2, seed1: Math.random() * 100, seed2: Math.random() * 100, seed3: Math.random() * 100, counter: Math.floor(Math.random() * 65536), caRule: Math.random() > 0.5 ? 30 : 110 }; } initDirection() { switch (this.startEdge) { case "top": this.dx = 0; this.dy = 1; break; case "bottom": this.dx = 0; this.dy = -1; break; case "left": this.dx = 1; this.dy = 0; break; case "right": this.dx = -1; this.dy = 0; break; default: this.dx = 0; this.dy = 1; } } initLeadPosition() { switch (this.startEdge) { case "top": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = 1; break; case "bottom": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = this.internalHeight - 2; break; case "left": this.leadX = 1; this.leadY = Math.floor(this.internalHeight / 2); break; case "right": this.leadX = this.internalWidth - 2; this.leadY = Math.floor(this.internalHeight / 2); break; } } resize() { var rect = this.container.getBoundingClientRect(); if (rect.width === 0 || rect.height === 0) return; this.internalWidth = Math.ceil(rect.width / this.pixelSize); this.internalHeight = Math.ceil(rect.height / this.pixelSize); var oldImageData = this.imageData; var oldWidth = this.canvas.width; var oldHeight = this.canvas.height; this.canvas.width = this.internalWidth; this.canvas.height = this.internalHeight; this.imageData = this.ctx.createImageData(this.internalWidth, this.internalHeight); if (oldImageData && oldWidth > 0 && oldHeight > 0) { var minW = Math.min(oldWidth, this.internalWidth); var minH = Math.min(oldHeight, this.internalHeight); for (var y = 0; y < minH; y++) { for (var x = 0; x < minW; x++) { var oi = (y * oldWidth + x) * 4; var ni = (y * this.internalWidth + x) * 4; this.imageData.data[ni] = oldImageData.data[oi]; this.imageData.data[ni + 1] = oldImageData.data[oi + 1]; this.imageData.data[ni + 2] = oldImageData.data[oi + 2]; this.imageData.data[ni + 3] = oldImageData.data[oi + 3]; } } } } hexToRGB(hex) { var r = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); return r ? { r: parseInt(r[1], 16), g: parseInt(r[2], 16), b: parseInt(r[3], 16) } : { r: 255, g: 255, b: 255 }; } lerpColor(t) { return { r: Math.round(this.bgRGB.r + (this.fgRGB.r - this.bgRGB.r) * t), g: Math.round(this.bgRGB.g + (this.fgRGB.g - this.bgRGB.g) * t), b: Math.round(this.bgRGB.b + (this.fgRGB.b - this.bgRGB.b) * t) }; } getSourceValue(pos, length) { var t = pos / length; switch (this.sourceType) { case "noise": return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; case "linear-gradient": return this.lerpColor(t); case "stepped-gradient": var steps = this.sourceParams.steps || 5; return this.lerpColor(Math.floor(t * steps) / (steps - 1)); case "random-gradient": if (!this.gradientCache || this.gradientCache.length !== length) this.generateRandomGradient(length); return this.lerpColor(this.gradientCache[pos]); case "stripes": return (Math.floor(pos / (this.sourceParams.stripeWidth || 4)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "checkerboard": return ((Math.floor(pos / (this.sourceParams.checkSize || 2)) + (this.sourceParams.phase || 0)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "dashes": var cycle = (this.sourceParams.dashLength || 6) + (this.sourceParams.gapLength || 3); return (pos % cycle < (this.sourceParams.dashLength || 6)) ? this.fgRGB : this.bgRGB; case "dots": return Math.random() < (this.sourceParams.density || 0.15) ? this.fgRGB : this.bgRGB; case "sine": var sv = (Math.sin((t * (this.sourceParams.frequency || 2) * Math.PI * 2) + (this.sourceParams.sinePhase || 0)) + 1) / 2; return this.lerpColor(sv); case "perlin": var p1 = Math.sin(t * 3.7 + this.sourceParams.seed1) * 0.5; var p2 = Math.sin(t * 7.3 + this.sourceParams.seed2) * 0.25; var p3 = Math.sin(t * 13.1 + this.sourceParams.seed3) * 0.125; return this.lerpColor(Math.max(0, Math.min(1, (p1 + p2 + p3 + 0.875) / 1.75))); case "binary-counter": return ((this.sourceParams.counter >> (pos % 16)) & 1) ? this.fgRGB : this.bgRGB; case "cellular-automata": if (!this.caState || this.caState.length !== length) this.initCellularAutomata(length); return this.caState[pos] ? this.fgRGB : this.bgRGB; default: return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; } } generateRandomGradient(length) { var np = 3 + Math.floor(Math.random() * 4); var cp = [0]; for (var i = 1; i < np - 1; i++) cp.push(Math.random()); cp.push(1); cp.sort((a, b) => a - b); var cv = cp.map(() => Math.random()); this.gradientCache = []; for (var i = 0; i < length; i++) { var t = i / length; var si = 0; for (var j = 0; j < cp.length - 1; j++) { if (t >= cp[j] && t <= cp[j + 1]) { si = j; break; } } var st = (t - cp[si]) / (cp[si + 1] - cp[si]); this.gradientCache.push(cv[si] + (cv[si + 1] - cv[si]) * st); } } initCellularAutomata(length) { this.caState = []; for (var i = 0; i < length; i++) this.caState.push(Math.random() > 0.5); } evolveCellularAutomata() { if (!this.caState) return; var rule = this.sourceParams.caRule || 30; var os = [...this.caState]; var len = this.caState.length; for (var i = 0; i < len; i++) { var p = (os[(i - 1 + len) % len] ? 4 : 0) + (os[i] ? 2 : 0) + (os[(i + 1) % len] ? 1 : 0); this.caState[i] = ((rule >> p) & 1) === 1; } } updateSourceParams() { switch (this.sourceType) { case "checkerboard": this.sourceParams.phase = (this.sourceParams.phase + 1) % 2; break; case "sine": this.sourceParams.sinePhase += 0.5; break; case "binary-counter": this.sourceParams.counter++; break; case "cellular-automata": this.evolveCellularAutomata(); break; case "random-gradient": this.gradientCache = null; break; case "perlin": this.sourceParams.seed1 += 0.3; this.sourceParams.seed2 += 0.2; this.sourceParams.seed3 += 0.1; break; } } randomInterval() { return 100 + Math.random() * 900; } changeDirection() { var dirs = [[0, 1], [1, 1], [1, 0], [1, -1], [0, -1], [-1, -1], [-1, 0], [-1, 1]]; var idx = dirs.findIndex(d => d[0] === this.dx && d[1] === this.dy); if (idx === -1) idx = 0; idx = Math.random() > 0.5 ? (idx + 1) % 8 : (idx + 7) % 8; this.dx = dirs[idx][0]; this.dy = dirs[idx][1]; } initCanvas() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var isH = (this.startEdge === "top" || this.startEdge === "bottom"); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { var idx = (y * w + x) * 4; var col = this.getSourceValue(isH ? x : y, isH ? w : h); data[idx] = col.r; data[idx + 1] = col.g; data[idx + 2] = col.b; data[idx + 3] = 255; } } this.ctx.putImageData(this.imageData, 0, 0); } generateSourceEdge() { if (!this.imageData) return; this.updateSourceParams(); var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var gen = (getIdx, len) => { for (var i = 0; i < len; i++) { var idx = getIdx(i); var c = this.getSourceValue(i, len); data[idx] = c.r; data[idx + 1] = c.g; data[idx + 2] = c.b; data[idx + 3] = 255; } }; switch (this.startEdge) { case "top": gen(x => x * 4, w); break; case "bottom": gen(x => ((h - 1) * w + x) * 4, w); break; case "left": gen(y => (y * w) * 4, h); break; case "right": gen(y => (y * w + (w - 1)) * 4, h); break; } } getSourceEdgeCoord(x, y) { switch (this.startEdge) { case "top": return y === 0; case "bottom": return y === this.internalHeight - 1; case "left": return x === 0; case "right": return x === this.internalWidth - 1; } return false; } smear() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; this.subPixelX += this.dx * this.moveSpeed; this.subPixelY += this.dy * this.moveSpeed; var moveX = Math.trunc(this.subPixelX), moveY = Math.trunc(this.subPixelY); if (moveX === 0 && moveY === 0) return; this.subPixelX -= moveX; this.subPixelY -= moveY; this.leadX += moveX; this.leadY += moveY; if (this.leadX <= 0 || this.leadX >= w - 1) { this.dx = -this.dx; this.leadX = Math.max(0, Math.min(w - 1, this.leadX)); } if (this.leadY <= 0 || this.leadY >= h - 1) { this.dy = -this.dy; this.leadY = Math.max(0, Math.min(h - 1, this.leadY)); } var oldData = new Uint8ClampedArray(data); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { if (this.getSourceEdgeCoord(x, y)) continue; var srcX = Math.max(0, Math.min(w - 1, x - moveX)); var srcY = Math.max(0, Math.min(h - 1, y - moveY)); var dstIdx = (y * w + x) * 4, srcIdx = (srcY * w + srcX) * 4; data[dstIdx] = oldData[srcIdx]; data[dstIdx + 1] = oldData[srcIdx + 1]; data[dstIdx + 2] = oldData[srcIdx + 2]; data[dstIdx + 3] = oldData[srcIdx + 3]; } } } startAnimation() { var fi = 1000 / 60; var animate = (ts) => { if (!this.lastTime) this.lastTime = ts; if (!this.lastSourceTime) this.lastSourceTime = ts; if (!this.lastDirectionChange) this.lastDirectionChange = ts; if (ts - this.lastDirectionChange >= this.nextDirectionInterval) { this.changeDirection(); this.lastDirectionChange = ts; this.nextDirectionInterval = this.randomInterval(); } if (ts - this.lastSourceTime >= this.sourceInterval) { this.generateSourceEdge(); this.lastSourceTime = ts; } if (ts - this.lastTime >= fi) { this.smear(); if (this.imageData) this.ctx.putImageData(this.imageData, 0, 0); this.lastTime = ts; } this.animationId = requestAnimationFrame(animate); }; this.animationId = requestAnimationFrame(animate); } } function layoutSmears() { var vw = window.innerWidth, vh = window.innerHeight; document.querySelectorAll(".smear-container").forEach(function(div) { var x = parseFloat(div.dataset.x || 0); var y = parseFloat(div.dataset.y || 0); var w = parseFloat(div.dataset.width || 0); var h = parseFloat(div.dataset.height || 0); div.style.left = (x * vw) + "px"; div.style.top = (y * vh) + "px"; div.style.width = (w * vw) + "px"; div.style.height = (h * vh) + "px"; }); } function initSmears() { document.querySelectorAll(".smear-container").forEach(function(c) { if (!c._smearInstance) c._smearInstance = new SmearCanvas(c); }); } window.addEventListener("load", function() { layoutSmears(); initSmears(); }); window.addEventListener("resize", layoutSmears); layoutSmears(); initSmears(); </script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#3f427d;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#c6c6c6;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#000000;--color3-2:#000;--color4-1:#000000;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #3f427d; --color2-1: #c6c6c6; --color3-1: #000000; --color4-1: #000000;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-right" data-x="0" data-y="0" data-width="0.38" data-height="0.09" style="left: 0px; top: 0px; width: 247.76px; height: 58.68px; --clip-path: polygon(0% 0%, 102% 0%, 117% 99%, 0% 14%); background-size: 495.52px 58.68px; animation-duration: 91s;"></div><div class="gradient-container gradient-down" data-x="0" data-y="0.09" data-width="0.38" data-height="0.91" style="left: 0px; top: 58.68px; width: 247.76px; height: 593.32px; --clip-path: polygon(0% -9%, 117% 0%, 91% 100%, 0% 100%); background-size: 247.76px 1186.64px; animation-duration: 80s;"></div><div class="gradient-container gradient-right" data-x="0.38" data-y="0" data-width="0.5704" data-height="0.5800000000000001" style="left: 247.76px; top: 0px; width: 371.901px; height: 378.16px; --clip-path: polygon(1% 0%, 114% 0%, 92% 103%, 10% 107%); background-size: 743.802px 378.16px; animation-duration: 41s;"></div><div class="gradient-container gradient-down" data-x="0.9504" data-y="0" data-width="0.049600000000000005" data-height="0.5800000000000001" style="left: 619.661px; top: 0px; width: 32.3392px; height: 378.16px; --clip-path: polygon(155% 0%, 100% 0%, 100% 102%, -92% 103%); background-size: 32.3392px 756.32px; animation-duration: 1s;"></div><div class="gradient-container gradient-left" data-x="0.38" data-y="0.5800000000000001" data-width="0.01871408" data-height="0.07979999999999998" style="left: 247.76px; top: 378.16px; width: 12.2016px; height: 52.0296px; --clip-path: polygon(315% 47%, -143% 85%, 486% 87%, 273% 198%); background-size: 24.4032px 52.0296px; animation-duration: 50s;"></div><div class="gradient-container gradient-left" data-x="0.39871407999999997" data-y="0.5800000000000001" data-width="0.24862992000000003" data-height="0.07979999999999998" style="left: 259.962px; top: 378.16px; width: 162.107px; height: 52.0296px; --clip-path: polygon(-18% 85%, 70% -77%, 106% 1%, 29% 87%); background-size: 324.213px 52.0296px; animation-duration: 23s;"></div><div class="gradient-container gradient-down" data-x="0.647344" data-y="0.5800000000000001" data-width="0.005455999999999994" data-height="0.07979999999999998" style="left: 422.068px; top: 378.16px; width: 3.55731px; height: 52.0296px; --clip-path: polygon(-1348% -77%, -11% 23%, 83% 77%, 269% 1%); background-size: 3.55731px 104.059px; animation-duration: 38s;"></div><div class="gradient-container gradient-left" data-x="0.38" data-y="0.6598" data-width="0.2728" data-height="0.3402" style="left: 247.76px; top: 430.19px; width: 177.866px; height: 221.81px; --clip-path: polygon(19% 23%, 100% -5%, 113% 100%, -12% 100%); background-size: 355.731px 221.81px; animation-duration: 52s;"></div><div class="gradient-container gradient-right" data-x="0.6527999999999999" data-y="0.5800000000000001" data-width="0.3472" data-height="0.025199999999999997" style="left: 425.626px; top: 378.16px; width: 226.374px; height: 16.4304px; --clip-path: polygon(-2% 74%, 100% 45%, 100% 85%, -20% 269%); background-size: 452.749px 16.4304px; animation-duration: 88s;"></div><div class="gradient-container gradient-down" data-x="0.6527999999999999" data-y="0.6052000000000001" data-width="0.052079999999999994" data-height="0.22108799999999995" style="left: 425.626px; top: 394.59px; width: 33.9562px; height: 144.149px; --clip-path: polygon(-135% 19%, 205% -13%, 160% 100%, -150% 97%); background-size: 33.9562px 288.299px; animation-duration: 45s;"></div><div class="gradient-container gradient-right" data-x="0.70488" data-y="0.6052000000000001" data-width="0.29512000000000005" data-height="0.22108799999999995" style="left: 459.582px; top: 394.59px; width: 192.418px; height: 144.149px; --clip-path: polygon(19% -13%, 100% -2%, 100% 120%, 11% 100%); background-size: 384.836px 144.149px; animation-duration: 37s;"></div><div class="gradient-container gradient-up" data-x="0.6527999999999999" data-y="0.826288" data-width="0.006944" data-height="0.17371199999999998" style="left: 425.626px; top: 538.74px; width: 4.52749px; height: 113.26px; --clip-path: polygon(-1125% -4%, -651% -27%, 894% 100%, 515% 100%); background-size: 4.52749px 226.52px; animation-duration: 40s;"></div><div class="gradient-container gradient-left" data-x="0.659744" data-y="0.826288" data-width="0.340256" data-height="0.17371199999999998" style="left: 430.153px; top: 538.74px; width: 221.847px; height: 113.26px; --clip-path: polygon(-15% -27%, 100% 26%, 100% 100%, 16% 100%); background-size: 443.694px 113.26px; animation-duration: 96s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#241a17;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#494949;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#83a1cd;--color3-2:#000;--color4-1:#83a1cd;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #241a17; --color2-1: #494949; --color3-1: #83a1cd; --color4-1: #83a1cd;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-left" data-x="0" data-y="0" data-width="0.3864" data-height="0.23" style="left: 0px; top: 0px; width: 141.036px; height: 83.95px; --clip-path: polygon(0% 0%, 101% 0%, 85% 121%, 0% 129%); background-size: 282.072px 83.95px; animation-duration: 97s;"></div><div class="gradient-container gradient-left" data-x="0.3864" data-y="0" data-width="0.1736" data-height="0.0184" style="left: 141.036px; top: 0px; width: 63.364px; height: 6.716px; --clip-path: polygon(1% 0%, 69% 0%, 107% 100%, -32% 100%); background-size: 126.728px 6.716px; animation-duration: 15s;"></div><div class="gradient-container gradient-left" data-x="0.3864" data-y="0.0184" data-width="0.036456" data-height="0.17351200000000003" style="left: 141.036px; top: 6.716px; width: 13.30644px; height: 63.33188px; --clip-path: polygon(-151% 0%, 93% 0%, 36% 103%, 6% 90%); background-size: 26.61288px 63.33188px; animation-duration: 15s;"></div><div class="gradient-container gradient-left" data-x="0.422856" data-y="0.0184" data-width="0.13714400000000002" data-height="0.17351200000000003" style="left: 154.34244px; top: 6.716px; width: 50.05756px; height: 63.33188px; --clip-path: polygon(-2% 0%, 109% 0%, 131% 146%, -17% 103%); background-size: 100.11512px 63.33188px; animation-duration: 86s;"></div><div class="gradient-container gradient-left" data-x="0.3864" data-y="0.19191200000000003" data-width="0.10763199999999999" data-height="0.03808799999999999" style="left: 141.036px; top: 70.04788px; width: 39.28568px; height: 13.90212px; --clip-path: polygon(2% -44%, 144% -112%, 103% -107%, -55% 224%); background-size: 78.57136px 13.90212px; animation-duration: 5s;"></div><div class="gradient-container gradient-left" data-x="0.494032" data-y="0.19191200000000003" data-width="0.06596800000000001" data-height="0.03808799999999999" style="left: 180.32168px; top: 70.04788px; width: 24.07832px; height: 13.90212px; --clip-path: polygon(72% -112%, 163% 207%, -11% -19%, 5% -107%); background-size: 48.15664px 13.90212px; animation-duration: 93s;"></div><div class="gradient-container gradient-down" data-x="0" data-y="0.23" data-width="0.05152" data-height="0.133672" style="left: 0px; top: 83.95px; width: 18.8048px; height: 48.79028px; --clip-path: polygon(0% 50%, 24% -42%, 178% 115%, 0% 133%); background-size: 18.8048px 97.58056px; animation-duration: 68s;"></div><div class="gradient-container gradient-right" data-x="0.05152" data-y="0.23" data-width="0.20608" data-height="0.133672" style="left: 18.8048px; top: 83.95px; width: 75.2192px; height: 48.79028px; --clip-path: polygon(-19% -42%, 132% -21%, 62% 133%, 19% 115%); background-size: 150.4384px 48.79028px; animation-duration: 32s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.36367200000000005" data-width="0.2576" data-height="0.08925840000000002" style="left: 0px; top: 132.74028px; width: 94.024px; height: 32.579316px; --clip-path: polygon(0% 50%, 70% 50%, 126% 108%, 0% 159%); background-size: 188.048px 32.579316px; animation-duration: 43s;"></div><div class="gradient-container gradient-up" data-x="0" data-y="0.45293040000000007" data-width="0.2576" data-height="0.2082696" style="left: 0px; top: 165.319596px; width: 94.024px; height: 76.018404px; --clip-path: polygon(0% 25%, 126% 4%, 117% 104%, 0% 85%); background-size: 94.024px 152.036808px; animation-duration: 98s;"></div><div class="gradient-container gradient-up" data-x="0.2576" data-y="0.23" data-width="0.25704000000000005" data-height="0.103488" style="left: 94.024px; top: 83.95px; width: 93.8196px; height: 37.77312px; --clip-path: polygon(26% -27%, 84% -15%, 95% 111%, 4% 61%); background-size: 93.8196px 75.54624px; animation-duration: 65s;"></div><div class="gradient-container gradient-up" data-x="0.51464" data-y="0.23" data-width="0.04535999999999999" data-height="0.103488" style="left: 187.8436px; top: 83.95px; width: 16.5564px; height: 37.77312px; --clip-path: polygon(-91% -15%, -61% -44%, 190% 107%, -26% 111%); background-size: 16.5564px 75.54624px; animation-duration: 71s;"></div><div class="gradient-container gradient-up" data-x="0.2576" data-y="0.333488" data-width="0.3024" data-height="0.327712" style="left: 94.024px; top: 121.72312px; width: 110.376px; height: 119.61488px; --clip-path: polygon(3% -12%, 113% 2%, 116% 105%, 14% 103%); background-size: 110.376px 239.22976px; animation-duration: 23s;"></div><div class="gradient-container gradient-right" data-x="0" data-y="0.6612" data-width="0.33817056000000006" data-height="0.3388" style="left: 0px; top: 241.338px; width: 123.432254px; height: 123.662px; --clip-path: polygon(0% -9%, 117% -22%, 121% 100%, 0% 100%); background-size: 246.864509px 123.662px; animation-duration: 22s;"></div><div class="gradient-container gradient-right" data-x="0.33817056000000006" data-y="0.6612" data-width="0.08989344000000002" data-height="0.3388" style="left: 123.432254px; top: 241.338px; width: 32.811106px; height: 123.662px; --clip-path: polygon(64% -22%, 100% 18%, 143% 100%, 78% 100%); background-size: 65.622211px 123.662px; animation-duration: 46s;"></div><div class="gradient-container gradient-left" data-x="0.42806400000000006" data-y="0.6612" data-width="0.12073599999999997" data-height="0.108416" style="left: 156.24336px; top: 241.338px; width: 44.06864px; height: 39.57184px; --clip-path: polygon(0% 58%, 41% 67%, 36% 158%, 9% 140%); background-size: 88.13728px 39.57184px; animation-duration: 61s;"></div><div class="gradient-container gradient-up" data-x="0.42806400000000006" data-y="0.7696160000000001" data-width="0.12073599999999997" data-height="0.230384" style="left: 156.24336px; top: 280.90984px; width: 44.06864px; height: 84.09016px; --clip-path: polygon(9% 19%, 36% 28%, 161% 100%, 32% 100%); background-size: 44.06864px 168.18032px; animation-duration: 31s;"></div><div class="gradient-container gradient-left" data-x="0.5488000000000001" data-y="0.6612" data-width="0.011199999999999983" data-height="0.3388" style="left: 200.312px; top: 241.338px; width: 4.088px; height: 123.662px; --clip-path: polygon(-641% 22%, 539% 5%, -15% 100%, 663% 100%); background-size: 8.176px 123.662px; animation-duration: 6s;"></div><div class="gradient-container gradient-down" data-x="0.56" data-y="0" data-width="0.44" data-height="0.25650195000000003" style="left: 204.4px; top: 0px; width: 160.6px; height: 93.623212px; --clip-path: polygon(-12% 0%, 100% 0%, 100% 100%, -11% 97%); background-size: 160.6px 187.246424px; animation-duration: 45s;"></div><div class="gradient-container gradient-up" data-x="0.56" data-y="0.25650195000000003" data-width="0.3344" data-height="0.24644305" style="left: 204.4px; top: 93.623212px; width: 122.056px; height: 89.951713px; --clip-path: polygon(-15% -3%, 107% -16%, 87% 132%, 14% 99%); background-size: 122.056px 179.903426px; animation-duration: 60s;"></div><div class="gradient-container gradient-up" data-x="0.8944000000000001" data-y="0.25650195000000003" data-width="0.10559999999999999" data-height="0.24644305" style="left: 326.456px; top: 93.623212px; width: 38.544px; height: 89.951713px; --clip-path: polygon(21% -16%, 100% 0%, 100% 96%, -40% 132%); background-size: 38.544px 179.903426px; animation-duration: 27s;"></div><div class="gradient-container gradient-left" data-x="0.56" data-y="0.502945" data-width="0.44" data-height="0.321555" style="left: 204.4px; top: 183.574925px; width: 160.6px; height: 117.367575px; --clip-path: polygon(11% -1%, 100% -3%, 100% 109%, 16% 105%); background-size: 321.2px 117.367575px; animation-duration: 26s;"></div><div class="gradient-container gradient-left" data-x="0.56" data-y="0.8245" data-width="0.00200508" data-height="0.025500000000000012" style="left: 204.4px; top: 300.9425px; width: 0.731854px; height: 9.3075px; --clip-path: polygon(3524% 66%, -223% 15%, -3359% -195%, 2290% 239%); background-size: 1.463708px 9.3075px; animation-duration: 23s;"></div><div class="gradient-container gradient-left" data-x="0.5620050799999999" data-y="0.8245" data-width="0.06483091999999999" data-height="0.025500000000000012" style="left: 205.131854px; top: 300.9425px; width: 23.663286px; height: 9.3075px; --clip-path: polygon(-10% 15%, 71% 29%, 41% -114%, -107% -195%); background-size: 47.326572px 9.3075px; animation-duration: 22s;"></div><div class="gradient-container gradient-left" data-x="0.6268360000000001" data-y="0.8245" data-width="0.06330323999999998" data-height="0.025500000000000012" style="left: 228.79514px; top: 300.9425px; width: 23.105683px; height: 9.3075px; --clip-path: polygon(-30% 29%, -16% -283%, 91% 392%, -60% -114%); background-size: 46.211365px 9.3075px; animation-duration: 33s;"></div><div class="gradient-container gradient-right" data-x="0.69013924" data-y="0.8245" data-width="0.006260760000000006" data-height="0.025500000000000012" style="left: 251.900823px; top: 300.9425px; width: 2.285177px; height: 9.3075px; --clip-path: polygon(-1178% -283%, 217% 179%, 659% 99%, -96% 392%); background-size: 4.570355px 9.3075px; animation-duration: 52s;"></div><div class="gradient-container gradient-up" data-x="0.6964" data-y="0.8245" data-width="0.012143999999999999" data-height="0.02065500000000001" style="left: 254.186px; top: 300.9425px; width: 4.43256px; height: 7.539075px; --clip-path: polygon(60% 221%, -490% 74%, -149% 256%, 652% 483%); background-size: 4.43256px 15.07815px; animation-duration: 65s;"></div><div class="gradient-container gradient-right" data-x="0.6964" data-y="0.8451550000000001" data-width="0.012143999999999999" data-height="0.004845000000000001" style="left: 254.186px; top: 308.481575px; width: 4.43256px; height: 1.768425px; --clip-path: polygon(652% 1633%, -149% 667%, 288% 1319%, 288% 95%); background-size: 8.86512px 1.768425px; animation-duration: 34s;"></div><div class="gradient-container gradient-right" data-x="0.708544" data-y="0.8245" data-width="0.291456" data-height="0.025500000000000012" style="left: 258.61856px; top: 300.9425px; width: 106.38144px; height: 9.3075px; --clip-path: polygon(-25% 60%, 100% 117%, 100% -64%, 8% 332%); background-size: 212.76288px 9.3075px; animation-duration: 61s;"></div><div class="gradient-container gradient-left" data-x="0.56" data-y="0.85" data-width="0.022792" data-height="0.0135" style="left: 204.4px; top: 310.25px; width: 8.31908px; height: 4.9275px; --clip-path: polygon(201% 263%, 383% 476%, 173% -55%, 84% 202%); background-size: 16.63816px 4.9275px; animation-duration: 22s;"></div><div class="gradient-container gradient-right" data-x="0.56" data-y="0.8635" data-width="0.022792" data-height="0.13649999999999998" style="left: 204.4px; top: 315.1775px; width: 8.31908px; height: 49.8225px; --clip-path: polygon(84% 10%, 173% -15%, -223% 100%, -56% 100%); background-size: 16.63816px 49.8225px; animation-duration: 22s;"></div><div class="gradient-container gradient-up" data-x="0.5827920000000001" data-y="0.85" data-width="0.30280799999999997" data-height="0.15" style="left: 212.71908px; top: 310.25px; width: 110.52492px; height: 54.75px; --clip-path: polygon(21% 43%, 118% 22%, 77% 100%, -24% 100%); background-size: 110.52492px 109.5px; animation-duration: 28s;"></div><div class="gradient-container gradient-right" data-x="0.8856" data-y="0.85" data-width="0.08808799999999999" data-height="0.08262" style="left: 323.244px; top: 310.25px; width: 32.15212px; height: 30.1563px; --clip-path: polygon(63% 41%, 100% 42%, 100% 194%, 80% 161%); background-size: 64.30424px 30.1563px; animation-duration: 11s;"></div><div class="gradient-container gradient-down" data-x="0.8856" data-y="0.93262" data-width="0.08808799999999999" data-height="0.019379999999999998" style="left: 323.244px; top: 340.4063px; width: 32.15212px; height: 7.0737px; --clip-path: polygon(80% 262%, 100% 400%, 100% -20%, 29% -264%); background-size: 32.15212px 14.1474px; animation-duration: 58s;"></div><div class="gradient-container gradient-up" data-x="0.973688" data-y="0.85" data-width="0.02631200000000001" data-height="0.102" style="left: 355.39612px; top: 310.25px; width: 9.60388px; height: 37.23px; --clip-path: polygon(0% 34%, 100% -41%, 100% 158%, 0% 77%); background-size: 9.60388px 74.46px; animation-duration: 49s;"></div><div class="gradient-container gradient-right" data-x="0.8856" data-y="0.9520000000000001" data-width="0.030888" data-height="0.04800000000000001" style="left: 323.244px; top: 347.48px; width: 11.27412px; height: 17.52px; --clip-path: polygon(83% -147%, -125% 52%, 200% 100%, -228% 100%); background-size: 22.54824px 17.52px; animation-duration: 65s;"></div><div class="gradient-container gradient-right" data-x="0.9164880000000001" data-y="0.9520000000000001" data-width="0.083512" data-height="0.04800000000000001" style="left: 334.51812px; top: 347.48px; width: 30.48188px; height: 17.52px; --clip-path: polygon(-83% 52%, 100% 124%, 100% 100%, 37% 100%); background-size: 60.96376px 17.52px; animation-duration: 75s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#7200ff;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#00103f;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#1d1d1d;--color3-2:#000;--color4-1:#00ffea;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #7200ff; --color2-1: #00103f; --color3-1: #1d1d1d; --color4-1: #00ffea;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-left" data-x="0" data-y="0" data-width="0.1" data-height="0.75" style="left: 0px; top: 0px; width: 36.5px; height: 273.75px; --clip-path: polygon(0% 0%, 71% 0%, 131% 110%, 0% 96%); background-size: 73px 273.75px; animation-duration: 55s;"></div><div class="gradient-container gradient-right" data-x="0" data-y="0.75" data-width="0.1" data-height="0.25" style="left: 0px; top: 273.75px; width: 36.5px; height: 91.25px; --clip-path: polygon(0% -12%, 131% 31%, 130% 100%, 0% 100%); background-size: 73px 91.25px; animation-duration: 56s;"></div><div class="gradient-container gradient-up" data-x="0.1" data-y="0" data-width="0.1021122" data-height="0.1081" style="left: 36.5px; top: 0px; width: 37.270953px; height: 39.4565px; --clip-path: polygon(-28% 0%, 123% 0%, 109% 127%, -8% 156%); background-size: 37.270953px 78.913px; animation-duration: 49s;"></div><div class="gradient-container gradient-down" data-x="0.1" data-y="0.1081" data-width="0.1021122" data-height="0.12190000000000001" style="left: 36.5px; top: 39.4565px; width: 37.270953px; height: 44.4935px; --clip-path: polygon(-8% 50%, 109% 24%, 89% 140%, 26% 136%); background-size: 37.270953px 88.987px; animation-duration: 93s;"></div><div class="gradient-container gradient-left" data-x="0.20211219999999996" data-y="0" data-width="0.19821780000000003" data-height="0.23" style="left: 73.770953px; top: 0px; width: 72.349497px; height: 83.95px; --clip-path: polygon(12% 0%, 130% 0%, 113% 80%, -6% 121%); background-size: 144.698994px 83.95px; animation-duration: 10s;"></div><div class="gradient-container gradient-down" data-x="0.40033" data-y="0" data-width="0.12267000000000002" data-height="0.1978" style="left: 146.12045px; top: 0px; width: 44.77455px; height: 72.197px; --clip-path: polygon(48% 0%, 139% 0%, 121% 135%, 13% 129%); background-size: 44.77455px 144.394px; animation-duration: 21s;"></div><div class="gradient-container gradient-up" data-x="0.40033" data-y="0.1978" data-width="0.09322920000000003" data-height="0.0322" style="left: 146.12045px; top: 72.197px; width: 34.028658px; height: 11.753px; --clip-path: polygon(17% 176%, 114% -75%, 129% -137%, 29% -44%); background-size: 34.028658px 23.506px; animation-duration: 22s;"></div><div class="gradient-container gradient-up" data-x="0.49355920000000003" data-y="0.1978" data-width="0.029440799999999993" data-height="0.0322" style="left: 180.149108px; top: 72.197px; width: 10.745892px; height: 11.753px; --clip-path: polygon(43% -75%, 188% 217%, 27% 345%, 91% -137%); background-size: 10.745892px 23.506px; animation-duration: 96s;"></div><div class="gradient-container gradient-right" data-x="0.523" data-y="0" data-width="0.477" data-height="0.23" style="left: 190.895px; top: 0px; width: 174.105px; height: 83.95px; --clip-path: polygon(10% 0%, 100% 0%, 100% 133%, -4% 134%); background-size: 348.21px 83.95px; animation-duration: 49s;"></div><div class="gradient-container gradient-down" data-x="0.1" data-y="0.23" data-width="0.9" data-height="0.77" style="left: 36.5px; top: 83.95px; width: 328.5px; height: 281.05px; --clip-path: polygon(3% 6%, 100% 10%, 100% 100%, 3% 100%); background-size: 328.5px 562.1px; animation-duration: 79s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#B4ff00;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#FF00CC;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#FFFFFF;--color3-2:#000;--color4-1:#783f7d;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #B4ff00; --color2-1: #FF00CC; --color3-1: #FFFFFF; --color4-1: #783f7d;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-left" data-x="0" data-y="0" data-width="0.018799999999999997" data-height="0.18094670999999998" style="left: 0px; top: 0px; width: 7.52px; height: 72.378684px; --clip-path: polygon(0% 0%, 100% 0%, 100% 76%, 0% 112%); background-size: 15.04px 72.378684px; animation-duration: 48s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.18094670999999998" data-width="0.018799999999999997" data-height="0.20404629" style="left: 0px; top: 72.378684px; width: 7.52px; height: 81.618516px; --clip-path: polygon(0% 11%, 100% -21%, 100% 130%, 0% 92%); background-size: 15.04px 81.618516px; animation-duration: 54s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.384993" data-width="0.018799999999999997" data-height="0.011906999999999996" style="left: 0px; top: 153.9972px; width: 7.52px; height: 4.7628px; --clip-path: polygon(0% -133%, 100% 508%, 100% 204%, 0% -365%); background-size: 15.04px 4.7628px; animation-duration: 3s;"></div><div class="gradient-container gradient-up" data-x="0" data-y="0.3969" data-width="0.018799999999999997" data-height="0.03932544000000001" style="left: 0px; top: 158.76px; width: 7.52px; height: 15.730176px; --clip-path: polygon(0% -141%, 100% 32%, 100% -10%, 0% 156%); background-size: 7.52px 31.460352px; animation-duration: 33s;"></div><div class="gradient-container gradient-up" data-x="0" data-y="0.43622543999999996" data-width="0.018799999999999997" data-height="0.05005056000000001" style="left: 0px; top: 174.490176px; width: 7.52px; height: 20.020224px; --clip-path: polygon(0% 44%, 100% -86%, 100% 11%, 0% 197%); background-size: 7.52px 40.040448px; animation-duration: 94s;"></div><div class="gradient-container gradient-up" data-x="0" data-y="0.486276" data-width="0.009212" data-height="0.0037240000000000073" style="left: 0px; top: 194.5104px; width: 3.6848px; height: 1.4896px; --clip-path: polygon(0% 1310%, 100% -95%, 100% -1316%, 0% 2112%); background-size: 3.6848px 2.9792px; animation-duration: 100s;"></div><div class="gradient-container gradient-left" data-x="0.009212" data-y="0.486276" data-width="0.009588" data-height="0.0037240000000000073" style="left: 3.6848px; top: 194.5104px; width: 3.8352px; height: 1.4896px; --clip-path: polygon(0% -95%, 100% -1194%, 100% -1333%, 0% -1316%); background-size: 7.6704px 1.4896px; animation-duration: 8s;"></div><div class="gradient-container gradient-right" data-x="0.018799999999999997" data-y="0" data-width="0.9212" data-height="0.49" style="left: 7.52px; top: 0px; width: 368.48px; height: 196px; --clip-path: polygon(0% 0%, 101% 0%, 104% 85%, 0% 89%); background-size: 736.96px 196px; animation-duration: 89s;"></div><div class="gradient-container gradient-right" data-x="0" data-y="0.49" data-width="0.94" data-height="0.51" style="left: 0px; top: 196px; width: 376px; height: 204px; --clip-path: polygon(0% 15%, 104% -14%, 93% 100%, 0% 100%); background-size: 752px 204px; animation-duration: 1s;"></div><div class="gradient-container gradient-down" data-x="0.94" data-y="0" data-width="0.06" data-height="0.92" style="left: 376px; top: 0px; width: 24px; height: 368px; --clip-path: polygon(10% 0%, 100% 0%, 100% 106%, 102% 104%); background-size: 24px 736px; animation-duration: 92s;"></div><div class="gradient-container gradient-left" data-x="0.94" data-y="0.92" data-width="0.06" data-height="0.0416" style="left: 376px; top: 368px; width: 24px; height: 16.64px; --clip-path: polygon(102% 94%, 100% 142%, 100% 39%, -128% 287%); background-size: 48px 16.64px; animation-duration: 18s;"></div><div class="gradient-container gradient-left" data-x="0.94" data-y="0.9616" data-width="0.024" data-height="0.009216" style="left: 376px; top: 384.64px; width: 9.6px; height: 3.6864px; --clip-path: polygon(-321% 846%, 389% -714%, 167% -386%, -159% -748%); background-size: 19.2px 3.6864px; animation-duration: 78s;"></div><div class="gradient-container gradient-up" data-x="0.94" data-y="0.9708159999999999" data-width="0.024" data-height="0.029184" style="left: 376px; top: 388.3264px; width: 9.6px; height: 11.6736px; --clip-path: polygon(-159% -268%, 167% -153%, 9% 100%, -268% 100%); background-size: 9.6px 23.3472px; animation-duration: 17s;"></div><div class="gradient-container gradient-right" data-x="0.9640000000000001" data-y="0.9616" data-width="0.036000000000000004" data-height="0.0384" style="left: 385.6px; top: 384.64px; width: 14.4px; height: 15.36px; --clip-path: polygon(193% -171%, 100% -66%, 100% 100%, -60% 100%); background-size: 28.8px 15.36px; animation-duration: 47s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#FF00CC;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#ffcc00;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#00103f;--color3-2:#000;--color4-1:#00ffea;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #FF00CC; --color2-1: #ffcc00; --color3-1: #00103f; --color4-1: #00ffea;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-up" data-x="0" data-y="0" data-width="0.24960000000000002" data-height="0.08" style="left: 0px; top: 0px; width: 88.8576px; height: 28.48px; --clip-path: polygon(0% 0%, 117% 0%, 113% 173%, 0% 174%); background-size: 88.8576px 56.96px; animation-duration: 78s;"></div><div class="gradient-container gradient-left" data-x="0.24960000000000002" data-y="0" data-width="0.07285247999999998" data-height="0.08" style="left: 88.8576px; top: 0px; width: 25.9355px; height: 28.48px; --clip-path: polygon(58% 0%, 1% 0%, 125% 136%, 46% 173%); background-size: 51.871px 28.48px; animation-duration: 95s;"></div><div class="gradient-container gradient-up" data-x="0.32245248" data-y="0" data-width="0.14141952" data-height="0.08" style="left: 114.793px; top: 0px; width: 50.3453px; height: 28.48px; --clip-path: polygon(-51% 0%, 106% 0%, 131% 186%, 13% 136%); background-size: 50.3453px 56.96px; animation-duration: 1s;"></div><div class="gradient-container gradient-left" data-x="0.463872" data-y="0" data-width="0.016128000000000003" data-height="0.0712" style="left: 165.138px; top: 0px; width: 5.74157px; height: 25.3472px; --clip-path: polygon(50% 0%, 548% 0%, 518% 150%, -269% 96%); background-size: 11.4831px 25.3472px; animation-duration: 34s;"></div><div class="gradient-container gradient-up" data-x="0.463872" data-y="0.0712" data-width="0.016128000000000003" data-height="0.008799999999999999" style="left: 165.138px; top: 25.3472px; width: 5.74157px; height: 3.1328px; --clip-path: polygon(-269% -36%, 518% 402%, -199% 80%, 271% 878%); background-size: 5.74157px 6.2656px; animation-duration: 73s;"></div><div class="gradient-container gradient-right" data-x="0.48" data-y="0" data-width="0.48" data-height="0.08" style="left: 170.88px; top: 0px; width: 170.88px; height: 28.48px; --clip-path: polygon(15% 0%, 115% 0%, 104% 182%, -10% 98%); background-size: 341.76px 28.48px; animation-duration: 87s;"></div><div class="gradient-container gradient-left" data-x="0.96" data-y="0" data-width="0.04000000000000003" data-height="0.08" style="left: 341.76px; top: 0px; width: 14.24px; height: 28.48px; --clip-path: polygon(186% 0%, 100% 0%, 100% 143%, 50% 182%); background-size: 28.48px 28.48px; animation-duration: 85s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.08" data-width="0.78" data-height="0.9199999999999999" style="left: 0px; top: 28.48px; width: 277.68px; height: 327.52px; --clip-path: polygon(0% 6%, 103% 8%, 106% 100%, 0% 100%); background-size: 555.36px 327.52px; animation-duration: 76s;"></div><div class="gradient-container gradient-down" data-x="0.78" data-y="0.08" data-width="0.21999999999999997" data-height="0.9199999999999999" style="left: 277.68px; top: 28.48px; width: 78.32px; height: 327.52px; --clip-path: polygon(11% 8%, 100% 4%, 100% 100%, 23% 100%); background-size: 78.32px 655.04px; animation-duration: 57s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>smear</title><style> * { margin: 0; padding: 0; box-sizing: border-box; } body, html { width: 100%; height: 100%; overflow: hidden; background: #000; } smear-partition { display: block; width: 100%; height: 100%; position: relative; } smear-canvas { display: block; position: absolute; } smear-canvas canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: -moz-crisp-edges; image-rendering: crisp-edges; -ms-interpolation-mode: nearest-neighbor; } .smear-container { position: absolute; overflow: hidden; } .smear-container canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; } </style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="smear-container" data-x="0" data-y="0" data-width="0.07829775280898876" data-height="0.16195870786516853" data-start-edge="bottom" data-speed="49" data-source-interval="1455" data-pixel-size="5" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="stripes" style="left: 0px; top: 0px; width: 27.874px; height: 57.6573px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.16195870786516853" data-width="0.07829775280898876" data-height="0.11285308988764045" data-start-edge="left" data-speed="82" data-source-interval="1965" data-pixel-size="6" data-color-fg="#FF0000" data-color-bg="#0000FF" data-source-type="stripes" style="left: 0px; top: 57.6573px; width: 27.874px; height: 40.1757px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.274811797752809" data-width="0.07829775280898876" data-height="0.14082949438202247" data-start-edge="top" data-speed="63" data-source-interval="1861" data-pixel-size="6" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="stripes" style="left: 0px; top: 97.833px; width: 27.874px; height: 50.1353px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.4156404494382022" data-width="0.07829775280898876" data-height="0.08155308988764046" data-start-edge="top" data-speed="93" data-source-interval="1812" data-pixel-size="5" data-color-fg="#FFFF00" data-color-bg="#FF0000" data-source-type="stripes" style="left: 0px; top: 147.968px; width: 27.874px; height: 29.0329px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.49719382022471914" data-width="0.07829775280898876" data-height="0.1457623595505618" data-start-edge="right" data-speed="40" data-source-interval="1475" data-pixel-size="2" data-color-fg="#333333" data-color-bg="#000000" data-source-type="stripes" style="left: 0px; top: 177.001px; width: 27.874px; height: 51.8914px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.6429578651685394" data-width="0.07829775280898876" data-height="0.08855393258426966" data-start-edge="right" data-speed="26" data-source-interval="1473" data-pixel-size="3" data-color-fg="#FFFFFF" data-color-bg="#CCCCCC" data-source-type="stripes" style="left: 0px; top: 228.893px; width: 27.874px; height: 31.5252px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.7315112359550562" data-width="0.07829775280898876" data-height="0.09943174157303371" data-start-edge="bottom" data-speed="46" data-source-interval="1115" data-pixel-size="1" data-color-fg="#0000FF" data-color-bg="#666666" data-source-type="stripes" style="left: 0px; top: 260.418px; width: 27.874px; height: 35.3977px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.830943820224719" data-width="0.07829775280898876" data-height="0.0351" data-start-edge="bottom" data-speed="94" data-source-interval="1708" data-pixel-size="2" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="stripes" style="left: 0px; top: 295.816px; width: 27.874px; height: 12.4956px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.8660421348314606" data-width="0.07829775280898876" data-height="0.13370758426966292" data-start-edge="top" data-speed="73" data-source-interval="1542" data-pixel-size="2" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="stripes" style="left: 0px; top: 308.311px; width: 27.874px; height: 47.5999px;"><canvas></canvas></div><div class="smear-container" data-x="0.07829775280898876" data-y="0" data-width="0.27513455056179775" data-height="0.10600421348314606" data-start-edge="right" data-speed="68" data-source-interval="1098" data-pixel-size="6" data-color-fg="#87CEEB" data-color-bg="#000000" data-source-type="stripes" style="left: 27.874px; top: 0px; width: 97.9479px; height: 37.7375px;"><canvas></canvas></div><div class="smear-container" data-x="0.07829775280898876" data-y="0.10600421348314606" data-width="0.27513455056179775" data-height="0.1522629213483146" data-start-edge="bottom" data-speed="65" data-source-interval="531" data-pixel-size="5" data-color-fg="#87CEEB" data-color-bg="#000000" data-source-type="stripes" style="left: 27.874px; top: 37.7375px; width: 97.9479px; height: 54.2056px;"><canvas></canvas></div><div class="smear-container" data-x="0.07829775280898876" data-y="0.2582671348314607" data-width="0.27513455056179775" data-height="0.29150561797752805" data-start-edge="top" data-speed="83" data-source-interval="1559" data-pixel-size="2" data-color-fg="#0000FF" data-color-bg="#666666" data-source-type="stripes" style="left: 27.874px; top: 91.9431px; width: 97.9479px; height: 103.776px;"><canvas></canvas></div><div class="smear-container" data-x="0.07829775280898876" data-y="0.5497752808988764" data-width="0.27513455056179775" data-height="0.44997752808988767" data-start-edge="bottom" data-speed="95" data-source-interval="910" data-pixel-size="2" data-color-fg="#FF0000" data-color-bg="#0000FF" data-source-type="stripes" style="left: 27.874px; top: 195.72px; width: 97.9479px; height: 160.192px;"><canvas></canvas></div><div class="smear-container" data-x="0.35343258426966295" data-y="0" data-width="0.2969241573033708" data-height="0.13758651685393258" data-start-edge="top" data-speed="54" data-source-interval="900" data-pixel-size="5" data-color-fg="#0000FF" data-color-bg="#FF69B4" data-source-type="stripes" style="left: 125.822px; top: 0px; width: 105.705px; height: 48.9808px;"><canvas></canvas></div><div class="smear-container" data-x="0.35343258426966295" data-y="0.13758651685393258" data-width="0.2969241573033708" data-height="0.11286994382022472" data-start-edge="right" data-speed="45" data-source-interval="1883" data-pixel-size="5" data-color-fg="#0000FF" data-color-bg="#000000" data-source-type="stripes" style="left: 125.822px; top: 48.9808px; width: 105.705px; height: 40.1817px;"><canvas></canvas></div><div class="smear-container" data-x="0.35343258426966295" data-y="0.2504564606741573" data-width="0.2969241573033708" data-height="0.1602171348314607" data-start-edge="right" data-speed="28" data-source-interval="1483" data-pixel-size="1" data-color-fg="#0000FF" data-color-bg="#666666" data-source-type="stripes" style="left: 125.822px; top: 89.1625px; width: 105.705px; height: 57.0373px;"><canvas></canvas></div><div class="smear-container" data-x="0.35343258426966295" data-y="0.41067415730337076" data-width="0.2969241573033708" data-height="0.12004466292134831" data-start-edge="bottom" data-speed="77" data-source-interval="1304" data-pixel-size="3" data-color-fg="#FFFFFF" data-color-bg="#FF00CC" data-source-type="stripes" style="left: 125.822px; top: 146.2px; width: 105.705px; height: 42.7359px;"><canvas></canvas></div><div class="smear-container" data-x="0.35343258426966295" data-y="0.5307191011235955" data-width="0.2969241573033708" data-height="0.11933511235955056" data-start-edge="right" data-speed="35" data-source-interval="694" data-pixel-size="2" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="stripes" style="left: 125.822px; top: 188.936px; width: 105.705px; height: 42.4833px;"><canvas></canvas></div><div class="smear-container" data-x="0.35343258426966295" data-y="0.6500533707865169" data-width="0.2969241573033708" data-height="0.11620421348314607" data-start-edge="right" data-speed="30" data-source-interval="1762" data-pixel-size="2" data-color-fg="#FFFF00" data-color-bg="#FF0000" data-source-type="stripes" style="left: 125.822px; top: 231.419px; width: 105.705px; height: 41.3687px;"><canvas></canvas></div><div class="smear-container" data-x="0.35343258426966295" data-y="0.7662584269662922" data-width="0.2969241573033708" data-height="0.026564466292134836" data-start-edge="bottom" data-speed="61" data-source-interval="1862" data-pixel-size="4" data-color-fg="#0000FF" data-color-bg="#000000" data-source-type="stripes" style="left: 125.822px; top: 272.788px; width: 105.705px; height: 9.45695px;"><canvas></canvas></div><div class="smear-container" data-x="0.35343258426966295" data-y="0.7928230337078652" data-width="0.2969241573033708" data-height="0.0771685393258427" data-start-edge="bottom" data-speed="69" data-source-interval="552" data-pixel-size="1" data-color-fg="#FFFFFF" data-color-bg="#CCCCCC" data-source-type="stripes" style="left: 125.822px; top: 282.245px; width: 105.705px; height: 27.472px;"><canvas></canvas></div><div class="smear-container" data-x="0.35343258426966295" data-y="0.8699915730337078" data-width="0.2969241573033708" data-height="0.09970168539325842" data-start-edge="right" data-speed="39" data-source-interval="904" data-pixel-size="1" data-color-fg="#FF0000" data-color-bg="#0000FF" data-source-type="stripes" style="left: 125.822px; top: 309.717px; width: 105.705px; height: 35.4938px;"><canvas></canvas></div><div class="smear-container" data-x="0.35343258426966295" data-y="0.969691011235955" data-width="0.2969241573033708" data-height="0.03005814606741573" data-start-edge="top" data-speed="59" data-source-interval="1822" data-pixel-size="3" data-color-fg="#0000FF" data-color-bg="#FF69B4" data-source-type="stripes" style="left: 125.822px; top: 345.21px; width: 105.705px; height: 10.7007px;"><canvas></canvas></div><div class="smear-container" data-x="0.6503567415730337" data-y="0" data-width="0.04349634831460674" data-height="0.16559634831460673" data-start-edge="bottom" data-speed="87" data-source-interval="1439" data-pixel-size="3" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="stripes" style="left: 231.527px; top: 0px; width: 15.4847px; height: 58.9523px;"><canvas></canvas></div><div class="smear-container" data-x="0.6503567415730337" data-y="0.16559634831460673" data-width="0.04349634831460674" data-height="0.171611797752809" data-start-edge="bottom" data-speed="28" data-source-interval="1258" data-pixel-size="4" data-color-fg="#0000FF" data-color-bg="#000000" data-source-type="stripes" style="left: 231.527px; top: 58.9523px; width: 15.4847px; height: 61.0938px;"><canvas></canvas></div><div class="smear-container" data-x="0.6503567415730337" data-y="0.33720786516853934" data-width="0.04349634831460674" data-height="0.10875224719101124" data-start-edge="left" data-speed="34" data-source-interval="683" data-pixel-size="5" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="stripes" style="left: 231.527px; top: 120.046px; width: 15.4847px; height: 38.7158px;"><canvas></canvas></div><div class="smear-container" data-x="0.6503567415730337" data-y="0.4459606741573034" data-width="0.04349634831460674" data-height="0.21701095505617976" data-start-edge="left" data-speed="27" data-source-interval="642" data-pixel-size="5" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="stripes" style="left: 231.527px; top: 158.762px; width: 15.4847px; height: 77.2559px;"><canvas></canvas></div><div class="smear-container" data-x="0.6503567415730337" data-y="0.6629719101123596" data-width="0.04349634831460674" data-height="0.07802191011235955" data-start-edge="bottom" data-speed="86" data-source-interval="1978" data-pixel-size="3" data-color-fg="#800080" data-color-bg="#000000" data-source-type="stripes" style="left: 231.527px; top: 236.018px; width: 15.4847px; height: 27.7758px;"><canvas></canvas></div><div class="smear-container" data-x="0.6503567415730337" data-y="0.7409943820224718" data-width="0.04349634831460674" data-height="0.105275" data-start-edge="bottom" data-speed="67" data-source-interval="1692" data-pixel-size="1" data-color-fg="#FFFF00" data-color-bg="#FF0000" data-source-type="stripes" style="left: 231.527px; top: 263.794px; width: 15.4847px; height: 37.4779px;"><canvas></canvas></div><div class="smear-container" data-x="0.6503567415730337" data-y="0.8462668539325843" data-width="0.04349634831460674" data-height="0.1534823033707865" data-start-edge="left" data-speed="71" data-source-interval="1872" data-pixel-size="6" data-color-fg="#87CEEB" data-color-bg="#000000" data-source-type="stripes" style="left: 231.527px; top: 301.271px; width: 15.4847px; height: 54.6397px;"><canvas></canvas></div><div class="smear-container" data-x="0.6938539325842696" data-y="0" data-width="0.06997612359550562" data-height="0.15240758426966292" data-start-edge="right" data-speed="60" data-source-interval="1389" data-pixel-size="6" data-color-fg="#FFFF00" data-color-bg="#FF0000" data-source-type="stripes" style="left: 247.012px; top: 0px; width: 24.9115px; height: 54.2571px;"><canvas></canvas></div><div class="smear-container" data-x="0.6938539325842696" data-y="0.15240758426966292" data-width="0.06997612359550562" data-height="0.08277949438202248" data-start-edge="bottom" data-speed="76" data-source-interval="559" data-pixel-size="1" data-color-fg="#87CEEB" data-color-bg="#000000" data-source-type="stripes" style="left: 247.012px; top: 54.2571px; width: 24.9115px; height: 29.4695px;"><canvas></canvas></div><div class="smear-container" data-x="0.6938539325842696" data-y="0.23518679775280898" data-width="0.06997612359550562" data-height="0.12816882022471912" data-start-edge="top" data-speed="67" data-source-interval="1745" data-pixel-size="5" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="stripes" style="left: 247.012px; top: 83.7265px; width: 24.9115px; height: 45.6281px;"><canvas></canvas></div><div class="smear-container" data-x="0.6938539325842696" data-y="0.36335674157303366" data-width="0.06997612359550562" data-height="0.036235955056179776" data-start-edge="left" data-speed="49" data-source-interval="1889" data-pixel-size="1" data-color-fg="#87CEEB" data-color-bg="#808080" data-source-type="stripes" style="left: 247.012px; top: 129.355px; width: 24.9115px; height: 12.9px;"><canvas></canvas></div><div class="smear-container" data-x="0.6938539325842696" data-y="0.3995926966292135" data-width="0.06997612359550562" data-height="0.12175168539325844" data-start-edge="left" data-speed="33" data-source-interval="1480" data-pixel-size="6" data-color-fg="#333333" data-color-bg="#000000" data-source-type="stripes" style="left: 247.012px; top: 142.255px; width: 24.9115px; height: 43.3436px;"><canvas></canvas></div><div class="smear-container" data-x="0.6938539325842696" data-y="0.5213426966292135" data-width="0.06997612359550562" data-height="0.16262191011235955" data-start-edge="bottom" data-speed="98" data-source-interval="1996" data-pixel-size="3" data-color-fg="#FF8000" data-color-bg="#000000" data-source-type="stripes" style="left: 247.012px; top: 185.598px; width: 24.9115px; height: 57.8934px;"><canvas></canvas></div><div class="smear-container" data-x="0.6938539325842696" data-y="0.6839662921348314" data-width="0.06997612359550562" data-height="0.15213426966292135" data-start-edge="bottom" data-speed="33" data-source-interval="1111" data-pixel-size="5" data-color-fg="#87CEEB" data-color-bg="#808080" data-source-type="stripes" style="left: 247.012px; top: 243.492px; width: 24.9115px; height: 54.1598px;"><canvas></canvas></div><div class="smear-container" data-x="0.6938539325842696" data-y="0.8360983146067416" data-width="0.06997612359550562" data-height="0.0304626404494382" data-start-edge="top" data-speed="68" data-source-interval="897" data-pixel-size="5" data-color-fg="#87CEEB" data-color-bg="#808080" data-source-type="stripes" style="left: 247.012px; top: 297.651px; width: 24.9115px; height: 10.8447px;"><canvas></canvas></div><div class="smear-container" data-x="0.6938539325842696" data-y="0.866561797752809" data-width="0.06997612359550562" data-height="0.08370224719101123" data-start-edge="bottom" data-speed="47" data-source-interval="1878" data-pixel-size="4" data-color-fg="#333333" data-color-bg="#000000" data-source-type="stripes" style="left: 247.012px; top: 308.496px; width: 24.9115px; height: 29.798px;"><canvas></canvas></div><div class="smear-container" data-x="0.6938539325842696" data-y="0.9502640449438202" data-width="0.06997612359550562" data-height="0.04948595505617978" data-start-edge="left" data-speed="45" data-source-interval="1223" data-pixel-size="4" data-color-fg="#FFFFFF" data-color-bg="#FF00CC" data-source-type="stripes" style="left: 247.012px; top: 338.294px; width: 24.9115px; height: 17.617px;"><canvas></canvas></div><div class="smear-container" data-x="0.7638286516853933" data-y="0" data-width="0.23592078651685391" data-height="0.05182191011235955" data-start-edge="right" data-speed="54" data-source-interval="1981" data-pixel-size="1" data-color-fg="#FFFF00" data-color-bg="#FF0000" data-source-type="stripes" style="left: 271.923px; top: 0px; width: 83.9878px; height: 18.4486px;"><canvas></canvas></div><div class="smear-container" data-x="0.7638286516853933" data-y="0.05182191011235955" data-width="0.23592078651685391" data-height="0.09329606741573034" data-start-edge="top" data-speed="47" data-source-interval="1088" data-pixel-size="2" data-color-fg="#FF0000" data-color-bg="#0000FF" data-source-type="stripes" style="left: 271.923px; top: 18.4486px; width: 83.9878px; height: 33.2134px;"><canvas></canvas></div><div class="smear-container" data-x="0.7638286516853933" data-y="0.1451179775280899" data-width="0.23592078651685391" data-height="0.021247780898876405" data-start-edge="bottom" data-speed="87" data-source-interval="1511" data-pixel-size="6" data-color-fg="#FF0000" data-color-bg="#0000FF" data-source-type="stripes" style="left: 271.923px; top: 51.662px; width: 83.9878px; height: 7.56421px;"><canvas></canvas></div><div class="smear-container" data-x="0.7638286516853933" data-y="0.16636573033707866" data-width="0.23592078651685391" data-height="0.01285426966292135" data-start-edge="right" data-speed="61" data-source-interval="1528" data-pixel-size="4" data-color-fg="#333333" data-color-bg="#000000" data-source-type="stripes" style="left: 271.923px; top: 59.2262px; width: 83.9878px; height: 4.57612px;"><canvas></canvas></div><div class="smear-container" data-x="0.7638286516853933" data-y="0.17921994382022471" data-width="0.23592078651685391" data-height="0.053204775280898876" data-start-edge="top" data-speed="91" data-source-interval="1582" data-pixel-size="5" data-color-fg="#FFFFFF" data-color-bg="#CCCCCC" data-source-type="stripes" style="left: 271.923px; top: 63.8023px; width: 83.9878px; height: 18.9409px;"><canvas></canvas></div><div class="smear-container" data-x="0.7638286516853933" data-y="0.2324247191011236" data-width="0.23592078651685391" data-height="0.047878089887640446" data-start-edge="top" data-speed="67" data-source-interval="1456" data-pixel-size="5" data-color-fg="#FFFFFF" data-color-bg="#FF00CC" data-source-type="stripes" style="left: 271.923px; top: 82.7432px; width: 83.9878px; height: 17.0446px;"><canvas></canvas></div><div class="smear-container" data-x="0.7638286516853933" data-y="0.28030280898876403" data-width="0.23592078651685391" data-height="0.04707977528089888" data-start-edge="bottom" data-speed="30" data-source-interval="1340" data-pixel-size="6" data-color-fg="#FF0000" data-color-bg="#FFFFFF" data-source-type="stripes" style="left: 271.923px; top: 99.7878px; width: 83.9878px; height: 16.7604px;"><canvas></canvas></div><div class="smear-container" data-x="0.7638286516853933" data-y="0.3273820224719101" data-width="0.23592078651685391" data-height="0.026528202247191008" data-start-edge="right" data-speed="88" data-source-interval="1512" data-pixel-size="2" data-color-fg="#0000FF" data-color-bg="#FF69B4" data-source-type="stripes" style="left: 271.923px; top: 116.548px; width: 83.9878px; height: 9.44404px;"><canvas></canvas></div><div class="smear-container" data-x="0.7638286516853933" data-y="0.35391011235955055" data-width="0.23592078651685391" data-height="0.10257528089887641" data-start-edge="left" data-speed="25" data-source-interval="507" data-pixel-size="5" data-color-fg="#FF0000" data-color-bg="#0000FF" data-source-type="stripes" style="left: 271.923px; top: 125.992px; width: 83.9878px; height: 36.5168px;"><canvas></canvas></div><div class="smear-container" data-x="0.7638286516853933" data-y="0.4564859550561797" data-width="0.23592078651685391" data-height="0.033535393258426964" data-start-edge="left" data-speed="72" data-source-interval="1791" data-pixel-size="4" data-color-fg="#87CEEB" data-color-bg="#808080" data-source-type="stripes" style="left: 271.923px; top: 162.509px; width: 83.9878px; height: 11.9386px;"><canvas></canvas></div><div class="smear-container" data-x="0.7638286516853933" data-y="0.4900224719101124" data-width="0.23592078651685391" data-height="0.023250674157303374" data-start-edge="top" data-speed="40" data-source-interval="1150" data-pixel-size="3" data-color-fg="#FF8000" data-color-bg="#000000" data-source-type="stripes" style="left: 271.923px; top: 174.448px; width: 83.9878px; height: 8.27724px;"><canvas></canvas></div><div class="smear-container" data-x="0.7638286516853933" data-y="0.5132724719101124" data-width="0.23592078651685391" data-height="0.09864691011235954" data-start-edge="right" data-speed="53" data-source-interval="1335" data-pixel-size="2" data-color-fg="#0000FF" data-color-bg="#000000" data-source-type="stripes" style="left: 271.923px; top: 182.725px; width: 83.9878px; height: 35.1183px;"><canvas></canvas></div><div class="smear-container" data-x="0.7638286516853933" data-y="0.6119185393258426" data-width="0.23592078651685391" data-height="0.07066348314606741" data-start-edge="right" data-speed="70" data-source-interval="699" data-pixel-size="4" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="stripes" style="left: 271.923px; top: 217.843px; width: 83.9878px; height: 25.1562px;"><canvas></canvas></div><div class="smear-container" data-x="0.7638286516853933" data-y="0.6825814606741573" data-width="0.23592078651685391" data-height="0.07950168539325843" data-start-edge="right" data-speed="48" data-source-interval="1691" data-pixel-size="5" data-color-fg="#FF8000" data-color-bg="#000000" data-source-type="stripes" style="left: 271.923px; top: 242.999px; width: 83.9878px; height: 28.3026px;"><canvas></canvas></div><div class="smear-container" data-x="0.7638286516853933" data-y="0.7620842696629214" data-width="0.23592078651685391" data-height="0.08591629213483147" data-start-edge="right" data-speed="69" data-source-interval="610" data-pixel-size="3" data-color-fg="#FFFFFF" data-color-bg="#FF00CC" data-source-type="stripes" style="left: 271.923px; top: 271.302px; width: 83.9878px; height: 30.5862px;"><canvas></canvas></div><div class="smear-container" data-x="0.7638286516853933" data-y="0.848" data-width="0.23592078651685391" data-height="0.08181938202247191" data-start-edge="right" data-speed="44" data-source-interval="637" data-pixel-size="3" data-color-fg="#87CEEB" data-color-bg="#000000" data-source-type="stripes" style="left: 271.923px; top: 301.888px; width: 83.9878px; height: 29.1277px;"><canvas></canvas></div><div class="smear-container" data-x="0.7638286516853933" data-y="0.9298202247191012" data-width="0.23592078651685391" data-height="0.01944424157303371" data-start-edge="right" data-speed="27" data-source-interval="1735" data-pixel-size="4" data-color-fg="#FFFFFF" data-color-bg="#FF00CC" data-source-type="stripes" style="left: 271.923px; top: 331.016px; width: 83.9878px; height: 6.92215px;"><canvas></canvas></div><div class="smear-container" data-x="0.7638286516853933" data-y="0.9492640449438202" data-width="0.23592078651685391" data-height="0.05048679775280898" data-start-edge="left" data-speed="67" data-source-interval="1020" data-pixel-size="1" data-color-fg="#87CEEB" data-color-bg="#808080" data-source-type="stripes" style="left: 271.923px; top: 337.938px; width: 83.9878px; height: 17.9733px;"><canvas></canvas></div></div><script> class SmearCanvas { constructor(c) { this.container = c; this.canvas = c.querySelector("canvas") || document.createElement("canvas"); if (!c.querySelector("canvas")) c.appendChild(this.canvas); this.ctx = this.canvas.getContext("2d"); this.ctx.imageSmoothingEnabled = false; this.imageData = null; this.lastTime = 0; this.animationId = null; this.speed = parseInt(c.dataset.speed) || 50; this.pixelSize = parseInt(c.dataset.pixelSize) || 2; this.sourceInterval = parseInt(c.dataset.sourceInterval) || 1000; this.colorFg = c.dataset.colorFg || "#FFFFFF"; this.colorBg = c.dataset.colorBg || "#000000"; this.sourceType = c.dataset.sourceType || "noise"; this.startEdge = c.dataset.startEdge || "top"; this.fgRGB = this.hexToRGB(this.colorFg); this.bgRGB = this.hexToRGB(this.colorBg); this.moveSpeed = (1000 / 60) / this.speed; this.subPixelX = 0; this.subPixelY = 0; this.leadX = 0; this.leadY = 0; this.initDirection(); this.lastDirectionChange = 0; this.nextDirectionInterval = this.randomInterval(); this.sourceParams = this.generateSourceParams(); this.lastSourceTime = 0; this.resize(); this.initCanvas(); this.generateSourceEdge(); this.initLeadPosition(); this.startAnimation(); this.resizeObserver = new ResizeObserver(() => this.resize()); this.resizeObserver.observe(this.container); } generateSourceParams() { return { steps: 3 + Math.floor(Math.random() * 6), stripeWidth: 2 + Math.floor(Math.random() * 8), checkSize: 1 + Math.floor(Math.random() * 4), phase: 0, dashLength: 3 + Math.floor(Math.random() * 10), gapLength: 2 + Math.floor(Math.random() * 6), density: 0.05 + Math.random() * 0.25, frequency: 1 + Math.random() * 4, sinePhase: Math.random() * Math.PI * 2, seed1: Math.random() * 100, seed2: Math.random() * 100, seed3: Math.random() * 100, counter: Math.floor(Math.random() * 65536), caRule: Math.random() > 0.5 ? 30 : 110 }; } initDirection() { switch (this.startEdge) { case "top": this.dx = 0; this.dy = 1; break; case "bottom": this.dx = 0; this.dy = -1; break; case "left": this.dx = 1; this.dy = 0; break; case "right": this.dx = -1; this.dy = 0; break; default: this.dx = 0; this.dy = 1; } } initLeadPosition() { switch (this.startEdge) { case "top": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = 1; break; case "bottom": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = this.internalHeight - 2; break; case "left": this.leadX = 1; this.leadY = Math.floor(this.internalHeight / 2); break; case "right": this.leadX = this.internalWidth - 2; this.leadY = Math.floor(this.internalHeight / 2); break; } } resize() { var rect = this.container.getBoundingClientRect(); if (rect.width === 0 || rect.height === 0) return; this.internalWidth = Math.ceil(rect.width / this.pixelSize); this.internalHeight = Math.ceil(rect.height / this.pixelSize); var oldImageData = this.imageData; var oldWidth = this.canvas.width; var oldHeight = this.canvas.height; this.canvas.width = this.internalWidth; this.canvas.height = this.internalHeight; this.imageData = this.ctx.createImageData(this.internalWidth, this.internalHeight); if (oldImageData && oldWidth > 0 && oldHeight > 0) { var minW = Math.min(oldWidth, this.internalWidth); var minH = Math.min(oldHeight, this.internalHeight); for (var y = 0; y < minH; y++) { for (var x = 0; x < minW; x++) { var oi = (y * oldWidth + x) * 4; var ni = (y * this.internalWidth + x) * 4; this.imageData.data[ni] = oldImageData.data[oi]; this.imageData.data[ni + 1] = oldImageData.data[oi + 1]; this.imageData.data[ni + 2] = oldImageData.data[oi + 2]; this.imageData.data[ni + 3] = oldImageData.data[oi + 3]; } } } } hexToRGB(hex) { var r = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); return r ? { r: parseInt(r[1], 16), g: parseInt(r[2], 16), b: parseInt(r[3], 16) } : { r: 255, g: 255, b: 255 }; } lerpColor(t) { return { r: Math.round(this.bgRGB.r + (this.fgRGB.r - this.bgRGB.r) * t), g: Math.round(this.bgRGB.g + (this.fgRGB.g - this.bgRGB.g) * t), b: Math.round(this.bgRGB.b + (this.fgRGB.b - this.bgRGB.b) * t) }; } getSourceValue(pos, length) { var t = pos / length; switch (this.sourceType) { case "noise": return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; case "linear-gradient": return this.lerpColor(t); case "stepped-gradient": var steps = this.sourceParams.steps || 5; return this.lerpColor(Math.floor(t * steps) / (steps - 1)); case "random-gradient": if (!this.gradientCache || this.gradientCache.length !== length) this.generateRandomGradient(length); return this.lerpColor(this.gradientCache[pos]); case "stripes": return (Math.floor(pos / (this.sourceParams.stripeWidth || 4)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "checkerboard": return ((Math.floor(pos / (this.sourceParams.checkSize || 2)) + (this.sourceParams.phase || 0)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "dashes": var cycle = (this.sourceParams.dashLength || 6) + (this.sourceParams.gapLength || 3); return (pos % cycle < (this.sourceParams.dashLength || 6)) ? this.fgRGB : this.bgRGB; case "dots": return Math.random() < (this.sourceParams.density || 0.15) ? this.fgRGB : this.bgRGB; case "sine": var sv = (Math.sin((t * (this.sourceParams.frequency || 2) * Math.PI * 2) + (this.sourceParams.sinePhase || 0)) + 1) / 2; return this.lerpColor(sv); case "perlin": var p1 = Math.sin(t * 3.7 + this.sourceParams.seed1) * 0.5; var p2 = Math.sin(t * 7.3 + this.sourceParams.seed2) * 0.25; var p3 = Math.sin(t * 13.1 + this.sourceParams.seed3) * 0.125; return this.lerpColor(Math.max(0, Math.min(1, (p1 + p2 + p3 + 0.875) / 1.75))); case "binary-counter": return ((this.sourceParams.counter >> (pos % 16)) & 1) ? this.fgRGB : this.bgRGB; case "cellular-automata": if (!this.caState || this.caState.length !== length) this.initCellularAutomata(length); return this.caState[pos] ? this.fgRGB : this.bgRGB; default: return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; } } generateRandomGradient(length) { var np = 3 + Math.floor(Math.random() * 4); var cp = [0]; for (var i = 1; i < np - 1; i++) cp.push(Math.random()); cp.push(1); cp.sort((a, b) => a - b); var cv = cp.map(() => Math.random()); this.gradientCache = []; for (var i = 0; i < length; i++) { var t = i / length; var si = 0; for (var j = 0; j < cp.length - 1; j++) { if (t >= cp[j] && t <= cp[j + 1]) { si = j; break; } } var st = (t - cp[si]) / (cp[si + 1] - cp[si]); this.gradientCache.push(cv[si] + (cv[si + 1] - cv[si]) * st); } } initCellularAutomata(length) { this.caState = []; for (var i = 0; i < length; i++) this.caState.push(Math.random() > 0.5); } evolveCellularAutomata() { if (!this.caState) return; var rule = this.sourceParams.caRule || 30; var os = [...this.caState]; var len = this.caState.length; for (var i = 0; i < len; i++) { var p = (os[(i - 1 + len) % len] ? 4 : 0) + (os[i] ? 2 : 0) + (os[(i + 1) % len] ? 1 : 0); this.caState[i] = ((rule >> p) & 1) === 1; } } updateSourceParams() { switch (this.sourceType) { case "checkerboard": this.sourceParams.phase = (this.sourceParams.phase + 1) % 2; break; case "sine": this.sourceParams.sinePhase += 0.5; break; case "binary-counter": this.sourceParams.counter++; break; case "cellular-automata": this.evolveCellularAutomata(); break; case "random-gradient": this.gradientCache = null; break; case "perlin": this.sourceParams.seed1 += 0.3; this.sourceParams.seed2 += 0.2; this.sourceParams.seed3 += 0.1; break; } } randomInterval() { return 100 + Math.random() * 900; } changeDirection() { var dirs = [[0, 1], [1, 1], [1, 0], [1, -1], [0, -1], [-1, -1], [-1, 0], [-1, 1]]; var idx = dirs.findIndex(d => d[0] === this.dx && d[1] === this.dy); if (idx === -1) idx = 0; idx = Math.random() > 0.5 ? (idx + 1) % 8 : (idx + 7) % 8; this.dx = dirs[idx][0]; this.dy = dirs[idx][1]; } initCanvas() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var isH = (this.startEdge === "top" || this.startEdge === "bottom"); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { var idx = (y * w + x) * 4; var col = this.getSourceValue(isH ? x : y, isH ? w : h); data[idx] = col.r; data[idx + 1] = col.g; data[idx + 2] = col.b; data[idx + 3] = 255; } } this.ctx.putImageData(this.imageData, 0, 0); } generateSourceEdge() { if (!this.imageData) return; this.updateSourceParams(); var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var gen = (getIdx, len) => { for (var i = 0; i < len; i++) { var idx = getIdx(i); var c = this.getSourceValue(i, len); data[idx] = c.r; data[idx + 1] = c.g; data[idx + 2] = c.b; data[idx + 3] = 255; } }; switch (this.startEdge) { case "top": gen(x => x * 4, w); break; case "bottom": gen(x => ((h - 1) * w + x) * 4, w); break; case "left": gen(y => (y * w) * 4, h); break; case "right": gen(y => (y * w + (w - 1)) * 4, h); break; } } getSourceEdgeCoord(x, y) { switch (this.startEdge) { case "top": return y === 0; case "bottom": return y === this.internalHeight - 1; case "left": return x === 0; case "right": return x === this.internalWidth - 1; } return false; } smear() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; this.subPixelX += this.dx * this.moveSpeed; this.subPixelY += this.dy * this.moveSpeed; var moveX = Math.trunc(this.subPixelX), moveY = Math.trunc(this.subPixelY); if (moveX === 0 && moveY === 0) return; this.subPixelX -= moveX; this.subPixelY -= moveY; this.leadX += moveX; this.leadY += moveY; if (this.leadX <= 0 || this.leadX >= w - 1) { this.dx = -this.dx; this.leadX = Math.max(0, Math.min(w - 1, this.leadX)); } if (this.leadY <= 0 || this.leadY >= h - 1) { this.dy = -this.dy; this.leadY = Math.max(0, Math.min(h - 1, this.leadY)); } var oldData = new Uint8ClampedArray(data); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { if (this.getSourceEdgeCoord(x, y)) continue; var srcX = Math.max(0, Math.min(w - 1, x - moveX)); var srcY = Math.max(0, Math.min(h - 1, y - moveY)); var dstIdx = (y * w + x) * 4, srcIdx = (srcY * w + srcX) * 4; data[dstIdx] = oldData[srcIdx]; data[dstIdx + 1] = oldData[srcIdx + 1]; data[dstIdx + 2] = oldData[srcIdx + 2]; data[dstIdx + 3] = oldData[srcIdx + 3]; } } } startAnimation() { var fi = 1000 / 60; var animate = (ts) => { if (!this.lastTime) this.lastTime = ts; if (!this.lastSourceTime) this.lastSourceTime = ts; if (!this.lastDirectionChange) this.lastDirectionChange = ts; if (ts - this.lastDirectionChange >= this.nextDirectionInterval) { this.changeDirection(); this.lastDirectionChange = ts; this.nextDirectionInterval = this.randomInterval(); } if (ts - this.lastSourceTime >= this.sourceInterval) { this.generateSourceEdge(); this.lastSourceTime = ts; } if (ts - this.lastTime >= fi) { this.smear(); if (this.imageData) this.ctx.putImageData(this.imageData, 0, 0); this.lastTime = ts; } this.animationId = requestAnimationFrame(animate); }; this.animationId = requestAnimationFrame(animate); } } function layoutSmears() { var vw = window.innerWidth, vh = window.innerHeight; document.querySelectorAll(".smear-container").forEach(function(div) { var x = parseFloat(div.dataset.x || 0); var y = parseFloat(div.dataset.y || 0); var w = parseFloat(div.dataset.width || 0); var h = parseFloat(div.dataset.height || 0); div.style.left = (x * vw) + "px"; div.style.top = (y * vh) + "px"; div.style.width = (w * vw) + "px"; div.style.height = (h * vh) + "px"; }); } function initSmears() { document.querySelectorAll(".smear-container").forEach(function(c) { if (!c._smearInstance) c._smearInstance = new SmearCanvas(c); }); } window.addEventListener("load", function() { layoutSmears(); initSmears(); }); window.addEventListener("resize", layoutSmears); layoutSmears(); initSmears(); </script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#1d1d1d;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#241a17;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#400026;--color3-2:#000;--color4-1:#00103f;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #1d1d1d; --color2-1: #241a17; --color3-1: #400026; --color4-1: #00103f;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-left" data-x="0" data-y="0" data-width="0.20159999999999997" data-height="0.07" style="left: 0px; top: 0px; width: 131.443px; height: 45.64px; --clip-path: polygon(0% 0%, 72% 0%, 89% 99%, 0% 39%); background-size: 262.886px 45.64px; animation-duration: 2s;"></div><div class="gradient-container gradient-up" data-x="0.20159999999999997" data-y="0" data-width="0.20879999999999999" data-height="0.07" style="left: 131.443px; top: 0px; width: 136.138px; height: 45.64px; --clip-path: polygon(-27% 0%, 74% 0%, 75% 70%, -10% 99%); background-size: 136.138px 91.28px; animation-duration: 96s;"></div><div class="gradient-container gradient-up" data-x="0.41039999999999993" data-y="0" data-width="0.0696" data-height="0.07" style="left: 267.581px; top: 0px; width: 45.3792px; height: 45.64px; --clip-path: polygon(-78% 0%, 6% 0%, -14% 142%, -75% 70%); background-size: 45.3792px 91.28px; animation-duration: 85s;"></div><div class="gradient-container gradient-down" data-x="0.48" data-y="0" data-width="0.52" data-height="0.07" style="left: 312.96px; top: 0px; width: 339.04px; height: 45.64px; --clip-path: polygon(-13% 0%, 100% 0%, 100% 5%, -15% 142%); background-size: 339.04px 91.28px; animation-duration: 65s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.07" data-width="0.79" data-height="0.93" style="left: 0px; top: 45.64px; width: 515.08px; height: 606.36px; --clip-path: polygon(0% -5%, 99% 2%, 91% 100%, 0% 100%); background-size: 1030.16px 606.36px; animation-duration: 6s;"></div><div class="gradient-container gradient-left" data-x="0.79" data-y="0.07" data-width="0.20999999999999994" data-height="0.3069" style="left: 515.08px; top: 45.64px; width: 136.92px; height: 200.099px; --clip-path: polygon(-3% 7%, 100% -22%, 100% 110%, 4% 92%); background-size: 273.84px 200.099px; animation-duration: 44s;"></div><div class="gradient-container gradient-up" data-x="0.79" data-y="0.3769" data-width="0.20999999999999994" data-height="0.31155000000000005" style="left: 515.08px; top: 245.739px; width: 136.92px; height: 203.131px; --clip-path: polygon(4% -8%, 100% 10%, 100% 113%, 18% 101%); background-size: 136.92px 406.261px; animation-duration: 79s;"></div><div class="gradient-container gradient-down" data-x="0.79" data-y="0.6884500000000001" data-width="0.20999999999999994" data-height="0.31155000000000005" style="left: 515.08px; top: 448.869px; width: 136.92px; height: 203.131px; --clip-path: polygon(18% 1%, 100% 13%, 100% 100%, -33% 100%); background-size: 136.92px 406.261px; animation-duration: 23s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#83a1cd;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#783f7d;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#B4ff00;--color3-2:#000;--color4-1:#00ffea;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #83a1cd; --color2-1: #783f7d; --color3-1: #B4ff00; --color4-1: #00ffea;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-left" data-x="0" data-y="0" data-width="0.218416" data-height="0.3135" style="left: 0px; top: 0px; width: 79.72184px; height: 114.4275px; --clip-path: polygon(0% 0%, 88% 0%, 98% 107%, 0% 94%); background-size: 159.44368px 114.4275px; animation-duration: 97s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.3135" data-width="0.218416" data-height="0.25650000000000006" style="left: 0px; top: 114.4275px; width: 79.72184px; height: 93.6225px; --clip-path: polygon(0% -7%, 98% 9%, 79% 79%, 0% 129%); background-size: 159.44368px 93.6225px; animation-duration: 61s;"></div><div class="gradient-container gradient-right" data-x="0.218416" data-y="0" data-width="0.423984" data-height="0.275652" style="left: 79.72184px; top: 0px; width: 154.75416px; height: 100.61298px; --clip-path: polygon(-6% 0%, 84% 0%, 106% 105%, -6% 79%); background-size: 309.50832px 100.61298px; animation-duration: 2s;"></div><div class="gradient-container gradient-right" data-x="0.218416" data-y="0.275652" data-width="0.423984" data-height="0.254448" style="left: 79.72184px; top: 100.61298px; width: 154.75416px; height: 92.87352px; --clip-path: polygon(-6% -22%, 106% 6%, 111% 95%, -13% 94%); background-size: 309.50832px 92.87352px; animation-duration: 92s;"></div><div class="gradient-container gradient-down" data-x="0.218416" data-y="0.5301" data-width="0.25439040000000007" data-height="0.03990000000000001" style="left: 79.72184px; top: 193.4865px; width: 92.852496px; height: 14.5635px; --clip-path: polygon(-22% -39%, 104% -157%, 131% 180%, -18% -32%); background-size: 92.852496px 29.127px; animation-duration: 94s;"></div><div class="gradient-container gradient-right" data-x="0.47280640000000007" data-y="0.5301" data-width="0.16959359999999998" data-height="0.03990000000000001" style="left: 172.574336px; top: 193.4865px; width: 61.901664px; height: 14.5635px; --clip-path: polygon(6% -157%, 126% -35%, 139% 100%, 47% 180%); background-size: 123.803328px 14.5635px; animation-duration: 16s;"></div><div class="gradient-container gradient-up" data-x="0.6424" data-y="0" data-width="0.08759999999999997" data-height="0.2508" style="left: 234.476px; top: 0px; width: 31.974px; height: 91.542px; --clip-path: polygon(-78% 0%, 124% 0%, 33% 82%, 6% 72%); background-size: 31.974px 183.084px; animation-duration: 76s;"></div><div class="gradient-container gradient-left" data-x="0.6424" data-y="0.2508" data-width="0.08759999999999997" data-height="0.0560196" style="left: 234.476px; top: 91.542px; width: 31.974px; height: 20.447154px; --clip-path: polygon(6% -124%, 33% -82%, 100% 78%, 17% 164%); background-size: 63.948px 20.447154px; animation-duration: 20s;"></div><div class="gradient-container gradient-up" data-x="0.6424" data-y="0.30681959999999997" data-width="0.08759999999999997" data-height="0.15146040000000002" style="left: 234.476px; top: 111.989154px; width: 31.974px; height: 55.283046px; --clip-path: polygon(17% 24%, 100% -8%, 14% 82%, -88% 124%); background-size: 31.974px 110.566092px; animation-duration: 87s;"></div><div class="gradient-container gradient-left" data-x="0.6424" data-y="0.45828" data-width="0.08759999999999997" data-height="0.0960792" style="left: 234.476px; top: 167.2722px; width: 31.974px; height: 35.068908px; --clip-path: polygon(-88% 37%, 14% -29%, 139% 53%, 0% 106%); background-size: 63.948px 35.068908px; animation-duration: 100s;"></div><div class="gradient-container gradient-up" data-x="0.6424" data-y="0.5543591999999999" data-width="0.08759999999999997" data-height="0.015640799999999996" style="left: 234.476px; top: 202.341108px; width: 31.974px; height: 5.708892px; --clip-path: polygon(0% 38%, 139% -286%, 70% 368%, 76% 99%); background-size: 31.974px 11.417784px; animation-duration: 13s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.5700000000000001" data-width="0.73" data-height="0.43" style="left: 0px; top: 208.05px; width: 266.45px; height: 156.95px; --clip-path: polygon(0% 17%, 96% 10%, 99% 100%, 0% 100%); background-size: 532.9px 156.95px; animation-duration: 17s;"></div><div class="gradient-container gradient-left" data-x="0.73" data-y="0" data-width="0.27" data-height="0.18999999999999997" style="left: 266.45px; top: 0px; width: 98.55px; height: 69.35px; --clip-path: polygon(8% 0%, 100% 0%, 100% 103%, -12% 137%); background-size: 197.1px 69.35px; animation-duration: 30s;"></div><div class="gradient-container gradient-down" data-x="0.73" data-y="0.18999999999999997" data-width="0.27" data-height="0.081" style="left: 266.45px; top: 69.35px; width: 98.55px; height: 29.565px; --clip-path: polygon(-12% 87%, 100% 8%, 100% 47%, 8% 96%); background-size: 98.55px 59.13px; animation-duration: 75s;"></div><div class="gradient-container gradient-right" data-x="0.73" data-y="0.27099999999999996" data-width="0.27" data-height="0.6269399999999999" style="left: 266.45px; top: 98.915px; width: 98.55px; height: 228.8331px; --clip-path: polygon(8% 0%, 100% -7%, 100% 105%, 28% 107%); background-size: 197.1px 228.8331px; animation-duration: 91s;"></div><div class="gradient-container gradient-right" data-x="0.73" data-y="0.89794" data-width="0.23220000000000005" data-height="0.10206000000000001" style="left: 266.45px; top: 327.7481px; width: 84.753px; height: 37.2519px; --clip-path: polygon(33% 41%, 81% 3%, 77% 100%, -4% 100%); background-size: 169.506px 37.2519px; animation-duration: 90s;"></div><div class="gradient-container gradient-down" data-x="0.9621999999999999" data-y="0.89794" data-width="0.03779999999999999" data-height="0.07246260000000002" style="left: 351.203px; top: 327.7481px; width: 13.797px; height: 26.448849px; --clip-path: polygon(-114% 4%, 100% 42%, 100% 137%, -12% 171%); background-size: 13.797px 52.897698px; animation-duration: 62s;"></div><div class="gradient-container gradient-down" data-x="0.9621999999999999" data-y="0.9704025999999999" data-width="0.03779999999999999" data-height="0.0295974" style="left: 351.203px; top: 354.196949px; width: 13.797px; height: 10.803051px; --clip-path: polygon(-12% 173%, 100% 92%, 100% 100%, -143% 100%); background-size: 13.797px 21.606102px; animation-duration: 95s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#494949;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#494949;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#400026;--color3-2:#000;--color4-1:#ffcc00;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #494949; --color2-1: #494949; --color3-1: #400026; --color4-1: #ffcc00;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-left" data-x="0" data-y="0" data-width="0.05927400000000001" data-height="0.0253" style="left: 0px; top: 0px; width: 23.828148px; height: 10.1706px; --clip-path: polygon(0% 0%, 164% 0%, 18% -55%, 0% -149%); background-size: 47.656296px 10.1706px; animation-duration: 16s;"></div><div class="gradient-container gradient-right" data-x="0" data-y="0.0253" data-width="0.05927400000000001" data-height="0.07590000000000001" style="left: 0px; top: 10.1706px; width: 23.828148px; height: 30.5118px; --clip-path: polygon(0% -83%, 18% -52%, 27% 71%, 0% 31%); background-size: 47.656296px 30.5118px; animation-duration: 25s;"></div><div class="gradient-container gradient-up" data-x="0" data-y="0.1012" data-width="0.05927400000000001" data-height="0.008799999999999994" style="left: 0px; top: 40.6824px; width: 23.828148px; height: 3.5376px; --clip-path: polygon(0% -595%, 27% -251%, 78% -567%, 0% 413%); background-size: 23.828148px 7.0752px; animation-duration: 58s;"></div><div class="gradient-container gradient-up" data-x="0.05927400000000001" data-y="0" data-width="0.45548776" data-height="0.11" style="left: 23.828148px; top: 0px; width: 183.10608px; height: 44.22px; --clip-path: polygon(8% 0%, 116% 0%, 86% 54%, -3% 47%); background-size: 183.10608px 88.44px; animation-duration: 89s;"></div><div class="gradient-container gradient-left" data-x="0.5147617600000001" data-y="0" data-width="0.0747958848" data-height="0.11" style="left: 206.934228px; top: 0px; width: 30.067946px; height: 44.22px; --clip-path: polygon(96% 0%, 48% 0%, 143% 96%, -83% 54%); background-size: 60.135891px 44.22px; animation-duration: 26s;"></div><div class="gradient-container gradient-up" data-x="0.5895576448000001" data-y="0" data-width="0.0690423552" data-height="0.11" style="left: 237.002173px; top: 0px; width: 27.755027px; height: 44.22px; --clip-path: polygon(-57% 0%, -12% 0%, 155% 72%, 47% 96%); background-size: 27.755027px 88.44px; animation-duration: 94s;"></div><div class="gradient-container gradient-up" data-x="0.6586000000000001" data-y="0" data-width="0.027676000000000006" data-height="0.061006000000000005" style="left: 264.7572px; top: 0px; width: 11.125752px; height: 24.524412px; --clip-path: polygon(-281% 0%, 65% 0%, 256% 36%, -234% -29%); background-size: 11.125752px 49.048824px; animation-duration: 12s;"></div><div class="gradient-container gradient-down" data-x="0.686276" data-y="0" data-width="0.05372400000000001" data-height="0.061006000000000005" style="left: 275.882952px; top: 0px; width: 21.597048px; height: 24.524412px; --clip-path: polygon(-18% 0%, 3% 0%, 219% -10%, 80% 36%); background-size: 21.597048px 49.048824px; animation-duration: 1s;"></div><div class="gradient-container gradient-right" data-x="0.6586000000000001" data-y="0.061006000000000005" data-width="0.07326" data-height="0.042393999999999994" style="left: 264.7572px; top: 24.524412px; width: 29.45052px; height: 17.042388px; --clip-path: polygon(-88% -185%, 69% 180%, 98% 181%, -57% 8%); background-size: 58.90104px 17.042388px; animation-duration: 17s;"></div><div class="gradient-container gradient-down" data-x="0.73186" data-y="0.061006000000000005" data-width="0.008140000000000005" data-height="0.042393999999999994" style="left: 294.20772px; top: 24.524412px; width: 3.27228px; height: 17.042388px; --clip-path: polygon(-283% 180%, 885% -159%, -730% 111%, -22% 181%); background-size: 3.27228px 34.084776px; animation-duration: 45s;"></div><div class="gradient-container gradient-right" data-x="0.6586000000000001" data-y="0.1034" data-width="0.056166000000000015" data-height="0.006599999999999996" style="left: 264.7572px; top: 41.5668px; width: 22.578732px; height: 2.6532px; --clip-path: polygon(-75% -591%, 144% 1035%, 160% 115%, 68% -366%); background-size: 45.157464px 2.6532px; animation-duration: 49s;"></div><div class="gradient-container gradient-up" data-x="0.714766" data-y="0.1034" data-width="0.025234000000000003" data-height="0.006599999999999996" style="left: 287.335932px; top: 41.5668px; width: 10.144068px; height: 2.6532px; --clip-path: polygon(99% 1035%, -168% 68%, 167% -5%, 134% 115%); background-size: 10.144068px 5.3064px; animation-duration: 74s;"></div><div class="gradient-container gradient-up" data-x="0" data-y="0.11" data-width="0.14762999999999998" data-height="0.12281999999999998" style="left: 0px; top: 44.22px; width: 59.34726px; height: 49.37364px; --clip-path: polygon(0% 22%, 99% -16%, 46% 44%, 0% 142%); background-size: 59.34726px 98.74728px; animation-duration: 4s;"></div><div class="gradient-container gradient-right" data-x="0.14762999999999998" data-y="0.11" data-width="0.007769999999999996" data-height="0.12281999999999998" style="left: 59.34726px; top: 44.22px; width: 3.12354px; height: 49.37364px; --clip-path: polygon(-14% -16%, -140% -61%, -674% 40%, -1020% 44%); background-size: 6.24708px 49.37364px; animation-duration: 87s;"></div><div class="gradient-container gradient-right" data-x="0" data-y="0.23281999999999997" data-width="0.15539999999999998" data-height="0.1080816" style="left: 0px; top: 93.59364px; width: 62.4708px; height: 43.448803px; --clip-path: polygon(0% 48%, 61% -68%, 94% 142%, 0% 92%); background-size: 124.9416px 43.448803px; animation-duration: 9s;"></div><div class="gradient-container gradient-right" data-x="0" data-y="0.34090159999999997" data-width="0.15539999999999998" data-height="0.3831984" style="left: 0px; top: 137.042443px; width: 62.4708px; height: 154.045757px; --clip-path: polygon(0% -2%, 94% 12%, 112% 92%, 0% 89%); background-size: 124.9416px 154.045757px; animation-duration: 26s;"></div><div class="gradient-container gradient-right" data-x="0.15539999999999998" data-y="0.11" data-width="0.058460000000000005" data-height="0.24563999999999997" style="left: 62.4708px; top: 44.22px; width: 23.50092px; height: 98.74728px; --clip-path: polygon(-32% -30%, 163% -29%, 233% 110%, -8% 118%); background-size: 47.00184px 98.74728px; animation-duration: 43s;"></div><div class="gradient-container gradient-right" data-x="0.21386000000000002" data-y="0.11" data-width="0.52614" data-height="0.24563999999999997" style="left: 85.97172px; top: 44.22px; width: 211.50828px; height: 98.74728px; --clip-path: polygon(7% -29%, 103% -3%, 105% 95%, 15% 110%); background-size: 423.01656px 98.74728px; animation-duration: 44s;"></div><div class="gradient-container gradient-down" data-x="0.15539999999999998" data-y="0.35563999999999996" data-width="0.49106400000000006" data-height="0.36846" style="left: 62.4708px; top: 142.96728px; width: 197.407728px; height: 148.12092px; --clip-path: polygon(-1% 12%, 93% 11%, 92% 84%, 4% 92%); background-size: 197.407728px 296.24184px; animation-duration: 38s;"></div><div class="gradient-container gradient-right" data-x="0.646464" data-y="0.35563999999999996" data-width="0.09353600000000001" data-height="0.36846" style="left: 259.878528px; top: 142.96728px; width: 37.601472px; height: 148.12092px; --clip-path: polygon(-35% 11%, 126% -4%, 55% 111%, -44% 84%); background-size: 75.202944px 148.12092px; animation-duration: 95s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.7241000000000001" data-width="0.22643999999999997" data-height="0.13794999999999996" style="left: 0px; top: 291.0882px; width: 91.02888px; height: 55.4559px; --clip-path: polygon(0% -30%, 108% 27%, 97% 56%, 0% 43%); background-size: 182.05776px 55.4559px; animation-duration: 10s;"></div><div class="gradient-container gradient-right" data-x="0" data-y="0.86205" data-width="0.22643999999999997" data-height="0.13794999999999996" style="left: 0px; top: 346.5441px; width: 91.02888px; height: 55.4559px; --clip-path: polygon(0% -57%, 97% -44%, 126% 100%, 0% 100%); background-size: 182.05776px 55.4559px; animation-duration: 52s;"></div><div class="gradient-container gradient-right" data-x="0.22643999999999997" data-y="0.7241000000000001" data-width="0.030443599999999998" data-height="0.2758999999999999" style="left: 91.02888px; top: 291.0882px; width: 12.238327px; height: 110.9118px; --clip-path: polygon(62% 13%, 313% 15%, -97% 100%, 195% 100%); background-size: 24.476654px 110.9118px; animation-duration: 66s;"></div><div class="gradient-container gradient-down" data-x="0.2568836" data-y="0.7241000000000001" data-width="0.2463164" data-height="0.2758999999999999" style="left: 103.267207px; top: 291.0882px; width: 99.019193px; height: 110.9118px; --clip-path: polygon(26% 15%, 102% -9%, 109% 100%, -24% 100%); background-size: 99.019193px 221.8236px; animation-duration: 13s;"></div><div class="gradient-container gradient-right" data-x="0.5032" data-y="0.7241000000000001" data-width="0.23680000000000007" data-height="0.2758999999999999" style="left: 202.2864px; top: 291.0882px; width: 95.1936px; height: 110.9118px; --clip-path: polygon(2% -9%, 82% 15%, 113% 100%, 9% 100%); background-size: 190.3872px 110.9118px; animation-duration: 18s;"></div><div class="gradient-container gradient-left" data-x="0.74" data-y="0" data-width="0.022359999999999998" data-height="0.026" style="left: 297.48px; top: 0px; width: 8.98872px; height: 10.452px; --clip-path: polygon(-234% 0%, -94% 0%, -131% 207%, 245% -130%); background-size: 17.97744px 10.452px; animation-duration: 70s;"></div><div class="gradient-container gradient-down" data-x="0.76236" data-y="0" data-width="0.20123999999999995" data-height="0.026" style="left: 306.46872px; top: 0px; width: 80.89848px; height: 10.452px; --clip-path: polygon(-22% 0%, 68% 0%, 73% 147%, -26% 207%); background-size: 80.89848px 20.904px; animation-duration: 91s;"></div><div class="gradient-container gradient-right" data-x="0.9636" data-y="0" data-width="0.013468000000000003" data-height="0.026" style="left: 387.3672px; top: 0px; width: 5.414136px; height: 10.452px; --clip-path: polygon(-481% 0%, 100% 0%, 100% -77%, -410% 147%); background-size: 10.828272px 10.452px; animation-duration: 78s;"></div><div class="gradient-container gradient-left" data-x="0.977068" data-y="0" data-width="0.022932000000000004" data-height="0.026" style="left: 392.781336px; top: 0px; width: 9.218664px; height: 10.452px; --clip-path: polygon(0% 0%, 100% 0%, 100% 85%, 0% -77%); background-size: 18.437328px 10.452px; animation-duration: 97s;"></div><div class="gradient-container gradient-down" data-x="0.74" data-y="0.026" data-width="0.25999999999999995" data-height="0.23399999999999999" style="left: 297.48px; top: 10.452px; width: 104.52px; height: 94.068px; --clip-path: polygon(21% -26%, 100% -2%, 100% 111%, -22% 114%); background-size: 104.52px 188.136px; animation-duration: 52s;"></div><div class="gradient-container gradient-down" data-x="0.74" data-y="0.26" data-width="0.25999999999999995" data-height="0.13576992000000002" style="left: 297.48px; top: 104.52px; width: 104.52px; height: 54.579508px; --clip-path: polygon(-22% 25%, 100% 19%, 100% 63%, -28% 89%); background-size: 104.52px 109.159016px; animation-duration: 84s;"></div><div class="gradient-container gradient-up" data-x="0.74" data-y="0.39576992" data-width="0.25999999999999995" data-height="0.17997408" style="left: 297.48px; top: 159.099508px; width: 104.52px; height: 72.34958px; --clip-path: polygon(-28% -8%, 100% -28%, 100% 115%, -14% 65%); background-size: 104.52px 144.69916px; animation-duration: 4s;"></div><div class="gradient-container gradient-up" data-x="0.74" data-y="0.575744" data-width="0.11699999999999999" data-height="0.027456000000000036" style="left: 297.48px; top: 231.449088px; width: 47.034px; height: 11.037312px; --clip-path: polygon(-32% -230%, 167% 175%, 96% 200%, -19% 154%); background-size: 47.034px 22.074624px; animation-duration: 69s;"></div><div class="gradient-container gradient-right" data-x="0.857" data-y="0.575744" data-width="0.14299999999999996" data-height="0.027456000000000036" style="left: 344.514px; top: 231.449088px; width: 57.486px; height: 11.037312px; --clip-path: polygon(54% 175%, 100% 100%, 100% 252%, -3% 200%); background-size: 114.972px 11.037312px; animation-duration: 5s;"></div><div class="gradient-container gradient-right" data-x="0.74" data-y="0.6032" data-width="0.04419999999999999" data-height="0.04680000000000002" style="left: 297.48px; top: 242.4864px; width: 17.7684px; height: 18.8136px; --clip-path: polygon(-49% 32%, 30% -82%, 166% 192%, 47% 102%); background-size: 35.5368px 18.8136px; animation-duration: 78s;"></div><div class="gradient-container gradient-down" data-x="0.7842" data-y="0.6032" data-width="0.04419999999999999" data-height="0.04680000000000002" style="left: 315.2484px; top: 242.4864px; width: 17.7684px; height: 18.8136px; --clip-path: polygon(-70% -82%, 252% 169%, -80% -51%, 66% 192%); background-size: 17.7684px 37.6272px; animation-duration: 18s;"></div><div class="gradient-container gradient-right" data-x="0.8284" data-y="0.6032" data-width="0.17159999999999995" data-height="0.04680000000000002" style="left: 333.0168px; top: 242.4864px; width: 68.9832px; height: 18.8136px; --clip-path: polygon(39% 169%, 100% 89%, 100% 16%, -46% -51%); background-size: 137.9664px 18.8136px; animation-duration: 45s;"></div><div class="gradient-container gradient-right" data-x="0.74" data-y="0.65" data-width="0.25999999999999995" data-height="0.035" style="left: 297.48px; top: 261.3px; width: 104.52px; height: 14.07px; --clip-path: polygon(8% 2%, 100% -112%, 100% 42%, -6% 253%); background-size: 209.04px 14.07px; animation-duration: 50s;"></div><div class="gradient-container gradient-right" data-x="0.74" data-y="0.685" data-width="0.0676" data-height="0.006174" style="left: 297.48px; top: 275.37px; width: 27.1752px; height: 2.481948px; --clip-path: polygon(-21% 866%, 161% -637%, 69% 1357%, 50% 39%); background-size: 54.3504px 2.481948px; animation-duration: 16s;"></div><div class="gradient-container gradient-up" data-x="0.74" data-y="0.691174" data-width="0.0676" data-height="0.14817599999999997" style="left: 297.48px; top: 277.851948px; width: 27.1752px; height: 59.566752px; --clip-path: polygon(50% -3%, 69% 52%, 119% 100%, -81% 80%); background-size: 27.1752px 119.133504px; animation-duration: 96s;"></div><div class="gradient-container gradient-up" data-x="0.8076000000000001" data-y="0.685" data-width="0.0038479999999999994" data-height="0.15435" style="left: 324.6552px; top: 275.37px; width: 1.546896px; height: 62.0487px; --clip-path: polygon(1064% -25%, -1400% -6%, -1651% 104%, 329% 100%); background-size: 1.546896px 124.0974px; animation-duration: 77s;"></div><div class="gradient-container gradient-up" data-x="0.8114480000000001" data-y="0.685" data-width="0.18855199999999997" data-height="0.15435" style="left: 326.202096px; top: 275.37px; width: 75.797904px; height: 62.0487px; --clip-path: polygon(-31% -6%, 100% -13%, 100% 137%, -36% 104%); background-size: 75.797904px 124.0974px; animation-duration: 31s;"></div><div class="gradient-container gradient-left" data-x="0.74" data-y="0.83935" data-width="0.023399999999999997" data-height="0.048194999999999995" style="left: 297.48px; top: 337.4187px; width: 9.4068px; height: 19.37439px; --clip-path: polygon(-233% -62%, 365% -34%, 198% -17%, -143% -3%); background-size: 18.8136px 19.37439px; animation-duration: 28s;"></div><div class="gradient-container gradient-up" data-x="0.74" data-y="0.887545" data-width="0.023399999999999997" data-height="0.112455" style="left: 297.48px; top: 356.79309px; width: 9.4068px; height: 45.20691px; --clip-path: polygon(-143% -44%, 198% -50%, -77% 100%, 131% 100%); background-size: 9.4068px 90.41382px; animation-duration: 50s;"></div><div class="gradient-container gradient-right" data-x="0.7634" data-y="0.83935" data-width="0.16325399999999995" data-height="0.16065" style="left: 306.8868px; top: 337.4187px; width: 65.628108px; height: 64.5813px; --clip-path: polygon(38% -10%, 76% -39%, 78% 100%, -25% 100%); background-size: 131.256216px 64.5813px; animation-duration: 30s;"></div><div class="gradient-container gradient-right" data-x="0.926654" data-y="0.83935" data-width="0.07334599999999998" data-height="0.16065" style="left: 372.514908px; top: 337.4187px; width: 29.485092px; height: 64.5813px; --clip-path: polygon(-53% -39%, 100% 36%, 100% 100%, -49% 100%); background-size: 58.970184px 64.5813px; animation-duration: 31s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#c6c6c6;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#cd83c2;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#241a17;--color3-2:#000;--color4-1:#b283cd;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #c6c6c6; --color2-1: #cd83c2; --color3-1: #241a17; --color4-1: #b283cd;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-up" data-x="0" data-y="0" data-width="0.53" data-height="0.37" style="left: 0px; top: 0px; width: 175.96px; height: 122.84px; --clip-path: polygon(0% 0%, 106% 0%, 90% 97%, 0% 96%); background-size: 175.96px 245.68px; animation-duration: 44s;"></div><div class="gradient-container gradient-right" data-x="0.53" data-y="0" data-width="0.28669999999999995" data-height="0.37" style="left: 175.96px; top: 0px; width: 95.1844px; height: 122.84px; --clip-path: polygon(11% 0%, 102% 0%, 104% 96%, -18% 97%); background-size: 190.369px 122.84px; animation-duration: 16s;"></div><div class="gradient-container gradient-up" data-x="0.8167000000000001" data-y="0" data-width="0.18330000000000002" data-height="0.0444" style="left: 271.144px; top: 0px; width: 60.8556px; height: 14.7408px; --clip-path: polygon(3% 0%, 100% 0%, 100% 11%, -9% 24%); background-size: 60.8556px 29.4816px; animation-duration: 20s;"></div><div class="gradient-container gradient-right" data-x="0.8167000000000001" data-y="0.0444" data-width="0.18330000000000002" data-height="0.3256" style="left: 271.144px; top: 14.7408px; width: 60.8556px; height: 108.099px; --clip-path: polygon(-9% -10%, 100% -12%, 100% 77%, 6% 96%); background-size: 121.711px 108.099px; animation-duration: 92s;"></div><div class="gradient-container gradient-up" data-x="0" data-y="0.37" data-width="0.09480000000000001" data-height="0.035336700000000006" style="left: 0px; top: 122.84px; width: 31.4736px; height: 11.7318px; --clip-path: polygon(0% -42%, 138% 19%, 65% 279%, 0% 160%); background-size: 31.4736px 23.4636px; animation-duration: 98s;"></div><div class="gradient-container gradient-left" data-x="0.09480000000000001" data-y="0.37" data-width="0.025200000000000007" data-height="0.035336700000000006" style="left: 31.4736px; top: 122.84px; width: 8.3664px; height: 11.7318px; --clip-path: polygon(143% 19%, 252% 221%, 20% 78%, -131% 279%); background-size: 16.7328px 11.7318px; animation-duration: 88s;"></div><div class="gradient-container gradient-right" data-x="0" data-y="0.40533670000000005" data-width="0.12000000000000001" data-height="0.3180303" style="left: 0px; top: 134.572px; width: 39.84px; height: 105.586px; --clip-path: polygon(0% 7%, 83% -2%, 117% 107%, 0% 77%); background-size: 79.68px 105.586px; animation-duration: 59s;"></div><div class="gradient-container gradient-right" data-x="0" data-y="0.723367" data-width="0.0636" data-height="0.04762989" style="left: 0px; top: 240.158px; width: 21.1152px; height: 15.8131px; --clip-path: polygon(0% -152%, 196% 35%, 145% -27%, 0% 162%); background-size: 42.2304px 15.8131px; animation-duration: 23s;"></div><div class="gradient-container gradient-right" data-x="0.0636" data-y="0.723367" data-width="0.056400000000000006" data-height="0.04762989" style="left: 21.1152px; top: 240.158px; width: 18.7248px; height: 15.8131px; --clip-path: polygon(108% 35%, 135% 45%, 58% 153%, 51% -27%); background-size: 37.4496px 15.8131px; animation-duration: 84s;"></div><div class="gradient-container gradient-up" data-x="0" data-y="0.77099689" data-width="0.12000000000000001" data-height="0.09670310999999998" style="left: 0px; top: 255.971px; width: 39.84px; height: 32.1054px; --clip-path: polygon(0% 30%, 80% 26%, 146% 183%, 0% 97%); background-size: 39.84px 64.2109px; animation-duration: 73s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.8677000000000001" data-width="0.0228" data-height="0.08864099999999998" style="left: 0px; top: 288.076px; width: 7.5696px; height: 29.4288px; --clip-path: polygon(0% -4%, 100% 18%, 100% 157%, 0% 59%); background-size: 15.1392px 29.4288px; animation-duration: 53s;"></div><div class="gradient-container gradient-up" data-x="0.0228" data-y="0.8677000000000001" data-width="0.09720000000000001" data-height="0.08864099999999998" style="left: 7.5696px; top: 288.076px; width: 32.2704px; height: 29.4288px; --clip-path: polygon(0% 18%, 157% 90%, 35% 130%, 0% 157%); background-size: 32.2704px 58.8576px; animation-duration: 67s;"></div><div class="gradient-container gradient-down" data-x="0" data-y="0.9563410000000001" data-width="0.013284" data-height="0.043658999999999996" style="left: 0px; top: 317.505px; width: 4.41029px; height: 14.4948px; --clip-path: polygon(0% -83%, 100% 122%, 100% 100%, 0% 100%); background-size: 4.41029px 28.9896px; animation-duration: 95s;"></div><div class="gradient-container gradient-down" data-x="0.013284" data-y="0.9563410000000001" data-width="0.035916000000000003" data-height="0.043658999999999996" style="left: 4.41029px; top: 317.505px; width: 11.9241px; height: 14.4948px; --clip-path: polygon(0% 122%, 63% -72%, 2% 100%, 0% 100%); background-size: 11.9241px 28.9896px; animation-duration: 85s;"></div><div class="gradient-container gradient-left" data-x="0.04920000000000001" data-y="0.9563410000000001" data-width="0.033984" data-height="0.043658999999999996" style="left: 16.3344px; top: 317.505px; width: 11.2827px; height: 14.4948px; --clip-path: polygon(-39% -72%, 286% 145%, 213% 100%, -104% 100%); background-size: 22.5654px 14.4948px; animation-duration: 43s;"></div><div class="gradient-container gradient-left" data-x="0.08318400000000001" data-y="0.9563410000000001" data-width="0.036816" data-height="0.043658999999999996" style="left: 27.6171px; top: 317.505px; width: 12.2229px; height: 14.4948px; --clip-path: polygon(172% 145%, -72% 61%, -12% 100%, 104% 100%); background-size: 24.4458px 14.4948px; animation-duration: 16s;"></div><div class="gradient-container gradient-left" data-x="0.12000000000000001" data-y="0.37" data-width="0.24036407999999998" data-height="0.3654" style="left: 39.84px; top: 122.84px; width: 79.8009px; height: 121.313px; --clip-path: polygon(16% 21%, 99% -7%, 104% 83%, 20% 87%); background-size: 159.602px 121.313px; animation-duration: 10s;"></div><div class="gradient-container gradient-right" data-x="0.12000000000000001" data-y="0.7354" data-width="0.24036407999999998" data-height="0.26459999999999995" style="left: 39.84px; top: 244.153px; width: 79.8009px; height: 87.8472px; --clip-path: polygon(20% -18%, 104% -23%, 80% 100%, -17% 100%); background-size: 159.602px 87.8472px; animation-duration: 2s;"></div><div class="gradient-container gradient-left" data-x="0.36036408" data-y="0.37" data-width="0.48801191999999993" data-height="0.45990000000000003" style="left: 119.641px; top: 122.84px; width: 162.02px; height: 152.687px; --clip-path: polygon(-1% -6%, 94% 13%, 96% 110%, 12% 83%); background-size: 324.04px 152.687px; animation-duration: 29s;"></div><div class="gradient-container gradient-left" data-x="0.36036408" data-y="0.8299" data-width="0.48801191999999993" data-height="0.17009999999999997" style="left: 119.641px; top: 275.527px; width: 162.02px; height: 56.4732px; --clip-path: polygon(12% -45%, 96% 27%, 90% 100%, -10% 100%); background-size: 324.04px 56.4732px; animation-duration: 92s;"></div><div class="gradient-container gradient-down" data-x="0.8483760000000001" data-y="0.37" data-width="0.054824000000000025" data-height="0.263529" style="left: 281.661px; top: 122.84px; width: 18.2016px; height: 87.4916px; --clip-path: polygon(-56% 23%, -1% -20%, 51% 107%, -59% 105%); background-size: 18.2016px 174.983px; animation-duration: 64s;"></div><div class="gradient-container gradient-up" data-x="0.8483760000000001" data-y="0.6335290000000001" data-width="0.054824000000000025" data-height="0.03257099999999998" style="left: 281.661px; top: 210.332px; width: 18.2016px; height: 10.8136px; --clip-path: polygon(-59% 42%, 51% 57%, 233% -69%, 127% 120%); background-size: 18.2016px 21.6271px; animation-duration: 98s;"></div><div class="gradient-container gradient-up" data-x="0.8483760000000001" data-y="0.6660999999999999" data-width="0.054824000000000025" data-height="0.323883" style="left: 281.661px; top: 221.145px; width: 18.2016px; height: 107.529px; --clip-path: polygon(127% 2%, 233% -17%, 65% 100%, -21% 100%); background-size: 18.2016px 215.058px; animation-duration: 87s;"></div><div class="gradient-container gradient-up" data-x="0.8483760000000001" data-y="0.989983" data-width="0.054824000000000025" data-height="0.010016999999999991" style="left: 281.661px; top: 328.674px; width: 18.2016px; height: 3.32564px; --clip-path: polygon(-21% 0%, 65% 0%, 196% 100%, -86% 100%); background-size: 18.2016px 6.65129px; animation-duration: 69s;"></div><div class="gradient-container gradient-right" data-x="0.9031999999999999" data-y="0.37" data-width="0.05420799999999994" data-height="0.017009999999999997" style="left: 299.862px; top: 122.84px; width: 17.9971px; height: 5.64732px; --clip-path: polygon(-102% -308%, 43% -89%, 152% 376%, 4% 117%); background-size: 35.9941px 5.64732px; animation-duration: 42s;"></div><div class="gradient-container gradient-left" data-x="0.9031999999999999" data-y="0.38701" data-width="0.05420799999999994" data-height="0.045989999999999996" style="left: 299.862px; top: 128.487px; width: 17.9971px; height: 15.2687px; --clip-path: polygon(4% 6%, 152% 102%, 65% 230%, 23% 47%); background-size: 35.9941px 15.2687px; animation-duration: 35s;"></div><div class="gradient-container gradient-down" data-x="0.9574079999999999" data-y="0.37" data-width="0.04259199999999995" data-height="0.00441" style="left: 317.859px; top: 122.84px; width: 14.1405px; height: 1.46412px; --clip-path: polygon(-72% -342%, 100% -1699%, 100% 770%, 27% -1170%); background-size: 14.1405px 2.92824px; animation-duration: 90s;"></div><div class="gradient-container gradient-up" data-x="0.9574079999999999" data-y="0.37440999999999997" data-width="0.04259199999999995" data-height="0.058589999999999996" style="left: 317.859px; top: 124.304px; width: 14.1405px; height: 19.4519px; --clip-path: polygon(27% -96%, 100% 50%, 100% 43%, -45% 202%); background-size: 14.1405px 38.9038px; animation-duration: 65s;"></div><div class="gradient-container gradient-down" data-x="0.9031999999999999" data-y="0.433" data-width="0.09679999999999989" data-height="0.0567" style="left: 299.862px; top: 143.756px; width: 32.1376px; height: 18.8244px; --clip-path: polygon(13% -43%, 100% -59%, 100% 187%, 31% 165%); background-size: 32.1376px 37.6488px; animation-duration: 91s;"></div><div class="gradient-container gradient-left" data-x="0.9031999999999999" data-y="0.48969999999999997" data-width="0.09679999999999989" data-height="0.5103" style="left: 299.862px; top: 162.58px; width: 32.1376px; height: 169.42px; --clip-path: polygon(31% 7%, 100% 10%, 100% 100%, 55% 100%); background-size: 64.2752px 169.42px; animation-duration: 67s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>smear</title><style> * { margin: 0; padding: 0; box-sizing: border-box; } body, html { width: 100%; height: 100%; overflow: hidden; background: #000; } smear-partition { display: block; width: 100%; height: 100%; position: relative; } smear-canvas { display: block; position: absolute; } smear-canvas canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: -moz-crisp-edges; image-rendering: crisp-edges; -ms-interpolation-mode: nearest-neighbor; } .smear-container { position: absolute; overflow: hidden; } .smear-container canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; } </style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="smear-container" data-x="0.5753628126801152" data-y="0.8589198703170028" data-width="0.42463718731988476" data-height="0.14108012968299713" data-start-edge="right" data-speed="39" data-source-interval="623" data-pixel-size="2" data-color-fg="#FF0000" data-color-bg="#FFFFFF" data-source-type="dots" style="left: 199.650896px; top: 298.045195px; width: 147.349104px; height: 48.954805px;"><canvas></canvas></div><div class="smear-container" data-x="0.1917338357348703" data-y="0" data-width="0.3836289798270894" data-height="0.27478484726224783" data-start-edge="bottom" data-speed="47" data-source-interval="508" data-pixel-size="5" data-color-fg="#800080" data-color-bg="#000000" data-source-type="dots" style="left: 66.531641px; top: 0px; width: 133.119256px; height: 95.350342px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0" data-width="0.1917338357348703" data-height="0.26872197118155616" data-start-edge="bottom" data-speed="85" data-source-interval="1731" data-pixel-size="3" data-color-fg="#FF0000" data-color-bg="#FFFFFF" data-source-type="dots" style="left: 0px; top: 0px; width: 66.531641px; height: 93.246524px;"><canvas></canvas></div><div class="smear-container" data-x="0.5753628126801152" data-y="0.7340724178674352" data-width="0.15371422478386168" data-height="0.12484745244956773" data-start-edge="left" data-speed="93" data-source-interval="702" data-pixel-size="3" data-color-fg="#FF0000" data-color-bg="#FFFFFF" data-source-type="dots" style="left: 199.650896px; top: 254.723129px; width: 53.338836px; height: 43.322066px;"><canvas></canvas></div><div class="smear-container" data-x="0.729077037463977" data-y="0.7340724178674352" data-width="0.27092296253602305" data-height="0.12484745244956773" data-start-edge="right" data-speed="48" data-source-interval="1246" data-pixel-size="5" data-color-fg="#FF0000" data-color-bg="#FFFFFF" data-source-type="dots" style="left: 252.989732px; top: 254.723129px; width: 94.010268px; height: 43.322066px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.8220030489913545" data-width="0.1917338357348703" data-height="0.17799695100864552" data-start-edge="top" data-speed="70" data-source-interval="1082" data-pixel-size="3" data-color-fg="#FF0000" data-color-bg="#FFFFFF" data-source-type="dots" style="left: 0px; top: 285.235058px; width: 66.531641px; height: 61.764942px;"><canvas></canvas></div><div class="smear-container" data-x="0.7023853919308357" data-y="0" data-width="0.29761460806916423" data-height="0.4733467118155619" data-start-edge="top" data-speed="26" data-source-interval="1546" data-pixel-size="1" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 243.727731px; top: 0px; width: 103.272269px; height: 164.251309px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.26872197118155616" data-width="0.13432648126801153" data-height="0.5532810778097982" data-start-edge="bottom" data-speed="81" data-source-interval="1833" data-pixel-size="2" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 0px; top: 93.246524px; width: 46.611289px; height: 191.988534px;"><canvas></canvas></div><div class="smear-container" data-x="0.13432648126801153" data-y="0.26872197118155616" data-width="0.057407354466858795" data-height="0.5532810778097982" data-start-edge="bottom" data-speed="88" data-source-interval="1692" data-pixel-size="3" data-color-fg="#FF0000" data-color-bg="#FFFFFF" data-source-type="dots" style="left: 46.611289px; top: 93.246524px; width: 19.920352px; height: 191.988534px;"><canvas></canvas></div><div class="smear-container" data-x="0.9008851556195965" data-y="0.4733467118155619" data-width="0.09911484438040345" data-height="0.2607257031700288" data-start-edge="top" data-speed="37" data-source-interval="531" data-pixel-size="3" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 312.607149px; top: 164.251309px; width: 34.392851px; height: 90.471819px;"><canvas></canvas></div><div class="smear-container" data-x="0.1917338357348703" data-y="0.844405386167147" data-width="0.20698562824207492" data-height="0.15559461383285303" data-start-edge="top" data-speed="68" data-source-interval="953" data-pixel-size="1" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 66.531641px; top: 293.008669px; width: 71.824013px; height: 53.991331px;"><canvas></canvas></div><div class="smear-container" data-x="0.3987194639769452" data-y="0.844405386167147" data-width="0.17664334870317003" data-height="0.15559461383285303" data-start-edge="bottom" data-speed="74" data-source-interval="1215" data-pixel-size="2" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 138.355654px; top: 293.008669px; width: 61.295242px; height: 53.991331px;"><canvas></canvas></div><div class="smear-container" data-x="0.5753628126801152" data-y="0.4733467118155619" data-width="0.23970009798270892" data-height="0.2607257031700288" data-start-edge="top" data-speed="33" data-source-interval="1623" data-pixel-size="1" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 199.650896px; top: 164.251309px; width: 83.175934px; height: 90.471819px;"><canvas></canvas></div><div class="smear-container" data-x="0.8150629106628241" data-y="0.4733467118155619" data-width="0.08582224783861671" data-height="0.2607257031700288" data-start-edge="left" data-speed="75" data-source-interval="1205" data-pixel-size="5" data-color-fg="#FF0000" data-color-bg="#FFFFFF" data-source-type="dots" style="left: 282.82683px; top: 164.251309px; width: 29.78032px; height: 90.471819px;"><canvas></canvas></div><div class="smear-container" data-x="0.1917338357348703" data-y="0.27478484726224783" data-width="0.3836289798270894" data-height="0.14758449279538904" data-start-edge="left" data-speed="41" data-source-interval="574" data-pixel-size="5" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 66.531641px; top: 95.350342px; width: 133.119256px; height: 51.211819px;"><canvas></canvas></div><div class="smear-container" data-x="0.1917338357348703" data-y="0.4223693400576369" data-width="0.3836289798270894" data-height="0.099809530259366" data-start-edge="left" data-speed="92" data-source-interval="1404" data-pixel-size="5" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 66.531641px; top: 146.562161px; width: 133.119256px; height: 34.633907px;"><canvas></canvas></div><div class="smear-container" data-x="0.1917338357348703" data-y="0.5221788703170028" data-width="0.3836289798270894" data-height="0.24714436887608068" data-start-edge="bottom" data-speed="93" data-source-interval="1575" data-pixel-size="3" data-color-fg="#FF0000" data-color-bg="#FFFFFF" data-source-type="dots" style="left: 66.531641px; top: 181.196068px; width: 133.119256px; height: 85.759096px;"><canvas></canvas></div><div class="smear-container" data-x="0.1917338357348703" data-y="0.7693232363112392" data-width="0.3836289798270894" data-height="0.07508214985590778" data-start-edge="top" data-speed="72" data-source-interval="1048" data-pixel-size="1" data-color-fg="#800080" data-color-bg="#000000" data-source-type="dots" style="left: 66.531641px; top: 266.955163px; width: 133.119256px; height: 26.053506px;"><canvas></canvas></div><div class="smear-container" data-x="0.5753628126801152" data-y="0" data-width="0.12702257925072047" data-height="0.22394925360230547" data-start-edge="top" data-speed="77" data-source-interval="1136" data-pixel-size="2" data-color-fg="#800080" data-color-bg="#000000" data-source-type="dots" style="left: 199.650896px; top: 0px; width: 44.076835px; height: 77.710391px;"><canvas></canvas></div><div class="smear-container" data-x="0.5753628126801152" data-y="0.22394925360230547" data-width="0.12702257925072047" data-height="0.2493974582132565" data-start-edge="left" data-speed="40" data-source-interval="559" data-pixel-size="5" data-color-fg="#FF0000" data-color-bg="#FFFFFF" data-source-type="dots" style="left: 199.650896px; top: 77.710391px; width: 44.076835px; height: 86.540918px;"><canvas></canvas></div></div><script> class SmearCanvas { constructor(c) { this.container = c; this.canvas = c.querySelector("canvas") || document.createElement("canvas"); if (!c.querySelector("canvas")) c.appendChild(this.canvas); this.ctx = this.canvas.getContext("2d"); this.ctx.imageSmoothingEnabled = false; this.imageData = null; this.lastTime = 0; this.animationId = null; this.speed = parseInt(c.dataset.speed) || 50; this.pixelSize = parseInt(c.dataset.pixelSize) || 2; this.sourceInterval = parseInt(c.dataset.sourceInterval) || 1000; this.colorFg = c.dataset.colorFg || "#FFFFFF"; this.colorBg = c.dataset.colorBg || "#000000"; this.sourceType = c.dataset.sourceType || "noise"; this.startEdge = c.dataset.startEdge || "top"; this.fgRGB = this.hexToRGB(this.colorFg); this.bgRGB = this.hexToRGB(this.colorBg); this.moveSpeed = (1000 / 60) / this.speed; this.subPixelX = 0; this.subPixelY = 0; this.leadX = 0; this.leadY = 0; this.initDirection(); this.lastDirectionChange = 0; this.nextDirectionInterval = this.randomInterval(); this.sourceParams = this.generateSourceParams(); this.lastSourceTime = 0; this.resize(); this.initCanvas(); this.generateSourceEdge(); this.initLeadPosition(); this.startAnimation(); this.resizeObserver = new ResizeObserver(() => this.resize()); this.resizeObserver.observe(this.container); } generateSourceParams() { return { steps: 3 + Math.floor(Math.random() * 6), stripeWidth: 2 + Math.floor(Math.random() * 8), checkSize: 1 + Math.floor(Math.random() * 4), phase: 0, dashLength: 3 + Math.floor(Math.random() * 10), gapLength: 2 + Math.floor(Math.random() * 6), density: 0.05 + Math.random() * 0.25, frequency: 1 + Math.random() * 4, sinePhase: Math.random() * Math.PI * 2, seed1: Math.random() * 100, seed2: Math.random() * 100, seed3: Math.random() * 100, counter: Math.floor(Math.random() * 65536), caRule: Math.random() > 0.5 ? 30 : 110 }; } initDirection() { switch (this.startEdge) { case "top": this.dx = 0; this.dy = 1; break; case "bottom": this.dx = 0; this.dy = -1; break; case "left": this.dx = 1; this.dy = 0; break; case "right": this.dx = -1; this.dy = 0; break; default: this.dx = 0; this.dy = 1; } } initLeadPosition() { switch (this.startEdge) { case "top": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = 1; break; case "bottom": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = this.internalHeight - 2; break; case "left": this.leadX = 1; this.leadY = Math.floor(this.internalHeight / 2); break; case "right": this.leadX = this.internalWidth - 2; this.leadY = Math.floor(this.internalHeight / 2); break; } } resize() { var rect = this.container.getBoundingClientRect(); if (rect.width === 0 || rect.height === 0) return; this.internalWidth = Math.ceil(rect.width / this.pixelSize); this.internalHeight = Math.ceil(rect.height / this.pixelSize); var oldImageData = this.imageData; var oldWidth = this.canvas.width; var oldHeight = this.canvas.height; this.canvas.width = this.internalWidth; this.canvas.height = this.internalHeight; this.imageData = this.ctx.createImageData(this.internalWidth, this.internalHeight); if (oldImageData && oldWidth > 0 && oldHeight > 0) { var minW = Math.min(oldWidth, this.internalWidth); var minH = Math.min(oldHeight, this.internalHeight); for (var y = 0; y < minH; y++) { for (var x = 0; x < minW; x++) { var oi = (y * oldWidth + x) * 4; var ni = (y * this.internalWidth + x) * 4; this.imageData.data[ni] = oldImageData.data[oi]; this.imageData.data[ni + 1] = oldImageData.data[oi + 1]; this.imageData.data[ni + 2] = oldImageData.data[oi + 2]; this.imageData.data[ni + 3] = oldImageData.data[oi + 3]; } } } } hexToRGB(hex) { var r = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); return r ? { r: parseInt(r[1], 16), g: parseInt(r[2], 16), b: parseInt(r[3], 16) } : { r: 255, g: 255, b: 255 }; } lerpColor(t) { return { r: Math.round(this.bgRGB.r + (this.fgRGB.r - this.bgRGB.r) * t), g: Math.round(this.bgRGB.g + (this.fgRGB.g - this.bgRGB.g) * t), b: Math.round(this.bgRGB.b + (this.fgRGB.b - this.bgRGB.b) * t) }; } getSourceValue(pos, length) { var t = pos / length; switch (this.sourceType) { case "noise": return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; case "linear-gradient": return this.lerpColor(t); case "stepped-gradient": var steps = this.sourceParams.steps || 5; return this.lerpColor(Math.floor(t * steps) / (steps - 1)); case "random-gradient": if (!this.gradientCache || this.gradientCache.length !== length) this.generateRandomGradient(length); return this.lerpColor(this.gradientCache[pos]); case "stripes": return (Math.floor(pos / (this.sourceParams.stripeWidth || 4)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "checkerboard": return ((Math.floor(pos / (this.sourceParams.checkSize || 2)) + (this.sourceParams.phase || 0)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "dashes": var cycle = (this.sourceParams.dashLength || 6) + (this.sourceParams.gapLength || 3); return (pos % cycle < (this.sourceParams.dashLength || 6)) ? this.fgRGB : this.bgRGB; case "dots": return Math.random() < (this.sourceParams.density || 0.15) ? this.fgRGB : this.bgRGB; case "sine": var sv = (Math.sin((t * (this.sourceParams.frequency || 2) * Math.PI * 2) + (this.sourceParams.sinePhase || 0)) + 1) / 2; return this.lerpColor(sv); case "perlin": var p1 = Math.sin(t * 3.7 + this.sourceParams.seed1) * 0.5; var p2 = Math.sin(t * 7.3 + this.sourceParams.seed2) * 0.25; var p3 = Math.sin(t * 13.1 + this.sourceParams.seed3) * 0.125; return this.lerpColor(Math.max(0, Math.min(1, (p1 + p2 + p3 + 0.875) / 1.75))); case "binary-counter": return ((this.sourceParams.counter >> (pos % 16)) & 1) ? this.fgRGB : this.bgRGB; case "cellular-automata": if (!this.caState || this.caState.length !== length) this.initCellularAutomata(length); return this.caState[pos] ? this.fgRGB : this.bgRGB; default: return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; } } generateRandomGradient(length) { var np = 3 + Math.floor(Math.random() * 4); var cp = [0]; for (var i = 1; i < np - 1; i++) cp.push(Math.random()); cp.push(1); cp.sort((a, b) => a - b); var cv = cp.map(() => Math.random()); this.gradientCache = []; for (var i = 0; i < length; i++) { var t = i / length; var si = 0; for (var j = 0; j < cp.length - 1; j++) { if (t >= cp[j] && t <= cp[j + 1]) { si = j; break; } } var st = (t - cp[si]) / (cp[si + 1] - cp[si]); this.gradientCache.push(cv[si] + (cv[si + 1] - cv[si]) * st); } } initCellularAutomata(length) { this.caState = []; for (var i = 0; i < length; i++) this.caState.push(Math.random() > 0.5); } evolveCellularAutomata() { if (!this.caState) return; var rule = this.sourceParams.caRule || 30; var os = [...this.caState]; var len = this.caState.length; for (var i = 0; i < len; i++) { var p = (os[(i - 1 + len) % len] ? 4 : 0) + (os[i] ? 2 : 0) + (os[(i + 1) % len] ? 1 : 0); this.caState[i] = ((rule >> p) & 1) === 1; } } updateSourceParams() { switch (this.sourceType) { case "checkerboard": this.sourceParams.phase = (this.sourceParams.phase + 1) % 2; break; case "sine": this.sourceParams.sinePhase += 0.5; break; case "binary-counter": this.sourceParams.counter++; break; case "cellular-automata": this.evolveCellularAutomata(); break; case "random-gradient": this.gradientCache = null; break; case "perlin": this.sourceParams.seed1 += 0.3; this.sourceParams.seed2 += 0.2; this.sourceParams.seed3 += 0.1; break; } } randomInterval() { return 100 + Math.random() * 900; } changeDirection() { var dirs = [[0, 1], [1, 1], [1, 0], [1, -1], [0, -1], [-1, -1], [-1, 0], [-1, 1]]; var idx = dirs.findIndex(d => d[0] === this.dx && d[1] === this.dy); if (idx === -1) idx = 0; idx = Math.random() > 0.5 ? (idx + 1) % 8 : (idx + 7) % 8; this.dx = dirs[idx][0]; this.dy = dirs[idx][1]; } initCanvas() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var isH = (this.startEdge === "top" || this.startEdge === "bottom"); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { var idx = (y * w + x) * 4; var col = this.getSourceValue(isH ? x : y, isH ? w : h); data[idx] = col.r; data[idx + 1] = col.g; data[idx + 2] = col.b; data[idx + 3] = 255; } } this.ctx.putImageData(this.imageData, 0, 0); } generateSourceEdge() { if (!this.imageData) return; this.updateSourceParams(); var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var gen = (getIdx, len) => { for (var i = 0; i < len; i++) { var idx = getIdx(i); var c = this.getSourceValue(i, len); data[idx] = c.r; data[idx + 1] = c.g; data[idx + 2] = c.b; data[idx + 3] = 255; } }; switch (this.startEdge) { case "top": gen(x => x * 4, w); break; case "bottom": gen(x => ((h - 1) * w + x) * 4, w); break; case "left": gen(y => (y * w) * 4, h); break; case "right": gen(y => (y * w + (w - 1)) * 4, h); break; } } getSourceEdgeCoord(x, y) { switch (this.startEdge) { case "top": return y === 0; case "bottom": return y === this.internalHeight - 1; case "left": return x === 0; case "right": return x === this.internalWidth - 1; } return false; } smear() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; this.subPixelX += this.dx * this.moveSpeed; this.subPixelY += this.dy * this.moveSpeed; var moveX = Math.trunc(this.subPixelX), moveY = Math.trunc(this.subPixelY); if (moveX === 0 && moveY === 0) return; this.subPixelX -= moveX; this.subPixelY -= moveY; this.leadX += moveX; this.leadY += moveY; if (this.leadX <= 0 || this.leadX >= w - 1) { this.dx = -this.dx; this.leadX = Math.max(0, Math.min(w - 1, this.leadX)); } if (this.leadY <= 0 || this.leadY >= h - 1) { this.dy = -this.dy; this.leadY = Math.max(0, Math.min(h - 1, this.leadY)); } var oldData = new Uint8ClampedArray(data); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { if (this.getSourceEdgeCoord(x, y)) continue; var srcX = Math.max(0, Math.min(w - 1, x - moveX)); var srcY = Math.max(0, Math.min(h - 1, y - moveY)); var dstIdx = (y * w + x) * 4, srcIdx = (srcY * w + srcX) * 4; data[dstIdx] = oldData[srcIdx]; data[dstIdx + 1] = oldData[srcIdx + 1]; data[dstIdx + 2] = oldData[srcIdx + 2]; data[dstIdx + 3] = oldData[srcIdx + 3]; } } } startAnimation() { var fi = 1000 / 60; var animate = (ts) => { if (!this.lastTime) this.lastTime = ts; if (!this.lastSourceTime) this.lastSourceTime = ts; if (!this.lastDirectionChange) this.lastDirectionChange = ts; if (ts - this.lastDirectionChange >= this.nextDirectionInterval) { this.changeDirection(); this.lastDirectionChange = ts; this.nextDirectionInterval = this.randomInterval(); } if (ts - this.lastSourceTime >= this.sourceInterval) { this.generateSourceEdge(); this.lastSourceTime = ts; } if (ts - this.lastTime >= fi) { this.smear(); if (this.imageData) this.ctx.putImageData(this.imageData, 0, 0); this.lastTime = ts; } this.animationId = requestAnimationFrame(animate); }; this.animationId = requestAnimationFrame(animate); } } function layoutSmears() { var vw = window.innerWidth, vh = window.innerHeight; document.querySelectorAll(".smear-container").forEach(function(div) { var x = parseFloat(div.dataset.x || 0); var y = parseFloat(div.dataset.y || 0); var w = parseFloat(div.dataset.width || 0); var h = parseFloat(div.dataset.height || 0); div.style.left = (x * vw) + "px"; div.style.top = (y * vh) + "px"; div.style.width = (w * vw) + "px"; div.style.height = (h * vh) + "px"; }); } function initSmears() { document.querySelectorAll(".smear-container").forEach(function(c) { if (!c._smearInstance) c._smearInstance = new SmearCanvas(c); }); } window.addEventListener("load", function() { layoutSmears(); initSmears(); }); window.addEventListener("resize", layoutSmears); layoutSmears(); initSmears(); </script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#0600ff;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#83a1cd;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#00ffea;--color3-2:#000;--color4-1:#c6c6c6;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #0600ff; --color2-1: #83a1cd; --color3-1: #00ffea; --color4-1: #c6c6c6;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-down" data-x="0" data-y="0" data-width="0.61" data-height="0.78" style="left: 0px; top: 0px; width: 211.67px; height: 270.66px; --clip-path: polygon(0% 0%, 95% 0%, 104% 97%, 0% 97%); background-size: 211.67px 541.32px; animation-duration: 80s;"></div><div class="gradient-container gradient-up" data-x="0" data-y="0.78" data-width="0.61" data-height="0.21999999999999992" style="left: 0px; top: 270.66px; width: 211.67px; height: 76.34px; --clip-path: polygon(0% -10%, 104% -11%, 93% 100%, 0% 100%); background-size: 211.67px 152.68px; animation-duration: 77s;"></div><div class="gradient-container gradient-down" data-x="0.61" data-y="0" data-width="0.08190000000000001" data-height="0.08299999999999999" style="left: 211.67px; top: 0px; width: 28.4193px; height: 28.801px; --clip-path: polygon(-39% 0%, 87% 0%, 123% 49%, 72% 187%); background-size: 28.4193px 57.602px; animation-duration: 75s;"></div><div class="gradient-container gradient-down" data-x="0.6919" data-y="0" data-width="0.0156" data-height="0.04316" style="left: 240.0893px; top: 0px; width: 5.4132px; height: 14.97652px; --clip-path: polygon(-67% 0%, -303% 0%, -397% -37%, -253% 4%); background-size: 5.4132px 29.95304px; animation-duration: 77s;"></div><div class="gradient-container gradient-left" data-x="0.6919" data-y="0.04316" data-width="0.0156" data-height="0.03984" style="left: 240.0893px; top: 14.97652px; width: 5.4132px; height: 13.82448px; --clip-path: polygon(-253% -104%, -397% -148%, 521% 126%, 122% -6%); background-size: 10.8264px 13.82448px; animation-duration: 36s;"></div><div class="gradient-container gradient-up" data-x="0.7075" data-y="0" data-width="0.08190000000000001" data-height="0.08299999999999999" style="left: 245.5025px; top: 0px; width: 28.4193px; height: 28.801px; --clip-path: polygon(-77% 0%, 65% 0%, 151% 97%, 80% 112%); background-size: 28.4193px 57.602px; animation-duration: 87s;"></div><div class="gradient-container gradient-right" data-x="0.7894000000000001" data-y="0" data-width="0.02106" data-height="0.08299999999999999" style="left: 273.9218px; top: 0px; width: 7.30782px; height: 28.801px; --clip-path: polygon(-136% 0%, -66% 0%, 44% 108%, 199% 97%); background-size: 14.61564px 28.801px; animation-duration: 94s;"></div><div class="gradient-container gradient-down" data-x="0.8104600000000001" data-y="0" data-width="0.18953999999999996" data-height="0.08299999999999999" style="left: 281.22962px; top: 0px; width: 65.77038px; height: 28.801px; --clip-path: polygon(-18% 0%, 100% 0%, 100% 82%, -6% 108%); background-size: 65.77038px 57.602px; animation-duration: 53s;"></div><div class="gradient-container gradient-down" data-x="0.61" data-y="0.08299999999999999" data-width="0.1521" data-height="0.0825435" style="left: 211.67px; top: 28.801px; width: 52.7787px; height: 28.642595px; --clip-path: polygon(39% 87%, 65% -87%, 115% 177%, 52% 51%); background-size: 52.7787px 57.285189px; animation-duration: 92s;"></div><div class="gradient-container gradient-down" data-x="0.7620999999999999" data-y="0.08299999999999999" data-width="0.2379" data-height="0.0825435" style="left: 264.4487px; top: 28.801px; width: 82.5513px; height: 28.642595px; --clip-path: polygon(-23% -87%, 100% -18%, 100% 114%, 9% 177%); background-size: 82.5513px 57.285189px; animation-duration: 34s;"></div><div class="gradient-container gradient-right" data-x="0.61" data-y="0.1655435" data-width="0.39" data-height="0.055240649999999995" style="left: 211.67px; top: 57.443595px; width: 135.33px; height: 19.168506px; --clip-path: polygon(20% -74%, 100% 21%, 100% 240%, 17% 21%); background-size: 270.66px 19.168506px; animation-duration: 52s;"></div><div class="gradient-container gradient-up" data-x="0.61" data-y="0.22078415000000004" data-width="0.39" data-height="0.49716585" style="left: 211.67px; top: 76.6121px; width: 135.33px; height: 172.51655px; --clip-path: polygon(17% -9%, 100% 16%, 100% 106%, 20% 102%); background-size: 135.33px 345.0331px; animation-duration: 15s;"></div><div class="gradient-container gradient-right" data-x="0.61" data-y="0.71795" data-width="0.39" data-height="0.11205" style="left: 211.67px; top: 249.12865px; width: 135.33px; height: 38.88135px; --clip-path: polygon(20% 9%, 100% 28%, 100% 126%, 5% 60%); background-size: 270.66px 38.88135px; animation-duration: 2s;"></div><div class="gradient-container gradient-left" data-x="0.61" data-y="0.83" data-width="0.049037040000000004" data-height="0.136" style="left: 211.67px; top: 288.01px; width: 17.015853px; height: 47.192px; --clip-path: polygon(39% -33%, 72% 23%, -24% 96%, 124% 67%); background-size: 34.031706px 47.192px; animation-duration: 97s;"></div><div class="gradient-container gradient-up" data-x="0.65903704" data-y="0.83" data-width="0.10914696000000002" data-height="0.136" style="left: 228.685853px; top: 288.01px; width: 37.873995px; height: 47.192px; --clip-path: polygon(-13% 23%, 86% 14%, 73% 124%, -56% 96%); background-size: 37.873995px 94.384px; animation-duration: 82s;"></div><div class="gradient-container gradient-up" data-x="0.61" data-y="0.966" data-width="0.09174672000000002" data-height="0.034" style="left: 211.67px; top: 335.202px; width: 31.836112px; height: 11.798px; --clip-path: polygon(66% -133%, 169% 143%, 44% 100%, -47% 100%); background-size: 31.836112px 23.596px; animation-duration: 23s;"></div><div class="gradient-container gradient-down" data-x="0.7017467199999999" data-y="0.966" data-width="0.06643728000000002" data-height="0.034" style="left: 243.506112px; top: 335.202px; width: 23.053736px; height: 11.798px; --clip-path: polygon(96% 143%, 55% 96%, 172% 100%, -78% 100%); background-size: 23.053736px 23.596px; animation-duration: 12s;"></div><div class="gradient-container gradient-left" data-x="0.768184" data-y="0.83" data-width="0.14601600000000003" data-height="0.17000000000000004" style="left: 266.559848px; top: 288.01px; width: 50.667552px; height: 58.99px; --clip-path: polygon(-11% 11%, 64% 8%, 122% 100%, 33% 100%); background-size: 101.335104px 58.99px; animation-duration: 94s;"></div><div class="gradient-container gradient-up" data-x="0.9142" data-y="0.83" data-width="0.08579999999999999" data-height="0.17000000000000004" style="left: 317.2274px; top: 288.01px; width: 29.7726px; height: 58.99px; --clip-path: polygon(-62% 8%, 100% 17%, 100% 100%, 37% 100%); background-size: 29.7726px 117.98px; animation-duration: 95s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>smear</title><style> * { margin: 0; padding: 0; box-sizing: border-box; } body, html { width: 100%; height: 100%; overflow: hidden; background: #000; } smear-partition { display: block; width: 100%; height: 100%; position: relative; } smear-canvas { display: block; position: absolute; } smear-canvas canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: -moz-crisp-edges; image-rendering: crisp-edges; -ms-interpolation-mode: nearest-neighbor; } .smear-container { position: absolute; overflow: hidden; } .smear-container canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; } </style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="smear-container" data-x="0" data-y="0" data-width="0.17157755616438355" data-height="0.6853990630136987" data-start-edge="bottom" data-speed="59" data-source-interval="873" data-pixel-size="5" data-color-fg="#FF0000" data-color-bg="#000000" data-source-type="checkerboard" style="left: 0px; top: 0px; width: 62.625808px; height: 250.170658px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.6853990630136987" data-width="0.17157755616438355" data-height="0.31460093698630137" data-start-edge="bottom" data-speed="94" data-source-interval="1603" data-pixel-size="4" data-color-fg="#FF0000" data-color-bg="#FFFFFF" data-source-type="checkerboard" style="left: 0px; top: 250.170658px; width: 62.625808px; height: 114.829342px;"><canvas></canvas></div><div class="smear-container" data-x="0.17157755616438355" data-y="0" data-width="0.1812711095890411" data-height="0.22596465479452055" data-start-edge="bottom" data-speed="87" data-source-interval="1174" data-pixel-size="2" data-color-fg="#87CEEB" data-color-bg="#000000" data-source-type="checkerboard" style="left: 62.625808px; top: 0px; width: 66.163955px; height: 82.477099px;"><canvas></canvas></div><div class="smear-container" data-x="0.17157755616438355" data-y="0.22596465479452055" data-width="0.1812711095890411" data-height="0.1271549698630137" data-start-edge="top" data-speed="37" data-source-interval="1393" data-pixel-size="6" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="checkerboard" style="left: 62.625808px; top: 82.477099px; width: 66.163955px; height: 46.411564px;"><canvas></canvas></div><div class="smear-container" data-x="0.17157755616438355" data-y="0.35311962465753427" data-width="0.1812711095890411" data-height="0.24369657260273972" data-start-edge="top" data-speed="34" data-source-interval="1086" data-pixel-size="2" data-color-fg="#0000FF" data-color-bg="#FF69B4" data-source-type="checkerboard" style="left: 62.625808px; top: 128.888663px; width: 66.163955px; height: 88.949249px;"><canvas></canvas></div><div class="smear-container" data-x="0.17157755616438355" data-y="0.5968161972602739" data-width="0.1812711095890411" data-height="0.21269801369863015" data-start-edge="bottom" data-speed="62" data-source-interval="1769" data-pixel-size="2" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="checkerboard" style="left: 62.625808px; top: 217.837912px; width: 66.163955px; height: 77.634775px;"><canvas></canvas></div><div class="smear-container" data-x="0.17157755616438355" data-y="0.8095142082191781" data-width="0.1812711095890411" data-height="0.19048579178082192" data-start-edge="left" data-speed="68" data-source-interval="668" data-pixel-size="2" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="checkerboard" style="left: 62.625808px; top: 295.472686px; width: 66.163955px; height: 69.527314px;"><canvas></canvas></div><div class="smear-container" data-x="0.3528486630136986" data-y="0" data-width="0.20933338630136986" data-height="0.18086316164383565" data-start-edge="top" data-speed="28" data-source-interval="1766" data-pixel-size="4" data-color-fg="#FF8000" data-color-bg="#000000" data-source-type="checkerboard" style="left: 128.789762px; top: 0px; width: 76.406686px; height: 66.015054px;"><canvas></canvas></div><div class="smear-container" data-x="0.3528486630136986" data-y="0.18086316164383565" data-width="0.20933338630136986" data-height="0.32483880547945204" data-start-edge="bottom" data-speed="33" data-source-interval="910" data-pixel-size="5" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="checkerboard" style="left: 128.789762px; top: 66.015054px; width: 76.406686px; height: 118.566164px;"><canvas></canvas></div><div class="smear-container" data-x="0.3528486630136986" data-y="0.5057019643835616" data-width="0.20933338630136986" data-height="0.17712600547945206" data-start-edge="left" data-speed="80" data-source-interval="1032" data-pixel-size="4" data-color-fg="#0000FF" data-color-bg="#000000" data-source-type="checkerboard" style="left: 128.789762px; top: 184.581217px; width: 76.406686px; height: 64.650992px;"><canvas></canvas></div><div class="smear-container" data-x="0.3528486630136986" data-y="0.6828279726027398" data-width="0.20933338630136986" data-height="0.3171720273972603" data-start-edge="right" data-speed="31" data-source-interval="826" data-pixel-size="5" data-color-fg="#FF0000" data-color-bg="#000000" data-source-type="checkerboard" style="left: 128.789762px; top: 249.23221px; width: 76.406686px; height: 115.76779px;"><canvas></canvas></div><div class="smear-container" data-x="0.5621820493150685" data-y="0" data-width="0.22322151780821917" data-height="1" data-start-edge="right" data-speed="90" data-source-interval="732" data-pixel-size="4" data-color-fg="#0000FF" data-color-bg="#666666" data-source-type="checkerboard" style="left: 205.196448px; top: 0px; width: 81.475854px; height: 365px;"><canvas></canvas></div><div class="smear-container" data-x="0.7854035698630137" data-y="0" data-width="0.21459643013698632" data-height="1" data-start-edge="top" data-speed="59" data-source-interval="1701" data-pixel-size="4" data-color-fg="#FF0000" data-color-bg="#FFFFFF" data-source-type="checkerboard" style="left: 286.672303px; top: 0px; width: 78.327697px; height: 365px;"><canvas></canvas></div></div><script> class SmearCanvas { constructor(c) { this.container = c; this.canvas = c.querySelector("canvas") || document.createElement("canvas"); if (!c.querySelector("canvas")) c.appendChild(this.canvas); this.ctx = this.canvas.getContext("2d"); this.ctx.imageSmoothingEnabled = false; this.imageData = null; this.lastTime = 0; this.animationId = null; this.speed = parseInt(c.dataset.speed) || 50; this.pixelSize = parseInt(c.dataset.pixelSize) || 2; this.sourceInterval = parseInt(c.dataset.sourceInterval) || 1000; this.colorFg = c.dataset.colorFg || "#FFFFFF"; this.colorBg = c.dataset.colorBg || "#000000"; this.sourceType = c.dataset.sourceType || "noise"; this.startEdge = c.dataset.startEdge || "top"; this.fgRGB = this.hexToRGB(this.colorFg); this.bgRGB = this.hexToRGB(this.colorBg); this.moveSpeed = (1000 / 60) / this.speed; this.subPixelX = 0; this.subPixelY = 0; this.leadX = 0; this.leadY = 0; this.initDirection(); this.lastDirectionChange = 0; this.nextDirectionInterval = this.randomInterval(); this.sourceParams = this.generateSourceParams(); this.lastSourceTime = 0; this.resize(); this.initCanvas(); this.generateSourceEdge(); this.initLeadPosition(); this.startAnimation(); this.resizeObserver = new ResizeObserver(() => this.resize()); this.resizeObserver.observe(this.container); } generateSourceParams() { return { steps: 3 + Math.floor(Math.random() * 6), stripeWidth: 2 + Math.floor(Math.random() * 8), checkSize: 1 + Math.floor(Math.random() * 4), phase: 0, dashLength: 3 + Math.floor(Math.random() * 10), gapLength: 2 + Math.floor(Math.random() * 6), density: 0.05 + Math.random() * 0.25, frequency: 1 + Math.random() * 4, sinePhase: Math.random() * Math.PI * 2, seed1: Math.random() * 100, seed2: Math.random() * 100, seed3: Math.random() * 100, counter: Math.floor(Math.random() * 65536), caRule: Math.random() > 0.5 ? 30 : 110 }; } initDirection() { switch (this.startEdge) { case "top": this.dx = 0; this.dy = 1; break; case "bottom": this.dx = 0; this.dy = -1; break; case "left": this.dx = 1; this.dy = 0; break; case "right": this.dx = -1; this.dy = 0; break; default: this.dx = 0; this.dy = 1; } } initLeadPosition() { switch (this.startEdge) { case "top": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = 1; break; case "bottom": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = this.internalHeight - 2; break; case "left": this.leadX = 1; this.leadY = Math.floor(this.internalHeight / 2); break; case "right": this.leadX = this.internalWidth - 2; this.leadY = Math.floor(this.internalHeight / 2); break; } } resize() { var rect = this.container.getBoundingClientRect(); if (rect.width === 0 || rect.height === 0) return; this.internalWidth = Math.ceil(rect.width / this.pixelSize); this.internalHeight = Math.ceil(rect.height / this.pixelSize); var oldImageData = this.imageData; var oldWidth = this.canvas.width; var oldHeight = this.canvas.height; this.canvas.width = this.internalWidth; this.canvas.height = this.internalHeight; this.imageData = this.ctx.createImageData(this.internalWidth, this.internalHeight); if (oldImageData && oldWidth > 0 && oldHeight > 0) { var minW = Math.min(oldWidth, this.internalWidth); var minH = Math.min(oldHeight, this.internalHeight); for (var y = 0; y < minH; y++) { for (var x = 0; x < minW; x++) { var oi = (y * oldWidth + x) * 4; var ni = (y * this.internalWidth + x) * 4; this.imageData.data[ni] = oldImageData.data[oi]; this.imageData.data[ni + 1] = oldImageData.data[oi + 1]; this.imageData.data[ni + 2] = oldImageData.data[oi + 2]; this.imageData.data[ni + 3] = oldImageData.data[oi + 3]; } } } } hexToRGB(hex) { var r = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); return r ? { r: parseInt(r[1], 16), g: parseInt(r[2], 16), b: parseInt(r[3], 16) } : { r: 255, g: 255, b: 255 }; } lerpColor(t) { return { r: Math.round(this.bgRGB.r + (this.fgRGB.r - this.bgRGB.r) * t), g: Math.round(this.bgRGB.g + (this.fgRGB.g - this.bgRGB.g) * t), b: Math.round(this.bgRGB.b + (this.fgRGB.b - this.bgRGB.b) * t) }; } getSourceValue(pos, length) { var t = pos / length; switch (this.sourceType) { case "noise": return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; case "linear-gradient": return this.lerpColor(t); case "stepped-gradient": var steps = this.sourceParams.steps || 5; return this.lerpColor(Math.floor(t * steps) / (steps - 1)); case "random-gradient": if (!this.gradientCache || this.gradientCache.length !== length) this.generateRandomGradient(length); return this.lerpColor(this.gradientCache[pos]); case "stripes": return (Math.floor(pos / (this.sourceParams.stripeWidth || 4)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "checkerboard": return ((Math.floor(pos / (this.sourceParams.checkSize || 2)) + (this.sourceParams.phase || 0)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "dashes": var cycle = (this.sourceParams.dashLength || 6) + (this.sourceParams.gapLength || 3); return (pos % cycle < (this.sourceParams.dashLength || 6)) ? this.fgRGB : this.bgRGB; case "dots": return Math.random() < (this.sourceParams.density || 0.15) ? this.fgRGB : this.bgRGB; case "sine": var sv = (Math.sin((t * (this.sourceParams.frequency || 2) * Math.PI * 2) + (this.sourceParams.sinePhase || 0)) + 1) / 2; return this.lerpColor(sv); case "perlin": var p1 = Math.sin(t * 3.7 + this.sourceParams.seed1) * 0.5; var p2 = Math.sin(t * 7.3 + this.sourceParams.seed2) * 0.25; var p3 = Math.sin(t * 13.1 + this.sourceParams.seed3) * 0.125; return this.lerpColor(Math.max(0, Math.min(1, (p1 + p2 + p3 + 0.875) / 1.75))); case "binary-counter": return ((this.sourceParams.counter >> (pos % 16)) & 1) ? this.fgRGB : this.bgRGB; case "cellular-automata": if (!this.caState || this.caState.length !== length) this.initCellularAutomata(length); return this.caState[pos] ? this.fgRGB : this.bgRGB; default: return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; } } generateRandomGradient(length) { var np = 3 + Math.floor(Math.random() * 4); var cp = [0]; for (var i = 1; i < np - 1; i++) cp.push(Math.random()); cp.push(1); cp.sort((a, b) => a - b); var cv = cp.map(() => Math.random()); this.gradientCache = []; for (var i = 0; i < length; i++) { var t = i / length; var si = 0; for (var j = 0; j < cp.length - 1; j++) { if (t >= cp[j] && t <= cp[j + 1]) { si = j; break; } } var st = (t - cp[si]) / (cp[si + 1] - cp[si]); this.gradientCache.push(cv[si] + (cv[si + 1] - cv[si]) * st); } } initCellularAutomata(length) { this.caState = []; for (var i = 0; i < length; i++) this.caState.push(Math.random() > 0.5); } evolveCellularAutomata() { if (!this.caState) return; var rule = this.sourceParams.caRule || 30; var os = [...this.caState]; var len = this.caState.length; for (var i = 0; i < len; i++) { var p = (os[(i - 1 + len) % len] ? 4 : 0) + (os[i] ? 2 : 0) + (os[(i + 1) % len] ? 1 : 0); this.caState[i] = ((rule >> p) & 1) === 1; } } updateSourceParams() { switch (this.sourceType) { case "checkerboard": this.sourceParams.phase = (this.sourceParams.phase + 1) % 2; break; case "sine": this.sourceParams.sinePhase += 0.5; break; case "binary-counter": this.sourceParams.counter++; break; case "cellular-automata": this.evolveCellularAutomata(); break; case "random-gradient": this.gradientCache = null; break; case "perlin": this.sourceParams.seed1 += 0.3; this.sourceParams.seed2 += 0.2; this.sourceParams.seed3 += 0.1; break; } } randomInterval() { return 100 + Math.random() * 900; } changeDirection() { var dirs = [[0, 1], [1, 1], [1, 0], [1, -1], [0, -1], [-1, -1], [-1, 0], [-1, 1]]; var idx = dirs.findIndex(d => d[0] === this.dx && d[1] === this.dy); if (idx === -1) idx = 0; idx = Math.random() > 0.5 ? (idx + 1) % 8 : (idx + 7) % 8; this.dx = dirs[idx][0]; this.dy = dirs[idx][1]; } initCanvas() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var isH = (this.startEdge === "top" || this.startEdge === "bottom"); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { var idx = (y * w + x) * 4; var col = this.getSourceValue(isH ? x : y, isH ? w : h); data[idx] = col.r; data[idx + 1] = col.g; data[idx + 2] = col.b; data[idx + 3] = 255; } } this.ctx.putImageData(this.imageData, 0, 0); } generateSourceEdge() { if (!this.imageData) return; this.updateSourceParams(); var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var gen = (getIdx, len) => { for (var i = 0; i < len; i++) { var idx = getIdx(i); var c = this.getSourceValue(i, len); data[idx] = c.r; data[idx + 1] = c.g; data[idx + 2] = c.b; data[idx + 3] = 255; } }; switch (this.startEdge) { case "top": gen(x => x * 4, w); break; case "bottom": gen(x => ((h - 1) * w + x) * 4, w); break; case "left": gen(y => (y * w) * 4, h); break; case "right": gen(y => (y * w + (w - 1)) * 4, h); break; } } getSourceEdgeCoord(x, y) { switch (this.startEdge) { case "top": return y === 0; case "bottom": return y === this.internalHeight - 1; case "left": return x === 0; case "right": return x === this.internalWidth - 1; } return false; } smear() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; this.subPixelX += this.dx * this.moveSpeed; this.subPixelY += this.dy * this.moveSpeed; var moveX = Math.trunc(this.subPixelX), moveY = Math.trunc(this.subPixelY); if (moveX === 0 && moveY === 0) return; this.subPixelX -= moveX; this.subPixelY -= moveY; this.leadX += moveX; this.leadY += moveY; if (this.leadX <= 0 || this.leadX >= w - 1) { this.dx = -this.dx; this.leadX = Math.max(0, Math.min(w - 1, this.leadX)); } if (this.leadY <= 0 || this.leadY >= h - 1) { this.dy = -this.dy; this.leadY = Math.max(0, Math.min(h - 1, this.leadY)); } var oldData = new Uint8ClampedArray(data); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { if (this.getSourceEdgeCoord(x, y)) continue; var srcX = Math.max(0, Math.min(w - 1, x - moveX)); var srcY = Math.max(0, Math.min(h - 1, y - moveY)); var dstIdx = (y * w + x) * 4, srcIdx = (srcY * w + srcX) * 4; data[dstIdx] = oldData[srcIdx]; data[dstIdx + 1] = oldData[srcIdx + 1]; data[dstIdx + 2] = oldData[srcIdx + 2]; data[dstIdx + 3] = oldData[srcIdx + 3]; } } } startAnimation() { var fi = 1000 / 60; var animate = (ts) => { if (!this.lastTime) this.lastTime = ts; if (!this.lastSourceTime) this.lastSourceTime = ts; if (!this.lastDirectionChange) this.lastDirectionChange = ts; if (ts - this.lastDirectionChange >= this.nextDirectionInterval) { this.changeDirection(); this.lastDirectionChange = ts; this.nextDirectionInterval = this.randomInterval(); } if (ts - this.lastSourceTime >= this.sourceInterval) { this.generateSourceEdge(); this.lastSourceTime = ts; } if (ts - this.lastTime >= fi) { this.smear(); if (this.imageData) this.ctx.putImageData(this.imageData, 0, 0); this.lastTime = ts; } this.animationId = requestAnimationFrame(animate); }; this.animationId = requestAnimationFrame(animate); } } function layoutSmears() { var vw = window.innerWidth, vh = window.innerHeight; document.querySelectorAll(".smear-container").forEach(function(div) { var x = parseFloat(div.dataset.x || 0); var y = parseFloat(div.dataset.y || 0); var w = parseFloat(div.dataset.width || 0); var h = parseFloat(div.dataset.height || 0); div.style.left = (x * vw) + "px"; div.style.top = (y * vh) + "px"; div.style.width = (w * vw) + "px"; div.style.height = (h * vh) + "px"; }); } function initSmears() { document.querySelectorAll(".smear-container").forEach(function(c) { if (!c._smearInstance) c._smearInstance = new SmearCanvas(c); }); } window.addEventListener("load", function() { layoutSmears(); initSmears(); }); window.addEventListener("resize", layoutSmears); layoutSmears(); initSmears(); </script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#00ffea;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#783f7d;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#241a17;--color3-2:#000;--color4-1:#0600ff;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #00ffea; --color2-1: #783f7d; --color3-1: #241a17; --color4-1: #0600ff;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-left" data-x="0" data-y="0" data-width="0.04" data-height="0.39228799999999997" style="left: 0px; top: 0px; width: 13.88px; height: 136.123936px; --clip-path: polygon(0% 0%, 29% 0%, 223% 85%, 0% 84%); background-size: 27.76px 136.123936px; animation-duration: 46s;"></div><div class="gradient-container gradient-up" data-x="0" data-y="0.39228799999999997" data-width="0.04" data-height="0.362112" style="left: 0px; top: 136.123936px; width: 13.88px; height: 125.652864px; --clip-path: polygon(0% -17%, 223% -16%, 270% 105%, 0% 106%); background-size: 13.88px 251.305728px; animation-duration: 38s;"></div><div class="gradient-container gradient-right" data-x="0" data-y="0.7544" data-width="0.015052000000000001" data-height="0.02230400000000004" style="left: 0px; top: 261.7768px; width: 5.223044px; height: 7.739488px; --clip-path: polygon(0% 103%, 100% -137%, 100% 439%, 0% 212%); background-size: 10.446088px 7.739488px; animation-duration: 76s;"></div><div class="gradient-container gradient-up" data-x="0.015052000000000001" data-y="0.7544" data-width="0.013348" data-height="0.02230400000000004" style="left: 5.223044px; top: 261.7768px; width: 4.631756px; height: 7.739488px; --clip-path: polygon(0% -137%, 100% 333%, 100% 376%, 0% 439%); background-size: 4.631756px 15.478976px; animation-duration: 22s;"></div><div class="gradient-container gradient-up" data-x="0.0284" data-y="0.7544" data-width="0.0116" data-height="0.02230400000000004" style="left: 9.8548px; top: 261.7768px; width: 4.0252px; height: 7.739488px; --clip-path: polygon(0% 333%, 687% 86%, -91% -49%, 0% 376%); background-size: 4.0252px 15.478976px; animation-duration: 59s;"></div><div class="gradient-container gradient-up" data-x="0" data-y="0.776704" data-width="0.04" data-height="0.008226240000000013" style="left: 0px; top: 269.516288px; width: 13.88px; height: 2.854505px; --clip-path: polygon(0% 304%, 45% -405%, 101% -668%, 0% 255%); background-size: 13.88px 5.709011px; animation-duration: 57s;"></div><div class="gradient-container gradient-down" data-x="0" data-y="0.78493024" data-width="0.0088" data-height="0.03506976000000006" style="left: 0px; top: 272.370793px; width: 3.0536px; height: 12.169207px; --clip-path: polygon(0% 36%, 100% 137%, 100% 267%, 0% -13%); background-size: 3.0536px 24.338413px; animation-duration: 62s;"></div><div class="gradient-container gradient-down" data-x="0.0088" data-y="0.78493024" data-width="0.0312" data-height="0.03506976000000006" style="left: 3.0536px; top: 272.370793px; width: 10.8264px; height: 12.169207px; --clip-path: polygon(0% 137%, 101% -180%, 215% -34%, 0% 267%); background-size: 10.8264px 24.338413px; animation-duration: 31s;"></div><div class="gradient-container gradient-right" data-x="0.04" data-y="0" data-width="0.96" data-height="0.8200000000000001" style="left: 13.88px; top: 0px; width: 333.12px; height: 284.54px; --clip-path: polygon(-3% 0%, 100% 0%, 100% 107%, 4% 94%); background-size: 666.24px 284.54px; animation-duration: 54s;"></div><div class="gradient-container gradient-right" data-x="0" data-y="0.8200000000000001" data-width="0.20210000000000003" data-height="0.17999999999999994" style="left: 0px; top: 284.54px; width: 70.1287px; height: 62.46px; --clip-path: polygon(0% -22%, 127% -5%, 97% 100%, 0% 100%); background-size: 140.2574px 62.46px; animation-duration: 42s;"></div><div class="gradient-container gradient-left" data-x="0.20210000000000003" data-y="0.8200000000000001" data-width="0.2279" data-height="0.17999999999999994" style="left: 70.1287px; top: 284.54px; width: 79.0813px; height: 62.46px; --clip-path: polygon(24% -5%, 133% 34%, 101% 100%, -2% 100%); background-size: 158.1626px 62.46px; animation-duration: 3s;"></div><div class="gradient-container gradient-up" data-x="0.43000000000000005" data-y="0.8200000000000001" data-width="0.29069999999999996" data-height="0.17999999999999994" style="left: 149.21px; top: 284.54px; width: 100.8729px; height: 62.46px; --clip-path: polygon(26% 34%, 81% 1%, 75% 100%, 0% 100%); background-size: 100.8729px 124.92px; animation-duration: 98s;"></div><div class="gradient-container gradient-down" data-x="0.7207" data-y="0.8200000000000001" data-width="0.008379000000000001" data-height="0.17999999999999994" style="left: 250.0829px; top: 284.54px; width: 2.907513px; height: 62.46px; --clip-path: polygon(-663% 1%, 236% -25%, -74% 100%, -872% 100%); background-size: 2.907513px 124.92px; animation-duration: 40s;"></div><div class="gradient-container gradient-up" data-x="0.7290789999999999" data-y="0.8200000000000001" data-width="0.270921" data-height="0.17999999999999994" style="left: 252.990413px; top: 284.54px; width: 94.009587px; height: 62.46px; --clip-path: polygon(4% -25%, 100% 33%, 100% 100%, -5% 100%); background-size: 94.009587px 124.92px; animation-duration: 90s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>smear</title><style> * { margin: 0; padding: 0; box-sizing: border-box; } body, html { width: 100%; height: 100%; overflow: hidden; background: #000; } smear-partition { display: block; width: 100%; height: 100%; position: relative; } smear-canvas { display: block; position: absolute; } smear-canvas canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: -moz-crisp-edges; image-rendering: crisp-edges; -ms-interpolation-mode: nearest-neighbor; } .smear-container { position: absolute; overflow: hidden; } .smear-container canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; } </style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="smear-container" data-x="0" data-y="0" data-width="1" data-height="0.3602776073619632" data-start-edge="left" data-speed="70" data-source-interval="1743" data-pixel-size="3" data-color-fg="#0000FF" data-color-bg="#FF69B4" data-source-type="perlin" style="left: 0px; top: 0px; width: 652px; height: 234.901px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.3602776073619632" data-width="0.14402806748466257" data-height="0.1385717791411043" data-start-edge="right" data-speed="63" data-source-interval="647" data-pixel-size="5" data-color-fg="#FFFFFF" data-color-bg="#FF00CC" data-source-type="perlin" style="left: 0px; top: 234.901px; width: 93.9063px; height: 90.3488px;"><canvas></canvas></div><div class="smear-container" data-x="0.14402806748466257" data-y="0.3602776073619632" data-width="0.6311932515337424" data-height="0.1385717791411043" data-start-edge="left" data-speed="89" data-source-interval="949" data-pixel-size="6" data-color-fg="#0000FF" data-color-bg="#FF69B4" data-source-type="perlin" style="left: 93.9063px; top: 234.901px; width: 411.538px; height: 90.3488px;"><canvas></canvas></div><div class="smear-container" data-x="0.7752223926380368" data-y="0.3602776073619632" data-width="0.2247776073619632" data-height="0.1385717791411043" data-start-edge="bottom" data-speed="83" data-source-interval="1298" data-pixel-size="5" data-color-fg="#FFFFFF" data-color-bg="#CCCCCC" data-source-type="perlin" style="left: 505.445px; top: 234.901px; width: 146.555px; height: 90.3488px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.4988496932515337" data-width="0.5458220858895705" data-height="0.5011503067484663" data-start-edge="bottom" data-speed="94" data-source-interval="1163" data-pixel-size="2" data-color-fg="#333333" data-color-bg="#000000" data-source-type="perlin" style="left: 0px; top: 325.25px; width: 355.876px; height: 326.75px;"><canvas></canvas></div><div class="smear-container" data-x="0.5458220858895705" data-y="0.4988496932515337" data-width="0.45417791411042946" data-height="0.5011503067484663" data-start-edge="right" data-speed="55" data-source-interval="545" data-pixel-size="6" data-color-fg="#FF8000" data-color-bg="#000000" data-source-type="perlin" style="left: 355.876px; top: 325.25px; width: 296.124px; height: 326.75px;"><canvas></canvas></div></div><script> class SmearCanvas { constructor(c) { this.container = c; this.canvas = c.querySelector("canvas") || document.createElement("canvas"); if (!c.querySelector("canvas")) c.appendChild(this.canvas); this.ctx = this.canvas.getContext("2d"); this.ctx.imageSmoothingEnabled = false; this.imageData = null; this.lastTime = 0; this.animationId = null; this.speed = parseInt(c.dataset.speed) || 50; this.pixelSize = parseInt(c.dataset.pixelSize) || 2; this.sourceInterval = parseInt(c.dataset.sourceInterval) || 1000; this.colorFg = c.dataset.colorFg || "#FFFFFF"; this.colorBg = c.dataset.colorBg || "#000000"; this.sourceType = c.dataset.sourceType || "noise"; this.startEdge = c.dataset.startEdge || "top"; this.fgRGB = this.hexToRGB(this.colorFg); this.bgRGB = this.hexToRGB(this.colorBg); this.moveSpeed = (1000 / 60) / this.speed; this.subPixelX = 0; this.subPixelY = 0; this.leadX = 0; this.leadY = 0; this.initDirection(); this.lastDirectionChange = 0; this.nextDirectionInterval = this.randomInterval(); this.sourceParams = this.generateSourceParams(); this.lastSourceTime = 0; this.resize(); this.initCanvas(); this.generateSourceEdge(); this.initLeadPosition(); this.startAnimation(); this.resizeObserver = new ResizeObserver(() => this.resize()); this.resizeObserver.observe(this.container); } generateSourceParams() { return { steps: 3 + Math.floor(Math.random() * 6), stripeWidth: 2 + Math.floor(Math.random() * 8), checkSize: 1 + Math.floor(Math.random() * 4), phase: 0, dashLength: 3 + Math.floor(Math.random() * 10), gapLength: 2 + Math.floor(Math.random() * 6), density: 0.05 + Math.random() * 0.25, frequency: 1 + Math.random() * 4, sinePhase: Math.random() * Math.PI * 2, seed1: Math.random() * 100, seed2: Math.random() * 100, seed3: Math.random() * 100, counter: Math.floor(Math.random() * 65536), caRule: Math.random() > 0.5 ? 30 : 110 }; } initDirection() { switch (this.startEdge) { case "top": this.dx = 0; this.dy = 1; break; case "bottom": this.dx = 0; this.dy = -1; break; case "left": this.dx = 1; this.dy = 0; break; case "right": this.dx = -1; this.dy = 0; break; default: this.dx = 0; this.dy = 1; } } initLeadPosition() { switch (this.startEdge) { case "top": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = 1; break; case "bottom": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = this.internalHeight - 2; break; case "left": this.leadX = 1; this.leadY = Math.floor(this.internalHeight / 2); break; case "right": this.leadX = this.internalWidth - 2; this.leadY = Math.floor(this.internalHeight / 2); break; } } resize() { var rect = this.container.getBoundingClientRect(); if (rect.width === 0 || rect.height === 0) return; this.internalWidth = Math.ceil(rect.width / this.pixelSize); this.internalHeight = Math.ceil(rect.height / this.pixelSize); var oldImageData = this.imageData; var oldWidth = this.canvas.width; var oldHeight = this.canvas.height; this.canvas.width = this.internalWidth; this.canvas.height = this.internalHeight; this.imageData = this.ctx.createImageData(this.internalWidth, this.internalHeight); if (oldImageData && oldWidth > 0 && oldHeight > 0) { var minW = Math.min(oldWidth, this.internalWidth); var minH = Math.min(oldHeight, this.internalHeight); for (var y = 0; y < minH; y++) { for (var x = 0; x < minW; x++) { var oi = (y * oldWidth + x) * 4; var ni = (y * this.internalWidth + x) * 4; this.imageData.data[ni] = oldImageData.data[oi]; this.imageData.data[ni + 1] = oldImageData.data[oi + 1]; this.imageData.data[ni + 2] = oldImageData.data[oi + 2]; this.imageData.data[ni + 3] = oldImageData.data[oi + 3]; } } } } hexToRGB(hex) { var r = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); return r ? { r: parseInt(r[1], 16), g: parseInt(r[2], 16), b: parseInt(r[3], 16) } : { r: 255, g: 255, b: 255 }; } lerpColor(t) { return { r: Math.round(this.bgRGB.r + (this.fgRGB.r - this.bgRGB.r) * t), g: Math.round(this.bgRGB.g + (this.fgRGB.g - this.bgRGB.g) * t), b: Math.round(this.bgRGB.b + (this.fgRGB.b - this.bgRGB.b) * t) }; } getSourceValue(pos, length) { var t = pos / length; switch (this.sourceType) { case "noise": return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; case "linear-gradient": return this.lerpColor(t); case "stepped-gradient": var steps = this.sourceParams.steps || 5; return this.lerpColor(Math.floor(t * steps) / (steps - 1)); case "random-gradient": if (!this.gradientCache || this.gradientCache.length !== length) this.generateRandomGradient(length); return this.lerpColor(this.gradientCache[pos]); case "stripes": return (Math.floor(pos / (this.sourceParams.stripeWidth || 4)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "checkerboard": return ((Math.floor(pos / (this.sourceParams.checkSize || 2)) + (this.sourceParams.phase || 0)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "dashes": var cycle = (this.sourceParams.dashLength || 6) + (this.sourceParams.gapLength || 3); return (pos % cycle < (this.sourceParams.dashLength || 6)) ? this.fgRGB : this.bgRGB; case "dots": return Math.random() < (this.sourceParams.density || 0.15) ? this.fgRGB : this.bgRGB; case "sine": var sv = (Math.sin((t * (this.sourceParams.frequency || 2) * Math.PI * 2) + (this.sourceParams.sinePhase || 0)) + 1) / 2; return this.lerpColor(sv); case "perlin": var p1 = Math.sin(t * 3.7 + this.sourceParams.seed1) * 0.5; var p2 = Math.sin(t * 7.3 + this.sourceParams.seed2) * 0.25; var p3 = Math.sin(t * 13.1 + this.sourceParams.seed3) * 0.125; return this.lerpColor(Math.max(0, Math.min(1, (p1 + p2 + p3 + 0.875) / 1.75))); case "binary-counter": return ((this.sourceParams.counter >> (pos % 16)) & 1) ? this.fgRGB : this.bgRGB; case "cellular-automata": if (!this.caState || this.caState.length !== length) this.initCellularAutomata(length); return this.caState[pos] ? this.fgRGB : this.bgRGB; default: return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; } } generateRandomGradient(length) { var np = 3 + Math.floor(Math.random() * 4); var cp = [0]; for (var i = 1; i < np - 1; i++) cp.push(Math.random()); cp.push(1); cp.sort((a, b) => a - b); var cv = cp.map(() => Math.random()); this.gradientCache = []; for (var i = 0; i < length; i++) { var t = i / length; var si = 0; for (var j = 0; j < cp.length - 1; j++) { if (t >= cp[j] && t <= cp[j + 1]) { si = j; break; } } var st = (t - cp[si]) / (cp[si + 1] - cp[si]); this.gradientCache.push(cv[si] + (cv[si + 1] - cv[si]) * st); } } initCellularAutomata(length) { this.caState = []; for (var i = 0; i < length; i++) this.caState.push(Math.random() > 0.5); } evolveCellularAutomata() { if (!this.caState) return; var rule = this.sourceParams.caRule || 30; var os = [...this.caState]; var len = this.caState.length; for (var i = 0; i < len; i++) { var p = (os[(i - 1 + len) % len] ? 4 : 0) + (os[i] ? 2 : 0) + (os[(i + 1) % len] ? 1 : 0); this.caState[i] = ((rule >> p) & 1) === 1; } } updateSourceParams() { switch (this.sourceType) { case "checkerboard": this.sourceParams.phase = (this.sourceParams.phase + 1) % 2; break; case "sine": this.sourceParams.sinePhase += 0.5; break; case "binary-counter": this.sourceParams.counter++; break; case "cellular-automata": this.evolveCellularAutomata(); break; case "random-gradient": this.gradientCache = null; break; case "perlin": this.sourceParams.seed1 += 0.3; this.sourceParams.seed2 += 0.2; this.sourceParams.seed3 += 0.1; break; } } randomInterval() { return 100 + Math.random() * 900; } changeDirection() { var dirs = [[0, 1], [1, 1], [1, 0], [1, -1], [0, -1], [-1, -1], [-1, 0], [-1, 1]]; var idx = dirs.findIndex(d => d[0] === this.dx && d[1] === this.dy); if (idx === -1) idx = 0; idx = Math.random() > 0.5 ? (idx + 1) % 8 : (idx + 7) % 8; this.dx = dirs[idx][0]; this.dy = dirs[idx][1]; } initCanvas() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var isH = (this.startEdge === "top" || this.startEdge === "bottom"); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { var idx = (y * w + x) * 4; var col = this.getSourceValue(isH ? x : y, isH ? w : h); data[idx] = col.r; data[idx + 1] = col.g; data[idx + 2] = col.b; data[idx + 3] = 255; } } this.ctx.putImageData(this.imageData, 0, 0); } generateSourceEdge() { if (!this.imageData) return; this.updateSourceParams(); var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var gen = (getIdx, len) => { for (var i = 0; i < len; i++) { var idx = getIdx(i); var c = this.getSourceValue(i, len); data[idx] = c.r; data[idx + 1] = c.g; data[idx + 2] = c.b; data[idx + 3] = 255; } }; switch (this.startEdge) { case "top": gen(x => x * 4, w); break; case "bottom": gen(x => ((h - 1) * w + x) * 4, w); break; case "left": gen(y => (y * w) * 4, h); break; case "right": gen(y => (y * w + (w - 1)) * 4, h); break; } } getSourceEdgeCoord(x, y) { switch (this.startEdge) { case "top": return y === 0; case "bottom": return y === this.internalHeight - 1; case "left": return x === 0; case "right": return x === this.internalWidth - 1; } return false; } smear() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; this.subPixelX += this.dx * this.moveSpeed; this.subPixelY += this.dy * this.moveSpeed; var moveX = Math.trunc(this.subPixelX), moveY = Math.trunc(this.subPixelY); if (moveX === 0 && moveY === 0) return; this.subPixelX -= moveX; this.subPixelY -= moveY; this.leadX += moveX; this.leadY += moveY; if (this.leadX <= 0 || this.leadX >= w - 1) { this.dx = -this.dx; this.leadX = Math.max(0, Math.min(w - 1, this.leadX)); } if (this.leadY <= 0 || this.leadY >= h - 1) { this.dy = -this.dy; this.leadY = Math.max(0, Math.min(h - 1, this.leadY)); } var oldData = new Uint8ClampedArray(data); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { if (this.getSourceEdgeCoord(x, y)) continue; var srcX = Math.max(0, Math.min(w - 1, x - moveX)); var srcY = Math.max(0, Math.min(h - 1, y - moveY)); var dstIdx = (y * w + x) * 4, srcIdx = (srcY * w + srcX) * 4; data[dstIdx] = oldData[srcIdx]; data[dstIdx + 1] = oldData[srcIdx + 1]; data[dstIdx + 2] = oldData[srcIdx + 2]; data[dstIdx + 3] = oldData[srcIdx + 3]; } } } startAnimation() { var fi = 1000 / 60; var animate = (ts) => { if (!this.lastTime) this.lastTime = ts; if (!this.lastSourceTime) this.lastSourceTime = ts; if (!this.lastDirectionChange) this.lastDirectionChange = ts; if (ts - this.lastDirectionChange >= this.nextDirectionInterval) { this.changeDirection(); this.lastDirectionChange = ts; this.nextDirectionInterval = this.randomInterval(); } if (ts - this.lastSourceTime >= this.sourceInterval) { this.generateSourceEdge(); this.lastSourceTime = ts; } if (ts - this.lastTime >= fi) { this.smear(); if (this.imageData) this.ctx.putImageData(this.imageData, 0, 0); this.lastTime = ts; } this.animationId = requestAnimationFrame(animate); }; this.animationId = requestAnimationFrame(animate); } } function layoutSmears() { var vw = window.innerWidth, vh = window.innerHeight; document.querySelectorAll(".smear-container").forEach(function(div) { var x = parseFloat(div.dataset.x || 0); var y = parseFloat(div.dataset.y || 0); var w = parseFloat(div.dataset.width || 0); var h = parseFloat(div.dataset.height || 0); div.style.left = (x * vw) + "px"; div.style.top = (y * vh) + "px"; div.style.width = (w * vw) + "px"; div.style.height = (h * vh) + "px"; }); } function initSmears() { document.querySelectorAll(".smear-container").forEach(function(c) { if (!c._smearInstance) c._smearInstance = new SmearCanvas(c); }); } window.addEventListener("load", function() { layoutSmears(); initSmears(); }); window.addEventListener("resize", layoutSmears); layoutSmears(); initSmears(); </script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#B4ff00;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#241a17;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#400026;--color3-2:#000;--color4-1:#241a17;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #B4ff00; --color2-1: #241a17; --color3-1: #400026; --color4-1: #241a17;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-down" data-x="0" data-y="0" data-width="0.43679999999999997" data-height="0.05" style="left: 0px; top: 0px; width: 284.794px; height: 32.6px; --clip-path: polygon(0% 0%, 92% 0%, 103% 256%, 0% 223%); background-size: 284.794px 65.2px; animation-duration: 18s;"></div><div class="gradient-container gradient-down" data-x="0.43679999999999997" data-y="0" data-width="0.40319999999999995" data-height="0.05" style="left: 284.794px; top: 0px; width: 262.886px; height: 32.6px; --clip-path: polygon(-9% 0%, 98% 0%, 82% -59%, 3% 256%); background-size: 262.886px 65.2px; animation-duration: 30s;"></div><div class="gradient-container gradient-up" data-x="0.84" data-y="0" data-width="0.1600000000000001" data-height="0.05" style="left: 547.68px; top: 0px; width: 104.32px; height: 32.6px; --clip-path: polygon(-4% 0%, 100% 0%, 100% 8%, -44% -59%); background-size: 104.32px 65.2px; animation-duration: 1s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.05" data-width="0.15" data-height="0.95" style="left: 0px; top: 32.6px; width: 97.8px; height: 619.4px; --clip-path: polygon(0% 6%, 117% 6%, 47% 100%, 0% 100%); background-size: 195.6px 619.4px; animation-duration: 26s;"></div><div class="gradient-container gradient-up" data-x="0.15" data-y="0.05" data-width="0.8500000000000001" data-height="0.95" style="left: 97.8px; top: 32.6px; width: 554.2px; height: 619.4px; --clip-path: polygon(3% 6%, 100% -5%, 100% 100%, -9% 100%); background-size: 554.2px 1238.8px; animation-duration: 81s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>smear</title><style> * { margin: 0; padding: 0; box-sizing: border-box; } body, html { width: 100%; height: 100%; overflow: hidden; background: #000; } smear-partition { display: block; width: 100%; height: 100%; position: relative; } smear-canvas { display: block; position: absolute; } smear-canvas canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: -moz-crisp-edges; image-rendering: crisp-edges; -ms-interpolation-mode: nearest-neighbor; } .smear-container { position: absolute; overflow: hidden; } .smear-container canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; } </style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="smear-container" data-x="0" data-y="0" data-width="1" data-height="0.015733128834355826" data-start-edge="right" data-speed="89" data-source-interval="1923" data-pixel-size="1" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="noise" style="left: 0px; top: 0px; width: 652px; height: 10.258px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.015733128834355826" data-width="1" data-height="0.028207208588957058" data-start-edge="bottom" data-speed="97" data-source-interval="1287" data-pixel-size="2" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="noise" style="left: 0px; top: 10.258px; width: 652px; height: 18.3911px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.04394033742331289" data-width="1" data-height="0.025200920245398776" data-start-edge="right" data-speed="25" data-source-interval="650" data-pixel-size="1" data-color-fg="#800080" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 28.6491px; width: 652px; height: 16.431px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.06914125766871165" data-width="1" data-height="0.044004294478527606" data-start-edge="top" data-speed="58" data-source-interval="1276" data-pixel-size="1" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="noise" style="left: 0px; top: 45.0801px; width: 652px; height: 28.6908px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.11314555214723926" data-width="1" data-height="0.0287680981595092" data-start-edge="top" data-speed="48" data-source-interval="1737" data-pixel-size="4" data-color-fg="#800080" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 73.7709px; width: 652px; height: 18.7568px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.14191365030674846" data-width="1" data-height="0.036271932515337425" data-start-edge="bottom" data-speed="48" data-source-interval="1897" data-pixel-size="5" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="noise" style="left: 0px; top: 92.5277px; width: 652px; height: 23.6493px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.1781855828220859" data-width="1" data-height="0.02023251533742331" data-start-edge="bottom" data-speed="63" data-source-interval="1627" data-pixel-size="2" data-color-fg="#800080" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 116.177px; width: 652px; height: 13.1916px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.1984187116564417" data-width="1" data-height="0.032433128834355826" data-start-edge="top" data-speed="62" data-source-interval="1221" data-pixel-size="6" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="noise" style="left: 0px; top: 129.369px; width: 652px; height: 21.1464px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.230851226993865" data-width="1" data-height="0.02615966257668712" data-start-edge="left" data-speed="36" data-source-interval="541" data-pixel-size="6" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="noise" style="left: 0px; top: 150.515px; width: 652px; height: 17.0561px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.25701073619631903" data-width="1" data-height="0.011631978527607362" data-start-edge="left" data-speed="92" data-source-interval="1868" data-pixel-size="2" data-color-fg="#800080" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 167.571px; width: 652px; height: 7.58405px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.2686426380368098" data-width="1" data-height="0.038517791411042945" data-start-edge="left" data-speed="39" data-source-interval="1068" data-pixel-size="2" data-color-fg="#800080" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 175.155px; width: 652px; height: 25.1136px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.3071610429447853" data-width="1" data-height="0.023882975460122698" data-start-edge="right" data-speed="43" data-source-interval="854" data-pixel-size="5" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="noise" style="left: 0px; top: 200.269px; width: 652px; height: 15.5717px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.3310444785276074" data-width="1" data-height="0.008378803680981595" data-start-edge="right" data-speed="74" data-source-interval="559" data-pixel-size="4" data-color-fg="#800080" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 215.841px; width: 652px; height: 5.46298px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.3394233128834356" data-width="1" data-height="0.03734831288343558" data-start-edge="left" data-speed="92" data-source-interval="1823" data-pixel-size="1" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="noise" style="left: 0px; top: 221.304px; width: 652px; height: 24.3511px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.37677147239263803" data-width="1" data-height="0.011757714723926381" data-start-edge="top" data-speed="91" data-source-interval="1741" data-pixel-size="2" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="noise" style="left: 0px; top: 245.655px; width: 652px; height: 7.66603px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.3885291411042945" data-width="1" data-height="0.03333665644171779" data-start-edge="bottom" data-speed="32" data-source-interval="1158" data-pixel-size="4" data-color-fg="#800080" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 253.321px; width: 652px; height: 21.7355px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.4218650306748466" data-width="1" data-height="0.0070917944785276075" data-start-edge="top" data-speed="97" data-source-interval="594" data-pixel-size="3" data-color-fg="#800080" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 275.056px; width: 652px; height: 4.62385px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.42895705521472394" data-width="1" data-height="0.005964969325153374" data-start-edge="bottom" data-speed="50" data-source-interval="1472" data-pixel-size="5" data-color-fg="#800080" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 279.68px; width: 652px; height: 3.88916px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.4349217791411043" data-width="1" data-height="0.026651073619631902" data-start-edge="left" data-speed="99" data-source-interval="1274" data-pixel-size="3" data-color-fg="#800080" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 283.569px; width: 652px; height: 17.3765px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.46157361963190185" data-width="1" data-height="0.007253558282208589" data-start-edge="left" data-speed="60" data-source-interval="1057" data-pixel-size="1" data-color-fg="#800080" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 300.946px; width: 652px; height: 4.72932px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.46882668711656444" data-width="1" data-height="0.03476549079754601" data-start-edge="top" data-speed="89" data-source-interval="1618" data-pixel-size="4" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="noise" style="left: 0px; top: 305.675px; width: 652px; height: 22.6671px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.5035920245398773" data-width="1" data-height="0.006140398773006135" data-start-edge="top" data-speed="59" data-source-interval="1307" data-pixel-size="3" data-color-fg="#800080" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 328.342px; width: 652px; height: 4.00354px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.5097331288343558" data-width="1" data-height="0.0219079754601227" data-start-edge="bottom" data-speed="48" data-source-interval="810" data-pixel-size="5" data-color-fg="#800080" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 332.346px; width: 652px; height: 14.284px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.5316411042944785" data-width="1" data-height="0.0207069018404908" data-start-edge="left" data-speed="61" data-source-interval="1013" data-pixel-size="3" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="noise" style="left: 0px; top: 346.63px; width: 652px; height: 13.5009px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.5523481595092025" data-width="1" data-height="0.04458696319018405" data-start-edge="top" data-speed="64" data-source-interval="913" data-pixel-size="4" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="noise" style="left: 0px; top: 360.131px; width: 652px; height: 29.0707px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.5969340490797547" data-width="1" data-height="0.0061741411042944795" data-start-edge="bottom" data-speed="59" data-source-interval="1564" data-pixel-size="4" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="noise" style="left: 0px; top: 389.201px; width: 652px; height: 4.02554px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.6031088957055214" data-width="1" data-height="0.0313441717791411" data-start-edge="right" data-speed="40" data-source-interval="1511" data-pixel-size="2" data-color-fg="#800080" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 393.227px; width: 652px; height: 20.4364px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.6344524539877301" data-width="1" data-height="0.011529049079754602" data-start-edge="left" data-speed="61" data-source-interval="1177" data-pixel-size="6" data-color-fg="#800080" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 413.663px; width: 652px; height: 7.51694px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.6459815950920246" data-width="1" data-height="0.008259831288343558" data-start-edge="bottom" data-speed="49" data-source-interval="1686" data-pixel-size="1" data-color-fg="#800080" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 421.18px; width: 652px; height: 5.38541px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.6542423312883435" data-width="1" data-height="0.011540230061349693" data-start-edge="bottom" data-speed="56" data-source-interval="742" data-pixel-size="1" data-color-fg="#800080" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 426.566px; width: 652px; height: 7.52423px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.665782208588957" data-width="1" data-height="0.030010889570552146" data-start-edge="bottom" data-speed="85" data-source-interval="880" data-pixel-size="4" data-color-fg="#800080" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 434.09px; width: 652px; height: 19.5671px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.6957929447852761" data-width="1" data-height="0.0389521472392638" data-start-edge="top" data-speed="25" data-source-interval="1576" data-pixel-size="6" data-color-fg="#800080" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 453.657px; width: 652px; height: 25.3968px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.734745398773006" data-width="1" data-height="0.030821932515337425" data-start-edge="left" data-speed="78" data-source-interval="646" data-pixel-size="2" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="noise" style="left: 0px; top: 479.054px; width: 652px; height: 20.0959px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.7655674846625766" data-width="1" data-height="0.032648773006134967" data-start-edge="top" data-speed="55" data-source-interval="1390" data-pixel-size="1" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="noise" style="left: 0px; top: 499.15px; width: 652px; height: 21.287px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.7982162576687116" data-width="1" data-height="0.010342914110429447" data-start-edge="bottom" data-speed="62" data-source-interval="801" data-pixel-size="4" data-color-fg="#800080" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 520.437px; width: 652px; height: 6.74358px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.8085582822085888" data-width="1" data-height="0.03908865030674847" data-start-edge="top" data-speed="63" data-source-interval="1761" data-pixel-size="4" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="noise" style="left: 0px; top: 527.18px; width: 652px; height: 25.4858px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.8476472392638038" data-width="1" data-height="0.00481388036809816" data-start-edge="top" data-speed="52" data-source-interval="985" data-pixel-size="6" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="noise" style="left: 0px; top: 552.666px; width: 652px; height: 3.13865px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.8524616564417177" data-width="1" data-height="0.023868711656441718" data-start-edge="right" data-speed="51" data-source-interval="718" data-pixel-size="2" data-color-fg="#800080" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 555.805px; width: 652px; height: 15.5624px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.876329754601227" data-width="1" data-height="0.018872852760736195" data-start-edge="right" data-speed="95" data-source-interval="1297" data-pixel-size="6" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="noise" style="left: 0px; top: 571.367px; width: 652px; height: 12.3051px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.8952024539877301" data-width="1" data-height="0.03255828220858896" data-start-edge="bottom" data-speed="92" data-source-interval="1489" data-pixel-size="2" data-color-fg="#800080" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 583.672px; width: 652px; height: 21.228px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.9277607361963189" data-width="1" data-height="0.03214739263803681" data-start-edge="left" data-speed="62" data-source-interval="583" data-pixel-size="3" data-color-fg="#800080" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 604.9px; width: 652px; height: 20.9601px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.9599079754601227" data-width="1" data-height="0.03284294478527607" data-start-edge="top" data-speed="95" data-source-interval="1275" data-pixel-size="4" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="noise" style="left: 0px; top: 625.86px; width: 652px; height: 21.4136px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.9927515337423313" data-width="1" data-height="0.0072486349693251535" data-start-edge="right" data-speed="45" data-source-interval="613" data-pixel-size="3" data-color-fg="#800080" data-color-bg="#000000" data-source-type="noise" style="left: 0px; top: 647.274px; width: 652px; height: 4.72611px;"><canvas></canvas></div></div><script> class SmearCanvas { constructor(c) { this.container = c; this.canvas = c.querySelector("canvas") || document.createElement("canvas"); if (!c.querySelector("canvas")) c.appendChild(this.canvas); this.ctx = this.canvas.getContext("2d"); this.ctx.imageSmoothingEnabled = false; this.imageData = null; this.lastTime = 0; this.animationId = null; this.speed = parseInt(c.dataset.speed) || 50; this.pixelSize = parseInt(c.dataset.pixelSize) || 2; this.sourceInterval = parseInt(c.dataset.sourceInterval) || 1000; this.colorFg = c.dataset.colorFg || "#FFFFFF"; this.colorBg = c.dataset.colorBg || "#000000"; this.sourceType = c.dataset.sourceType || "noise"; this.startEdge = c.dataset.startEdge || "top"; this.fgRGB = this.hexToRGB(this.colorFg); this.bgRGB = this.hexToRGB(this.colorBg); this.moveSpeed = (1000 / 60) / this.speed; this.subPixelX = 0; this.subPixelY = 0; this.leadX = 0; this.leadY = 0; this.initDirection(); this.lastDirectionChange = 0; this.nextDirectionInterval = this.randomInterval(); this.sourceParams = this.generateSourceParams(); this.lastSourceTime = 0; this.resize(); this.initCanvas(); this.generateSourceEdge(); this.initLeadPosition(); this.startAnimation(); this.resizeObserver = new ResizeObserver(() => this.resize()); this.resizeObserver.observe(this.container); } generateSourceParams() { return { steps: 3 + Math.floor(Math.random() * 6), stripeWidth: 2 + Math.floor(Math.random() * 8), checkSize: 1 + Math.floor(Math.random() * 4), phase: 0, dashLength: 3 + Math.floor(Math.random() * 10), gapLength: 2 + Math.floor(Math.random() * 6), density: 0.05 + Math.random() * 0.25, frequency: 1 + Math.random() * 4, sinePhase: Math.random() * Math.PI * 2, seed1: Math.random() * 100, seed2: Math.random() * 100, seed3: Math.random() * 100, counter: Math.floor(Math.random() * 65536), caRule: Math.random() > 0.5 ? 30 : 110 }; } initDirection() { switch (this.startEdge) { case "top": this.dx = 0; this.dy = 1; break; case "bottom": this.dx = 0; this.dy = -1; break; case "left": this.dx = 1; this.dy = 0; break; case "right": this.dx = -1; this.dy = 0; break; default: this.dx = 0; this.dy = 1; } } initLeadPosition() { switch (this.startEdge) { case "top": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = 1; break; case "bottom": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = this.internalHeight - 2; break; case "left": this.leadX = 1; this.leadY = Math.floor(this.internalHeight / 2); break; case "right": this.leadX = this.internalWidth - 2; this.leadY = Math.floor(this.internalHeight / 2); break; } } resize() { var rect = this.container.getBoundingClientRect(); if (rect.width === 0 || rect.height === 0) return; this.internalWidth = Math.ceil(rect.width / this.pixelSize); this.internalHeight = Math.ceil(rect.height / this.pixelSize); var oldImageData = this.imageData; var oldWidth = this.canvas.width; var oldHeight = this.canvas.height; this.canvas.width = this.internalWidth; this.canvas.height = this.internalHeight; this.imageData = this.ctx.createImageData(this.internalWidth, this.internalHeight); if (oldImageData && oldWidth > 0 && oldHeight > 0) { var minW = Math.min(oldWidth, this.internalWidth); var minH = Math.min(oldHeight, this.internalHeight); for (var y = 0; y < minH; y++) { for (var x = 0; x < minW; x++) { var oi = (y * oldWidth + x) * 4; var ni = (y * this.internalWidth + x) * 4; this.imageData.data[ni] = oldImageData.data[oi]; this.imageData.data[ni + 1] = oldImageData.data[oi + 1]; this.imageData.data[ni + 2] = oldImageData.data[oi + 2]; this.imageData.data[ni + 3] = oldImageData.data[oi + 3]; } } } } hexToRGB(hex) { var r = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); return r ? { r: parseInt(r[1], 16), g: parseInt(r[2], 16), b: parseInt(r[3], 16) } : { r: 255, g: 255, b: 255 }; } lerpColor(t) { return { r: Math.round(this.bgRGB.r + (this.fgRGB.r - this.bgRGB.r) * t), g: Math.round(this.bgRGB.g + (this.fgRGB.g - this.bgRGB.g) * t), b: Math.round(this.bgRGB.b + (this.fgRGB.b - this.bgRGB.b) * t) }; } getSourceValue(pos, length) { var t = pos / length; switch (this.sourceType) { case "noise": return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; case "linear-gradient": return this.lerpColor(t); case "stepped-gradient": var steps = this.sourceParams.steps || 5; return this.lerpColor(Math.floor(t * steps) / (steps - 1)); case "random-gradient": if (!this.gradientCache || this.gradientCache.length !== length) this.generateRandomGradient(length); return this.lerpColor(this.gradientCache[pos]); case "stripes": return (Math.floor(pos / (this.sourceParams.stripeWidth || 4)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "checkerboard": return ((Math.floor(pos / (this.sourceParams.checkSize || 2)) + (this.sourceParams.phase || 0)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "dashes": var cycle = (this.sourceParams.dashLength || 6) + (this.sourceParams.gapLength || 3); return (pos % cycle < (this.sourceParams.dashLength || 6)) ? this.fgRGB : this.bgRGB; case "dots": return Math.random() < (this.sourceParams.density || 0.15) ? this.fgRGB : this.bgRGB; case "sine": var sv = (Math.sin((t * (this.sourceParams.frequency || 2) * Math.PI * 2) + (this.sourceParams.sinePhase || 0)) + 1) / 2; return this.lerpColor(sv); case "perlin": var p1 = Math.sin(t * 3.7 + this.sourceParams.seed1) * 0.5; var p2 = Math.sin(t * 7.3 + this.sourceParams.seed2) * 0.25; var p3 = Math.sin(t * 13.1 + this.sourceParams.seed3) * 0.125; return this.lerpColor(Math.max(0, Math.min(1, (p1 + p2 + p3 + 0.875) / 1.75))); case "binary-counter": return ((this.sourceParams.counter >> (pos % 16)) & 1) ? this.fgRGB : this.bgRGB; case "cellular-automata": if (!this.caState || this.caState.length !== length) this.initCellularAutomata(length); return this.caState[pos] ? this.fgRGB : this.bgRGB; default: return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; } } generateRandomGradient(length) { var np = 3 + Math.floor(Math.random() * 4); var cp = [0]; for (var i = 1; i < np - 1; i++) cp.push(Math.random()); cp.push(1); cp.sort((a, b) => a - b); var cv = cp.map(() => Math.random()); this.gradientCache = []; for (var i = 0; i < length; i++) { var t = i / length; var si = 0; for (var j = 0; j < cp.length - 1; j++) { if (t >= cp[j] && t <= cp[j + 1]) { si = j; break; } } var st = (t - cp[si]) / (cp[si + 1] - cp[si]); this.gradientCache.push(cv[si] + (cv[si + 1] - cv[si]) * st); } } initCellularAutomata(length) { this.caState = []; for (var i = 0; i < length; i++) this.caState.push(Math.random() > 0.5); } evolveCellularAutomata() { if (!this.caState) return; var rule = this.sourceParams.caRule || 30; var os = [...this.caState]; var len = this.caState.length; for (var i = 0; i < len; i++) { var p = (os[(i - 1 + len) % len] ? 4 : 0) + (os[i] ? 2 : 0) + (os[(i + 1) % len] ? 1 : 0); this.caState[i] = ((rule >> p) & 1) === 1; } } updateSourceParams() { switch (this.sourceType) { case "checkerboard": this.sourceParams.phase = (this.sourceParams.phase + 1) % 2; break; case "sine": this.sourceParams.sinePhase += 0.5; break; case "binary-counter": this.sourceParams.counter++; break; case "cellular-automata": this.evolveCellularAutomata(); break; case "random-gradient": this.gradientCache = null; break; case "perlin": this.sourceParams.seed1 += 0.3; this.sourceParams.seed2 += 0.2; this.sourceParams.seed3 += 0.1; break; } } randomInterval() { return 100 + Math.random() * 900; } changeDirection() { var dirs = [[0, 1], [1, 1], [1, 0], [1, -1], [0, -1], [-1, -1], [-1, 0], [-1, 1]]; var idx = dirs.findIndex(d => d[0] === this.dx && d[1] === this.dy); if (idx === -1) idx = 0; idx = Math.random() > 0.5 ? (idx + 1) % 8 : (idx + 7) % 8; this.dx = dirs[idx][0]; this.dy = dirs[idx][1]; } initCanvas() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var isH = (this.startEdge === "top" || this.startEdge === "bottom"); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { var idx = (y * w + x) * 4; var col = this.getSourceValue(isH ? x : y, isH ? w : h); data[idx] = col.r; data[idx + 1] = col.g; data[idx + 2] = col.b; data[idx + 3] = 255; } } this.ctx.putImageData(this.imageData, 0, 0); } generateSourceEdge() { if (!this.imageData) return; this.updateSourceParams(); var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var gen = (getIdx, len) => { for (var i = 0; i < len; i++) { var idx = getIdx(i); var c = this.getSourceValue(i, len); data[idx] = c.r; data[idx + 1] = c.g; data[idx + 2] = c.b; data[idx + 3] = 255; } }; switch (this.startEdge) { case "top": gen(x => x * 4, w); break; case "bottom": gen(x => ((h - 1) * w + x) * 4, w); break; case "left": gen(y => (y * w) * 4, h); break; case "right": gen(y => (y * w + (w - 1)) * 4, h); break; } } getSourceEdgeCoord(x, y) { switch (this.startEdge) { case "top": return y === 0; case "bottom": return y === this.internalHeight - 1; case "left": return x === 0; case "right": return x === this.internalWidth - 1; } return false; } smear() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; this.subPixelX += this.dx * this.moveSpeed; this.subPixelY += this.dy * this.moveSpeed; var moveX = Math.trunc(this.subPixelX), moveY = Math.trunc(this.subPixelY); if (moveX === 0 && moveY === 0) return; this.subPixelX -= moveX; this.subPixelY -= moveY; this.leadX += moveX; this.leadY += moveY; if (this.leadX <= 0 || this.leadX >= w - 1) { this.dx = -this.dx; this.leadX = Math.max(0, Math.min(w - 1, this.leadX)); } if (this.leadY <= 0 || this.leadY >= h - 1) { this.dy = -this.dy; this.leadY = Math.max(0, Math.min(h - 1, this.leadY)); } var oldData = new Uint8ClampedArray(data); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { if (this.getSourceEdgeCoord(x, y)) continue; var srcX = Math.max(0, Math.min(w - 1, x - moveX)); var srcY = Math.max(0, Math.min(h - 1, y - moveY)); var dstIdx = (y * w + x) * 4, srcIdx = (srcY * w + srcX) * 4; data[dstIdx] = oldData[srcIdx]; data[dstIdx + 1] = oldData[srcIdx + 1]; data[dstIdx + 2] = oldData[srcIdx + 2]; data[dstIdx + 3] = oldData[srcIdx + 3]; } } } startAnimation() { var fi = 1000 / 60; var animate = (ts) => { if (!this.lastTime) this.lastTime = ts; if (!this.lastSourceTime) this.lastSourceTime = ts; if (!this.lastDirectionChange) this.lastDirectionChange = ts; if (ts - this.lastDirectionChange >= this.nextDirectionInterval) { this.changeDirection(); this.lastDirectionChange = ts; this.nextDirectionInterval = this.randomInterval(); } if (ts - this.lastSourceTime >= this.sourceInterval) { this.generateSourceEdge(); this.lastSourceTime = ts; } if (ts - this.lastTime >= fi) { this.smear(); if (this.imageData) this.ctx.putImageData(this.imageData, 0, 0); this.lastTime = ts; } this.animationId = requestAnimationFrame(animate); }; this.animationId = requestAnimationFrame(animate); } } function layoutSmears() { var vw = window.innerWidth, vh = window.innerHeight; document.querySelectorAll(".smear-container").forEach(function(div) { var x = parseFloat(div.dataset.x || 0); var y = parseFloat(div.dataset.y || 0); var w = parseFloat(div.dataset.width || 0); var h = parseFloat(div.dataset.height || 0); div.style.left = (x * vw) + "px"; div.style.top = (y * vh) + "px"; div.style.width = (w * vw) + "px"; div.style.height = (h * vh) + "px"; }); } function initSmears() { document.querySelectorAll(".smear-container").forEach(function(c) { if (!c._smearInstance) c._smearInstance = new SmearCanvas(c); }); } window.addEventListener("load", function() { layoutSmears(); initSmears(); }); window.addEventListener("resize", layoutSmears); layoutSmears(); initSmears(); </script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#cd83c2;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#ff0000;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#494949;--color3-2:#000;--color4-1:#000000;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #cd83c2; --color2-1: #ff0000; --color3-1: #494949; --color4-1: #000000;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-down" data-x="0" data-y="0" data-width="0.16" data-height="0.10999999999999999" style="left: 0px; top: 0px; width: 56.96px; height: 39.16px; --clip-path: polygon(0% 0%, 104% 0%, 58% 88%, 0% 93%); background-size: 56.96px 78.32px; animation-duration: 48s;"></div><div class="gradient-container gradient-right" data-x="0" data-y="0.10999999999999999" data-width="0.16" data-height="0.5624800000000001" style="left: 0px; top: 39.16px; width: 56.96px; height: 200.243px; --clip-path: polygon(0% -1%, 58% -2%, 137% 110%, 0% 94%); background-size: 113.92px 200.243px; animation-duration: 68s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.6724800000000001" data-width="0.16" data-height="0.14952" style="left: 0px; top: 239.403px; width: 56.96px; height: 53.2291px; --clip-path: polygon(0% -22%, 137% 38%, 66% 128%, 0% 98%); background-size: 113.92px 53.2291px; animation-duration: 8s;"></div><div class="gradient-container gradient-right" data-x="0" data-y="0.8220000000000002" data-width="0.016" data-height="0.051798" style="left: 0px; top: 292.632px; width: 5.696px; height: 18.4401px; --clip-path: polygon(0% -6%, 100% -133%, 100% 130%, 0% 246%); background-size: 11.392px 18.4401px; animation-duration: 29s;"></div><div class="gradient-container gradient-right" data-x="0.016" data-y="0.8220000000000002" data-width="0.14400000000000002" data-height="0.051798" style="left: 5.696px; top: 292.632px; width: 51.264px; height: 18.4401px; --clip-path: polygon(0% -133%, 62% 79%, 146% 202%, 0% 130%); background-size: 102.528px 18.4401px; animation-duration: 91s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.8737980000000002" data-width="0.0464" data-height="0.120862" style="left: 0px; top: 311.072px; width: 16.5184px; height: 43.0269px; --clip-path: polygon(0% 63%, 167% 10%, 246% 100%, 0% 100%); background-size: 33.0368px 43.0269px; animation-duration: 44s;"></div><div class="gradient-container gradient-up" data-x="0.0464" data-y="0.8737980000000002" data-width="0.1136" data-height="0.120862" style="left: 16.5184px; top: 311.072px; width: 40.4416px; height: 43.0269px; --clip-path: polygon(27% 10%, 158% 44%, 158% 100%, 60% 100%); background-size: 40.4416px 86.0537px; animation-duration: 40s;"></div><div class="gradient-container gradient-down" data-x="0" data-y="0.9946600000000001" data-width="0.16" data-height="0.005339999999999985" style="left: 0px; top: 354.099px; width: 56.96px; height: 1.90104px; --clip-path: polygon(0% 0%, 141% 0%, 136% 100%, 0% 100%); background-size: 56.96px 3.80208px; animation-duration: 90s;"></div><div class="gradient-container gradient-down" data-x="0.16" data-y="0" data-width="0.8400000000000001" data-height="0.43000000000000005" style="left: 56.96px; top: 0px; width: 299.04px; height: 153.08px; --clip-path: polygon(1% 0%, 100% 0%, 100% 112%, -5% 84%); background-size: 299.04px 306.16px; animation-duration: 21s;"></div><div class="gradient-container gradient-down" data-x="0.16" data-y="0.43000000000000005" data-width="0.025200000000000004" data-height="0.21631499999999995" style="left: 56.96px; top: 153.08px; width: 8.9712px; height: 77.0081px; --clip-path: polygon(-178% -32%, 147% 7%, 335% 64%, -263% 100%); background-size: 8.9712px 154.016px; animation-duration: 26s;"></div><div class="gradient-container gradient-right" data-x="0.16" data-y="0.646315" data-width="0.025200000000000004" data-height="0.034014749999999996" style="left: 56.96px; top: 230.088px; width: 8.9712px; height: 12.1093px; --clip-path: polygon(-263% -1%, 335% -229%, 312% 251%, -89% 109%); background-size: 17.9424px 12.1093px; animation-duration: 82s;"></div><div class="gradient-container gradient-down" data-x="0.16" data-y="0.6803297500000001" data-width="0.025200000000000004" data-height="0.06317025" style="left: 56.96px; top: 242.197px; width: 8.9712px; height: 22.4886px; --clip-path: polygon(-89% 5%, 312% 81%, -138% 183%, -317% 218%); background-size: 8.9712px 44.9772px; animation-duration: 57s;"></div><div class="gradient-container gradient-up" data-x="0.16" data-y="0.7434999999999999" data-width="0.010332000000000003" data-height="0.023085" style="left: 56.96px; top: 264.686px; width: 3.67819px; height: 8.21826px; --clip-path: polygon(-774% 323%, -337% -203%, -207% 11%, 412% 79%); background-size: 3.67819px 16.4365px; animation-duration: 85s;"></div><div class="gradient-container gradient-down" data-x="0.170332" data-y="0.7434999999999999" data-width="0.014868000000000001" data-height="0.023085" style="left: 60.6382px; top: 264.686px; width: 5.29301px; height: 8.21826px; --clip-path: polygon(-304% -203%, -303% 226%, 625% 375%, -213% 11%); background-size: 5.29301px 16.4365px; animation-duration: 14s;"></div><div class="gradient-container gradient-left" data-x="0.16" data-y="0.7665849999999998" data-width="0.025200000000000004" data-height="0.1680588" style="left: 56.96px; top: 272.904px; width: 8.9712px; height: 59.8289px; --clip-path: polygon(169% -3%, 410% 38%, -204% 82%, -292% 100%); background-size: 17.9424px 59.8289px; animation-duration: 15s;"></div><div class="gradient-container gradient-left" data-x="0.16" data-y="0.9346437999999999" data-width="0.025200000000000004" data-height="0.0653562" style="left: 56.96px; top: 332.733px; width: 8.9712px; height: 23.2668px; --clip-path: polygon(-292% 0%, -204% -45%, 176% 100%, 227% 100%); background-size: 17.9424px 23.2668px; animation-duration: 88s;"></div><div class="gradient-container gradient-right" data-x="0.1852" data-y="0.43000000000000005" data-width="0.33765312000000003" data-height="0.10829999999999998" style="left: 65.9312px; top: 153.08px; width: 120.205px; height: 38.5548px; --clip-path: polygon(4% 13%, 111% 8%, 100% 117%, 15% 167%); background-size: 240.409px 38.5548px; animation-duration: 63s;"></div><div class="gradient-container gradient-left" data-x="0.1852" data-y="0.5383" data-width="0.33765312000000003" data-height="0.46169999999999994" style="left: 65.9312px; top: 191.635px; width: 120.205px; height: 164.365px; --clip-path: polygon(15% 16%, 100% 4%, 77% 100%, 6% 100%); background-size: 240.409px 164.365px; animation-duration: 26s;"></div><div class="gradient-container gradient-down" data-x="0.5228531200000001" data-y="0.43000000000000005" data-width="0.26529888000000007" data-height="0.07979999999999998" style="left: 186.136px; top: 153.08px; width: 94.4464px; height: 28.4088px; --clip-path: polygon(14% 10%, 121% -12%, 127% 190%, 6% 109%); background-size: 94.4464px 56.8176px; animation-duration: 10s;"></div><div class="gradient-container gradient-down" data-x="0.5228531200000001" data-y="0.5098" data-width="0.26529888000000007" data-height="0.4902" style="left: 186.136px; top: 181.489px; width: 94.4464px; height: 174.511px; --clip-path: polygon(6% 1%, 127% 15%, 102% 100%, -30% 100%); background-size: 94.4464px 349.022px; animation-duration: 48s;"></div><div class="gradient-container gradient-up" data-x="0.7881520000000002" data-y="0.43000000000000005" data-width="0.09533159999999997" data-height="0.1311" style="left: 280.582px; top: 153.08px; width: 33.938px; height: 46.6716px; --clip-path: polygon(58% -7%, 48% -9%, 85% 117%, -74% 80%); background-size: 33.938px 93.3432px; animation-duration: 87s;"></div><div class="gradient-container gradient-up" data-x="0.8834836000000001" data-y="0.43000000000000005" data-width="0.11651639999999995" data-height="0.1311" style="left: 314.52px; top: 153.08px; width: 41.4798px; height: 46.6716px; --clip-path: polygon(-42% -9%, 100% 39%, 100% 40%, -12% 117%); background-size: 41.4798px 93.3432px; animation-duration: 26s;"></div><div class="gradient-container gradient-right" data-x="0.7881520000000002" data-y="0.5611" data-width="0.21184799999999993" data-height="0.39501" style="left: 280.582px; top: 199.752px; width: 75.4179px; height: 140.624px; --clip-path: polygon(-33% -7%, 100% -20%, 100% 118%, -22% 118%); background-size: 150.836px 140.624px; animation-duration: 9s;"></div><div class="gradient-container gradient-up" data-x="0.7881520000000002" data-y="0.95611" data-width="0.21184799999999993" data-height="0.04389000000000002" style="left: 280.582px; top: 340.375px; width: 75.4179px; height: 15.6248px; --clip-path: polygon(-22% 162%, 100% 164%, 100% 100%, 2% 100%); background-size: 75.4179px 31.2497px; animation-duration: 76s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>smear</title><style> * { margin: 0; padding: 0; box-sizing: border-box; } body, html { width: 100%; height: 100%; overflow: hidden; background: #000; } smear-partition { display: block; width: 100%; height: 100%; position: relative; } smear-canvas { display: block; position: absolute; } smear-canvas canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: -moz-crisp-edges; image-rendering: crisp-edges; -ms-interpolation-mode: nearest-neighbor; } .smear-container { position: absolute; overflow: hidden; } .smear-container canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; } </style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="smear-container" data-x="0" data-y="0" data-width="0.99975" data-height="0.02931432584269663" data-start-edge="top" data-speed="69" data-source-interval="578" data-pixel-size="2" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="perlin" style="left: 0px; top: 0px; width: 355.911px; height: 10.4359px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.02931432584269663" data-width="0.99975" data-height="0.004813904494382023" data-start-edge="bottom" data-speed="60" data-source-interval="1973" data-pixel-size="6" data-color-fg="#333333" data-color-bg="#000000" data-source-type="perlin" style="left: 0px; top: 10.4359px; width: 355.911px; height: 1.71375px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.03412837078651685" data-width="0.99975" data-height="0.020265533707865168" data-start-edge="top" data-speed="33" data-source-interval="1677" data-pixel-size="2" data-color-fg="#FFFFFF" data-color-bg="#FF00CC" data-source-type="perlin" style="left: 0px; top: 12.1497px; width: 355.911px; height: 7.21453px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.0543938202247191" data-width="0.99975" data-height="0.009673314606741574" data-start-edge="top" data-speed="81" data-source-interval="1288" data-pixel-size="5" data-color-fg="#0000FF" data-color-bg="#FF69B4" data-source-type="perlin" style="left: 0px; top: 19.3642px; width: 355.911px; height: 3.4437px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.06406713483146068" data-width="0.99975" data-height="0.0224336797752809" data-start-edge="right" data-speed="38" data-source-interval="1169" data-pixel-size="3" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="perlin" style="left: 0px; top: 22.8079px; width: 355.911px; height: 7.98639px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.08650084269662921" data-width="0.99975" data-height="0.005733595505617977" data-start-edge="left" data-speed="65" data-source-interval="1731" data-pixel-size="5" data-color-fg="#87CEEB" data-color-bg="#000000" data-source-type="perlin" style="left: 0px; top: 30.7943px; width: 355.911px; height: 2.04116px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.09223455056179776" data-width="0.99975" data-height="0.009095365168539326" data-start-edge="right" data-speed="54" data-source-interval="546" data-pixel-size="4" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="perlin" style="left: 0px; top: 32.8355px; width: 355.911px; height: 3.23795px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.10132977528089887" data-width="0.99975" data-height="0.028455337078651687" data-start-edge="right" data-speed="29" data-source-interval="962" data-pixel-size="2" data-color-fg="#0000FF" data-color-bg="#FF69B4" data-source-type="perlin" style="left: 0px; top: 36.0734px; width: 355.911px; height: 10.1301px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.12978511235955056" data-width="0.99975" data-height="0.021457331460674158" data-start-edge="top" data-speed="70" data-source-interval="839" data-pixel-size="2" data-color-fg="#800080" data-color-bg="#000000" data-source-type="perlin" style="left: 0px; top: 46.2035px; width: 355.911px; height: 7.63881px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.1512424157303371" data-width="0.99975" data-height="0.003611825842696629" data-start-edge="right" data-speed="65" data-source-interval="916" data-pixel-size="1" data-color-fg="#FFFFFF" data-color-bg="#CCCCCC" data-source-type="perlin" style="left: 0px; top: 53.8423px; width: 355.911px; height: 1.28581px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.15485449438202248" data-width="0.99975" data-height="0.027288707865168536" data-start-edge="left" data-speed="60" data-source-interval="1687" data-pixel-size="6" data-color-fg="#FFFF00" data-color-bg="#FF0000" data-source-type="perlin" style="left: 0px; top: 55.1282px; width: 355.911px; height: 9.71478px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.1821429775280899" data-width="0.99975" data-height="0.025732050561797754" data-start-edge="left" data-speed="66" data-source-interval="1933" data-pixel-size="1" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="perlin" style="left: 0px; top: 64.8429px; width: 355.911px; height: 9.16061px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.207875" data-width="0.99975" data-height="0.01757008426966292" data-start-edge="top" data-speed="83" data-source-interval="1488" data-pixel-size="1" data-color-fg="#FF0000" data-color-bg="#0000FF" data-source-type="perlin" style="left: 0px; top: 74.0035px; width: 355.911px; height: 6.25495px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.2254452247191011" data-width="0.99975" data-height="0.027232162921348314" data-start-edge="top" data-speed="56" data-source-interval="1142" data-pixel-size="2" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="perlin" style="left: 0px; top: 80.2585px; width: 355.911px; height: 9.69465px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.25267724719101126" data-width="0.99975" data-height="0.018020168539325844" data-start-edge="top" data-speed="85" data-source-interval="1971" data-pixel-size="6" data-color-fg="#87CEEB" data-color-bg="#000000" data-source-type="perlin" style="left: 0px; top: 89.9531px; width: 355.911px; height: 6.41518px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.2706974719101124" data-width="0.99975" data-height="0.02018955056179775" data-start-edge="top" data-speed="68" data-source-interval="1198" data-pixel-size="5" data-color-fg="#800080" data-color-bg="#000000" data-source-type="perlin" style="left: 0px; top: 96.3683px; width: 355.911px; height: 7.18748px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.2908876404494382" data-width="0.99975" data-height="0.021199747191011236" data-start-edge="left" data-speed="64" data-source-interval="968" data-pixel-size="5" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="perlin" style="left: 0px; top: 103.556px; width: 355.911px; height: 7.54711px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.3120870786516854" data-width="0.99975" data-height="0.019605308988764045" data-start-edge="bottom" data-speed="59" data-source-interval="1819" data-pixel-size="2" data-color-fg="#FF0000" data-color-bg="#FFFFFF" data-source-type="perlin" style="left: 0px; top: 111.103px; width: 355.911px; height: 6.97949px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.331691011235955" data-width="0.99975" data-height="0.023859044943820223" data-start-edge="top" data-speed="83" data-source-interval="781" data-pixel-size="4" data-color-fg="#87CEEB" data-color-bg="#808080" data-source-type="perlin" style="left: 0px; top: 118.082px; width: 355.911px; height: 8.49382px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.3555505617977528" data-width="0.99975" data-height="0.007808314606741573" data-start-edge="right" data-speed="53" data-source-interval="1935" data-pixel-size="2" data-color-fg="#87CEEB" data-color-bg="#000000" data-source-type="perlin" style="left: 0px; top: 126.576px; width: 355.911px; height: 2.77976px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.36335955056179775" data-width="0.99975" data-height="0.006966404494382022" data-start-edge="left" data-speed="33" data-source-interval="1865" data-pixel-size="2" data-color-fg="#0000FF" data-color-bg="#666666" data-source-type="perlin" style="left: 0px; top: 129.356px; width: 355.911px; height: 2.48004px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.37032584269662927" data-width="0.99975" data-height="0.020025421348314608" data-start-edge="bottom" data-speed="65" data-source-interval="1008" data-pixel-size="2" data-color-fg="#FFFF00" data-color-bg="#FF0000" data-source-type="perlin" style="left: 0px; top: 131.836px; width: 355.911px; height: 7.12905px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.3903511235955056" data-width="0.99975" data-height="0.02249373595505618" data-start-edge="right" data-speed="99" data-source-interval="788" data-pixel-size="2" data-color-fg="#800080" data-color-bg="#000000" data-source-type="perlin" style="left: 0px; top: 138.965px; width: 355.911px; height: 8.00777px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.41284550561797756" data-width="0.99975" data-height="0.016069578651685394" data-start-edge="top" data-speed="56" data-source-interval="1766" data-pixel-size="2" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="perlin" style="left: 0px; top: 146.973px; width: 355.911px; height: 5.72077px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.42891573033707864" data-width="0.99975" data-height="0.00454376404494382" data-start-edge="top" data-speed="71" data-source-interval="948" data-pixel-size="1" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="perlin" style="left: 0px; top: 152.694px; width: 355.911px; height: 1.61758px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.43345786516853935" data-width="0.99975" data-height="0.02728859550561798" data-start-edge="right" data-speed="79" data-source-interval="786" data-pixel-size="3" data-color-fg="#87CEEB" data-color-bg="#000000" data-source-type="perlin" style="left: 0px; top: 154.311px; width: 355.911px; height: 9.71474px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.46074719101123596" data-width="0.99975" data-height="0.02272064606741573" data-start-edge="left" data-speed="51" data-source-interval="1464" data-pixel-size="3" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="perlin" style="left: 0px; top: 164.026px; width: 355.911px; height: 8.08855px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.4834662921348315" data-width="0.99975" data-height="0.01569112359550562" data-start-edge="bottom" data-speed="64" data-source-interval="919" data-pixel-size="6" data-color-fg="#FFFFFF" data-color-bg="#FF00CC" data-source-type="perlin" style="left: 0px; top: 172.114px; width: 355.911px; height: 5.58604px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.49916011235955055" data-width="0.99975" data-height="0.016917893258426967" data-start-edge="right" data-speed="65" data-source-interval="787" data-pixel-size="6" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="perlin" style="left: 0px; top: 177.701px; width: 355.911px; height: 6.02277px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.5160758426966292" data-width="0.99975" data-height="0.008911404494382023" data-start-edge="left" data-speed="98" data-source-interval="1420" data-pixel-size="1" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="perlin" style="left: 0px; top: 183.723px; width: 355.911px; height: 3.17246px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.5249887640449438" data-width="0.99975" data-height="0.017995196629213485" data-start-edge="left" data-speed="45" data-source-interval="927" data-pixel-size="2" data-color-fg="#FF8000" data-color-bg="#000000" data-source-type="perlin" style="left: 0px; top: 186.896px; width: 355.911px; height: 6.40629px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.5429831460674157" data-width="0.99975" data-height="0.026927275280898874" data-start-edge="top" data-speed="84" data-source-interval="1014" data-pixel-size="1" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="perlin" style="left: 0px; top: 193.302px; width: 355.911px; height: 9.58611px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.5699101123595506" data-width="0.99975" data-height="0.021109691011235953" data-start-edge="bottom" data-speed="55" data-source-interval="1685" data-pixel-size="1" data-color-fg="#FF0000" data-color-bg="#0000FF" data-source-type="perlin" style="left: 0px; top: 202.888px; width: 355.911px; height: 7.51505px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.5910196629213483" data-width="0.99975" data-height="0.027590983146067418" data-start-edge="bottom" data-speed="60" data-source-interval="726" data-pixel-size="3" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="perlin" style="left: 0px; top: 210.403px; width: 355.911px; height: 9.82239px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.6186123595505618" data-width="0.99975" data-height="0.024115421348314604" data-start-edge="right" data-speed="55" data-source-interval="934" data-pixel-size="4" data-color-fg="#FF0000" data-color-bg="#0000FF" data-source-type="perlin" style="left: 0px; top: 220.226px; width: 355.911px; height: 8.58509px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.6427275280898876" data-width="0.99975" data-height="0.027828904494382023" data-start-edge="bottom" data-speed="86" data-source-interval="1999" data-pixel-size="1" data-color-fg="#0000FF" data-color-bg="#666666" data-source-type="perlin" style="left: 0px; top: 228.811px; width: 355.911px; height: 9.90709px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.6705561797752808" data-width="0.99975" data-height="0.020523988764044945" data-start-edge="right" data-speed="63" data-source-interval="714" data-pixel-size="5" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="perlin" style="left: 0px; top: 238.718px; width: 355.911px; height: 7.30654px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.6910786516853933" data-width="0.99975" data-height="0.010462837078651685" data-start-edge="top" data-speed="94" data-source-interval="991" data-pixel-size="4" data-color-fg="#FFFF00" data-color-bg="#FF0000" data-source-type="perlin" style="left: 0px; top: 246.024px; width: 355.911px; height: 3.72477px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.7015421348314607" data-width="0.99975" data-height="0.010338960674157304" data-start-edge="bottom" data-speed="98" data-source-interval="1975" data-pixel-size="6" data-color-fg="#FF69B4" data-color-bg="#FF0000" data-source-type="perlin" style="left: 0px; top: 249.749px; width: 355.911px; height: 3.68067px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.7118820224719101" data-width="0.99975" data-height="0.004564747191011236" data-start-edge="bottom" data-speed="63" data-source-interval="992" data-pixel-size="4" data-color-fg="#87CEEB" data-color-bg="#808080" data-source-type="perlin" style="left: 0px; top: 253.43px; width: 355.911px; height: 1.62505px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.7164466292134831" data-width="0.99975" data-height="0.0263011797752809" data-start-edge="bottom" data-speed="39" data-source-interval="672" data-pixel-size="5" data-color-fg="#87CEEB" data-color-bg="#000000" data-source-type="perlin" style="left: 0px; top: 255.055px; width: 355.911px; height: 9.36322px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.742747191011236" data-width="0.99975" data-height="0.015835870786516854" data-start-edge="top" data-speed="70" data-source-interval="1235" data-pixel-size="4" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="perlin" style="left: 0px; top: 264.418px; width: 355.911px; height: 5.63757px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.7585842696629213" data-width="0.99975" data-height="0.012434044943820225" data-start-edge="right" data-speed="66" data-source-interval="1541" data-pixel-size="5" data-color-fg="#FF0000" data-color-bg="#FFFFFF" data-source-type="perlin" style="left: 0px; top: 270.056px; width: 355.911px; height: 4.42652px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.7710168539325843" data-width="0.99975" data-height="0.01935308988764045" data-start-edge="bottom" data-speed="75" data-source-interval="739" data-pixel-size="1" data-color-fg="#0000FF" data-color-bg="#FF69B4" data-source-type="perlin" style="left: 0px; top: 274.482px; width: 355.911px; height: 6.8897px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.790370786516854" data-width="0.99975" data-height="0.02250449438202247" data-start-edge="bottom" data-speed="94" data-source-interval="1465" data-pixel-size="4" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="perlin" style="left: 0px; top: 281.372px; width: 355.911px; height: 8.0116px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.8128735955056179" data-width="0.99975" data-height="0.015517921348314607" data-start-edge="left" data-speed="83" data-source-interval="1004" data-pixel-size="3" data-color-fg="#FF8000" data-color-bg="#FFFFFF" data-source-type="perlin" style="left: 0px; top: 289.383px; width: 355.911px; height: 5.52438px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.8283932584269663" data-width="0.99975" data-height="0.02502438202247191" data-start-edge="top" data-speed="56" data-source-interval="1995" data-pixel-size="6" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="perlin" style="left: 0px; top: 294.908px; width: 355.911px; height: 8.90868px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.8534157303370786" data-width="0.99975" data-height="0.024326376404494383" data-start-edge="right" data-speed="79" data-source-interval="1712" data-pixel-size="1" data-color-fg="#FFFF00" data-color-bg="#FF0000" data-source-type="perlin" style="left: 0px; top: 303.816px; width: 355.911px; height: 8.66019px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.8777443820224718" data-width="0.99975" data-height="0.013149719101123596" data-start-edge="bottom" data-speed="72" data-source-interval="786" data-pixel-size="3" data-color-fg="#FF0000" data-color-bg="#FFFFFF" data-source-type="perlin" style="left: 0px; top: 312.477px; width: 355.911px; height: 4.6813px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.8908932584269663" data-width="0.99975" data-height="0.02690696629213483" data-start-edge="bottom" data-speed="68" data-source-interval="1217" data-pixel-size="2" data-color-fg="#FF8000" data-color-bg="#000000" data-source-type="perlin" style="left: 0px; top: 317.158px; width: 355.911px; height: 9.57888px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.9178005617977528" data-width="0.99975" data-height="0.01155" data-start-edge="left" data-speed="77" data-source-interval="1905" data-pixel-size="2" data-color-fg="#87CEEB" data-color-bg="#808080" data-source-type="perlin" style="left: 0px; top: 326.737px; width: 355.911px; height: 4.1118px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.9293511235955055" data-width="0.99975" data-height="0.007373202247191011" data-start-edge="left" data-speed="74" data-source-interval="850" data-pixel-size="6" data-color-fg="#FFFFFF" data-color-bg="#FF00CC" data-source-type="perlin" style="left: 0px; top: 330.849px; width: 355.911px; height: 2.62486px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.9367247191011235" data-width="0.99975" data-height="0.02897752808988764" data-start-edge="top" data-speed="86" data-source-interval="1661" data-pixel-size="4" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="perlin" style="left: 0px; top: 333.474px; width: 355.911px; height: 10.316px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.9656994382022471" data-width="0.99975" data-height="0.006147275280898876" data-start-edge="bottom" data-speed="68" data-source-interval="1605" data-pixel-size="1" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="perlin" style="left: 0px; top: 343.789px; width: 355.911px; height: 2.18843px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.9718483146067416" data-width="0.99975" data-height="0.006478286516853933" data-start-edge="bottom" data-speed="50" data-source-interval="876" data-pixel-size="5" data-color-fg="#0000FF" data-color-bg="#FF69B4" data-source-type="perlin" style="left: 0px; top: 345.978px; width: 355.911px; height: 2.30627px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.9783258426966291" data-width="0.99975" data-height="0.021424044943820227" data-start-edge="top" data-speed="69" data-source-interval="599" data-pixel-size="2" data-color-fg="#87CEEB" data-color-bg="#808080" data-source-type="perlin" style="left: 0px; top: 348.284px; width: 355.911px; height: 7.62696px;"><canvas></canvas></div></div><script> class SmearCanvas { constructor(c) { this.container = c; this.canvas = c.querySelector("canvas") || document.createElement("canvas"); if (!c.querySelector("canvas")) c.appendChild(this.canvas); this.ctx = this.canvas.getContext("2d"); this.ctx.imageSmoothingEnabled = false; this.imageData = null; this.lastTime = 0; this.animationId = null; this.speed = parseInt(c.dataset.speed) || 50; this.pixelSize = parseInt(c.dataset.pixelSize) || 2; this.sourceInterval = parseInt(c.dataset.sourceInterval) || 1000; this.colorFg = c.dataset.colorFg || "#FFFFFF"; this.colorBg = c.dataset.colorBg || "#000000"; this.sourceType = c.dataset.sourceType || "noise"; this.startEdge = c.dataset.startEdge || "top"; this.fgRGB = this.hexToRGB(this.colorFg); this.bgRGB = this.hexToRGB(this.colorBg); this.moveSpeed = (1000 / 60) / this.speed; this.subPixelX = 0; this.subPixelY = 0; this.leadX = 0; this.leadY = 0; this.initDirection(); this.lastDirectionChange = 0; this.nextDirectionInterval = this.randomInterval(); this.sourceParams = this.generateSourceParams(); this.lastSourceTime = 0; this.resize(); this.initCanvas(); this.generateSourceEdge(); this.initLeadPosition(); this.startAnimation(); this.resizeObserver = new ResizeObserver(() => this.resize()); this.resizeObserver.observe(this.container); } generateSourceParams() { return { steps: 3 + Math.floor(Math.random() * 6), stripeWidth: 2 + Math.floor(Math.random() * 8), checkSize: 1 + Math.floor(Math.random() * 4), phase: 0, dashLength: 3 + Math.floor(Math.random() * 10), gapLength: 2 + Math.floor(Math.random() * 6), density: 0.05 + Math.random() * 0.25, frequency: 1 + Math.random() * 4, sinePhase: Math.random() * Math.PI * 2, seed1: Math.random() * 100, seed2: Math.random() * 100, seed3: Math.random() * 100, counter: Math.floor(Math.random() * 65536), caRule: Math.random() > 0.5 ? 30 : 110 }; } initDirection() { switch (this.startEdge) { case "top": this.dx = 0; this.dy = 1; break; case "bottom": this.dx = 0; this.dy = -1; break; case "left": this.dx = 1; this.dy = 0; break; case "right": this.dx = -1; this.dy = 0; break; default: this.dx = 0; this.dy = 1; } } initLeadPosition() { switch (this.startEdge) { case "top": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = 1; break; case "bottom": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = this.internalHeight - 2; break; case "left": this.leadX = 1; this.leadY = Math.floor(this.internalHeight / 2); break; case "right": this.leadX = this.internalWidth - 2; this.leadY = Math.floor(this.internalHeight / 2); break; } } resize() { var rect = this.container.getBoundingClientRect(); if (rect.width === 0 || rect.height === 0) return; this.internalWidth = Math.ceil(rect.width / this.pixelSize); this.internalHeight = Math.ceil(rect.height / this.pixelSize); var oldImageData = this.imageData; var oldWidth = this.canvas.width; var oldHeight = this.canvas.height; this.canvas.width = this.internalWidth; this.canvas.height = this.internalHeight; this.imageData = this.ctx.createImageData(this.internalWidth, this.internalHeight); if (oldImageData && oldWidth > 0 && oldHeight > 0) { var minW = Math.min(oldWidth, this.internalWidth); var minH = Math.min(oldHeight, this.internalHeight); for (var y = 0; y < minH; y++) { for (var x = 0; x < minW; x++) { var oi = (y * oldWidth + x) * 4; var ni = (y * this.internalWidth + x) * 4; this.imageData.data[ni] = oldImageData.data[oi]; this.imageData.data[ni + 1] = oldImageData.data[oi + 1]; this.imageData.data[ni + 2] = oldImageData.data[oi + 2]; this.imageData.data[ni + 3] = oldImageData.data[oi + 3]; } } } } hexToRGB(hex) { var r = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); return r ? { r: parseInt(r[1], 16), g: parseInt(r[2], 16), b: parseInt(r[3], 16) } : { r: 255, g: 255, b: 255 }; } lerpColor(t) { return { r: Math.round(this.bgRGB.r + (this.fgRGB.r - this.bgRGB.r) * t), g: Math.round(this.bgRGB.g + (this.fgRGB.g - this.bgRGB.g) * t), b: Math.round(this.bgRGB.b + (this.fgRGB.b - this.bgRGB.b) * t) }; } getSourceValue(pos, length) { var t = pos / length; switch (this.sourceType) { case "noise": return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; case "linear-gradient": return this.lerpColor(t); case "stepped-gradient": var steps = this.sourceParams.steps || 5; return this.lerpColor(Math.floor(t * steps) / (steps - 1)); case "random-gradient": if (!this.gradientCache || this.gradientCache.length !== length) this.generateRandomGradient(length); return this.lerpColor(this.gradientCache[pos]); case "stripes": return (Math.floor(pos / (this.sourceParams.stripeWidth || 4)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "checkerboard": return ((Math.floor(pos / (this.sourceParams.checkSize || 2)) + (this.sourceParams.phase || 0)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "dashes": var cycle = (this.sourceParams.dashLength || 6) + (this.sourceParams.gapLength || 3); return (pos % cycle < (this.sourceParams.dashLength || 6)) ? this.fgRGB : this.bgRGB; case "dots": return Math.random() < (this.sourceParams.density || 0.15) ? this.fgRGB : this.bgRGB; case "sine": var sv = (Math.sin((t * (this.sourceParams.frequency || 2) * Math.PI * 2) + (this.sourceParams.sinePhase || 0)) + 1) / 2; return this.lerpColor(sv); case "perlin": var p1 = Math.sin(t * 3.7 + this.sourceParams.seed1) * 0.5; var p2 = Math.sin(t * 7.3 + this.sourceParams.seed2) * 0.25; var p3 = Math.sin(t * 13.1 + this.sourceParams.seed3) * 0.125; return this.lerpColor(Math.max(0, Math.min(1, (p1 + p2 + p3 + 0.875) / 1.75))); case "binary-counter": return ((this.sourceParams.counter >> (pos % 16)) & 1) ? this.fgRGB : this.bgRGB; case "cellular-automata": if (!this.caState || this.caState.length !== length) this.initCellularAutomata(length); return this.caState[pos] ? this.fgRGB : this.bgRGB; default: return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; } } generateRandomGradient(length) { var np = 3 + Math.floor(Math.random() * 4); var cp = [0]; for (var i = 1; i < np - 1; i++) cp.push(Math.random()); cp.push(1); cp.sort((a, b) => a - b); var cv = cp.map(() => Math.random()); this.gradientCache = []; for (var i = 0; i < length; i++) { var t = i / length; var si = 0; for (var j = 0; j < cp.length - 1; j++) { if (t >= cp[j] && t <= cp[j + 1]) { si = j; break; } } var st = (t - cp[si]) / (cp[si + 1] - cp[si]); this.gradientCache.push(cv[si] + (cv[si + 1] - cv[si]) * st); } } initCellularAutomata(length) { this.caState = []; for (var i = 0; i < length; i++) this.caState.push(Math.random() > 0.5); } evolveCellularAutomata() { if (!this.caState) return; var rule = this.sourceParams.caRule || 30; var os = [...this.caState]; var len = this.caState.length; for (var i = 0; i < len; i++) { var p = (os[(i - 1 + len) % len] ? 4 : 0) + (os[i] ? 2 : 0) + (os[(i + 1) % len] ? 1 : 0); this.caState[i] = ((rule >> p) & 1) === 1; } } updateSourceParams() { switch (this.sourceType) { case "checkerboard": this.sourceParams.phase = (this.sourceParams.phase + 1) % 2; break; case "sine": this.sourceParams.sinePhase += 0.5; break; case "binary-counter": this.sourceParams.counter++; break; case "cellular-automata": this.evolveCellularAutomata(); break; case "random-gradient": this.gradientCache = null; break; case "perlin": this.sourceParams.seed1 += 0.3; this.sourceParams.seed2 += 0.2; this.sourceParams.seed3 += 0.1; break; } } randomInterval() { return 100 + Math.random() * 900; } changeDirection() { var dirs = [[0, 1], [1, 1], [1, 0], [1, -1], [0, -1], [-1, -1], [-1, 0], [-1, 1]]; var idx = dirs.findIndex(d => d[0] === this.dx && d[1] === this.dy); if (idx === -1) idx = 0; idx = Math.random() > 0.5 ? (idx + 1) % 8 : (idx + 7) % 8; this.dx = dirs[idx][0]; this.dy = dirs[idx][1]; } initCanvas() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var isH = (this.startEdge === "top" || this.startEdge === "bottom"); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { var idx = (y * w + x) * 4; var col = this.getSourceValue(isH ? x : y, isH ? w : h); data[idx] = col.r; data[idx + 1] = col.g; data[idx + 2] = col.b; data[idx + 3] = 255; } } this.ctx.putImageData(this.imageData, 0, 0); } generateSourceEdge() { if (!this.imageData) return; this.updateSourceParams(); var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var gen = (getIdx, len) => { for (var i = 0; i < len; i++) { var idx = getIdx(i); var c = this.getSourceValue(i, len); data[idx] = c.r; data[idx + 1] = c.g; data[idx + 2] = c.b; data[idx + 3] = 255; } }; switch (this.startEdge) { case "top": gen(x => x * 4, w); break; case "bottom": gen(x => ((h - 1) * w + x) * 4, w); break; case "left": gen(y => (y * w) * 4, h); break; case "right": gen(y => (y * w + (w - 1)) * 4, h); break; } } getSourceEdgeCoord(x, y) { switch (this.startEdge) { case "top": return y === 0; case "bottom": return y === this.internalHeight - 1; case "left": return x === 0; case "right": return x === this.internalWidth - 1; } return false; } smear() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; this.subPixelX += this.dx * this.moveSpeed; this.subPixelY += this.dy * this.moveSpeed; var moveX = Math.trunc(this.subPixelX), moveY = Math.trunc(this.subPixelY); if (moveX === 0 && moveY === 0) return; this.subPixelX -= moveX; this.subPixelY -= moveY; this.leadX += moveX; this.leadY += moveY; if (this.leadX <= 0 || this.leadX >= w - 1) { this.dx = -this.dx; this.leadX = Math.max(0, Math.min(w - 1, this.leadX)); } if (this.leadY <= 0 || this.leadY >= h - 1) { this.dy = -this.dy; this.leadY = Math.max(0, Math.min(h - 1, this.leadY)); } var oldData = new Uint8ClampedArray(data); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { if (this.getSourceEdgeCoord(x, y)) continue; var srcX = Math.max(0, Math.min(w - 1, x - moveX)); var srcY = Math.max(0, Math.min(h - 1, y - moveY)); var dstIdx = (y * w + x) * 4, srcIdx = (srcY * w + srcX) * 4; data[dstIdx] = oldData[srcIdx]; data[dstIdx + 1] = oldData[srcIdx + 1]; data[dstIdx + 2] = oldData[srcIdx + 2]; data[dstIdx + 3] = oldData[srcIdx + 3]; } } } startAnimation() { var fi = 1000 / 60; var animate = (ts) => { if (!this.lastTime) this.lastTime = ts; if (!this.lastSourceTime) this.lastSourceTime = ts; if (!this.lastDirectionChange) this.lastDirectionChange = ts; if (ts - this.lastDirectionChange >= this.nextDirectionInterval) { this.changeDirection(); this.lastDirectionChange = ts; this.nextDirectionInterval = this.randomInterval(); } if (ts - this.lastSourceTime >= this.sourceInterval) { this.generateSourceEdge(); this.lastSourceTime = ts; } if (ts - this.lastTime >= fi) { this.smear(); if (this.imageData) this.ctx.putImageData(this.imageData, 0, 0); this.lastTime = ts; } this.animationId = requestAnimationFrame(animate); }; this.animationId = requestAnimationFrame(animate); } } function layoutSmears() { var vw = window.innerWidth, vh = window.innerHeight; document.querySelectorAll(".smear-container").forEach(function(div) { var x = parseFloat(div.dataset.x || 0); var y = parseFloat(div.dataset.y || 0); var w = parseFloat(div.dataset.width || 0); var h = parseFloat(div.dataset.height || 0); div.style.left = (x * vw) + "px"; div.style.top = (y * vh) + "px"; div.style.width = (w * vw) + "px"; div.style.height = (h * vh) + "px"; }); } function initSmears() { document.querySelectorAll(".smear-container").forEach(function(c) { if (!c._smearInstance) c._smearInstance = new SmearCanvas(c); }); } window.addEventListener("load", function() { layoutSmears(); initSmears(); }); window.addEventListener("resize", layoutSmears); layoutSmears(); initSmears(); </script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>smear</title><style> * { margin: 0; padding: 0; box-sizing: border-box; } body, html { width: 100%; height: 100%; overflow: hidden; background: #000; } smear-partition { display: block; width: 100%; height: 100%; position: relative; } smear-canvas { display: block; position: absolute; } smear-canvas canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: -moz-crisp-edges; image-rendering: crisp-edges; -ms-interpolation-mode: nearest-neighbor; } .smear-container { position: absolute; overflow: hidden; } .smear-container canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; } </style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="smear-container" data-x="0.2633542944785276" data-y="0.15239432515337423" data-width="0.12508573619631902" data-height="0.3071027607361963" data-start-edge="left" data-speed="66" data-source-interval="699" data-pixel-size="6" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="binary-counter" style="left: 171.707px; top: 99.3611px; width: 81.5559px; height: 200.231px;"><canvas></canvas></div><div class="smear-container" data-x="0.38844018404907976" data-y="0.15239432515337423" data-width="0.2792116564417178" data-height="0.1314920245398773" data-start-edge="right" data-speed="85" data-source-interval="772" data-pixel-size="4" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="binary-counter" style="left: 253.263px; top: 99.3611px; width: 182.046px; height: 85.7328px;"><canvas></canvas></div><div class="smear-container" data-x="0.7443144171779141" data-y="0.34110429447852764" data-width="0.25568558282208587" data-height="0.13884861963190184" data-start-edge="bottom" data-speed="99" data-source-interval="736" data-pixel-size="1" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="binary-counter" style="left: 485.293px; top: 222.4px; width: 166.707px; height: 90.5293px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.7027009202453988" data-width="0.5411533742331288" data-height="0.06321395705521472" data-start-edge="top" data-speed="39" data-source-interval="1880" data-pixel-size="3" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="binary-counter" style="left: 0px; top: 458.161px; width: 352.832px; height: 41.2155px;"><canvas></canvas></div><div class="smear-container" data-x="0.7443144171779141" data-y="0.15239432515337423" data-width="0.20815184049079755" data-height="0.1637638036809816" data-start-edge="right" data-speed="92" data-source-interval="1891" data-pixel-size="4" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="binary-counter" style="left: 485.293px; top: 99.3611px; width: 135.715px; height: 106.774px;"><canvas></canvas></div><div class="smear-container" data-x="0.4079769938650306" data-y="0.0725159509202454" data-width="0.4255122699386503" data-height="0.0798782208588957" data-start-edge="right" data-speed="93" data-source-interval="1188" data-pixel-size="5" data-color-fg="#FFFFFF" data-color-bg="#CCCCCC" data-source-type="binary-counter" style="left: 266.001px; top: 47.2804px; width: 277.434px; height: 52.0806px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.15239432515337423" data-width="0.10145950920245399" data-height="0.330361963190184" data-start-edge="right" data-speed="64" data-source-interval="617" data-pixel-size="6" data-color-fg="#FFFFFF" data-color-bg="#CCCCCC" data-source-type="binary-counter" style="left: 0px; top: 99.3611px; width: 66.1516px; height: 215.396px;"><canvas></canvas></div><div class="smear-container" data-x="0.6256978527607362" data-y="0.9106088957055215" data-width="0.3743021472392638" data-height="0.08939125766871166" data-start-edge="left" data-speed="33" data-source-interval="999" data-pixel-size="6" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="binary-counter" style="left: 407.955px; top: 593.717px; width: 244.045px; height: 58.2831px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.0725159509202454" data-width="0.4079769938650306" data-height="0.0798782208588957" data-start-edge="left" data-speed="75" data-source-interval="1083" data-pixel-size="1" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="binary-counter" style="left: 0px; top: 47.2804px; width: 266.001px; height: 52.0806px;"><canvas></canvas></div><div class="smear-container" data-x="0.6005966257668711" data-y="0.4594969325153374" data-width="0.14371779141104293" data-height="0.22607975460122698" data-start-edge="bottom" data-speed="73" data-source-interval="1478" data-pixel-size="6" data-color-fg="#FFFFFF" data-color-bg="#CCCCCC" data-source-type="binary-counter" style="left: 391.589px; top: 299.592px; width: 93.704px; height: 147.404px;"><canvas></canvas></div><div class="smear-container" data-x="0.38844018404907976" data-y="0.32644171779141107" data-width="0.35587423312883437" data-height="0.08893895705521472" data-start-edge="left" data-speed="94" data-source-interval="1506" data-pixel-size="1" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="binary-counter" style="left: 253.263px; top: 212.84px; width: 232.03px; height: 57.9882px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.8408604294478528" data-width="0.19852914110429448" data-height="0.15913957055214725" data-start-edge="right" data-speed="90" data-source-interval="1173" data-pixel-size="5" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="binary-counter" style="left: 0px; top: 548.241px; width: 129.441px; height: 103.759px;"><canvas></canvas></div><div class="smear-container" data-x="0.6256978527607362" data-y="0.7956932515337424" data-width="0.3743021472392638" data-height="0.08404171779141105" data-start-edge="bottom" data-speed="51" data-source-interval="1395" data-pixel-size="2" data-color-fg="#FFFFFF" data-color-bg="#CCCCCC" data-source-type="binary-counter" style="left: 407.955px; top: 518.792px; width: 244.045px; height: 54.7952px;"><canvas></canvas></div><div class="smear-container" data-x="0.4653865030674847" data-y="0.4594969325153374" data-width="0.13520981595092024" data-height="0.22607975460122698" data-start-edge="bottom" data-speed="54" data-source-interval="1446" data-pixel-size="4" data-color-fg="#FFFFFF" data-color-bg="#CCCCCC" data-source-type="binary-counter" style="left: 303.432px; top: 299.592px; width: 88.1568px; height: 147.404px;"><canvas></canvas></div><div class="smear-container" data-x="0.4803819018404908" data-y="0.7956932515337424" data-width="0.14531733128834357" data-height="0.20430674846625765" data-start-edge="top" data-speed="62" data-source-interval="727" data-pixel-size="3" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="binary-counter" style="left: 313.209px; top: 518.792px; width: 94.7469px; height: 133.208px;"><canvas></canvas></div><div class="smear-container" data-x="0.8568496932515338" data-y="0.47995245398773" data-width="0.14315076687116565" data-height="0.20562423312883438" data-start-edge="bottom" data-speed="66" data-source-interval="1945" data-pixel-size="1" data-color-fg="#FFFFFF" data-color-bg="#CCCCCC" data-source-type="binary-counter" style="left: 558.666px; top: 312.929px; width: 93.3343px; height: 134.067px;"><canvas></canvas></div><div class="smear-container" data-x="0.5411533742331288" data-y="0.7027009202453988" data-width="0.4588466257668712" data-height="0.06287883435582822" data-start-edge="bottom" data-speed="43" data-source-interval="1303" data-pixel-size="5" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="binary-counter" style="left: 352.832px; top: 458.161px; width: 299.168px; height: 40.997px;"><canvas></canvas></div><div class="smear-container" data-x="0.2957162576687116" data-y="0.4594969325153374" data-width="0.12385046012269939" data-height="0.22607975460122698" data-start-edge="left" data-speed="51" data-source-interval="1298" data-pixel-size="4" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="binary-counter" style="left: 192.807px; top: 299.592px; width: 80.7505px; height: 147.404px;"><canvas></canvas></div><div class="smear-container" data-x="0.10145950920245399" data-y="0.3067883435582822" data-width="0.10013696319018404" data-height="0.27716717791411044" data-start-edge="right" data-speed="47" data-source-interval="997" data-pixel-size="4" data-color-fg="#FFFFFF" data-color-bg="#CCCCCC" data-source-type="binary-counter" style="left: 66.1516px; top: 200.026px; width: 65.2893px; height: 180.713px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.019546625766871165" data-width="0.7601625766871165" data-height="0.036402453987730066" data-start-edge="left" data-speed="84" data-source-interval="642" data-pixel-size="2" data-color-fg="#FFFFFF" data-color-bg="#CCCCCC" data-source-type="binary-counter" style="left: 0px; top: 12.7444px; width: 495.626px; height: 23.7344px;"><canvas></canvas></div><div class="smear-container" data-x="0.7443144171779141" data-y="0.47995245398773" data-width="0.11253466257668712" data-height="0.20562423312883438" data-start-edge="left" data-speed="78" data-source-interval="632" data-pixel-size="3" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="binary-counter" style="left: 485.293px; top: 312.929px; width: 73.3726px; height: 134.067px;"><canvas></canvas></div><div class="smear-container" data-x="0.20159662576687118" data-y="0.4594969325153374" data-width="0.09411978527607362" data-height="0.22607975460122698" data-start-edge="bottom" data-speed="99" data-source-interval="556" data-pixel-size="3" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="binary-counter" style="left: 131.441px; top: 299.592px; width: 61.3661px; height: 147.404px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.4827561349693252" data-width="0.10145950920245399" data-height="0.20282055214723926" data-start-edge="top" data-speed="82" data-source-interval="1596" data-pixel-size="6" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="binary-counter" style="left: 0px; top: 314.757px; width: 66.1516px; height: 132.239px;"><canvas></canvas></div><div class="smear-container" data-x="0.7601625766871165" data-y="0" data-width="0.23983742331288344" data-height="0.0725159509202454" data-start-edge="right" data-speed="29" data-source-interval="925" data-pixel-size="4" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="binary-counter" style="left: 495.626px; top: 0px; width: 156.374px; height: 47.2804px;"><canvas></canvas></div><div class="smear-container" data-x="0.19852914110429448" data-y="0.7956932515337424" data-width="0.0839355828220859" data-height="0.20430674846625765" data-start-edge="bottom" data-speed="85" data-source-interval="1601" data-pixel-size="6" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="binary-counter" style="left: 129.441px; top: 518.792px; width: 54.726px; height: 133.208px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.6855766871165644" data-width="1" data-height="0.017123312883435583" data-start-edge="top" data-speed="52" data-source-interval="706" data-pixel-size="1" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="binary-counter" style="left: 0px; top: 446.996px; width: 652px; height: 11.1644px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.7659141104294478" data-width="0.5411533742331288" data-height="0.02977883435582822" data-start-edge="bottom" data-speed="49" data-source-interval="576" data-pixel-size="2" data-color-fg="#FFFFFF" data-color-bg="#CCCCCC" data-source-type="binary-counter" style="left: 0px; top: 499.376px; width: 352.832px; height: 19.4158px;"><canvas></canvas></div><div class="smear-container" data-x="0.38844018404907976" data-y="0.4153819018404908" data-width="0.35587423312883437" data-height="0.04411564417177914" data-start-edge="right" data-speed="44" data-source-interval="1606" data-pixel-size="3" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="binary-counter" style="left: 253.263px; top: 270.829px; width: 232.03px; height: 28.7634px;"><canvas></canvas></div><div class="smear-container" data-x="0.10145950920245399" data-y="0.15239432515337423" data-width="0.10013696319018404" data-height="0.1543941717791411" data-start-edge="top" data-speed="94" data-source-interval="827" data-pixel-size="6" data-color-fg="#FFFFFF" data-color-bg="#CCCCCC" data-source-type="binary-counter" style="left: 66.1516px; top: 99.3611px; width: 65.2893px; height: 100.665px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0" data-width="0.7601625766871165" data-height="0.019546625766871165" data-start-edge="top" data-speed="32" data-source-interval="1916" data-pixel-size="6" data-color-fg="#FFFFFF" data-color-bg="#CCCCCC" data-source-type="binary-counter" style="left: 0px; top: 0px; width: 495.626px; height: 12.7444px;"><canvas></canvas></div><div class="smear-container" data-x="0.5411533742331288" data-y="0.7655797546012271" data-width="0.4588466257668712" data-height="0.030113957055214722" data-start-edge="left" data-speed="45" data-source-interval="1729" data-pixel-size="2" data-color-fg="#FFFFFF" data-color-bg="#CCCCCC" data-source-type="binary-counter" style="left: 352.832px; top: 499.158px; width: 299.168px; height: 19.6343px;"><canvas></canvas></div><div class="smear-container" data-x="0.6676518404907976" data-y="0.15239432515337423" data-width="0.07666273006134969" data-height="0.17404754601226993" data-start-edge="bottom" data-speed="70" data-source-interval="539" data-pixel-size="4" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="binary-counter" style="left: 435.309px; top: 99.3611px; width: 49.9841px; height: 113.479px;"><canvas></canvas></div><div class="smear-container" data-x="0.8334892638036809" data-y="0.0725159509202454" data-width="0.166510736196319" data-height="0.0798782208588957" data-start-edge="bottom" data-speed="59" data-source-interval="1995" data-pixel-size="1" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="binary-counter" style="left: 543.435px; top: 47.2804px; width: 108.565px; height: 52.0806px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.05594907975460123" data-width="0.7601625766871165" data-height="0.016566871165644172" data-start-edge="left" data-speed="42" data-source-interval="1096" data-pixel-size="3" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="binary-counter" style="left: 0px; top: 36.4788px; width: 495.626px; height: 10.8016px;"><canvas></canvas></div><div class="smear-container" data-x="0.38844018404907976" data-y="0.28388650306748464" data-width="0.2792116564417178" data-height="0.0425558282208589" data-start-edge="left" data-speed="69" data-source-interval="1724" data-pixel-size="4" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="binary-counter" style="left: 253.263px; top: 185.094px; width: 182.046px; height: 27.7464px;"><canvas></canvas></div><div class="smear-container" data-x="0.6256978527607362" data-y="0.8797346625766871" data-width="0.3743021472392638" data-height="0.03087361963190184" data-start-edge="right" data-speed="59" data-source-interval="1717" data-pixel-size="2" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="binary-counter" style="left: 407.955px; top: 573.587px; width: 244.045px; height: 20.1296px;"><canvas></canvas></div><div class="smear-container" data-x="0.20159662576687118" data-y="0.15239432515337423" data-width="0.03373496932515337" data-height="0.3071027607361963" data-start-edge="bottom" data-speed="77" data-source-interval="1170" data-pixel-size="4" data-color-fg="#FFFFFF" data-color-bg="#CCCCCC" data-source-type="binary-counter" style="left: 131.441px; top: 99.3611px; width: 21.9952px; height: 200.231px;"><canvas></canvas></div><div class="smear-container" data-x="0.41956748466257665" data-y="0.4594969325153374" data-width="0.04582009202453988" data-height="0.22607975460122698" data-start-edge="right" data-speed="72" data-source-interval="792" data-pixel-size="6" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="binary-counter" style="left: 273.558px; top: 299.592px; width: 29.8747px; height: 147.404px;"><canvas></canvas></div><div class="smear-container" data-x="0.10145950920245399" data-y="0.5839555214723926" data-width="0.10013696319018404" data-height="0.10162116564417178" data-start-edge="bottom" data-speed="35" data-source-interval="540" data-pixel-size="5" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="binary-counter" style="left: 66.1516px; top: 380.739px; width: 65.2893px; height: 66.257px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.7956932515337424" data-width="0.19852914110429448" data-height="0.045167638036809815" data-start-edge="left" data-speed="98" data-source-interval="1640" data-pixel-size="1" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="binary-counter" style="left: 0px; top: 518.792px; width: 129.441px; height: 29.4493px;"><canvas></canvas></div><div class="smear-container" data-x="0.2353312883435583" data-y="0.15239432515337423" data-width="0.02802254601226994" data-height="0.3071027607361963" data-start-edge="top" data-speed="65" data-source-interval="1098" data-pixel-size="6" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="binary-counter" style="left: 153.436px; top: 99.3611px; width: 18.2707px; height: 200.231px;"><canvas></canvas></div><div class="smear-container" data-x="0.9524662576687117" data-y="0.15239432515337423" data-width="0.04753328220858896" data-height="0.1637638036809816" data-start-edge="left" data-speed="32" data-source-interval="1510" data-pixel-size="1" data-color-fg="#FF00CC" data-color-bg="#000000" data-source-type="binary-counter" style="left: 621.008px; top: 99.3611px; width: 30.9917px; height: 106.774px;"><canvas></canvas></div><div class="smear-container" data-x="0.7443144171779141" data-y="0.3161579754601227" data-width="0.25568558282208587" data-height="0.024946472392638037" data-start-edge="bottom" data-speed="74" data-source-interval="1150" data-pixel-size="1" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="binary-counter" style="left: 485.293px; top: 206.135px; width: 166.707px; height: 16.2651px;"><canvas></canvas></div><div class="smear-container" data-x="0.2824647239263804" data-y="0.7956932515337424" data-width="0.035585122699386504" data-height="0.20430674846625765" data-start-edge="top" data-speed="26" data-source-interval="1812" data-pixel-size="1" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="binary-counter" style="left: 184.167px; top: 518.792px; width: 23.2015px; height: 133.208px;"><canvas></canvas></div><div class="smear-container" data-x="0.31805061349693253" data-y="0.7956932515337424" data-width="0.16233128834355828" data-height="0.20430674846625765" data-start-edge="left" data-speed="91" data-source-interval="834" data-pixel-size="2" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="binary-counter" style="left: 207.369px; top: 518.792px; width: 105.84px; height: 133.208px;"><canvas></canvas></div></div><script> class SmearCanvas { constructor(c) { this.container = c; this.canvas = c.querySelector("canvas") || document.createElement("canvas"); if (!c.querySelector("canvas")) c.appendChild(this.canvas); this.ctx = this.canvas.getContext("2d"); this.ctx.imageSmoothingEnabled = false; this.imageData = null; this.lastTime = 0; this.animationId = null; this.speed = parseInt(c.dataset.speed) || 50; this.pixelSize = parseInt(c.dataset.pixelSize) || 2; this.sourceInterval = parseInt(c.dataset.sourceInterval) || 1000; this.colorFg = c.dataset.colorFg || "#FFFFFF"; this.colorBg = c.dataset.colorBg || "#000000"; this.sourceType = c.dataset.sourceType || "noise"; this.startEdge = c.dataset.startEdge || "top"; this.fgRGB = this.hexToRGB(this.colorFg); this.bgRGB = this.hexToRGB(this.colorBg); this.moveSpeed = (1000 / 60) / this.speed; this.subPixelX = 0; this.subPixelY = 0; this.leadX = 0; this.leadY = 0; this.initDirection(); this.lastDirectionChange = 0; this.nextDirectionInterval = this.randomInterval(); this.sourceParams = this.generateSourceParams(); this.lastSourceTime = 0; this.resize(); this.initCanvas(); this.generateSourceEdge(); this.initLeadPosition(); this.startAnimation(); this.resizeObserver = new ResizeObserver(() => this.resize()); this.resizeObserver.observe(this.container); } generateSourceParams() { return { steps: 3 + Math.floor(Math.random() * 6), stripeWidth: 2 + Math.floor(Math.random() * 8), checkSize: 1 + Math.floor(Math.random() * 4), phase: 0, dashLength: 3 + Math.floor(Math.random() * 10), gapLength: 2 + Math.floor(Math.random() * 6), density: 0.05 + Math.random() * 0.25, frequency: 1 + Math.random() * 4, sinePhase: Math.random() * Math.PI * 2, seed1: Math.random() * 100, seed2: Math.random() * 100, seed3: Math.random() * 100, counter: Math.floor(Math.random() * 65536), caRule: Math.random() > 0.5 ? 30 : 110 }; } initDirection() { switch (this.startEdge) { case "top": this.dx = 0; this.dy = 1; break; case "bottom": this.dx = 0; this.dy = -1; break; case "left": this.dx = 1; this.dy = 0; break; case "right": this.dx = -1; this.dy = 0; break; default: this.dx = 0; this.dy = 1; } } initLeadPosition() { switch (this.startEdge) { case "top": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = 1; break; case "bottom": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = this.internalHeight - 2; break; case "left": this.leadX = 1; this.leadY = Math.floor(this.internalHeight / 2); break; case "right": this.leadX = this.internalWidth - 2; this.leadY = Math.floor(this.internalHeight / 2); break; } } resize() { var rect = this.container.getBoundingClientRect(); if (rect.width === 0 || rect.height === 0) return; this.internalWidth = Math.ceil(rect.width / this.pixelSize); this.internalHeight = Math.ceil(rect.height / this.pixelSize); var oldImageData = this.imageData; var oldWidth = this.canvas.width; var oldHeight = this.canvas.height; this.canvas.width = this.internalWidth; this.canvas.height = this.internalHeight; this.imageData = this.ctx.createImageData(this.internalWidth, this.internalHeight); if (oldImageData && oldWidth > 0 && oldHeight > 0) { var minW = Math.min(oldWidth, this.internalWidth); var minH = Math.min(oldHeight, this.internalHeight); for (var y = 0; y < minH; y++) { for (var x = 0; x < minW; x++) { var oi = (y * oldWidth + x) * 4; var ni = (y * this.internalWidth + x) * 4; this.imageData.data[ni] = oldImageData.data[oi]; this.imageData.data[ni + 1] = oldImageData.data[oi + 1]; this.imageData.data[ni + 2] = oldImageData.data[oi + 2]; this.imageData.data[ni + 3] = oldImageData.data[oi + 3]; } } } } hexToRGB(hex) { var r = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); return r ? { r: parseInt(r[1], 16), g: parseInt(r[2], 16), b: parseInt(r[3], 16) } : { r: 255, g: 255, b: 255 }; } lerpColor(t) { return { r: Math.round(this.bgRGB.r + (this.fgRGB.r - this.bgRGB.r) * t), g: Math.round(this.bgRGB.g + (this.fgRGB.g - this.bgRGB.g) * t), b: Math.round(this.bgRGB.b + (this.fgRGB.b - this.bgRGB.b) * t) }; } getSourceValue(pos, length) { var t = pos / length; switch (this.sourceType) { case "noise": return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; case "linear-gradient": return this.lerpColor(t); case "stepped-gradient": var steps = this.sourceParams.steps || 5; return this.lerpColor(Math.floor(t * steps) / (steps - 1)); case "random-gradient": if (!this.gradientCache || this.gradientCache.length !== length) this.generateRandomGradient(length); return this.lerpColor(this.gradientCache[pos]); case "stripes": return (Math.floor(pos / (this.sourceParams.stripeWidth || 4)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "checkerboard": return ((Math.floor(pos / (this.sourceParams.checkSize || 2)) + (this.sourceParams.phase || 0)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "dashes": var cycle = (this.sourceParams.dashLength || 6) + (this.sourceParams.gapLength || 3); return (pos % cycle < (this.sourceParams.dashLength || 6)) ? this.fgRGB : this.bgRGB; case "dots": return Math.random() < (this.sourceParams.density || 0.15) ? this.fgRGB : this.bgRGB; case "sine": var sv = (Math.sin((t * (this.sourceParams.frequency || 2) * Math.PI * 2) + (this.sourceParams.sinePhase || 0)) + 1) / 2; return this.lerpColor(sv); case "perlin": var p1 = Math.sin(t * 3.7 + this.sourceParams.seed1) * 0.5; var p2 = Math.sin(t * 7.3 + this.sourceParams.seed2) * 0.25; var p3 = Math.sin(t * 13.1 + this.sourceParams.seed3) * 0.125; return this.lerpColor(Math.max(0, Math.min(1, (p1 + p2 + p3 + 0.875) / 1.75))); case "binary-counter": return ((this.sourceParams.counter >> (pos % 16)) & 1) ? this.fgRGB : this.bgRGB; case "cellular-automata": if (!this.caState || this.caState.length !== length) this.initCellularAutomata(length); return this.caState[pos] ? this.fgRGB : this.bgRGB; default: return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; } } generateRandomGradient(length) { var np = 3 + Math.floor(Math.random() * 4); var cp = [0]; for (var i = 1; i < np - 1; i++) cp.push(Math.random()); cp.push(1); cp.sort((a, b) => a - b); var cv = cp.map(() => Math.random()); this.gradientCache = []; for (var i = 0; i < length; i++) { var t = i / length; var si = 0; for (var j = 0; j < cp.length - 1; j++) { if (t >= cp[j] && t <= cp[j + 1]) { si = j; break; } } var st = (t - cp[si]) / (cp[si + 1] - cp[si]); this.gradientCache.push(cv[si] + (cv[si + 1] - cv[si]) * st); } } initCellularAutomata(length) { this.caState = []; for (var i = 0; i < length; i++) this.caState.push(Math.random() > 0.5); } evolveCellularAutomata() { if (!this.caState) return; var rule = this.sourceParams.caRule || 30; var os = [...this.caState]; var len = this.caState.length; for (var i = 0; i < len; i++) { var p = (os[(i - 1 + len) % len] ? 4 : 0) + (os[i] ? 2 : 0) + (os[(i + 1) % len] ? 1 : 0); this.caState[i] = ((rule >> p) & 1) === 1; } } updateSourceParams() { switch (this.sourceType) { case "checkerboard": this.sourceParams.phase = (this.sourceParams.phase + 1) % 2; break; case "sine": this.sourceParams.sinePhase += 0.5; break; case "binary-counter": this.sourceParams.counter++; break; case "cellular-automata": this.evolveCellularAutomata(); break; case "random-gradient": this.gradientCache = null; break; case "perlin": this.sourceParams.seed1 += 0.3; this.sourceParams.seed2 += 0.2; this.sourceParams.seed3 += 0.1; break; } } randomInterval() { return 100 + Math.random() * 900; } changeDirection() { var dirs = [[0, 1], [1, 1], [1, 0], [1, -1], [0, -1], [-1, -1], [-1, 0], [-1, 1]]; var idx = dirs.findIndex(d => d[0] === this.dx && d[1] === this.dy); if (idx === -1) idx = 0; idx = Math.random() > 0.5 ? (idx + 1) % 8 : (idx + 7) % 8; this.dx = dirs[idx][0]; this.dy = dirs[idx][1]; } initCanvas() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var isH = (this.startEdge === "top" || this.startEdge === "bottom"); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { var idx = (y * w + x) * 4; var col = this.getSourceValue(isH ? x : y, isH ? w : h); data[idx] = col.r; data[idx + 1] = col.g; data[idx + 2] = col.b; data[idx + 3] = 255; } } this.ctx.putImageData(this.imageData, 0, 0); } generateSourceEdge() { if (!this.imageData) return; this.updateSourceParams(); var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var gen = (getIdx, len) => { for (var i = 0; i < len; i++) { var idx = getIdx(i); var c = this.getSourceValue(i, len); data[idx] = c.r; data[idx + 1] = c.g; data[idx + 2] = c.b; data[idx + 3] = 255; } }; switch (this.startEdge) { case "top": gen(x => x * 4, w); break; case "bottom": gen(x => ((h - 1) * w + x) * 4, w); break; case "left": gen(y => (y * w) * 4, h); break; case "right": gen(y => (y * w + (w - 1)) * 4, h); break; } } getSourceEdgeCoord(x, y) { switch (this.startEdge) { case "top": return y === 0; case "bottom": return y === this.internalHeight - 1; case "left": return x === 0; case "right": return x === this.internalWidth - 1; } return false; } smear() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; this.subPixelX += this.dx * this.moveSpeed; this.subPixelY += this.dy * this.moveSpeed; var moveX = Math.trunc(this.subPixelX), moveY = Math.trunc(this.subPixelY); if (moveX === 0 && moveY === 0) return; this.subPixelX -= moveX; this.subPixelY -= moveY; this.leadX += moveX; this.leadY += moveY; if (this.leadX <= 0 || this.leadX >= w - 1) { this.dx = -this.dx; this.leadX = Math.max(0, Math.min(w - 1, this.leadX)); } if (this.leadY <= 0 || this.leadY >= h - 1) { this.dy = -this.dy; this.leadY = Math.max(0, Math.min(h - 1, this.leadY)); } var oldData = new Uint8ClampedArray(data); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { if (this.getSourceEdgeCoord(x, y)) continue; var srcX = Math.max(0, Math.min(w - 1, x - moveX)); var srcY = Math.max(0, Math.min(h - 1, y - moveY)); var dstIdx = (y * w + x) * 4, srcIdx = (srcY * w + srcX) * 4; data[dstIdx] = oldData[srcIdx]; data[dstIdx + 1] = oldData[srcIdx + 1]; data[dstIdx + 2] = oldData[srcIdx + 2]; data[dstIdx + 3] = oldData[srcIdx + 3]; } } } startAnimation() { var fi = 1000 / 60; var animate = (ts) => { if (!this.lastTime) this.lastTime = ts; if (!this.lastSourceTime) this.lastSourceTime = ts; if (!this.lastDirectionChange) this.lastDirectionChange = ts; if (ts - this.lastDirectionChange >= this.nextDirectionInterval) { this.changeDirection(); this.lastDirectionChange = ts; this.nextDirectionInterval = this.randomInterval(); } if (ts - this.lastSourceTime >= this.sourceInterval) { this.generateSourceEdge(); this.lastSourceTime = ts; } if (ts - this.lastTime >= fi) { this.smear(); if (this.imageData) this.ctx.putImageData(this.imageData, 0, 0); this.lastTime = ts; } this.animationId = requestAnimationFrame(animate); }; this.animationId = requestAnimationFrame(animate); } } function layoutSmears() { var vw = window.innerWidth, vh = window.innerHeight; document.querySelectorAll(".smear-container").forEach(function(div) { var x = parseFloat(div.dataset.x || 0); var y = parseFloat(div.dataset.y || 0); var w = parseFloat(div.dataset.width || 0); var h = parseFloat(div.dataset.height || 0); div.style.left = (x * vw) + "px"; div.style.top = (y * vh) + "px"; div.style.width = (w * vw) + "px"; div.style.height = (h * vh) + "px"; }); } function initSmears() { document.querySelectorAll(".smear-container").forEach(function(c) { if (!c._smearInstance) c._smearInstance = new SmearCanvas(c); }); } window.addEventListener("load", function() { layoutSmears(); initSmears(); }); window.addEventListener("resize", layoutSmears); layoutSmears(); initSmears(); </script></body></html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Black & White Noise</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body, html { width: 100%; height: 100%; overflow: hidden; background: #000; } canvas { display: block; width: 100%; height: 100%; } </style> </head> <body> <canvas id="noise"></canvas> <script> const canvas = document.getElementById('noise'); const ctx = canvas.getContext('2d'); function resize() { canvas.width = window.innerWidth; canvas.height = window.innerHeight; } function generateNoise() { const imageData = ctx.createImageData(canvas.width, canvas.height); const data = imageData.data; for (let i = 0; i < data.length; i += 4) { const value = Math.random() > 0.5 ? 255 : 0; data[i] = value; // Red data[i + 1] = value; // Green data[i + 2] = value; // Blue data[i + 3] = 255; // Alpha } ctx.putImageData(imageData, 0, 0); } function animate() { generateNoise(); requestAnimationFrame(animate); } window.addEventListener('resize', resize); resize(); animate(); </script> </body> </html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#241a17;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#1d1d1d;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#494949;--color3-2:#000;--color4-1:#c6c6c6;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #241a17; --color2-1: #1d1d1d; --color3-1: #494949; --color4-1: #c6c6c6;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-up" data-x="0" data-y="0" data-width="0.1628" data-height="0.14" style="left: 0px; top: 0px; width: 57.9568px; height: 49.84px; --clip-path: polygon(0% 0%, 144% 0%, 112% 133%, 0% 95%); background-size: 57.9568px 99.68px; animation-duration: 47s;"></div><div class="gradient-container gradient-down" data-x="0.1628" data-y="0" data-width="0.039368" data-height="0.11620000000000001" style="left: 57.9568px; top: 0px; width: 14.015px; height: 41.3672px; --clip-path: polygon(183% 0%, 165% 0%, 130% 119%, -127% 63%); background-size: 14.015px 82.7344px; animation-duration: 4s;"></div><div class="gradient-container gradient-down" data-x="0.1628" data-y="0.11620000000000001" data-width="0.039368" data-height="0.023799999999999998" style="left: 57.9568px; top: 41.3672px; width: 14.015px; height: 8.4728px; --clip-path: polygon(-127% -183%, 130% 92%, 219% -187%, 49% 296%); background-size: 14.015px 16.9456px; animation-duration: 50s;"></div><div class="gradient-container gradient-right" data-x="0.202168" data-y="0" data-width="0.00503496" data-height="0.14" style="left: 71.9718px; top: 0px; width: 1.79245px; height: 49.84px; --clip-path: polygon(507% 0%, -687% 0%, 837% 46%, 931% 51%); background-size: 3.58489px 49.84px; animation-duration: 4s;"></div><div class="gradient-container gradient-right" data-x="0.20720296000000002" data-y="0" data-width="0.16279703999999998" data-height="0.14" style="left: 73.7643px; top: 0px; width: 57.9557px; height: 49.84px; --clip-path: polygon(-24% 0%, 84% 0%, 140% 90%, 23% 46%); background-size: 115.911px 49.84px; animation-duration: 78s;"></div><div class="gradient-container gradient-down" data-x="0" data-y="0.14" data-width="0.3626" data-height="0.36" style="left: 0px; top: 49.84px; width: 129.086px; height: 128.16px; --clip-path: polygon(0% -2%, 92% 8%, 102% 114%, 0% 105%); background-size: 129.086px 256.32px; animation-duration: 67s;"></div><div class="gradient-container gradient-left" data-x="0.3626" data-y="0.14" data-width="0.007399999999999999" data-height="0.0252" style="left: 129.086px; top: 49.84px; width: 2.6344px; height: 8.9712px; --clip-path: polygon(-388% 119%, 988% -56%, 903% -4%, 690% 88%); background-size: 5.2688px 8.9712px; animation-duration: 67s;"></div><div class="gradient-container gradient-down" data-x="0.3626" data-y="0.16519999999999999" data-width="0.007399999999999999" data-height="0.3348" style="left: 129.086px; top: 58.8112px; width: 2.6344px; height: 119.189px; --clip-path: polygon(690% -1%, 903% -8%, 204% 109%, 116% 115%); background-size: 2.6344px 238.378px; animation-duration: 27s;"></div><div class="gradient-container gradient-down" data-x="0" data-y="0.5" data-width="0.30339999999999995" data-height="0.065" style="left: 0px; top: 178px; width: 108.01px; height: 23.14px; --clip-path: polygon(0% 26%, 102% 94%, 109% 53%, 0% 176%); background-size: 108.01px 46.28px; animation-duration: 84s;"></div><div class="gradient-container gradient-down" data-x="0.30339999999999995" data-y="0.5" data-width="0.05061600000000002" data-height="0.065" style="left: 108.01px; top: 178px; width: 18.0193px; height: 23.14px; --clip-path: polygon(10% 94%, 123% 110%, 105% 119%, 57% 53%); background-size: 18.0193px 46.28px; animation-duration: 22s;"></div><div class="gradient-container gradient-left" data-x="0.354016" data-y="0.5" data-width="0.015984" data-height="0.046799999999999994" style="left: 126.03px; top: 178px; width: 5.6903px; height: 16.6608px; --clip-path: polygon(73% 153%, 148% 61%, -300% -50%, 322% -58%); background-size: 11.3806px 16.6608px; animation-duration: 66s;"></div><div class="gradient-container gradient-up" data-x="0.354016" data-y="0.5468" data-width="0.015984" data-height="0.018200000000000008" style="left: 126.03px; top: 194.661px; width: 5.6903px; height: 6.4792px; --clip-path: polygon(322% -407%, -300% -384%, -341% -66%, 16% 167%); background-size: 5.6903px 12.9584px; animation-duration: 2s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.565" data-width="0.07736699999999999" data-height="0.1044" style="left: 0px; top: 201.14px; width: 27.5427px; height: 37.1664px; --clip-path: polygon(0% 47%, 11% -25%, 9% 39%, 0% 151%); background-size: 55.0853px 37.1664px; animation-duration: 61s;"></div><div class="gradient-container gradient-right" data-x="0.07736699999999999" data-y="0.565" data-width="0.074333" data-height="0.1044" style="left: 27.5427px; top: 201.14px; width: 26.4625px; height: 37.1664px; --clip-path: polygon(-92% -25%, 91% 67%, 196% 40%, -95% 39%); background-size: 52.9251px 37.1664px; animation-duration: 17s;"></div><div class="gradient-container gradient-down" data-x="0.15169999999999997" data-y="0.565" data-width="0.017464" data-height="0.1044" style="left: 54.0052px; top: 201.14px; width: 6.21718px; height: 37.1664px; --clip-path: polygon(-37% 67%, 253% -52%, 147% 29%, 411% 40%); background-size: 6.21718px 74.3328px; animation-duration: 3s;"></div><div class="gradient-container gradient-left" data-x="0.16916399999999998" data-y="0.565" data-width="0.200836" data-height="0.1044" style="left: 60.2224px; top: 201.14px; width: 71.4976px; height: 37.1664px; --clip-path: polygon(13% -52%, 65% -29%, 94% 160%, 4% 29%); background-size: 142.995px 37.1664px; animation-duration: 15s;"></div><div class="gradient-container gradient-down" data-x="0" data-y="0.6694" data-width="0.3293" data-height="0.3306" style="left: 0px; top: 238.306px; width: 117.231px; height: 117.694px; --clip-path: polygon(0% 16%, 78% -5%, 108% 100%, 0% 100%); background-size: 117.231px 235.387px; animation-duration: 11s;"></div><div class="gradient-container gradient-left" data-x="0.3293" data-y="0.6694" data-width="0.04069999999999999" data-height="0.09917999999999999" style="left: 117.231px; top: 238.306px; width: 14.4892px; height: 35.3081px; --clip-path: polygon(-180% -17%, 69% 63%, 11% 31%, 18% 129%); background-size: 28.9784px 35.3081px; animation-duration: 81s;"></div><div class="gradient-container gradient-left" data-x="0.3293" data-y="0.76858" data-width="0.04069999999999999" data-height="0.23142000000000004" style="left: 117.231px; top: 273.614px; width: 14.4892px; height: 82.3855px; --clip-path: polygon(18% 12%, 11% -30%, 190% 100%, 64% 100%); background-size: 28.9784px 82.3855px; animation-duration: 23s;"></div><div class="gradient-container gradient-up" data-x="0.37" data-y="0" data-width="0.63" data-height="0.8600000000000001" style="left: 131.72px; top: 0px; width: 224.28px; height: 306.16px; --clip-path: polygon(-4% 0%, 100% 0%, 100% 101%, -2% 94%); background-size: 224.28px 612.32px; animation-duration: 16s;"></div><div class="gradient-container gradient-down" data-x="0.37" data-y="0.8600000000000001" data-width="0.0378" data-height="0.11479999999999994" style="left: 131.72px; top: 306.16px; width: 13.4568px; height: 40.8688px; --clip-path: polygon(-37% -46%, 122% 23%, -58% 100%, -169% 100%); background-size: 13.4568px 81.7376px; animation-duration: 75s;"></div><div class="gradient-container gradient-left" data-x="0.37" data-y="0.9748" data-width="0.021780360000000002" data-height="0.02519999999999999" style="left: 131.72px; top: 347.029px; width: 7.75381px; height: 8.9712px; --clip-path: polygon(-293% 0%, 220% 0%, 175% 100%, 169% 100%); background-size: 15.5076px 8.9712px; animation-duration: 23s;"></div><div class="gradient-container gradient-up" data-x="0.39178036" data-y="0.9748" data-width="0.003545639999999999" data-height="0.02519999999999999" style="left: 139.474px; top: 347.029px; width: 1.26225px; height: 8.9712px; --clip-path: polygon(737% 0%, 2077% 0%, 1164% 100%, 463% 100%); background-size: 1.26225px 17.9424px; animation-duration: 70s;"></div><div class="gradient-container gradient-down" data-x="0.39532599999999996" data-y="0.9748" data-width="0.012474" data-height="0.013859999999999994" style="left: 140.736px; top: 347.029px; width: 4.44074px; height: 4.93416px; --clip-path: polygon(562% 0%, -378% 0%, 485% 100%, -453% 100%); background-size: 4.44074px 9.86832px; animation-duration: 2s;"></div><div class="gradient-container gradient-up" data-x="0.39532599999999996" data-y="0.98866" data-width="0.012474" data-height="0.011339999999999996" style="left: 140.736px; top: 351.963px; width: 4.44074px; height: 4.03704px; --clip-path: polygon(-453% 0%, 485% 0%, 569% 100%, 302% 100%); background-size: 4.44074px 8.07408px; animation-duration: 39s;"></div><div class="gradient-container gradient-left" data-x="0.40780000000000005" data-y="0.8600000000000001" data-width="0.5922" data-height="0.13999999999999993" style="left: 145.177px; top: 306.16px; width: 210.823px; height: 49.84px; --clip-path: polygon(1% 19%, 100% 8%, 100% 100%, 10% 100%); background-size: 421.646px 49.84px; animation-duration: 94s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#c6c6c6;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#1d1d1d;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#0600ff;--color3-2:#000;--color4-1:#1d1d1d;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #c6c6c6; --color2-1: #1d1d1d; --color3-1: #0600ff; --color4-1: #1d1d1d;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-right" data-x="0" data-y="0" data-width="0.45999999999999996" data-height="0.56" style="left: 0px; top: 0px; width: 163.76px; height: 199.36px; --clip-path: polygon(0% 0%, 99% 0%, 104% 99%, 0% 102%); background-size: 327.52px 199.36px; animation-duration: 83s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.56" data-width="0.032429999999999994" data-height="0.04949999999999999" style="left: 0px; top: 199.36px; width: 11.5451px; height: 17.622px; --clip-path: polygon(0% 19%, -130% 152%, 317% 83%, 0% -10%); background-size: 23.0902px 17.622px; animation-duration: 75s;"></div><div class="gradient-container gradient-up" data-x="0.032429999999999994" data-y="0.56" data-width="0.03656999999999999" data-height="0.04949999999999999" style="left: 11.5451px; top: 199.36px; width: 13.0189px; height: 17.622px; --clip-path: polygon(-204% 152%, 4% 41%, 164% 26%, 193% 83%); background-size: 13.0189px 35.244px; animation-duration: 67s;"></div><div class="gradient-container gradient-right" data-x="0" data-y="0.6095" data-width="0.06899999999999999" data-height="0.16829999999999995" style="left: 0px; top: 216.982px; width: 24.564px; height: 59.9148px; --clip-path: polygon(0% -32%, 134% -22%, 36% 111%, 0% 83%); background-size: 49.128px 59.9148px; animation-duration: 99s;"></div><div class="gradient-container gradient-down" data-x="0" data-y="0.7777999999999999" data-width="0.06899999999999999" data-height="0.11219999999999997" style="left: 0px; top: 276.897px; width: 24.564px; height: 39.9432px; --clip-path: polygon(0% -26%, 36% 17%, 25% 125%, 0% 151%); background-size: 24.564px 79.8864px; animation-duration: 83s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.8899999999999999" data-width="0.06899999999999999" data-height="0.08800000000000002" style="left: 0px; top: 316.84px; width: 24.564px; height: 31.328px; --clip-path: polygon(0% 65%, 25% 32%, 171% 100%, 0% 100%); background-size: 49.128px 31.328px; animation-duration: 4s;"></div><div class="gradient-container gradient-up" data-x="0" data-y="0.978" data-width="0.010349999999999998" data-height="0.022000000000000002" style="left: 0px; top: 348.168px; width: 3.6846px; height: 7.832px; --clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%); background-size: 3.6846px 15.664px; animation-duration: 8s;"></div><div class="gradient-container gradient-up" data-x="0.010349999999999998" data-y="0.978" data-width="0.058649999999999994" data-height="0.022000000000000002" style="left: 3.6846px; top: 348.168px; width: 20.8794px; height: 7.832px; --clip-path: polygon(0% 0%, 184% 0%, 217% 100%, 0% 100%); background-size: 20.8794px 15.664px; animation-duration: 99s;"></div><div class="gradient-container gradient-left" data-x="0.06899999999999999" data-y="0.56" data-width="0.05560020000000001" data-height="0.198" style="left: 24.564px; top: 199.36px; width: 19.7937px; height: 70.488px; --clip-path: polygon(-63% 10%, 1% 29%, 68% 106%, -70% 82%); background-size: 39.5873px 70.488px; animation-duration: 16s;"></div><div class="gradient-container gradient-down" data-x="0.1246002" data-y="0.56" data-width="0.2532898" data-height="0.198" style="left: 44.3577px; top: 199.36px; width: 90.1712px; height: 70.488px; --clip-path: polygon(-22% 29%, 88% -29%, 81% 136%, -7% 106%); background-size: 90.1712px 140.976px; animation-duration: 76s;"></div><div class="gradient-container gradient-up" data-x="0.37789" data-y="0.56" data-width="0.08210999999999996" data-height="0.17622" style="left: 134.529px; top: 199.36px; width: 29.2312px; height: 62.7343px; --clip-path: polygon(-37% -32%, 125% -2%, 64% 85%, -4% 140%); background-size: 29.2312px 125.469px; animation-duration: 16s;"></div><div class="gradient-container gradient-right" data-x="0.37789" data-y="0.7362200000000001" data-width="0.08210999999999996" data-height="0.021780000000000008" style="left: 134.529px; top: 262.094px; width: 29.2312px; height: 7.75368px; --clip-path: polygon(-4% 327%, 64% -122%, 49% 103%, -58% 429%); background-size: 58.4623px 7.75368px; animation-duration: 26s;"></div><div class="gradient-container gradient-down" data-x="0.06899999999999999" data-y="0.758" data-width="0.391" data-height="0.24199999999999997" style="left: 24.564px; top: 269.848px; width: 139.196px; height: 86.152px; --clip-path: polygon(-10% -15%, 89% 0%, 96% 100%, 18% 100%); background-size: 139.196px 172.304px; animation-duration: 22s;"></div><div class="gradient-container gradient-right" data-x="0.45999999999999996" data-y="0" data-width="0.015054336000000003" data-height="0.05" style="left: 163.76px; top: 0px; width: 5.35934px; height: 17.8px; --clip-path: polygon(-22% 0%, 341% 0%, 466% -10%, 251% 225%); background-size: 10.7187px 17.8px; animation-duration: 39s;"></div><div class="gradient-container gradient-up" data-x="0.47505433599999997" data-y="0" data-width="0.05337446400000001" data-height="0.05" style="left: 169.119px; top: 0px; width: 19.0013px; height: 17.8px; --clip-path: polygon(68% 0%, 107% 0%, 105% 194%, 103% -10%); background-size: 19.0013px 35.6px; animation-duration: 24s;"></div><div class="gradient-container gradient-left" data-x="0.5284287999999999" data-y="0" data-width="0.03525119999999999" data-height="0.026000000000000002" style="left: 188.121px; top: 0px; width: 12.5494px; height: 9.256px; --clip-path: polygon(10% 0%, 32% 0%, 217% 100%, 119% 100%); background-size: 25.0989px 9.256px; animation-duration: 90s;"></div><div class="gradient-container gradient-up" data-x="0.5284287999999999" data-y="0.026000000000000002" data-width="0.03525119999999999" data-height="0.024" style="left: 188.121px; top: 9.256px; width: 12.5494px; height: 8.544px; --clip-path: polygon(119% 0%, 217% 0%, 77% 227%, 7% 297%); background-size: 12.5494px 17.088px; animation-duration: 36s;"></div><div class="gradient-container gradient-right" data-x="0.56368" data-y="0" data-width="0.014515200000000002" data-height="0.0425" style="left: 200.67px; top: 0px; width: 5.16741px; height: 15.13px; --clip-path: polygon(-166% 0%, 460% 0%, 330% 120%, 475% 150%); background-size: 10.3348px 15.13px; animation-duration: 69s;"></div><div class="gradient-container gradient-left" data-x="0.56368" data-y="0.0425" data-width="0.014515200000000002" data-height="0.0075" style="left: 200.67px; top: 15.13px; width: 5.16741px; height: 2.67px; --clip-path: polygon(475% 283%, 330% 113%, -120% -744%, -55% 507%); background-size: 10.3348px 2.67px; animation-duration: 69s;"></div><div class="gradient-container gradient-down" data-x="0.5781952" data-y="0" data-width="0.07049548800000001" data-height="0.05" style="left: 205.837px; top: 0px; width: 25.0964px; height: 17.8px; --clip-path: polygon(74% 0%, 176% 0%, 9% 243%, -45% -27%); background-size: 25.0964px 35.6px; animation-duration: 23s;"></div><div class="gradient-container gradient-up" data-x="0.648690688" data-y="0" data-width="0.15690931200000002" data-height="0.05" style="left: 230.934px; top: 0px; width: 55.8597px; height: 17.8px; --clip-path: polygon(34% 0%, 110% 0%, 114% 36%, -41% 243%); background-size: 55.8597px 35.6px; animation-duration: 59s;"></div><div class="gradient-container gradient-left" data-x="0.8055999999999999" data-y="0" data-width="0.00723168" data-height="0.02" style="left: 286.794px; top: 0px; width: 2.57448px; height: 7.12px; --clip-path: polygon(220% 0%, -992% 0%, 1189% 100%, 10% 100%); background-size: 5.14896px 7.12px; animation-duration: 69s;"></div><div class="gradient-container gradient-left" data-x="0.8055999999999999" data-y="0.02" data-width="0.00723168" data-height="0.03" style="left: 286.794px; top: 7.12px; width: 2.57448px; height: 10.68px; --clip-path: polygon(10% 0%, 1189% 0%, -8% 230%, 312% -7%); background-size: 5.14896px 10.68px; animation-duration: 86s;"></div><div class="gradient-container gradient-right" data-x="0.81283168" data-y="0" data-width="0.020152281600000002" data-height="0.05" style="left: 289.368px; top: 0px; width: 7.17421px; height: 17.8px; --clip-path: polygon(-392% 0%, 419% 0%, -90% 3%, -39% 178%); background-size: 14.3484px 17.8px; animation-duration: 69s;"></div><div class="gradient-container gradient-left" data-x="0.8329839615999999" data-y="0" data-width="0.032880038400000006" data-height="0.05" style="left: 296.542px; top: 0px; width: 11.7053px; height: 17.8px; --clip-path: polygon(196% 0%, -87% 0%, -48% 61%, -116% 3%); background-size: 23.4106px 17.8px; animation-duration: 42s;"></div><div class="gradient-container gradient-up" data-x="0.8658639999999999" data-y="0" data-width="0.13413599999999998" data-height="0.05" style="left: 308.248px; top: 0px; width: 47.7524px; height: 17.8px; --clip-path: polygon(-46% 0%, 100% 0%, 100% 170%, -36% 61%); background-size: 47.7524px 35.6px; animation-duration: 23s;"></div><div class="gradient-container gradient-down" data-x="0.45999999999999996" data-y="0.05" data-width="0.54" data-height="0.6425799999999999" style="left: 163.76px; top: 17.8px; width: 192.24px; height: 228.758px; --clip-path: polygon(7% 10%, 100% 5%, 100% 101%, 2% 97%); background-size: 192.24px 457.517px; animation-duration: 45s;"></div><div class="gradient-container gradient-left" data-x="0.45999999999999996" data-y="0.69258" data-width="0.324" data-height="0.20292" style="left: 163.76px; top: 246.558px; width: 115.344px; height: 72.2395px; --clip-path: polygon(4% -8%, 81% -28%, 76% 115%, 11% 139%); background-size: 230.688px 72.2395px; animation-duration: 78s;"></div><div class="gradient-container gradient-down" data-x="0.7839999999999999" data-y="0.69258" data-width="0.17064" data-height="0.20292" style="left: 279.104px; top: 246.558px; width: 60.7478px; height: 72.2395px; --clip-path: polygon(-37% -28%, 125% 2%, 132% 97%, -45% 115%); background-size: 60.7478px 144.479px; animation-duration: 9s;"></div><div class="gradient-container gradient-left" data-x="0.9546399999999999" data-y="0.69258" data-width="0.04536000000000001" data-height="0.20292" style="left: 339.852px; top: 246.558px; width: 16.1482px; height: 72.2395px; --clip-path: polygon(93% 2%, 100% 2%, 100% 69%, 119% 97%); background-size: 32.2963px 72.2395px; animation-duration: 65s;"></div><div class="gradient-container gradient-left" data-x="0.45999999999999996" data-y="0.8955" data-width="0.048600000000000004" data-height="0.08151" style="left: 163.76px; top: 318.798px; width: 17.3016px; height: 29.0176px; --clip-path: polygon(71% 98%, 138% -66%, 179% 100%, 146% 100%); background-size: 34.6032px 29.0176px; animation-duration: 10s;"></div><div class="gradient-container gradient-left" data-x="0.45999999999999996" data-y="0.97701" data-width="0.027216" data-height="0.022989999999999997" style="left: 163.76px; top: 347.816px; width: 9.6889px; height: 8.18444px; --clip-path: polygon(261% 0%, -142% 0%, -182% 100%, -60% 100%); background-size: 19.3778px 8.18444px; animation-duration: 33s;"></div><div class="gradient-container gradient-left" data-x="0.487216" data-y="0.97701" data-width="0.021384000000000004" data-height="0.022989999999999997" style="left: 173.449px; top: 347.816px; width: 7.6127px; height: 8.18444px; --clip-path: polygon(-308% 0%, 279% 0%, -263% 100%, -360% 100%); background-size: 15.2254px 8.18444px; animation-duration: 82s;"></div><div class="gradient-container gradient-up" data-x="0.5085999999999999" data-y="0.8955" data-width="0.47665799999999997" data-height="0.1045" style="left: 181.062px; top: 318.798px; width: 169.69px; height: 37.202px; --clip-path: polygon(4% -52%, 100% -66%, 100% 100%, -16% 100%); background-size: 169.69px 74.404px; animation-duration: 81s;"></div><div class="gradient-container gradient-up" data-x="0.985258" data-y="0.8955" data-width="0.014742000000000012" data-height="0.1045" style="left: 350.752px; top: 318.798px; width: 5.24815px; height: 37.202px; --clip-path: polygon(0% -66%, 100% -59%, 100% 100%, 0% 100%); background-size: 5.24815px 74.404px; animation-duration: 40s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#FF00CC;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#FFFFFF;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#c6c6c6;--color3-2:#000;--color4-1:#00ffea;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #FF00CC; --color2-1: #FFFFFF; --color3-1: #c6c6c6; --color4-1: #00ffea;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-up" data-x="0" data-y="0" data-width="0.2613996" data-height="0.3185" style="left: 0px; top: 0px; width: 95.410854px; height: 116.2525px; --clip-path: polygon(0% 0%, 88% 0%, 70% 122%, 0% 81%); background-size: 95.410854px 232.505px; animation-duration: 72s;"></div><div class="gradient-container gradient-right" data-x="0.2613996" data-y="0" data-width="0.1174404" data-height="0.3185" style="left: 95.410854px; top: 0px; width: 42.865746px; height: 116.2525px; --clip-path: polygon(-26% 0%, 112% 0%, 109% 111%, -67% 122%); background-size: 85.731492px 116.2525px; animation-duration: 60s;"></div><div class="gradient-container gradient-down" data-x="0.37884" data-y="0" data-width="0.25256" data-height="0.24842999999999998" style="left: 138.2766px; top: 0px; width: 92.1844px; height: 90.67695px; --clip-path: polygon(6% 0%, 115% 0%, 85% 91%, -19% 128%); background-size: 92.1844px 181.3539px; animation-duration: 96s;"></div><div class="gradient-container gradient-right" data-x="0.37884" data-y="0.24842999999999998" data-width="0.25256" data-height="0.07007000000000002" style="left: 138.2766px; top: 90.67695px; width: 92.1844px; height: 25.57555px; --clip-path: polygon(-19% 98%, 85% -34%, 124% 155%, 4% 151%); background-size: 184.3688px 25.57555px; animation-duration: 27s;"></div><div class="gradient-container gradient-left" data-x="0.6314000000000001" data-y="0" data-width="0.1386" data-height="0.1364454" style="left: 230.461px; top: 0px; width: 50.589px; height: 49.802571px; --clip-path: polygon(27% 0%, 47% 0%, 111% 104%, -3% 119%); background-size: 101.178px 49.802571px; animation-duration: 14s;"></div><div class="gradient-container gradient-down" data-x="0.6314000000000001" data-y="0.1364454" data-width="0.1386" data-height="0.13109459999999998" style="left: 230.461px; top: 49.802571px; width: 50.589px; height: 47.849529px; --clip-path: polygon(-3% 19%, 111% 4%, 152% 88%, -2% 75%); background-size: 50.589px 95.699058px; animation-duration: 94s;"></div><div class="gradient-container gradient-down" data-x="0.6314000000000001" data-y="0.26754" data-width="0.1386" data-height="0.05096000000000002" style="left: 230.461px; top: 97.6521px; width: 50.589px; height: 18.6004px; --clip-path: polygon(-2% -64%, 152% -30%, 156% 127%, 45% 176%); background-size: 50.589px 37.2008px; animation-duration: 51s;"></div><div class="gradient-container gradient-right" data-x="0" data-y="0.3185" data-width="0.0077" data-height="0.5619249999999999" style="left: 0px; top: 116.2525px; width: 2.8105px; height: 205.102625px; --clip-path: polygon(0% -10%, 100% -4%, 100% 97%, 0% 95%); background-size: 5.621px 205.102625px; animation-duration: 39s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.8804249999999998" data-width="0.0077" data-height="0.029575000000000053" style="left: 0px; top: 321.355125px; width: 2.8105px; height: 10.794875px; --clip-path: polygon(0% -101%, 100% -50%, 100% 353%, 0% -67%); background-size: 5.621px 10.794875px; animation-duration: 23s;"></div><div class="gradient-container gradient-up" data-x="0.0077" data-y="0.3185" data-width="0.419265" data-height="0.5914999999999999" style="left: 2.8105px; top: 116.2525px; width: 153.031725px; height: 215.8975px; --clip-path: polygon(0% -4%, 111% -2%, 103% 96%, 0% 113%); background-size: 153.031725px 431.795px; animation-duration: 56s;"></div><div class="gradient-container gradient-right" data-x="0.426965" data-y="0.3185" data-width="0.3430350000000001" data-height="0.5914999999999999" style="left: 155.842225px; top: 116.2525px; width: 125.207775px; height: 215.8975px; --clip-path: polygon(13% -2%, 122% 2%, 117% 88%, 3% 96%); background-size: 250.41555px 215.8975px; animation-duration: 85s;"></div><div class="gradient-container gradient-right" data-x="0.77" data-y="0" data-width="0.22999999999999998" data-height="0.42260400000000004" style="left: 281.05px; top: 0px; width: 83.95px; height: 154.25046px; --clip-path: polygon(-32% 0%, 100% 0%, 100% 103%, -19% 84%); background-size: 167.9px 154.25046px; animation-duration: 3s;"></div><div class="gradient-container gradient-down" data-x="0.77" data-y="0.42260400000000004" data-width="0.22999999999999998" data-height="0.21239764000000003" style="left: 281.05px; top: 154.25046px; width: 83.95px; height: 77.525139px; --clip-path: polygon(-19% -31%, 100% 6%, 100% 105%, 8% 63%); background-size: 83.95px 155.050277px; animation-duration: 86s;"></div><div class="gradient-container gradient-left" data-x="0.77" data-y="0.63500164" data-width="0.22999999999999998" data-height="0.14759835999999998" style="left: 281.05px; top: 231.775599px; width: 83.95px; height: 53.873401px; --clip-path: polygon(8% -54%, 100% 8%, 100% 91%, -28% 144%); background-size: 167.9px 53.873401px; animation-duration: 93s;"></div><div class="gradient-container gradient-up" data-x="0.77" data-y="0.7826" data-width="0.22999999999999998" data-height="0.12739999999999993" style="left: 281.05px; top: 285.649px; width: 83.95px; height: 46.501px; --clip-path: polygon(-28% 51%, 100% -10%, 100% 51%, 25% 46%); background-size: 83.95px 93.002px; animation-duration: 63s;"></div><div class="gradient-container gradient-right" data-x="0" data-y="0.9099999999999999" data-width="0.36000000000000004" data-height="0.09000000000000007" style="left: 0px; top: 332.15px; width: 131.4px; height: 32.85px; --clip-path: polygon(0% -55%, 78% -24%, 109% 100%, 0% 100%); background-size: 262.8px 32.85px; animation-duration: 78s;"></div><div class="gradient-container gradient-right" data-x="0.36000000000000004" data-y="0.9099999999999999" data-width="0.64" data-height="0.09000000000000007" style="left: 131.4px; top: 332.15px; width: 233.6px; height: 32.85px; --clip-path: polygon(-12% -24%, 100% -69%, 100% 100%, 5% 100%); background-size: 467.2px 32.85px; animation-duration: 69s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>smear</title><style> * { margin: 0; padding: 0; box-sizing: border-box; } body, html { width: 100%; height: 100%; overflow: hidden; background: #000; } smear-partition { display: block; width: 100%; height: 100%; position: relative; } smear-canvas { display: block; position: absolute; } smear-canvas canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: -moz-crisp-edges; image-rendering: crisp-edges; -ms-interpolation-mode: nearest-neighbor; } .smear-container { position: absolute; overflow: hidden; } .smear-container canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; } </style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="smear-container" data-x="0" data-y="0" data-width="0.21205061349693252" data-height="0.25637576687116564" data-start-edge="left" data-speed="26" data-source-interval="1152" data-pixel-size="2" data-color-fg="#0000FF" data-color-bg="#000000" data-source-type="sine" style="left: 0px; top: 0px; width: 138.257px; height: 167.157px;"><canvas></canvas></div><div class="smear-container" data-x="0.21205061349693252" data-y="0" data-width="0.0876122699386503" data-height="0.25637576687116564" data-start-edge="right" data-speed="30" data-source-interval="727" data-pixel-size="6" data-color-fg="#333333" data-color-bg="#000000" data-source-type="sine" style="left: 138.257px; top: 0px; width: 57.1232px; height: 167.157px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.25637576687116564" data-width="0.29966257668711654" data-height="0.19603987730061348" data-start-edge="right" data-speed="68" data-source-interval="517" data-pixel-size="4" data-color-fg="#333333" data-color-bg="#000000" data-source-type="sine" style="left: 0px; top: 167.157px; width: 195.38px; height: 127.818px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.45241564417177915" data-width="0.29966257668711654" data-height="0.06521058282208589" data-start-edge="bottom" data-speed="97" data-source-interval="1875" data-pixel-size="4" data-color-fg="#333333" data-color-bg="#000000" data-source-type="sine" style="left: 0px; top: 294.975px; width: 195.38px; height: 42.5173px;"><canvas></canvas></div><div class="smear-container" data-x="0.29966257668711654" data-y="0" data-width="0.24288957055214724" data-height="0.12323588957055215" data-start-edge="top" data-speed="43" data-source-interval="1065" data-pixel-size="6" data-color-fg="#333333" data-color-bg="#000000" data-source-type="sine" style="left: 195.38px; top: 0px; width: 158.364px; height: 80.3498px;"><canvas></canvas></div><div class="smear-container" data-x="0.29966257668711654" data-y="0.12323588957055215" data-width="0.24288957055214724" data-height="0.15419631901840491" data-start-edge="left" data-speed="46" data-source-interval="1541" data-pixel-size="6" data-color-fg="#0000FF" data-color-bg="#000000" data-source-type="sine" style="left: 195.38px; top: 80.3498px; width: 158.364px; height: 100.536px;"><canvas></canvas></div><div class="smear-container" data-x="0.29966257668711654" data-y="0.277430981595092" data-width="0.12175613496932516" data-height="0.24019478527607363" data-start-edge="left" data-speed="38" data-source-interval="529" data-pixel-size="6" data-color-fg="#333333" data-color-bg="#000000" data-source-type="sine" style="left: 195.38px; top: 180.885px; width: 79.385px; height: 156.607px;"><canvas></canvas></div><div class="smear-container" data-x="0.4214187116564417" data-y="0.277430981595092" data-width="0.12113374233128835" data-height="0.24019478527607363" data-start-edge="left" data-speed="37" data-source-interval="1140" data-pixel-size="6" data-color-fg="#0000FF" data-color-bg="#000000" data-source-type="sine" style="left: 274.765px; top: 180.885px; width: 78.9792px; height: 156.607px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.5176257668711657" data-width="0.06982223926380368" data-height="0.23997699386503069" data-start-edge="top" data-speed="75" data-source-interval="1683" data-pixel-size="6" data-color-fg="#333333" data-color-bg="#000000" data-source-type="sine" style="left: 0px; top: 337.492px; width: 45.5241px; height: 156.465px;"><canvas></canvas></div><div class="smear-container" data-x="0.06982223926380368" data-y="0.5176257668711657" data-width="0.21746779141104292" data-height="0.23997699386503069" data-start-edge="left" data-speed="61" data-source-interval="1871" data-pixel-size="2" data-color-fg="#333333" data-color-bg="#000000" data-source-type="sine" style="left: 45.5241px; top: 337.492px; width: 141.789px; height: 156.465px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.7576027607361963" data-width="0.2872898773006135" data-height="0.17558742331288343" data-start-edge="right" data-speed="31" data-source-interval="1264" data-pixel-size="3" data-color-fg="#0000FF" data-color-bg="#000000" data-source-type="sine" style="left: 0px; top: 493.957px; width: 187.313px; height: 114.483px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.9331901840490798" data-width="0.2872898773006135" data-height="0.06680981595092025" data-start-edge="right" data-speed="55" data-source-interval="1160" data-pixel-size="1" data-color-fg="#333333" data-color-bg="#000000" data-source-type="sine" style="left: 0px; top: 608.44px; width: 187.313px; height: 43.56px;"><canvas></canvas></div><div class="smear-container" data-x="0.2872898773006135" data-y="0.5176257668711657" data-width="0.09905598159509203" data-height="0.24252300613496933" data-start-edge="top" data-speed="65" data-source-interval="1888" data-pixel-size="5" data-color-fg="#0000FF" data-color-bg="#000000" data-source-type="sine" style="left: 187.313px; top: 337.492px; width: 64.5845px; height: 158.125px;"><canvas></canvas></div><div class="smear-container" data-x="0.3863466257668712" data-y="0.5176257668711657" data-width="0.15620705521472392" data-height="0.24252300613496933" data-start-edge="right" data-speed="48" data-source-interval="1998" data-pixel-size="3" data-color-fg="#0000FF" data-color-bg="#000000" data-source-type="sine" style="left: 251.898px; top: 337.492px; width: 101.847px; height: 158.125px;"><canvas></canvas></div><div class="smear-container" data-x="0.2872898773006135" data-y="0.760148773006135" data-width="0.069240490797546" data-height="0.13095414110429446" data-start-edge="left" data-speed="90" data-source-interval="1410" data-pixel-size="1" data-color-fg="#333333" data-color-bg="#000000" data-source-type="sine" style="left: 187.313px; top: 495.617px; width: 45.1448px; height: 85.3821px;"><canvas></canvas></div><div class="smear-container" data-x="0.2872898773006135" data-y="0.8911027607361963" data-width="0.069240490797546" data-height="0.10889647239263804" data-start-edge="bottom" data-speed="97" data-source-interval="1247" data-pixel-size="2" data-color-fg="#0000FF" data-color-bg="#000000" data-source-type="sine" style="left: 187.313px; top: 580.999px; width: 45.1448px; height: 71.0005px;"><canvas></canvas></div><div class="smear-container" data-x="0.35653067484662576" data-y="0.760148773006135" data-width="0.18602147239263803" data-height="0.23985122699386505" data-start-edge="top" data-speed="87" data-source-interval="1052" data-pixel-size="4" data-color-fg="#333333" data-color-bg="#000000" data-source-type="sine" style="left: 232.458px; top: 495.617px; width: 121.286px; height: 156.383px;"><canvas></canvas></div><div class="smear-container" data-x="0.5425521472392638" data-y="0" data-width="0.14410153374233128" data-height="0.16962423312883435" data-start-edge="top" data-speed="80" data-source-interval="1409" data-pixel-size="2" data-color-fg="#0000FF" data-color-bg="#000000" data-source-type="sine" style="left: 353.744px; top: 0px; width: 93.9542px; height: 110.595px;"><canvas></canvas></div><div class="smear-container" data-x="0.6866533742331288" data-y="0" data-width="0.11210567484662577" data-height="0.16962423312883435" data-start-edge="left" data-speed="50" data-source-interval="687" data-pixel-size="2" data-color-fg="#333333" data-color-bg="#000000" data-source-type="sine" style="left: 447.698px; top: 0px; width: 73.0929px; height: 110.595px;"><canvas></canvas></div><div class="smear-container" data-x="0.5425521472392638" data-y="0.16962423312883435" data-width="0.2562070552147239" data-height="0.08757285276073619" data-start-edge="bottom" data-speed="81" data-source-interval="641" data-pixel-size="1" data-color-fg="#0000FF" data-color-bg="#000000" data-source-type="sine" style="left: 353.744px; top: 110.595px; width: 167.047px; height: 57.0975px;"><canvas></canvas></div><div class="smear-container" data-x="0.7987592024539878" data-y="0" data-width="0.20124079754601226" data-height="0.2571963190184049" data-start-edge="right" data-speed="97" data-source-interval="1047" data-pixel-size="2" data-color-fg="#333333" data-color-bg="#000000" data-source-type="sine" style="left: 520.791px; top: 0px; width: 131.209px; height: 167.692px;"><canvas></canvas></div><div class="smear-container" data-x="0.5425521472392638" data-y="0.2571963190184049" data-width="0.24466411042944783" data-height="0.03805828220858896" data-start-edge="top" data-speed="70" data-source-interval="1884" data-pixel-size="2" data-color-fg="#333333" data-color-bg="#000000" data-source-type="sine" style="left: 353.744px; top: 167.692px; width: 159.521px; height: 24.814px;"><canvas></canvas></div><div class="smear-container" data-x="0.5425521472392638" data-y="0.2952546012269939" data-width="0.24466411042944783" data-height="0.20967638036809816" data-start-edge="left" data-speed="85" data-source-interval="705" data-pixel-size="5" data-color-fg="#333333" data-color-bg="#000000" data-source-type="sine" style="left: 353.744px; top: 192.506px; width: 159.521px; height: 136.709px;"><canvas></canvas></div><div class="smear-container" data-x="0.7872162576687116" data-y="0.2571963190184049" data-width="0.21278374233128836" data-height="0.21962269938650306" data-start-edge="top" data-speed="94" data-source-interval="527" data-pixel-size="6" data-color-fg="#333333" data-color-bg="#000000" data-source-type="sine" style="left: 513.265px; top: 167.692px; width: 138.735px; height: 143.194px;"><canvas></canvas></div><div class="smear-container" data-x="0.7872162576687116" data-y="0.47681901840490803" data-width="0.21278374233128836" data-height="0.02811211656441718" data-start-edge="right" data-speed="81" data-source-interval="599" data-pixel-size="1" data-color-fg="#333333" data-color-bg="#000000" data-source-type="sine" style="left: 513.265px; top: 310.886px; width: 138.735px; height: 18.3291px;"><canvas></canvas></div><div class="smear-container" data-x="0.5425521472392638" data-y="0.504930981595092" data-width="0.18504294478527608" data-height="0.17830981595092024" data-start-edge="top" data-speed="61" data-source-interval="1884" data-pixel-size="4" data-color-fg="#0000FF" data-color-bg="#000000" data-source-type="sine" style="left: 353.744px; top: 329.215px; width: 120.648px; height: 116.258px;"><canvas></canvas></div><div class="smear-container" data-x="0.5425521472392638" data-y="0.6832407975460123" data-width="0.18504294478527608" data-height="0.0819463190184049" data-start-edge="bottom" data-speed="97" data-source-interval="973" data-pixel-size="1" data-color-fg="#0000FF" data-color-bg="#000000" data-source-type="sine" style="left: 353.744px; top: 445.473px; width: 120.648px; height: 53.429px;"><canvas></canvas></div><div class="smear-container" data-x="0.7275950920245399" data-y="0.504930981595092" data-width="0.1607760736196319" data-height="0.26025613496932515" data-start-edge="bottom" data-speed="88" data-source-interval="1510" data-pixel-size="1" data-color-fg="#333333" data-color-bg="#000000" data-source-type="sine" style="left: 474.392px; top: 329.215px; width: 104.826px; height: 169.687px;"><canvas></canvas></div><div class="smear-container" data-x="0.8883711656441717" data-y="0.504930981595092" data-width="0.11162898773006134" data-height="0.26025613496932515" data-start-edge="bottom" data-speed="80" data-source-interval="1660" data-pixel-size="2" data-color-fg="#333333" data-color-bg="#000000" data-source-type="sine" style="left: 579.218px; top: 329.215px; width: 72.7821px; height: 169.687px;"><canvas></canvas></div><div class="smear-container" data-x="0.5425521472392638" data-y="0.7651871165644172" data-width="0.18528220858895705" data-height="0.23481288343558285" data-start-edge="right" data-speed="50" data-source-interval="1031" data-pixel-size="3" data-color-fg="#0000FF" data-color-bg="#000000" data-source-type="sine" style="left: 353.744px; top: 498.902px; width: 120.804px; height: 153.098px;"><canvas></canvas></div><div class="smear-container" data-x="0.7278343558282209" data-y="0.7651871165644172" data-width="0.08497346625766872" data-height="0.23481288343558285" data-start-edge="left" data-speed="75" data-source-interval="961" data-pixel-size="5" data-color-fg="#333333" data-color-bg="#000000" data-source-type="sine" style="left: 474.548px; top: 498.902px; width: 55.4027px; height: 153.098px;"><canvas></canvas></div><div class="smear-container" data-x="0.812808282208589" data-y="0.7651871165644172" data-width="0.18719171779141106" data-height="0.058925153374233125" data-start-edge="right" data-speed="40" data-source-interval="1034" data-pixel-size="1" data-color-fg="#333333" data-color-bg="#000000" data-source-type="sine" style="left: 529.951px; top: 498.902px; width: 122.049px; height: 38.4192px;"><canvas></canvas></div><div class="smear-container" data-x="0.812808282208589" data-y="0.8241119631901841" data-width="0.18719171779141106" data-height="0.17588803680981596" data-start-edge="right" data-speed="95" data-source-interval="1867" data-pixel-size="1" data-color-fg="#333333" data-color-bg="#000000" data-source-type="sine" style="left: 529.951px; top: 537.321px; width: 122.049px; height: 114.679px;"><canvas></canvas></div></div><script> class SmearCanvas { constructor(c) { this.container = c; this.canvas = c.querySelector("canvas") || document.createElement("canvas"); if (!c.querySelector("canvas")) c.appendChild(this.canvas); this.ctx = this.canvas.getContext("2d"); this.ctx.imageSmoothingEnabled = false; this.imageData = null; this.lastTime = 0; this.animationId = null; this.speed = parseInt(c.dataset.speed) || 50; this.pixelSize = parseInt(c.dataset.pixelSize) || 2; this.sourceInterval = parseInt(c.dataset.sourceInterval) || 1000; this.colorFg = c.dataset.colorFg || "#FFFFFF"; this.colorBg = c.dataset.colorBg || "#000000"; this.sourceType = c.dataset.sourceType || "noise"; this.startEdge = c.dataset.startEdge || "top"; this.fgRGB = this.hexToRGB(this.colorFg); this.bgRGB = this.hexToRGB(this.colorBg); this.moveSpeed = (1000 / 60) / this.speed; this.subPixelX = 0; this.subPixelY = 0; this.leadX = 0; this.leadY = 0; this.initDirection(); this.lastDirectionChange = 0; this.nextDirectionInterval = this.randomInterval(); this.sourceParams = this.generateSourceParams(); this.lastSourceTime = 0; this.resize(); this.initCanvas(); this.generateSourceEdge(); this.initLeadPosition(); this.startAnimation(); this.resizeObserver = new ResizeObserver(() => this.resize()); this.resizeObserver.observe(this.container); } generateSourceParams() { return { steps: 3 + Math.floor(Math.random() * 6), stripeWidth: 2 + Math.floor(Math.random() * 8), checkSize: 1 + Math.floor(Math.random() * 4), phase: 0, dashLength: 3 + Math.floor(Math.random() * 10), gapLength: 2 + Math.floor(Math.random() * 6), density: 0.05 + Math.random() * 0.25, frequency: 1 + Math.random() * 4, sinePhase: Math.random() * Math.PI * 2, seed1: Math.random() * 100, seed2: Math.random() * 100, seed3: Math.random() * 100, counter: Math.floor(Math.random() * 65536), caRule: Math.random() > 0.5 ? 30 : 110 }; } initDirection() { switch (this.startEdge) { case "top": this.dx = 0; this.dy = 1; break; case "bottom": this.dx = 0; this.dy = -1; break; case "left": this.dx = 1; this.dy = 0; break; case "right": this.dx = -1; this.dy = 0; break; default: this.dx = 0; this.dy = 1; } } initLeadPosition() { switch (this.startEdge) { case "top": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = 1; break; case "bottom": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = this.internalHeight - 2; break; case "left": this.leadX = 1; this.leadY = Math.floor(this.internalHeight / 2); break; case "right": this.leadX = this.internalWidth - 2; this.leadY = Math.floor(this.internalHeight / 2); break; } } resize() { var rect = this.container.getBoundingClientRect(); if (rect.width === 0 || rect.height === 0) return; this.internalWidth = Math.ceil(rect.width / this.pixelSize); this.internalHeight = Math.ceil(rect.height / this.pixelSize); var oldImageData = this.imageData; var oldWidth = this.canvas.width; var oldHeight = this.canvas.height; this.canvas.width = this.internalWidth; this.canvas.height = this.internalHeight; this.imageData = this.ctx.createImageData(this.internalWidth, this.internalHeight); if (oldImageData && oldWidth > 0 && oldHeight > 0) { var minW = Math.min(oldWidth, this.internalWidth); var minH = Math.min(oldHeight, this.internalHeight); for (var y = 0; y < minH; y++) { for (var x = 0; x < minW; x++) { var oi = (y * oldWidth + x) * 4; var ni = (y * this.internalWidth + x) * 4; this.imageData.data[ni] = oldImageData.data[oi]; this.imageData.data[ni + 1] = oldImageData.data[oi + 1]; this.imageData.data[ni + 2] = oldImageData.data[oi + 2]; this.imageData.data[ni + 3] = oldImageData.data[oi + 3]; } } } } hexToRGB(hex) { var r = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); return r ? { r: parseInt(r[1], 16), g: parseInt(r[2], 16), b: parseInt(r[3], 16) } : { r: 255, g: 255, b: 255 }; } lerpColor(t) { return { r: Math.round(this.bgRGB.r + (this.fgRGB.r - this.bgRGB.r) * t), g: Math.round(this.bgRGB.g + (this.fgRGB.g - this.bgRGB.g) * t), b: Math.round(this.bgRGB.b + (this.fgRGB.b - this.bgRGB.b) * t) }; } getSourceValue(pos, length) { var t = pos / length; switch (this.sourceType) { case "noise": return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; case "linear-gradient": return this.lerpColor(t); case "stepped-gradient": var steps = this.sourceParams.steps || 5; return this.lerpColor(Math.floor(t * steps) / (steps - 1)); case "random-gradient": if (!this.gradientCache || this.gradientCache.length !== length) this.generateRandomGradient(length); return this.lerpColor(this.gradientCache[pos]); case "stripes": return (Math.floor(pos / (this.sourceParams.stripeWidth || 4)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "checkerboard": return ((Math.floor(pos / (this.sourceParams.checkSize || 2)) + (this.sourceParams.phase || 0)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "dashes": var cycle = (this.sourceParams.dashLength || 6) + (this.sourceParams.gapLength || 3); return (pos % cycle < (this.sourceParams.dashLength || 6)) ? this.fgRGB : this.bgRGB; case "dots": return Math.random() < (this.sourceParams.density || 0.15) ? this.fgRGB : this.bgRGB; case "sine": var sv = (Math.sin((t * (this.sourceParams.frequency || 2) * Math.PI * 2) + (this.sourceParams.sinePhase || 0)) + 1) / 2; return this.lerpColor(sv); case "perlin": var p1 = Math.sin(t * 3.7 + this.sourceParams.seed1) * 0.5; var p2 = Math.sin(t * 7.3 + this.sourceParams.seed2) * 0.25; var p3 = Math.sin(t * 13.1 + this.sourceParams.seed3) * 0.125; return this.lerpColor(Math.max(0, Math.min(1, (p1 + p2 + p3 + 0.875) / 1.75))); case "binary-counter": return ((this.sourceParams.counter >> (pos % 16)) & 1) ? this.fgRGB : this.bgRGB; case "cellular-automata": if (!this.caState || this.caState.length !== length) this.initCellularAutomata(length); return this.caState[pos] ? this.fgRGB : this.bgRGB; default: return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; } } generateRandomGradient(length) { var np = 3 + Math.floor(Math.random() * 4); var cp = [0]; for (var i = 1; i < np - 1; i++) cp.push(Math.random()); cp.push(1); cp.sort((a, b) => a - b); var cv = cp.map(() => Math.random()); this.gradientCache = []; for (var i = 0; i < length; i++) { var t = i / length; var si = 0; for (var j = 0; j < cp.length - 1; j++) { if (t >= cp[j] && t <= cp[j + 1]) { si = j; break; } } var st = (t - cp[si]) / (cp[si + 1] - cp[si]); this.gradientCache.push(cv[si] + (cv[si + 1] - cv[si]) * st); } } initCellularAutomata(length) { this.caState = []; for (var i = 0; i < length; i++) this.caState.push(Math.random() > 0.5); } evolveCellularAutomata() { if (!this.caState) return; var rule = this.sourceParams.caRule || 30; var os = [...this.caState]; var len = this.caState.length; for (var i = 0; i < len; i++) { var p = (os[(i - 1 + len) % len] ? 4 : 0) + (os[i] ? 2 : 0) + (os[(i + 1) % len] ? 1 : 0); this.caState[i] = ((rule >> p) & 1) === 1; } } updateSourceParams() { switch (this.sourceType) { case "checkerboard": this.sourceParams.phase = (this.sourceParams.phase + 1) % 2; break; case "sine": this.sourceParams.sinePhase += 0.5; break; case "binary-counter": this.sourceParams.counter++; break; case "cellular-automata": this.evolveCellularAutomata(); break; case "random-gradient": this.gradientCache = null; break; case "perlin": this.sourceParams.seed1 += 0.3; this.sourceParams.seed2 += 0.2; this.sourceParams.seed3 += 0.1; break; } } randomInterval() { return 100 + Math.random() * 900; } changeDirection() { var dirs = [[0, 1], [1, 1], [1, 0], [1, -1], [0, -1], [-1, -1], [-1, 0], [-1, 1]]; var idx = dirs.findIndex(d => d[0] === this.dx && d[1] === this.dy); if (idx === -1) idx = 0; idx = Math.random() > 0.5 ? (idx + 1) % 8 : (idx + 7) % 8; this.dx = dirs[idx][0]; this.dy = dirs[idx][1]; } initCanvas() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var isH = (this.startEdge === "top" || this.startEdge === "bottom"); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { var idx = (y * w + x) * 4; var col = this.getSourceValue(isH ? x : y, isH ? w : h); data[idx] = col.r; data[idx + 1] = col.g; data[idx + 2] = col.b; data[idx + 3] = 255; } } this.ctx.putImageData(this.imageData, 0, 0); } generateSourceEdge() { if (!this.imageData) return; this.updateSourceParams(); var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var gen = (getIdx, len) => { for (var i = 0; i < len; i++) { var idx = getIdx(i); var c = this.getSourceValue(i, len); data[idx] = c.r; data[idx + 1] = c.g; data[idx + 2] = c.b; data[idx + 3] = 255; } }; switch (this.startEdge) { case "top": gen(x => x * 4, w); break; case "bottom": gen(x => ((h - 1) * w + x) * 4, w); break; case "left": gen(y => (y * w) * 4, h); break; case "right": gen(y => (y * w + (w - 1)) * 4, h); break; } } getSourceEdgeCoord(x, y) { switch (this.startEdge) { case "top": return y === 0; case "bottom": return y === this.internalHeight - 1; case "left": return x === 0; case "right": return x === this.internalWidth - 1; } return false; } smear() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; this.subPixelX += this.dx * this.moveSpeed; this.subPixelY += this.dy * this.moveSpeed; var moveX = Math.trunc(this.subPixelX), moveY = Math.trunc(this.subPixelY); if (moveX === 0 && moveY === 0) return; this.subPixelX -= moveX; this.subPixelY -= moveY; this.leadX += moveX; this.leadY += moveY; if (this.leadX <= 0 || this.leadX >= w - 1) { this.dx = -this.dx; this.leadX = Math.max(0, Math.min(w - 1, this.leadX)); } if (this.leadY <= 0 || this.leadY >= h - 1) { this.dy = -this.dy; this.leadY = Math.max(0, Math.min(h - 1, this.leadY)); } var oldData = new Uint8ClampedArray(data); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { if (this.getSourceEdgeCoord(x, y)) continue; var srcX = Math.max(0, Math.min(w - 1, x - moveX)); var srcY = Math.max(0, Math.min(h - 1, y - moveY)); var dstIdx = (y * w + x) * 4, srcIdx = (srcY * w + srcX) * 4; data[dstIdx] = oldData[srcIdx]; data[dstIdx + 1] = oldData[srcIdx + 1]; data[dstIdx + 2] = oldData[srcIdx + 2]; data[dstIdx + 3] = oldData[srcIdx + 3]; } } } startAnimation() { var fi = 1000 / 60; var animate = (ts) => { if (!this.lastTime) this.lastTime = ts; if (!this.lastSourceTime) this.lastSourceTime = ts; if (!this.lastDirectionChange) this.lastDirectionChange = ts; if (ts - this.lastDirectionChange >= this.nextDirectionInterval) { this.changeDirection(); this.lastDirectionChange = ts; this.nextDirectionInterval = this.randomInterval(); } if (ts - this.lastSourceTime >= this.sourceInterval) { this.generateSourceEdge(); this.lastSourceTime = ts; } if (ts - this.lastTime >= fi) { this.smear(); if (this.imageData) this.ctx.putImageData(this.imageData, 0, 0); this.lastTime = ts; } this.animationId = requestAnimationFrame(animate); }; this.animationId = requestAnimationFrame(animate); } } function layoutSmears() { var vw = window.innerWidth, vh = window.innerHeight; document.querySelectorAll(".smear-container").forEach(function(div) { var x = parseFloat(div.dataset.x || 0); var y = parseFloat(div.dataset.y || 0); var w = parseFloat(div.dataset.width || 0); var h = parseFloat(div.dataset.height || 0); div.style.left = (x * vw) + "px"; div.style.top = (y * vh) + "px"; div.style.width = (w * vw) + "px"; div.style.height = (h * vh) + "px"; }); } function initSmears() { document.querySelectorAll(".smear-container").forEach(function(c) { if (!c._smearInstance) c._smearInstance = new SmearCanvas(c); }); } window.addEventListener("load", function() { layoutSmears(); initSmears(); }); window.addEventListener("resize", layoutSmears); layoutSmears(); initSmears(); </script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#000000;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#ff0000;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#783f7d;--color3-2:#000;--color4-1:#ff0000;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #000000; --color2-1: #ff0000; --color3-1: #783f7d; --color4-1: #ff0000;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-right" data-x="0" data-y="0" data-width="0.41" data-height="0.63" style="left: 0px; top: 0px; width: 267.32px; height: 410.76px; --clip-path: polygon(0% 0%, 92% 0%, 97% 95%, 0% 106%); background-size: 534.64px 410.76px; animation-duration: 22s;"></div><div class="gradient-container gradient-up" data-x="0" data-y="0.63" data-width="0.3116" data-height="0.37" style="left: 0px; top: 410.76px; width: 203.163px; height: 241.24px; --clip-path: polygon(0% 11%, 92% 16%, 98% 100%, 0% 100%); background-size: 203.163px 482.48px; animation-duration: 52s;"></div><div class="gradient-container gradient-down" data-x="0.3116" data-y="0.63" data-width="0.0984" data-height="0.033299999999999996" style="left: 203.163px; top: 410.76px; width: 64.1568px; height: 21.7116px; --clip-path: polygon(-24% 183%, 88% -94%, 95% -48%, -25% -68%); background-size: 64.1568px 43.4232px; animation-duration: 22s;"></div><div class="gradient-container gradient-right" data-x="0.3116" data-y="0.6633" data-width="0.0984" data-height="0.043771000000000004" style="left: 203.163px; top: 432.472px; width: 64.1568px; height: 28.5387px; --clip-path: polygon(-25% -128%, 95% -113%, 80% 223%, 29% 111%); background-size: 128.314px 28.5387px; animation-duration: 70s;"></div><div class="gradient-container gradient-right" data-x="0.3116" data-y="0.707071" data-width="0.0984" data-height="0.28121184" style="left: 203.163px; top: 461.01px; width: 64.1568px; height: 183.35px; --clip-path: polygon(29% 2%, 80% 19%, 88% 100%, -23% 100%); background-size: 128.314px 183.35px; animation-duration: 80s;"></div><div class="gradient-container gradient-down" data-x="0.3116" data-y="0.98828284" data-width="0.0984" data-height="0.011717160000000046" style="left: 203.163px; top: 644.36px; width: 64.1568px; height: 7.63959px; --clip-path: polygon(-23% 0%, 88% 0%, 99% 100%, -8% 100%); background-size: 64.1568px 15.2792px; animation-duration: 78s;"></div><div class="gradient-container gradient-up" data-x="0.41" data-y="0" data-width="0.10278744" data-height="0.05" style="left: 267.32px; top: 0px; width: 67.0174px; height: 32.6px; --clip-path: polygon(-31% 0%, 97% 0%, 65% 91%, 21% -32%); background-size: 67.0174px 65.2px; animation-duration: 90s;"></div><div class="gradient-container gradient-up" data-x="0.51278744" data-y="0" data-width="0.0629940168" data-height="0.05" style="left: 334.337px; top: 0px; width: 41.0721px; height: 32.6px; --clip-path: polygon(-5% 0%, 188% 0%, 162% 33%, -57% 91%); background-size: 41.0721px 65.2px; animation-duration: 70s;"></div><div class="gradient-container gradient-left" data-x="0.5757814568" data-y="0" data-width="0.017767543199999996" data-height="0.05" style="left: 375.41px; top: 0px; width: 11.5844px; height: 32.6px; --clip-path: polygon(313% 0%, -280% 0%, 386% 141%, 220% 33%); background-size: 23.1689px 32.6px; animation-duration: 68s;"></div><div class="gradient-container gradient-left" data-x="0.593549" data-y="0" data-width="0.11735100000000001" data-height="0.05" style="left: 386.994px; top: 0px; width: 76.5129px; height: 32.6px; --clip-path: polygon(-58% 0%, 79% 0%, 135% -21%, 43% 141%); background-size: 153.026px 32.6px; animation-duration: 21s;"></div><div class="gradient-container gradient-right" data-x="0.7109" data-y="0" data-width="0.2891" data-height="0.05" style="left: 463.507px; top: 0px; width: 188.493px; height: 32.6px; --clip-path: polygon(-9% 0%, 100% 0%, 100% 95%, 14% -21%); background-size: 376.986px 32.6px; animation-duration: 11s;"></div><div class="gradient-container gradient-down" data-x="0.41" data-y="0.05" data-width="0.59" data-height="0.7125" style="left: 267.32px; top: 32.6px; width: 384.68px; height: 464.55px; --clip-path: polygon(4% -9%, 100% 0%, 100% 110%, 12% 93%); background-size: 384.68px 929.1px; animation-duration: 88s;"></div><div class="gradient-container gradient-down" data-x="0.41" data-y="0.7625000000000001" data-width="0.4425" data-height="0.23749999999999996" style="left: 267.32px; top: 497.15px; width: 288.51px; height: 154.85px; --clip-path: polygon(16% -20%, 108% 9%, 97% 100%, 0% 100%); background-size: 288.51px 309.7px; animation-duration: 8s;"></div><div class="gradient-container gradient-left" data-x="0.8524999999999999" data-y="0.7625000000000001" data-width="0.14750000000000002" data-height="0.18762499999999996" style="left: 555.83px; top: 497.15px; width: 96.17px; height: 122.331px; --clip-path: polygon(24% 12%, 100% 36%, 100% 113%, 4% 129%); background-size: 192.34px 122.331px; animation-duration: 62s;"></div><div class="gradient-container gradient-right" data-x="0.8524999999999999" data-y="0.950125" data-width="0.11357500000000002" data-height="0.04987499999999998" style="left: 555.83px; top: 619.481px; width: 74.0509px; height: 32.5185px; --clip-path: polygon(5% 108%, 38% 58%, 144% 100%, -10% 100%); background-size: 148.102px 32.5185px; animation-duration: 32s;"></div><div class="gradient-container gradient-left" data-x="0.9660749999999998" data-y="0.950125" data-width="0.033925000000000004" data-height="0.04987499999999998" style="left: 629.881px; top: 619.481px; width: 22.1191px; height: 32.5185px; --clip-path: polygon(-209% 58%, 100% 49%, 100% 100%, 149% 100%); background-size: 44.2382px 32.5185px; animation-duration: 76s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#B4ff00;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#400026;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#83a1cd;--color3-2:#000;--color4-1:#1d1d1d;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #B4ff00; --color2-1: #400026; --color3-1: #83a1cd; --color4-1: #1d1d1d;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-left" data-x="0" data-y="0" data-width="0.51" data-height="0.13859999999999997" style="left: 0px; top: 0px; width: 169.32px; height: 46.0152px; --clip-path: polygon(0% 0%, 95% 0%, 86% 48%, 0% 101%); background-size: 338.64px 46.0152px; animation-duration: 4s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.13859999999999997" data-width="0.51" data-height="0.4914" style="left: 0px; top: 46.0152px; width: 169.32px; height: 163.145px; --clip-path: polygon(0% 0%, 86% -15%, 106% 90%, 0% 84%); background-size: 338.64px 163.145px; animation-duration: 87s;"></div><div class="gradient-container gradient-right" data-x="0.51" data-y="0" data-width="0.3185" data-height="0.25055099999999997" style="left: 169.32px; top: 0px; width: 105.742px; height: 83.1829px; --clip-path: polygon(-8% 0%, 106% 0%, 90% 82%, -18% 131%); background-size: 211.484px 83.1829px; animation-duration: 84s;"></div><div class="gradient-container gradient-down" data-x="0.8285" data-y="0" data-width="0.1715" data-height="0.07767080999999998" style="left: 275.062px; top: 0px; width: 56.938px; height: 25.7867px; --clip-path: polygon(11% 0%, 100% 0%, 100% 193%, 32% 97%); background-size: 56.938px 51.5734px; animation-duration: 20s;"></div><div class="gradient-container gradient-up" data-x="0.8285" data-y="0.07767080999999998" data-width="0.1715" data-height="0.17288019" style="left: 275.062px; top: 25.7867px; width: 56.938px; height: 57.3962px; --clip-path: polygon(32% -1%, 100% 42%, 100% 106%, -18% 74%); background-size: 56.938px 114.792px; animation-duration: 78s;"></div><div class="gradient-container gradient-right" data-x="0.51" data-y="0.25055099999999997" data-width="0.316589" data-height="0.360549" style="left: 169.32px; top: 83.1829px; width: 105.108px; height: 119.702px; --clip-path: polygon(-18% 22%, 79% 12%, 87% 119%, -8% 111%); background-size: 210.215px 119.702px; animation-duration: 17s;"></div><div class="gradient-container gradient-up" data-x="0.826589" data-y="0.25055099999999997" data-width="0.129311" data-height="0.360549" style="left: 274.428px; top: 83.1829px; width: 42.9313px; height: 119.702px; --clip-path: polygon(-50% 12%, 56% 11%, 58% 110%, -32% 119%); background-size: 42.9313px 239.405px; animation-duration: 32s;"></div><div class="gradient-container gradient-right" data-x="0.9559" data-y="0.25055099999999997" data-width="0.04409999999999999" data-height="0.10095372000000001" style="left: 317.359px; top: 83.1829px; width: 14.6412px; height: 33.5166px; --clip-path: polygon(-130% 38%, 100% 10%, 100% 137%, -158% 49%); background-size: 29.2824px 33.5166px; animation-duration: 81s;"></div><div class="gradient-container gradient-down" data-x="0.9559" data-y="0.35150472" data-width="0.04409999999999999" data-height="0.25959528" style="left: 317.359px; top: 116.7px; width: 14.6412px; height: 86.1856px; --clip-path: polygon(-158% -20%, 100% 14%, 100% 79%, -123% 114%); background-size: 14.6412px 172.371px; animation-duration: 2s;"></div><div class="gradient-container gradient-down" data-x="0.51" data-y="0.6111" data-width="0.49000000000000005" data-height="0.018899999999999997" style="left: 169.32px; top: 202.885px; width: 162.68px; height: 6.2748px; --clip-path: polygon(-5% 212%, 100% -293%, 100% 233%, 6% -159%); background-size: 162.68px 12.5496px; animation-duration: 100s;"></div><div class="gradient-container gradient-down" data-x="0" data-y="0.63" data-width="0.4" data-height="0.37" style="left: 0px; top: 209.16px; width: 132.8px; height: 122.84px; --clip-path: polygon(0% -21%, 83% -4%, 99% 100%, 0% 100%); background-size: 132.8px 245.68px; animation-duration: 64s;"></div><div class="gradient-container gradient-down" data-x="0.4" data-y="0.63" data-width="0.54" data-height="0.37" style="left: 132.8px; top: 209.16px; width: 179.28px; height: 122.84px; --clip-path: polygon(-13% -4%, 89% -5%, 96% 100%, -1% 100%); background-size: 179.28px 245.68px; animation-duration: 79s;"></div><div class="gradient-container gradient-down" data-x="0.9400000000000002" data-y="0.63" data-width="0.05999999999999996" data-height="0.2553" style="left: 312.08px; top: 209.16px; width: 19.92px; height: 84.7596px; --clip-path: polygon(-100% -7%, 100% 10%, 100% 107%, 78% 82%); background-size: 19.92px 169.519px; animation-duration: 77s;"></div><div class="gradient-container gradient-left" data-x="0.9400000000000002" data-y="0.8853" data-width="0.015599999999999989" data-height="0.055056" style="left: 312.08px; top: 293.92px; width: 5.1792px; height: 18.2786px; --clip-path: polygon(302% -85%, -148% -10%, -390% 165%, 72% 35%); background-size: 10.3584px 18.2786px; animation-duration: 62s;"></div><div class="gradient-container gradient-right" data-x="0.9556000000000001" data-y="0.8853" data-width="0.044399999999999974" data-height="0.055056" style="left: 317.259px; top: 293.92px; width: 14.7408px; height: 18.2786px; --clip-path: polygon(-87% -10%, 100% 32%, 100% 86%, -172% 165%); background-size: 29.4816px 18.2786px; animation-duration: 39s;"></div><div class="gradient-container gradient-left" data-x="0.9400000000000002" data-y="0.940356" data-width="0.007199999999999995" data-height="0.059643999999999996" style="left: 312.08px; top: 312.198px; width: 2.3904px; height: 19.8018px; --clip-path: polygon(156% -60%, 283% -90%, 744% 100%, -330% 100%); background-size: 4.7808px 19.8018px; animation-duration: 79s;"></div><div class="gradient-container gradient-left" data-x="0.9472000000000002" data-y="0.940356" data-width="0.052799999999999965" data-height="0.059643999999999996" style="left: 314.47px; top: 312.198px; width: 17.5296px; height: 19.8018px; --clip-path: polygon(25% -90%, 100% -13%, 100% 100%, 88% 100%); background-size: 35.0592px 19.8018px; animation-duration: 93s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#ff0000;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#00ffea;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#7200ff;--color3-2:#000;--color4-1:#FF00CC;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #ff0000; --color2-1: #00ffea; --color3-1: #7200ff; --color4-1: #FF00CC;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-left" data-x="0" data-y="0" data-width="0.01656" data-height="0.07298099999999999" style="left: 0px; top: 0px; width: 10.7971px; height: 47.5836px; --clip-path: polygon(0% 0%, 20% 0%, -147% 38%, 0% 33%); background-size: 21.5942px 47.5836px; animation-duration: 96s;"></div><div class="gradient-container gradient-down" data-x="0.01656" data-y="0" data-width="0.39743999999999996" data-height="0.07298099999999999" style="left: 10.7971px; top: 0px; width: 259.131px; height: 47.5836px; --clip-path: polygon(-3% 0%, 108% 0%, 99% 133%, -10% 38%); background-size: 259.131px 95.1672px; animation-duration: 89s;"></div><div class="gradient-container gradient-right" data-x="0" data-y="0.07298099999999999" data-width="0.414" data-height="0.356319" style="left: 0px; top: 47.5836px; width: 269.928px; height: 232.32px; --clip-path: polygon(0% -14%, 99% 7%, 111% 96%, 0% 117%); background-size: 539.856px 232.32px; animation-duration: 45s;"></div><div class="gradient-container gradient-right" data-x="0.414" data-y="0" data-width="0.186" data-height="0.279045" style="left: 269.928px; top: 0px; width: 121.272px; height: 181.937px; --clip-path: polygon(18% 0%, 69% 0%, 105% 88%, -18% 103%); background-size: 242.544px 181.937px; animation-duration: 60s;"></div><div class="gradient-container gradient-left" data-x="0.414" data-y="0.279045" data-width="0.186" data-height="0.15025499999999997" style="left: 269.928px; top: 181.937px; width: 121.272px; height: 97.9663px; --clip-path: polygon(-18% 5%, 105% -23%, 137% 48%, 24% 91%); background-size: 242.544px 97.9663px; animation-duration: 92s;"></div><div class="gradient-container gradient-down" data-x="0" data-y="0.42929999999999996" data-width="0.3198" data-height="0.15228000000000003" style="left: 0px; top: 279.904px; width: 208.51px; height: 99.2866px; --clip-path: polygon(0% 40%, 120% -51%, 96% 54%, 0% 103%); background-size: 208.51px 198.573px; animation-duration: 28s;"></div><div class="gradient-container gradient-right" data-x="0" data-y="0.58158" data-width="0.3198" data-height="0.22842" style="left: 0px; top: 379.19px; width: 208.51px; height: 148.93px; --clip-path: polygon(0% 2%, 96% -31%, 106% 108%, 0% 131%); background-size: 417.019px 148.93px; animation-duration: 84s;"></div><div class="gradient-container gradient-up" data-x="0.3198" data-y="0.42929999999999996" data-width="0.17220000000000002" data-height="0.38070000000000004" style="left: 208.51px; top: 279.904px; width: 112.274px; height: 248.216px; --clip-path: polygon(38% -20%, 81% -3%, 82% 120%, 12% 105%); background-size: 112.274px 496.433px; animation-duration: 70s;"></div><div class="gradient-container gradient-down" data-x="0.492" data-y="0.42929999999999996" data-width="0.108" data-height="0.09886779000000001" style="left: 320.784px; top: 279.904px; width: 70.416px; height: 64.4618px; --clip-path: polygon(-30% -11%, 164% -78%, 106% 61%, 6% 48%); background-size: 70.416px 128.924px; animation-duration: 1s;"></div><div class="gradient-container gradient-left" data-x="0.492" data-y="0.5281677899999999" data-width="0.108" data-height="0.08767520999999999" style="left: 320.784px; top: 344.365px; width: 70.416px; height: 57.1642px; --clip-path: polygon(6% -58%, 106% -44%, 67% 14%, -10% 154%); background-size: 140.832px 57.1642px; animation-duration: 7s;"></div><div class="gradient-container gradient-right" data-x="0.492" data-y="0.6158429999999999" data-width="0.108" data-height="0.1359099" style="left: 320.784px; top: 401.53px; width: 70.416px; height: 88.6133px; --clip-path: polygon(-10% 35%, 67% -55%, 147% 66%, -48% 69%); background-size: 140.832px 88.6133px; animation-duration: 1s;"></div><div class="gradient-container gradient-right" data-x="0.492" data-y="0.7517529" data-width="0.108" data-height="0.058247100000000024" style="left: 320.784px; top: 490.143px; width: 70.416px; height: 37.9771px; --clip-path: polygon(-48% -73%, 147% -80%, 45% 53%, -29% 232%); background-size: 140.832px 37.9771px; animation-duration: 61s;"></div><div class="gradient-container gradient-down" data-x="0.6" data-y="0" data-width="0.312" data-height="0.36450000000000005" style="left: 391.2px; top: 0px; width: 203.424px; height: 237.654px; --clip-path: polygon(-18% 0%, 122% 0%, 120% 97%, 20% 99%); background-size: 203.424px 475.308px; animation-duration: 39s;"></div><div class="gradient-container gradient-left" data-x="0.912" data-y="0" data-width="0.08800000000000001" data-height="0.36450000000000005" style="left: 594.624px; top: 0px; width: 57.376px; height: 237.654px; --clip-path: polygon(76% 0%, 100% 0%, 100% 99%, 70% 97%); background-size: 114.752px 237.654px; animation-duration: 32s;"></div><div class="gradient-container gradient-up" data-x="0.6" data-y="0.36450000000000005" data-width="0.4" data-height="0.253935" style="left: 391.2px; top: 237.654px; width: 260.8px; height: 165.566px; --clip-path: polygon(15% -2%, 100% -2%, 100% 71%, 18% 83%); background-size: 260.8px 331.131px; animation-duration: 26s;"></div><div class="gradient-container gradient-up" data-x="0.6" data-y="0.6184350000000001" data-width="0.18396" data-height="0.19156499999999999" style="left: 391.2px; top: 403.22px; width: 119.942px; height: 124.9px; --clip-path: polygon(38% -23%, 60% -11%, 78% 77%, -32% 86%); background-size: 119.942px 249.801px; animation-duration: 75s;"></div><div class="gradient-container gradient-up" data-x="0.78396" data-y="0.6184350000000001" data-width="0.10804000000000001" data-height="0.19156499999999999" style="left: 511.142px; top: 403.22px; width: 70.4421px; height: 124.9px; --clip-path: polygon(-69% -11%, 69% 31%, 28% 111%, -37% 77%); background-size: 70.4421px 249.801px; animation-duration: 8s;"></div><div class="gradient-container gradient-left" data-x="0.8920000000000001" data-y="0.6184350000000001" data-width="0.108" data-height="0.022987799999999996" style="left: 581.584px; top: 403.22px; width: 70.416px; height: 14.988px; --clip-path: polygon(-31% 258%, 100% -317%, 100% -16%, 62% -181%); background-size: 140.832px 14.988px; animation-duration: 73s;"></div><div class="gradient-container gradient-left" data-x="0.8920000000000001" data-y="0.6414228000000002" data-width="0.108" data-height="0.16857719999999998" style="left: 581.584px; top: 418.208px; width: 70.416px; height: 109.912px; --clip-path: polygon(62% -38%, 100% -16%, 100% 114%, -72% 112%); background-size: 140.832px 109.912px; animation-duration: 74s;"></div><div class="gradient-container gradient-up" data-x="0" data-y="0.81" data-width="0.0594" data-height="0.0589" style="left: 0px; top: 528.12px; width: 38.7288px; height: 38.4028px; --clip-path: polygon(0% 121%, 38% -100%, 74% 49%, 0% 105%); background-size: 38.7288px 76.8056px; animation-duration: 58s;"></div><div class="gradient-container gradient-right" data-x="0.0594" data-y="0.81" data-width="0.0306" data-height="0.002356" style="left: 38.7288px; top: 528.12px; width: 19.9512px; height: 1.53611px; --clip-path: polygon(-120% -2504%, 334% -429%, 303% -967%, -260% -1998%); background-size: 39.9024px 1.53611px; animation-duration: 86s;"></div><div class="gradient-container gradient-up" data-x="0.0594" data-y="0.812356" data-width="0.0306" data-height="0.056544" style="left: 38.7288px; top: 529.656px; width: 19.9512px; height: 36.8667px; --clip-path: polygon(-260% -87%, 303% -44%, 123% -26%, -51% 46%); background-size: 19.9512px 73.7334px; animation-duration: 77s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.8688999999999999" data-width="0.09" data-height="0.1311" style="left: 0px; top: 566.523px; width: 58.68px; height: 85.4772px; --clip-path: polygon(0% 2%, 108% -54%, 25% 100%, 0% 100%); background-size: 117.36px 85.4772px; animation-duration: 27s;"></div><div class="gradient-container gradient-down" data-x="0.09" data-y="0.81" data-width="0.33479999999999993" data-height="0.19" style="left: 58.68px; top: 528.12px; width: 218.29px; height: 123.88px; --clip-path: polygon(21% -5%, 98% 23%, 102% 100%, -20% 100%); background-size: 218.29px 247.76px; animation-duration: 64s;"></div><div class="gradient-container gradient-left" data-x="0.42479999999999996" data-y="0.81" data-width="0.02520000000000003" data-height="0.19" style="left: 276.97px; top: 528.12px; width: 16.4304px; height: 123.88px; --clip-path: polygon(-26% 23%, 240% 21%, -198% 100%, 23% 100%); background-size: 32.8608px 123.88px; animation-duration: 4s;"></div><div class="gradient-container gradient-down" data-x="0.44999999999999996" data-y="0.81" data-width="0.55" data-height="0.19" style="left: 293.4px; top: 528.12px; width: 358.6px; height: 123.88px; --clip-path: polygon(6% 21%, 100% 13%, 100% 100%, -14% 100%); background-size: 358.6px 247.76px; animation-duration: 84s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#3f427d;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#b283cd;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#cd83c2;--color3-2:#000;--color4-1:#494949;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #3f427d; --color2-1: #b283cd; --color3-1: #cd83c2; --color4-1: #494949;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-down" data-x="0" data-y="0" data-width="0.7" data-height="0.0672" style="left: 0px; top: 0px; width: 456.4px; height: 43.8144px; --clip-path: polygon(0% 0%, 97% 0%, 109% 170%, 0% 131%); background-size: 456.4px 87.6288px; animation-duration: 23s;"></div><div class="gradient-container gradient-right" data-x="0" data-y="0.0672" data-width="0.7" data-height="0.046368" style="left: 0px; top: 43.8144px; width: 456.4px; height: 30.2319px; --clip-path: polygon(0% 45%, 109% 102%, 110% 272%, 0% 29%); background-size: 912.8px 30.2319px; animation-duration: 62s;"></div><div class="gradient-container gradient-up" data-x="0" data-y="0.11356799999999999" data-width="0.7" data-height="0.5956742399999999" style="left: 0px; top: 74.0463px; width: 456.4px; height: 388.38px; --clip-path: polygon(0% -6%, 110% 13%, 110% 102%, 0% 87%); background-size: 456.4px 776.759px; animation-duration: 87s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.7092422399999999" data-width="0.35" data-height="0.13075776" style="left: 0px; top: 462.426px; width: 228.2px; height: 85.2541px; --clip-path: polygon(0% -59%, 84% -35%, 104% 138%, 0% 143%); background-size: 456.4px 85.2541px; animation-duration: 63s;"></div><div class="gradient-container gradient-up" data-x="0.35" data-y="0.7092422399999999" data-width="0.35" data-height="0.13075776" style="left: 228.2px; top: 462.426px; width: 228.2px; height: 85.2541px; --clip-path: polygon(-16% -35%, 119% 9%, 86% 137%, 4% 138%); background-size: 228.2px 170.508px; animation-duration: 57s;"></div><div class="gradient-container gradient-down" data-x="0" data-y="0.84" data-width="0.5389999999999999" data-height="0.1600000000000001" style="left: 0px; top: 547.68px; width: 351.428px; height: 104.32px; --clip-path: polygon(0% 35%, 93% 0%, 88% 100%, 0% 100%); background-size: 351.428px 208.64px; animation-duration: 72s;"></div><div class="gradient-container gradient-right" data-x="0.5389999999999999" data-y="0.84" data-width="0.16100000000000006" data-height="0.1600000000000001" style="left: 351.428px; top: 547.68px; width: 104.972px; height: 104.32px; --clip-path: polygon(-24% 0%, 69% 31%, 114% 100%, -41% 100%); background-size: 209.944px 104.32px; animation-duration: 48s;"></div><div class="gradient-container gradient-down" data-x="0.7" data-y="0" data-width="0.30000000000000004" data-height="0.47200000000000003" style="left: 456.4px; top: 0px; width: 195.6px; height: 307.744px; --clip-path: polygon(-7% 0%, 100% 0%, 100% 108%, -11% 91%); background-size: 195.6px 615.488px; animation-duration: 81s;"></div><div class="gradient-container gradient-up" data-x="0.7" data-y="0.47200000000000003" data-width="0.030030000000000008" data-height="0.11799999999999997" style="left: 456.4px; top: 307.744px; width: 19.5796px; height: 76.936px; --clip-path: polygon(-112% -38%, 70% 63%, 6% 110%, 92% 101%); background-size: 19.5796px 153.872px; animation-duration: 40s;"></div><div class="gradient-container gradient-down" data-x="0.73003" data-y="0.47200000000000003" data-width="0.11254320000000002" data-height="0.11799999999999997" style="left: 475.98px; top: 307.744px; width: 73.3782px; height: 76.936px; --clip-path: polygon(-8% 63%, 103% 17%, 83% 60%, -25% 110%); background-size: 73.3782px 153.872px; animation-duration: 6s;"></div><div class="gradient-container gradient-up" data-x="0.8425732" data-y="0.47200000000000003" data-width="0.0884268" data-height="0.11799999999999997" style="left: 549.358px; top: 307.744px; width: 57.6543px; height: 76.936px; --clip-path: polygon(4% 17%, 50% -63%, 136% 165%, -21% 60%); background-size: 57.6543px 153.872px; animation-duration: 6s;"></div><div class="gradient-container gradient-right" data-x="0.9309999999999999" data-y="0.47200000000000003" data-width="0.069" data-height="0.11799999999999997" style="left: 607.012px; top: 307.744px; width: 44.988px; height: 76.936px; --clip-path: polygon(-65% -63%, 100% 31%, 100% 44%, 46% 165%); background-size: 89.976px 76.936px; animation-duration: 28s;"></div><div class="gradient-container gradient-left" data-x="0.7" data-y="0.59" data-width="0.09702000000000002" data-height="0.12915" style="left: 456.4px; top: 384.68px; width: 63.257px; height: 84.2058px; --clip-path: polygon(28% 1%, 40% 45%, 145% 79%, 44% 40%); background-size: 126.514px 84.2058px; animation-duration: 66s;"></div><div class="gradient-container gradient-left" data-x="0.7970200000000001" data-y="0.59" data-width="0.10098000000000003" data-height="0.12915" style="left: 519.657px; top: 384.68px; width: 65.839px; height: 84.2058px; --clip-path: polygon(-57% 45%, 22% 58%, 58% 93%, 44% 79%); background-size: 131.678px 84.2058px; animation-duration: 17s;"></div><div class="gradient-container gradient-down" data-x="0.7" data-y="0.7191500000000001" data-width="0.19800000000000004" data-height="0.07585" style="left: 456.4px; top: 468.886px; width: 129.096px; height: 49.4542px; --clip-path: polygon(22% -102%, 79% -11%, 64% 70%, 39% 72%); background-size: 129.096px 98.9084px; animation-duration: 61s;"></div><div class="gradient-container gradient-up" data-x="0.898" data-y="0.59" data-width="0.10199999999999998" data-height="0.1476" style="left: 585.496px; top: 384.68px; width: 66.504px; height: 96.2352px; --clip-path: polygon(-77% 51%, 100% -45%, 100% 49%, 73% 66%); background-size: 66.504px 192.47px; animation-duration: 6s;"></div><div class="gradient-container gradient-up" data-x="0.898" data-y="0.7376" data-width="0.10199999999999998" data-height="0.057399999999999986" style="left: 585.496px; top: 480.915px; width: 66.504px; height: 37.4248px; --clip-path: polygon(73% -87%, 100% -132%, 100% 150%, -70% 60%); background-size: 66.504px 74.8496px; animation-duration: 23s;"></div><div class="gradient-container gradient-left" data-x="0.7" data-y="0.795" data-width="0.09729" data-height="0.082" style="left: 456.4px; top: 518.34px; width: 63.4331px; height: 53.464px; --clip-path: polygon(78% -26%, 103% 73%, 46% 154%, -6% 27%); background-size: 126.866px 53.464px; animation-duration: 5s;"></div><div class="gradient-container gradient-up" data-x="0.7972899999999999" data-y="0.795" data-width="0.043710000000000006" data-height="0.082" style="left: 519.833px; top: 518.34px; width: 28.4989px; height: 53.464px; --clip-path: polygon(8% 73%, 203% 95%, 179% 45%, -120% 154%); background-size: 28.4989px 106.928px; animation-duration: 39s;"></div><div class="gradient-container gradient-right" data-x="0.7" data-y="0.8770000000000001" data-width="0.14100000000000001" data-height="0.123" style="left: 456.4px; top: 571.804px; width: 91.932px; height: 80.196px; --clip-path: polygon(-4% -49%, 124% -37%, 129% 100%, 16% 100%); background-size: 183.864px 80.196px; animation-duration: 32s;"></div><div class="gradient-container gradient-left" data-x="0.841" data-y="0.795" data-width="0.15900000000000003" data-height="0.205" style="left: 548.332px; top: 518.34px; width: 103.668px; height: 133.66px; --clip-path: polygon(28% 38%, 100% 14%, 100% 100%, 25% 100%); background-size: 207.336px 133.66px; animation-duration: 11s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#1d1d1d;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#000000;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#00ffea;--color3-2:#000;--color4-1:#83a1cd;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #1d1d1d; --color2-1: #000000; --color3-1: #00ffea; --color4-1: #83a1cd;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-left" data-x="0" data-y="0" data-width="0.79" data-height="0.89" style="left: 0px; top: 0px; width: 515.08px; height: 580.28px; --clip-path: polygon(0% 0%, 105% 0%, 100% 93%, 0% 105%); background-size: 1030.16px 580.28px; animation-duration: 76s;"></div><div class="gradient-container gradient-left" data-x="0.79" data-y="0" data-width="0.006299999999999998" data-height="0.0089" style="left: 515.08px; top: 0px; width: 4.1076px; height: 5.8028px; --clip-path: polygon(572% 0%, 524% 0%, 916% 100%, 205% 100%); background-size: 8.2152px 5.8028px; animation-duration: 38s;"></div><div class="gradient-container gradient-down" data-x="0.7963000000000001" data-y="0" data-width="0.010755359999999997" data-height="0.0089" style="left: 519.188px; top: 0px; width: 7.01249px; height: 5.8028px; --clip-path: polygon(248% 0%, 727% 0%, 266% 100%, 478% 100%); background-size: 7.01249px 11.6056px; animation-duration: 83s;"></div><div class="gradient-container gradient-left" data-x="0.8070553600000001" data-y="0" data-width="0.16850063999999995" data-height="0.0089" style="left: 526.2px; top: 0px; width: 109.862px; height: 5.8028px; --clip-path: polygon(40% 0%, 118% 0%, 135% 100%, 11% 100%); background-size: 219.725px 5.8028px; animation-duration: 82s;"></div><div class="gradient-container gradient-up" data-x="0.9755560000000001" data-y="0" data-width="0.024444000000000004" data-height="0.0089" style="left: 636.063px; top: 0px; width: 15.9375px; height: 5.8028px; --clip-path: polygon(124% 0%, 100% 0%, 100% 100%, 240% 100%); background-size: 15.9375px 11.6056px; animation-duration: 7s;"></div><div class="gradient-container gradient-left" data-x="0.79" data-y="0.0089" data-width="0.20999999999999994" data-height="0.0864517698" style="left: 515.08px; top: 5.8028px; width: 136.92px; height: 56.3666px; --clip-path: polygon(6% 0%, 100% 0%, 100% 88%, -16% 166%); background-size: 273.84px 56.3666px; animation-duration: 37s;"></div><div class="gradient-container gradient-left" data-x="0.79" data-y="0.0953517698" data-width="0.20999999999999994" data-height="0.3938358402" style="left: 515.08px; top: 62.1694px; width: 136.92px; height: 256.781px; --clip-path: polygon(-16% 15%, 100% -3%, 100% 83%, -29% 115%); background-size: 273.84px 256.781px; animation-duration: 1s;"></div><div class="gradient-container gradient-down" data-x="0.79" data-y="0.48918760999999994" data-width="0.19949999999999993" data-height="0.12767138999999997" style="left: 515.08px; top: 318.95px; width: 130.074px; height: 83.2417px; --clip-path: polygon(-30% 47%, 100% -34%, 100% 42%, -15% 153%); background-size: 130.074px 166.483px; animation-duration: 57s;"></div><div class="gradient-container gradient-up" data-x="0.9895" data-y="0.48918760999999994" data-width="0.010500000000000006" data-height="0.12767138999999997" style="left: 645.154px; top: 318.95px; width: 6.846px; height: 83.2417px; --clip-path: polygon(0% -34%, 100% -54%, 100% 57%, 0% 42%); background-size: 6.846px 166.483px; animation-duration: 26s;"></div><div class="gradient-container gradient-right" data-x="0.79" data-y="0.6168589999999999" data-width="0.20999999999999994" data-height="0.07789981319999999" style="left: 515.08px; top: 402.192px; width: 136.92px; height: 50.7907px; --clip-path: polygon(-14% 87%, 100% -71%, 100% 143%, -12% 166%); background-size: 273.84px 50.7907px; animation-duration: 95s;"></div><div class="gradient-container gradient-right" data-x="0.79" data-y="0.6947588131999999" data-width="0.20999999999999994" data-height="0.17338990679999997" style="left: 515.08px; top: 452.983px; width: 136.92px; height: 113.05px; --clip-path: polygon(-12% 30%, 100% 19%, 100% 87%, 22% 146%); background-size: 273.84px 113.05px; animation-duration: 62s;"></div><div class="gradient-container gradient-up" data-x="0.79" data-y="0.8681487199999999" data-width="0.20999999999999994" data-height="0.021851280000000004" style="left: 515.08px; top: 566.033px; width: 136.92px; height: 14.247px; --clip-path: polygon(22% 364%, 100% -99%, 100% -256%, 0% -194%); background-size: 136.92px 28.4941px; animation-duration: 1s;"></div><div class="gradient-container gradient-right" data-x="0" data-y="0.89" data-width="0.093744" data-height="0.09109100000000003" style="left: 0px; top: 580.28px; width: 61.1211px; height: 59.3913px; --clip-path: polygon(0% 44%, 125% 54%, 112% 107%, 0% 118%); background-size: 122.242px 59.3913px; animation-duration: 25s;"></div><div class="gradient-container gradient-down" data-x="0" data-y="0.981091" data-width="0.093744" data-height="0.009009000000000003" style="left: 0px; top: 639.671px; width: 61.1211px; height: 5.87387px; --clip-path: polygon(0% 183%, 112% 67%, 99% 100%, 0% 100%); background-size: 61.1211px 11.7477px; animation-duration: 95s;"></div><div class="gradient-container gradient-right" data-x="0" data-y="0.9901" data-width="0.093744" data-height="0.00990000000000001" style="left: 0px; top: 645.545px; width: 61.1211px; height: 6.4548px; --clip-path: polygon(0% 0%, 99% 0%, 114% 100%, 0% 100%); background-size: 122.242px 6.4548px; animation-duration: 36s;"></div><div class="gradient-container gradient-down" data-x="0.093744" data-y="0.89" data-width="0.073656" data-height="0.03870900000000002" style="left: 61.1211px; top: 580.28px; width: 48.0237px; height: 25.2383px; --clip-path: polygon(32% 128%, 185% 160%, 82% 6%, 82% 37%); background-size: 48.0237px 50.4765px; animation-duration: 2s;"></div><div class="gradient-container gradient-right" data-x="0.093744" data-y="0.928709" data-width="0.073656" data-height="0.037191000000000016" style="left: 61.1211px; top: 605.518px; width: 48.0237px; height: 24.2485px; --clip-path: polygon(82% -65%, 82% -98%, 9% -39%, -53% 108%); background-size: 96.0474px 24.2485px; animation-duration: 41s;"></div><div class="gradient-container gradient-left" data-x="0.093744" data-y="0.9659" data-width="0.06408071999999998" data-height="0.034100000000000005" style="left: 61.1211px; top: 629.767px; width: 41.7806px; height: 22.2332px; --clip-path: polygon(-60% 9%, -6% 145%, 156% 100%, 20% 100%); background-size: 83.5613px 22.2332px; animation-duration: 65s;"></div><div class="gradient-container gradient-left" data-x="0.15782471999999997" data-y="0.9659" data-width="0.009575280000000007" data-height="0.034100000000000005" style="left: 102.902px; top: 629.767px; width: 6.24308px; height: 22.2332px; --clip-path: polygon(-711% 145%, -603% -152%, 849% 100%, 378% 100%); background-size: 12.4862px 22.2332px; animation-duration: 55s;"></div><div class="gradient-container gradient-left" data-x="0.1674" data-y="0.89" data-width="0.14260000000000003" data-height="0.11000000000000004" style="left: 109.145px; top: 580.28px; width: 92.9752px; height: 71.72px; --clip-path: polygon(44% 56%, 87% 37%, 52% 100%, 50% 100%); background-size: 185.95px 71.72px; animation-duration: 41s;"></div><div class="gradient-container gradient-right" data-x="0.31" data-y="0.89" data-width="0.69" data-height="0.11000000000000004" style="left: 202.12px; top: 580.28px; width: 449.88px; height: 71.72px; --clip-path: polygon(-3% 37%, 100% -71%, 100% 100%, -10% 100%); background-size: 899.76px 71.72px; animation-duration: 14s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Black & White Noise</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body, html { width: 100%; height: 100%; overflow: hidden; background: #000; } canvas { display: block; width: 100%; height: 100%; } </style> </head> <body> <canvas id="noise"></canvas> <script> const canvas = document.getElementById('noise'); const ctx = canvas.getContext('2d'); function resize() { canvas.width = window.innerWidth; canvas.height = window.innerHeight; } function generateNoise() { const imageData = ctx.createImageData(canvas.width, canvas.height); const data = imageData.data; for (let i = 0; i < data.length; i += 4) { const value = Math.random() > 0.5 ? 255 : 0; data[i] = value; // Red data[i + 1] = value; // Green data[i + 2] = value; // Blue data[i + 3] = 255; // Alpha } ctx.putImageData(imageData, 0, 0); } function animate() { generateNoise(); requestAnimationFrame(animate); } window.addEventListener('resize', resize); resize(); animate(); </script> </body> </html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#400026;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#FF00CC;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#83a1cd;--color3-2:#000;--color4-1:#494949;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #400026; --color2-1: #FF00CC; --color3-1: #83a1cd; --color4-1: #494949;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-left" data-x="0" data-y="0" data-width="0.49000000000000005" data-height="0.2" style="left: 0px; top: 0px; width: 319.48px; height: 130.4px; --clip-path: polygon(0% 0%, 89% 0%, 105% 126%, 0% 135%); background-size: 638.96px 130.4px; animation-duration: 61s;"></div><div class="gradient-container gradient-up" data-x="0.49000000000000005" data-y="0" data-width="0.17200872" data-height="0.156" style="left: 319.48px; top: 0px; width: 112.15px; height: 101.712px; --clip-path: polygon(-33% 0%, 60% 0%, 59% 67%, -3% 53%); background-size: 112.15px 203.424px; animation-duration: 81s;"></div><div class="gradient-container gradient-left" data-x="0.49000000000000005" data-y="0.156" data-width="0.17200872" data-height="0.044000000000000004" style="left: 319.48px; top: 101.712px; width: 112.15px; height: 28.688px; --clip-path: polygon(-3% -166%, 59% -116%, 107% 55%, 14% 216%); background-size: 224.299px 28.688px; animation-duration: 31s;"></div><div class="gradient-container gradient-down" data-x="0.66200872" data-y="0" data-width="0.04851527999999999" data-height="0.2" style="left: 431.63px; top: 0px; width: 31.632px; height: 130.4px; --clip-path: polygon(-142% 0%, 149% 0%, -18% 123%, 26% 90%); background-size: 31.632px 260.8px; animation-duration: 13s;"></div><div class="gradient-container gradient-left" data-x="0.710524" data-y="0" data-width="0.01917599999999998" data-height="0.023200000000000002" style="left: 463.262px; top: 0px; width: 12.5028px; height: 15.1264px; --clip-path: polygon(125% 0%, -51% 0%, -161% 6%, 268% 122%); background-size: 25.0055px 15.1264px; animation-duration: 6s;"></div><div class="gradient-container gradient-down" data-x="0.710524" data-y="0.023200000000000002" data-width="0.01917599999999998" data-height="0.034800000000000005" style="left: 463.262px; top: 15.1264px; width: 12.5028px; height: 22.6896px; --clip-path: polygon(268% 15%, -161% -63%, -83% -29%, 120% 214%); background-size: 12.5028px 45.3792px; animation-duration: 68s;"></div><div class="gradient-container gradient-up" data-x="0.710524" data-y="0.058" data-width="0.01917599999999998" data-height="0.1065" style="left: 463.262px; top: 37.816px; width: 12.5028px; height: 69.438px; --clip-path: polygon(120% 37%, -83% -42%, 100% 133%, 75% 148%); background-size: 12.5028px 138.876px; animation-duration: 79s;"></div><div class="gradient-container gradient-right" data-x="0.710524" data-y="0.1645" data-width="0.01917599999999998" data-height="0.035500000000000004" style="left: 463.262px; top: 107.254px; width: 12.5028px; height: 23.146px; --clip-path: polygon(75% 144%, 100% 100%, 100% 254%, -298% 229%); background-size: 25.0055px 23.146px; animation-duration: 39s;"></div><div class="gradient-container gradient-left" data-x="0.7297" data-y="0" data-width="0.10939041" data-height="0.022000000000000002" style="left: 475.764px; top: 0px; width: 71.3225px; height: 14.344px; --clip-path: polygon(-27% 0%, 106% 0%, 74% 442%, -66% 33%); background-size: 142.645px 14.344px; animation-duration: 34s;"></div><div class="gradient-container gradient-right" data-x="0.8390904100000001" data-y="0" data-width="0.04468059000000002" data-height="0.022000000000000002" style="left: 547.087px; top: 0px; width: 29.1317px; height: 14.344px; --clip-path: polygon(15% 0%, -60% 0%, 273% 114%, -65% 442%); background-size: 58.2635px 14.344px; animation-duration: 45s;"></div><div class="gradient-container gradient-down" data-x="0.7297" data-y="0.022000000000000002" data-width="0.154071" data-height="0.02136" style="left: 475.764px; top: 14.344px; width: 100.454px; height: 13.9267px; --clip-path: polygon(-47% -69%, 150% 15%, 119% 323%, 23% -91%); background-size: 100.454px 27.8534px; animation-duration: 6s;"></div><div class="gradient-container gradient-right" data-x="0.7297" data-y="0.04336" data-width="0.154071" data-height="0.15664" style="left: 475.764px; top: 28.2707px; width: 100.454px; height: 102.129px; --clip-path: polygon(23% -26%, 119% 30%, 75% 97%, 0% 135%); background-size: 200.909px 102.129px; animation-duration: 17s;"></div><div class="gradient-container gradient-right" data-x="0.8837710000000001" data-y="0" data-width="0.116229" data-height="0.064" style="left: 576.219px; top: 0px; width: 75.7813px; height: 41.728px; --clip-path: polygon(-62% 0%, 100% 0%, 100% 42%, 40% 143%); background-size: 151.563px 41.728px; animation-duration: 48s;"></div><div class="gradient-container gradient-left" data-x="0.8837710000000001" data-y="0.064" data-width="0.116229" data-height="0.064" style="left: 576.219px; top: 41.728px; width: 75.7813px; height: 41.728px; --clip-path: polygon(40% 43%, 100% -58%, 100% 161%, 26% 127%); background-size: 151.563px 41.728px; animation-duration: 50s;"></div><div class="gradient-container gradient-right" data-x="0.8837710000000001" data-y="0.128" data-width="0.03835557" data-height="0.07200000000000001" style="left: 576.219px; top: 83.456px; width: 25.0078px; height: 46.944px; --clip-path: polygon(77% 24%, 217% -31%, -12% 63%, -102% 92%); background-size: 50.0157px 46.944px; animation-duration: 59s;"></div><div class="gradient-container gradient-left" data-x="0.92212657" data-y="0.128" data-width="0.07787343" data-height="0.07200000000000001" style="left: 601.227px; top: 83.456px; width: 50.7735px; height: 46.944px; --clip-path: polygon(57% -31%, 100% 54%, 100% 199%, -55% 63%); background-size: 101.547px 46.944px; animation-duration: 23s;"></div><div class="gradient-container gradient-up" data-x="0" data-y="0.2" data-width="0.8500000000000001" data-height="0.8" style="left: 0px; top: 130.4px; width: 554.2px; height: 521.6px; --clip-path: polygon(0% 9%, 91% 3%, 106% 100%, 0% 100%); background-size: 554.2px 1043.2px; animation-duration: 98s;"></div><div class="gradient-container gradient-up" data-x="0.8500000000000001" data-y="0.2" data-width="0.14999999999999994" data-height="0.15640800000000002" style="left: 554.2px; top: 130.4px; width: 97.8px; height: 101.978px; --clip-path: polygon(-52% 17%, 100% 46%, 100% 75%, 42% 123%); background-size: 97.8px 203.956px; animation-duration: 51s;"></div><div class="gradient-container gradient-left" data-x="0.8500000000000001" data-y="0.356408" data-width="0.14999999999999994" data-height="0.12356231999999999" style="left: 554.2px; top: 232.378px; width: 97.8px; height: 80.5626px; --clip-path: polygon(42% 29%, 100% -32%, 100% 148%, -22% 138%); background-size: 195.6px 80.5626px; animation-duration: 71s;"></div><div class="gradient-container gradient-down" data-x="0.8500000000000001" data-y="0.47997032" data-width="0.14999999999999994" data-height="0.46482967999999997" style="left: 554.2px; top: 312.941px; width: 97.8px; height: 303.069px; --clip-path: polygon(-22% 10%, 100% 13%, 100% 88%, 45% 96%); background-size: 97.8px 606.138px; animation-duration: 72s;"></div><div class="gradient-container gradient-right" data-x="0.8500000000000001" data-y="0.9448" data-width="0.14999999999999994" data-height="0.03920000000000001" style="left: 554.2px; top: 616.01px; width: 97.8px; height: 25.5584px; --clip-path: polygon(45% -51%, 100% -143%, 100% 110%, -7% 9%); background-size: 195.6px 25.5584px; animation-duration: 64s;"></div><div class="gradient-container gradient-left" data-x="0.8500000000000001" data-y="0.984" data-width="0.012127499999999994" data-height="0.016000000000000025" style="left: 554.2px; top: 641.568px; width: 7.90713px; height: 10.432px; --clip-path: polygon(-91% -224%, 754% -475%, -540% 100%, 417% 100%); background-size: 15.8143px 10.432px; animation-duration: 9s;"></div><div class="gradient-container gradient-left" data-x="0.8621275000000002" data-y="0.984" data-width="0.005197499999999997" data-height="0.016000000000000025" style="left: 562.107px; top: 641.568px; width: 3.38877px; height: 10.432px; --clip-path: polygon(1527% -475%, 990% -254%, -747% 100%, -1492% 100%); background-size: 6.77754px 10.432px; animation-duration: 51s;"></div><div class="gradient-container gradient-right" data-x="0.867325" data-y="0.984" data-width="0.06675899999999999" data-height="0.016000000000000025" style="left: 565.496px; top: 641.568px; width: 43.5269px; height: 10.432px; --clip-path: polygon(69% -254%, 48% 453%, 114% 100%, -66% 100%); background-size: 87.0537px 10.432px; animation-duration: 22s;"></div><div class="gradient-container gradient-up" data-x="0.934084" data-y="0.984" data-width="0.03141599999999999" data-height="0.016000000000000025" style="left: 609.023px; top: 641.568px; width: 20.4832px; height: 10.432px; --clip-path: polygon(-111% 453%, 178% 23%, 264% 100%, 31% 100%); background-size: 20.4832px 20.864px; animation-duration: 56s;"></div><div class="gradient-container gradient-down" data-x="0.9654999999999999" data-y="0.984" data-width="0.020903549999999986" data-height="0.016000000000000025" style="left: 629.506px; top: 641.568px; width: 13.6291px; height: 10.432px; --clip-path: polygon(117% 23%, 100% -435%, 100% 100%, 246% 100%); background-size: 13.6291px 20.864px; animation-duration: 47s;"></div><div class="gradient-container gradient-down" data-x="0.9864035499999999" data-y="0.984" data-width="0.007731449999999994" data-height="0.016000000000000025" style="left: 643.135px; top: 641.568px; width: 5.04091px; height: 10.432px; --clip-path: polygon(0% -435%, 100% -451%, 100% 100%, 0% 100%); background-size: 5.04091px 20.864px; animation-duration: 20s;"></div><div class="gradient-container gradient-down" data-x="0.994135" data-y="0.984" data-width="0.005864999999999998" data-height="0.016000000000000025" style="left: 648.176px; top: 641.568px; width: 3.82398px; height: 10.432px; --clip-path: polygon(0% -451%, 100% 24%, 100% 100%, 0% 100%); background-size: 3.82398px 20.864px; animation-duration: 9s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>smear</title><style> * { margin: 0; padding: 0; box-sizing: border-box; } body, html { width: 100%; height: 100%; overflow: hidden; background: #000; } smear-partition { display: block; width: 100%; height: 100%; position: relative; } smear-canvas { display: block; position: absolute; } smear-canvas canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: -moz-crisp-edges; image-rendering: crisp-edges; -ms-interpolation-mode: nearest-neighbor; } .smear-container { position: absolute; overflow: hidden; } .smear-container canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; } </style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="smear-container" data-x="0" data-y="0" data-width="0.22094938650306747" data-height="0.35574693251533746" data-start-edge="top" data-speed="65" data-source-interval="1155" data-pixel-size="3" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 0px; top: 0px; width: 144.059px; height: 231.947px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.35574693251533746" data-width="0.22094938650306747" data-height="0.20559509202453988" data-start-edge="right" data-speed="40" data-source-interval="993" data-pixel-size="1" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 0px; top: 231.947px; width: 144.059px; height: 134.048px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.5613404907975461" data-width="0.22094938650306747" data-height="0.3453389570552147" data-start-edge="right" data-speed="52" data-source-interval="899" data-pixel-size="2" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="dots" style="left: 0px; top: 365.994px; width: 144.059px; height: 225.161px;"><canvas></canvas></div><div class="smear-container" data-x="0" data-y="0.9066809815950919" data-width="0.22094938650306747" data-height="0.09331963190184049" data-start-edge="left" data-speed="64" data-source-interval="1790" data-pixel-size="5" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 0px; top: 591.156px; width: 144.059px; height: 60.8444px;"><canvas></canvas></div><div class="smear-container" data-x="0.22094938650306747" data-y="0" data-width="0.036445092024539875" data-height="0.06184432515337423" data-start-edge="left" data-speed="82" data-source-interval="1975" data-pixel-size="3" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="dots" style="left: 144.059px; top: 0px; width: 23.7622px; height: 40.3225px;"><canvas></canvas></div><div class="smear-container" data-x="0.22094938650306747" data-y="0.06184432515337423" data-width="0.036445092024539875" data-height="0.13459141104294478" data-start-edge="left" data-speed="73" data-source-interval="972" data-pixel-size="2" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="dots" style="left: 144.059px; top: 40.3225px; width: 23.7622px; height: 87.7536px;"><canvas></canvas></div><div class="smear-container" data-x="0.22094938650306747" data-y="0.19643558282208587" data-width="0.036445092024539875" data-height="0.12556641104294478" data-start-edge="left" data-speed="98" data-source-interval="1787" data-pixel-size="2" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 144.059px; top: 128.076px; width: 23.7622px; height: 81.8693px;"><canvas></canvas></div><div class="smear-container" data-x="0.22094938650306747" data-y="0.32200153374233126" data-width="0.036445092024539875" data-height="0.15084693251533743" data-start-edge="bottom" data-speed="26" data-source-interval="785" data-pixel-size="2" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="dots" style="left: 144.059px; top: 209.945px; width: 23.7622px; height: 98.3522px;"><canvas></canvas></div><div class="smear-container" data-x="0.22094938650306747" data-y="0.47284969325153375" data-width="0.036445092024539875" data-height="0.06728067484662577" data-start-edge="right" data-speed="84" data-source-interval="663" data-pixel-size="2" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="dots" style="left: 144.059px; top: 308.298px; width: 23.7622px; height: 43.867px;"><canvas></canvas></div><div class="smear-container" data-x="0.22094938650306747" data-y="0.5401303680981595" data-width="0.036445092024539875" data-height="0.084725" data-start-edge="top" data-speed="45" data-source-interval="1281" data-pixel-size="6" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 144.059px; top: 352.165px; width: 23.7622px; height: 55.2407px;"><canvas></canvas></div><div class="smear-container" data-x="0.22094938650306747" data-y="0.6248542944785276" data-width="0.036445092024539875" data-height="0.16785736196319018" data-start-edge="right" data-speed="38" data-source-interval="874" data-pixel-size="4" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 144.059px; top: 407.405px; width: 23.7622px; height: 109.443px;"><canvas></canvas></div><div class="smear-container" data-x="0.22094938650306747" data-y="0.7927116564417177" data-width="0.036445092024539875" data-height="0.20728834355828218" data-start-edge="right" data-speed="28" data-source-interval="1746" data-pixel-size="6" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 144.059px; top: 516.848px; width: 23.7622px; height: 135.152px;"><canvas></canvas></div><div class="smear-container" data-x="0.2573957055214724" data-y="0" data-width="0.18555061349693253" data-height="0.06498588957055215" data-start-edge="top" data-speed="83" data-source-interval="1174" data-pixel-size="6" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="dots" style="left: 167.822px; top: 0px; width: 120.979px; height: 42.3708px;"><canvas></canvas></div><div class="smear-container" data-x="0.2573957055214724" data-y="0.06498588957055215" data-width="0.18555061349693253" data-height="0.23339877300613496" data-start-edge="bottom" data-speed="61" data-source-interval="1558" data-pixel-size="6" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 167.822px; top: 42.3708px; width: 120.979px; height: 152.176px;"><canvas></canvas></div><div class="smear-container" data-x="0.2573957055214724" data-y="0.29838496932515335" data-width="0.18555061349693253" data-height="0.20301226993865032" data-start-edge="top" data-speed="87" data-source-interval="823" data-pixel-size="3" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 167.822px; top: 194.547px; width: 120.979px; height: 132.364px;"><canvas></canvas></div><div class="smear-container" data-x="0.2573957055214724" data-y="0.5013987730061349" data-width="0.18555061349693253" data-height="0.045666411042944784" data-start-edge="left" data-speed="77" data-source-interval="530" data-pixel-size="6" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 167.822px; top: 326.912px; width: 120.979px; height: 29.7745px;"><canvas></canvas></div><div class="smear-container" data-x="0.2573957055214724" data-y="0.5470644171779141" data-width="0.18555061349693253" data-height="0.07304539877300613" data-start-edge="top" data-speed="66" data-source-interval="1928" data-pixel-size="1" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="dots" style="left: 167.822px; top: 356.686px; width: 120.979px; height: 47.6256px;"><canvas></canvas></div><div class="smear-container" data-x="0.2573957055214724" data-y="0.6201104294478528" data-width="0.18555061349693253" data-height="0.216090490797546" data-start-edge="top" data-speed="93" data-source-interval="1718" data-pixel-size="1" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="dots" style="left: 167.822px; top: 404.312px; width: 120.979px; height: 140.891px;"><canvas></canvas></div><div class="smear-container" data-x="0.2573957055214724" data-y="0.8362009202453987" data-width="0.18555061349693253" data-height="0.16379907975460123" data-start-edge="bottom" data-speed="46" data-source-interval="1813" data-pixel-size="5" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 167.822px; top: 545.203px; width: 120.979px; height: 106.797px;"><canvas></canvas></div><div class="smear-container" data-x="0.44294631901840487" data-y="0" data-width="0.040365337423312886" data-height="0.09197147239263805" data-start-edge="bottom" data-speed="96" data-source-interval="822" data-pixel-size="1" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 288.801px; top: 0px; width: 26.3182px; height: 59.9654px;"><canvas></canvas></div><div class="smear-container" data-x="0.44294631901840487" data-y="0.09197147239263805" data-width="0.040365337423312886" data-height="0.17137423312883437" data-start-edge="top" data-speed="47" data-source-interval="640" data-pixel-size="1" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="dots" style="left: 288.801px; top: 59.9654px; width: 26.3182px; height: 111.736px;"><canvas></canvas></div><div class="smear-container" data-x="0.44294631901840487" data-y="0.2633466257668712" data-width="0.040365337423312886" data-height="0.022131901840490797" data-start-edge="right" data-speed="78" data-source-interval="1531" data-pixel-size="2" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 288.801px; top: 171.702px; width: 26.3182px; height: 14.43px;"><canvas></canvas></div><div class="smear-container" data-x="0.44294631901840487" data-y="0.285478527607362" data-width="0.040365337423312886" data-height="0.16240184049079753" data-start-edge="right" data-speed="41" data-source-interval="599" data-pixel-size="6" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="dots" style="left: 288.801px; top: 186.132px; width: 26.3182px; height: 105.886px;"><canvas></canvas></div><div class="smear-container" data-x="0.44294631901840487" data-y="0.44788036809815945" data-width="0.040365337423312886" data-height="0.07035122699386503" data-start-edge="top" data-speed="44" data-source-interval="1454" data-pixel-size="6" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="dots" style="left: 288.801px; top: 292.018px; width: 26.3182px; height: 45.869px;"><canvas></canvas></div><div class="smear-container" data-x="0.44294631901840487" data-y="0.5182315950920245" data-width="0.040365337423312886" data-height="0.044792331288343555" data-start-edge="right" data-speed="62" data-source-interval="561" data-pixel-size="1" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 288.801px; top: 337.887px; width: 26.3182px; height: 29.2046px;"><canvas></canvas></div><div class="smear-container" data-x="0.44294631901840487" data-y="0.5630245398773006" data-width="0.040365337423312886" data-height="0.16731134969325154" data-start-edge="top" data-speed="39" data-source-interval="1118" data-pixel-size="5" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 288.801px; top: 367.092px; width: 26.3182px; height: 109.087px;"><canvas></canvas></div><div class="smear-container" data-x="0.44294631901840487" data-y="0.7303358895705521" data-width="0.040365337423312886" data-height="0.06410015337423314" data-start-edge="right" data-speed="48" data-source-interval="1367" data-pixel-size="1" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="dots" style="left: 288.801px; top: 476.179px; width: 26.3182px; height: 41.7933px;"><canvas></canvas></div><div class="smear-container" data-x="0.44294631901840487" data-y="0.7944355828220858" data-width="0.040365337423312886" data-height="0.1614340490797546" data-start-edge="right" data-speed="47" data-source-interval="1394" data-pixel-size="6" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 288.801px; top: 517.972px; width: 26.3182px; height: 105.255px;"><canvas></canvas></div><div class="smear-container" data-x="0.44294631901840487" data-y="0.9558696319018405" data-width="0.040365337423312886" data-height="0.044130674846625764" data-start-edge="top" data-speed="55" data-source-interval="1212" data-pixel-size="6" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="dots" style="left: 288.801px; top: 623.227px; width: 26.3182px; height: 28.7732px;"><canvas></canvas></div><div class="smear-container" data-x="0.48331134969325157" data-y="0" data-width="0.13332668711656442" data-height="0.1985889570552147" data-start-edge="left" data-speed="45" data-source-interval="1902" data-pixel-size="3" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 315.119px; top: 0px; width: 86.929px; height: 129.48px;"><canvas></canvas></div><div class="smear-container" data-x="0.48331134969325157" data-y="0.1985889570552147" data-width="0.13332668711656442" data-height="0.41922852760736196" data-start-edge="bottom" data-speed="38" data-source-interval="1613" data-pixel-size="2" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="dots" style="left: 315.119px; top: 129.48px; width: 86.929px; height: 273.337px;"><canvas></canvas></div><div class="smear-container" data-x="0.48331134969325157" data-y="0.6178174846625767" data-width="0.13332668711656442" data-height="0.12270536809815952" data-start-edge="right" data-speed="95" data-source-interval="1176" data-pixel-size="3" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="dots" style="left: 315.119px; top: 402.817px; width: 86.929px; height: 80.0039px;"><canvas></canvas></div><div class="smear-container" data-x="0.48331134969325157" data-y="0.7405230061349694" data-width="0.13332668711656442" data-height="0.2594769938650307" data-start-edge="bottom" data-speed="52" data-source-interval="719" data-pixel-size="2" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 315.119px; top: 482.821px; width: 86.929px; height: 169.179px;"><canvas></canvas></div><div class="smear-container" data-x="0.616638036809816" data-y="0" data-width="0.19976380368098162" data-height="0.1449644171779141" data-start-edge="bottom" data-speed="36" data-source-interval="990" data-pixel-size="6" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 402.048px; top: 0px; width: 130.246px; height: 94.5168px;"><canvas></canvas></div><div class="smear-container" data-x="0.616638036809816" data-y="0.1449644171779141" data-width="0.19976380368098162" data-height="0.1264691717791411" data-start-edge="bottom" data-speed="91" data-source-interval="1251" data-pixel-size="3" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="dots" style="left: 402.048px; top: 94.5168px; width: 130.246px; height: 82.4579px;"><canvas></canvas></div><div class="smear-container" data-x="0.616638036809816" data-y="0.2714340490797546" data-width="0.19976380368098162" data-height="0.12495015337423312" data-start-edge="right" data-speed="70" data-source-interval="1874" data-pixel-size="6" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="dots" style="left: 402.048px; top: 176.975px; width: 130.246px; height: 81.4675px;"><canvas></canvas></div><div class="smear-container" data-x="0.616638036809816" data-y="0.3963834355828221" data-width="0.19976380368098162" data-height="0.08160030674846626" data-start-edge="left" data-speed="92" data-source-interval="755" data-pixel-size="5" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 402.048px; top: 258.442px; width: 130.246px; height: 53.2034px;"><canvas></canvas></div><div class="smear-container" data-x="0.616638036809816" data-y="0.47798466257668715" data-width="0.19976380368098162" data-height="0.1457222392638037" data-start-edge="right" data-speed="36" data-source-interval="1912" data-pixel-size="6" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 402.048px; top: 311.646px; width: 130.246px; height: 95.0109px;"><canvas></canvas></div><div class="smear-container" data-x="0.616638036809816" data-y="0.6237070552147239" data-width="0.19976380368098162" data-height="0.049105981595092024" data-start-edge="top" data-speed="47" data-source-interval="943" data-pixel-size="3" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 402.048px; top: 406.657px; width: 130.246px; height: 32.0171px;"><canvas></canvas></div><div class="smear-container" data-x="0.616638036809816" data-y="0.6728128834355828" data-width="0.19976380368098162" data-height="0.1269756134969325" data-start-edge="right" data-speed="35" data-source-interval="1263" data-pixel-size="1" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="dots" style="left: 402.048px; top: 438.674px; width: 130.246px; height: 82.7881px;"><canvas></canvas></div><div class="smear-container" data-x="0.616638036809816" data-y="0.7997883435582822" data-width="0.19976380368098162" data-height="0.02351993865030675" data-start-edge="bottom" data-speed="69" data-source-interval="534" data-pixel-size="2" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 402.048px; top: 521.462px; width: 130.246px; height: 15.335px;"><canvas></canvas></div><div class="smear-container" data-x="0.616638036809816" data-y="0.823308282208589" data-width="0.19976380368098162" data-height="0.08364693251533742" data-start-edge="left" data-speed="55" data-source-interval="815" data-pixel-size="1" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="dots" style="left: 402.048px; top: 536.797px; width: 130.246px; height: 54.5378px;"><canvas></canvas></div><div class="smear-container" data-x="0.616638036809816" data-y="0.9069555214723927" data-width="0.19976380368098162" data-height="0.09304493865030675" data-start-edge="right" data-speed="42" data-source-interval="1646" data-pixel-size="1" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 402.048px; top: 591.335px; width: 130.246px; height: 60.6653px;"><canvas></canvas></div><div class="smear-container" data-x="0.8164018404907976" data-y="0" data-width="0.18359815950920247" data-height="0.037021625766871166" data-start-edge="bottom" data-speed="98" data-source-interval="962" data-pixel-size="5" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 532.294px; top: 0px; width: 119.706px; height: 24.1381px;"><canvas></canvas></div><div class="smear-container" data-x="0.8164018404907976" data-y="0.037021625766871166" data-width="0.18359815950920247" data-height="0.0348532208588957" data-start-edge="left" data-speed="93" data-source-interval="527" data-pixel-size="2" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 532.294px; top: 24.1381px; width: 119.706px; height: 22.7243px;"><canvas></canvas></div><div class="smear-container" data-x="0.8164018404907976" data-y="0.07187484662576687" data-width="0.18359815950920247" data-height="0.13058803680981595" data-start-edge="top" data-speed="25" data-source-interval="1718" data-pixel-size="5" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="dots" style="left: 532.294px; top: 46.8624px; width: 119.706px; height: 85.1434px;"><canvas></canvas></div><div class="smear-container" data-x="0.8164018404907976" data-y="0.20246319018404907" data-width="0.18359815950920247" data-height="0.05281733128834356" data-start-edge="bottom" data-speed="30" data-source-interval="536" data-pixel-size="5" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 532.294px; top: 132.006px; width: 119.706px; height: 34.4369px;"><canvas></canvas></div><div class="smear-container" data-x="0.8164018404907976" data-y="0.2552806748466258" data-width="0.18359815950920247" data-height="0.08331472392638037" data-start-edge="bottom" data-speed="33" data-source-interval="1130" data-pixel-size="6" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 532.294px; top: 166.443px; width: 119.706px; height: 54.3212px;"><canvas></canvas></div><div class="smear-container" data-x="0.8164018404907976" data-y="0.3385950920245399" data-width="0.18359815950920247" data-height="0.1446553680981595" data-start-edge="bottom" data-speed="41" data-source-interval="1046" data-pixel-size="5" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 532.294px; top: 220.764px; width: 119.706px; height: 94.3153px;"><canvas></canvas></div><div class="smear-container" data-x="0.8164018404907976" data-y="0.48325" data-width="0.18359815950920247" data-height="0.027403527607361963" data-start-edge="right" data-speed="74" data-source-interval="758" data-pixel-size="4" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 532.294px; top: 315.079px; width: 119.706px; height: 17.8671px;"><canvas></canvas></div><div class="smear-container" data-x="0.8164018404907976" data-y="0.5106533742331288" data-width="0.18359815950920247" data-height="0.13679585889570553" data-start-edge="left" data-speed="25" data-source-interval="832" data-pixel-size="1" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 532.294px; top: 332.946px; width: 119.706px; height: 89.1909px;"><canvas></canvas></div><div class="smear-container" data-x="0.8164018404907976" data-y="0.6474493865030675" data-width="0.18359815950920247" data-height="0.08463972392638036" data-start-edge="right" data-speed="42" data-source-interval="1534" data-pixel-size="2" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="dots" style="left: 532.294px; top: 422.137px; width: 119.706px; height: 55.1851px;"><canvas></canvas></div><div class="smear-container" data-x="0.8164018404907976" data-y="0.7320889570552147" data-width="0.18359815950920247" data-height="0.016112423312883435" data-start-edge="right" data-speed="59" data-source-interval="1743" data-pixel-size="2" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 532.294px; top: 477.322px; width: 119.706px; height: 10.5053px;"><canvas></canvas></div><div class="smear-container" data-x="0.8164018404907976" data-y="0.74820245398773" data-width="0.18359815950920247" data-height="0.1270187116564417" data-start-edge="left" data-speed="79" data-source-interval="1147" data-pixel-size="6" data-color-fg="#FFFFFF" data-color-bg="#000000" data-source-type="dots" style="left: 532.294px; top: 487.828px; width: 119.706px; height: 82.8162px;"><canvas></canvas></div><div class="smear-container" data-x="0.8164018404907976" data-y="0.8752208588957056" data-width="0.18359815950920247" data-height="0.12477944785276074" data-start-edge="left" data-speed="87" data-source-interval="651" data-pixel-size="6" data-color-fg="#FFFF00" data-color-bg="#000000" data-source-type="dots" style="left: 532.294px; top: 570.644px; width: 119.706px; height: 81.3562px;"><canvas></canvas></div></div><script> class SmearCanvas { constructor(c) { this.container = c; this.canvas = c.querySelector("canvas") || document.createElement("canvas"); if (!c.querySelector("canvas")) c.appendChild(this.canvas); this.ctx = this.canvas.getContext("2d"); this.ctx.imageSmoothingEnabled = false; this.imageData = null; this.lastTime = 0; this.animationId = null; this.speed = parseInt(c.dataset.speed) || 50; this.pixelSize = parseInt(c.dataset.pixelSize) || 2; this.sourceInterval = parseInt(c.dataset.sourceInterval) || 1000; this.colorFg = c.dataset.colorFg || "#FFFFFF"; this.colorBg = c.dataset.colorBg || "#000000"; this.sourceType = c.dataset.sourceType || "noise"; this.startEdge = c.dataset.startEdge || "top"; this.fgRGB = this.hexToRGB(this.colorFg); this.bgRGB = this.hexToRGB(this.colorBg); this.moveSpeed = (1000 / 60) / this.speed; this.subPixelX = 0; this.subPixelY = 0; this.leadX = 0; this.leadY = 0; this.initDirection(); this.lastDirectionChange = 0; this.nextDirectionInterval = this.randomInterval(); this.sourceParams = this.generateSourceParams(); this.lastSourceTime = 0; this.resize(); this.initCanvas(); this.generateSourceEdge(); this.initLeadPosition(); this.startAnimation(); this.resizeObserver = new ResizeObserver(() => this.resize()); this.resizeObserver.observe(this.container); } generateSourceParams() { return { steps: 3 + Math.floor(Math.random() * 6), stripeWidth: 2 + Math.floor(Math.random() * 8), checkSize: 1 + Math.floor(Math.random() * 4), phase: 0, dashLength: 3 + Math.floor(Math.random() * 10), gapLength: 2 + Math.floor(Math.random() * 6), density: 0.05 + Math.random() * 0.25, frequency: 1 + Math.random() * 4, sinePhase: Math.random() * Math.PI * 2, seed1: Math.random() * 100, seed2: Math.random() * 100, seed3: Math.random() * 100, counter: Math.floor(Math.random() * 65536), caRule: Math.random() > 0.5 ? 30 : 110 }; } initDirection() { switch (this.startEdge) { case "top": this.dx = 0; this.dy = 1; break; case "bottom": this.dx = 0; this.dy = -1; break; case "left": this.dx = 1; this.dy = 0; break; case "right": this.dx = -1; this.dy = 0; break; default: this.dx = 0; this.dy = 1; } } initLeadPosition() { switch (this.startEdge) { case "top": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = 1; break; case "bottom": this.leadX = Math.floor(this.internalWidth / 2); this.leadY = this.internalHeight - 2; break; case "left": this.leadX = 1; this.leadY = Math.floor(this.internalHeight / 2); break; case "right": this.leadX = this.internalWidth - 2; this.leadY = Math.floor(this.internalHeight / 2); break; } } resize() { var rect = this.container.getBoundingClientRect(); if (rect.width === 0 || rect.height === 0) return; this.internalWidth = Math.ceil(rect.width / this.pixelSize); this.internalHeight = Math.ceil(rect.height / this.pixelSize); var oldImageData = this.imageData; var oldWidth = this.canvas.width; var oldHeight = this.canvas.height; this.canvas.width = this.internalWidth; this.canvas.height = this.internalHeight; this.imageData = this.ctx.createImageData(this.internalWidth, this.internalHeight); if (oldImageData && oldWidth > 0 && oldHeight > 0) { var minW = Math.min(oldWidth, this.internalWidth); var minH = Math.min(oldHeight, this.internalHeight); for (var y = 0; y < minH; y++) { for (var x = 0; x < minW; x++) { var oi = (y * oldWidth + x) * 4; var ni = (y * this.internalWidth + x) * 4; this.imageData.data[ni] = oldImageData.data[oi]; this.imageData.data[ni + 1] = oldImageData.data[oi + 1]; this.imageData.data[ni + 2] = oldImageData.data[oi + 2]; this.imageData.data[ni + 3] = oldImageData.data[oi + 3]; } } } } hexToRGB(hex) { var r = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); return r ? { r: parseInt(r[1], 16), g: parseInt(r[2], 16), b: parseInt(r[3], 16) } : { r: 255, g: 255, b: 255 }; } lerpColor(t) { return { r: Math.round(this.bgRGB.r + (this.fgRGB.r - this.bgRGB.r) * t), g: Math.round(this.bgRGB.g + (this.fgRGB.g - this.bgRGB.g) * t), b: Math.round(this.bgRGB.b + (this.fgRGB.b - this.bgRGB.b) * t) }; } getSourceValue(pos, length) { var t = pos / length; switch (this.sourceType) { case "noise": return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; case "linear-gradient": return this.lerpColor(t); case "stepped-gradient": var steps = this.sourceParams.steps || 5; return this.lerpColor(Math.floor(t * steps) / (steps - 1)); case "random-gradient": if (!this.gradientCache || this.gradientCache.length !== length) this.generateRandomGradient(length); return this.lerpColor(this.gradientCache[pos]); case "stripes": return (Math.floor(pos / (this.sourceParams.stripeWidth || 4)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "checkerboard": return ((Math.floor(pos / (this.sourceParams.checkSize || 2)) + (this.sourceParams.phase || 0)) % 2 === 0) ? this.fgRGB : this.bgRGB; case "dashes": var cycle = (this.sourceParams.dashLength || 6) + (this.sourceParams.gapLength || 3); return (pos % cycle < (this.sourceParams.dashLength || 6)) ? this.fgRGB : this.bgRGB; case "dots": return Math.random() < (this.sourceParams.density || 0.15) ? this.fgRGB : this.bgRGB; case "sine": var sv = (Math.sin((t * (this.sourceParams.frequency || 2) * Math.PI * 2) + (this.sourceParams.sinePhase || 0)) + 1) / 2; return this.lerpColor(sv); case "perlin": var p1 = Math.sin(t * 3.7 + this.sourceParams.seed1) * 0.5; var p2 = Math.sin(t * 7.3 + this.sourceParams.seed2) * 0.25; var p3 = Math.sin(t * 13.1 + this.sourceParams.seed3) * 0.125; return this.lerpColor(Math.max(0, Math.min(1, (p1 + p2 + p3 + 0.875) / 1.75))); case "binary-counter": return ((this.sourceParams.counter >> (pos % 16)) & 1) ? this.fgRGB : this.bgRGB; case "cellular-automata": if (!this.caState || this.caState.length !== length) this.initCellularAutomata(length); return this.caState[pos] ? this.fgRGB : this.bgRGB; default: return Math.random() > 0.5 ? this.fgRGB : this.bgRGB; } } generateRandomGradient(length) { var np = 3 + Math.floor(Math.random() * 4); var cp = [0]; for (var i = 1; i < np - 1; i++) cp.push(Math.random()); cp.push(1); cp.sort((a, b) => a - b); var cv = cp.map(() => Math.random()); this.gradientCache = []; for (var i = 0; i < length; i++) { var t = i / length; var si = 0; for (var j = 0; j < cp.length - 1; j++) { if (t >= cp[j] && t <= cp[j + 1]) { si = j; break; } } var st = (t - cp[si]) / (cp[si + 1] - cp[si]); this.gradientCache.push(cv[si] + (cv[si + 1] - cv[si]) * st); } } initCellularAutomata(length) { this.caState = []; for (var i = 0; i < length; i++) this.caState.push(Math.random() > 0.5); } evolveCellularAutomata() { if (!this.caState) return; var rule = this.sourceParams.caRule || 30; var os = [...this.caState]; var len = this.caState.length; for (var i = 0; i < len; i++) { var p = (os[(i - 1 + len) % len] ? 4 : 0) + (os[i] ? 2 : 0) + (os[(i + 1) % len] ? 1 : 0); this.caState[i] = ((rule >> p) & 1) === 1; } } updateSourceParams() { switch (this.sourceType) { case "checkerboard": this.sourceParams.phase = (this.sourceParams.phase + 1) % 2; break; case "sine": this.sourceParams.sinePhase += 0.5; break; case "binary-counter": this.sourceParams.counter++; break; case "cellular-automata": this.evolveCellularAutomata(); break; case "random-gradient": this.gradientCache = null; break; case "perlin": this.sourceParams.seed1 += 0.3; this.sourceParams.seed2 += 0.2; this.sourceParams.seed3 += 0.1; break; } } randomInterval() { return 100 + Math.random() * 900; } changeDirection() { var dirs = [[0, 1], [1, 1], [1, 0], [1, -1], [0, -1], [-1, -1], [-1, 0], [-1, 1]]; var idx = dirs.findIndex(d => d[0] === this.dx && d[1] === this.dy); if (idx === -1) idx = 0; idx = Math.random() > 0.5 ? (idx + 1) % 8 : (idx + 7) % 8; this.dx = dirs[idx][0]; this.dy = dirs[idx][1]; } initCanvas() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var isH = (this.startEdge === "top" || this.startEdge === "bottom"); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { var idx = (y * w + x) * 4; var col = this.getSourceValue(isH ? x : y, isH ? w : h); data[idx] = col.r; data[idx + 1] = col.g; data[idx + 2] = col.b; data[idx + 3] = 255; } } this.ctx.putImageData(this.imageData, 0, 0); } generateSourceEdge() { if (!this.imageData) return; this.updateSourceParams(); var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; var gen = (getIdx, len) => { for (var i = 0; i < len; i++) { var idx = getIdx(i); var c = this.getSourceValue(i, len); data[idx] = c.r; data[idx + 1] = c.g; data[idx + 2] = c.b; data[idx + 3] = 255; } }; switch (this.startEdge) { case "top": gen(x => x * 4, w); break; case "bottom": gen(x => ((h - 1) * w + x) * 4, w); break; case "left": gen(y => (y * w) * 4, h); break; case "right": gen(y => (y * w + (w - 1)) * 4, h); break; } } getSourceEdgeCoord(x, y) { switch (this.startEdge) { case "top": return y === 0; case "bottom": return y === this.internalHeight - 1; case "left": return x === 0; case "right": return x === this.internalWidth - 1; } return false; } smear() { if (!this.imageData) return; var data = this.imageData.data; var w = this.internalWidth, h = this.internalHeight; this.subPixelX += this.dx * this.moveSpeed; this.subPixelY += this.dy * this.moveSpeed; var moveX = Math.trunc(this.subPixelX), moveY = Math.trunc(this.subPixelY); if (moveX === 0 && moveY === 0) return; this.subPixelX -= moveX; this.subPixelY -= moveY; this.leadX += moveX; this.leadY += moveY; if (this.leadX <= 0 || this.leadX >= w - 1) { this.dx = -this.dx; this.leadX = Math.max(0, Math.min(w - 1, this.leadX)); } if (this.leadY <= 0 || this.leadY >= h - 1) { this.dy = -this.dy; this.leadY = Math.max(0, Math.min(h - 1, this.leadY)); } var oldData = new Uint8ClampedArray(data); for (var y = 0; y < h; y++) { for (var x = 0; x < w; x++) { if (this.getSourceEdgeCoord(x, y)) continue; var srcX = Math.max(0, Math.min(w - 1, x - moveX)); var srcY = Math.max(0, Math.min(h - 1, y - moveY)); var dstIdx = (y * w + x) * 4, srcIdx = (srcY * w + srcX) * 4; data[dstIdx] = oldData[srcIdx]; data[dstIdx + 1] = oldData[srcIdx + 1]; data[dstIdx + 2] = oldData[srcIdx + 2]; data[dstIdx + 3] = oldData[srcIdx + 3]; } } } startAnimation() { var fi = 1000 / 60; var animate = (ts) => { if (!this.lastTime) this.lastTime = ts; if (!this.lastSourceTime) this.lastSourceTime = ts; if (!this.lastDirectionChange) this.lastDirectionChange = ts; if (ts - this.lastDirectionChange >= this.nextDirectionInterval) { this.changeDirection(); this.lastDirectionChange = ts; this.nextDirectionInterval = this.randomInterval(); } if (ts - this.lastSourceTime >= this.sourceInterval) { this.generateSourceEdge(); this.lastSourceTime = ts; } if (ts - this.lastTime >= fi) { this.smear(); if (this.imageData) this.ctx.putImageData(this.imageData, 0, 0); this.lastTime = ts; } this.animationId = requestAnimationFrame(animate); }; this.animationId = requestAnimationFrame(animate); } } function layoutSmears() { var vw = window.innerWidth, vh = window.innerHeight; document.querySelectorAll(".smear-container").forEach(function(div) { var x = parseFloat(div.dataset.x || 0); var y = parseFloat(div.dataset.y || 0); var w = parseFloat(div.dataset.width || 0); var h = parseFloat(div.dataset.height || 0); div.style.left = (x * vw) + "px"; div.style.top = (y * vh) + "px"; div.style.width = (w * vw) + "px"; div.style.height = (h * vh) + "px"; }); } function initSmears() { document.querySelectorAll(".smear-container").forEach(function(c) { if (!c._smearInstance) c._smearInstance = new SmearCanvas(c); }); } window.addEventListener("load", function() { layoutSmears(); initSmears(); }); window.addEventListener("resize", layoutSmears); layoutSmears(); initSmears(); </script></body></html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Black & White Noise</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body, html { width: 100%; height: 100%; overflow: hidden; background: #000; } canvas { display: block; width: 100%; height: 100%; } </style> </head> <body> <canvas id="noise"></canvas> <script> const canvas = document.getElementById('noise'); const ctx = canvas.getContext('2d'); function resize() { canvas.width = window.innerWidth; canvas.height = window.innerHeight; } function generateNoise() { const imageData = ctx.createImageData(canvas.width, canvas.height); const data = imageData.data; for (let i = 0; i < data.length; i += 4) { const value = Math.random() > 0.5 ? 255 : 0; data[i] = value; // Red data[i + 1] = value; // Green data[i + 2] = value; // Blue data[i + 3] = 255; // Alpha } ctx.putImageData(imageData, 0, 0); } function animate() { generateNoise(); requestAnimationFrame(animate); } window.addEventListener('resize', resize); resize(); animate(); </script> </body> </html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#ff0000;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#400026;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#00ff0c;--color3-2:#000;--color4-1:#0600ff;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #ff0000; --color2-1: #400026; --color3-1: #00ff0c; --color4-1: #0600ff;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-right" data-x="0" data-y="0" data-width="0.206388" data-height="0.12749" style="left: 0px; top: 0px; width: 134.152px; height: 82.8685px; --clip-path: polygon(0% 0%, 98% 0%, 133% 71%, 0% 114%); background-size: 268.304px 82.8685px; animation-duration: 43s;"></div><div class="gradient-container gradient-left" data-x="0.206388" data-y="0" data-width="0.02041199999999999" data-height="0.12749" style="left: 134.152px; top: 0px; width: 13.2678px; height: 82.8685px; --clip-path: polygon(-22% 0%, -28% 0%, 243% 158%, 335% 71%); background-size: 26.5356px 82.8685px; animation-duration: 62s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.12749" data-width="0.201852" data-height="0.20801" style="left: 0px; top: 82.8685px; width: 131.204px; height: 135.207px; --clip-path: polygon(0% 9%, 75% -17%, 114% 98%, 0% 75%); background-size: 262.408px 135.207px; animation-duration: 72s;"></div><div class="gradient-container gradient-up" data-x="0.201852" data-y="0.12749" data-width="0.02494799999999998" data-height="0.20801" style="left: 131.204px; top: 82.8685px; width: 16.2162px; height: 135.207px; --clip-path: polygon(-202% -17%, 217% 36%, 405% 129%, 117% 98%); background-size: 16.2162px 270.413px; animation-duration: 68s;"></div><div class="gradient-container gradient-up" data-x="0.22679999999999997" data-y="0" data-width="0.04698" data-height="0.110715" style="left: 147.42px; top: 0px; width: 30.537px; height: 71.9647px; --clip-path: polygon(-56% 0%, 267% 0%, 100% 103%, 60% 158%); background-size: 30.537px 143.929px; animation-duration: 43s;"></div><div class="gradient-container gradient-left" data-x="0.27377999999999997" data-y="0" data-width="0.26622" data-height="0.110715" style="left: 177.957px; top: 0px; width: 173.043px; height: 71.9647px; --clip-path: polygon(30% 0%, 84% 0%, 78% 101%, 0% 103%); background-size: 346.086px 71.9647px; animation-duration: 32s;"></div><div class="gradient-container gradient-up" data-x="0.22679999999999997" data-y="0.110715" data-width="0.31320000000000003" data-height="0.224785" style="left: 147.42px; top: 71.9647px; width: 203.58px; height: 146.11px; --clip-path: polygon(9% 28%, 82% 1%, 78% 88%, 24% 126%); background-size: 203.58px 292.221px; animation-duration: 79s;"></div><div class="gradient-container gradient-right" data-x="0" data-y="0.33549999999999996" data-width="0.54" data-height="0.21450000000000002" style="left: 0px; top: 218.075px; width: 351px; height: 139.425px; --clip-path: polygon(0% -24%, 87% -12%, 106% 68%, 0% 76%); background-size: 702px 139.425px; animation-duration: 80s;"></div><div class="gradient-container gradient-left" data-x="0.54" data-y="0" data-width="0.46" data-height="0.55" style="left: 351px; top: 0px; width: 299px; height: 357.5px; --clip-path: polygon(-9% 0%, 100% 0%, 100% 89%, 7% 87%); background-size: 598px 357.5px; animation-duration: 28s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.55" data-width="0.0364" data-height="0.180675" style="left: 0px; top: 357.5px; width: 23.66px; height: 117.439px; --clip-path: polygon(0% -29%, 170% -4%, 182% 98%, 0% 111%); background-size: 47.32px 117.439px; animation-duration: 12s;"></div><div class="gradient-container gradient-down" data-x="0" data-y="0.7306750000000001" data-width="0.0364" data-height="0.058806000000000004" style="left: 0px; top: 474.939px; width: 23.66px; height: 38.2239px; --clip-path: polygon(0% 35%, 182% -6%, 264% 62%, 0% 24%); background-size: 23.66px 76.4478px; animation-duration: 91s;"></div><div class="gradient-container gradient-down" data-x="0" data-y="0.789481" data-width="0.0364" data-height="0.008019000000000002" style="left: 0px; top: 513.163px; width: 23.66px; height: 5.21235px; --clip-path: polygon(0% -560%, 264% -278%, -113% 86%, 0% 842%); background-size: 23.66px 10.4247px; animation-duration: 16s;"></div><div class="gradient-container gradient-down" data-x="0.0364" data-y="0.55" data-width="0.2436" data-height="0.2475" style="left: 23.66px; top: 357.5px; width: 158.34px; height: 160.875px; --clip-path: polygon(10% -3%, 99% 13%, 118% 121%, -32% 100%); background-size: 158.34px 321.75px; animation-duration: 27s;"></div><div class="gradient-container gradient-down" data-x="0" data-y="0.7975" data-width="0.078736" data-height="0.0891" style="left: 0px; top: 518.375px; width: 51.1784px; height: 57.915px; --clip-path: polygon(0% 67%, 142% 86%, 118% 34%, 0% 30%); background-size: 51.1784px 115.83px; animation-duration: 26s;"></div><div class="gradient-container gradient-down" data-x="0.078736" data-y="0.7975" data-width="0.024864" data-height="0.0891" style="left: 51.1784px; top: 518.375px; width: 16.1616px; height: 57.915px; --clip-path: polygon(132% 86%, -191% 51%, 75% 16%, 56% 34%); background-size: 16.1616px 115.83px; animation-duration: 72s;"></div><div class="gradient-container gradient-up" data-x="0" data-y="0.8865999999999999" data-width="0.10360000000000001" data-height="0.11340000000000001" style="left: 0px; top: 576.29px; width: 67.34px; height: 73.71px; --clip-path: polygon(0% -55%, 94% -66%, 109% 100%, 0% 100%); background-size: 67.34px 147.42px; animation-duration: 76s;"></div><div class="gradient-container gradient-left" data-x="0.10360000000000001" data-y="0.7975" data-width="0.09349199999999999" data-height="0.010125" style="left: 67.34px; top: 518.375px; width: 60.7698px; height: 6.58125px; --clip-path: polygon(-77% 451%, 35% 451%, 156% 520%, 3% -358%); background-size: 121.54px 6.58125px; animation-duration: 82s;"></div><div class="gradient-container gradient-right" data-x="0.19709200000000002" data-y="0.7975" data-width="0.082908" data-height="0.010125" style="left: 128.11px; top: 518.375px; width: 53.8902px; height: 6.58125px; --clip-path: polygon(-73% 451%, 154% 503%, 114% -329%, 63% 520%); background-size: 107.78px 6.58125px; animation-duration: 98s;"></div><div class="gradient-container gradient-up" data-x="0.10360000000000001" data-y="0.8076249999999999" data-width="0.1764" data-height="0.15582375" style="left: 67.34px; top: 524.956px; width: 114.66px; height: 101.285px; --clip-path: polygon(2% -30%, 107% -28%, 132% 53%, 4% 59%); background-size: 114.66px 202.571px; animation-duration: 6s;"></div><div class="gradient-container gradient-left" data-x="0.10360000000000001" data-y="0.9634487499999999" data-width="0.1764" data-height="0.03655125" style="left: 67.34px; top: 626.242px; width: 114.66px; height: 23.7583px; --clip-path: polygon(4% -174%, 132% -199%, 59% 100%, 6% 100%); background-size: 229.32px 23.7583px; animation-duration: 41s;"></div><div class="gradient-container gradient-up" data-x="0.28" data-y="0.55" data-width="0.26892" data-height="0.061200000000000004" style="left: 182px; top: 357.5px; width: 174.798px; height: 39.78px; --clip-path: polygon(-1% 51%, 118% 99%, 88% 35%, -13% 43%); background-size: 174.798px 79.56px; animation-duration: 5s;"></div><div class="gradient-container gradient-right" data-x="0.54892" data-y="0.55" data-width="0.05507999999999999" data-height="0.061200000000000004" style="left: 356.798px; top: 357.5px; width: 35.802px; height: 39.78px; --clip-path: polygon(88% 99%, -24% -113%, 125% 207%, -57% 35%); background-size: 71.604px 39.78px; animation-duration: 32s;"></div><div class="gradient-container gradient-right" data-x="0.28" data-y="0.6112" data-width="0.324" data-height="0.3213" style="left: 182px; top: 397.28px; width: 210.6px; height: 208.845px; --clip-path: polygon(-10% -11%, 104% 20%, 122% 91%, 4% 106%); background-size: 421.2px 208.845px; animation-duration: 73s;"></div><div class="gradient-container gradient-right" data-x="0.28" data-y="0.9325" data-width="0.0513864" data-height="0.0675" style="left: 182px; top: 606.125px; width: 33.4012px; height: 43.875px; --clip-path: polygon(26% 27%, 254% -35%, -46% 100%, -140% 100%); background-size: 66.8023px 43.875px; animation-duration: 49s;"></div><div class="gradient-container gradient-left" data-x="0.3313864" data-y="0.9325" data-width="0.1462536" data-height="0.0675" style="left: 215.401px; top: 606.125px; width: 95.0648px; height: 43.875px; --clip-path: polygon(54% -35%, 61% -118%, 130% 100%, -51% 100%); background-size: 190.13px 43.875px; animation-duration: 61s;"></div><div class="gradient-container gradient-down" data-x="0.47764" data-y="0.9325" data-width="0.11498759999999998" data-height="0.0675" style="left: 310.466px; top: 606.125px; width: 74.7419px; height: 43.875px; --clip-path: polygon(-49% -118%, 38% -117%, 80% 100%, 38% 100%); background-size: 74.7419px 87.75px; animation-duration: 86s;"></div><div class="gradient-container gradient-left" data-x="0.5926276" data-y="0.9325" data-width="0.011372400000000001" data-height="0.0675" style="left: 385.208px; top: 606.125px; width: 7.39206px; height: 43.875px; --clip-path: polygon(-624% -117%, 724% -44%, -143% 100%, -201% 100%); background-size: 14.7841px 43.875px; animation-duration: 81s;"></div><div class="gradient-container gradient-up" data-x="0.604" data-y="0.55" data-width="0.12672" data-height="0.14850000000000002" style="left: 392.6px; top: 357.5px; width: 82.368px; height: 96.525px; --clip-path: polygon(-54% -47%, 162% -16%, 53% 88%, 18% 72%); background-size: 82.368px 193.05px; animation-duration: 82s;"></div><div class="gradient-container gradient-left" data-x="0.73072" data-y="0.55" data-width="0.24773759999999995" data-height="0.14850000000000002" style="left: 474.968px; top: 357.5px; width: 161.029px; height: 96.525px; --clip-path: polygon(32% -16%, 127% -12%, 111% 147%, -24% 88%); background-size: 322.059px 96.525px; animation-duration: 69s;"></div><div class="gradient-container gradient-down" data-x="0.9784575999999999" data-y="0.55" data-width="0.021542400000000027" data-height="0.14850000000000002" style="left: 635.997px; top: 357.5px; width: 14.0026px; height: 96.525px; --clip-path: polygon(312% -12%, 100% -41%, 100% 130%, 129% 147%); background-size: 14.0026px 193.05px; animation-duration: 40s;"></div><div class="gradient-container gradient-down" data-x="0.604" data-y="0.6985" data-width="0.26532" data-height="0.3015" style="left: 392.6px; top: 454.025px; width: 172.458px; height: 195.975px; --clip-path: polygon(9% -14%, 70% 5%, 112% 100%, -10% 100%); background-size: 172.458px 391.95px; animation-duration: 82s;"></div><div class="gradient-container gradient-up" data-x="0.86932" data-y="0.6985" data-width="0.13067999999999996" data-height="0.057285" style="left: 565.058px; top: 454.025px; width: 84.942px; height: 37.2353px; --clip-path: polygon(-60% 26%, 100% 77%, 100% -18%, -38% 73%); background-size: 84.942px 74.4705px; animation-duration: 37s;"></div><div class="gradient-container gradient-right" data-x="0.86932" data-y="0.7557849999999999" data-width="0.13067999999999996" data-height="0.244215" style="left: 565.058px; top: 491.26px; width: 84.942px; height: 158.74px; --clip-path: polygon(-38% -6%, 100% -28%, 100% 100%, 24% 100%); background-size: 169.884px 158.74px; animation-duration: 92s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
<!doctype html><html><head><meta charset="utf-8"><title>shards</title><style> :root { /* Pattern 1: 7 bands */ --color1: #bb44dd; --color2: #000; --pos1: 0%; --pos2: 8.33%; --pos3: 25%; --pos4: 41.67%; --pos5: 58.33%; --pos6: 75%; --pos7: 91.67%; /* Pattern 2: 5 bands */ --color2-1: #6486f5; --color2-2: #000; --pos2-1: 0%; --pos2-2: 12.5%; --pos2-3: 37.5%; --pos2-4: 62.5%; --pos2-5: 87.5%; /* Pattern 3: 3 bands */ --color3-1: #ffffff; --color3-2: #000; --color4-1: #ff00cc; --color4-2: #000; --pos3-1: 0%; --pos3-2: 50%; --pos3-3: 100%; } body { background-color: black; margin: 0; padding: 0; width: 100vw; height: 100vh; overflow: hidden; } .gradient-container { position: absolute; overflow: hidden; transition: all 0.3s ease; clip-path: var(--clip-path); /* Emboss effect */ box-shadow: inset 2px 2px 5px rgba(255, 255, 255, 0.4), inset -2px -2px 5px rgba(0, 0, 0, 0.4); /* Add more depth with a subtle border */ } .gradient-up { background-image: repeating-linear-gradient( to bottom, var(--color1) var(--pos1), var(--color2) var(--pos2), var(--color1) var(--pos3), var(--color2) var(--pos4), var(--color1) var(--pos5), var(--color2) var(--pos6), var(--color1) var(--pos7) ); animation: moveUpwards 5s linear infinite; } .gradient-down { background-image: repeating-linear-gradient( to bottom, var(--color2-1) var(--pos2-1), var(--color2-2) var(--pos2-2), var(--color2-1) var(--pos2-3), var(--color2-2) var(--pos2-4), var(--color2-1) var(--pos2-5) ); animation: moveDownwards 5s linear infinite; } .gradient-left { background-image: repeating-linear-gradient( to right, var(--color3-1) var(--pos3-1), var(--color3-2) var(--pos3-2), var(--color3-1) var(--pos3-3) ); animation: moveLeft 5s linear infinite; } .gradient-right { background-image: repeating-linear-gradient( to right, var(--color4-1) var(--pos1), var(--color4-2) var(--pos2), var(--color4-1) var(--pos3), var(--color4-2) var(--pos4), var(--color4-1) var(--pos5), var(--color4-2) var(--pos6), var(--color4-1) var(--pos7) ); animation: moveRight 5s linear infinite; } .strobe { background-color: #000; } @keyframes strobeEffect { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes moveUpwards { 0% { background-position: 0 100%; } 100% { background-position: 0 -100%; } } @keyframes moveDownwards { 0% { background-position: 0 -100%; } 100% { background-position: 0 100%; } } @keyframes moveLeft { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes moveRight { 0% { background-position: -100% 0; } 100% { background-position: 100% 0; } } :root{--color1:#00ff0c;--color2:#000;--pos1:0%;--pos2:8.33%;--pos3:25%;--pos4:41.67%;--pos5:58.33%;--pos6:75%;--pos7:91.67%;--color2-1:#0600ff;--color2-2:#000;--pos2-1:0%;--pos2-2:12.5%;--pos2-3:37.5%;--pos2-4:62.5%;--pos2-5:87.5%;--color3-1:#0600ff;--color3-2:#000;--color4-1:#00103f;--color4-2:#000;--pos3-1:0%;--pos3-2:50%;--pos3-3:100%;}:root{--color1: #00ff0c; --color2-1: #0600ff; --color3-1: #0600ff; --color4-1: #00103f;}</style></head><body style="margin:0;background-color:black;width:100vw;height:100vh;overflow:hidden;"><div id="puzzle-container"><div class="gradient-container gradient-up" data-x="0" data-y="0" data-width="0.42140000000000005" data-height="0.33" style="left: 0px; top: 0px; width: 273.91px; height: 214.5px; --clip-path: polygon(0% 0%, 117% 0%, 104% 112%, 0% 114%); background-size: 273.91px 429px; animation-duration: 89s;"></div><div class="gradient-container gradient-right" data-x="0.42140000000000005" data-y="0" data-width="0.008599999999999962" data-height="0.33" style="left: 273.91px; top: 0px; width: 5.59px; height: 214.5px; --clip-path: polygon(824% 0%, 747% 0%, -449% 87%, 205% 112%); background-size: 11.18px 214.5px; animation-duration: 74s;"></div><div class="gradient-container gradient-down" data-x="0" data-y="0.33" data-width="0.43" data-height="0.4145883084" style="left: 0px; top: 214.5px; width: 279.5px; height: 269.482px; --clip-path: polygon(0% 11%, 89% -10%, 99% 81%, 0% 87%); background-size: 279.5px 538.965px; animation-duration: 44s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.7445883084" data-width="0.43" data-height="0.05124125160000001" style="left: 0px; top: 483.982px; width: 279.5px; height: 33.3068px; --clip-path: polygon(0% -103%, 99% -153%, 110% -32%, 0% 116%); background-size: 559px 33.3068px; animation-duration: 44s;"></div><div class="gradient-container gradient-up" data-x="0" data-y="0.79582956" data-width="0.43" data-height="0.05757443999999999" style="left: 0px; top: 517.289px; width: 279.5px; height: 37.4234px; --clip-path: polygon(0% 14%, 110% -117%, 99% 140%, 0% -34%); background-size: 279.5px 74.8468px; animation-duration: 67s;"></div><div class="gradient-container gradient-left" data-x="0" data-y="0.853404" data-width="0.43" data-height="0.03939599999999997" style="left: 0px; top: 554.713px; width: 279.5px; height: 25.6074px; --clip-path: polygon(0% -196%, 99% 59%, 103% -61%, 0% -56%); background-size: 559px 25.6074px; animation-duration: 60s;"></div><div class="gradient-container gradient-right" data-x="0" data-y="0.8927999999999999" data-width="0.43" data-height="0.1072" style="left: 0px; top: 580.32px; width: 279.5px; height: 69.68px; --clip-path: polygon(0% -57%, 103% -59%, 111% 100%, 0% 100%); background-size: 559px 69.68px; animation-duration: 19s;"></div><div class="gradient-container gradient-up" data-x="0.43" data-y="0" data-width="0.03078" data-height="0.19" style="left: 279.5px; top: 0px; width: 20.007px; height: 123.5px; --clip-path: polygon(181% 0%, 18% 0%, 235% 80%, -140% 132%); background-size: 20.007px 247px; animation-duration: 62s;"></div><div class="gradient-container gradient-down" data-x="0.46078" data-y="0" data-width="0.18509039999999996" data-height="0.19" style="left: 299.507px; top: 0px; width: 120.309px; height: 123.5px; --clip-path: polygon(-14% 0%, 138% 0%, 58% 99%, 22% 80%); background-size: 120.309px 247px; animation-duration: 15s;"></div><div class="gradient-container gradient-right" data-x="0.6458704" data-y="0" data-width="0.040629600000000016" data-height="0.055099999999999996" style="left: 419.816px; top: 0px; width: 26.4092px; height: 35.815px; --clip-path: polygon(172% 0%, -47% 0%, 138% 96%, 163% 43%); background-size: 52.8185px 35.815px; animation-duration: 42s;"></div><div class="gradient-container gradient-down" data-x="0.6458704" data-y="0.055099999999999996" data-width="0.040629600000000016" data-height="0.1349" style="left: 419.816px; top: 35.815px; width: 26.4092px; height: 87.685px; --clip-path: polygon(163% -23%, 138% -2%, -79% 100%, -191% 99%); background-size: 26.4092px 175.37px; animation-duration: 32s;"></div><div class="gradient-container gradient-right" data-x="0.6865" data-y="0" data-width="0.247665" data-height="0.19" style="left: 446.225px; top: 0px; width: 160.982px; height: 123.5px; --clip-path: polygon(-24% 0%, 132% 0%, 70% 98%, -29% 100%); background-size: 321.964px 123.5px; animation-duration: 2s;"></div><div class="gradient-container gradient-left" data-x="0.934165" data-y="0" data-width="0.06583500000000002" data-height="0.037962" style="left: 607.207px; top: 0px; width: 42.7927px; height: 24.6753px; --clip-path: polygon(119% 0%, 100% 0%, 100% 60%, 106% 209%); background-size: 85.5855px 24.6753px; animation-duration: 89s;"></div><div class="gradient-container gradient-down" data-x="0.934165" data-y="0.037962" data-width="0.06583500000000002" data-height="0.102638" style="left: 607.207px; top: 24.6753px; width: 42.7927px; height: 66.7147px; --clip-path: polygon(106% 40%, 100% -15%, 100% 43%, -43% 51%); background-size: 42.7928px 133.429px; animation-duration: 90s;"></div><div class="gradient-container gradient-right" data-x="0.934165" data-y="0.1406" data-width="0.06583500000000002" data-height="0.0494" style="left: 607.207px; top: 91.39px; width: 42.7927px; height: 32.11px; --clip-path: polygon(-43% -102%, 100% -118%, 100% 192%, -113% 91%); background-size: 85.5855px 32.11px; animation-duration: 92s;"></div><div class="gradient-container gradient-down" data-x="0.43" data-y="0.19" data-width="0.0036280500000000003" data-height="0.1215" style="left: 279.5px; top: 123.5px; width: 2.35823px; height: 78.975px; --clip-path: polygon(-1184% 50%, 18% -9%, -1799% 130%, 1151% 152%); background-size: 2.35823px 157.95px; animation-duration: 49s;"></div><div class="gradient-container gradient-left" data-x="0.43362805" data-y="0.19" data-width="0.35917695" data-height="0.1215" style="left: 281.858px; top: 123.5px; width: 233.465px; height: 78.975px; --clip-path: polygon(-1% -9%, 85% 54%, 111% 69%, -19% 130%); background-size: 466.93px 78.975px; animation-duration: 32s;"></div><div class="gradient-container gradient-down" data-x="0.7928050000000001" data-y="0.19" data-width="0.06969105000000002" data-height="0.1215" style="left: 515.323px; top: 123.5px; width: 45.2992px; height: 78.975px; --clip-path: polygon(-79% 54%, 55% 54%, 32% 119%, 59% 69%); background-size: 45.2992px 157.95px; animation-duration: 10s;"></div><div class="gradient-container gradient-down" data-x="0.8624960500000001" data-y="0.19" data-width="0.10900395000000003" data-height="0.1215" style="left: 560.622px; top: 123.5px; width: 70.8526px; height: 78.975px; --clip-path: polygon(-29% 54%, 81% -42%, 138% 160%, -44% 119%); background-size: 70.8526px 157.95px; animation-duration: 33s;"></div><div class="gradient-container gradient-down" data-x="0.9715" data-y="0.19" data-width="0.028499999999999966" data-height="0.0042768" style="left: 631.475px; top: 123.5px; width: 18.525px; height: 2.77992px; --clip-path: polygon(-74% -1205%, 100% 1063%, 100% -1626%, -104% 500%); background-size: 18.525px 5.55984px; animation-duration: 34s;"></div><div class="gradient-container gradient-up" data-x="0.9715" data-y="0.1942768" data-width="0.028499999999999966" data-height="0.10264319999999998" style="left: 631.475px; top: 126.28px; width: 18.525px; height: 66.7181px; --clip-path: polygon(-104% 17%, 100% -72%, 100% 125%, -269% 122%); background-size: 18.525px 133.436px; animation-duration: 25s;"></div><div class="gradient-container gradient-up" data-x="0.9715" data-y="0.29691999999999996" data-width="0.028499999999999966" data-height="0.014580000000000006" style="left: 631.475px; top: 192.998px; width: 18.525px; height: 9.477px; --clip-path: polygon(-269% 154%, 100% 176%, 100% -391%, 145% 601%); background-size: 18.525px 18.954px; animation-duration: 54s;"></div><div class="gradient-container gradient-down" data-x="0.43" data-y="0.3115" data-width="0.57" data-height="0.6885" style="left: 279.5px; top: 202.475px; width: 370.5px; height: 447.525px; --clip-path: polygon(7% 9%, 100% -10%, 100% 100%, 9% 100%); background-size: 370.5px 895.05px; animation-duration: 64s;"></div></div><script>function layoutShards(){var vw=window.innerWidth;var vh=window.innerHeight;document.querySelectorAll(".gradient-container").forEach(function(div){var x=parseFloat(div.dataset.x||0);var y=parseFloat(div.dataset.y||0);var w=parseFloat(div.dataset.width||0);var h=parseFloat(div.dataset.height||0);div.style.left=(x*vw)+"px";div.style.top=(y*vh)+"px";div.style.width=(w*vw)+"px";div.style.height=(h*vh)+"px";if(div.classList.contains("gradient-left")||div.classList.contains("gradient-right")){div.style.backgroundSize=(w*vw*2)+"px "+(h*vh)+"px";}else{div.style.backgroundSize=(w*vw)+"px "+(h*vh*2)+"px";}});}window.addEventListener("resize",layoutShards);window.addEventListener("load",layoutShards);layoutShards();</script></body></html>
▄▖▄▖▖▖▄▖ ▐ ▙▖▚▘▐ ▐ ▙▖▌▌▐ ▄▖▄▖▄▖▖ ▖▄▖▄▖▖▖ ▌▌▙▘▐ ▌▞▖▌▌▌▙▘▙▘ ▛▌▌▌▐ ▛ ▝▌▙▌▌▌▌▌ ▄▖▄▖▄▖▄▖▄▖ ▄▖▄▖▄▖▄▖ ▌▌▚ ▌ ▐ ▐ ▐ ▙▖▚ ▐ ▛▌▄▌▙▖▟▖▟▖ ▐ ▙▖▄▌▐ ▖ ▄▖▖ ▌ ▌▌▌ ▙▖▙▌▙▖
150 of 103