diffusive-pulse-field-cyf0/exploration.html

73 lines
No EOL
25 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Diffusive Pulse Field — 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 = "# Command Reference\n\nEverything in motd happens through commands. Type them in the input bar at the bottom of the terminal.\n\n---\n\n## Shell\n\n### /help\nShow all available commands grouped by category.\n```\n> /help\n```\n\n### /menu\nToggle the sidebar. Shows motd branding, commands, doc links, and footer. Click any command to run it.\n```\n> /menu\n```\n\n### /clear\nClear the terminal output.\n```\n> /clear\n```\n\n### /terminal --width [value]\nSet the terminal width. Accepts px, %, or `reset`.\n```\n> /terminal --width 1000\n Terminal width set to 1000px.\n\n> /terminal --width 80%\n Terminal width set to 80%.\n\n> /terminal --width reset\n Terminal width reset to default (800px).\n```\n\nWidth is stored in localStorage and restored on next visit. On mobile, the terminal is always 100% width.\n\n### /close\nClose the left panel.\n```\n> /close\n```\n\n### /settings cli [position]\nMove the terminal input line. Positions: bottom (default), top, right, left, middle.\n```\n> /settings cli top\n CLI position set to top.\n\n> /settings cli\n CLI position: top\n```\n\nPosition persists across sessions. On mobile, always bottom.\n\n### /config export\nDownload your current config as a JSON file.\n```\n> /config export\n Config downloaded.\n```\n\n### /config import\nLoad config from a JSON file. Opens a file picker.\n```\n> /config import\n [file picker opens]\n Config imported.\n```\n\n### /config reset\nReset all client-side config overrides to server defaults.\n```\n> /config reset\n Config reset to defaults.\n```\n\nThe config system merges localStorage overrides with server defaults. Export/import lets you back up or transfer your settings.\n\n### /read [path]\nRead a documentation file. Renders markdown inline in the terminal.\n```\n> /read about\n> /read api\n> /read commands\n```\n\nWithout arguments, lists all available docs.\n```\n> /read\n```\n\n### /tree -cat\nBrowse categories and their tags. Click a tag to search for posts with it.\n```\n> /tree -cat\n\n coding/\n [rust] [python] [wasm] [js] [frontend] [backend]\n creative/\n [music] [art] [writing] [gamedev]\n meta/\n [motd] [bugs] [ideas] [feedback]\n general/\n [offtopic] [introductions] [showcase]\n```\n\n### /link [target]\nUniversal navigation. Resolves the target and takes you there.\n```\n> /link @alice → opens alice's profile\n> /link rust → searches for [rust] posts\n> /link a3kf9x → shows a specific post\n> /link docs/api → reads the API doc\n```\n\nResolution order: user > tag > post > doc.\n\n---\n\n## Auth\n\n### /register\nCreate an account. Interactive prompts for username and password.\n```\n> /register\n username: alice\n password: ********\n Registered as alice.\n```\n- Username: 3-20 characters, letters/numbers/underscore\n- Password: minimum 8 characters\n\n### /login\nLog in. Session lasts until you close the tab.\n```\n> /login\n username: alice\n password: ********\n Logged in as alice.\n```\n\n### /login-permanently\nLog in with a persistent session. Survives tab closes and browser restarts.\n```\n> /login-permanently\n username: alice\n password: ********\n Logged in as alice (persistent).\n```\n\n### /logout\nEnd your session.\n```\n> /logout\n Logged out.\n```\n\n---\n\n## Profile\n\n### /profile\nView your own profile.\n```\n> /profile\n\n ████ ████\n ████████\n ████████████\n ████████\n ██ ████ ██\n\n @alice (Alice)\n building things\n Posts: 42\n Joined: 2026-03-15\n```\n\n### /profile @user\nView another user's profile.\n```\n> /profile @bob\n```\n\n### /settings\nEdit your display name and bio. Interactive prompts.\n```\n> /settings\n display_name (Alice): Alice W.\n bio (building things): shipping code\n Settings updated.\n```\n\n---\n\n## Posts\n\n### /post [text]\nPublish a post. Max 500 characters. Tags use [brackets].\n```\n> /post just shipped the wasm compiler [rust] [wasm]\n\n @alice · just shipped the wasm compiler [rust] [wasm]\n a3kf9x · just now\n```\n\n### /post [text] /attach [media_id]\nPublish a post with media attached. Upload first with `/upload`, then attach the returned ID.\n```\n> /post screenshot of the new UI /attach x7km2p [showcase]\n```\n\n### /feed\nShow recent posts. Chronological. Filtered by your kill list.\n```\n> /feed\n\n @alice · just shipped the wasm compiler [rust] [wasm]\n a3kf9x · 2m ago\n\n @bob · working on a new side project [coding]\n c9xk4m · 15m ago\n```\n\n### /reply [post_id] [text]\nReply to a post.\n```\n> /reply a3kf9x nice work! what was the hardest part?\n```\n\n### /thread [post_id]\nView a post and its replies.\n```\n> /thread a3kf9x\n```\n\n### /goto [post_id]\nJump to a specific post.\n```\n> /goto a3kf9x\n```\n\n---\n\n## Discovery\n\n### /find [query]\nSearch users and posts.\n```\n> /find rust\n> /find @alice\n> /find [wasm]\n```\n\nBrackets optional — `/find rust` and `/find [rust]` both work.\n\n### /find --archive [query]\nSearch archived posts (30-120 days old).\n```\n> /find --archive old project\n```\n\n### /tree -cat\nBrowse the category tree. See the Shell section above.\n\n### /link [target]\nUniversal navigation. See the Shell section above.\n\n---\n\n## Media\n\n### /upload\nUpload a file. Opens a file picker. Accepted: PNG (max 5MB), MP3 (max 10MB), MP4 (max 25MB).\n```\n> /upload\n [file picker opens]\n Uploaded: x7km2p (png)\n```\n\nPNG images are processed into: original (max 1MB), thumbnail (80px), large (800px), ASCII art.\n\n### /attach [media_id]\nAttach media to a post. Used inline with `/post`:\n```\n> /post check this out /attach x7km2p\n```\n\n### /view [media_id]\nView the original media file.\n```\n> /view x7km2p\n```\n\n### /play [media_id]\nPlay audio or video.\n```\n> /play x7km2p\n```\n\n### /pause\nPause current playback.\n```\n> /pause\n```\n\n### /expand [media|nada|id]\nExpand or collapse media inline in the terminal.\n```\n> /expand media expand all media in view\n> /expand same as /expand media\n> /expand a3kf9x expand media from a specific post\n> /expand nada collapse all inline media, stop playback\n```\n\n### /rmedia [media_id]\nDelete a media file you uploaded. Removes from disk, clears from posts and avatar.\n```\n> /rmedia x7km2p\n Media deleted.\n```\n\n---\n\n## Moderation\n\n### /kill @user\nHide a user from your feed. They won't know. Their posts disappear from your view.\n```\n> /kill @spammer\n Process @spammer terminated.\n```\n\n### /kill [post_id]\nHide a specific post.\n```\n> /kill b7xm2k\n Process b7xm2k terminated.\n```\n\nKills are private. The `/kill` command maps to the filter system internally — the word \"kill\" never touches the database.\n\nWhen enough users filter the same person, their posts get silently suppressed from everyone's feed. No ban. No notification. They just fade out.\n\n---\n\n## Bookmarks\n\n### /bookmark [target]\nBookmark a user, tag, post, or doc. Bookmarks are private — nobody sees them.\n```\n> /bookmark @alice\n Bookmarked @alice.\n\n> /bookmark rust\n Bookmarked [rust].\n\n> /bookmark a3kf9x\n Bookmarked post a3kf9x.\n\n> /bookmark docs/api\n Bookmarked doc api.\n```\n\nThe system auto-detects what you're bookmarking:\n- Starts with `@` — user\n- Matches a known tag — tag\n- Matches a post ID (6-8 alphanumeric) — post\n- Matches a doc path — doc\n\n### /unbookmark [target]\nRemove a bookmark.\n```\n> /unbookmark @alice\n Unbookmarked @alice.\n```\n\n### /bookmarks\nView all your bookmarks, grouped by type.\n```\n> /bookmarks\n\n users/\n [@alice] [@bob]\n\n tags/\n [rust] [wasm] [frontend]\n\n posts/\n [a3kf9x] @alice · \"just shipped the wasm compiler...\"\n [b7xm2k] @carol · \"demo of the new feature...\"\n\n docs/\n [api] [plugins]\n```\n\n### /bookmarks --users\nShow only bookmarked users.\n```\n> /bookmarks --users\n```\n\nSame for `--tags`, `--posts`, `--docs`.\n\n---\n\n## Account\n\n### /terminate-account\nPermanently delete your account. All posts, media, sessions, and data are wiped. Irreversible.\n```\n> /terminate-account\n Type your username to confirm: alice\n Account terminated.\n```\n\n---\n\n## Telegram\n\n### /connect telegram\nLink your Telegram account. Generates a one-time deep link.\n```\n> /connect telegram\n\nConnect Telegram:\n\n https://t.me/motdsocial_bot?start=alice_a8f3k2\n\n Click the link. Tap Start in Telegram. Done.\n```\n\nClick the link, tap Start in Telegram. Done. The link expires after 10 minutes.\n\n### /disconnect telegram\nUnlink your Telegram account.\n```\n> /disconnect telegram\n ✓ Telegram disconnected.\n```\n\nSee `/read telegram` for full details on the Telegram bridge.\n\n---\n\n## Email\n\n### /connect email\nLink your email address. Sends a verification email.\n```\n> /connect email\n\n Enter your email address: you@gmail.com\n\n Verification email sent to you@gmail.com\n Click the link in the email to confirm.\n```\n\n### /disconnect email\nUnlink your email address.\n```\n> /disconnect email\n ✓ Email disconnected.\n```\n\nSee `/read email` for full details on the email bridge.\n\n---\n\n## Right-Click Context Menu\n\nRight-clicking interactive elements (usernames, tags, posts, doc links, media) shows a terminal-styled context menu with relevant actions. Each menu item writes the corresponding command into the input and executes it.\n\nRight-clicking empty space shows the normal browser menu.\n";
const passes = [{"t":0,"r":316,"c":7,"a":"hold","s":0.2516427763743862,"ps":9,"e":100.66314221099509,"pr":1.1},{"t":0,"r":285,"c":69,"a":"extend","s":0.30809761159341226,"ps":9,"e":70.78034662492311,"pr":1.1},{"t":0,"r":393,"c":4,"a":"hold","s":0.20178096064480391,"ps":9,"e":100.26424768515844,"pr":1.1},{"t":0,"r":16,"c":1,"a":"extend","s":0.4907059858629155,"ps":9,"e":71.80295352083232,"pr":1.1},{"t":0,"r":356,"c":4,"a":"hold","s":0.21772767846326588,"ps":9,"e":100.39182142770613,"pr":1.1},{"t":1,"r":316,"c":7,"a":"hold","s":0.25768624512631133,"ps":8,"e":101.52463217200558,"pr":1.05},{"t":1,"r":285,"c":69,"a":"hold","s":0.2999667714434493,"ps":8,"e":71.9800807964707,"pr":1.05},{"t":1,"r":393,"c":4,"a":"hold","s":0.21522924842745397,"ps":8,"e":100.78608167257806,"pr":1.05},{"t":1,"r":16,"c":1,"a":"extend","s":0.5212860047189426,"ps":9,"e":52.236269091008694,"pr":1.1},{"t":1,"r":356,"c":4,"a":"hold","s":0.28030577270063495,"ps":9,"e":101.28426760931121,"pr":1.1},{"t":1,"r":16,"c":2,"a":"extend","s":0.517568147922604,"ps":5,"e":23.91426768461628,"pr":1.2000000000000002},{"t":1,"r":15,"c":1,"a":"hold","s":0.31929934542751004,"ps":5,"e":32.57708912949108,"pr":1.2000000000000002},{"t":2,"r":316,"c":7,"a":"retracted","s":0.2432093621303589,"ps":7,"e":102.42030706904845,"pr":1},{"t":2,"r":285,"c":69,"a":"hold","s":0.30809761159341226,"ps":7,"e":73.394861689218,"pr":1},{"t":2,"r":393,"c":4,"a":"retracted","s":0.20178096064480391,"ps":7,"e":101.3503293577365,"pr":1},{"t":2,"r":16,"c":1,"a":"extend","s":0.5044870581785795,"ps":8,"e":38.55051588950612,"pr":1.05},{"t":2,"r":356,"c":4,"a":"retracted","s":0.27552909219463706,"ps":8,"e":102.28850034686832,"pr":1.05},{"t":2,"r":16,"c":2,"a":"hold","s":0.3271560005345085,"ps":5,"e":25.78151568889235,"pr":1.2000000000000002},{"t":2,"r":15,"c":1,"a":"hold","s":0.26890035206204277,"ps":5,"e":33.97829194598742,"pr":1.2000000000000002},{"t":2,"r":17,"c":1,"a":"extend","s":0.49875503818223815,"ps":5,"e":17.93890894112314,"pr":1.2000000000000002},{"t":2,"r":15,"c":2,"a":"hold","s":0.10501345933195316,"ps":5,"e":10.339079539491173,"pr":1.3000000000000003},{"t":3,"r":285,"c":69,"a":"retracted","s":0.30947893761440404,"ps":6,"e":74.97069319013323,"pr":0.95},{"t":3,"r":16,"c":1,"a":"extend","s":0.4460572650631687,"ps":8,"e":28.64328180700803,"pr":1.05},{"t":3,"r":16,"c":2,"a":"hold","s":0.32052832106611556,"ps":4,"e":27.745742257421274,"pr":1.1500000000000001},{"t":3,"r":15,"c":1,"a":"retracted","s":0.26447716893302936,"ps":4,"e":35.49410929745166,"pr":1.1500000000000001},{"t":3,"r":17,"c":1,"a":"extend","s":0.4638027825675734,"ps":4,"e":14.73453184116461,"pr":1.1500000000000001},{"t":3,"r":15,"c":2,"a":"hold","s":0.21981552917202063,"ps":5,"e":11.347603772867338,"pr":1.3000000000000003},{"t":3,"r":16,"c":0,"a":"hold","s":0.26784163784524767,"ps":5,"e":17.914382769693177,"pr":1.1500000000000001},{"t":3,"r":18,"c":1,"a":"hold","s":0.2798481673765717,"ps":5,"e":9.176889170922493,"pr":1.3000000000000003},{"t":3,"r":17,"c":2,"a":"extend","s":0.39388422213098295,"ps":5,"e":7.062424326270448,"pr":1.3000000000000003},{"t":4,"r":16,"c":1,"a":"extend","s":0.4329242868629204,"ps":7,"e":21.739673271337974,"pr":1},{"t":4,"r":16,"c":2,"a":"extend","s":0.48138229417180134,"ps":4,"e":21.69776042755698,"pr":1.1500000000000001},{"t":4,"r":17,"c":1,"a":"extend","s":0.4699502044237971,"ps":4,"e":12.525893433588491,"pr":1.1},{"t":4,"r":15,"c":2,"a":"retracted","s":0.21689801446136503,"ps":4,"e":12.482787888558258,"pr":1.2500000000000002},{"t":4,"r":16,"c":0,"a":"hold","s":0.34589930964240406,"ps":5,"e":19.931577246832408,"pr":1.1500000000000001},{"t":4,"r":18,"c":1,"a":"hold","s":0.2823043033092913,"ps":4,"e":10.835323597396822,"pr":1.2500000000000002},{"t":4,"r":17,"c":2,"a":"hold","s":0.38396370338470104,"ps":4,"e":9.534133953348057,"pr":1.2500000000000002},{"t":4,"r":18,"c":2,"a":"hold","s":0.1595547840116215,"ps":5,"e":3.5531915547803066,"pr":1.4000000000000004},{"t":5,"r":16,"c":1,"a":"extend","s":0.3999514954886588,"ps":7,"e":16.72249966467307,"pr":1},{"t":5,"r":16,"c":2,"a":"extend","s":0.4664334056255673,"ps":4,"e":17.38045937079306,"pr":1.1},{"t":5,"r":17,"c":1,"a":"extend","s":0.4558868024947286,"ps":4,"e":10.901091497482422,"pr":1.05},{"t":5,"r":16,"c":0,"a":"retracted","s":0.3386032788474654,"ps":4,"e":22.04040347761213,"pr":1.1},{"t":5,"r":18,"c":1,"a":"retracted","s":0.27040912705411263,"ps":4,"e":12.398596613829724,"pr":1.2000000000000002},{"t":5,"r":17,"c":2,"a":"hold","s":0.3755013006263063,"ps":4,"e":11.938144358358507,"pr":1.2000000000000002},{"t":5,"r":18,"c":2,"a":"hold","s":0.15375324790370773,"ps":4,"e":4.183217538009968,"pr":1.3500000000000003},{"t":5,"r":15,"c":1,"a":"hold","s":0.1721610729888464,"ps":5,"e":9.944291414484187,"pr":1.1},{"t":6,"r":16,"c":1,"a":"hold","s":0.38874282833018153,"ps":6,"e":18.932442291314523,"pr":0.95},{"t":6,"r":16,"c":2,"a":"extend","s":0.4519487411928359,"ps":4,"e":14.277234510235022,"pr":1.05},{"t":6,"r":17,"c":1,"a":"extend","s":0.44224425211962637,"ps":4,"e":9.687331860107603,"pr":1},{"t":6,"r":17,"c":2,"a":"retracted","s":0.3666270583639244,"ps":4,"e":14.271160825269902,"pr":1.1500000000000001},{"t":6,"r":18,"c":2,"a":"retracted","s":0.15655539628994009,"ps":4,"e":4.835660708329489,"pr":1.3000000000000003},{"t":6,"r":15,"c":1,"a":"hold","s":0.22341070009105407,"ps":5,"e":10.98157701521262,"pr":1.1},{"t":6,"r":15,"c":2,"a":"hold","s":0.2212623213981269,"ps":5,"e":8.46886687295347,"pr":1.2000000000000002},{"t":7,"r":16,"c":1,"a":"hold","s":0.3112548272610482,"ps":6,"e":20.52248090940291,"pr":0.95},{"t":7,"r":16,"c":2,"a":"extend","s":0.43791388481672816,"ps":4,"e":12.026381912138193,"pr":1},{"t":7,"r":17,"c":1,"a":"extend","s":0.4290099591885184,"ps":4,"e":8.763588073531025,"pr":0.95},{"t":7,"r":15,"c":1,"a":"retracted","s":0.22021974705189923,"ps":4,"e":12.143334991627814,"pr":1.05},{"t":7,"r":15,"c":2,"a":"hold","s":0.26864998303818866,"ps":5,"e":9.868066737258978,"pr":1.2000000000000002},{"t":7,"r":17,"c":0,"a":"hold","s":0.3404598454747835,"ps":5,"e":6.125392418130097,"pr":1.1},{"t":8,"r":16,"c":1,"a":"retracted","s":0.3040692546210221,"ps":5,"e":22.205034946371086,"pr":0.8999999999999999},{"t":8,"r":16,"c":2,"a":"extend","s":0.42431486811787694,"ps":4,"e":10.374630599956847,"pr":0.95},{"t":8,"r":17,"c":1,"a":"extend","s":0.4161717064739806,"ps":4,"e":8.045073207726007,"pr":0.8999999999999999},{"t":8,"r":15,"c":2,"a":"retracted","s":0.26411186195883035,"ps":4,"e":11.38096163292962,"pr":1.1500000000000001},{"t":8,"r":17,"c":0,"a":"hold","s":0.32571980024350583,"ps":4,"e":8.131150820078144,"pr":1.05},{"t":8,"r":18,"c":1,"a":"hold","s":0.3197917321783558,"ps":5,"e":5.5641573175115715,"pr":1.05},{"t":9,"r":16,"c":2,"a":"extend","s":0.41113815649220936,"ps":4,"e":9.144615096326163,"pr":0.8999999999999999},{"t":9,"r":17,"c":1,"a":"extend","s":0.4037176423528128,"ps":4,"e":7.4723700425839565,"pr":0.8499999999999999},{"t":9,"r":17,"c":0,"a":"retracted","s":0.3268514003204018,"ps":4,"e":10.145962022641358,"pr":1},{"t":9,"r":18,"c":1,"a":"hold","s":0.3310302164642083,"ps":4,"e":7.612399049225238,"pr":1},{"t":9,"r":17,"c":2,"a":"hold","s":0.271649378135072,"ps":5,"e":4.871083542677437,"pr":0.9999999999999999},{"t":10,"r":16,"c":2,"a":"extend","s":0.39837063564045017,"ps":4,"e":8.212106127014835,"pr":0.8499999999999999},{"t":10,"r":17,"c":1,"a":"extend","s":0.39163626986522154,"ps":4,"e":7.00382214105401,"pr":0.7999999999999998},{"t":10,"r":18,"c":1,"a":"retracted","s":0.3066474794788753,"ps":4,"e":9.46557888505624,"pr":0.95},{"t":10,"r":17,"c":2,"a":"hold","s":0.27088949429287257,"ps":4,"e":6.438199497020417,"pr":0.9499999999999998},{"t":10,"r":16,"c":1,"a":"hold","s":0.30307512695522926,"ps":5,"e":5.593721771210189,"pr":0.9999999999999999},{"t":10,"r":15,"c":2,"a":"hold","s":0.11662494902143739,"ps":5,"e":4.102120347739855,"pr":0.9999999999999999},{"t":11,"r":16,"c":1,"a":"extend","s":0.3785551369348028,"ps":5,"e":5.510514006682028,"pr":0.9999999999999999},{"t":12,"r":16,"c":2,"a":"extend","s":0.37401273267777363,"ps":4,"e":6.917521731415283,"pr":0.7499999999999998},{"t":12,"r":15,"c":2,"a":"extend","s":0.2619393317694526,"ps":4,"e":4.886297034958625,"pr":0.9499999999999998},{"t":12,"r":18,"c":1,"a":"hold","s":0.1798969798180858,"ps":5,"e":3.5221219275042754,"pr":0.8499999999999998},{"t":13,"r":16,"c":2,"a":"extend","s":0.3623981080366832,"ps":4,"e":6.451694616996123,"pr":0.6999999999999997},{"t":13,"r":16,"c":1,"a":"extend","s":0.27837205948283383,"ps":4,"e":4.9842607232288,"pr":0.9499999999999998},{"t":14,"r":16,"c":2,"a":"extend","s":0.36229770354582275,"ps":4,"e":6.125053371753894,"pr":0.6499999999999997},{"t":14,"r":17,"c":1,"a":"extend","s":0.34912852672756667,"ps":4,"e":5.715387040520304,"pr":0.5999999999999996},{"t":14,"r":16,"c":0,"a":"extend","s":0.48849246908321775,"ps":6,"e":3.9120927598519386,"pr":1.15},{"t":14,"r":16,"c":0,"a":"extend","s":0.42169494435843324,"ps":5,"e":4.0449803116135605,"pr":1.0999999999999999},{"t":15,"r":17,"c":2,"a":"retracted","s":0.16082329284465433,"ps":4,"e":4.914406216187293,"pr":0.7499999999999997},{"t":15,"r":16,"c":0,"a":"extend","s":0.4570097257682992,"ps":6,"e":4.667719396198833,"pr":1.15},{"t":15,"r":18,"c":2,"a":"hold","s":0.11901050624498827,"ps":5,"e":1.809384516460512,"pr":0.8999999999999997},{"t":15,"r":15,"c":1,"a":"hold","s":0.08691352186641767,"ps":5,"e":1.151769252407397,"pr":1.25},{"t":16,"r":16,"c":0,"a":"extend","s":0.4293712744858223,"ps":5,"e":5.146882714459788,"pr":1.0999999999999999},{"t":16,"r":15,"c":1,"a":"extend","s":0.20554676054491364,"ps":5,"e":1.4323003357366941,"pr":1.25},{"t":16,"r":14,"c":0,"a":"extend","s":0.2668626797069358,"ps":4,"e":0.8045119934731162,"pr":1.25},{"t":17,"r":17,"c":0,"a":"extend","s":0.34612332990453665,"ps":4,"e":4.8389428228475015,"pr":0.9499999999999996},{"t":17,"r":17,"c":3,"a":"extend","s":0.4115968747880901,"ps":4,"e":5.302592852907096,"pr":0.7499999999999996},{"t":17,"r":15,"c":1,"a":"hold","s":0.20275087181364917,"ps":4,"e":2.4543073102458877,"pr":1.2},{"t":17,"r":14,"c":0,"a":"extend","s":0.2626456144966249,"ps":4,"e":0.8069869183061402,"pr":1.2},{"t":17,"r":17,"c":4,"a":"extend","s":0.33519040681382023,"ps":4,"e":3.2265301702935862,"pr":0.8999999999999996},{"t":18,"r":16,"c":0,"a":"extend","s":0.3290613237709755,"ps":4,"e":4.836923635413359,"pr":0.9499999999999997},{"t":18,"r":18,"c":0,"a":"extend","s":0.2928260012784686,"ps":4,"e":3.7985519054380594,"pr":0.8499999999999996},{"t":18,"r":15,"c":0,"a":"hold","s":0.20313101712986634,"ps":4,"e":3.4518713161646786,"pr":0.9999999999999998},{"t":18,"r":18,"c":1,"a":"extend","s":0.2503736696173805,"ps":4,"e":2.8382436197171628,"pr":0.5499999999999995},{"t":19,"r":18,"c":1,"a":"extend","s":0.24584884361983084,"ps":4,"e":2.9435240580730664,"pr":0.4999999999999995},{"t":19,"r":17,"c":4,"a":"extend","s":0.3020710413047855,"ps":4,"e":3.7659413802894095,"pr":0.7999999999999995},{"t":19,"r":18,"c":2,"a":"hold","s":0.20881975062323777,"ps":5,"e":2.7693440818091553,"pr":0.7499999999999996},{"t":20,"r":16,"c":2,"a":"hold","s":0.2300277367795406,"ps":5,"e":8.093793446502355,"pr":0.5499999999999995},{"t":20,"r":18,"c":0,"a":"extend","s":0.28182839342174615,"ps":4,"e":3.851645771174349,"pr":0.7499999999999996},{"t":20,"r":17,"c":5,"a":"extend","s":0.5794233885175577,"ps":4,"e":6.2365945276890935,"pr":0.9499999999999995},{"t":21,"r":17,"c":0,"a":"hold","s":0.2510511389379201,"ps":4,"e":7.027369198973895,"pr":0.7999999999999995},{"t":21,"r":16,"c":0,"a":"extend","s":0.370740300356767,"ps":6,"e":5.547748761357467,"pr":1.25},{"t":21,"r":17,"c":4,"a":"hold","s":0.2905611357358165,"ps":4,"e":5.599705160089739,"pr":0.6999999999999994},{"t":22,"r":16,"c":2,"a":"retracted","s":0.25918201700600374,"ps":4,"e":13.189692694029391,"pr":0.4499999999999995},{"t":22,"r":17,"c":1,"a":"extend","s":0.34912852672756667,"ps":4,"e":5.15155785924561,"pr":0.3},{"t":22,"r":16,"c":1,"a":"hold","s":0.27479792589483454,"ps":4,"e":7.0296579917675395,"pr":0.4999999999999995},{"t":22,"r":15,"c":0,"a":"hold","s":0.3292610210565296,"ps":4,"e":7.250247354498116,"pr":0.7499999999999996},{"t":22,"r":18,"c":1,"a":"retracted","s":0.23275912481522784,"ps":4,"e":6.833187675039698,"pr":0.34999999999999953},{"t":23,"r":17,"c":3,"a":"hold","s":0.349647165963936,"ps":4,"e":7.711165967607645,"pr":0.4499999999999994},{"t":23,"r":17,"c":4,"a":"retracted","s":0.2794897956302376,"ps":4,"e":8.91539716224414,"pr":0.5999999999999993},{"t":23,"r":17,"c":5,"a":"extend","s":0.37539380132380323,"ps":4,"e":5.919382188398648,"pr":0.8499999999999994},{"t":24,"r":16,"c":0,"a":"hold","s":0.37705234232709595,"ps":4,"e":7.807110726112191,"pr":1.15},{"t":24,"r":15,"c":0,"a":"retracted","s":0.32073082380627055,"ps":4,"e":11.181940535398445,"pr":0.6499999999999995},{"t":24,"r":17,"c":5,"a":"hold","s":0.3655153375413201,"ps":4,"e":8.243504888729209,"pr":0.7999999999999994},{"t":24,"r":15,"c":1,"a":"retracted","s":0.20435816004727875,"ps":4,"e":5.568730950327464,"pr":0.7999999999999995},{"t":25,"r":17,"c":3,"a":"retracted","s":0.3311433162657248,"ps":4,"e":11.882468373478519,"pr":0.3499999999999994}];
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>