73 lines
17 KiB
HTML
73 lines
17 KiB
HTML
|
|
<!DOCTYPE html>
|
||
|
|
<html lang="en">
|
||
|
|
<head>
|
||
|
|
<meta charset="UTF-8">
|
||
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
|
|
<title>Hexagonal Pulse Fields — 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.5976631143498801,"ps":9,"e":72.40191344035932,"pr":1.1},{"t":0,"r":24,"c":2,"a":"hold","s":0.2036104797918922,"ps":9,"e":100.27888383833513,"pr":1.1},{"t":0,"r":68,"c":30,"a":"extend","s":0.3712338850435347,"ps":9,"e":71.13390975624378,"pr":1.1},{"t":1,"r":20,"c":11,"a":"extend","s":0.5411923928488882,"ps":8,"e":52.872016808205295,"pr":1.05},{"t":1,"r":24,"c":2,"a":"hold","s":0.21621925539667328,"ps":8,"e":100.80863788150852,"pr":1.05},{"t":1,"r":68,"c":30,"a":"extend","s":0.4478837038461302,"ps":9,"e":51.35688557090897,"pr":1.1},{"t":1,"r":20,"c":12,"a":"extend","s":0.35219227601929254,"ps":5,"e":23.167850777815836,"pr":1.2000000000000002},{"t":1,"r":68,"c":29,"a":"hold","s":0.3161345485811131,"ps":5,"e":32.26503771275338,"pr":1.2000000000000002},{"t":1,"r":67,"c":30,"a":"extend","s":0.4810224329067478,"ps":5,"e":23.508898551150924,"pr":1.2000000000000002},{"t":2,"r":20,"c":11,"a":"extend","s":0.5568239985962644,"ps":7,"e":39.393626157882785,"pr":1},{"t":2,"r":24,"c":2,"a":"retracted","s":0.19848157576313338,"ps":7,"e":101.34649048761358,"pr":1},{"t":2,"r":68,"c":30,"a":"extend","s":0.4355735176203829,"ps":8,"e":37.54903159831042,"pr":1.05},{"t":2,"r":20,"c":12,"a":"extend","s":0.48016675639736084,"ps":5,"e":18.381429380296304,"pr":1.2000000000000002},{"t":2,"r":68,"c":29,"a":"hold","s":0.3337252518151123,"ps":4,"e":34.33483972727428,"pr":1.1500000000000001},{"t":2,"r":67,"c":30,"a":"extend","s":0.39882195289965255,"ps":5,"e":18.1646319220437,"pr":1.2000000000000002},{"t":2,"r":68,"c":31,"a":"hold","s":0.23686475926023118,"ps":5,"e":23.155011890185694,"pr":1.2000000000000002},{"t":2,"r":20,"c":13,"a":"hold","s":0.23962648041388981,"ps":5,"e":11.096090748089335,"pr":1.3000000000000003},{"t":3,"r":20,"c":11,"a":"extend","s":0.5559057053376362,"ps":7,"e":29.95361026040871,"pr":1},{"t":3,"r":68,"c":30,"a":"hold","s":0.34328685380357693,"ps":8,"e":39.095326428739035,"pr":1.05},{"t":3,"r":20,"c":12,"a":"extend","s":0.46603451355407705,"ps":4,"e":15.056793842110242,"pr":1.1500000000000001},{"t":3,"r":68,"c":29,"a":"retracted","s":0.3038079605027567,"ps":4,"e":36.165303411296335,"pr":1.1},{"t":3,"r":67,"c":30,"a":"extend","s":0.3889947907664995,"ps":4,"e":14.473613173722987,"pr":1.1500000000000001},{"t":3,"r":68,"c":31,"a":"hold","s":0.196022355389699,"ps":4,"e":24.123190733303286,"pr":1.1500000000000001},{"t":3,"r":20,"c":13,"a":"hold","s":0.29454228061669785,"ps":5,"e":12.702428993022917,"pr":1.3000000000000003},{"t":3,"r":20,"c":10,"a":"hold","s":0.24879400045985087,"ps":5,"e":18.12333464277143,"pr":1.1},{"t":4,"r":20,"c":11,"a":"extend","s":0.5352637029161378,"ps":6,"e":23.335003918616465,"pr":0.95},{"t":4,"r":68,"c":30,"a":"hold","s":0.33564047105826444,"ps":7,"e":40.73045019720515,"pr":1},{"t":4,"r":20,"c":12,"a":"hold","s":0.32475522533184104,"ps":4,"e":17.05483564476497,"pr":1.1500000000000001},{"t":4,"r":67,"c":30,"a":"extend","s":0.44440202644579835,"ps":4,"e":12.20018056970256,"pr":1.1500000000000001},{"t":4,"r":68,"c":31,"a":"retracted","s":0.23071261712832647,"ps":4,"e":25.368891670329898,"pr":1.1},{"t":4,"r":20,"c":13,"a":"retracted","s":0.28926103980354834,"ps":4,"e":14.416517311451303,"pr":1.2500000000000002},{"t":4,"r":20,"c":10,"a":"hold","s":0.3584279843456248,"ps":6,"e":20.09075851753643,"pr":1.2000000000000002},{"t":4,"r":67,"c":29,"a":"hold","s":0.08650436027663284,"ps":5,"e":6.145011956665772,"pr":1.2500000000000002},{"t":5,"r":20,"c":11,"a":"hold","s":0.38145395241999563,"ps":6,"e":25.48663553797643,"pr":0.95},{"t":5,"r":68,"c":30,"a":"retracted","s":0.3299637545447359,"ps":6,"e":42.470160233563035,"pr":0.95},{"t":5,"r":20,"c":12,"a":"hold","s":0.3178926484143143,"ps":4,"e":18.997976832079484,"pr":1.1},{"t":5,"r":67,"c":30,"a":"extend","s":0.4315759858088195,"ps":4,"e":10.536951919321181,"pr":1.1},{"t":5,"r":20,"c":10,"a":"retracted","s":0.3320572933735386,"ps":6,"e":21.84721686452474,"pr":1.2000000000000002},{"t":5,"r":67,"c":29,
|
||
|
|
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>
|