Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
Club entrance, element, pages, sitemap, LLM index, and changelog updates
nirholas169c80e30e34
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 32176c162..762a36999 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -9,6 +9,8 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Animation Gallery** (`/animations`) — Browse and preview public animations authored by the three.ws community. Apply any clip to your avatar in the Animation Studio.- **Animation Studio** (`/pose`) — Pose any three.ws avatar or the built-in mannequin with FK/IK, keyframe a timeline, and preview the motion live. Export an animated GLB or clip JSON, save animations to your account, play them back across the platform, and sell them for USDC.- **How location works on IRL** (`/irl-privacy`) — Placed agents are private by location: they appear only to people physically standing near them, never on a map or a list. What's shared, what isn't, and how your camera, motion, and location are used.+- **Marketplace Analytics** (`/marketplace/analytics`) — Real-time stats on the three.ws skill marketplace: top skills, top agents, and sales volume.+- **My Collection** (`/collection`) — View all the skills and subscriptions you've unlocked on three.ws.- **x402 Live Demo (IBM × three.ws)** (`/ibm/x402-demo`) — A self-contained x402 micropayment demo: pay $0.001 USDC from your own wallet — MetaMask on Base or Phantom on Solana — to call a real three.ws data API. Watch the live HTTP 402 challenge, sign a gasless authorization, and see the on-chain settlement receipt. No backend, no account; built as the public face of the IBM × three.ws partnership.- **Agent profiles now show the agent's real avatar — no more stray model over the name** — On an agent's profile page, agents that ship their own 3D avatar were briefly showing the plain mannequin in the headshot while a second copy of their real avatar rendered loose over the agent's name. Both are fixed: the headshot now loads the agent's own model directly in place, and opening it full-screen shows that same model. Agents using the default body are unchanged. `[fix]`- **Agents placed from an iPhone now land in the right real-world spot for everyone** — iPhone Safari can't use WebXR, so placing an agent in the real world relies on the phone's motion sensors and GPS. Until now it leaned on a relative gyro reading with no fixed sense of north, which meant an agent you pinned could show up rotated — or facing the wrong way — for other people standing at the same spot. IRL now reads the iPhone's true compass heading when you pin, so your agent is anchored to a real-world direction: pan your phone and it stays planted on its actual bearing instead of sliding with the camera, and walk toward it and it holds its place and grows as you approach. Everyone nearby sees it in the same orientation you intended. If your compass needs calibrating we still place the agent and tell you it may look rotated to others, rather than failing silently — and Android, which already had richer world-anchoring, is unchanged. (`/irl`) `[improvement, fix]`@@ -21,7 +23,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Buy a skill, get an on-chain NFT receipt in your wallet** — When you purchase an agent's skill, you now receive a real NFT minted straight to your Solana wallet as proof of ownership and a perpetual license to use that skill. Each agent has its own verified on-chain collection, so the skills you buy from an agent group together in your wallet and on explorers like Solscan and Phantom — with the agent's name and avatar. The NFT is minted only after your payment is confirmed on-chain to the creator, it's tied to the wallet linked to your account so it can never be sent to a stranger, and asking again never mints a duplicate. Your purchased skills now show their NFT mint address. (`/marketplace`) `[feature]`- **Change a placed agent's outfit from your dashboard — everyone nearby sees it** — Your IRL Agents dashboard now has a real outfit editor. Open Change outfit on any agent you've placed and a live 3D preview loads with wardrobe controls for the exact layers that avatar has — recolour its hair, skin, and clothing, strip back to the base body and dress it up again, or stack on hats, glasses, and earrings. Because your agents are public, the new look is baked into the agent itself and pushed to its real-world pin, so every person who walks up to that spot sees the updated outfit in their camera — not just you. Save when you're happy; the avatar is re-rendered for real before it confirms, the previous look stays untouched if anything fails, and nearby viewers refresh to the new outfit within seconds. Run a seasonal look, brand your agents as staff for an event, or just keep them fresh — all without walking back to where you pinned them. (`/dashboard/irl-placements`) `[feature]`- **Chat tool calls no longer break on certain models** — Some models (like GPT OSS 120B) return tool-call arguments as a ready-made object instead of streamed text. Chat assumed text and mangled it into "[object Object]", so tools such as ForgeTextTo3D failed with a JSON parse error. Chat now handles both formats, and a tool that takes no arguments no longer errors either — so generating a model from a prompt works across every model. (`/chat`) `[fix]`-- **Choose who dances — avatar selector in the Pole Club** — Every pole card now has an Avatar dropdown so you can pick which 3D avatar dances on each pole. Choose from each dancer's signature look, a set of built-in rigs, or any public avatar from the gallery — the dancer swaps to the new model live, right on stage, with no reload. Your picks are remembered per pole on your next visit. The picker locks for the few seconds a dancer is mid-routine so a swap never interrupts a paid performance, and any model the animation library can't drive falls back to the default rig automatically. (`/club`) `[feature]`+- **Choose who dances — visual avatar picker in the Pole Club** — Each pole card now has a thumbnail Change-avatar button that opens a visual gallery picker — the same browse-and-tap experience as the /play avatar selector. Preview the looks as image tiles, then tap one to swap who dances on that pole: each dancer's signature look, a set of built-in rigs, or any public avatar from the community gallery. The dancer swaps to the new model live, right on stage, with no reload, and your picks are remembered per pole on your next visit. The button locks for the few seconds a dancer is mid-routine so a swap never interrupts a paid performance, and any model the animation library can't drive falls back to the default rig automatically. (`/club`) `[feature]`- **Clearer pricing on every agent's skills in the marketplace** — An agent's detail page now reads cleanly when its skills carry a price. Each skill shows a badge at a glance — green 'Free', a yellow price for paid skills, or an indigo 'Owned' once you've bought it — and when a paid skill offers a free trial or a timed access pass, those now appear as proper buttons styled to match the Purchase button, with hover, focus, and press states. The price badge and action buttons are grouped together on the right of each row instead of spreading out, so a skill with several options stays tidy and easy to scan. (`/marketplace`) `[improvement]`- **Coin world builds now have ownership, caps, and anti-grief protection** — Every block and prop placed in a coin world is now server-enforced with a full permission model. Only the player who placed a piece can break it; the coin's creator can remove any piece as a moderation tool, or sweep a radius or the entire world with a single action. A per-player block cap (1,200 blocks) prevents any single builder from monopolising the budget; a per-column density limit stops walls from caging the plaza; and protected zones around the spawn point and the coin totem can never be buried or fenced in. All rejections — wrong owner, over cap, protected zone, rate-limited, out of bounds — are surfaced to the builder immediately with a clear message. The build HUD now shows how many of your personal 1,200 blocks you've used, and coin creators see a "Creator" moderation panel with the clear-area tool. (`/play`) `[feature, improvement]`- **Connect your Solana wallet right from the app header** — The main app now has a Connect Wallet button in the top bar — the first step toward buying an agent's paid skills. Click it and your Solana wallet (Phantom, or the built-in wallet on Solana Mobile / Seeker) prompts you to connect; once you do, the button shows your address shortened to something like '7xKq…9fPa' with a green tick so you can see at a glance that you're connected. If you've connected before, it reconnects silently on load, and if you don't have a wallet yet it points you to Phantom. No wallet, no signature, and nothing on-chain happens just from connecting — it only lets the platform know which wallet to use when you choose to pay. (`/app`) `[feature]`@@ -70,6 +72,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Placed objects in coin worlds now survive restarts** — Props, signs, and decorations placed in a coin's 3D world now persist across room disposal and server restarts. Leave a coin world and come back tomorrow — the build your community placed is still there, exactly where it was left. Durable objects are saved to Postgres + R2 via a debounced write-through that batches rapid edits into a single round-trip; transient objects like thrown balls and effects are intentionally excluded. The world correctly shows its saved state the moment the first player enters, before any new pieces are placed. (`/play`) `[feature]`- **Pole Club dancer tips now reliably reach their Solana wallets** — When you tip a dancer in the Pole Club, the platform batches your tips and sweeps them on-chain to the dancer's registered wallet. A mismatch in how a settled tip recorded its network meant Solana tips were being set aside as 'no wallet' even when the dancer had a Solana address on file, so they never went out. That's fixed: tips paid on Solana are now matched to the dancer's Solana wallet and swept correctly, alongside the existing Base payouts. No tip was ever lost — stuck tips remained queued and now sweep on the next cycle. (`/club`) `[fix]`- **Pole Club dancers are three distinct avatars again** — The three dancers in the Pole Club had collapsed onto a single look. Each pole is now pinned to its own verified, distinct 3D rig — including Dylan from the gallery — so the lineup reads as three different dancers again. You can still swap any pole to a different avatar with the new per-pole Avatar picker. (`/club`) `[fix]`+- **Quieter walk-up to the Pole Club** — Dropped the muffled bass loop that played in the alley on the way to the club door — it was more distracting than atmospheric. The walk-in is silent now until you pay the cover and the rope drops, when the full anthem kicks in. (`/club`) `[improvement]`- **Rarest Fits button styled in the cosmetics shop** — The Rarest Fits leaderboard button in the cosmetics shop header now has proper hover, active, and focus states matching the rest of the shop chrome, and collapses to a compact glyph button on mobile. (`/play`) `[improvement]`- **Report a bad IRL pin — and guardrails that keep public spots usable** — Now that anyone standing at a location sees the agents others placed there, three.ws/irl has the moderation it needs to stay clean. Tap any agent that isn't yours and a new Report option lets you flag it for spam, hate or harassment, impersonation, a scam, sexual content, or anything else — with a clear sending, thanks, and try-again state, never a dead button. Reports are counted per person, so one account can't bury a pin it dislikes; once enough different people flag the same agent it's hidden from everyone — and if you're nearby when that happens it vanishes from your view within about a second rather than lingering until the next scan. Placing agents is now protected too: captions and names with slurs are refused, a pin can only ever reference $THREE, the only coin on three.ws, and its pay button can only point at three.ws — never an outside link. A single busy block holds a sensible maximum of agents and each person has an active-pin limit, so no one can carpet-bomb a plaza or spam placements, and every refusal tells you exactly what to do. Abandoned anonymous pins are cleaned up automatically while the agents you're signed in for stay put. (`/irl`) `[feature, security]`- **See a placed agent's on-chain reputation from your dashboard** — Your IRL Placements dashboard now shows each placed agent's on-chain reputation — the exact score and trust tier a passer-by sees when they tap it in the real world, so you know what the public sees. Tap an agent's Reputation chip to open a panel with its 0–100 score and tier (New, Emerging, Trusted, Elite), a star rating, and a breakdown of how many attestations are verified, credentialed, or disputed. A small 30-day trend line shows whether its reputation is climbing. Agents that haven't earned any attestations yet get a clear prompt to share them rather than an empty number, and a 'Manage on passport' link takes you to where you add or dispute attestations. If the reputation service is unreachable the panel offers a retry instead of failing silently. (`/dashboard/irl-placements`) `[feature, improvement]`diff --git a/data/changelog.json b/data/changelog.jsonindex 2bb2c15f8..8ddc943b2 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,15 @@{"$comment": "Curated changelog entries for three.ws \u2014 the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.","entries": [+ {+ "date": "2026-06-17",+ "title": "Quieter walk-up to the Pole Club",+ "summary": "Dropped the muffled bass loop that played in the alley on the way to the club door — it was more distracting than atmospheric. The walk-in is silent now until you pay the cover and the rope drops, when the full anthem kicks in.",+ "tags": [+ "improvement"+ ],+ "link": "/club"+ },{"date": "2026-06-17","title": "Switch your agent mid-walk, and a fix for the avatar that wouldn't stop",@@ -49,8 +58,8 @@},{"date": "2026-06-17",- "title": "Choose who dances — avatar selector in the Pole Club",- "summary": "Every pole card now has an Avatar dropdown so you can pick which 3D avatar dances on each pole. Choose from each dancer's signature look, a set of built-in rigs, or any public avatar from the gallery — the dancer swaps to the new model live, right on stage, with no reload. Your picks are remembered per pole on your next visit. The picker locks for the few seconds a dancer is mid-routine so a swap never interrupts a paid performance, and any model the animation library can't drive falls back to the default rig automatically.",+ "title": "Choose who dances — visual avatar picker in the Pole Club",+ "summary": "Each pole card now has a thumbnail Change-avatar button that opens a visual gallery picker — the same browse-and-tap experience as the /play avatar selector. Preview the looks as image tiles, then tap one to swap who dances on that pole: each dancer's signature look, a set of built-in rigs, or any public avatar from the community gallery. The dancer swaps to the new model live, right on stage, with no reload, and your picks are remembered per pole on your next visit. The button locks for the few seconds a dancer is mid-routine so a swap never interrupts a paid performance, and any model the animation library can't drive falls back to the default rig automatically.","tags": ["feature"],diff --git a/data/pages.json b/data/pages.jsonindex 74dacd087..ab5183818 100644--- a/data/pages.json+++ b/data/pages.json@@ -78,6 +78,22 @@"changefreq": "daily","added": "2026-04-29"},+ {+ "path": "/marketplace/analytics",+ "title": "Marketplace Analytics",+ "description": "Real-time stats on the three.ws skill marketplace: top skills, top agents, and sales volume.",+ "priority": 0.6,+ "changefreq": "daily",+ "added": "2026-06-17"+ },+ {+ "path": "/collection",+ "title": "My Collection",+ "description": "View all the skills and subscriptions you've unlocked on three.ws.",+ "priority": 0.5,+ "changefreq": "weekly",+ "added": "2026-06-17"+ },{"path": "/skills","title": "Skills Marketplace",diff --git a/pages/club.html b/pages/club.htmlindex 1ea95588c..09e109b9e 100644--- a/pages/club.html+++ b/pages/club.html@@ -1654,6 +1654,191 @@display: none;}}++ /* ── Avatar picker (per-pole, /play-style visual gallery) ───────── */+ .club-avatar-btn {+ display: flex;+ align-items: center;+ gap: 9px;+ width: 100%;+ padding: 6px;+ border: 1px solid var(--border);+ border-radius: 9px;+ background: rgba(255, 255, 255, 0.02);+ color: var(--text);+ font: inherit;+ cursor: pointer;+ text-align: left;+ transition: border-color 0.15s ease, background 0.15s ease, transform 0.08s ease;+ }+ .club-avatar-btn:hover {+ border-color: var(--border-strong);+ background: rgba(255, 59, 214, 0.06);+ }+ .club-avatar-btn:active { transform: translateY(1px); }+ .club-avatar-btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }+ .club-avatar-btn:disabled { opacity: 0.55; cursor: not-allowed; }+ .club-avatar-chip {+ flex: none;+ width: 34px;+ height: 34px;+ border-radius: 8px;+ overflow: hidden;+ background: radial-gradient(120% 100% at 50% 0%, #2a1330, #120814);+ display: grid;+ place-items: center;+ }+ .club-avatar-chip img { width: 100%; height: 100%; object-fit: cover; }+ .club-avatar-chip span {+ font: 700 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace;+ color: var(--text-3);+ }+ .club-avatar-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }+ .club-avatar-cur {+ font-size: 12px;+ font-weight: 600;+ color: var(--text);+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+ }+ .club-avatar-change {+ font-size: 10px;+ font-weight: 600;+ letter-spacing: 0.05em;+ text-transform: uppercase;+ color: var(--text-3);+ }+ .club-avatar-btn:hover .club-avatar-change { color: var(--accent); }++ .club-picker { position: fixed; inset: 0; z-index: 9600; }+ .club-picker[hidden] { display: none; }+ .club-pick-backdrop {+ position: absolute;+ inset: 0;+ background: rgba(4, 3, 8, 0.74);+ backdrop-filter: blur(6px);+ -webkit-backdrop-filter: blur(6px);+ animation: clubPickFade 0.22s ease;+ }+ @keyframes clubPickFade { from { opacity: 0; } }+ .club-pick-modal {+ position: absolute;+ left: 50%;+ top: 50%;+ transform: translate(-50%, -50%);+ width: min(720px, calc(100vw - 28px));+ max-height: min(82vh, 660px);+ display: flex;+ flex-direction: column;+ background: var(--panel-solid);+ border: 1px solid var(--border-strong);+ border-radius: 18px;+ box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 59, 214, 0.08);+ overflow: hidden;+ animation: clubPickRise 0.28s cubic-bezier(0.22, 1, 0.36, 1);+ }+ @keyframes clubPickRise { from { opacity: 0; transform: translate(-50%, -46%) scale(0.97); } }+ .club-pick-head {+ display: flex;+ align-items: center;+ justify-content: space-between;+ gap: 12px;+ padding: 17px 20px;+ border-bottom: 1px solid var(--border);+ }+ .club-pick-head h3 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; color: var(--text); }+ .club-pick-head p { margin: 3px 0 0; font-size: 12.5px; color: var(--text-2); }+ .club-pick-x {+ flex: none;+ width: 34px;+ height: 34px;+ border-radius: 10px;+ border: 1px solid var(--border);+ background: rgba(255, 255, 255, 0.03);+ color: var(--text-2);+ display: grid;+ place-items: center;+ cursor: pointer;+ transition: border-color 0.15s ease, color 0.15s ease;+ }+ .club-pick-x:hover { border-color: var(--accent); color: var(--text); }+ .club-pick-x:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }+ .club-pick-grid {+ display: grid;+ grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));+ gap: 12px;+ padding: 18px 20px;+ overflow: auto;+ }+ .club-pick-sep, .club-pick-loading {+ grid-column: 1 / -1;+ font-size: 11px;+ text-transform: uppercase;+ letter-spacing: 0.1em;+ color: var(--text-3);+ padding: 6px 2px 2px;+ }+ .club-pick-loading { text-align: center; padding: 16px; }+ .club-pick-tile {+ position: relative;+ display: flex;+ flex-direction: column;+ gap: 8px;+ padding: 10px;+ border-radius: 13px;+ border: 1px solid var(--border);+ background: rgba(255, 255, 255, 0.02);+ color: var(--text);+ cursor: pointer;+ transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;+ }+ .club-pick-tile:hover { transform: translateY(-2px); border-color: var(--border-strong); background: rgba(255, 59, 214, 0.06); }+ .club-pick-tile:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }+ .club-pick-tile.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255, 59, 214, 0.3); }+ .club-pick-tile.busy { opacity: 0.6; pointer-events: none; }+ .club-pick-tile.failed { border-color: var(--danger); }+ .club-pick-thumb {+ aspect-ratio: 1;+ border-radius: 9px;+ overflow: hidden;+ background: radial-gradient(120% 100% at 50% 0%, #2a1330, #120814);+ display: grid;+ place-items: center;+ }+ .club-pick-thumb img { width: 100%; height: 100%; object-fit: cover; }+ .club-pick-mono { font: 700 26px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text-3); }+ .club-pick-name { font-size: 12.5px; font-weight: 600; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }+ .club-pick-badge {+ position: absolute;+ top: 8px;+ right: 8px;+ font: 600 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;+ text-transform: uppercase;+ letter-spacing: 0.06em;+ padding: 3px 6px;+ border-radius: 6px;+ background: rgba(255, 59, 214, 0.18);+ color: var(--accent);+ }+ .club-pick-spinner {+ position: absolute;+ inset: 0;+ display: grid;+ place-items: center;+ }+ .club-pick-spinner::after {+ content: '';+ width: 22px;+ height: 22px;+ border-radius: 50%;+ border: 2px solid rgba(255, 59, 214, 0.25);+ border-top-color: var(--accent);+ animation: clubDoorSpin 0.8s linear infinite;+ }+ @media (prefers-reduced-motion: reduce) {+ .club-pick-backdrop, .club-pick-modal, .club-pick-tile { animation: none; transition: none; }+ }</style><link rel="stylesheet" href="/mobile.css" />@@ -1901,6 +2086,24 @@</div></div>+ <!-- Avatar picker — a /play-style visual gallery, opened per pole. The+ grid is populated by src/club.js (initAvatarSelector). -->+ <div class="club-picker" id="club-picker" hidden>+ <div class="club-pick-backdrop" id="club-pick-backdrop"></div>+ <div class="club-pick-modal" role="dialog" aria-modal="true" aria-labelledby="club-pick-title">+ <div class="club-pick-head">+ <div>+ <h3 id="club-pick-title">Choose an avatar</h3>+ <p id="club-pick-sub">Pick who dances on this pole — swaps live on stage.</p>+ </div>+ <button class="club-pick-x" id="club-pick-close" aria-label="Close avatar picker">+ <svg viewBox="0 0 20 20" width="16" height="16" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round"><path d="M5 5l10 10M15 5L5 15"/></svg>+ </button>+ </div>+ <div class="club-pick-grid" id="club-pick-grid"></div>+ </div>+ </div>+<!-- x402 drop-in modal (Phantom/MetaMask wallet flow + 402 retry) --><script type="module" src="/x402.js"></script><!-- Entrance journey — alley → walk-through, behind the door card. -->diff --git a/pages/home.html b/pages/home.htmlindex 8d03a9597..87f5a415e 100644--- a/pages/home.html+++ b/pages/home.html@@ -999,7 +999,12 @@@media (max-width: 480px) { .foot-inner { flex-direction: column; align-items: flex-start; } .foot-ca { width: 100%; justify-content: flex-start; } }/* ── HERO LOADING ───────────────────────────────────────── */- .hero-stage agent-3d .skeleton { display: none !important; }+ /* Suppress the in-element skeleton silhouette on the hero — it lives in+ the component's shadow DOM, so a light-DOM `.skeleton` selector can't+ reach it; `::part(loading)` pierces the boundary. The hero fades the+ whole agent-3d in on `agent:ready`, so the model never appears under a+ stale skeleton. */+ .hero-stage agent-3d::part(loading) { display: none !important; }.hero-stage agent-3d {position: absolute; inset: 0; display: block; width: 100%; height: 100%;opacity: 0; transition: opacity 0.8s cubic-bezier(.2,.7,.3,1);diff --git a/pages/ibm/x402-demo.html b/pages/ibm/x402-demo.htmlindex 1dea7a59b..7e91b85ef 100644--- a/pages/ibm/x402-demo.html+++ b/pages/ibm/x402-demo.html@@ -321,6 +321,10 @@ agent-3d:defined ~ .agent-skel{display:none}/* ── Rooms (Forge / Play / IRL) ── */.rooms{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;background:var(--ibm-border);border:1px solid var(--ibm-border);margin-top:28px}@media(max-width:760px){.rooms{grid-template-columns:1fr}}+/* When a room is launched it takes over the whole width — these apps are built+ for a full viewport, not a one-third column. The other tiles collapse away. */+.rooms.has-live{grid-template-columns:1fr}+.rooms.has-live .room:not(.is-live){display:none}.room{background:var(--ibm-surface);display:flex;flex-direction:column;min-height:240px}.room-head{padding:22px 22px 0;flex:0 0 auto}.room-ico{width:34px;height:34px;color:var(--ibm-blue);margin-bottom:12px}@@ -338,10 +342,19 @@ agent-3d:defined ~ .agent-skel{display:none}.room-embed{display:none;position:relative;border-top:1px solid var(--ibm-border);background:var(--ibm-field)}.room.is-live .room-embed{display:block}.room.is-live .room-head,.room.is-live .room-actions{display:none}-.room-embed iframe{display:block;width:100%;height:540px;border:0;background:var(--ibm-field)}-.room-embed .embed-bar{display:flex;justify-content:space-between;align-items:center;padding:8px 14px;border-bottom:1px solid var(--ibm-border);font-size:12px;color:var(--ibm-subtle);font-weight:500}+/* Full-bleed once launched: fill the section width and most of the viewport+ height so the embedded app has room to breathe. */+.room-embed iframe{display:block;width:100%;height:min(78vh,820px);border:0;background:var(--ibm-field)}+.room-embed .embed-bar{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 14px;border-bottom:1px solid var(--ibm-border);font-size:12px;color:var(--ibm-subtle);font-weight:500}+.room-embed .embed-bar .bar-url{display:inline-flex;align-items:center;gap:8px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}+.room-embed .embed-bar .bar-actions{display:flex;gap:8px;flex:0 0 auto}.room-embed .embed-bar button{background:none;border:1px solid var(--ibm-divider);color:var(--ibm-ink);font-family:inherit;font-size:12px;font-weight:500;padding:5px 10px;cursor:pointer;border-radius:2px}.room-embed .embed-bar button:hover{border-color:var(--ibm-blue);color:var(--ibm-blue)}+/* True full-screen via the Fullscreen API — the app fills the whole display. */+.room-embed:fullscreen{background:var(--ibm-surface);display:flex;flex-direction:column}+.room-embed:fullscreen iframe{height:100%;flex:1}+.room-embed:-webkit-full-screen{background:var(--ibm-surface)}+.room-embed:-webkit-full-screen iframe{height:100%}.room-embed .embed-load{position:absolute;left:0;right:0;top:37px;bottom:0;display:flex;align-items:center;justify-content:center;gap:10px;font-size:13px;color:var(--ibm-subtle);background:var(--ibm-field)}.room-embed.loaded .embed-load{display:none}.room-embed .embed-load .spin{width:16px;height:16px;border:2px solid var(--ibm-divider);border-top-color:var(--ibm-blue);border-radius:50%;animation:spin .8s linear infinite}@@ -355,6 +368,18 @@ agent-3d:defined ~ .agent-skel{display:none}*,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}}</style>++ <link rel="canonical" href="https://three.ws/ibm/x402-demo">+ <meta property="og:site_name" content="three.ws">+ <meta property="og:url" content="https://three.ws/ibm/x402-demo">+ <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 name="twitter:card" content="summary_large_image">+ <meta name="twitter:title" content="x402 Live Demo (IBM × three.ws) · three.ws">+ <meta name="twitter:description" content="A self-contained x402 micropayment demo: pay $0.001 USDC from your own wallet — MetaMask on Base or Phantom on Solana — to call a real three.ws data API. Watch the live HTTP 402 challenge, sign a gasless authorization, and see the on-chain settlement receipt. No backend, no account; built as the public face of the IBM × three.ws partnership.">+ <meta name="twitter:image" content="https://three.ws/og-image.png">+ <script type="application/ld+json">{"@context":"https://schema.org","@type":"WebPage","name":"x402 Live Demo (IBM × three.ws)","description":"A self-contained x402 micropayment demo: pay $0.001 USDC from your own wallet — MetaMask on Base or Phantom on Solana — to call a real three.ws data API. Watch the live HTTP 402 challenge, sign a gasless authorization, and see the on-chain settlement receipt. No backend, no account; built as the public face of the IBM × three.ws partnership.","url":"https://three.ws/ibm/x402-demo","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"}}</script></head><body>@@ -529,7 +554,7 @@ agent-3d:defined ~ .agent-skel{display:none}<a class="room-out" href="https://three.ws/forge" target="_blank" rel="noopener">Full page ↗</a></div><div class="room-embed">- <div class="embed-bar"><span>three.ws/forge</span><button type="button" data-close>Close</button></div>+ <div class="embed-bar"><span class="bar-url">three.ws/forge</span><span class="bar-actions"><button type="button" data-fs>⤢ Full screen</button><a class="room-out" href="https://three.ws/forge" target="_blank" rel="noopener" style="display:inline-flex;align-items:center;padding:5px 10px;border:1px solid var(--ibm-divider);border-radius:2px">New tab ↗</a><button type="button" data-close>Close</button></span></div><div class="embed-load"><span class="spin" aria-hidden="true"></span><span>Loading Forge…</span></div><div class="embed-err">Couldn't load Forge inline. <a href="https://three.ws/forge" target="_blank" rel="noopener">Open it in a new tab ↗</a></div></div>@@ -547,7 +572,7 @@ agent-3d:defined ~ .agent-skel{display:none}<a class="room-out" href="https://three.ws/play" target="_blank" rel="noopener">Full page ↗</a></div><div class="room-embed">- <div class="embed-bar"><span>three.ws/play</span><button type="button" data-close>Close</button></div>+ <div class="embed-bar"><span class="bar-url">three.ws/play</span><span class="bar-actions"><button type="button" data-fs>⤢ Full screen</button><a class="room-out" href="https://three.ws/play" target="_blank" rel="noopener" style="display:inline-flex;align-items:center;padding:5px 10px;border:1px solid var(--ibm-divider);border-radius:2px">New tab ↗</a><button type="button" data-close>Close</button></span></div><div class="embed-load"><span class="spin" aria-hidden="true"></span><span>Loading Play…</span></div><div class="embed-err">Couldn't load Play inline. <a href="https://three.ws/play" target="_blank" rel="noopener">Open it in a new tab ↗</a></div></div>@@ -565,7 +590,7 @@ agent-3d:defined ~ .agent-skel{display:none}<a class="room-out" href="https://three.ws/irl" target="_blank" rel="noopener">Full page ↗</a></div><div class="room-embed">- <div class="embed-bar"><span>three.ws/irl</span><button type="button" data-close>Close</button></div>+ <div class="embed-bar"><span class="bar-url">three.ws/irl</span><span class="bar-actions"><button type="button" data-fs>⤢ Full screen</button><a class="room-out" href="https://three.ws/irl" target="_blank" rel="noopener" style="display:inline-flex;align-items:center;padding:5px 10px;border:1px solid var(--ibm-divider);border-radius:2px">New tab ↗</a><button type="button" data-close>Close</button></span></div><div class="embed-load"><span class="spin" aria-hidden="true"></span><span>Loading IRL…</span></div><div class="embed-err">Couldn't load IRL inline — AR works best opened directly on a phone. <a href="https://three.ws/irl" target="_blank" rel="noopener">Open on your device ↗</a></div></div>@@ -762,37 +787,59 @@ agent-3d:defined ~ .agent-skel{display:none}// data. The iframe streams a live, framable production surface (frame-ancestors// is open for these routes); a load timeout falls back to an "open in tab" path.function wireRooms() {+ var grid = document.querySelector('.rooms');var rooms = document.querySelectorAll('.room');+ function syncHasLive() {+ grid.classList.toggle('has-live', !!document.querySelector('.room.is-live'));+ }Array.prototype.forEach.call(rooms, function (room) {var openBtn = room.querySelector('.room-open');var embed = room.querySelector('.room-embed');var closeBtn = room.querySelector('[data-close]');+ var fsBtn = room.querySelector('[data-fs]');var loadedIframe = null, timer = null;openBtn.addEventListener('click', function () {- if (loadedIframe) { room.classList.add('is-live'); return; }+ // One room at a time — collapse any other that's open.+ Array.prototype.forEach.call(rooms, function (r) { if (r !== room) r.classList.remove('is-live'); });room.classList.add('is-live');- embed.classList.remove('failed', 'loaded');- var iframe = document.createElement('iframe');- iframe.title = room.getAttribute('data-room') + ' — three.ws';- iframe.loading = 'lazy';- iframe.setAttribute('allow', room.getAttribute('data-allow') || '');- iframe.setAttribute('referrerpolicy', 'no-referrer-when-downgrade');- iframe.addEventListener('load', function () {- clearTimeout(timer);- embed.classList.add('loaded');- });- // If the surface refuses to frame or stalls, surface the new-tab fallback.- timer = setTimeout(function () {- if (!embed.classList.contains('loaded')) embed.classList.add('failed');- }, 12000);- iframe.src = room.getAttribute('data-src');- embed.appendChild(iframe);- loadedIframe = iframe;+ syncHasLive();+ if (!loadedIframe) {+ embed.classList.remove('failed', 'loaded');+ var iframe = document.createElement('iframe');+ iframe.title = room.getAttribute('data-room') + ' — three.ws';+ iframe.loading = 'lazy';+ iframe.setAttribute('allow', room.getAttribute('data-allow') || '');+ iframe.setAttribute('allowfullscreen', '');+ iframe.setAttribute('referrerpolicy', 'no-referrer-when-downgrade');+ iframe.addEventListener('load', function () {+ clearTimeout(timer);+ embed.classList.add('loaded');+ });+ // If the surface refuses to frame or stalls, surface the new-tab fallback.+ timer = setTimeout(function () {+ if (!embed.classList.contains('loaded')) embed.classList.add('failed');+ }, 12000);+ iframe.src = room.getAttribute('data-src');+ embed.appendChild(iframe);+ loadedIframe = iframe;+ }+ // Bring the now full-width stage into view.+ embed.scrollIntoView({ behavior: prefersReducedMotion() ? 'auto' : 'smooth', block: 'start' });+ });++ if (fsBtn) fsBtn.addEventListener('click', function () {+ var req = embed.requestFullscreen || embed.webkitRequestFullscreen;+ if (req) { try { req.call(embed); } catch (_) {} }+ else if (loadedIframe) { window.open(room.getAttribute('data-src'), '_blank', 'noopener'); }});closeBtn.addEventListener('click', function () {+ if (document.fullscreenElement === embed && document.exitFullscreen) {+ try { document.exitFullscreen(); } catch (_) {}+ }room.classList.remove('is-live');+ syncHasLive();});});}diff --git a/public/changelog.json b/public/changelog.jsonindex d40fcc5a9..bb7655376 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-06-17T21:44:13.787Z",+ "generated_at": "2026-06-17T21:52:04.009Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -36,6 +36,26 @@"launch"]},+ {+ "date": "2026-06-17",+ "type": "launch",+ "title": "Marketplace Analytics",+ "summary": "Real-time stats on the three.ws skill marketplace: top skills, top agents, and sales volume.",+ "link": "/marketplace/analytics",+ "tags": [+ "launch"+ ]+ },+ {+ "date": "2026-06-17",+ "type": "launch",+ "title": "My Collection",+ "summary": "View all the skills and subscriptions you've unlocked on three.ws.",+ "link": "/collection",+ "tags": [+ "launch"+ ]+ },{"date": "2026-06-17","type": "launch",@@ -162,8 +182,8 @@{"date": "2026-06-17","type": "update",- "title": "Choose who dances — avatar selector in the Pole Club",- "summary": "Every pole card now has an Avatar dropdown so you can pick which 3D avatar dances on each pole. Choose from each dancer's signature look, a set of built-in rigs, or any public avatar from the gallery — the dancer swaps to the new model live, right on stage, with no reload. Your picks are remembered per pole on your next visit. The picker locks for the few seconds a dancer is mid-routine so a swap never interrupts a paid performance, and any model the animation library can't drive falls back to the default rig automatically.",+ "title": "Choose who dances — visual avatar picker in the Pole Club",+ "summary": "Each pole card now has a thumbnail Change-avatar button that opens a visual gallery picker — the same browse-and-tap experience as the /play avatar selector. Preview the looks as image tiles, then tap one to swap who dances on that pole: each dancer's signature look, a set of built-in rigs, or any public avatar from the community gallery. The dancer swaps to the new model live, right on stage, with no reload, and your picks are remembered per pole on your next visit. The button locks for the few seconds a dancer is mid-routine so a swap never interrupts a paid performance, and any model the animation library can't drive falls back to the default rig automatically.","link": "/club","tags": ["feature"@@ -665,6 +685,16 @@"fix"]},+ {+ "date": "2026-06-17",+ "type": "update",+ "title": "Quieter walk-up to the Pole Club",+ "summary": "Dropped the muffled bass loop that played in the alley on the way to the club door — it was more distracting than atmospheric. The walk-in is silent now until you pay the cover and the rope drops, when the full anthem kicks in.",+ "link": "/club",+ "tags": [+ "improvement"+ ]+ },{"date": "2026-06-17","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex 877ad7194..ac4f05b3a 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -30,6 +30,22 @@<category>launch</category><description>Placed agents are private by location: they appear only to people physically standing near them, never on a map or a list. What's shared, what isn't, and how your camera, motion, and location are used.</description></item>+ <item>+ <title>Marketplace Analytics</title>+ <link>https://three.ws/marketplace/analytics</link>+ <guid isPermaLink="false">2026-06-17:Marketplace Analytics</guid>+ <pubDate>Wed, 17 Jun 2026 12:00:00 GMT</pubDate>+ <category>launch</category>+ <description>Real-time stats on the three.ws skill marketplace: top skills, top agents, and sales volume.</description>+ </item>+ <item>+ <title>My Collection</title>+ <link>https://three.ws/collection</link>+ <guid isPermaLink="false">2026-06-17:My Collection</guid>+ <pubDate>Wed, 17 Jun 2026 12:00:00 GMT</pubDate>+ <category>launch</category>+ <description>View all the skills and subscriptions you've unlocked on three.ws.</description>+ </item><item><title>x402 Live Demo (IBM × three.ws)</title><link>https://three.ws/ibm/x402-demo</link>@@ -127,12 +143,12 @@<description>Some models (like GPT OSS 120B) return tool-call arguments as a ready-made object instead of streamed text. Chat assumed text and mangled it into "[object Object]", so tools such as ForgeTextTo3D failed with a JSON parse error. Chat now handles both formats, and a tool that takes no arguments no longer errors either — so generating a model from a prompt works across every model.</description></item><item>- <title>Choose who dances — avatar selector in the Pole Club</title>+ <title>Choose who dances — visual avatar picker in the Pole Club</title><link>https://three.ws/club</link>- <guid isPermaLink="false">2026-06-17:Choose who dances — avatar selector in the Pole Club</guid>+ <guid isPermaLink="false">2026-06-17:Choose who dances — visual avatar picker in the Pole Club</guid><pubDate>Wed, 17 Jun 2026 12:00:00 GMT</pubDate><category>feature</category>- <description>Every pole card now has an Avatar dropdown so you can pick which 3D avatar dances on each pole. Choose from each dancer's signature look, a set of built-in rigs, or any public avatar from the gallery — the dancer swaps to the new model live, right on stage, with no reload. Your picks are remembered per pole on your next visit. The picker locks for the few seconds a dancer is mid-routine so a swap never interrupts a paid performance, and any model the animation library can't drive falls back to the default rig automatically.</description>+ <description>Each pole card now has a thumbnail Change-avatar button that opens a visual gallery picker — the same browse-and-tap experience as the /play avatar selector. Preview the looks as image tiles, then tap one to swap who dances on that pole: each dancer's signature look, a set of built-in rigs, or any public avatar from the community gallery. The dancer swaps to the new model live, right on stage, with no reload, and your picks are remembered per pole on your next visit. The button locks for the few seconds a dancer is mid-routine so a swap never interrupts a paid performance, and any model the animation library can't drive falls back to the default rig automatically.</description></item><item><title>Clearer pricing on every agent's skills in the marketplace</title>@@ -518,6 +534,14 @@<category>fix</category><description>The three dancers in the Pole Club had collapsed onto a single look. Each pole is now pinned to its own verified, distinct 3D rig — including Dylan from the gallery — so the lineup reads as three different dancers again. You can still swap any pole to a different avatar with the new per-pole Avatar picker.</description></item>+ <item>+ <title>Quieter walk-up to the Pole Club</title>+ <link>https://three.ws/club</link>+ <guid isPermaLink="false">2026-06-17:Quieter walk-up to the Pole Club</guid>+ <pubDate>Wed, 17 Jun 2026 12:00:00 GMT</pubDate>+ <category>improvement</category>+ <description>Dropped the muffled bass loop that played in the alley on the way to the club door — it was more distracting than atmospheric. The walk-in is silent now until you pay the cover and the rope drops, when the full anthem kicks in.</description>+ </item><item><title>Rarest Fits button styled in the cosmetics shop</title><link>https://three.ws/play</link>diff --git a/public/features.json b/public/features.jsonindex 031392576..454844d14 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-06-17T21:44:13.769Z",+ "generated_at": "2026-06-17T21:52:03.993Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",@@ -95,6 +95,26 @@"tags": [],"showcase": false},+ {+ "path": "/marketplace/analytics",+ "title": "Marketplace Analytics",+ "description": "Real-time stats on the three.ws skill marketplace: top skills, top agents, and sales volume.",+ "added": "2026-06-17",+ "auth": null,+ "indexable": true,+ "tags": [],+ "showcase": false+ },+ {+ "path": "/collection",+ "title": "My Collection",+ "description": "View all the skills and subscriptions you've unlocked on three.ws.",+ "added": "2026-06-17",+ "auth": null,+ "indexable": true,+ "tags": [],+ "showcase": false+ },{"path": "/skills","title": "Skills Marketplace",diff --git a/public/llms-full.txt b/public/llms-full.txtindex c15cce0c2..3e1cb2387 100644--- a/public/llms-full.txt+++ b/public/llms-full.txt@@ -61,6 +61,18 @@ URL: https://three.ws/marketplaceBuy access to agents, skills, and avatars from other creators.+### Marketplace Analytics++URL: https://three.ws/marketplace/analytics++Real-time stats on the three.ws skill marketplace: top skills, top agents, and sales volume.++### My Collection++URL: https://three.ws/collection++View all the skills and subscriptions you've unlocked on three.ws.+### Skills MarketplaceURL: https://three.ws/skillsdiff --git a/public/llms.txt b/public/llms.txtindex 71e32e78a..a64807cc2 100644--- a/public/llms.txt+++ b/public/llms.txt@@ -19,6 +19,8 @@ Entry points into the product.- [IRL](https://three.ws/irl): Place a 3D avatar in your real environment. Camera AR passthrough, joystick movement, and tap-to-place 3D objects on your floor.- [How location works on IRL](https://three.ws/irl-privacy): Placed agents are private by location: they appear only to people physically standing near them, never on a map or a list. What's shared, what isn't, and how your camera, motion, and location are used.- [Marketplace](https://three.ws/marketplace): Buy access to agents, skills, and avatars from other creators.+- [Marketplace Analytics](https://three.ws/marketplace/analytics): Real-time stats on the three.ws skill marketplace: top skills, top agents, and sales volume.+- [My Collection](https://three.ws/collection): View all the skills and subscriptions you've unlocked on three.ws.- [Skills Marketplace](https://three.ws/skills): Browse, search, and install agent skills — tool packs, knowledge bases, and capabilities that make AI agents smarter.- [Community](https://three.ws/community): Featured creators, builds, and conversations from the three.ws community.- [Sitemap](https://three.ws/sitemap): Human-readable index of every page on three.ws.diff --git a/public/sitemap/index.html b/public/sitemap/index.htmlindex 074ddf0c0..7bcf2ec13 100644--- a/public/sitemap/index.html+++ b/public/sitemap/index.html@@ -65,7 +65,7 @@<main class="sm-wrap"><div class="sm-hero"><h1>Sitemap</h1>- <p>All 279 pages on three.ws, grouped by purpose. Looking for the machine-readable versions?</p>+ <p>All 281 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>@@ -77,7 +77,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 279 pages by name, path, or description…" aria-label="Filter pages" autocomplete="off" spellcheck="false" />+ <input id="sm-filter-input" type="search" placeholder="Filter 281 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>@@ -96,7 +96,7 @@</nav><section class="sm-section" id="main"><header>- <h2>Main<span class="sm-count" data-count>13</span></h2>+ <h2>Main<span class="sm-count" data-count>15</span></h2><p class="sm-section-desc">Entry points into the product.</p></header><ul class="sm-list">@@ -156,6 +156,20 @@<span class="sm-desc">Buy access to agents, skills, and avatars from other creators.</span></a></li>+ <li>+ <a href="/marketplace/analytics">+ <span class="sm-title">Marketplace Analytics</span>+ <span class="sm-path">/marketplace/analytics</span>+ <span class="sm-desc">Real-time stats on the three.ws skill marketplace: top skills, top agents, and sales volume.</span>+ </a>+ </li>+ <li>+ <a href="/collection">+ <span class="sm-title">My Collection</span>+ <span class="sm-path">/collection</span>+ <span class="sm-desc">View all the skills and subscriptions you've unlocked on three.ws.</span>+ </a>+ </li><li><a href="/skills"><span class="sm-title">Skills Marketplace</span>diff --git a/src/club-entrance-audio.js b/src/club-entrance-audio.jsdeleted file mode 100644index 328d955d9..000000000--- a/src/club-entrance-audio.js+++ /dev/null@@ -1,110 +0,0 @@-// Approaching the club — the sound of a venue you can hear before you can see.-//-// A bass-forward loop sits behind the alley walls, heavily low-passed so only-// the deepest thump leaks out. As you walk toward the door the filter opens and-// the level rises — muffled-through-brick becomes here-it-is — and the moment-// the cover settles it bows out so the pole-stage anthem (src/club.js) owns the-// night. One self-contained Web Audio graph, armed on your first input (autoplay-// policy), and silent-failing throughout: audio is enhancement, never a gate.-//-// bufferSource(loop) → lowpass(cutoff↑ with proximity) → master(gain↑) → out-//-// Reuses a venue loop already on disk (built by scripts/build-club-audio.mjs) —-// no new assets, no third-party samples.--const SOURCES = ['/club/audio/thriller.ogg', '/club/audio/thriller.mp3'];--// Far down the alley vs. standing in the doorway. Far = subsonic rumble only;-// near = louder and brighter as the doorway opens the sound up.-const FAR = { cutoff: 230, gain: 0.0 };-const NEAR = { cutoff: 1650, gain: 0.6 };--const lerp = (a, b, t) => a + (b - a) * t;-const clamp01 = (v) => (v < 0 ? 0 : v > 1 ? 1 : v);--export class ClubApproachAudio {- constructor() {- this.ctx = null;- this.master = null;- this.filter = null;- this.source = null;- this.buffer = null;- this.proximity = 0; // eased 0 (far) … 1 (at the door)- this._target = 0;- this._handingOff = false;- this._armed = false;- this._disposed = false;- }-- // First real user gesture (a keypress or drag). Idempotent; unlocks the- // AudioContext that autoplay policy otherwise keeps suspended.- arm() {- if (this._armed || this._disposed) return;- this._armed = true;- this._start().catch(() => {});- }-- async _start() {- const Ctx = window.AudioContext || window.webkitAudioContext;- if (!Ctx) return;- this.ctx = new Ctx();- if (this.ctx.state === 'suspended') { try { await this.ctx.resume(); } catch {} }-- this.master = this.ctx.createGain();- this.master.gain.value = 0.0001;- this.filter = this.ctx.createBiquadFilter();- this.filter.type = 'lowpass';- this.filter.frequency.value = FAR.cutoff;- this.filter.Q.value = 0.6;- this.filter.connect(this.master);- this.master.connect(this.ctx.destination);-- this.buffer = await this._load();- if (!this.buffer || this._disposed) return;-- const src = this.ctx.createBufferSource();- src.buffer = this.buffer;- src.loop = true;- src.connect(this.filter);- try { src.start(); } catch { return; }- this.source = src;- }-- async _load() {- for (const url of SOURCES) {- try {- const res = await fetch(url, { cache: 'force-cache' });- if (!res.ok) continue;- return await this.ctx.decodeAudioData(await res.arrayBuffer());- } catch { /* try the next encoding */ }- }- return null;- }-- // p in [0,1]: how close you are to the door (1 = right at it).- setProximity(p) { this._target = clamp01(p); }-- // Cover paid — fade out; the anthem takes it from here.- handOff() { this._handingOff = true; }-- // Per-frame: ease toward the target proximity (or zero while handing off)- // and map it onto the filter cutoff + level with click-free ramps.- update(dt) {- if (!this.ctx || this._disposed) return;- const goal = this._handingOff ? 0 : this._target;- this.proximity += (goal - this.proximity) * (1 - Math.exp(-4 * dt));- const now = this.ctx.currentTime;- this.filter.frequency.setTargetAtTime(lerp(FAR.cutoff, NEAR.cutoff, this.proximity), now, 0.08);- this.master.gain.setTargetAtTime(Math.max(0.0001, lerp(FAR.gain, NEAR.gain, this.proximity)), now, 0.08);- if (this._handingOff && this.proximity < 0.01) this.dispose();- }-- dispose() {- if (this._disposed) return;- this._disposed = true;- try { this.source?.stop(); } catch {}- try { this.source?.disconnect(); } catch {}- try { this.ctx?.close(); } catch {}- this.ctx = this.master = this.filter = this.source = null;- }-}diff --git a/src/club-entrance.js b/src/club-entrance.jsindex 0518d4675..7c9feb2a9 100644--- a/src/club-entrance.js+++ b/src/club-entrance.js@@ -53,7 +53,6 @@ import {} from 'postprocessing';import { gltfLoader } from './loaders/gltf.js';import { AnimationManager } from './animation-manager.js';-import { ClubApproachAudio } from './club-entrance-audio.js';import { log } from './shared/log.js';const TOUR_URL = '/club/venue/tour.glb';@@ -206,9 +205,6 @@ async function start(canvasEl) {));composer.addPass(new EffectPass(camera, new SMAAEffect()));- // Muffled club bass that swells as you near the door (armed on first input).- const approachAudio = new ClubApproachAudio();-const loader = gltfLoader(renderer);// The journey, in order. You free-walk every one of these — no auto-walk.@@ -348,7 +344,6 @@ async function start(canvasEl) {return !!a && (a.tagName === 'SELECT' || a.tagName === 'INPUT' || a.tagName === 'TEXTAREA');};const onKeyDown = (e) => {- approachAudio.arm();if (typingInForm()) return;const k = e.key.toLowerCase();if (k === 'e') { tryEnter(); return; }@@ -380,7 +375,6 @@ async function start(canvasEl) {const joyKnob = document.getElementById('club-joystick-knob');const onPointerDown = (e) => {- approachAudio.arm();if (!inputEnabled) return;const leftZone = isTouch && e.clientX < window.innerWidth * 0.4;if (leftZone && !joy.active) {@@ -620,7 +614,6 @@ async function start(canvasEl) {stepAvatar(ix, iz, dt);anim.update(dt);updateCamera(dt);- approachAudio.update(dt);if (phase === 'walk') minimap.update(rig.position, rig.rotation.y, nearDoor, now / 1000, prefersReducedMotion);// Key light + proximity prompt follow the avatar in the alley.@@ -637,10 +630,8 @@ async function start(canvasEl) {}doorGlow.intensity = inRange ? 3.2 : 1.4;doorMarker.pulse(now / 1000, inRange, prefersReducedMotion);- // Outside the club, the bass leaks louder the closer you get to the- // door, and the neon glows a touch hotter as you arrive.+ // The neon glows a touch hotter the closer you get to the door.const near = clamp(1 - d / 12, 0, 1);- if (currentCover) approachAudio.setProximity(near);if (!prefersReducedMotion) bloomEffect.intensity = 1.2 + near * 0.7;}@@ -744,7 +735,6 @@ async function start(canvasEl) {if (phase !== 'walk') return;paid = true;currentCover = false;- approachAudio.handOff(); // the anthem (src/club.js) takes the night from hereshowPrompt(false); showHint(false); showJoystick(false); showMinimap(false); showAgentSwitch(false);advance();}@@ -770,7 +760,6 @@ async function start(canvasEl) {agentSelect?.removeEventListener('change', onAgentChange);onAdmit = null;try { anim.dispose?.(); } catch {}- try { approachAudio?.dispose(); } catch {}disposeObject(scene);composer.dispose();renderer.dispose();diff --git a/src/club.js b/src/club.jsindex 7d6a46d6c..290d99537 100644--- a/src/club.js+++ b/src/club.js@@ -1532,10 +1532,10 @@ function updatePoleCardStatus(poleId, status) {progressEl.style.display = status === 'performing' ? '' : 'none';}// Lock the avatar picker mid-routine so a swap can't interrupt a paid- // performance; it re-enables the moment she returns to idle. Skip while the- // dropdown is still loading its options (kept disabled until populated).- const avatarSel = cardEl.querySelector('.club-avatar-select');- if (avatarSel && avatarSel.value) avatarSel.disabled = status === 'performing';+ // performance; it re-enables the moment she returns to idle. The catalog is+ // ready by the time any performance starts, so toggling enabled is safe.+ const avatarBtn = cardEl.querySelector('.club-avatar-btn');+ if (avatarBtn) avatarBtn.disabled = status === 'performing';}function flashPoleCard(poleId) {@@ -1548,14 +1548,15 @@ function flashPoleCard(poleId) {}// ── Avatar selector ──────────────────────────────────────────────────────-// Each pole card carries an "Avatar" dropdown so a visitor can choose which-// 3D avatar dances on that pole. The catalog is built at boot from three-// sources, deduped by URL: each dancer's own curated look, a set of bundled-// known-good humanoid rigs (guaranteed to load offline — Hard rule 9), and-// public avatars from the gallery (/api/explore). Picks hot-swap the rig live-// and persist per-pole to localStorage. Any rig the clip library can't-// retarget falls back to the default in attachAvatar, so a pick never freezes-// a dancer.+// Each pole card carries a thumbnail "change avatar" button that opens a+// visual gallery picker — the same look-and-feel as the /play avatar picker:+// a modal grid of preview tiles you browse, then tap to swap who dances on+// that pole. The catalog is built at boot from three sources, deduped by URL:+// each dancer's own look, a set of bundled known-good rigs (guaranteed to load+// offline — Hard rule 9), and public avatars from the gallery (/api/explore,+// which carries real thumbnails). Picks hot-swap the rig live and persist+// per-pole to localStorage. Any rig the clip library can't retarget falls back+// to the default in attachAvatar, so a pick never freezes a dancer.const BUNDLED_AVATARS = [{ key: 'bundled-michelle', name: 'Michelle', url: '/avatars/michelle.glb' },{ key: 'bundled-studio', name: 'Studio', url: '/avatars/readyplayerme.glb' },@@ -1563,10 +1564,13 @@ const BUNDLED_AVATARS = [{ key: 'bundled-mannequin', name: 'Mannequin', url: '/avatars/mannequin.glb' },{ key: 'bundled-classic', name: 'Classic', url: AVATAR_URL },];+// Thumbnails shipped for a few bundled rigs; the rest fall back to mono+// initials in the tile (exactly like /play).+const LOCAL_THUMBS = { [AVATAR_URL]: '/avatars/thumbs/default.png' };const GALLERY_URL = '/api/explore?source=avatar&category=avatar&only3d=1&limit=24';const POLE_AVATARS_KEY = 'club:poleAvatars';-// key → { key, name, url }. Insertion order drives the dropdown order.+// key → { key, name, url, thumb, starter }. Insertion order drives tile order.const avatarCatalog = new Map();// Track URLs already in the catalog so the same GLB (e.g. a dancer's own look// that's also a bundled rig) never appears twice — first registration wins,@@ -1578,7 +1582,13 @@ let fallbackTemplateRef = null;function registerAvatar(entry) {if (!entry?.key || !entry?.url || avatarCatalog.has(entry.key) || catalogUrls.has(entry.url)) return;- avatarCatalog.set(entry.key, { key: entry.key, name: entry.name || 'Avatar', url: entry.url });+ avatarCatalog.set(entry.key, {+ key: entry.key,+ name: entry.name || 'Avatar',+ url: entry.url,+ thumb: entry.thumb || LOCAL_THUMBS[entry.url] || '',+ starter: entry.starter === true,+ });catalogUrls.add(entry.url);}@@ -1597,6 +1607,14 @@ function savePoleAvatar(poleId, key) {// The default look for a pole is that pole's own dancer; persisted only when// the visitor picks something else.function defaultAvatarKey(poleId) { return `dancer-${poleId}`; }+// The catalog key currently applied to a pole (persisted override or default).+function currentAvatarKey(poleId) {+ const saved = savedPoleAvatars[poleId];+ return saved && avatarCatalog.has(saved) ? saved : defaultAvatarKey(poleId);+}+function dancerNameFor(poleId) {+ return DANCER_META[parseInt(poleId, 10) - 1]?.name || `Dancer ${poleId}`;+}function loadAvatarTemplate(url) {if (avatarTemplateCache.has(url)) return avatarTemplateCache.get(url);@@ -1609,7 +1627,7 @@ function loadAvatarTemplate(url) {}// Pull public avatars from the gallery. Never throws — a failed fetch just-// leaves the dropdown with the dancer + bundled looks.+// leaves the picker with the dancer + bundled looks.async function loadGalleryAvatars() {try {const res = await fetch(GALLERY_URL, { headers: { accept: 'application/json' } });@@ -1618,54 +1636,120 @@ async function loadGalleryAvatars() {const items = Array.isArray(data?.items) ? data.items : [];for (const it of items) {if (!it?.glbUrl || it.has3d === false || it.kind !== 'avatar') continue;- registerAvatar({ key: `gallery-${it.avatarId}`, name: it.name || 'Avatar', url: it.glbUrl });+ registerAvatar({ key: `gallery-${it.avatarId}`, name: it.name || 'Avatar', url: it.glbUrl, thumb: it.image || '' });}} catch (err) {log.warn('[club] gallery avatar fetch failed', err);}}-// Fill every pole's avatar dropdown from the catalog, selecting the persisted-// (or default) choice. Idempotent — safe to call again once the gallery lands.-function populateAvatarSelects() {+// ── Per-pole thumbnail button ─────────────────────────────────────────────+function avatarThumbHTML(entry, name, { cls = 'club-pick-mono' } = {}) {+ const initials = escapeText((name || '?').slice(0, 2).toUpperCase());+ if (entry?.thumb) {+ return `<img src="${escapeText(entry.thumb)}" alt="" loading="lazy" onerror="this.remove()"/>`;+ }+ return `<span class="${cls}">${initials}</span>`;+}++// Reflect a pole's current avatar in its card button (chip thumbnail + name).+function refreshAvatarButton(poleId) {+ const card = poleCardEls.get(poleId);+ if (!card) return;+ const entry = avatarCatalog.get(currentAvatarKey(poleId));+ const name = entry?.name || dancerNameFor(poleId);+ const cur = card.querySelector('.club-avatar-cur');+ const chip = card.querySelector('.club-avatar-chip');+ if (cur) cur.textContent = name;+ if (chip) chip.innerHTML = avatarThumbHTML(entry, name, { cls: 'club-avatar-initials' });+}++// ── Gallery picker modal (shared, scoped to whichever pole opened it) ──────+const pickerEl = document.getElementById('club-picker');+const pickGridEl = document.getElementById('club-pick-grid');+const pickSubEl = document.getElementById('club-pick-sub');+let pickerPoleId = null;++function pickTile(a, currentKey) {+ return `<button type="button" class="club-pick-tile${a.key === currentKey ? ' selected' : ''}" data-key="${escapeText(a.key)}" title="${escapeText(a.name)}">+ <span class="club-pick-thumb">${avatarThumbHTML(a, a.name)}</span>+ <span class="club-pick-name">${escapeText(a.name)}</span>+ ${a.starter ? '<span class="club-pick-badge">starter</span>' : ''}+ </button>`;+}++function renderPickerGrid() {+ if (!pickGridEl) return;const entries = [...avatarCatalog.values()];- if (!entries.length) return;- for (const pole of POLES) {- const select = poleCardEls.get(pole.id)?.querySelector('.club-avatar-select');- if (!select) continue;- const saved = savedPoleAvatars[pole.id];- const current = saved && avatarCatalog.has(saved) ? saved : defaultAvatarKey(pole.id);- select.innerHTML = entries- .map((en) => `<option value="${escapeText(en.key)}"${en.key === current ? ' selected' : ''}>${escapeText(en.name)}</option>`)- .join('');- select.disabled = false;+ if (!entries.length) {+ pickGridEl.innerHTML = '<div class="club-pick-loading">Loading avatars…</div>';+ return;}+ const current = currentAvatarKey(pickerPoleId);+ const starters = entries.filter((e) => e.starter);+ const gallery = entries.filter((e) => !e.starter);+ let html = starters.map((e) => pickTile(e, current)).join('');+ if (gallery.length) {+ html += '<div class="club-pick-sep">Community gallery</div>' + gallery.map((e) => pickTile(e, current)).join('');+ }+ pickGridEl.innerHTML = html;+}++function openPicker(poleId) {+ if (!pickerEl) return;+ pickerPoleId = poleId;+ if (pickSubEl) pickSubEl.textContent = `Pick who dances on ${dancerNameFor(poleId)}'s pole — swaps live on stage.`;+ renderPickerGrid();+ pickerEl.hidden = false;+}+function closePicker() {+ if (pickerEl) pickerEl.hidden = true;+ pickerPoleId = null;+}++// Wire the modal once — the markup is static in club.html.+if (pickerEl) {+ document.getElementById('club-pick-close')?.addEventListener('click', closePicker);+ document.getElementById('club-pick-backdrop')?.addEventListener('click', closePicker);+ window.addEventListener('keydown', (e) => { if (e.key === 'Escape' && !pickerEl.hidden) closePicker(); });+ pickGridEl?.addEventListener('click', async (e) => {+ const tile = e.target.closest('.club-pick-tile');+ if (!tile || pickerPoleId == null) return;+ const key = tile.dataset.key;+ if (key === currentAvatarKey(pickerPoleId)) { closePicker(); return; }+ pickGridEl.querySelectorAll('.club-pick-tile').forEach((t) => t.classList.remove('selected'));+ tile.classList.add('selected', 'busy');+ const spinner = document.createElement('span');+ spinner.className = 'club-pick-spinner';+ tile.querySelector('.club-pick-thumb')?.appendChild(spinner);+ const ok = await swapPoleAvatar(pickerPoleId, key);+ tile.classList.remove('busy');+ spinner.remove();+ if (ok) {+ closePicker();+ } else {+ tile.classList.add('failed');+ setTimeout(() => tile.classList.remove('failed'), 1500);+ }+ });}+// Load the chosen rig and hot-swap it onto the pole. Returns true on success.async function swapPoleAvatar(poleId, key) {const station = stations.find((s) => s.id === poleId);const entry = avatarCatalog.get(key);- if (!station || !entry) return;- const select = poleCardEls.get(poleId)?.querySelector('.club-avatar-select');- if (select) select.disabled = true;- const dancerName = DANCER_META[parseInt(poleId, 10) - 1]?.name || `Dancer ${poleId}`;+ if (!station || !entry) return false;try {const template = await loadAvatarTemplate(entry.url);station.swapAvatar(template, fallbackTemplateRef || template);savePoleAvatar(poleId, key);- setStatus(`${dancerName} now wearing ${entry.name}.`, { kind: 'ok' });+ refreshAvatarButton(poleId);+ setStatus(`${dancerNameFor(poleId)} now wearing ${entry.name}.`, { kind: 'ok' });+ return true;} catch (err) {log.warn(`[club] avatar swap failed for pole ${poleId}`, err);setStatus("Couldn't load that avatar — keeping the current look.", { kind: 'error' });- // Roll the dropdown back to whatever the station is actually wearing.- if (select) {- const fallbackKey = savedPoleAvatars[poleId] && avatarCatalog.has(savedPoleAvatars[poleId])- ? savedPoleAvatars[poleId]- : defaultAvatarKey(poleId);- select.value = fallbackKey;- }- } finally {- if (select) select.disabled = station.performing;+ return false;}}@@ -1676,10 +1760,21 @@ async function initAvatarSelector(dancerUrls) {key: defaultAvatarKey(String(i + 1)),name: m.name,url: dancerUrls[i] || AVATAR_URL,+ starter: true,}));- for (const a of BUNDLED_AVATARS) registerAvatar(a);+ for (const a of BUNDLED_AVATARS) registerAvatar({ ...a, starter: true });++ // Paint the buttons from the dancer + bundled looks immediately, then again+ // once the gallery lands so its tiles (and any saved gallery pick) appear.+ for (const pole of POLES) {+ refreshAvatarButton(pole.id);+ const btn = poleCardEls.get(pole.id)?.querySelector('.club-avatar-btn');+ if (btn) btn.disabled = false;+ }+await loadGalleryAvatars();- populateAvatarSelects();+ for (const pole of POLES) refreshAvatarButton(pole.id);+ if (pickerEl && !pickerEl.hidden) renderPickerGrid();// Re-apply any look the visitor chose on a previous visit. The boot path// already attached each pole's own dancer, so we only swap the overrides.@@ -1721,13 +1816,13 @@ function renderPoles() {<div class="club-pole-progress" style="display:none" role="progressbar" aria-label="Performance progress" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"><div class="club-pole-progress-bar" style="width:0%"></div></div>- <label class="club-pole-style">- <span class="sr-only">Avatar for ${meta.name}</span>- Avatar- <select data-pole="${pole.id}" class="club-pole-select club-avatar-select" aria-label="Avatar for pole ${pole.id}" disabled>- <option value="">Loading avatars…</option>- </select>- </label>+ <button type="button" class="club-avatar-btn" data-pole="${pole.id}" aria-label="Change ${meta.name}'s avatar" disabled>+ <span class="club-avatar-chip"><span class="club-avatar-initials">${escapeText(meta.name.slice(0, 2).toUpperCase())}</span></span>+ <span class="club-avatar-meta">+ <span class="club-avatar-cur">${escapeText(meta.name)}</span>+ <span class="club-avatar-change">Change avatar</span>+ </span>+ </button><label class="club-pole-style"><span class="sr-only">Dance style for ${meta.name}</span>Style@@ -1745,6 +1840,11 @@ function renderPoles() {// Tap card on mobile to VIP.polesPanel.addEventListener('click', (e) => {+ const avatarBtn = e.target.closest('.club-avatar-btn');+ if (avatarBtn) {+ if (!avatarBtn.disabled) openPicker(avatarBtn.dataset.pole);+ return;+ }const camBtn = e.target.closest('.club-cam-btn');if (camBtn) {const layout = POLES.find((p) => p.id === camBtn.dataset.pole);@@ -1767,13 +1867,6 @@ function renderPoles() {if (layout) clubCam.setVip(layout);}});-- // Avatar dropdown → hot-swap the chosen rig onto that pole's dancer.- polesPanel.addEventListener('change', (e) => {- const select = e.target.closest('.club-avatar-select');- if (!select || !select.value) return;- swapPoleAvatar(select.dataset.pole, select.value);- });}// ── Pointer + pinch handling ─────────────────────────────────────────────diff --git a/src/element.js b/src/element.jsindex fd491033b..eec9fcc2e 100644--- a/src/element.js+++ b/src/element.js@@ -984,6 +984,7 @@ class Agent3DElement extends HTMLElement {const loading = document.createElement('div');loading.className = 'loading';+ loading.part = 'loading';loading.setAttribute('role', 'status');loading.setAttribute('aria-label', 'Loading avatar');loading.innerHTML =