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: discover, avatar SDK, login, walk embed, playground, routing updates

nirholasf1c1539ec064
diff --git a/pages/avatar-page.html b/pages/avatar-page.html
index 699b111cd..95e745535 100644
--- a/pages/avatar-page.html
+++ b/pages/avatar-page.html
@@ -691,6 +691,101 @@
.av-row-disabled { opacity: 0.5; }
.av-row-disabled .av-row-action { cursor: not-allowed; }
+ /* ── Thought bubble (hotspot above avatar) ────────── */
+ #av-hotspot-thought {
+ --min-hotspot-opacity: 0;
+ background: none !important;
+ border: none !important;
+ box-shadow: none !important;
+ width: 0 !important;
+ height: 0 !important;
+ pointer-events: none;
+ }
+ .av-thought-bubble {
+ position: absolute;
+ bottom: 12px;
+ left: 50%;
+ transform: translateX(-50%) scale(0.92);
+ transform-origin: bottom center;
+ background: rgba(10, 10, 10, 0.92);
+ backdrop-filter: blur(16px);
+ -webkit-backdrop-filter: blur(16px);
+ border: 1px solid rgba(255, 255, 255, 0.13);
+ border-radius: 16px;
+ padding: 12px 16px;
+ max-width: 300px;
+ min-width: 48px;
+ font-size: 13px;
+ line-height: 1.55;
+ color: var(--text);
+ white-space: pre-wrap;
+ word-wrap: break-word;
+ opacity: 0;
+ transition: opacity 0.3s ease, transform 0.3s ease;
+ pointer-events: none;
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
+ }
+ .av-thought-bubble.visible {
+ opacity: 1;
+ transform: translateX(-50%) scale(1);
+ pointer-events: auto;
+ }
+ .av-thought-bubble::after {
+ content: '';
+ position: absolute;
+ bottom: -7px;
+ left: 50%;
+ transform: translateX(-50%);
+ width: 0;
+ height: 0;
+ border-left: 7px solid transparent;
+ border-right: 7px solid transparent;
+ border-top: 7px solid rgba(10, 10, 10, 0.92);
+ }
+ .av-thought-content {
+ max-height: 150px;
+ overflow: hidden;
+ position: relative;
+ }
+ .av-thought-bubble.overflow .av-thought-content::after {
+ content: '';
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ height: 28px;
+ background: linear-gradient(transparent, rgba(10, 10, 10, 0.92));
+ pointer-events: none;
+ }
+ .av-thinking-dots {
+ display: flex;
+ gap: 5px;
+ padding: 2px 6px;
+ justify-content: center;
+ }
+ .av-thinking-dots span {
+ width: 6px;
+ height: 6px;
+ border-radius: 50%;
+ background: var(--text-2);
+ animation: av-dot-bounce 1.4s ease-in-out infinite;
+ }
+ .av-thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
+ .av-thinking-dots span:nth-child(3) { animation-delay: 0.4s; }
+ @keyframes av-dot-bounce {
+ 0%, 80%, 100% { transform: translateY(0); opacity: 0.35; }
+ 40% { transform: translateY(-5px); opacity: 1; }
+ }
+ .av-thought-cursor {
+ display: inline-block;
+ width: 6px;
+ height: 13px;
+ vertical-align: -1px;
+ background: var(--accent);
+ margin-left: 2px;
+ animation: av-blink 1s steps(2, start) infinite;
+ }
+
/* ── Skills / Plugins panel ──────────────────────── */
.av-list {
display: flex;
diff --git a/pages/home-classic.html b/pages/home-classic.html
index cd316b519..4ebf72ce6 100644
--- a/pages/home-classic.html
+++ b/pages/home-classic.html
@@ -906,6 +906,10 @@
<a href="/legal/privacy">Privacy Policy</a>
<a href="/legal/tos">Terms of Use</a>
</div>
+ <a href="/" class="version-switch" aria-label="Switch to new homepage" style="display:inline-flex;align-items:center;gap:6px;margin-top:12px;padding:6px 14px;border-radius:100px;border:1px solid rgba(255,255,255,.12);color:rgba(255,255,255,.35);font-size:12px;text-decoration:none;transition:color .2s,border-color .2s;">
+ <svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" style="width:14px;height:14px"><path d="M2.5 8h11M9.5 4l4 4-4 4"/></svg>
+ New homepage
+ </a>
</div>
</footer>
</main>
diff --git a/pages/home.html b/pages/home.html
index 346431de2..7d17f8a5a 100644
--- a/pages/home.html
+++ b/pages/home.html
@@ -902,6 +902,9 @@
/* ── FOOTER ──────────────────────────────────────────────── */
footer { border-top: 1px solid var(--hairline); padding: 40px 0 56px; }
+ .version-switch { display:inline-flex; align-items:center; gap:6px; margin-top:16px; padding:6px 14px; border-radius:100px; border:1px solid var(--hairline-strong); color:var(--text-3); font-size:12px; text-decoration:none; transition:color .2s, border-color .2s; }
+ .version-switch:hover { color:var(--text-2); border-color:var(--text-3); }
+ .version-switch svg { width:14px; height:14px; }
.foot-inner {
display: flex; justify-content: space-between; align-items: center;
gap: 24px; flex-wrap: wrap;
@@ -1369,6 +1372,171 @@
.stack-3d .stack-card { opacity: 1 !important; transform: none !important; }
}
+ /* ── WHAT YOU GET ────────────────────────────────────────────── */
+ .wyg-head {
+ text-align: center; margin-bottom: 64px;
+ }
+ .wyg-eyebrow {
+ font-family: var(--font-mono); font-size: 11.5px;
+ letter-spacing: 0.22em; text-transform: uppercase;
+ color: var(--text-3); margin: 0 0 20px;
+ }
+ .wyg-title {
+ font-family: var(--font-display);
+ font-size: clamp(36px, 4.8vw, 64px);
+ line-height: 1.0; letter-spacing: -0.04em;
+ font-weight: 600; margin: 0; color: var(--text);
+ }
+ .wyg-grid {
+ display: grid;
+ grid-template-columns: 1.15fr 0.85fr;
+ gap: 1px;
+ background: var(--hairline);
+ border: 1px solid var(--hairline);
+ border-radius: 16px;
+ overflow: hidden;
+ }
+ @media (max-width: 1080px) { .wyg-grid { grid-template-columns: 1fr; } }
+
+ .wyg-viewer {
+ background: var(--surface-0);
+ position: relative;
+ min-height: 640px;
+ display: flex; flex-direction: column;
+ }
+ @media (max-width: 1080px) { .wyg-viewer { min-height: 480px; } }
+ @media (max-width: 600px) { .wyg-viewer { min-height: 380px; } }
+ .wyg-viewer agent-3d {
+ position: absolute; inset: 0; width: 100%; height: 100%;
+ display: block;
+ opacity: 0; transition: opacity 0.6s ease;
+ }
+ .wyg-viewer agent-3d.loaded { opacity: 1; }
+ .wyg-viewer-skel {
+ position: absolute; inset: 0;
+ display: flex; align-items: center; justify-content: center;
+ }
+ .wyg-viewer-skel-ring {
+ width: 32px; height: 32px;
+ border: 2px solid rgba(255,255,255,0.08);
+ border-top-color: rgba(255,255,255,0.25);
+ border-radius: 50%;
+ animation: showcase-spin 0.9s linear infinite;
+ }
+ .wyg-anim-bar {
+ position: absolute; bottom: 0; left: 0; right: 0;
+ z-index: 10;
+ display: flex; flex-direction: column; gap: 8px;
+ padding: 24px 20px 16px;
+ background: linear-gradient(0deg, rgba(5,5,5,0.85) 0%, rgba(5,5,5,0.5) 60%, transparent 100%);
+ }
+ .wyg-anim-head {
+ display: flex; align-items: center; justify-content: space-between;
+ }
+ .wyg-anim-label {
+ font-family: var(--font-mono); font-size: 10px;
+ letter-spacing: 0.22em; text-transform: uppercase;
+ color: var(--text-4);
+ }
+ .wyg-anim-stop {
+ width: 14px; height: 14px;
+ background: var(--text-3); border-radius: 2px;
+ border: none; cursor: pointer;
+ opacity: 0.5; transition: opacity 0.15s;
+ }
+ .wyg-anim-stop:hover { opacity: 1; }
+ .wyg-anim-scroll {
+ display: flex; gap: 6px;
+ overflow-x: auto; overflow-y: hidden;
+ -webkit-overflow-scrolling: touch;
+ scrollbar-width: none;
+ padding-bottom: 4px;
+ }
+ .wyg-anim-scroll::-webkit-scrollbar { display: none; }
+ .wyg-anim-chip {
+ display: inline-flex; flex-direction: column;
+ align-items: center; gap: 4px;
+ padding: 8px 10px 6px;
+ border-radius: 10px;
+ background: rgba(255,255,255,0.06);
+ border: 1px solid var(--hairline-strong);
+ color: var(--text-3);
+ font: 500 10.5px/1 var(--font-body);
+ cursor: pointer; user-select: none;
+ transition: border-color 0.15s, color 0.15s, background 0.15s;
+ white-space: nowrap; flex-shrink: 0;
+ min-width: 64px;
+ }
+ .wyg-anim-chip:hover {
+ border-color: rgba(255,255,255,0.3);
+ color: var(--text);
+ background: rgba(255,255,255,0.1);
+ }
+ .wyg-anim-chip[data-active="true"] {
+ border-color: rgba(255,255,255,0.5);
+ color: var(--text);
+ background: rgba(255,255,255,0.12);
+ }
+ .wyg-anim-chip-icon { font-size: 18px; line-height: 1; }
+
+ .wyg-cards {
+ display: flex; flex-direction: column;
+ background: var(--hairline); gap: 1px;
+ }
+ .wyg-card {
+ background: var(--surface-0);
+ padding: 28px 28px 24px;
+ display: flex; flex-direction: column; gap: 8px;
+ transition: background 0.15s;
+ }
+ .wyg-card:hover { background: var(--surface-1); }
+ .wyg-card-eyebrow {
+ font-family: var(--font-mono); font-size: 10.5px;
+ letter-spacing: 0.2em; text-transform: uppercase;
+ margin: 0;
+ }
+ .wyg-card-eyebrow.clr-gold { color: #c9a94e; }
+ .wyg-card-eyebrow.clr-teal { color: #5eadad; }
+ .wyg-card-eyebrow.clr-purple { color: #a78bfa; }
+ .wyg-card-eyebrow.clr-rose { color: #e879a0; }
+ .wyg-card-eyebrow.clr-sky { color: #7ab8e0; }
+ .wyg-card-eyebrow.clr-amber { color: #d4a04a; }
+ .wyg-card-title {
+ font-family: var(--font-display); font-size: 20px;
+ font-weight: 600; letter-spacing: -0.02em; margin: 0;
+ }
+ .wyg-card-body {
+ font-size: 14px; color: var(--text-2);
+ line-height: 1.5; margin: 0;
+ }
+ .wyg-card-code {
+ font-family: var(--font-mono); font-size: 12px;
+ background: var(--surface-2); border: 1px solid var(--hairline-strong);
+ border-radius: 8px; padding: 12px 14px;
+ color: var(--text-2); line-height: 1.6; margin-top: 4px;
+ }
+ .wyg-card-pills {
+ display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px;
+ }
+ .wyg-card-pill {
+ display: inline-flex; align-items: center; gap: 6px;
+ font-family: var(--font-mono); font-size: 11px;
+ letter-spacing: 0.08em;
+ color: var(--text-2);
+ border: 1px solid var(--hairline-strong);
+ padding: 4px 10px; border-radius: 99px;
+ }
+ .wyg-card-pill .dot {
+ width: 7px; height: 7px; border-radius: 50%;
+ }
+ .wyg-card-link {
+ font-size: 13.5px; font-weight: 500; color: var(--text);
+ display: inline-flex; align-items: center; gap: 7px;
+ margin-top: 4px; transition: gap 0.15s;
+ }
+ .wyg-card:hover .wyg-card-link { gap: 10px; }
+ .wyg-card-link::after { content: "\2192"; }
+
/* ── V4-STYLE IMMERSIVE CLOSE ────────────────────────────────── */
.vclose {
position: relative; min-height: 100vh;
@@ -2090,6 +2258,21 @@
.analytics-spark .spark-fill{fill:url(#spark-grad);stroke:none;opacity:.15}
.analytics-spark .spark-dot{fill:var(--text);r:2.5;animation:spark-pulse 2s ease-in-out infinite}
@keyframes spark-pulse{0%,100%{opacity:1}50%{opacity:.4}}
+
+ /* ── EDITORIAL (Pretext-inspired reflow) ─────────────────── */
+ .editorial-text-area{position:relative;min-height:480px;user-select:text;overflow:visible}
+ .ed-line{position:absolute;white-space:nowrap;font-family:Georgia,"Iowan Old Style","Palatino Linotype",Palatino,serif;font-size:17px;line-height:28px;color:var(--text-2)}
+ .ed-drop{position:absolute;font-family:Georgia,"Iowan Old Style","Palatino Linotype",Palatino,serif;font-weight:700;color:var(--text);line-height:.85;pointer-events:none}
+ .editorial-orb{position:absolute;z-index:10;cursor:grab;will-change:transform;border-radius:50%;touch-action:none}
+ .editorial-orb:active{cursor:grabbing}
+ .editorial-orb-glow{position:absolute;inset:-24px;border-radius:50%;background:radial-gradient(circle at 35% 35%,rgba(255,255,255,.10),transparent 70%);box-shadow:0 0 60px 15px rgba(255,255,255,.05),0 0 120px 40px rgba(255,255,255,.02);pointer-events:none;animation:ed-orb-glow 6s ease-in-out infinite}
+ @keyframes ed-orb-glow{0%,100%{opacity:.7}50%{opacity:1}}
+ .editorial-orb-avatar{width:100%;height:100%;border-radius:50%;overflow:hidden;border:1px solid rgba(255,255,255,.12);background:var(--surface-2)}
+ .editorial-orb-avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%;pointer-events:none;animation:ed-avatar-breathe 4s ease-in-out infinite}
+ @keyframes ed-avatar-breathe{0%,100%{transform:scale(1)}50%{transform:scale(1.04)}}
+ .editorial-hint{text-align:center;margin-top:32px;font-family:var(--font-mono);font-size:10px;letter-spacing:.18em;text-transform:uppercase;color:var(--text-4)}
+ @media(max-width:720px){.editorial-hint{display:none}}
+ @media(prefers-reduced-motion:reduce){.editorial-orb-glow{animation:none!important}.editorial-orb-avatar img{animation:none!important}}
</style>
<noscript><style>.reveal{opacity:1!important;transform:none!important}.hero-text>*{opacity:1!important;transform:none!important}</style></noscript>
<script type="module" src="https://three.ws/agent-3d/latest/agent-3d.js"></script>
@@ -2320,60 +2503,20 @@
</div>
</section>
-<!-- ── MANIFESTO ────────────────────────────────────────────────── -->
+<!-- ── EDITORIAL (Pretext-inspired reflow) ──────────────────────── -->
<section class="block" id="editorial">
<div class="wrap-1280">
- <div class="manifesto">
-
- <div class="manifesto-beat reveal">
- <h2 class="manifesto-statement manifesto-statement--dim">The web was built<br>for documents.</h2>
- <p class="manifesto-aside">Text, images, links &mdash; a flat canvas for static information.</p>
- </div>
-
- <div class="manifesto-beat reveal">
- <div class="manifesto-steps">
- <span class="manifesto-step">Then came video.</span>
- <span class="manifesto-step">Then interactivity.</span>
- <span class="manifesto-step">Then AI.</span>
- </div>
- </div>
-
- <div class="manifesto-beat reveal">
- <p class="manifesto-lead">But something fundamental was always missing &mdash;</p>
- <h2 class="manifesto-keyword">presence.</h2>
- </div>
-
- <div class="manifesto-beat reveal">
- <div class="manifesto-negations">
- <p class="manifesto-neg">Not a chatbot tucked into a corner.</p>
- <p class="manifesto-neg">Not a popup demanding attention.</p>
- </div>
- <p class="manifesto-affirmation">A living digital being that inhabits your space, knows your visitors, and works while you sleep.</p>
- </div>
-
- <div class="manifesto-beat reveal">
- <h2 class="manifesto-statement">three.ws gives your AI <em>a body.</em></h2>
- <p class="manifesto-body">A 3D character generated from a single photograph, deployed with two lines of HTML, monetized through micropayments that settle instantly. Every agent remembers across sessions, moves through multiplayer worlds, and earns revenue via the x402 payment protocol.</p>
- </div>
-
- <div class="manifesto-beat reveal">
- <div class="manifesto-caps">
- <span class="manifesto-cap">200+ animations</span>
- <span class="manifesto-cap">Real-time voice</span>
- <span class="manifesto-cap">On-chain identity</span>
- <span class="manifesto-cap">Cross-device memory</span>
- <span class="manifesto-cap">Spatial multiplayer</span>
- <span class="manifesto-cap">x402 payments</span>
- </div>
- <p class="manifesto-embed">All from one embed tag: <code>&lt;agent-3d&gt;</code></p>
- </div>
-
- <div class="manifesto-beat reveal">
- <p class="manifesto-close-dim">The flat web had its moment.</p>
- <h2 class="manifesto-close">The living web starts now.</h2>
+ <div class="block-head reveal">
+ <p class="block-eyebrow"><span class="num">&bull;</span>The vision</p>
+ <h2 class="block-h">The web wasn't built<br/>for <em>presence.</em></h2>
+ </div>
+ <div class="editorial-text-area reveal reveal-d1" id="editorial-text-area">
+ <div class="editorial-orb" id="editorial-orb">
+ <div class="editorial-orb-glow"></div>
+ <div class="editorial-orb-avatar" id="editorial-orb-avatar"></div>
</div>
-
</div>
+ <p class="editorial-hint reveal reveal-d2">drag the avatar through the text</p>
</div>
</section>
@@ -3248,6 +3391,10 @@
<a href="https://github.com/nirholas/three.ws">GitHub</a>
<a href="mailto:[email protected]">Contact</a>
</div>
+ <a href="/home-classic" class="version-switch" aria-label="Switch to classic homepage">
+ <svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><path d="M2.5 8h11M6.5 4L2.5 8l4 4"/></svg>
+ Classic homepage
+ </a>
</div>
</div>
</footer>
@@ -4319,6 +4466,7 @@
})();
</script>
<script src="/src/api-playground.js"></script>
+<script src="/src/editorial-pretext.js"></script>
<script type="module">
import * as THREE from 'three';
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
diff --git a/pages/marketplace.html b/pages/marketplace.html
index c300e4836..e650bb49c 100644
--- a/pages/marketplace.html
+++ b/pages/marketplace.html
@@ -1775,14 +1775,6 @@
<a class="market-submit-avatar-btn" href="/create" id="market-submit-avatar-btn">+ Create Avatar</a>
</header>
- <div class="market-wip-banner" id="market-wip-banner" role="status" hidden>
- <span class="market-wip-icon" aria-hidden="true">!</span>
- <div class="market-wip-text">
- <strong>Marketplace is in beta.</strong>
- Avatars, chat, and forking are stable. <em>Paid skills, on-chain agent listings, and submission moderation are still landing</em> — expect rough edges.
- </div>
- <button class="market-wip-dismiss" id="market-wip-dismiss" aria-label="Dismiss">×</button>
- </div>
<div class="market-cat-chips" id="market-cat-chips" role="navigation" aria-label="Categories"></div>
diff --git a/src/avatar-page.js b/src/avatar-page.js
index db1662b61..734b16325 100644
--- a/src/avatar-page.js
+++ b/src/avatar-page.js
@@ -201,7 +201,13 @@ function renderShell(glbUrl) {
ar
ar-modes="webxr scene-viewer quick-look"
ar-scale="auto"
- ></model-viewer>
+ >
+ <div slot="hotspot-thought" data-position="0 1.9 0.08" data-normal="0 0 1" id="av-hotspot-thought">
+ <div class="av-thought-bubble" id="av-thought-bubble">
+ <div class="av-thought-content" id="av-thought-content"></div>
+ </div>
+ </div>
+ </model-viewer>
</div>
<div class="av-meta-strip" id="av-meta-strip">
<div class="av-meta-item"><span class="av-meta-key">Format</span><span class="av-meta-val">glTF 2.0</span></div>
@@ -324,6 +330,7 @@ function renderShell(glbUrl) {
const viewer = $('av-viewer');
viewer?.addEventListener('load', () => {
$('av-stage-loading')?.remove();
+ positionThoughtHotspot(viewer);
});
viewer?.addEventListener('error', () => {
const ld = $('av-stage-loading');
@@ -890,6 +897,49 @@ function saveAttached() {
}
}
+// ── Thought bubble (above avatar) ────────────────────────────────────
+
+function positionThoughtHotspot(viewer) {
+ const hotspot = $('av-hotspot-thought');
+ if (!hotspot || !viewer) return;
+ try {
+ const dims = viewer.getDimensions();
+ if (dims && dims.y > 0) {
+ const topY = (dims.y + 0.12).toFixed(3);
+ hotspot.setAttribute('data-position', `0 ${topY} 0.08`);
+ }
+ } catch {}
+}
+
+function showThoughtThinking() {
+ const bubble = $('av-thought-bubble');
+ const content = $('av-thought-content');
+ if (!bubble || !content) return;
+ content.innerHTML = '<div class="av-thinking-dots"><span></span><span></span><span></span></div>';
+ bubble.classList.remove('overflow');
+ bubble.classList.add('visible');
+}
+
+function streamThoughtText(text) {
+ const bubble = $('av-thought-bubble');
+ const content = $('av-thought-content');
+ if (!bubble || !content) return;
+ content.textContent = text;
+ const cursor = document.createElement('span');
+ cursor.className = 'av-thought-cursor';
+ content.appendChild(cursor);
+ bubble.classList.toggle('overflow', content.scrollHeight > 150);
+ if (!bubble.classList.contains('visible')) bubble.classList.add('visible');
+}
+
+function finalizeThought(text) {
+ const bubble = $('av-thought-bubble');
+ const content = $('av-thought-content');
+ if (!bubble || !content) return;
+ content.textContent = text;
+ bubble.classList.toggle('overflow', content.scrollHeight > 150);
+}
+
// ── Chat panel ────────────────────────────────────────────────────────
function bindChat() {
@@ -1054,6 +1104,7 @@ async function sendChatMessage(text) {
cursor.className = 'av-chat-cursor';
assistantNode.appendChild(cursor);
+ showThoughtThinking();
send.disabled = true;
let acc = '';
try {
@@ -1098,6 +1149,7 @@ async function sendChatMessage(text) {
acc += evt.text;
assistantNode.textContent = acc;
log.scrollTop = log.scrollHeight;
+ streamThoughtText(acc);
} else if (evt.type === 'error') {
throw new Error(evt.message || evt.error || 'Stream error');
}
@@ -1105,10 +1157,11 @@ async function sendChatMessage(text) {
}
chatHistory.push({ role: 'assistant', content: acc });
persistChatHistory();
- // Speak the assistant's full reply (TTS skill).
+ finalizeThought(acc);
if (acc) speakReply(acc);
} catch (err) {
assistantNode.textContent = acc || `⚠ ${err.message}`;
+ finalizeThought(acc || err.message);
console.error('[avatar] chat', err);
} finally {
cursor.remove();
diff --git a/src/avatar-sdk-page.js b/src/avatar-sdk-page.js
index 970054195..e2a526b20 100644
--- a/src/avatar-sdk-page.js
+++ b/src/avatar-sdk-page.js
@@ -1,8 +1,11 @@
-import { ThreeWsViewerElement } from '../avatar-sdk/src/viewer.js';
-
-if (typeof customElements !== 'undefined' && !customElements.get('three-ws-viewer')) {
- customElements.define('three-ws-viewer', ThreeWsViewerElement);
-}
+(async () => {
+ try {
+ const { ThreeWsViewerElement } = await import('../avatar-sdk/src/viewer.js');
+ if (typeof customElements !== 'undefined' && !customElements.get('three-ws-viewer')) {
+ customElements.define('three-ws-viewer', ThreeWsViewerElement);
+ }
+ } catch {}
+})();
document.addEventListener('DOMContentLoaded', () => {
// ── Scroll reveal ────────────────────────────────────────────────────────
diff --git a/src/editorial-pretext.js b/src/editorial-pretext.js
index 8a37a5ef5..5483a6465 100644
--- a/src/editorial-pretext.js
+++ b/src/editorial-pretext.js
@@ -65,7 +65,13 @@
var edLastT = 0, edInView = false, edSelecting = false;
var edReduced = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
- // Avatar thumbnail is loaded by the inline boot script into #editorial-orb-avatar
+ // Load avatar thumbnail into orb
+ var AVATAR_ID = window.AVATAR_ID || 'bacff13e-b64b-4ac0-860d-44f0168ad23b';
+ var orbImg = document.createElement('img');
+ orbImg.alt = 'Agent avatar';
+ orbImg.draggable = false;
+ orbImg.src = 'https://pub-2534e921bf9c4314addcd4d8a6e98b7b.r2.dev/thumb/' + AVATAR_ID + '.png';
+ orbAvatarSlot.appendChild(orbImg);
// Span pool — reuse DOM elements across frames
var linePool = [];
diff --git a/src/marketplace.js b/src/marketplace.js
index 0bb71c9c4..d688374a4 100644
--- a/src/marketplace.js
+++ b/src/marketplace.js
@@ -128,7 +128,6 @@ const state = {
theme: null,
};
-const WIP_DISMISS_KEY = 'marketplace_wip_dismissed_v1';
const $ = (id) => document.getElementById(id);
const els = {
@@ -669,6 +668,7 @@ function renderHero() {
src="${escapeHtml(a.glbUrl)}"
alt="${escapeHtml(a.name || 'Avatar')}"
auto-rotate
+ autoplay
rotation-per-second="20deg"
camera-controls
interaction-prompt="none"
@@ -828,32 +828,6 @@ function stopHeroAutoplay() {
state.heroTimer = null;
}
-// ── WIP banner dismiss ───────────────────────────────────────────────────
-
-function initWipBanner() {
- const banner = $('market-wip-banner');
- const dismiss = $('market-wip-dismiss');
- if (!banner) return;
- const dismissed = (() => {
- try {
- return localStorage.getItem(WIP_DISMISS_KEY) === '1';
- } catch {
- return false;
- }
- })();
- banner.hidden = dismissed;
- if (dismiss) {
- dismiss.addEventListener('click', () => {
- banner.hidden = true;
- try {
- localStorage.setItem(WIP_DISMISS_KEY, '1');
- } catch {
- // localStorage unavailable — banner stays dismissed only for the session
- }
- });
- }
-}
-
// ── Filter chips (All / Agents / Avatars / Onchain) ──────────────────────
function bindFilterChips() {
@@ -1118,6 +1092,7 @@ function openAvatarModal(avatar) {
mv.setAttribute('rotation-per-second', '18deg');
mv.setAttribute('camera-controls', '');
mv.setAttribute('interaction-prompt', 'none');
+ mv.setAttribute('autoplay', '');
mv.setAttribute('exposure', '1.05');
mv.setAttribute('shadow-intensity', '0.7');
mv.setAttribute('tone-mapping', 'aces');
@@ -2938,6 +2913,7 @@ function renderAvatarCard(a, spotlight = false) {
? `${placeholderHtml(a.name)}<model-viewer
data-src="${escapeHtml(a.glbUrl)}"
alt="${name}"
+ autoplay
rotation-per-second="14deg"
interaction-prompt="none"
disable-zoom
@@ -3035,12 +3011,14 @@ function renderOnchainCard(a) {
const ownerShort = a.ownerShort || '';
const x402 = a.x402Support ? `<span class="onchain-x402" title="Accepts x402 micropayments">x402</span>` : '';
const href = a.viewerUrl || a.tokenExplorerUrl || '#';
+ const priceBadge = priceBadgeHtml(a.price);
const preview = a.image
? `<img src="${escapeHtml(a.image)}" alt="${name}" loading="lazy" decoding="async" onerror="this.replaceWith(Object.assign(document.createElement('div'),{className:'card-img-fallback'}))" />`
: a.glbUrl
? `${placeholderHtml(a.name)}<model-viewer
data-src="${escapeHtml(a.glbUrl)}"
alt="${name}"
+ autoplay
rotation-per-second="14deg"
interaction-prompt="none"
disable-zoom
@@ -3054,7 +3032,7 @@ function renderOnchainCard(a) {
></model-viewer>`
: `<div class="thumb-fallback"><span class="thumb-fallback-initial">${escapeHtml(initial(a.name))}</span></div>`;
return `<div class="market-card-avatar onchain" data-onchain-href="${escapeHtml(href)}">
- <div class="thumb">${preview}</div>
+ <div class="thumb">${priceBadge}${preview}</div>
<div class="body">
<div class="title">${name}</div>
<div class="byline">
@@ -3322,6 +3300,7 @@ async function loadAvatarDetail(id) {
mv.setAttribute('rotation-per-second', '12deg');
mv.setAttribute('camera-controls', '');
mv.setAttribute('interaction-prompt', 'when-focused');
+ mv.setAttribute('autoplay', '');
mv.setAttribute('exposure', '1.05');
mv.setAttribute('shadow-intensity', '0.7');
mv.setAttribute('tone-mapping', 'aces');
@@ -4054,7 +4033,6 @@ function bindEvents() {
bindTabs();
bindSubmit();
bindFilterChips();
- initWipBanner();
// 3D Lobby: open from the hero button, close on overlay button or Escape.
$('market-hero-lobby')?.addEventListener('click', openLobby);
diff --git a/verify-color-picker.mjs b/verify-color-picker.mjs
deleted file mode 100644
index b3735aa75..000000000
--- a/verify-color-picker.mjs
+++ /dev/null
@@ -1,139 +0,0 @@
-import { chromium } from 'playwright';
-
-const browser = await chromium.launch({ headless: true });
-const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });
-
-console.log('--- Step 1: Navigate and scroll to Playground ---');
-await page.goto('http://localhost:3000/pages/home-next.html', { waitUntil: 'load', timeout: 30000 });
-await page.waitForTimeout(3000);
-
-// Scroll to the embed/playground section
-await page.locator('#embed').scrollIntoViewIfNeeded({ timeout: 10000 });
-await page.waitForTimeout(500);
-await page.screenshot({ path: '/tmp/ss-01-playground.png', fullPage: false });
-console.log('Screenshot: /tmp/ss-01-playground.png');
-
-console.log('--- Step 2: Find the BG control group and color trigger ---');
-const colorTrigger = page.locator('#pg-color-trigger');
-const triggerVisible = await colorTrigger.isVisible();
-console.log('Color trigger visible:', triggerVisible);
-
-// Get its bounding box
-const triggerBox = await colorTrigger.boundingBox();
-console.log('Trigger bounding box:', triggerBox);
-
-// Scroll to it
-await colorTrigger.scrollIntoViewIfNeeded();
-await page.waitForTimeout(300);
-await page.screenshot({ path: '/tmp/ss-02-bg-controls.png', fullPage: false });
-console.log('Screenshot: /tmp/ss-02-bg-controls.png');
-
-console.log('--- Step 3: Click the color trigger to open popover ---');
-await colorTrigger.click();
-await page.waitForTimeout(300);
-
-const popover = page.locator('#pg-color-popover');
-const popoverOpen = await popover.evaluate(el => el.classList.contains('open'));
-console.log('Popover open after click:', popoverOpen);
-const popoverVisible = await popover.isVisible();
-console.log('Popover visible:', popoverVisible);
-
-await page.screenshot({ path: '/tmp/ss-03-popover-open.png', fullPage: false });
-console.log('Screenshot: /tmp/ss-03-popover-open.png');
-
-// Check swatches are rendered
-const swatchCount = await page.locator('.pg-color-swatch').count();
-console.log('Number of color swatches:', swatchCount);
-
-// Check hex input exists
-const hexInput = page.locator('#pg-color-hex');
-const hexVisible = await hexInput.isVisible();
-console.log('Hex input visible:', hexVisible);
-
-console.log('--- Step 4: Click a swatch to pick a color ---');
-const thirdSwatch = page.locator('.pg-color-swatch').nth(4); // #e94560 (a red)
-const swatchColor = await thirdSwatch.getAttribute('data-color');
-console.log('Picking swatch color:', swatchColor);
-await thirdSwatch.click();
-await page.waitForTimeout(300);
-
-// Check state: trigger should have 'active' and 'has-color' classes
-const triggerHasActive = await colorTrigger.evaluate(el => el.classList.contains('active'));
-const triggerHasColor = await colorTrigger.evaluate(el => el.classList.contains('has-color'));
-console.log('Trigger active:', triggerHasActive, '| has-color:', triggerHasColor);
-
-// Check hex input value
-const hexVal = await hexInput.inputValue();
-console.log('Hex input value:', hexVal);
-
-// Check BG preset chips are deselected
-const activeBgChips = await page.locator('#pg-bg-chips .pg-chip.active').count();
-console.log('Active BG preset chips after picking custom color:', activeBgChips);
-
-// Check the swatch has active class
-const swatchActive = await thirdSwatch.evaluate(el => el.classList.contains('active'));
-console.log('Clicked swatch has active class:', swatchActive);
-
-// Check the generated code includes background attribute
-const codeText = await page.locator('#pg-textarea').inputValue();
-console.log('Code includes background attr:', codeText.includes('background="' + swatchColor + '"'));
-
-await page.screenshot({ path: '/tmp/ss-04-color-picked.png', fullPage: false });
-console.log('Screenshot: /tmp/ss-04-color-picked.png');
-
-console.log('--- Step 5: Click outside to close popover ---');
-await page.mouse.click(100, 100);
-await page.waitForTimeout(300);
-const popoverOpenAfterClick = await popover.evaluate(el => el.classList.contains('open'));
-console.log('Popover still open after clicking outside:', popoverOpenAfterClick);
-await page.screenshot({ path: '/tmp/ss-05-popover-closed.png', fullPage: false });
-console.log('Screenshot: /tmp/ss-05-popover-closed.png');
-
-console.log('--- Step 6: Click "none" preset chip to reset color picker ---');
-await page.locator('#pg-color-trigger').scrollIntoViewIfNeeded();
-await page.waitForTimeout(200);
-const noneChip = page.locator('#pg-bg-chips .pg-chip').first();
-await noneChip.click();
-await page.waitForTimeout(300);
-
-const triggerStillActive = await colorTrigger.evaluate(el => el.classList.contains('active'));
-const triggerStillHasColor = await colorTrigger.evaluate(el => el.classList.contains('has-color'));
-console.log('Trigger active after "none" click:', triggerStillActive, '| has-color:', triggerStillHasColor);
-
-const noneChipActive = await noneChip.evaluate(el => el.classList.contains('active'));
-console.log('"none" chip is active:', noneChipActive);
-
-const codeAfterReset = await page.locator('#pg-textarea').inputValue();
-console.log('Code still has background attr after reset:', codeAfterReset.includes('background='));
-
-await page.screenshot({ path: '/tmp/ss-06-reset.png', fullPage: false });
-console.log('Screenshot: /tmp/ss-06-reset.png');
-
-console.log('--- Step 7: Probe - type hex value directly ---');
-await colorTrigger.scrollIntoViewIfNeeded();
-await colorTrigger.click();
-await page.waitForTimeout(300);
-const hexInputField = page.locator('#pg-color-hex');
-await hexInputField.fill('#00ff88');
-await page.waitForTimeout(300);
-
-const triggerAfterHex = await colorTrigger.evaluate(el => el.classList.contains('active'));
-console.log('Trigger active after typing hex:', triggerAfterHex);
-
-const codeAfterHex = await page.locator('#pg-textarea').inputValue();
-console.log('Code includes typed hex:', codeAfterHex.includes('#00ff88'));
-
-await page.screenshot({ path: '/tmp/ss-07-hex-typed.png', fullPage: false });
-console.log('Screenshot: /tmp/ss-07-hex-typed.png');
-
-console.log('--- Step 8: Probe - Enter key in hex input closes popover ---');
-await hexInputField.fill('#ff00aa');
-await hexInputField.press('Enter');
-await page.waitForTimeout(300);
-const popoverAfterEnter = await popover.evaluate(el => el.classList.contains('open'));
-console.log('Popover closed after Enter:', !popoverAfterEnter);
-await page.screenshot({ path: '/tmp/ss-08-enter-close.png', fullPage: false });
-
-console.log('\n=== All Steps Complete ===');
-
-await browser.close();
diff --git a/vite.config.js b/vite.config.js
index 9059bad07..a87ff182a 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -493,8 +493,8 @@ const appConfig = {
'/home': resolve(root, 'pages/home.html'),
'/home-v2': resolve(root, 'pages/home-v2.html'),
'/home-v2/': resolve(root, 'pages/home-v2.html'),
- '/home-classic': resolve(root, 'pages/home.html'),
- '/home-classic/': resolve(root, 'pages/home.html'),
+ '/home-classic': resolve(root, 'pages/home-classic.html'),
+ '/home-classic/': resolve(root, 'pages/home-classic.html'),
'/home-v3': resolve(root, 'pages/home-v3.html'),
'/home-v3/': resolve(root, 'pages/home-v3.html'),
'/home-v4': resolve(root, 'pages/home-v4.html'),