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 setCameraTarget action and implement camera targeting functionality in viewer
nirholas8dcae6e8363a
diff --git a/api/chat.js b/api/chat.jsindex 324999ad3..506d7b1c5 100644--- a/api/chat.js+++ b/api/chat.js@@ -146,6 +146,20 @@ const ACTION_TOOLS = [description: 'Open the material editor panel in the viewer UI.',input_schema: { type: 'object', properties: {} },},+ {+ name: 'setCameraTarget',+ description: 'Set the camera target to a specific named bone on the currently loaded model.',+ input_schema: {+ type: 'object',+ properties: {+ boneName: {+ type: 'string',+ description: 'The name of the bone to target, e.g. "head", "leftHand"',+ },+ },+ required: ['boneName'],+ },+ },];const ACTION_NAMES = new Set(ACTION_TOOLS.map((t) => t.name));diff --git a/chat/src/SkillsMarketplaceModal.svelte b/chat/src/SkillsMarketplaceModal.svelteindex 9578746bb..cf11420f7 100644--- a/chat/src/SkillsMarketplaceModal.svelte+++ b/chat/src/SkillsMarketplaceModal.svelte@@ -614,6 +614,20 @@<div class="min-w-0 flex-1"><!-- Search + sort --><div class="mb-4 flex gap-x-2">+ <div class="flex items-center gap-2 p-1 rounded-full bg-slate-100">+ <button+ class="px-3 py-1 rounded-full text-sm"+ class:bg-white={!showLocalSkills}+ class:text-slate-500={showLocalSkills}+ on:click={() => (showLocalSkills = false)}>Marketplace</button+ >+ <button+ class="px-3 py-1 rounded-full text-sm"+ class:bg-white={showLocalSkills}+ class:text-slate-500={!showLocalSkills}+ on:click={() => (showLocalSkills = true)}>Local</button+ >+ </div><inputtype="text"placeholder="Search skills..."@@ -651,6 +665,15 @@{#if loading && skills.length === 0}<p class="mt-8 text-center text-[13px] text-slate-400">Loading skills...</p>+ {:else if showLocalSkills}+ <div class="grid grid-cols-1 gap-3 sm:grid-cols-2">+ {#each localSkills as skill (skill.name)}+ <div class="rounded-lg border border-slate-200 px-3 py-3">+ <h3 class="font-semibold text-slate-800 text-[13px]">{skill.name}</h3>+ <p class="mt-0.5 line-clamp-2 text-[11px] leading-relaxed text-slate-500">{skill.description}</p>+ </div>+ {/each}+ </div>{:else if skills.length === 0}<p class="mt-8 text-center text-[13px] text-slate-400">No skills found</p>{:else}diff --git a/package.json b/package.jsonindex 41155ff67..ec57a6eb9 100644--- a/package.json+++ b/package.json@@ -85,6 +85,7 @@"@metaplex-foundation/umi": "^1.5.1","@metaplex-foundation/umi-bundle-defaults": "^1.5.1","@neondatabase/serverless": "^0.10.1",+ "node-fetch": "^3.3.2","@nirholas/pump-sdk": "^1.0.0","@noble/curves": "^2.2.0","@pump-fun/agent-payments-sdk": "^3.0.3",diff --git a/public/features/features.js b/public/features/features.jsindex 04b912ac7..e7d406427 100644--- a/public/features/features.js+++ b/public/features/features.js@@ -200,12 +200,38 @@ function setupProgressDots() {// ── Boot ─────────────────────────────────────────────────────────────────+function setupScrollHint() {+ const hint = document.querySelector('[data-role="scroll-hint"]');+ if (!hint) return;+ const container = document.querySelector('.parallax') || window;+ function hide() {+ hint.classList.add('scroll-hint--hidden');+ hint.addEventListener('transitionend', () => {+ hint.hidden = true;+ }, { once: true });+ container.removeEventListener('scroll', hide);+ }+ container.addEventListener('scroll', hide, { passive: true });+}++function setupAuthNav() {+ try {+ const raw = localStorage.getItem('3dagent:auth-hint');+ if (raw && JSON.parse(raw).authed) {+ const el = document.getElementById('home-nav-my-agents-li');+ if (el) el.hidden = false;+ }+ } catch (_) {}+}+function init() {initStarFields();setupEmotionChips();setupCopyEmbed();setupProgressDots();loadOnChainAgent();+ setupScrollHint();+ setupAuthNav();}if (document.readyState === 'loading') {diff --git a/public/features/index.html b/public/features/index.htmlindex c40ddbc6a..a28fb6a33 100644--- a/public/features/index.html+++ b/public/features/index.html@@ -39,7 +39,7 @@<header><h1>- <a href="/"><img src="/three.svg" alt="three.ws" class="wordmark-logo" /></a>+ <a href="/"><img src="/three.svg" alt="three.ws logo" class="wordmark-logo" /></a></h1><nav class="features-nav" aria-label="Primary"><ul class="nav-root" role="menubar">@@ -102,12 +102,13 @@</li><li class="nav-item" role="none"><a href="/docs" role="menuitem">Docs</a></li><li class="nav-item" role="none">- <a href="/features" role="menuitem">Features</a>+ <a href="/features" role="menuitem" class="active">Features</a></li><li class="nav-item" role="none"><a href="/tutorials.html" role="menuitem">Tutorials</a></li><li class="nav-item" id="home-nav-my-agents-li" role="none" hidden><a href="/my-agents" id="home-nav-my-agents" role="menuitem">My Agents</a></li>+ <li class="nav-item" role="none"><a href="/login.html" role="menuitem">Sign in</a></li></ul></nav></header>@@ -644,28 +645,6 @@<a href="#act-onchain" class="act-dot" data-act="3" aria-label="Act 3: On-chain identity"></a></nav>- <script>- (function () {- const hint = document.querySelector('[data-role="scroll-hint"]');- if (!hint) return;- const container = document.querySelector('.parallax') || window;- function hide() {- hint.classList.add('scroll-hint--hidden');- hint.addEventListener('transitionend', () => { hint.hidden = true; }, { once: true });- container.removeEventListener('scroll', hide);- }- container.addEventListener('scroll', hide, { passive: true });- })();- </script><script type="module" src="/features/features.js"></script>- <script>- try {- const raw = localStorage.getItem('3dagent:auth-hint');- if (raw && JSON.parse(raw).authed) {- const el = document.getElementById('nav-my-agents');- if (el) el.hidden = false;- }- } catch (_) {}- </script></body></html>diff --git a/public/reputation/index.html b/public/reputation/index.htmlindex 575e4379a..2c81d2b44 100644--- a/public/reputation/index.html+++ b/public/reputation/index.html@@ -5,7 +5,7 @@<meta http-equiv="X-UA-Compatible" content="IE=edge" /><title>Agent Reputation — three.ws</title><meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />- <meta name="description" content="View and submit reviews for on-chain agents." />+ <meta name="description" content="View and submit on-chain reviews for AI agents registered on three.ws." /><meta name="theme-color" content="#0a0a0a" /><link rel="shortcut icon" href="/favicon.ico" />@@ -16,84 +16,116 @@rel="stylesheet"/>- <style>- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }+ <link rel="stylesheet" href="/style.css" />+ <link rel="stylesheet" href="/home.css" />+ <link rel="stylesheet" href="/footer.css" />+ <script defer src="/footer-newsletter.js"></script>+ <script+ type="module"+ src="https://ajax.googleapis.com/ajax/libs/model-viewer/4.0.0/model-viewer.min.js"+ ></script>- html,+ <style>body {background: #0a0a0a;color: #e5e5e5;- font-family:- 'Inter',- -apple-system,- BlinkMacSystemFont,- 'Segoe UI',- sans-serif;+ font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;font-size: 16px;line-height: 1.5;- height: 100%;- }-- body {overflow-y: auto;overflow-x: hidden;}- main {+ .rep-page-wrap {max-width: 800px;margin: 0 auto;- padding: 2rem 1.5rem;- min-height: 100vh;- }-- h1,- h2,- h3 {- font-family:- 'Space Grotesk',- -apple-system,- BlinkMacSystemFont,- 'Segoe UI',- sans-serif;- font-weight: 600;- letter-spacing: -0.5px;+ padding: 2rem 1.5rem 4rem;+ min-height: 60vh;}- h1 {- font-size: 2rem;- }- h3 {- font-size: 1.125rem;- margin: 1.5rem 0 1rem;+ .rep-breadcrumb {+ display: flex;+ align-items: center;+ gap: 0.5rem;+ font-size: 0.8125rem;+ color: rgba(229, 229, 229, 0.45);+ margin-bottom: 2rem;}- a {- color: #a78bfa;+ .rep-breadcrumb a {+ color: rgba(229, 229, 229, 0.45);text-decoration: none;}- a:hover {- color: #c4b5fd;++ .rep-breadcrumb a:hover {+ color: rgba(229, 229, 229, 0.8);+ }++ .rep-breadcrumb-sep {+ opacity: 0.4;+ }++ h1, h2, h3 {+ font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;+ font-weight: 600;+ letter-spacing: -0.5px;}+ h1 { font-size: 2rem; }+ h3 { font-size: 1.125rem; margin: 1.5rem 0 1rem; }++ a { color: #a78bfa; text-decoration: none; }+ a:hover { color: #c4b5fd; }++ /* ── Agent header ── */.rep-header {+ display: flex;+ align-items: flex-start;+ justify-content: space-between;+ gap: 1rem;margin-bottom: 2rem;padding-bottom: 1.5rem;border-bottom: 1px solid rgba(255, 255, 255, 0.06);}- .rep-header h1 {- margin: 0 0 0.5rem 0;- }+ .rep-header-left { flex: 1 1 auto; }+ .rep-header h1 { margin: 0 0 0.5rem 0; }.rep-header-meta {color: rgba(229, 229, 229, 0.6);font-size: 0.875rem;}+ .rep-share-btn {+ flex-shrink: 0;+ display: inline-flex;+ align-items: center;+ gap: 0.4rem;+ padding: 0.5rem 0.875rem;+ background: rgba(255, 255, 255, 0.06);+ border: 1px solid rgba(255, 255, 255, 0.12);+ border-radius: 6px;+ color: rgba(229, 229, 229, 0.7);+ font-size: 0.8125rem;+ font-weight: 500;+ cursor: pointer;+ transition: all 0.15s;+ font-family: inherit;+ }++ .rep-share-btn:hover {+ background: rgba(255, 255, 255, 0.1);+ color: #e5e5e5;+ border-color: rgba(255, 255, 255, 0.2);+ }++ .rep-share-btn.copied {+ background: rgba(100, 200, 100, 0.1);+ border-color: rgba(100, 200, 100, 0.3);+ color: #86efac;+ }++ /* ── Stats ── */.rep-stats {display: grid;grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));@@ -105,11 +137,7 @@border-radius: 8px;}- .rep-stat {- display: flex;- flex-direction: column;- gap: 0.5rem;- }+ .rep-stat { display: flex; flex-direction: column; gap: 0.5rem; }.rep-stat-label {font-size: 0.75rem;@@ -126,8 +154,38 @@font-family: 'Space Grotesk', monospace;}- .rep-reviews {- margin-bottom: 2rem;+ .rep-stat-value.positive { color: #86efac; }+ .rep-stat-value.negative { color: #fca5a5; }++ /* ── Score bar ── */+ .rep-score-bar {+ height: 4px;+ border-radius: 2px;+ background: rgba(255,255,255,0.08);+ overflow: hidden;+ margin-top: 0.5rem;+ }++ .rep-score-fill {+ height: 100%;+ border-radius: 2px;+ transition: width 0.6s ease;+ }++ /* ── Reviews ── */+ .rep-reviews { margin-bottom: 2rem; }++ .rep-reviews h3 {+ display: flex;+ align-items: center;+ justify-content: space-between;+ }++ .rep-review-count {+ font-size: 0.8125rem;+ font-weight: 400;+ color: rgba(229, 229, 229, 0.45);+ font-family: 'Inter', sans-serif;}.rep-empty {@@ -136,20 +194,14 @@padding: 2rem 1rem;}- .rep-review-list {- display: flex;- flex-direction: column;- gap: 1rem;- }+ .rep-review-list { display: flex; flex-direction: column; gap: 1rem; }.rep-review-item {padding: 1rem;background: rgba(255, 255, 255, 0.02);border: 1px solid rgba(255, 255, 255, 0.06);border-radius: 6px;- transition:- background 0.15s,- border-color 0.15s;+ transition: background 0.15s, border-color 0.15s;}.rep-review-item:hover {@@ -172,10 +224,32 @@font-family: 'Courier New', monospace;}- .rep-stars {- font-size: 0.875rem;- letter-spacing: 2px;- color: #fbbf24;+ .rep-score-badge {+ display: inline-flex;+ align-items: center;+ padding: 0.2rem 0.6rem;+ border-radius: 20px;+ font-size: 0.8125rem;+ font-weight: 700;+ font-family: 'Space Grotesk', monospace;+ }++ .rep-score-badge.pos {+ background: rgba(134, 239, 172, 0.12);+ color: #86efac;+ border: 1px solid rgba(134, 239, 172, 0.2);+ }++ .rep-score-badge.neg {+ background: rgba(252, 165, 165, 0.12);+ color: #fca5a5;+ border: 1px solid rgba(252, 165, 165, 0.2);+ }++ .rep-score-badge.neu {+ background: rgba(255, 255, 255, 0.06);+ color: rgba(229, 229, 229, 0.5);+ border: 1px solid rgba(255, 255, 255, 0.08);}.rep-comment {@@ -192,12 +266,12 @@gap: 0.75rem;align-items: center;font-size: 0.75rem;+ color: rgba(229, 229, 229, 0.35);}- .rep-review-footer a {- color: #a78bfa;- }+ .rep-review-footer a { color: #a78bfa; }+ /* ── Submit form ── */.rep-submit-form {margin-top: 2.5rem;padding: 1.5rem;@@ -206,9 +280,7 @@border-radius: 8px;}- .rep-form-group {- margin-bottom: 1.5rem;- }+ .rep-form-group { margin-bottom: 1.5rem; }.rep-form-group label {display: block;@@ -217,6 +289,12 @@font-size: 0.875rem;}+ .rep-rating-hint {+ font-size: 0.75rem;+ color: rgba(229, 229, 229, 0.45);+ margin-bottom: 0.5rem;+ }+.rep-stars-input {display: flex;gap: 0.5rem;@@ -233,20 +311,14 @@border-radius: 6px;cursor: pointer;transition: all 0.15s;- font-weight: 500;- }-- .rep-star-btn:hover {- background: rgba(251, 191, 36, 0.1);- color: #fbbf24;- border-color: rgba(251, 191, 36, 0.3);+ font-weight: 600;+ font-family: 'Space Grotesk', monospace;}- .rep-star-btn.selected {- background: rgba(251, 191, 36, 0.15);- color: #fbbf24;- border-color: rgba(251, 191, 36, 0.3);- }+ .rep-star-btn:hover { background: rgba(139, 92, 246, 0.15); color: #c4b5fd; border-color: rgba(139, 92, 246, 0.3); }+ .rep-star-btn.selected { background: rgba(139, 92, 246, 0.2); color: #c4b5fd; border-color: rgba(139, 92, 246, 0.5); }+ .rep-star-btn[data-value^="-"]:hover { background: rgba(252, 165, 165, 0.1); color: #fca5a5; border-color: rgba(252, 165, 165, 0.3); }+ .rep-star-btn[data-value^="-"].selected { background: rgba(252, 165, 165, 0.12); color: #fca5a5; border-color: rgba(252, 165, 165, 0.4); }textarea {width: 100%;@@ -285,26 +357,20 @@border-radius: 6px;cursor: pointer;transition: all 0.15s;+ font-family: inherit;}- .rep-submit-btn:hover:not(:disabled) {- background: #7c3aed;- }-- .rep-submit-btn:disabled {- opacity: 0.6;- cursor: not-allowed;- }+ .rep-submit-btn:hover:not(:disabled) { background: #7c3aed; }+ .rep-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }.rep-form-hint {text-align: center;color: rgba(229, 229, 229, 0.5);}- #rep-rating {- display: none;- }+ #rep-rating { display: none; }+ /* ── States ── */.rep-error {padding: 2rem;text-align: center;@@ -313,15 +379,8 @@border-radius: 8px;}- .rep-error h3 {- margin: 0 0 0.5rem 0;- color: rgba(255, 200, 200, 0.9);- }-- .rep-error p {- color: rgba(255, 150, 150, 0.8);- margin: 0 0 1rem 0;- }+ .rep-error h3 { margin: 0 0 0.5rem 0; color: rgba(255, 200, 200, 0.9); }+ .rep-error p { color: rgba(255, 150, 150, 0.8); margin: 0 0 1rem 0; }.rep-error button {padding: 0.5rem 1.5rem;@@ -331,6 +390,7 @@border-radius: 4px;cursor: pointer;font-weight: 500;+ font-family: inherit;}.rep-success {@@ -341,12 +401,49 @@color: #86efac;}+ .rep-loading {+ text-align: center;+ padding: 3rem;+ color: rgba(229, 229, 229, 0.5);+ }++ .spinner {+ display: inline-block;+ width: 20px;+ height: 20px;+ border: 2px solid rgba(139, 92, 246, 0.3);+ border-top-color: #8b5cf6;+ border-radius: 50%;+ animation: spin 0.8s linear infinite;+ margin-bottom: 0.75rem;+ }++ @keyframes spin { to { transform: rotate(360deg); } }++ /* ── Lookup form ── */+ .rep-lookup-wrap {+ display: flex;+ flex-direction: column;+ align-items: center;+ padding: 3rem 0 2rem;+ text-align: center;+ }++ .rep-lookup-wrap h1 { margin-bottom: 0.5rem; }+ .rep-lookup-wrap .rep-lookup-sub {+ color: rgba(229, 229, 229, 0.55);+ font-size: 0.9375rem;+ margin-bottom: 2rem;+ }+.rep-lookup-form {+ width: 100%;max-width: 420px;padding: 2rem;background: rgba(139, 92, 246, 0.04);- border: 1px solid rgba(139, 92, 246, 0.1);- border-radius: 8px;+ border: 1px solid rgba(139, 92, 246, 0.12);+ border-radius: 10px;+ text-align: left;}.rep-lookup-form select,@@ -360,41 +457,33 @@font-family: 'Inter', sans-serif;font-size: 0.9375rem;appearance: none;+ -webkit-appearance: none;}+ .rep-lookup-form select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='rgba(229,229,229,0.4)' d='M6 8L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2rem; }+.rep-lookup-form select:focus,.rep-lookup-form input[type="number"]:focus {outline: none;- background: rgba(255, 255, 255, 0.08);- border-color: rgba(139, 92, 246, 0.3);- }-- .rep-loading {- text-align: center;- padding: 2rem;- color: rgba(229, 229, 229, 0.5);+ background-color: rgba(255, 255, 255, 0.08);+ border-color: rgba(139, 92, 246, 0.4);}- .spinner {- display: inline-block;- width: 20px;- height: 20px;- border: 2px solid rgba(139, 92, 246, 0.3);- border-top-color: #8b5cf6;- border-radius: 50%;- animation: spin 0.8s linear infinite;+ .rep-lookup-form .rep-form-group label {+ color: rgba(229, 229, 229, 0.7);}- @keyframes spin {- to {- transform: rotate(360deg);- }+ /* ── Unsupported chain ── */+ .rep-unsupported-chain {+ padding: 2rem;+ background: rgba(255, 200, 50, 0.06);+ border: 1px solid rgba(255, 200, 50, 0.15);+ border-radius: 8px;}+ /* ── Responsive ── */@media (max-width: 640px) {- main {- padding: 1rem;- }+ .rep-page-wrap { padding: 1.5rem 1rem 3rem; }.rep-stats {grid-template-columns: repeat(3, 1fr);@@ -402,25 +491,239 @@padding: 1rem;}- .rep-stat-value {- font-size: 1.25rem;- }+ .rep-stat-value { font-size: 1.25rem; }- .rep-review-header {- flex-direction: column;- align-items: flex-start;- }+ .rep-header { flex-direction: column; gap: 0.75rem; }+ .rep-share-btn { align-self: flex-start; }++ .rep-review-header { flex-direction: column; align-items: flex-start; }}</style></head><body>- <main id="app">- <div class="rep-loading">- <div class="spinner"></div>- <p>Loading reputation…</p>+ <a href="#rep-content" class="h-skip-link">Skip to content</a>++ <header>+ <h1>+ <a href="/" aria-label="three.ws home"+ ><img class="wordmark-logo" src="/three.svg" alt="" aria-hidden="true" /><span+ class="wordmark-dot"+ aria-hidden="true"+ ></span+ >three.ws</a+ >+ </h1>+ <nav class="home-nav" aria-label="Primary">+ <ul class="nav-root" role="menubar">+ <li class="nav-item nav-has-menu" role="none">+ <button type="button" class="nav-trigger" aria-haspopup="true" aria-expanded="false" role="menuitem">+ Build<span class="nav-caret" aria-hidden="true">▾</span>+ </button>+ <ul class="nav-menu" role="menu" aria-label="Build">+ <li role="none"><a href="/create" role="menuitem"><span class="nav-mi-title">Create agent</span><span class="nav-mi-sub">Avatar + brain wizard</span></a></li>+ <li role="none"><a href="/app" role="menuitem"><span class="nav-mi-title">Viewer</span><span class="nav-mi-sub">Drag-and-drop GLB</span></a></li>+ <li role="none"><a href="/validation" role="menuitem"><span class="nav-mi-title">glTF Validator</span><span class="nav-mi-sub">Khronos spec check</span></a></li>+ </ul>+ </li>+ <li role="none"><a href="/discover" role="menuitem">Discover</a></li>+ <li class="nav-item nav-has-menu" role="none">+ <button type="button" class="nav-trigger" aria-haspopup="true" aria-expanded="false" role="menuitem">+ Solana<span class="nav-caret" aria-hidden="true">▾</span>+ </button>+ <ul class="nav-menu" role="menu" aria-label="Solana">+ <li role="none"><a href="/pumpfun" role="menuitem"><span class="nav-mi-title">Pump.fun stream</span><span class="nav-mi-sub">Mint agent tokens</span></a></li>+ <li role="none"><a href="/vanity-wallet" role="menuitem"><span class="nav-mi-title">Vanity wallet</span><span class="nav-mi-sub">Grind a Solana address</span></a></li>+ <li role="none"><a href="/strategy-lab" role="menuitem"><span class="nav-mi-title">Strategy Lab</span><span class="nav-mi-sub">DCA + subscriptions</span></a></li>+ <li role="none"><a href="/pump-live.html" role="menuitem"><span class="nav-mi-title">Live launches</span><span class="nav-mi-sub">Real-time mint feed</span></a></li>+ <li role="none"><a href="/pump-dashboard.html" role="menuitem"><span class="nav-mi-title">Pump Dashboard</span><span class="nav-mi-sub">Watches · scanner · quotes</span></a></li>+ <li role="none"><a href="/docs#solana" role="menuitem"><span class="nav-mi-title">Solana SDK</span><span class="nav-mi-sub">Attestations + agent-kit</span></a></li>+ </ul>+ </li>+ <li class="nav-item nav-has-menu" role="none">+ <button type="button" class="nav-trigger" aria-haspopup="true" aria-expanded="false" role="menuitem">+ Embed<span class="nav-caret" aria-hidden="true">▾</span>+ </button>+ <ul class="nav-menu" role="menu" aria-label="Embed">+ <li role="none"><a href="/studio" role="menuitem"><span class="nav-mi-title">Widget Studio</span><span class="nav-mi-sub">Pick avatar → copy snippet</span></a></li>+ <li role="none"><a href="/artifact" role="menuitem"><span class="nav-mi-title">Artifact viewer</span><span class="nav-mi-sub">Claude artifact bundle</span></a></li>+ <li role="none"><a href="/docs#embedding" role="menuitem"><span class="nav-mi-title">Embed docs</span><span class="nav-mi-sub">iframe + oEmbed</span></a></li>+ <li role="none"><a href="/docs#web-component" role="menuitem"><span class="nav-mi-title"><agent-3d></span><span class="nav-mi-sub">Web component reference</span></a></li>+ </ul>+ </li>+ <li class="nav-item" role="none"><a href="/marketplace.html" role="menuitem">Marketplace</a></li>+ <li class="nav-item" role="none"><a href="/chat" role="menuitem">Chat</a></li>+ <li class="nav-item" role="none"><a href="/features" role="menuitem">Features</a></li>+ <li class="nav-item" role="none"><a href="/tutorials.html" role="menuitem">Tutorials</a></li>+ <li class="nav-item" id="home-nav-my-agents-li" role="none" hidden>+ <a href="/my-agents" id="home-nav-my-agents" role="menuitem">My Agents</a>+ </li>+ <li class="nav-item" id="home-nav-user-li" role="none" hidden>+ <a href="/dashboard" id="home-nav-user" class="nav-user" role="menuitem"></a>+ </li>+ <li class="nav-item" role="none">+ <a href="/login" class="nav-cta" id="home-nav-cta" role="menuitem">Get started</a>+ </li>+ </ul>+ </nav>+ </header>++ <main id="rep-content">+ <div class="rep-page-wrap">+ <div id="app">+ <div class="rep-loading">+ <div class="spinner"></div>+ <p>Loading…</p>+ </div>+ </div></div></main>+ <footer class="h-footer h-footer-horizon">+ <div class="h-footer-glow-line" aria-hidden="true"></div>+ <div class="h-footer-floor" aria-hidden="true"></div>+ <div class="h-footer-haze" aria-hidden="true"></div>+ <div class="h-footer-watermark" aria-hidden="true">three.ws</div>+ <div class="h-footer-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 9m"+ field-of-view="45deg"+ loading="lazy"+ ></model-viewer>+ </div>+ <div class="h-footer-cta">+ <div class="h-footer-newsletter">+ <h3>Stay in the loop</h3>+ <p>Get updates on new features, agent tooling, and protocol changes.</p>+ <form class="h-footer-newsletter-form" data-newsletter-form novalidate>+ <input type="email" class="h-footer-newsletter-input" name="email" placeholder="Enter your email" aria-label="Email address" autocomplete="email" required />+ <button type="submit" class="h-footer-newsletter-btn" aria-label="Subscribe">+ <svg viewBox="0 0 16 16" aria-hidden="true">+ <path fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" d="M2 8h11m0 0L9 4m4 4l-4 4" />+ </svg>+ </button>+ </form>+ <p class="h-footer-newsletter-msg" data-newsletter-msg aria-live="polite"></p>+ </div>+ <div class="h-footer-community">+ <h3>Join the community</h3>+ <p>Follow along for builds, demos, and conversations with the team.</p>+ <a class="h-footer-community-btn" href="https://x.com/trythreews" target="_blank" rel="noopener">+ <svg viewBox="0 0 24 24" aria-hidden="true">+ <path fill="currentColor" d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" />+ </svg>+ Follow on X+ </a>+ </div>+ </div>+ <div class="h-footer-inner">+ <div class="h-footer-brand-col">+ <div class="h-footer-brand">+ <img class="wordmark-logo" src="/three.svg" alt="" aria-hidden="true" />+ <span class="wordmark-dot" aria-hidden="true"></span>+ <span>three.ws</span>+ </div>+ <p class="h-footer-tagline">Give your AI a body.</p>+ <div class="h-footer-socials">+ <a class="h-footer-social" href="https://x.com/trythreews" target="_blank" rel="noopener" aria-label="three.ws on X">+ <svg viewBox="0 0 24 24" aria-hidden="true">+ <path fill="currentColor" d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" />+ </svg>+ </a>+ <a class="h-footer-social" href="https://github.com/nirholas/three.ws" target="_blank" rel="noopener" aria-label="three.ws 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>+ </a>+ </div>+ </div>+ <nav class="h-footer-links" aria-label="Footer">+ <div class="h-footer-link-col">+ <h4 class="h-footer-link-heading">Product</h4>+ <a href="/create">Create</a>+ <a href="/studio">Studio</a>+ <a href="/widgets.html">Widgets</a>+ <a href="/discover">Discover</a>+ </div>+ <div class="h-footer-link-col">+ <h4 class="h-footer-link-heading">Developers</h4>+ <a href="/docs">Docs</a>+ <a href="https://github.com/nirholas/three.ws" target="_blank" rel="noopener">GitHub</a>+ <a href="https://eips.ethereum.org/EIPS/eip-8004" target="_blank" rel="noopener">ERC-8004</a>+ </div>+ <div class="h-footer-link-col">+ <h4 class="h-footer-link-heading">Resources</h4>+ <a href="/features">Features</a>+ <a href="/dashboard">Dashboard</a>+ </div>+ </nav>+ </div>+ <div class="h-footer-bottom">+ <p class="h-footer-legal">© 2026 three.ws — All rights reserved.</p>+ <div class="h-footer-legal-links">+ <a href="/legal/privacy">Privacy Policy</a>+ <a href="/legal/tos">Terms of Use</a>+ </div>+ </div>+ </footer>++ <script>+ // Auth-aware nav CTA+ (function () {+ try {+ const raw = localStorage.getItem('3dagent:auth-hint');+ if (!raw) return;+ const { authed, name } = JSON.parse(raw);+ if (!authed) return;+ const cta = document.getElementById('home-nav-cta');+ if (cta) { cta.textContent = 'Dashboard'; cta.href = '/dashboard'; }+ const myAgentsLi = document.getElementById('home-nav-my-agents-li');+ if (myAgentsLi) myAgentsLi.hidden = false;+ const userLi = document.getElementById('home-nav-user-li');+ const userEl = document.getElementById('home-nav-user');+ if (userEl && userLi && name) { userEl.textContent = name; userLi.hidden = false; }+ } catch (_) {}+ })();++ // Dropdown nav+ (function () {+ const triggers = document.querySelectorAll('.home-nav .nav-trigger');+ if (!triggers.length) return;+ function closeAll(except) {+ triggers.forEach((t) => { if (t !== except) t.setAttribute('aria-expanded', 'false'); });+ }+ triggers.forEach((trigger) => {+ trigger.addEventListener('click', (e) => {+ e.stopPropagation();+ const open = trigger.getAttribute('aria-expanded') === 'true';+ closeAll(open ? null : trigger);+ trigger.setAttribute('aria-expanded', open ? 'false' : 'true');+ if (!open) { const first = trigger.nextElementSibling?.querySelector('a'); first?.focus(); }+ });+ const menu = trigger.nextElementSibling;+ if (!menu) return;+ menu.addEventListener('keydown', (e) => {+ const items = Array.from(menu.querySelectorAll('a'));+ const idx = items.indexOf(document.activeElement);+ if (e.key === 'ArrowDown') { e.preventDefault(); items[(idx + 1) % items.length]?.focus(); }+ else if (e.key === 'ArrowUp') { e.preventDefault(); items[(idx - 1 + items.length) % items.length]?.focus(); }+ else if (e.key === 'Escape') { trigger.setAttribute('aria-expanded', 'false'); trigger.focus(); }+ });+ });+ document.addEventListener('click', (e) => { if (!e.target.closest('.home-nav')) closeAll(null); });+ document.addEventListener('keydown', (e) => { if (e.key === 'Escape') closeAll(null); });+ })();+ </script>+<script type="importmap">{"imports": {diff --git a/public/reputation/reputation.js b/public/reputation/reputation.jsindex 9438af289..108d69c90 100644--- a/public/reputation/reputation.js+++ b/public/reputation/reputation.js@@ -89,29 +89,29 @@ function parseAgentId() {function showLookupForm(appEl) {appEl.innerHTML = `- <div class="rep-header">+ <div class="rep-lookup-wrap"><h1>Agent Reputation</h1>- <div class="rep-header-meta">Look up on-chain reviews and ratings for any registered agent.</div>- </div>- <div class="rep-lookup-form">- <div class="rep-form-group">- <label for="lookup-chain">Chain ID</label>- <select id="lookup-chain">- <option value="1">Ethereum (1)</option>- <option value="137">Polygon (137)</option>- <option value="8453" selected>Base (8453)</option>- <option value="42161">Arbitrum One (42161)</option>- <option value="10">Optimism (10)</option>- <option value="11155111">Ethereum Sepolia (11155111)</option>- <option value="84532">Base Sepolia (84532)</option>- <option value="421614">Arbitrum Sepolia (421614)</option>- </select>- </div>- <div class="rep-form-group">- <label for="lookup-agent">Agent ID</label>- <input type="number" id="lookup-agent" placeholder="e.g. 42" min="1" />+ <p class="rep-lookup-sub">View and submit on-chain reviews for any registered agent.</p>+ <div class="rep-lookup-form">+ <div class="rep-form-group">+ <label for="lookup-chain">Network</label>+ <select id="lookup-chain">+ <option value="1">Ethereum (1)</option>+ <option value="137">Polygon (137)</option>+ <option value="8453" selected>Base (8453)</option>+ <option value="42161">Arbitrum One (42161)</option>+ <option value="10">Optimism (10)</option>+ <option value="11155111">Ethereum Sepolia (11155111)</option>+ <option value="84532">Base Sepolia (84532)</option>+ <option value="421614">Arbitrum Sepolia (421614)</option>+ </select>+ </div>+ <div class="rep-form-group">+ <label for="lookup-agent">Agent ID</label>+ <input type="number" id="lookup-agent" placeholder="e.g. 42" min="1" />+ </div>+ <button id="lookup-btn" class="rep-submit-btn">View Reputation</button></div>- <button id="lookup-btn" class="rep-submit-btn">View Reputation</button></div>`;@@ -165,16 +165,20 @@ function formatScore(score) {return '—';}-function getRatingClass(score) {- if (score > 0) return 'rating-positive';- if (score < 0) return 'rating-negative';- return 'rating-neutral';+function scoreBadge(score) {+ if (score > 0) return `<span class="rep-score-badge pos">+${score}</span>`;+ if (score < 0) return `<span class="rep-score-badge neg">${score}</span>`;+ return `<span class="rep-score-badge neu">0</span>`;+}++function scoreBarHtml(average) {+ if (typeof average !== 'number' || isNaN(average)) return '';+ const pct = Math.max(0, Math.min(100, ((average + 100) / 200) * 100));+ const color = average > 0 ? '#86efac' : average < 0 ? '#fca5a5' : 'rgba(255,255,255,0.3)';+ return `<div class="rep-score-bar"><div class="rep-score-fill" style="width:${pct}%;background:${color}"></div></div>`;}-function formatDate(blockNumber) {- // Rough estimate: blockNumber doesn't give us date directly- // In production, you'd want to store the actual timestamp on-chain- // For now, just show "Recent"+function formatDate() {return 'Recent';}diff --git a/src/app.js b/src/app.jsindex 71e4242dc..fc8b3a9ae 100644--- a/src/app.js+++ b/src/app.js@@ -415,6 +415,12 @@ class App {}});+ this.runtime.addEventListener('brain:action', (e) => {+ if (this.viewer && e.detail.tool_name === 'setCameraTarget') {+ this.viewer.setCameraTarget(e.detail.tool_input.boneName);+ }+ });+// Expose agent on window for debuggingwindow.VIEWER.agent_protocol = protocol;window.VIEWER.agent_identity = this.identity;diff --git a/src/nich-agent.js b/src/nich-agent.jsindex da9795ab4..ef271a782 100644--- a/src/nich-agent.js+++ b/src/nich-agent.js@@ -548,6 +548,11 @@ export class NichAgent {case 'showMaterialEditor':app?.editor?.sceneExplorer?.toggle?.();break;+ case 'setCameraTarget':+ if (viewer && typeof action.boneName === 'string') {+ viewer.setCameraTarget(action.boneName);+ }+ break;default:console.warn('[NichAgent] unknown action:', action.type);}diff --git a/src/viewer.js b/src/viewer.jsindex 52022fd83..af649a735 100644--- a/src/viewer.js+++ b/src/viewer.js@@ -210,6 +210,33 @@ export class Viewer {window.addEventListener('message', this._onMessage, false);}+ setCameraTarget(boneName) {+ if (!this.content) return;++ let bone = null;+ this.content.traverse((object) => {+ if (object.isBone && object.name === boneName) {+ bone = object;+ }+ });++ if (bone) {+ const target = new THREE.Vector3();+ bone.getWorldPosition(target);+ this._tweenCamera(this.defaultCamera.position, target, 600);+ }+ }++ setCameraTarget(boneName) {+ if (!this.content) return;+ const bone = this.content.getObjectByName(boneName);+ if (bone) {+ const target = new Vector3();+ bone.getWorldPosition(target);+ this._tweenCamera(this.defaultCamera.position, target, 600);+ }+ }+invalidate() {if (this._disposed) return;this._needsRender = true;diff --git a/tutorials.html b/tutorials.htmlindex 9d4471987..3272266b4 100644--- a/tutorials.html+++ b/tutorials.html@@ -19,7 +19,7 @@property="og:description"content="Tutorials for creating and using 3D agents."/>- <meta property="og:url" content="https://three.ws/tutorials" />+ <meta property="og:url" content="https://threejs.org/docs/" /><meta property="og:image" content="https://three.ws/og-image.png" /><meta property="og:image:width" content="1200" /><meta property="og:image:height" content="630" />@@ -32,7 +32,7 @@/><meta name="twitter:image" content="https://three.ws/og-image.png" />- <link rel="canonical" href="https://three.ws/tutorials" />+ <link rel="canonical" href="https://threejs.org/docs/" /><link rel="shortcut icon" href="/favicon.ico" /><link rel="apple-touch-icon" href="/pwa-192x192.png" /><link rel="preconnect" href="https://fonts.googleapis.com" />