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
feat: add mini bot to header and update user display name handling in authentication
nirholasfbccf97a8433
diff --git a/api/widgets/_demo-fixtures.js b/api/widgets/_demo-fixtures.jsindex ee91a707a..6f79ffb37 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: '',+ defaultClip: 'Jump',loopAll: false,showClipPicker: true,},diff --git a/home.css b/home.cssindex a22eda798..04f7e3acd 100644--- a/home.css+++ b/home.css@@ -88,6 +88,27 @@box-shadow: 0 0 12px rgba(255, 143, 77, 0.6);}+/* ── Mini bot in header ──────────────────────────────────────────────────── */++.h-header-bot {+ position: absolute;+ left: 50%;+ transform: translateX(-50%);+ bottom: -18px;+ width: 72px;+ height: 88px;+ pointer-events: none;+ z-index: 201;+ filter: grayscale(0.6) drop-shadow(0 0 10px rgba(255, 215, 106, 0.2));+}++.h-header-bot model-viewer {+ width: 100%;+ height: 100%;+ background: transparent;+ --poster-color: transparent;+}+/* ── Loading flash on page reveal ────────────────────────────────────────── */@keyframes h-page-in {@@ -1592,6 +1613,37 @@color: #1a0f08;}+.home-nav .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: 0.85rem;+ color: rgba(255, 255, 255, 0.55);+ max-width: 140px;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+}++.home-nav .nav-user::before {+ content: '';+ width: 6px;+ height: 6px;+ border-radius: 50%;+ background: #4ade80;+ flex-shrink: 0;+}++.home-nav .nav-user:hover {+ color: rgba(255, 255, 255, 0.85);+ border-color: rgba(255, 255, 255, 0.2);+ background: rgba(255, 255, 255, 0.07);+}+/* ── Scroll reveal ── */.h-reveal {diff --git a/home.html b/home.htmlindex e99463912..2be4c6c3a 100644--- a/home.html+++ b/home.html@@ -57,6 +57,23 @@><span class="wordmark-dot" aria-hidden="true"></span>three.ws</a></h1>+ <div class="h-header-bot" aria-hidden="true">+ <model-viewer+ src="/animations/robotexpressive.glb"+ auto-rotate+ auto-rotate-delay="0"+ rotation-per-second="15deg"+ interaction-prompt="none"+ camera-controls="false"+ disable-zoom+ shadow-intensity="0"+ exposure="0.8"+ environment-image="neutral"+ camera-orbit="0deg 78deg 4.5m"+ field-of-view="42deg"+ loading="lazy"+ ></model-viewer>+ </div><nav class="home-nav" aria-label="Primary"><a href="/app">Viewer</a><a href="/discover">Discover</a>@@ -65,6 +82,7 @@<a href="/studio">Studio</a><a href="/docs/widgets">Docs</a><a href="/my-agents" id="home-nav-my-agents" hidden>My Agents</a>+ <a href="/dashboard" id="home-nav-user" hidden class="nav-user"></a><a href="/login" class="nav-cta" id="home-nav-cta">Get started</a></nav></header>@@ -541,7 +559,7 @@try {const raw = localStorage.getItem('3dagent:auth-hint');if (!raw) return;- const { authed } = JSON.parse(raw);+ const { authed, name } = JSON.parse(raw);if (!authed) return;const cta = document.getElementById('home-nav-cta');if (cta) {@@ -550,6 +568,11 @@}const myAgents = document.getElementById('home-nav-my-agents');if (myAgents) myAgents.hidden = false;+ const userEl = document.getElementById('home-nav-user');+ if (userEl && name) {+ userEl.textContent = name;+ userEl.hidden = false;+ }} catch (_) {}})();diff --git a/index.html b/index.htmlindex 76da6d31f..7a57a05cc 100644--- a/index.html+++ b/index.html@@ -777,6 +777,7 @@<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>@@ -1245,7 +1246,7 @@try {const raw = localStorage.getItem('3dagent:auth-hint');if (raw) {- const { authed } = JSON.parse(raw);+ const { authed, name } = JSON.parse(raw);if (authed) {const el = document.getElementById('nav-sign-in');if (el) {@@ -1256,6 +1257,11 @@if (myAgents) myAgents.hidden = false;const heroSignin = document.getElementById('hero-signin-hint');if (heroSignin) heroSignin.hidden = true;+ const userEl = document.getElementById('nav-user');+ if (userEl && name) {+ userEl.textContent = name;+ userEl.hidden = false;+ }}}} catch (_) {}diff --git a/public/login.html b/public/login.htmlindex 30dd1534b..c254b66c4 100644--- a/public/login.html+++ b/public/login.html@@ -443,7 +443,7 @@try {localStorage.setItem('3dagent:auth-hint',- JSON.stringify({ authed: true, ts: Date.now() }),+ JSON.stringify({ authed: true, name: data.user?.display_name || '', ts: Date.now() }),);} catch {/* ignore */diff --git a/public/wallet-login.js b/public/wallet-login.jsindex caa604d9d..258c3a43b 100644--- a/public/wallet-login.js+++ b/public/wallet-login.js@@ -16,9 +16,13 @@ function clearErr() {if (el) el.style.display = 'none';}-function onSuccess() {+function onSuccess(data) {try {- localStorage.setItem('3dagent:auth-hint', JSON.stringify({ authed: true, ts: Date.now() }));+ localStorage.setItem('3dagent:auth-hint', JSON.stringify({+ authed: true,+ name: data?.user?.display_name || '',+ ts: Date.now(),+ }));} catch { /* ignore */ }location.href = next;}diff --git a/public/widgets-gallery/gallery.css b/public/widgets-gallery/gallery.cssindex a7358c3a7..4a887af6a 100644--- a/public/widgets-gallery/gallery.css+++ b/public/widgets-gallery/gallery.css@@ -359,6 +359,8 @@ body.gallery-body {background: #050505;aspect-ratio: 1 / 1;min-height: 420px;+ width: 100%;+ margin: 0 auto;}.showcase-frame iframe {diff --git a/public/widgets-gallery/gallery.js b/public/widgets-gallery/gallery.jsindex c0fa1c4f2..df46746e8 100644--- a/public/widgets-gallery/gallery.js+++ b/public/widgets-gallery/gallery.js@@ -163,6 +163,7 @@ function renderShowcase(w) {const frame = document.createElement('div');frame.className = 'showcase-frame';frame.style.aspectRatio = `${w.width} / ${w.height}`;+ frame.style.maxWidth = `${w.width}px`;const color = TYPE_COLORS[w.type] || 'var(--accent)';diff --git a/src/app.js b/src/app.jsindex d78a75010..63a159b1a 100644--- a/src/app.js+++ b/src/app.js@@ -187,6 +187,8 @@ class App {if (options.kiosk) {const headerEl = document.querySelector('header');headerEl.style.display = 'none';+ const footerEl = document.querySelector('footer');+ if (footerEl) footerEl.style.display = 'none';}// Check for deploy (ERC-8004 mint) page. We still load the defaultdiff --git a/style.css b/style.cssindex 393b8bfce..3db493492 100644--- a/style.css+++ b/style.css@@ -285,6 +285,37 @@ header h1 .wordmark-dot {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);+}+.nav-sign-in.signed-in {display: none;}diff --git a/vercel.json b/vercel.jsonindex 91c23817a..9b689def7 100644--- a/vercel.json+++ b/vercel.json@@ -115,6 +115,7 @@{ "src": "/docs", "dest": "/docs/index.html" },{ "src": "/docs/", "dest": "/docs/index.html" },{ "src": "/docs/widgets", "dest": "/docs-widgets.html" },+ { "src": "/docs/(.*)", "dest": "/docs/$1" },{ "src": "/artifact", "dest": "/artifact/index.html" },{ "src": "/artifact/", "dest": "/artifact/index.html" },