add exploration replay

This commit is contained in:
motd_admin 2026-05-04 09:47:20 +00:00
parent cd1e6006fd
commit 7d982f378c

73
exploration.html Normal file
View file

@ -0,0 +1,73 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>diffuse quiet architectures — 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 = "# Telegram Bridge\n\nConnect your motd account to Telegram. Receive bookmarked content on your phone. Message motd users from Telegram.\n\n---\n\n## Connect Your Account\n\nIn the motd terminal:\n\n```\n> /connect telegram\n\nConnect Telegram:\n\n https://t.me/motdsocial_bot?start=yourname_a8f3k2\n\n Click the link. Tap Start in Telegram. Done.\n```\n\nClick the link. It opens Telegram with the motd bot. Tap Start. Your accounts are linked.\n\nThe link expires after 10 minutes. Type `/connect telegram` again for a fresh one.\n\n## Disconnect\n\n```\n> /disconnect telegram\n\n✓ Telegram disconnected.\n```\n\n---\n\n## Messaging from Telegram\n\n### Send a message to a motd user\n\nIn Telegram, message the bot:\n\n```\n/msg mika hey, saw your project — looks great\n```\n\nThe message appears as a public post in the motd feed with the `[telegram]` tag.\n\nIf you have a connected motd account, it's posted under your motd username. If not, it shows as `telegram:yourname`.\n\n### Rate limits\n\n- Non-motd Telegram users: 5 messages per hour\n- Connected motd users: 30 messages per hour\n- Same 500 character limit as motd\n\n---\n\n## Receiving on Telegram\n\nWhen your Telegram is connected, the bot forwards:\n\n- New posts from users you bookmarked\n- New posts matching tags you bookmarked\n- Replies to your posts\n- Posts that @mention you\n\n**Not forwarded:**\n- The entire feed\n- Posts from killed/filtered users\n- Posts from users with high filter scores\n\n### Replying from Telegram\n\nReply to a forwarded message in Telegram (using Telegram's reply feature) and it creates a threaded reply on motd.\n\n---\n\n## Notification Settings\n\nIn `/settings`, connected users see:\n\n```\nTelegram notifications: on\n Notify on: bookmarked users/tags, mentions/replies\n```\n\nToggle each notification type on or off.\n\n---\n\n## Bot Commands\n\nIn Telegram:\n\n| Command | What it does |\n|---------|-------------|\n| `/start` | Welcome message |\n| `/msg [user] [message]` | Message a motd user |\n| `/feed` | Last 5 posts from your bookmarks |\n| `/help` | Show commands |\n\n---\n\n## Notes\n\n- Only text posts bridge between motd and Telegram. Media is not forwarded.\n- Posts from Telegram follow the normal 30-day lifecycle.\n- The `[telegram]` tag is auto-added to all bridge posts. You can bookmark or kill it.\n- Your kill list applies to Telegram — filtered users won't appear in your Telegram notifications.\n";
const passes = [{"t":0,"r":28,"c":0,"a":"died","s":0,"ps":8,"e":100,"pr":1},{"t":0,"r":23,"c":0,"a":"died","s":0,"ps":8,"e":100,"pr":1},{"t":0,"r":20,"c":11,"a":"extend","s":0.3549756679168984,"ps":9,"e":71.04286374033462,"pr":1.1},{"t":1,"r":20,"c":11,"a":"extend","s":0.3501178588658399,"ps":8,"e":50.850664627882935,"pr":1.05},{"t":1,"r":20,"c":12,"a":"hold","s":0.27300572908902054,"ps":5,"e":31.880987435712722,"pr":1.2000000000000002},{"t":2,"r":20,"c":11,"a":"hold","s":0.3549756679168984,"ps":7,"e":52.640469971218124,"pr":1},{"t":2,"r":20,"c":12,"a":"extend","s":0.4442554699803012,"ps":5,"e":24.27952183688859,"pr":1.2000000000000002},{"t":3,"r":20,"c":11,"a":"hold","s":0.3675712832291099,"ps":7,"e":54.531040237051,"pr":1},{"t":3,"r":20,"c":12,"a":"extend","s":0.4442554699803012,"ps":4,"e":19.0634959177117,"pr":1.1500000000000001},{"t":4,"r":20,"c":11,"a":"retracted","s":0.3675712832291099,"ps":6,"e":56.57161050288388,"pr":0.95},{"t":4,"r":20,"c":12,"a":"hold","s":0.27300572908902054,"ps":4,"e":20.647541750423862,"pr":1.1500000000000001},{"t":5,"r":20,"c":12,"a":"hold","s":0.27300572908902054,"ps":4,"e":22.231587583136026,"pr":1.1},{"t":6,"r":20,"c":12,"a":"retracted","s":0.27300572908902054,"ps":4,"e":23.81563341584819,"pr":1.05}];
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>