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.

Avatar/3D-Object type selector on create-review, FLUX+TRELLIS auto-lighting enhancement, forge reveal exposure + supplemental lights

nirholascbc28ec906ed
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 12e1b0ebb..541a90f62 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **After you launch a coin, jump straight to viewing or managing it** — The success screen you see right after launching a coin no longer dead-ends. Alongside the shareable card and copy/share buttons, there's now a clear set of next steps: View in 3D opens your coin as a live, interactive 3D scene; Manage on Dashboard takes you straight to that agent's control panel — with its row highlighted and ready — so you can speak, animate, and manage it; and View on pump.fun opens the coin on pump.fun. Closing the modal no longer forces a full page reload, so the rest of the page updates smoothly in place. (`/pump-dashboard`) `[improvement]`
- **Agent reputation now reflects a real pump.fun track record** — An agent's pump.fun behavior now feeds its reputation and shows on its passport. When the wallet behind an agent graduates a token, claims creator fees, makes a whale-sized buy, or launches a coin, that moment is recorded as a typed signal — graduating a token counts for more than a routine claim, and a flagged or brand-new-account claim counts against. These signals roll up into the agent's Solana reputation score and appear on the public agent passport, readable by anyone without a wallet. The live pump.fun dashboard gains a new "SIGNAL" lane that surfaces these agent-attributed events as they happen, alongside the raw mint, whale, and claim feed. The processor behind this used to sit idle unless an optional external service was configured; it now runs continuously off the platform's own live pump.fun stream with no external dependency, records only genuinely new events so nothing is double-counted, and attributes each one to the agent behind the wallet. (`/pump-dashboard`) `[improvement, fix]`
+- **Agents and items are now clearly separate — a teapot won't get a brain** — Every 3D model you create is now clearly one of two things: an Agent (a character that thinks, talks, remembers, and can go on-chain) or an Item (a 3D object or prop for scenes and trading). On the review screen the choice is spelled out with a short description of each, and we pick a smart default — models from the selfie, studio, and character tools start as agents, while anything you type into existence with prompt-to-3D starts as an item, so a teapot is never pre-loaded with a brain. Pick Item and the agent-only capabilities (voice, persona, on-chain identity) step aside for a gentle note — with a one-click "made a character? make it an agent" escape hatch if the guess was wrong. The Forge tagger now groups its labels the same way, calling out that only avatars and creatures can become agents. (`/create`) `[improvement]`
- **Agents can autonomously trade USDC-paired coins** — An agent's own wallet can now buy and sell USDC-paired coins on its own — not just SOL ones. Until now the autonomous lanes (an agent's buy/sell endpoints, scheduled buybacks, and creator-fee distributions) assumed every coin priced in SOL, so on a USDC coin they would have built a SOL trade the market refuses. Now the agent reads each coin's real pairing straight from the chain and trades in the matching currency: a USDC coin is bought and sold in USDC, with the agent's USDC account opened automatically and its balance checked up front so a trade fails clearly instead of reverting on-chain. Buybacks and fee distributions follow the same rule — they run in the coin's own currency, and if a coin's setup genuinely can't support a run, it's recorded with the reason rather than silently skipped. Every trade is now logged with the exact quote asset and amount, so prices and volumes stay correct for USDC and SOL coins alike. SOL coins behave exactly as before. (`/pump-dashboard`) `[feature]`
- **Autonomous coin buybacks and creator-fee distributions now run on schedule** — Coins launched through three.ws with autopilot enabled now have their buybacks and creator-fee distributions executed automatically on an hourly schedule, instead of waiting for a manual trigger. A new balance watchdog checks every Solana signer the platform uses to pay on-chain fees and alerts the team the moment one runs low, so autopilot never silently stalls for lack of gas. No action needed from coin owners — it just works in the background. `[improvement, infra]`
- **Buy and sell USDC-paired coins straight from the trade widget** — The in-world trade widget now speaks both currencies. Open Buy on a coin and the widget reads its real pairing from the chain: a SOL coin asks for SOL exactly as before, while a USDC-paired coin denominates the amount in USDC, shows your wallet's USDC balance, and prices and settles the trade in USDC. A new Sell tab lets you sell a coin you hold back to its quote asset — pick 25%, 50%, or Max of your balance, see the live payout, and sign once; for USDC coins the payout account is opened for you automatically in the same transaction. Every state is handled: not enough USDC offers a one-tap Add-funds flow, a moved price explains your slippage, and a cancelled signature is quietly acknowledged. The whole flow is your own wallet, signed in your browser, with a Solscan link the moment it lands. (`/play`) `[feature]`
diff --git a/api/_lib/avatars.js b/api/_lib/avatars.js
index 9dbc14874..7c148385c 100644
--- a/api/_lib/avatars.js
+++ b/api/_lib/avatars.js
@@ -36,6 +36,7 @@ export async function listAvatars({
a.alt_text,
a.appearance, a.appearance_hash, a.baked_storage_key, a.baked_at,
a.size_bytes, a.content_type, a.source, a.visibility, a.tags, a.version,
+ a.model_category,
a.created_at, a.updated_at, a.parent_avatar_id,
ai.id as agent_id, ai.wallet_address as agent_wallet_address
from avatars a
@@ -345,6 +346,7 @@ function decorate(row) {
content_type: row.content_type,
source: row.source,
source_meta: row.source_meta || {},
+ model_category: row.model_category || 'avatar',
visibility: row.visibility,
tags: row.tags || [],
version: row.version,
diff --git a/api/_mcp3d/text-to-image.js b/api/_mcp3d/text-to-image.js
index acbf7203a..c80bafdae 100644
--- a/api/_mcp3d/text-to-image.js
+++ b/api/_mcp3d/text-to-image.js
@@ -159,6 +159,24 @@ async function nimFluxImage(prompt, aspectRatio) {
return { imageUrl: await persistImageBase64(b64), model: NIM_FLUX_MODEL };
}
+// Words that signal the caller already set their own lighting / background style.
+// When present we leave the prompt untouched; otherwise we append rendering cues
+// that steer FLUX toward clean, bright, single-subject images that bake into
+// better 3D meshes (TRELLIS reconstructs geometry + texture from this image).
+const FLUX_STYLE_WORDS = [
+ 'studio', 'light', 'bright', 'backlit', 'background', 'plain', 'colorful',
+ 'vibrant', 'white bg', 'isolated', 'cartoon', 'stylized',
+];
+const FLUX_STYLE_SUFFIX = ', isolated subject, bright studio lighting, plain white background';
+
+function enhanceFluxPrompt(raw) {
+ const text = String(raw || '').trim();
+ if (!text) return text;
+ const lower = text.toLowerCase();
+ const hasStyle = FLUX_STYLE_WORDS.some((w) => lower.includes(w));
+ return hasStyle ? text : text + FLUX_STYLE_SUFFIX;
+}
+
// Generate a single image from a text prompt.
//
// Tries the free lanes first (NIM FLUX, then Vertex Imagen) and degrades to the
@@ -166,6 +184,7 @@ async function nimFluxImage(prompt, aspectRatio) {
// provider must hand off, never take down the whole text→3D pipeline. The last
// configured lane's error is surfaced only when nothing is left to try.
export async function textToImage(prompt, { aspectRatio = '1:1' } = {}) {
+ prompt = enhanceFluxPrompt(prompt);
const token = readEnv('REPLICATE_API_TOKEN');
const hasVertex = !!readEnv('GOOGLE_CLOUD_PROJECT');
diff --git a/api/_providers/nvidia.js b/api/_providers/nvidia.js
index 29e4f9e2d..f90285b19 100644
--- a/api/_providers/nvidia.js
+++ b/api/_providers/nvidia.js
@@ -48,6 +48,21 @@ const NVCF_STATUS_URL = 'https://api.nvcf.nvidia.com/v2/nvcf/pexec/status';
// request is honest about what's actually conditioning the generation.
const TRELLIS_PROMPT_MAX = 77;
+// Without explicit lighting/color hints TRELLIS defaults to dark, gritty
+// aesthetics. Reserve 17 chars at the end for a studio-lighting suffix and
+// append it unless the caller already included their own lighting/color cues.
+const TRELLIS_STYLE_SUFFIX = ', studio lighting';
+const TRELLIS_STYLE_WORDS = ['studio', 'light', 'bright', 'backlit', 'colorful', 'vibrant', 'cartoon', 'stylized'];
+
+function enhanceTrellisPrompt(raw) {
+ const text = String(raw || '').trim();
+ const lower = text.toLowerCase();
+ const hasStyle = TRELLIS_STYLE_WORDS.some((w) => lower.includes(w));
+ if (hasStyle) return text.slice(0, TRELLIS_PROMPT_MAX);
+ const maxBase = TRELLIS_PROMPT_MAX - TRELLIS_STYLE_SUFFIX.length;
+ return text.slice(0, maxBase) + TRELLIS_STYLE_SUFFIX;
+}
+
// Per-request timeouts so a hung upstream never stalls a serverless function.
// A completed poll streams the full GLB (can be several MB), so it gets longer.
const SUBMIT_TIMEOUT_MS = 30_000;
@@ -100,7 +115,7 @@ function buildTextBody({ prompt, tier, seed }) {
const steps = trellisSteps(tier);
const body = {
mode: 'text',
- prompt: String(prompt || '').slice(0, TRELLIS_PROMPT_MAX),
+ prompt: enhanceTrellisPrompt(prompt),
ss_sampling_steps: steps.ss,
slat_sampling_steps: steps.slat,
output_format: 'glb',
diff --git a/data/changelog.json b/data/changelog.json
index 1ff79c336..eadd9019f 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -1,6 +1,13 @@
{
"$comment": "Curated changelog entries for three.ws — the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.",
"entries": [
+ {
+ "date": "2026-06-15",
+ "title": "Agents and items are now clearly separate — a teapot won't get a brain",
+ "summary": "Every 3D model you create is now clearly one of two things: an Agent (a character that thinks, talks, remembers, and can go on-chain) or an Item (a 3D object or prop for scenes and trading). On the review screen the choice is spelled out with a short description of each, and we pick a smart default — models from the selfie, studio, and character tools start as agents, while anything you type into existence with prompt-to-3D starts as an item, so a teapot is never pre-loaded with a brain. Pick Item and the agent-only capabilities (voice, persona, on-chain identity) step aside for a gentle note — with a one-click \"made a character? make it an agent\" escape hatch if the guess was wrong. The Forge tagger now groups its labels the same way, calling out that only avatars and creatures can become agents.",
+ "tags": ["improvement"],
+ "link": "/create"
+ },
{
"date": "2026-06-15",
"title": "Clearer launch & trade errors, and a graduated badge on coins",
diff --git a/pages/create-review.html b/pages/create-review.html
index eb0e20482..3cc400569 100644
--- a/pages/create-review.html
+++ b/pages/create-review.html
@@ -1482,6 +1482,119 @@
}
.secondary:hover { border-color: #2e2e2e; color: var(--text); }
+ .type-selector {
+ display: flex;
+ flex-direction: column;
+ gap: 6px;
+ }
+ .type-selector-label {
+ font-size: 11px;
+ font-weight: 600;
+ text-transform: uppercase;
+ letter-spacing: 0.07em;
+ color: var(--muted);
+ margin: 0;
+ }
+ .type-selector-btns {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: 6px;
+ }
+ .type-btn {
+ background: transparent;
+ color: var(--muted);
+ border: 1.5px solid var(--border);
+ border-radius: 8px;
+ padding: 9px 10px;
+ font: inherit;
+ font-size: 13px;
+ font-weight: 500;
+ cursor: pointer;
+ transition: border-color 0.15s, color 0.15s, background 0.15s;
+ text-align: center;
+ }
+ .type-btn:hover { border-color: #2e2e2e; color: var(--text); }
+ .type-btn.active {
+ border-color: var(--accent);
+ color: var(--accent);
+ background: color-mix(in srgb, var(--accent) 8%, transparent);
+ }
+ /* Richer two-line type cards: bold title + muted one-line description so
+ the agent/item distinction is legible at a glance. */
+ .type-btn {
+ display: flex;
+ flex-direction: column;
+ gap: 3px;
+ padding: 11px 12px;
+ text-align: left;
+ }
+ .type-btn-title {
+ font-size: 14px;
+ font-weight: 600;
+ letter-spacing: -0.005em;
+ color: var(--text);
+ }
+ .type-btn.active .type-btn-title { color: var(--accent); }
+ .type-btn-desc {
+ font-size: 11px;
+ line-height: 1.35;
+ color: var(--muted);
+ }
+
+ /* Item soft-nudge — replaces the agent capability grid for items. Reads
+ as guidance, not an error; the promote button is the escape hatch. */
+ .item-nudge {
+ margin-top: 32px;
+ display: flex;
+ align-items: flex-start;
+ gap: 14px;
+ flex-wrap: wrap;
+ padding: 18px 20px;
+ background:
+ linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0, transparent 80px),
+ var(--panel);
+ border: 1.5px solid var(--border);
+ border-radius: 14px;
+ }
+ .item-nudge-icon { font-size: 22px; line-height: 1.2; flex-shrink: 0; }
+ .item-nudge-text {
+ display: flex;
+ flex-direction: column;
+ gap: 4px;
+ min-width: 220px;
+ flex: 1;
+ }
+ .item-nudge-text strong { font-size: 14px; font-weight: 600; color: var(--text); }
+ .item-nudge-text span { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
+ .item-nudge-promote {
+ appearance: none;
+ background: transparent;
+ border: 1.5px solid var(--border);
+ color: var(--text);
+ border-radius: 9px;
+ padding: 9px 14px;
+ font: inherit;
+ font-size: 12.5px;
+ font-weight: 500;
+ cursor: pointer;
+ white-space: nowrap;
+ align-self: center;
+ transition: border-color 0.15s, color 0.15s, background 0.15s;
+ }
+ .item-nudge-promote:hover {
+ border-color: var(--accent);
+ color: var(--accent);
+ background: color-mix(in srgb, var(--accent) 8%, transparent);
+ }
+ .item-nudge-promote:focus-visible {
+ outline: 2px solid rgba(255, 255, 255, 0.3);
+ outline-offset: 2px;
+ }
+ @media (max-width: 560px) {
+ .item-nudge { margin-top: 24px; padding: 16px; }
+ .item-nudge-promote { width: 100%; }
+ }
+
.guest-note {
font-size: 12.5px;
color: var(--muted);
@@ -1694,6 +1807,20 @@
</div>
</div>
+ <div class="type-selector" id="type-selector">
+ <p class="type-selector-label">Is this an agent or an item?</p>
+ <div class="type-selector-btns" role="group" aria-label="Creation type">
+ <button class="type-btn active" id="type-btn-avatar" data-type="avatar" type="button" aria-pressed="true">
+ <span class="type-btn-title">Agent</span>
+ <span class="type-btn-desc">Thinks, talks, remembers — can go on-chain</span>
+ </button>
+ <button class="type-btn" id="type-btn-object" data-type="object" type="button" aria-pressed="false">
+ <span class="type-btn-title">Item</span>
+ <span class="type-btn-desc">A 3D object or prop — for scenes &amp; trading</span>
+ </button>
+ </div>
+ </div>
+
<button class="cta" id="save-btn" type="button" disabled>
Save to my account
</button>
@@ -1709,7 +1836,7 @@
</div>
<div class="capabilities" id="capabilities" hidden>
- <p class="capabilities-heading">Your avatar unlocks</p>
+ <p class="capabilities-heading">Your agent unlocks</p>
<ul class="feature-grid">
<li>
<button class="feature-tile" type="button" data-feature="body" aria-label="Try animations on your avatar">
@@ -1833,6 +1960,21 @@
</li>
</ul>
</div>
+
+ <!-- Item soft-nudge: shown instead of the agent capabilities when the
+ creation is tagged as an Item. Explains items don't get a brain,
+ with a one-click escape hatch back to the agent path. Visibility is
+ toggled by create-review.js (syncCapabilities). -->
+ <div class="item-nudge" id="item-nudge" hidden>
+ <span class="item-nudge-icon" aria-hidden="true">🧩</span>
+ <div class="item-nudge-text">
+ <strong>This is an item — it won't get a brain.</strong>
+ <span>Items are 3D objects: place them in scenes, attach them to an agent, or trade them. Thinking, voice and memory are for agents.</span>
+ </div>
+ <button class="item-nudge-promote" id="item-nudge-promote" type="button">
+ Made a character? Make it an agent →
+ </button>
+ </div>
</main>
<footer class="h-footer-horizon">
diff --git a/pages/forge.html b/pages/forge.html
index da8a70c1d..7723a594e 100644
--- a/pages/forge.html
+++ b/pages/forge.html
@@ -1541,6 +1541,32 @@
border-color: var(--stroke-strong);
color: var(--ink);
}
+ /* Two-class grouping inside the picker: "Agents" (can get a brain) vs
+ "Items" (objects). Subtle labels + a divider keep it scannable. */
+ .cat-group-label {
+ font-size: var(--text-xs);
+ font-family: var(--font-mono);
+ color: var(--ink);
+ letter-spacing: 0.04em;
+ opacity: 0.75;
+ white-space: nowrap;
+ flex: none;
+ }
+ .cat-group-sep {
+ width: 1px;
+ align-self: stretch;
+ min-height: 18px;
+ background: var(--stroke);
+ margin: 0 0.25rem;
+ flex: none;
+ }
+ .cat-picker-help {
+ flex-basis: 100%;
+ margin: 0.35rem 0 0;
+ font-size: var(--text-xs);
+ color: var(--ink-dim);
+ line-height: 1.45;
+ }
/* Keep / discard verdict (the flywheel signal) */
.verdict {
@@ -2500,9 +2526,9 @@
auto-rotate
auto-rotate-delay="0"
rotation-per-second="18deg"
- shadow-intensity="1.2"
+ shadow-intensity="1.0"
shadow-softness="0.9"
- exposure="1.1"
+ exposure="1.5"
tone-mapping="aces"
ar
ar-modes="webxr scene-viewer quick-look"
@@ -2683,12 +2709,16 @@
the user is signed in or when a creation_id is available. -->
<div class="cat-picker" id="forge-category-picker" hidden>
<span class="cat-picker-label">Tag as:</span>
+ <span class="cat-group-label" title="Can be given a brain and become an agent">Agents</span>
<button class="forge-cat-btn" type="button" data-cat="avatar">Avatar</button>
<button class="forge-cat-btn" type="button" data-cat="creature">Creature</button>
+ <span class="cat-group-sep" aria-hidden="true"></span>
+ <span class="cat-group-label" title="3D objects — props, not personalities">Items</span>
<button class="forge-cat-btn" type="button" data-cat="item">Item</button>
<button class="forge-cat-btn" type="button" data-cat="accessory">Accessory</button>
<button class="forge-cat-btn" type="button" data-cat="scene">Scene</button>
<button class="forge-cat-btn" type="button" data-cat="vehicle">Vehicle</button>
+ <p class="cat-picker-help">Only avatars &amp; creatures can be given a brain and become agents — everything else saves as a 3D item.</p>
</div>
<!-- Optimize topology panel (triangle / quad / low-poly remesh) is
diff --git a/public/changelog.json b/public/changelog.json
index 22b75b314..59df180b6 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-06-15T03:51:37.984Z",
+ "generated_at": "2026-06-15T05:36:12.534Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -27,6 +27,16 @@
"fix"
]
},
+ {
+ "date": "2026-06-15",
+ "type": "update",
+ "title": "Agents and items are now clearly separate — a teapot won't get a brain",
+ "summary": "Every 3D model you create is now clearly one of two things: an Agent (a character that thinks, talks, remembers, and can go on-chain) or an Item (a 3D object or prop for scenes and trading). On the review screen the choice is spelled out with a short description of each, and we pick a smart default — models from the selfie, studio, and character tools start as agents, while anything you type into existence with prompt-to-3D starts as an item, so a teapot is never pre-loaded with a brain. Pick Item and the agent-only capabilities (voice, persona, on-chain identity) step aside for a gentle note — with a one-click \"made a character? make it an agent\" escape hatch if the guess was wrong. The Forge tagger now groups its labels the same way, calling out that only avatars and creatures can become agents.",
+ "link": "/create",
+ "tags": [
+ "improvement"
+ ]
+ },
{
"date": "2026-06-15",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index cdafca0ce..e9cefe31c 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -22,6 +22,14 @@
<category>improvement</category>
<description>An agent's pump.fun behavior now feeds its reputation and shows on its passport. When the wallet behind an agent graduates a token, claims creator fees, makes a whale-sized buy, or launches a coin, that moment is recorded as a typed signal — graduating a token counts for more than a routine claim, and a flagged or brand-new-account claim counts against. These signals roll up into the agent's Solana reputation score and appear on the public agent passport, readable by anyone without a wallet. The live pump.fun dashboard gains a new &quot;SIGNAL&quot; lane that surfaces these agent-attributed events as they happen, alongside the raw mint, whale, and claim feed. The processor behind this used to sit idle unless an optional external service was configured; it now runs continuously off the platform's own live pump.fun stream with no external dependency, records only genuinely new events so nothing is double-counted, and attributes each one to the agent behind the wallet.</description>
</item>
+ <item>
+ <title>Agents and items are now clearly separate — a teapot won't get a brain</title>
+ <link>https://three.ws/create</link>
+ <guid isPermaLink="false">2026-06-15:Agents and items are now clearly separate — a teapot won't get a brain</guid>
+ <pubDate>Mon, 15 Jun 2026 12:00:00 GMT</pubDate>
+ <category>improvement</category>
+ <description>Every 3D model you create is now clearly one of two things: an Agent (a character that thinks, talks, remembers, and can go on-chain) or an Item (a 3D object or prop for scenes and trading). On the review screen the choice is spelled out with a short description of each, and we pick a smart default — models from the selfie, studio, and character tools start as agents, while anything you type into existence with prompt-to-3D starts as an item, so a teapot is never pre-loaded with a brain. Pick Item and the agent-only capabilities (voice, persona, on-chain identity) step aside for a gentle note — with a one-click &quot;made a character? make it an agent&quot; escape hatch if the guess was wrong. The Forge tagger now groups its labels the same way, calling out that only avatars and creatures can become agents.</description>
+ </item>
<item>
<title>Agents can autonomously trade USDC-paired coins</title>
<link>https://three.ws/pump-dashboard</link>
diff --git a/public/features.json b/public/features.json
index f48556910..0875b9dd6 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-06-15T03:51:37.970Z",
+ "generated_at": "2026-06-15T05:36:12.521Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/src/create-agent.js b/src/create-agent.js
index 2ffe094ed..d42a6027b 100644
--- a/src/create-agent.js
+++ b/src/create-agent.js
@@ -436,6 +436,10 @@ function selectStarter(id) {
// ── Step 2 (alt): connect an avatar you already own ──────────────────────────
+// Only these model_category values can serve as an agent body.
+// Items, scenes, accessories, vehicles, etc. are 3D assets — not characters.
+const AGENTABLE_CATEGORIES = new Set(['avatar', 'creature']);
+
let libraryState = 'idle'; // idle | loading | loaded | error
let libraryAvatars = [];
let libraryOffset = 0;
@@ -459,7 +463,12 @@ async function loadLibraryAvatars({ append = false } = {}) {
const res = await apiFetch(url, { credentials: 'include' });
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const data = await res.json();
- const page = (data.avatars || []).filter((a) => a && a.id);
+ const all = (data.avatars || []).filter((a) => a && a.id);
+ // Only show character-class models (avatar, creature) as agent bodies.
+ // Props, scenes, accessories etc. are 3D assets but can't embody an agent.
+ const page = all.filter(
+ (a) => !a.model_category || AGENTABLE_CATEGORIES.has(a.model_category),
+ );
libraryHasMore = page.length > LIBRARY_PAGE;
const fresh = page.slice(0, LIBRARY_PAGE);
if (append) {
@@ -494,7 +503,7 @@ function renderLibrary() {
}
if (!libraryAvatars.length) {
grid.innerHTML = note(
- "You don't own any avatars yet. Choose a starter or upload your own — it's saved to your library automatically.",
+ "No character models found. Agent bodies must be avatars or creatures — 3D objects like props and scenes live in your library but can't be deployed as agents. Choose a starter or upload a character GLB.",
);
return;
}
diff --git a/src/create-review.js b/src/create-review.js
index 04942ce77..c861e0f57 100644
--- a/src/create-review.js
+++ b/src/create-review.js
@@ -41,10 +41,66 @@ import { log } from './shared/log.js';
const RESUME_KEY = '3dagent:guest-avatar-resume';
const $ = (sel) => document.querySelector(sel);
+// Sources that strongly imply a humanoid/creature avatar — default these to
+// 'avatar' (an agent that gets a brain). Everything else (prompt-to-3D, import,
+// upload, unknown) is an arbitrary 3D model, so default to 'object' (an item):
+// a teapot you typed into existence shouldn't pre-select "give it a brain". The
+// selector is always visible and switching is one click, so the default is just
+// a soft nudge, never a lock.
+const AVATAR_SOURCES = new Set(['avaturn', 'three-ws-studio', 'three-ws-selfie']);
+
+// 'avatar' = an Agent (gets a brain — voice, memory, on-chain identity);
+// 'object' = an Item (a 3D model saved to your library; props, not personalities).
+let creationType = 'avatar';
+
+function setCreationType(type) {
+ creationType = type;
+ const isAvatar = type === 'avatar';
+ $('#type-btn-avatar')?.classList.toggle('active', isAvatar);
+ $('#type-btn-object')?.classList.toggle('active', !isAvatar);
+ $('#type-btn-avatar')?.setAttribute('aria-pressed', String(isAvatar));
+ $('#type-btn-object')?.setAttribute('aria-pressed', String(!isAvatar));
+
+ const saveBtn = $('#save-btn');
+ if (saveBtn && !saveBtn.disabled) {
+ saveBtn.textContent = isAvatar ? 'Save to my account' : 'Save to library';
+ }
+
+ const heading = $('#heading');
+ if (heading) heading.textContent = isAvatar ? 'Meet your agent' : 'Your 3D item';
+ const subhead = $('#subhead');
+ if (subhead) {
+ subhead.textContent = isAvatar
+ ? 'Try every capability before you save. Talk to it, drop it on any site, take it offline — see what your new agent can do, then claim it.'
+ : "A 3D object for your library — drop it into scenes, attach it to an agent, or export it anywhere. Items don't think or talk; that's what agents are for.";
+ }
+
+ const nameInput = $('#f-name');
+ if (nameInput) {
+ nameInput.placeholder = isAvatar ? 'Give your agent a name' : 'Give your item a name';
+ }
+
+ const handlePreview = $('#handle-preview');
+ if (handlePreview) handlePreview.hidden = !isAvatar;
+
+ syncCapabilities();
+}
+
+// Show the brain/agent capabilities for agents; for items, swap in a soft nudge
+// that explains items don't get a brain — with a one-click escape hatch back to
+// the agent path for anyone who made a character by mistake.
+function syncCapabilities() {
+ const onContent = !document.getElementById('content')?.hidden;
+ const isAvatar = creationType === 'avatar';
+ const caps = document.getElementById('capabilities');
+ const nudge = document.getElementById('item-nudge');
+ if (caps) caps.hidden = !onContent || !isAvatar;
+ if (nudge) nudge.hidden = !onContent || isAvatar;
+}
+
function setPageState(state) {
document.getElementById('content').hidden = state !== 'content';
- const caps = document.getElementById('capabilities');
- if (caps) caps.hidden = state !== 'content';
+ syncCapabilities();
}
let staged = /** @type {Awaited<ReturnType<typeof loadGuest>>} */ (null);
@@ -88,11 +144,18 @@ async function renderPreview(record) {
const userFacingName = isAutoName ? '' : record.name;
$('#avatar-name').textContent = userFacingName || 'Your new avatar';
$('#f-name').value = userFacingName;
- $('#tag-source').textContent =
- prettySource(record.meta?.source || record.meta?.provider);
+ const src = record.meta?.source || record.meta?.provider || '';
+ $('#tag-source').textContent = prettySource(src);
$('#tag-size').textContent =
record.size > 0 ? `${Math.round(record.size / 1024)} KB` : '— KB';
+ // Default type based on creation source: known character tools (selfie,
+ // studio, Avaturn) → 'avatar' (an agent); generic prompt-to-3D / import /
+ // upload → 'object' (an item), since an arbitrary generated model is far
+ // more likely a prop than a character. The selector is right there to flip
+ // if the guess is wrong.
+ setCreationType(AVATAR_SOURCES.has(src) ? 'avatar' : 'object');
+
// Keep an object URL around for downstream consumers (Voice preview hands
// it to talk-mode, which loads via URL). The viewer itself now mounts
// directly from the Blob — `loader.parse(buffer)` instead of fetching the
@@ -205,6 +268,18 @@ function wireControls() {
saveBtn.addEventListener('click', () => onSave());
startOverBtn.addEventListener('click', () => onStartOver());
+ document.querySelectorAll('.type-btn[data-type]').forEach((btn) => {
+ btn.addEventListener('click', () => setCreationType(btn.dataset.type));
+ });
+
+ // Soft-nudge escape hatch: "made a character? make it an agent" flips an
+ // item back onto the agent path without forcing the user to hunt for the
+ // selector again.
+ $('#item-nudge-promote')?.addEventListener('click', () => {
+ setCreationType('avatar');
+ document.getElementById('capabilities')?.scrollIntoView({ behavior: 'smooth', block: 'nearest' });
+ });
+
wireFeatureTiles();
}
@@ -273,7 +348,7 @@ function applyAuthState({ detail }) {
const guestNote = $('#guest-note');
saveBtn.disabled = false;
if (detail.authed) {
- saveBtn.textContent = 'Save to my account';
+ saveBtn.textContent = creationType === 'object' ? 'Save to library' : 'Save to my account';
guestNote.hidden = true;
// Returning from a /login round-trip with the resume flag set — finish
// what the user started.
@@ -306,14 +381,13 @@ async function onSave({ auto = false } = {}) {
saveBtn.disabled = true;
startOverBtn.disabled = true;
+ const isObject = creationType === 'object';
saveAbortController = new AbortController();
- showSaveOverlay('Preparing upload…', 'Optimizing your avatar.', {
+ showSaveOverlay('Preparing upload…', isObject ? 'Saving your 3D model.' : 'Optimizing your avatar.', {
onCancel: () => saveAbortController?.abort(),
});
- // Warm the destination so navigation after a successful save feels instant:
- // the browser fetches /app and the agent shell scripts in parallel with the
- // R2 PUT. Removed once we leave the page or on cancel.
- primeDestinationPrefetch();
+ // Only prefetch /app for the agent path — no point warming it for library saves.
+ if (!isObject) primeDestinationPrefetch();
// Arm the resume sentinel before we touch the network. If the session
// expired between the cached auth hint and now, apiFetch redirects to
@@ -326,12 +400,13 @@ async function onSave({ auto = false } = {}) {
const meta = {
...staged.meta,
name,
+ ...(isObject ? { model_category: 'item' } : {}),
};
const avatar = await saveRemoteGlbToAccount(staged.blob, meta, {
signal: saveAbortController.signal,
onProgress: (pct) => {
updateSaveOverlay(
- pct >= 100 ? 'Finishing upload…' : 'Uploading your avatar…',
+ pct >= 100 ? 'Finishing upload…' : isObject ? 'Uploading your model…' : 'Uploading your avatar…',
pct >= 100 ? 'almost there' : `${pct}%`,
);
setSaveProgress(pct);
@@ -339,6 +414,17 @@ async function onSave({ auto = false } = {}) {
});
setSaveProgress(null);
setSaveCancellable(false);
+
+ if (isObject) {
+ updateSaveOverlay('Saving to library…', '');
+ await clearGuest();
+ await captureAndUploadThumbnail(avatar.id).catch(() => {});
+ releaseObjectUrl();
+ try { window.__twsGuide?.complete('create'); } catch (_) {}
+ window.location.href = '/dashboard/avatars?saved=1';
+ return;
+ }
+
updateSaveOverlay('Preparing your agent…', '');
const agent = await attachAvatarToAgent(avatar.id, name);
updateSaveOverlay('Opening your avatar…', '');
diff --git a/src/forge-reveal.js b/src/forge-reveal.js
index 5757db764..92e1349cc 100644
--- a/src/forge-reveal.js
+++ b/src/forge-reveal.js
@@ -176,7 +176,7 @@ export async function playForgeReveal({ container, glbUrl, waitFor }) {
const renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true });
renderer.setPixelRatio(Math.min(window.devicePixelRatio || 1, 2));
renderer.toneMapping = THREE.ACESFilmicToneMapping;
- renderer.toneMappingExposure = 1.12;
+ renderer.toneMappingExposure = 1.6;
overlay.appendChild(renderer.domElement);
cleanupFns.push(() => renderer.dispose());
@@ -187,6 +187,17 @@ export async function playForgeReveal({ container, glbUrl, waitFor }) {
scene.environment = envTex;
cleanupFns.push(() => envTex.dispose());
+ // TRELLIS models can bake in dark textures; supplement IBL with explicit
+ // lights so the mesh reads clearly regardless of how dark the bake is.
+ const hemi = new THREE.HemisphereLight(0xffffff, 0x8899bb, 1.8);
+ scene.add(hemi);
+ const key = new THREE.DirectionalLight(0xffffff, 2.5);
+ key.position.set(1, 1.5, 1.2);
+ scene.add(key);
+ const fill = new THREE.DirectionalLight(0xddeeff, 0.8);
+ fill.position.set(-1, 0.5, -0.5);
+ scene.add(fill);
+
const camera = new THREE.PerspectiveCamera(32, 1, 0.05, 60);
const target = new THREE.Vector3(0, 0.62, 0);