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
Fix /irl camera hanging on "Requesting camera…"
nirholas42a92411196b
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 022c3c15e..09298066a 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -15,7 +15,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Avatars come to life — animations now play on the avatar page** — Every avatar page now plays its built-in animation the moment it loads, so a rigged avatar stands, breathes, or performs its motion instead of freezing in a static pose. A new floating control sits over the 3D stage: a play/pause button, plus a clip switcher when an avatar carries more than one take so you can jump between them. Avatars with no embedded motion are unaffected — the control only appears when there's something to play. `[feature]`- **Browse every community avatar from your dashboard** — The dashboard Avatars page now has a Community tab alongside My avatars. It shows every public 3D avatar the whole community has built — with live spinning previews, a running count and total views, search, tag filters, and infinite scroll. Open any one as a live page, remix it in the 3D studio, or copy its share link, embed snippet, or GLB URL in a click. (`/dashboard/avatars`) `[feature]`- **Buy and sell USDC-paired coins straight from the trade widget** — The in-world trade widget now speaks both currencies. Open Buy on a coin and the widget reads its real pairing from the chain: a SOL coin asks for SOL exactly as before, while a USDC-paired coin denominates the amount in USDC, shows your wallet's USDC balance, and prices and settles the trade in USDC. A new Sell tab lets you sell a coin you hold back to its quote asset — pick 25%, 50%, or Max of your balance, see the live payout, and sign once; for USDC coins the payout account is opened for you automatically in the same transaction. Every state is handled: not enough USDC offers a one-tap Add-funds flow, a moved price explains your slippage, and a cancelled signature is quietly acknowledged. The whole flow is your own wallet, signed in your browser, with a Solscan link the moment it lands. (`/play`) `[feature]`-- **Camera AR on /irl now turns on** — The "Camera AR" button on the IRL page was stuck — it never lit up, on desktop or phone, so you could never drop your avatar into your real room. A startup error in the joystick setup was crashing the page's script before the button could ever be enabled. Fixed: the button now activates once your avatar loads, and tapping it opens the camera so you can walk your avatar across your real floor. (`/irl`) `[fix]`+- **Camera AR on /irl now turns on** — The "Camera AR" button on the IRL page was stuck — it never lit up, on desktop or phone, so you could never drop your avatar into your real room. Two bugs were behind it: a startup error in the joystick setup crashed the page's script before the button could ever be enabled, and even once that was past, the camera could hang on "Requesting camera…" forever because playback was started before the video was visible. Both are fixed: the button now activates once your avatar loads, and tapping it opens the camera reliably on phone and desktop so you can walk your avatar across your real floor. (`/irl`) `[fix]`- **Chat never stalls on a down AI model — instant, quiet failover** — If you pick a specific AI model for the agent (say Claude) and our key for that provider is temporarily unavailable, chat now hands you an answer instantly from a healthy free model instead of pausing on the dead provider. Previously the app re-tried the unavailable provider on the very first attempt of every single message — adding a little delay each time and filling our logs with repeat warnings. Now a provider with a key or billing problem is set aside for a few minutes after the first failure and skipped up front, even when it was the one you explicitly chose, so the next message goes straight to a model that works. Free-first, always a working fallback. (`/chat`) `[improvement]`- **Clearer launch & trade errors, and a graduated badge on coins** — When a token launch or an in-world trade can't go through, the app now tells you exactly why and what to do next — "Not enough SOL to cover the launch + network fees," "Price moved beyond your slippage limit," "You cancelled the signature in your wallet," or "Couldn't reach the Solana network" — instead of a single catch-all "Connection error." Coins also show their lifecycle at a glance: the trade panel carries a badge marking whether a coin is still on its bonding curve or has graduated to the PumpSwap AMM, so a graduated coin is unmistakable. Backed by new end-to-end browser tests that drive the full four-step launch flow and the buy/sell widget so this conversion path can't silently break. (`/pump-dashboard`) `[improvement]`- **Homepage Forge is more reliable — no more "busy" on the second model** — The mini Forge on the homepage now runs on the same free Standard lane as the full /forge page. Before, it used the free draft preview, which has tight concurrency and would return a "generator is busy" message on a quick second generation. Now back-to-back prompts hold up — models still land free with no sign-up, and the platform automatically degrades to the faster free lane if the main one is throttled. (`/forge`) `[fix]`diff --git a/data/changelog.json b/data/changelog.jsonindex d60df6705..5ad1d6210 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -4,7 +4,7 @@{"date": "2026-06-15","title": "Camera AR on /irl now turns on",- "summary": "The \"Camera AR\" button on the IRL page was stuck — it never lit up, on desktop or phone, so you could never drop your avatar into your real room. A startup error in the joystick setup was crashing the page's script before the button could ever be enabled. Fixed: the button now activates once your avatar loads, and tapping it opens the camera so you can walk your avatar across your real floor.",+ "summary": "The \"Camera AR\" button on the IRL page was stuck — it never lit up, on desktop or phone, so you could never drop your avatar into your real room. Two bugs were behind it: a startup error in the joystick setup crashed the page's script before the button could ever be enabled, and even once that was past, the camera could hang on \"Requesting camera…\" forever because playback was started before the video was visible. Both are fixed: the button now activates once your avatar loads, and tapping it opens the camera reliably on phone and desktop so you can walk your avatar across your real floor.","tags": ["fix"],"link": "/irl"},diff --git a/public/changelog.json b/public/changelog.jsonindex d53e26bfc..7bb1fb32c 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-06-15T19:05:35.826Z",+ "generated_at": "2026-06-15T20:11:46.076Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -102,7 +102,7 @@"date": "2026-06-15","type": "update","title": "Camera AR on /irl now turns on",- "summary": "The \"Camera AR\" button on the IRL page was stuck — it never lit up, on desktop or phone, so you could never drop your avatar into your real room. A startup error in the joystick setup was crashing the page's script before the button could ever be enabled. Fixed: the button now activates once your avatar loads, and tapping it opens the camera so you can walk your avatar across your real floor.",+ "summary": "The \"Camera AR\" button on the IRL page was stuck — it never lit up, on desktop or phone, so you could never drop your avatar into your real room. Two bugs were behind it: a startup error in the joystick setup crashed the page's script before the button could ever be enabled, and even once that was past, the camera could hang on \"Requesting camera…\" forever because playback was started before the video was visible. Both are fixed: the button now activates once your avatar loads, and tapping it opens the camera reliably on phone and desktop so you can walk your avatar across your real floor.","link": "/irl","tags": ["fix"diff --git a/public/changelog.xml b/public/changelog.xmlindex 4b1a329f1..7f5e4b0e7 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -84,7 +84,7 @@<guid isPermaLink="false">2026-06-15:Camera AR on /irl now turns on</guid><pubDate>Mon, 15 Jun 2026 12:00:00 GMT</pubDate><category>fix</category>- <description>The "Camera AR" button on the IRL page was stuck — it never lit up, on desktop or phone, so you could never drop your avatar into your real room. A startup error in the joystick setup was crashing the page's script before the button could ever be enabled. Fixed: the button now activates once your avatar loads, and tapping it opens the camera so you can walk your avatar across your real floor.</description>+ <description>The "Camera AR" button on the IRL page was stuck — it never lit up, on desktop or phone, so you could never drop your avatar into your real room. Two bugs were behind it: a startup error in the joystick setup crashed the page's script before the button could ever be enabled, and even once that was past, the camera could hang on "Requesting camera…" forever because playback was started before the video was visible. Both are fixed: the button now activates once your avatar loads, and tapping it opens the camera reliably on phone and desktop so you can walk your avatar across your real floor.</description></item><item><title>Chat never stalls on a down AI model — instant, quiet failover</title>diff --git a/public/features.json b/public/features.jsonindex 37ef7eb05..9313b0941 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-06-15T19:05:35.815Z",+ "generated_at": "2026-06-15T20:11:46.063Z","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 0a2f11d30..774ef3aaa 100644--- a/src/irl.js+++ b/src/irl.js@@ -17,7 +17,7 @@ import {MeshPhysicalMaterial,MeshStandardMaterial,OctahedronGeometry,- PCFSoftShadowMap,+ PCFShadowMap,PerspectiveCamera,PlaneGeometry,PMREMGenerator,@@ -101,7 +101,7 @@ renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));renderer.setSize(window.innerWidth, window.innerHeight, false);renderer.setClearColor(0x000000, 0);renderer.shadowMap.enabled = true;-renderer.shadowMap.type = PCFSoftShadowMap;+renderer.shadowMap.type = PCFShadowMap;const scene = new Scene();const pmrem = new PMREMGenerator(renderer);@@ -203,8 +203,11 @@ async function enableAR() {}videoEl.srcObject = mediaStream;- try { await videoEl.play(); } catch {}+ // Reveal the AR state BEFORE play(). A display:none <video> can leave+ // play()'s promise unsettled in some browsers (notably iOS Safari), which+ // would otherwise hang camera activation forever. Make it visible first,+ // then start playback without blocking on the promise.arActive = true;document.body.classList.add('is-ar');cameraBtn.classList.add('is-active');@@ -215,6 +218,8 @@ async function enableAR() {renderer.setClearColor(0x000000, 0);scene.background = null;+ videoEl.play().catch(() => {/* autoplay policies — frames still arrive via the stream */});+// Match Three.js FOV to device rear camera so the avatar's scale agrees// with real-world objects (typically 70–75° diagonal for rear cameras).const track = mediaStream.getVideoTracks()[0];