Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

feat: docs world, sign-language package, paid MCP example, and docs/nav updates

nirholasce4df593f29e
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 862d871f1..92fb6c8b2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
## 2026-07-30
+- **Docs World (immersive 3D docs)** (`/docs/world`) — The full three.ws documentation as a walkable 3D world: every docs section is a glowing pavilion, and the live pages render inside the scene.
- **Tutorial · Character Library to a Live Embed** (`/tutorials/character-library-to-embed`) — Pick a rigged character from the free library of 107, prove its skeleton drives the animation clip library, and embed it on your own site with one script tag and a gesture button. No modeling, no cost, ten minutes.
- **Tutorial · Give an Agent a Spending Envelope** (`/tutorials/agent-spending-envelope`) — Fund a budget from prepaid credits, hand an agent a capped bearer token, and let it buy real x402 services with no private key: total budget, per-call ceiling, host allowlist, expiry, audit ledger, and a refund on cancel.
- **Tutorial · Render Avatars as Images** (`/tutorials/render-avatar-images`) — Put a live 3D avatar in an image tag: four camera framings, 28 poses, ARKit facial morphs, social cards, turntables, and a CORS-open GLB proxy. No 3D engine anywhere in your stack.
@@ -15,6 +16,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **An underfunded trading bot now sits out instead of failing every trade** — A trading strategy whose wallet ran low could get stuck in a loop: it looked funded enough to place a shrunken buy, but not funded enough to run the safety simulation that has to pass before anything is broadcast. So it tried every candidate coin, failed at the same step every time, and filled its history with failures while never actually trading. One live strategy did this 82 times in a day without placing a single buy. Strategies now compare their balance against the amount a trade genuinely needs end to end, including the pre-trade safety checks, and quietly wait for a top-up instead. No trade behavior changes for a properly funded strategy. (`/trades`) `[fix]`
- **Avatar optimize endpoint works again for saved avatars** — Asking the optimize endpoint to shrink one of your saved avatars failed every time with a transcode error. Saved avatars are stored geometry-compressed, and the endpoint was reading them without the matching decoder loaded, so it rejected the file before doing any work. Requesting Draco output was broken separately: that code called a compression function that no longer exists in the library, so it threw for every request that asked for it. Both are fixed and the endpoint now returns a valid model for saved avatars and for any model URL you pass it. `[fix]`
- **Docs for agent vaults, your master wallet, and copy trading** — Three money surfaces now have real references. Agent vaults explains NAV-priced deposits and redemptions, the drawdown breaker, performance fees, and the public audit ledger. The master wallet doc covers funding it, sending SOL or USDC, and topping up an agent. Copy trading explains both ways to follow a leader, the leaderboard weighting, and the Smart Money directory. All three spell out exactly which requests move real money. (`/docs/vaults`) `[docs]`
+- **Docs World: read the documentation inside a walkable 3D world** — The docs now come in two forms with one content source. The classic reader at three.ws/docs stays exactly as it was, and a new immersive surface at three.ws/docs/world turns the same documentation into a place: all fourteen sections of the sidebar become glowing pavilions on a ring, you walk an avatar between them (keyboard, or a joystick on phones), and picking a page opens the live doc right inside the scene. Deep links carry over both ways, any rigged GLB can be your body via the avatar parameter, and devices without 3D support are routed to the classic docs with nothing missing. (`/docs/world`) `[feature, docs]`
- **Email and EVM wallet sign-in work again when the human check is on** — Sign-in has a human-verification step (a Cloudflare check) that guards the email code and wallet flows. The page was loading the checker from a retired URL, so email sign-in stopped at "could not load the CAPTCHA verifier", and the Ethereum wallet flow never passed the check at all, failing with an unexplained authorization error the moment you picked your wallet. The checker now loads from the right place, and the wallet flow runs the same human check before asking your wallet to sign, so both paths complete. Solana wallet sign-in was unaffected. (`/login`) `[fix]`
- **ENS name lookup and the ERC-8004 registry demo answer again** — Three published endpoints were unreachable in production. A broad routing rule for agent profiles sat above them in the route table and captured their requests, so instead of running they returned the agent-profile handler's "agent not found". Looking up which agents belong to an ENS name never worked at all, and the ERC-8004 registry demo could neither search the registry nor open a single agent, because both of its data calls were being captured. The three routes now resolve to their own handlers, and a test pins them above the catch-all so the same shadowing cannot come back. `[fix]`
- **Every avatar in the docs and SDK examples is now a real, loadable model** — Copying a snippet out of the docs used to hand you a broken avatar. Roughly seventy files across the guides, tutorials, README, SDK readmes, worker readmes and MCP tool examples pointed at models that do not exist, like a sample-avatar.glb that never shipped, or at placeholder hosts that can never resolve. Every one of those now names a real avatar served from three.ws, picked to fit what the example is showing: a full character for an embed, the small Cesium Man for inspect and rig calls, the reference rig for skeleton work, a fox for the mascot walkthrough. Example links that need an avatar id now carry a real public one, so the AR page, the IRL placement link and the render and optimize calls all work exactly as printed. (`/docs/quick-start`) `[docs, improvement]`
diff --git a/STRUCTURE.md b/STRUCTURE.md
index 448b957df..445c9b267 100644
--- a/STRUCTURE.md
+++ b/STRUCTURE.md
@@ -18,6 +18,7 @@ bottom.
| Agent shell (companion identity + agentic ⌘K + persistent navigation) | [src/agents/guest-agent.js](src/agents/guest-agent.js), [src/shared/agent-names.js](src/shared/agent-names.js), [src/walk-companion-identity.js](src/walk-companion-identity.js), [public/search.js](public/search.js), [src/view-transitions.js](src/view-transitions.js), [src/shell/page-lifecycle.js](src/shell/page-lifecycle.js) | Live | The agent IS the interface: every visitor gets a named ephemeral agent in the first five seconds (auto-summoned corner companion with an identity chip; “Claim →” prefills /create-agent and POST /api/agents makes it real); the ⌘K palette executes real commands in place (forge → free text→3D lane, digest → clustered news, price → live market data, ask → streamed /api/chat) and announces completions so the companion reacts; pages marked data-shell (`/markets`, `/coins`) navigate by swapping only the main element so the agent and shell never unload (page modules re-init via onPageReady). Docs: [docs/agent-shell.md](docs/agent-shell.md). Tests: [tests/search-commands.test.js](tests/search-commands.test.js), [tests/guest-agent.test.js](tests/guest-agent.test.js), [tests/agent-names.test.js](tests/agent-names.test.js) |
| Walk companion + playground | [walk-sdk/](walk-sdk) `→ /walk-companion.js` | Published as `@three-ws/walk` | Corner mascot + full-page stroll/platformer playground + diverse avatar picker. App entries: [src/walk-companion.js](src/walk-companion.js), [src/walk-playground.js](src/walk-playground.js) |
| The walkaround world (`/walk`) | [pages/temporary.html](pages/temporary.html) `→ /temporary`, app [src/walk.js](src/walk.js), environments [src/walk-environments.js](src/walk-environments.js) + [public/environments/](public/environments), multiplayer [src/walk-net.js](src/walk-net.js) → `walk_world`, day/night [src/walk-day-night.js](src/walk-day-night.js), radar [src/game/hud/minimap.js](src/game/hud/minimap.js), companions [src/walk-npcs.js](src/walk-npcs.js), agent desks [src/walk-agent-desk.js](src/walk-agent-desk.js) | Live | Walk your avatar through six real staged environments (park, cyberpunk street, beach, gallery, void, office) with physics-driven locomotion on a heightfield, four camera modes, gestures, voice chat, trails, capture, and live peers. **Time of day is real and shared:** the same deterministic world clock `/play` runs on ([src/shared/world-clock.js](src/shared/world-clock.js)) drives the sun arc, sky gradient, light levels, and IBL strength, so two people in the same world always agree on whether it is night. The sky crossfades on a wider curve than the light levels, so dawn and dusk linger instead of flipping. Armed for outdoor stages only (indoor/void keep their authored manifest lighting) and paused while AR passthrough owns the rig. **The radar is `/play`'s:** `/walk` mounts the same rotating GTA-style minimap the world HUD uses, with a compass, the walkable-disc boundary ring, and live blips for peers (their nameplate colours), NPC companions, live agent desks, the guide's named landmarks, and scenery. Click or tap it to set a walk-to waypoint (`Minimap.worldFromScreen()` inverts the rotating projection); `M` or the dock button toggles it and the choice persists. **Frame pacing is shared too:** the loop runs through [src/shared/frame-governor.js](src/shared/frame-governor.js) (60fps focused, 30 unfocused, 30 under power saver) and the controls overlay carries the cross-surface Power-saver switch. Tests: [tests/walk-day-night.test.js](tests/walk-day-night.test.js), [tests/minimap-projection.test.js](tests/minimap-projection.test.js) |
+| Docs World (immersive 3D docs) | [pages/docs-world.html](pages/docs-world.html) `→ /docs/world`, app [src/docs-world/](src/docs-world) (world/player/controls/overlays), styles [public/docs-world.css](public/docs-world.css), shared manifest [docs/nav.json](docs/nav.json) | Live | The documentation as a walkable place: each section of the docs sidebar is a glowing pavilion on a ring; walk up (WASD / touch joystick, four shared camera modes via [src/game/camera-modes.js](src/game/camera-modes.js)) or tap one to list its pages, and read the live markdown in an in-world DOM reader ([src/shared/markdown.js](src/shared/markdown.js)). One content source: both surfaces read `docs/nav.json` + `/docs/<slug>.md`, so classic and immersive docs cannot drift. Deep links mirror the classic hash routes (`/docs/world#forge`); the classic header's "3D world" button carries the open page across. Avatar is the universal mannequin or any rigged GLB via `?avatar=`, animated by the canonical clip library. No-WebGL devices get a designed fallback routing to `/docs`. Docs: [docs/docs-world.md](docs/docs-world.md). Tests: [tests/docs-world.test.js](tests/docs-world.test.js) |
| React avatar creator | [avatar-sdk/](avatar-sdk) `→ /react` `/creator` | Published as `@three-ws/avatar` | Same package, React subpath |
| Talking page guide | [page-agent-sdk/](page-agent-sdk) | Published as `@three-ws/page-agent` | Drop-in rigged 3D agent that narrates any page + visitor avatar picker. `<page-agent>` web component. Rigged-only catalog. `preset="…"` resolves one of 5 personas (greeting/role/suggested-prompt chips/tool allowlist) — see [page-agent-sdk/README.md#persona-presets](page-agent-sdk/README.md#persona-presets). See [page-agent-sdk/PUBLISHING.md](page-agent-sdk/PUBLISHING.md) |
| Guided site tour | [tour-sdk/](tour-sdk) | Published as `@three-ws/tour` | 3D guide walks a live site, spotlights sections, narrates each. One-tag CDN build + free roam |
diff --git a/api/_lib/circulation.js b/api/_lib/circulation.js
index 0c89bdff2..98159f04c 100644
--- a/api/_lib/circulation.js
+++ b/api/_lib/circulation.js
@@ -152,7 +152,43 @@ const SKILL_PRICE_MIN_THREE = 80; // whole $THREE
const SKILL_PRICE_MAX_THREE = 1200;
const ASSET_PRICE_MIN_THREE = 600;
const ASSET_PRICE_MAX_THREE = 4000;
-const THREE_TOPUP_SOL = 0.012; // SOL spent to buy $THREE when a buyer is short
+const THREE_TOPUP_SOL = 0.012; // smallest $THREE top-up buy, and the quote probe size
+// Ceiling on ONE top-up buy. The per-tick share of the treasury caps it further
+// (see perActionSolCap), so this is the hard stop, not the usual spend.
+const THREE_TOPUP_MAX_SOL = Number(process.env.CIRCULATION_THREE_TOPUP_MAX_SOL) || 0.06;
+
+const roundSol = (n) => Math.round(Number(n) * 1e6) / 1e6;
+
+/**
+ * Size a $THREE top-up buy against what the buyer actually needs.
+ *
+ * Pure, so the refusal rule is unit-testable without a chain: a shortfall that
+ * costs more than `maxSol` returns `sufficient:false` and the caller skips
+ * WITHOUT trading, rather than buying a fixed slice that cannot clear the price
+ * and paying a fee for the privilege on every tick.
+ *
+ * @param {{needAtomic:bigint|string, haveAtomic:bigint|string, atomicPerSol:number,
+ * maxSol:number, minSol?:number}} p
+ * @returns {{sol:number, sufficient:boolean, shortfallAtomic:string,
+ * reason?:string, wantedSol?:number}}
+ */
+export function planThreeTopUp({ needAtomic, haveAtomic, atomicPerSol, maxSol, minSol = 0 }) {
+ const shortfall = BigInt(needAtomic) - BigInt(haveAtomic);
+ if (shortfall <= 0n) return { sol: 0, sufficient: true, shortfallAtomic: '0' };
+
+ const rate = Number(atomicPerSol);
+ if (!Number.isFinite(rate) || rate <= 0) {
+ return { sol: 0, sufficient: false, shortfallAtomic: shortfall.toString(), reason: 'no_rate' };
+ }
+
+ // 8% over the quoted rate: the fill moves the curve and pays fees, so buying
+ // exactly the quoted shortfall reliably lands a hair under the price.
+ const wanted = roundSol(Math.max(minSol, (Number(shortfall) / rate) * 1.08));
+ if (wanted > maxSol) {
+ return { sol: 0, sufficient: false, shortfallAtomic: shortfall.toString(), reason: 'above_cap', wantedSol: wanted };
+ }
+ return { sol: wanted, sufficient: true, shortfallAtomic: shortfall.toString() };
+}
const SKILLS_PER_SELLER = 3; // how many skills a seller lists before it's "stocked"
function threeAtomic(whole) {
@@ -637,10 +673,57 @@ async function ensureThree(ctx, agent, needAtomic) {
let have = await threeBalanceAtomic(conn, agent.address);
if (have >= needAtomic) return have;
- await ensureFunded(conn, treasuryKp, agent, AGENT_FLOOR);
-
const { PublicKey } = await import('@solana/web3.js');
const { executeAgentTrade } = await import('../agents/agent-trade.js');
+ const { quoteTrade } = await import('../agents/solana-trade.js');
+ const mintPk = new PublicKey(THREE_MINT());
+
+ // Price the buy BEFORE funding or spending anything. This used to buy a fixed
+ // THREE_TOPUP_SOL of $THREE no matter what the listing cost: at roughly 100
+ // $THREE per 0.012 SOL, every listing above ~100 $THREE fell short, skipped,
+ // and paid a real trade fee to do it, then repeated on the next tick and the
+ // next. Skills list at 80-1200 $THREE and assets at 600-4000, so most of the
+ // marketplace was structurally unbuyable and marketplace GMV read zero while
+ // the fees still went out.
+ const capSol = Math.min(THREE_TOPUP_MAX_SOL, Number(ctx.perActionSolCap) || THREE_TOPUP_SOL);
+ let atomicPerSol = 0;
+ try {
+ const q = await quoteTrade({
+ conn,
+ side: 'buy',
+ mintPk,
+ mintStr: THREE_MINT(),
+ network,
+ solAmount: THREE_TOPUP_SOL,
+ slippageBps: 700,
+ });
+ atomicPerSol = Number(q.outAtomics) / THREE_TOPUP_SOL;
+ } catch (e) {
+ throw new Skip(`could not quote $THREE: ${e?.message || 'quote_failed'}`);
+ }
+
+ const planned = planThreeTopUp({
+ needAtomic,
+ haveAtomic: have,
+ atomicPerSol,
+ maxSol: capSol,
+ minSol: THREE_TOPUP_SOL,
+ });
+ // Refusing here is the point: a listing this tick cannot fund is skipped
+ // without spending, instead of buying a partial position and failing anyway.
+ if (!planned.sufficient) {
+ throw new Skip(
+ planned.reason === 'above_cap'
+ ? `listing needs ~${planned.wantedSol} SOL of $THREE, over this tick's ${roundSol(capSol)} SOL cap`
+ : 'could not price $THREE for the top-up buy',
+ );
+ }
+
+ // Fund the BUY, not just the idle floor: a 0.02 SOL floor cannot settle a
+ // 0.04 SOL purchase, and the trade would abort on headroom after the transfer.
+ const needLamports = Math.floor(planned.sol * SOL) + FEE_BUFFER;
+ await ensureFunded(conn, treasuryKp, agent, Math.max(AGENT_FLOOR, needLamports));
+
const full = await loadAgentMeta(agent.id);
if (!full) throw new Skip('agent vanished');
@@ -651,8 +734,8 @@ async function ensureThree(ctx, agent, needAtomic) {
input: {
side: 'buy',
mint: THREE_MINT(),
- mintPk: new PublicKey(THREE_MINT()),
- amount: THREE_TOPUP_SOL,
+ mintPk,
+ amount: planned.sol,
isMax: false,
slippageBps: 700,
slippagePct: 7,
@@ -1587,7 +1670,15 @@ export async function runCirculationTick() {
});
}
- const ctx = { conn, treasuryKp, pool, network: cfg.network, origin: cfg.origin, solUsd, cfg };
+ // What ONE paid action may draw this tick. The governor plans `paidBudget`
+ // actions against `spendableSol`, so an action that can size its own spend
+ // (the $THREE top-up) has to stay inside its share or it silently overspends
+ // the estimate the budget was built from and starves the actions behind it.
+ const perActionSolCap = budget && budget.paidBudget > 0
+ ? Math.max(THREE_TOPUP_SOL, roundSol(budget.spendableSol / budget.paidBudget))
+ : THREE_TOPUP_SOL;
+
+ const ctx = { conn, treasuryKp, pool, network: cfg.network, origin: cfg.origin, solUsd, cfg, perActionSolCap };
const plan = await planActions(cfg, pool.length, budget);
const results = [];
diff --git a/api/agents/autopilot.js b/api/agents/autopilot.js
index 9d2fde3eb..28fff2546 100644
--- a/api/agents/autopilot.js
+++ b/api/agents/autopilot.js
@@ -5,7 +5,8 @@
* GET /api/agents/:id/autopilot → policy + compiled rules + runway view
* POST /api/agents/:id/autopilot/compile → plain-English policy → structured rules (preview only)
* PUT /api/agents/:id/autopilot → save / arm / disarm / kill / edit rules
- * POST /api/agents/:id/autopilot/run → run one real autopilot cycle now
+ * POST /api/agents/:id/autopilot/run → run one cycle now { dry_run }
+ * (simulates unless dry_run is false)
*
* Every write is owner-only (server-side) and CSRF-protected. Executing paths act
* ONLY on the agent's own wallet and are clamped to the agent's spend policy at
@@ -184,7 +185,12 @@ async function handleRun(req, res, id) {
} catch {
body = {};
}
- const dryRun = body?.dry_run === true;
+ // A missing dry_run simulates. This endpoint moves real funds, so the default
+ // has to be the harmless one: a caller that forgot the flag, replayed a bare
+ // POST, or hand-rolled the request gets a preview, never a spend. Matches the
+ // sibling wallet-intents runner, which has always defaulted to simulation.
+ // Spending is opt-in and explicit: dry_run must be literally false.
+ const dryRun = body?.dry_run !== false;
try {
const result = await runAutopilotCycle({
diff --git a/api/play/economy.js b/api/play/economy.js
new file mode 100644
index 000000000..8cf2b4713
--- /dev/null
+++ b/api/play/economy.js
@@ -0,0 +1,160 @@
+// GET /api/play/economy
+//
+// The public, read-only reference for the /play in-game economy: what the general
+// store pays and charges, what the $THREE boutique sells, what the wheel can award,
+// and the progression constants the whole loop is tuned against.
+//
+// Every number here is imported from the SAME modules the authoritative multiplayer
+// server prices its trades with (multiplayer/src/{shop,items,cosmetics-catalog,
+// spin-wheel,economy}.js). Nothing is transcribed into this file, so a price shown
+// on /play/economy is the price WalkRoom will actually charge — the reference cannot
+// drift from the game because there is only one copy of the numbers.
+//
+// Static config only: no database, no wallet, no per-player state, no secrets. That
+// is why it can be cached hard at the edge and served to anyone without a session.
+
+import { cors, json, method, wrap, rateLimited } from '../_lib/http.js';
+import { limits, clientIp } from '../_lib/rate-limit.js';
+import { SELL_PRICES, BUY_CATALOG, boutiqueListings } from '../../multiplayer/src/shop.js';
+import { itemLabel } from '../../multiplayer/src/items.js';
+import { SLOT_LABELS } from '../../multiplayer/src/cosmetics-catalog.js';
+import {
+ WHEEL_SEGMENTS,
+ FREE_SPIN_COOLDOWN_MS,
+ SPIN_COST_USD,
+ MIN_AVG_LEVEL,
+} from '../../multiplayer/src/spin-wheel.js';
+import { SKILLS, LEVEL_CAP, INV_SIZE, HOTBAR_SIZE, MAX_STACK } from '../../multiplayer/src/economy.js';
+import { TOKEN_SYMBOL } from '../../multiplayer/src/game-token.js';
+
+// The boutique and paid spins split their $THREE 50/50 between the holder-rewards
+// sink and the treasury. Mirrors the `rewardsBps = 5000` default that
+// splitTreasuryRewards() applies in game-token.js; surfaced here so the reference
+// page can state the split without re-deriving it.
+const REWARDS_BPS = 5000;
+
+// Collapse the 20 equal-odds wedges into one row per distinct prize, so the page can
+// show real cumulative odds ("4 wedges of 5% = 20%") instead of twenty near-identical
+// lines. Odds are summed from each wedge's own oddsPct, never assumed to be uniform,
+// so re-weighting the wheel upstream stays correct here automatically.
+function summarizePaytable(segments) {
+ const rows = new Map();
+ for (const seg of segments) {
+ const key = `${seg.kind}:${seg.item || ''}:${seg.qty || 0}:${seg.gold || 0}`;
+ const row = rows.get(key);
+ if (row) {
+ row.wedges += 1;
+ row.oddsPct += seg.oddsPct;
+ continue;
+ }
+ rows.set(key, {
+ kind: seg.kind,
+ label: seg.label,
+ item: seg.item || null,
+ qty: seg.qty || 0,
+ gold: seg.gold || 0,
+ wedges: 1,
+ oddsPct: seg.oddsPct,
+ });
+ }
+ // Cash prizes read as the headline outcomes, so surface them first, richest first.
+ // Item prizes then sort by quantity so the table climbs rather than jumping around.
+ return [...rows.values()].sort((a, b) => {
+ if (a.kind !== b.kind) return a.kind === 'gold' ? -1 : 1;
+ if (a.kind === 'gold') return b.gold - a.gold;
+ if (a.item !== b.item) return a.item.localeCompare(b.item);
+ return a.qty - b.qty;
+ });
+}
+
+export default wrap(async (req, res) => {
+ if (cors(req, res, { methods: 'GET,OPTIONS', origins: '*' })) return;
+ if (!method(req, res, ['GET'])) return;
+
+ const rl = await limits.publicIp(clientIp(req));
+ if (!rl.success) return rateLimited(res, rl);
+
+ const paytable = summarizePaytable(WHEEL_SEGMENTS);
+
+ const body = {
+ // Two currencies, kept deliberately separate. The wire format names them
+ // explicitly so a client never has to infer which one a price is in.
+ currencies: {
+ cash: {
+ id: 'cash',
+ label: 'Cash',
+ onchain: false,
+ summary:
+ 'The carried purse. A pure game resource earned by gathering, fishing and combat, spent at the general store. Never on-chain, never a token.',
+ },
+ token: {
+ id: 'token',
+ label: TOKEN_SYMBOL,
+ onchain: true,
+ chain: 'solana',
+ summary:
+ 'The platform coin, spent on-chain from the player’s connected wallet to unlock premium cosmetics and paid spins.',
+ },
+ },
+
+ generalStore: {
+ // Only gathered and looted goods are sellable: tools, weapons, mounts and the
+ // starter kit are excluded upstream so no player can dump their kit or farm a
+ // buy-then-sell arbitrage. That exclusion is the reason `sell` is short.
+ sell: Object.entries(SELL_PRICES).map(([item, price]) => ({
+ item,
+ label: itemLabel(item),
+ price,
+ })),
+ buy: BUY_CATALOG.map((e) => ({
+ item: e.item,
+ label: itemLabel(e.item),
+ qty: e.qty,
+ price: e.price,
+ unitPrice: Math.round((e.price / e.qty) * 100) / 100,
+ })),
+ },
+
+ bank: {
+ summary:
+ 'Deposit cash with the teller to protect it. Dying drops the carried purse and carried items into a tombstone; banked cash survives, which is the whole risk-versus-reward point of walking to the bank.',
+ protectsOnDeath: true,
+ },
+
+ boutique: {
+ currency: TOKEN_SYMBOL,
+ settlement: 'solana',
+ rewardsBps: REWARDS_BPS,
+ treasuryBps: 10000 - REWARDS_BPS,
+ listings: boutiqueListings().map((c) => ({
+ ...c,
+ slotLabel: SLOT_LABELS[c.slot] || c.slot,
+ })),
+ },
+
+ wheel: {
+ freeSpinCooldownMs: FREE_SPIN_COOLDOWN_MS,
+ freeSpinCooldownHours: Math.round(FREE_SPIN_COOLDOWN_MS / 3_600_000),
+ paidSpinUsd: SPIN_COST_USD,
+ minAvgLevel: MIN_AVG_LEVEL,
+ wedges: WHEEL_SEGMENTS.length,
+ rewardsBps: REWARDS_BPS,
+ treasuryBps: 10000 - REWARDS_BPS,
+ paytable,
+ },
+
+ progression: {
+ skills: SKILLS,
+ levelCap: LEVEL_CAP,
+ inventorySlots: INV_SIZE,
+ hotbarSlots: HOTBAR_SIZE,
+ maxStack: MAX_STACK,
+ },
+ };
+
+ // Pure config: no per-player state and no secrets, so it caches hard at the edge.
+ // It only ever changes when the game's own tables change, which ships as a deploy.
+ return json(res, 200, body, {
+ 'cache-control': 'public, max-age=300, s-maxage=3600, stale-while-revalidate=86400',
+ });
+});
diff --git a/data/changelog.json b/data/changelog.json
index 99aa4bbe7..51d0c1541 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -1,6 +1,16 @@
{
"$comment": "Curated changelog entries for three.ws, the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.",
"entries": [
+ {
+ "date": "2026-07-30",
+ "title": "Docs World: read the documentation inside a walkable 3D world",
+ "summary": "The docs now come in two forms with one content source. The classic reader at three.ws/docs stays exactly as it was, and a new immersive surface at three.ws/docs/world turns the same documentation into a place: all fourteen sections of the sidebar become glowing pavilions on a ring, you walk an avatar between them (keyboard, or a joystick on phones), and picking a page opens the live doc right inside the scene. Deep links carry over both ways, any rigged GLB can be your body via the avatar parameter, and devices without 3D support are routed to the classic docs with nothing missing.",
+ "tags": [
+ "feature",
+ "docs"
+ ],
+ "link": "/docs/world"
+ },
{
"date": "2026-07-30",
"title": "Forge Max: the highest-quality 3D lane now has its own address, and it is a $THREE holder perk",
diff --git a/data/examples.json b/data/examples.json
new file mode 100644
index 000000000..3c213f61f
--- /dev/null
+++ b/data/examples.json
@@ -0,0 +1,550 @@
+{
+ "$comment": "Generated by scripts/build-examples-index.mjs from what is on disk. Do not edit by hand; run npm run build:examples.",
+ "generated_by": "scripts/build-examples-index.mjs",
+ "counts": {
+ "total": 36,
+ "html_demos": 10,
+ "projects": 9,
+ "packages": 17
+ },
+ "examples": [
+ {
+ "id": "project:agenc-task-roundtrip",
+ "kind": "project",
+ "group": "Example projects",
+ "title": "AgenC task roundtrip — three.ws + Solana devnet",
+ "description": "End-to-end demonstration of a three.ws agent participating in the AgenC coordination protocol on Solana devnet. A creator wallet posts a task; a worker wallet (the \"three.ws agent\") claims and completes it.",
+ "path": "examples/agenc-task-roundtrip",
+ "files": [
+ "run.mjs"
+ ],
+ "run": "node examples/agenc-task-roundtrip/run.mjs",
+ "runKind": "command",
+ "readme": "examples/agenc-task-roundtrip/README.md"
+ },
+ {
+ "id": "project:agent-native-3d",
+ "kind": "project",
+ "group": "Example projects",
+ "title": "Agent-native 3D — create, embody, and distribute, end to end",
+ "description": "An agent given a goal (\"get yourself a body\") generates the 3D assets it needs and uses them — no browser, no mocks, no human in the loop.",
+ "path": "examples/agent-native-3d",
+ "files": [
+ "run.mjs"
+ ],
+ "run": "node examples/agent-native-3d/run.mjs",
+ "runKind": "command",
+ "readme": "examples/agent-native-3d/README.md"
+ },
+ {
+ "id": "project:coach-leo",
+ "kind": "project",
+ "group": "Example projects",
+ "title": "Coach Leo",
+ "description": "A complete, minimal example of a three.ws agent defined entirely as files: a manifest pointing at a 3D body, a brain, a voice, a memory policy, and one installed skill.",
+ "path": "examples/coach-leo",
+ "files": [
+ "manifest.json"
+ ],
+ "run": null,
+ "runKind": "command",
+ "readme": "examples/coach-leo/README.md"
+ },
+ {
+ "id": "project:skills",
+ "kind": "project",
+ "group": "Example projects",
+ "title": "Example skills",
+ "description": "Six installable skill bundles for the three.ws agent runtime.",
+ "path": "examples/skills",
+ "files": [],
+ "run": null,
+ "runKind": "command",
+ "readme": "examples/skills/README.md"
+ },
+ {
+ "id": "project:metamask-agent-wallet",
+ "kind": "project",
+ "group": "Example projects",
+ "title": "MetaMask Agent Wallet demo",
+ "description": "A single-page demo that gives a three.ws agent a real server-side wallet through the MetaMask Agentic CLI (mm).",
+ "path": "examples/metamask-agent-wallet",
+ "files": [
+ "index.html",
+ "server.mjs"
+ ],
+ "run": "node examples/metamask-agent-wallet/server.mjs",
+ "runKind": "command",
+ "readme": "examples/metamask-agent-wallet/README.md"
+ },
+ {
+ "id": "project:monicas-apartment",
+ "kind": "project",
+ "group": "Example projects",
+ "title": "Monica's Apartment (Friends) - first-person Three.js scene",
+ "description": "A single, self-contained HTML file that rebuilds the iconic Monica Geller apartment set from Friends as a walkable first-person 3D scene: purple walls, the purple front door with the yellow peephole frame, teal kitchen cabinets, the mismatched dining chairs,",
+ "path": "examples/monicas-apartment",
+ "files": [
+ "index.html"
+ ],
+ "run": "open examples/monicas-apartment/index.html",
+ "runKind": "command",
+ "readme": "examples/monicas-apartment/README.md"
+ },
+ {
+ "id": "project:paid-mcp-server",
+ "kind": "project",
+ "group": "Example projects",
+ "title": "paid-mcp-server",
+ "description": "",
+ "path": "examples/paid-mcp-server",
+ "files": [],
+ "run": null,
+ "runKind": "command",
+ "readme": null
+ },
+ {
+ "id": "project:pump-fun-agent",
+ "kind": "project",
+ "group": "Example projects",
+ "title": "Pump Agent",
+ "description": "An example agent manifest that composes all four production pump.fun skills into one 3D trading agent: swap, coin creation, creator-fee collection, and token payments.",
+ "path": "examples/pump-fun-agent",
+ "files": [
+ "manifest.json"
+ ],
+ "run": null,
+ "runKind": "command",
+ "readme": "examples/pump-fun-agent/README.md"
+ },
+ {
+ "id": "project:three-concierge",
+ "kind": "project",
+ "group": "Example projects",
+ "title": "Trinity, the three.ws concierge",
+ "description": "The reference agent for manifest spec agent-manifest/0.2. Trinity welcomes users to three.ws, explains the platform, and launches and trades $three on pump.fun through the real pump.fun skills in pump-fun-skills/.",
+ "path": "examples/three-concierge",
+ "files": [
+ "agent-card.json",
+ "manifest.json"
+ ],
+ "run": null,
+ "runKind": "command",
+ "readme": "examples/three-concierge/README.md"
+ },
+ {
+ "id": "package:assistant-sdk",
+ "kind": "package",
+ "group": "Package examples",
+ "title": "@three-ws/assistant",
+ "description": "A 3D avatar assistant for any website, in one script tag. A floating launcher opens a real, animated 3D avatar in a panel, standing directly on your page (transparent), or against a color or gradient. It has two modes:",
+ "path": "assistant-sdk/examples",
+ "files": [
+ "index.html"
+ ],
+ "run": "open assistant-sdk/examples/index.html",
+ "runKind": "command",
+ "readme": null,
+ "owner": "assistant-sdk"
+ },
+ {
+ "id": "package:avatar-sdk",
+ "kind": "package",
+ "group": "Package examples",
+ "title": "@three-ws/avatar",
+ "description": "A self-contained page, no build step. It loads the SDK's @three-ws/avatar/agent entry from a CDN, awaits ensureAgent3D() to register the <agent-3d> element, and renders the real three.ws default avatar using the documented src and kiosk attributes.",
+ "path": "avatar-sdk/examples",
+ "files": [
+ "index.html"
+ ],
+ "run": "open avatar-sdk/examples/index.html",
+ "runKind": "command",
+ "readme": "avatar-sdk/examples/README.md",
+ "owner": "avatar-sdk"
+ },
+ {
+ "id": "package:packages/avatar-schema",
+ "kind": "package",
+ "group": "Package examples",
+ "title": "@three-ws/avatar-schema",
+ "description": "",
+ "path": "packages/avatar-schema/examples",
+ "files": [
+ "basic.json"
+ ],
+ "run": null,
+ "runKind": "command",
+ "readme": null,
+ "owner": "packages/avatar-schema"
+ },
+ {
+ "id": "package:concierge-sdk",
+ "kind": "package",
+ "group": "Package examples",
+ "title": "@three-ws/concierge",
+ "description": "Runnable examples for every way to use the concierge. The HTML files load the SDK from ../dist, build it first (npm run build in the package root), then serve this folder (npx serve .) and open each file.",
+ "path": "concierge-sdk/examples",
+ "files": [
+ "custom-avatar.html",
+ "imperative.html",
+ "index.html",
+ "shopify.html",
+ "web-component.html"
+ ],
+ "run": "open concierge-sdk/examples/custom-avatar.html",
+ "runKind": "command",
+ "readme": "concierge-sdk/examples/README.md",
+ "owner": "concierge-sdk"
+ },
+ {
+ "id": "package:packages/marketplace-mcp",
+ "kind": "package",
+ "group": "Package examples",
+ "title": "@three-ws/marketplace-mcp",
+ "description": "Two runnable examples. Both spawn this package's own MCP server over stdio (the same node src/index.js entry point the README documents), speak real MCP JSON-RPC to it, and read the live public marketplace.",
+ "path": "packages/marketplace-mcp/examples",
+ "files": [
+ "browse-marketplace.mjs",
+ "list-tools.mjs"
+ ],
+ "run": "node packages/marketplace-mcp/examples/browse-marketplace.mjs",
+ "runKind": "command",
+ "readme": "packages/marketplace-mcp/examples/README.md",
+ "owner": "packages/marketplace-mcp"
+ },
+ {
+ "id": "package:mcp-server",
+ "kind": "package",
+ "group": "Package examples",
+ "title": "@three-ws/mcp-server",
+ "description": "Two zero-dependency walkthroughs of the MCP Streamable HTTP lifecycle against the live three.ws server at https://three.ws/api/mcp (MCP 2025-06-18, JSON-RPC 2.0).",
+ "path": "mcp-server/examples",
+ "files": [
+ "client.mjs",
+ "curl-session.sh"
+ ],
+ "run": "node mcp-server/examples/client.mjs",
+ "runKind": "command",
+ "readme": "mcp-server/examples/README.md",
+ "owner": "mcp-server"
+ },
+ {
+ "id": "package:page-agent-sdk",
+ "kind": "package",
+ "group": "Package examples",
+ "title": "@three-ws/page-agent",
+ "description": "Run these from the package root with any static server so the import map can resolve the unbundled source from ../src:",
+ "path": "page-agent-sdk/examples",
+ "files": [
+ "custom-avatar.html",
+ "headless.html",
+ "index.html"
+ ],
+ "run": "open page-agent-sdk/examples/custom-avatar.html",
+ "runKind": "command",
+ "readme": "page-agent-sdk/examples/README.md",
+ "owner": "page-agent-sdk"
+ },
+ {
+ "id": "package:packages/pumpfun-mcp",
+ "kind": "package",
+ "group": "Package examples",
+ "title": "@three-ws/pumpfun-mcp",
+ "description": "Two runnable examples. Both spawn this package's own MCP server over stdio (the same node src/index.js entry point the README documents), speak real MCP JSON-RPC to it, and read live Solana mainnet data through the canonical three.ws backend.",
+ "path": "packages/pumpfun-mcp/examples",
+ "files": [
+ "list-tools.mjs",
+ "token-report.mjs"
+ ],
+ "run": "node packages/pumpfun-mcp/examples/list-tools.mjs",
+ "runKind": "command",
+ "readme": "packages/pumpfun-mcp/examples/README.md",
+ "owner": "packages/pumpfun-mcp"
+ },
+ {
+ "id": "package:sdk",
+ "kind": "package",
+ "group": "Package examples",
+ "title": "@three-ws/sdk",
+ "description": "",
+ "path": "sdk/example",
+ "files": [
+ "index.html",
+ "solana-attest.html"
+ ],
+ "run": "open sdk/example/index.html",
+ "runKind": "command",
+ "readme": null,
+ "owner": "sdk"
+ },
+ {
+ "id": "package:tour-sdk",
+ "kind": "package",
+ "group": "Package examples",
+ "title": "@three-ws/tour",
+ "description": "The guide walks from feature to feature across your real pages.",
+ "path": "tour-sdk/examples",
+ "files": [
+ "curriculum.example.json",
+ "shopify-storefront.html",
+ "shopify-tour-plus-concierge.html",
+ "storefront-curriculum.json"
+ ],
+ "run": "open tour-sdk/examples/shopify-storefront.html",
+ "runKind": "command",
+ "readme": null,
+ "owner": "tour-sdk"
+ },
+ {
+ "id": "package:packages/vanity-mcp",
+ "kind": "package",
+ "group": "Package examples",
+ "title": "@three-ws/vanity-mcp",
+ "description": "Two runnable examples. Both spawn this package's own MCP server over stdio (the same node src/index.js entry point the README documents), speak real MCP JSON-RPC to it, and read the live grind-bounty market.",
+ "path": "packages/vanity-mcp/examples",
+ "files": [
+ "list-tools.mjs",
+ "quote-and-appraise.mjs"
+ ],
+ "run": "node packages/vanity-mcp/examples/list-tools.mjs",
+ "runKind": "command",
+ "readme": "packages/vanity-mcp/examples/README.md",
+ "owner": "packages/vanity-mcp"
+ },
+ {
+ "id": "package:packages/x402-fetch",
+ "kind": "package",
+ "group": "Package examples",
+ "title": "@three-ws/x402-fetch",
+ "description": "Two runnable scripts against the live three.ws x402 Market Data API. Node 20+ is the only requirement; the package has zero production dependencies.",
+ "path": "packages/x402-fetch/examples",
+ "files": [
+ "discover.mjs",
+ "paid-call.mjs"
+ ],
+ "run": "node packages/x402-fetch/examples/discover.mjs",
+ "runKind": "command",
+ "readme": "packages/x402-fetch/examples/README.md",
+ "owner": "packages/x402-fetch"
+ },
+ {
+ "id": "package:packages/x402-mcp",
+ "kind": "package",
+ "group": "Package examples",
+ "title": "@three-ws/x402-mcp",
+ "description": "Two runnable examples. Both spawn this package's own MCP server over stdio (the same node src/index.js entry point the README documents), speak real MCP JSON-RPC to it, and hit live data. Neither one pays for anything.",
+ "path": "packages/x402-mcp/examples",
+ "files": [
+ "inspect-price.mjs",
+ "list-tools.mjs"
+ ],
+ "run": "node packages/x402-mcp/examples/inspect-price.mjs",
+ "runKind": "command",
+ "readme": "packages/x402-mcp/examples/README.md",
+ "owner": "packages/x402-mcp"
+ },
+ {
+ "id": "package:x402-modal-sdk",
+ "kind": "package",
+ "group": "Package examples",
+ "title": "@three-ws/x402-modal",
+ "description": "A drop-in payment modal for any x402 paid endpoint.",
+ "path": "x402-modal-sdk/examples",
+ "files": [
+ "index.html",
+ "server.mjs"
+ ],
+ "run": "node x402-modal-sdk/examples/server.mjs",
+ "runKind": "command",
+ "readme": null,
+ "owner": "x402-modal-sdk"
+ },
+ {
+ "id": "package:packages/x402-server",
+ "kind": "package",
+ "group": "Package examples",
+ "title": "@three-ws/x402-server",
+ "description": "Runnable examples for the seller half of x402. Each is a standalone .mjs file.",
+ "path": "packages/x402-server/examples",
+ "files": [
+ "express-metered-api.mjs",
+ "loopback-demo.mjs",
+ "raw-primitives.mjs",
+ "streaming-download.mjs"
+ ],
+ "run": "node packages/x402-server/examples/express-metered-api.mjs",
+ "runKind": "command",
+ "readme": "packages/x402-server/examples/README.md",
+ "owner": "packages/x402-server"
+ },
+ {
+ "id": "package:.",
+ "kind": "package",
+ "group": "Package examples",
+ "title": "3d-agent",
+ "description": "Runnable demos for the three.ws SDKs and agent runtime. Two kinds live here:",
+ "path": "examples",
+ "files": [
+ "agent-presence.html",
+ "agent-wallet-embed.html",
+ "bare-avatar.html",
+ "embed-test.html",
+ "minimal.html",
+ "one-line-demo.html",
+ "three-concierge.html",
+ "two-agents.html",
+ "web-component.html",
+ "widget-rpc.html"
+ ],
+ "run": "open examples/agent-presence.html",
+ "runKind": "command",
+ "readme": "examples/README.md",
+ "owner": "."
+ },
+ {
+ "id": "package:agent-payments-sdk/src/solana",
+ "kind": "package",
+ "group": "Package examples",
+ "title": "agent-payments-sdk/src/solana",
+ "description": "",
+ "path": "agent-payments-sdk/src/solana/examples",
+ "files": [
+ "listen-pump-events.ts"
+ ],
+ "run": null,
+ "runKind": "command",
+ "readme": null,
+ "owner": "agent-payments-sdk/src/solana"
+ },
+ {
+ "id": "demo:agent-wallet-embed.html",
+ "kind": "html-demo",
+ "group": "Web component demos",
+ "title": "&lt;agent-3d wallet&gt; — the portable agent wallet",
+ "description": "Dev serves /dist-lib/agent-3d.js via a Vite plugin; prod serves the built lib.",
+ "path": "examples/agent-wallet-embed.html",
+ "files": [
+ "agent-wallet-embed.html"
+ ],
+ "run": "http://localhost:3000/examples/agent-wallet-embed.html",
+ "runKind": "url"
+ },
+ {
+ "id": "demo:agent-presence.html",
+ "kind": "html-demo",
+ "group": "Web component demos",
+ "title": "&lt;agent-presence&gt; — standalone harness · three.ws",
+ "description": "",
+ "path": "examples/agent-presence.html",
+ "files": [
+ "agent-presence.html"
+ ],
+ "run": "http://localhost:3000/examples/agent-presence.html",
+ "runKind": "url"
+ },
+ {
+ "id": "demo:two-agents.html",
+ "kind": "html-demo",
+ "group": "Web component demos",
+ "title": "&lt;agent-stage&gt; — two agents, one scene",
+ "description": "",
+ "path": "examples/two-agents.html",
+ "files": [
+ "two-agents.html"
+ ],
+ "run": "http://localhost:3000/examples/two-agents.html",
+ "runKind": "url"
+ },
+ {
+ "id": "demo:web-component.html",
+ "kind": "html-demo",
+ "group": "Web component demos",
+ "title": "&lt;mv-viewer&gt; Custom Element demo",
+ "description": "",
+ "path": "examples/web-component.html",
+ "files": [
+ "web-component.html"
+ ],
+ "run": "http://localhost:3000/examples/web-component.html",
+ "runKind": "url"
+ },
+ {
+ "id": "demo:bare-avatar.html",
+ "kind": "html-demo",
+ "group": "Web component demos",
+ "title": "Bare avatar — three.ws",
+ "description": "JUST the avatar — the default. No chat, no input, no debug GUI, no name-plate, transparent background. Add the `chat` attribute to opt into the conversational UI.",
+ "path": "examples/bare-avatar.html",
+ "files": [
+ "bare-avatar.html"
+ ],
+ "run": "http://localhost:3000/examples/bare-avatar.html",
+ "runKind": "url"
+ },
+ {
+ "id": "demo:minimal.html",
+ "kind": "html-demo",
+ "group": "Web component demos",
+ "title": "Minimal embed — three.ws",
+ "description": "Floating bubble — bottom-right of the viewport. `chat` makes it a talkative greeter.",
+ "path": "examples/minimal.html",
+ "files": [
+ "minimal.html"
+ ],
+ "run": "http://localhost:3000/examples/minimal.html",
+ "runKind": "url"
+ },
+ {
+ "id": "demo:one-line-demo.html",
+ "kind": "html-demo",
+ "group": "Web component demos",
+ "title": "One line, one 3D agent — three.ws",
+ "description": "THE ONE LINE — `chat` adds the conversational UI; drop it for just the avatar",
+ "path": "examples/one-line-demo.html",
+ "files": [
+ "one-line-demo.html"
+ ],
+ "run": "http://localhost:3000/examples/one-line-demo.html",
+ "runKind": "url"
+ },
+ {
+ "id": "demo:embed-test.html",
+ "kind": "html-demo",
+ "group": "Web component demos",
+ "title": "three.ws Embed Test",
+ "description": "",
+ "path": "examples/embed-test.html",
+ "files": [
+ "embed-test.html"
+ ],
+ "run": "http://localhost:3000/examples/embed-test.html",
+ "runKind": "url"
+ },
+ {
+ "id": "demo:widget-rpc.html",
+ "kind": "html-demo",
+ "group": "Web component demos",
+ "title": "three.ws widget — JSON-RPC example",
+ "description": "",
+ "path": "examples/widget-rpc.html",
+ "files": [
+ "widget-rpc.html"
+ ],
+ "run": "http://localhost:3000/examples/widget-rpc.html",
+ "runKind": "url"
+ },
+ {
+ "id": "demo:three-concierge.html",
+ "kind": "html-demo",
+ "group": "Web component demos",
+ "title": "Trinity — a 3D agent defined entirely in JSON · three.ws",
+ "description": "── Viewer ───────────────────────────────────────────",
+ "path": "examples/three-concierge.html",
+ "files": [
+ "three-concierge.html"
+ ],
+ "run": "http://localhost:3000/examples/three-concierge.html",
+ "runKind": "url"
+ }
+ ]
+}
diff --git a/data/pages.json b/data/pages.json
index 56d710eb8..ac42ef62b 100644
--- a/data/pages.json
+++ b/data/pages.json
@@ -2135,6 +2135,15 @@
"changefreq": "weekly",
"added": "2026-04-27"
},
+ {
+ "path": "/docs/world",
+ "title": "Docs World (immersive 3D docs)",
+ "description": "The full three.ws documentation as a walkable 3D world: every docs section is a glowing pavilion, and the live pages render inside the scene.",
+ "priority": 0.7,
+ "changefreq": "weekly",
+ "added": "2026-07-30",
+ "showcase": true
+ },
{
"path": "/crypto",
"title": "Crypto Data API",
diff --git a/docs/circulation-engine.md b/docs/circulation-engine.md
index e2d9ff87f..522cc4c70 100644
--- a/docs/circulation-engine.md
+++ b/docs/circulation-engine.md
@@ -62,6 +62,7 @@ falls back to a weighted everyday mix.
| `tip` | 18 | **Real** | Direct SOL transfer between two agents (0.001–0.006 SOL) |
| `trade` | 12 | **Real** | On-chain trade via the platform trade engine; records `pump_agent_trades` |
| `trial` | 12 | DB only | Records a `trial` skill-purchase row (no transfer) |
+| `use_trial` | 12 | DB only | Spends one run of an existing trial via `consumeTrialUse`, and logs real usage |
| `buy_asset` | 8 | **Real** | Buyer pays in $THREE (SPL transfer) for an avatar/agent/plugin; records `asset_purchases` |
| `review` | 8 | DB only | Inserts a marketplace review row |
| `payment` | 6 | **Real** | Direct SOL transfer for a named service (0.0012–0.01 SOL), logged with category `x402` |
@@ -70,6 +71,40 @@ Listing actions (`list_skill`, `list_asset`) are emitted as needed to keep
sellers "stocked" and are database-only (they create a price row, not a
transfer).
+The weight table is a single exported constant, `LIGHT_ACTION_WEIGHTS` in
+`api/_lib/circulation.js`, and `tests/circulation-trial-conversion.test.js`
+holds every weighted kind to having a real handler in the `ACTIONS` registry.
+Adding a weight without a handler is otherwise a silent runtime skip.
+
+## The trial funnel
+
+`trial` and `use_trial` exist as a pair, and the pairing is load-bearing rather
+than decorative. A trial grants a fixed number of runs (`trial_remaining`). The
+buying action refuses a buyer who already has access, which correctly covers a
+confirmed purchase **or** a trial that still has runs left. Once those runs are
+spent, that agent is no longer a freeloader, it is the single best purchase
+candidate on the platform, and `buy_skill` becomes eligible for it again:
+
+```
+list_skill -> trial -> use_trial (xN, until trial_remaining hits 0) -> buy_skill
+```
+
+Both free actions sit outside `COSTLY_ACTIONS`, so they keep running when the
+paid budget is zero. That is deliberate: a lean treasury is exactly when the
+funnel most needs to keep advancing trials toward the point of conversion, so
+that demand is queued up and ready the moment the treasury can fund a purchase
+again.
+
+> **Why this is called out.** Before `use_trial` existed, nothing ever spent a
+> trial run. `consumeTrialUse` is reachable only from the x402 agent-action
+> route, which circulation agents never call, so `trial_remaining` stayed at
+> its granted value permanently and every trial retired its
+> (buyer, seller, skill) triple from the paid path for good. Production had
+> accumulated 10,282 trial rows, zero confirmed purchases ever, and not a
+> single exhausted trial. Marketplace revenue was a structural zero rather than
+> a demand problem. If you add another free action that grants access, give it
+> an exit in the same change.
+
> The only coin the engine ever launches, trades, or prices marketplace
> inventory against is **$THREE**
> (`FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump`). The `launch` and `trade`
diff --git a/docs/docs-world.md b/docs/docs-world.md
new file mode 100644
index 000000000..e0c356345
--- /dev/null
+++ b/docs/docs-world.md
@@ -0,0 +1,49 @@
+# Docs World: the documentation as a place
+
+The three.ws docs come in two surfaces with one content source:
+
+- **Classic docs** at [/docs](/docs): the sidebar-and-article reader you are probably using now.
+- **Docs World** at [/docs/world](/docs/world): the same documentation as an explorable 3D world. Every section of the sidebar is a glowing pavilion on a ring; you walk an avatar between them and read the real pages inside the scene.
+
+Both render the same files. The world fetches the same `/docs/nav.json` manifest that builds the classic sidebar and the same `/docs/<page>.md` markdown the classic reader shows, so the two surfaces can never drift apart.
+
+## Entering
+
+- From the classic docs, use the **3D world** button in the header. It carries the page you are reading, so you land in front of the right pavilion with the doc already open.
+- Or go straight to [three.ws/docs/world](https://three.ws/docs/world).
+- Deep links work like the classic docs: `/docs/world#forge` opens the Forge doc in-world, at the Creation studios pavilion.
+
+## Controls
+
+| Action | Desktop | Touch |
+| --- | --- | --- |
+| Walk | WASD or arrow keys | Virtual joystick (lower-left) |
+| Run | Hold Shift | Push the joystick to its edge |
+| Look / orbit | Drag | Drag anywhere outside the joystick |
+| Zoom | Scroll wheel | Camera button |
+| Open a section | Walk close and press E, or click its pavilion | Tap the pavilion or the prompt |
+| Camera modes | C cycles follow, cinematic, first person, top down | Camera chip (top right) |
+| Close a panel | Esc | The ✕ button |
+
+The **Index** chip (top left) lists every section; picking one teleports you to its pavilion and opens its page list. That list is fully keyboard-reachable, so nothing in the world requires mouse-precision walking.
+
+## Your avatar
+
+By default you walk as the platform mannequin, animated by the same canonical clip library that powers [/walk](/walk). Pass any rigged GLB with `?avatar=`:
+
+```text
+https://three.ws/docs/world?avatar=https://three.ws/avatars/michelle.glb
+```
+
+Any humanoid rig works; bone names are mapped automatically, exactly as described in [Animations](/docs/animations).
+
+## Devices and accessibility
+
+- **No WebGL?** The page detects it and offers the classic docs instead; nothing is lost, because the content is identical.
+- **`prefers-reduced-motion`** stills the ambient animation (floating labels, portal shimmer, drifting stars).
+- The reader panel is real DOM, not a texture: text is selectable, zoomable, and visible to screen readers.
+- Frame rate is governed like every three.ws 3D surface: 60fps focused, 30fps in the background or with the shared Power-saver preference on.
+
+## For contributors
+
+The section list lives in [`docs/nav.json`](https://github.com/nirholas/three.ws/blob/main/docs/nav.json). Add a page there and it appears in both the classic sidebar and the world's pavilions; no world-side change is ever needed. The world itself lives in `src/docs-world/` (scene, player, controls, overlays) with the page shell at `pages/docs-world.html`.
diff --git a/docs/galaxy.md b/docs/galaxy.md
index 37a4fb501..39d1c2df3 100644
--- a/docs/galaxy.md
+++ b/docs/galaxy.md
@@ -72,6 +72,6 @@ curl -X POST 'https://three.ws/api/galaxy' \
## Related
-- [IBM Granite suite](./ibm.md): the full set of watsonx-powered features on three.ws, including the IBM-branded galaxy variant at `/ibm/galaxy`.
+- [IBM Granite suite](./ibm.md): the full set of watsonx-powered features on three.ws, including the Granite embeddings that position this galaxy.
- [Agent system](./agent-system.md) and [Agent reputation](./agent-reputation.md): what a "star" is and how agents earn standing.
- Pages: [/galaxy](https://three.ws/galaxy), [/create](https://three.ws/create), [/agents](https://three.ws/agents).
diff --git a/docs/index.html b/docs/index.html
index bc626e5f6..28d4f3bf3 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -146,6 +146,27 @@
background: rgba(139, 92, 246, 0.2);
color: #ddd6fe;
}
+ .docs-header-right .docs-world-link {
+ display: inline-flex;
+ align-items: center;
+ gap: 5px;
+ color: #c4b5fd;
+ border: 1px solid rgba(139, 92, 246, 0.3);
+ background: linear-gradient(120deg, rgba(139, 92, 246, 0.14), rgba(59, 130, 246, 0.1));
+ }
+ .docs-header-right .docs-world-link:hover {
+ color: #ede9fe;
+ border-color: rgba(139, 92, 246, 0.55);
+ background: linear-gradient(120deg, rgba(139, 92, 246, 0.24), rgba(59, 130, 246, 0.18));
+ }
+ .docs-header-right .docs-world-link svg {
+ opacity: 0.85;
+ }
+ @media (max-width: 560px) {
+ .docs-header-right .docs-world-link span {
+ display: none;
+ }
+ }
/* ── Shell ───────────────────────────────────── */
.docs-shell {
@@ -176,6 +197,53 @@
border-radius: 2px;
}
+ /* Designed sidebar states: manifest load failed, or a search that
+ matched nothing. Both used to render an unexplained blank column. */
+ .sidebar-empty {
+ margin: var(--space-sm);
+ padding: 14px;
+ border: 1px solid var(--border);
+ border-radius: var(--radius-md);
+ background: rgba(255, 255, 255, 0.02);
+ }
+ .sidebar-empty p {
+ margin: 0 0 8px;
+ font-size: var(--text-sm);
+ line-height: 1.5;
+ color: rgba(255, 255, 255, 0.55);
+ }
+ .sidebar-empty-title {
+ color: #ddd6fe !important;
+ font-weight: 600;
+ }
+ .sidebar-empty-btn {
+ display: inline-flex;
+ align-items: center;
+ margin-top: 2px;
+ padding: 6px 12px;
+ font: inherit;
+ font-size: var(--text-sm);
+ color: #c4b5fd;
+ background: rgba(139, 92, 246, 0.12);
+ border: 1px solid rgba(139, 92, 246, 0.3);
+ border-radius: var(--radius-md);
+ cursor: pointer;
+ transition: background 0.15s, border-color 0.15s, color 0.15s;
+ }
+ .sidebar-empty-btn:hover:not(:disabled) {
+ color: #ede9fe;
+ background: rgba(139, 92, 246, 0.22);
+ border-color: rgba(139, 92, 246, 0.55);
+ }
+ .sidebar-empty-btn:focus-visible {
+ outline: 2px solid rgba(139, 92, 246, 0.7);
+ outline-offset: 2px;
+ }
+ .sidebar-empty-btn:disabled {
+ opacity: 0.6;
+ cursor: default;
+ }
+
.sidebar-search {
margin: 0 var(--space-sm) var(--space-md);
position: relative;
@@ -708,6 +776,10 @@
<span class="docs-header-sep"></span>
<span class="docs-header-label">Docs</span>
<nav class="docs-header-right">
+ <a href="/docs/world" class="docs-world-link" id="world-link" title="Read these docs inside a walkable 3D world">
+ <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><circle cx="12" cy="12" r="9"/><ellipse cx="12" cy="12" rx="9" ry="3.6"/><path d="M12 3v18"/></svg>
+ <span>3D world</span>
+ </a>
<a href="/widgets">Widgets</a>
<a href="/discover">Discover</a>
<a href="/app">Launch app</a>
@@ -770,278 +842,14 @@
</button>
<script>
- const NAV = [
- {
- title: 'Start here',
- links: [
- { label: 'What is three.ws?', path: 'start-here' },
- { label: 'Agents vs. Avatars', path: 'agents-vs-avatars' },
- { label: 'Make your first agent', path: 'make-your-agent' },
- { label: 'Share & embed', path: 'share-and-embed' },
- { label: 'Do I need crypto?', path: 'do-i-need-crypto' },
- ],
- },
- {
- title: 'What agents can do',
- links: [
- { label: 'The complete dossier', path: 'agent-abilities' },
- { label: 'The Body — 3D creation', path: 'agent-abilities/chapters/01-the-body' },
- { label: 'Motion & animation', path: 'agent-abilities/chapters/02-motion' },
- { label: 'Creation studios', path: 'agent-abilities/chapters/03-creation-studios' },
- { label: 'The Mind — memory & autonomy', path: 'agent-abilities/chapters/04-the-mind' },
- { label: 'The Voice — conversation', path: 'agent-abilities/chapters/05-the-voice' },
- { label: 'Identity & reputation', path: 'agent-abilities/chapters/06-identity-reputation' },
- { label: 'Skills', path: 'agent-abilities/chapters/07-skills' },
- { label: 'Screens', path: 'agent-abilities/chapters/08-screens' },
- { label: 'The Agent Economy', path: 'agent-abilities/chapters/09-the-agent-economy' },
- { label: 'The Agent Wallet — 23 abilities', path: 'agent-abilities/chapters/10-the-agent-wallet' },
- { label: 'Markets & intelligence', path: 'agent-abilities/chapters/11-markets-intelligence' },
- { label: 'Live worlds, social & IRL', path: 'agent-abilities/chapters/12-live-worlds-social-irl' },
- { label: 'Agents everywhere', path: 'agent-abilities/chapters/13-agents-everywhere' },
- { label: 'The Developer platform', path: 'agent-abilities/chapters/14-the-developer-platform' },
- { label: 'Full product map', path: 'agent-abilities/chapters/15-appendix' },
- { label: 'Everything on one page', path: 'agent-abilities/FULL-ARTICLE' },
- ],
- },
- {
- title: 'Creation studios',
- links: [
- { label: 'Forge (text & image to 3D)', path: 'forge' },
- { label: 'How the Forge works (plain language)', path: 'how-forge-works' },
- { label: 'The Forge pipeline (deep dive)', path: 'forge-pipeline' },
- { label: 'Image to 3D', path: 'image-to-3d' },
- { label: 'Diorama (text to world)', path: 'diorama' },
- { label: 'Cosmos (living worlds)', path: 'cosmos' },
- { label: 'Splat viewer (Gaussian avatars)', path: 'splat' },
- { label: 'Scene Capture (video to point cloud)', path: 'capture' },
- { label: 'Restyle Studio', path: 'restyle' },
- { label: 'Scene Studio', path: 'scene-studio' },
- { label: 'Scene Composer', path: 'compose' },
- { label: 'Animation Studio', path: 'animation-studio' },
- { label: 'Sign language (ASL)', path: 'sign-language' },
- { label: 'Avatar Studio', path: 'avatar-studio' },
- { label: 'Mocap Studio', path: 'mocap-studio' },
- { label: 'Selfie to Avatar', path: 'selfie-to-avatar' },
- { label: 'Daily Forge', path: 'daily-forge' },
- { label: 'AR Studio', path: 'ar-studio' },
- { label: 'Generation Watch (live progress)', path: 'generation-watch' },
- { label: 'Character Library (106 rigged)', path: 'character-library' },
- { label: 'Agent Identity Studio', path: 'agent-identities' },
- { label: 'Living Stages', path: 'stage' },
- { label: 'Avatar Engines Atlas', path: 'avatar-engines' },
- { label: 'Object Library (CC0 props)', path: 'object-library' },
- ],
- },
- {
- title: 'Voice & video',
- links: [
- { label: 'Voice Lab', path: 'voice-lab' },
- { label: 'Lipsync', path: 'lipsync' },
- { label: 'Talking Avatar Video', path: 'talking-avatar-video' },
- ],
- },
- {
- title: 'Build an agent',
- links: [
- { label: 'Instant Agent Genesis', path: 'genesis' },
- { label: 'Agent Genome (breeding)', path: 'genome' },
- { label: 'Agent Studio', path: 'agent-studio' },
- { label: 'Multi-LLM Brain', path: 'brain' },
- { label: 'Agent Galaxy', path: 'galaxy' },
- { label: 'Integrations', path: 'integrations' },
- ],
- },
- {
- title: 'Trading & markets',
- links: [
- { label: 'Coin Autopilot', path: 'autopilot' },
- { label: 'Signal Marketplace', path: 'signals' },
- { label: 'The AGI', path: 'agi' },
- { label: 'Alpha Co-pilot', path: 'alpha-copilot' },
- { label: 'Guardian console', path: 'guardian' },
- { label: 'Strategy Objects', path: 'strategy-objects' },
- { label: 'Mission Control (terminal)', path: 'terminal' },
- { label: 'Smart Money Radar', path: 'smart-money' },
- { label: 'Coin Radar', path: 'radar' },
- { label: 'Coin Clash', path: 'clash' },
- { label: 'x402 Studio', path: 'x402-studio' },
- { label: 'Fact Check', path: 'fact-check' },
- { label: 'Trading Copilot', path: 'trading-copilot' },
- { label: 'Earned autonomy (fleet self-tuning)', path: 'sniper-autonomy' },
- { label: 'Trader Card (claim your wallet)', path: 'trader-card' },
- { label: 'Clip Director', path: 'clip-director' },
- { label: 'KOL Tracker', path: 'kol-tracker' },
- { label: 'Copy trading (mirror)', path: 'copy-trading' },
- { label: 'Reasoning Ledger (verifiable decisions)', path: 'reasoning-ledger' },
- { label: 'Coin & market pages', path: 'coin-pages' },
- ],
- },
- {
- title: 'Getting started',
- links: [
- { label: 'Introduction', path: 'introduction' },
- { label: 'Quick start', path: 'quick-start' },
- { label: 'Getting started (hosted)', path: 'tutorials/getting-started' },
- { label: 'Deployment', path: 'deployment' },
- ],
- },
- {
- title: 'Core concepts',
- links: [
- { label: 'How it works', path: 'how-it-works' },
- { label: 'Architecture overview', path: 'architecture' },
- { label: 'Agent system', path: 'agent-system' },
- { label: 'Agent reputation', path: 'agent-reputation' },
- { label: 'Solana reputation', path: 'solana-reputation' },
- { label: 'Memory system', path: 'memory' },
- { label: 'Skills system', path: 'skills' },
- { label: 'Multi-agent', path: 'multi-agent' },
- { label: 'IRL (agents in the real world)', path: 'irl' },
- { label: 'World Lines (proof of presence)', path: 'world-lines' },
- { label: 'Walk Leaderboard', path: 'walk-leaderboard' },
- { label: 'Permissions', path: 'permissions' },
- { label: 'Layers', path: 'layers' },
- ],
- },
- {
- title: 'Economy & payments',
- links: [
- { label: 'Circulation engine', path: 'circulation-engine' },
- { label: 'Money feed', path: 'money-feed' },
- { label: 'Agent wallets', path: 'agent-wallets' },
- { label: 'Marketplace', path: 'marketplace' },
- { label: 'Coin launches', path: 'coin-launches' },
- { label: 'x402 protocol', path: 'x402' },
- { label: 'x402 paid endpoints', path: 'x402-endpoints' },
- { label: 'x402 buyer client', path: 'x402-buyer' },
- { label: 'Autonomous x402 loop', path: 'autonomous-x402' },
- { label: 'x402 developer tools', path: 'x402-dev-tools' },
- { label: 'x402 revenue & receipts', path: 'x402-revenue' },
- { label: 'Market Data API (x402)', path: 'market-data-api' },
- { label: 'Premium Data API pass', path: 'premium' },
- { label: 'Pump Launcher (paid launch API)', path: 'pump-launcher' },
- { label: 'Launch Studio recipes', path: 'launch-usecases' },
- { label: 'Remix economy & royalties', path: 'remix' },
- { label: 'Embody (x402 3D body)', path: 'embody' },
- { label: 'Custody, limits & recovery', path: 'custody' },
- { label: 'Payment Sessions (spend envelopes)', path: 'payment-sessions' },
- { label: 'Agent wallet control API', path: 'agent-wallet-api' },
- { label: 'USDC agent vaults', path: 'vaults' },
- { label: 'CA to x402 (mint to endpoint)', path: 'ca2x402' },
- { label: 'Agent economy volume', path: 'agent-economy-volume' },
- { label: 'Viability (on-chain unit economics)', path: 'viability' },
- { label: 'Your master wallet', path: 'user-wallet' },
- { label: 'Agent-Forged Gallery', path: 'forged' },
- { label: 'Minted 3D assets', path: 'minted' },
- { label: 'Agent Symphony (economy as music)', path: 'agent-symphony' },
- { label: 'AgenC', path: 'agenc' },
- ],
- },
- {
- title: 'Guides',
- links: [
- { label: 'Embedding', path: 'embedding' },
- { label: 'Concierge (AI chat widget)', path: 'concierge' },
- { label: 'Assistant widget (3D avatar)', path: 'assistant-widget' },
- { label: '3D Viewer', path: 'viewer' },
- { label: 'Editor guide', path: 'editor' },
- { label: 'Animations (clips & slots)', path: 'animations' },
- { label: 'Avatar inspector', path: 'avatar-inspector' },
- { label: 'AR & WebXR', path: 'ar' },
- { label: 'Authentication', path: 'authentication' },
- { label: 'Avatar creation', path: 'avatar-creation' },
- { label: 'Avatar pipeline (end to end)', path: 'avatar-pipeline' },
- { label: 'ERC-8004', path: 'erc8004' },
- { label: 'Reputation system', path: 'reputation' },
- { label: 'Validation attestations', path: 'validation' },
- { label: '3D provenance (verify authenticity)', path: 'provenance' },
- { label: 'SAS attestations', path: 'sas-attestations' },
- { label: 'Solana agents', path: 'solana' },
- { label: 'Deploy agents on-chain (bulk)', path: 'onchain-agents' },
- { label: 'On-chain deployments feed', path: 'deployments' },
- { label: 'Solana pump.fun signals', path: 'solana-pumpfun' },
- { label: 'Mint mark ("3ws")', path: 'mint-mark' },
- { label: 'Security', path: 'security' },
- { label: 'Configuration', path: 'configuration' },
- { label: 'Agent Skills pack (Claude)', path: 'agent-skills' },
- { label: 'Notifications', path: 'notifications' },
- { label: 'Creator portfolio', path: 'creator-portfolio' },
- { label: 'Contributing', path: 'contributing' },
- ],
- },
- {
- title: 'SDK / API reference',
- links: [
- { label: 'REST API', path: 'api-reference' },
- { label: '3D API (free text to 3D)', path: '3d-api' },
- { label: 'Media & render API', path: 'media-api' },
- { label: 'Developer platform (keys, webhooks)', path: 'developer-platform' },
- { label: 'Crypto Data API (free)', path: 'crypto-api' },
- { label: '3D Studio MCP (free)', path: 'mcp-studio' },
- { label: 'Agent manifest', path: 'agent-manifest' },
- { label: 'ERC-8004 smart contracts', path: 'smart-contracts' },
- { label: 'JavaScript API', path: 'js-api' },
- { label: 'Web component', path: 'web-component' },
- { label: 'MCP', path: 'mcp' },
- { label: 'MCP tools catalog', path: 'mcp-tools' },
- { label: 'Spatial MCP (3D responses)', path: 'spatial-mcp' },
- { label: 'SDK', path: 'sdk' },
- { label: 'Widgets', path: 'widgets' },
- { label: 'Widget Studio', path: 'widget-studio' },
- { label: 'Widget API (JSON-RPC)', path: 'widget-api' },
- { label: 'Widget reference', href: '/docs/widgets', external: true },
- ],
- },
- {
- title: 'Integrations',
- links: [
- { label: 'NVIDIA free models', path: 'nvidia-models' },
- { label: 'IBM watsonx & Granite', path: 'ibm' },
- { label: 'IBM x402 MCP', path: 'ibm-x402-mcp' },
- { label: 'BNB payments', path: 'bnb-payments' },
- { label: 'BNB vault', path: 'bnb-vault' },
- ],
- },
- {
- title: 'Tutorials',
- links: [
- { label: 'Text prompt to 3D model', path: 'tutorials/text-to-3d' },
- { label: 'Photos to 3D model', path: 'tutorials/image-to-3d' },
- { label: 'Prompt recipes for 3D', path: 'tutorials/prompts-for-3d' },
- { label: 'Generate 3D from code', path: 'tutorials/generate-3d-api' },
- { label: 'Place your model in AR', path: 'tutorials/view-in-ar' },
- { label: 'Make your avatar sign (ASL)', path: 'tutorials/sign-with-your-avatar' },
- { label: 'Place an agent in the real world', path: 'tutorials/place-agent-irl' },
- { label: 'Build your first agent', path: 'tutorials/first-agent' },
- { label: 'Personal AI site', path: 'tutorials/personal-ai-site' },
- { label: 'Create a custom skill', path: 'tutorials/custom-skill' },
- { label: 'Embed on a website', path: 'tutorials/embed-on-website' },
- { label: 'Build a site concierge', path: 'tutorials/build-a-site-concierge' },
- { label: 'Add a 3D avatar assistant', path: 'tutorials/add-a-3d-assistant' },
- { label: 'Register on-chain', path: 'tutorials/register-onchain' },
- { label: 'Give an agent a spending envelope', path: 'tutorials/agent-spending-envelope' },
- { label: 'Render avatar images anywhere', path: 'tutorials/render-avatar-images' },
- { label: 'Library character to live embed', path: 'tutorials/character-library-to-embed' },
- { label: "Read an agent's reputation", path: 'tutorials/agent-reputation' },
- { label: "Read a Solana agent's reputation", path: 'tutorials/solana-agent-reputation' },
- ],
- },
- {
- title: 'Reference',
- links: [
- { label: 'Examples', path: 'examples' },
- { label: 'Listings & distribution', path: 'listings' },
- { label: 'The Story So Far (3D timeline)', path: 'timeline' },
- { label: 'Press kit', path: 'press-kit' },
- { label: 'Partner ecosystem', path: 'partners' },
- { label: 'Daily Match', path: 'daily-match' },
- { label: 'Troubleshooting', path: 'troubleshooting' },
- { label: 'Changelog', path: 'changelog' },
- ],
- },
- ];
-
- const ALL_PAGES = NAV.flatMap(s => s.links.filter(l => l.path));
+ // The sidebar manifest lives in /docs/nav.json: one source of truth shared
+ // with the immersive 3D docs world at /docs/world. Loaded by the boot at
+ // the bottom of this script; until then both stay empty.
+ let NAV = [];
+ let ALL_PAGES = [];
+ // Non-null once a manifest load has failed, so buildSidebar can tell
+ // "still loading" (blank, briefly) apart from "load failed" (designed).
+ let navError = null;
// The hash is the doc route, which means a plain "#section" link inside a
// page would be read as "load the doc named section" and 404 the reader
@@ -1104,6 +912,52 @@
const q = (filter || '').toLowerCase();
const current = currentPath();
const nav = document.getElementById('sidebar-nav');
+ // The manifest is a network fetch, so it has a real failure mode. An
+ // empty sidebar reads as "this product has no docs" rather than "one
+ // request failed", so say which it is and offer the way out. The
+ // article itself still renders: only navigation depends on the manifest.
+ if (!NAV.length && navError) {
+ nav.innerHTML = '';
+ const box = document.createElement('div');
+ box.className = 'sidebar-empty';
+ box.innerHTML =
+ '<p class="sidebar-empty-title">Contents unavailable</p>' +
+ '<p>The page list could not be loaded. The page you are reading is unaffected.</p>';
+ const retry = document.createElement('button');
+ retry.type = 'button';
+ retry.className = 'sidebar-empty-btn';
+ retry.textContent = 'Retry';
+ retry.addEventListener('click', () => {
+ retry.disabled = true;
+ retry.textContent = 'Retrying…';
+ loadNav();
+ });
+ box.appendChild(retry);
+ nav.appendChild(box);
+ return;
+ }
+ const matched = NAV.some(s => s.links.some(l => !q || l.label.toLowerCase().includes(q)));
+ if (q && !matched) {
+ nav.innerHTML = '';
+ const box = document.createElement('div');
+ box.className = 'sidebar-empty';
+ box.innerHTML = '<p class="sidebar-empty-title">No matches</p>';
+ const p = document.createElement('p');
+ p.textContent = 'Nothing in the docs matches “' + filter + '”.';
+ const clear = document.createElement('button');
+ clear.type = 'button';
+ clear.className = 'sidebar-empty-btn';
+ clear.textContent = 'Clear search';
+ clear.addEventListener('click', () => {
+ const input = document.getElementById('search-input');
+ input.value = '';
+ input.focus();
+ buildSidebar('');
+ });
+ box.append(p, clear);
+ nav.appendChild(box);
+ return;
+ }
nav.innerHTML = NAV.map(section => {
const links = section.links.filter(
l => !q || l.label.toLowerCase().includes(q),
@@ -1326,6 +1180,10 @@
function navigate() {
const { path, anchor } = currentRoute();
booted = true;
+ // The 3D-world button deep-links to the doc being read, so switching
+ // surfaces never loses the reader's place.
+ const worldLink = document.getElementById('world-link');
+ if (worldLink) worldLink.href = '/docs/world#' + path;
// Jumping between sections of the doc already on screen must not
// refetch and rebuild it: that would lose the reader's place.
if (path === loadedPath) {
@@ -1361,8 +1219,25 @@
}
});
- buildSidebar();
- navigate();
+ async function loadNav() {
+ try {
+ const res = await fetch('/docs/nav.json');
+ if (!res.ok) throw new Error(res.status);
+ const nav = await res.json();
+ NAV = Array.isArray(nav.sections) ? nav.sections : [];
+ navError = NAV.length ? null : 'empty manifest';
+ } catch (err) {
+ // Content still loads without the manifest; only the sidebar and
+ // prev/next pager degrade. buildSidebar renders the designed
+ // failure state rather than an unexplained blank column.
+ NAV = [];
+ navError = String(err && err.message ? err.message : err);
+ }
+ ALL_PAGES = NAV.flatMap(s => s.links.filter(l => l.path));
+ buildSidebar(document.getElementById('search-input').value);
+ navigate();
+ }
+ loadNav();
</script>
<div id="footer-container"></div>
diff --git a/docs/marketplace.md b/docs/marketplace.md
index fb2de1a0b..94c37e1a4 100644
--- a/docs/marketplace.md
+++ b/docs/marketplace.md
@@ -85,6 +85,43 @@ one is issued on the next prepare.
`check-skill-access.js` answers whether a given buyer holds an active purchase or
trial for a skill, so a gated skill call can verify entitlement before running.
+## Trials are metered, and they must expire into a sale
+
+A trial is not open-ended access. `start-trial.js` writes a `skill_purchases`
+row with `status='trial'` and a fixed `trial_remaining` count, and every
+successful gated call is expected to spend one of those runs:
+
+```js
+import { hasSkillAccess, consumeTrialUse, logSkillUsage } from './api/_lib/skill-access.js';
+
+const access = await hasSkillAccess(userId, agentId, skill);
+if (!access.owned) return { error: access.reason }; // 'not_purchased' | 'trial_exhausted' | 'expired'
+
+const result = await runSkill(skill, input); // do the work first
+
+if (access.trial) await consumeTrialUse(userId, agentId, skill);
+logSkillUsage({ userId, agentId, skillName: skill });
+return result;
+```
+
+Two rules make the difference between a funnel and a dead end:
+
+1. **Consume only after the work succeeds.** Spending a run on a call that then
+ errored bills the buyer for nothing, and it is the fastest way to make a
+ trial feel like a scam.
+2. **Whoever grants a trial owns spending it.** `hasSkillAccess` returns
+ `trial: true` and leaves the decrement to the caller, by design, so the
+ caller can decide what counts as a use. The cost of forgetting is total, not
+ partial: a trial that is never spent never reaches `trial_exhausted`, and
+ because an active trial counts as access, that buyer can never be sold the
+ skill either. It is not that conversion gets slower. It stops entirely.
+
+That is not hypothetical. The circulation engine granted trials for a month
+without ever calling `consumeTrialUse`, and produced 10,282 trial rows with zero
+sales and zero exhausted trials before it was found. See
+[circulation engine](circulation-engine.md#the-trial-funnel) for the fix and the
+`list_skill -> trial -> use_trial -> buy_skill` cycle it restored.
+
## Current limitations
- **Discovery surface.** Listings and prices live in the database and the buy/sell
diff --git a/docs/nav.json b/docs/nav.json
new file mode 100644
index 000000000..a92cf9eab
--- /dev/null
+++ b/docs/nav.json
@@ -0,0 +1,871 @@
+{
+ "sections": [
+ {
+ "title": "Start here",
+ "links": [
+ {
+ "label": "What is three.ws?",
+ "path": "start-here"
+ },
+ {
+ "label": "Agents vs. Avatars",
+ "path": "agents-vs-avatars"
+ },
+ {
+ "label": "Make your first agent",
+ "path": "make-your-agent"
+ },
+ {
+ "label": "Share & embed",
+ "path": "share-and-embed"
+ },
+ {
+ "label": "Do I need crypto?",
+ "path": "do-i-need-crypto"
+ }
+ ]
+ },
+ {
+ "title": "What agents can do",
+ "links": [
+ {
+ "label": "The complete dossier",
+ "path": "agent-abilities"
+ },
+ {
+ "label": "The Body: 3D creation",
+ "path": "agent-abilities/chapters/01-the-body"
+ },
+ {
+ "label": "Motion & animation",
+ "path": "agent-abilities/chapters/02-motion"
+ },
+ {
+ "label": "Creation studios",
+ "path": "agent-abilities/chapters/03-creation-studios"
+ },
+ {
+ "label": "The Mind: memory & autonomy",
+ "path": "agent-abilities/chapters/04-the-mind"
+ },
+ {
+ "label": "The Voice: conversation",
+ "path": "agent-abilities/chapters/05-the-voice"
+ },
+ {
+ "label": "Identity & reputation",
+ "path": "agent-abilities/chapters/06-identity-reputation"
+ },
+ {
+ "label": "Skills",
+ "path": "agent-abilities/chapters/07-skills"
+ },
+ {
+ "label": "Screens",
+ "path": "agent-abilities/chapters/08-screens"
+ },
+ {
+ "label": "The Agent Economy",
+ "path": "agent-abilities/chapters/09-the-agent-economy"
+ },
+ {
+ "label": "The Agent Wallet: 23 abilities",
+ "path": "agent-abilities/chapters/10-the-agent-wallet"
+ },
+ {
+ "label": "Markets & intelligence",
+ "path": "agent-abilities/chapters/11-markets-intelligence"
+ },
+ {
+ "label": "Live worlds, social & IRL",
+ "path": "agent-abilities/chapters/12-live-worlds-social-irl"
+ },
+ {
+ "label": "Agents everywhere",
+ "path": "agent-abilities/chapters/13-agents-everywhere"
+ },
+ {
+ "label": "The Developer platform",
+ "path": "agent-abilities/chapters/14-the-developer-platform"
+ },
+ {
+ "label": "Full product map",
+ "path": "agent-abilities/chapters/15-appendix"
+ },
+ {
+ "label": "Everything on one page",
+ "path": "agent-abilities/FULL-ARTICLE"
+ }
+ ]
+ },
+ {
+ "title": "Creation studios",
+ "links": [
+ {
+ "label": "Forge (text & image to 3D)",
+ "path": "forge"
+ },
+ {
+ "label": "How the Forge works (plain language)",
+ "path": "how-forge-works"
+ },
+ {
+ "label": "The Forge pipeline (deep dive)",
+ "path": "forge-pipeline"
+ },
+ {
+ "label": "Image to 3D",
+ "path": "image-to-3d"
+ },
+ {
+ "label": "Diorama (text to world)",
+ "path": "diorama"
+ },
+ {
+ "label": "Cosmos (living worlds)",
+ "path": "cosmos"
+ },
+ {
+ "label": "Splat viewer (Gaussian avatars)",
+ "path": "splat"
+ },
+ {
+ "label": "Scene Capture (video to point cloud)",
+ "path": "capture"
+ },
+ {
+ "label": "Restyle Studio",
+ "path": "restyle"
+ },
+ {
+ "label": "Scene Studio",
+ "path": "scene-studio"
+ },
+ {
+ "label": "Scene Composer",
+ "path": "compose"
+ },
+ {
+ "label": "Animation Studio",
+ "path": "animation-studio"
+ },
+ {
+ "label": "Sign language (ASL)",
+ "path": "sign-language"
+ },
+ {
+ "label": "Avatar Studio",
+ "path": "avatar-studio"
+ },
+ {
+ "label": "Mocap Studio",
+ "path": "mocap-studio"
+ },
+ {
+ "label": "Selfie to Avatar",
+ "path": "selfie-to-avatar"
+ },
+ {
+ "label": "Daily Forge",
+ "path": "daily-forge"
+ },
+ {
+ "label": "AR Studio",
+ "path": "ar-studio"
+ },
+ {
+ "label": "Generation Watch (live progress)",
+ "path": "generation-watch"
+ },
+ {
+ "label": "Character Library (106 rigged)",
+ "path": "character-library"
+ },
+ {
+ "label": "Agent Identity Studio",
+ "path": "agent-identities"
+ },
+ {
+ "label": "Living Stages",
+ "path": "stage"
+ },
+ {
+ "label": "Avatar Engines Atlas",
+ "path": "avatar-engines"
+ },
+ {
+ "label": "Object Library (CC0 props)",
+ "path": "object-library"
+ }
+ ]
+ },
+ {
+ "title": "Voice & video",
+ "links": [
+ {
+ "label": "Voice Lab",
+ "path": "voice-lab"
+ },
+ {
+ "label": "Lipsync",
+ "path": "lipsync"
+ },
+ {
+ "label": "Talking Avatar Video",
+ "path": "talking-avatar-video"
+ }
+ ]
+ },
+ {
+ "title": "Build an agent",
+ "links": [
+ {
+ "label": "Instant Agent Genesis",
+ "path": "genesis"
+ },
+ {
+ "label": "Agent Genome (breeding)",
+ "path": "genome"
+ },
+ {
+ "label": "Agent Studio",
+ "path": "agent-studio"
+ },
+ {
+ "label": "Multi-LLM Brain",
+ "path": "brain"
+ },
+ {
+ "label": "Agent Galaxy",
+ "path": "galaxy"
+ },
+ {
+ "label": "Integrations",
+ "path": "integrations"
+ }
+ ]
+ },
+ {
+ "title": "Trading & markets",
+ "links": [
+ {
+ "label": "Coin Autopilot",
+ "path": "autopilot"
+ },
+ {
+ "label": "Signal Marketplace",
+ "path": "signals"
+ },
+ {
+ "label": "The AGI",
+ "path": "agi"
+ },
+ {
+ "label": "Alpha Co-pilot",
+ "path": "alpha-copilot"
+ },
+ {
+ "label": "Guardian console",
+ "path": "guardian"
+ },
+ {
+ "label": "Strategy Objects",
+ "path": "strategy-objects"
+ },
+ {
+ "label": "Mission Control (terminal)",
+ "path": "terminal"
+ },
+ {
+ "label": "Smart Money Radar",
+ "path": "smart-money"
+ },
+ {
+ "label": "Coin Radar",
+ "path": "radar"
+ },
+ {
+ "label": "Coin Clash",
+ "path": "clash"
+ },
+ {
+ "label": "x402 Studio",
+ "path": "x402-studio"
+ },
+ {
+ "label": "Fact Check",
+ "path": "fact-check"
+ },
+ {
+ "label": "Trading Copilot",
+ "path": "trading-copilot"
+ },
+ {
+ "label": "Earned autonomy (fleet self-tuning)",
+ "path": "sniper-autonomy"
+ },
+ {
+ "label": "Trader Card (claim your wallet)",
+ "path": "trader-card"
+ },
+ {
+ "label": "Clip Director",
+ "path": "clip-director"
+ },
+ {
+ "label": "KOL Tracker",
+ "path": "kol-tracker"
+ },
+ {
+ "label": "Copy trading (mirror)",
+ "path": "copy-trading"
+ },
+ {
+ "label": "Reasoning Ledger (verifiable decisions)",
+ "path": "reasoning-ledger"
+ },
+ {
+ "label": "Coin & market pages",
+ "path": "coin-pages"
+ }
+ ]
+ },
+ {
+ "title": "Getting started",
+ "links": [
+ {
+ "label": "Introduction",
+ "path": "introduction"
+ },
+ {
+ "label": "Quick start",
+ "path": "quick-start"
+ },
+ {
+ "label": "Getting started (hosted)",
+ "path": "tutorials/getting-started"
+ },
+ {
+ "label": "Deployment",
+ "path": "deployment"
+ }
+ ]
+ },
+ {
+ "title": "Core concepts",
+ "links": [
+ {
+ "label": "How it works",
+ "path": "how-it-works"
+ },
+ {
+ "label": "Architecture overview",
+ "path": "architecture"
+ },
+ {
+ "label": "Agent system",
+ "path": "agent-system"
+ },
+ {
+ "label": "Agent reputation",
+ "path": "agent-reputation"
+ },
+ {
+ "label": "Solana reputation",
+ "path": "solana-reputation"
+ },
+ {
+ "label": "Memory system",
+ "path": "memory"
+ },
+ {
+ "label": "Skills system",
+ "path": "skills"
+ },
+ {
+ "label": "Multi-agent",
+ "path": "multi-agent"
+ },
+ {
+ "label": "IRL (agents in the real world)",
+ "path": "irl"
+ },
+ {
+ "label": "World Lines (proof of presence)",
+ "path": "world-lines"
+ },
+ {
+ "label": "Walk Leaderboard",
+ "path": "walk-leaderboard"
+ },
+ {
+ "label": "Permissions",
+ "path": "permissions"
+ },
+ {
+ "label": "Layers",
+ "path": "layers"
+ }
+ ]
+ },
+ {
+ "title": "Economy & payments",
+ "links": [
+ {
+ "label": "Circulation engine",
+ "path": "circulation-engine"
+ },
+ {
+ "label": "Money feed",
+ "path": "money-feed"
+ },
+ {
+ "label": "Agent wallets",
+ "path": "agent-wallets"
+ },
+ {
+ "label": "Marketplace",
+ "path": "marketplace"
+ },
+ {
+ "label": "Coin launches",
+ "path": "coin-launches"
+ },
+ {
+ "label": "x402 protocol",
+ "path": "x402"
+ },
+ {
+ "label": "x402 paid endpoints",
+ "path": "x402-endpoints"
+ },
+ {
+ "label": "x402 buyer client",
+ "path": "x402-buyer"
+ },
+ {
+ "label": "Autonomous x402 loop",
+ "path": "autonomous-x402"
+ },
+ {
+ "label": "x402 developer tools",
+ "path": "x402-dev-tools"
+ },
+ {
+ "label": "x402 revenue & receipts",
+ "path": "x402-revenue"
+ },
+ {
+ "label": "Market Data API (x402)",
+ "path": "market-data-api"
+ },
+ {
+ "label": "Premium Data API pass",
+ "path": "premium"
+ },
+ {
+ "label": "Pump Launcher (paid launch API)",
+ "path": "pump-launcher"
+ },
+ {
+ "label": "Launch Studio recipes",
+ "path": "launch-usecases"
+ },
+ {
+ "label": "Remix economy & royalties",
+ "path": "remix"
+ },
+ {
+ "label": "Embody (x402 3D body)",
+ "path": "embody"
+ },
+ {
+ "label": "Custody, limits & recovery",
+ "path": "custody"
+ },
+ {
+ "label": "Payment Sessions (spend envelopes)",
+ "path": "payment-sessions"
+ },
+ {
+ "label": "Agent wallet control API",
+ "path": "agent-wallet-api"
+ },
+ {
+ "label": "USDC agent vaults",
+ "path": "vaults"
+ },
+ {
+ "label": "CA to x402 (mint to endpoint)",
+ "path": "ca2x402"
+ },
+ {
+ "label": "Agent economy volume",
+ "path": "agent-economy-volume"
+ },
+ {
+ "label": "Viability (on-chain unit economics)",
+ "path": "viability"
+ },
+ {
+ "label": "Your master wallet",
+ "path": "user-wallet"
+ },
+ {
+ "label": "Agent-Forged Gallery",
+ "path": "forged"
+ },
+ {
+ "label": "Minted 3D assets",
+ "path": "minted"
+ },
+ {
+ "label": "Agent Symphony (economy as music)",
+ "path": "agent-symphony"
+ },
+ {
+ "label": "AgenC",
+ "path": "agenc"
+ }
+ ]
+ },
+ {
+ "title": "Guides",
+ "links": [
+ {
+ "label": "Embedding",
+ "path": "embedding"
+ },
+ {
+ "label": "Concierge (AI chat widget)",
+ "path": "concierge"
+ },
+ {
+ "label": "Assistant widget (3D avatar)",
+ "path": "assistant-widget"
+ },
+ {
+ "label": "3D Viewer",
+ "path": "viewer"
+ },
+ {
+ "label": "Editor guide",
+ "path": "editor"
+ },
+ {
+ "label": "Animations (clips & slots)",
+ "path": "animations"
+ },
+ {
+ "label": "Avatar inspector",
+ "path": "avatar-inspector"
+ },
+ {
+ "label": "AR & WebXR",
+ "path": "ar"
+ },
+ {
+ "label": "Authentication",
+ "path": "authentication"
+ },
+ {
+ "label": "Avatar creation",
+ "path": "avatar-creation"
+ },
+ {
+ "label": "Avatar pipeline (end to end)",
+ "path": "avatar-pipeline"
+ },
+ {
+ "label": "ERC-8004",
+ "path": "erc8004"
+ },
+ {
+ "label": "Reputation system",
+ "path": "reputation"
+ },
+ {
+ "label": "Validation attestations",
+ "path": "validation"
+ },
+ {
+ "label": "3D provenance (verify authenticity)",
+ "path": "provenance"
+ },
+ {
+ "label": "SAS attestations",
+ "path": "sas-attestations"
+ },
+ {
+ "label": "Solana agents",
+ "path": "solana"
+ },
+ {
+ "label": "Deploy agents on-chain (bulk)",
+ "path": "onchain-agents"
+ },
+ {
+ "label": "On-chain deployments feed",
+ "path": "deployments"
+ },
+ {
+ "label": "Solana pump.fun signals",
+ "path": "solana-pumpfun"
+ },
+ {
+ "label": "Mint mark (\"3ws\")",
+ "path": "mint-mark"
+ },
+ {
+ "label": "Security",
+ "path": "security"
+ },
+ {
+ "label": "Configuration",
+ "path": "configuration"
+ },
+ {
+ "label": "Agent Skills pack (Claude)",
+ "path": "agent-skills"
+ },
+ {
+ "label": "Notifications",
+ "path": "notifications"
+ },
+ {
+ "label": "Creator portfolio",
+ "path": "creator-portfolio"
+ },
+ {
+ "label": "Contributing",
+ "path": "contributing"
+ }
+ ]
+ },
+ {
+ "title": "SDK / API reference",
+ "links": [
+ {
+ "label": "REST API",
+ "path": "api-reference"
+ },
+ {
+ "label": "3D API (free text to 3D)",
+ "path": "3d-api"
+ },
+ {
+ "label": "Media & render API",
+ "path": "media-api"
+ },
+ {
+ "label": "Developer platform (keys, webhooks)",
+ "path": "developer-platform"
+ },
+ {
+ "label": "Crypto Data API (free)",
+ "path": "crypto-api"
+ },
+ {
+ "label": "3D Studio MCP (free)",
+ "path": "mcp-studio"
+ },
+ {
+ "label": "Agent manifest",
+ "path": "agent-manifest"
+ },
+ {
+ "label": "ERC-8004 smart contracts",
+ "path": "smart-contracts"
+ },
+ {
+ "label": "JavaScript API",
+ "path": "js-api"
+ },
+ {
+ "label": "Web component",
+ "path": "web-component"
+ },
+ {
+ "label": "MCP",
+ "path": "mcp"
+ },
+ {
+ "label": "MCP tools catalog",
+ "path": "mcp-tools"
+ },
+ {
+ "label": "Spatial MCP (3D responses)",
+ "path": "spatial-mcp"
+ },
+ {
+ "label": "SDK",
+ "path": "sdk"
+ },
+ {
+ "label": "Widgets",
+ "path": "widgets"
+ },
+ {
+ "label": "Widget Studio",
+ "path": "widget-studio"
+ },
+ {
+ "label": "Widget API (JSON-RPC)",
+ "path": "widget-api"
+ },
+ {
+ "label": "Widget reference",
+ "href": "/docs/widgets",
+ "external": true
+ }
+ ]
+ },
+ {
+ "title": "Integrations",
+ "links": [
+ {
+ "label": "NVIDIA free models",
+ "path": "nvidia-models"
+ },
+ {
+ "label": "IBM watsonx & Granite",
+ "path": "ibm"
+ },
+ {
+ "label": "IBM x402 MCP",
+ "path": "ibm-x402-mcp"
+ },
+ {
+ "label": "BNB payments",
+ "path": "bnb-payments"
+ },
+ {
+ "label": "BNB vault",
+ "path": "bnb-vault"
+ }
+ ]
+ },
+ {
+ "title": "Tutorials",
+ "links": [
+ {
+ "label": "Text prompt to 3D model",
+ "path": "tutorials/text-to-3d"
+ },
+ {
+ "label": "Photos to 3D model",
+ "path": "tutorials/image-to-3d"
+ },
+ {
+ "label": "Prompt recipes for 3D",
+ "path": "tutorials/prompts-for-3d"
+ },
+ {
+ "label": "Generate 3D from code",
+ "path": "tutorials/generate-3d-api"
+ },
+ {
+ "label": "Place your model in AR",
+ "path": "tutorials/view-in-ar"
+ },
+ {
+ "label": "Make your avatar sign (ASL)",
+ "path": "tutorials/sign-with-your-avatar"
+ },
+ {
+ "label": "Place an agent in the real world",
+ "path": "tutorials/place-agent-irl"
+ },
+ {
+ "label": "Build your first agent",
+ "path": "tutorials/first-agent"
+ },
+ {
+ "label": "Personal AI site",
+ "path": "tutorials/personal-ai-site"
+ },
+ {
+ "label": "Create a custom skill",
+ "path": "tutorials/custom-skill"
+ },
+ {
+ "label": "Embed on a website",
+ "path": "tutorials/embed-on-website"
+ },
+ {
+ "label": "Build a site concierge",
+ "path": "tutorials/build-a-site-concierge"
+ },
+ {
+ "label": "Add a 3D avatar assistant",
+ "path": "tutorials/add-a-3d-assistant"
+ },
+ {
+ "label": "Register on-chain",
+ "path": "tutorials/register-onchain"
+ },
+ {
+ "label": "Give an agent a spending envelope",
+ "path": "tutorials/agent-spending-envelope"
+ },
+ {
+ "label": "Render avatar images anywhere",
+ "path": "tutorials/render-avatar-images"
+ },
+ {
+ "label": "Library character to live embed",
+ "path": "tutorials/character-library-to-embed"
+ },
+ {
+ "label": "Read an agent's reputation",
+ "path": "tutorials/agent-reputation"
+ },
+ {
+ "label": "Read a Solana agent's reputation",
+ "path": "tutorials/solana-agent-reputation"
+ }
+ ]
+ },
+ {
+ "title": "Reference",
+ "links": [
+ {
+ "label": "Docs World (3D docs)",
+ "path": "docs-world"
+ },
+ {
+ "label": "Examples",
+ "path": "examples"
+ },
+ {
+ "label": "Listings & distribution",
+ "path": "listings"
+ },
+ {
+ "label": "The Story So Far (3D timeline)",
+ "path": "timeline"
+ },
+ {
+ "label": "Press kit",
+ "path": "press-kit"
+ },
+ {
+ "label": "Partner ecosystem",
+ "path": "partners"
+ },
+ {
+ "label": "Daily Match",
+ "path": "daily-match"
+ },
+ {
+ "label": "Troubleshooting",
+ "path": "troubleshooting"
+ },
+ {
+ "label": "Changelog",
+ "path": "changelog"
+ }
+ ]
+ }
+ ]
+}
diff --git a/examples/paid-mcp-server/package.json b/examples/paid-mcp-server/package.json
new file mode 100644
index 000000000..b6303c1ab
--- /dev/null
+++ b/examples/paid-mcp-server/package.json
@@ -0,0 +1,23 @@
+{
+ "name": "@three-ws/example-paid-mcp-server",
+ "private": true,
+ "version": "0.1.0",
+ "type": "module",
+ "description": "A complete MCP server whose tools charge per call in USDC on Solana via x402: one free orientation tool and one paid glTF/GLB inspection tool.",
+ "scripts": {
+ "start": "node src/index.js",
+ "test": "node --test \"test/**/*.test.mjs\"",
+ "inspect": "npx -y @modelcontextprotocol/inspector node src/index.js"
+ },
+ "dependencies": {
+ "@modelcontextprotocol/sdk": "^1.29.0",
+ "@x402/core": "^2.14.0",
+ "@x402/extensions": "^2.14.0",
+ "@x402/mcp": "^2.14.0",
+ "@x402/svm": "^2.14.0",
+ "zod": "^3.23.8"
+ },
+ "engines": {
+ "node": ">=20"
+ }
+}
diff --git a/examples/paid-mcp-server/src/gltf.js b/examples/paid-mcp-server/src/gltf.js
new file mode 100644
index 000000000..70a6ad2ba
--- /dev/null
+++ b/examples/paid-mcp-server/src/gltf.js
@@ -0,0 +1,307 @@
+// Real glTF/GLB fetching and structural parsing, with no dependencies.
+//
+// Two jobs live here, and both are the paid tool's actual product:
+// 1. fetchModel() — an SSRF-guarded, size-capped, timeout-bounded HTTPS fetch.
+// 2. inspectModel() — parse the container (GLB binary or .gltf JSON) and report
+// what is inside it, plus optimization findings a caller can act on.
+//
+// The parser reads the glTF JSON chunk only. That is enough for every structural
+// count, keeps the memory profile flat on large models, and never executes or
+// trusts model content.
+
+import { lookup } from 'node:dns/promises';
+import { isIP } from 'node:net';
+
+const GLB_MAGIC = 0x46546c67; // "glTF" little-endian
+const CHUNK_JSON = 0x4e4f534a; // "JSON"
+const CHUNK_BIN = 0x004e4942; // "BIN\0"
+
+export const MAX_BYTES = 32 * 1024 * 1024;
+export const FETCH_TIMEOUT_MS = 20_000;
+
+/** Errors this module throws carry a stable `code` so tools can map them to clean responses. */
+export class ModelError extends Error {
+ constructor(code, message) {
+ super(message);
+ this.name = 'ModelError';
+ this.code = code;
+ }
+}
+
+function isPrivateAddress(address, family) {
+ if (family === 6) {
+ const a = address.toLowerCase();
+ if (a === '::1' || a === '::') return true;
+ if (a.startsWith('fc') || a.startsWith('fd')) return true; // unique local
+ if (a.startsWith('fe80')) return true; // link local
+ // IPv4-mapped IPv6, e.g. ::ffff:10.0.0.1
+ const mapped = a.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/);
+ if (mapped) return isPrivateAddress(mapped[1], 4);
+ return false;
+ }
+ const [a, b] = address.split('.').map(Number);
+ if (a === 10 || a === 127 || a === 0) return true;
+ if (a === 169 && b === 254) return true;
+ if (a === 172 && b >= 16 && b <= 31) return true;
+ if (a === 192 && b === 168) return true;
+ if (a === 100 && b >= 64 && b <= 127) return true; // carrier-grade NAT
+ return false;
+}
+
+/**
+ * Reject anything that is not a public HTTPS origin before a single byte moves.
+ * A paid endpoint that fetches arbitrary URLs is an internal-network probe unless
+ * it does exactly this.
+ */
+export async function assertPublicHttpsUrl(rawUrl) {
+ let url;
+ try {
+ url = new URL(rawUrl);
+ } catch {
+ throw new ModelError('invalid_url', `Not a valid URL: ${rawUrl}`);
+ }
+ if (url.protocol !== 'https:') {
+ throw new ModelError('insecure_url', 'Only https:// model URLs are accepted.');
+ }
+ const host = url.hostname.replace(/^\[|\]$/g, '');
+ const literalFamily = isIP(host);
+ if (literalFamily) {
+ if (isPrivateAddress(host, literalFamily)) {
+ throw new ModelError('blocked_host', 'That address is not publicly routable.');
+ }
+ return url;
+ }
+ const records = await lookup(host, { all: true, verbatim: true });
+ if (!records.length) throw new ModelError('dns_failed', `Could not resolve ${host}.`);
+ for (const record of records) {
+ if (isPrivateAddress(record.address, record.family)) {
+ throw new ModelError('blocked_host', `${host} resolves to a private address.`);
+ }
+ }
+ return url;
+}
+
+/** Fetch a model with a hard byte ceiling, so a hostile URL cannot exhaust memory. */
+export async function fetchModel(rawUrl, { maxBytes = MAX_BYTES, timeoutMs = FETCH_TIMEOUT_MS } = {}) {
+ const url = await assertPublicHttpsUrl(rawUrl);
+ const controller = new AbortController();
+ const timer = setTimeout(() => controller.abort(), timeoutMs);
+ try {
+ const res = await fetch(url, {
+ signal: controller.signal,
+ redirect: 'error',
+ headers: { accept: 'model/gltf-binary, model/gltf+json, application/octet-stream, */*' },
+ });
+ if (!res.ok) {
+ throw new ModelError('fetch_failed', `Model host answered ${res.status}.`);
+ }
+ const declared = Number(res.headers.get('content-length') || 0);
+ if (declared > maxBytes) {
+ throw new ModelError('too_large', `Model is ${declared} bytes; the ceiling is ${maxBytes}.`);
+ }
+ const buffer = Buffer.from(await res.arrayBuffer());
+ if (buffer.byteLength > maxBytes) {
+ throw new ModelError('too_large', `Model is ${buffer.byteLength} bytes; the ceiling is ${maxBytes}.`);
+ }
+ return buffer;
+ } catch (err) {
+ if (err instanceof ModelError) throw err;
+ if (err?.name === 'AbortError') {
+ throw new ModelError('timeout', `Model fetch exceeded ${timeoutMs}ms.`);
+ }
+ throw new ModelError('fetch_failed', err?.message || 'Model fetch failed.');
+ } finally {
+ clearTimeout(timer);
+ }
+}
+
+/** Pull the glTF JSON document out of a GLB container, or parse a .gltf directly. */
+export function readGltfDocument(buffer) {
+ if (buffer.byteLength >= 12 && buffer.readUInt32LE(0) === GLB_MAGIC) {
+ const version = buffer.readUInt32LE(4);
+ if (version !== 2) {
+ throw new ModelError('unsupported_version', `GLB container version ${version} is not supported (expected 2).`);
+ }
+ let offset = 12;
+ let json = null;
+ let binBytes = 0;
+ while (offset + 8 <= buffer.byteLength) {
+ const chunkLength = buffer.readUInt32LE(offset);
+ const chunkType = buffer.readUInt32LE(offset + 4);
+ const start = offset + 8;
+ const end = start + chunkLength;
+ if (end > buffer.byteLength) {
+ throw new ModelError('corrupt', 'GLB chunk runs past the end of the file.');
+ }
+ if (chunkType === CHUNK_JSON) json = buffer.subarray(start, end).toString('utf8');
+ else if (chunkType === CHUNK_BIN) binBytes = chunkLength;
+ offset = end + ((4 - (chunkLength % 4)) % 4);
+ }
+ if (!json) throw new ModelError('corrupt', 'GLB container has no JSON chunk.');
+ return { document: parseJson(json), container: 'glb', binBytes };
+ }
+ return { document: parseJson(buffer.toString('utf8')), container: 'gltf', binBytes: 0 };
+}
+
+function parseJson(text) {
+ try {
+ return JSON.parse(text);
+ } catch {
+ throw new ModelError('corrupt', 'Model JSON could not be parsed.');
+ }
+}
+
+const count = (value) => (Array.isArray(value) ? value.length : 0);
+
+/** Sum every primitive across every mesh: the number that actually predicts draw calls. */
+function primitiveStats(document) {
+ let primitives = 0;
+ let indexed = 0;
+ let modes = new Set();
+ for (const mesh of document.meshes || []) {
+ for (const primitive of mesh.primitives || []) {
+ primitives += 1;
+ if (primitive.indices !== undefined) indexed += 1;
+ modes.add(primitive.mode ?? 4);
+ }
+ }
+ return { primitives, indexed, modes: [...modes].sort((a, b) => a - b) };
+}
+
+/** Vertex and triangle totals, read from accessor counts rather than estimated. */
+function geometryStats(document) {
+ const accessors = document.accessors || [];
+ let vertices = 0;
+ let triangles = 0;
+ for (const mesh of document.meshes || []) {
+ for (const primitive of mesh.primitives || []) {
+ const position = primitive.attributes?.POSITION;
+ if (position !== undefined && accessors[position]) vertices += accessors[position].count || 0;
+ const mode = primitive.mode ?? 4;
+ if (mode !== 4) continue;
+ if (primitive.indices !== undefined && accessors[primitive.indices]) {
+ triangles += Math.floor((accessors[primitive.indices].count || 0) / 3);
+ } else if (position !== undefined && accessors[position]) {
+ triangles += Math.floor((accessors[position].count || 0) / 3);
+ }
+ }
+ }
+ return { vertices, triangles };
+}
+
+/** Textures that ship as raw pixels inside the container, the usual size culprit. */
+function imageStats(document) {
+ let embedded = 0;
+ let external = 0;
+ let dataUri = 0;
+ for (const image of document.images || []) {
+ if (image.bufferView !== undefined) embedded += 1;
+ else if (typeof image.uri === 'string' && image.uri.startsWith('data:')) dataUri += 1;
+ else if (image.uri) external += 1;
+ }
+ return { embedded, external, dataUri };
+}
+
+function morphTargetCount(document) {
+ let targets = 0;
+ for (const mesh of document.meshes || []) {
+ for (const primitive of mesh.primitives || []) {
+ targets += count(primitive.targets);
+ }
+ }
+ return targets;
+}
+
+/**
+ * Turn the raw counts into findings worth paying for: each one names the problem,
+ * the evidence, and the fix.
+ */
+function findings(stats) {
+ const out = [];
+ if (stats.geometry.triangles > 250_000) {
+ out.push({
+ severity: 'high',
+ issue: 'Very high triangle count',
+ detail: `${stats.geometry.triangles.toLocaleString()} triangles will stall low-end GPUs and mobile browsers.`,
+ fix: 'Decimate the mesh or ship an LOD chain. Target 150k triangles or fewer for web delivery.',
+ });
+ }
+ if (stats.images.embedded + stats.images.dataUri > 0 && stats.sizeBytes > 12 * 1024 * 1024) {
+ out.push({
+ severity: 'high',
+ issue: 'Large file with embedded textures',
+ detail: `${(stats.sizeBytes / 1024 / 1024).toFixed(1)} MB with ${stats.images.embedded + stats.images.dataUri} embedded image(s).`,
+ fix: 'Compress textures to KTX2/Basis and enable Draco or Meshopt geometry compression.',
+ });
+ }
+ if (!stats.extensionsUsed.some((e) => e.includes('draco') || e.includes('meshopt') || e.includes('EXT_meshopt'))) {
+ out.push({
+ severity: stats.sizeBytes > 4 * 1024 * 1024 ? 'medium' : 'low',
+ issue: 'No geometry compression',
+ detail: 'The model declares neither KHR_draco_mesh_compression nor EXT_meshopt_compression.',
+ fix: 'Run gltf-transform with meshopt compression. Typical saving is 40 to 70 percent of the geometry payload.',
+ });
+ }
+ if (stats.primitives.primitives > 0 && stats.primitives.indexed < stats.primitives.primitives) {
+ out.push({
+ severity: 'medium',
+ issue: 'Unindexed primitives',
+ detail: `${stats.primitives.primitives - stats.primitives.indexed} of ${stats.primitives.primitives} primitives ship without an index buffer.`,
+ fix: 'Weld and index the geometry. Unindexed triangle soup wastes both bandwidth and vertex cache.',
+ });
+ }
+ if (stats.materials > 24) {
+ out.push({
+ severity: 'medium',
+ issue: 'High material count',
+ detail: `${stats.materials} materials means at least ${stats.materials} draw calls per frame.`,
+ fix: 'Atlas the textures and merge materials that differ only by base color.',
+ });
+ }
+ if (stats.animations === 0 && stats.skins > 0) {
+ out.push({
+ severity: 'low',
+ issue: 'Skinned mesh with no animation',
+ detail: 'The model carries a skeleton but ships no animation clips.',
+ fix: 'Retarget a clip onto the rig, or drop the skin if the model is meant to be static.',
+ });
+ }
+ if (!out.length) {
+ out.push({
+ severity: 'none',
+ issue: 'No structural problems found',
+ detail: 'Counts, compression, and indexing all look healthy for web delivery.',
+ fix: 'Ship it.',
+ });
+ }
+ return out;
+}
+
+/** The paid tool's whole product: a structural report plus actionable findings. */
+export function inspectModel(buffer, { sourceUrl } = {}) {
+ const { document, container, binBytes } = readGltfDocument(buffer);
+ const stats = {
+ source: sourceUrl || null,
+ container,
+ sizeBytes: buffer.byteLength,
+ binaryChunkBytes: binBytes,
+ generator: document.asset?.generator || null,
+ gltfVersion: document.asset?.version || null,
+ scenes: count(document.scenes),
+ nodes: count(document.nodes),
+ meshes: count(document.meshes),
+ materials: count(document.materials),
+ textures: count(document.textures),
+ images: imageStats(document),
+ samplers: count(document.samplers),
+ animations: count(document.animations),
+ skins: count(document.skins),
+ cameras: count(document.cameras),
+ morphTargets: morphTargetCount(document),
+ primitives: primitiveStats(document),
+ geometry: geometryStats(document),
+ extensionsUsed: document.extensionsUsed || [],
+ extensionsRequired: document.extensionsRequired || [],
+ };
+ return { ...stats, findings: findings(stats) };
+}
diff --git a/packages/avatar-cli/src/cli.js b/packages/avatar-cli/src/cli.js
index ac38a3db9..2c394e08f 100755
--- a/packages/avatar-cli/src/cli.js
+++ b/packages/avatar-cli/src/cli.js
@@ -26,7 +26,7 @@ const COMMANDS = {
--out <path> Write manifest to a file instead of stdout
${style.dim('example')}
- three-ws-avatar init --owner 0x742d35… --name "Nicholas" --mesh ./avatar.glb --out manifest.json`,
+ three-ws-avatar init --owner 0x742d35… --name "Nicholas" --mesh ./michelle.glb --out manifest.json`,
},
validate: {
run: validate,
@@ -45,10 +45,10 @@ const COMMANDS = {
usage: `${style.bold('three-ws-avatar hash')} ${style.dim('<path> [--json]')}
Print the lowercase hex SHA-256 of a file's bytes — pipe-friendly:
- sha=$(three-ws-avatar hash ./avatar.glb)
+ sha=$(three-ws-avatar hash ./michelle.glb)
${style.dim('example')}
- three-ws-avatar hash ./avatar.glb --json`,
+ three-ws-avatar hash ./michelle.glb --json`,
},
preview: {
run: preview,
@@ -83,9 +83,9 @@ ${style.bold('global options')}
--no-color Disable colored output
${style.bold('examples')}
- ${style.dim('three-ws-avatar init --owner 0xabc… --name "Nicholas" --mesh ./avatar.glb --out manifest.json')}
+ ${style.dim('three-ws-avatar init --owner 0xabc… --name "Nicholas" --mesh ./michelle.glb --out manifest.json')}
${style.dim('three-ws-avatar validate manifest.json')}
- ${style.dim('three-ws-avatar hash ./avatar.glb')}
+ ${style.dim('three-ws-avatar hash ./michelle.glb')}
${style.dim('three-ws-avatar preview manifest.json')}
${style.dim(`${symbols.arrow} docs: https://three.ws ${symbols.bullet} issues: https://github.com/nirholas/three.ws/issues`)}
diff --git a/packages/avatar-cli/src/commands/hash.js b/packages/avatar-cli/src/commands/hash.js
index 45d65f5d4..7f497783b 100644
--- a/packages/avatar-cli/src/commands/hash.js
+++ b/packages/avatar-cli/src/commands/hash.js
@@ -7,7 +7,7 @@ import { failure } from '../style.js';
* `three-ws-avatar hash <path>` — SHA-256 of file bytes, lowercase hex.
*
* Prints the hash as a single line on stdout so it can be piped:
- * sha=$(three-ws-avatar hash ./avatar.glb)
+ * sha=$(three-ws-avatar hash ./michelle.glb)
* Stdout stays the raw hex (or JSON with --json) — never decorated.
*/
export async function hash({ positional, flags }) {
diff --git a/packages/avatar-cli/src/commands/init.js b/packages/avatar-cli/src/commands/init.js
index 6caf4ee7f..5189c0060 100644
--- a/packages/avatar-cli/src/commands/init.js
+++ b/packages/avatar-cli/src/commands/init.js
@@ -64,7 +64,7 @@ export async function init({ flags }) {
!meshPath && '--mesh',
].filter(Boolean);
failure(`init: missing required ${missing.length === 1 ? 'flag' : 'flags'} ${style.bold(missing.join(', '))}`);
- hint('three-ws-avatar init --owner 0x742d35… --name "Nicholas" --mesh ./avatar.glb');
+ hint('three-ws-avatar init --owner 0x742d35… --name "Nicholas" --mesh ./michelle.glb');
return 1;
}
diff --git a/packages/avatar-cli/src/commands/preview.js b/packages/avatar-cli/src/commands/preview.js
index af9f8402e..12c6b4e73 100644
--- a/packages/avatar-cli/src/commands/preview.js
+++ b/packages/avatar-cli/src/commands/preview.js
@@ -1,15 +1,20 @@
import { readFileSync } from 'node:fs';
import { resolve } from 'node:path';
import { assertValid } from '@three-ws/avatar-schema';
-import { style, heading, failure } from '../style.js';
+import { style, heading, failure, warn, hint } from '../style.js';
const DEFAULT_VIEWER = 'https://three.ws';
/**
- * `three-ws-avatar preview <path>` — print an embeddable snippet for a validated manifest.
+ * `three-ws-avatar preview <path>` - print an embeddable snippet for a validated manifest.
*
- * Outputs both the <three-ws-avatar> custom-element snippet and a resolver URL
- * pointing at the three.ws viewer for the avatar's id.
+ * Outputs a resolver URL, an <agent-3d> custom-element snippet paired with the
+ * loader that registers it, and a zero-install iframe.
+ *
+ * `agent-3d` is the element three.ws actually registers (src/element.js and
+ * public/embed.js). A bare .glb/.gltf on `src` is treated as a body, so the
+ * mesh URI can be passed straight through. The snippet is emitted with its
+ * loader because the element does nothing until that script has run.
*
* Flags:
* --viewer <origin> Override the viewer host (default: https://three.ws)
@@ -35,16 +40,24 @@ export async function preview({ positional, flags }) {
const viewer = (flags.viewer || DEFAULT_VIEWER).replace(/\/$/, '');
const encodedId = encodeURIComponent(manifest.id);
const resolverUrl = `${viewer}/a/${encodedId}`;
- const element = `<three-ws-avatar id="${manifest.id}" src="${manifest.mesh.uri}"></three-ws-avatar>`;
+ const meshUri = manifest.mesh.uri;
+ const loader = `<script type="module" src="${viewer}/agent-3d/latest/agent-3d.js"></script>`;
+ const element = `<agent-3d src="${meshUri}" style="width:400px;height:600px"></agent-3d>`;
const iframe = `<iframe src="${resolverUrl}" width="480" height="640" frameborder="0" allow="camera; microphone; xr-spatial-tracking"></iframe>`;
+ // A manifest scaffolded without --mesh-uri points at the local file, which no
+ // browser will load cross-origin. Say so instead of printing a dead snippet.
+ const meshIsLocal = /^file:\/\//i.test(meshUri);
if (flags.json) {
console.log(
JSON.stringify({
id: manifest.id,
resolverUrl,
+ loader,
element,
iframe,
+ meshUri,
+ meshIsLocal,
schemaVersion: manifest.schemaVersion,
}),
);
@@ -56,10 +69,16 @@ export async function preview({ positional, flags }) {
console.log(heading('resolver url'));
console.log(resolverUrl);
console.log('');
- console.log(heading('web component — requires @three-ws/avatar on the page'));
+ console.log(heading('web component (loader registers <agent-3d>)'));
+ console.log(loader);
console.log(element);
console.log('');
- console.log(heading('iframe — zero-install'));
+ console.log(heading('iframe (zero-install)'));
console.log(iframe);
+ if (meshIsLocal) {
+ process.stderr.write('\n');
+ warn('mesh.uri is a local path, so the snippet above will not load in a browser.');
+ hint('re-run init with --mesh-uri https://your-host/avatar.glb, or edit mesh.uri to a public URL');
+ }
return 0;
}
diff --git a/packages/sign-language/LICENSE b/packages/sign-language/LICENSE
new file mode 100644
index 000000000..dff21b7f4
--- /dev/null
+++ b/packages/sign-language/LICENSE
@@ -0,0 +1,20 @@
+Copyright 2026 nirholas
+
+All rights reserved.
+
+This software is proprietary and may not be used, copied, modified, distributed,
+translated, or made available to any third party without the express written
+permission of the copyright owner.
+
+No rights are granted by implication, estoppel, or otherwise. Use of this
+software is subject to the terms of a separate license agreement with the
+copyright owner.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
+
+IN NO EVENT SHALL THE COPYRIGHT OWNER BE LIABLE FOR ANY CLAIM, DAMAGES, OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE,
+ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
diff --git a/packages/sign-language/build.mjs b/packages/sign-language/build.mjs
new file mode 100644
index 000000000..d50698678
--- /dev/null
+++ b/packages/sign-language/build.mjs
@@ -0,0 +1,31 @@
+#!/usr/bin/env node
+// Build @three-ws/sign-language into a self-contained, publishable ES module.
+// ===========================================================================
+// The entry re-exports the ASL engine from the monorepo source; esbuild bundles
+// those files into dist/index.mjs with NO externals, because the engine has no
+// runtime dependencies at all (no three.js, no DOM APIs). Same publish pattern
+// as @three-ws/retarget.
+
+import { build } from 'esbuild';
+import { mkdirSync, rmSync } from 'node:fs';
+import { dirname, resolve } from 'node:path';
+import { fileURLToPath } from 'node:url';
+
+const here = dirname(fileURLToPath(import.meta.url));
+const outDir = resolve(here, 'dist');
+
+rmSync(outDir, { recursive: true, force: true });
+mkdirSync(outDir, { recursive: true });
+
+await build({
+ entryPoints: [resolve(here, 'src/index.js')],
+ outfile: resolve(outDir, 'index.mjs'),
+ bundle: true,
+ format: 'esm',
+ platform: 'neutral',
+ target: 'es2020',
+ legalComments: 'none',
+ logLevel: 'info',
+});
+
+console.log('[sign-language] built dist/index.mjs');
diff --git a/packages/sign-language/package.json b/packages/sign-language/package.json
new file mode 100644
index 000000000..e5040c588
--- /dev/null
+++ b/packages/sign-language/package.json
@@ -0,0 +1,66 @@
+{
+ "name": "@three-ws/sign-language",
+ "version": "0.1.0",
+ "description": "American Sign Language for 3D avatars. Compile text into one continuous signed animation clip: known words sign from a lexicon of anatomically described signs, everything else fingerspells, with contact solving and non-manual facial markers. Zero runtime dependencies.",
+ "keywords": [
+ "asl",
+ "american-sign-language",
+ "sign-language",
+ "fingerspelling",
+ "accessibility",
+ "a11y",
+ "deaf",
+ "animation",
+ "avatar",
+ "humanoid",
+ "rig",
+ "skeleton",
+ "inverse-kinematics",
+ "gltf",
+ "glb",
+ "3d"
+ ],
+ "author": "three.ws <[email protected]> (https://three.ws)",
+ "license": "SEE LICENSE IN LICENSE",
+ "homepage": "https://three.ws/sign-language",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/nirholas/three.ws.git",
+ "directory": "packages/sign-language"
+ },
+ "bugs": {
+ "url": "https://github.com/nirholas/three.ws/issues"
+ },
+ "type": "module",
+ "main": "./dist/index.mjs",
+ "module": "./dist/index.mjs",
+ "exports": {
+ ".": {
+ "import": "./dist/index.mjs",
+ "default": "./dist/index.mjs"
+ },
+ "./package.json": "./package.json"
+ },
+ "files": [
+ "dist",
+ "example",
+ "README.md",
+ "LICENSE"
+ ],
+ "sideEffects": false,
+ "scripts": {
+ "build": "node build.mjs",
+ "test": "node --test test/*.test.mjs",
+ "example": "node example/compile-utterance.mjs",
+ "prepublishOnly": "npm run build && npm test"
+ },
+ "devDependencies": {
+ "esbuild": "^0.27.7"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "publishConfig": {
+ "access": "public"
+ }
+}
diff --git a/packages/sign-language/src/index.js b/packages/sign-language/src/index.js
new file mode 100644
index 000000000..b26f44268
--- /dev/null
+++ b/packages/sign-language/src/index.js
@@ -0,0 +1,85 @@
+// @three-ws/sign-language — public entry.
+// =========================================
+// Re-exports the platform's American Sign Language engine from the monorepo
+// source; the publish build bundles everything into dist/index.mjs, so npm
+// consumers get one standalone module with ZERO runtime dependencies (no
+// three.js, no DOM, no network). It runs in a browser, in Node, and in a test
+// runner identically.
+//
+// 1. speak — text in, one continuous signed AnimationClip out. Known
+// words sign from the lexicon, the rest fingerspell, in a
+// single utterance with no seam between them.
+// 2. spell — the manual alphabet: A-Z, 0-9, the traced J and Z, and the
+// double-letter bounce.
+// 3. lexicon — the sign vocabulary, each entry a set of phases described
+// anatomically (handshape, place on the body, movement).
+// 4. author — the layer signs are written in: handshapes, body anchors,
+// contact solving, non-manual (facial) markers, timelines.
+// 5. kinematics — the canonical-skeleton math the rest is solved on: forward
+// kinematics, two-bone arm IK, and hand geometry.
+//
+// Clips come out as the same clip-JSON document three.ws's animation library
+// serves, so they retarget onto any humanoid rig with finger bones.
+
+// ── 1. speak ───────────────────────────────────────────────────────────────
+export { SignSpeaker, compileUtterance, estimateDuration, utteranceWords, CHAT_TIMING } from '../../../src/sign-speech.js';
+
+// ── 2. spell ───────────────────────────────────────────────────────────────
+export {
+ LETTER_SHAPES,
+ DEFAULT_TIMING,
+ buildFingerspellingClip,
+ letterPose,
+ normalizeWord,
+} from '../../../src/fingerspelling.js';
+
+// ── 3. lexicon ─────────────────────────────────────────────────────────────
+export {
+ SIGNS,
+ SIGNABLE_WORDS,
+ DEFAULT_SIGN_TIMING,
+ buildSignClip,
+ lookupSign,
+ signGloss,
+ signLookup,
+} from '../../../src/sign-dictionary.js';
+
+// ── 4. author ──────────────────────────────────────────────────────────────
+export { HANDSHAPES, HANDSHAPE_NAMES, applyHandshape, handshapeLocals } from '../../../src/sign-handshapes.js';
+
+export {
+ SIGNING_BONES,
+ FACE_MARKERS,
+ SignTimeline,
+ direction,
+ faceWeights,
+ mirrorPhase,
+ neutralPose,
+ place,
+ poseHand,
+ posePhase,
+ restingPose,
+} from '../../../src/sign-clip.js';
+
+// ── 5. kinematics ──────────────────────────────────────────────────────────
+export {
+ ANCHORS,
+ FINGERS,
+ FINGER_JOINTS,
+ Pose,
+ anchorPoint,
+ boneAxis,
+ boneLength,
+ fingerBones,
+ fingerTip,
+ handPartOffset,
+ handPoint,
+ hasBone,
+ parentOf,
+ restLocal,
+ restPos,
+ restWorld,
+ signPoint,
+ solveArm,
+ wristPosition,
+} from '../../../src/sign-rig.js';
diff --git a/pages/docs-world.html b/pages/docs-world.html
new file mode 100644
index 000000000..2c602a5b1
--- /dev/null
+++ b/pages/docs-world.html
@@ -0,0 +1,134 @@
+<!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, viewport-fit=cover" />
+ <title>Docs World · three.ws</title>
+ <meta
+ name="description"
+ content="The three.ws documentation as a walkable 3D world. Every docs section is a glowing pavilion; walk your avatar up to one and read the real pages inside the scene."
+ />
+ <link rel="canonical" href="https://three.ws/docs/world" />
+ <meta property="og:type" content="website" />
+ <meta property="og:site_name" content="three.ws" />
+ <meta property="og:url" content="https://three.ws/docs/world" />
+ <meta property="og:title" content="Docs World · three.ws" />
+ <meta
+ property="og:description"
+ content="Documentation you can walk through: 14 sections as glowing pavilions, your avatar, and the live docs rendered in-world."
+ />
+ <meta property="og:image" content="https://three.ws/api/page-og?s=learn&amp;t=Docs+World+%28immersive+3D+docs%29&amp;d=The+full+three.ws+documentation+as+a+walkable+3D+world%3A+every+docs+section+is+a+glowing+pavilion%2C+and+the+live+pages+render+inside+the+scene.&amp;p=%2Fdocs%2Fworld" />
+ <meta property="og:image:width" content="1200" />
+ <meta property="og:image:height" content="630" />
+ <meta name="twitter:card" content="summary_large_image" />
+ <meta name="twitter:site" content="@trythreews" />
+ <meta name="twitter:title" content="Docs World · three.ws" />
+ <meta
+ name="twitter:description"
+ content="Documentation you can walk through: 14 sections as glowing pavilions, your avatar, and the live docs rendered in-world."
+ />
+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=learn&amp;t=Docs+World+%28immersive+3D+docs%29&amp;d=The+full+three.ws+documentation+as+a+walkable+3D+world%3A+every+docs+section+is+a+glowing+pavilion%2C+and+the+live+pages+render+inside+the+scene.&amp;p=%2Fdocs%2Fworld" />
+ <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1" />
+ <link rel="icon" href="/favicon.ico" sizes="any" />
+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
+ <link rel="apple-touch-icon" href="/apple-touch-icon.png" />
+ <link rel="stylesheet" href="/fonts/fonts.css" />
+ <link rel="stylesheet" href="/docs-world.css" />
+
+ <meta property="og:locale" content="en_US">
+ <meta property="og:image:alt" content="Docs World (immersive 3D docs) · three.ws">
+ <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"Docs World (immersive 3D docs)","description":"The full three.ws documentation as a walkable 3D world: every docs section is a glowing pavilion, and the live pages render inside the scene.","url":"https://three.ws/docs/world","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"},"primaryImageOfPage":"https://three.ws/api/page-og?s=learn&amp;t=Docs+World+%28immersive+3D+docs%29&amp;d=The+full+three.ws+documentation+as+a+walkable+3D+world%3A+every+docs+section+is+a+glowing+pavilion%2C+and+the+live+pages+render+inside+the+scene.&amp;p=%2Fdocs%2Fworld"},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://three.ws/"},{"@type":"ListItem","position":2,"name":"Docs","item":"https://three.ws/docs"},{"@type":"ListItem","position":3,"name":"World","item":"https://three.ws/docs/world"}]}]}</script>
+</head>
+ <body>
+ <main class="dw-stage">
+ <canvas id="dw-canvas" aria-label="Docs World 3D scene. Use WASD or arrow keys to walk, or open the index for a list of sections." tabindex="0"></canvas>
+ </main>
+
+ <!-- HUD: revealed by main.js once the scene is up -->
+ <div id="dw-hud" hidden>
+ <div class="dw-hud-top">
+ <a class="dw-chip" href="/docs" id="dw-back" title="Back to the classic docs">←<span class="dw-chip-label"> Classic docs</span></a>
+ <button class="dw-chip" type="button" id="dw-index-btn" aria-haspopup="true">☰<span class="dw-chip-label"> Index</span></button>
+ <div class="dw-hud-spacer"></div>
+ <button class="dw-chip" type="button" id="dw-camera-btn" title="Cycle camera (C)">Follow</button>
+ <button class="dw-chip" type="button" id="dw-help-btn" aria-label="Controls help">?</button>
+ </div>
+
+ <button class="dw-prompt" type="button" id="dw-prompt" hidden>
+ <kbd>E</kbd> Enter <strong id="dw-prompt-label"></strong>
+ </button>
+
+ <div class="dw-hint" id="dw-hint">WASD walk · Shift run · drag look · E enter · C camera</div>
+
+ <div class="dw-joystick" id="dw-joystick" hidden aria-hidden="true">
+ <div class="dw-joystick-thumb" id="dw-joystick-thumb"></div>
+ </div>
+ </div>
+
+ <!-- Section index: keyboard-reachable list of every pavilion -->
+ <div class="dw-index" id="dw-index" role="dialog" aria-label="Docs sections" hidden>
+ <div class="dw-index-head">
+ <h2>Sections</h2>
+ <button class="dw-close" type="button" id="dw-index-close" aria-label="Close index">✕</button>
+ </div>
+ <div class="dw-index-list" id="dw-index-list"></div>
+ </div>
+
+ <!-- Controls help -->
+ <div class="dw-help" id="dw-help" role="dialog" aria-label="Controls" hidden>
+ <button class="dw-close" type="button" id="dw-help-close" aria-label="Close help">✕</button>
+ <h2>Controls</h2>
+ <table>
+ <tr><td>Walk</td><td>WASD / arrows / left-side joystick</td></tr>
+ <tr><td>Run</td><td>Shift (push the joystick to its edge)</td></tr>
+ <tr><td>Look</td><td>Drag anywhere · scroll to zoom</td></tr>
+ <tr><td>Open a section</td><td>Walk close and press E, or tap its pavilion</td></tr>
+ <tr><td>Camera</td><td>C cycles follow / cinematic / first person / top down</td></tr>
+ <tr><td>Close panels</td><td>Esc</td></tr>
+ </table>
+ </div>
+
+ <!-- Section page list -->
+ <div class="dw-panel" id="dw-panel" role="dialog" aria-labelledby="dw-panel-title" hidden>
+ <div class="dw-panel-head">
+ <h2 id="dw-panel-title"></h2>
+ <button class="dw-close" type="button" id="dw-panel-close" aria-label="Close section">✕</button>
+ </div>
+ <div class="dw-panel-list" id="dw-panel-list"></div>
+ </div>
+
+ <!-- In-world doc reader -->
+ <div class="dw-reader" id="dw-reader" role="dialog" aria-label="Documentation reader" hidden>
+ <div class="dw-reader-card">
+ <div class="dw-reader-head">
+ <span class="dw-reader-crumb" id="dw-reader-crumb"></span>
+ <a class="dw-reader-classic" id="dw-reader-classic" href="/docs">Open in classic docs ↗</a>
+ <button class="dw-close" type="button" id="dw-reader-close" aria-label="Close reader">✕</button>
+ </div>
+ <div class="dw-reader-body" id="dw-reader-body"></div>
+ <div class="dw-reader-foot">
+ <button class="dw-btn ghost" type="button" id="dw-reader-prev">← Previous</button>
+ <button class="dw-btn ghost" type="button" id="dw-reader-next">Next →</button>
+ </div>
+ </div>
+ </div>
+
+ <!-- Boot / capability states -->
+ <div class="dw-center" id="dw-loading">
+ <div class="dw-spinner" aria-hidden="true"></div>
+ <h1>Entering the Docs World…</h1>
+ <p>Loading the documentation and warming up the scene.</p>
+ </div>
+ <div class="dw-center" id="dw-fallback" hidden>
+ <h1>This device can't open the 3D world</h1>
+ <p id="dw-fallback-sub">
+ WebGL isn't available in this browser. The classic docs carry exactly the
+ same content, no 3D required.
+ </p>
+ <a class="dw-btn" href="/docs">Open the classic docs</a>
+ </div>
+
+ <script type="module" src="/src/docs-world/main.js"></script>
+ </body>
+</html>
diff --git a/pages/nvidia/index.html b/pages/nvidia/index.html
new file mode 100644
index 000000000..55f1bdfc8
--- /dev/null
+++ b/pages/nvidia/index.html
@@ -0,0 +1,391 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <style>/* three.ws hidden-guard — make the `hidden` attribute authoritative; see scripts/lib/hidden-guard.mjs */[hidden]{display:none!important}</style>
+ <meta charset="utf-8" />
+ <meta name="viewport" content="width=device-width,initial-scale=1" />
+ <title>three.ws on NVIDIA — free 3D generation on NVIDIA models and GPUs</title>
+ <meta name="description" content="three.ws is a member of the NVIDIA Inception program. Every 3D model, avatar, and voice on the platform runs on NVIDIA: a free hosted lane behind one API key, and a self-hosted fleet of Cloud Run GPU workers on L4 and RTX PRO 6000." />
+ <link rel="canonical" href="https://three.ws/nvidia" />
+
+ <meta property="og:type" content="website" />
+ <meta property="og:title" content="three.ws on NVIDIA" />
+ <meta property="og:description" content="Free text-to-3D on NVIDIA-hosted TRELLIS, plus a self-hosted GPU fleet on L4 and Blackwell. The full model map, the fleet layout, and a call you can run right now." />
+ <meta property="og:url" content="https://three.ws/nvidia" />
+ <meta property="og:image" content="https://three.ws/og-image.png" />
+ <meta property="og:image:width" content="1200" />
+ <meta property="og:image:height" content="630" />
+ <meta property="og:image:alt" content="three.ws on NVIDIA: free 3D generation on NVIDIA models and GPUs." />
+
+ <meta name="twitter:card" content="summary_large_image" />
+ <meta name="twitter:title" content="three.ws on NVIDIA" />
+ <meta name="twitter:description" content="Free text-to-3D on NVIDIA-hosted models, plus a self-hosted GPU fleet on L4 and Blackwell. One key, no account, no cost." />
+ <meta name="twitter:image" content="https://three.ws/og-image.png" />
+ <meta name="twitter:site" content="@trythreews" />
+
+ <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1" />
+ <meta property="og:site_name" content="three.ws" />
+ <meta property="og:locale" content="en_US" />
+
+ <link rel="icon" href="/favicon.ico" />
+ <link rel="stylesheet" href="/nav.css" />
+ <link rel="stylesheet" href="/footer.css" />
+ <script src="/nav.js" defer></script>
+ <style>
+ :root {
+ color-scheme: dark;
+ --accent: #ffffff;
+ --border: #1e2318; --bg: #05070a;
+ --panel: #10140f; --panel2: #161b13;
+ --text: #e8e8f0; --muted: #8b9382;
+ --nv: #76b900; --nv-soft: #a6e34d;
+ }
+ * { box-sizing: border-box; margin: 0; padding: 0; }
+ body { font: 16px/1.6 -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); min-height: 100vh; }
+ a { color: inherit; }
+ :focus-visible { outline: 2px solid var(--nv); outline-offset: 3px; border-radius: 6px; }
+
+ main { max-width: 940px; margin: 0 auto; padding: 72px 24px 120px; }
+
+ /* Hero */
+ .eyebrow { display: inline-flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--border); border-radius: 99px; padding: 7px 16px 7px 12px; font-size: 13px; color: var(--muted); margin-bottom: 32px; }
+ .eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--nv); box-shadow: 0 0 12px var(--nv); }
+ .eyebrow strong { color: var(--text); font-weight: 500; }
+
+ h1 { font-size: clamp(36px, 6vw, 56px); letter-spacing: -0.03em; line-height: 1.05; font-weight: 600; margin-bottom: 20px; }
+ h1 .gradient { background: linear-gradient(110deg, #ffffff 25%, var(--nv-soft) 90%); -webkit-background-clip: text; background-clip: text; color: transparent; }
+
+ .lede { font-size: clamp(17px, 2vw, 19px); color: var(--muted); line-height: 1.55; max-width: 680px; margin-bottom: 36px; }
+ .lede strong { color: var(--text); font-weight: 500; }
+
+ .badge-plate { display: inline-block; background: #ffffff; border-radius: 20px; padding: 18px 22px; margin-bottom: 36px; transition: transform .18s ease, box-shadow .18s ease; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
+ .badge-plate:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(118,185,0,.22), 0 0 0 1px rgba(255,255,255,.16); }
+ .badge-plate img { display: block; width: 250px; max-width: 100%; height: auto; }
+
+ .cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 88px; }
+ .btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 11px; border: 0; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; transition: filter .15s, background .15s, transform .15s, border-color .15s; }
+ .btn-primary { background: var(--nv); color: #06210a; }
+ .btn-primary:hover { filter: brightness(1.12); }
+ .btn-primary:active { transform: translateY(1px); }
+ .btn-sec { background: var(--panel); border: 1px solid var(--border); color: var(--text); }
+ .btn-sec:hover { background: var(--panel2); border-color: #2c3a22; }
+ .btn-sec:active { transform: translateY(1px); }
+ .btn svg { width: 16px; height: 16px; }
+
+ section { margin-bottom: 80px; }
+ section h2 { font-size: clamp(24px, 3.5vw, 32px); letter-spacing: -0.02em; line-height: 1.15; font-weight: 600; margin-bottom: 14px; }
+ section .sub { color: var(--muted); font-size: 16px; margin-bottom: 30px; max-width: 660px; }
+
+ /* Layer cards */
+ .layers { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
+ .layer { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 26px; }
+ .layer .tag { display: inline-block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--nv-soft); border: 1px solid rgba(118,185,0,.28); background: rgba(118,185,0,.07); border-radius: 99px; padding: 4px 10px; margin-bottom: 14px; }
+ .layer h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 10px; }
+ .layer p { font-size: 14.5px; color: var(--muted); line-height: 1.6; margin-bottom: 14px; }
+ .layer ul { list-style: none; font-size: 14px; color: var(--muted); }
+ .layer li { padding-left: 18px; position: relative; margin-bottom: 7px; line-height: 1.5; }
+ .layer li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--nv); opacity: .7; }
+ .layer li strong { color: var(--text); font-weight: 600; }
+
+ /* Tables */
+ .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); }
+ table { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 560px; }
+ th, td { text-align: left; padding: 13px 20px; border-bottom: 1px solid var(--border); vertical-align: top; }
+ tbody tr:last-child td { border-bottom: none; }
+ th { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; background: rgba(255,255,255,.015); }
+ td { color: var(--muted); line-height: 1.5; }
+ td:first-child { color: var(--text); font-weight: 500; }
+ tbody tr:hover td { background: rgba(118,185,0,.035); }
+ td code, th code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; color: var(--nv-soft); }
+ .free { color: var(--nv); font-weight: 600; }
+
+ /* Code */
+ pre { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 22px; margin-top: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.7; color: var(--text); }
+ pre .c { color: var(--muted); }
+ pre .s { color: var(--nv-soft); }
+
+ .note { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; font-size: 14px; color: var(--muted); margin-top: 16px; }
+ .note strong { color: var(--text); }
+ .note a { color: var(--nv-soft); text-decoration: none; }
+ .note a:hover { text-decoration: underline; }
+
+ /* Read-next cards */
+ .reads { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
+ a.read { display: block; text-decoration: none; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 22px; transition: border-color .15s, background .15s, transform .15s; }
+ a.read:hover { border-color: #35471f; background: var(--panel2); transform: translateY(-2px); }
+ a.read .kind { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: var(--nv-soft); margin-bottom: 9px; display: block; }
+ a.read h3 { font-size: 15.5px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 7px; line-height: 1.35; }
+ a.read p { font-size: 13.5px; color: var(--muted); line-height: 1.55; }
+ a.read .more { display: inline-flex; align-items: center; gap: 5px; margin-top: 12px; font-size: 13px; color: var(--nv-soft); }
+
+ .disclaimer { font-size: 12px; color: var(--muted); margin-top: 64px; line-height: 1.65; max-width: 740px; }
+ .disclaimer a { color: var(--nv-soft); text-decoration: none; }
+ .disclaimer a:hover { text-decoration: underline; }
+
+ @media (max-width: 720px) {
+ main { padding: 52px 20px 96px; }
+ .badge-plate img { width: 210px; }
+ th, td { padding: 11px 14px; }
+ }
+ @media (prefers-reduced-motion: reduce) {
+ * { transition: none !important; }
+ }
+ </style>
+
+ <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"three.ws on NVIDIA","description":"three.ws is a member of the NVIDIA Inception program. Free 3D generation on NVIDIA-hosted models plus a self-hosted GPU fleet on L4 and RTX PRO 6000.","url":"https://three.ws/nvidia","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"},"primaryImageOfPage":"https://three.ws/og-image.png"},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://three.ws/"},{"@type":"ListItem","position":2,"name":"Partners","item":"https://three.ws/partners"},{"@type":"ListItem","position":3,"name":"NVIDIA","item":"https://three.ws/nvidia"}]}]}</script>
+</head>
+<body>
+
+<header><div id="nav-container"></div></header>
+
+<main>
+
+ <div class="eyebrow">
+ <span class="dot" aria-hidden="true"></span>
+ <strong>NVIDIA Inception member</strong>
+ <span>·</span>
+ <span>Accepted July 2026</span>
+ </div>
+
+ <h1>Every model here is born on <span class="gradient">NVIDIA</span>.</h1>
+
+ <p class="lede">
+ Type a sentence, get a textured 3D model. That path runs end to end on NVIDIA silicon, and on
+ three.ws the first lane of it is <strong>free, keyless, and open source</strong>. This page is the
+ honest map of how: which NVIDIA-hosted models do what, which GPUs we run ourselves, and what we
+ learned putting them into production.
+ </p>
+
+ <div class="badge-plate">
+ <img src="/marks/nvidia-inception-badge.svg" width="250" height="108" alt="NVIDIA Inception Program member badge" />
+ </div>
+
+ <div class="cta-row">
+ <a href="/forge" class="btn btn-primary">
+ Generate one free
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" aria-hidden="true"><path d="M5 12h14M13 5l7 7-7 7"/></svg>
+ </a>
+ <a href="/docs/nvidia-models" class="btn btn-sec">The model map</a>
+ <a href="/blog/image-to-3d-on-nvidia-l4-and-blackwell" class="btn btn-sec">Engineering post</a>
+ <a href="/docs/nvidia-inception" class="btn btn-sec">About the membership</a>
+ </div>
+
+ <section>
+ <h2>Two layers, one stack.</h2>
+ <p class="sub">
+ Almost every platform that says "runs on NVIDIA" means one of these. We run both, and they serve
+ different jobs: the hosted lane keeps the free tier free, the self-hosted fleet buys quality the
+ free tier cannot reach.
+ </p>
+
+ <div class="layers">
+
+ <div class="layer">
+ <span class="tag">Layer 1 · Hosted</span>
+ <h3>NVIDIA-hosted models, one key</h3>
+ <p>
+ A single <code>NVIDIA_API_KEY</code> from build.nvidia.com unlocks the entire catalog below.
+ No per-model billing, no per-seat cost. It is rate limited rather than metered, which is
+ exactly why we treat it as a free-first lane and always keep a fallback behind it.
+ </p>
+ <ul>
+ <li><strong>Text to 3D</strong> that costs a visitor nothing and needs no account</li>
+ <li><strong>Chat, vision, embeddings, reranking, safety, speech</strong> on the same key</li>
+ <li>Every call has a documented failover, so a rate limit degrades instead of breaking</li>
+ </ul>
+ </div>
+
+ <div class="layer">
+ <span class="tag">Layer 2 · Self-hosted</span>
+ <h3>Our own GPU fleet</h3>
+ <p>
+ Twelve Cloud Run GPU services, each a worker wrapping one model, autoscaled per lane.
+ Eleven on <code>nvidia-l4</code>, one on <code>nvidia-rtx-pro-6000</code> (Blackwell). This is
+ where the paid realism lanes live, and where PBR materials, rigging, and motion get made.
+ </p>
+ <ul>
+ <li><strong>Physically-based materials</strong>: baseColor, metallicRoughness, and normal maps</li>
+ <li><strong>Auto-rigging and motion</strong>, so a generated mesh can move, not just sit there</li>
+ <li>One wire contract across every worker, so any lane can fail over to any other</li>
+ </ul>
+ </div>
+
+ </div>
+ </section>
+
+ <section>
+ <h2>The free model map.</h2>
+ <p class="sub">
+ Every capability below is in production source and reachable on the free key. Nothing here is
+ aspirational, and nothing is a demo stub.
+ </p>
+
+ <div class="table-scroll">
+ <table>
+ <thead>
+ <tr><th>Capability</th><th>NVIDIA model</th><th>What it powers</th><th>Free</th></tr>
+ </thead>
+ <tbody>
+ <tr><td>Text to 3D</td><td><code>microsoft/trellis</code></td><td>The keyless generate lane on /forge</td><td class="free">Yes</td></tr>
+ <tr><td>Text to image</td><td><code>black-forest-labs/flux.1-schnell</code></td><td>Reference images and texture inputs</td><td class="free">Yes</td></tr>
+ <tr><td>LLM, default lane</td><td><code>meta/llama-3.3-70b-instruct</code></td><td>Agent chat and platform reasoning</td><td class="free">Yes</td></tr>
+ <tr><td>LLM, model garden</td><td>Nemotron 120B / 49B / Nano 9B and peers</td><td>The Brain workbench model picker</td><td class="free">Yes</td></tr>
+ <tr><td>Vision</td><td><code>nvidia/nemotron-nano-12b-v2-vl</code></td><td>Photo checks before reconstruction, alt text</td><td class="free">Yes</td></tr>
+ <tr><td>Embeddings</td><td><code>nvidia/nv-embedqa-e5-v5</code></td><td>Agent memory and semantic search</td><td class="free">Yes</td></tr>
+ <tr><td>Reranking</td><td><code>nvidia/rerank-qa-mistral-4b</code></td><td>Sharpening retrieval before an answer</td><td class="free">Yes</td></tr>
+ <tr><td>Content safety</td><td><code>nvidia/llama-3.1-nemoguard-8b-content-safety</code></td><td>The guardrail in front of generation</td><td class="free">Yes</td></tr>
+ <tr><td>Text to speech</td><td><code>magpie-tts-multilingual</code> (Riva)</td><td>Avatar voices, multilingual</td><td class="free">Yes</td></tr>
+ </tbody>
+ </table>
+ </div>
+
+ <div class="note">
+ <strong>Model by model, with the file each one is wired into:</strong>
+ <a href="/docs/nvidia-models">NVIDIA models on three.ws</a>. It names the exact endpoint, the fallback
+ behind it, and the environment variable that turns each lane on.
+ </div>
+ </section>
+
+ <section>
+ <h2>Try the free lane right now.</h2>
+ <p class="sub">
+ No key, no account, no wallet. One POST returns a real GLB you can open in any 3D viewer. This is the
+ same endpoint the browser UI calls.
+ </p>
+
+<pre><span class="c"># generate a textured 3D model on the free NVIDIA lane</span>
+curl -s -X POST <span class="s">https://three.ws/api/forge</span> \
+ -H <span class="s">'content-type: application/json'</span> \
+ -d <span class="s">'{"prompt":"a small brass compass","backend":"nvidia"}'</span>
+
+<span class="c"># → {"creation_id":"…","status":"done",
+# "glb_url":"https://…/forge/anon/….glb",
+# "quality":{"valid":true,"score":0.947,…}}</span></pre>
+
+ <div class="note">
+ <strong>The <code>quality</code> block is not decoration.</strong> Every generation is inspected before it
+ is handed back: vertex and triangle counts, bounding-box diagonal, whether materials and textures
+ actually landed. A model that fails inspection is regenerated rather than shipped to you broken.
+ </div>
+ </section>
+
+ <section>
+ <h2>The GPU fleet.</h2>
+ <p class="sub">
+ What we run ourselves, and on which card. Each row is a separate Cloud Run service with its own
+ scaling policy, so a slow texture job never queues behind a rigging job.
+ </p>
+
+ <div class="table-scroll">
+ <table>
+ <thead>
+ <tr><th>Lane</th><th>Worker</th><th>GPU</th><th>CPU / memory</th></tr>
+ </thead>
+ <tbody>
+ <tr><td>Image to 3D, PBR</td><td><code>model-hunyuan3d-21-rtx</code></td><td><code>nvidia-rtx-pro-6000</code></td><td>20 / 80 Gi</td></tr>
+ <tr><td>Image to 3D, fallback</td><td><code>model-hunyuan3d</code></td><td><code>nvidia-l4</code></td><td>8 / 32 Gi</td></tr>
+ <tr><td>Text to 3D</td><td><code>model-trellis</code></td><td><code>nvidia-l4</code></td><td>8 / 32 Gi</td></tr>
+ <tr><td>Image to 3D, fast</td><td><code>model-triposg</code>, <code>model-triposr</code></td><td><code>nvidia-l4</code></td><td>8 / 32 Gi, 4 / 16 Gi</td></tr>
+ <tr><td>Texture synthesis</td><td><code>texture</code></td><td><code>nvidia-l4</code></td><td>8 / 32 Gi</td></tr>
+ <tr><td>Auto-rigging</td><td><code>rig</code>, <code>unirig</code></td><td><code>nvidia-l4</code></td><td>4 / 16 Gi</td></tr>
+ <tr><td>Text to motion</td><td><code>model-text2motion</code></td><td><code>nvidia-l4</code></td><td>4 / 16 Gi</td></tr>
+ <tr><td>Video to scene</td><td><code>model-video2scene</code></td><td><code>nvidia-l4</code></td><td>8 / 32 Gi</td></tr>
+ </tbody>
+ </table>
+ </div>
+
+ <div class="note">
+ <strong>Everything above is open source.</strong> Each worker's Dockerfile, deploy config, and README are
+ in the repository, including the CUDA and PyTorch versions per GPU generation.
+ </div>
+ </section>
+
+ <section>
+ <h2>Read next.</h2>
+ <p class="sub">Two tutorials you can follow end to end, and two deeper pieces on how the stack was built.</p>
+
+ <div class="reads">
+
+ <a class="read" href="/tutorials/nvidia-3d-free">
+ <span class="kind">Tutorial</span>
+ <h3>Free text-to-3D on NVIDIA</h3>
+ <p>From an empty terminal to a downloaded GLB on the free lane, including how to poll a long job and what each response field means.</p>
+ <span class="more">Start the tutorial
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" aria-hidden="true"><path d="M2.5 6h7M6.5 3l3 3-3 3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
+ </span>
+ </a>
+
+ <a class="read" href="/tutorials/nvidia-nim-self-host">
+ <span class="kind">Tutorial</span>
+ <h3>Self-host TRELLIS on your own NIM</h3>
+ <p>Run the same text-to-3D model on your own NVIDIA GPU with NIM, then point a client at it and reconstruct from photos too.</p>
+ <span class="more">Start the tutorial
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" aria-hidden="true"><path d="M2.5 6h7M6.5 3l3 3-3 3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
+ </span>
+ </a>
+
+ <a class="read" href="/blog/image-to-3d-on-nvidia-l4-and-blackwell">
+ <span class="kind">Engineering</span>
+ <h3>Image-to-3D on L4 and Blackwell</h3>
+ <p>The field report: a memory-backed <code>/tmp</code> that SIGKILLs a 32 GiB instance mid-load, cu124 wheels with no sm_120 kernels, and the regional quota that flipped our GPU choice.</p>
+ <span class="more">Read the post
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" aria-hidden="true"><path d="M2.5 6h7M6.5 3l3 3-3 3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
+ </span>
+ </a>
+
+ <a class="read" href="/docs/nvidia-nemotron-spotlight">
+ <span class="kind">Essay</span>
+ <h3>The generator was never the hard part</h3>
+ <p>Published on the NVIDIA Developer Forums: why a 12B vision model standing in front of the 3D generator mattered more than the 3D generator itself.</p>
+ <span class="more">Read the essay
+ <svg width="12" height="12" viewBox="0 0 12 12" fill="none" aria-hidden="true"><path d="M2.5 6h7M6.5 3l3 3-3 3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
+ </span>
+ </a>
+
+ </div>
+ </section>
+
+ <section>
+ <h2>Why this matters.</h2>
+ <p class="sub">
+ Generating 3D used to require a workstation, a licence, and a skill you spent years acquiring.
+ The reason a visitor can now type a sentence on a school laptop and get a real, textured,
+ riggable model back for nothing is not one famous model getting good. It is an entire supporting
+ cast getting good and getting free at the same time, most of it hosted by NVIDIA behind a single
+ key. GPU capacity is the one hard constraint on how fast and how detailed that gets, which is
+ exactly the constraint Inception helps relax.
+ </p>
+ <div class="cta-row" style="margin-bottom:0">
+ <a href="/forge" class="btn btn-primary">
+ Generate a model
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" aria-hidden="true"><path d="M5 12h14M13 5l7 7-7 7"/></svg>
+ </a>
+ <a href="https://github.com/nirholas/three.ws" class="btn btn-sec" target="_blank" rel="noopener">
+ <svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><path d="M12 .3C5.4.3 0 5.7 0 12.3c0 5.3 3.4 9.8 8.2 11.4.6.1.8-.3.8-.6v-2.1c-3.3.7-4-1.6-4-1.6-.6-1.4-1.4-1.8-1.4-1.8-1.1-.7.1-.7.1-.7 1.2.1 1.9 1.2 1.9 1.2 1.1 1.8 2.9 1.3 3.6 1 .1-.8.4-1.3.8-1.6-2.7-.3-5.5-1.3-5.5-5.9 0-1.3.5-2.4 1.2-3.2-.1-.3-.5-1.5.1-3.2 0 0 1-.3 3.3 1.2 1-.3 2-.4 3-.4s2 .1 3 .4c2.3-1.5 3.3-1.2 3.3-1.2.7 1.7.2 2.9.1 3.2.8.8 1.2 1.9 1.2 3.2 0 4.6-2.8 5.6-5.5 5.9.4.4.8 1.1.8 2.2v3.3c0 .3.2.7.8.6 4.8-1.6 8.2-6.1 8.2-11.4C24 5.7 18.6.3 12 .3z"/></svg>
+ View source
+ </a>
+ <a href="/partners" class="btn btn-sec">All partners</a>
+ </div>
+ </section>
+
+ <p class="disclaimer">
+ three.ws is an independent member of the NVIDIA Inception program, NVIDIA's global program for startups
+ building on accelerated computing. Inception is a startup program, not a partnership, a reseller
+ relationship, or an investment: NVIDIA reviews applicants and admits companies building seriously on
+ accelerated computing. This page describes three.ws products that run on NVIDIA models and hardware; it
+ is not an NVIDIA product and is not endorsed by NVIDIA beyond the program membership shown. NVIDIA, the
+ NVIDIA logo, NVIDIA Inception, NIM, Riva, Nemotron, and NemoGuard are trademarks of NVIDIA Corporation.
+ Learn more about the program at
+ <a href="https://www.nvidia.com/en-us/startups/" target="_blank" rel="noopener">nvidia.com/en-us/startups</a>.
+ </p>
+
+</main>
+
+<div id="footer-container"></div>
+
+<script src="/brand.js" defer></script>
+<script src="/footer.js"></script>
+<!-- Runtime i18n: detects locale, swaps annotated copy, mounts <lang-switcher>. -->
+<script type="module" src="/i18n.js"></script>
+</body>
+</html>
diff --git a/public/changelog.json b/public/changelog.json
index b6ea23922..633b4e65f 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,11 +1,21 @@
{
- "generated_at": "2026-07-30T17:21:30.492Z",
+ "generated_at": "2026-07-30T19:20:19.101Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
"url": "https://three.ws"
},
"entries": [
+ {
+ "date": "2026-07-30",
+ "type": "launch",
+ "title": "Docs World (immersive 3D docs)",
+ "summary": "The full three.ws documentation as a walkable 3D world: every docs section is a glowing pavilion, and the live pages render inside the scene.",
+ "link": "/docs/world",
+ "tags": [
+ "launch"
+ ]
+ },
{
"date": "2026-07-30",
"type": "launch",
@@ -96,6 +106,17 @@
"docs"
]
},
+ {
+ "date": "2026-07-30",
+ "type": "update",
+ "title": "Docs World: read the documentation inside a walkable 3D world",
+ "summary": "The docs now come in two forms with one content source. The classic reader at three.ws/docs stays exactly as it was, and a new immersive surface at three.ws/docs/world turns the same documentation into a place: all fourteen sections of the sidebar become glowing pavilions on a ring, you walk an avatar between them (keyboard, or a joystick on phones), and picking a page opens the live doc right inside the scene. Deep links carry over both ways, any rigged GLB can be your body via the avatar parameter, and devices without 3D support are routed to the classic docs with nothing missing.",
+ "link": "/docs/world",
+ "tags": [
+ "feature",
+ "docs"
+ ]
+ },
{
"date": "2026-07-30",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index c97514d7c..8b2d6d9f6 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -6,6 +6,14 @@
<atom:link href="https://three.ws/changelog.xml" rel="self" type="application/rss+xml"/>
<description>What's new on three.ws — features, improvements, and releases, newest first.</description>
<language>en</language>
+ <item>
+ <title>Docs World (immersive 3D docs)</title>
+ <link>https://three.ws/docs/world</link>
+ <guid isPermaLink="false">2026-07-30:Docs World (immersive 3D docs)</guid>
+ <pubDate>Thu, 30 Jul 2026 12:00:00 GMT</pubDate>
+ <category>launch</category>
+ <description>The full three.ws documentation as a walkable 3D world: every docs section is a glowing pavilion, and the live pages render inside the scene.</description>
+ </item>
<item>
<title>Tutorial · Character Library to a Live Embed</title>
<link>https://three.ws/tutorials/character-library-to-embed</link>
@@ -78,6 +86,14 @@
<category>docs</category>
<description>Three money surfaces now have real references. Agent vaults explains NAV-priced deposits and redemptions, the drawdown breaker, performance fees, and the public audit ledger. The master wallet doc covers funding it, sending SOL or USDC, and topping up an agent. Copy trading explains both ways to follow a leader, the leaderboard weighting, and the Smart Money directory. All three spell out exactly which requests move real money.</description>
</item>
+ <item>
+ <title>Docs World: read the documentation inside a walkable 3D world</title>
+ <link>https://three.ws/docs/world</link>
+ <guid isPermaLink="false">2026-07-30:Docs World: read the documentation inside a walkable 3D world</guid>
+ <pubDate>Thu, 30 Jul 2026 12:00:00 GMT</pubDate>
+ <category>feature</category>
+ <description>The docs now come in two forms with one content source. The classic reader at three.ws/docs stays exactly as it was, and a new immersive surface at three.ws/docs/world turns the same documentation into a place: all fourteen sections of the sidebar become glowing pavilions on a ring, you walk an avatar between them (keyboard, or a joystick on phones), and picking a page opens the live doc right inside the scene. Deep links carry over both ways, any rigged GLB can be your body via the avatar parameter, and devices without 3D support are routed to the classic docs with nothing missing.</description>
+ </item>
<item>
<title>Email and EVM wallet sign-in work again when the human check is on</title>
<link>https://three.ws/login</link>
diff --git a/public/docs-world.css b/public/docs-world.css
new file mode 100644
index 000000000..73e750ce5
--- /dev/null
+++ b/public/docs-world.css
@@ -0,0 +1,611 @@
+/* Docs World (/docs/world): HUD, overlays, and reader styles.
+ Theme mirrors the classic docs (near-black + purple accent) via the shared
+ tokens where possible, with docs-local accent values matching docs/index.html. */
+
+/* Author display values (flex/grid) beat the UA's [hidden] rule; without this
+ guard a hidden overlay still covers the page and eats every click. Same
+ guard public/tokens.css carries platform-wide. */
+[hidden] {
+ display: none !important;
+}
+
+:root {
+ --dw-accent: #8b5cf6;
+ --dw-accent-soft: rgba(139, 92, 246, 0.14);
+ --dw-bg: #09090f;
+ --dw-panel-bg: rgba(12, 12, 20, 0.92);
+ --dw-border: rgba(255, 255, 255, 0.09);
+ --dw-text: rgba(232, 230, 245, 0.92);
+ --dw-text-muted: rgba(224, 224, 240, 0.6);
+}
+
+html,
+body {
+ margin: 0;
+ height: 100%;
+ overflow: hidden;
+ background: var(--dw-bg);
+ color: var(--dw-text);
+ font-family: var(--font-body, Inter, system-ui, sans-serif);
+}
+
+.dw-stage {
+ position: fixed;
+ inset: 0;
+}
+
+#dw-canvas {
+ width: 100%;
+ height: 100%;
+ display: block;
+ touch-action: none;
+ cursor: grab;
+}
+#dw-canvas:active {
+ cursor: grabbing;
+}
+
+/* ── Chips & buttons ─────────────────────────────────────────────────────── */
+.dw-chip {
+ display: inline-flex;
+ align-items: center;
+ gap: 6px;
+ padding: 8px 14px;
+ border-radius: 999px;
+ background: var(--dw-panel-bg);
+ border: 1px solid var(--dw-border);
+ color: var(--dw-text);
+ font-size: 13px;
+ font-weight: 500;
+ text-decoration: none;
+ cursor: pointer;
+ backdrop-filter: blur(12px);
+ -webkit-backdrop-filter: blur(12px);
+ transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
+}
+.dw-chip:hover {
+ border-color: rgba(139, 92, 246, 0.5);
+ background: rgba(20, 18, 34, 0.95);
+}
+.dw-chip:active {
+ transform: scale(0.97);
+}
+.dw-chip:focus-visible {
+ outline: 2px solid var(--dw-accent);
+ outline-offset: 2px;
+}
+
+.dw-btn {
+ padding: 8px 16px;
+ border-radius: 8px;
+ border: 1px solid rgba(139, 92, 246, 0.45);
+ background: var(--dw-accent-soft);
+ color: #d6c9ff;
+ font-size: 13px;
+ font-weight: 600;
+ cursor: pointer;
+ text-decoration: none;
+ transition: background 0.15s ease, color 0.15s ease;
+}
+.dw-btn:hover {
+ background: rgba(139, 92, 246, 0.28);
+ color: #ede9fe;
+}
+.dw-btn:focus-visible {
+ outline: 2px solid var(--dw-accent);
+ outline-offset: 2px;
+}
+.dw-btn.ghost {
+ background: transparent;
+ border-color: var(--dw-border);
+ color: var(--dw-text-muted);
+}
+.dw-btn.ghost:hover {
+ color: var(--dw-text);
+ border-color: rgba(255, 255, 255, 0.2);
+}
+.dw-btn:disabled {
+ opacity: 0.35;
+ cursor: default;
+}
+
+/* ── HUD layout ──────────────────────────────────────────────────────────── */
+.dw-hud-top {
+ position: fixed;
+ top: 14px;
+ left: 14px;
+ right: 14px;
+ display: flex;
+ align-items: center;
+ gap: 8px;
+ z-index: 20;
+ pointer-events: none;
+}
+.dw-hud-top > * {
+ pointer-events: auto;
+}
+.dw-hud-spacer {
+ flex: 1;
+}
+
+.dw-prompt {
+ position: fixed;
+ bottom: 92px;
+ left: 50%;
+ transform: translateX(-50%);
+ z-index: 20;
+ display: inline-flex;
+ align-items: center;
+ gap: 8px;
+ padding: 10px 18px;
+ border-radius: 12px;
+ background: var(--dw-panel-bg);
+ border: 1px solid rgba(139, 92, 246, 0.5);
+ color: var(--dw-text);
+ font-size: 14px;
+ cursor: pointer;
+ backdrop-filter: blur(12px);
+ -webkit-backdrop-filter: blur(12px);
+ animation: dw-pulse 2.2s ease-in-out infinite;
+}
+.dw-prompt kbd {
+ padding: 2px 7px;
+ border-radius: 5px;
+ border: 1px solid var(--dw-border);
+ background: rgba(255, 255, 255, 0.06);
+ font-size: 11px;
+ font-family: inherit;
+}
+@keyframes dw-pulse {
+ 0%,
+ 100% {
+ box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.35);
+ }
+ 50% {
+ box-shadow: 0 0 0 7px rgba(139, 92, 246, 0);
+ }
+}
+
+.dw-hint {
+ position: fixed;
+ bottom: 18px;
+ left: 50%;
+ transform: translateX(-50%);
+ z-index: 15;
+ font-size: 12px;
+ color: var(--dw-text-muted);
+ background: rgba(9, 9, 15, 0.65);
+ border-radius: 999px;
+ padding: 6px 14px;
+ pointer-events: none;
+ white-space: nowrap;
+}
+
+/* ── Virtual joystick (touch) ────────────────────────────────────────────── */
+.dw-joystick {
+ position: fixed;
+ width: 104px;
+ height: 104px;
+ margin: -52px 0 0 -52px;
+ border-radius: 50%;
+ border: 1.5px solid rgba(139, 92, 246, 0.4);
+ background: rgba(139, 92, 246, 0.07);
+ z-index: 18;
+ pointer-events: none;
+}
+.dw-joystick-thumb {
+ position: absolute;
+ inset: 50%;
+ width: 44px;
+ height: 44px;
+ margin: -22px 0 0 -22px;
+ border-radius: 50%;
+ background: rgba(139, 92, 246, 0.35);
+ border: 1.5px solid rgba(196, 181, 253, 0.6);
+}
+
+/* ── Overlay panels (index, section list, help) ──────────────────────────── */
+.dw-panel,
+.dw-index,
+.dw-help {
+ position: fixed;
+ z-index: 30;
+ background: var(--dw-panel-bg);
+ border: 1px solid var(--dw-border);
+ border-radius: 16px;
+ backdrop-filter: blur(18px);
+ -webkit-backdrop-filter: blur(18px);
+ box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
+}
+
+.dw-panel {
+ top: 70px;
+ right: 14px;
+ bottom: 14px;
+ width: min(340px, calc(100vw - 28px));
+ display: flex;
+ flex-direction: column;
+ opacity: 0;
+ transform: translateX(14px);
+ transition: opacity 0.2s ease, transform 0.2s ease;
+}
+.dw-panel.open {
+ opacity: 1;
+ transform: none;
+}
+
+.dw-panel-head,
+.dw-index-head {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 10px;
+ padding: 14px 16px;
+ border-bottom: 1px solid var(--dw-border);
+}
+.dw-panel-head h2,
+.dw-index-head h2 {
+ margin: 0;
+ font-size: 15px;
+ font-weight: 600;
+}
+
+.dw-close {
+ width: 28px;
+ height: 28px;
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ border-radius: 8px;
+ border: 1px solid transparent;
+ background: transparent;
+ color: var(--dw-text-muted);
+ font-size: 16px;
+ cursor: pointer;
+ transition: color 0.15s, background 0.15s;
+}
+.dw-close:hover {
+ color: #fff;
+ background: rgba(255, 255, 255, 0.07);
+}
+.dw-close:focus-visible {
+ outline: 2px solid var(--dw-accent);
+}
+
+.dw-panel-list {
+ overflow-y: auto;
+ padding: 8px;
+ scrollbar-width: thin;
+}
+.dw-panel-link {
+ display: block;
+ padding: 9px 12px;
+ border-radius: 9px;
+ color: var(--dw-text-muted);
+ font-size: 13.5px;
+ text-decoration: none;
+ transition: color 0.12s, background 0.12s;
+}
+.dw-panel-link:hover,
+.dw-panel-link:focus-visible {
+ color: #fff;
+ background: var(--dw-accent-soft);
+ outline: none;
+}
+.dw-panel-link.external::after {
+ content: ' ↗';
+ opacity: 0.6;
+}
+
+.dw-index {
+ top: 70px;
+ left: 14px;
+ width: min(300px, calc(100vw - 28px));
+ max-height: calc(100vh - 100px);
+ display: flex;
+ flex-direction: column;
+}
+.dw-index-list {
+ overflow-y: auto;
+ padding: 8px;
+ scrollbar-width: thin;
+}
+.dw-index-item {
+ display: flex;
+ align-items: center;
+ gap: 10px;
+ width: 100%;
+ padding: 9px 12px;
+ border: 0;
+ border-radius: 9px;
+ background: transparent;
+ color: var(--dw-text-muted);
+ font-size: 13.5px;
+ font-family: inherit;
+ text-align: left;
+ cursor: pointer;
+ transition: color 0.12s, background 0.12s;
+}
+.dw-index-item:hover,
+.dw-index-item:focus-visible {
+ color: #fff;
+ background: var(--dw-accent-soft);
+ outline: none;
+}
+.dw-index-item > span:nth-child(2) {
+ flex: 1;
+}
+.dw-index-dot {
+ width: 9px;
+ height: 9px;
+ border-radius: 50%;
+ flex: none;
+}
+.dw-index-count {
+ font-size: 11px;
+ opacity: 0.55;
+}
+
+.dw-help {
+ top: 70px;
+ left: 50%;
+ transform: translateX(-50%);
+ width: min(380px, calc(100vw - 28px));
+ padding: 18px 20px;
+}
+.dw-help h2 {
+ margin: 0 0 10px;
+ font-size: 15px;
+}
+.dw-help table {
+ width: 100%;
+ border-collapse: collapse;
+ font-size: 13px;
+ color: var(--dw-text-muted);
+}
+.dw-help td {
+ padding: 5px 0;
+}
+.dw-help td:first-child {
+ width: 46%;
+ color: var(--dw-text);
+}
+.dw-help .dw-close {
+ position: absolute;
+ top: 12px;
+ right: 12px;
+}
+
+/* ── Reader ──────────────────────────────────────────────────────────────── */
+.dw-reader {
+ position: fixed;
+ inset: 0;
+ z-index: 40;
+ display: flex;
+ align-items: stretch;
+ justify-content: flex-end;
+ background: rgba(5, 5, 10, 0.45);
+ opacity: 0;
+ transition: opacity 0.22s ease;
+}
+.dw-reader.open {
+ opacity: 1;
+}
+.dw-reader-card {
+ width: min(720px, 100vw);
+ display: flex;
+ flex-direction: column;
+ background: rgba(11, 11, 18, 0.97);
+ border-left: 1px solid var(--dw-border);
+ transform: translateX(24px);
+ transition: transform 0.22s ease;
+}
+.dw-reader.open .dw-reader-card {
+ transform: none;
+}
+.dw-reader-head {
+ display: flex;
+ align-items: center;
+ gap: 12px;
+ padding: 14px 18px;
+ border-bottom: 1px solid var(--dw-border);
+}
+.dw-reader-crumb {
+ flex: 1;
+ font-size: 13px;
+ color: var(--dw-text-muted);
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+.dw-reader-classic {
+ font-size: 12.5px;
+ color: #c4b5fd;
+ text-decoration: none;
+ white-space: nowrap;
+}
+.dw-reader-classic:hover {
+ color: #ede9fe;
+ text-decoration: underline;
+}
+.dw-reader-body {
+ flex: 1;
+ overflow-y: auto;
+ padding: 22px 28px 30px;
+ font-size: 14.5px;
+ line-height: 1.7;
+ color: var(--dw-text);
+ scrollbar-width: thin;
+ overscroll-behavior: contain;
+}
+.dw-reader-body h1 {
+ font-size: 26px;
+ margin: 0 0 14px;
+}
+.dw-reader-body h2 {
+ font-size: 19px;
+ margin: 26px 0 10px;
+ padding-top: 14px;
+ border-top: 1px solid var(--dw-border);
+}
+.dw-reader-body h3 {
+ font-size: 16px;
+ margin: 20px 0 8px;
+}
+.dw-reader-body a {
+ color: #c4b5fd;
+}
+.dw-reader-body a:hover {
+ color: #ede9fe;
+}
+.dw-code {
+ background: #0d0d16;
+ border: 1px solid var(--dw-border);
+ border-radius: 10px;
+ padding: 14px 16px;
+ overflow-x: auto;
+ font-size: 13px;
+ line-height: 1.55;
+}
+.dw-ic {
+ background: rgba(139, 92, 246, 0.12);
+ border-radius: 5px;
+ padding: 1.5px 6px;
+ font-size: 0.9em;
+}
+.dw-md-table {
+ width: 100%;
+ border-collapse: collapse;
+ font-size: 13.5px;
+ margin: 14px 0;
+ display: block;
+ overflow-x: auto;
+}
+.dw-md-table th,
+.dw-md-table td {
+ border: 1px solid var(--dw-border);
+ padding: 7px 10px;
+ text-align: left;
+}
+.dw-quote {
+ margin: 14px 0;
+ padding: 4px 16px;
+ border-left: 3px solid var(--dw-accent);
+ color: var(--dw-text-muted);
+}
+.dw-reader-foot {
+ display: flex;
+ justify-content: space-between;
+ gap: 10px;
+ padding: 12px 18px;
+ border-top: 1px solid var(--dw-border);
+}
+.dw-reader-foot .dw-btn {
+ max-width: 46%;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+/* ── Loading / error / fallback states ───────────────────────────────────── */
+.dw-center {
+ position: fixed;
+ inset: 0;
+ z-index: 50;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ gap: 14px;
+ text-align: center;
+ padding: 24px;
+ background: var(--dw-bg);
+}
+.dw-center h1 {
+ margin: 0;
+ font-size: 22px;
+}
+.dw-center p {
+ margin: 0;
+ max-width: 400px;
+ color: var(--dw-text-muted);
+ font-size: 14px;
+ line-height: 1.6;
+}
+.dw-spinner {
+ width: 34px;
+ height: 34px;
+ border-radius: 50%;
+ border: 3px solid rgba(139, 92, 246, 0.2);
+ border-top-color: var(--dw-accent);
+ animation: dw-spin 0.9s linear infinite;
+}
+@keyframes dw-spin {
+ to {
+ transform: rotate(360deg);
+ }
+}
+
+.dw-skeleton {
+ display: flex;
+ flex-direction: column;
+ gap: 12px;
+ padding-top: 6px;
+}
+.dw-skeleton span {
+ height: 14px;
+ border-radius: 6px;
+ background: linear-gradient(
+ 100deg,
+ rgba(255, 255, 255, 0.05) 40%,
+ rgba(255, 255, 255, 0.12) 50%,
+ rgba(255, 255, 255, 0.05) 60%
+ );
+ background-size: 220% 100%;
+ animation: dw-shimmer 1.4s ease infinite;
+}
+.dw-skeleton span.short {
+ width: 55%;
+}
+@keyframes dw-shimmer {
+ to {
+ background-position: -120% 0;
+ }
+}
+
+.dw-error {
+ display: flex;
+ flex-direction: column;
+ gap: 12px;
+ align-items: flex-start;
+ padding: 8px 0;
+ color: var(--dw-text-muted);
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .dw-prompt {
+ animation: none;
+ }
+ .dw-skeleton span {
+ animation: none;
+ }
+ .dw-panel,
+ .dw-reader,
+ .dw-reader-card,
+ .dw-chip {
+ transition: none;
+ }
+}
+
+@media (max-width: 700px) {
+ .dw-reader-card {
+ width: 100vw;
+ border-left: 0;
+ }
+ .dw-hint {
+ display: none;
+ }
+ .dw-chip span.dw-chip-label {
+ display: none;
+ }
+}
diff --git a/public/features.json b/public/features.json
index 8d59b49b3..d2849fcba 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-30T17:21:30.480Z",
+ "generated_at": "2026-07-30T19:20:19.088Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
@@ -2617,6 +2617,16 @@
"tags": [],
"showcase": false
},
+ {
+ "path": "/docs/world",
+ "title": "Docs World (immersive 3D docs)",
+ "description": "The full three.ws documentation as a walkable 3D world: every docs section is a glowing pavilion, and the live pages render inside the scene.",
+ "added": "2026-07-30",
+ "auth": null,
+ "indexable": true,
+ "tags": [],
+ "showcase": true
+ },
{
"path": "/crypto",
"title": "Crypto Data API",
diff --git a/public/llms-full.txt b/public/llms-full.txt
index 36383a6b3..211bce8fc 100644
--- a/public/llms-full.txt
+++ b/public/llms-full.txt
@@ -1601,6 +1601,12 @@ URL: https://three.ws/docs
Full documentation: SDKs, API reference, embedding, agent system, smart contracts.
+### Docs World (immersive 3D docs)
+
+URL: https://three.ws/docs/world
+
+The full three.ws documentation as a walkable 3D world: every docs section is a glowing pavilion, and the live pages render inside the scene.
+
### Crypto Data API
URL: https://three.ws/crypto
diff --git a/public/llms.txt b/public/llms.txt
index e4dd7a75d..6fefcb220 100644
--- a/public/llms.txt
+++ b/public/llms.txt
@@ -282,6 +282,7 @@ Sign-in, dashboard, billing.
Docs, tutorials, and reference.
- [Docs](https://three.ws/docs): Full documentation: SDKs, API reference, embedding, agent system, smart contracts.
+- [Docs World (immersive 3D docs)](https://three.ws/docs/world): The full three.ws documentation as a walkable 3D world: every docs section is a glowing pavilion, and the live pages render inside the scene.
- [Crypto Data API](https://three.ws/crypto): Free, keyless crypto data for AI agents in one API: token snapshots, security/rug signals, holder concentration, live pump.fun launches, bonding-curve status, whale activity, trending tokens, wallet portfolios and ticker-availability checks. No key, no account, no paywall.
- [3D API](https://three.ws/3d): Free, keyless 3D API for AI agents: turn a text prompt into a real GLB model and validate/optimize any glTF/GLB, all from one URL with a live OpenAPI 3.1 spec. Free draft generation and inspection graduate to paid Forge Pro quality tiers and animation-ready Rigged Avatars. No key, no account.
- [Crypto API](https://three.ws/crypto-api): One free, keyless API for on-chain and market data: DEX pairs, prices, swap quotes, TVL, Solana RPC reads, and ENS/SNS name resolution — CoinGecko, DefiLlama, Jupiter, DexScreener and Solana RPC bundled behind one bill. Live provider table rendered from the real registry, generated OpenAPI 3.1 spec, free tier then BYOK, plan, or x402 pay-per-call.
diff --git a/public/locales/localized-pages.json b/public/locales/localized-pages.json
index 39248e87b..fc1763168 100644
--- a/public/locales/localized-pages.json
+++ b/public/locales/localized-pages.json
@@ -1,6 +1,6 @@
{
"generated": true,
- "count": 237,
+ "count": 348,
"paths": [
"/",
"/3d",
@@ -153,6 +153,117 @@
"/mocap-studio",
"/motion-swap",
"/my-agents",
+ "/news",
+ "/news/",
+ "/news/2045242891350814835",
+ "/news/2049397875935989970",
+ "/news/2049406826719137937",
+ "/news/2049412062837928202",
+ "/news/2049447738434339171",
+ "/news/2049458671139336613",
+ "/news/2049476546285740512",
+ "/news/2049557523330638269",
+ "/news/2049573582247022869",
+ "/news/2049576603324411933",
+ "/news/2049576641127682430",
+ "/news/2049577291957899336",
+ "/news/2049762836881301865",
+ "/news/2049765915575914834",
+ "/news/2049997615421649363",
+ "/news/2050016695897706885",
+ "/news/2050049239301165535",
+ "/news/2050221269732425928",
+ "/news/2050226678321102975",
+ "/news/2050229144676675999",
+ "/news/2050284562069266616",
+ "/news/2050585585191186781",
+ "/news/2050627547394916768",
+ "/news/2050753406109880576",
+ "/news/2050758788186353723",
+ "/news/2050800140295049308",
+ "/news/2050886334261391686",
+ "/news/2051140736201175323",
+ "/news/2051261108506558901",
+ "/news/2051616708482498843",
+ "/news/2051689230997618690",
+ "/news/2051690803203105230",
+ "/news/2051774915876098063",
+ "/news/2051858035862335505",
+ "/news/2051858503523066283",
+ "/news/2051893054584553680",
+ "/news/2052037977556287723",
+ "/news/2052167399399735476",
+ "/news/2052181307002929363",
+ "/news/2052189491801284690",
+ "/news/2052402481024667887",
+ "/news/2052402580266098813",
+ "/news/2052418108837781511",
+ "/news/2052418482269254040",
+ "/news/2052426446073983267",
+ "/news/2052588973466484922",
+ "/news/2052603250524967045",
+ "/news/2052685648377913671",
+ "/news/2052790746256920583",
+ "/news/2052791935585407403",
+ "/news/2053025259645981078",
+ "/news/2053698115203743922",
+ "/news/2053698387263008827",
+ "/news/2053730856339144932",
+ "/news/2053801703355629587",
+ "/news/2053804700609458214",
+ "/news/2053832201176027583",
+ "/news/2054404663802483072",
+ "/news/2054675701132132736",
+ "/news/2055140064070717618",
+ "/news/2055307440921702738",
+ "/news/2055309846556401735",
+ "/news/2055310365588922872",
+ "/news/2055517252964024561",
+ "/news/2055967730495586477",
+ "/news/2055985494606106821",
+ "/news/2056556899403997450",
+ "/news/2057721370310775223",
+ "/news/2057780453709648200",
+ "/news/2057782522994684413",
+ "/news/2057786164862730704",
+ "/news/2058076885805085111",
+ "/news/2058287578227577039",
+ "/news/2059456289789657537",
+ "/news/2059456294189498830",
+ "/news/2059456295825223723",
+ "/news/2059457822941978723",
+ "/news/2059675892981633179",
+ "/news/2059712761622675776",
+ "/news/2059821472156446844",
+ "/news/2059894004771418220",
+ "/news/2060178868305326413",
+ "/news/2060186881636422038",
+ "/news/2061418285896269952",
+ "/news/2061488909264040194",
+ "/news/2061523804405616642",
+ "/news/2061713039624405062",
+ "/news/aws-builder-center-3d-agents-onchain-payments",
+ "/news/aws-builder-center-blog",
+ "/news/aws-marketplace-live-may29",
+ "/news/bybit-alpha-listing",
+ "/news/cmc-mcp-registry-article",
+ "/news/cmc-memecoin-3d-world",
+ "/news/ibm-collaboration-showcase",
+ "/news/ibm-showcase-may31",
+ "/news/joined-aws-partner-network",
+ "/news/listed-on-bnb-chain-dappbay",
+ "/news/live-on-alibaba-cloud-marketplace",
+ "/news/live-on-aws-marketplace",
+ "/news/mcp-servers-x402-bazaar-coinbase",
+ "/news/monetize-mcp-server-x402-paid-tools",
+ "/news/moonshot-verified",
+ "/news/partnered-with-hackernoon",
+ "/news/quicknode-startup-program",
+ "/news/text-to-3d-is-live",
+ "/news/three-ws-dextools-social-boost-buyback",
+ "/news/three-ws-featured-on-alibaba-cloud-marketplace-blog",
+ "/news/three-ws-first-month-3d-agent-layer",
+ "/news/threews-play-coin-communities",
"/nim-forge",
"/notifications",
"/objects",
diff --git a/public/sitemap/index.html b/public/sitemap/index.html
index 168029dcf..bafa9298c 100644
--- a/public/sitemap/index.html
+++ b/public/sitemap/index.html
@@ -79,7 +79,7 @@
<main class="sm-wrap">
<div class="sm-hero">
<h1>Sitemap</h1>
- <p>All 577 pages on three.ws, grouped by purpose. Looking for the machine-readable versions?</p>
+ <p>All 578 pages on three.ws, grouped by purpose. Looking for the machine-readable versions?</p>
<div class="sm-formats">
<a href="/sitemap.xml"><code>sitemap.xml</code> · for search engines</a>
<a href="/llms.txt"><code>llms.txt</code> · for AI agents</a>
@@ -91,7 +91,7 @@
</div>
<div class="sm-filter">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m21 21-4.3-4.3"/></svg>
- <input id="sm-filter-input" type="search" placeholder="Filter 577 pages by name, path, or description…" aria-label="Filter pages" autocomplete="off" spellcheck="false" />
+ <input id="sm-filter-input" type="search" placeholder="Filter 578 pages by name, path, or description…" aria-label="Filter pages" autocomplete="off" spellcheck="false" />
<kbd aria-hidden="true">/</kbd>
</div>
<p class="sm-filter-count" id="sm-filter-count" role="status" aria-live="polite"></p>
@@ -99,6 +99,14 @@
<h2 id="sm-new-title">Newest<a class="sm-new-more" href="/changelog">full changelog &rarr;</a></h2>
<p class="sm-section-desc">The 9 most recently launched pages, straight to the live surface.</p>
<ul class="sm-list">
+ <li>
+ <a href="/docs/world">
+ <span class="sm-new-date">Jul 30, 2026</span>
+ <span class="sm-title">Docs World (immersive 3D docs)</span>
+ <span class="sm-path">/docs/world</span>
+ <span class="sm-desc">The full three.ws documentation as a walkable 3D world: every docs section is a glowing pavilion, and the live pages render inside the scene.</span>
+ </a>
+ </li>
<li>
<a href="/tutorials/sign-with-your-avatar">
<span class="sm-new-date">Jul 30, 2026</span>
@@ -163,14 +171,6 @@
<span class="sm-desc">The live cosmetics economy: the scarcest premium fits ranked by how few wallets own them, the top collectors wearing them, the creators actually getting paid in real settled USDC, and every cosmetic sale as it lands. Includes a free creator-earnings lookup for any Solana wallet, with per-cosmetic and per-coin-world breakdowns.</span>
</a>
</li>
- <li>
- <a href="/receipts">
- <span class="sm-new-date">Jul 28, 2026</span>
- <span class="sm-title">Receipt Vault</span>
- <span class="sm-path">/receipts</span>
- <span class="sm-desc">Every x402 payment you ever made to three.ws, retrievable forever. Connect a Solana or EVM wallet, sign one read-only message, and get back every signed proof-of-purchase receipt issued to that wallet: endpoint, network, settlement transaction with explorer link, and the full signed artifact as JSON, plus CSV export and search. The buyer-side mirror of Endpoint Revenue.</span>
- </a>
- </li>
</ul>
</section>
<nav class="sm-toc" aria-label="Sections">
@@ -2027,7 +2027,7 @@
<section class="sm-section" id="learn">
<header>
- <h2>Learn<span class="sm-count" data-count>159</span></h2>
+ <h2>Learn<span class="sm-count" data-count>160</span></h2>
<p class="sm-section-desc">Docs, tutorials, and reference.</p>
</header>
<ul class="sm-list">
@@ -2038,6 +2038,13 @@
<span class="sm-desc">Full documentation: SDKs, API reference, embedding, agent system, smart contracts.</span>
</a>
</li>
+ <li>
+ <a href="/docs/world">
+ <span class="sm-title">Docs World (immersive 3D docs)</span>
+ <span class="sm-path">/docs/world</span>
+ <span class="sm-desc">The full three.ws documentation as a walkable 3D world: every docs section is a glowing pavilion, and the live pages render inside the scene.</span>
+ </a>
+ </li>
<li>
<a href="/crypto">
<span class="sm-title">Crypto Data API</span>
diff --git a/scripts/audit-mcp-safety.mjs b/scripts/audit-mcp-safety.mjs
index 64824d45d..355ed5ce9 100644
--- a/scripts/audit-mcp-safety.mjs
+++ b/scripts/audit-mcp-safety.mjs
@@ -42,7 +42,7 @@
// Run: node scripts/audit-mcp-safety.mjs (exit 1 on any violation)
// node scripts/audit-mcp-safety.mjs --list (print every tool + evidence)
-import { allMcpToolSources } from './lib/mcp-tool-sources.mjs';
+import { mcpToolSources } from './lib/mcp-tool-sources.mjs';
import { checkTool, extractTools } from './lib/mcp-safety-check.mjs';
// ---------------------------------------------------------------------------
@@ -78,7 +78,7 @@ const EXEMPTIONS = new Map([
// Run
// ---------------------------------------------------------------------------
-const sources = allMcpToolSources();
+const sources = mcpToolSources();
const violations = [];
const exempted = [];
const rows = [];
diff --git a/scripts/build-examples-index.mjs b/scripts/build-examples-index.mjs
new file mode 100644
index 000000000..f44890c4a
--- /dev/null
+++ b/scripts/build-examples-index.mjs
@@ -0,0 +1,252 @@
+// Build data/examples.json: the machine-readable index of every runnable
+// example in the repo, derived from what is actually on disk.
+//
+// The /examples gallery page renders from this file, so the page can never
+// advertise an example that was deleted or miss one that was added. Run it
+// after adding or removing an examples directory:
+//
+// npm run build:examples
+//
+// Discovery rules, in order:
+// 1. Single-file HTML demos at the root of examples/.
+// 2. Project directories under examples/ (each has its own README).
+// 3. Per-package examples/ directories anywhere in the repo, excluding
+// node_modules and the robinhood/ suite (a separate vendored set).
+//
+// Every entry carries a title, a description, its runnable files, and the
+// command or URL that runs it. Descriptions come from the example's own README
+// or an HTML <title>/comment, never from a hand-kept list here.
+
+import { readFileSync, writeFileSync, readdirSync, existsSync, statSync } from 'node:fs';
+import { join, relative, basename, dirname } from 'node:path';
+import { fileURLToPath } from 'node:url';
+
+const root = join(dirname(fileURLToPath(import.meta.url)), '..');
+const OUT = join(root, 'data/examples.json');
+
+const SKIP_DIRS = new Set(['node_modules', '.git', 'dist', 'dist-lib', 'build', 'robinhood']);
+
+function read(path) {
+ try {
+ return readFileSync(path, 'utf8');
+ } catch {
+ return '';
+ }
+}
+
+// First real prose line of a markdown file, stripped of markup.
+function firstProse(md) {
+ const lines = md.split('\n');
+ let seenHeading = false;
+ const para = [];
+ for (const raw of lines) {
+ const line = raw.trim();
+ if (line.startsWith('# ')) {
+ seenHeading = true;
+ continue;
+ }
+ if (!seenHeading) continue;
+ const structural = !line || /^([#>|]|```|---|!\[)/.test(line);
+ if (!para.length && structural) continue;
+ if (para.length && structural) break;
+ para.push(line);
+ }
+ return para
+ .join(' ')
+ .replace(/\[([^\]]+)\]\([^)]+\)/g, '$1')
+ .replace(/`([^`]*)`/g, '$1')
+ .replace(/\*\*([^*]+)\*\*/g, '$1')
+ .replace(/[*_]/g, '')
+ .replace(/\s+/g, ' ')
+ .trim();
+}
+
+function firstHeading(md) {
+ const m = md.match(/^#\s+(.+)$/m);
+ return m ? m[1].replace(/`/g, '').trim() : null;
+}
+
+function clamp(text, max = 260) {
+ if (!text || text.length <= max) return text;
+ const window = text.slice(0, max);
+ const ends = [...window.matchAll(/[.!?](?=\s|$)/g)].map((m) => m.index + 1);
+ const cut = ends.length ? ends[ends.length - 1] : window.lastIndexOf(' ');
+ return window.slice(0, cut > 0 ? cut : max).trim();
+}
+
+function decodeEntities(s) {
+ return s
+ .replace(/&lt;/g, '<')
+ .replace(/&gt;/g, '>')
+ .replace(/&amp;/g, '&')
+ .replace(/&quot;/g, '"')
+ .replace(/&#39;/g, "'")
+ .replace(/&nbsp;/g, ' ');
+}
+
+// An HTML demo describes itself, in priority order, with a meta description,
+// its own visible intro paragraph, or the leading source comment. Anything
+// else would be copy invented here, so the field is left empty instead.
+function describeHtml(path) {
+ const html = read(path);
+ const title = html.match(/<title>([^<]+)<\/title>/i)?.[1]?.trim();
+ const meta = html.match(/<meta\s+name=["']description["']\s+content=["']([^"']+)/i)?.[1];
+ const bodyText = html
+ .split(/<body[^>]*>/i)[1]
+ ?.match(/<p[^>]*>([\s\S]{25,400}?)<\/p>/i)?.[1]
+ ?.replace(/<[^>]+>/g, ' ');
+ const lead = html.match(/^\s*<!--\s*([\s\S]{20,400}?)-->/m)?.[1];
+ const raw = meta || bodyText || lead || '';
+ const h1 = html.match(/<h1[^>]*>([\s\S]{2,90}?)<\/h1>/i)?.[1]?.replace(/<[^>]+>/g, '');
+ return {
+ title: decodeEntities(title || h1 || basename(path, '.html')).trim(),
+ description: clamp(decodeEntities(raw).replace(/\s+/g, ' ').trim()),
+ };
+}
+
+function listFiles(dir) {
+ if (!existsSync(dir)) return [];
+ return readdirSync(dir)
+ .filter((f) => !f.startsWith('.'))
+ .filter((f) => statSync(join(dir, f)).isFile())
+ .sort();
+}
+
+function runnableFiles(dir) {
+ return listFiles(dir).filter((f) => /\.(mjs|js|ts|html|sh|json)$/.test(f) && f !== 'package.json');
+}
+
+// How a reader actually runs this example, stated concretely.
+function runHint(dirRel, files) {
+ const script = files.find((f) => /\.(mjs|js)$/.test(f));
+ const shell = files.find((f) => f.endsWith('.sh'));
+ const html = files.find((f) => f.endsWith('.html'));
+ if (script) return `node ${dirRel}/${script}`;
+ if (shell) return `bash ${dirRel}/${shell}`;
+ if (html) return `open ${dirRel}/${html}`;
+ return null;
+}
+
+const entries = [];
+
+// 1. Single-file HTML demos at the root of examples/.
+const examplesDir = join(root, 'examples');
+for (const file of listFiles(examplesDir)) {
+ if (!file.endsWith('.html')) continue;
+ const abs = join(examplesDir, file);
+ const { title, description } = describeHtml(abs);
+ entries.push({
+ id: `demo:${file}`,
+ kind: 'html-demo',
+ group: 'Web component demos',
+ title,
+ description,
+ path: `examples/${file}`,
+ files: [file],
+ run: `http://localhost:3000/examples/${file}`,
+ runKind: 'url',
+ });
+}
+
+// 2. Project directories under examples/.
+for (const name of readdirSync(examplesDir)) {
+ const abs = join(examplesDir, name);
+ if (!existsSync(abs) || !statSync(abs).isDirectory()) continue;
+ if (SKIP_DIRS.has(name)) continue;
+ const readme = read(join(abs, 'README.md'));
+ const files = runnableFiles(abs);
+ entries.push({
+ id: `project:${name}`,
+ kind: 'project',
+ group: 'Example projects',
+ title: firstHeading(readme) || name,
+ description: clamp(firstProse(readme)),
+ path: `examples/${name}`,
+ files,
+ run: runHint(`examples/${name}`, files),
+ runKind: 'command',
+ readme: existsSync(join(abs, 'README.md')) ? `examples/${name}/README.md` : null,
+ });
+}
+
+// 3. Per-package examples/ directories.
+function findExampleDirs(dir, depth = 0) {
+ if (depth > 3) return [];
+ const found = [];
+ let items;
+ try {
+ items = readdirSync(dir);
+ } catch {
+ return found;
+ }
+ for (const name of items) {
+ if (name.startsWith('.') || SKIP_DIRS.has(name)) continue;
+ const abs = join(dir, name);
+ let st;
+ try {
+ st = statSync(abs);
+ } catch {
+ continue;
+ }
+ if (!st.isDirectory()) continue;
+ if (name === 'examples' && dir !== root) {
+ found.push(abs);
+ continue;
+ }
+ if (name === 'examples' || name === 'example') found.push(abs);
+ found.push(...findExampleDirs(abs, depth + 1));
+ }
+ return found;
+}
+
+const seen = new Set(entries.map((e) => e.path));
+for (const abs of findExampleDirs(root)) {
+ const rel = relative(root, abs);
+ if (rel.startsWith('examples/') || seen.has(rel)) continue;
+ const owner = dirname(rel);
+ const files = runnableFiles(abs);
+ if (!files.length) continue;
+ const readme = read(join(abs, 'README.md'));
+ const ownerReadme = read(join(root, owner, 'README.md'));
+ const pkgName = (() => {
+ try {
+ return JSON.parse(read(join(root, owner, 'package.json'))).name || owner;
+ } catch {
+ return owner;
+ }
+ })();
+ entries.push({
+ id: `package:${owner}`,
+ kind: 'package',
+ group: 'Package examples',
+ title: pkgName,
+ description: clamp(firstProse(readme) || firstProse(ownerReadme)),
+ path: rel,
+ files,
+ run: runHint(rel, files),
+ runKind: 'command',
+ readme: existsSync(join(abs, 'README.md')) ? `${rel}/README.md` : null,
+ owner,
+ });
+}
+
+entries.sort((a, b) => a.group.localeCompare(b.group) || a.title.localeCompare(b.title));
+
+const payload = {
+ $comment:
+ 'Generated by scripts/build-examples-index.mjs from what is on disk. Do not edit by hand; run npm run build:examples.',
+ generated_by: 'scripts/build-examples-index.mjs',
+ counts: {
+ total: entries.length,
+ html_demos: entries.filter((e) => e.kind === 'html-demo').length,
+ projects: entries.filter((e) => e.kind === 'project').length,
+ packages: entries.filter((e) => e.kind === 'package').length,
+ },
+ examples: entries,
+};
+
+writeFileSync(OUT, `${JSON.stringify(payload, null, '\t')}\n`);
+console.log(
+ `wrote data/examples.json: ${payload.counts.total} examples ` +
+ `(${payload.counts.html_demos} demos, ${payload.counts.projects} projects, ${payload.counts.packages} packages)`,
+);
diff --git a/scripts/lib/mcp-tool-sources.mjs b/scripts/lib/mcp-tool-sources.mjs
index d63a261e2..c51d2d305 100644
--- a/scripts/lib/mcp-tool-sources.mjs
+++ b/scripts/lib/mcp-tool-sources.mjs
@@ -50,41 +50,32 @@ function packageToolSources() {
}
// Tool-definition files that carry real MCP annotations but sit outside the
-// layout above, so the golden fixture never covered them. The safety gate has no
-// fixture to regenerate, so it covers them from day one; widening the golden
-// snapshot to match is a separate, reviewable change to a committed artifact.
-const UNSNAPSHOTTED_TOOL_FILES = ['api/_okx3d/tools.js', 'src/pump/mcp-tools.js'];
-
-const MCP_SERVER_TOOL_DIR = 'mcp-server/src/tools';
+// layouts above: the stdio flagship's tool factories, the OKX A2MCP variant, and
+// the pump.fun server's single registry module.
+const EXTRA_TOOL_DIRS = ['mcp-server/src/tools'];
+const EXTRA_TOOL_FILES = ['api/_okx3d/tools.js', 'src/pump/mcp-tools.js'];
/**
- * Sorted, repo-relative paths of every MCP tool-definition file covered by the
- * golden contract snapshot.
+ * Sorted, repo-relative paths of every MCP tool-definition file in the repo.
+ * Both gates read this same list, so a public tool contract cannot be guarded by
+ * one and invisible to the other.
* @returns {string[]}
*/
export function mcpToolSources() {
+ const fromDirs = (dirs) =>
+ dirs
+ .filter((d) => existsSync(join(ROOT, d)))
+ .flatMap((d) => readdirSync(join(ROOT, d)).map((f) => `${d}/${f}`));
+
return [
- ...HOSTED_TOOL_DIRS.filter((d) => existsSync(join(ROOT, d))).flatMap((d) =>
- readdirSync(join(ROOT, d)).map((f) => `${d}/${f}`),
- ),
- ...HOSTED_TOOL_FILES.filter((f) => existsSync(join(ROOT, f))),
- ...packageToolSources(),
+ ...new Set([
+ ...fromDirs(HOSTED_TOOL_DIRS),
+ ...fromDirs(EXTRA_TOOL_DIRS),
+ ...HOSTED_TOOL_FILES,
+ ...EXTRA_TOOL_FILES,
+ ...packageToolSources(),
+ ]),
]
- .filter((f) => f.endsWith('.js'))
+ .filter((f) => f.endsWith('.js') && existsSync(join(ROOT, f)))
.sort();
}
-
-/**
- * Every tool-definition file the SAFETY gate checks: the snapshotted set plus
- * the surfaces the golden fixture does not reach.
- * @returns {string[]}
- */
-export function allMcpToolSources() {
- const extra = [
- ...UNSNAPSHOTTED_TOOL_FILES,
- ...(existsSync(join(ROOT, MCP_SERVER_TOOL_DIR))
- ? readdirSync(join(ROOT, MCP_SERVER_TOOL_DIR)).map((f) => `${MCP_SERVER_TOOL_DIR}/${f}`)
- : []),
- ].filter((f) => f.endsWith('.js') && existsSync(join(ROOT, f)));
- return [...new Set([...mcpToolSources(), ...extra])].sort();
-}
diff --git a/src/docs-world/controls.js b/src/docs-world/controls.js
new file mode 100644
index 000000000..d5578ea1a
--- /dev/null
+++ b/src/docs-world/controls.js
@@ -0,0 +1,152 @@
+// Docs World input: one module that turns keyboard, mouse, and touch into
+// { move, look, run, interact } for the frame loop.
+//
+// Desktop: WASD / arrows to walk, Shift to run, drag to orbit, wheel to zoom,
+// E / Enter to open the nearest pavilion, C to cycle the camera, Esc handled
+// by the overlays themselves.
+// Touch: a virtual joystick owns the lower-left corner; dragging anywhere
+// else orbits the camera; a short tap raycasts (handled by main.js via the
+// onTap callback so taps and orbit drags never fight).
+
+const TAP_MAX_MS = 350;
+const TAP_MAX_PX = 12;
+const LOOK_SPEED = 0.0052;
+const PITCH_MIN = 0.08;
+const PITCH_MAX = 1.25;
+const DIST_MIN = 4;
+const DIST_MAX = 16;
+
+export function createControls(canvas, { onTap, onInteract, onCycleCamera } = {}) {
+ const keys = new Set();
+ const move = { x: 0, z: 0 };
+ // yaw starts at PI so the spawn view looks across the plaza toward the ring:
+ // the player spawns at +z with the camera outside them, beacon behind.
+ const orbit = { yaw: Math.PI, pitch: 0.42, dist: 8.5 };
+ const joystick = { active: false, id: null, baseX: 0, baseY: 0, x: 0, y: 0 };
+
+ // ── Keyboard ───────────────────────────────────────────────────────────────
+ function isTypingTarget(e) {
+ const t = e.target;
+ return t && (t.tagName === 'INPUT' || t.tagName === 'TEXTAREA' || t.isContentEditable);
+ }
+ addEventListener('keydown', (e) => {
+ if (isTypingTarget(e)) return;
+ const k = e.key.toLowerCase();
+ keys.add(k);
+ if (k === 'e' || k === 'enter') onInteract?.();
+ if (k === 'c') onCycleCamera?.();
+ if (['arrowup', 'arrowdown', 'arrowleft', 'arrowright', ' '].includes(k)) e.preventDefault();
+ });
+ addEventListener('keyup', (e) => keys.delete(e.key.toLowerCase()));
+ addEventListener('blur', () => keys.clear());
+
+ // ── Pointer orbit + tap ────────────────────────────────────────────────────
+ let dragging = false;
+ let dragMoved = 0;
+ let downAt = 0;
+ let lastX = 0;
+ let lastY = 0;
+ let orbitPointer = null;
+
+ canvas.addEventListener('pointerdown', (e) => {
+ // Touch in the joystick zone belongs to the joystick.
+ if (e.pointerType === 'touch' && inJoystickZone(e)) {
+ joystick.active = true;
+ joystick.id = e.pointerId;
+ joystick.baseX = e.clientX;
+ joystick.baseY = e.clientY;
+ joystick.x = 0;
+ joystick.y = 0;
+ canvas.setPointerCapture(e.pointerId);
+ return;
+ }
+ dragging = true;
+ orbitPointer = e.pointerId;
+ dragMoved = 0;
+ downAt = performance.now();
+ lastX = e.clientX;
+ lastY = e.clientY;
+ canvas.setPointerCapture(e.pointerId);
+ });
+
+ canvas.addEventListener('pointermove', (e) => {
+ if (joystick.active && e.pointerId === joystick.id) {
+ const R = 52;
+ const dx = e.clientX - joystick.baseX;
+ const dy = e.clientY - joystick.baseY;
+ const d = Math.hypot(dx, dy) || 1;
+ const clamped = Math.min(d, R);
+ joystick.x = (dx / d) * (clamped / R);
+ joystick.y = (dy / d) * (clamped / R);
+ return;
+ }
+ if (!dragging || e.pointerId !== orbitPointer) return;
+ const dx = e.clientX - lastX;
+ const dy = e.clientY - lastY;
+ dragMoved += Math.abs(dx) + Math.abs(dy);
+ lastX = e.clientX;
+ lastY = e.clientY;
+ orbit.yaw -= dx * LOOK_SPEED;
+ orbit.pitch = Math.max(PITCH_MIN, Math.min(PITCH_MAX, orbit.pitch + dy * LOOK_SPEED));
+ });
+
+ function endPointer(e) {
+ if (joystick.active && e.pointerId === joystick.id) {
+ joystick.active = false;
+ joystick.id = null;
+ joystick.x = 0;
+ joystick.y = 0;
+ return;
+ }
+ if (e.pointerId !== orbitPointer) return;
+ const wasTap = dragMoved < TAP_MAX_PX && performance.now() - downAt < TAP_MAX_MS;
+ dragging = false;
+ orbitPointer = null;
+ if (wasTap) onTap?.(e);
+ }
+ canvas.addEventListener('pointerup', endPointer);
+ canvas.addEventListener('pointercancel', endPointer);
+
+ canvas.addEventListener(
+ 'wheel',
+ (e) => {
+ e.preventDefault();
+ orbit.dist = Math.max(DIST_MIN, Math.min(DIST_MAX, orbit.dist + e.deltaY * 0.01));
+ },
+ { passive: false },
+ );
+
+ function inJoystickZone(e) {
+ const r = canvas.getBoundingClientRect();
+ return e.clientX - r.left < r.width * 0.42 && e.clientY - r.top > r.height * 0.5;
+ }
+
+ return {
+ orbit,
+ joystick,
+ /** Screen-space movement vector, |v| <= 1. x: right, z: forward. */
+ readMove() {
+ let x = 0;
+ let z = 0;
+ if (keys.has('w') || keys.has('arrowup')) z += 1;
+ if (keys.has('s') || keys.has('arrowdown')) z -= 1;
+ if (keys.has('a') || keys.has('arrowleft')) x -= 1;
+ if (keys.has('d') || keys.has('arrowright')) x += 1;
+ if (x || z) {
+ const n = Math.hypot(x, z);
+ move.x = x / n;
+ move.z = z / n;
+ } else if (joystick.active) {
+ move.x = joystick.x;
+ move.z = -joystick.y;
+ } else {
+ move.x = 0;
+ move.z = 0;
+ }
+ return move;
+ },
+ get run() {
+ return keys.has('shift') || (joystick.active && Math.hypot(joystick.x, joystick.y) > 0.92);
+ },
+ };
+}
diff --git a/src/docs-world/main.js b/src/docs-world/main.js
new file mode 100644
index 000000000..14865470f
--- /dev/null
+++ b/src/docs-world/main.js
@@ -0,0 +1,274 @@
+// Docs World entry: /docs/world
+//
+// The three.ws documentation as a walkable place. Boots the scene (world.js),
+// the avatar (player.js), input (controls.js) and the DOM overlays
+// (reader.js), then runs a governed frame loop. The content itself never
+// forks: the world reads /docs/nav.json and /docs/<slug>.md, the exact files
+// the classic docs SPA renders, so both surfaces are always in sync.
+//
+// Device behaviour:
+// - No WebGL: a designed fallback panel routes to the classic docs.
+// - Touch: virtual joystick + drag look + tap to open pavilions.
+// - prefers-reduced-motion: ambient animation is stilled.
+// - Unfocused tab / power saver / open reader: frame cap drops to 30fps.
+
+import { Raycaster, Vector2 } from 'three';
+import { isWebGLAvailable } from '../webgl-support.js';
+import {
+ createFrameGovernor,
+ trackWindowFocus,
+ getPowerSaver,
+ onPowerSaverChange,
+ FPS_ACTIVE,
+ FPS_IDLE,
+} from '../shared/frame-governor.js';
+import { createCameraModeController, CAMERA_MODE_LABELS } from '../game/camera-modes.js';
+import { createDocsWorld, PAVILION_TRIGGER } from './world.js';
+import { createPlayer, requestedAvatarUrl } from './player.js';
+import { createControls } from './controls.js';
+import { createOverlays } from './reader.js';
+import { log } from '../shared/log.js';
+
+const $ = (id) => document.getElementById(id);
+
+function showFallback(message) {
+ const el = $('dw-fallback');
+ if (message) $('dw-fallback-sub').textContent = message;
+ el.hidden = false;
+ $('dw-loading').hidden = true;
+}
+
+async function boot() {
+ if (!isWebGLAvailable()) {
+ showFallback();
+ return;
+ }
+
+ let sections;
+ try {
+ const res = await fetch('/docs/nav.json');
+ if (!res.ok) throw new Error('HTTP ' + res.status);
+ const nav = await res.json();
+ sections = Array.isArray(nav.sections) ? nav.sections : [];
+ if (!sections.length) throw new Error('empty manifest');
+ } catch (err) {
+ log.warn('[docs-world] nav manifest failed', err?.message);
+ showFallback('The docs manifest could not be loaded. The classic docs below always work.');
+ return;
+ }
+
+ const reducedMotion =
+ typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;
+
+ const canvas = $('dw-canvas');
+ let world;
+ try {
+ world = createDocsWorld(canvas, sections, { reducedMotion });
+ } catch {
+ // createRenderer already mounted its own panel; ours routes to the docs.
+ showFallback();
+ return;
+ }
+
+ const player = createPlayer(world.scene, world.renderer, {
+ avatarUrl: requestedAvatarUrl(),
+ });
+
+ const overlays = createOverlays({
+ sections,
+ onNavigateDoc(path) {
+ // Shareable URLs: /docs/world#<slug> reopens the same doc. replaceState
+ // keeps Back as "leave the world", not a crawl through every doc read.
+ const url = path ? '#' + path : location.pathname + location.search;
+ history.replaceState(null, '', url);
+ },
+ });
+
+ const cameraBtn = $('dw-camera-btn');
+ const cameraCtl = createCameraModeController({
+ storageKey: 'docs-world-camera',
+ onChange(mode) {
+ cameraBtn.textContent = CAMERA_MODE_LABELS[mode];
+ player.setVisible(mode !== 'firstperson');
+ },
+ });
+ cameraBtn.textContent = CAMERA_MODE_LABELS[cameraCtl.mode];
+ player.setVisible(!cameraCtl.isFirstPerson());
+
+ let nearest = null;
+
+ const controls = createControls(canvas, {
+ onTap(e) {
+ const rect = canvas.getBoundingClientRect();
+ pointerNdc.set(
+ ((e.clientX - rect.left) / rect.width) * 2 - 1,
+ -((e.clientY - rect.top) / rect.height) * 2 + 1,
+ );
+ raycaster.setFromCamera(pointerNdc, world.camera);
+ for (const hit of raycaster.intersectObjects(
+ world.pavilions.map((p) => p.group),
+ true,
+ )) {
+ let node = hit.object;
+ while (node && !node.userData.pavilionIndex && node.userData.pavilionIndex !== 0) {
+ node = node.parent;
+ }
+ if (node) {
+ overlays.openSection(node.userData.pavilionIndex);
+ return;
+ }
+ }
+ },
+ onInteract() {
+ if (overlays.isOpen) return;
+ if (nearest) overlays.openSection(nearest.index);
+ },
+ onCycleCamera() {
+ cameraCtl.cycle(world.camera);
+ },
+ });
+ cameraBtn.addEventListener('click', () => cameraCtl.cycle(world.camera));
+
+ const raycaster = new Raycaster();
+ const pointerNdc = new Vector2();
+ world.pavilions.forEach((p, i) => {
+ p.group.userData.pavilionIndex = i;
+ });
+
+ // ── Index overlay: every section, keyboard-reachable, teleports the player ──
+ const indexEl = $('dw-index');
+ const indexList = $('dw-index-list');
+ sections.forEach((s, i) => {
+ const btn = document.createElement('button');
+ btn.type = 'button';
+ btn.className = 'dw-index-item';
+ const pages = s.links.filter((l) => l.path).length;
+ btn.innerHTML =
+ '<span class="dw-index-dot" style="background:#' +
+ world.pavilions[i].color.getHexString() +
+ '"></span><span>' +
+ s.title +
+ '</span><span class="dw-index-count">' +
+ pages +
+ '</span>';
+ btn.addEventListener('click', () => {
+ indexEl.hidden = true;
+ player.teleportToPavilion(world.pavilions[i]);
+ controls.orbit.yaw = -world.pavilions[i].angle + Math.PI / 2;
+ overlays.openSection(i);
+ });
+ indexList.appendChild(btn);
+ });
+ $('dw-index-btn').addEventListener('click', () => {
+ indexEl.hidden = !indexEl.hidden;
+ });
+ $('dw-index-close').addEventListener('click', () => {
+ indexEl.hidden = true;
+ });
+
+ $('dw-help-btn').addEventListener('click', () => {
+ $('dw-help').hidden = !$('dw-help').hidden;
+ });
+ $('dw-help-close').addEventListener('click', () => {
+ $('dw-help').hidden = true;
+ });
+
+ // ── Deep link: /docs/world#<slug> opens that doc at its pavilion ───────────
+ function openFromHash() {
+ const slug = decodeURIComponent(location.hash.slice(1).replace(/^\//, ''));
+ if (!slug) return;
+ // An unknown slug (a stale link, a typo, a hash meant for another page)
+ // used to open the reader on a doc that does not exist, so entering the
+ // world greeted the visitor with a load error over the scene. Ignore it
+ // instead and leave them standing in the world, which is the thing they
+ // asked for either way.
+ if (!overlays.hasPath(slug)) return;
+ const si = overlays.sectionIndexForPath(slug);
+ if (si >= 0) {
+ player.teleportToPavilion(world.pavilions[si]);
+ controls.orbit.yaw = -world.pavilions[si].angle + Math.PI / 2;
+ }
+ overlays.openDoc(slug);
+ }
+ openFromHash();
+ addEventListener('hashchange', openFromHash);
+
+ // ── Proximity prompt ───────────────────────────────────────────────────────
+ const prompt = $('dw-prompt');
+ const promptLabel = $('dw-prompt-label');
+ prompt.addEventListener('click', () => {
+ if (nearest) overlays.openSection(nearest.index);
+ });
+
+ function updateNearest() {
+ nearest = null;
+ let best = PAVILION_TRIGGER;
+ for (const p of world.pavilions) {
+ const d = Math.hypot(
+ player.position.x - p.group.position.x,
+ player.position.z - p.group.position.z,
+ );
+ if (d < best) {
+ best = d;
+ nearest = p;
+ }
+ }
+ const show = !!nearest && !overlays.isOpen;
+ prompt.hidden = !show;
+ if (show) promptLabel.textContent = nearest.section.title;
+ }
+
+ // ── Touch joystick visual ──────────────────────────────────────────────────
+ const joyEl = $('dw-joystick');
+ const joyThumb = $('dw-joystick-thumb');
+ function updateJoystickVisual() {
+ const j = controls.joystick;
+ joyEl.hidden = !j.active;
+ if (j.active) {
+ joyEl.style.left = j.baseX + 'px';
+ joyEl.style.top = j.baseY + 'px';
+ joyThumb.style.transform = 'translate(' + j.x * 34 + 'px,' + j.y * 34 + 'px)';
+ }
+ }
+
+ // ── Frame loop ─────────────────────────────────────────────────────────────
+ const governor = createFrameGovernor();
+ const focus = trackWindowFocus();
+ let saver = getPowerSaver();
+ onPowerSaverChange((on) => {
+ saver = on;
+ });
+
+ addEventListener('resize', world.resize);
+
+ let last = performance.now();
+ function frame(now) {
+ requestAnimationFrame(frame);
+ const cap = saver || !focus.focused || overlays.isOpen ? FPS_IDLE : FPS_ACTIVE;
+ if (!governor.shouldRun(now, cap)) return;
+ const dt = Math.min(0.05, (now - last) / 1000);
+ last = now;
+
+ player.update(dt, controls.readMove(), controls.orbit.yaw, controls.run, world.pavilions);
+ world.tick(dt);
+ cameraCtl.tick(dt);
+ cameraCtl.apply(world.camera, player.position, player.height, controls.orbit, 0.35);
+ updateNearest();
+ updateJoystickVisual();
+ world.renderer.render(world.scene, world.camera);
+ }
+
+ $('dw-loading').hidden = true;
+ $('dw-hud').hidden = false;
+ // Console/debug handle, same convention as window.__walkPlayground.
+ window.__docsWorld = { world, player, overlays, controls };
+ requestAnimationFrame((t) => {
+ last = t;
+ frame(t);
+ });
+}
+
+boot().catch((err) => {
+ log.error('[docs-world] boot failed', err);
+ showFallback();
+});
diff --git a/src/docs-world/player.js b/src/docs-world/player.js
new file mode 100644
index 000000000..f2432c0bf
--- /dev/null
+++ b/src/docs-world/player.js
@@ -0,0 +1,236 @@
+// Docs World player: the visitor's avatar walking the documentation.
+//
+// Loads the universal mannequin (or a custom GLB passed via ?avatar=, the same
+// contract /play honours) and drives it with the platform's canonical clip
+// library through AnimationManager, so any humanoid rig walks here exactly as
+// it does in /walk. If the GLB or WebGL-side load fails, a simple glowing
+// capsule stands in: the world stays fully usable, it just loses the fancy
+// body.
+
+import {
+ Box3,
+ CapsuleGeometry,
+ Group,
+ Mesh,
+ MeshStandardMaterial,
+ Vector3,
+} from 'three';
+import { AnimationManager } from '../animation-manager.js';
+import { gltfLoader } from '../loaders/gltf.js';
+import { MANNEQUIN_GLB } from '../shared/agent-3d.js';
+import { log } from '../shared/log.js';
+import { WORLD_RADIUS, RING_RADIUS } from './world.js';
+
+const CLIP_IDLE = 'idle';
+const CLIP_WALK = 'av-walk-feminine'; // same walk clip /walk uses; timeScale sets pace
+
+const WALK_SPEED = 3.1; // m/s
+const RUN_SPEED = 6.0;
+const ACCEL = 18;
+const FRICTION = 14;
+const TURN_LERP = 12;
+
+// Pavilion platforms are solid: keep the player from clipping through the
+// portal rings by pushing them out of a small keep-out disc per pavilion.
+const PAVILION_KEEPOUT = 2.4;
+
+const GLB_RE = /\.(glb|gltf|vrm)(\?|#|$)/i;
+
+/** Resolve the avatar to walk with: ?avatar=<glb url> or the mannequin. */
+export function requestedAvatarUrl(search = location.search) {
+ try {
+ const q = new URLSearchParams(search).get('avatar');
+ if (q && GLB_RE.test(q)) {
+ const url = new URL(q, location.origin);
+ if (url.protocol === 'https:' || url.origin === location.origin) return url.href;
+ }
+ } catch {
+ /* malformed query: fall through to the default body */
+ }
+ return MANNEQUIN_GLB;
+}
+
+function fallbackBody() {
+ const mesh = new Mesh(
+ new CapsuleGeometry(0.32, 1.05, 6, 14),
+ new MeshStandardMaterial({
+ color: 0x2a2444,
+ roughness: 0.5,
+ metalness: 0.3,
+ emissive: 0x8b5cf6,
+ emissiveIntensity: 0.35,
+ }),
+ );
+ mesh.position.y = 0.85;
+ return mesh;
+}
+
+/**
+ * @param {import('three').Scene} scene
+ * @param {import('three').WebGLRenderer} renderer
+ * @param {{ avatarUrl?: string }} [opts]
+ */
+export function createPlayer(scene, renderer, { avatarUrl = MANNEQUIN_GLB } = {}) {
+ const root = new Group();
+ // Spawn a few metres off plaza centre: the beacon monolith stands at the
+ // exact origin and would otherwise occlude the freshly-loaded avatar.
+ // Facing -z, matching the camera's spawn yaw of PI (controls.js), so the
+ // first view reads avatar → plaza → pavilion ring.
+ root.position.set(0, 0, 3.2);
+ root.rotation.y = Math.PI;
+ scene.add(root);
+
+ const anim = new AnimationManager();
+ let height = 1.7;
+ let modelReady = false;
+ let currentClip = null;
+
+ const loader = gltfLoader(renderer);
+ loader.load(
+ avatarUrl,
+ async (gltf) => {
+ const model = gltf.scene;
+ const box = new Box3().setFromObject(model);
+ const size = box.getSize(new Vector3());
+ // Normalise wildly-scaled custom rigs to human height.
+ if (size.y > 0.1 && (size.y < 1.2 || size.y > 2.4)) {
+ model.scale.multiplyScalar(1.7 / size.y);
+ }
+ const fitted = new Box3().setFromObject(model);
+ model.position.y -= fitted.min.y;
+ height = Math.max(1.2, fitted.max.y - fitted.min.y);
+ root.add(model);
+
+ anim.attach(model, { avatarUrl });
+ try {
+ const defs = await fetch('/animations/manifest.json').then((r) => (r.ok ? r.json() : []));
+ if (Array.isArray(defs) && defs.length) {
+ anim.setAnimationDefs(defs);
+ const ok = await anim.ensureLoaded(CLIP_IDLE);
+ if (ok) await anim.crossfadeTo(CLIP_IDLE, 0);
+ currentClip = CLIP_IDLE;
+ anim.ensureLoaded(CLIP_WALK).catch(() => {});
+ }
+ } catch (err) {
+ log.warn('[docs-world] clip library unavailable', err?.message);
+ }
+ modelReady = true;
+ },
+ undefined,
+ (err) => {
+ log.warn('[docs-world] avatar load failed, using capsule body', err?.message);
+ root.add(fallbackBody());
+ modelReady = true;
+ },
+ );
+
+ const velocity = new Vector3();
+ const desired = new Vector3();
+ let running = false;
+ let targetYaw = 0;
+
+ /**
+ * Advance the simulation.
+ *
+ * @param {number} dt seconds (already clamped by the caller)
+ * @param {{x:number, z:number}} move input vector in camera space, |v| <= 1
+ * @param {number} camYaw camera yaw so input is screen-relative
+ * @param {boolean} run
+ * @param {Array<{group: import('three').Group}>} pavilions keep-out volumes
+ */
+ function update(dt, move, camYaw, run, pavilions) {
+ running = run;
+ const mag = Math.min(1, Math.hypot(move.x, move.z));
+ const speedCap = (run ? RUN_SPEED : WALK_SPEED) * mag;
+
+ if (mag > 0.01) {
+ // Rotate the stick vector into world space around the camera yaw.
+ const sin = Math.sin(camYaw);
+ const cos = Math.cos(camYaw);
+ desired.set(move.x * cos + move.z * sin, 0, -move.x * sin + move.z * cos);
+ desired.normalize().multiplyScalar(speedCap);
+ velocity.x += (desired.x - velocity.x) * Math.min(1, ACCEL * dt);
+ velocity.z += (desired.z - velocity.z) * Math.min(1, ACCEL * dt);
+ targetYaw = Math.atan2(velocity.x, velocity.z);
+ } else {
+ const damp = Math.max(0, 1 - FRICTION * dt);
+ velocity.x *= damp;
+ velocity.z *= damp;
+ }
+
+ root.position.x += velocity.x * dt;
+ root.position.z += velocity.z * dt;
+
+ // World bound: soft clamp to the walkable disc.
+ const dist = Math.hypot(root.position.x, root.position.z);
+ if (dist > WORLD_RADIUS) {
+ root.position.x *= WORLD_RADIUS / dist;
+ root.position.z *= WORLD_RADIUS / dist;
+ }
+
+ // Pavilion keep-out: push out radially so portals stay walk-aroundable.
+ if (pavilions) {
+ for (const p of pavilions) {
+ const dx = root.position.x - p.group.position.x;
+ const dz = root.position.z - p.group.position.z;
+ const d = Math.hypot(dx, dz);
+ if (d > 0.001 && d < PAVILION_KEEPOUT) {
+ const push = PAVILION_KEEPOUT / d;
+ root.position.x = p.group.position.x + dx * push;
+ root.position.z = p.group.position.z + dz * push;
+ }
+ }
+ }
+
+ // Face travel direction.
+ const speed = Math.hypot(velocity.x, velocity.z);
+ if (speed > 0.15) {
+ let delta = targetYaw - root.rotation.y;
+ while (delta > Math.PI) delta -= Math.PI * 2;
+ while (delta < -Math.PI) delta += Math.PI * 2;
+ root.rotation.y += delta * Math.min(1, TURN_LERP * dt);
+ }
+
+ // Locomotion clips: idle below a threshold, walk above, run = faster walk.
+ if (modelReady && anim.mixer) {
+ const want = speed > 0.35 ? CLIP_WALK : CLIP_IDLE;
+ if (want !== currentClip && anim.canPlay(want)) {
+ currentClip = want;
+ anim.crossfadeTo(want, want === CLIP_WALK ? 0.18 : 0.25).catch(() => {});
+ }
+ anim.setSpeed(want === CLIP_WALK ? Math.max(0.85, Math.min(1.7, speed / WALK_SPEED)) : 1);
+ anim.update(dt);
+ }
+ }
+
+ return {
+ root,
+ get position() {
+ return root.position;
+ },
+ get height() {
+ return height;
+ },
+ get speed() {
+ return Math.hypot(velocity.x, velocity.z);
+ },
+ get running() {
+ return running;
+ },
+ update,
+ setVisible(v) {
+ root.visible = v;
+ },
+ /** Drop the player just inside the ring, facing a pavilion. */
+ teleportToPavilion(pavilion) {
+ const a = pavilion.angle;
+ const r = RING_RADIUS - PAVILION_KEEPOUT - 1.4;
+ root.position.set(Math.cos(a) * r, 0, Math.sin(a) * r);
+ root.rotation.y = Math.atan2(
+ pavilion.group.position.x - root.position.x,
+ pavilion.group.position.z - root.position.z,
+ );
+ velocity.set(0, 0, 0);
+ },
+ };
+}
diff --git a/src/docs-world/reader.js b/src/docs-world/reader.js
new file mode 100644
index 000000000..4b7fba8d0
--- /dev/null
+++ b/src/docs-world/reader.js
@@ -0,0 +1,207 @@
+// Docs World overlays: the section page-list panel and the in-world reader.
+//
+// Both are real DOM (not textures), so the documentation stays selectable,
+// zoomable, screen-reader-visible, and SEO-irrelevant chrome stays out of the
+// scene. The reader fetches the SAME markdown the classic docs render
+// (/docs/<slug>.md) and pipes it through the shared sanitized renderer, so
+// there is exactly one source of documentation content on the platform.
+
+import { renderMarkdown } from '../shared/markdown.js';
+
+const MD_CLASSES = {
+ pre: 'dw-code',
+ 'code:not(pre code)': 'dw-ic',
+ table: 'dw-md-table',
+ blockquote: 'dw-quote',
+};
+
+/** Resolve relative .md links against the current doc so the sanitizer keeps
+ * them (it only preserves rooted, http(s), mailto and #hash hrefs). */
+function absolutizeMdLinks(md, currentPath) {
+ return md.replace(/\]\((?!https?:|mailto:|\/|#)([^)\s]+\.md[^)\s]*)\)/g, (m, rel) => {
+ try {
+ const abs = new URL(rel, location.origin + '/docs/' + currentPath).pathname;
+ return '](' + abs + ')';
+ } catch {
+ return m;
+ }
+ });
+}
+
+/**
+ * @param {{ sections: Array<{title:string, links:Array}>,
+ * onNavigateDoc?: (path: string|null) => void }} opts
+ * onNavigateDoc fires whenever the open doc changes (null = reader closed),
+ * letting main.js keep the URL hash shareable.
+ */
+export function createOverlays({ sections, onNavigateDoc }) {
+ const flatPages = sections.flatMap((s) =>
+ s.links.filter((l) => l.path).map((l) => ({ ...l, section: s.title })),
+ );
+
+ const panel = document.getElementById('dw-panel');
+ const panelTitle = document.getElementById('dw-panel-title');
+ const panelList = document.getElementById('dw-panel-list');
+ const panelClose = document.getElementById('dw-panel-close');
+
+ const reader = document.getElementById('dw-reader');
+ const readerCrumb = document.getElementById('dw-reader-crumb');
+ const readerBody = document.getElementById('dw-reader-body');
+ const readerClassic = document.getElementById('dw-reader-classic');
+ const readerClose = document.getElementById('dw-reader-close');
+ const readerPrev = document.getElementById('dw-reader-prev');
+ const readerNext = document.getElementById('dw-reader-next');
+
+ let openPath = null;
+ let lastFocus = null;
+
+ // ── Section panel ──────────────────────────────────────────────────────────
+ function openSection(index) {
+ const section = sections[index];
+ if (!section) return;
+ panelTitle.textContent = section.title;
+ panelList.innerHTML = '';
+ for (const link of section.links) {
+ const a = document.createElement('a');
+ a.className = 'dw-panel-link';
+ a.textContent = link.label;
+ if (link.path) {
+ a.href = '/docs/' + link.path;
+ // The injected view-transitions shell handles internal links in a
+ // document CAPTURE listener, so it would navigate before this
+ // handler ever runs. data-no-transition is its designed opt-out.
+ a.dataset.noTransition = '1';
+ a.addEventListener('click', (e) => {
+ e.preventDefault();
+ openDoc(link.path);
+ });
+ } else {
+ a.href = link.href;
+ a.target = '_blank';
+ a.rel = 'noopener';
+ a.classList.add('external');
+ }
+ panelList.appendChild(a);
+ }
+ lastFocus = document.activeElement;
+ panel.hidden = false;
+ requestAnimationFrame(() => panel.classList.add('open'));
+ panelClose.focus({ preventScroll: true });
+ }
+
+ function closeSection() {
+ panel.classList.remove('open');
+ panel.hidden = true;
+ lastFocus?.focus?.({ preventScroll: true });
+ }
+
+ // ── Reader ─────────────────────────────────────────────────────────────────
+ async function openDoc(path) {
+ openPath = path;
+ const meta = flatPages.find((p) => p.path === path);
+ readerCrumb.textContent = meta ? meta.section + ' / ' + meta.label : path;
+ readerClassic.href = '/docs/' + path;
+ readerBody.innerHTML =
+ '<div class="dw-skeleton"><span></span><span></span><span></span><span class="short"></span></div>';
+ reader.hidden = false;
+ requestAnimationFrame(() => reader.classList.add('open'));
+ readerClose.focus({ preventScroll: true });
+ renderPager(path);
+ onNavigateDoc?.(path);
+
+ try {
+ const res = await fetch('/docs/' + path + '.md');
+ if (!res.ok) throw new Error('HTTP ' + res.status);
+ const md = await res.text();
+ if (openPath !== path) return; // reader moved on while fetching
+ readerBody.innerHTML = renderMarkdown(absolutizeMdLinks(md, path), {
+ classes: MD_CLASSES,
+ });
+ readerBody.scrollTop = 0;
+ interceptDocLinks();
+ } catch (err) {
+ if (openPath !== path) return;
+ readerBody.innerHTML = '';
+ const errBox = document.createElement('div');
+ errBox.className = 'dw-error';
+ errBox.innerHTML =
+ '<p>Could not load this page (' +
+ String(err?.message || err).replace(/[<>&]/g, '') +
+ ').</p>';
+ const retry = document.createElement('button');
+ retry.type = 'button';
+ retry.className = 'dw-btn';
+ retry.textContent = 'Retry';
+ retry.addEventListener('click', () => openDoc(path));
+ const classic = document.createElement('a');
+ classic.className = 'dw-btn ghost';
+ classic.href = '/docs/' + path;
+ classic.textContent = 'Open in classic docs';
+ errBox.append(retry, classic);
+ readerBody.appendChild(errBox);
+ }
+ }
+
+ // Keep in-doc navigation inside the world: a link to another doc opens in
+ // this reader instead of tearing the visitor out to the classic SPA.
+ function interceptDocLinks() {
+ for (const a of readerBody.querySelectorAll('a[href]')) {
+ const href = a.getAttribute('href') || '';
+ const m = href.match(/^\/docs\/(.+?)(?:\.md)?$/);
+ if (!m || m[1].startsWith('walk')) continue;
+ a.dataset.noTransition = '1'; // keep the view-transitions shell off it
+ a.addEventListener('click', (e) => {
+ e.preventDefault();
+ openDoc(m[1]);
+ });
+ a.removeAttribute('target');
+ }
+ }
+
+ function renderPager(path) {
+ const idx = flatPages.findIndex((p) => p.path === path);
+ const prev = idx > 0 ? flatPages[idx - 1] : null;
+ const next = idx >= 0 && idx < flatPages.length - 1 ? flatPages[idx + 1] : null;
+ readerPrev.disabled = !prev;
+ readerNext.disabled = !next;
+ readerPrev.textContent = prev ? '← ' + prev.label : '← Start';
+ readerNext.textContent = next ? next.label + ' →' : 'End →';
+ readerPrev.onclick = prev ? () => openDoc(prev.path) : null;
+ readerNext.onclick = next ? () => openDoc(next.path) : null;
+ }
+
+ function closeReader() {
+ openPath = null;
+ reader.classList.remove('open');
+ reader.hidden = true;
+ onNavigateDoc?.(null);
+ }
+
+ panelClose.addEventListener('click', closeSection);
+ readerClose.addEventListener('click', closeReader);
+ addEventListener('keydown', (e) => {
+ if (e.key !== 'Escape') return;
+ if (!reader.hidden) closeReader();
+ else if (!panel.hidden) closeSection();
+ });
+
+ return {
+ openSection,
+ closeSection,
+ openDoc,
+ closeReader,
+ get isOpen() {
+ return !reader.hidden || !panel.hidden;
+ },
+ /** Section index that contains a doc path, or -1. */
+ sectionIndexForPath(path) {
+ return sections.findIndex((s) => s.links.some((l) => l.path === path));
+ },
+ /** True when `path` is a page in the manifest. Lets a deep link decide
+ * whether to open the reader at all, instead of opening it on an unknown
+ * slug and greeting the visitor with a 404 the moment the world loads. */
+ hasPath(path) {
+ return flatPages.some((p) => p.path === path);
+ },
+ };
+}
diff --git a/src/docs-world/world.js b/src/docs-world/world.js
new file mode 100644
index 000000000..5810ca946
--- /dev/null
+++ b/src/docs-world/world.js
@@ -0,0 +1,382 @@
+// Docs World scene: the documentation rendered as a place.
+//
+// Fourteen nav sections (from /docs/nav.json, the same manifest the classic
+// docs sidebar renders) become fourteen glowing pavilions on a ring around a
+// central plaza. Each pavilion carries a portal disc in its section colour and
+// a floating label. Walking up to one (or tapping it) opens that section's
+// page list; picking a page opens the in-world reader (reader.js) over the
+// live markdown at /docs/<slug>.md.
+//
+// Everything here is deliberately cheap: emissive materials instead of
+// per-pavilion lights, canvas-texture sprites for text, one hemisphere + one
+// directional light, and a vertex-coloured dome for the sky. The whole scene
+// draws in well under a millisecond on integrated GPUs so phones keep 60fps.
+
+import {
+ AdditiveBlending,
+ BackSide,
+ BufferAttribute,
+ BufferGeometry,
+ CanvasTexture,
+ CircleGeometry,
+ Color,
+ CylinderGeometry,
+ DirectionalLight,
+ Fog,
+ Group,
+ HemisphereLight,
+ Mesh,
+ MeshBasicMaterial,
+ MeshStandardMaterial,
+ PerspectiveCamera,
+ Points,
+ PointsMaterial,
+ RingGeometry,
+ Scene,
+ SphereGeometry,
+ Sprite,
+ SpriteMaterial,
+ SRGBColorSpace,
+ TorusGeometry,
+} from 'three';
+import { createRenderer } from '../webgl-support.js';
+
+// Matches the classic docs theme (--docs-bg / --docs-accent) so switching
+// surfaces reads as one product.
+const BG = 0x09090f;
+const ACCENT = 0x8b5cf6;
+
+export const WORLD_RADIUS = 38; // player walk bound
+export const RING_RADIUS = 24; // pavilion ring
+export const PAVILION_TRIGGER = 4.2; // proximity that arms "enter section"
+
+// Stable per-section colour: golden-angle hue walk from the docs purple, so
+// any number of sections stays evenly distributed and recognisable.
+export function sectionColor(i) {
+ const c = new Color();
+ c.setHSL(((262 + i * 137.5) % 360) / 360, 0.62, 0.62);
+ return c;
+}
+
+function makeLabelTexture(title, sub, colorHex) {
+ const dpr = Math.min(2, globalThis.devicePixelRatio || 1);
+ const w = 512 * dpr;
+ const h = 160 * dpr;
+ const canvas = document.createElement('canvas');
+ canvas.width = w;
+ canvas.height = h;
+ const ctx = canvas.getContext('2d');
+ ctx.scale(dpr, dpr);
+
+ const rw = 512;
+ const rh = 160;
+ ctx.fillStyle = 'rgba(12, 12, 22, 0.82)';
+ ctx.strokeStyle = colorHex;
+ ctx.lineWidth = 2.5;
+ ctx.beginPath();
+ // Safari < 16 has no ctx.roundRect; trace the same shape by hand.
+ if (typeof ctx.roundRect === 'function') {
+ ctx.roundRect(6, 6, rw - 12, rh - 12, 22);
+ } else {
+ const x = 6, y = 6, w2 = rw - 12, h2 = rh - 12, r = 22;
+ ctx.moveTo(x + r, y);
+ ctx.arcTo(x + w2, y, x + w2, y + h2, r);
+ ctx.arcTo(x + w2, y + h2, x, y + h2, r);
+ ctx.arcTo(x, y + h2, x, y, r);
+ ctx.arcTo(x, y, x + w2, y, r);
+ ctx.closePath();
+ }
+ ctx.fill();
+ ctx.globalAlpha = 0.85;
+ ctx.stroke();
+ ctx.globalAlpha = 1;
+
+ ctx.textAlign = 'center';
+ ctx.fillStyle = '#f4f1ff';
+ ctx.font = '600 44px Inter, system-ui, sans-serif';
+ ctx.fillText(title, rw / 2, sub ? 74 : 92, rw - 60);
+ if (sub) {
+ ctx.fillStyle = 'rgba(228, 223, 255, 0.66)';
+ ctx.font = '400 28px Inter, system-ui, sans-serif';
+ ctx.fillText(sub, rw / 2, 118, rw - 80);
+ }
+
+ const tex = new CanvasTexture(canvas);
+ tex.colorSpace = SRGBColorSpace;
+ tex.anisotropy = 4;
+ return tex;
+}
+
+function makeLabelSprite(title, sub, colorHex, scale = 1) {
+ const material = new SpriteMaterial({
+ map: makeLabelTexture(title, sub, colorHex),
+ transparent: true,
+ depthWrite: false,
+ });
+ const sprite = new Sprite(material);
+ sprite.scale.set(6.4 * scale, 2 * scale, 1);
+ return sprite;
+}
+
+function makeGroundTexture(sectionCount) {
+ const size = 1024;
+ const canvas = document.createElement('canvas');
+ canvas.width = size;
+ canvas.height = size;
+ const ctx = canvas.getContext('2d');
+ const c = size / 2;
+
+ const base = ctx.createRadialGradient(c, c, 0, c, c, c);
+ base.addColorStop(0, '#12121f');
+ base.addColorStop(0.45, '#0d0d17');
+ base.addColorStop(1, '#09090f');
+ ctx.fillStyle = base;
+ ctx.fillRect(0, 0, size, size);
+
+ // Spokes from the plaza out to each pavilion, plus plaza + ring roads.
+ ctx.strokeStyle = 'rgba(139, 92, 246, 0.16)';
+ ctx.lineWidth = 10;
+ const ringPx = (RING_RADIUS / WORLD_RADIUS) * c * 0.96;
+ for (let i = 0; i < sectionCount; i++) {
+ const a = (i / sectionCount) * Math.PI * 2;
+ ctx.beginPath();
+ ctx.moveTo(c + Math.cos(a) * c * 0.1, c + Math.sin(a) * c * 0.1);
+ ctx.lineTo(c + Math.cos(a) * ringPx, c + Math.sin(a) * ringPx);
+ ctx.stroke();
+ }
+ ctx.lineWidth = 6;
+ ctx.strokeStyle = 'rgba(139, 92, 246, 0.2)';
+ ctx.beginPath();
+ ctx.arc(c, c, c * 0.1, 0, Math.PI * 2);
+ ctx.stroke();
+ ctx.strokeStyle = 'rgba(139, 92, 246, 0.1)';
+ ctx.beginPath();
+ ctx.arc(c, c, ringPx, 0, Math.PI * 2);
+ ctx.stroke();
+
+ const tex = new CanvasTexture(canvas);
+ tex.colorSpace = SRGBColorSpace;
+ tex.anisotropy = 4;
+ return tex;
+}
+
+function makeSkyDome() {
+ // Vertex-coloured dome: near-black zenith into a purple horizon glow.
+ const geo = new SphereGeometry(220, 24, 12);
+ const pos = geo.attributes.position;
+ const colors = new Float32Array(pos.count * 3);
+ const top = new Color(0x08070f);
+ const horizon = new Color(0x191330);
+ const tmp = new Color();
+ for (let i = 0; i < pos.count; i++) {
+ const y = pos.getY(i) / 220; // -1..1
+ const t = Math.max(0, Math.min(1, (y + 0.15) / 0.7));
+ tmp.copy(horizon).lerp(top, t);
+ colors[i * 3] = tmp.r;
+ colors[i * 3 + 1] = tmp.g;
+ colors[i * 3 + 2] = tmp.b;
+ }
+ geo.setAttribute('color', new BufferAttribute(colors, 3));
+ return new Mesh(
+ geo,
+ new MeshBasicMaterial({ vertexColors: true, side: BackSide, fog: false, depthWrite: false }),
+ );
+}
+
+function makeStars(count = 420) {
+ const positions = new Float32Array(count * 3);
+ for (let i = 0; i < count; i++) {
+ // Random point on an upper-hemisphere shell so stars never sit below the
+ // horizon glow.
+ const r = 150 + Math.random() * 50;
+ const theta = Math.random() * Math.PI * 2;
+ const phi = Math.acos(0.12 + Math.random() * 0.85);
+ positions[i * 3] = r * Math.sin(phi) * Math.cos(theta);
+ positions[i * 3 + 1] = r * Math.cos(phi);
+ positions[i * 3 + 2] = r * Math.sin(phi) * Math.sin(theta);
+ }
+ const geo = new BufferGeometry();
+ geo.setAttribute('position', new BufferAttribute(positions, 3));
+ const mat = new PointsMaterial({
+ color: 0xbdb0ff,
+ size: 0.9,
+ sizeAttenuation: true,
+ transparent: true,
+ opacity: 0.75,
+ fog: false,
+ depthWrite: false,
+ });
+ return new Points(geo, mat);
+}
+
+/**
+ * Build one pavilion: platform, portal ring + shimmer disc, floating label.
+ * Returns the group plus the parts the frame loop animates.
+ */
+function buildPavilion(section, index, count) {
+ const angle = (index / count) * Math.PI * 2;
+ const color = sectionColor(index);
+ const hex = '#' + color.getHexString();
+
+ const group = new Group();
+ group.position.set(Math.cos(angle) * RING_RADIUS, 0, Math.sin(angle) * RING_RADIUS);
+ // Face the plaza so portals read from spawn.
+ group.rotation.y = -angle - Math.PI / 2;
+
+ const platform = new Mesh(
+ new CylinderGeometry(2.6, 2.9, 0.28, 28),
+ new MeshStandardMaterial({
+ color: 0x14141f,
+ roughness: 0.85,
+ metalness: 0.15,
+ emissive: color,
+ emissiveIntensity: 0.05,
+ }),
+ );
+ platform.position.y = 0.14;
+ group.add(platform);
+
+ const rim = new Mesh(
+ new TorusGeometry(2.75, 0.05, 10, 48),
+ new MeshBasicMaterial({ color, transparent: true, opacity: 0.7 }),
+ );
+ rim.rotation.x = Math.PI / 2;
+ rim.position.y = 0.29;
+ group.add(rim);
+
+ const portal = new Mesh(
+ new TorusGeometry(1.45, 0.075, 12, 48),
+ new MeshStandardMaterial({
+ color: 0x11101c,
+ roughness: 0.4,
+ metalness: 0.5,
+ emissive: color,
+ emissiveIntensity: 1.1,
+ }),
+ );
+ portal.position.y = 1.9;
+ group.add(portal);
+
+ const shimmer = new Mesh(
+ new CircleGeometry(1.36, 40),
+ new MeshBasicMaterial({
+ color,
+ transparent: true,
+ opacity: 0.16,
+ blending: AdditiveBlending,
+ depthWrite: false,
+ }),
+ );
+ shimmer.position.y = 1.9;
+ group.add(shimmer);
+
+ const pageCount = section.links.filter((l) => l.path).length;
+ const label = makeLabelSprite(
+ section.title,
+ pageCount === 1 ? '1 page' : pageCount + ' pages',
+ hex,
+ );
+ label.position.y = 3.6;
+ group.add(label);
+
+ return { group, portal, shimmer, label, angle, color, hex, section, index };
+}
+
+/**
+ * Build the whole scene.
+ *
+ * @param {HTMLCanvasElement} canvas
+ * @param {Array<{title:string, links:Array}>} sections nav.json sections
+ * @param {{ reducedMotion?: boolean }} [opts]
+ */
+export function createDocsWorld(canvas, sections, { reducedMotion = false } = {}) {
+ const renderer = createRenderer(
+ { canvas, antialias: true, powerPreference: 'high-performance' },
+ { fallback: canvas.parentElement },
+ );
+ renderer.setPixelRatio(Math.min(2, globalThis.devicePixelRatio || 1));
+
+ const scene = new Scene();
+ scene.background = new Color(BG);
+ scene.fog = new Fog(BG, 46, 150);
+
+ const camera = new PerspectiveCamera(58, 1, 0.1, 400);
+ camera.position.set(0, 3, 9);
+
+ scene.add(new HemisphereLight(0x8578c8, 0x0a0a14, 1.05));
+ const sun = new DirectionalLight(0xcabfff, 1.35);
+ sun.position.set(14, 26, 10);
+ scene.add(sun);
+
+ scene.add(makeSkyDome());
+ const stars = makeStars();
+ scene.add(stars);
+
+ const ground = new Mesh(
+ new CircleGeometry(WORLD_RADIUS + 4, 72),
+ new MeshStandardMaterial({
+ map: makeGroundTexture(sections.length),
+ roughness: 0.94,
+ metalness: 0.05,
+ }),
+ );
+ ground.rotation.x = -Math.PI / 2;
+ scene.add(ground);
+
+ const boundary = new Mesh(
+ new RingGeometry(WORLD_RADIUS + 1.2, WORLD_RADIUS + 1.5, 96),
+ new MeshBasicMaterial({ color: ACCENT, transparent: true, opacity: 0.28 }),
+ );
+ boundary.rotation.x = -Math.PI / 2;
+ boundary.position.y = 0.02;
+ scene.add(boundary);
+
+ // Central beacon: a slim monolith marking spawn, labelled with the surface
+ // name so a shared screenshot explains itself.
+ const beacon = new Group();
+ const pillar = new Mesh(
+ new CylinderGeometry(0.16, 0.28, 3.4, 10),
+ new MeshStandardMaterial({
+ color: 0x191828,
+ roughness: 0.35,
+ metalness: 0.6,
+ emissive: ACCENT,
+ emissiveIntensity: 0.7,
+ }),
+ );
+ pillar.position.y = 1.7;
+ beacon.add(pillar);
+ const beaconLabel = makeLabelSprite('three.ws Docs World', 'walk to a pavilion to read', '#8b5cf6', 0.8);
+ beaconLabel.position.y = 4.5;
+ beacon.add(beaconLabel);
+ scene.add(beacon);
+
+ const pavilions = sections.map((s, i) => {
+ const p = buildPavilion(s, i, sections.length);
+ scene.add(p.group);
+ return p;
+ });
+
+ function resize() {
+ const w = canvas.clientWidth || canvas.parentElement?.clientWidth || innerWidth;
+ const h = canvas.clientHeight || canvas.parentElement?.clientHeight || innerHeight;
+ renderer.setSize(w, h, false);
+ camera.aspect = w / h;
+ camera.updateProjectionMatrix();
+ }
+ resize();
+
+ let t = 0;
+ function tick(dt) {
+ if (reducedMotion) return;
+ t += dt;
+ for (const p of pavilions) {
+ p.shimmer.rotation.z += dt * 0.35;
+ p.label.position.y = 3.6 + Math.sin(t * 0.9 + p.index) * 0.07;
+ p.portal.material.emissiveIntensity = 1.1 + Math.sin(t * 1.6 + p.index * 2) * 0.25;
+ }
+ stars.rotation.y += dt * 0.004;
+ }
+
+ return { renderer, scene, camera, pavilions, resize, tick };
+}
diff --git a/tests/docs-world.test.js b/tests/docs-world.test.js
new file mode 100644
index 000000000..46eab37cd
--- /dev/null
+++ b/tests/docs-world.test.js
@@ -0,0 +1,103 @@
+/**
+ * Docs World invariants.
+ *
+ * The immersive docs (/docs/world) and the classic docs SPA (/docs) share one
+ * content source: docs/nav.json for the section manifest and /docs/<slug>.md
+ * for the pages. These tests pin the contracts that keep the two surfaces
+ * from drifting:
+ * 1. nav.json is well-formed and every internal path resolves to a real
+ * markdown file that the build actually ships (never a private doc).
+ * 2. The classic SPA consumes nav.json instead of carrying its own copy of
+ * the manifest, and links into the world.
+ * 3. The /docs/world route is wired in vercel.json BEFORE the /docs/<slug>
+ * catch-all; ordered route tables make "present but shadowed" a real
+ * failure mode, so position is the invariant, not mere presence.
+ */
+
+import { readFileSync, existsSync } from 'node:fs';
+import { resolve } from 'node:path';
+import { describe, it, expect } from 'vitest';
+
+const root = resolve(__dirname, '..');
+const nav = JSON.parse(readFileSync(resolve(root, 'docs/nav.json'), 'utf8'));
+
+// Mirrors PRIVATE_DOCS in vite.config.js (copy-static-docs): these dirs never
+// reach dist/docs, so a nav entry pointing into them would 404 in production.
+const PRIVATE_DOCS = ['internal', 'ops', 'security'];
+
+describe('docs/nav.json manifest', () => {
+ it('has sections with titles and links', () => {
+ expect(Array.isArray(nav.sections)).toBe(true);
+ expect(nav.sections.length).toBeGreaterThanOrEqual(10);
+ for (const section of nav.sections) {
+ expect(typeof section.title).toBe('string');
+ expect(section.title.length).toBeGreaterThan(0);
+ expect(Array.isArray(section.links)).toBe(true);
+ expect(section.links.length).toBeGreaterThan(0);
+ }
+ });
+
+ it('every link is a doc path XOR an external href', () => {
+ for (const section of nav.sections) {
+ for (const link of section.links) {
+ expect(typeof link.label).toBe('string');
+ expect(Boolean(link.path) !== Boolean(link.href)).toBe(true);
+ }
+ }
+ });
+
+ it('every internal path resolves to a shipped markdown file', () => {
+ for (const section of nav.sections) {
+ for (const link of section.links) {
+ if (!link.path) continue;
+ const file = resolve(root, 'docs', link.path + '.md');
+ expect(existsSync(file), `docs/${link.path}.md (from "${section.title}")`).toBe(true);
+ // Only nested paths can land in a private DIRECTORY; a root file like
+ // docs/security.md ships fine and shares a name with docs/security/.
+ if (link.path.includes('/')) {
+ const top = link.path.split('/')[0];
+ expect(PRIVATE_DOCS.includes(top), `${link.path} is under a private docs dir`).toBe(
+ false,
+ );
+ }
+ }
+ }
+ });
+
+ it('lists the docs-world doc itself', () => {
+ const all = nav.sections.flatMap((s) => s.links);
+ expect(all.some((l) => l.path === 'docs-world')).toBe(true);
+ });
+});
+
+describe('classic docs SPA integration', () => {
+ const spa = readFileSync(resolve(root, 'docs/index.html'), 'utf8');
+
+ it('loads the shared manifest instead of an inline NAV literal', () => {
+ expect(spa).toContain("fetch('/docs/nav.json')");
+ expect(spa).not.toMatch(/const NAV = \[/);
+ });
+
+ it('links into the 3D world', () => {
+ expect(spa).toContain('href="/docs/world"');
+ });
+});
+
+describe('routing', () => {
+ it('vercel.json routes /docs/world before the docs SPA catch-all', () => {
+ const routes = JSON.parse(readFileSync(resolve(root, 'vercel.json'), 'utf8')).routes;
+ const worldIdx = routes.findIndex((r) => r.src === '/docs/world/?');
+ const catchAllIdx = routes.findIndex((r) => r.src === '/docs/([^./]+)/?');
+ expect(worldIdx).toBeGreaterThanOrEqual(0);
+ expect(catchAllIdx).toBeGreaterThanOrEqual(0);
+ expect(worldIdx).toBeLessThan(catchAllIdx);
+ expect(routes[worldIdx].dest).toBe('/docs-world.html');
+ });
+
+ it('the page shell and vite wiring exist', () => {
+ expect(existsSync(resolve(root, 'pages/docs-world.html'))).toBe(true);
+ const vite = readFileSync(resolve(root, 'vite.config.js'), 'utf8');
+ expect(vite).toContain("'docs-world': resolve(__dirname, 'pages/docs-world.html')");
+ expect(vite).toContain("'/docs/world': resolve(root, 'pages/docs-world.html')");
+ });
+});
diff --git a/tests/fixtures/mcp-golden-tools.json b/tests/fixtures/mcp-golden-tools.json
index de2932044..fc28685b8 100644
--- a/tests/fixtures/mcp-golden-tools.json
+++ b/tests/fixtures/mcp-golden-tools.json
@@ -3127,5 +3127,157 @@
},
"schemaHash": "1cec1d1a0dae"
}
+ ],
+ "src/pump/mcp-tools.js": [
+ {
+ "name": "get_bonding_curve",
+ "descHead": "dynamic",
+ "descHash": "dynamic",
+ "schemaHash": "49c5f8bf53d0"
+ },
+ {
+ "name": "get_coin_intel",
+ "descHead": "Full Coin Intelligence snapshot for a pump.fun mint. Returns every signa",
+ "descHash": "92ae6dd705fc",
+ "schemaHash": "1e44fef7baab"
+ },
+ {
+ "name": "get_creator_profile",
+ "descHead": "All tokens by a creator wallet, with rug-pull risk flags.",
+ "descHash": "27d3d34ccb38",
+ "schemaHash": "5b542e7c8f5b"
+ },
+ {
+ "name": "get_graduated_tokens",
+ "descHead": "Tokens that graduated from the bonding curve to Raydium AMM.",
+ "descHash": "b9156b64cef8",
+ "schemaHash": "d99491585978"
+ },
+ {
+ "name": "get_king_of_the_hill",
+ "descHead": "Highest-market-cap token still on the bonding curve.",
+ "descHash": "7a0638e0198a",
+ "schemaHash": "c434b866b535"
+ },
+ {
+ "name": "get_new_tokens",
+ "descHead": "Most recently launched pump.fun tokens.",
+ "descHash": "c78a259b6bdd",
+ "schemaHash": "d99491585978"
+ },
+ {
+ "name": "get_oracle_conviction",
+ "descHead": "Oracle conviction score for a pump.fun mint — the fused 0–100 score the ",
+ "descHash": "347ddb2f7bf8",
+ "schemaHash": "1e44fef7baab"
+ },
+ {
+ "name": "get_token_details",
+ "descHead": "Full details for a specific pump.fun token by mint address.",
+ "descHash": "3cdcaa84cd2b",
+ "schemaHash": "e0dbb69b2809"
+ },
+ {
+ "name": "get_token_holders",
+ "descHead": "Top holders of a token with concentration analysis (on-chain).",
+ "descHash": "6cda8906e5a4",
+ "schemaHash": "09599c586dfe"
+ },
+ {
+ "name": "get_token_trades",
+ "descHead": "Recent buy/sell history for a token.",
+ "descHash": "49e53c8ada01",
+ "schemaHash": "bbad04bed87b"
+ },
+ {
+ "name": "get_trending_tokens",
+ "descHead": "Top pump.fun tokens by market cap.",
+ "descHash": "1607cb010f0a",
+ "schemaHash": "d99491585978"
+ },
+ {
+ "name": "kol_leaderboard",
+ "descHead": "Top KOL traders ranked by P&L for a given time window. Returns wallet, p",
+ "descHash": "0715582e0e3a",
+ "schemaHash": "ae54414329b2"
+ },
+ {
+ "name": "pumpfun_bot_status",
+ "descHead": "Returns the configuration and health status of the pump.fun indexer back",
+ "descHash": "b0e6ffc92d6c",
+ "schemaHash": "d6c5e29e0d65"
+ },
+ {
+ "name": "pumpfun_first_claims",
+ "descHead": "First-ever pump.fun creator fee claims in a time window — a cash-out sig",
+ "descHash": "3907f4c44a58",
+ "schemaHash": "f6849838d8b8"
+ },
+ {
+ "name": "pumpfun_list_claims",
+ "descHead": "List recent pump.fun fee-claim events for a creator wallet (on-chain, no",
+ "descHash": "2f700653d228",
+ "schemaHash": "ed5b74ae7e58"
+ },
+ {
+ "name": "pumpfun_quote_swap",
+ "descHead": "Read-only price quote for a pump.fun AMM (PumpSwap) swap. No signing or ",
+ "descHash": "8e5de97f6929",
+ "schemaHash": "6174606137d0"
+ },
+ {
+ "name": "pumpfun_upload_metadata",
+ "descHead": "Upload coin metadata (name, symbol, description, image) to IPFS and get ",
+ "descHash": "a205387e4ba5",
+ "schemaHash": "327f71cfb7d4"
+ },
+ {
+ "name": "pumpfun_vanity_mint",
+ "descHead": "Generate a Solana keypair whose address ends/starts with a vanity patter",
+ "descHash": "f0a0f5f8f511",
+ "schemaHash": "ce380247af15"
+ },
+ {
+ "name": "pumpfun_watch_claims",
+ "descHead": "Return all pump.fun fee-claim events for a creator wallet within a look-",
+ "descHash": "96438f170ead",
+ "schemaHash": "283c56cdfdde"
+ },
+ {
+ "name": "pumpfun_watch_whales",
+ "descHead": "Collect whale trades on a pump.fun token for a short window (max 10 s). ",
+ "descHash": "b223f04d331f",
+ "schemaHash": "0a5483c9863c"
+ },
+ {
+ "name": "search_tokens",
+ "descHead": "Search pump.fun tokens by name, symbol, or mint address.",
+ "descHash": "b4f203b8db8f",
+ "schemaHash": "a2944466551a"
+ },
+ {
+ "name": "sns_resolve",
+ "descHead": "Resolve a .sol Solana Name Service domain to its owner wallet address.",
+ "descHash": "2ce9fd692a97",
+ "schemaHash": "49585a836add"
+ },
+ {
+ "name": "sns_reverseLookup",
+ "descHead": "Reverse-lookup a Solana wallet address to its primary .sol domain name.",
+ "descHash": "5355846929aa",
+ "schemaHash": "dadc798918e6"
+ },
+ {
+ "name": "social_cashtag_sentiment",
+ "descHead": "Score social-post sentiment for a cashtag using a deterministic lexicon.",
+ "descHash": "bdba5408f63e",
+ "schemaHash": "295c93dd416f"
+ },
+ {
+ "name": "social_x_post_impact",
+ "descHead": "Correlate an X (Twitter) post to a memecoin price impact. Fetches post m",
+ "descHash": "4e2f236362b7",
+ "schemaHash": "94cccbaa0a63"
+ }
]
}
diff --git a/vercel.json b/vercel.json
index fa34cddf7..87d2ec3ed 100644
--- a/vercel.json
+++ b/vercel.json
@@ -342,6 +342,14 @@
"src": "/openai/",
"dest": "/openai/index.html"
},
+ {
+ "src": "/nvidia",
+ "dest": "/nvidia/index.html"
+ },
+ {
+ "src": "/nvidia/",
+ "dest": "/nvidia/index.html"
+ },
{
"src": "/press",
"dest": "/press/index.html"
@@ -4047,6 +4055,10 @@
"src": "/docs/walk-embed-api",
"dest": "/docs/walk-embed-api.html"
},
+ {
+ "src": "/docs/world/?",
+ "dest": "/docs-world.html"
+ },
{
"src": "/docs/([^./]+)/?",
"dest": "/docs/index.html"
diff --git a/vite.config.js b/vite.config.js
index 8b8050628..b869f9422 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -417,6 +417,7 @@ const appConfig = {
'create-prompt': resolve(__dirname, 'pages/create-prompt.html'),
genesis: resolve(__dirname, 'pages/genesis.html'),
worlds: resolve(__dirname, 'pages/worlds.html'),
+ 'docs-world': resolve(__dirname, 'pages/docs-world.html'),
'avatar-studio': resolve(__dirname, 'pages/avatar-studio.html'),
'create-review': resolve(__dirname, 'pages/create-review.html'),
'import-rpm': resolve(__dirname, 'pages/import-rpm.html'),
@@ -727,6 +728,7 @@ const appConfig = {
'aws-marketplace-welcome': resolve(__dirname, 'pages/aws-marketplace/welcome.html'),
aws: resolve(__dirname, 'pages/aws/index.html'),
openai: resolve(__dirname, 'pages/openai/index.html'),
+ nvidia: resolve(__dirname, 'pages/nvidia/index.html'),
press: resolve(__dirname, 'pages/press/index.html'),
'agent-trade': resolve(__dirname, 'pages/agent-trade.html'),
'autopilot-activity': resolve(__dirname, 'pages/autopilot-activity.html'),
@@ -1384,6 +1386,8 @@ support: resolve(__dirname, 'pages/support.html'),
'/features/': resolve(root, 'pages/features.html'),
'/docs': resolve(root, 'docs/index.html'),
'/docs/': resolve(root, 'docs/index.html'),
+ '/docs/world': resolve(root, 'pages/docs-world.html'),
+ '/docs/world/': resolve(root, 'pages/docs-world.html'),
'/bazaar': resolve(root, 'public/bazaar.html'),
'/bazaar/': resolve(root, 'public/bazaar.html'),
'/labs': resolve(root, 'pages/labs.html'),