Skip to content

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

feat: add embed options for animations, chat, and controls in Studio; update embed URL handling

nirholasccc065cbaefc
diff --git a/api/widgets/_demo-fixtures.js b/api/widgets/_demo-fixtures.js
index 6f79ffb37..562a6b608 100644
--- a/api/widgets/_demo-fixtures.js
+++ b/api/widgets/_demo-fixtures.js
@@ -64,7 +64,7 @@ export const DEMO_WIDGETS = {
showControls: false,
autoRotate: false,
envPreset: 'neutral',
- defaultClip: 'Jump',
+ defaultClip: 'Idle',
loopAll: false,
showClipPicker: true,
},
diff --git a/create.html b/create.html
index 9a59224b5..37542aa18 100644
--- a/create.html
+++ b/create.html
@@ -75,47 +75,6 @@
),
#05060a;
}
- header.topbar {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 18px 28px;
- border-bottom: 1px solid var(--border);
- }
- .back {
- display: inline-flex;
- align-items: center;
- gap: 6px;
- color: var(--muted);
- background: transparent;
- border: 0;
- cursor: pointer;
- text-decoration: none;
- font: inherit;
- font-size: 14px;
- padding: 6px 10px;
- border-radius: 8px;
- transition:
- background 0.15s,
- color 0.15s;
- }
- .back:hover {
- background: rgba(255, 255, 255, 0.04);
- color: var(--text);
- }
- .brand {
- font-weight: 600;
- letter-spacing: -0.01em;
- font-size: 15px;
- }
- .brand a {
- color: var(--text);
- text-decoration: none;
- }
- .spacer {
- width: 72px;
- }
-
main.stage {
max-width: 1100px;
margin: 0 auto;
@@ -425,6 +384,161 @@
}
</style>
<link rel="stylesheet" href="/footer.css" />
+ <style>
+ /* ── Site nav (shared with index.html) ── */
+ :root {
+ --space-xs: 0.382rem;
+ --space-sm: 0.618rem;
+ --space-md: 1rem;
+ --space-lg: 1.618rem;
+ --text-sm: 0.764rem;
+ --text-lg: 1.236rem;
+ --radius-md: 5px;
+ --header-h: 3.5rem;
+ --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
+ }
+ .skip-link {
+ position: absolute;
+ left: -9999px;
+ top: auto;
+ width: 1px;
+ height: 1px;
+ overflow: hidden;
+ }
+ .skip-link:focus {
+ left: 1rem;
+ top: 1rem;
+ width: auto;
+ height: auto;
+ padding: 0.5rem 1rem;
+ background: var(--bg);
+ border: 1px solid var(--border);
+ border-radius: 6px;
+ z-index: 9999;
+ }
+ header.site-header {
+ display: flex;
+ background: rgba(0, 0, 0, 0.8);
+ backdrop-filter: blur(20px);
+ -webkit-backdrop-filter: blur(20px);
+ padding: 0 var(--space-lg);
+ height: var(--header-h);
+ align-items: center;
+ overflow-x: auto;
+ overflow-y: hidden;
+ white-space: nowrap;
+ border-bottom: 1px solid rgba(255, 255, 255, 0.06);
+ z-index: 10;
+ }
+ header.site-header h1 {
+ color: #fff;
+ font-family: var(--font-display);
+ font-size: var(--text-lg);
+ font-weight: 600;
+ margin: 0;
+ letter-spacing: -0.01em;
+ display: flex;
+ align-items: center;
+ gap: var(--space-xs);
+ line-height: var(--header-h);
+ }
+ header.site-header h1 > a {
+ color: inherit;
+ font-size: inherit;
+ text-decoration: none;
+ display: flex;
+ align-items: center;
+ gap: 0.5rem;
+ }
+ .wordmark-dot {
+ width: 8px;
+ height: 8px;
+ border-radius: 50%;
+ background: linear-gradient(135deg, #a78bfa 0%, #6366f1 100%);
+ box-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
+ display: inline-block;
+ }
+ .features-nav {
+ margin-left: auto;
+ display: flex;
+ gap: var(--space-md);
+ align-items: center;
+ }
+ .features-nav a {
+ color: rgba(255, 255, 255, 0.5);
+ text-decoration: none;
+ font-size: var(--text-sm);
+ font-weight: 500;
+ letter-spacing: -0.005em;
+ padding: 0.35rem 0.7rem;
+ border-radius: var(--radius-md);
+ transition: color 0.18s ease, background 0.18s ease;
+ position: relative;
+ }
+ .features-nav a:hover {
+ color: #fff;
+ background: rgba(255, 255, 255, 0.04);
+ }
+ .features-nav a.active {
+ color: #fff;
+ background: rgba(255, 255, 255, 0.06);
+ }
+ .nav-sign-in {
+ border: 1px solid rgba(255, 255, 255, 0.12);
+ border-radius: var(--radius-md);
+ }
+ .nav-user {
+ display: inline-flex;
+ align-items: center;
+ gap: 6px;
+ padding: 4px 10px;
+ border-radius: 20px;
+ border: 1px solid rgba(255, 255, 255, 0.1);
+ background: rgba(255, 255, 255, 0.04);
+ font-size: var(--text-sm);
+ color: rgba(255, 255, 255, 0.55);
+ max-width: 140px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .nav-user::before {
+ content: '';
+ width: 6px;
+ height: 6px;
+ border-radius: 50%;
+ background: #4ade80;
+ flex-shrink: 0;
+ }
+ .nav-user:hover {
+ color: rgba(255, 255, 255, 0.85) !important;
+ border-color: rgba(255, 255, 255, 0.2);
+ background: rgba(255, 255, 255, 0.07);
+ }
+ #btn-wallet-signin {
+ background: none;
+ border: 1px solid rgba(255, 255, 255, 0.12);
+ color: rgba(255, 255, 255, 0.5);
+ font-size: var(--text-sm);
+ font-weight: 500;
+ padding: 0.35rem 0.7rem;
+ border-radius: var(--radius-md);
+ cursor: pointer;
+ transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
+ font-family: inherit;
+ }
+ #btn-wallet-signin:hover {
+ color: #fff;
+ background: rgba(255, 255, 255, 0.04);
+ border-color: rgba(255, 255, 255, 0.2);
+ }
+ @media (max-width: 700px) {
+ .features-nav a:not(.nav-sign-in):not(.nav-user):not(#nav-sign-in) {
+ display: none;
+ }
+ #btn-wallet-signin { display: none; }
+ }
+ </style>
<script
type="module"
src="https://ajax.googleapis.com/ajax/libs/model-viewer/4.0.0/model-viewer.min.js"
@@ -439,28 +553,30 @@
</script>
</head>
<body>
- <header class="topbar">
- <button class="back" id="back-btn" type="button" aria-label="Go back">
- <svg
- width="16"
- height="16"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- stroke-width="2"
- stroke-linecap="round"
- stroke-linejoin="round"
- aria-hidden="true"
+ <a href="#main-content" class="skip-link">Skip to main content</a>
+ <header class="site-header">
+ <h1>
+ <a href="/" aria-label="three.ws home"
+ ><span class="wordmark-dot" aria-hidden="true"></span>three.ws</a
>
- <polyline points="15 18 9 12 15 6" />
- </svg>
- <span>Back</span>
- </button>
- <div class="brand"><a href="/">three.ws</a></div>
- <div class="spacer" aria-hidden="true"></div>
+ </h1>
+ <nav class="features-nav" aria-label="Primary">
+ <a href="/app">Viewer</a>
+ <a href="/create" class="active">Create</a>
+ <a href="/discover">Discover</a>
+ <a href="/features">Features</a>
+ <a href="/widgets">Widgets</a>
+ <a href="/studio">Studio</a>
+ <a href="/docs/widgets">Docs</a>
+ <a href="/dashboard" class="nav-dashboard">Dashboard</a>
+ <a href="/my-agents" id="nav-my-agents" hidden>My Agents</a>
+ <a href="/dashboard" id="nav-user" hidden class="nav-user"></a>
+ <a href="/login" class="nav-sign-in" id="nav-sign-in">Sign in</a>
+ <button id="btn-wallet-signin" style="cursor: pointer">Sign in with wallet</button>
+ </nav>
</header>
- <main class="stage">
+ <main class="stage" id="main-content">
<div class="picker-heading">
<h1>Create new avatar</h1>
</div>
@@ -654,8 +770,11 @@
<a href="/widgets">Widgets</a>
<a href="/features">Features</a>
<a href="/discover">Discover</a>
+ <a href="/showcase">Showcase</a>
<a href="/docs/widgets">Docs</a>
<a href="https://eips.ethereum.org/EIPS/eip-8004" target="_blank" rel="noopener">ERC-8004</a>
+ <a href="/legal/privacy">Privacy</a>
+ <a href="/legal/tos">Terms</a>
</nav>
</div>
<div class="h-footer-bottom">
@@ -711,5 +830,28 @@
></div>
<script type="module" src="/src/create.js"></script>
+ <script>
+ (function () {
+ try {
+ const raw = localStorage.getItem('3dagent:auth-hint');
+ if (raw) {
+ const { authed, name } = JSON.parse(raw);
+ if (authed) {
+ const el = document.getElementById('nav-sign-in');
+ if (el) { el.textContent = 'Dashboard'; el.href = '/dashboard'; }
+ const myAgents = document.getElementById('nav-my-agents');
+ if (myAgents) myAgents.hidden = false;
+ const userEl = document.getElementById('nav-user');
+ if (userEl && name) { userEl.textContent = name; userEl.hidden = false; }
+ }
+ }
+ } catch (_) {}
+ })();
+ </script>
+ <script type="module">
+ import { wireSigninButton } from '/src/wallet-auth.js';
+ const btn = document.getElementById('btn-wallet-signin');
+ if (btn) wireSigninButton(btn);
+ </script>
</body>
</html>
diff --git a/docs/index.html b/docs/index.html
index 5968182c5..a9edc3b43 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -2,96 +2,790 @@
<html lang="en">
<head>
<meta charset="utf-8" />
- <meta name="viewport" content="width=device-width,initial-scale=1" />
- <title>Docs · three.ws</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <title>Docs — three.ws</title>
+ <meta name="description" content="Documentation for three.ws — the open-source platform for 3D AI agents." />
<link rel="icon" href="/favicon.ico" />
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
+ <link
+ href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap"
+ rel="stylesheet"
+ />
+ <link rel="stylesheet" href="/style.css" />
+ <link
+ rel="stylesheet"
+ href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark.min.css"
+ />
+ <script src="https://cdn.jsdelivr.net/npm/[email protected]/marked.min.js"></script>
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<style>
- :root { color-scheme: dark; --accent: #6a5cff; }
- * { box-sizing: border-box; }
+ :root {
+ --sidebar-w: 268px;
+ --header-h: 52px;
+ --docs-accent: #8b5cf6;
+ --docs-accent-soft: rgba(139, 92, 246, 0.12);
+ --docs-bg: #09090f;
+ --sidebar-bg: #0c0c13;
+ --border: rgba(255, 255, 255, 0.07);
+ --text-muted: rgba(224, 224, 224, 0.5);
+ --text-body: rgba(224, 224, 224, 0.85);
+ }
+ *,
+ *::before,
+ *::after {
+ box-sizing: border-box;
+ }
+ html,
+ body {
+ margin: 0;
+ padding: 0;
+ }
body {
- font: 15px/1.6 -apple-system, system-ui, Segoe UI, Roboto, sans-serif;
- background: #0b0b10;
- color: #eee;
+ background: var(--docs-bg);
+ color: #e0e0e0;
+ font-family: var(--font-body);
+ font-size: var(--text-base);
+ line-height: 1.65;
+ }
+
+ /* ── Header ─────────────────────────────────── */
+ .docs-header {
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ height: var(--header-h);
+ background: rgba(9, 9, 15, 0.88);
+ backdrop-filter: blur(16px);
+ -webkit-backdrop-filter: blur(16px);
+ border-bottom: 1px solid var(--border);
+ display: flex;
+ align-items: center;
+ padding: 0 var(--space-lg);
+ gap: var(--space-md);
+ z-index: 100;
+ }
+ .docs-logo {
+ font-family: var(--font-display);
+ font-size: var(--text-lg);
+ font-weight: 600;
+ color: #fff;
+ text-decoration: none;
+ display: flex;
+ align-items: center;
+ gap: 7px;
+ flex-shrink: 0;
+ }
+ .docs-logo-dot {
+ width: 9px;
+ height: 9px;
+ border-radius: 50%;
+ background: linear-gradient(135deg, #a78bfa 0%, #6366f1 100%);
+ flex-shrink: 0;
+ }
+ .docs-header-sep {
+ width: 1px;
+ height: 18px;
+ background: var(--border);
+ flex-shrink: 0;
+ }
+ .docs-header-label {
+ font-size: var(--text-sm);
+ color: var(--text-muted);
+ font-family: var(--font-body);
+ }
+ .docs-header-right {
+ margin-left: auto;
+ display: flex;
+ align-items: center;
+ gap: var(--space-sm);
+ }
+ .docs-header-right a {
+ font-size: var(--text-sm);
+ color: var(--text-muted);
+ text-decoration: none;
+ padding: 4px 10px;
+ border-radius: var(--radius-md);
+ transition: color 0.15s, background 0.15s;
+ }
+ .docs-header-right a:hover {
+ color: #fff;
+ background: rgba(255, 255, 255, 0.05);
+ }
+ .docs-header-right .btn-primary {
+ background: var(--docs-accent-soft);
+ color: #c4b5fd;
+ border: 1px solid rgba(139, 92, 246, 0.25);
+ }
+ .docs-header-right .btn-primary:hover {
+ background: rgba(139, 92, 246, 0.2);
+ color: #ddd6fe;
+ }
+
+ /* ── Shell ───────────────────────────────────── */
+ .docs-shell {
+ display: flex;
+ padding-top: var(--header-h);
+ min-height: 100vh;
+ }
+
+ /* ── Sidebar ─────────────────────────────────── */
+ .docs-sidebar {
+ position: fixed;
+ top: var(--header-h);
+ left: 0;
+ bottom: 0;
+ width: var(--sidebar-w);
+ background: var(--sidebar-bg);
+ border-right: 1px solid var(--border);
+ overflow-y: auto;
+ padding: var(--space-md) 0 var(--space-2xl);
+ scrollbar-width: thin;
+ scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
+ }
+ .docs-sidebar::-webkit-scrollbar {
+ width: 3px;
+ }
+ .docs-sidebar::-webkit-scrollbar-thumb {
+ background: rgba(255, 255, 255, 0.08);
+ border-radius: 2px;
+ }
+
+ .sidebar-search {
+ margin: 0 var(--space-sm) var(--space-md);
+ position: relative;
+ }
+ .sidebar-search input {
+ width: 100%;
+ background: rgba(255, 255, 255, 0.04);
+ border: 1px solid var(--border);
+ border-radius: var(--radius-md);
+ padding: 7px 10px 7px 32px;
+ font-size: var(--text-sm);
+ color: #ccc;
+ outline: none;
+ font-family: var(--font-body);
+ transition: border-color 0.15s, background 0.15s;
+ }
+ .sidebar-search input::placeholder {
+ color: rgba(255, 255, 255, 0.25);
+ }
+ .sidebar-search input:focus {
+ border-color: rgba(139, 92, 246, 0.5);
+ background: rgba(139, 92, 246, 0.05);
+ }
+ .sidebar-search-icon {
+ position: absolute;
+ left: 9px;
+ top: 50%;
+ transform: translateY(-50%);
+ pointer-events: none;
+ opacity: 0.35;
+ }
+
+ .sidebar-section {
+ margin-bottom: var(--space-md);
+ }
+ .sidebar-section-title {
+ display: block;
+ font-size: 10px;
+ font-weight: 700;
+ letter-spacing: 0.1em;
+ text-transform: uppercase;
+ color: rgba(255, 255, 255, 0.28);
+ padding: 0 var(--space-sm) 5px var(--space-md);
+ }
+ .sidebar-link {
+ display: block;
+ padding: 5px var(--space-sm) 5px var(--space-md);
+ font-size: 13.5px;
+ color: rgba(255, 255, 255, 0.52);
+ text-decoration: none;
+ border-left: 2px solid transparent;
+ transition: color 0.12s, background 0.12s, border-color 0.12s;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ line-height: 1.5;
+ }
+ .sidebar-link:hover {
+ color: rgba(255, 255, 255, 0.9);
+ background: rgba(255, 255, 255, 0.035);
+ }
+ .sidebar-link.active {
+ color: #c4b5fd;
+ border-left-color: var(--docs-accent);
+ background: var(--docs-accent-soft);
+ font-weight: 500;
+ }
+ .sidebar-link.external::after {
+ content: '↗';
+ font-size: 10px;
+ margin-left: 4px;
+ opacity: 0.5;
+ }
+
+ /* ── Main ────────────────────────────────────── */
+ .docs-main {
+ flex: 1;
+ margin-left: var(--sidebar-w);
+ padding: var(--space-2xl) clamp(var(--space-lg), 5vw, var(--space-2xl)) 100px;
+ }
+ .docs-content {
+ max-width: 728px;
+ }
+
+ /* ── Markdown typography ─────────────────────── */
+ .docs-content h1 {
+ font-family: var(--font-display);
+ font-weight: 500;
+ font-size: clamp(var(--text-xl), 3vw, var(--text-2xl));
+ letter-spacing: -0.03em;
+ margin: 0 0 var(--space-sm);
+ color: #fff;
+ line-height: 1.2;
+ }
+ .docs-content h2 {
+ font-family: var(--font-display);
+ font-weight: 500;
+ font-size: var(--text-xl);
+ letter-spacing: -0.02em;
+ margin: var(--space-2xl) 0 var(--space-sm);
+ padding-bottom: var(--space-xs);
+ border-bottom: 1px solid var(--border);
+ color: #fff;
+ line-height: 1.3;
+ }
+ .docs-content h2:first-child {
+ margin-top: 0;
+ }
+ .docs-content h3 {
+ font-weight: 600;
+ font-size: var(--text-lg);
+ margin: var(--space-xl) 0 var(--space-xs);
+ color: #f0f0f0;
+ }
+ .docs-content h4 {
+ font-weight: 600;
+ font-size: var(--text-base);
+ margin: var(--space-lg) 0 var(--space-xs);
+ color: #ddd;
+ }
+ .docs-content p {
+ color: var(--text-body);
+ margin: 0 0 var(--space-md);
+ }
+ .docs-content ul,
+ .docs-content ol {
+ padding-left: var(--space-lg);
+ margin: 0 0 var(--space-md);
+ }
+ .docs-content li {
+ color: var(--text-body);
+ margin-bottom: 4px;
+ }
+ .docs-content li > ul,
+ .docs-content li > ol {
+ margin-top: 4px;
+ margin-bottom: 4px;
+ }
+ .docs-content a {
+ color: #a78bfa;
+ text-decoration: none;
+ border-bottom: 1px solid rgba(167, 139, 250, 0.25);
+ transition: color 0.12s, border-color 0.12s;
+ }
+ .docs-content a:hover {
+ color: #c4b5fd;
+ border-bottom-color: rgba(196, 181, 253, 0.5);
+ }
+ .docs-content strong {
+ color: #fff;
+ font-weight: 600;
+ }
+ .docs-content em {
+ color: rgba(224, 224, 224, 0.75);
+ }
+ .docs-content code {
+ font-family: var(--font-mono);
+ font-size: 0.875em;
+ background: rgba(139, 92, 246, 0.1);
+ border: 1px solid rgba(139, 92, 246, 0.18);
+ padding: 1px 5px;
+ border-radius: 3px;
+ color: #c4b5fd;
+ }
+ .docs-content pre {
+ background: #0d0d18;
+ border: 1px solid rgba(255, 255, 255, 0.07);
+ border-radius: var(--radius-md);
+ padding: var(--space-md);
+ overflow-x: auto;
+ margin: 0 0 var(--space-md);
+ position: relative;
+ }
+ .docs-content pre code {
+ background: transparent;
+ border: none;
+ padding: 0;
+ color: inherit;
+ font-size: var(--text-sm);
+ line-height: 1.6;
+ }
+ .docs-content blockquote {
+ border-left: 3px solid var(--docs-accent);
+ margin: 0 0 var(--space-md);
+ padding: var(--space-xs) var(--space-md);
+ background: rgba(139, 92, 246, 0.06);
+ border-radius: 0 var(--radius-md) var(--radius-md) 0;
+ }
+ .docs-content blockquote p {
+ color: rgba(224, 224, 224, 0.7);
margin: 0;
- padding: 40px 24px 80px;
- }
- a { color: #9a8cff; text-decoration: none; }
- a:hover { text-decoration: underline; }
- .container { max-width: 680px; margin: 0 auto; }
- .brand { font-size: 13px; color: #555; margin-bottom: 32px; }
- h1 { font-size: 26px; margin: 0 0 8px; letter-spacing: -0.02em; }
- .sub { color: #888; margin: 0 0 36px; font-size: 15px; }
- h2 { font-size: 14px; font-weight: 600; color: #aaa; text-transform: uppercase; letter-spacing: 0.08em; margin: 32px 0 10px; }
- ul { margin: 0; padding: 0; list-style: none; }
- li { border-top: 1px solid #1e1e28; }
- li:last-child { border-bottom: 1px solid #1e1e28; }
- li a { display: block; padding: 11px 0; color: #ccc; font-size: 14px; }
- li a:hover { color: #fff; text-decoration: none; }
- li a span { font-size: 12px; color: #555; display: block; margin-top: 2px; }
+ }
+ .docs-content table {
+ width: 100%;
+ border-collapse: collapse;
+ margin: 0 0 var(--space-md);
+ font-size: 13.5px;
+ }
+ .docs-content th {
+ text-align: left;
+ padding: 8px var(--space-sm);
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1);
+ color: rgba(255, 255, 255, 0.45);
+ font-weight: 600;
+ font-size: 11px;
+ letter-spacing: 0.06em;
+ text-transform: uppercase;
+ }
+ .docs-content td {
+ padding: 9px var(--space-sm);
+ border-bottom: 1px solid rgba(255, 255, 255, 0.04);
+ color: var(--text-body);
+ vertical-align: top;
+ }
+ .docs-content tr:last-child td {
+ border-bottom: none;
+ }
+ .docs-content hr {
+ border: none;
+ border-top: 1px solid var(--border);
+ margin: var(--space-xl) 0;
+ }
+ .docs-content img {
+ max-width: 100%;
+ border-radius: var(--radius-md);
+ border: 1px solid var(--border);
+ }
+
+ /* ── Loading state ───────────────────────────── */
+ .docs-loading {
+ display: flex;
+ align-items: center;
+ gap: var(--space-sm);
+ color: var(--text-muted);
+ font-size: var(--text-sm);
+ padding: var(--space-2xl) 0;
+ }
+ .docs-loading-dot {
+ width: 6px;
+ height: 6px;
+ border-radius: 50%;
+ background: var(--docs-accent);
+ animation: blink 1s ease-in-out infinite;
+ }
+ @keyframes blink {
+ 0%,
+ 100% {
+ opacity: 0.15;
+ }
+ 50% {
+ opacity: 1;
+ }
+ }
+
+ /* ── Prev/Next nav ───────────────────────────── */
+ .docs-pager {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: var(--space-sm);
+ margin-top: var(--space-2xl);
+ padding-top: var(--space-xl);
+ border-top: 1px solid var(--border);
+ }
+ .docs-pager-btn {
+ display: flex;
+ flex-direction: column;
+ gap: 3px;
+ padding: var(--space-sm) var(--space-md);
+ background: rgba(255, 255, 255, 0.025);
+ border: 1px solid var(--border);
+ border-radius: var(--radius-md);
+ text-decoration: none;
+ transition: background 0.15s, border-color 0.15s;
+ color: inherit;
+ }
+ .docs-pager-btn:hover {
+ background: rgba(255, 255, 255, 0.05);
+ border-color: rgba(255, 255, 255, 0.12);
+ border-bottom-color: rgba(255, 255, 255, 0.12);
+ }
+ .docs-pager-btn .pager-dir {
+ font-size: 10px;
+ text-transform: uppercase;
+ letter-spacing: 0.08em;
+ color: var(--text-muted);
+ }
+ .docs-pager-btn .pager-title {
+ font-size: var(--text-sm);
+ font-weight: 500;
+ color: #e0e0e0;
+ }
+ .docs-pager-btn.next {
+ text-align: right;
+ }
+ .docs-pager-btn.placeholder {
+ visibility: hidden;
+ }
+
+ /* ── Mobile toggle ───────────────────────────── */
+ .sidebar-fab {
+ display: none;
+ position: fixed;
+ bottom: 22px;
+ right: 22px;
+ z-index: 200;
+ background: var(--docs-accent);
+ color: #fff;
+ border: none;
+ border-radius: 50%;
+ width: 46px;
+ height: 46px;
+ cursor: pointer;
+ align-items: center;
+ justify-content: center;
+ box-shadow: 0 4px 24px rgba(139, 92, 246, 0.45);
+ transition: transform 0.15s;
+ }
+ .sidebar-fab:hover {
+ transform: scale(1.06);
+ }
+ .sidebar-overlay {
+ display: none;
+ position: fixed;
+ inset: 0;
+ background: rgba(0, 0, 0, 0.6);
+ z-index: 140;
+ }
+
+ @media (max-width: 860px) {
+ .docs-sidebar {
+ transform: translateX(-100%);
+ transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
+ z-index: 150;
+ box-shadow: 4px 0 32px rgba(0, 0, 0, 0.5);
+ }
+ .docs-sidebar.open {
+ transform: translateX(0);
+ }
+ .docs-main {
+ margin-left: 0;
+ padding: var(--space-lg) var(--space-md) 80px;
+ }
+ .sidebar-fab {
+ display: flex;
+ }
+ .sidebar-overlay.visible {
+ display: block;
+ }
+ }
+
+ /* highlight.js override */
+ .hljs {
+ background: transparent !important;
+ padding: 0 !important;
+ }
+
+ /* Anchor IDs — offset for fixed header */
+ .docs-content h2[id],
+ .docs-content h3[id],
+ .docs-content h4[id] {
+ scroll-margin-top: calc(var(--header-h) + 16px);
+ }
</style>
</head>
<body>
- <div class="container">
- <p class="brand"><a href="/">← three.ws</a></p>
- <h1>Documentation</h1>
- <p class="sub">Guides, API reference, and architecture notes for three.ws.</p>
-
- <h2>Getting started</h2>
- <ul>
- <li><a href="/docs/introduction.md">Introduction <span>What three.ws is and how it works</span></a></li>
- <li><a href="/docs/quick-start.md">Quick start <span>Get up and running in minutes</span></a></li>
- <li><a href="/docs/internal/SETUP.md">Local setup <span>Development environment and environment variables</span></a></li>
- <li><a href="/docs/internal/DEVELOPMENT.md">Development guide <span>Running, building, and testing</span></a></li>
- <li><a href="/docs/deployment.md">Deployment <span>Deploying to Vercel</span></a></li>
- </ul>
-
- <h2>Architecture</h2>
- <ul>
- <li><a href="/docs/architecture.md">Architecture overview <span>How the platform is structured</span></a></li>
- <li><a href="/docs/how-it-works.md">How it works <span>End-to-end flow from GLB to embedded agent</span></a></li>
- <li><a href="/docs/agent-system.md">Agent system <span>How agents are built and orchestrated</span></a></li>
- <li><a href="/docs/memory.md">Memory system <span>Agent memory and persistence</span></a></li>
- <li><a href="/docs/skills.md">Skills system <span>Extending agent capabilities</span></a></li>
- <li><a href="/docs/permissions.md">Permissions &amp; delegation <span>Access control model</span></a></li>
- </ul>
-
- <h2>API reference</h2>
- <ul>
- <li><a href="/docs/api-reference.md">REST API <span>Avatars, agents, OAuth, MCP endpoints</span></a></li>
- <li><a href="/docs/js-api.md">JavaScript API <span>App, Viewer, and Validator classes</span></a></li>
- <li><a href="/docs/web-component.md">Web component <span>&lt;agent-3d&gt; embed API</span></a></li>
- <li><a href="/docs/mcp.md">MCP <span>Model Context Protocol integration</span></a></li>
- <li><a href="/docs/sdk.md">SDK <span>Client library reference</span></a></li>
- <li><a href="/docs/widgets.md">Widgets <span>Widget types, embed codes, and the Widget Studio</span></a></li>
- <li><a href="/docs/widgets">Widgets reference (interactive) <span>Full widget API docs</span></a></li>
- </ul>
-
- <h2>Guides</h2>
- <ul>
- <li><a href="/docs/embedding.md">Embedding <span>Embed agents on any website</span></a></li>
- <li><a href="/docs/authentication.md">Authentication <span>SIWE, Privy, OAuth, and API keys</span></a></li>
- <li><a href="/docs/avatar-creation.md">Avatar creation <span>Creating and customizing avatars</span></a></li>
- <li><a href="/docs/avaturn.md">Avaturn integration <span>Selfie-to-avatar via Avaturn</span></a></li>
- <li><a href="/docs/layers.md">Custom layers <span>Adding your own scene layers</span></a></li>
- <li><a href="/docs/erc8004.md">ERC-8004 <span>On-chain agent identity standard</span></a></li>
- <li><a href="/docs/security.md">Security <span>Security model and best practices</span></a></li>
- </ul>
-
- <h2>Tutorials</h2>
- <ul>
- <li><a href="/docs/tutorials/first-agent.md">Build your first agent <span>Step-by-step from zero to deployed</span></a></li>
- <li><a href="/docs/tutorials/personal-ai-site.md">Build a personal AI site <span>Deploy a personal AI agent site</span></a></li>
- <li><a href="/docs/tutorials/custom-skill.md">Create a custom skill <span>Extend your agent with new capabilities</span></a></li>
- <li><a href="/docs/tutorials/embed-on-website.md">Embed on a website <span>Add your agent to any page</span></a></li>
- <li><a href="/docs/tutorials/register-onchain.md">Register on-chain <span>Mint your agent as an ERC-8004 token</span></a></li>
- </ul>
-
- <h2>Operations</h2>
- <ul>
- <li><a href="/docs/internal/SMOKE_TEST.md">Smoke test <span>Manual verification checklist</span></a></li>
- <li><a href="/docs/internal/VALIDATION_DEPLOY.md">Validation deployment <span>Pre-release checklist</span></a></li>
- <li><a href="/docs/internal/api-inventory.md">API inventory <span>Full list of API endpoints</span></a></li>
- </ul>
+ <header class="docs-header">
+ <a href="/" class="docs-logo">
+ <span class="docs-logo-dot" aria-hidden="true"></span>three.ws
+ </a>
+ <span class="docs-header-sep"></span>
+ <span class="docs-header-label">Docs</span>
+ <nav class="docs-header-right">
+ <a href="/widgets">Widgets</a>
+ <a href="/discover">Discover</a>
+ <a href="/app">Launch app</a>
+ <a href="/studio" class="btn-primary">Studio</a>
+ </nav>
+ </header>
+
+ <div class="docs-shell">
+ <aside class="docs-sidebar" id="sidebar">
+ <div class="sidebar-search">
+ <svg
+ class="sidebar-search-icon"
+ width="14"
+ height="14"
+ fill="none"
+ viewBox="0 0 24 24"
+ stroke="currentColor"
+ stroke-width="2.2"
+ >
+ <circle cx="11" cy="11" r="8" /><path d="m21 21-4.35-4.35" />
+ </svg>
+ <input
+ type="text"
+ id="search-input"
+ placeholder="Search…"
+ autocomplete="off"
+ spellcheck="false"
+ />
+ </div>
+ <nav id="sidebar-nav"></nav>
+ </aside>
+
+ <main class="docs-main">
+ <div class="docs-content" id="docs-content"></div>
+ </main>
</div>
+
+ <div class="sidebar-overlay" id="sidebar-overlay"></div>
+ <button class="sidebar-fab" id="sidebar-fab" aria-label="Open navigation">
+ <svg
+ width="20"
+ height="20"
+ fill="none"
+ viewBox="0 0 24 24"
+ stroke="currentColor"
+ stroke-width="2"
+ >
+ <path d="M4 6h16M4 12h10M4 18h16" />
+ </svg>
+ </button>
+
+ <script>
+ const NAV = [
+ {
+ title: 'Getting started',
+ links: [
+ { label: 'Introduction', path: 'introduction' },
+ { label: 'Quick start', path: 'quick-start' },
+ { label: 'Deployment', path: 'deployment' },
+ { label: 'Local setup', path: 'internal/SETUP' },
+ { label: 'Development guide', path: 'internal/DEVELOPMENT' },
+ ],
+ },
+ {
+ title: 'Architecture',
+ links: [
+ { label: 'Architecture overview', path: 'architecture' },
+ { label: 'How it works', path: 'how-it-works' },
+ { label: 'Agent system', path: 'agent-system' },
+ { label: 'Memory system', path: 'memory' },
+ { label: 'Skills system', path: 'skills' },
+ { label: 'Multi-agent', path: 'multi-agent' },
+ { label: 'Permissions', path: 'permissions' },
+ { label: 'Layers', path: 'layers' },
+ ],
+ },
+ {
+ title: 'API reference',
+ links: [
+ { label: 'REST API', path: 'api-reference' },
+ { label: 'JavaScript API', path: 'js-api' },
+ { label: 'Web component', path: 'web-component' },
+ { label: 'MCP', path: 'mcp' },
+ { label: 'SDK', path: 'sdk' },
+ { label: 'Widgets', path: 'widgets' },
+ { label: 'Widget Studio', path: 'widget-studio' },
+ { label: 'Widget reference', href: '/docs/widgets', external: true },
+ ],
+ },
+ {
+ title: 'Guides',
+ links: [
+ { label: 'Embedding', path: 'embedding' },
+ { label: 'Authentication', path: 'authentication' },
+ { label: 'Avatar creation', path: 'avatar-creation' },
+ { label: 'Avaturn integration', path: 'avaturn' },
+ { label: 'ERC-8004', path: 'erc8004' },
+ { label: 'Security', path: 'security' },
+ { label: 'Configuration', path: 'configuration' },
+ { label: 'Contributing', path: 'contributing' },
+ ],
+ },
+ {
+ title: 'Tutorials',
+ links: [
+ { label: 'Build your first agent', path: 'tutorials/first-agent' },
+ { label: 'Personal AI site', path: 'tutorials/personal-ai-site' },
+ { label: 'Create a custom skill', path: 'tutorials/custom-skill' },
+ { label: 'Embed on a website', path: 'tutorials/embed-on-website' },
+ { label: 'Register on-chain', path: 'tutorials/register-onchain' },
+ ],
+ },
+ {
+ title: 'Reference',
+ links: [
+ { label: 'Examples', path: 'examples' },
+ { label: 'Troubleshooting', path: 'troubleshooting' },
+ { label: 'Changelog', path: 'changelog' },
+ ],
+ },
+ {
+ title: 'Operations',
+ links: [
+ { label: 'Smoke test', path: 'internal/SMOKE_TEST' },
+ { label: 'Validation deployment', path: 'internal/VALIDATION_DEPLOY' },
+ { label: 'API inventory', path: 'internal/api-inventory' },
+ ],
+ },
+ ];
+
+ const ALL_PAGES = NAV.flatMap(s => s.links.filter(l => l.path));
+
+ function currentPath() {
+ return (location.hash.slice(1) || 'introduction').replace(/^\//, '');
+ }
+
+ function buildSidebar(filter) {
+ const q = (filter || '').toLowerCase();
+ const current = currentPath();
+ const nav = document.getElementById('sidebar-nav');
+ nav.innerHTML = NAV.map(section => {
+ const links = section.links.filter(
+ l => !q || l.label.toLowerCase().includes(q),
+ );
+ if (!links.length) return '';
+ return `<div class="sidebar-section">
+ <span class="sidebar-section-title">${section.title}</span>
+ ${links
+ .map(l => {
+ const href = l.href || '#' + l.path;
+ const active = !l.href && l.path === current ? ' active' : '';
+ const external = l.external ? ' external' : '';
+ const target = l.href ? ' target="_blank" rel="noopener"' : '';
+ return `<a href="${href}" class="sidebar-link${active}${external}"${target}>${l.label}</a>`;
+ })
+ .join('')}
+ </div>`;
+ }).join('');
+ }
+
+ marked.setOptions({
+ highlight: (code, lang) => {
+ if (lang && hljs.getLanguage(lang)) {
+ return hljs.highlight(code, { language: lang }).value;
+ }
+ return hljs.highlightAuto(code).value;
+ },
+ gfm: true,
+ breaks: false,
+ });
+
+ async function loadPage(path) {
+ const content = document.getElementById('docs-content');
+ content.innerHTML =
+ '<div class="docs-loading"><span class="docs-loading-dot"></span> Loading…</div>';
+
+ try {
+ const url = '/docs/' + path + '.md';
+ const res = await fetch(url);
+ if (!res.ok) throw new Error(res.status);
+ const md = await res.text();
+
+ const html = marked.parse(md);
+ content.innerHTML = html;
+
+ content.querySelectorAll('pre code').forEach(block => {
+ hljs.highlightElement(block);
+ });
+
+ // Rewrite internal .md links → hash routing
+ content.querySelectorAll('a[href]').forEach(a => {
+ const h = a.getAttribute('href');
+ if (!h || h.startsWith('http') || h.startsWith('#') || h.startsWith('mailto:'))
+ return;
+ if (h.endsWith('.md')) {
+ const rel = h.replace(/^\/docs\//, '').replace(/\.md$/, '');
+ a.href = '#' + rel;
+ }
+ });
+
+ // Add IDs to headings for anchor links
+ content.querySelectorAll('h2, h3, h4').forEach(h => {
+ if (!h.id) {
+ h.id = h.textContent
+ .toLowerCase()
+ .replace(/[^a-z0-9]+/g, '-')
+ .replace(/^-|-$/g, '');
+ }
+ });
+
+ // Prev / Next
+ const idx = ALL_PAGES.findIndex(p => p.path === path);
+ const prev = idx > 0 ? ALL_PAGES[idx - 1] : null;
+ const next = idx < ALL_PAGES.length - 1 ? ALL_PAGES[idx + 1] : null;
+
+ const pager = document.createElement('div');
+ pager.className = 'docs-pager';
+ pager.innerHTML = `
+ ${prev ? `<a href="#${prev.path}" class="docs-pager-btn prev"><span class="pager-dir">← Previous</span><span class="pager-title">${prev.label}</span></a>` : '<div class="docs-pager-btn placeholder"></div>'}
+ ${next ? `<a href="#${next.path}" class="docs-pager-btn next"><span class="pager-dir">Next →</span><span class="pager-title">${next.label}</span></a>` : '<div class="docs-pager-btn placeholder"></div>'}
+ `;
+ content.appendChild(pager);
+ } catch {
+ content.innerHTML =
+ '<p style="color:rgba(255,255,255,0.35);padding-top:2rem">Page not found.</p>';
+ }
+
+ window.scrollTo({ top: 0 });
+ buildSidebar(document.getElementById('search-input').value);
+ }
+
+ function navigate() {
+ loadPage(currentPath());
+ }
+
+ window.addEventListener('hashchange', navigate);
+
+ document.getElementById('search-input').addEventListener('input', e => {
+ buildSidebar(e.target.value);
+ });
+
+ const fab = document.getElementById('sidebar-fab');
+ const sidebar = document.getElementById('sidebar');
+ const overlay = document.getElementById('sidebar-overlay');
+
+ fab.addEventListener('click', () => {
+ sidebar.classList.add('open');
+ overlay.classList.add('visible');
+ });
+ overlay.addEventListener('click', () => {
+ sidebar.classList.remove('open');
+ overlay.classList.remove('visible');
+ });
+ sidebar.addEventListener('click', e => {
+ if (e.target.closest('.sidebar-link') && window.innerWidth <= 860) {
+ sidebar.classList.remove('open');
+ overlay.classList.remove('visible');
+ }
+ });
+
+ buildSidebar();
+ navigate();
+ </script>
</body>
</html>
diff --git a/public/discover/index.html b/public/discover/index.html
index d118ed3e0..7b5257bd9 100644
--- a/public/discover/index.html
+++ b/public/discover/index.html
@@ -48,7 +48,7 @@
<a href="/features">Features</a>
<a href="/widgets">Widgets</a>
<a href="/studio">Studio</a>
- <a href="/docs/widgets">Docs</a>
+ <a href="/docs">Docs</a>
<a href="/my-agents" id="nav-my-agents" hidden>My Agents</a>
<a href="/dashboard" class="nav-dashboard">Dashboard</a>
<a href="/login" class="nav-sign-in" id="nav-sign-in">Sign in</a>
diff --git a/public/docs-widgets.html b/public/docs-widgets.html
index db4793c3e..e1bf42287 100644
--- a/public/docs-widgets.html
+++ b/public/docs-widgets.html
@@ -29,6 +29,8 @@
/>
<link rel="stylesheet" href="/style.css" />
<link rel="stylesheet" href="/widgets-gallery/gallery.css" />
+ <link rel="stylesheet" href="/footer.css" />
+ <script type="module" src="https://ajax.googleapis.com/ajax/libs/model-viewer/4.0.0/model-viewer.min.js"></script>
<style>
.docs-main {
max-width: 760px;
@@ -434,12 +436,67 @@ img-src https://three.ws/ data:;</code></pre>
</p>
</main>
- <footer class="gallery-footer">
- <p>
- three.ws · <a href="/">Viewer</a> · <a href="/widgets">Widgets</a> ·
- <a href="/docs/widgets">Docs</a> ·
- <a href="https://github.com/nirholas/3D">GitHub</a>
- </p>
+ <footer class="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-avatar" aria-hidden="true">
+ <model-viewer
+ src="/animations/robotexpressive.glb"
+ auto-rotate
+ auto-rotate-delay="0"
+ rotation-per-second="20deg"
+ interaction-prompt="none"
+ camera-controls="false"
+ disable-zoom
+ shadow-intensity="0"
+ exposure="0.7"
+ environment-image="neutral"
+ camera-orbit="0deg 80deg 4m"
+ field-of-view="35deg"
+ loading="lazy"
+ ></model-viewer>
+ </div>
+ <div class="h-footer-inner">
+ <div class="h-footer-brand-col">
+ <div class="h-footer-brand">
+ <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">
+ <a href="https://github.com/nirholas/3D" target="_blank" rel="noopener">GitHub</a>
+ <a href="/create">Create</a>
+ <a href="/studio">Studio</a>
+ <a href="/widgets">Widgets</a>
+ <a href="/features">Features</a>
+ <a href="/discover">Discover</a>
+ <a href="/showcase">Showcase</a>
+ <a href="/docs/widgets">Docs</a>
+ <a href="https://eips.ethereum.org/EIPS/eip-8004" target="_blank" rel="noopener">ERC-8004</a>
+ <a href="/legal/privacy">Privacy</a>
+ <a href="/legal/tos">Terms</a>
+ </nav>
+ </div>
+ <div class="h-footer-bottom">
+ <p class="h-footer-legal">© 2026 three.ws — All rights reserved.</p>
+ <div class="h-footer-badges">
+ <span class="h-footer-badge" aria-label="System status">
+ <span class="h-footer-status-dot" aria-hidden="true"></span>
+ <span>All systems normal</span>
+ </span>
+ <span class="h-footer-badge">
+ <svg viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" d="M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0zm0 14.5A6.5 6.5 0 1 1 8 1.5a6.5 6.5 0 0 1 0 13zm-1-9.25a1 1 0 1 1 2 0v3.5a1 1 0 1 1-2 0v-3.5zm1 6.5a1.1 1.1 0 1 1 0-2.2 1.1 1.1 0 0 1 0 2.2z"/></svg>
+ <span>Transparent by default</span>
+ </span>
+ <a class="h-footer-badge" href="https://github.com/nirholas/3D" target="_blank" rel="noopener" aria-label="View source on GitHub">
+ <svg viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"/></svg>
+ <span>Open source</span>
+ </a>
+ </div>
+ </div>
</footer>
</body>
</html>
diff --git a/public/features/index.html b/public/features/index.html
index 4c3e0c75b..40f99c35b 100644
--- a/public/features/index.html
+++ b/public/features/index.html
@@ -48,7 +48,7 @@
<a href="/features" class="active" aria-current="page">Features</a>
<a href="/widgets">Widgets</a>
<a href="/studio">Studio</a>
- <a href="/docs/widgets">Docs</a>
+ <a href="/docs">Docs</a>
<a href="/my-agents" class="nav-my-agents" id="nav-my-agents" hidden>My Agents</a>
<a href="/dashboard" class="nav-dashboard">Dashboard</a>
<a href="/login" class="nav-sign-in">Sign in</a>
@@ -478,7 +478,7 @@
<a href="/features">Features</a>
<a href="/discover">Discover</a>
<a href="/showcase">Showcase</a>
- <a href="/docs/widgets">Docs</a>
+ <a href="/docs">Docs</a>
<a href="https://eips.ethereum.org/EIPS/eip-8004" target="_blank" rel="noopener">ERC-8004</a>
<a href="/legal/privacy">Privacy</a>
<a href="/legal/tos">Terms</a>
diff --git a/public/my-agents/index.html b/public/my-agents/index.html
index 85c74b87c..d3e52c1a9 100644
--- a/public/my-agents/index.html
+++ b/public/my-agents/index.html
@@ -20,7 +20,7 @@
<a href="/features">Features</a>
<a href="/widgets">Widgets</a>
<a href="/studio">Studio</a>
- <a href="/docs/widgets">Docs</a>
+ <a href="/docs">Docs</a>
<a href="/my-agents" aria-current="page">My Agents</a>
<a href="/dashboard">Dashboard</a>
</nav>
diff --git a/public/studio/index.html b/public/studio/index.html
index a61e4818c..49e46f37e 100644
--- a/public/studio/index.html
+++ b/public/studio/index.html
@@ -33,7 +33,7 @@
<a href="/features">Features</a>
<a href="/widgets">Widgets</a>
<a href="/studio" aria-current="page">Studio</a>
- <a href="/docs/widgets">Docs</a>
+ <a href="/docs">Docs</a>
<a href="/my-agents">My Agents</a>
<a href="/dashboard">Dashboard</a>
<a class="btn-ghost" id="signin-link" href="/login?next=/studio" hidden>Sign in</a>
@@ -229,6 +229,22 @@
</label>
</div>
+ <div id="embed-options" hidden>
+ <p style="margin:12px 0 6px;font-size:0.82em;text-transform:uppercase;letter-spacing:0.05em;opacity:0.5">Include in embed</p>
+ <label class="field row" id="embed-opt-animations" hidden>
+ <input type="checkbox" id="embed-include-animations" checked />
+ <span>Animations panel</span>
+ </label>
+ <label class="field row" id="embed-opt-chat" hidden>
+ <input type="checkbox" id="embed-include-chat" checked />
+ <span>Chat UI</span>
+ </label>
+ <label class="field row" id="embed-opt-controls" hidden>
+ <input type="checkbox" id="embed-include-controls" checked />
+ <span>3D orbit controls</span>
+ </label>
+ </div>
+
<label class="field">
<span>iframe snippet</span>
<div class="copy-row">
diff --git a/public/studio/studio.js b/public/studio/studio.js
index c30f07acc..6ecb5ba94 100644
--- a/public/studio/studio.js
+++ b/public/studio/studio.js
@@ -439,6 +439,10 @@ function wireButtons() {
$('#embed-width').addEventListener('input', _refreshEmbedSnippet);
$('#embed-height').addEventListener('input', _refreshEmbedSnippet);
+
+ for (const id of ['embed-include-animations', 'embed-include-chat', 'embed-include-controls']) {
+ $(`#${id}`).addEventListener('change', _refreshEmbedSnippet);
+ }
}
// ── preview ──────────────────────────────────────────────────────────────────
@@ -564,23 +568,52 @@ async function save({ generate }) {
}
let _currentEmbedUrl = '';
+let _currentWidgetType = '';
+
+function _buildEmbedUrl(baseUrl) {
+ const params = [];
+ if ($('#embed-opt-animations')?.hidden === false && !$('#embed-include-animations').checked)
+ params.push('noAnimations=1');
+ if ($('#embed-opt-chat')?.hidden === false && !$('#embed-include-chat').checked)
+ params.push('noChat=1');
+ if ($('#embed-opt-controls')?.hidden === false && !$('#embed-include-controls').checked)
+ params.push('noControls=1');
+ return params.length ? `${baseUrl}&${params.join('&')}` : baseUrl;
+}
function _refreshEmbedSnippet() {
if (!_currentEmbedUrl) return;
+ const url = _buildEmbedUrl(_currentEmbedUrl);
const w = parseInt($('#embed-width').value) || 600;
const h = parseInt($('#embed-height').value) || 600;
- $('#embed-iframe-snippet').value = `<iframe src="${_currentEmbedUrl}" width="${w}" height="${h}" style="border:0;border-radius:12px" allow="autoplay; xr-spatial-tracking" loading="lazy"></iframe>`;
+ $('#embed-iframe-snippet').value = `<iframe src="${url}" width="${w}" height="${h}" style="border:0;border-radius:12px" allow="autoplay; xr-spatial-tracking" loading="lazy"></iframe>`;
+ $('#embed-preview-iframe').src = url;
}
function openEmbedModal(widget) {
const origin = location.origin;
const shareUrl = `${origin}/w/${widget.id}`;
_currentEmbedUrl = `${origin}/app#widget=${widget.id}&kiosk=true`;
+ _currentWidgetType = widget.type || state.type;
+
+ // Show relevant embed-option checkboxes for this widget type, reset to checked.
+ const hasAnimations = _currentWidgetType === 'animation-gallery';
+ const hasChat = _currentWidgetType === 'talking-agent';
+ const hasControls = ['turntable', 'animation-gallery', 'passport'].includes(_currentWidgetType);
+ $('#embed-opt-animations').hidden = !hasAnimations;
+ $('#embed-opt-chat').hidden = !hasChat;
+ $('#embed-opt-controls').hidden = !hasControls;
+ const anyOption = hasAnimations || hasChat || hasControls;
+ $('#embed-options').hidden = !anyOption;
+ // Reset checkboxes to "include everything" each time modal opens.
+ $('#embed-include-animations').checked = true;
+ $('#embed-include-chat').checked = true;
+ $('#embed-include-controls').checked = true;
+
$('#embed-share-url').value = shareUrl;
_refreshEmbedSnippet();
$('#embed-script-snippet').value =
`<script async src="${origin}/embed.js" data-widget="${widget.id}"></` + 'script>';
- $('#embed-preview-iframe').src = _currentEmbedUrl;
$('#embed-modal').hidden = false;
}
diff --git a/public/widgets-gallery/index.html b/public/widgets-gallery/index.html
index beda2e4cd..e236867bf 100644
--- a/public/widgets-gallery/index.html
+++ b/public/widgets-gallery/index.html
@@ -30,6 +30,8 @@
/>
<link rel="stylesheet" href="/style.css" />
<link rel="stylesheet" href="/widgets-gallery/gallery.css" />
+ <link rel="stylesheet" href="/footer.css" />
+ <script type="module" src="https://ajax.googleapis.com/ajax/libs/model-viewer/4.0.0/model-viewer.min.js"></script>
</head>
<body class="gallery-body">
<header class="gallery-header">
@@ -43,7 +45,7 @@
<a href="/features">Features</a>
<a href="/widgets" class="active" aria-current="page">Widgets</a>
<a href="/studio">Studio</a>
- <a href="/docs/widgets">Docs</a>
+ <a href="/docs">Docs</a>
<a href="/my-agents">My Agents</a>
<a href="/dashboard" class="nav-dashboard">Dashboard</a>
<a href="/login" class="nav-sign-in">Sign in</a>
@@ -83,20 +85,67 @@
</section>
</main>
- <footer class="gallery-footer">
- <p>
- three.ws ·
- <a href="https://github.com/nirholas/3D" target="_blank" rel="noopener">GitHub</a> ·
- <a href="/create">Create</a> ·
- <a href="/studio">Studio</a> ·
- <a href="/widgets">Widgets</a> ·
- <a href="/features">Features</a> ·
- <a href="/discover">Discover</a> ·
- <a href="/docs/widgets">Docs</a> ·
- <a href="https://eips.ethereum.org/EIPS/eip-8004" target="_blank" rel="noopener">ERC-8004</a> ·
- <a href="/legal/privacy">Privacy</a> ·
- <a href="/legal/tos">Terms</a>
- </p>
+ <footer class="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-avatar" aria-hidden="true">
+ <model-viewer
+ src="/animations/robotexpressive.glb"
+ auto-rotate
+ auto-rotate-delay="0"
+ rotation-per-second="20deg"
+ interaction-prompt="none"
+ camera-controls="false"
+ disable-zoom
+ shadow-intensity="0"
+ exposure="0.7"
+ environment-image="neutral"
+ camera-orbit="0deg 80deg 4m"
+ field-of-view="35deg"
+ loading="lazy"
+ ></model-viewer>
+ </div>
+ <div class="h-footer-inner">
+ <div class="h-footer-brand-col">
+ <div class="h-footer-brand">
+ <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">
+ <a href="https://github.com/nirholas/3D" target="_blank" rel="noopener">GitHub</a>
+ <a href="/create">Create</a>
+ <a href="/studio">Studio</a>
+ <a href="/widgets">Widgets</a>
+ <a href="/features">Features</a>
+ <a href="/discover">Discover</a>
+ <a href="/showcase">Showcase</a>
+ <a href="/docs">Docs</a>
+ <a href="https://eips.ethereum.org/EIPS/eip-8004" target="_blank" rel="noopener">ERC-8004</a>
+ <a href="/legal/privacy">Privacy</a>
+ <a href="/legal/tos">Terms</a>
+ </nav>
+ </div>
+ <div class="h-footer-bottom">
+ <p class="h-footer-legal">© 2026 three.ws — All rights reserved.</p>
+ <div class="h-footer-badges">
+ <span class="h-footer-badge" aria-label="System status">
+ <span class="h-footer-status-dot" aria-hidden="true"></span>
+ <span>All systems normal</span>
+ </span>
+ <span class="h-footer-badge">
+ <svg viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" d="M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0zm0 14.5A6.5 6.5 0 1 1 8 1.5a6.5 6.5 0 0 1 0 13zm-1-9.25a1 1 0 1 1 2 0v3.5a1 1 0 1 1-2 0v-3.5zm1 6.5a1.1 1.1 0 1 1 0-2.2 1.1 1.1 0 0 1 0 2.2z"/></svg>
+ <span>Transparent by default</span>
+ </span>
+ <a class="h-footer-badge" href="https://github.com/nirholas/3D" target="_blank" rel="noopener" aria-label="View source on GitHub">
+ <svg viewBox="0 0 16 16" aria-hidden="true"><path fill="currentColor" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"/></svg>
+ <span>Open source</span>
+ </a>
+ </div>
+ </div>
</footer>
<script type="module" src="/widgets-gallery/gallery.js"></script>
diff --git a/scripts/backfill-erc8004.mjs b/scripts/backfill-erc8004.mjs
index d8e81f195..c3233e8e1 100644
--- a/scripts/backfill-erc8004.mjs
+++ b/scripts/backfill-erc8004.mjs
@@ -52,7 +52,7 @@ const ALCHEMY_SLUGS = {
};
const CHAINS = [
- { id: 8453, name: 'Base', publicRpc: 'https://mainnet.base.org', registry: '0x8004A169FB4a3325136EB29fA0ceB6D2e539a432' },
+ { id: 8453, name: 'Base', publicRpc: 'https://base-rpc.publicnode.com', registry: '0x8004A169FB4a3325136EB29fA0ceB6D2e539a432' },
{ id: 42161, name: 'Arbitrum One', publicRpc: 'https://arb1.arbitrum.io/rpc', registry: '0x8004A169FB4a3325136EB29fA0ceB6D2e539a432' },
{ id: 56, name: 'BNB Chain', publicRpc: 'https://bsc-dataseed.bnbchain.org', registry: '0x8004A169FB4a3325136EB29fA0ceB6D2e539a432' },
{ id: 1, name: 'Ethereum', publicRpc: 'https://eth.llamarpc.com', registry: '0x8004A169FB4a3325136EB29fA0ceB6D2e539a432' },
@@ -97,57 +97,80 @@ async function jsonRpc(url, method, params) {
return body.result;
}
+function alchemyUrl(chain) {
+ if (ALCHEMY_KEY && ALCHEMY_SLUGS[chain.id]) {
+ return `https://${ALCHEMY_SLUGS[chain.id]}.g.alchemy.com/v2/${ALCHEMY_KEY}`;
+ }
+ return chain.publicRpc;
+}
+
+async function findDeployBlock(chain) {
+ // Use Alchemy for binary search — eth_getCode has no range limit on free tier.
+ const url = alchemyUrl(chain);
+ const latestHex = await jsonRpc(url, 'eth_blockNumber', []);
+ const latest = Number(latestHex);
+ const hasCode = async (block) => {
+ const code = await jsonRpc(url, 'eth_getCode', [chain.registry, '0x' + block.toString(16)]);
+ return code && code !== '0x';
+ };
+ if (!(await hasCode(latest))) return null;
+ let lo = 0, hi = latest;
+ while (lo < hi) {
+ const mid = Math.floor((lo + hi) / 2);
+ if (await hasCode(mid)) hi = mid; else lo = mid + 1;
+ }
+ return lo;
+}
+
async function getLogs(chain) {
- const preferred = rpcUrl(chain);
- // If Alchemy fails (network not enabled in app), fall back to public RPC.
- const urls = preferred !== chain.publicRpc ? [preferred, chain.publicRpc] : [chain.publicRpc];
- const url = urls[0];
- const filter = { address: chain.registry, topics: [REGISTERED_TOPIC], fromBlock: '0x0', toBlock: 'latest' };
+ const url = chain.publicRpc;
- for (const endpoint of urls) {
- try {
- return await jsonRpc(endpoint, 'eth_getLogs', [filter]);
- } catch (e) {
- const isHttpErr = /HTTP \d/.test(e.message);
- const isRangeErr = /range|limit/i.test(e.message);
-
- // HTTP errors (400, 413, 429…) mean this endpoint won't work — try next.
- if (isHttpErr && endpoint !== urls.at(-1)) continue;
-
- // JSON-RPC range error — chunk with this endpoint.
- if (isRangeErr && !isHttpErr) {
- const match = e.message.match(/([\d,_]+)\s*(?:block|range)/i);
- const chunkSize = match ? parseInt(match[1].replace(/[,_]/g, ''), 10) : 2000;
- const latestHex = await jsonRpc(endpoint, 'eth_blockNumber', []);
- const latest = Number(latestHex);
- const logs = [];
- for (let from = 0; from <= latest; from += chunkSize) {
- const to = Math.min(from + chunkSize - 1, latest);
- let retries = 3;
- while (retries-- > 0) {
- try {
- const chunk = await jsonRpc(endpoint, 'eth_getLogs', [{
- ...filter,
- fromBlock: '0x' + from.toString(16),
- toBlock: '0x' + to.toString(16),
- }]);
- logs.push(...chunk);
- break;
- } catch (re) {
- if (/rate.limit|429/i.test(re.message) && retries > 0) {
- await new Promise(r => setTimeout(r, 1000));
- } else throw re;
- }
- }
- await new Promise(r => setTimeout(r, 80)); // avoid hammering the RPC
- process.stdout.write(`\r chunking ${Math.round(to / latest * 100)}%… `);
+ process.stdout.write(' detecting deploy block…');
+ const deployBlock = await findDeployBlock(chain);
+ if (deployBlock === null) {
+ process.stdout.write(' not deployed, skipping.');
+ return [];
+ }
+
+ const filter = { address: chain.registry, topics: [REGISTERED_TOPIC], fromBlock: '0x' + deployBlock.toString(16), toBlock: 'latest' };
+
+ try {
+ return await jsonRpc(url, 'eth_getLogs', [filter]);
+ } catch (e) {
+ const isRangeErr = /range|limit/i.test(e.message) && !/HTTP/.test(e.message);
+ if (!isRangeErr) throw e;
+
+ // RPC caps block range — chunk from deploy block.
+ const match = e.message.match(/([\d,_]+)\s*(?:block|range)/i);
+ const chunkSize = match ? parseInt(match[1].replace(/[,_]/g, ''), 10) : 2000;
+ const latestHex = await jsonRpc(url, 'eth_blockNumber', []);
+ const latest = Number(latestHex);
+ const span = latest - deployBlock;
+ const logs = [];
+ for (let from = deployBlock; from <= latest; from += chunkSize) {
+ const to = Math.min(from + chunkSize - 1, latest);
+ let retries = 3;
+ while (retries-- > 0) {
+ try {
+ const chunk = await jsonRpc(url, 'eth_getLogs', [{
+ ...filter,
+ fromBlock: '0x' + from.toString(16),
+ toBlock: '0x' + to.toString(16),
+ }]);
+ logs.push(...chunk);
+ break;
+ } catch (re) {
+ if (/rate.limit|429/i.test(re.message) && retries > 0) {
+ await new Promise(r => setTimeout(r, 1500));
+ } else throw re;
}
- return logs;
}
-
- throw e;
+ await new Promise(r => setTimeout(r, 150));
+ process.stdout.write(`\r chunking ${Math.round((from - deployBlock) / span * 100)}%… `);
}
+ return logs;
}
+
}
async function backfillChain(chain) {
diff --git a/src/app.js b/src/app.js
index 801e07573..bd177e732 100644
--- a/src/app.js
+++ b/src/app.js
@@ -145,6 +145,10 @@ class App {
pending: qp.get('pending') === '1',
// avatarSession: selfie pipeline passes a session URL here after processing photos
avatarSession: hash.avatarSession ? decodeURIComponent(hash.avatarSession) : '',
+ // Per-embed overrides (appended to iframe URL by Studio embed modal)
+ noAnimations: Boolean(hash.noAnimations),
+ noChat: Boolean(hash.noChat),
+ noControls: Boolean(hash.noControls),
};
this.el = el;
@@ -869,9 +873,14 @@ class App {
}
window.VIEWER.widget = widget;
- const cfg = widget.config || {};
+ const cfg = { ...(widget.config || {}) };
const modelUrl = widget.avatar?.model_url || '/avatars/cz.glb';
+ // Apply per-embed URL overrides (set by Studio embed modal checkboxes).
+ if (this.options.noAnimations) cfg.showClipPicker = false;
+ if (this.options.noChat) cfg._noChat = true;
+ if (this.options.noControls) cfg.showControls = false;
+
// Apply config to options BEFORE creating the viewer so first frame is right.
if (Array.isArray(cfg.cameraPosition) && cfg.cameraPosition.length === 3) {
this.options.cameraPosition = cfg.cameraPosition;
@@ -907,7 +916,7 @@ class App {
const container = document.body;
const ctl = await mountAnimationGallery(this.viewer, cfg, container);
this._widgetController = ctl;
- } else if (type === 'talking-agent') {
+ } else if (type === 'talking-agent' && !cfg._noChat) {
const ctl = await mountTalkingAgent(this.viewer, cfg, document.body, {
widgetId,
getSceneCtrl: () => this.sceneCtrl || window.VIEWER?.scene_ctrl || null,
@@ -1516,7 +1525,7 @@ class App {
<a href="/widgets">Widgets</a>
<a href="/features">Features</a>
<a href="/discover">Discover</a>
- <a href="/docs/widgets">Docs</a>
+ <a href="/docs">Docs</a>
<a href="https://eips.ethereum.org/EIPS/eip-8004" target="_blank" rel="noopener">ERC-8004</a>
</nav>
</div>