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.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
Add integration page to app configuration in vite.config.js
qrqk3f31d1507ddb
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex bec634d38..08c1ae206 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -8,6 +8,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Agent Screen** (`/agent-screen`) — Watch your agent work in real time — split view with the agent's live screen on the left and their 3D avatar rendered as a webcam on the right.- **Avatar Engines Atlas** (`/avatar-engines`) — A curated, factual atlas of the open-source and commercial engines that build high-quality and photoreal 3D human avatars — Gaussian-splat heads, single-photo humans, text→avatar generators, and the rigs three.ws already animates. Technique, license, compute, and integration status for each.+- **Integrations** (`/integrations`) — Drop-in 3D agents, chat widgets, walk companions, and live token embeds for any site. One script tag. Powered by three.ws.- **Splat Viewer — Photoreal Gaussian Avatars** (`/splat`) — Render Gaussian-splat and radiance-field avatars in the browser — the photoreal output of engines like GaussianAvatars and HumanGaussian. Load a .ply / .splat / .ksplat by URL or upload; decoding runs entirely client-side.- **3D avatars look brighter and more lifelike everywhere — new studio lighting rig** — Auto-generated avatars used to render dark and flat in the gallery — dark-clothed agents could all but disappear into the black cards. The 3D viewer now lights every avatar with a proper studio three-point rig (key, fill, and a rim/back light that traces a bright edge around the silhouette so no avatar blends into the background), boosted ambient and image-based lighting, and the Khronos PBR-Neutral tone mapper, which keeps colors bright and true instead of crushing them. The preview-card edge vignette was softened so small thumbnails no longer look murky. The same rig now also drives the server-rendered poster images used for share cards and gallery warm-up, so avatars look consistent and vivid the instant they appear. `[improvement]`- **A stale Arena link no longer dead-ends on a 'not found' screen** — Opening a shared tournament link after the competition has ended or rolled off used to leave you stranded on a bare 'Tournament not found' page whose only button was a Retry that could never work. Now that case turns into a way forward: a clear explanation plus a live grid of the tournaments running and starting right now, so there's always something to jump into. Genuine connection hiccups (as opposed to a missing tournament) keep a Retry alongside a 'Back to all tournaments' escape hatch. Every tournament page also gets a Share button that copies its link, sets a proper browser-tab title, and scrolls cleanly to the top as you move between views. (`/arena`) `[fix, improvement]`@@ -36,6 +37,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Fixed: the Animation Gallery footer no longer covers the page** — The /animations page had a layout bug where the site footer was being pulled up and painted on top of the gallery — the hero, search bar, and animation cards ended up hidden behind it. The footer now sits where it belongs, at the bottom of the page, so the full motion library is visible and browsable again. (`/animations`) `[fix]`- **Fixed: the app no longer breaks its own offline cache after a new release** — Every time we shipped an update, some visitors saw a wave of console errors and a broken background cache: the app tries to pre-save its scripts for fast repeat visits, but right after a deploy a few of those files briefly point at the previous release and come back missing — which made the whole caching step abort. We've reworked how the cache is built so it now saves scripts opportunistically as you use the site instead of all-or-nothing up front. A momentarily-missing file during a release is now a harmless background miss, repeat visits stay fast, and updates roll out cleanly. `[fix, infra]`- **Infrastructure fixes: 3D forge reliability, cache resilience, and bounty escrow** — Fixed a URL-generation bug that caused the Hunyuan3D-2.1 HuggingFace Space to always fail with a DNS error (dot in version number wasn't converted to a hyphen in the subdomain). Doubled the NVIDIA NIM and Redis circuit-breaker cooldowns to reduce retry noise during external-service outages. Added documentation for the LABOR_ESCROW_SECRET_BASE58 env var so bounty posting can be enabled in production. `[fix, infra]`+- **Integrations gallery — drop 3D agents into any site** — New /integrations page showcasing six ready-to-use embeds: 3D Avatar Viewer (web component), Talking Chat Agent (like PumpBot), Walk Companion (floating corner mascot), Page Narrator, Token Market Widget, and MCP Server. Each card includes a live preview, category filter, difficulty rating, and a one-click copy code snippet. One script tag is all it takes to bring any of these to any site. (`/integrations`) `[feature]`- **Launchpad is now an actual launchpad — mint a coin right on the page** — Going to /launchpad used to drop you into a page-builder studio instead of letting you launch anything. Now it's a real launchpad, like it should be: the live coin launcher is front and center, so you pick your agent, set the name, ticker, and image, and mint a Pump.fun coin straight from your wallet — creator fees route to you. Live launches from three.ws agents show right below it. The white-label page builder (hosted token page, paid concierge, gated 3D showroom) is still there as an optional add-on, not the main event. Token-launchpad pages also carry your coin details into the launch flow pre-filled and flip from "Launch" to a one-click "Trade" once your coin is live. (`/launchpad`) `[fix, feature]`- **Live oracle activity on marketplace and home — win rates, agents armed, and trades scored surface across the platform** — Platform activity is now visible where users browse. The marketplace now shows a live strip above the agent grid with five oracle stats: agents currently armed, coins scored in the last 24 hours, platform win rate, open trades, and total oracle wins — all pulled live from the oracle engine. Agent cards that have oracle trading history now display a win-rate badge so you can spot proven performers at a glance. The home page platform section gets the same five-number panel so first-time visitors immediately see that the oracle is active. (`/marketplace`) `[improvement, feature]`- **Living Worlds video generator is back online** — The Cosmos text-to-world lane — describe a scene and get a short cinematic video that plays as a living backdrop behind your avatar — had stopped generating: NVIDIA moved the hosted Cosmos model to a new address, so every request came back as an error. We've pointed the lane at the new endpoint and it generates worlds again. (`/cosmos`) `[fix]`diff --git a/data/changelog.json b/data/changelog.jsonindex 7e52d946e..c9a96a295 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -8226,6 +8226,15 @@],"link": "/dashboard"},+ {+ "date": "2026-06-26",+ "title": "Integrations gallery — drop 3D agents into any site",+ "summary": "New /integrations page showcasing six ready-to-use embeds: 3D Avatar Viewer (web component), Talking Chat Agent (like PumpBot), Walk Companion (floating corner mascot), Page Narrator, Token Market Widget, and MCP Server. Each card includes a live preview, category filter, difficulty rating, and a one-click copy code snippet. One script tag is all it takes to bring any of these to any site.",+ "tags": [+ "feature"+ ],+ "link": "/integrations"+ },{"date": "2026-06-25","title": "Avatar embodiment: expressions, lipsync, and expanded emotes",diff --git a/data/pages.json b/data/pages.jsonindex fc65d6932..03e85dbd6 100644--- a/data/pages.json+++ b/data/pages.json@@ -395,6 +395,14 @@"changefreq": "weekly","added": "2026-05-20"},+ {+ "path": "/integrations",+ "title": "Integrations",+ "description": "Drop-in 3D agents, chat widgets, walk companions, and live token embeds for any site. One script tag. Powered by three.ws.",+ "priority": 0.8,+ "changefreq": "weekly",+ "added": "2026-06-26"+ },{"path": "/features","title": "Features",diff --git a/pages/integrations.html b/pages/integrations.htmlnew file mode 100644index 000000000..3882e77a9--- /dev/null+++ b/pages/integrations.html@@ -0,0 +1,1120 @@+<!doctype html>+<html lang="en">+<head>+ <style>[hidden]{display:none!important}</style>+ <script>(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, viewport-fit=cover" />+ <title>Integrations — three.ws</title>+ <meta name="description" content="Drop-in 3D agents, chat widgets, and avatar embeds for any site. One script tag. Powered by three.ws." />+ <meta property="og:type" content="website" />+ <meta property="og:site_name" content="three.ws" />+ <meta property="og:title" content="Integrations — three.ws" />+ <meta property="og:description" content="Drop-in 3D agents, chat widgets, and avatar embeds for any site. One script tag." />+ <meta property="og:url" content="https://three.ws/integrations" />+ <meta property="og:image" content="https://three.ws/api/page-og?s=build&t=Integrations&d=Drop-in+3D+agents%2C+chat+widgets%2C+and+avatar+embeds+for+any+site.+One+script+tag.&p=%2Fintegrations" />+ <meta property="og:image:width" content="1200" />+ <meta property="og:image:height" content="630" />+ <meta name="twitter:card" content="summary_large_image" />+ <meta name="twitter:title" content="Integrations — three.ws" />+ <meta name="twitter:description" content="Drop-in 3D agents, chat widgets, and avatar embeds for any site." />+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=build&t=Integrations&d=Drop-in+3D+agents%2C+chat+widgets%2C+and+avatar+embeds+for+any+site.+One+script+tag.&p=%2Fintegrations" />+ <meta name="twitter:site" content="@trythreews" />+ <link rel="canonical" href="https://three.ws/integrations" />+ <link rel="icon" href="/favicon.ico" sizes="any" />+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />+ <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />+ <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />+ <link rel="apple-touch-icon" href="/apple-touch-icon.png" />+ <link rel="manifest" href="/site.webmanifest" />+ <link rel="stylesheet" href="/fonts/fonts.css" />+ <link rel="stylesheet" href="/nav.css" />+ <link rel="stylesheet" href="/footer.css" />+ <script defer src="/footer-newsletter.js"></script>+ <script src="/embed.js" defer></script>+ <script src="/nav.js" defer></script>++ <style>+ *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }++ :root {+ --bg: #000;+ --surface: #0a0a0a;+ --surface-2: #111;+ --border: #1c1c1c;+ --border-2: #2a2a2a;+ --text: #fafafa;+ --text-2: #a1a1aa;+ --text-3: #52525b;+ --accent: #fff;+ --accent-ink: #000;+ --green: #4ade80;+ --blue: #60a5fa;+ --purple: #a78bfa;+ --amber: #fbbf24;+ --pink: #f472b6;+ --radius: 12px;+ --radius-lg: 16px;+ color-scheme: dark;+ }++ html, body {+ background: var(--bg);+ color: var(--text);+ font-family: 'Inter', system-ui, sans-serif;+ -webkit-font-smoothing: antialiased;+ min-height: 100%;+ }++ /* ── Nav shell ─────────────────────────────────── */+ header { position: sticky; top: 0; z-index: 100; }+ #nav-container { width: 100%; }++ /* ── Page layout ───────────────────────────────── */+ .page { max-width: 1160px; margin: 0 auto; padding: 0 24px; }++ /* ── Hero ──────────────────────────────────────── */+ .hero {+ padding: 80px 0 56px;+ text-align: center;+ }+ .hero-eyebrow {+ display: inline-flex;+ align-items: center;+ gap: 6px;+ font-size: 11px;+ font-weight: 600;+ letter-spacing: 0.1em;+ text-transform: uppercase;+ color: var(--text-2);+ border: 1px solid var(--border-2);+ border-radius: 100px;+ padding: 4px 12px;+ margin-bottom: 20px;+ }+ .hero-eyebrow-dot {+ width: 6px; height: 6px;+ border-radius: 50%;+ background: var(--green);+ flex-shrink: 0;+ }+ .hero h1 {+ font-size: clamp(36px, 6vw, 64px);+ font-weight: 700;+ letter-spacing: -0.03em;+ line-height: 1.05;+ margin-bottom: 18px;+ }+ .hero h1 em {+ font-style: normal;+ background: linear-gradient(135deg, #fff 30%, rgba(255,255,255,0.4));+ -webkit-background-clip: text;+ -webkit-text-fill-color: transparent;+ background-clip: text;+ }+ .hero-sub {+ font-size: 18px;+ color: var(--text-2);+ max-width: 52ch;+ margin: 0 auto 36px;+ line-height: 1.6;+ }+ .hero-cta {+ display: inline-flex;+ align-items: center;+ gap: 12px;+ flex-wrap: wrap;+ justify-content: center;+ }+ .btn-primary {+ display: inline-flex;+ align-items: center;+ gap: 8px;+ background: var(--accent);+ color: var(--accent-ink);+ font-size: 14px;+ font-weight: 600;+ padding: 10px 20px;+ border-radius: 8px;+ text-decoration: none;+ transition: opacity 0.15s;+ }+ .btn-primary:hover { opacity: 0.88; }+ .btn-ghost {+ display: inline-flex;+ align-items: center;+ gap: 8px;+ color: var(--text-2);+ font-size: 14px;+ font-weight: 500;+ padding: 10px 20px;+ border-radius: 8px;+ border: 1px solid var(--border-2);+ text-decoration: none;+ transition: color 0.15s, border-color 0.15s;+ }+ .btn-ghost:hover { color: var(--text); border-color: #444; }++ /* ── Filter bar ────────────────────────────────── */+ .filter-bar {+ display: flex;+ align-items: center;+ gap: 6px;+ padding: 4px;+ border: 1px solid var(--border);+ border-radius: 10px;+ background: var(--surface);+ width: fit-content;+ margin: 0 auto 48px;+ flex-wrap: wrap;+ }+ .filter-chip {+ appearance: none;+ background: none;+ border: none;+ cursor: pointer;+ font: inherit;+ font-size: 13px;+ font-weight: 500;+ color: var(--text-2);+ padding: 6px 14px;+ border-radius: 7px;+ transition: background 0.15s, color 0.15s;+ }+ .filter-chip:hover { color: var(--text); background: rgba(255,255,255,0.06); }+ .filter-chip.active {+ background: var(--accent);+ color: var(--accent-ink);+ }++ /* ── Grid ──────────────────────────────────────── */+ .grid {+ display: grid;+ grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));+ gap: 20px;+ margin-bottom: 80px;+ }++ /* ── Card ──────────────────────────────────────── */+ .card {+ background: var(--surface);+ border: 1px solid var(--border);+ border-radius: var(--radius-lg);+ overflow: hidden;+ display: flex;+ flex-direction: column;+ transition: border-color 0.2s, transform 0.2s;+ }+ .card:hover {+ border-color: var(--border-2);+ transform: translateY(-2px);+ }+ .card[hidden] { display: none; }++ /* Preview area */+ .card-preview {+ position: relative;+ height: 220px;+ overflow: hidden;+ display: flex;+ align-items: center;+ justify-content: center;+ flex-shrink: 0;+ }+ .card-preview-bg {+ position: absolute;+ inset: 0;+ }+ /* Category-specific preview backgrounds */+ .card[data-cat="avatar"] .card-preview-bg {+ background: radial-gradient(ellipse at 50% 60%, rgba(96,165,250,0.12) 0%, transparent 70%);+ }+ .card[data-cat="chat"] .card-preview-bg {+ background: radial-gradient(ellipse at 50% 60%, rgba(167,139,250,0.12) 0%, transparent 70%);+ }+ .card[data-cat="companion"] .card-preview-bg {+ background: radial-gradient(ellipse at 50% 60%, rgba(74,222,128,0.10) 0%, transparent 70%);+ }+ .card[data-cat="narrator"] .card-preview-bg {+ background: radial-gradient(ellipse at 50% 60%, rgba(251,191,36,0.10) 0%, transparent 70%);+ }+ .card[data-cat="crypto"] .card-preview-bg {+ background: radial-gradient(ellipse at 50% 60%, rgba(244,114,182,0.10) 0%, transparent 70%);+ }+ .card[data-cat="mcp"] .card-preview-bg {+ background: radial-gradient(ellipse at 50% 60%, rgba(167,139,250,0.08) 0%, transparent 70%);+ }++ /* Live avatar embed inside card */+ .card-preview threews-avatar {+ position: relative;+ width: 160px;+ height: 200px;+ z-index: 1;+ }++ /* Illustrated preview for non-avatar cards */+ .preview-illustration {+ position: relative;+ z-index: 1;+ display: flex;+ flex-direction: column;+ align-items: center;+ gap: 10px;+ }+ .preview-icon {+ width: 56px;+ height: 56px;+ border-radius: 14px;+ display: flex;+ align-items: center;+ justify-content: center;+ font-size: 26px;+ }+ .preview-mockup {+ background: rgba(255,255,255,0.04);+ border: 1px solid rgba(255,255,255,0.08);+ border-radius: 10px;+ padding: 10px 14px;+ font-size: 12px;+ color: var(--text-2);+ font-family: 'JetBrains Mono', 'SF Mono', monospace;+ line-height: 1.6;+ text-align: left;+ width: 220px;+ }+ .preview-mockup .k { color: #60a5fa; }+ .preview-mockup .s { color: #4ade80; }+ .preview-mockup .c { color: #71717a; }++ /* Chat preview mockup */+ .preview-chat {+ display: flex;+ flex-direction: column;+ gap: 8px;+ width: 240px;+ }+ .preview-chat-bubble {+ background: rgba(255,255,255,0.07);+ border: 1px solid rgba(255,255,255,0.08);+ border-radius: 12px 12px 12px 2px;+ padding: 8px 12px;+ font-size: 12px;+ color: var(--text-2);+ max-width: 200px;+ }+ .preview-chat-bubble.user {+ background: rgba(96,165,250,0.12);+ border-radius: 12px 12px 2px 12px;+ align-self: flex-end;+ color: #93c5fd;+ }++ /* Walk companion mockup */+ .preview-walk {+ position: relative;+ width: 240px;+ height: 140px;+ border: 1px solid rgba(255,255,255,0.06);+ border-radius: 10px;+ background: rgba(255,255,255,0.03);+ overflow: hidden;+ }+ .preview-walk-body {+ position: absolute;+ bottom: 12px;+ right: 16px;+ width: 52px;+ height: 80px;+ background: rgba(74,222,128,0.12);+ border: 1px solid rgba(74,222,128,0.25);+ border-radius: 10px;+ display: flex;+ align-items: center;+ justify-content: center;+ font-size: 28px;+ }+ .preview-walk-label {+ position: absolute;+ top: 10px;+ left: 12px;+ font-size: 10px;+ color: var(--text-3);+ font-family: 'JetBrains Mono', monospace;+ }+ .preview-walk-site {+ position: absolute;+ top: 30px;+ left: 12px;+ right: 72px;+ display: flex;+ flex-direction: column;+ gap: 5px;+ }+ .preview-walk-line {+ height: 8px;+ border-radius: 4px;+ background: rgba(255,255,255,0.06);+ }++ /* Token widget mockup */+ .preview-token {+ display: flex;+ align-items: center;+ gap: 12px;+ background: rgba(255,255,255,0.04);+ border: 1px solid rgba(255,255,255,0.08);+ border-radius: 12px;+ padding: 12px 16px;+ width: 240px;+ }+ .preview-token-avatar {+ width: 40px;+ height: 40px;+ border-radius: 50%;+ background: rgba(244,114,182,0.2);+ border: 1px solid rgba(244,114,182,0.3);+ display: flex;+ align-items: center;+ justify-content: center;+ font-size: 20px;+ flex-shrink: 0;+ }+ .preview-token-info { flex: 1; min-width: 0; }+ .preview-token-name { font-size: 13px; font-weight: 600; margin-bottom: 2px; }+ .preview-token-price { font-size: 11px; color: var(--green); font-family: monospace; }+ .preview-token-change { font-size: 10px; color: var(--text-3); }++ /* MCP mockup */+ .preview-mcp {+ width: 240px;+ display: flex;+ flex-direction: column;+ gap: 6px;+ }+ .preview-mcp-tool {+ background: rgba(255,255,255,0.04);+ border: 1px solid rgba(255,255,255,0.07);+ border-radius: 8px;+ padding: 7px 10px;+ display: flex;+ align-items: center;+ gap: 8px;+ font-size: 11px;+ color: var(--text-2);+ font-family: 'JetBrains Mono', monospace;+ }+ .preview-mcp-tool-dot {+ width: 6px; height: 6px;+ border-radius: 50%;+ flex-shrink: 0;+ }++ /* Card body */+ .card-body {+ padding: 20px;+ display: flex;+ flex-direction: column;+ gap: 12px;+ flex: 1;+ }+ .card-meta {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: 8px;+ }+ .cat-badge {+ font-size: 10px;+ font-weight: 700;+ letter-spacing: 0.08em;+ text-transform: uppercase;+ padding: 3px 8px;+ border-radius: 100px;+ }+ .cat-badge.avatar { background: rgba(96,165,250,0.15); color: #93c5fd; }+ .cat-badge.chat { background: rgba(167,139,250,0.15); color: #c4b5fd; }+ .cat-badge.companion { background: rgba(74,222,128,0.12); color: #86efac; }+ .cat-badge.narrator { background: rgba(251,191,36,0.12); color: #fcd34d; }+ .cat-badge.crypto { background: rgba(244,114,182,0.12); color: #f9a8d4; }+ .cat-badge.mcp { background: rgba(167,139,250,0.10); color: #c4b5fd; }++ .diff-badge {+ font-size: 10px;+ font-weight: 600;+ letter-spacing: 0.04em;+ color: var(--text-3);+ border: 1px solid var(--border);+ border-radius: 100px;+ padding: 2px 8px;+ }+ .card-title {+ font-size: 17px;+ font-weight: 700;+ letter-spacing: -0.02em;+ line-height: 1.2;+ }+ .card-desc {+ font-size: 14px;+ color: var(--text-2);+ line-height: 1.6;+ }++ /* Code section */+ .card-code { margin-top: auto; }+ .code-toggle {+ appearance: none;+ background: none;+ border: 1px solid var(--border);+ border-radius: 8px;+ cursor: pointer;+ font: inherit;+ font-size: 13px;+ font-weight: 500;+ color: var(--text-2);+ padding: 8px 14px;+ width: 100%;+ text-align: left;+ display: flex;+ align-items: center;+ gap: 6px;+ transition: color 0.15s, border-color 0.15s, background 0.15s;+ }+ .code-toggle:hover {+ color: var(--text);+ border-color: var(--border-2);+ background: rgba(255,255,255,0.03);+ }+ .code-toggle svg { flex-shrink: 0; transition: transform 0.2s; }+ .code-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }+ .code-toggle-label { flex: 1; }+ .code-panel {+ margin-top: 10px;+ border: 1px solid var(--border);+ border-radius: 10px;+ overflow: hidden;+ display: none;+ }+ .code-panel.open { display: block; }+ .code-header {+ display: flex;+ align-items: center;+ justify-content: space-between;+ padding: 8px 12px;+ background: rgba(255,255,255,0.03);+ border-bottom: 1px solid var(--border);+ }+ .code-lang {+ font-size: 11px;+ font-family: 'JetBrains Mono', 'SF Mono', monospace;+ color: var(--text-3);+ }+ .copy-btn {+ appearance: none;+ background: rgba(255,255,255,0.06);+ border: none;+ border-radius: 5px;+ cursor: pointer;+ font: inherit;+ font-size: 11px;+ font-weight: 600;+ color: var(--text-2);+ padding: 4px 10px;+ transition: background 0.15s, color 0.15s;+ }+ .copy-btn:hover { background: rgba(255,255,255,0.12); color: var(--text); }+ .copy-btn.copied { color: var(--green); }+ pre.code-block {+ margin: 0;+ padding: 14px;+ font-size: 11.5px;+ font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;+ line-height: 1.7;+ color: var(--text-2);+ overflow-x: auto;+ tab-size: 2;+ white-space: pre;+ }+ pre.code-block .k { color: #60a5fa; } /* tag names / keywords */+ pre.code-block .a { color: #c4b5fd; } /* attributes */+ pre.code-block .s { color: #86efac; } /* strings */+ pre.code-block .c { color: #52525b; } /* comments */+ pre.code-block .p { color: #fbbf24; } /* punctuation */++ /* ── Showcase strip ────────────────────────────── */+ .showcase {+ border-top: 1px solid var(--border);+ padding: 64px 0;+ text-align: center;+ }+ .showcase-label {+ font-size: 12px;+ letter-spacing: 0.08em;+ text-transform: uppercase;+ color: var(--text-3);+ margin-bottom: 16px;+ }+ .showcase-title {+ font-size: clamp(22px, 3vw, 32px);+ font-weight: 700;+ letter-spacing: -0.02em;+ margin-bottom: 12px;+ }+ .showcase-sub {+ font-size: 15px;+ color: var(--text-2);+ max-width: 48ch;+ margin: 0 auto 28px;+ line-height: 1.6;+ }+ .showcase-examples {+ display: flex;+ justify-content: center;+ gap: 12px;+ flex-wrap: wrap;+ margin-bottom: 28px;+ }+ .showcase-example-tag {+ font-size: 13px;+ color: var(--text-2);+ border: 1px solid var(--border);+ border-radius: 100px;+ padding: 6px 14px;+ background: var(--surface);+ }+ .showcase-example-tag strong { color: var(--text); }++ /* ── Footer ────────────────────────────────────── */++ @media (max-width: 640px) {+ .hero { padding: 48px 0 40px; }+ .hero h1 { font-size: 36px; }+ .filter-bar { justify-content: center; }+ .grid { grid-template-columns: 1fr; }+ }+ </style>+</head>+<body>++<header><div id="nav-container"></div></header>++<main>+ <div class="page">++ <!-- ── Hero ──────────────────────────────────────────── -->+ <section class="hero">+ <div class="hero-eyebrow">+ <span class="hero-eyebrow-dot" aria-hidden="true"></span>+ Powered by three.ws+ </div>+ <h1>One line of code.<br><em>Any site.</em></h1>+ <p class="hero-sub">+ Drop 3D agents, chat widgets, walk companions, and live token data+ into any website — no backend required.+ </p>+ <div class="hero-cta">+ <a href="/create" class="btn-primary">+ <svg width="14" height="14" viewBox="0 0 14 14" fill="none" aria-hidden="true">+ <path d="M7 1v12M1 7h12" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>+ </svg>+ Create an agent+ </a>+ <a href="/docs/embedding" class="btn-ghost">Read the docs</a>+ </div>+ </section>++ <!-- ── Filter ────────────────────────────────────────── -->+ <div class="filter-bar" role="group" aria-label="Filter integrations by category">+ <button class="filter-chip active" data-filter="all">All</button>+ <button class="filter-chip" data-filter="avatar">3D Avatar</button>+ <button class="filter-chip" data-filter="chat">Chat Agent</button>+ <button class="filter-chip" data-filter="companion">Walk Companion</button>+ <button class="filter-chip" data-filter="narrator">Page Narrator</button>+ <button class="filter-chip" data-filter="crypto">Token Widget</button>+ <button class="filter-chip" data-filter="mcp">MCP Server</button>+ </div>++ <!-- ── Integration grid ──────────────────────────────── -->+ <div class="grid" id="integration-grid">++ <!-- 1. 3D Avatar Viewer -->+ <article class="card" data-cat="avatar">+ <div class="card-preview">+ <div class="card-preview-bg" aria-hidden="true"></div>+ <threews-avatar+ avatar-id="avatar_demo_disk_cz"+ hide-chrome+ pose="idle"+ aria-label="Live 3D avatar preview"+ ></threews-avatar>+ </div>+ <div class="card-body">+ <div class="card-meta">+ <span class="cat-badge avatar">3D Avatar</span>+ <span class="diff-badge">Simple</span>+ </div>+ <h2 class="card-title">Avatar Viewer</h2>+ <p class="card-desc">+ A rotatable, animated 3D avatar — transparent background, OBS-ready, fully scriptable.+ Drop it on any page as a web component.+ </p>+ <div class="card-code">+ <button class="code-toggle" aria-expanded="false" aria-controls="code-avatar">+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" aria-hidden="true">+ <path d="M2 4l4 4 4-4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>+ </svg>+ <span class="code-toggle-label">Get embed code</span>+ </button>+ <div class="code-panel" id="code-avatar" role="region">+ <div class="code-header">+ <span class="code-lang">html</span>+ <button class="copy-btn" aria-label="Copy code">Copy</button>+ </div>+ <pre class="code-block" data-code><span class="c"><!-- Load once on your page --></span>+<span class="k"><script</span> <span class="a">src</span>=<span class="s">"https://three.ws/embed.js"</span> <span class="a">defer</span><span class="k">></script></span>++<span class="c"><!-- Drop anywhere in your HTML --></span>+<span class="k"><threews-avatar</span>+ <span class="a">avatar-id</span>=<span class="s">"your-avatar-id"</span>+ <span class="a">hide-chrome</span>+ <span class="a">pose</span>=<span class="s">"idle"</span>+<span class="k">></threews-avatar></span>++<span class="c"><!-- Optional JS control --></span>+<span class="k"><script></span>+ <span class="a">const</span> el = document.querySelector(<span class="s">'threews-avatar'</span>);+ <span class="a">await</span> el.ready;+ el.play(<span class="s">'wave'</span>);+<span class="k"></script></span></pre>+ </div>+ </div>+ </div>+ </article>++ <!-- 2. Chat Agent -->+ <article class="card" data-cat="chat">+ <div class="card-preview">+ <div class="card-preview-bg" aria-hidden="true"></div>+ <div class="preview-illustration" aria-hidden="true">+ <div class="preview-icon" style="background: rgba(167,139,250,0.12); border: 1px solid rgba(167,139,250,0.2);">🤖</div>+ <div class="preview-chat">+ <div class="preview-chat-bubble">Hey, I'm PumpBot. What do you want to look at?</div>+ <div class="preview-chat-bubble user">Tell me about this token</div>+ <div class="preview-chat-bubble">Let me pull the latest data for you…</div>+ </div>+ </div>+ </div>+ <div class="card-body">+ <div class="card-meta">+ <span class="cat-badge chat">Chat Agent</span>+ <span class="diff-badge">Simple</span>+ </div>+ <h2 class="card-title">Talking Chat Agent</h2>+ <p class="card-desc">+ A full chat interface with a live 3D character. Voice or text. Bring your AI agent to life+ on any site — like PumpBot.+ </p>+ <div class="card-code">+ <button class="code-toggle" aria-expanded="false" aria-controls="code-chat">+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" aria-hidden="true">+ <path d="M2 4l4 4 4-4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>+ </svg>+ <span class="code-toggle-label">Get embed code</span>+ </button>+ <div class="code-panel" id="code-chat" role="region">+ <div class="code-header">+ <span class="code-lang">html</span>+ <button class="copy-btn" aria-label="Copy code">Copy</button>+ </div>+ <pre class="code-block" data-code><span class="c"><!-- Injects a 420×600 chat agent iframe --></span>+<span class="k"><script</span>+ <span class="a">src</span>=<span class="s">"https://three.ws/embed.js"</span>+ <span class="a">data-widget</span>=<span class="s">"your-widget-id"</span>+ <span class="a">data-type</span>=<span class="s">"talking-agent"</span>+ <span class="a">defer</span>+<span class="k">></script></span>++<span class="c"><!-- Or control the iframe with JS --></span>+<span class="k"><script</span> <span class="a">src</span>=<span class="s">"https://three.ws/embed-sdk.js"</span><span class="k">></script></span>+<span class="k"><script></span>+ <span class="a">const</span> agent = Agent3D.connect(iframeEl, {+ agentId: <span class="s">'your-agent-id'</span>,+ onReady: () => agent.send(<span class="s">'Hello!'</span>),+ });+<span class="k"></script></span></pre>+ </div>+ </div>+ </div>+ </article>++ <!-- 3. Walk Companion -->+ <article class="card" data-cat="companion">+ <div class="card-preview">+ <div class="card-preview-bg" aria-hidden="true"></div>+ <div class="preview-illustration" aria-hidden="true">+ <div class="preview-walk">+ <span class="preview-walk-label">yoursite.com</span>+ <div class="preview-walk-site">+ <div class="preview-walk-line" style="width: 80%"></div>+ <div class="preview-walk-line" style="width: 60%"></div>+ <div class="preview-walk-line" style="width: 70%"></div>+ <div class="preview-walk-line" style="width: 45%"></div>+ </div>+ <div class="preview-walk-body">🚶</div>+ </div>+ </div>+ </div>+ <div class="card-body">+ <div class="card-meta">+ <span class="cat-badge companion">Walk Companion</span>+ <span class="diff-badge">Simple</span>+ </div>+ <h2 class="card-title">Walk Companion</h2>+ <p class="card-desc">+ A floating 3D character that lives in the corner of your site. It walks, gestures,+ and responds to your users — with one script tag.+ </p>+ <div class="card-code">+ <button class="code-toggle" aria-expanded="false" aria-controls="code-companion">+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" aria-hidden="true">+ <path d="M2 4l4 4 4-4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>+ </svg>+ <span class="code-toggle-label">Get embed code</span>+ </button>+ <div class="code-panel" id="code-companion" role="region">+ <div class="code-header">+ <span class="code-lang">html</span>+ <button class="copy-btn" aria-label="Copy code">Copy</button>+ </div>+ <pre class="code-block" data-code><span class="c"><!-- Floating corner avatar — one tag --></span>+<span class="k"><script</span>+ <span class="a">src</span>=<span class="s">"https://three.ws/walk-embed-sdk.js"</span>+ <span class="a">data-avatar</span>=<span class="s">"your-avatar-id"</span>+ <span class="a">data-position</span>=<span class="s">"bottom-right"</span>+ <span class="a">data-env</span>=<span class="s">"studio"</span>+ <span class="a">defer</span>+<span class="k">></script></span>++<span class="c"><!-- Control with JS --></span>+<span class="k"><script></span>+ <span class="a">const</span> a = ThreeWalkAvatar.embed(<span class="s">'#my-iframe'</span>);+ a.on(<span class="s">'ready'</span>, () => {+ a.gesture(<span class="s">'wave'</span>);+ a.say(<span class="s">'Welcome!'</span>, <span class="s">'aria'</span>);+ });+<span class="k"></script></span></pre>+ </div>+ </div>+ </div>+ </article>++ <!-- 4. Page Narrator -->+ <article class="card" data-cat="narrator">+ <div class="card-preview">+ <div class="card-preview-bg" aria-hidden="true"></div>+ <div class="preview-illustration" aria-hidden="true">+ <div class="preview-icon" style="background: rgba(251,191,36,0.10); border: 1px solid rgba(251,191,36,0.2);">📖</div>+ <div class="preview-mockup">+<span class="k"><page-agent</span>+ <span class="a">agent-id</span>=<span class="s">"my-agent"</span>+<span class="k">></page-agent></span>+<span class="c">// reads your page, explains it</span>+ </div>+ </div>+ </div>+ <div class="card-body">+ <div class="card-meta">+ <span class="cat-badge narrator">Page Narrator</span>+ <span class="diff-badge">Simple</span>+ </div>+ <h2 class="card-title">Page Narrator</h2>+ <p class="card-desc">+ A 3D agent that reads your page and guides visitors through your content.+ Add it to a docs site, landing page, or blog — no setup required.+ </p>+ <div class="card-code">+ <button class="code-toggle" aria-expanded="false" aria-controls="code-narrator">+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" aria-hidden="true">+ <path d="M2 4l4 4 4-4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>+ </svg>+ <span class="code-toggle-label">Get embed code</span>+ </button>+ <div class="code-panel" id="code-narrator" role="region">+ <div class="code-header">+ <span class="code-lang">html</span>+ <button class="copy-btn" aria-label="Copy code">Copy</button>+ </div>+ <pre class="code-block" data-code><span class="c"><!-- Load the SDK --></span>+<span class="k"><script</span> <span class="a">src</span>=<span class="s">"https://three.ws/embed.js"</span> <span class="a">defer</span><span class="k">></script></span>++<span class="c"><!-- Drop the web component on your page --></span>+<span class="k"><page-agent</span>+ <span class="a">agent-id</span>=<span class="s">"your-agent-id"</span>+<span class="k">></page-agent></span>++<span class="c"><!-- npm install @three-ws/page-agent --></span>+<span class="c"><!-- import '@three-ws/page-agent'; --></span></pre>+ </div>+ </div>+ </div>+ </article>++ <!-- 5. Token / Crypto Widget -->+ <article class="card" data-cat="crypto">+ <div class="card-preview">+ <div class="card-preview-bg" aria-hidden="true"></div>+ <div class="preview-illustration" aria-hidden="true">+ <div class="preview-icon" style="background: rgba(244,114,182,0.10); border: 1px solid rgba(244,114,182,0.2);">📊</div>+ <div class="preview-token">+ <div class="preview-token-avatar">🪙</div>+ <div class="preview-token-info">+ <div class="preview-token-name">$THREE</div>+ <div class="preview-token-price">$0.0024 USDC</div>+ <div class="preview-token-change">↑ 12.4% today · powered by three.ws</div>+ </div>+ </div>+ </div>+ </div>+ <div class="card-body">+ <div class="card-meta">+ <span class="cat-badge crypto">Token Widget</span>+ <span class="diff-badge">Moderate</span>+ </div>+ <h2 class="card-title">Token Market Widget</h2>+ <p class="card-desc">+ Live price, chart, and market data — with a 3D mascot that reacts to price moves.+ Built for token communities and launchpad sites.+ </p>+ <div class="card-code">+ <button class="code-toggle" aria-expanded="false" aria-controls="code-crypto">+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" aria-hidden="true">+ <path d="M2 4l4 4 4-4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>+ </svg>+ <span class="code-toggle-label">Get embed code</span>+ </button>+ <div class="code-panel" id="code-crypto" role="region">+ <div class="code-header">+ <span class="code-lang">html</span>+ <button class="copy-btn" aria-label="Copy code">Copy</button>+ </div>+ <pre class="code-block" data-code><span class="c"><!-- Token widget with live 3D mascot --></span>+<span class="k"><script</span>+ <span class="a">src</span>=<span class="s">"https://three.ws/embed.js"</span>+ <span class="a">data-widget</span>=<span class="s">"your-widget-id"</span>+ <span class="a">data-type</span>=<span class="s">"talking-agent"</span>+ <span class="a">data-width</span>=<span class="s">"420"</span>+ <span class="a">data-height</span>=<span class="s">"600"</span>+ <span class="a">defer</span>+<span class="k">></script></span>++<span class="c"><!-- Get your widget ID at three.ws/widgets --></span></pre>+ </div>+ </div>+ </div>+ </article>++ <!-- 6. MCP Server -->+ <article class="card" data-cat="mcp">+ <div class="card-preview">+ <div class="card-preview-bg" aria-hidden="true"></div>+ <div class="preview-illustration" aria-hidden="true">+ <div class="preview-icon" style="background: rgba(167,139,250,0.08); border: 1px solid rgba(167,139,250,0.2);">⚡</div>+ <div class="preview-mcp">+ <div class="preview-mcp-tool">+ <div class="preview-mcp-tool-dot" style="background: #86efac;"></div>+ render_agent+ </div>+ <div class="preview-mcp-tool">+ <div class="preview-mcp-tool-dot" style="background: #c4b5fd;"></div>+ speak+ </div>+ <div class="preview-mcp-tool">+ <div class="preview-mcp-tool-dot" style="background: #93c5fd;"></div>+ gesture+ </div>+ <div class="preview-mcp-tool">+ <div class="preview-mcp-tool-dot" style="background: #fcd34d;"></div>+ emote+ </div>+ </div>+ </div>+ </div>+ <div class="card-body">+ <div class="card-meta">+ <span class="cat-badge mcp">MCP Server</span>+ <span class="diff-badge">Advanced</span>+ </div>+ <h2 class="card-title">MCP Integration</h2>+ <p class="card-desc">+ Let any AI assistant control your 3D agents directly — render, speak, gesture,+ and emote from Claude, Cursor, or any MCP-compatible tool.+ </p>+ <div class="card-code">+ <button class="code-toggle" aria-expanded="false" aria-controls="code-mcp">+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" aria-hidden="true">+ <path d="M2 4l4 4 4-4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>+ </svg>+ <span class="code-toggle-label">Get embed code</span>+ </button>+ <div class="code-panel" id="code-mcp" role="region">+ <div class="code-header">+ <span class="code-lang">json</span>+ <button class="copy-btn" aria-label="Copy code">Copy</button>+ </div>+ <pre class="code-block" data-code><span class="c">// claude_desktop_config.json</span>+{+ <span class="a">"mcpServers"</span>: {+ <span class="a">"threews-avatar"</span>: {+ <span class="a">"command"</span>: <span class="s">"npx"</span>,+ <span class="a">"args"</span>: [+ <span class="s">"-y"</span>,+ <span class="s">"@three-ws/avatar-agent-mcp"</span>+ ],+ <span class="a">"env"</span>: {+ <span class="a">"THREEWS_API_KEY"</span>: <span class="s">"your-key"</span>+ }+ }+ }+}</pre>+ </div>+ </div>+ </div>+ </article>++ </div><!-- /grid -->++ <!-- ── Showcase CTA ───────────────────────────────────── -->+ <section class="showcase">+ <p class="showcase-label">Built with three.ws</p>+ <h2 class="showcase-title">See what people are building</h2>+ <p class="showcase-sub">+ From token chat bots to 3D docs guides — these integrations are+ already live on real sites.+ </p>+ <div class="showcase-examples">+ <span class="showcase-example-tag"><strong>PumpBot</strong> — token chat agent</span>+ <span class="showcase-example-tag"><strong>Docs guides</strong> — narrated walkthroughs</span>+ <span class="showcase-example-tag"><strong>Corner mascots</strong> — walk companions</span>+ <span class="showcase-example-tag"><strong>Agent profiles</strong> — avatar embeds</span>+ </div>+ <div class="hero-cta">+ <a href="/create" class="btn-primary">Start building</a>+ <a href="/docs/embedding" class="btn-ghost">Read the docs →</a>+ </div>+ </section>++ </div>+</main>++<!-- ── Footer ────────────────────────────────────────────── -->+<footer class="h-footer h-footer-horizon">+ <div class="h-footer-glow-line" aria-hidden="true"></div>+ <div class="h-footer-floor" aria-hidden="true"></div>+ <div class="h-footer-haze" aria-hidden="true"></div>+ <div class="h-footer-watermark" aria-hidden="true">three.ws</div>+ <div class="h-footer-cta">+ <div class="h-footer-newsletter">+ <h3>Stay in the loop</h3>+ <p>Get updates on new integrations, agent tooling, and protocol changes.</p>+ <form class="h-footer-newsletter-form" data-newsletter-form novalidate>+ <input type="email" class="h-footer-newsletter-input" name="email" placeholder="Enter your email" aria-label="Email address" autocomplete="email" required />+ <button type="submit" class="h-footer-newsletter-btn" aria-label="Subscribe">+ <svg viewBox="0 0 16 16" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" d="M2 8h11m0 0L9 4m4 4l-4 4"/></svg>+ </button>+ </form>+ <p class="h-footer-newsletter-msg" data-newsletter-msg aria-live="polite"></p>+ </div>+ <div class="h-footer-community">+ <h3>Join the community</h3>+ <p>Follow along for builds, demos, and conversations with the team.</p>+ <a class="h-footer-community-btn" href="https://x.com/trythreews" target="_blank" rel="noopener noreferrer">+ <svg viewBox="0 0 24 24" aria-hidden="true"><path fill="currentColor" d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"/></svg>+ Follow on X+ </a>+ </div>+ </div>+ <div class="h-footer-inner">+ <div class="h-footer-brand-col">+ <div class="h-footer-brand">+ <img class="wordmark-logo" src="/three.svg" alt="" aria-hidden="true" />+ <span class="wordmark-dot" aria-hidden="true"></span>+ <span>three.ws</span>+ </div>+ <p class="h-footer-tagline">Give your AI a body.</p>+ </div>+ <nav class="h-footer-links" aria-label="Footer">+ <div class="h-footer-link-col">+ <h4 class="h-footer-link-heading">Product</h4>+ <a href="/features">Features</a>+ <a href="/create">Create</a>+ <a href="/integrations">Integrations</a>+ <a href="/marketplace">Marketplace</a>+ </div>+ <div class="h-footer-link-col">+ <h4 class="h-footer-link-heading">Developers</h4>+ <a href="/docs">Docs</a>+ <a href="/docs/embedding">Embedding</a>+ <a href="/bazaar">Paid API Bazaar</a>+ <a href="https://github.com/nirholas/three.ws" target="_blank" rel="noopener noreferrer">GitHub</a>+ </div>+ <div class="h-footer-link-col">+ <h4 class="h-footer-link-heading">Legal</h4>+ <a href="/legal/privacy">Privacy</a>+ <a href="/legal/tos">Terms</a>+ </div>+ </nav>+ </div>+ <div class="h-footer-bottom">+ <p class="h-footer-legal">© 2026 three.ws — All rights reserved.</p>+ </div>+</footer>++<script>+ // ── Filter chips ──────────────────────────────────────────+ const chips = document.querySelectorAll('.filter-chip');+ const cards = document.querySelectorAll('#integration-grid .card');++ chips.forEach(chip => {+ chip.addEventListener('click', () => {+ chips.forEach(c => c.classList.remove('active'));+ chip.classList.add('active');+ const filter = chip.dataset.filter;+ cards.forEach(card => {+ const match = filter === 'all' || card.dataset.cat === filter;+ card.hidden = !match;+ });+ });+ });++ // ── Code toggle expand/collapse ───────────────────────────+ document.querySelectorAll('.code-toggle').forEach(btn => {+ btn.addEventListener('click', () => {+ const expanded = btn.getAttribute('aria-expanded') === 'true';+ btn.setAttribute('aria-expanded', String(!expanded));+ const panel = document.getElementById(btn.getAttribute('aria-controls'));+ if (panel) panel.classList.toggle('open', !expanded);+ });+ });++ // ── Copy buttons ──────────────────────────────────────────+ document.querySelectorAll('.copy-btn').forEach(btn => {+ btn.addEventListener('click', async () => {+ const pre = btn.closest('.code-panel').querySelector('[data-code]');+ if (!pre) return;+ try {+ await navigator.clipboard.writeText(pre.innerText.trim());+ btn.textContent = 'Copied!';+ btn.classList.add('copied');+ setTimeout(() => {+ btn.textContent = 'Copy';+ btn.classList.remove('copied');+ }, 2000);+ } catch {+ btn.textContent = 'Error';+ }+ });+ });+</script>++</body>+</html>diff --git a/pages/leaderboard.html b/pages/leaderboard.htmlindex 5ec2f23b0..5166c90db 100644--- a/pages/leaderboard.html+++ b/pages/leaderboard.html@@ -125,6 +125,14 @@<dt>SOL price</dt><dd id="lb-sum-sol">—</dd></div>+ <div class="lb-summary-cell">+ <dt>Oracle win rate</dt>+ <dd id="lb-sum-oracle-wr">—</dd>+ </div>+ <div class="lb-summary-cell">+ <dt>Scored today</dt>+ <dd id="lb-sum-oracle-scored">—</dd>+ </div></dl></section>@@ -234,6 +242,15 @@</main><script type="module" src="/src/leaderboard.js"></script>+ <script>+ fetch('/api/oracle/stats').then(r=>r.ok?r.json():null).then(d=>{+ if(!d) return;+ var wr = document.getElementById('lb-sum-oracle-wr');+ var sc = document.getElementById('lb-sum-oracle-scored');+ if(wr) wr.textContent = d.win_rate != null ? d.win_rate+'%' : '—';+ if(sc) sc.textContent = d.scored_24h != null ? (d.scored_24h >= 1000 ? (d.scored_24h/1000).toFixed(1)+'K' : String(d.scored_24h)) : '—';+ }).catch(()=>{});+ </script><script src="/brand.js" defer></script><div id="footer-container"></div><script src="/footer.js"></script>diff --git a/pages/oracle.html b/pages/oracle.htmlindex 3c74f7fda..6c20989b8 100644--- a/pages/oracle.html+++ b/pages/oracle.html@@ -574,6 +574,12 @@<button class="stat" type="button" data-stat-action="agents" title="Distinct agents currently armed on Oracle conviction — click for the leaderboard"><span>Agents armed <span class="stat-arrow">→</span></span><b id="stArmed">—</b><span class="stat-sub" id="stArmedSub"></span></button>+ <div class="stat" title="Oracle watch actions currently open — awaiting settlement">+ <span>Open trades</span><b id="stOpenTrades">—</b><span class="stat-sub">in flight</span>+ </div>+ <div class="stat" title="All-time resolved calls scored as wins by the oracle">+ <span>Total wins</span><b class="up" id="stTotalWins">—</b><span class="stat-sub" id="stTotalWinsSub"></span>+ </div></div></header>diff --git a/public/changelog.json b/public/changelog.jsonindex 70aeef341..c8e884f14 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-06-26T19:51:04.595Z",+ "generated_at": "2026-06-26T19:59:37.950Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -26,6 +26,16 @@"launch"]},+ {+ "date": "2026-06-26",+ "type": "launch",+ "title": "Integrations",+ "summary": "Drop-in 3D agents, chat widgets, walk companions, and live token embeds for any site. One script tag. Powered by three.ws.",+ "link": "/integrations",+ "tags": [+ "launch"+ ]+ },{"date": "2026-06-26","type": "launch",@@ -321,6 +331,16 @@"infra"]},+ {+ "date": "2026-06-26",+ "type": "update",+ "title": "Integrations gallery — drop 3D agents into any site",+ "summary": "New /integrations page showcasing six ready-to-use embeds: 3D Avatar Viewer (web component), Talking Chat Agent (like PumpBot), Walk Companion (floating corner mascot), Page Narrator, Token Market Widget, and MCP Server. Each card includes a live preview, category filter, difficulty rating, and a one-click copy code snippet. One script tag is all it takes to bring any of these to any site.",+ "link": "/integrations",+ "tags": [+ "feature"+ ]+ },{"date": "2026-06-26","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex d82da5dec..a7cfb5a42 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -22,6 +22,14 @@<category>launch</category><description>A curated, factual atlas of the open-source and commercial engines that build high-quality and photoreal 3D human avatars — Gaussian-splat heads, single-photo humans, text→avatar generators, and the rigs three.ws already animates. Technique, license, compute, and integration status for each.</description></item>+ <item>+ <title>Integrations</title>+ <link>https://three.ws/integrations</link>+ <guid isPermaLink="false">2026-06-26:Integrations</guid>+ <pubDate>Fri, 26 Jun 2026 12:00:00 GMT</pubDate>+ <category>launch</category>+ <description>Drop-in 3D agents, chat widgets, walk companions, and live token embeds for any site. One script tag. Powered by three.ws.</description>+ </item><item><title>Splat Viewer — Photoreal Gaussian Avatars</title><link>https://three.ws/splat</link>@@ -246,6 +254,14 @@<category>fix</category><description>Fixed a URL-generation bug that caused the Hunyuan3D-2.1 HuggingFace Space to always fail with a DNS error (dot in version number wasn't converted to a hyphen in the subdomain). Doubled the NVIDIA NIM and Redis circuit-breaker cooldowns to reduce retry noise during external-service outages. Added documentation for the LABOR_ESCROW_SECRET_BASE58 env var so bounty posting can be enabled in production.</description></item>+ <item>+ <title>Integrations gallery — drop 3D agents into any site</title>+ <link>https://three.ws/integrations</link>+ <guid isPermaLink="false">2026-06-26:Integrations gallery — drop 3D agents into any site</guid>+ <pubDate>Fri, 26 Jun 2026 12:00:00 GMT</pubDate>+ <category>feature</category>+ <description>New /integrations page showcasing six ready-to-use embeds: 3D Avatar Viewer (web component), Talking Chat Agent (like PumpBot), Walk Companion (floating corner mascot), Page Narrator, Token Market Widget, and MCP Server. Each card includes a live preview, category filter, difficulty rating, and a one-click copy code snippet. One script tag is all it takes to bring any of these to any site.</description>+ </item><item><title>Launchpad is now an actual launchpad — mint a coin right on the page</title><link>https://three.ws/launchpad</link>diff --git a/public/features.json b/public/features.jsonindex 6fe5ab448..e029be308 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-06-26T19:51:04.575Z",+ "generated_at": "2026-06-26T19:59:37.935Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",@@ -482,6 +482,16 @@"tags": [],"showcase": false},+ {+ "path": "/integrations",+ "title": "Integrations",+ "description": "Drop-in 3D agents, chat widgets, walk companions, and live token embeds for any site. One script tag. Powered by three.ws.",+ "added": "2026-06-26",+ "auth": null,+ "indexable": true,+ "tags": [],+ "showcase": false+ },{"path": "/features","title": "Features",diff --git a/public/llms-full.txt b/public/llms-full.txtindex 3ccae4f0b..f9143ff11 100644--- a/public/llms-full.txt+++ b/public/llms-full.txt@@ -298,6 +298,12 @@ URL: https://three.ws/hydrateTake an existing on-chain agent (ERC-8004 / Solana) and attach a 3D body, voice, and skills.+### Integrations++URL: https://three.ws/integrations++Drop-in 3D agents, chat widgets, walk companions, and live token embeds for any site. One script tag. Powered by three.ws.+### FeaturesURL: https://three.ws/featuresdiff --git a/public/llms.txt b/public/llms.txtindex f9f5c2b50..971273c08 100644--- a/public/llms.txt+++ b/public/llms.txt@@ -59,6 +59,7 @@ Create and customize an agent.- [Artifact Viewer](https://three.ws/artifact): Renders Claude artifact bundles as standalone embeddable apps.- [Widgets Gallery](https://three.ws/widgets): Pre-built chat, voice, and 3D-avatar widgets you can drop into any page.- [Hydrate](https://three.ws/hydrate): Take an existing on-chain agent (ERC-8004 / Solana) and attach a 3D body, voice, and skills.+- [Integrations](https://three.ws/integrations): Drop-in 3D agents, chat widgets, walk companions, and live token embeds for any site. One script tag. Powered by three.ws.- [Features](https://three.ws/features): Full feature overview of the three.ws platform: avatars, agents, on-chain identity, x402 payments, and embedding.- [AR & WebXR — Place Any 3D Agent in Your Real World](https://three.ws/features/ar): Every three.ws avatar and Forge model has a View in AR button. On mobile it anchors the model to real surfaces through your camera. WebXR on Android, Quick Look on iOS — no app, no download.- [Forge — Text to 3D Model](https://three.ws/features/forge): Type a description, get a downloadable textured 3D model (GLB). Powered by Flux image generation and TRELLIS 3D reconstruction.diff --git a/public/sitemap/index.html b/public/sitemap/index.htmlindex 1b7979202..f00d34cbd 100644--- a/public/sitemap/index.html+++ b/public/sitemap/index.html@@ -65,7 +65,7 @@<main class="sm-wrap"><div class="sm-hero"><h1>Sitemap</h1>- <p>All 341 pages on three.ws, grouped by purpose. Looking for the machine-readable versions?</p>+ <p>All 342 pages on three.ws, grouped by purpose. Looking for the machine-readable versions?</p><div class="sm-formats"><a href="/sitemap.xml"><code>sitemap.xml</code> · for search engines</a><a href="/llms.txt"><code>llms.txt</code> · for AI agents</a>@@ -77,7 +77,7 @@</div><div class="sm-filter"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m21 21-4.3-4.3"/></svg>- <input id="sm-filter-input" type="search" placeholder="Filter 341 pages by name, path, or description…" aria-label="Filter pages" autocomplete="off" spellcheck="false" />+ <input id="sm-filter-input" type="search" placeholder="Filter 342 pages by name, path, or description…" aria-label="Filter pages" autocomplete="off" spellcheck="false" /><kbd aria-hidden="true">/</kbd></div><p class="sm-filter-count" id="sm-filter-count" role="status" aria-live="polite"></p>@@ -252,7 +252,7 @@<section class="sm-section" id="build"><header>- <h2>Build<span class="sm-count" data-count>43</span></h2>+ <h2>Build<span class="sm-count" data-count>44</span></h2><p class="sm-section-desc">Create and customize an agent.</p></header><ul class="sm-list">@@ -431,6 +431,13 @@<span class="sm-desc">Take an existing on-chain agent (ERC-8004 / Solana) and attach a 3D body, voice, and skills.</span></a></li>+ <li>+ <a href="/integrations">+ <span class="sm-title">Integrations</span>+ <span class="sm-path">/integrations</span>+ <span class="sm-desc">Drop-in 3D agents, chat widgets, walk companions, and live token embeds for any site. One script tag. Powered by three.ws.</span>+ </a>+ </li><li><a href="/features"><span class="sm-title">Features</span>diff --git a/src/create-review-features.js b/src/create-review-features.jsindex ff8ed16c7..a1f1ad229 100644--- a/src/create-review-features.js+++ b/src/create-review-features.js@@ -1107,6 +1107,24 @@ export function openAnalyticsModal() {<span class="fm-kpi-label">Attestations</span></div></div>+ <div class="fm-kpi-row" data-oracle-row aria-label="Live oracle trading metrics" aria-busy="true">+ <div class="fm-kpi">+ <span class="fm-kpi-value" data-oracle-stat="armed">—</span>+ <span class="fm-kpi-label">Agents trading</span>+ </div>+ <div class="fm-kpi">+ <span class="fm-kpi-value" data-oracle-stat="winrate" style="color:#34d399">—</span>+ <span class="fm-kpi-label">Win rate</span>+ </div>+ <div class="fm-kpi">+ <span class="fm-kpi-value" data-oracle-stat="scored">—</span>+ <span class="fm-kpi-label">Scored today</span>+ </div>+ <div class="fm-kpi">+ <span class="fm-kpi-value" data-oracle-stat="wins">—</span>+ <span class="fm-kpi-label">Total wins</span>+ </div>+ </div><p class="fm-note" data-stats-note>Live three.ws platform metrics. Your own dashboard populates the moment your agent goes live — every API call, widget load, and voice session tracked in real time.</p>`;@@ -1137,6 +1155,23 @@ export function openAnalyticsModal() {set('attestations', fmtCount(stats.attestations));row?.setAttribute('aria-busy', 'false');});++ // Oracle trading stats — second live data row.+ fetch('/api/oracle/stats', { headers: { accept: 'application/json' } })+ .then((r) => r.ok ? r.json() : null)+ .then((d) => {+ if (!d) { body.querySelector('[data-oracle-row]')?.remove(); return; }+ const oset = (key, val) => {+ const el = body.querySelector(`[data-oracle-stat="${key}"]`);+ if (el) el.textContent = val;+ };+ oset('armed', fmtCount(d.agents_armed));+ oset('winrate', d.win_rate != null ? `${d.win_rate}%` : '—');+ oset('scored', fmtCount(d.scored_24h));+ oset('wins', fmtCount(d.total_wins));+ body.querySelector('[data-oracle-row]')?.setAttribute('aria-busy', 'false');+ })+ .catch(() => body.querySelector('[data-oracle-row]')?.remove());}// ── Widgets modal ───────────────────────────────────────────────────────────diff --git a/src/oracle.js b/src/oracle.jsindex d0fa71f8b..01fa9c93e 100644--- a/src/oracle.js+++ b/src/oracle.js@@ -762,6 +762,9 @@ async function loadGlobalStats() {set('#stArmed', (data.agents_armed ?? 0).toLocaleString());set('#stArmedSub', data.open_actions != null ? `${data.open_actions.toLocaleString()} open positions` : '');+ set('#stOpenTrades', data.open_actions != null ? data.open_actions.toLocaleString() : '—');+ set('#stTotalWins', data.total_wins != null ? data.total_wins.toLocaleString() : '—');+ set('#stTotalWinsSub', data.total_resolved ? `of ${data.total_resolved.toLocaleString()} resolved` : '');} catch { /* non-fatal — feed-window fallbacks already rendered */ }}diff --git a/src/shared/agent-watch-panel.js b/src/shared/agent-watch-panel.jsindex ee3c14b38..db328bc71 100644--- a/src/shared/agent-watch-panel.js+++ b/src/shared/agent-watch-panel.js@@ -2,7 +2,7 @@//// Two surfaces in one component:// Screen — left/main pane. When the agent has a Playwright process pushing-// frames via POST /api/agent/screen-push, renders them at the raw+// frames via POST /api/agent-screen-push, renders them at the raw// resolution. When no frames are coming, paints a "desktop" canvas// from real agent-actions rows: task log, recent actions, live// status indicator — so the screen is never blank.@@ -14,24 +14,28 @@// const handle = await mountWatchPanel({ agentId, agentName, avatarUrl, isOwner, container });// // later:// handle?.destroy();-//-// The panel is entirely self-contained: it manages its own SSE connection,-// Three.js renderer, timers, and styles. Disposing cleans up everything.import {- PerspectiveCamera, WebGLRenderer, Scene,+ PerspectiveCamera, WebGLRenderer, Scene, AnimationMixer,AmbientLight, DirectionalLight, Box3,} from 'three';import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';import { clone as cloneSkinnedScene } from 'three/addons/utils/SkeletonUtils.js';-import { AnimationManager } from '../animation-manager.js';-const STREAM_URL = (id) => `/api/agent-screen-stream?agentId=${encodeURIComponent(id)}`;+// Top-level endpoint — this is the real-time frame+log SSE stream.+const STREAM_URL = (id) => `/api/agent-screen-stream?agentId=${encodeURIComponent(id)}`;const ACTIONS_URL = (id) => `/api/agent-actions?agent_id=${encodeURIComponent(id)}&limit=20`;-// Canvas dimensions for the activity screen (no frames mode).+// Canvas dimensions for the activity screen (no-frame fallback).const CW = 1280, CH = 720;+// How long without a frame before dropping back to the activity canvas.+const FRAME_TIMEOUT_MS = 4000;+// Canvas repaint budget when idle (~10fps).+const IDLE_CANVAS_INTERVAL_MS = 100;+// Activity log poll interval.+const ACTIVITY_POLL_MS = 5000;+const STYLE_ID = 'tws-watch-panel-styles';function injectStyles() {@@ -48,20 +52,21 @@ function injectStyles() {}.wp-stage {display: grid;- grid-template-columns: 1fr 240px;+ grid-template-columns: 1fr 200px;gap: 12px;align-items: start;}-@media (max-width: 700px) {+@media (max-width: 640px) {.wp-stage { grid-template-columns: 1fr; }+ .wp-cam-wrap { aspect-ratio: 16/9 !important; }}-/* ── Screen pane ───────────────────────────────────────────── */+/* ── Screen pane ──────────────────────────────────────────────── */.wp-screen-wrap {position: relative;width: 100%;aspect-ratio: 16/9;- background: #09090c;+ background: #070709;border-radius: 10px;overflow: hidden;border: 1px solid rgba(255,255,255,0.07);@@ -84,6 +89,7 @@ function injectStyles() {display: block;object-fit: contain;border-radius: 9px;+ image-rendering: -webkit-optimize-contrast;}.wp-screen-badge {position: absolute;@@ -93,66 +99,67 @@ function injectStyles() {display: flex;align-items: center;gap: 6px;- background: rgba(0,0,0,0.55);- backdrop-filter: blur(8px);- -webkit-backdrop-filter: blur(8px);+ background: rgba(0,0,0,0.6);+ backdrop-filter: blur(10px);+ -webkit-backdrop-filter: blur(10px);border: 1px solid rgba(255,255,255,0.08);border-radius: 20px;padding: 4px 10px 4px 8px;font-size: 11px;font-weight: 700;color: rgba(255,255,255,0.75);- letter-spacing: 0.04em;+ letter-spacing: 0.05em;text-transform: uppercase;+ transition: opacity 0.3s;}.wp-screen-badge-dot {width: 6px;height: 6px;border-radius: 50%;background: #5fd08a;- animation: wp-pulse 2s ease-in-out infinite;+ animation: wp-pulse 1.8s ease-in-out infinite;+ flex-shrink: 0;+}+.wp-screen-badge-dot.offline {+ background: rgba(255,255,255,0.2);+ animation: none;}-.wp-screen-badge-dot.offline { background: #666; animation: none; }@keyframes wp-pulse {0%,100% { opacity: 1; transform: scale(1); }- 50% { opacity: 0.4; transform: scale(0.7); }+ 50% { opacity: 0.35; transform: scale(0.65); }}.wp-screen-expand {position: absolute;bottom: 10px;right: 12px;z-index: 4;- background: rgba(0,0,0,0.5);- backdrop-filter: blur(8px);- -webkit-backdrop-filter: blur(8px);+ background: rgba(0,0,0,0.52);+ backdrop-filter: blur(10px);+ -webkit-backdrop-filter: blur(10px);border: 1px solid rgba(255,255,255,0.1);border-radius: 6px;- color: rgba(255,255,255,0.6);- font-size: 12px;- padding: 4px 8px;+ color: rgba(255,255,255,0.55);+ font-size: 13px;+ line-height: 1;+ padding: 5px 8px;cursor: pointer;- transition: background 0.15s, color 0.15s;+ transition: background 0.12s, color 0.12s;+ opacity: 0;+ transition: opacity 0.2s;}-.wp-screen-expand:hover { background: rgba(255,255,255,0.12); color: #fff; }+.wp-screen-wrap:hover .wp-screen-expand { opacity: 1; }+.wp-screen-expand:hover { background: rgba(255,255,255,0.14); color: #fff; }-/* ── Webcam pane ────────────────────────────────────────────── */+/* ── Webcam pane ──────────────────────────────────────────────── */.wp-cam-wrap {position: relative;width: 100%;aspect-ratio: 3/4;- background: #0d0d10;+ background: #0a0a0d;border-radius: 10px;overflow: hidden;border: 1px solid rgba(255,255,255,0.07);- box-shadow: 0 0 0 1px rgba(0,0,0,0.5), 0 4px 16px rgba(0,0,0,0.5);-}-.wp-cam-canvas {- position: absolute;- inset: 0;- width: 100%;- height: 100%;- display: block;- object-fit: cover;+ box-shadow: 0 0 0 1px rgba(0,0,0,0.5), 0 4px 20px rgba(0,0,0,0.55);}.wp-cam-video {position: absolute;@@ -168,50 +175,61 @@ function injectStyles() {pointer-events: none;z-index: 2;border-radius: 10px;- /* Webcam vignette + scanlines effect */- background: radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.55) 100%);+ background: radial-gradient(ellipse at 50% 40%, transparent 42%, rgba(0,0,0,0.6) 100%);box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.05);}-.wp-cam-bezel::after {- content: '';+.wp-cam-scanlines {position: absolute;inset: 0;+ pointer-events: none;+ z-index: 3;+ border-radius: 10px;background: repeating-linear-gradient(0deg,transparent,- transparent 2px,- rgba(0,0,0,0.04) 2px,- rgba(0,0,0,0.04) 4px+ transparent 3px,+ rgba(0,0,0,0.03) 3px,+ rgba(0,0,0,0.03) 4px);- pointer-events: none;+ opacity: 0.7;}.wp-cam-label {position: absolute;- bottom: 8px;- left: 10px;- z-index: 3;- font-size: 10px;- font-weight: 700;- letter-spacing: 0.06em;+ bottom: 10px;+ left: 12px;+ z-index: 4;+ font-size: 9px;+ font-weight: 800;+ letter-spacing: 0.08em;text-transform: uppercase;- color: rgba(255,255,255,0.5);+ color: rgba(255,255,255,0.45);}-.wp-cam-corner {+.wp-cam-live {position: absolute;- top: 8px;- right: 8px;- z-index: 3;- width: 8px;- height: 8px;+ top: 9px;+ right: 9px;+ z-index: 4;+ width: 7px;+ height: 7px;border-radius: 50%;- background: rgba(95,208,138,0.8);- box-shadow: 0 0 6px rgba(95,208,138,0.5);+ background: rgba(95,208,138,0.85);+ box-shadow: 0 0 7px rgba(95,208,138,0.55);+ animation: wp-cam-blink 2.4s ease-in-out infinite;+}+.wp-cam-live.offline {+ background: rgba(255,255,255,0.15);+ box-shadow: none;+ animation: none;+}+@keyframes wp-cam-blink {+ 0%,100% { opacity: 1; }+ 50% { opacity: 0.3; }}-/* ── Activity log ───────────────────────────────────────────── */+/* ── Activity log ─────────────────────────────────────────────── */.wp-log {width: 100%;- background: rgba(255,255,255,0.02);+ background: rgba(255,255,255,0.018);border: 1px solid rgba(255,255,255,0.06);border-radius: 8px;overflow: hidden;@@ -222,55 +240,76 @@ function injectStyles() {justify-content: space-between;padding: 8px 14px;border-bottom: 1px solid rgba(255,255,255,0.05);- font-size: 11px;- font-weight: 700;- letter-spacing: 0.05em;+ font-size: 10px;+ font-weight: 800;+ letter-spacing: 0.06em;text-transform: uppercase;- color: rgba(255,255,255,0.4);+ color: rgba(255,255,255,0.35);+}+.wp-log-badge {+ font-size: 10px;+ font-weight: 600;+ color: rgba(255,255,255,0.25);+ letter-spacing: 0;+ text-transform: none;}.wp-log-list {- max-height: 180px;+ max-height: 200px;overflow-y: auto;scrollbar-width: thin;- scrollbar-color: rgba(255,255,255,0.1) transparent;+ scrollbar-color: rgba(255,255,255,0.08) transparent;}.wp-log-row {- display: flex;- align-items: flex-start;- gap: 10px;- padding: 7px 14px;+ display: grid;+ grid-template-columns: 64px 1fr 42px;+ gap: 8px;+ align-items: start;+ padding: 6px 14px;border-bottom: 1px solid rgba(255,255,255,0.03);transition: background 0.1s;}+.wp-log-row.wp-log-row--new {+ animation: wp-log-in 0.35s ease;+}+@keyframes wp-log-in {+ from { opacity: 0; transform: translateY(-4px); }+ to { opacity: 1; transform: translateY(0); }+}.wp-log-row:last-child { border-bottom: none; }-.wp-log-row:hover { background: rgba(255,255,255,0.03); }+.wp-log-row:hover { background: rgba(255,255,255,0.025); }.wp-log-type {- flex-shrink: 0;font-size: 9px;font-weight: 800;- letter-spacing: 0.06em;+ letter-spacing: 0.05em;text-transform: uppercase;- color: rgba(255,255,255,0.28);+ color: rgba(255,255,255,0.22);padding-top: 2px;- min-width: 56px;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;}.wp-log-summary {- flex: 1;font-size: 12px;- color: rgba(255,255,255,0.7);- line-height: 1.4;+ color: rgba(255,255,255,0.65);+ line-height: 1.45;+ overflow: hidden;+ display: -webkit-box;+ -webkit-line-clamp: 2;+ -webkit-box-orient: vertical;}.wp-log-time {- flex-shrink: 0;- font-size: 11px;- color: rgba(255,255,255,0.25);+ font-size: 10px;+ color: rgba(255,255,255,0.2);padding-top: 2px;+ text-align: right;+ white-space: nowrap;}.wp-log-empty {- padding: 18px 14px;+ padding: 20px 14px;font-size: 12px;- color: rgba(255,255,255,0.3);+ color: rgba(255,255,255,0.25);text-align: center;+ font-style: italic;}`;document.head.appendChild(s);@@ -295,180 +334,181 @@ function relTime(ts) {function paintActivityCanvas(ctx, actions, status, agentName, t) {const W = CW, H = CH;- const up = '#5fd08a', dim = 'rgba(255,255,255,0.35)', faint = 'rgba(255,255,255,0.15)';- const text = '#f0f0f4', bg0 = '#0a0a0e', bg1 = '#101014';+ const up = '#5fd08a', dim = 'rgba(255,255,255,0.32)', faint = 'rgba(255,255,255,0.13)';+ const text = '#f0f0f4', bg0 = '#09090d', bg1 = '#0f0f14';+ const pulse = 0.5 + 0.5 * Math.sin(t * 2.8);- // Background+ // Background gradientconst bg = ctx.createLinearGradient(0, 0, 0, H);bg.addColorStop(0, bg1);bg.addColorStop(1, bg0);ctx.fillStyle = bg;ctx.fillRect(0, 0, W, H);+ // Subtle grid overlay+ ctx.strokeStyle = 'rgba(255,255,255,0.016)';+ ctx.lineWidth = 1;+ for (let x = 0; x < W; x += 80) {+ ctx.beginPath(); ctx.moveTo(x, 0); ctx.lineTo(x, H); ctx.stroke();+ }+ for (let y = 0; y < H; y += 80) {+ ctx.beginPath(); ctx.moveTo(0, y); ctx.lineTo(W, y); ctx.stroke();+ }+// Taskbar- ctx.fillStyle = 'rgba(255,255,255,0.04)';- ctx.fillRect(0, 0, W, 52);- ctx.strokeStyle = 'rgba(255,255,255,0.06)';+ ctx.fillStyle = 'rgba(255,255,255,0.035)';+ ctx.fillRect(0, 0, W, 50);+ ctx.strokeStyle = 'rgba(255,255,255,0.055)';ctx.lineWidth = 1;- ctx.beginPath(); ctx.moveTo(0, 52); ctx.lineTo(W, 52); ctx.stroke();+ ctx.beginPath(); ctx.moveTo(0, 50); ctx.lineTo(W, 50); ctx.stroke();- // Taskbar: agent name + status dot- const pulse = 0.5 + 0.5 * Math.sin(t * 3);+ // Status dotctx.beginPath();- ctx.arc(32, 26, 7, 0, Math.PI * 2);+ ctx.arc(28, 25, 6, 0, Math.PI * 2);ctx.fillStyle = status === 'live'- ? `rgba(95,208,138,${0.5 + pulse * 0.5})`- : 'rgba(120,120,128,0.6)';+ ? `rgba(95,208,138,${0.55 + pulse * 0.45})`+ : 'rgba(120,120,128,0.45)';ctx.fill();- ctx.font = '700 18px Inter, system-ui, sans-serif';+ // Agent name+ const displayName = (agentName || 'Agent').slice(0, 30);+ ctx.font = '700 17px Inter, system-ui, sans-serif';ctx.fillStyle = text;ctx.textAlign = 'left';ctx.textBaseline = 'middle';- const displayName = (agentName || 'Agent').slice(0, 28);- ctx.fillText(displayName, 54, 26);+ ctx.fillText(displayName, 48, 25);+ const nameW = ctx.measureText(displayName).width;- ctx.font = '500 15px Inter, system-ui, sans-serif';+ // Status label+ ctx.font = '500 13px Inter, system-ui, sans-serif';ctx.fillStyle = status === 'live' ? up : dim;- const statusLabel = status === 'live' ? '● LIVE' : '○ IDLE';- ctx.fillText(statusLabel, 54 + ctx.measureText(displayName + ' ').width, 26);+ ctx.fillText(status === 'live' ? '· live' : '· idle', 48 + nameW + 10, 25);- // Taskbar right: clock+ // Clockconst now = new Date();- const clock = now.toLocaleTimeString('en-US', { hour: '2-digit', minute: '2-digit', hour12: false });- ctx.font = '600 16px Inter, system-ui, monospace';+ const clock = now.toLocaleTimeString('en-US', { hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: false });+ ctx.font = '500 14px "SF Mono", "Fira Code", monospace';ctx.fillStyle = dim;ctx.textAlign = 'right';- ctx.fillText(clock, W - 24, 26);+ ctx.fillText(clock, W - 20, 25);ctx.textAlign = 'left';// Terminal window- const pad = 32;- const winX = pad, winY = 72, winW = W - pad * 2, winH = H - 72 - pad;- const r = 10;-- // Window shadow- ctx.save();- ctx.shadowColor = 'rgba(0,0,0,0.7)';- ctx.shadowBlur = 32;- ctx.shadowOffsetY = 8;- ctx.fillStyle = 'rgba(0,0,0,0)';- ctx.beginPath();- ctx.roundRect?.(winX, winY, winW, winH, r) || fallbackRect(ctx, winX, winY, winW, winH, r);- ctx.fill();- ctx.restore();+ const pad = 28;+ const winX = pad, winY = 66, winW = W - pad * 2, winH = H - 66 - pad;+ const r = 9;- // Window background- ctx.fillStyle = '#0d0d11';+ ctx.fillStyle = '#0b0b10';ctx.beginPath();- ctx.roundRect?.(winX, winY, winW, winH, r) || fallbackRect(ctx, winX, winY, winW, winH, r);+ roundRect(ctx, winX, winY, winW, winH, r);ctx.fill();- ctx.strokeStyle = 'rgba(255,255,255,0.06)';+ ctx.strokeStyle = 'rgba(255,255,255,0.055)';ctx.lineWidth = 1;ctx.stroke();- // Window titlebar- const tbH = 38;- ctx.fillStyle = 'rgba(255,255,255,0.035)';+ // Titlebar+ const tbH = 36;+ ctx.fillStyle = 'rgba(255,255,255,0.028)';ctx.beginPath();- ctx.roundRect?.(winX, winY, winW, tbH, [r, r, 0, 0]) || fallbackRect(ctx, winX, winY, winW, tbH, 0);+ roundRect(ctx, winX, winY, winW, tbH, [r, r, 0, 0]);ctx.fill();- ctx.strokeStyle = 'rgba(255,255,255,0.05)';+ ctx.strokeStyle = 'rgba(255,255,255,0.048)';ctx.beginPath(); ctx.moveTo(winX, winY + tbH); ctx.lineTo(winX + winW, winY + tbH); ctx.stroke();// Traffic lights- const dots = ['#ff5f57', '#febc2e', '#28c840'];- dots.forEach((c, i) => {+ [['#ff5f57', 16], ['#febc2e', 34], ['#28c840', 52]].forEach(([c, x]) => {ctx.beginPath();- ctx.arc(winX + 18 + i * 20, winY + tbH / 2, 6, 0, Math.PI * 2);+ ctx.arc(winX + x, winY + tbH / 2, 5, 0, Math.PI * 2);ctx.fillStyle = c;ctx.fill();});// Window title- ctx.font = '600 14px Inter, system-ui, sans-serif';- ctx.fillStyle = dim;+ ctx.font = '500 12px Inter, system-ui, sans-serif';+ ctx.fillStyle = faint;ctx.textAlign = 'center';ctx.textBaseline = 'middle';ctx.fillText(`${displayName} — activity log`, winX + winW / 2, winY + tbH / 2);ctx.textAlign = 'left';- // Terminal content- const lineH = 36;- const contentX = winX + 24;- let lineY = winY + tbH + 28;- const maxLines = Math.floor((winH - tbH - 56) / lineH);+ // Terminal lines+ const lineH = 34;+ const cX = winX + 22;+ let lY = winY + tbH + 26;+ const maxLines = Math.floor((winH - tbH - 54) / lineH);++ ctx.textBaseline = 'alphabetic';if (!actions.length) {- ctx.font = '500 16px "Courier New", monospace';+ ctx.font = '500 15px "SF Mono", "Fira Code", "Courier New", monospace';ctx.fillStyle = faint;- ctx.textBaseline = 'alphabetic';- ctx.fillText('> Waiting for agent activity…', contentX, lineY);- // blinking cursor- if (Math.sin(t * 4) > 0) {- const cw = ctx.measureText('> Waiting for agent activity…').width;- ctx.fillStyle = faint;- ctx.fillRect(contentX + cw + 4, lineY - 16, 10, 18);+ ctx.fillText('> awaiting agent activity…', cX, lY);+ if (Math.sin(t * 4.5) > 0) {+ const cw = ctx.measureText('> awaiting agent activity…').width;+ ctx.fillStyle = 'rgba(255,255,255,0.25)';+ ctx.fillRect(cX + cw + 3, lY - 14, 9, 17);}} else {- const display = actions.slice(0, maxLines);- display.forEach((a, i) => {- const isLatest = i === 0;- ctx.font = `${isLatest ? '700' : '400'} 15px "Courier New", monospace`;- ctx.fillStyle = isLatest ? text : faint;- ctx.textBaseline = 'alphabetic';-- // Prompt prefix- const prefix = isLatest- ? ` [${relTime(a.ts)}] `- : ` [${relTime(a.ts)}] `;- ctx.fillStyle = isLatest ? up : 'rgba(255,255,255,0.2)';- ctx.font = '600 13px "Courier New", monospace';- ctx.fillText(prefix, contentX, lineY + i * lineH);- const prefixW = ctx.measureText(prefix).width;+ actions.slice(0, maxLines).forEach((a, i) => {+ const latest = i === 0;+ const age = Math.max(0, Math.round((Date.now() - (a.ts || Date.now())) / 1000));+ const ts = age < 5 ? 'now' : age < 60 ? `${age}s` : `${Math.round(age / 60)}m`;++ // Timestamp prefix+ ctx.font = '600 12px "SF Mono", "Fira Code", "Courier New", monospace';+ ctx.fillStyle = latest ? up : 'rgba(255,255,255,0.16)';+ const prefix = `[${ts}] `;+ ctx.fillText(prefix, cX, lY + i * lineH);+ const pw = ctx.measureText(prefix).width;// Summary- ctx.fillStyle = isLatest ? text : dim;- ctx.font = `${isLatest ? '600' : '400'} 14px "Courier New", monospace`;- const summary = (a.summary || a.type || 'action').slice(0, 90);- ctx.fillText(summary, contentX + prefixW, lineY + i * lineH);-- // Latest line: blinking cursor- if (isLatest && Math.sin(t * 4) > 0) {- const tw = prefixW + ctx.measureText(summary).width;+ ctx.font = `${latest ? '600' : '400'} 14px "SF Mono", "Fira Code", "Courier New", monospace`;+ ctx.fillStyle = latest ? text : dim;+ const raw = (a.summary || a.type || 'action');+ const avail = winW - pw - 40;+ // Truncate to fit+ let summary = raw;+ while (summary.length > 4 && ctx.measureText(summary).width > avail) {+ summary = summary.slice(0, -4) + '…';+ }+ ctx.fillText(summary, cX + pw, lY + i * lineH);++ // Blinking cursor on latest line+ if (latest && Math.sin(t * 4.5) > 0) {+ const tw = pw + ctx.measureText(summary).width;ctx.fillStyle = up;- ctx.fillRect(contentX + tw + 4, lineY + i * lineH - 14, 8, 16);+ ctx.fillRect(cX + tw + 3, lY + i * lineH - 13, 7, 15);}});}- // Status bar at bottom of window- const sbY = winY + winH - 28;- ctx.fillStyle = 'rgba(95,208,138,0.08)';- ctx.fillRect(winX + 1, sbY, winW - 2, 27);- ctx.strokeStyle = 'rgba(255,255,255,0.05)';+ // Status bar+ const sbY = winY + winH - 26;+ ctx.fillStyle = 'rgba(95,208,138,0.055)';+ ctx.fillRect(winX + 1, sbY, winW - 2, 25);+ ctx.strokeStyle = 'rgba(255,255,255,0.04)';ctx.beginPath(); ctx.moveTo(winX, sbY); ctx.lineTo(winX + winW, sbY); ctx.stroke();- ctx.font = '600 12px Inter, system-ui, sans-serif';- ctx.fillStyle = 'rgba(95,208,138,0.7)';+ ctx.font = '500 11px Inter, system-ui, sans-serif';ctx.textBaseline = 'middle';- ctx.fillText(- `three.ws agent · ${actions.length ? actions.length + ' actions' : 'idle'}`,- contentX,- sbY + 14,- );+ ctx.fillStyle = 'rgba(95,208,138,0.55)';+ ctx.fillText(`three.ws · ${actions.length || 0} actions`, cX, sbY + 13);ctx.textAlign = 'right';ctx.fillStyle = faint;- ctx.fillText('powered by three.ws', winX + winW - 12, sbY + 14);+ ctx.fillText('powered by three.ws', winX + winW - 10, sbY + 13);ctx.textAlign = 'left';}-function fallbackRect(ctx, x, y, w, h, r) {+function roundRect(ctx, x, y, w, h, r) {+ const tl = Array.isArray(r) ? r[0] : r;+ const tr = Array.isArray(r) ? (r[1] ?? r[0]) : r;+ const br = Array.isArray(r) ? (r[2] ?? r[0]) : r;+ const bl = Array.isArray(r) ? (r[3] ?? r[0]) : r;ctx.beginPath();- ctx.moveTo(x + r, y);- ctx.arcTo(x + w, y, x + w, y + h, r);- ctx.arcTo(x + w, y + h, x, y + h, r);- ctx.arcTo(x, y + h, x, y, r);- ctx.arcTo(x, y, x + w, y, r);+ ctx.moveTo(x + tl, y);+ ctx.arcTo(x + w, y, x + w, y + h, tr);+ ctx.arcTo(x + w, y + h, x, y + h, br);+ ctx.arcTo(x, y + h, x, y, bl);+ ctx.arcTo(x, y, x + w, y, tl);ctx.closePath();}@@ -476,25 +516,32 @@ function fallbackRect(ctx, x, y, w, h, r) {class WatchPanel {constructor(el, { agentId, agentName, avatarUrl, isOwner }) {- this.el = el;- this.agentId = agentId;+ this.el = el;+ this.agentId = agentId;this.agentName = agentName;this.avatarUrl = avatarUrl || '/avatars/mannequin.glb';- this.isOwner = isOwner;-- this._es = null;- this._destroyed = false;- this._actions = [];- this._lastFrame = null;- this._streamStatus = 'connecting'; // connecting | live | idle- this._t = 0;- this._rafId = null;- this._webcamRafId = null;+ this.isOwner = isOwner;++ this._es = null;+ this._destroyed = false;+ this._actions = [];+ this._streamStatus = 'connecting';+ this._lastFrameAt = 0;+ this._frameTimeoutId = null;+ this._activityPollId = null;+ this._fetchingActivity = false;++ // Canvas loop+ this._rafId = null;+ this._t = 0;+ this._lastCanvasPaint = 0;++ // Webcam+ this._webcamRafId = null;this._webcamRenderer = null;- this._webcamScene = null;- this._webcamCamera = null;- this._webcamMixer = null;- this._webcamManager = null;+ this._webcamScene = null;+ this._webcamCamera = null;+ this._webcamMixer = null;this._buildDOM();}@@ -503,76 +550,71 @@ class WatchPanel {this.el.innerHTML = `<div class="wp-root"><div class="wp-stage">- <div class="wp-screen-wrap" id="wp-sw">+ <div class="wp-screen-wrap"><canvas class="wp-screen-canvas" id="wp-canvas" width="${CW}" height="${CH}"></canvas><div class="wp-screen-bezel"></div><div class="wp-screen-badge"><div class="wp-screen-badge-dot offline" id="wp-dot"></div>- <span id="wp-badge-label">Connecting…</span>+ <span id="wp-badge-label">Connecting</span></div>- <button class="wp-screen-expand" id="wp-expand" title="Full screen">⛶</button>+ <button class="wp-screen-expand" aria-label="Fullscreen">⛶</button></div><div class="wp-cam-wrap" id="wp-cw"><video class="wp-cam-video" id="wp-video" autoplay muted playsinline></video>- <canvas class="wp-cam-canvas" id="wp-cam-canvas" style="display:none"></canvas><div class="wp-cam-bezel"></div>+ <div class="wp-cam-scanlines"></div><div class="wp-cam-label">${esc(this.agentName || 'Agent')}</div>- <div class="wp-cam-corner"></div>+ <div class="wp-cam-live offline" id="wp-cam-live"></div></div></div><div class="wp-log"><div class="wp-log-head"><span>Activity log</span>- <span id="wp-log-count" style="font-weight:400">—</span>+ <span class="wp-log-badge" id="wp-log-count">—</span></div><div class="wp-log-list" id="wp-log-list">- <div class="wp-log-empty">Loading activity…</div>+ <div class="wp-log-empty">Loading…</div></div></div></div>`;- this._canvas = this.el.querySelector('#wp-canvas');- this._ctx = this._canvas.getContext('2d');- this._dot = this.el.querySelector('#wp-dot');- this._badge = this.el.querySelector('#wp-badge-label');- this._video = this.el.querySelector('#wp-video');- this._logList = this.el.querySelector('#wp-log-list');+ this._canvas = this.el.querySelector('#wp-canvas');+ this._ctx = this._canvas.getContext('2d');+ this._dot = this.el.querySelector('#wp-dot');+ this._badge = this.el.querySelector('#wp-badge-label');+ this._video = this.el.querySelector('#wp-video');+ this._logList = this.el.querySelector('#wp-log-list');this._logCount = this.el.querySelector('#wp-log-count');+ this._camLive = this.el.querySelector('#wp-cam-live');- // Expand to fullscreen- this.el.querySelector('#wp-expand').addEventListener('click', () => {- const wrap = this.el.querySelector('#wp-sw');- wrap.requestFullscreen?.() || wrap.webkitRequestFullscreen?.();+ this.el.querySelector('.wp-screen-expand').addEventListener('click', () => {+ const wrap = this.el.querySelector('.wp-screen-wrap');+ (wrap.requestFullscreen || wrap.webkitRequestFullscreen || (() => {})).call(wrap);});}async start() {- // Connect SSE stream.this._connectStream();-- // Boot the avatar webcam.- await this._bootWebcam();-- // Start the activity canvas render loop.this._startCanvasLoop();+ this._startActivityPoll();+ await this._bootWebcam();}+ // ── SSE connection ────────────────────────────────────────────────────────+_connectStream() {- if (this._es) { try { this._es.close(); } catch { /* */ } }+ try { this._es?.close(); } catch { /* */ }const es = new EventSource(STREAM_URL(this.agentId));this._es = es;- // Named events from /api/agent-screen-streames.addEventListener('frame', (e) => {try {- const frame = JSON.parse(e.data);- if (frame.data) this._renderFrame(frame.data);- if (frame.activity) {- // Inject into the activity log as a live push- const logEntry = { ts: frame.ts || Date.now(), type: frame.type || 'activity', summary: frame.activity };- this._actions = [logEntry, ...this._actions].slice(0, 50);- this._renderLog();+ const msg = JSON.parse(e.data);+ if (msg.data) this._renderFrame(msg.data);+ if (msg.activity) {+ this._injectAction({ ts: msg.ts || Date.now(), type: msg.type || 'activity', summary: msg.activity });}+ this._bumpFrameTimeout();this._setStatus('live');} catch { /* malformed */ }});@@ -582,8 +624,8 @@ class WatchPanel {const { entries } = JSON.parse(e.data);if (Array.isArray(entries) && entries.length) {this._actions = entries.map((en) => ({- ts: en.ts,- type: en.type || 'activity',+ ts: en.ts || Date.now(),+ type: en.type || 'activity',summary: en.activity || '',}));this._renderLog();@@ -599,26 +641,29 @@ class WatchPanel {if (this._streamStatus !== 'live') this._setStatus('idle');});- es.onerror = () => {- this._setStatus('idle');- // EventSource auto-reconnects.- };+ es.onerror = () => { this._setStatus('idle'); };}+ _bumpFrameTimeout() {+ this._lastFrameAt = Date.now();+ clearTimeout(this._frameTimeoutId);+ this._frameTimeoutId = setTimeout(() => {+ if (!this._destroyed) this._setStatus('idle');+ }, FRAME_TIMEOUT_MS);+ }++ // ── Status ────────────────────────────────────────────────────────────────+_setStatus(s) {this._streamStatus = s;- if (s === 'live') {- this._dot.classList.remove('offline');- this._badge.textContent = 'Live';- } else if (s === 'idle') {- this._dot.classList.add('offline');- this._badge.textContent = 'Idle';- } else {- this._dot.classList.add('offline');- this._badge.textContent = 'Connecting…';- }+ const live = s === 'live';+ this._dot.classList.toggle('offline', !live);+ this._badge.textContent = live ? 'Live' : s === 'idle' ? 'Idle' : 'Connecting';+ this._camLive.classList.toggle('offline', !live);}+ // ── Frame rendering ───────────────────────────────────────────────────────+_renderFrame(dataOrB64) {if (this._destroyed) return;const img = new Image();@@ -626,68 +671,85 @@ class WatchPanel {if (this._destroyed) return;this._ctx.drawImage(img, 0, 0, CW, CH);};- // Accept both raw base64 and full data URLsimg.src = dataOrB64.startsWith('data:') ? dataOrB64 : 'data:image/png;base64,' + dataOrB64;}+ // ── Canvas loop (idle activity view) ──────────────────────────────────────+_startCanvasLoop() {- let lastActivity = 0;const loop = (ts) => {if (this._destroyed) return;this._rafId = requestAnimationFrame(loop);this._t = ts / 1000;- // Only repaint the activity canvas when no live frames are flowing.- if (this._streamStatus !== 'live') {- this._ctx.clearRect(0, 0, CW, CH);- paintActivityCanvas(- this._ctx,- this._actions,- this._streamStatus,- this.agentName,- this._t,- );- }+ // Skip canvas repaint when live frames are flowing — they draw directly.+ if (this._streamStatus === 'live') return;- // Poll DB for activity if we don't have pushed actions.- if (!this._actions.length || Date.now() - lastActivity > 5000) {- if (!this._fetchingActivity) {- this._fetchingActivity = true;- lastActivity = Date.now();- fetch(ACTIONS_URL(this.agentId), { credentials: 'include' })- .then((r) => r.ok ? r.json() : null)- .then((d) => {- if (d?.data?.actions?.length) {- this._actions = d.data.actions;- this._renderLog();- } else if (Array.isArray(d?.actions)) {- this._actions = d.actions;- this._renderLog();- }- })- .catch(() => {})- .finally(() => { this._fetchingActivity = false; });- }- }+ // Cap idle repaints at ~10fps.+ if (ts - this._lastCanvasPaint < IDLE_CANVAS_INTERVAL_MS) return;+ this._lastCanvasPaint = ts;++ paintActivityCanvas(this._ctx, this._actions, this._streamStatus, this.agentName, this._t);};this._rafId = requestAnimationFrame(loop);}- _renderLog() {+ // ── Activity polling ──────────────────────────────────────────────────────++ _startActivityPoll() {+ const poll = async () => {+ if (this._destroyed || this._fetchingActivity) return;+ this._fetchingActivity = true;+ try {+ const r = await fetch(ACTIONS_URL(this.agentId), { credentials: 'include' });+ if (r.ok) {+ const d = await r.json();+ const rows = d?.data?.actions || d?.actions || [];+ if (rows.length) {+ // Only replace if server has newer entries than what the SSE pushed.+ if (rows.length >= this._actions.length) {+ this._actions = rows;+ this._renderLog();+ }+ }+ }+ } catch { /* non-critical */ }+ this._fetchingActivity = false;+ };++ // First load immediately, then on interval.+ poll();+ this._activityPollId = setInterval(poll, ACTIVITY_POLL_MS);+ }++ _injectAction(action) {+ // Prepend a new action from the live SSE, avoiding duplicates.+ const exists = this._actions.some((a) => a.ts === action.ts && a.summary === action.summary);+ if (!exists) {+ this._actions = [action, ...this._actions].slice(0, 50);+ this._renderLog(true);+ }+ }++ // ── Log rendering ─────────────────────────────────────────────────────────++ _renderLog(animate = false) {const actions = this._actions;- this._logCount.textContent = actions.length ? `${actions.length} actions` : '—';+ this._logCount.textContent = actions.length ? `${actions.length} action${actions.length !== 1 ? 's' : ''}` : '—';if (!actions.length) {this._logList.innerHTML = '<div class="wp-log-empty">No activity yet</div>';return;}- this._logList.innerHTML = actions.map((a) => `-<div class="wp-log-row">- <div class="wp-log-type">${esc(a.type || 'action')}</div>+ this._logList.innerHTML = actions.map((a, i) => `+<div class="wp-log-row${animate && i === 0 ? ' wp-log-row--new' : ''}">+ <div class="wp-log-type">${esc((a.type || 'action').slice(0, 12))}</div><div class="wp-log-summary">${esc(a.summary || a.type || '')}</div><div class="wp-log-time">${relTime(a.ts || Date.now())}</div></div>`).join('');}+ // ── Webcam ────────────────────────────────────────────────────────────────+async _bootWebcam() {const wrap = this.el.querySelector('#wp-cw');if (!wrap) return;@@ -695,59 +757,88 @@ class WatchPanel {try {const loader = new GLTFLoader();const gltf = await loader.loadAsync(this.avatarUrl);+ if (this._destroyed) return;+const model = cloneSkinnedScene(gltf.scene);const webcamScene = new Scene();- webcamScene.add(new AmbientLight(0xffffff, 0.7));- const sun = new DirectionalLight(0xffffff, 1.2);- sun.position.set(1.5, 2.5, 2);- webcamScene.add(sun);- const rim = new DirectionalLight(0x8090ff, 0.4);- rim.position.set(-2, 1, -1);+ // Three-point lighting for a webcam-style portrait.+ const key = new DirectionalLight(0xfff4e8, 1.4);+ key.position.set(1.2, 2.2, 1.8);+ webcamScene.add(key);+ const fill = new DirectionalLight(0xc8d8ff, 0.5);+ fill.position.set(-2, 1.0, 0.5);+ webcamScene.add(fill);+ const rim = new DirectionalLight(0xffffff, 0.35);+ rim.position.set(0, 0.5, -2);webcamScene.add(rim);+ webcamScene.add(new AmbientLight(0x111118, 0.9));webcamScene.add(model);- const webcamCamera = new PerspectiveCamera(38, 3 / 4, 0.01, 20);+ // Compute model bounding box to position the camera at face height.const box = new Box3().setFromObject(model);- const h = box.max.y;- webcamCamera.position.set(0, h - 0.12, 0.72);- webcamCamera.lookAt(0, h - 0.18, 0);+ const headY = box.max.y * 0.88; // approximate eye line++ const cam = new PerspectiveCamera(34, 3 / 4, 0.01, 20);+ cam.position.set(0, headY, 0.6);+ cam.lookAt(0, headY * 0.97, 0);const renderer = new WebGLRenderer({ antialias: true, alpha: false });- renderer.setClearColor(0x0d0d10, 1);- renderer.setSize(480, 640);+ renderer.setClearColor(0x0a0a0d, 1);+ renderer.setSize(360, 480);renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));+this._webcamRenderer = renderer;- this._webcamScene = webcamScene;- this._webcamCamera = webcamCamera;+ this._webcamScene = webcamScene;+ this._webcamCamera = cam;+ this._webcamBasePos = { x: 0, y: headY, z: 0.6 };- // Drive idle- const mgr = new AnimationManager(model, { loop: true });+ // Drive animation — prefer GLB's own clips; fall back to procedural camera bob.if (gltf.animations?.length) {- this._webcamMixer = mgr.init(gltf.animations);- mgr.play('idle');- this._webcamManager = mgr;+ const mixer = new AnimationMixer(model);+ this._webcamMixer = mixer;+ // Pick idle-ish clip: prefer 'idle', then 'Idle', then first clip.+ const idleClip = gltf.animations.find((c) =>+ /idle/i.test(c.name)) ?? gltf.animations[0];+ const action = mixer.clipAction(idleClip);+ action.play();}// Tick looplet last = 0;- const tick = (t) => {+ const tick = (ts) => {if (this._destroyed) return;this._webcamRafId = requestAnimationFrame(tick);- const dt = Math.min((t - last) / 1000, 0.1); last = t;+ const dt = Math.min((ts - last) / 1000, 0.1);+ last = ts;++ // Subtle procedural camera bob — 3-axis micro-sway for life.+ const sec = ts / 1000;+ const { x: bx, y: by, z: bz } = this._webcamBasePos;+ cam.position.set(+ bx + Math.sin(sec * 0.37) * 0.004,+ by + Math.sin(sec * 0.22) * 0.006,+ bz + Math.sin(sec * 0.51) * 0.003,+ );+ cam.lookAt(+ Math.sin(sec * 0.28) * 0.003,+ (by * 0.97) + Math.sin(sec * 0.18) * 0.004,+ 0,+ );+if (this._webcamMixer) this._webcamMixer.update(dt);- renderer.render(webcamScene, webcamCamera);+ renderer.render(webcamScene, cam);};this._webcamRafId = requestAnimationFrame(tick);- // Pipe to <video> via captureStream+ // Stream canvas → video element.const stream = renderer.domElement.captureStream?.(15);if (stream && this._video) {this._video.srcObject = stream;- this._video.style.display = 'block';await this._video.play().catch(() => {});}} catch {+ // Webcam unavailable — collapse the cam pane and stretch the screen.const cw = this.el.querySelector('#wp-cw');if (cw) cw.style.display = 'none';const stage = this.el.querySelector('.wp-stage');@@ -755,22 +846,16 @@ class WatchPanel {}}- async _rebootWebcam() {- if (this._webcamRafId) cancelAnimationFrame(this._webcamRafId);- this._webcamRenderer?.dispose?.();- this._webcamRenderer = null;- this._webcamScene = null;- this._webcamCamera = null;- this._webcamMixer = null;- this._webcamManager = null;- await this._bootWebcam();- }+ // ── Teardown ──────────────────────────────────────────────────────────────destroy() {this._destroyed = true;- if (this._rafId) cancelAnimationFrame(this._rafId);- if (this._webcamRafId) cancelAnimationFrame(this._webcamRafId);+ cancelAnimationFrame(this._rafId);+ cancelAnimationFrame(this._webcamRafId);+ clearTimeout(this._frameTimeoutId);+ clearInterval(this._activityPollId);try { this._es?.close(); } catch { /* */ }+ this._webcamMixer?.stopAllAction?.();this._webcamRenderer?.dispose?.();}}@@ -784,7 +869,10 @@ class WatchPanel {* container:HTMLElement, position?:'append'|'prepend' }} opts* @returns {Promise<{destroy():void}|null>}*/-export async function mountWatchPanel({ agentId, agentName, avatarUrl, isOwner = false, container, position = 'append' } = {}) {+export async function mountWatchPanel({+ agentId, agentName, avatarUrl, isOwner = false,+ container, position = 'append',+} = {}) {if (!agentId || !container) return null;injectStyles();diff --git a/vite.config.js b/vite.config.jsindex 709b25d31..8b1c6a74b 100644--- a/vite.config.js+++ b/vite.config.js@@ -333,6 +333,7 @@ const appConfig = {constellation: resolve(__dirname, 'pages/constellation.html'),embed: resolve(__dirname, 'pages/embed.html'),'embed-demo': resolve(__dirname, 'pages/embed-demo.html'),+ integrations: resolve(__dirname, 'pages/integrations.html'),widget: resolve(__dirname, 'pages/widget.html'),launchpad: resolve(__dirname, 'pages/launchpad.html'),launch: resolve(__dirname, 'pages/launch.html'),