73 lines
No EOL
4.5 KiB
HTML
73 lines
No EOL
4.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Fractal Tendrils in Twilight — exploration</title>
|
|
<style>
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
body { background: #0a0a0f; color: #3a3a4a; font-family: ui-monospace, monospace; overflow: hidden; }
|
|
#grid { padding: 20px; font-size: 12px; line-height: 1.4; white-space: pre; }
|
|
.c { display: inline-block; transition: all 0.3s; }
|
|
.c.active { color: #fde68a; text-shadow: 0 0 6px rgba(253,230,138,0.5); }
|
|
.c.strong { color: #34d399; text-shadow: 0 0 10px rgba(52,211,153,0.6); font-weight: bold; }
|
|
.c.dead { color: #1a1a2a; }
|
|
#info { position: fixed; bottom: 10px; left: 20px; color: #3a3a4a; font-size: 11px; }
|
|
#controls { position: fixed; top: 10px; right: 20px; color: #666; font-size: 11px; }
|
|
#controls span { cursor: pointer; margin-left: 12px; color: #fde68a; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="grid"></div>
|
|
<div id="info">neurameba · physarum exploration</div>
|
|
<div id="controls"><span id="play-btn">play</span><span id="reset-btn">reset</span></div>
|
|
<script>
|
|
const text = "# Welcome to motd\n\nYour terminal is your timeline.\n\nmotd is a social platform that looks and feels like a terminal. You interact by typing commands. No buttons, no feeds you can't control, no engagement metrics.\n\n## Getting Started\n\n1. `/register` to create an account\n2. `/post hello world` to say something\n3. `/feed` to see what others are posting\n4. `/find` to discover people and topics\n5. `/tree -cat` to browse categories\n\n## Philosophy\n\n- No likes. No follower counts. No vanity metrics.\n- Posts expire. Active for 30 days, archived for 90, then gone.\n- `/kill` hides noise from your view. Silently.\n- Discovery is through `/find` and `/tree`, not algorithms.\n\nType `/read commands` for the full command reference.\n";
|
|
const passes = [{"t":0,"r":5,"c":0,"a":"died","s":0,"ps":8,"e":100,"pr":1},{"t":0,"r":15,"c":0,"a":"died","s":0,"ps":8,"e":100,"pr":1},{"t":0,"r":17,"c":2,"a":"extend","s":0.30174762479487316,"ps":9,"e":70.74478669885129,"pr":1.1},{"t":1,"r":17,"c":2,"a":"hold","s":0.3047698019569558,"ps":9,"e":71.83294511450693,"pr":1.1},{"t":1,"r":18,"c":2,"a":"hold","s":0.30617371014813755,"ps":5,"e":32.018583980692796,"pr":1.2000000000000002},{"t":2,"r":17,"c":2,"a":"hold","s":0.3047698019569558,"ps":8,"e":73.07110353016257,"pr":1.05},{"t":2,"r":18,"c":2,"a":"hold","s":0.3356610499407372,"ps":5,"e":33.95387238021869,"pr":1.2000000000000002},{"t":3,"r":17,"c":2,"a":"retracted","s":0.30174762479487316,"ps":8,"e":74.28508452852157,"pr":1.05},{"t":3,"r":18,"c":2,"a":"retracted","s":0.3356610499407372,"ps":4,"e":36.03916077974459,"pr":1.1500000000000001}];
|
|
const lines = text.split('\n');
|
|
const gridEl = document.getElementById('grid');
|
|
const charEls = [];
|
|
for (let r = 0; r < lines.length; r++) {
|
|
const row = [];
|
|
for (let c = 0; c < lines[r].length; c++) {
|
|
const s = document.createElement('span');
|
|
s.className = 'c';
|
|
s.textContent = lines[r][c];
|
|
row.push(s);
|
|
gridEl.appendChild(s);
|
|
}
|
|
charEls.push(row);
|
|
gridEl.appendChild(document.createTextNode('\n'));
|
|
}
|
|
let tick = -1, playing = false, iv;
|
|
function apply(t) {
|
|
for (const r of charEls) for (const e of r) e.className = 'c';
|
|
const active = new Map();
|
|
for (const p of passes) {
|
|
if (p.t > t) break;
|
|
const k = p.r+','+p.c;
|
|
if (p.a === 'died' || p.a === 'retracted') active.set(k, 'dead');
|
|
else if (p.ps > 16) active.set(k, 'strong');
|
|
else active.set(k, 'active');
|
|
}
|
|
for (const [k, cls] of active) {
|
|
const [r, c] = k.split(',').map(Number);
|
|
if (charEls[r]?.[c]) charEls[r][c].className = 'c ' + cls;
|
|
}
|
|
document.getElementById('info').textContent = 'tick ' + t + ' · ' + [...active.values()].filter(v=>v!=='dead').length + ' alive';
|
|
}
|
|
function play() {
|
|
if (playing) return;
|
|
playing = true;
|
|
document.getElementById('play-btn').textContent = 'pause';
|
|
const max = passes.length > 0 ? passes[passes.length-1].t : 0;
|
|
iv = setInterval(() => { tick++; if (tick > max) { pause(); return; } apply(tick); }, 900);
|
|
}
|
|
function pause() { playing = false; clearInterval(iv); document.getElementById('play-btn').textContent = 'play'; }
|
|
function reset() { pause(); tick = -1; for (const r of charEls) for (const e of r) e.className = 'c'; document.getElementById('info').textContent = 'neurameba'; }
|
|
document.getElementById('play-btn').addEventListener('click', () => playing ? pause() : play());
|
|
document.getElementById('reset-btn').addEventListener('click', reset);
|
|
setTimeout(play, 1000);
|
|
</script>
|
|
</body>
|
|
</html> |