diffusing-patterns-of-quiet.../exploration.html

73 lines
37 KiB
HTML
Raw Normal View History

2026-04-03 13:47:19 +00:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Diffusing Patterns of Quiet Breath — 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 = "# Quick Start\n\n## Join\n\n```\n/register\n```\n\n## Post\n\nJust type. No `/` needed.\n\n```\nhello motd [introductions]\n```\n\nTags go in [brackets]. New tags are created automatically.\n\nUse `/post` to skip the confirm prompt.\n\n## Browse\n\n```\n/feed\n```\n\n## Find\n\n```\n/find rust\n/find @alice\n```\n\n## Reply\n\n```\n/reply abc123 nice work\n/re same but replies to last post you saw\n```\n\n## Profile\n\n```\n/avatar upload a profile pic\n/settings change name, bio\n/profile view yours\n/profile @alice view theirs\n```\n\n## Media\n\n```\n/upload pick a file (PNG, MP3, MP4)\n/post check this out /attach m3kf9x attach to post\n```\n\n## Hide noise\n\n```\n/kill @spammer\n/kill abc123\n```\n\nNobody knows. It just disappears.\n\n## More\n\n```\n/help all commands\n/read about what motd is\n/read commands full reference\n/tree -cat browse tags\n```\n";
const passes = [{"t":0,"r":46,"c":0,"a":"hold","s":0.2679008514125199,"ps":9,"e":100.79320681130017,"pr":1.1},{"t":0,"r":42,"c":0,"a":"extend","s":0.3189884019400614,"ps":9,"e":70.84133505086434,"pr":1.1},{"t":0,"r":53,"c":48,"a":"extend","s":0.30262068013230126,"ps":9,"e":70.74967580874088,"pr":1.1},{"t":0,"r":4,"c":2,"a":"extend","s":0.5494166512005961,"ps":9,"e":72.13173324672333,"pr":1.1},{"t":0,"r":23,"c":3,"a":"extend","s":0.5180282102381671,"ps":9,"e":71.95595797733372,"pr":1.1},{"t":1,"r":46,"c":0,"a":"hold","s":0.25994192020834467,"ps":10,"e":101.37274217296692,"pr":1.2000000000000002},{"t":1,"r":42,"c":0,"a":"hold","s":0.3130289238285809,"ps":8,"e":72.14556644149299,"pr":1.05},{"t":1,"r":53,"c":48,"a":"extend","s":0.335614526836721,"ps":9,"e":50.459214416404244,"pr":1.1},{"t":1,"r":4,"c":2,"a":"extend","s":0.519542958231939,"ps":8,"e":52.561653838805185,"pr":1.05},{"t":1,"r":23,"c":3,"a":"extend","s":0.5836250783497566,"ps":9,"e":52.69247102289224,"pr":1.1},{"t":1,"r":43,"c":0,"a":"hold","s":0.20057085510688702,"ps":5,"e":31.215139005511244,"pr":1.2000000000000002},{"t":1,"r":53,"c":49,"a":"hold","s":0.19378489597213716,"ps":5,"e":31.121568800094618,"pr":1.2000000000000002},{"t":1,"r":23,"c":2,"a":"hold","s":0.29659500110158565,"ps":5,"e":32.46102771338428,"pr":1.2000000000000002},{"t":1,"r":23,"c":4,"a":"hold","s":0.26229137979814865,"ps":5,"e":32.18659874295679,"pr":1.2000000000000002},{"t":2,"r":46,"c":0,"a":"retracted","s":0.2649245677853178,"ps":10,"e":101.99213871524947,"pr":1.2000000000000002},{"t":2,"r":42,"c":0,"a":"hold","s":0.3189884019400614,"ps":7,"e":73.64747365701348,"pr":1},{"t":2,"r":53,"c":48,"a":"hold","s":0.335614526836721,"ps":8,"e":51.94413063109801,"pr":1.05},{"t":2,"r":4,"c":2,"a":"extend","s":0.514178398667609,"ps":7,"e":38.937556719702236,"pr":1},{"t":2,"r":23,"c":3,"a":"extend","s":0.5625323879041937,"ps":8,"e":39.19491108828805,"pr":1.05},{"t":2,"r":43,"c":0,"a":"hold","s":0.19754980569619812,"ps":4,"e":32.19553745108083,"pr":1.1500000000000001},{"t":2,"r":53,"c":49,"a":"hold","s":0.17352325936309893,"ps":5,"e":31.75975487499941,"pr":1.2000000000000002},{"t":2,"r":23,"c":2,"a":"hold","s":0.27077597584018137,"ps":4,"e":34.027235520105734,"pr":1.1500000000000001},{"t":2,"r":23,"c":4,"a":"hold","s":0.2458281787170625,"ps":4,"e":33.55322417269329,"pr":1.1500000000000001},{"t":2,"r":53,"c":47,"a":"extend","s":0.3666775213151161,"ps":5,"e":16.666158444285923,"pr":1.2000000000000002},{"t":2,"r":52,"c":48,"a":"hold","s":0.24485143031862186,"ps":5,"e":22.834189049579365,"pr":1.2000000000000002},{"t":2,"r":4,"c":1,"a":"hold","s":0.25135703343295474,"ps":5,"e":23.78727934123729,"pr":1.1500000000000001},{"t":3,"r":42,"c":0,"a":"retracted","s":0.11832396075023144,"ps":8,"e":73.39406534301533,"pr":1.1},{"t":3,"r":53,"c":48,"a":"hold","s":0.30262068013230126,"ps":8,"e":53.16509607215642,"pr":1.05},{"t":3,"r":4,"c":2,"a":"extend","s":0.5081930479038178,"ps":6,"e":29.47217077205294,"pr":0.95},{"t":3,"r":23,"c":3,"a":"extend","s":0.46630250258833483,"ps":8,"e":29.20773177629631,"pr":1.05},{"t":3,"r":43,"c":0,"a":"retracted","s":0.20057085510688702,"ps":4,"e":33.20010429193593,"pr":1.1},{"t":3,"r":53,"c":49,"a":"retracted","s":0.17352325936309893,"ps":4,"e":32.5479409499042,"pr":1.1500000000000001},{"t":3,"r":23,"c":2,"a":"retracted","s":0.2864982373697226,"ps":4,"e":35.719221419063516,"pr":1.1},{"t":3,"r":23,"c":4,"a":"retracted","s":0.2542948569918258,"ps":4,"e":34.987583028627895,"pr":1.1},{"t":3,"r":53,"c":47,"a":"extend","s":0.38290325650099355,"ps":6,"e":13.180569147405711,"pr":1.3000000000000003},{"t":3,"r":52,"c":48,"a":"hold","s":0.32378823276385266,"ps":6,"e":24.524494911690187,"pr":1.3000000000000003},{"t":3,"r":4,"c":1,"a":"hold","s":0.35198627164877927,"ps":5,"e":25.853169514427524,"pr":1.1500000000000001},{"t":3,"r":5,"c":2,"a":"hold","s":0.12957543920835493,"ps":5,"e":16.974127822110656,"pr":1.1},{"t":3,"r":53,"c":46,"a":"hold","s":0.31411819865135193,"ps":5,"e":8.905584922476212,"pr":1.3000000000000003},{"t":4,"r":53,"c":48,"a":"retracted","s":0.30262068013230126,"ps":7,"e":54.53606151
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>