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
chore: forge v2 preview page, changelog/features updates, search and config tweaks
nirholas5537ebcfc4e8
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 6626ad1fd..f962c518b 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -6,7 +6,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr## 2026-06-13-- **The full page directory is now one click away — and instantly filterable** — three.ws has grown past 140 pages, so the sitemap directory got a real upgrade. A new "All pages" link in the Discover menu takes you straight to it, and the page itself now has an instant filter — press / and type to narrow every page by name, path, or description, with live per-section counts. Filtered views are shareable links, so you can send someone exactly the slice of the platform you mean. (`/sitemap`) `[improvement]`+- **The full page directory is now one click away — and instantly filterable** — three.ws has grown past 200 pages, so the sitemap directory got a real upgrade. A new "All pages" link in the Discover menu takes you straight to it, and the page itself now has an instant filter — press / and type to narrow every page by name, path, or description, with live per-section counts. Filtered views are shareable links, so you can send someone exactly the slice of the platform you mean. The directory now finds you when you're lost, too: it's a quick action in the ⌘K search palette, a no-results search hands you off to it with your query carried over, the 404 page offers it pre-filtered to the closest matches for the address you tried, and /pages, /directory, /everything, and /all-pages all take you there. (`/sitemap`) `[improvement]`## 2026-06-12diff --git a/data/changelog.json b/data/changelog.jsonindex 096388593..df9a93883 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -4,7 +4,7 @@{"date": "2026-06-13","title": "The full page directory is now one click away — and instantly filterable",- "summary": "three.ws has grown past 140 pages, so the sitemap directory got a real upgrade. A new \"All pages\" link in the Discover menu takes you straight to it, and the page itself now has an instant filter — press / and type to narrow every page by name, path, or description, with live per-section counts. Filtered views are shareable links, so you can send someone exactly the slice of the platform you mean.",+ "summary": "three.ws has grown past 200 pages, so the sitemap directory got a real upgrade. A new \"All pages\" link in the Discover menu takes you straight to it, and the page itself now has an instant filter — press / and type to narrow every page by name, path, or description, with live per-section counts. Filtered views are shareable links, so you can send someone exactly the slice of the platform you mean. The directory now finds you when you're lost, too: it's a quick action in the ⌘K search palette, a no-results search hands you off to it with your query carried over, the 404 page offers it pre-filtered to the closest matches for the address you tried, and /pages, /directory, /everything, and /all-pages all take you there.","tags": ["improvement"],diff --git a/docs/roadmap/developer-resources-repos.md b/docs/roadmap/developer-resources-repos.mdnew file mode 100644index 000000000..2419b3405--- /dev/null+++ b/docs/roadmap/developer-resources-repos.md@@ -0,0 +1,150 @@+# Developer Resources & Satellite Repos — Plan++**Status:** Proposed, not started+**Drafted:** 2026-06-13+**Problem:** All developer-facing material (examples, SDK quickstarts, guides) lives inside the monorepo, invisible to developers browsing GitHub. Platforms at the bar we're aiming for (Vercel, Stripe, Anthropic) present curated satellite repos — `vercel/examples`, `stripe-samples`, `anthropic-cookbook` — that act as the discovery and onboarding front door.+**Goal:** A public `examples` repo (under a `three-ws` GitHub org) seeded from the monorepo and kept in sync by a one-way export script, with npm packages publishable so the examples actually install.++---++## 1. What we already have (the raw material)++No new content needs writing. The job is re-presenting what exists.++### 1.1 Runnable examples (`examples/`)++| Example | What it shows |+|---|---|+| `coach-leo/` | Full agent build |+| `pump-fun-agent/` | Agent wired to the pump.fun feed |+| `three-concierge/` (+ `.html`) | Embedded concierge agent |+| `metamask-agent-wallet/` | Wallet-connected agent |+| `agenc-task-roundtrip/` | Agent task round-trip |+| `minimal.html`, `two-agents.html`, `web-component.html`, `widget-rpc.html`, `embed-test.html` | Single-file embed patterns |+| `skills/` | Skill examples |++### 1.2 SDKs++| SDK | Location |+|---|---|+| Core SDK | `sdk/` (includes `sdk/example/`) |+| Solana agent SDK | `solana-agent-sdk/` |+| Agent payments SDK | `agent-payments-sdk/` |+| Agent protocol SDK | `agent-protocol-sdk/` |+| Agent UI SDK | `agent-ui-sdk/` |+| Avatar SDK | `avatar-sdk/` |++### 1.3 MCP packages (`packages/`)++`avatar-agent-mcp`, `avatar-cli`, `avatar-schema`, `ibm-watsonx-mcp`, `ibm-x402-mcp`, `pumpfun-mcp`, `three-token-mcp`, `threews-avatar-mcp`.++### 1.4 Docs++60+ guides in `docs/` (architecture, authentication, embedding, MCP, multi-agent, on-chain agents, …), already wired into the site build and sitemap.++---++## 2. Constraints that shape the plan++These are why the obvious approach ("just push copies to new repos") fails here.++1. **No CI on this account.** GitHub Actions are unavailable (all workflows deleted 2026-06-11). The standard satellite-sync pattern — a workflow pushing subtrees on every merge — cannot run. Sync must be a local script invoked from the existing push routine, or satellites rot.+2. **Mirror maintenance already bites.** We maintain one mirror (`nirholas/3D-Agent`, push-only) and it has caused destructive history merges. Every additional repo multiplies that class of risk. Satellites must be strictly one-way exports, never pulled from.+3. **npm packages 404.** Every `@three-ws/*` and `@3d-agent/*` package is unpublished. An examples repo whose first instruction is `npm install @three-ws/sdk` — and the install fails — damages credibility with exactly the audience it targets. Blocker is a single missing `NPM_TOKEN`; the publish pipeline itself works (`publish:mcp` covers all 12 servers).+4. **A stale satellite is worse than none.** Broken examples in a standalone repo are anti-marketing. Anything we publish must be smoke-tested by the export script before it pushes.++---++## 3. The plan++### Phase 0 — Prerequisite: publish to npm++- Obtain `NPM_TOKEN` (user-provided; not recoverable from `vercel env pull`).+- Run the existing publish pipeline for the MCP servers and SDKs.+- Until this lands, any satellite example must target the **hosted MCP/API endpoints** (which work today) rather than npm installs.++### Phase 1 — GitHub org++- Create the `three-ws` org. An org page with pinned repos signals project maturity in a way more repos under a personal account cannot.+- Transfer nothing initially; `nirholas/three.ws` stays the canonical monorepo. (Moving the canonical repo is a separate decision with deploy-pipeline implications — Vercel is linked to it.)++### Phase 2 — `three-ws/examples` repo++One satellite, not three. Tutorials are examples with longer READMEs; they live here. A separate docs repo is explicitly out of scope (§5).++Proposed layout:++```+examples/+├── README.md # index table: example → what it shows → run command+├── LICENSE+├── quickstarts/ # one folder per SDK, copy-paste minimal+│ ├── sdk/+│ ├── solana-agent-sdk/+│ ├── agent-payments-sdk/+│ └── mcp-server/+├── agents/ # full agent builds+│ ├── coach-leo/+│ ├── pump-fun-agent/+│ ├── three-concierge/+│ └── metamask-agent-wallet/+├── embeds/ # single-file HTML patterns+│ ├── minimal.html+│ ├── two-agents.html+│ ├── web-component.html+│ └── widget-rpc.html+└── tutorials/ # long-form walkthroughs (start: docs/internal/tutorial-build-pai-site.md, adapted)+```++Repo-level requirements:++- Root README states: **source of truth is the monorepo; PRs and issues belong there** (with links). Satellite accepts no direct contributions.+- Every example folder has its own README: what it does, prerequisites, exact run commands, link to relevant docs page on three.ws.+- Every example pins to working surfaces — published npm packages (post Phase 0) or hosted endpoints — never relative monorepo paths.++### Phase 3 — One-way export script++`scripts/export-satellites.mjs`, run locally as part of the push routine (no CI available):++1. Copy curated paths (`examples/` subset, SDK quickstarts) into a staging dir, rewriting any monorepo-relative imports to published package names.+2. Smoke-test: `npm install` + run each example's check command in staging. Abort export on any failure — never push broken examples.+3. Force-push staging to `three-ws/examples` as a single-parent history (satellite history is disposable; monorepo is truth).+4. Wire as `npm run export:satellites`; document in CLAUDE.md push routine. **Never pull/fetch from satellites** — same rule as the 3D-Agent mirror.++### Phase 4 — Cross-linking (what makes it pay off)++- three.ws docs pages link to the matching example folder; examples README links back to docs and the live platform.+- `llms.txt` / `llms-full.txt` reference the examples repo.+- Org profile README pins `examples` + monorepo.+- Changelog entry + Telegram push announcing the developer resources (this is user-visible — gets a `data/changelog.json` entry when shipped).++---++## 4. Sequencing & effort++| Phase | Depends on | Effort |+|---|---|---|+| 0. npm publish | `NPM_TOKEN` from user | Small (pipeline exists) |+| 1. Org creation | User action (GitHub UI) | Minutes |+| 2. Examples repo seed | Phases 0–1 | ~1 day: curate, write READMEs, pin versions |+| 3. Export script | Phase 2 | ~half day incl. smoke-test harness |+| 4. Cross-linking | Phase 2 | Small, rolling |++If `NPM_TOKEN` is delayed: ship Phase 2 against hosted endpoints only, add npm-install quickstarts when Phase 0 lands.++---++## 5. Explicitly not doing (and why)++- **Separate documentation repo.** Docs are wired into the site build (SEO injectors, `pages.json` as sitemap source of truth). Extracting them creates a second source of truth that drifts. Discovery is served by linking docs prominently from the examples README.+- **Separate tutorials repo.** Fragments attention; tutorials are `examples/tutorials/`.+- **Two-way sync or accepting PRs on satellites.** Sync conflicts without CI are unmanageable; the 3D-Agent mirror already demonstrated the failure mode.+- **Moving the canonical repo to the org (for now).** Vercel deploys hang off `nirholas/three.ws`; relinking was fixed 2026-06-11 and shouldn't be churned without a deliberate migration plan.++---++## 6. Open decisions++1. **Org name** — `three-ws` proposed (`three.ws` isn't a valid org slug). Alternative: keep everything under `nirholas`.+2. **npm scope** — packages currently use `@three-ws/*` and `@3d-agent/*`; consolidating to one scope before first publish would avoid a rename later.+3. **Announce timing** — changelog + Telegram on examples-repo launch, or wait until npm installs work end-to-end.diff --git a/pages/forge-v2.html b/pages/forge-v2.htmlnew file mode 100644index 000000000..711ddc3fc--- /dev/null+++ b/pages/forge-v2.html@@ -0,0 +1,2403 @@+<!doctype html>+<html lang="en">+ <head>+ <script>/* three.ws theme boot — no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>+ <meta charset="UTF-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />+ <title>Forge v2 preview · Text → 3D · three.ws</title>+ <meta+ name="description"+ content="Design preview of the next Forge — describe an object or drop in photos, get a textured 3D model."+ />+ <!-- Internal design preview: keep out of search indexes and the sitemap. -->+ <meta name="robots" content="noindex, nofollow" />+ <meta name="theme-color" content="#080814" />+ <link rel="icon" href="/favicon.ico" sizes="any" />+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />+ <link rel="stylesheet" href="/style.css" />+ <link rel="preconnect" href="https://ajax.googleapis.com" />+ <script+ type="module"+ src="https://ajax.googleapis.com/ajax/libs/model-viewer/4.0.0/model-viewer.min.js"+ integrity="sha384-sr9b4Ux0WhAUGclJ0ym0FSY2zSOMmNSn0bP/SA0e6bNCrpn/5W3QL8mm+LdlQMKw"+ crossorigin="anonymous"+ ></script>+ <style>+ /* ── Forge brand layer ─────────────────────────────────────────────+ A documented per-surface accent ON TOP of the canonical tokens+ (same pattern as the IBM Carbon blue at /ibm/*): Forge gets heat.+ Everything else still consumes the canonical tokens by name. */+ body.forge-v2 {+ --accent: #ff9d57;+ --accent-soft: rgba(255, 157, 87, 0.14);+ }+ html[data-theme='light'] body.forge-v2 {+ --accent: #c2530f;+ --accent-soft: rgba(194, 83, 15, 0.12);+ }+ /* Ambient ember glow — gives the page a focal point without panels+ having to shout. Fixed so it doesn't repaint on scroll. */+ body.forge-v2::before {+ content: '';+ position: fixed;+ inset: 0;+ z-index: -1;+ pointer-events: none;+ background:+ radial-gradient(900px 480px at 50% -140px, rgba(255, 140, 60, 0.13), transparent 65%),+ radial-gradient(720px 460px at 88% 108%, rgba(255, 140, 60, 0.05), transparent 60%);+ }+ html[data-theme='light'] body.forge-v2::before {+ background:+ radial-gradient(900px 480px at 50% -140px, rgba(214, 110, 40, 0.10), transparent 65%),+ radial-gradient(720px 460px at 88% 108%, rgba(214, 110, 40, 0.04), transparent 60%);+ }++ /* ── Preview banner ──────────────────────────────────────────────── */+ .preview-banner {+ text-align: center;+ font-family: var(--font-mono);+ font-size: var(--text-xs);+ letter-spacing: 0.04em;+ color: var(--ink-dim);+ background: var(--accent-soft);+ border-bottom: 1px solid var(--stroke);+ padding: 0.45rem var(--space-md);+ }+ .preview-banner a {+ color: var(--accent);+ text-decoration: none;+ }+ .preview-banner a:hover {+ text-decoration: underline;+ }++ /* ── Page frame ──────────────────────────────────────────────────── */+ .forge-main {+ max-width: 1320px;+ margin: 0 auto;+ padding: var(--space-lg) var(--space-md) var(--space-2xl);+ }+ .forge-head {+ /* Reset the global site-nav `header` rule from style.css —+ this is an in-page hero, not the top bar. */+ display: block;+ height: auto;+ padding: 0;+ background: none;+ backdrop-filter: none;+ -webkit-backdrop-filter: none;+ border-bottom: 0;+ overflow: visible;+ white-space: normal;+ line-height: var(--leading-normal);+ z-index: auto;+ -webkit-app-region: no-drag;+ text-align: center;+ margin-bottom: var(--space-lg);+ }+ .forge-eyebrow {+ display: inline-flex;+ align-items: center;+ gap: 0.45rem;+ font-family: var(--font-mono);+ font-size: var(--text-xs);+ letter-spacing: 0.16em;+ text-transform: uppercase;+ color: var(--ink-dim);+ border: 1px solid var(--stroke);+ border-radius: 999px;+ padding: 0.3rem 0.7rem;+ }+ .forge-eyebrow::before {+ content: '';+ width: 6px;+ height: 6px;+ border-radius: 50%;+ background: var(--success);+ box-shadow: 0 0 8px var(--success);+ }+ .forge-head h1 {+ display: block;+ font-family: var(--font-display);+ font-size: clamp(2rem, 4.6vw, var(--text-2xl));+ line-height: var(--leading-tight);+ margin: var(--space-md) auto var(--space-xs);+ max-width: 24ch;+ background: linear-gradient(115deg, var(--ink) 55%, var(--accent) 125%);+ -webkit-background-clip: text;+ background-clip: text;+ color: transparent;+ }+ .forge-head p {+ color: var(--ink-dim);+ max-width: 52ch;+ margin: 0 auto;+ line-height: var(--leading-normal);+ }++ /* ── Workspace: rail + stage side by side on desktop ─────────────── */+ .forge-workspace {+ display: grid;+ gap: var(--space-lg);+ align-items: start;+ }+ @media (min-width: 1080px) {+ .forge-workspace {+ grid-template-columns: minmax(370px, 430px) minmax(0, 1fr);+ }+ .forge-rail {+ position: sticky;+ top: 84px;+ }+ }++ /* ── Mode switch ─────────────────────────────────────────────────── */+ .mode-switch-wrap {+ display: flex;+ margin-bottom: var(--space-sm);+ }+ .mode-switch {+ display: flex;+ width: 100%;+ gap: 2px;+ background: var(--surface-1);+ border: 1px solid var(--stroke);+ border-radius: var(--radius-md);+ padding: 3px;+ }+ .mode-switch button {+ flex: 1;+ background: transparent;+ border: none;+ color: var(--ink-dim);+ font-family: var(--font-display);+ font-size: var(--text-sm);+ font-weight: 600;+ padding: 0.5rem 0.6rem;+ border-radius: var(--radius-sm);+ cursor: pointer;+ transition:+ background 0.15s,+ color 0.15s;+ }+ .mode-switch button:hover {+ color: var(--ink);+ }+ .mode-switch button[aria-selected='true'] {+ background: var(--surface-3);+ color: var(--ink);+ }+ .mode-switch button:focus-visible {+ outline: 2px solid var(--accent);+ outline-offset: 2px;+ }++ /* ── Composer ────────────────────────────────────────────────────── */+ .composer {+ background: var(--surface-glass);+ border: 1px solid var(--stroke-strong);+ border-radius: var(--radius-lg);+ padding: var(--space-md);+ box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.8);+ }+ .composer textarea {+ width: 100%;+ min-height: 96px;+ resize: vertical;+ background: transparent;+ border: none;+ outline: none;+ color: var(--ink);+ font-family: var(--font-body);+ font-size: var(--text-lg);+ line-height: var(--leading-normal);+ }+ .composer textarea::placeholder {+ color: var(--ink-dim);+ }++ /* Prompt tools — surprise · coach · counter */+ .prompt-tools {+ display: flex;+ align-items: center;+ gap: var(--space-sm);+ margin-top: var(--space-xs);+ flex-wrap: wrap;+ }+ .ptool {+ display: inline-flex;+ align-items: center;+ gap: 0.4rem;+ background: var(--surface-1);+ border: 1px solid var(--stroke);+ border-radius: 999px;+ color: var(--ink-dim);+ font-family: var(--font-mono);+ font-size: var(--text-xs);+ letter-spacing: 0.02em;+ padding: 0.32rem 0.72rem;+ cursor: pointer;+ transition:+ color 0.15s,+ border-color 0.15s,+ background 0.15s;+ }+ .ptool:hover {+ color: var(--ink);+ border-color: var(--stroke-strong);+ background: var(--surface-2);+ }+ .ptool:focus-visible {+ outline: 2px solid var(--accent);+ outline-offset: 2px;+ }+ .ptool svg {+ width: 14px;+ height: 14px;+ }+ .ptool.is-rolling svg {+ animation: dice-roll 0.5s cubic-bezier(0.3, 0.7, 0.3, 1);+ }+ @keyframes dice-roll {+ from {+ transform: rotate(0);+ }+ to {+ transform: rotate(360deg);+ }+ }+ .prompt-coach {+ display: inline-flex;+ align-items: center;+ gap: 0.45rem;+ font-size: var(--text-xs);+ color: var(--ink-dim);+ line-height: 1.4;+ min-height: 1.2em;+ flex: 1 1 10rem;+ min-width: 0;+ }+ .prompt-coach::before {+ content: '';+ width: 6px;+ height: 6px;+ border-radius: 50%;+ background: var(--ink-dim);+ flex: none;+ transition:+ background 0.2s,+ box-shadow 0.2s;+ }+ .prompt-coach[data-grade='strong'] {+ color: var(--success);+ }+ .prompt-coach[data-grade='strong']::before {+ background: var(--success);+ box-shadow: 0 0 8px var(--success);+ }+ .prompt-coach[data-grade='warn'] {+ color: var(--warning, #e0a93e);+ }+ .prompt-coach[data-grade='warn']::before {+ background: var(--warning, #e0a93e);+ }+ .prompt-coach[data-grade='tip']::before {+ background: var(--accent);+ }+ .prompt-count {+ font-family: var(--font-mono);+ font-size: var(--text-xs);+ color: var(--ink-dim);+ flex: none;+ font-variant-numeric: tabular-nums;+ margin-left: auto;+ }+ .prompt-count[data-near='true'] {+ color: var(--warning, #e0a93e);+ }++ /* Settings — quality / engine / aspect, one compact block */+ .forge-quality {+ display: flex;+ flex-direction: column;+ gap: var(--space-sm);+ margin-top: var(--space-sm);+ padding-top: var(--space-sm);+ border-top: 1px solid var(--stroke);+ }+ .fq-row {+ display: flex;+ align-items: center;+ gap: var(--space-sm);+ flex-wrap: wrap;+ }+ .fq-label {+ font-family: var(--font-mono);+ font-size: var(--text-xs);+ text-transform: uppercase;+ letter-spacing: 0.04em;+ color: var(--ink-dim);+ min-width: 4.2rem;+ }+ /* forge.js hides the #aspect control itself when the mode makes it+ irrelevant — collapse the labeled row with it, no orphan label. */+ .fq-row:has(> .aspect.is-hidden) {+ display: none;+ }+ .aspect {+ display: inline-flex;+ gap: 2px;+ background: var(--surface-1);+ border: 1px solid var(--stroke);+ border-radius: var(--radius-md);+ padding: 2px;+ }+ .aspect button {+ background: transparent;+ border: none;+ color: var(--ink-dim);+ font-family: var(--font-mono);+ font-size: var(--text-xs);+ padding: 0.32rem 0.55rem;+ border-radius: var(--radius-sm);+ cursor: pointer;+ transition:+ background 0.15s,+ color 0.15s;+ }+ .aspect button:hover {+ color: var(--ink);+ }+ .aspect button[aria-pressed='true'] {+ background: var(--surface-3);+ color: var(--ink);+ }+ /* Live backend health on the engine buttons: a throttled upstream gets+ an amber dot, a down/unconfigured one is disabled with the reason in+ its tooltip. Dots ride ::after so the label spacing stays put. */+ .aspect button[data-health='degraded']::after {+ content: '';+ display: inline-block;+ width: 0.4em;+ height: 0.4em;+ margin-left: 0.35em;+ border-radius: 50%;+ background: var(--warning, #e0a93e);+ vertical-align: 0.08em;+ }+ .aspect button:disabled {+ opacity: 0.45;+ cursor: not-allowed;+ }+ .aspect button:focus-visible,+ .chip:focus-visible,+ .btn:focus-visible {+ outline: 2px solid var(--accent);+ outline-offset: 2px;+ }+ .byok-row {+ display: flex;+ align-items: center;+ gap: var(--space-sm);+ flex-wrap: wrap;+ }+ .byok-input {+ flex: 1 1 12rem;+ min-width: 0;+ background: var(--surface-1);+ border: 1px solid var(--stroke);+ border-radius: var(--radius-md);+ color: var(--ink);+ font-family: var(--font-mono);+ font-size: var(--text-sm);+ padding: 0.5rem 0.7rem;+ outline: none;+ transition:+ border-color 0.15s,+ box-shadow 0.15s;+ }+ .byok-input:focus-visible {+ border-color: var(--accent);+ box-shadow: 0 0 0 3px var(--accent-soft);+ }+ .byok-input[aria-invalid='true'] {+ border-color: var(--danger);+ }+ .byok-hint {+ flex-basis: 100%;+ font-size: var(--text-xs);+ color: var(--ink-dim);+ }+ .byok-hint a {+ color: var(--accent);+ text-decoration: none;+ }+ .byok-hint a:hover {+ text-decoration: underline;+ }+ .fq-estimate {+ margin: 0;+ font-family: var(--font-mono);+ font-size: var(--text-xs);+ color: var(--ink-dim);+ min-height: 1.1em;+ }+ .fq-estimate strong {+ color: var(--ink);+ font-weight: 600;+ }++ /* CTA — the one unmistakable action on the page */+ .composer-row {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: var(--space-sm);+ margin-top: var(--space-sm);+ padding-top: var(--space-sm);+ border-top: 1px solid var(--stroke);+ flex-wrap: wrap;+ }+ .btn {+ display: inline-flex;+ align-items: center;+ gap: 0.5rem;+ font-family: var(--font-display);+ font-weight: 600;+ font-size: var(--text-base);+ color: #0b0b0b;+ background: var(--accent);+ border: 1px solid var(--accent);+ border-radius: var(--radius-md);+ padding: 0.6rem 1.2rem;+ cursor: pointer;+ transition:+ transform 0.12s ease,+ opacity 0.15s,+ box-shadow 0.15s;+ }+ .btn:hover {+ box-shadow: 0 0 0 4px var(--accent-soft);+ }+ .btn:active {+ transform: translateY(1px);+ }+ .btn[disabled] {+ opacity: 0.45;+ cursor: not-allowed;+ }+ .btn-ghost {+ background: transparent;+ color: var(--ink);+ border: 1px solid var(--stroke-strong);+ }+ .btn-ghost:hover {+ background: var(--surface-2);+ box-shadow: none;+ }+ #generate {+ width: 100%;+ justify-content: center;+ font-size: var(--text-lg);+ padding: 0.75rem 1.2rem;+ background: linear-gradient(135deg, #ffb877, #ff7a2f);+ border-color: transparent;+ color: #1a0d04;+ text-shadow: none;+ }+ #generate:hover {+ box-shadow:+ 0 0 0 4px var(--accent-soft),+ 0 8px 28px -8px rgba(255, 130, 50, 0.55);+ }+ html[data-theme='light'] body.forge-v2 #generate {+ background: linear-gradient(135deg, #d96a1e, #b34a08);+ color: #fff;+ }+ .gen-kbd {+ font-family: var(--font-mono);+ font-size: 0.72em;+ line-height: 1;+ padding: 0.2em 0.4em;+ border-radius: var(--radius-sm);+ background: rgba(0, 0, 0, 0.16);+ border: 1px solid rgba(0, 0, 0, 0.22);+ color: inherit;+ opacity: 0.85;+ }+ @media (max-width: 560px) {+ .gen-kbd {+ display: none;+ }+ }++ /* ── View slots — image / multi-view / sketch modes ──────────────── */+ .image-pane {+ display: flex;+ flex-direction: column;+ }+ .views-grid {+ display: grid;+ grid-template-columns: repeat(4, 1fr);+ gap: var(--space-sm);+ }+ @media (max-width: 620px) {+ .views-grid {+ grid-template-columns: repeat(2, 1fr);+ }+ }+ /* Sketch mode reuses the view-slot kit with a single, wider slot.+ Declared after both .views-grid rules so it wins at every width. */+ .sketch-grid {+ grid-template-columns: minmax(140px, 240px);+ }+ .view-slot {+ position: relative;+ aspect-ratio: 1 / 1;+ border: 1px dashed var(--stroke-strong);+ border-radius: var(--radius-md);+ background: var(--surface-1);+ overflow: hidden;+ display: grid;+ place-items: center;+ cursor: pointer;+ transition:+ border-color 0.15s,+ background 0.15s,+ transform 0.12s;+ }+ .view-slot:hover {+ border-color: var(--accent);+ }+ .view-slot:focus-visible {+ outline: 2px solid var(--accent);+ outline-offset: 2px;+ }+ .view-slot.drop-target {+ border-color: var(--accent);+ border-style: solid;+ background: var(--accent-soft);+ transform: scale(1.02);+ }+ .view-slot[data-state='uploaded'] {+ border-style: solid;+ cursor: grab;+ }+ .view-slot[data-state='uploaded']:active {+ cursor: grabbing;+ }+ .view-slot[data-state='error'] {+ border-color: var(--danger);+ border-style: solid;+ }+ .view-slot.dragging {+ opacity: 0.4;+ }+ .vs-empty,+ .vs-uploading,+ .vs-error {+ display: none;+ flex-direction: column;+ align-items: center;+ justify-content: center;+ gap: 0.35rem;+ color: var(--ink-dim);+ font-size: var(--text-xs);+ padding: 0.5rem;+ text-align: center;+ }+ .vs-thumb,+ .vs-remove,+ .vs-badge {+ display: none;+ }+ .view-slot[data-state='empty'] .vs-empty {+ display: flex;+ }+ .view-slot[data-state='uploading'] .vs-uploading {+ display: flex;+ }+ .view-slot[data-state='uploaded'] .vs-thumb {+ display: block;+ }+ .view-slot[data-state='uploaded'] .vs-remove {+ display: grid;+ }+ .view-slot[data-state='uploaded'] .vs-badge {+ display: block;+ }+ .view-slot[data-state='error'] .vs-error {+ display: flex;+ }+ .vs-icon {+ font-size: 1.5rem;+ line-height: 1;+ color: var(--ink-dim);+ }+ .vs-label {+ font-family: var(--font-mono);+ letter-spacing: 0.08em;+ text-transform: uppercase;+ }+ .vs-thumb {+ width: 100%;+ height: 100%;+ object-fit: cover;+ pointer-events: none;+ }+ .vs-remove {+ position: absolute;+ top: 5px;+ right: 5px;+ width: 22px;+ height: 22px;+ place-items: center;+ border: none;+ border-radius: 50%;+ background: rgba(0, 0, 0, 0.6);+ color: #fff;+ font-size: 1rem;+ line-height: 1;+ cursor: pointer;+ backdrop-filter: blur(4px);+ transition: background 0.15s;+ }+ .vs-remove:hover {+ background: var(--danger);+ }+ .vs-badge {+ position: absolute;+ bottom: 5px;+ left: 5px;+ font-family: var(--font-mono);+ font-size: 0.6rem;+ text-transform: uppercase;+ letter-spacing: 0.06em;+ padding: 1px 6px;+ border-radius: 999px;+ background: rgba(0, 0, 0, 0.6);+ color: var(--ink);+ backdrop-filter: blur(4px);+ }+ .vs-uploading .shimmer {+ position: absolute;+ inset: 0;+ background: linear-gradient(+ 100deg,+ transparent 20%,+ rgba(255, 255, 255, 0.06) 50%,+ transparent 80%+ );+ background-size: 200% 100%;+ animation: shimmer 1.4s linear infinite;+ }+ .vs-retry {+ background: transparent;+ border: 1px solid var(--stroke-strong);+ color: var(--ink);+ border-radius: var(--radius-sm);+ font-size: var(--text-xs);+ padding: 0.2rem 0.5rem;+ cursor: pointer;+ }+ .vs-retry:hover {+ border-color: var(--accent);+ }+ .views-hint {+ color: var(--ink-dim);+ font-size: var(--text-xs);+ margin: var(--space-sm) 0 0;+ }+ .image-prompt {+ width: 100%;+ min-height: 52px;+ resize: vertical;+ margin-top: var(--space-sm);+ background: transparent;+ border: 1px solid var(--stroke);+ border-radius: var(--radius-md);+ outline: none;+ color: var(--ink);+ font-family: var(--font-body);+ font-size: var(--text-base);+ line-height: var(--leading-normal);+ padding: 0.55rem 0.7rem;+ }+ .image-prompt:focus {+ border-color: var(--stroke-strong);+ }+ .image-prompt::placeholder {+ color: var(--ink-dim);+ }+ .views-badge {+ font-family: var(--font-mono);+ font-size: 0.62rem;+ text-transform: uppercase;+ letter-spacing: 0.06em;+ color: var(--ink-dim);+ border: 1px solid var(--stroke);+ border-radius: 999px;+ padding: 1px 7px;+ margin-left: 0.5rem;+ }++ /* ── Example chips ───────────────────────────────────────────────── */+ .chips {+ display: flex;+ flex-wrap: wrap;+ gap: var(--space-xs);+ margin-top: var(--space-sm);+ }+ .chip {+ background: var(--surface-1);+ border: 1px solid var(--stroke);+ border-radius: 999px;+ color: var(--ink-dim);+ font-size: var(--text-sm);+ padding: 0.4rem 0.85rem;+ cursor: pointer;+ transition:+ color 0.15s,+ border-color 0.15s,+ background 0.15s,+ opacity 0.18s ease;+ }+ .chip:hover {+ color: var(--ink);+ border-color: var(--accent);+ background: var(--accent-soft);+ }+ .chip.is-swapping {+ opacity: 0;+ }+ .chips-more {+ background: transparent;+ border: 1px dashed var(--stroke-strong);+ border-radius: 999px;+ color: var(--ink-dim);+ font-family: var(--font-mono);+ font-size: var(--text-xs);+ letter-spacing: 0.04em;+ padding: 0.4rem 0.85rem;+ cursor: pointer;+ transition:+ color 0.15s,+ border-color 0.15s,+ transform 0.4s ease;+ }+ .chips-more:hover {+ color: var(--ink);+ border-color: var(--accent);+ }+ .chips-more:focus-visible {+ outline: 2px solid var(--accent);+ outline-offset: 2px;+ }+ .chips-more.is-rolling {+ transform: rotate(180deg);+ }++ /* ── Stage / states ──────────────────────────────────────────────── */+ .stage {+ min-height: 480px;+ }+ .panel {+ background: var(--surface-glass);+ border: 1px solid var(--stroke);+ border-radius: var(--radius-lg);+ overflow: hidden;+ }+ .is-hidden {+ display: none !important;+ }++ /* Idle — a live model, not a void. Loads the newest community forge+ (or a labeled first-party sample) so the first thing a visitor sees+ is the product's output. */+ .idle-viewer-wrap {+ position: relative;+ }+ .idle-viewer-wrap model-viewer {+ width: 100%;+ height: min(52vh, 480px);+ background: radial-gradient(120% 120% at 50% 0%, #1a1612 0%, #0b0a09 70%);+ --poster-color: transparent;+ }+ html[data-theme='light'] .idle-viewer-wrap model-viewer {+ background: radial-gradient(120% 120% at 50% 0%, #f3eee9 0%, #e7e2dc 70%);+ }+ .idle-tag {+ position: absolute;+ top: 10px;+ left: 12px;+ font-family: var(--font-mono);+ font-size: 0.65rem;+ text-transform: uppercase;+ letter-spacing: 0.08em;+ color: var(--ink-dim);+ background: rgba(0, 0, 0, 0.45);+ border: 1px solid var(--stroke);+ border-radius: 999px;+ padding: 2px 9px;+ backdrop-filter: blur(4px);+ }+ .idle-bar {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: var(--space-sm);+ padding: var(--space-sm) var(--space-md);+ border-top: 1px solid var(--stroke);+ flex-wrap: wrap;+ }+ .idle-caption {+ display: flex;+ flex-direction: column;+ gap: 0.15rem;+ min-width: 0;+ flex: 1 1 16rem;+ }+ .idle-kicker {+ font-family: var(--font-mono);+ font-size: var(--text-xs);+ text-transform: uppercase;+ letter-spacing: 0.06em;+ color: var(--accent);+ }+ .idle-prompt {+ color: var(--ink);+ font-size: var(--text-sm);+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+ }+ .idle-hint {+ flex-basis: 100%;+ margin: 0;+ color: var(--ink-dim);+ font-size: var(--text-xs);+ line-height: var(--leading-normal);+ }++ /* Generating */+ .gen {+ display: grid;+ grid-template-columns: 1fr 1.1fr;+ gap: var(--space-md);+ padding: var(--space-md);+ }+ @media (max-width: 720px) {+ .gen {+ grid-template-columns: 1fr;+ }+ }+ .gen-preview {+ position: relative;+ aspect-ratio: 1 / 1;+ border-radius: var(--radius-md);+ border: 1px solid var(--stroke);+ background: var(--surface-1);+ overflow: hidden;+ display: grid;+ place-items: center;+ }+ .gen-preview img {+ width: 100%;+ height: 100%;+ object-fit: cover;+ animation: paint-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;+ }+ @keyframes paint-in {+ from {+ opacity: 0;+ filter: blur(16px) saturate(0.7);+ transform: scale(1.05);+ }+ to {+ opacity: 1;+ filter: blur(0) saturate(1);+ transform: none;+ }+ }+ /* Reconstruction scanline — sweeps the reference image while the mesh+ step is live, so the wait reads as work, not silence. */+ .gen-preview.is-reconstructing::after {+ content: '';+ position: absolute;+ inset: 0;+ background: linear-gradient(+ 180deg,+ transparent 0%,+ color-mix(in srgb, var(--accent) 30%, transparent) 50%,+ transparent 100%+ );+ background-size: 100% 34%;+ background-repeat: no-repeat;+ animation: forge-scan 2.6s ease-in-out infinite;+ mix-blend-mode: screen;+ pointer-events: none;+ }+ @keyframes forge-scan {+ from {+ background-position: 0 -40%;+ }+ to {+ background-position: 0 140%;+ }+ }+ .gen-preview .shimmer {+ position: absolute;+ inset: 0;+ background: linear-gradient(+ 100deg,+ transparent 20%,+ rgba(255, 255, 255, 0.06) 50%,+ transparent 80%+ );+ background-size: 200% 100%;+ animation: shimmer 1.4s linear infinite;+ }+ @keyframes shimmer {+ to {+ background-position: -200% 0;+ }+ }+ .gen-steps {+ display: flex;+ flex-direction: column;+ justify-content: center;+ gap: var(--space-sm);+ }+ .step {+ display: flex;+ align-items: center;+ gap: 0.7rem;+ color: var(--ink-dim);+ font-size: var(--text-sm);+ }+ .step .dot {+ width: 14px;+ height: 14px;+ border-radius: 50%;+ border: 2px solid var(--stroke-strong);+ flex: none;+ }+ .step[data-state='active'] {+ color: var(--ink);+ }+ .step[data-state='active'] .dot {+ border-color: var(--accent);+ border-top-color: transparent;+ animation: spin 0.8s linear infinite;+ }+ .step[data-state='done'] {+ color: var(--ink);+ }+ .step[data-state='done'] .dot {+ background: var(--success);+ border-color: var(--success);+ }+ @keyframes spin {+ to {+ transform: rotate(360deg);+ }+ }+ .gen-meta {+ font-family: var(--font-mono);+ font-size: var(--text-xs);+ color: var(--ink-dim);+ margin-top: var(--space-xs);+ }+ .gen-meta strong {+ color: var(--ink);+ font-weight: 600;+ }++ /* Honest elapsed-vs-typical meter. The fill maps real elapsed time+ against the engine's real catalog ETA on an asymptotic curve that+ never reaches 100% on its own — only a real finished GLB snaps it to+ full. Past the typical time it holds near the cap and recolours to+ amber ("longer than usual"), so the bar is informative, never faked. */+ .gen-progress {+ position: relative;+ height: 5px;+ margin-top: var(--space-sm);+ border-radius: 999px;+ background: var(--surface-1);+ border: 1px solid var(--stroke);+ overflow: hidden;+ }+ .gen-progress-fill {+ position: absolute;+ inset: 0;+ width: 0%;+ border-radius: inherit;+ background: linear-gradient(+ 90deg,+ color-mix(in srgb, var(--accent) 70%, transparent),+ var(--accent)+ );+ transition: width 0.9s cubic-bezier(0.33, 1, 0.68, 1), background 0.4s ease;+ }+ .gen-progress-fill::after {+ content: '';+ position: absolute;+ inset: 0;+ background: linear-gradient(+ 100deg,+ transparent 30%,+ rgba(255, 255, 255, 0.28) 50%,+ transparent 70%+ );+ background-size: 220% 100%;+ animation: gen-sheen 1.6s linear infinite;+ }+ .gen-progress[data-over='true'] .gen-progress-fill {+ background: linear-gradient(+ 90deg,+ color-mix(in srgb, var(--warning, #e0a93e) 70%, transparent),+ var(--warning, #e0a93e)+ );+ }+ .gen-progress[data-done='true'] .gen-progress-fill {+ background: linear-gradient(+ 90deg,+ color-mix(in srgb, var(--success) 70%, transparent),+ var(--success)+ );+ }+ .gen-progress[data-indeterminate='true'] .gen-progress-fill {+ width: 38% !important;+ animation: gen-indeterminate 1.5s ease-in-out infinite;+ }+ @keyframes gen-sheen {+ to {+ background-position: -220% 0;+ }+ }+ @keyframes gen-indeterminate {+ 0% {+ transform: translateX(-120%);+ }+ 100% {+ transform: translateX(330%);+ }+ }++ /* Result */+ .viewer-shell {+ position: relative;+ }+ .result model-viewer {+ width: 100%;+ height: min(62vh, 600px);+ background: radial-gradient(120% 120% at 50% 0%, #1a1612 0%, #0b0a09 70%);+ --poster-color: transparent;+ transition: opacity 0.45s ease;+ }+ /* Materialize reveal — the WebGL overlay src/forge-reveal.js plays the+ dissolve in, then crossfades away to the standing viewer beneath. */+ .forge-reveal-overlay {+ position: absolute;+ inset: 0;+ z-index: 2;+ pointer-events: none;+ transition: opacity 0.42s ease;+ }+ .forge-reveal-overlay canvas {+ display: block;+ width: 100%;+ height: 100%;+ }+ .forge-reveal-overlay.is-fading {+ opacity: 0;+ }++ /* Cinema mode — distraction-free fullscreen turntable (F / Esc). */+ body.forge-cinema {+ overflow: hidden;+ }+ .result.is-cinema {+ position: fixed;+ inset: 0;+ z-index: 90;+ border: none;+ border-radius: 0;+ display: flex;+ flex-direction: column;+ background: radial-gradient(120% 90% at 50% 10%, #181a1f 0%, #0a0b0d 60%, #060708 100%);+ }+ .result.is-cinema > :not(.viewer-shell):not(.result-bar) {+ display: none;+ }+ .result.is-cinema .viewer-shell {+ flex: 1;+ min-height: 0;+ display: flex;+ }+ .result.is-cinema model-viewer {+ flex: 1;+ height: 100%;+ background: transparent;+ }+ .result.is-cinema .result-bar {+ position: absolute;+ left: 0;+ right: 0;+ bottom: 0;+ border-top: none;+ background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));+ opacity: 0;+ transition: opacity 0.3s ease;+ }+ .result.is-cinema .result-bar:hover,+ .result.is-cinema .result-bar:focus-within {+ opacity: 1;+ }+ .result.is-cinema::after {+ content: 'F or Esc to exit · drag to orbit';+ position: absolute;+ top: 14px;+ right: 16px;+ font-family: var(--font-mono);+ font-size: 12px;+ color: rgba(255, 255, 255, 0.55);+ pointer-events: none;+ animation: cinema-hint 4.5s ease forwards;+ }+ @keyframes cinema-hint {+ 0%,+ 70% {+ opacity: 1;+ }+ 100% {+ opacity: 0;+ }+ }+ .result-bar {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: var(--space-sm);+ padding: var(--space-sm) var(--space-md);+ border-top: 1px solid var(--stroke);+ flex-wrap: wrap;+ }+ .result-bar .label {+ font-size: var(--text-sm);+ color: var(--ink-dim);+ min-width: 0;+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+ }+ .result-bar .actions {+ display: flex;+ gap: var(--space-xs);+ flex: none;+ flex-wrap: wrap;+ }++ /* Keep / discard verdict (the flywheel signal) */+ .verdict {+ display: inline-flex;+ gap: 2px;+ background: var(--surface-1);+ border: 1px solid var(--stroke);+ border-radius: var(--radius-md);+ padding: 2px;+ }+ .verdict button {+ display: inline-flex;+ align-items: center;+ gap: 0.35rem;+ background: transparent;+ border: none;+ color: var(--ink-dim);+ font-size: var(--text-sm);+ padding: 0.34rem 0.6rem;+ border-radius: var(--radius-sm);+ cursor: pointer;+ transition:+ background 0.15s,+ color 0.15s;+ }+ .verdict button svg {+ width: 14px;+ height: 14px;+ }+ .verdict button:hover {+ color: var(--ink);+ }+ .verdict button:focus-visible {+ outline: 2px solid var(--accent);+ outline-offset: 2px;+ }+ .verdict button[aria-pressed='true'][data-outcome='accepted'] {+ background: color-mix(in srgb, var(--success) 22%, transparent);+ color: var(--success);+ }+ .verdict button[aria-pressed='true'][data-outcome='rejected'] {+ background: color-mix(in srgb, var(--danger) 20%, transparent);+ color: var(--danger);+ }++ /* Optimize / retopology panel (markup injected by forge-optimize.js) */+ .optimize {+ border-top: 1px solid var(--stroke);+ }+ .optimize-toggle {+ width: 100%;+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: var(--space-sm);+ background: transparent;+ border: none;+ color: var(--ink);+ font-family: var(--font-display);+ font-weight: 600;+ font-size: var(--text-sm);+ padding: var(--space-sm) var(--space-md);+ cursor: pointer;+ }+ .optimize-toggle:hover {+ background: var(--surface-2);+ }+ .optimize-toggle:focus-visible {+ outline: 2px solid var(--accent);+ outline-offset: -2px;+ }+ .optimize-toggle .chev {+ transition: transform 0.18s ease;+ color: var(--ink-dim);+ }+ .optimize[data-open='true'] .optimize-toggle .chev {+ transform: rotate(180deg);+ }+ .optimize-body {+ display: none;+ flex-direction: column;+ gap: var(--space-md);+ padding: 0 var(--space-md) var(--space-md);+ }+ .optimize[data-open='true'] .optimize-body {+ display: flex;+ }+ .opt-field {+ display: flex;+ flex-direction: column;+ gap: 0.4rem;+ }+ .opt-field > span {+ font-size: var(--text-xs);+ color: var(--ink-dim);+ font-family: var(--font-mono);+ text-transform: uppercase;+ letter-spacing: 0.04em;+ }+ .seg {+ display: inline-flex;+ flex-wrap: wrap;+ gap: 2px;+ background: var(--surface-1);+ border: 1px solid var(--stroke);+ border-radius: var(--radius-md);+ padding: 2px;+ }+ .seg button {+ flex: 1 1 auto;+ background: transparent;+ border: none;+ color: var(--ink-dim);+ font-family: var(--font-mono);+ font-size: var(--text-xs);+ padding: 0.4rem 0.7rem;+ border-radius: var(--radius-sm);+ cursor: pointer;+ transition:+ background 0.15s,+ color 0.15s;+ }+ .seg button:hover {+ color: var(--ink);+ }+ .seg button[aria-pressed='true'] {+ background: var(--surface-3);+ color: var(--ink);+ }+ .seg button:focus-visible {+ outline: 2px solid var(--accent);+ outline-offset: 2px;+ }+ .opt-mode-hint {+ font-size: var(--text-xs);+ color: var(--ink-dim);+ line-height: 1.4;+ min-height: 1.4em;+ }+ .opt-row {+ display: flex;+ gap: var(--space-md);+ flex-wrap: wrap;+ }+ .opt-row .opt-field {+ flex: 1 1 140px;+ }+ .opt-select {+ background: var(--surface-1);+ border: 1px solid var(--stroke);+ border-radius: var(--radius-md);+ color: var(--ink);+ font-family: var(--font-mono);+ font-size: var(--text-xs);+ padding: 0.45rem 0.6rem;+ }+ .opt-select:focus-visible {+ outline: 2px solid var(--accent);+ outline-offset: 1px;+ }+ .opt-actions {+ display: flex;+ align-items: center;+ gap: var(--space-md);+ flex-wrap: wrap;+ }+ .opt-status {+ font-size: var(--text-xs);+ font-family: var(--font-mono);+ color: var(--ink-dim);+ }+ .opt-status[data-kind='error'] {+ color: var(--danger);+ }+ .opt-status[data-kind='done'] {+ color: var(--success);+ }+ .opt-stats {+ display: flex;+ gap: var(--space-md);+ flex-wrap: wrap;+ font-family: var(--font-mono);+ font-size: var(--text-xs);+ color: var(--ink-dim);+ }+ .opt-stats strong {+ color: var(--ink);+ font-weight: 600;+ }++ /* Stylize — one-click geometric filters */+ .stylize {+ border-top: 1px solid var(--stroke);+ padding: var(--space-md);+ }+ .stylize-head h3 {+ font-family: var(--font-display);+ font-size: var(--text-base);+ margin: 0 0 0.15rem;+ }+ .stylize-sub {+ color: var(--ink-dim);+ font-size: var(--text-sm);+ line-height: var(--leading-normal);+ margin: 0 0 var(--space-md);+ max-width: 60ch;+ }+ .stylize-gallery {+ display: grid;+ grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));+ gap: var(--space-sm);+ }+ .stylize-card {+ display: flex;+ flex-direction: column;+ align-items: flex-start;+ gap: 0.35rem;+ text-align: left;+ background: var(--surface-1);+ border: 1px solid var(--stroke);+ border-radius: var(--radius-md);+ padding: var(--space-sm);+ cursor: pointer;+ color: var(--ink);+ font: inherit;+ transition:+ border-color 0.15s,+ transform 0.12s,+ box-shadow 0.15s,+ background 0.15s;+ }+ .stylize-card:hover {+ border-color: var(--stroke-strong);+ transform: translateY(-2px);+ box-shadow: 0 16px 36px -26px rgba(0, 0, 0, 0.9);+ }+ .stylize-card:focus-visible {+ outline: 2px solid var(--accent);+ outline-offset: 2px;+ }+ .stylize-card:active {+ transform: translateY(0);+ }+ .stylize-card[aria-pressed='true'] {+ border-color: var(--accent);+ background: var(--accent-soft);+ }+ .stylize-card[disabled] {+ opacity: 0.5;+ cursor: not-allowed;+ transform: none;+ box-shadow: none;+ }+ .stylize-thumb {+ width: 100%;+ aspect-ratio: 16 / 10;+ display: grid;+ place-items: center;+ border-radius: var(--radius-sm);+ background: radial-gradient(120% 120% at 50% 0%, #161616 0%, #0c0c0c 75%);+ color: var(--ink-dim);+ transition:+ color 0.15s,+ transform 0.2s ease;+ }+ .stylize-thumb svg {+ width: 58%;+ height: 58%;+ }+ .stylize-card:hover .stylize-thumb,+ .stylize-card[aria-pressed='true'] .stylize-thumb {+ color: var(--accent);+ }+ .stylize-card:hover .stylize-thumb svg {+ transform: scale(1.08) rotate(-4deg);+ }+ .stylize-name {+ font-family: var(--font-display);+ font-weight: 600;+ font-size: var(--text-sm);+ }+ .stylize-blurb {+ color: var(--ink-dim);+ font-size: var(--text-xs);+ line-height: var(--leading-snug);+ }+ .stylize-controls {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: var(--space-md);+ margin-top: var(--space-md);+ flex-wrap: wrap;+ }+ .stylize-slider {+ display: inline-flex;+ align-items: center;+ gap: var(--space-sm);+ font-family: var(--font-mono);+ font-size: var(--text-xs);+ color: var(--ink-dim);+ }+ .stylize-slider input[type='range'] {+ accent-color: var(--accent);+ width: 160px;+ cursor: pointer;+ }+ .stylize-slider input[type='range']:focus-visible {+ outline: 2px solid var(--accent);+ outline-offset: 3px;+ }+ .stylize-slider output {+ color: var(--ink);+ min-width: 2.5ch;+ text-align: right;+ }+ .stylize-actions {+ display: inline-flex;+ align-items: center;+ gap: var(--space-xs);+ flex-wrap: wrap;+ }+ .stylize-status {+ margin-top: var(--space-sm);+ font-family: var(--font-mono);+ font-size: var(--text-xs);+ color: var(--ink-dim);+ min-height: 1.2em;+ }+ .stylize-status[data-kind='busy'] {+ color: var(--accent);+ }+ .stylize-status[data-kind='error'] {+ color: var(--danger);+ }+ .stylize-status[data-kind='done'] {+ color: var(--success);+ }+ .stylize[data-busy='true'] .stylize-thumb svg {+ animation: spin 1.1s linear infinite;+ }++ /* ── Galleries: your creations + community showcase ──────────────── */+ .creations {+ margin-top: var(--space-2xl);+ }+ .creations-head {+ display: flex;+ align-items: baseline;+ justify-content: space-between;+ gap: var(--space-sm);+ margin-bottom: var(--space-md);+ }+ .creations-head h2 {+ font-family: var(--font-display);+ font-size: var(--text-lg);+ margin: 0;+ }+ .creations-head .count {+ font-family: var(--font-mono);+ font-size: var(--text-xs);+ color: var(--ink-dim);+ }+ .creations-grid {+ display: grid;+ grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));+ gap: var(--space-sm);+ }+ .creation {+ position: relative;+ display: flex;+ flex-direction: column;+ text-align: left;+ background: var(--surface-1);+ border: 1px solid var(--stroke);+ border-radius: var(--radius-md);+ overflow: hidden;+ cursor: pointer;+ padding: 0;+ color: inherit;+ font: inherit;+ transition:+ border-color 0.15s,+ transform 0.12s,+ box-shadow 0.15s;+ }+ .creation:hover {+ border-color: var(--accent);+ transform: translateY(-2px);+ box-shadow: 0 16px 36px -24px rgba(0, 0, 0, 0.9);+ }+ .creation:focus-visible {+ outline: 2px solid var(--accent);+ outline-offset: 2px;+ }+ .creation .thumb {+ aspect-ratio: 1 / 1;+ width: 100%;+ object-fit: cover;+ background: var(--surface-2);+ display: block;+ }+ .creation .thumb.placeholder {+ display: grid;+ place-items: center;+ color: var(--ink-dim);+ font-size: 1.6rem;+ }+ .creation .meta {+ padding: 0.5rem 0.6rem;+ font-size: var(--text-xs);+ color: var(--ink-dim);+ line-height: var(--leading-snug);+ display: -webkit-box;+ -webkit-line-clamp: 2;+ -webkit-box-orient: vertical;+ overflow: hidden;+ }+ .creation .badge {+ position: absolute;+ top: 6px;+ right: 6px;+ font-size: 0.65rem;+ font-family: var(--font-mono);+ padding: 1px 6px;+ border-radius: 999px;+ background: rgba(0, 0, 0, 0.55);+ backdrop-filter: blur(4px);+ }+ .creation .badge[data-outcome='accepted'] {+ color: var(--success);+ }+ .creation .badge[data-outcome='rejected'] {+ color: var(--danger);+ }++ .showcase-head-right {+ display: inline-flex;+ align-items: center;+ gap: var(--space-xs);+ }+ .showcase-refresh {+ display: inline-grid;+ place-items: center;+ width: 26px;+ height: 26px;+ background: transparent;+ border: 1px solid var(--stroke);+ border-radius: 50%;+ color: var(--ink-dim);+ cursor: pointer;+ transition:+ color 0.15s,+ border-color 0.15s,+ transform 0.3s ease;+ }+ .showcase-refresh:hover {+ color: var(--ink);+ border-color: var(--stroke-strong);+ transform: rotate(90deg);+ }+ .showcase-refresh:focus-visible {+ outline: 2px solid var(--accent);+ outline-offset: 2px;+ }+ .showcase-sub {+ margin: calc(-1 * var(--space-sm)) 0 var(--space-md);+ color: var(--ink-dim);+ font-size: var(--text-sm);+ }+ .showcase-sub strong {+ color: var(--ink);+ }+ .showcase-foot {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: var(--space-xs);+ padding: 0 0.6rem 0.5rem;+ margin-top: auto;+ }+ .showcase-when {+ font-family: var(--font-mono);+ font-size: 0.65rem;+ color: var(--ink-dim);+ opacity: 0.8;+ }+ .showcase-remix {+ font-family: var(--font-mono);+ font-size: 0.65rem;+ letter-spacing: 0.04em;+ padding: 2px 9px;+ border-radius: 999px;+ border: 1px solid var(--stroke);+ background: transparent;+ color: var(--ink-dim);+ cursor: pointer;+ transition:+ color 0.15s,+ border-color 0.15s,+ background 0.15s;+ }+ .showcase-card:hover .showcase-remix,+ .showcase-remix:hover {+ color: var(--ink);+ border-color: var(--accent);+ }+ .showcase-remix:hover {+ background: var(--accent-soft);+ }+ .showcase-remix:focus-visible {+ outline: 2px solid var(--accent);+ outline-offset: 2px;+ }+ .showcase-preview {+ position: absolute;+ top: 0;+ left: 0;+ right: 0;+ aspect-ratio: 1 / 1;+ width: 100%;+ background: var(--surface-2);+ opacity: 0;+ pointer-events: none;+ transition: opacity 0.25s ease;+ }+ .showcase-card.is-previewing .showcase-preview {+ opacity: 1;+ }++ /* ── Error / unconfigured notices ────────────────────────────────── */+ .notice {+ padding: var(--space-2xl) var(--space-lg);+ text-align: center;+ color: var(--ink-dim);+ }+ .notice h3 {+ color: var(--ink);+ font-family: var(--font-display);+ margin: 0 0 var(--space-xs);+ }+ .notice p {+ max-width: 48ch;+ margin: 0 auto;+ line-height: var(--leading-normal);+ }+ .notice .glyph {+ font-size: 2.4rem;+ opacity: 0.5;+ display: block;+ margin-bottom: var(--space-sm);+ }+ .notice.error h3 {+ color: var(--danger);+ }+ .notice .actions {+ margin-top: var(--space-md);+ display: inline-flex;+ gap: var(--space-xs);+ }+ .hint-foot {+ text-align: center;+ color: var(--ink-dim);+ font-size: var(--text-xs);+ margin-top: var(--space-lg);+ line-height: var(--leading-normal);+ }+ .hint-foot a {+ color: var(--ink);+ }++ /* ── Reduced motion ──────────────────────────────────────────────── */+ @media (prefers-reduced-motion: reduce) {+ .ptool.is-rolling svg,+ .gen-preview img,+ .gen-progress-fill::after {+ animation: none;+ }+ .gen-preview.is-reconstructing::after {+ display: none;+ }+ .chips-more.is-rolling {+ transform: none;+ }+ .gen-progress[data-indeterminate='true'] .gen-progress-fill {+ animation: none;+ width: 100% !important;+ opacity: 0.5;+ }+ .gen-progress-fill {+ transition: none;+ }+ .showcase-refresh,+ .showcase-remix,+ .showcase-preview {+ transition: none;+ }+ .showcase-refresh:hover {+ transform: none;+ }+ }+ </style>+ </head>+ <body class="forge-v2">+ <div id="nav-container"></div>++ <div class="preview-banner">+ Design preview — fully functional, nothing final. Compare with the live+ <a href="/forge">/forge</a>.+ </div>++ <main class="forge-main">+ <header class="forge-head">+ <span class="forge-eyebrow">Words & photos → 3D · live</span>+ <h1>Forge a 3D model from words or photos</h1>+ <p>+ Describe an object, or drop in up to four photos of it. Forge builds a+ textured mesh you can orbit, view in AR, and download as GLB.+ </p>+ </header>++ <div class="forge-workspace">+ <div class="forge-rail">+ <div class="mode-switch-wrap">+ <div class="mode-switch" role="tablist" aria-label="Generation mode" id="mode-switch">+ <button type="button" role="tab" data-mode="text" aria-selected="true">+ Describe it+ </button>+ <button type="button" role="tab" data-mode="image" aria-selected="false">+ From photos+ </button>+ <!-- Hidden until the catalog reports a live sketch engine (TripoSG+ self-host) — no dead tab on deployments without the worker. -->+ <button type="button" role="tab" data-mode="sketch" aria-selected="false" hidden>+ From a sketch+ </button>+ </div>+ </div>++ <form class="composer" id="composer" autocomplete="off">+ <!-- Text → 3D -->+ <div id="text-pane">+ <label for="prompt" class="is-hidden">Describe the object to generate</label>+ <textarea+ id="prompt"+ name="prompt"+ maxlength="1000"+ placeholder="a worn leather armchair, studio lighting, plain background"+ aria-describedby="prompt-coach"+ ></textarea>+ <div class="prompt-tools" id="prompt-tools">+ <button type="button" class="ptool" id="surprise" aria-label="Fill the box with a random vivid prompt">+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">+ <rect x="3" y="3" width="18" height="18" rx="3" />+ <circle cx="8.5" cy="8.5" r="1.4" fill="currentColor" stroke="none" />+ <circle cx="15.5" cy="15.5" r="1.4" fill="currentColor" stroke="none" />+ <circle cx="15.5" cy="8.5" r="1.4" fill="currentColor" stroke="none" />+ <circle cx="8.5" cy="15.5" r="1.4" fill="currentColor" stroke="none" />+ </svg>+ Surprise me+ </button>+ <span class="prompt-coach" id="prompt-coach" data-grade="tip" aria-live="polite"></span>+ <span class="prompt-count" id="prompt-count">0 / 1000</span>+ </div>+ </div>++ <!-- Image / multi-view → 3D -->+ <div id="image-pane" class="image-pane is-hidden">+ <div+ class="views-grid"+ id="views-grid"+ aria-label="Reference views — add up to four photos of the same object"+ ></div>+ <input+ type="file"+ id="view-file-input"+ accept="image/png,image/jpeg,image/webp"+ multiple+ hidden+ />+ <label for="image-prompt" class="is-hidden"+ >Optional guidance for reconstruction</label+ >+ <textarea+ id="image-prompt"+ class="image-prompt"+ maxlength="1000"+ placeholder="Optional guidance — e.g. “matte plastic, neutral pose, no background”"+ ></textarea>+ <p class="views-hint">+ Add 1–4 views of the <strong>same</strong> object (front · back · left ·+ right). Drag to drop, click to browse, paste from the clipboard+ (<kbd class="gen-kbd">⌘V</kbd> / <kbd class="gen-kbd">Ctrl+V</kbd>), drag a thumbnail to reorder.+ PNG/JPG/WebP, up to 8 MB each.+ </p>+ </div>++ <!-- Sketch → 3D (TripoSG-scribble) -->+ <div id="sketch-pane" class="image-pane is-hidden">+ <div+ class="views-grid sketch-grid"+ id="sketch-grid"+ aria-label="Your sketch — add one drawing"+ ></div>+ <input+ type="file"+ id="sketch-file-input"+ accept="image/png,image/jpeg,image/webp"+ hidden+ />+ <label for="sketch-prompt" class="is-hidden"+ >What does the sketch depict? (required)</label+ >+ <textarea+ id="sketch-prompt"+ class="image-prompt"+ maxlength="1000"+ placeholder="What is it? — e.g. “a cartoon rocket with two tail fins” (required)"+ ></textarea>+ <p class="views-hint">+ Drop one drawing — dark strokes on a light background work best — and say+ what it depicts. PNG/JPG/WebP, up to 8 MB. The result is untextured+ geometry: use <strong>Stylize</strong> or <strong>Retexture</strong> on it+ after.+ </p>+ </div>++ <!-- Quality tier + generation engine + BYOK key -->+ <div class="forge-quality" id="forge-quality">+ <div class="fq-row">+ <span class="fq-label" id="tier-label">Quality</span>+ <div class="aspect" role="group" aria-labelledby="tier-label" id="tier">+ <button type="button" data-tier="draft" aria-pressed="false">+ Draft+ </button>+ <button type="button" data-tier="standard" aria-pressed="true">+ Standard+ </button>+ <button type="button" data-tier="high" aria-pressed="false">+ High+ </button>+ </div>+ </div>+ <div class="fq-row">+ <span class="fq-label" id="engine-label">Engine</span>+ <div+ class="aspect"+ role="group"+ aria-labelledby="engine-label"+ id="engine"+ ></div>+ </div>+ <div class="fq-row">+ <span class="fq-label" id="aspect-label">Aspect</span>+ <div+ class="aspect"+ role="group"+ aria-labelledby="aspect-label"+ id="aspect"+ >+ <button type="button" data-aspect="1:1" aria-pressed="true">1:1</button>+ <button type="button" data-aspect="4:3" aria-pressed="false">4:3</button>+ <button type="button" data-aspect="3:4" aria-pressed="false">3:4</button>+ <button type="button" data-aspect="16:9" aria-pressed="false">16:9</button>+ </div>+ </div>+ <div class="byok-row is-hidden" id="byok-row">+ <label class="fq-label" for="provider-key" id="byok-label">API key</label>+ <input+ class="byok-input"+ id="provider-key"+ type="password"+ autocomplete="off"+ autocapitalize="off"+ spellcheck="false"+ placeholder="Your provider API key (kept in this browser)"+ aria-describedby="byok-hint"+ />+ <span class="byok-hint" id="byok-hint"></span>+ </div>+ <p class="fq-estimate" id="estimate" aria-live="polite"></p>+ </div>++ <div class="composer-row">+ <button class="btn" id="generate" type="submit">+ <span id="generate-label">Generate</span>+ <kbd class="gen-kbd" aria-hidden="true">⌘↵</kbd>+ </button>+ </div>+ </form>++ <div class="chips" id="examples" aria-label="Example prompts">+ <button class="chip" type="button">a low-poly red fox, sitting</button>+ <button class="chip" type="button">a sci-fi combat helmet, brushed metal</button>+ <button class="chip" type="button">a potted monstera plant</button>+ <button class="chip" type="button">a vintage film camera</button>+ <button class="chip" type="button">a glazed ceramic teapot</button>+ <button class="chips-more" type="button" id="chips-more" aria-label="Swap in a fresh set of example prompts">↻ More ideas</button>+ </div>+ </div>++ <section class="stage" id="stage" aria-live="polite">+ <!-- Idle — a live model instead of an empty void. Fed by the real+ community feed below; falls back to a labeled first-party+ sample GLB when the feed is empty or unavailable. -->+ <div class="panel" id="state-empty">+ <div class="idle-viewer-wrap">+ <model-viewer+ id="idle-viewer"+ camera-controls+ auto-rotate+ auto-rotate-delay="0"+ rotation-per-second="14deg"+ shadow-intensity="1"+ shadow-softness="0.9"+ exposure="1.05"+ tone-mapping="aces"+ interaction-prompt="none"+ alt="A recently forged 3D model"+ ></model-viewer>+ <span class="idle-tag" id="idle-tag">Loading…</span>+ </div>+ <div class="idle-bar">+ <div class="idle-caption">+ <span class="idle-kicker" id="idle-kicker">Fresh from the Forge</span>+ <span class="idle-prompt" id="idle-prompt">Finding a recent creation…</span>+ </div>+ <button class="btn btn-ghost" type="button" id="idle-remix" hidden>+ Remix this prompt+ </button>+ <p class="idle-hint">+ Your model lands right here. Type a description on the left — or tap an+ example — and hit <strong>Generate</strong>. Usually 30–90 seconds.+ </p>+ </div>+ </div>++ <!-- Generating -->+ <div class="panel gen is-hidden" id="state-generating">+ <div class="gen-preview" id="gen-preview">+ <div class="shimmer" aria-hidden="true"></div>+ </div>+ <div class="gen-steps">+ <div class="step" id="step-image" data-state="active">+ <span class="dot" aria-hidden="true"></span>+ <span>Painting reference image</span>+ </div>+ <div class="step" id="step-mesh" data-state="pending">+ <span class="dot" aria-hidden="true"></span>+ <span>Reconstructing textured mesh</span>+ </div>+ <div class="step" id="step-finish" data-state="pending">+ <span class="dot" aria-hidden="true"></span>+ <span>Finalizing GLB</span>+ </div>+ <div+ class="gen-progress"+ id="gen-progress"+ role="progressbar"+ aria-label="Generation progress"+ aria-valuemin="0"+ aria-valuemax="100"+ aria-valuenow="0"+ >+ <div class="gen-progress-fill" id="gen-progress-fill"></div>+ </div>+ <div class="gen-meta" id="gen-meta">Elapsed 0s</div>+ <div style="margin-top: var(--space-sm)">+ <button class="btn btn-ghost" type="button" id="cancel">Cancel</button>+ </div>+ </div>+ </div>++ <!-- Result -->+ <div class="panel result is-hidden" id="state-result">+ <div class="viewer-shell" id="viewer-shell">+ <model-viewer+ id="viewer"+ camera-controls+ auto-rotate+ auto-rotate-delay="0"+ rotation-per-second="18deg"+ shadow-intensity="1.2"+ shadow-softness="0.9"+ exposure="1.1"+ tone-mapping="aces"+ ar+ ar-modes="webxr scene-viewer quick-look"+ interaction-prompt="none"+ alt="Generated 3D model"+ ></model-viewer>+ </div>+ <div class="result-bar">+ <span class="label" id="result-label"></span>+ <span+ class="views-badge is-hidden"+ id="result-views"+ title="Reference views fused"+ ></span>+ <div class="actions">+ <button+ class="btn btn-ghost"+ type="button"+ id="cinema"+ aria-pressed="false"+ title="Cinema mode — fullscreen turntable for recording (F)"+ >+ <svg+ width="15"+ height="15"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+ aria-hidden="true"+ >+ <path d="M8 3H5a2 2 0 0 0-2 2v3" />+ <path d="M16 3h3a2 2 0 0 1 2 2v3" />+ <path d="M8 21H5a2 2 0 0 1-2-2v-3" />+ <path d="M16 21h3a2 2 0 0 0 2-2v-3" />+ </svg>+ Cinema+ </button>+ <div+ class="verdict"+ id="verdict"+ role="group"+ aria-label="Rate this model"+ >+ <button+ type="button"+ data-outcome="accepted"+ aria-pressed="false"+ title="Keep — good result"+ >+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">+ <path d="M7 10v12" />+ <path d="M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z" />+ </svg>+ Keep+ </button>+ <button+ type="button"+ data-outcome="rejected"+ aria-pressed="false"+ title="Discard — bad result"+ >+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">+ <path d="M17 14V2" />+ <path d="M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z" />+ </svg>+ Discard+ </button>+ </div>+ <button+ class="btn btn-ghost"+ type="button"+ id="forge-share-btn"+ aria-label="Share this creation"+ >+ <svg+ width="15"+ height="15"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+ aria-hidden="true"+ >+ <circle cx="18" cy="5" r="3" />+ <circle cx="6" cy="12" r="3" />+ <circle cx="18" cy="19" r="3" />+ <line x1="8.59" y1="13.51" x2="15.42" y2="17.49" />+ <line x1="15.41" y1="6.51" x2="8.59" y2="10.49" />+ </svg>+ Share+ </button>+ <a+ class="btn btn-ghost"+ id="forge-segment-btn"+ title="Split this model into selectable parts"+ >Split into parts</a+ >+ <a class="btn btn-ghost" id="download" download>Download GLB</a>+ <button class="btn" type="button" id="again">Make another</button>+ </div>+ </div>++ <!-- Optimize topology panel (triangle / quad / low-poly remesh) is+ injected into this result panel by /src/forge-optimize.js. -->++ <!-- Stylize — one-click geometric filters on the current model -->+ <div class="stylize" id="stylize-panel" data-busy="false" hidden>+ <div class="stylize-head">+ <h3>Stylize</h3>+ <p class="stylize-sub">+ One-click geometric filters. Restyle this model as voxels, bricks,+ an open lattice, or low-poly — source color is carried over where+ the style allows.+ </p>+ </div>+ <div+ class="stylize-gallery"+ id="stylize-gallery"+ role="group"+ aria-label="Stylization filters"+ ></div>+ <div class="stylize-controls is-hidden" id="stylize-controls">+ <div class="stylize-slider">+ <label id="stylize-res-label" for="stylize-res">Resolution</label>+ <input type="range" id="stylize-res" min="8" max="96" value="32" />+ <output id="stylize-res-val" for="stylize-res">32</output>+ </div>+ <div class="stylize-actions">+ <button class="btn btn-ghost" type="button" id="stylize-apply">+ Re-apply+ </button>+ <a class="btn btn-ghost" id="stylize-download" download hidden+ >Download stylized GLB</a+ >+ <button+ class="btn btn-ghost"+ type="button"+ id="stylize-revert"+ hidden+ >+ Revert to original+ </button>+ </div>+ </div>+ <div+ class="stylize-status"+ id="stylize-status"+ role="status"+ aria-live="polite"+ ></div>+ </div>+ </div>++ <!-- Error -->+ <div class="panel notice error is-hidden" id="state-error">+ <span class="glyph" aria-hidden="true">⚠</span>+ <h3>Generation failed</h3>+ <p id="error-message">+ Something went wrong. Try a simpler, single-subject prompt.+ </p>+ <div class="actions">+ <button class="btn" type="button" id="retry">Try again</button>+ <button class="btn btn-ghost is-hidden" type="button" id="generate-anyway">Generate anyway</button>+ </div>+ </div>++ <!-- Unconfigured -->+ <div class="panel notice is-hidden" id="state-unconfigured">+ <span class="glyph" aria-hidden="true">◌</span>+ <h3>Generator not configured</h3>+ <p>+ Text-to-3D needs a Replicate API token on this deployment. Once+ <code>REPLICATE_API_TOKEN</code> is set, Forge runs the full flux → TRELLIS+ pipeline with no further changes.+ </p>+ </div>+ </section>+ </div>++ <!-- Your creations — durable, reusable models tied to this browser -->+ <section class="creations is-hidden" id="creations" aria-label="Your forged models">+ <div class="creations-head">+ <h2>Your creations</h2>+ <span class="count" id="creations-count"></span>+ </div>+ <div class="creations-grid" id="creations-grid"></div>+ </section>++ <!-- Fresh from the Forge — newest community models (src/forge-showcase.js).+ Hidden until the public feed returns real rows, so deployments without+ a durable store never show a hollow strip. -->+ <section+ class="creations showcase is-hidden"+ id="showcase"+ aria-label="Fresh from the Forge — recent community models"+ >+ <div class="creations-head">+ <h2>Fresh from the Forge</h2>+ <div class="showcase-head-right">+ <span class="count" id="showcase-count"></span>+ <button+ type="button"+ class="showcase-refresh"+ id="showcase-refresh"+ title="Refresh the community feed"+ aria-label="Refresh the community feed"+ >+ <svg+ width="13"+ height="13"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+ aria-hidden="true"+ >+ <path d="M21 12a9 9 0 1 1-2.64-6.36" />+ <path d="M21 3v6h-6" />+ </svg>+ </button>+ </div>+ </div>+ <p class="showcase-sub">+ What other people just forged. Open one in the viewer, or+ <strong>Remix</strong> its prompt and make it yours.+ </p>+ <div class="creations-grid" id="showcase-grid"></div>+ </section>++ <p class="hint-foot">+ Powered by flux-schnell + Microsoft TRELLIS on Replicate, with multi-view+ conditioning when you supply more than one photo. Best results: one clearly+ described subject, or clean evenly-lit views from distinct angles. The same pipeline+ is available to agents over MCP at <a href="/docs">/api/mcp-3d</a>.+ </p>+ </main>++ <script src="/nav.js" defer></script>+ <script type="module" src="/src/forge.js"></script>+ <script type="module" src="/src/forge-prompt-studio.js"></script>+ <script type="module" src="/src/forge-enhance.js"></script>+ <script type="module" src="/src/forge-stylize.js"></script>+ <script type="module" src="/src/forge-optimize.js"></script>+ <script type="module" src="/src/forge-showcase.js"></script>+ <script type="module" src="/src/forge-dropzone.js"></script>++ <!-- Idle-stage live teaser: newest community forge in the empty state, so+ the first thing a visitor sees is real output. Falls back to a labeled+ first-party sample when the feed is empty or the store is absent. -->+ <script type="module">+ const viewer = document.getElementById('idle-viewer');+ const tag = document.getElementById('idle-tag');+ const kicker = document.getElementById('idle-kicker');+ const promptEl = document.getElementById('idle-prompt');+ const remixBtn = document.getElementById('idle-remix');++ function timeAgo(iso) {+ const t = Date.parse(iso);+ if (!Number.isFinite(t)) return '';+ const s = Math.max(0, (Date.now() - t) / 1000);+ if (s < 60) return 'just now';+ if (s < 3600) return `${Math.floor(s / 60)}m ago`;+ if (s < 86400) return `${Math.floor(s / 3600)}h ago`;+ return `${Math.floor(s / 86400)}d ago`;+ }++ function showSample() {+ viewer.setAttribute('src', '/avatars/fox.glb');+ tag.textContent = 'Sample model';+ kicker.textContent = 'Sample — drag to orbit';+ promptEl.textContent = 'Your forged models replace this the moment one finishes.';+ remixBtn.hidden = true;+ }++ function remix(prompt) {+ document.querySelector('#mode-switch [data-mode="text"]')?.click();+ const box = document.getElementById('prompt');+ if (!box) return;+ box.value = prompt;+ box.dispatchEvent(new Event('input', { bubbles: true }));+ box.focus();+ box.setSelectionRange(box.value.length, box.value.length);+ }++ try {+ const res = await fetch('/api/forge-gallery?scope=community&limit=8');+ const data = await res.json();+ const pick = (Array.isArray(data?.creations) ? data.creations : []).find(+ (c) => c.glb_url,+ );+ if (data?.enabled && pick) {+ viewer.setAttribute('src', pick.glb_url);+ tag.textContent = 'Live · community';+ kicker.textContent = `Fresh from the Forge · ${timeAgo(pick.created_at)}`;+ promptEl.textContent = pick.prompt || 'Untitled';+ promptEl.title = pick.prompt || '';+ if (pick.prompt) {+ remixBtn.hidden = false;+ remixBtn.addEventListener('click', () => remix(pick.prompt));+ }+ } else {+ showSample();+ }+ } catch {+ showSample();+ }+ </script>+ <div id="footer-container"></div>+ <script src="/footer.js"></script>+ </body>+</html>diff --git a/public/404.html b/public/404.htmlindex 89db66db7..ca2d938e9 100644--- a/public/404.html+++ b/public/404.html@@ -99,7 +99,21 @@<a href="/demos/" class="btn btn-ghost" id="lab-btn"><span>Back to lab</span></a>+ <a href="/sitemap" class="btn btn-ghost" id="all-pages-btn">+ <span>Browse all pages</span>+ </a></div>+ <script>+ // Carry the broken path's slug into the sitemap filter so the+ // directory opens pre-narrowed to the closest matches.+ (function () {+ var slug = location.pathname.split('/').filter(Boolean).pop() || '';+ slug = decodeURIComponent(slug).replace(/\.[a-z0-9]+$/i, '').replace(/[-_]+/g, ' ').trim();+ if (slug.length >= 3 && slug !== '404') {+ document.getElementById('all-pages-btn').href = '/sitemap?q=' + encodeURIComponent(slug);+ }+ })();+ </script></div><canvas id="avatar-canvas"></canvas>diff --git a/public/changelog.json b/public/changelog.jsonindex d5d8c6d08..0e348a697 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-06-13T00:21:38.872Z",+ "generated_at": "2026-06-13T00:39:18.440Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -10,7 +10,7 @@"date": "2026-06-13","type": "update","title": "The full page directory is now one click away — and instantly filterable",- "summary": "three.ws has grown past 140 pages, so the sitemap directory got a real upgrade. A new \"All pages\" link in the Discover menu takes you straight to it, and the page itself now has an instant filter — press / and type to narrow every page by name, path, or description, with live per-section counts. Filtered views are shareable links, so you can send someone exactly the slice of the platform you mean.",+ "summary": "three.ws has grown past 200 pages, so the sitemap directory got a real upgrade. A new \"All pages\" link in the Discover menu takes you straight to it, and the page itself now has an instant filter — press / and type to narrow every page by name, path, or description, with live per-section counts. Filtered views are shareable links, so you can send someone exactly the slice of the platform you mean. The directory now finds you when you're lost, too: it's a quick action in the ⌘K search palette, a no-results search hands you off to it with your query carried over, the 404 page offers it pre-filtered to the closest matches for the address you tried, and /pages, /directory, /everything, and /all-pages all take you there.","link": "/sitemap","tags": ["improvement"diff --git a/public/changelog.xml b/public/changelog.xmlindex 22bc9db95..8b1fcaeb3 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -12,7 +12,7 @@<guid isPermaLink="false">2026-06-13:The full page directory is now one click away — and instantly filterable</guid><pubDate>Sat, 13 Jun 2026 12:00:00 GMT</pubDate><category>improvement</category>- <description>three.ws has grown past 140 pages, so the sitemap directory got a real upgrade. A new "All pages" link in the Discover menu takes you straight to it, and the page itself now has an instant filter — press / and type to narrow every page by name, path, or description, with live per-section counts. Filtered views are shareable links, so you can send someone exactly the slice of the platform you mean.</description>+ <description>three.ws has grown past 200 pages, so the sitemap directory got a real upgrade. A new "All pages" link in the Discover menu takes you straight to it, and the page itself now has an instant filter — press / and type to narrow every page by name, path, or description, with live per-section counts. Filtered views are shareable links, so you can send someone exactly the slice of the platform you mean. The directory now finds you when you're lost, too: it's a quick action in the ⌘K search palette, a no-results search hands you off to it with your query carried over, the 404 page offers it pre-filtered to the closest matches for the address you tried, and /pages, /directory, /everything, and /all-pages all take you there.</description></item><item><title>Agent Launches</title>diff --git a/public/features.json b/public/features.jsonindex 3a282340c..6288b975e 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-06-13T00:21:38.856Z",+ "generated_at": "2026-06-13T00:39:18.426Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",diff --git a/public/search.js b/public/search.jsindex 0ea92aa54..3e132fb93 100644--- a/public/search.js+++ b/public/search.js@@ -73,7 +73,7 @@'#tws-search-status .tws-sk-err-retry{','margin-top:4px;padding:6px 14px;border-radius:7px;font-size:12px;','background:#1c1c1c;border:1px solid #2a2a2a;color:#a8a8a8;cursor:pointer;',- 'transition:background .12s,border-color .12s;}',+ 'text-decoration:none;transition:background .12s,border-color .12s;}','#tws-search-status .tws-sk-err-retry:hover{background:#242424;border-color:#3a3a3a;color:#f6f6f6;}',/* spinner */'.tws-sk-spinner{width:18px;height:18px;border:2px solid #2a2a2a;border-top-color:#6a6a6a;',@@ -187,6 +187,7 @@{ title: 'Deploy an agent on-chain', desc: 'Register an agent on-chain', href: '/deploy', icon: '🚀', keys: 'deploy register onchain erc8004 publish ship launch agent' },{ title: 'Launch a coin', desc: 'Launch a token on pump.fun', href: '/launchpad', icon: '🪙', keys: 'launch coin token mint pump fun money $three' },{ title: 'Embed an agent', desc: 'Get an embed snippet for your site', href: '/embed.html', icon: '🔗', keys: 'embed iframe widget snippet share script integrate' },+ { title: 'Browse all pages', desc: 'The full three.ws directory, filterable', href: '/sitemap', icon: '🗺️', keys: 'sitemap site map all pages everything directory index list browse find' },];// Default destinations shown when the palette opens with no query (and no@@ -197,6 +198,7 @@{ title: 'Dashboard', desc: 'Your agents, tokens and activity', href: '/dashboard', icon: '📊' },{ title: 'Playground', desc: 'Walk the $three worlds', href: '/play', icon: '🎮' },{ title: 'Docs', desc: 'Guides, SDK and API reference', href: '/docs', icon: '📖' },+ { title: 'All pages', desc: 'Every page on three.ws, in one directory', href: '/sitemap', icon: '🗺️' },];// ── Recents ─────────────────────────────────────────────────────────────────@@ -566,7 +568,13 @@'<span style="color:#a8a8a8;font-size:13px">No matches for <strong style="color:#f6f6f6">"' + esc(q) + '"</strong></span>','<span style="color:#4a4a4a;font-size:12px">Try a different name, feature, or skill</span>',].join('');- liveRegion.textContent = 'No results for ' + q;+ var browseAll = el('a', {+ class: 'tws-sk-err-retry',+ href: '/sitemap?q=' + encodeURIComponent(q),+ text: 'Browse all pages →',+ });+ status.appendChild(browseAll);+ liveRegion.textContent = 'No results for ' + q + '. A link to browse all pages is available.';}function showError(retry) {diff --git a/scripts/forge-v2-preview-shot.mjs b/scripts/forge-v2-preview-shot.mjsnew file mode 100644index 000000000..93b55ae18--- /dev/null+++ b/scripts/forge-v2-preview-shot.mjs@@ -0,0 +1,27 @@+// One-off: screenshot the /forge-v2 design preview at desktop + mobile and+// dump console errors. Delete alongside pages/forge-v2.html when the preview+// is resolved either way.+import { chromium } from 'playwright';++const BASE = process.env.BASE_URL || 'http://localhost:3517';+const browser = await chromium.launch();+const errors = [];++async function shot(width, height, file) {+ const page = await browser.newPage({ viewport: { width, height } });+ page.on('console', (m) => {+ if (m.type() === 'error') errors.push(`[${width}px] ${m.text()}`);+ });+ page.on('pageerror', (e) => errors.push(`[${width}px] pageerror: ${e.message}`));+ await page.goto(`${BASE}/forge-v2`, { waitUntil: 'load', timeout: 60000 });+ // Let model-viewer fetch the GLB and the engine catalog populate.+ await page.waitForTimeout(9000);+ await page.screenshot({ path: file, fullPage: true });+ await page.close();+}++await shot(1440, 940, 'reports/forge-v2-desktop.png');+await shot(390, 844, 'reports/forge-v2-mobile.png');++await browser.close();+console.log(errors.length ? `CONSOLE ERRORS:\n${errors.join('\n')}` : 'no console errors');diff --git a/vercel.json b/vercel.jsonindex 9bd3ed583..dfff6a80a 100644--- a/vercel.json+++ b/vercel.json@@ -2578,6 +2578,11 @@"src": "/sitemap/(core|agents|avatars|widgets|profiles)\\.xml","dest": "/api/sitemap/[type]?type=$1"},+ {+ "src": "/(pages|directory|everything|all-pages)/?",+ "status": 308,+ "headers": { "Location": "/sitemap" }+ },{"src": "/sitemap","dest": "/sitemap/index.html"diff --git a/vite.config.js b/vite.config.jsindex 1ee3826f7..adf16b9a5 100644--- a/vite.config.js+++ b/vite.config.js@@ -755,6 +755,11 @@ const appConfig = {'/strategy-lab/': resolve(root, 'public/strategy-lab.html'),'/sitemap': resolve(root, 'public/sitemap/index.html'),'/sitemap/': resolve(root, 'public/sitemap/index.html'),+ // Guessable aliases — prod 308s these to /sitemap (vercel.json)+ '/pages': resolve(root, 'public/sitemap/index.html'),+ '/directory': resolve(root, 'public/sitemap/index.html'),+ '/everything': resolve(root, 'public/sitemap/index.html'),+ '/all-pages': resolve(root, 'public/sitemap/index.html'),'/blog': resolve(root, 'blog/index.html'),'/blog/': resolve(root, 'blog/index.html'),'/demos': resolve(root, 'public/demos/index.html'),