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
IRL: changelog regen + features update, src/irl.js refinements
nirholas63f94175ae85
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex ad413c2c0..f10e34f85 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -10,6 +10,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **AR & half-body avatar export fixed for compressed models** — View-in-AR (USDZ for iOS Quick Look) and the half-body VR-seat export now work for avatars that ship with meshopt or Draco geometry compression. Previously these exports silently failed on compressed GLBs because the loader had no decoder registered; the pipeline now loads the meshopt and Draco decoders before parsing, so every avatar — including the compressed ones produced by the server-side bake — converts cleanly. (`/gallery`) `[fix]`- **Creator royalty payouts protected against double-settlement** — Royalty payouts to skill authors now claim each pending amount atomically before sending funds on-chain, so two overlapping settlement runs can never pay the same balance twice. Creators are paid exactly once for what they've earned. `[fix]`- **Discovery now shows only real creator avatars** — The Explore / discovery feed previously padded itself with a set of built-in sample avatars and counted them in the totals. The feed and its counts now reflect only real avatars created by the community — no filler. (`/explore`) `[improvement]`+- **Every IRL moment now has a designed, honest state** — IRL asks for the three most sensitive permissions a web app can — camera, motion, and location — and we made every moment around them feel deliberate instead of uncertain. While your phone is still finding your GPS fix, the top bar shows a clear "Finding your location…" shimmer so the wait never looks like an empty, nobody-here screen. If discovery ever has to slow down to catch its breath, you get a calm "catching up…" note that quietly recovers on its own — never a scary error. The live-presence indicator stays honest too: when it drops, nearby discovery keeps working and nothing implies otherwise. Every control is now reachable by keyboard with a visible focus ring, screen readers announce each state change once, and all of it respects reduced-motion settings. (`/irl`) `[improvement]`- **Every page now shares with its own social card** — Share any three.ws page on X, Discord, Slack, iMessage, or LinkedIn and the link now previews with a branded card built for that exact page — its title, its one-line description, and a colour that matches the section it belongs to — instead of one generic image for the whole site. The cards render as real PNGs so they show up everywhere (not just the apps that handle SVG), and they're generated on the fly from the same page catalog that feeds the sitemap, so the preview always matches what's actually on the page. We also tightened the behind-the-scenes SEO on every page: cleaner canonical links, richer structured data with breadcrumbs, and crawler hints that let search engines show large image previews. `[improvement, infra]`- **Fixed broken links and added retry on failed loads across the app** — Several navigation links pointed at pages that no longer exist — "View plans" on the agent deploy flow, the Classic viewer menu item, and the API-key links on the AWS welcome and selfie pages — and now go to the right place. List pages that could get stuck showing a blank grid or endless skeletons on a network hiccup (your collection, a coin's community profile, the bounty board, the agents directory) now show a clear, retryable error instead. The $THREE dashboard also replaced a non-working "claim" button with a plain explanation that revenue share is distributed to holders automatically. `[fix, improvement]`- **Fund any agent wallet by scanning a QR or copying the address — with live confirmation** — The agent wallet's Deposit tab is now a complete, public funding panel: a crisp QR code (generated on-device, no third-party service) that your phone wallet can scan, a one-tap copyable Solana address, an optional preset amount, and a Solana deep-link that opens Phantom, Solflare or Backpack on mobile. The panel watches the agent's real on-chain balance and confirms the moment your SOL lands — "◎0.5 SOL received" — instead of leaving you guessing. Anyone can fund an agent, not just its owner, and the new "Fund agent wallet" button on the create-agent success screen leads new users straight into it. `[feature]`@@ -18,6 +19,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Hardened the widget custom-brain proxy against internal-network abuse** — Chat widgets configured with a custom AI "brain" endpoint now route that request through our SSRF guard, so a widget owner can no longer point it at a private/internal address to probe our network. No change for legitimate public endpoints. We also tightened a few backend read paths so a temporary database or price-feed hiccup surfaces as "temporarily unavailable" instead of silently looking like empty data. `[security, improvement]`- **IBM sites can now embed three.ws pages** — We extended the sitewide clickjacking protection to allow IBM properties to frame three.ws. Any page on ibm.com (and its subdomains) may now load three.ws pages inside an iframe — useful for the IBM x402 demo and other IBM-hosted integrations — while every other external site is still refused by default. Sign-in, wallet, dashboard and OAuth consent pages remain hard-locked and cannot be framed by anyone, including IBM. The avatar, widget and walk embeds continue to work on any site as before. `[security, improvement]`- **IRL is sharper on phones, in any orientation** — We polished IRL for the device it lives on. Every on-screen control now clears the notch and home indicator on modern phones — in portrait and landscape both — so nothing hides behind the camera cutout or rounded corners. On the narrowest phones the bottom controls wrap cleanly instead of squishing or clipping, and every button is a full finger-sized target. Typing a caption or message no longer makes Safari zoom the page in, long agent names truncate neatly instead of overflowing, and the calibrate readouts stay legible whichever way you hold the phone. (`/irl`) `[improvement]`+- **IRL surfaces now show clear loading, empty, and error states** — Every IRL screen that loads data now has a designed loading, empty, and error state — no more stuck "Loading…" or blank screens. Open "My pins" and you'll see a skeleton while it loads, a friendly nudge to drop your first agent when you have none, and a one-tap Retry if the network hiccups. Tapping an agent shows the same care: if its profile can't load, you get a clear message and Retry while its name and a link to the full profile stay put. The nearby radar reads as intentionally empty ("Be the first to pin here") instead of a broken dial, and the count beside it no longer flashes "0 nearby" before we've finished looking. On devices that can't run the AR view, you get a helpful card explaining why and where to go next — not a bare error. (`/irl`) `[improvement]`- **One API, many services: the three.ws API gateway** — We bundled a stack of popular third-party APIs behind a single three.ws API so you can reach them all with one integration, one key, and one bill. The first providers are live at /api/v1/x — CoinGecko (live prices and ranked market data), DefiLlama (protocol TVL across all of DeFi), and any OpenAI-compatible LLM — with more landing over the coming releases. Discover everything with one call to GET /api/v1, which returns the full catalog: every provider, endpoint, parameter, and price. You can pay three ways, your choice per call: bring your own upstream key (we just route it, no markup), use a three.ws API key on your plan, or pay-per-call in USDC with no account at all. Every response uses one consistent shape with standard rate-limit headers, and the platform's own capabilities — text sentiment, market and narrative intelligence, and verified agent-card lookups — live under the same /api/v1 surface. `[feature, sdk]`- **Paid market-intel never charges you for unavailable data** — The pay-per-call market-intel endpoints (the $THREE Town Oracle and the crypto-intel kiosk) used to hand back an estimated "neutral" reading — and still take the payment — when their live price feed was rate-limited. They now return a clean "temporarily unavailable, retry shortly" instead, and crucially the payment is never settled when live data is missing. You only pay when you get a real, live signal. `[fix]`- **Platform-wide API security hardening** — We completed a full security audit of the API and tightened it across the board. Server errors no longer echo internal details back to callers — they return a short reference code you can quote to support, while the real diagnostics stay server-side (this also closes a path where a backend service key could surface in an error message). Account-changing actions made from the website — updating preferences, managing webhooks and payout wallets, marking notifications read, scheduling posts, setting skill prices — now carry cross-site request-forgery protection, so a malicious page can't act on your behalf. Sign-in, wallet-linking, GitHub connect and sensitive admin actions gained rate limits, and image-analysis requests are now screened so a supplied URL can't be used to probe internal systems. API access via developer keys is unaffected. `[security]`diff --git a/data/changelog.json b/data/changelog.jsonindex 34ee005ed..2e84bb914 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,24 @@{"$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-06-19",+ "title": "IRL surfaces now show clear loading, empty, and error states",+ "summary": "Every IRL screen that loads data now has a designed loading, empty, and error state — no more stuck \"Loading…\" or blank screens. Open \"My pins\" and you'll see a skeleton while it loads, a friendly nudge to drop your first agent when you have none, and a one-tap Retry if the network hiccups. Tapping an agent shows the same care: if its profile can't load, you get a clear message and Retry while its name and a link to the full profile stay put. The nearby radar reads as intentionally empty (\"Be the first to pin here\") instead of a broken dial, and the count beside it no longer flashes \"0 nearby\" before we've finished looking. On devices that can't run the AR view, you get a helpful card explaining why and where to go next — not a bare error.",+ "tags": [+ "improvement"+ ],+ "link": "/irl"+ },+ {+ "date": "2026-06-19",+ "title": "Every IRL moment now has a designed, honest state",+ "summary": "IRL asks for the three most sensitive permissions a web app can — camera, motion, and location — and we made every moment around them feel deliberate instead of uncertain. While your phone is still finding your GPS fix, the top bar shows a clear \"Finding your location…\" shimmer so the wait never looks like an empty, nobody-here screen. If discovery ever has to slow down to catch its breath, you get a calm \"catching up…\" note that quietly recovers on its own — never a scary error. The live-presence indicator stays honest too: when it drops, nearby discovery keeps working and nothing implies otherwise. Every control is now reachable by keyboard with a visible focus ring, screen readers announce each state change once, and all of it respects reduced-motion settings.",+ "tags": [+ "improvement"+ ],+ "link": "/irl"+ },{"date": "2026-06-19","title": "IRL is sharper on phones, in any orientation",diff --git a/public/changelog.json b/public/changelog.jsonindex cf5d83f64..8e2841920 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-06-19T09:30:40.311Z",+ "generated_at": "2026-06-19T09:37:27.069Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -46,6 +46,16 @@"improvement"]},+ {+ "date": "2026-06-19",+ "type": "update",+ "title": "Every IRL moment now has a designed, honest state",+ "summary": "IRL asks for the three most sensitive permissions a web app can — camera, motion, and location — and we made every moment around them feel deliberate instead of uncertain. While your phone is still finding your GPS fix, the top bar shows a clear \"Finding your location…\" shimmer so the wait never looks like an empty, nobody-here screen. If discovery ever has to slow down to catch its breath, you get a calm \"catching up…\" note that quietly recovers on its own — never a scary error. The live-presence indicator stays honest too: when it drops, nearby discovery keeps working and nothing implies otherwise. Every control is now reachable by keyboard with a visible focus ring, screen readers announce each state change once, and all of it respects reduced-motion settings.",+ "link": "/irl",+ "tags": [+ "improvement"+ ]+ },{"date": "2026-06-19","type": "update",@@ -130,6 +140,16 @@"improvement"]},+ {+ "date": "2026-06-19",+ "type": "update",+ "title": "IRL surfaces now show clear loading, empty, and error states",+ "summary": "Every IRL screen that loads data now has a designed loading, empty, and error state — no more stuck \"Loading…\" or blank screens. Open \"My pins\" and you'll see a skeleton while it loads, a friendly nudge to drop your first agent when you have none, and a one-tap Retry if the network hiccups. Tapping an agent shows the same care: if its profile can't load, you get a clear message and Retry while its name and a link to the full profile stay put. The nearby radar reads as intentionally empty (\"Be the first to pin here\") instead of a broken dial, and the count beside it no longer flashes \"0 nearby\" before we've finished looking. On devices that can't run the AR view, you get a helpful card explaining why and where to go next — not a bare error.",+ "link": "/irl",+ "tags": [+ "improvement"+ ]+ },{"date": "2026-06-19","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex f5e9e56ee..2b84739cf 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -38,6 +38,14 @@<category>improvement</category><description>The Explore / discovery feed previously padded itself with a set of built-in sample avatars and counted them in the totals. The feed and its counts now reflect only real avatars created by the community — no filler.</description></item>+ <item>+ <title>Every IRL moment now has a designed, honest state</title>+ <link>https://three.ws/irl</link>+ <guid isPermaLink="false">2026-06-19:Every IRL moment now has a designed, honest state</guid>+ <pubDate>Fri, 19 Jun 2026 12:00:00 GMT</pubDate>+ <category>improvement</category>+ <description>IRL asks for the three most sensitive permissions a web app can — camera, motion, and location — and we made every moment around them feel deliberate instead of uncertain. While your phone is still finding your GPS fix, the top bar shows a clear "Finding your location…" shimmer so the wait never looks like an empty, nobody-here screen. If discovery ever has to slow down to catch its breath, you get a calm "catching up…" note that quietly recovers on its own — never a scary error. The live-presence indicator stays honest too: when it drops, nearby discovery keeps working and nothing implies otherwise. Every control is now reachable by keyboard with a visible focus ring, screen readers announce each state change once, and all of it respects reduced-motion settings.</description>+ </item><item><title>Every page now shares with its own social card</title><link>https://three.ws/changelog</link>@@ -102,6 +110,14 @@<category>improvement</category><description>We polished IRL for the device it lives on. Every on-screen control now clears the notch and home indicator on modern phones — in portrait and landscape both — so nothing hides behind the camera cutout or rounded corners. On the narrowest phones the bottom controls wrap cleanly instead of squishing or clipping, and every button is a full finger-sized target. Typing a caption or message no longer makes Safari zoom the page in, long agent names truncate neatly instead of overflowing, and the calibrate readouts stay legible whichever way you hold the phone.</description></item>+ <item>+ <title>IRL surfaces now show clear loading, empty, and error states</title>+ <link>https://three.ws/irl</link>+ <guid isPermaLink="false">2026-06-19:IRL surfaces now show clear loading, empty, and error states</guid>+ <pubDate>Fri, 19 Jun 2026 12:00:00 GMT</pubDate>+ <category>improvement</category>+ <description>Every IRL screen that loads data now has a designed loading, empty, and error state — no more stuck "Loading…" or blank screens. Open "My pins" and you'll see a skeleton while it loads, a friendly nudge to drop your first agent when you have none, and a one-tap Retry if the network hiccups. Tapping an agent shows the same care: if its profile can't load, you get a clear message and Retry while its name and a link to the full profile stay put. The nearby radar reads as intentionally empty ("Be the first to pin here") instead of a broken dial, and the count beside it no longer flashes "0 nearby" before we've finished looking. On devices that can't run the AR view, you get a helpful card explaining why and where to go next — not a bare error.</description>+ </item><item><title>One API, many services: the three.ws API gateway</title><link>https://three.ws/changelog</link>diff --git a/public/features.json b/public/features.jsonindex d6bea1c13..c48b34e3e 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-06-19T09:30:40.046Z",+ "generated_at": "2026-06-19T09:37:26.748Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",diff --git a/src/irl.js b/src/irl.jsindex c971107df..3d535ccfb 100644--- a/src/irl.js+++ b/src/irl.js@@ -770,6 +770,8 @@ window.addEventListener('keyup', e => {let dragging = false, lastX = 0, lastY = 0, downId = -1;canvas.addEventListener('pointerdown', e => {if (placeModeActive || calibrateActive) return;+ // Don't orbit the (paused, hidden) IRL camera behind the WebXR overlay.+ if (xrOverlay && !xrOverlay.hidden) return;const r = joystickEl.getBoundingClientRect();if (e.clientX >= r.left && e.clientX <= r.right && e.clientY >= r.top && e.clientY <= r.bottom) return;dragging = true; downId = e.pointerId; lastX = e.clientX; lastY = e.clientY;@@ -1198,6 +1200,20 @@ if (lockBtn) {lockBtn.addEventListener('click', () => setLocked(!avatarLocked));}+// ── Discovery onboarding + designed empty state (task 02) ───────────────────+// "Place an agent here" — the CTA on the empty-state prompt and the first-run+// explainer. Placing your own agent so others stumble on it IS the pin: bring up+// the camera if it's off, then drop the GPS-anchored pin. setLocked() owns the+// location/motion permission flow and the precise anchor, so this just sequences+// into it within the user's tap.+async function placeAgentHere() {+ unlockArrivalAudio();+ if (!arActive) await enableAR();+ if (arActive && !avatarLocked) setLocked(true);+}++const discovery = initDiscovery({ onPlace: placeAgentHere });+// ── Designed guidance sheet ───────────────────────────────────────────────// iOS Safari has no WebXR, so the whole world-lock rides on motion + GPS// permissions. When one is missing, a silent no-op leaves the user staring at@@ -1968,6 +1984,50 @@ function saveErrorFallback(code) {}}+// ── Modal-sheet keyboard accessibility (task 07) ──────────────────────────+// A small shared primitive the bottom sheets reuse: while a sheet is open it+// (1) closes on Escape, (2) keeps Tab focus inside the sheet, and (3) restores+// focus to whatever opened it on close. It generalises the bespoke trap the+// bulk-purge confirm already ships so every modal sheet behaves identically.+//+// Each sheet keeps its own open/close functions (no over-refactor) and simply+// calls trapSheet() after adding .is-open and releaseSheet() after removing it.+// opts.suspendWhile lets an outer sheet defer to a nested confirm (My Pins → the+// "remove all" purge) that runs its own trap; opts.manageFocus=false lets a+// caller that focuses its own field (the caption input) keep doing so.+const A11Y_FOCUSABLE = 'a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])';+const _sheetTraps = new Map();++function trapSheet(el, onClose, opts = {}) {+ if (!el || _sheetTraps.has(el)) return;+ const lastFocus = opts.restoreFocus === false ? null : document.activeElement;+ const keydown = (e) => {+ if (opts.suspendWhile?.()) return; // a nested dialog owns the keyboard+ if (e.key === 'Escape') { e.preventDefault(); onClose?.(); return; }+ if (e.key !== 'Tab') return;+ const nodes = [...el.querySelectorAll(A11Y_FOCUSABLE)].filter(n => n.offsetParent !== null);+ if (!nodes.length) { e.preventDefault(); return; }+ const first = nodes[0], last = nodes[nodes.length - 1], act = document.activeElement;+ if (e.shiftKey && (act === first || !el.contains(act))) { e.preventDefault(); last.focus(); }+ else if (!e.shiftKey && (act === last || !el.contains(act))) { e.preventDefault(); first.focus(); }+ };+ document.addEventListener('keydown', keydown, true);+ _sheetTraps.set(el, { keydown, lastFocus });+ if (opts.manageFocus === false) return; // caller focuses its own field+ const initial = opts.initialFocus || el.querySelector(A11Y_FOCUSABLE) || el;+ requestAnimationFrame(() => { try { initial.focus({ preventScroll: true }); } catch {} });+}++function releaseSheet(el) {+ const t = el && _sheetTraps.get(el);+ if (!t) return;+ document.removeEventListener('keydown', t.keydown, true);+ _sheetTraps.delete(el);+ if (t.lastFocus && document.contains(t.lastFocus)) {+ try { t.lastFocus.focus({ preventScroll: true }); } catch {}+ }+}+// ── Caption panel (pre-save) ──────────────────────────────────────────────const captionPanel = document.getElementById('irl-caption-panel');@@ -2003,14 +2063,20 @@ function openCaptionPanel(pinLat, pinLng, headingDeg, source = 'gyro-gps') {captionInput.value = '';captionPanel.classList.add('is-open');focusCaptionWhenOpen();- captionConfirm.onclick = () => {+ const cancel = () => {captionPanel.classList.remove('is-open');- commitPin(pinLat, pinLng, headingDeg, captionInput.value.trim(), source);+ releaseSheet(captionPanel);+ setLocked(false);};- captionCancel.onclick = () => {+ captionConfirm.onclick = () => {captionPanel.classList.remove('is-open');- setLocked(false);+ releaseSheet(captionPanel);+ commitPin(pinLat, pinLng, headingDeg, captionInput.value.trim(), source);};+ captionCancel.onclick = cancel;+ // Escape mirrors Cancel (release the AR lock); the caption field manages its+ // own focus via focusCaptionWhenOpen(), so the trap doesn't steal it.+ trapSheet(captionPanel, cancel, { manageFocus: false });}function commitPin(pinLat, pinLng, headingDeg, caption, source = 'gyro-gps') {@@ -2080,11 +2146,14 @@ function openCaptionForMapPin(lat, lng, label) {captionInput.value = '';captionPanel.classList.add('is-open');focusCaptionWhenOpen();+ const close = () => { captionPanel.classList.remove('is-open'); releaseSheet(captionPanel); };captionConfirm.onclick = () => {- captionPanel.classList.remove('is-open');+ close();commitMapPin(lat, lng, captionInput.value.trim(), label);};- captionCancel.onclick = () => { captionPanel.classList.remove('is-open'); };+ captionCancel.onclick = close;+ // No AR lock to release here — Escape just closes the panel.+ trapSheet(captionPanel, close, { manageFocus: false });}async function commitMapPin(lat, lng, caption, label) {@@ -2164,7 +2233,11 @@ function pauseRender() {// pointless). dt is clamped in tick(), so the first resumed frame never jumps.function resumeRender() {if (!_renderPaused) return;- if (_contextLost || !_tickStarted) { _renderPaused = false; return; }+ // Don't start IRL's own loop while it's still lost, before boot, or during an+ // immersive WebXR session (which drives its own animation loop — IRL's tick is+ // intentionally parked then). The clear of _renderPaused still happens so a later+ // XR exit / context restore resumes through the normal path.+ if (_contextLost || !_tickStarted || xrSession) { _renderPaused = false; return; }_renderPaused = false;startTick();}