Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

feat(pocket): rename the agent console to Pocket Console and move it to /pocket

nirholas43ac391f5c49
diff --git a/pages/console.html b/pages/console.html
deleted file mode 100644
index 6439fb947..000000000
--- a/pages/console.html
+++ /dev/null
@@ -1,244 +0,0 @@
-<!doctype html>
-<html lang="en">
- <head>
- <script>/* three.ws theme boot - no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
- <meta charset="utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <title>Agent Console · three.ws</title>
- <meta
- name="description"
- content="A handheld console with a real 3D agent living inside the screen. Steer it with the D-pad, swap the cartridge for any public three.ws agent, pick a shell, and drop the whole console onto your own site with one line of HTML."
- />
- <meta name="theme-color" content="#0a0a0a" />
- <link rel="canonical" href="https://three.ws/console" />
- <link rel="icon" href="/favicon.ico" sizes="any" />
- <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
- <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
- <link rel="manifest" href="/manifest.webmanifest" />
- <link rel="stylesheet" href="/fonts/fonts.css" />
- <link rel="stylesheet" href="/style.css" />
- <link rel="stylesheet" href="/nav.css" />
- <link rel="stylesheet" href="/src/console.css" />
- <link rel="stylesheet" href="/footer.css" />
- <script defer src="/footer-newsletter.js"></script>
-
- <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1" />
- <meta property="og:type" content="website" />
- <meta property="og:site_name" content="three.ws" />
- <meta property="og:locale" content="en_US" />
- <meta property="og:title" content="Agent Console · three.ws" />
- <meta
- property="og:description"
- content="A handheld console with a real 3D agent walking inside the screen. D-pad steers it, cartridges swap the agent, one line of HTML puts it on your site."
- />
- <meta property="og:url" content="https://three.ws/console" />
- <meta
- property="og:image"
- content="https://three.ws/api/page-og?s=labs&amp;t=Agent+Console&amp;d=A+handheld+console+with+a+real+3D+agent+walking+inside+the+screen.+D-pad+steers+it%2C+cartridges+swap+the+agent%2C+one+line+of+HTML+puts+it+on+your+site&amp;p=%2Fconsole"
- />
- <meta property="og:image:width" content="1200" />
- <meta property="og:image:height" content="630" />
- <meta property="og:image:type" content="image/png" />
- <meta property="og:image:alt" content="Agent Console - three.ws" />
- <meta name="twitter:card" content="summary_large_image" />
- <meta name="twitter:site" content="@trythreews" />
- <meta name="twitter:title" content="Agent Console · three.ws" />
- <meta
- name="twitter:description"
- content="A handheld console with a real 3D agent walking inside the screen. D-pad steers it, cartridges swap the agent, one line of HTML puts it on your site."
- />
- <meta
- name="twitter:image"
- content="https://three.ws/api/page-og?s=labs&amp;t=Agent+Console&amp;d=A+handheld+console+with+a+real+3D+agent+walking+inside+the+screen.+D-pad+steers+it%2C+cartridges+swap+the+agent%2C+one+line+of+HTML+puts+it+on+your+site&amp;p=%2Fconsole"
- />
- </head>
- <body>
- <script>/* embed mode (?chrome=off) is the device and nothing else: the site nav, footer, walk companion, tour and language pill all belong to three.ws, not to the page hosting this iframe. Decided here, before any of them load. */(function(){try{if(new URLSearchParams(location.search).get('chrome')==='off'){document.body.dataset.chrome='off';document.body.setAttribute('data-no-lang-switcher','');}}catch(e){}})();</script>
- <header><div id="nav-container"></div></header>
-
- <main class="cn-shell">
- <div class="cn-top">
- <section class="cn-hero">
- <p class="cn-kicker"><span class="cn-dot" aria-hidden="true"></span> Live 3D · not a mockup</p>
- <h1 class="cn-title">Your agent, <em>in a handheld</em></h1>
- <p class="cn-sub">
- Everyone is drawing portfolios inside pretend consoles. This one boots. There is a
- real 3D agent walking around inside the screen, the D-pad actually steers it, the
- cartridges are live agents anyone on three.ws built, and one line of HTML drops the
- whole thing onto your own site.
- </p>
- <div class="cn-ctas">
- <a class="cn-btn cn-btn-primary" href="/create">Build your own agent</a>
- <button type="button" class="cn-btn" id="cn-share">Copy share link</button>
- <button type="button" class="cn-btn" id="cn-post">Post on X</button>
- </div>
- </section>
-
- <section class="cn-stage" aria-label="Agent console">
- <div class="cn-device" id="cn-device" data-shell="graphite" data-power="on">
- <div class="cn-shoulders">
- <button type="button" class="cn-shoulder" id="cn-l" aria-label="Previous agent">L</button>
- <button type="button" class="cn-shoulder" id="cn-r" aria-label="Next agent">R</button>
- </div>
-
- <div class="cn-brandbar">
- <span class="cn-brand-name">three.ws</span>
- <span id="cn-model-line">pocket agent</span>
- </div>
-
- <div class="cn-bezel">
- <span class="cn-power-led" aria-hidden="true"></span>
- <span class="cn-power-label" aria-hidden="true">power</span>
-
- <div class="cn-screen">
- <div class="cn-screen-view">
- <div class="cn-cart" id="cn-cart-play" data-cart="play"></div>
-
- <section class="cn-panel" id="cn-cart-stats" data-cart="stats" aria-label="Agent stats">
- <div class="cn-panel-head">
- <span>Stats</span><span id="cn-stats-id">--</span>
- </div>
- <div class="cn-panel-body">
- <dl id="cn-stats-list"></dl>
- <p class="cn-panel-note" id="cn-stats-note"></p>
- </div>
- </section>
-
- <section class="cn-panel" id="cn-cart-select" data-cart="select" aria-label="Select an agent">
- <div class="cn-panel-head">
- <span>Select agent</span><span id="cn-select-count">--</span>
- </div>
- <div class="cn-panel-body">
- <div id="cn-roster" role="listbox" aria-label="Public agents"></div>
- </div>
- </section>
- </div>
-
- <div class="cn-boot" id="cn-boot">
- <span id="cn-boot-text">Booting agent</span>
- <span class="cn-boot-bar" aria-hidden="true"><span class="cn-boot-fill"></span></span>
- <button type="button" class="cn-boot-retry" id="cn-boot-retry" hidden>Retry</button>
- </div>
-
- <div class="cn-glass" aria-hidden="true"></div>
-
- <div class="cn-hud" aria-hidden="true">
- <span class="cn-hud-name" id="cn-hud-name">loading</span>
- <span class="cn-hud-cart" id="cn-hud-cart">play</span>
- </div>
- </div>
- </div>
-
- <div class="cn-deck">
- <div class="cn-dpad" role="group" aria-label="Direction pad">
- <span class="cn-dpad-plate" aria-hidden="true"></span>
- <span class="cn-dpad-hub" aria-hidden="true"></span>
- <button type="button" class="cn-dir" data-dir="up" aria-label="Walk forward">&#9650;</button>
- <button type="button" class="cn-dir" data-dir="left" aria-label="Walk left">&#9664;</button>
- <button type="button" class="cn-dir" data-dir="right" aria-label="Walk right">&#9654;</button>
- <button type="button" class="cn-dir" data-dir="down" aria-label="Walk back">&#9660;</button>
- </div>
-
- <div></div>
-
- <div class="cn-face">
- <button type="button" class="cn-face-btn" data-btn="b" aria-label="B button: jump">B<small>jump</small></button>
- <button type="button" class="cn-face-btn" data-btn="a" aria-label="A button: wave">A<small>wave</small></button>
- </div>
- </div>
-
- <div class="cn-menu">
- <button type="button" class="cn-menu-btn" data-btn="select" aria-label="Select: change scene">select</button>
- <button type="button" class="cn-menu-btn" data-btn="start" aria-label="Start: change cartridge">start</button>
- </div>
-
- <div class="cn-speaker" aria-hidden="true">
- <span></span><span></span><span></span><span></span><span></span><span></span>
- </div>
-
- <span class="cn-gamepad-pill" id="cn-gamepad">controller live</span>
- </div>
- </section>
-
- <div class="cn-tools">
- <div class="cn-tool-group" role="group" aria-label="Shell colour">
- <span class="cn-tool-label">Shell</span>
- <button type="button" class="cn-tab" data-shell="graphite" aria-pressed="true">
- <span class="cn-swatch" style="background: #34363c" aria-hidden="true"></span>Graphite
- </button>
- <button type="button" class="cn-tab" data-shell="bone" aria-pressed="false">
- <span class="cn-swatch" style="background: #e0dcd2" aria-hidden="true"></span>Bone
- </button>
- <button type="button" class="cn-tab" data-shell="clear" aria-pressed="false">
- <span class="cn-swatch" style="background: #98a0b8" aria-hidden="true"></span>Clear
- </button>
- <button type="button" class="cn-tab" data-shell="indigo" aria-pressed="false">
- <span class="cn-swatch" style="background: #3b3568" aria-hidden="true"></span>Indigo
- </button>
- </div>
-
- <div class="cn-tool-group" role="group" aria-label="Cartridge">
- <span class="cn-tool-label">Cartridge</span>
- <button type="button" class="cn-tab" data-cart="play" aria-pressed="true">Play</button>
- <button type="button" class="cn-tab" data-cart="stats" aria-pressed="false">Stats</button>
- <button type="button" class="cn-tab" data-cart="select" aria-pressed="false">Select</button>
- </div>
-
- <div class="cn-tool-group" role="group" aria-label="Scene">
- <span class="cn-tool-label">Scene</span>
- <button type="button" class="cn-tab" data-env="night" aria-pressed="true">Night</button>
- <button type="button" class="cn-tab" data-env="studio" aria-pressed="false">Studio</button>
- <button type="button" class="cn-tab" data-env="sunset" aria-pressed="false">Sunset</button>
- <button type="button" class="cn-tab" data-env="grid" aria-pressed="false">Grid</button>
- </div>
- </div>
-
- </div>
-
- <section class="cn-rail" aria-labelledby="cn-rail-title">
- <div class="cn-rail-head">
- <h2 class="cn-rail-title" id="cn-rail-title">Cartridges</h2>
- <p class="cn-rail-hint">Every agent here is real and public. Slot one in, or press L / R on the console.</p>
- </div>
- <div class="cn-carts" id="cn-carts" aria-busy="true"></div>
- </section>
-
- <div class="cn-panels">
- <section class="cn-card">
- <h2>Put this console on your site</h2>
- <p>
- One iframe. It carries the agent you have loaded right now, boots its 3D body, and
- runs on any origin. No SDK, no build step, no API key.
- </p>
- <code class="cn-code" id="cn-embed-code"></code>
- <button type="button" class="cn-btn" id="cn-copy-embed">Copy embed code</button>
- </section>
-
- <section class="cn-card">
- <h2>Controls</h2>
- <p>
- Keyboard, touch and a real gamepad all drive the same console. Plug a controller in
- and the D-pad on screen lights up with it.
- </p>
- <div class="cn-keys">
- <div><span>Walk</span> <kbd>W A S D</kbd></div>
- <div><span>Run</span> <kbd>Shift</kbd></div>
- <div><span>Wave</span> <kbd>K</kbd></div>
- <div><span>Jump</span> <kbd>J</kbd></div>
- <div><span>Change cartridge</span> <kbd>Enter</kbd></div>
- <div><span>Change scene</span> <kbd>Space</kbd></div>
- <div><span>Previous / next agent</span> <kbd>Q</kbd> <kbd>E</kbd></div>
- <div><span>Power</span> <kbd>P</kbd></div>
- </div>
- </section>
- </div>
- </main>
-
- <div class="cn-toast" id="cn-toast" role="status"></div>
- <div id="cn-live" class="sr-only" role="status" aria-live="polite"></div>
-
- <script type="module" src="/src/console.js"></script>
- <div id="footer-container"></div>
- <script>/* Site chrome loads only outside embed mode. Same files, same order as every other page; an embedded console just never asks for them. */(function(){if(document.body.dataset.chrome==='off')return;for(const src of ['/nav.js','/footer.js']){const s=document.createElement('script');s.src=src;document.body.appendChild(s);}const b=document.createElement('script');b.src='/brand.js';b.defer=true;document.body.appendChild(b);const i=document.createElement('script');i.type='module';i.src='/i18n.js';document.body.appendChild(i);})();</script>
- </body>
-</html>
diff --git a/pages/pocket.html b/pages/pocket.html
new file mode 100644
index 000000000..1187bcef7
--- /dev/null
+++ b/pages/pocket.html
@@ -0,0 +1,246 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <script>/* three.ws theme boot - no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>Pocket Console · three.ws</title>
+ <meta
+ name="description"
+ content="A handheld console with a real 3D agent living inside the screen. Steer it with the D-pad, swap the cartridge for any public three.ws agent, pick a shell, and drop the whole console onto your own site with one line of HTML."
+ />
+ <meta name="theme-color" content="#0a0a0a" />
+ <link rel="canonical" href="https://three.ws/pocket" />
+ <link rel="icon" href="/favicon.ico" sizes="any" />
+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
+ <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
+ <link rel="manifest" href="/manifest.webmanifest" />
+ <link rel="stylesheet" href="/fonts/fonts.css" />
+ <link rel="stylesheet" href="/style.css" />
+ <link rel="stylesheet" href="/nav.css" />
+ <link rel="stylesheet" href="/src/pocket.css" />
+ <link rel="stylesheet" href="/footer.css" />
+ <script defer src="/footer-newsletter.js"></script>
+
+ <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1" />
+ <meta property="og:type" content="website" />
+ <meta property="og:site_name" content="three.ws" />
+ <meta property="og:locale" content="en_US" />
+ <meta property="og:title" content="Pocket Console · three.ws" />
+ <meta
+ property="og:description"
+ content="A handheld console with a real 3D agent walking inside the screen. D-pad steers it, cartridges swap the agent, one line of HTML puts it on your site."
+ />
+ <meta property="og:url" content="https://three.ws/pocket" />
+ <meta
+ property="og:image"
+ content="https://three.ws/api/page-og?s=labs&amp;t=Pocket+Console&amp;d=A+handheld+console+with+a+live+3D+agent+inside+the+screen.+Steer+it+with+the+D-pad%2C+swap+cartridges+for+any+public+agent%2C+and+embed+the+whole+console+anywhere&amp;p=%2Fpocket"
+ />
+ <meta property="og:image:width" content="1200" />
+ <meta property="og:image:height" content="630" />
+ <meta property="og:image:type" content="image/png" />
+ <meta property="og:image:alt" content="Pocket Console - three.ws" />
+ <meta name="twitter:card" content="summary_large_image" />
+ <meta name="twitter:site" content="@trythreews" />
+ <meta name="twitter:title" content="Pocket Console · three.ws" />
+ <meta
+ name="twitter:description"
+ content="A handheld console with a real 3D agent walking inside the screen. D-pad steers it, cartridges swap the agent, one line of HTML puts it on your site."
+ />
+ <meta
+ name="twitter:image"
+ content="https://three.ws/api/page-og?s=labs&amp;t=Pocket+Console&amp;d=A+handheld+console+with+a+live+3D+agent+inside+the+screen.+Steer+it+with+the+D-pad%2C+swap+cartridges+for+any+public+agent%2C+and+embed+the+whole+console+anywhere&amp;p=%2Fpocket"
+ />
+
+ <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"Pocket Console","description":"A handheld console with a live 3D agent inside the screen. Steer it with the D-pad, swap cartridges for any public agent, and embed the whole console anywhere with one line of HTML.","url":"https://three.ws/pocket","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"},"primaryImageOfPage":"https://three.ws/api/page-og?s=labs&t=Pocket+Console&d=A+handheld+console+with+a+live+3D+agent+inside+the+screen.+Steer+it+with+the+D-pad%2C+swap+cartridges+for+any+public+agent%2C+and+embed+the+whole+console+anywhere&p=%2Fpocket"}]}</script>
+</head>
+ <body>
+ <script>/* embed mode (?chrome=off) is the device and nothing else: the site nav, footer, walk companion, tour and language pill all belong to three.ws, not to the page hosting this iframe. Decided here, before any of them load. */(function(){try{if(new URLSearchParams(location.search).get('chrome')==='off'){document.body.dataset.chrome='off';document.body.setAttribute('data-no-lang-switcher','');}}catch(e){}})();</script>
+ <header><div id="nav-container"></div></header>
+
+ <main class="pk-shell">
+ <div class="pk-top">
+ <section class="pk-hero">
+ <p class="pk-kicker"><span class="pk-dot" aria-hidden="true"></span> Live 3D · not a mockup</p>
+ <h1 class="pk-title">Your agent, <em>in a handheld</em></h1>
+ <p class="pk-sub">
+ Everyone is drawing portfolios inside pretend consoles. This one boots. There is a
+ real 3D agent walking around inside the screen, the D-pad actually steers it, the
+ cartridges are live agents anyone on three.ws built, and one line of HTML drops the
+ whole thing onto your own site.
+ </p>
+ <div class="pk-ctas">
+ <a class="pk-btn pk-btn-primary" href="/create">Build your own agent</a>
+ <button type="button" class="pk-btn" id="pk-share">Copy share link</button>
+ <button type="button" class="pk-btn" id="pk-post">Post on X</button>
+ </div>
+ </section>
+
+ <section class="pk-stage" aria-label="Agent console">
+ <div class="pk-device" id="pk-device" data-shell="graphite" data-power="on">
+ <div class="pk-shoulders">
+ <button type="button" class="pk-shoulder" id="pk-l" aria-label="Previous agent">L</button>
+ <button type="button" class="pk-shoulder" id="pk-r" aria-label="Next agent">R</button>
+ </div>
+
+ <div class="pk-brandbar">
+ <span class="pk-brand-name">three.ws</span>
+ <span id="pk-model-line">pocket agent</span>
+ </div>
+
+ <div class="pk-bezel">
+ <span class="pk-power-led" aria-hidden="true"></span>
+ <span class="pk-power-label" aria-hidden="true">power</span>
+
+ <div class="pk-screen">
+ <div class="pk-screen-view">
+ <div class="pk-cart" id="pk-cart-play" data-cart="play"></div>
+
+ <section class="pk-panel" id="pk-cart-stats" data-cart="stats" aria-label="Agent stats">
+ <div class="pk-panel-head">
+ <span>Stats</span><span id="pk-stats-id">--</span>
+ </div>
+ <div class="pk-panel-body">
+ <dl id="pk-stats-list"></dl>
+ <p class="pk-panel-note" id="pk-stats-note"></p>
+ </div>
+ </section>
+
+ <section class="pk-panel" id="pk-cart-select" data-cart="select" aria-label="Select an agent">
+ <div class="pk-panel-head">
+ <span>Select agent</span><span id="pk-select-count">--</span>
+ </div>
+ <div class="pk-panel-body">
+ <div id="pk-roster" role="listbox" aria-label="Public agents"></div>
+ </div>
+ </section>
+ </div>
+
+ <div class="pk-boot" id="pk-boot">
+ <span id="pk-boot-text">Booting agent</span>
+ <span class="pk-boot-bar" aria-hidden="true"><span class="pk-boot-fill"></span></span>
+ <button type="button" class="pk-boot-retry" id="pk-boot-retry" hidden>Retry</button>
+ </div>
+
+ <div class="pk-glass" aria-hidden="true"></div>
+
+ <div class="pk-hud" aria-hidden="true">
+ <span class="pk-hud-name" id="pk-hud-name">loading</span>
+ <span class="pk-hud-cart" id="pk-hud-cart">play</span>
+ </div>
+ </div>
+ </div>
+
+ <div class="pk-deck">
+ <div class="pk-dpad" role="group" aria-label="Direction pad">
+ <span class="pk-dpad-plate" aria-hidden="true"></span>
+ <span class="pk-dpad-hub" aria-hidden="true"></span>
+ <button type="button" class="pk-dir" data-dir="up" aria-label="Walk forward">&#9650;</button>
+ <button type="button" class="pk-dir" data-dir="left" aria-label="Walk left">&#9664;</button>
+ <button type="button" class="pk-dir" data-dir="right" aria-label="Walk right">&#9654;</button>
+ <button type="button" class="pk-dir" data-dir="down" aria-label="Walk back">&#9660;</button>
+ </div>
+
+ <div></div>
+
+ <div class="pk-face">
+ <button type="button" class="pk-face-btn" data-btn="b" aria-label="B button: jump">B<small>jump</small></button>
+ <button type="button" class="pk-face-btn" data-btn="a" aria-label="A button: wave">A<small>wave</small></button>
+ </div>
+ </div>
+
+ <div class="pk-menu">
+ <button type="button" class="pk-menu-btn" data-btn="select" aria-label="Select: change scene">select</button>
+ <button type="button" class="pk-menu-btn" data-btn="start" aria-label="Start: change cartridge">start</button>
+ </div>
+
+ <div class="pk-speaker" aria-hidden="true">
+ <span></span><span></span><span></span><span></span><span></span><span></span>
+ </div>
+
+ <span class="pk-gamepad-pill" id="pk-gamepad">controller live</span>
+ </div>
+ </section>
+
+ <div class="pk-tools">
+ <div class="pk-tool-group" role="group" aria-label="Shell colour">
+ <span class="pk-tool-label">Shell</span>
+ <button type="button" class="pk-tab" data-shell="graphite" aria-pressed="true">
+ <span class="pk-swatch" style="background: #34363c" aria-hidden="true"></span>Graphite
+ </button>
+ <button type="button" class="pk-tab" data-shell="bone" aria-pressed="false">
+ <span class="pk-swatch" style="background: #e0dcd2" aria-hidden="true"></span>Bone
+ </button>
+ <button type="button" class="pk-tab" data-shell="clear" aria-pressed="false">
+ <span class="pk-swatch" style="background: #98a0b8" aria-hidden="true"></span>Clear
+ </button>
+ <button type="button" class="pk-tab" data-shell="indigo" aria-pressed="false">
+ <span class="pk-swatch" style="background: #3b3568" aria-hidden="true"></span>Indigo
+ </button>
+ </div>
+
+ <div class="pk-tool-group" role="group" aria-label="Cartridge">
+ <span class="pk-tool-label">Cartridge</span>
+ <button type="button" class="pk-tab" data-cart="play" aria-pressed="true">Play</button>
+ <button type="button" class="pk-tab" data-cart="stats" aria-pressed="false">Stats</button>
+ <button type="button" class="pk-tab" data-cart="select" aria-pressed="false">Select</button>
+ </div>
+
+ <div class="pk-tool-group" role="group" aria-label="Scene">
+ <span class="pk-tool-label">Scene</span>
+ <button type="button" class="pk-tab" data-env="night" aria-pressed="true">Night</button>
+ <button type="button" class="pk-tab" data-env="studio" aria-pressed="false">Studio</button>
+ <button type="button" class="pk-tab" data-env="sunset" aria-pressed="false">Sunset</button>
+ <button type="button" class="pk-tab" data-env="grid" aria-pressed="false">Grid</button>
+ </div>
+ </div>
+
+ </div>
+
+ <section class="pk-rail" aria-labelledby="pk-rail-title">
+ <div class="pk-rail-head">
+ <h2 class="pk-rail-title" id="pk-rail-title">Cartridges</h2>
+ <p class="pk-rail-hint">Every agent here is real and public. Slot one in, or press L / R on the console.</p>
+ </div>
+ <div class="pk-carts" id="pk-carts" aria-busy="true"></div>
+ </section>
+
+ <div class="pk-panels">
+ <section class="pk-card">
+ <h2>Put this console on your site</h2>
+ <p>
+ One iframe. It carries the agent you have loaded right now, boots its 3D body, and
+ runs on any origin. No SDK, no build step, no API key.
+ </p>
+ <code class="pk-code" id="pk-embed-code"></code>
+ <button type="button" class="pk-btn" id="pk-copy-embed">Copy embed code</button>
+ </section>
+
+ <section class="pk-card">
+ <h2>Controls</h2>
+ <p>
+ Keyboard, touch and a real gamepad all drive the same console. Plug a controller in
+ and the D-pad on screen lights up with it.
+ </p>
+ <div class="pk-keys">
+ <div><span>Walk</span> <kbd>W A S D</kbd></div>
+ <div><span>Run</span> <kbd>Shift</kbd></div>
+ <div><span>Wave</span> <kbd>K</kbd></div>
+ <div><span>Jump</span> <kbd>J</kbd></div>
+ <div><span>Change cartridge</span> <kbd>Enter</kbd></div>
+ <div><span>Change scene</span> <kbd>Space</kbd></div>
+ <div><span>Previous / next agent</span> <kbd>Q</kbd> <kbd>E</kbd></div>
+ <div><span>Power</span> <kbd>P</kbd></div>
+ </div>
+ </section>
+ </div>
+ </main>
+
+ <div class="pk-toast" id="pk-toast" role="status"></div>
+ <div id="pk-live" class="sr-only" role="status" aria-live="polite"></div>
+
+ <script type="module" src="/src/pocket.js"></script>
+ <div id="footer-container"></div>
+ <script>/* Site chrome loads only outside embed mode. Same files, same order as every other page; an embedded console just never asks for them. */(function(){if(document.body.dataset.chrome==='off')return;for(const src of ['/nav.js','/footer.js']){const s=document.createElement('script');s.src=src;document.body.appendChild(s);}const b=document.createElement('script');b.src='/brand.js';b.defer=true;document.body.appendChild(b);const i=document.createElement('script');i.type='module';i.src='/i18n.js';document.body.appendChild(i);})();</script>
+ </body>
+</html>
diff --git a/src/console.css b/src/pocket.css
similarity index 88%
rename from src/console.css
rename to src/pocket.css
index c0ea4ced1..24fafbc12 100644
--- a/src/console.css
+++ b/src/pocket.css
@@ -1,4 +1,4 @@
-/* Agent Console (/console): a real handheld with a live 3D agent in the screen.
+/* Pocket Console (/pocket): a real handheld with a live 3D agent in the screen.
Every page-chrome value comes from public/tokens.css. The device itself is
physical media, not a page surface: its shell colours, plastics and button
@@ -7,11 +7,12 @@
the tilt, the glare and the scanlines are what make a screenshot of this page
read as an object somebody is holding.
- Internal device geometry is expressed in `em` against .cn-device's own
+ Internal device geometry is expressed in `em` against .pk-device's own
font-size, so one clamp() scales the whole handheld from a 320px phone to a
1440px desktop without a media query per part. */
-.cn-shell {
+.pk-shell {
+ width: 100%;
max-width: 1180px;
margin: 0 auto;
padding: var(--space-lg, 26px) var(--space-lg, 26px) var(--space-2xl, 68px);
@@ -34,62 +35,20 @@
its own column so the whole handheld is visible without scrolling, which is
the entire point of the page. */
-.cn-top {
+.pk-top {
display: grid;
gap: var(--space-md, 16px);
}
-@media (min-width: 1040px) {
- .cn-top {
- grid-template-columns: minmax(410px, 460px) 1fr;
- grid-template-areas:
- 'stage hero'
- 'stage tools';
- align-content: center;
- gap: var(--space-lg, 26px) var(--space-2xl, 68px);
- padding-top: var(--space-lg, 26px);
- }
-
- .cn-hero {
- grid-area: hero;
- text-align: left;
- margin: 0;
- align-self: end;
- }
-
- .cn-stage {
- grid-area: stage;
- }
-
- .cn-tools {
- grid-area: tools;
- justify-content: flex-start;
- align-self: start;
- margin: 0;
- }
-
- .cn-ctas {
- justify-content: flex-start;
- }
-
- .cn-sub {
- margin: 0;
- }
-
- .cn-title {
- font-size: var(--text-2xl, 42px);
- }
-}
-
/* ── hero ─────────────────────────────────────────────────────────────── */
-.cn-hero {
+.pk-hero {
text-align: center;
max-width: 46rem;
margin: 0 auto var(--space-md, 16px);
}
-.cn-kicker {
+.pk-kicker {
display: inline-flex;
align-items: center;
gap: var(--space-sm, 10px);
@@ -101,7 +60,7 @@
color: var(--ink-dim, #888);
}
-.cn-dot {
+.pk-dot {
width: 6px;
height: 6px;
border-radius: var(--radius-pill, 999px);
@@ -109,7 +68,7 @@
box-shadow: 0 0 0 3px color-mix(in srgb, var(--success, #4ade80) 22%, transparent);
}
-.cn-title {
+.pk-title {
margin: 0 0 var(--space-md, 16px);
font-family: var(--font-display);
font-size: var(--text-2xl, 42px);
@@ -119,12 +78,12 @@
color: var(--ink-bright, #fff);
}
-.cn-title em {
+.pk-title em {
font-style: normal;
color: var(--ink-dim, #888);
}
-.cn-sub {
+.pk-sub {
margin: 0 auto;
max-width: 40rem;
font-size: var(--text-base, 16px);
@@ -134,7 +93,7 @@
/* ── generic controls ─────────────────────────────────────────────────── */
-.cn-btn {
+.pk-btn {
appearance: none;
display: inline-flex;
align-items: center;
@@ -156,37 +115,37 @@
color 0.18s ease;
}
-.cn-btn:hover {
+.pk-btn:hover {
background: var(--surface-3, rgba(255, 255, 255, 0.08));
border-color: var(--accent, #fff);
color: var(--ink-bright, #fff);
}
-.cn-btn:active {
+.pk-btn:active {
transform: translateY(1px);
}
-.cn-btn:focus-visible,
-.cn-chip:focus-visible,
-.cn-key:focus-visible,
-.cn-tab:focus-visible {
+.pk-btn:focus-visible,
+.pk-chip:focus-visible,
+.pk-key:focus-visible,
+.pk-tab:focus-visible {
outline: 2px solid var(--accent, #fff);
outline-offset: 2px;
}
-.cn-btn-primary {
+.pk-btn-primary {
background: var(--accent, #fff);
border-color: var(--accent, #fff);
color: #0a0a0b;
}
-.cn-btn-primary:hover {
+.pk-btn-primary:hover {
background: var(--ink-bright, #fff);
color: #0a0a0b;
filter: brightness(0.92);
}
-.cn-ctas {
+.pk-ctas {
display: flex;
flex-wrap: wrap;
gap: var(--space-sm, 10px);
@@ -196,14 +155,14 @@
/* ── stage + device ───────────────────────────────────────────────────── */
-.cn-stage {
+.pk-stage {
display: flex;
justify-content: center;
perspective: 1600px;
padding: var(--space-md, 16px) 0;
}
-.cn-device {
+.pk-device {
/* One knob scales the entire handheld: the device is 34em wide, so the
type size is whatever keeps those 34em inside the viewport (less the
page gutter), capped at the size the desktop column is built for. */
@@ -228,7 +187,7 @@
}
/* Shell themes. Physical plastic, not page surfaces, so these are literals. */
-.cn-device[data-shell='graphite'] {
+.pk-device[data-shell='graphite'] {
--sh-body: linear-gradient(168deg, #34363c 0%, #26282d 44%, #1a1c20 100%);
--sh-hi: rgba(255, 255, 255, 0.16);
--sh-lo: rgba(0, 0, 0, 0.55);
@@ -241,7 +200,7 @@
--sh-accent: #d8d8dc;
}
-.cn-device[data-shell='bone'] {
+.pk-device[data-shell='bone'] {
--sh-body: linear-gradient(168deg, #e9e6dd 0%, #dcd8cd 46%, #c3bfb4 100%);
--sh-hi: rgba(255, 255, 255, 0.85);
--sh-lo: rgba(90, 84, 70, 0.35);
@@ -254,7 +213,7 @@
--sh-accent: #6b6558;
}
-.cn-device[data-shell='clear'] {
+.pk-device[data-shell='clear'] {
--sh-body: linear-gradient(168deg, rgba(150, 158, 178, 0.5) 0%, rgba(96, 104, 128, 0.42) 48%, rgba(52, 58, 78, 0.6) 100%);
--sh-hi: rgba(255, 255, 255, 0.5);
--sh-lo: rgba(6, 8, 16, 0.55);
@@ -268,7 +227,7 @@
backdrop-filter: blur(2px);
}
-.cn-device[data-shell='indigo'] {
+.pk-device[data-shell='indigo'] {
--sh-body: linear-gradient(168deg, #3b3568 0%, #2b2650 46%, #1a1733 100%);
--sh-hi: rgba(255, 255, 255, 0.18);
--sh-lo: rgba(0, 0, 0, 0.6);
@@ -282,7 +241,7 @@
}
/* Shoulder buttons sit behind the shell's top edge. */
-.cn-shoulders {
+.pk-shoulders {
position: absolute;
left: 1.6em;
right: 1.6em;
@@ -292,7 +251,7 @@
z-index: 0;
}
-.cn-shoulder {
+.pk-shoulder {
appearance: none;
width: 7.4em;
height: 1.9em;
@@ -311,17 +270,17 @@
filter 0.16s ease;
}
-.cn-shoulder:hover {
+.pk-shoulder:hover {
filter: brightness(1.14);
}
-.cn-shoulder:active,
-.cn-shoulder[data-held='1'] {
+.pk-shoulder:active,
+.pk-shoulder[data-held='1'] {
transform: translateY(0.3em);
filter: brightness(0.9);
}
-.cn-brandbar {
+.pk-brandbar {
display: flex;
align-items: center;
justify-content: space-between;
@@ -334,14 +293,14 @@
color: var(--sh-ink);
}
-.cn-brand-name {
+.pk-brand-name {
color: var(--sh-ink-strong);
font-weight: var(--weight-semibold, 600);
}
/* ── screen ───────────────────────────────────────────────────────────── */
-.cn-bezel {
+.pk-bezel {
position: relative;
border-radius: 1.1em;
padding: 1.25em 2.7em 1.55em;
@@ -351,7 +310,7 @@
0 0.16em 0 var(--sh-hi);
}
-.cn-power-led {
+.pk-power-led {
position: absolute;
left: 1.15em;
top: 50%;
@@ -366,14 +325,14 @@
box-shadow 0.3s ease;
}
-.cn-device[data-power='on'] .cn-power-led {
+.pk-device[data-power='on'] .pk-power-led {
background: #ff5a5f;
box-shadow:
0 0 0.5em rgba(255, 90, 95, 0.9),
0 0 1.4em rgba(255, 90, 95, 0.45);
}
-.cn-power-label {
+.pk-power-label {
position: absolute;
left: 0.55em;
top: 50%;
@@ -386,7 +345,7 @@
pointer-events: none;
}
-.cn-screen {
+.pk-screen {
position: relative;
aspect-ratio: 4 / 3;
border-radius: 0.4em;
@@ -395,7 +354,7 @@
box-shadow: inset 0 0 2.2em rgba(0, 0, 0, 0.9);
}
-.cn-screen-view {
+.pk-screen-view {
position: absolute;
inset: 0;
transform-origin: center;
@@ -404,12 +363,12 @@
opacity 0.22s ease;
}
-.cn-device[data-power='off'] .cn-screen-view {
+.pk-device[data-power='off'] .pk-screen-view {
transform: scaleY(0.004) scaleX(0.85);
opacity: 0;
}
-.cn-screen iframe {
+.pk-screen iframe {
position: absolute;
inset: 0;
width: 100%;
@@ -419,7 +378,7 @@
}
/* Cartridge panels: the non-3D screens (stats, roster). */
-.cn-panel {
+.pk-panel {
position: absolute;
inset: 0;
display: none;
@@ -436,11 +395,11 @@
overflow: hidden;
}
-.cn-panel[data-active='1'] {
+.pk-panel[data-active='1'] {
display: flex;
}
-.cn-panel-head {
+.pk-panel-head {
display: flex;
align-items: baseline;
justify-content: space-between;
@@ -453,14 +412,14 @@
color: rgba(158, 240, 200, 0.62);
}
-.cn-panel-body {
+.pk-panel-body {
flex: 1;
min-height: 0;
overflow: hidden auto;
scrollbar-width: thin;
}
-.cn-stat-row {
+.pk-stat-row {
display: flex;
align-items: baseline;
justify-content: space-between;
@@ -469,7 +428,7 @@
border-bottom: 1px dotted rgba(158, 240, 200, 0.16);
}
-.cn-stat-row dt {
+.pk-stat-row dt {
color: rgba(158, 240, 200, 0.55);
letter-spacing: 0.08em;
text-transform: uppercase;
@@ -477,7 +436,7 @@
margin: 0;
}
-.cn-stat-row dd {
+.pk-stat-row dd {
margin: 0;
color: #d8ffe9;
text-align: right;
@@ -485,14 +444,14 @@
overflow-wrap: anywhere;
}
-.cn-panel-note {
+.pk-panel-note {
color: rgba(158, 240, 200, 0.7);
font-size: 0.86em;
line-height: 1.5;
margin: 0.3em 0 0;
}
-.cn-roster-item {
+.pk-roster-item {
display: flex;
align-items: center;
gap: 0.55em;
@@ -507,34 +466,34 @@
cursor: pointer;
}
-.cn-roster-item[aria-selected='true'] {
+.pk-roster-item[aria-selected='true'] {
background: rgba(158, 240, 200, 0.16);
color: #eafff4;
}
-.cn-roster-item::before {
+.pk-roster-item::before {
content: '\25B8';
opacity: 0;
}
-.cn-roster-item[aria-selected='true']::before {
+.pk-roster-item[aria-selected='true']::before {
opacity: 1;
}
-.cn-roster-name {
+.pk-roster-name {
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
-.cn-roster-meta {
+.pk-roster-meta {
color: rgba(158, 240, 200, 0.5);
font-size: 0.82em;
}
/* Boot / failure overlay lives above whichever cartridge is mounted. */
-.cn-boot {
+.pk-boot {
position: absolute;
inset: 0;
z-index: 4;
@@ -553,11 +512,11 @@
transition: opacity 0.35s ease;
}
-.cn-boot[hidden] {
+.pk-boot[hidden] {
display: none;
}
-.cn-boot-bar {
+.pk-boot-bar {
width: 8.5em;
height: 0.35em;
border: 1px solid rgba(158, 240, 200, 0.5);
@@ -565,15 +524,15 @@
overflow: hidden;
}
-.cn-boot-fill {
+.pk-boot-fill {
display: block;
height: 100%;
width: 18%;
background: #9ef0c8;
- animation: cn-boot-slide 1.1s ease-in-out infinite;
+ animation: pk-boot-slide 1.1s ease-in-out infinite;
}
-@keyframes cn-boot-slide {
+@keyframes pk-boot-slide {
0% {
transform: translateX(-110%);
}
@@ -582,7 +541,7 @@
}
}
-.cn-boot-retry {
+.pk-boot-retry {
margin-top: 0.4em;
padding: 0.4em 0.9em;
border: 1px solid rgba(158, 240, 200, 0.55);
@@ -594,12 +553,12 @@
cursor: pointer;
}
-.cn-boot-retry:hover {
+.pk-boot-retry:hover {
background: rgba(158, 240, 200, 0.16);
}
/* Glass: scanlines, glare, vignette. Purely optical, never interactive. */
-.cn-glass {
+.pk-glass {
position: absolute;
inset: 0;
z-index: 5;
@@ -616,7 +575,7 @@
opacity: 0.75;
}
-.cn-hud {
+.pk-hud {
position: absolute;
left: 0;
right: 0;
@@ -636,20 +595,20 @@
pointer-events: none;
}
-.cn-hud-name {
+.pk-hud-name {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
-.cn-hud-cart {
+.pk-hud-cart {
color: rgba(255, 255, 255, 0.55);
flex: none;
}
/* ── controls deck ────────────────────────────────────────────────────── */
-.cn-deck {
+.pk-deck {
display: grid;
grid-template-columns: auto 1fr auto;
align-items: center;
@@ -657,14 +616,14 @@
margin-top: 1.3em;
}
-.cn-dpad {
+.pk-dpad {
position: relative;
width: 8.8em;
height: 8.8em;
flex: none;
}
-.cn-dpad-plate {
+.pk-dpad-plate {
position: absolute;
inset: 0;
background: var(--sh-btn);
@@ -686,7 +645,7 @@
pointer-events: none;
}
-.cn-dpad-hub {
+.pk-dpad-hub {
position: absolute;
left: 50%;
top: 50%;
@@ -698,7 +657,7 @@
pointer-events: none;
}
-.cn-dir {
+.pk-dir {
position: absolute;
appearance: none;
border: 0;
@@ -718,36 +677,36 @@
background 0.12s ease;
}
-.cn-dir[data-dir='up'] {
+.pk-dir[data-dir='up'] {
left: 32%;
top: 0;
}
-.cn-dir[data-dir='down'] {
+.pk-dir[data-dir='down'] {
left: 32%;
bottom: 0;
}
-.cn-dir[data-dir='left'] {
+.pk-dir[data-dir='left'] {
left: 0;
top: 32%;
}
-.cn-dir[data-dir='right'] {
+.pk-dir[data-dir='right'] {
right: 0;
top: 32%;
}
-.cn-dir:hover {
+.pk-dir:hover {
background: rgba(255, 255, 255, 0.08);
}
-.cn-dir[data-held='1'] {
+.pk-dir[data-held='1'] {
transform: scale(0.92);
background: rgba(0, 0, 0, 0.22);
}
-.cn-face {
+.pk-face {
display: flex;
align-items: center;
gap: 1.1em;
@@ -755,7 +714,7 @@
flex: none;
}
-.cn-face-btn {
+.pk-face-btn {
appearance: none;
width: 3.5em;
height: 3.5em;
@@ -775,17 +734,17 @@
filter 0.14s ease;
}
-.cn-face-btn:hover {
+.pk-face-btn:hover {
filter: brightness(1.14);
}
-.cn-face-btn:active,
-.cn-face-btn[data-held='1'] {
+.pk-face-btn:active,
+.pk-face-btn[data-held='1'] {
transform: translateY(0.16em) scale(0.96);
filter: brightness(0.88);
}
-.cn-face-btn small {
+.pk-face-btn small {
display: block;
margin-top: 0.1em;
font-size: 0.5em;
@@ -793,7 +752,7 @@
opacity: 0.7;
}
-.cn-menu {
+.pk-menu {
display: flex;
justify-content: center;
gap: 1.4em;
@@ -801,7 +760,7 @@
transform: rotate(-18deg);
}
-.cn-menu-btn {
+.pk-menu-btn {
appearance: none;
padding: 0.42em 1.4em;
border: 0;
@@ -818,25 +777,25 @@
filter 0.14s ease;
}
-.cn-menu-btn:hover {
+.pk-menu-btn:hover {
filter: brightness(1.14);
}
-.cn-menu-btn:active,
-.cn-menu-btn[data-held='1'] {
+.pk-menu-btn:active,
+.pk-menu-btn[data-held='1'] {
transform: translateY(0.14em);
filter: brightness(0.88);
}
-.cn-menu-btn:focus-visible,
-.cn-face-btn:focus-visible,
-.cn-dir:focus-visible,
-.cn-shoulder:focus-visible {
+.pk-menu-btn:focus-visible,
+.pk-face-btn:focus-visible,
+.pk-dir:focus-visible,
+.pk-shoulder:focus-visible {
outline: 2px solid var(--sh-ink-strong);
outline-offset: 2px;
}
-.cn-speaker {
+.pk-speaker {
display: flex;
justify-content: flex-end;
gap: 0.42em;
@@ -846,7 +805,7 @@
transform-origin: right center;
}
-.cn-speaker span {
+.pk-speaker span {
display: block;
width: 0.32em;
height: 2.9em;
@@ -855,7 +814,7 @@
box-shadow: 0 0.08em 0 var(--sh-hi);
}
-.cn-gamepad-pill {
+.pk-gamepad-pill {
position: absolute;
right: 1.8em;
bottom: 1.2em;
@@ -872,13 +831,13 @@
text-transform: uppercase;
}
-.cn-gamepad-pill[data-on='1'] {
+.pk-gamepad-pill[data-on='1'] {
display: inline-flex;
}
/* ── side rails: shells, keys, agents ─────────────────────────────────── */
-.cn-tools {
+.pk-tools {
display: flex;
flex-wrap: wrap;
align-items: center;
@@ -887,7 +846,7 @@
margin: 0 0 var(--space-sm, 10px);
}
-.cn-tool-group {
+.pk-tool-group {
display: flex;
align-items: center;
gap: var(--space-2xs, 4px);
@@ -897,7 +856,7 @@
background: var(--surface-1, rgba(255, 255, 255, 0.03));
}
-.cn-tool-label {
+.pk-tool-label {
padding: 0 var(--space-sm, 10px) 0 var(--space-xs, 7px);
font-family: var(--font-mono);
font-size: var(--text-2xs, 11px);
@@ -906,7 +865,7 @@
color: var(--ink-dim, #888);
}
-.cn-tab {
+.pk-tab {
appearance: none;
padding: 0.42em 0.9em;
border: 0;
@@ -921,17 +880,17 @@
color 0.16s ease;
}
-.cn-tab:hover {
+.pk-tab:hover {
color: var(--ink-bright, #fff);
background: var(--surface-2, rgba(255, 255, 255, 0.05));
}
-.cn-tab[aria-pressed='true'] {
+.pk-tab[aria-pressed='true'] {
background: var(--accent, #fff);
color: #0a0a0b;
}
-.cn-swatch {
+.pk-swatch {
width: 1.15em;
height: 1.15em;
border-radius: 50%;
@@ -941,11 +900,11 @@
margin-right: 0.45em;
}
-.cn-rail {
+.pk-rail {
margin-top: var(--space-xl, 42px);
}
-.cn-rail-head {
+.pk-rail-head {
display: flex;
align-items: baseline;
justify-content: space-between;
@@ -953,7 +912,7 @@
margin-bottom: var(--space-sm, 10px);
}
-.cn-rail-title {
+.pk-rail-title {
margin: 0;
font-family: var(--font-display);
font-size: var(--text-lg, 20px);
@@ -961,13 +920,13 @@
color: var(--ink-bright, #fff);
}
-.cn-rail-hint {
+.pk-rail-hint {
margin: 0;
font-size: var(--text-sm, 12px);
color: var(--ink-dim, #888);
}
-.cn-carts {
+.pk-carts {
display: flex;
gap: var(--space-sm, 10px);
overflow-x: auto;
@@ -976,7 +935,7 @@
scrollbar-width: thin;
}
-.cn-chip {
+.pk-chip {
flex: none;
display: flex;
align-items: center;
@@ -996,18 +955,18 @@
transform 0.14s ease;
}
-.cn-chip:hover {
+.pk-chip:hover {
border-color: var(--stroke-strong, rgba(255, 255, 255, 0.14));
background: var(--surface-2, rgba(255, 255, 255, 0.05));
transform: translateY(-2px);
}
-.cn-chip[aria-pressed='true'] {
+.pk-chip[aria-pressed='true'] {
border-color: var(--accent, #fff);
background: var(--surface-3, rgba(255, 255, 255, 0.08));
}
-.cn-chip-thumb {
+.pk-chip-thumb {
width: 2.6rem;
height: 2.6rem;
flex: none;
@@ -1016,11 +975,11 @@
background: var(--surface-2, rgba(255, 255, 255, 0.05));
}
-.cn-chip-text {
+.pk-chip-text {
min-width: 0;
}
-.cn-chip-name {
+.pk-chip-name {
display: block;
font-size: var(--text-md, 13px);
font-weight: var(--weight-medium, 500);
@@ -1030,7 +989,7 @@
text-overflow: ellipsis;
}
-.cn-chip-meta {
+.pk-chip-meta {
display: block;
margin-top: 2px;
font-family: var(--font-mono);
@@ -1041,7 +1000,7 @@
text-overflow: ellipsis;
}
-.cn-chip-skeleton {
+.pk-chip-skeleton {
pointer-events: none;
background: linear-gradient(
100deg,
@@ -1050,11 +1009,11 @@
var(--surface-1, rgba(255, 255, 255, 0.03)) 70%
);
background-size: 220% 100%;
- animation: cn-shimmer 1.4s linear infinite;
+ animation: pk-shimmer 1.4s linear infinite;
height: 3.7rem;
}
-@keyframes cn-shimmer {
+@keyframes pk-shimmer {
from {
background-position: 120% 0;
}
@@ -1063,7 +1022,7 @@
}
}
-.cn-rail-error {
+.pk-rail-error {
display: flex;
flex-wrap: wrap;
align-items: center;
@@ -1078,21 +1037,21 @@
/* ── share + embed ────────────────────────────────────────────────────── */
-.cn-panels {
+.pk-panels {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
gap: var(--space-md, 16px);
margin-top: var(--space-xl, 42px);
}
-.cn-card {
+.pk-card {
padding: var(--space-lg, 26px);
border: 1px solid var(--stroke, rgba(255, 255, 255, 0.08));
border-radius: var(--radius-lg, 14px);
background: var(--surface-glass, rgba(255, 255, 255, 0.03));
}
-.cn-card h2 {
+.pk-card h2 {
margin: 0 0 var(--space-xs, 7px);
font-family: var(--font-display);
font-size: var(--text-lg, 20px);
@@ -1100,14 +1059,14 @@
color: var(--ink-bright, #fff);
}
-.cn-card p {
+.pk-card p {
margin: 0 0 var(--space-md, 16px);
font-size: var(--text-md, 13px);
line-height: var(--leading-normal, 1.618);
color: var(--ink-dim, #888);
}
-.cn-code {
+.pk-code {
display: block;
margin: 0 0 var(--space-md, 16px);
padding: var(--space-sm, 10px) var(--space-md, 16px);
@@ -1122,7 +1081,7 @@
overflow-wrap: anywhere;
}
-.cn-keys {
+.pk-keys {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
gap: var(--space-xs, 7px) var(--space-md, 16px);
@@ -1131,7 +1090,7 @@
color: var(--ink-dim, #888);
}
-.cn-keys div {
+.pk-keys div {
display: flex;
align-items: center;
justify-content: space-between;
@@ -1140,7 +1099,7 @@
border-bottom: 1px solid var(--hairline, rgba(255, 255, 255, 0.055));
}
-.cn-keys kbd {
+.pk-keys kbd {
font-family: var(--font-mono);
font-size: var(--text-2xs, 11px);
padding: 0.24em 0.5em;
@@ -1151,7 +1110,7 @@
white-space: nowrap;
}
-.cn-toast {
+.pk-toast {
position: fixed;
left: 50%;
bottom: 1.5rem;
@@ -1170,7 +1129,7 @@
transform 0.22s ease;
}
-.cn-toast[data-on='1'] {
+.pk-toast[data-on='1'] {
opacity: 1;
transform: translate(-50%, 0);
}
@@ -1183,14 +1142,14 @@ body[data-chrome='off'] {
body[data-chrome='off'] header,
body[data-chrome='off'] #footer-container,
-body[data-chrome='off'] .cn-hero,
-body[data-chrome='off'] .cn-tools,
-body[data-chrome='off'] .cn-rail,
-body[data-chrome='off'] .cn-panels {
+body[data-chrome='off'] .pk-hero,
+body[data-chrome='off'] .pk-tools,
+body[data-chrome='off'] .pk-rail,
+body[data-chrome='off'] .pk-panels {
display: none;
}
-body[data-chrome='off'] .cn-shell {
+body[data-chrome='off'] .pk-shell {
padding: var(--space-sm, 10px);
display: flex;
align-items: center;
@@ -1198,30 +1157,72 @@ body[data-chrome='off'] .cn-shell {
min-height: 100vh;
}
-body[data-chrome='off'] .cn-stage {
+body[data-chrome='off'] .pk-stage {
padding: 0;
}
@media (max-width: 640px) {
- .cn-deck {
+ .pk-deck {
gap: 0.5em;
}
- .cn-title {
+ .pk-title {
font-size: var(--text-xl, 26px);
}
}
@media (prefers-reduced-motion: reduce) {
- .cn-device,
- .cn-screen-view,
- .cn-chip,
- .cn-toast {
+ .pk-device,
+ .pk-screen-view,
+ .pk-chip,
+ .pk-toast {
transition-duration: 0.01ms;
}
- .cn-boot-fill,
- .cn-chip-skeleton {
+ .pk-boot-fill,
+ .pk-chip-skeleton {
animation: none;
}
}
+
+@media (min-width: 1040px) {
+ .pk-top {
+ grid-template-columns: minmax(410px, 460px) 1fr;
+ grid-template-areas:
+ 'stage hero'
+ 'stage tools';
+ align-content: center;
+ gap: var(--space-lg, 26px) var(--space-2xl, 68px);
+ padding-top: var(--space-lg, 26px);
+ }
+
+ .pk-hero {
+ grid-area: hero;
+ text-align: left;
+ margin: 0;
+ align-self: end;
+ }
+
+ .pk-stage {
+ grid-area: stage;
+ }
+
+ .pk-tools {
+ grid-area: tools;
+ justify-content: flex-start;
+ align-self: start;
+ margin: 0;
+ }
+
+ .pk-ctas {
+ justify-content: flex-start;
+ }
+
+ .pk-sub {
+ margin: 0;
+ }
+
+ .pk-title {
+ font-size: var(--text-2xl, 42px);
+ }
+}
diff --git a/src/console.js b/src/pocket.js
similarity index 87%
rename from src/console.js
rename to src/pocket.js
index d6e5f19fe..5608cf006 100644
--- a/src/console.js
+++ b/src/pocket.js
@@ -1,4 +1,4 @@
-// Agent Console (/console): a handheld with a live 3D agent inside the screen.
+// Pocket Console (/pocket): a handheld with a live 3D agent inside the screen.
//
// The screen is a real /walk-embed iframe, so the body walking around in there
// is the same renderer, retargeting and animation library the rest of the
@@ -41,24 +41,24 @@ const canHover =
typeof matchMedia === 'function' && matchMedia('(hover: hover) and (pointer: fine)').matches;
const el = {
- device: document.getElementById('cn-device'),
- screenPlay: document.getElementById('cn-cart-play'),
- boot: document.getElementById('cn-boot'),
- bootText: document.getElementById('cn-boot-text'),
- bootRetry: document.getElementById('cn-boot-retry'),
- hudName: document.getElementById('cn-hud-name'),
- hudCart: document.getElementById('cn-hud-cart'),
- modelLine: document.getElementById('cn-model-line'),
- statsId: document.getElementById('cn-stats-id'),
- statsList: document.getElementById('cn-stats-list'),
- statsNote: document.getElementById('cn-stats-note'),
- roster: document.getElementById('cn-roster'),
- selectCount: document.getElementById('cn-select-count'),
- carts: document.getElementById('cn-carts'),
- embedCode: document.getElementById('cn-embed-code'),
- gamepadPill: document.getElementById('cn-gamepad'),
- toast: document.getElementById('cn-toast'),
- live: document.getElementById('cn-live'),
+ device: document.getElementById('pk-device'),
+ screenPlay: document.getElementById('pk-cart-play'),
+ boot: document.getElementById('pk-boot'),
+ bootText: document.getElementById('pk-boot-text'),
+ bootRetry: document.getElementById('pk-boot-retry'),
+ hudName: document.getElementById('pk-hud-name'),
+ hudCart: document.getElementById('pk-hud-cart'),
+ modelLine: document.getElementById('pk-model-line'),
+ statsId: document.getElementById('pk-stats-id'),
+ statsList: document.getElementById('pk-stats-list'),
+ statsNote: document.getElementById('pk-stats-note'),
+ roster: document.getElementById('pk-roster'),
+ selectCount: document.getElementById('pk-select-count'),
+ carts: document.getElementById('pk-carts'),
+ embedCode: document.getElementById('pk-embed-code'),
+ gamepadPill: document.getElementById('pk-gamepad'),
+ toast: document.getElementById('pk-toast'),
+ live: document.getElementById('pk-live'),
};
const state = {
@@ -218,7 +218,7 @@ async function loadRoster() {
}
}
-// A shared /console?agent=<id> link can name an agent outside the first page of
+// A shared /pocket?agent=<id> link can name an agent outside the first page of
// the public index. Pull that one record directly and put it at the head of the
// roster so the link always boots the agent it promised.
async function loadUnlistedAgent(id) {
@@ -255,7 +255,7 @@ function renderCartSkeletons() {
el.carts.replaceChildren();
for (let i = 0; i < 5; i += 1) {
const chip = document.createElement('div');
- chip.className = 'cn-chip cn-chip-skeleton';
+ chip.className = 'pk-chip pk-chip-skeleton';
el.carts.appendChild(chip);
}
}
@@ -263,12 +263,12 @@ function renderCartSkeletons() {
function renderRosterError(reason) {
el.carts.replaceChildren();
const box = document.createElement('div');
- box.className = 'cn-rail-error';
+ box.className = 'pk-rail-error';
const text = document.createElement('span');
text.textContent = `The cartridge shelf is unreachable (${reason}). The console still runs on its default body.`;
const retry = document.createElement('button');
retry.type = 'button';
- retry.className = 'cn-btn';
+ retry.className = 'pk-btn';
retry.textContent = 'Try again';
retry.addEventListener('click', loadRoster);
box.append(text, retry);
@@ -276,7 +276,7 @@ function renderRosterError(reason) {
el.roster.replaceChildren();
const line = document.createElement('p');
- line.className = 'cn-panel-note';
+ line.className = 'pk-panel-note';
line.textContent = 'NO SIGNAL. The agent index did not answer.';
el.roster.appendChild(line);
el.selectCount.textContent = '0';
@@ -291,24 +291,24 @@ function renderCarts() {
state.agents.forEach((agent, i) => {
const chip = document.createElement('button');
chip.type = 'button';
- chip.className = 'cn-chip';
+ chip.className = 'pk-chip';
chip.setAttribute('aria-pressed', String(i === state.index));
chip.dataset.index = String(i);
const thumb = document.createElement('img');
- thumb.className = 'cn-chip-thumb';
+ thumb.className = 'pk-chip-thumb';
thumb.alt = '';
thumb.loading = 'lazy';
thumb.decoding = 'async';
if (agent.avatar_thumbnail) thumb.src = agent.avatar_thumbnail;
const text = document.createElement('span');
- text.className = 'cn-chip-text';
+ text.className = 'pk-chip-text';
const name = document.createElement('span');
- name.className = 'cn-chip-name';
+ name.className = 'pk-chip-name';
name.textContent = agent.name;
const meta = document.createElement('span');
- meta.className = 'cn-chip-meta';
+ meta.className = 'pk-chip-meta';
meta.textContent = cartMeta(agent);
text.append(name, meta);
@@ -329,14 +329,14 @@ function renderRoster() {
state.agents.forEach((agent, i) => {
const row = document.createElement('button');
row.type = 'button';
- row.className = 'cn-roster-item';
+ row.className = 'pk-roster-item';
row.setAttribute('role', 'option');
row.setAttribute('aria-selected', String(i === state.rosterCursor));
const name = document.createElement('span');
- name.className = 'cn-roster-name';
+ name.className = 'pk-roster-name';
name.textContent = agent.name;
const meta = document.createElement('span');
- meta.className = 'cn-roster-meta';
+ meta.className = 'pk-roster-meta';
meta.textContent = i === state.index ? 'LOADED' : `${Number(agent.chat_count) || 0}`;
row.append(name, meta);
row.addEventListener('click', () => {
@@ -352,12 +352,24 @@ function moveRosterCursor(delta) {
if (!state.agents.length) return;
const next = (state.rosterCursor + delta + state.agents.length) % state.agents.length;
state.rosterCursor = next;
- const rows = el.roster.querySelectorAll('.cn-roster-item');
+ const rows = el.roster.querySelectorAll('.pk-roster-item');
rows.forEach((row, i) => row.setAttribute('aria-selected', String(i === next)));
- rows[next]?.scrollIntoView({ block: 'nearest' });
+ keepRowVisible(rows[next]);
announce(`${state.agents[next].name} highlighted`);
}
+// scrollIntoView() would also scroll the document, so pressing down on the
+// D-pad scrolled the page out from under the player's thumb. Move only the
+// panel's own scroller, by exactly the overshoot.
+function keepRowVisible(row) {
+ const scroller = el.roster.closest('.pk-panel-body');
+ if (!row || !scroller) return;
+ const r = row.getBoundingClientRect();
+ const s = scroller.getBoundingClientRect();
+ if (r.top < s.top) scroller.scrollTop -= s.top - r.top;
+ else if (r.bottom > s.bottom) scroller.scrollTop += r.bottom - s.bottom;
+}
+
// ── agent selection ───────────────────────────────────────────────────────
function selectAgent(index, { boot = false } = {}) {
@@ -368,7 +380,7 @@ function selectAgent(index, { boot = false } = {}) {
state.rosterCursor = i;
const agent = state.agents[i];
- el.carts.querySelectorAll('.cn-chip').forEach((chip) => {
+ el.carts.querySelectorAll('.pk-chip').forEach((chip) => {
chip.setAttribute('aria-pressed', String(Number(chip.dataset.index) === i));
});
renderRoster();
@@ -482,7 +494,7 @@ function renderStats(rec) {
el.statsList.replaceChildren();
for (const [label, value] of rows) {
const row = document.createElement('div');
- row.className = 'cn-stat-row';
+ row.className = 'pk-stat-row';
const dt = document.createElement('dt');
dt.textContent = label;
const dd = document.createElement('dd');
@@ -503,13 +515,13 @@ function renderStats(rec) {
function setCart(cart) {
if (!CARTS.includes(cart)) return;
state.cart = cart;
- el.device.querySelectorAll('.cn-panel').forEach((panel) => {
+ el.device.querySelectorAll('.pk-panel').forEach((panel) => {
panel.dataset.active = panel.dataset.cart === cart ? '1' : '0';
});
el.screenPlay.style.display = cart === 'play' ? '' : 'none';
el.hudCart.textContent = cart;
document.querySelectorAll('[data-cart]').forEach((tab) => {
- if (tab.classList.contains('cn-tab')) {
+ if (tab.classList.contains('pk-tab')) {
tab.setAttribute('aria-pressed', String(tab.dataset.cart === cart));
}
});
@@ -534,7 +546,7 @@ function setShell(shell) {
if (!SHELLS.includes(shell)) return;
state.shell = shell;
el.device.dataset.shell = shell;
- document.querySelectorAll('[data-shell].cn-tab').forEach((tab) => {
+ document.querySelectorAll('[data-shell].pk-tab').forEach((tab) => {
tab.setAttribute('aria-pressed', String(tab.dataset.shell === shell));
});
syncUrl();
@@ -591,7 +603,7 @@ function setDir(dir, down) {
}
function paintDir(dir, down) {
- const btn = el.device.querySelector(`.cn-dir[data-dir="${dir}"]`);
+ const btn = el.device.querySelector(`.pk-dir[data-dir="${dir}"]`);
if (btn) btn.dataset.held = down ? '1' : '0';
}
@@ -644,7 +656,7 @@ function nextEnv() {
}
// Pointer: press and hold anywhere on a control.
-el.device.querySelectorAll('.cn-dir').forEach((btn) => {
+el.device.querySelectorAll('.pk-dir').forEach((btn) => {
const dir = btn.dataset.dir;
btn.addEventListener('pointerdown', (e) => {
btn.setPointerCapture(e.pointerId);
@@ -665,22 +677,22 @@ el.device.querySelectorAll('.cn-dir').forEach((btn) => {
});
});
-el.device.querySelectorAll('.cn-face-btn').forEach((btn) => {
+el.device.querySelectorAll('.pk-face-btn').forEach((btn) => {
btn.addEventListener('click', () => pressFace(btn.dataset.btn));
});
-el.device.querySelectorAll('.cn-menu-btn').forEach((btn) => {
+el.device.querySelectorAll('.pk-menu-btn').forEach((btn) => {
btn.addEventListener('click', () => {
if (btn.dataset.btn === 'start') nextCart();
else nextEnv();
});
});
-document.getElementById('cn-l').addEventListener('click', () => selectAgent(state.index - 1));
-document.getElementById('cn-r').addEventListener('click', () => selectAgent(state.index + 1));
+document.getElementById('pk-l').addEventListener('click', () => selectAgent(state.index - 1));
+document.getElementById('pk-r').addEventListener('click', () => selectAgent(state.index + 1));
// The power LED doubles as the power switch, the way the real thing does.
-el.device.querySelector('.cn-power-led')?.addEventListener('click', () => setPower(!state.power));
+el.device.querySelector('.pk-power-led')?.addEventListener('click', () => setPower(!state.power));
const KEY_DIRS = {
arrowup: 'up',
@@ -714,34 +726,34 @@ window.addEventListener('keydown', (e) => {
return;
}
if (key === 'k') {
- flash('.cn-face-btn[data-btn="a"]');
+ flash('.pk-face-btn[data-btn="a"]');
pressFace('a');
return;
}
if (key === 'j') {
- flash('.cn-face-btn[data-btn="b"]');
+ flash('.pk-face-btn[data-btn="b"]');
pressFace('b');
return;
}
if (key === 'enter') {
e.preventDefault();
- flash('.cn-menu-btn[data-btn="start"]');
+ flash('.pk-menu-btn[data-btn="start"]');
nextCart();
return;
}
if (key === ' ') {
e.preventDefault();
- flash('.cn-menu-btn[data-btn="select"]');
+ flash('.pk-menu-btn[data-btn="select"]');
nextEnv();
return;
}
if (key === 'q') {
- flash('#cn-l');
+ flash('#pk-l');
selectAgent(state.index - 1);
return;
}
if (key === 'e') {
- flash('#cn-r');
+ flash('#pk-r');
selectAgent(state.index + 1);
return;
}
@@ -802,27 +814,27 @@ function pollPads() {
if (pressed && !prev[`b${i}`]) fn();
};
edge(0, () => {
- flash('.cn-face-btn[data-btn="a"]');
+ flash('.pk-face-btn[data-btn="a"]');
pressFace('a');
});
edge(1, () => {
- flash('.cn-face-btn[data-btn="b"]');
+ flash('.pk-face-btn[data-btn="b"]');
pressFace('b');
});
edge(4, () => {
- flash('#cn-l');
+ flash('#pk-l');
selectAgent(state.index - 1);
});
edge(5, () => {
- flash('#cn-r');
+ flash('#pk-r');
selectAgent(state.index + 1);
});
edge(8, () => {
- flash('.cn-menu-btn[data-btn="select"]');
+ flash('.pk-menu-btn[data-btn="select"]');
nextEnv();
});
edge(9, () => {
- flash('.cn-menu-btn[data-btn="start"]');
+ flash('.pk-menu-btn[data-btn="start"]');
nextCart();
});
padPrev.set(pad.index, now);
@@ -865,14 +877,14 @@ function shareUrl() {
if (agent) q.set('agent', agent.id);
q.set('shell', state.shell);
q.set('env', state.env);
- return `${location.origin}/console?${q.toString()}`;
+ return `${location.origin}/pocket?${q.toString()}`;
}
function embedCode() {
const url = new URL(shareUrl());
url.searchParams.set('chrome', 'off');
const agent = currentAgent();
- const title = agent ? `${agent.name} on three.ws` : 'three.ws Agent Console';
+ const title = agent ? `${agent.name} on three.ws` : 'three.ws Pocket Console';
return `<iframe src="${url.toString()}" width="440" height="700" title="${title}" style="border:0;background:transparent" allow="xr-spatial-tracking" loading="lazy"></iframe>`;
}
@@ -924,15 +936,15 @@ function announce(message) {
el.live.textContent = message;
}
-document.getElementById('cn-share')?.addEventListener('click', () => {
+document.getElementById('pk-share')?.addEventListener('click', () => {
copy(shareUrl(), 'Share link copied.');
});
-document.getElementById('cn-copy-embed')?.addEventListener('click', () => {
+document.getElementById('pk-copy-embed')?.addEventListener('click', () => {
copy(embedCode(), 'Embed code copied.');
});
-document.getElementById('cn-post')?.addEventListener('click', () => {
+document.getElementById('pk-post')?.addEventListener('click', () => {
const agent = currentAgent();
const who = agent ? agent.name : 'My agent';
const text = `${who} lives in a handheld now. Real 3D, the D-pad actually works, built on @trythreews`;
@@ -940,13 +952,13 @@ document.getElementById('cn-post')?.addEventListener('click', () => {
window.open(url, '_blank', 'noopener');
});
-document.querySelectorAll('.cn-tab[data-shell]').forEach((tab) => {
+document.querySelectorAll('.pk-tab[data-shell]').forEach((tab) => {
tab.addEventListener('click', () => setShell(tab.dataset.shell));
});
-document.querySelectorAll('.cn-tab[data-cart]').forEach((tab) => {
+document.querySelectorAll('.pk-tab[data-cart]').forEach((tab) => {
tab.addEventListener('click', () => setCart(tab.dataset.cart));
});
-document.querySelectorAll('.cn-tab[data-env]').forEach((tab) => {
+document.querySelectorAll('.pk-tab[data-env]').forEach((tab) => {
tab.addEventListener('click', () => setEnv(tab.dataset.env));
});
diff --git a/vercel.json b/vercel.json
index 98654d217..5932b04fe 100644
--- a/vercel.json
+++ b/vercel.json
@@ -980,13 +980,13 @@
"dest": "/spotlight.html"
},
{
- "src": "/console/?$",
+ "src": "/pocket/?$",
"headers": {
"content-security-policy": "frame-ancestors *; base-uri 'self'; object-src 'none'; script-src 'self' 'unsafe-inline' 'unsafe-eval' blob: https://cdn.jsdelivr.net https://cdnjs.cloudflare.com https://unpkg.com https://esm.sh; worker-src 'self' blob:; report-uri /api/client-errors",
"x-content-type-options": "nosniff",
"referrer-policy": "strict-origin-when-cross-origin"
},
- "dest": "/console.html"
+ "dest": "/pocket.html"
},
{
"src": "/spotlight/([0-9a-fA-F-]{36})/?$",
diff --git a/vite.config.js b/vite.config.js
index 9c3b10936..3ba4a987b 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -568,7 +568,7 @@ const appConfig = {
'materialize-order': resolve(__dirname, 'pages/materialize-order.html'),
'materialize-ops': resolve(__dirname, 'pages/materialize-ops.html'),
'drop-collection': resolve(__dirname, 'pages/drop-collection.html'),
- console: resolve(__dirname, 'pages/console.html'),
+ pocket: resolve(__dirname, 'pages/pocket.html'),
spotlight: resolve(__dirname, 'pages/spotlight.html'),
'spotlight-entry': resolve(__dirname, 'pages/spotlight-entry.html'),
certificate: resolve(__dirname, 'pages/certificate.html'),
@@ -1513,8 +1513,8 @@ const appConfig = {
'/portfolio/': resolve(root, 'pages/portfolio.html'),
'/drops': resolve(root, 'pages/drops.html'),
'/drops/': resolve(root, 'pages/drops.html'),
- '/console': resolve(root, 'pages/console.html'),
- '/console/': resolve(root, 'pages/console.html'),
+ '/pocket': resolve(root, 'pages/pocket.html'),
+ '/pocket/': resolve(root, 'pages/pocket.html'),
'/spotlight': resolve(root, 'pages/spotlight.html'),
'/spotlight/': resolve(root, 'pages/spotlight.html'),
'/cert': resolve(root, 'pages/certificate.html'),