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
docs(examples): count the seventeen live snippets and name the filter on the page
nirholas4d72d2979f9d
diff --git a/STRUCTURE.md b/STRUCTURE.mdindex ddc630681..b6a5d1f9f 100644--- a/STRUCTURE.md+++ b/STRUCTURE.md@@ -44,7 +44,7 @@ bottom.| Model detail page (`/m/:id`) | [pages/model.html](pages/model.html) `→ /m/:id`, page module [src/model-page.js](src/model-page.js) + pure helpers [src/model-lib.js](src/model-lib.js) + [src/model.css](src/model.css), backend [api/forge-creation.js](api/forge-creation.js) (`?related=&view=` + voted state; `DELETE`, scoped to the owning `x-forge-client`, lets a creator erase a creation, its stored GLB, preview, and recorded source uploads included) and [api/forge-comments.js](api/forge-comments.js), store reads [api/_lib/forge-store.js](api/_lib/forge-store.js) (`getPublicCreation`/`listRelated`/`recordCreationView`), schema [api/_lib/migrations/20260805120000_model_page.sql](api/_lib/migrations/20260805120000_model_page.sql) | Live | Every finished forge model as a first-class page in the classic model-platform detail layout: interactive viewer hero with AR and fullscreen, title + creator card with a real follow button (follow graph), live triangle/vertex stats from `GET /api/3d/inspect` (nothing persisted, nothing invented), the full prompt as the description, honest attribute chips, anonymous likes shared with the Forge-Off vote rail (`forge_votes`, same `forge:cid` id), a real page-view counter (`forge_creations.view_count`), a signed-in comment thread (`forge_comments`, bell-notifies the creator via the `comment` event type), paid remix via the existing x402 rail, embed/share/download, and a same-category suggested-models rail. Linked from the Details button on `/creations` cards and the Forge showcase. Tests: [tests/model-lib.test.js](tests/model-lib.test.js) || Labs (hidden-gems hub) | [pages/labs.html](pages/labs.html) + [src/labs.js](src/labs.js) `→ /labs` | In-repo | Data-driven discovery hub: renders every `data/pages.json` entry flagged `showcase: true` as a live card (status check + iframe preview), filterable by category || Holo Sticker (procedural foil demo) | [pages/holo.html](pages/holo.html) `→ /holo`, app [src/holo.js](src/holo.js), styles [src/holo.css](src/holo.css) | Live | A real-time holographic foil sticker rendered with physical materials, fully procedural (no assets fetched): tilt it with the pointer, peel the corner (vertex-shader cylinder roll), switch foil styles, die-cut arbitrary typed text via a marching-squares vectorizer, and download the frame as a PNG |-| Examples gallery | [pages/examples.html](pages/examples.html) `→ /examples`, curated snippets [public/examples.js](public/examples.js), generated index renderer [public/examples-index.js](public/examples-index.js), styles [public/examples.css](public/examples.css), hosted example tree [public/examples/](public/examples) built by [scripts/build-hosted-examples.mjs](scripts/build-hosted-examples.mjs) | Live | Two halves. The top is 14 copy-paste snippets that RUN on the page, grouped into four lanes (avatars and embeds, 3D models, agents, agent economy) behind a sticky jump nav: each is a complete document loading the production CDN bundle into an iframe, so "Run" executes exactly the code shown, and the model/agent/economy lanes call the live CORS-open production APIs rather than illustrating them (free text→3D at `/api/v1/ai/text-to-3d`, `/api/3d/inspect`, the 112-clip `/animations/manifest.json`, `/api/forged`, the 402 quote from `/api/x402/forge`, `/api/pump/launches`). The `agent-from-files` card loads a real manifest from `/examples/coach-leo/manifest.json`: `npm run build:examples` publishes [examples/coach-leo/](examples/coach-leo) and its wave skill into `public/examples/` with body/image URIs rewritten absolute, so the manifest resolves the same way off-site as it does here. The bottom is every example that ships in the repo, generated by [scripts/build-examples-index.mjs](scripts/build-examples-index.mjs) scanning every `examples/` directory into [data/examples.json](data/examples.json), mirrored to the served [public/examples.json](public/examples.json) by [scripts/mirror-examples-index.mjs](scripts/mirror-examples-index.mjs) (`npm run build:examples` runs all three). Because it is scanned, the page cannot advertise a deleted example or miss an added one; each card carries the files it contains and the command that runs it. Tests: [tests/examples-page.test.js](tests/examples-page.test.js), [tests/examples-index.test.js](tests/examples-index.test.js) |+| Examples gallery | [pages/examples.html](pages/examples.html) `→ /examples`, curated snippets [public/examples.js](public/examples.js), generated index renderer [public/examples-index.js](public/examples-index.js), styles [public/examples.css](public/examples.css), hosted example tree [public/examples/](public/examples) built by [scripts/build-hosted-examples.mjs](scripts/build-hosted-examples.mjs) | Live | Two halves. The top is 17 copy-paste snippets that RUN on the page, grouped into four lanes (avatars and embeds, 3D models, agents, agent economy) behind a sticky jump nav and a text/tag filter that folds away lanes as they empty (a deep link always beats an active filter): each is a complete document loading the production CDN bundle into an iframe, so "Run" executes exactly the code shown, and the model/agent/economy lanes call the live CORS-open production APIs rather than illustrating them (free text→3D at `/api/v1/ai/text-to-3d`, free text→speech at `/api/v1/ai/tts` played through the new `speakAudio()` viseme path, `/api/3d/inspect`, the 112-clip `/animations/manifest.json`, `/api/forged`, the public no-auth MCP server at `/api/mcp-studio` for both `tools/list` and a live `look_at_model` render-and-critique, the 402 quote from `/api/x402/forge`, `/api/pump/launches`). The `agent-from-files` card loads a real manifest from `/examples/coach-leo/manifest.json`: `npm run build:examples` publishes [examples/coach-leo/](examples/coach-leo) and its wave skill into `public/examples/` with body/image URIs rewritten absolute, so the manifest resolves the same way off-site as it does here. The bottom is every example that ships in the repo, generated by [scripts/build-examples-index.mjs](scripts/build-examples-index.mjs) scanning every `examples/` directory into [data/examples.json](data/examples.json), mirrored to the served [public/examples.json](public/examples.json) by [scripts/mirror-examples-index.mjs](scripts/mirror-examples-index.mjs) (`npm run build:examples` runs all three). Because it is scanned, the page cannot advertise a deleted example or miss an added one; each card carries the files it contains and the command that runs it. Tests: [tests/examples-page.test.js](tests/examples-page.test.js), [tests/examples-index.test.js](tests/examples-index.test.js) || Cookbook (runnable recipes) | Index [pages/cookbook.html](pages/cookbook.html) `-> /cookbook`, recipe viewer [pages/recipe.html](pages/recipe.html) `-> /cookbook/<slug>`, manifest [public/cookbook-manifest.js](public/cookbook-manifest.js), styles [public/cookbook.css](public/cookbook.css), recipe prose [docs/cookbook/](docs/cookbook), runnable files [public/cookbook/recipes/](public/cookbook/recipes), notebook export [public/cookbook/self-correcting-3d/](public/cookbook/self-correcting-3d) | Live | The sibling of the Examples gallery, and deliberately a different thing: an example is a snippet you read on the page, a recipe is a file you download and run. Five recipes, each one executed against the live API before it was published: a standard-library text-to-3D CLI, a parallel asset-pack builder that emits a manifest plus a gallery, an MCP server that hands Claude Code or Cursor a 3D tool, a CI budget gate over [api/3d/inspect.js](api/3d/inspect.js), and the function-calling-plus-vision notebook also submitted to the OpenAI Cookbook. The manifest is the single source of truth for both surfaces; recipe prose is markdown under `docs/cookbook/` fetched by the viewer, so adding a recipe is a manifest entry plus a `.md` plus the file itself. Route order is load-bearing in both [vercel.json](vercel.json) and the dev middleware: the notebook's static export must be matched before the generic `/cookbook/<slug>` rule or the viewer shadows it. Docs: [public/cookbook/recipes/README.md](public/cookbook/recipes/README.md). Tests: [tests/cookbook.test.js](tests/cookbook.test.js) || Walkthroughs (interactive product tours from real frames) | Index [pages/walkthroughs.html](pages/walkthroughs.html) + [src/walkthroughs-index.js](src/walkthroughs-index.js) `→ /walkthroughs`, player [pages/walkthrough.html](pages/walkthrough.html) + [src/walkthrough.js](src/walkthrough.js) `→ /walkthroughs/<slug>` (routed in [vercel.json](vercel.json), mirrored by the Vite dev middleware in [vite.config.js](vite.config.js)), pure step geometry [src/walkthrough-geometry.js](src/walkthrough-geometry.js), generated manifest + screenshot sets [public/walkthroughs/](public/walkthroughs) captured by [scripts/capture-walkthroughs.mjs](scripts/capture-walkthroughs.mjs) | Live | Step-by-step guided tours (forge a 3D model, build an agent, embed an avatar, find an agent worth using) built from real frames captured on the live product: each step zooms and pans to the element it describes, cuts a spotlight around it, and anchors a callout, so it reads like a screen recording but is a handful of deep-linkable, keyboard-operable JPEGs that degrade to annotated stills under reduced motion. Index and player read the same generated manifest, so a walkthrough that did not capture cleanly cannot be advertised. Registered in [data/pages.json](data/pages.json). || Cross-entity search | [pages/search.html](pages/search.html) `→ /search`, backend [api/search.js](api/search.js) + query layer [api/_lib/cross-search.js](api/_lib/cross-search.js) | Live | The one search across every creation type — avatars, on-chain/Solana agents, forged 3D models, worlds, and coins. Federates (not one SQL UNION — the stores are genuinely heterogeneous, two of five aren't even in the same database) five parallel queries, normalizes into one card shape, and ranks by recency plus real signals (follower count via `user_follows`, remix count, view count) — see the file header in `api/search.js` for the full unify-vs-federate writeup. Model results carry a working "Remix — $0.25" action against the existing paid rail ([api/x402/remix-asset.js](api/x402/remix-asset.js)), reused from [pages/creations.html](pages/creations.html) rather than re-derived. Coin search checks three.ws's own launch directory (`pump_agent_mints`) first, then falls back to market-wide pump.fun/Birdeye search for broader coverage (those external matches carry no verified timestamp or creator profile, and are ranked/labelled accordingly). Linked from the Discover nav menu. |diff --git a/pages/examples.html b/pages/examples.htmlindex f18ba385a..4bade1732 100644--- a/pages/examples.html+++ b/pages/examples.html@@ -72,7 +72,10 @@</script><meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1" /><meta property="og:locale" content="en_US" />- <meta property="og:image:alt" content="Runnable three.ws examples for avatars, 3D models, agents, and the agent economy" />+ <meta+ property="og:image:alt"+ content="Runnable three.ws examples for avatars, 3D models, agents, and the agent economy"+ /></head><body><header><div id="nav-container"></div></header>@@ -86,15 +89,16 @@</p><h1 class="exg-title">Everything an agent <em>can do</em></h1><p class="exg-sub">- <span id="exg-count">14</span> runnable examples across+ <span id="exg-count">17</span> runnable examples across<span id="exg-lane-count">4</span> lanes: embedding a 3D body, generating andmeasuring the models themselves, defining an agent as files, and reading themachine-payable economy those agents trade in. Each one is a complete HTMLdocument that loads the production<a href="https://three.ws/agent-3d/latest/agent-3d.js">CDN bundle</a> and callsthe production APIs. Press <strong>Run</strong> and the exact code shown- executes in a frame on this page against live data; press <strong>Copy</strong>- and paste it into any HTML page on any domain. Deeper walkthroughs live in the+ executes in a frame on this page against live data; press+ <strong>Copy</strong> and paste it into any HTML page on any domain. Filter by+ name or tag to find one. Deeper walkthroughs live in the<a href="/tutorials">tutorials</a>, recipes for the 3D API in the<a href="/cookbook">cookbook</a>, and interactive lab pages in<a href="/demos">demos</a>.@@ -114,9 +118,27 @@was added. Each card shows the files it contains and the command that runs it.</p>- <div class="exi-toolbar" role="toolbar" aria-label="Search and filter repository examples">+ <div+ class="exi-toolbar"+ role="toolbar"+ aria-label="Search and filter repository examples"+ ><div class="exi-search-wrap">- <svg class="exi-search-icon" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8" /><line x1="21" y1="21" x2="16.65" y2="16.65" /></svg>+ <svg+ class="exi-search-icon"+ width="14"+ height="14"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+ aria-hidden="true"+ >+ <circle cx="11" cy="11" r="8" />+ <line x1="21" y1="21" x2="16.65" y2="16.65" />+ </svg><inputtype="search"class="exi-search"@@ -129,7 +151,12 @@<span class="exi-count" data-role="ex-count" aria-live="polite"></span></div>- <div class="exi-chips" data-role="ex-chips" role="tablist" aria-label="Filter examples by kind"></div>+ <div+ class="exi-chips"+ data-role="ex-chips"+ role="tablist"+ aria-label="Filter examples by kind"+ ></div><p class="exi-sr" data-role="ex-live" aria-live="polite"></p><div class="exi-grid" data-role="ex-loading" aria-label="Loading examples">@@ -146,13 +173,17 @@<div class="exi-state" data-role="ex-empty-search" hidden><h3>No matches</h3><p>No examples match your search or the selected kind.</p>- <button type="button" class="exi-btn exi-btn--ghost" data-role="ex-clear">Clear filters</button>+ <button type="button" class="exi-btn exi-btn--ghost" data-role="ex-clear">+ Clear filters+ </button></div><div class="exi-state" data-role="ex-error" hidden><h3>Couldn't load the example index</h3><p data-role="ex-error-msg">Something went wrong loading the example index.</p>- <button type="button" class="exi-btn exi-btn--ghost" data-role="ex-retry">Try again</button>+ <button type="button" class="exi-btn exi-btn--ghost" data-role="ex-retry">+ Try again+ </button></div><h3 class="exi-subhead">Start with these</h3>@@ -165,8 +196,8 @@><strong>coach-leo</strong><span- >The smallest complete agent defined as files: manifest, system prompt, one- skill. The template to copy.</span+ >The smallest complete agent defined as files: manifest, system prompt,+ one skill. The template to copy.</span></a><a@@ -201,8 +232,8 @@><strong>agent-native-3d</strong><span- >A Node script that generates a mesh, rigs it, saves it as an agent persona,- and speaks through it via MCP.</span+ >A Node script that generates a mesh, rigs it, saves it as an agent+ persona, and speaks through it via MCP.</span></a><a@@ -213,15 +244,15 @@><strong>monicas-apartment</strong><span- >A walkable first-person Three.js scene in one self-contained HTML file. No- server at all.</span+ >A walkable first-person Three.js scene in one self-contained HTML file.+ No server at all.</span></a><a class="exg-more-card" href="/docs/examples"><strong>Examples doc</strong><span- >The written companion: every example annotated with what it demonstrates- and where the pieces live.</span+ >The written companion: every example annotated with what it+ demonstrates and where the pieces live.</span></a></div>diff --git a/public/features.json b/public/features.jsonindex d79974a2e..562424b00 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-09-01T18:36:39.145Z",+ "generated_at": "2026-09-02T05:22:10.339Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",