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.

fix(forged-gallery): land the gallery, forge and spark page work with the rebuilt feeds

nirholas0460f60891c9
diff --git a/pages/forge-spark.html b/pages/forge-spark.html
index 19ee2c73e..2cad6dbae 100644
--- a/pages/forge-spark.html
+++ b/pages/forge-spark.html
@@ -336,7 +336,7 @@
<h1 data-i18n="forge_spark.describe_it_hold_it">Describe it. Hold it.</h1>
<p data-i18n="forge_spark.a_sentence_becomes_a_textured_3d_mesh">
A sentence becomes a textured 3D mesh. Nemotron sharpens your words, FLUX paints a clean
- reference, and TRELLIS reconstructs the model — quietly, on NVIDIA NIM.
+ reference, and TRELLIS reconstructs the model, quietly, on NVIDIA NIM.
</p>
</header>
@@ -387,15 +387,18 @@
<path d="m2 17 10 5 10-5" />
<path d="m2 12 10 5 10-5" />
</svg>
- <p data-i18n="forge_spark.your_model_will_appear_here_describe_an">Your model will appear here. Describe an object and hit generate — then orbit, light, and download the GLB.</p>
+ <p data-i18n="forge_spark.your_model_will_appear_here_describe_an">Your model will appear here. Describe an object and hit generate, then orbit, light, and download the GLB.</p>
</div>
- <div class="viewer-status" id="viewer-status" hidden>
- <span class="spinner"></span>
+ <div class="viewer-status" id="viewer-status" role="status" aria-live="polite" hidden>
+ <span class="spinner" aria-hidden="true"></span>
<span id="viewer-status-text" data-i18n="forge_spark.working">Working…</span>
</div>
</div>
- <div class="error-note" id="error" hidden></div>
+ <div class="error-note" id="error" role="alert" hidden>
+ <span id="error-text"></span>
+ <button type="button" class="error-retry" id="retry" data-i18n="forge_spark.try_again">Try again</button>
+ </div>
<div class="viewer-actions" id="actions" hidden>
<a id="download" download data-i18n="forge_spark.download_glb">Download GLB</a>
@@ -404,14 +407,17 @@
</div>
</div>
- <footer class="spark-footer">
- The same TRELLIS NIM runs across lanes — local and cloud — so reconstruction stays
+ <p class="spark-note">
+ The same TRELLIS NIM runs across lanes, local and cloud, so reconstruction stays
<b data-i18n="forge_spark.always_on">always on</b>. Image → 3D lives at <a href="/forge-nim" data-i18n="forge_spark.forge_nim">/forge-nim</a>; the full studio at
<a href="/forge" data-i18n="forge_spark.forge">/forge</a>.
- </footer>
+ </p>
</main>
+ <div id="footer-container"></div>
+
<script src="/nav.js" defer></script>
+ <script src="/footer.js" defer></script>
<script src="/model-viewer-meshopt.js"></script>
<script type="module">
const form = document.getElementById('composer');
@@ -423,6 +429,8 @@
const statusEl = document.getElementById('viewer-status');
const statusText = document.getElementById('viewer-status-text');
const errorEl = document.getElementById('error');
+ const errorText = document.getElementById('error-text');
+ const retry = document.getElementById('retry');
const actions = document.getElementById('actions');
const download = document.getElementById('download');
const again = document.getElementById('again');
@@ -457,10 +465,10 @@
}
function hideStatus() { statusEl.hidden = true; }
function showError(msg) {
- errorEl.textContent = msg;
+ errorText.textContent = msg;
errorEl.hidden = false;
}
- function clearError() { errorEl.hidden = true; errorEl.textContent = ''; }
+ function clearError() { errorEl.hidden = true; errorText.textContent = ''; }
function renderModel(url) {
if (!viewer) {
@@ -482,7 +490,7 @@
actions.hidden = false;
}
- // Step 1 — Nemotron refines the prompt. Enhancement is a boost, never a
+ // Step 1: Nemotron refines the prompt. Enhancement is a boost, never a
// gate: if the lane is unavailable we keep the user's own words.
async function refinePrompt(raw) {
setStage('nemotron', 'active', 'refining');
@@ -506,13 +514,13 @@
} catch (err) {
// Quiet fallback — keep the original prompt, mark the stage done.
refinedEl.hidden = false;
- refinedEl.innerHTML = '<b>Using your prompt as written.</b><span class="by">refine step unavailable — generating anyway</span>';
+ refinedEl.innerHTML = '<b>Using your prompt as written.</b><span class="by">refine step unavailable, generating anyway</span>';
setStage('nemotron', 'done', 'skipped');
return raw;
}
}
- // Steps 2 + 3 — FLUX paints a reference, TRELLIS reconstructs. /api/forge
+ // Steps 2 + 3: FLUX paints a reference, TRELLIS reconstructs. /api/forge
// returns a finished glb_url synchronously, or a job to poll.
async function generateMesh(prompt) {
setStage('flux', 'active', 'painting');
@@ -555,7 +563,7 @@
});
data = await r.json();
} catch {
- continue; // transient network blip — keep polling
+ continue; // transient network blip, keep polling
}
const status = data.status;
if (status === 'done' && (data.glb_url || data.model_url)) {
@@ -570,14 +578,18 @@
throw new Error('This is taking longer than usual. Please try again.');
}
- form.addEventListener('submit', async (e) => {
- e.preventDefault();
+ async function run() {
if (busy) return;
const raw = promptEl.value.trim();
- if (raw.length < 3) { promptEl.focus(); return; }
+ if (raw.length < 3) {
+ showError('Describe the object in a few words first, then hit generate.');
+ promptEl.focus();
+ return;
+ }
busy = true;
generateBtn.disabled = true;
+ retry.disabled = true;
generateBtn.textContent = 'Generating…';
clearError();
actions.hidden = true;
@@ -592,16 +604,26 @@
hideStatus();
// Mark whichever stage was active as failed.
for (const name of Object.keys(stages)) {
- if (stages[name].dataset.state === 'active') setStage(name, 'idle', 'failed');
+ if (stages[name].dataset.state === 'active') setStage(name, 'failed', 'failed');
}
showError(err.message || 'Something went wrong. Please try again.');
} finally {
busy = false;
generateBtn.disabled = false;
+ retry.disabled = false;
generateBtn.textContent = 'Generate 3D model';
}
+ }
+
+ form.addEventListener('submit', (e) => {
+ e.preventDefault();
+ run();
});
+ // The error note's own recovery action: same prompt, same pipeline, no
+ // scrolling back up to the button.
+ retry.addEventListener('click', run);
+
again.addEventListener('click', () => {
promptEl.focus();
promptEl.select();
diff --git a/pages/forge-studio.html b/pages/forge-studio.html
index 7854e0e34..17f7171b8 100644
--- a/pages/forge-studio.html
+++ b/pages/forge-studio.html
@@ -2848,7 +2848,7 @@
@keyframes studioSpin { to { transform: rotate(360deg); } }
#studio-avatar .step { display: none; flex-direction: column; }
#studio-avatar .step.active { display: flex; animation: studioFade 0.35s ease; }
- #studio-avatar h1 {
+ #studio-avatar h2 {
font-size: clamp(26px, 5vw, 36px);
line-height: 1.1;
margin: 12px 0 8px;
@@ -3953,7 +3953,7 @@
<section id="studio-avatar" class="studio-pane" role="tabpanel" aria-labelledby="studio-tab-avatar" hidden>
<!-- Step 1: compose -->
<section class="step active" data-step="compose" aria-label="Describe your avatar">
- <h1 data-i18n="forge_studio.describe_it_get_a_rigged_3d_avatar">Describe it. Get a rigged 3D avatar.</h1>
+ <h2 data-i18n="forge_studio.describe_it_get_a_rigged_3d_avatar">Describe it. Get a rigged 3D avatar.</h2>
<p class="sub" data-i18n="forge_studio.type_what_you_want_a_character_a">
Type what you want — a character, a creature, a style. We render a clean
reference, reconstruct it into 3D, and add a skeleton so it can move.
@@ -4038,7 +4038,7 @@
<!-- Step 3: done -->
<section class="step done-wrap" data-step="done" aria-label="Your avatar is ready">
- <h1 data-i18n="forge_studio.your_avatar_is_ready">Your avatar is ready</h1>
+ <h2 data-i18n="forge_studio.your_avatar_is_ready">Your avatar is ready</h2>
<p class="sub" style="margin-bottom: 0" data-i18n="forge_studio.open_it_in_the_editor_to_animate">
Open it in the editor to animate, dress, and export.
</p>
@@ -4111,7 +4111,7 @@
</div>
<div class="lab-actions">
<button class="btn-primary" id="lab-generate" type="button" data-i18n="forge_studio.generate_model">Generate model</button>
- <a class="btn-ghost is-disabled" id="lab-download" download>
+ <a class="btn-ghost is-disabled" id="lab-download" download aria-disabled="true" title="Generate something first, then download it as a file">
<span class="lab-dl-label" data-i18n="forge_studio.download">Download</span>
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="M12 3v12" /><polyline points="7 11 12 16 17 11" /><line x1="5" y1="20" x2="19" y2="20" />
diff --git a/pages/forge.html b/pages/forge.html
index 5f10142f1..aeaca6d54 100644
--- a/pages/forge.html
+++ b/pages/forge.html
@@ -158,6 +158,15 @@
font-size: var(--text-lg);
line-height: var(--leading-normal);
}
+ /* The textarea drops its own outline so the composer reads as one
+ surface, which left keyboard users with no focus signal at all on
+ the page's primary input. Put a ring back for :focus-visible only,
+ so pointer users keep the seamless look. */
+ .composer textarea:focus-visible {
+ outline: 2px solid var(--accent);
+ outline-offset: 3px;
+ border-radius: var(--radius-sm, 6px);
+ }
.composer textarea::placeholder {
color: var(--ink-dim);
}
diff --git a/pages/forged.html b/pages/forged.html
index aa704e9c9..acc3a3762 100644
--- a/pages/forged.html
+++ b/pages/forged.html
@@ -69,6 +69,18 @@
font-size: 14px; outline: none;
}
.ch-search:focus { border-color: var(--stroke-strong); }
+ /* `outline: none` above kills the UA focus ring, so every control on this
+ page paints its own: keyboard users need to see where they are. */
+ .ch-search:focus-visible, .ch-sort:focus-visible, .ch-chip:focus-visible,
+ .ch-btn:focus-visible, .ch-hbtn:focus-visible {
+ outline: var(--focus-ring-width, 2px) solid var(--focus-ring-color, var(--accent));
+ outline-offset: var(--focus-ring-offset, 2px);
+ }
+ /* The card clips its overflow, so the thumbnail's ring is drawn inside it. */
+ .ch-card-thumb:focus-visible {
+ outline: var(--focus-ring-width, 2px) solid var(--focus-ring-color, var(--accent));
+ outline-offset: -3px;
+ }
.ch-search-kbd {
position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
font-family: var(--font-mono); font-size: 11px; color: var(--ink-dim);
@@ -216,7 +228,9 @@
<span class="ch-count" data-role="count" aria-live="polite"></span>
</div>
- <div class="ch-chips" data-role="chips" role="tablist" aria-label="Filter by category"></div>
+ <!-- role="group", not "tablist": the chips are plain filter buttons, and tablist
+ requires role="tab" children (axe aria-required-children, critical). -->
+ <div class="ch-chips" data-role="chips" role="group" aria-label="Filter by category"></div>
<div data-role="loading" class="ch-skeleton-grid" role="status" aria-label="Loading agent-forged props">
<div class="ch-skeleton"></div><div class="ch-skeleton"></div><div class="ch-skeleton"></div>
diff --git a/public/changelog.json b/public/changelog.json
index f64fac35e..32fb9fc32 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-08-17T04:51:04.345Z",
+ "generated_at": "2026-08-17T04:56:09.259Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
diff --git a/public/features.json b/public/features.json
index 71cfdf471..3de53e600 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-08-17T04:51:04.131Z",
+ "generated_at": "2026-08-17T04:56:09.027Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/src/constellation/main.js b/src/constellation/main.js
index 7d3b73f69..4036f2155 100644
--- a/src/constellation/main.js
+++ b/src/constellation/main.js
@@ -57,6 +57,12 @@ const RADIUS = 28; // target galaxy radius for the semantic / rank layouts
// glow rather than the geometry.
const PICK_RADIUS_PX = 22;
const PICK_RADIUS_COARSE_PX = 34;
+// A tap is deliberately more forgiving than a hover. Hover has to stay tight or
+// the label jitters between neighbours as the cursor crosses empty sky, but a
+// tap is a stated intent to open the nearest star, and the galaxy keeps rotating
+// under a stationary finger while the press is being made.
+const TAP_RADIUS_PX = 46;
+const TAP_RADIUS_COARSE_PX = 60;
const SIGN_IN_HREF = '/login?next=%2Fconstellation';
const REGISTER_HREF = '/register?next=%2Fconstellation';
@@ -300,8 +306,14 @@ function screenXY(node) {
((1 - _projected.y) / 2) * window.innerHeight,
];
}
+function coarsePointer() {
+ return Boolean(window.matchMedia?.('(pointer: coarse)')?.matches);
+}
function pickTolerancePx() {
- return window.matchMedia?.('(pointer: coarse)')?.matches ? PICK_RADIUS_COARSE_PX : PICK_RADIUS_PX;
+ return coarsePointer() ? PICK_RADIUS_COARSE_PX : PICK_RADIUS_PX;
+}
+function tapTolerancePx() {
+ return coarsePointer() ? TAP_RADIUS_COARSE_PX : TAP_RADIUS_PX;
}
function nearestNodeToScreen(px, py, maxPx) {
let best = null;
@@ -315,11 +327,11 @@ function nearestNodeToScreen(px, py, maxPx) {
}
// Exact ray hit first (it respects depth, so the front star wins where two
// overlap), then the screen-space fallback so the visible glow is the target.
-function pickNode() {
+function pickNode(tolerancePx = pickTolerancePx()) {
raycaster.setFromCamera(pointer, camera);
const hits = raycaster.intersectObjects(nodes.map((n) => n.mesh), false);
if (hits.length) return nodes[hits[0].object.userData.index];
- return nearestNodeToScreen(pointerPx[0], pointerPx[1], pickTolerancePx());
+ return nearestNodeToScreen(pointerPx[0], pointerPx[1], tolerancePx);
}
function hideTooltip() {
@@ -370,7 +382,7 @@ function onPointerDown(e) {
// so the star can slide out from under a stationary cursor between the press
// and the release; what the visitor aimed at is what they pressed on.
updatePointer(e);
- downNode = pickNode() || hovered;
+ downNode = pickNode(tapTolerancePx()) || hovered;
}
function onPointerUp(e) {
const moved = Math.hypot(e.clientX - downXY[0], e.clientY - downXY[1]);
@@ -378,7 +390,7 @@ function onPointerUp(e) {
updatePointer(e);
// The star under the release wins; then the star the tooltip is naming; then
// the one that was under the press. Any of the three is the intended target.
- const node = pickNode() || hovered || downNode;
+ const node = pickNode(tapTolerancePx()) || hovered || downNode;
downNode = null;
if (node) { keyboardFocused = false; selectNode(node.mesh.userData.index, { fromKeyboard: false }); }
}
diff --git a/src/forged-gallery.js b/src/forged-gallery.js
index 51100af48..ee567220d 100644
--- a/src/forged-gallery.js
+++ b/src/forged-gallery.js
@@ -36,8 +36,9 @@ const escapeAttr = escapeHtml;
function show(el, on) { if (el) el.hidden = !on; }
function formatUsdc(n) {
- if (n == null) return '';
- return n < 0.01 ? `$${n.toFixed(3)}` : `$${n.toFixed(2)}`;
+ if (n == null || !Number.isFinite(Number(n))) return null;
+ const v = Number(n);
+ return v < 0.01 ? `$${v.toFixed(3)}` : `$${v.toFixed(2)}`;
}
function formatWhen(ts) {
@@ -49,43 +50,59 @@ function formatWhen(ts) {
return d.toLocaleDateString(undefined, { month: 'short', day: 'numeric' });
}
+// A card's <model-viewer> is deliberately control-free. model-viewer reads
+// `camera-controls` as a boolean attribute, so the old `camera-controls="false"`
+// switched controls ON: it made every thumbnail drag-orbit and swallow the click
+// meant for the link that wraps it, so the card's primary action did nothing.
+// Dropping the attribute leaves auto-rotate (which does not need controls) and
+// hands the click straight to the link. The `disable-*` and `interaction-prompt`
+// attributes went with it; they only ever qualified camera-controls.
function renderCard(p) {
const glbUrl = p.glb_url || '';
const alt = p.prompt || 'Agent-forged prop';
const previewUrl = glbUrl
? `/app#model=${encodeURIComponent(glbUrl)}&kind=object&title=${encodeURIComponent(alt)}`
- : '#';
+ : '';
+ const price = formatUsdc(p.price_usdc);
+
+ // A prop whose GLB is still being written gets a plain, unlinked tile rather
+ // than an anchor to "#": the viewer and the download both take the model URL,
+ // so with none there is nothing for either to open.
+ const thumbOpen = previewUrl
+ ? `<a class="ch-card-thumb" href="${escapeAttr(previewUrl)}" aria-label="Preview ${escapeAttr(alt)} in 3D">`
+ : '<div class="ch-card-thumb">';
+ const thumbClose = previewUrl ? '</a>' : '</div>';
const card = document.createElement('article');
card.className = 'ch-card';
card.innerHTML = `
- <a class="ch-card-thumb" href="${escapeAttr(previewUrl)}" aria-label="Preview ${escapeAttr(alt)} in 3D">
+ ${thumbOpen}
<model-viewer
src="${escapeAttr(glbUrl)}"
alt="${escapeAttr(alt)}"
class="ch-card-mv"
- reveal="auto" loading="lazy" disable-zoom disable-pan disable-tap
- interaction-prompt="none" camera-controls="false"
+ reveal="auto" loading="lazy"
auto-rotate rotation-per-second="20deg"
environment-image="neutral" shadow-intensity="0.4" exposure="1"
></model-viewer>
<span class="ch-card-pill">${escapeHtml(p.category || 'prop')}</span>
- <span class="ch-card-play" aria-hidden="true">▶</span>
- </a>
+ ${previewUrl ? '<span class="ch-card-play" aria-hidden="true">▶</span>' : ''}
+ ${thumbClose}
<div class="ch-card-body">
<h3 class="ch-card-name" title="${escapeAttr(alt)}">${escapeHtml(alt)}</h3>
<div class="ch-card-meta">
<span>${escapeHtml(formatWhen(p.ts))}${p.novelty != null ? ` · novelty ${Number(p.novelty).toFixed(2)}` : ''}</span>
</div>
<div class="fg-receipt" title="This asset was bought by an autonomous agent with real USDC on Solana">
- <span class="fg-receipt-amount">${escapeHtml(formatUsdc(p.price_usdc))} USDC</span>
+ <span class="fg-receipt-amount">${price ? `${escapeHtml(price)} USDC` : 'settling'}</span>
<span class="fg-receipt-payer">${escapeHtml(p.payer_short || 'agent wallet')}</span>
${p.explorer_url ? `<a class="fg-receipt-tx" href="${escapeAttr(p.explorer_url)}" target="_blank" rel="noopener noreferrer" title="View the settlement transaction on Solscan">receipt ↗</a>` : ''}
</div>
+ ${previewUrl ? `
<div class="ch-card-actions">
<a class="ch-btn ch-btn--primary" href="${escapeAttr(previewUrl)}" title="Open in the 3D viewer">Preview</a>
<a class="ch-btn ch-btn--ghost" href="${escapeAttr(glbUrl)}" download title="Download the GLB">Download</a>
- </div>
+ </div>` : ''}
</div>
`;
return card;
@@ -101,9 +118,12 @@ function renderChips() {
if (!els.catChips) return;
const cats = categories();
if (!cats.length) { els.catChips.innerHTML = ''; return; }
- els.catChips.innerHTML =
- `<button class="ch-chip${state.category === '' ? ' is-active' : ''}" data-cat="">All</button>` +
- cats.map((c) => `<button class="ch-chip${state.category === c ? ' is-active' : ''}" data-cat="${escapeAttr(c)}">${escapeHtml(c)}</button>`).join('');
+ // aria-pressed, not role="tab": these are toggle buttons in a group, and a
+ // screen reader has to hear which family the grid is currently filtered to.
+ const chip = (cat, label) =>
+ `<button type="button" class="ch-chip${state.category === cat ? ' is-active' : ''}" ` +
+ `data-cat="${escapeAttr(cat)}" aria-pressed="${state.category === cat}">${escapeHtml(label)}</button>`;
+ els.catChips.innerHTML = chip('', 'All') + cats.map((c) => chip(c, c)).join('');
els.catChips.querySelectorAll('.ch-chip').forEach((b) => b.addEventListener('click', () => {
state.category = b.dataset.cat;
renderChips();
@@ -151,8 +171,9 @@ async function load() {
state.stats = data.stats || null;
if (els.heroStats && state.stats) {
const s = state.stats;
+ const spent = formatUsdc(s.spent_usdc);
els.heroStats.textContent = s.done
- ? `${s.done} props forged · ${formatUsdc(s.spent_usdc)} USDC settled on-chain${s.queued ? ` · ${s.queued} generating` : ''}`
+ ? `${s.done} props forged${spent ? ` · ${spent} USDC settled on-chain` : ''}${s.queued ? ` · ${s.queued} generating` : ''}`
: '';
}
renderChips();