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
refactor: enhance layout and styling for forgot password, login, and register pages; add model viewer integration
nirholas44a742bb0565
diff --git a/public/forgot-password.html b/public/forgot-password.htmlindex 539ea8e69..3f28a7804 100644--- a/public/forgot-password.html+++ b/public/forgot-password.html@@ -5,6 +5,10 @@<meta name="viewport" content="width=device-width,initial-scale=1" /><title>Forgot password · three.ws</title><link rel="icon" href="/favicon.ico" />+ <script+ type="module"+ src="https://ajax.googleapis.com/ajax/libs/model-viewer/4.0.0/model-viewer.min.js"+ ></script><style>:root {color-scheme: dark;@@ -25,21 +29,80 @@color: #eee;margin: 0;min-height: 100vh;- display: grid;- place-items: center;+ display: flex;+ align-items: center;+ justify-content: center;padding: 24px;}a {color: #9a8cff;}- .card {+ .shell {+ display: flex;+ width: 100%;+ max-width: 1080px;+ min-height: 640px;+ border-radius: 24px;+ overflow: hidden;background: #14141c;border: 1px solid #2a2a36;- border-radius: 16px;- padding: 32px;- max-width: 400px;+ box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);+ }+ .panel {+ flex: 1;+ position: relative;+ display: flex;+ align-items: center;+ justify-content: center;+ background:+ radial-gradient(120% 90% at 30% 20%, rgba(154, 140, 255, 0.6), transparent 60%),+ radial-gradient(120% 90% at 80% 90%, rgba(255, 92, 168, 0.4), transparent 55%),+ linear-gradient(135deg, #2a2350 0%, #1a1a2e 100%);+ overflow: hidden;+ }+ .agent-avatar {+ position: relative;+ width: 320px;+ height: 320px;+ pointer-events: none;+ }+ .agent-avatar model-viewer {+ width: 100%;+ height: 100%;+ --poster-color: transparent;+ background: transparent;+ }+ .card {+ background: #14141c;+ border: 0;+ border-radius: 0;+ padding: 56px 56px;+ flex: 1;width: 100%;- box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);+ max-width: 520px;+ box-shadow: none;+ display: flex;+ flex-direction: column;+ justify-content: center;+ overflow-y: auto;+ }+ @media (max-width: 860px) {+ .shell {+ flex-direction: column;+ min-height: 0;+ }+ .panel {+ min-height: 220px;+ order: -1;+ }+ .agent-avatar {+ width: 180px;+ height: 180px;+ }+ .card {+ padding: 32px 28px;+ max-width: none;+ }}h1 {font-size: 22px;@@ -122,7 +185,8 @@</style></head><body>- <form class="card" id="f">+ <div class="shell">+ <form class="card" id="f"><p class="brand">three.ws</p><h1>Forgot password</h1><p class="sub">Enter your email and we'll send you a reset link.</p>@@ -141,6 +205,28 @@</div><p class="foot"><a href="/login">Back to sign in</a></p></form>+ <div class="panel" aria-hidden="true">+ <div class="agent-avatar">+ <model-viewer+ id="forgot-avatar"+ src="/avatars/cz.glb"+ alt=""+ autoplay+ animation-name="IdleV4.2(maya_head)"+ disable-zoom+ interaction-prompt="none"+ shadow-intensity="0.6"+ shadow-softness="1"+ exposure="1.05"+ tone-mapping="aces"+ environment-image="neutral"+ camera-orbit="0deg 88deg 4.8m"+ field-of-view="32deg"+ loading="eager"+ ></model-viewer>+ </div>+ </div>+ </div><script>const form = document.getElementById('f');const err = document.getElementById('err');diff --git a/public/login.html b/public/login.htmlindex 80bbfef85..012287708 100644--- a/public/login.html+++ b/public/login.html@@ -29,16 +29,40 @@margin: 0;min-height: 100vh;display: flex;- flex-direction: column;align-items: center;justify-content: center;- gap: 8px;padding: 24px;}+ .shell {+ display: flex;+ width: 100%;+ max-width: 1080px;+ min-height: 640px;+ border-radius: 24px;+ overflow: hidden;+ background: #0c0c0c;+ border: 1px solid rgba(255, 255, 255, 0.08);+ box-shadow:+ 0 0 0 1px rgba(255, 255, 255, 0.03),+ 0 30px 80px rgba(0, 0, 0, 0.85),+ 0 0 120px rgba(200, 210, 255, 0.04);+ }+ .panel {+ flex: 1;+ position: relative;+ display: flex;+ align-items: center;+ justify-content: center;+ background:+ radial-gradient(120% 90% at 30% 20%, rgba(154, 140, 255, 0.55), transparent 60%),+ radial-gradient(120% 90% at 80% 90%, rgba(255, 140, 200, 0.35), transparent 55%),+ linear-gradient(135deg, #2a2350 0%, #1a1a2e 100%);+ overflow: hidden;+ }.agent-avatar {position: relative;- width: 160px;- height: 160px;+ width: 320px;+ height: 320px;pointer-events: none;}.agent-avatar model-viewer {@@ -67,15 +91,35 @@}.card {background: #0c0c0c;- border: 1px solid rgba(255, 255, 255, 0.08);- border-radius: 20px;- padding: 36px;- max-width: 400px;+ border: 0;+ border-radius: 0;+ padding: 56px 56px;+ flex: 1;width: 100%;- box-shadow:- 0 0 0 1px rgba(255, 255, 255, 0.03),- 0 20px 60px rgba(0, 0, 0, 0.8),- 0 0 80px rgba(200, 210, 255, 0.03);+ max-width: 520px;+ box-shadow: none;+ display: flex;+ flex-direction: column;+ justify-content: center;+ overflow-y: auto;+ }+ @media (max-width: 860px) {+ .shell {+ flex-direction: column;+ min-height: 0;+ }+ .panel {+ min-height: 220px;+ order: -1;+ }+ .card {+ padding: 32px 28px;+ max-width: none;+ }+ .agent-avatar {+ width: 180px;+ height: 180px;+ }}h1 {font-size: 22px;@@ -226,7 +270,7 @@from { opacity: 0; transform: translateY(14px) scale(0.985); }to { opacity: 1; transform: translateY(0) scale(1); }}- .card {+ .shell {animation: card-in 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;}input {@@ -287,26 +331,8 @@</style></head><body>- <div class="agent-avatar" aria-hidden="true">- <model-viewer- id="login-avatar"- src="/avatars/cz.glb"- alt=""- autoplay- animation-name="IdleV4.2(maya_head)"- disable-zoom- interaction-prompt="none"- shadow-intensity="0.6"- shadow-softness="1"- exposure="1.05"- tone-mapping="aces"- environment-image="neutral"- camera-orbit="0deg 88deg 4.8m"- field-of-view="32deg"- loading="eager"- ></model-viewer>- </div>- <form class="card" id="f">+ <div class="shell">+ <form class="card" id="f"><a href="/" class="brand"><img src="/three.svg" alt="three.ws" /></a><h1>Welcome back</h1><p class="sub">Sign in to manage your avatars.</p>@@ -345,6 +371,28 @@<div class="err" id="err" role="alert" aria-live="polite"></div><p class="foot">No account? <a href="/register">Create one</a></p></form>+ <div class="panel" aria-hidden="true">+ <div class="agent-avatar">+ <model-viewer+ id="login-avatar"+ src="/avatars/cz.glb"+ alt=""+ autoplay+ animation-name="IdleV4.2(maya_head)"+ disable-zoom+ interaction-prompt="none"+ shadow-intensity="0.6"+ shadow-softness="1"+ exposure="1.05"+ tone-mapping="aces"+ environment-image="neutral"+ camera-orbit="0deg 88deg 4.8m"+ field-of-view="32deg"+ loading="eager"+ ></model-viewer>+ </div>+ </div>+ </div><style>.wallet-step-hint {margin: 6px 0 0;diff --git a/public/register.html b/public/register.htmlindex a6fdc26b0..5b9c1704b 100644--- a/public/register.html+++ b/public/register.html@@ -31,18 +31,53 @@margin: 0;min-height: 100vh;display: flex;- flex-direction: column;align-items: center;justify-content: center;- gap: 8px;padding: 24px;}+ .shell {+ display: flex;+ width: 100%;+ max-width: 1080px;+ min-height: 640px;+ border-radius: 24px;+ overflow: hidden;+ background: #14141c;+ border: 1px solid #2a2a36;+ box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);+ }+ .panel {+ flex: 1;+ position: relative;+ display: flex;+ align-items: center;+ justify-content: center;+ background:+ radial-gradient(120% 90% at 30% 20%, rgba(154, 140, 255, 0.6), transparent 60%),+ radial-gradient(120% 90% at 80% 90%, rgba(255, 92, 168, 0.4), transparent 55%),+ linear-gradient(135deg, #2a2350 0%, #1a1a2e 100%);+ overflow: hidden;+ }.agent-avatar {position: relative;- width: 160px;- height: 160px;+ width: 320px;+ height: 320px;pointer-events: none;}+ @media (max-width: 860px) {+ .shell {+ flex-direction: column;+ min-height: 0;+ }+ .panel {+ min-height: 220px;+ order: -1;+ }+ .agent-avatar {+ width: 180px;+ height: 180px;+ }+ }.agent-avatar model-viewer {width: 100%;height: 100%;@@ -65,12 +100,23 @@}.card {background: #14141c;- border: 1px solid #2a2a36;- border-radius: 16px;- padding: 32px;- max-width: 400px;+ border: 0;+ border-radius: 0;+ padding: 56px 56px;+ flex: 1;width: 100%;- box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);+ max-width: 520px;+ box-shadow: none;+ display: flex;+ flex-direction: column;+ justify-content: center;+ overflow-y: auto;+ }+ @media (max-width: 860px) {+ .card {+ padding: 32px 28px;+ max-width: none;+ }}h1 {font-size: 22px;@@ -271,26 +317,8 @@</style></head><body>- <div class="agent-avatar" aria-hidden="true">- <model-viewer- id="register-avatar"- src="/avatars/cz.glb"- alt=""- autoplay- animation-name="IdleV4.2(maya_head)"- disable-zoom- interaction-prompt="none"- shadow-intensity="0.6"- shadow-softness="1"- exposure="1.05"- tone-mapping="aces"- environment-image="neutral"- camera-orbit="0deg 88deg 4.8m"- field-of-view="32deg"- loading="eager"- ></model-viewer>- </div>- <form class="card" id="f">+ <div class="shell">+ <form class="card" id="f"><a href="/" class="brand">three.ws</a><h1>Create account</h1><p class="sub">Get started free. <span class="badge">✓ No email needed</span></p>@@ -340,6 +368,28 @@<p class="foot">Already have an account? <a href="/login">Sign in</a></p><p class="legal">By creating an account you agree to our <a href="/legal/tos">Terms of Service</a> and <a href="/legal/privacy">Privacy Policy</a>.</p></form>+ <div class="panel" aria-hidden="true">+ <div class="agent-avatar">+ <model-viewer+ id="register-avatar"+ src="/avatars/cz.glb"+ alt=""+ autoplay+ animation-name="IdleV4.2(maya_head)"+ disable-zoom+ interaction-prompt="none"+ shadow-intensity="0.6"+ shadow-softness="1"+ exposure="1.05"+ tone-mapping="aces"+ environment-image="neutral"+ camera-orbit="0deg 88deg 4.8m"+ field-of-view="32deg"+ loading="eager"+ ></model-viewer>+ </div>+ </div>+ </div><script type="module" src="/wallet-login.js"></script>diff --git a/vite.config.js b/vite.config.jsindex c34ed7f17..ddc5f2177 100644--- a/vite.config.js+++ b/vite.config.js@@ -97,7 +97,6 @@ const appConfig = {'/hydrate','/my-agents','/discover',- '/explore','/features','/docs',]);@@ -108,6 +107,12 @@ const appConfig = {res.setHeader('Location', path + '/' + (req.url.slice(path.length) || ''));return res.end();}+ // /explore is an alias for /discover — share the same JS bundle+ if (path === '/explore' || path === '/explore/') {+ res.statusCode = 301;+ res.setHeader('Location', '/discover/');+ return res.end();+ }let filePath = fileMap[path];if (!filePath && /^\/agent\/[^/]+\/edit$/.test(path))filePath = resolve(root, 'agent-edit.html');@@ -124,7 +129,13 @@ const appConfig = {if (!filePath) return next();try {const html = readFileSync(filePath, 'utf8');- const transformed = await server.transformIndexHtml(req.url, html);+ // Use the file's path-relative URL (not req.url) so Vite can+ // resolve html-proxy modules (inline <script type="module">)+ // back to a real file. Otherwise virtual module IDs derived+ // from req.url (e.g. /agent/0xfoo) 500 because nothing on+ // disk matches.+ const fileUrl = '/' + filePath.slice(root.length + 1).replace(/\\/g, '/');+ const transformed = await server.transformIndexHtml(fileUrl, html);res.setHeader('Content-Type', 'text/html; charset=utf-8');res.end(transformed);} catch {