Skip to content

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

feat(ar): shared AR links unfurl with a real model render, and the launch page converts

nirholas568792e9d381
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6fa6c6234..7b843b90d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
## 2026-07-15
- **AR avatars now come alive in your room** — Avatars no longer land in AR as frozen statues. Every rigged avatar generated on three.ws now carries a Bring it to life link that opens IRL: the agent walks, animates, and talks with you through your camera, standing in your real space. Static placement is still one tap away for props or anyone who just wants the model on a desk. The living link ships everywhere avatars are made: the AR launch page, the 3D Studio tools in ChatGPT and Claude, and the developer MCP tools. (`/irl`) `[feature, improvement]`
+- **Shared AR links now unfurl with the model itself** — Paste a place-in-your-room link into a chat and it now shows a real rendered picture of that exact model instead of a bare URL. The AR page also shows the model's name, a proper loading state, and a Create your own link, so a friend who receives a model can make one of their own in a tap. Behind it, the public model renderer gained a URL form: point any image tag at /api/render/glb with a public GLB link and get a PNG back. (`/ar`) `[improvement]`
## 2026-07-14
diff --git a/api/ar.js b/api/ar.js
index 07e8f1fd5..14274cf5e 100644
--- a/api/ar.js
+++ b/api/ar.js
@@ -47,18 +47,36 @@ border-radius:10px;padding:9px 14px;text-decoration:none;font-weight:600;font-si
<a href="https://three.ws">Create a 3D model</a></div></body></html>`;
}
-function launchPage({ target, asset, viewerUrl, title, irlUrl }) {
+function launchPage({ target, asset, viewerUrl, title, irlUrl, origin, pageUrl }) {
const t = title ? esc(title) : irlUrl ? '3D avatar' : '3D model';
+ // Share card: a real render of THIS model (GET /api/render/glb, CDN-cached a
+ // day), so a pasted AR link unfurls with the object itself, not a logo.
+ const ogImage = `${origin}/api/render/glb?glbUrl=${encodeURIComponent(asset)}&width=1200&height=630`;
+ const ogDesc = irlUrl
+ ? 'A living AI agent. Open on your phone to place it in your room, or bring it to life to walk and talk with it.'
+ : 'Open on your phone to place this 3D model in your room at real size. Made on three.ws: type a sentence, get a 3D model.';
return `<!doctype html><html lang="en"><head><meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover"/>
<title>View ${t} in AR · three.ws</title><meta name="robots" content="noindex"/>
+<meta property="og:type" content="website"/>
+<meta property="og:site_name" content="three.ws"/>
+<meta property="og:title" content="Place ${t} in your room"/>
+<meta property="og:description" content="${esc(ogDesc)}"/>
+<meta property="og:image" content="${esc(ogImage)}"/>
+<meta property="og:url" content="${esc(pageUrl)}"/>
+<meta name="twitter:card" content="summary_large_image"/>
+<meta name="twitter:title" content="Place ${t} in your room"/>
+<meta name="twitter:description" content="${esc(ogDesc)}"/>
+<meta name="twitter:image" content="${esc(ogImage)}"/>
<script src="/model-viewer-meshopt.js"></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/@google/[email protected]/dist/model-viewer.min.js"></script>
<style>:root{color-scheme:dark;--accent:#6ea8fe}*{box-sizing:border-box}html,body{margin:0;height:100%}
body{font-family:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;background:radial-gradient(130% 130% at 50% 0%,#14161c,#08090c);color:#e8eaf0;overflow:hidden}
.wrap{display:flex;flex-direction:column;height:100dvh}.stage{position:relative;flex:1 1 auto;min-height:0}
model-viewer{width:100%;height:100%;--progress-bar-color:var(--accent);background:transparent}
-.bar{display:flex;gap:10px;align-items:center;justify-content:center;padding:14px 16px;border-top:1px solid rgba(255,255,255,.07);background:rgba(10,11,14,.55);backdrop-filter:blur(8px)}
+.bar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:center;padding:14px 16px;border-top:1px solid rgba(255,255,255,.07);background:rgba(10,11,14,.55);backdrop-filter:blur(8px)}
+.name{position:absolute;top:14px;left:50%;transform:translateX(-50%);max-width:min(86vw,48ch);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#cdd3de;font-size:13px;font-weight:600;background:rgba(10,11,14,.5);border:1px solid rgba(255,255,255,.07);border-radius:999px;padding:6px 14px;backdrop-filter:blur(8px);pointer-events:none}
+.loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#9aa3b2;font-size:13px;pointer-events:none;transition:opacity .3s ease}
button.ar,a.ar{appearance:none;cursor:pointer;text-decoration:none;font-size:14px;font-weight:700;color:#0b0c10;background:var(--accent);border:0;border-radius:12px;padding:12px 20px;display:inline-flex;align-items:center;gap:8px}
button.ar:active{transform:translateY(1px)}button.ar:focus-visible{outline:2px solid #fff;outline-offset:2px}
.ghost{appearance:none;cursor:pointer;text-decoration:none;font-size:14px;font-weight:700;color:var(--accent);background:rgba(110,168,254,.14);border:1px solid rgba(110,168,254,.45);border-radius:12px;padding:11px 18px;display:inline-flex;align-items:center;gap:8px;transition:background .15s ease}
@@ -70,16 +88,20 @@ a.alt{color:#aeb6c4;font-size:12.5px;text-decoration:underline}</style></head>
environment-image="neutral" exposure="1.05" shadow-intensity="1" tone-mapping="aces"
ar ar-modes="webxr scene-viewer quick-look" ar-scale="auto" ${target === 'ios' ? 'reveal="auto"' : ''}>
</model-viewer>
+${title ? `<div class="name">${t}</div>` : ''}
+<div class="loading" id="loading">Loading your model…</div>
<div class="hint" id="hint">${irlUrl ? 'This is a living agent. Bring it to life to walk and talk with it in your room.' : 'Move your phone to place the model in your space.'}</div>
</div>
<div class="bar">
${irlUrl ? `<a class="ar" href="${esc(irlUrl)}" aria-label="Bring this avatar to life in your room: it moves and talks through your camera">🤖 Bring it to life</a>\n<button class="ghost" id="ar-btn" type="button" aria-label="Place a static copy of this avatar in augmented reality">📱 Place in your space</button>` : `<button class="ar" id="ar-btn" type="button" aria-label="View this model in augmented reality">📱 View in your space</button>`}
<a class="alt" href="${esc(viewerUrl)}">Open in 3D viewer</a>
+<a class="alt" href="/ar" aria-label="Create your own 3D model from a sentence, free">Create your own</a>
</div></div>
<script>
-(function(){var mv=document.getElementById('mv'),btn=document.getElementById('ar-btn'),hint=document.getElementById('hint'),live=${irlUrl ? 'true' : 'false'};
-function sync(){ if(!mv.canActivateAR){ btn.textContent='View in 3D'; if(!live){ hint.style.display='none'; } } }
+(function(){var mv=document.getElementById('mv'),btn=document.getElementById('ar-btn'),hint=document.getElementById('hint'),loading=document.getElementById('loading'),live=${irlUrl ? 'true' : 'false'};
+function sync(){ loading.style.opacity='0'; if(!mv.canActivateAR){ btn.textContent='View in 3D'; if(!live){ hint.style.display='none'; } } }
mv.addEventListener('load',sync);
+mv.addEventListener('error',function(){ loading.textContent='This model could not load. Try the 3D viewer below.'; });
btn.addEventListener('click',function(){ if(mv.canActivateAR){ try{mv.activateAR();}catch(e){} } else { window.location.href='${esc(viewerUrl)}'; } });
})();
</script></body></html>`;
@@ -121,5 +143,16 @@ export default wrap(async (req, res) => {
// browser cache (one UA per browser) and stops the cross-device bleed.
res.setHeader('vary', 'user-agent');
res.setHeader('cache-control', 'public, max-age=60, s-maxage=600');
- res.end(launchPage({ target: plan.target, asset: plan.asset, viewerUrl: plan.viewerUrl, title, irlUrl: plan.irlUrl }));
+ const origin = originFrom(req);
+ res.end(
+ launchPage({
+ target: plan.target,
+ asset: plan.asset,
+ viewerUrl: plan.viewerUrl,
+ title,
+ irlUrl: plan.irlUrl,
+ origin,
+ pageUrl: `${origin}${req.url}`,
+ }),
+ );
});
diff --git a/api/render/glb.js b/api/render/glb.js
index b2f1e60aa..14aed1f1c 100644
--- a/api/render/glb.js
+++ b/api/render/glb.js
@@ -10,6 +10,13 @@
// background: "#0a0a0a" | "transparent" // default #0a0a0a
// }
//
+// GET /api/render/glb?glbUrl=…&width=…&height=…&background=… — the same
+// render addressable by URL, for consumers that can only follow a link:
+// og:image / twitter:image unfurls (the AR launch page points its share
+// card here), <img> tags, markdown embeds. Identical validation, limits,
+// and rate budget as POST; responses CDN-cache for a day, so social
+// crawlers hit chromium once per model, not once per share.
+//
// Response: image/png bytes on success; JSON error otherwise.
//
// Safety:
@@ -47,8 +54,8 @@ function rateCheck(ip) {
}
export default wrap(async function handler(req, res) {
- if (cors(req, res, { methods: 'POST,OPTIONS' })) return;
- if (!method(req, res, ['POST'])) return;
+ if (cors(req, res, { methods: 'GET,POST,OPTIONS' })) return;
+ if (!method(req, res, ['GET', 'POST'])) return;
const ip = clientIp(req);
const rl = rateCheck(ip);
@@ -56,11 +63,22 @@ export default wrap(async function handler(req, res) {
return rateLimited(res, rl, `Too many render requests. Limit: ${RATE_LIMIT_MAX} per ${RATE_LIMIT_WINDOW_MS / 60000}m.`);
}
+ // GET carries the same fields as query params; POST keeps the JSON body.
let body;
- try {
- body = await readJson(req, 5000);
- } catch (e) {
- return error(res, e.status || 400, 'bad_request', e.message);
+ if (req.method === 'GET') {
+ const q = new URL(req.url, 'http://x').searchParams;
+ body = {
+ glbUrl: q.get('glbUrl') || q.get('src') || '',
+ width: q.get('width'),
+ height: q.get('height'),
+ background: q.get('background') || undefined,
+ };
+ } else {
+ try {
+ body = await readJson(req, 5000);
+ } catch (e) {
+ return error(res, e.status || 400, 'bad_request', e.message);
+ }
}
const glbUrl = typeof body.glbUrl === 'string' ? body.glbUrl.trim() : '';
diff --git a/data/changelog.json b/data/changelog.json
index c3bc8b58e..6693b0f77 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -1,6 +1,15 @@
{
"$comment": "Curated changelog entries for three.ws — the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.",
"entries": [
+ {
+ "date": "2026-07-15",
+ "title": "Shared AR links now unfurl with the model itself",
+ "summary": "Paste a place-in-your-room link into a chat and it now shows a real rendered picture of that exact model instead of a bare URL. The AR page also shows the model's name, a proper loading state, and a Create your own link, so a friend who receives a model can make one of their own in a tap. Behind it, the public model renderer gained a URL form: point any image tag at /api/render/glb with a public GLB link and get a PNG back.",
+ "tags": [
+ "improvement"
+ ],
+ "link": "/ar"
+ },
{
"date": "2026-07-15",
"title": "AR avatars now come alive in your room",
diff --git a/docs/api-reference.md b/docs/api-reference.md
index 41af9f80e..5a508df1d 100644
--- a/docs/api-reference.md
+++ b/docs/api-reference.md
@@ -792,6 +792,44 @@ labeled with the prompt.
| `502` | `generation_failed` | The lane could not start the job; retry is free |
| `503` | `not_configured` / `lane_timeout`| Lane unavailable on this deployment, or slow to accept; retry later |
+### AR launch — `GET /api/ar`
+
+```
+GET /api/ar?src=<glbUrl>&title=<label>&kind=<avatar?>
+```
+
+Public, keyless. The device-aware place-in-your-room lane behind every `arUrl`
+the 3D endpoints return, and the same one the `/forge` and `/ar` pages use:
+
+- **Android** → `302` straight into Google Scene Viewer (ARCore `intent://`
+ URL with the GLB as the source and a browser fallback).
+- **iOS** → an HTML launch page; "View in your space" enters Apple Quick Look
+ (the GLB converts to USDZ in-page via the three.js `USDZExporter`).
+- **Desktop** → the same page, falling back to the interactive WebGL viewer.
+
+`src` must be a public `https` GLB/glTF URL; `title` (optional, ≤120 chars)
+labels the page; `kind=avatar` marks a rigged agent body and adds the
+"Bring it to life" handoff into `/irl` (camera passthrough, animation, and
+conversation in the user's room). Bad input returns a designed error page,
+never a crash. Pasting an `/api/ar` link into a chat app unfurls as a share
+card whose image is a real render of that exact model (see the renderer
+below).
+
+### Model renderer — `GET|POST /api/render/glb`
+
+```
+GET /api/render/glb?glbUrl=<url>&width=1200&height=630&background=%230a0a0a
+POST /api/render/glb { "glbUrl": "...", "width": 1024, "height": 1024, "background": "#0a0a0a" }
+```
+
+Public renderer: any public GLB URL in, a PNG out (headless chromium +
+`<model-viewer>`, the same pipeline the OG cards use). The GET form makes a
+render URL-addressable for `og:image` unfurls, `<img>` tags, and markdown
+embeds; responses CDN-cache for a day so crawlers hit chromium once per
+model. Dimensions clamp to 64-2048; GLBs over 10 MB are rejected before the
+browser boots; only public http(s) sources are fetched (SSRF-guarded);
+60 renders / 10 min / IP.
+
---
## Material Studio API
diff --git a/public/changelog.json b/public/changelog.json
index 58c8f4138..356bb221f 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-15T06:59:36.071Z",
+ "generated_at": "2026-07-15T10:05:51.944Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -17,6 +17,16 @@
"improvement"
]
},
+ {
+ "date": "2026-07-15",
+ "type": "update",
+ "title": "Shared AR links now unfurl with the model itself",
+ "summary": "Paste a place-in-your-room link into a chat and it now shows a real rendered picture of that exact model instead of a bare URL. The AR page also shows the model's name, a proper loading state, and a Create your own link, so a friend who receives a model can make one of their own in a tap. Behind it, the public model renderer gained a URL form: point any image tag at /api/render/glb with a public GLB link and get a PNG back.",
+ "link": "/ar",
+ "tags": [
+ "improvement"
+ ]
+ },
{
"date": "2026-07-14",
"type": "launch",
diff --git a/public/changelog.xml b/public/changelog.xml
index ce7e57f4f..10d0e3c9b 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -14,6 +14,14 @@
<category>feature</category>
<description>Avatars no longer land in AR as frozen statues. Every rigged avatar generated on three.ws now carries a Bring it to life link that opens IRL: the agent walks, animates, and talks with you through your camera, standing in your real space. Static placement is still one tap away for props or anyone who just wants the model on a desk. The living link ships everywhere avatars are made: the AR launch page, the 3D Studio tools in ChatGPT and Claude, and the developer MCP tools.</description>
</item>
+ <item>
+ <title>Shared AR links now unfurl with the model itself</title>
+ <link>https://three.ws/ar</link>
+ <guid isPermaLink="false">2026-07-15:Shared AR links now unfurl with the model itself</guid>
+ <pubDate>Wed, 15 Jul 2026 12:00:00 GMT</pubDate>
+ <category>improvement</category>
+ <description>Paste a place-in-your-room link into a chat and it now shows a real rendered picture of that exact model instead of a bare URL. The AR page also shows the model's name, a proper loading state, and a Create your own link, so a friend who receives a model can make one of their own in a tap. Behind it, the public model renderer gained a URL form: point any image tag at /api/render/glb with a public GLB link and get a PNG back.</description>
+ </item>
<item>
<title>AR Forge</title>
<link>https://three.ws/ar</link>
diff --git a/public/features.json b/public/features.json
index bb8b8131e..7a1636e17 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-15T06:59:36.059Z",
+ "generated_at": "2026-07-15T10:05:51.931Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/public/sitemap/index.html b/public/sitemap/index.html
index fa27fe52f..d155dd048 100644
--- a/public/sitemap/index.html
+++ b/public/sitemap/index.html
@@ -52,25 +52,6 @@
.sm-badge-auth { background: rgba(255, 200, 80, .15); color: #ffcf66; }
.sm-badge-internal { background: rgba(120,200,255,.12); color: #9ad4ff; }
</style>
-
- <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1">
- <meta property="og:type" content="website">
- <meta property="og:site_name" content="three.ws">
- <meta property="og:locale" content="en_US">
- <meta property="og:title" content="Sitemap · three.ws">
- <meta property="og:description" content="Human-readable index of every page on three.ws.">
- <meta property="og:url" content="https://three.ws/sitemap">
- <meta property="og:image" content="https://three.ws/api/page-og?s=main&amp;t=Sitemap&amp;d=Human-readable+index+of+every+page+on+three.ws.&amp;p=%2Fsitemap">
- <meta property="og:image:width" content="1200">
- <meta property="og:image:height" content="630">
- <meta property="og:image:type" content="image/png">
- <meta property="og:image:alt" content="Sitemap — three.ws">
- <meta name="twitter:card" content="summary_large_image">
- <meta name="twitter:site" content="@trythreews">
- <meta name="twitter:title" content="Sitemap · three.ws">
- <meta name="twitter:description" content="Human-readable index of every page on three.ws.">
- <meta name="twitter:image" content="https://three.ws/api/page-og?s=main&amp;t=Sitemap&amp;d=Human-readable+index+of+every+page+on+three.ws.&amp;p=%2Fsitemap">
- <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"Sitemap","description":"Human-readable index of every page on three.ws.","url":"https://three.ws/sitemap","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"},"primaryImageOfPage":"https://three.ws/api/page-og?s=main&t=Sitemap&d=Human-readable+index+of+every+page+on+three.ws.&p=%2Fsitemap"}]}</script>
</head>
<body>
<header><div id="nav-container"></div></header>
diff --git a/tests/ar-export.test.js b/tests/ar-export.test.js
index 39c2f54f1..d872e68f0 100644
--- a/tests/ar-export.test.js
+++ b/tests/ar-export.test.js
@@ -123,6 +123,68 @@ describe('GET /api/ar — response caching is UA-safe', () => {
expect(res.getHeader('location')).toContain('scene-viewer');
expect(res.getHeader('cache-control')).toBe('no-store');
});
+
+ it('the launch page unfurls as a share card: og/twitter meta with a real model render', async () => {
+ const { default: handler } = await import('../api/ar.js');
+ const res = makeRes();
+ await handler(makeReq(IOS), res);
+ const html = res._body;
+ expect(html).toContain('og:title');
+ expect(html).toContain('Place Robot in your room');
+ expect(html).toContain('summary_large_image');
+ // og:image is the GET renderer pointed at THIS model, sized for unfurls.
+ expect(html).toContain('/api/render/glb?glbUrl=' + encodeURIComponent(GLB));
+ expect(html).toContain('width=1200&amp;height=630');
+ });
+
+ it('the launch page shows the model name and invites the viewer to create their own', async () => {
+ const { default: handler } = await import('../api/ar.js');
+ const res = makeRes();
+ await handler(makeReq(DESKTOP), res);
+ const html = res._body;
+ expect(html).toContain('class="name">Robot<');
+ expect(html).toContain('Create your own');
+ expect(html).toContain('Loading your model');
+ });
+});
+
+describe('GET /api/render/glb — URL-addressable render (share cards)', () => {
+ function makeReq(url) {
+ return { method: 'GET', url, headers: { host: 'three.ws' } };
+ }
+ function makeRes() {
+ return {
+ statusCode: 200,
+ _h: {},
+ writableEnded: false,
+ headersSent: false,
+ setHeader(k, v) {
+ this._h[k.toLowerCase()] = v;
+ },
+ getHeader(k) {
+ return this._h[k.toLowerCase()];
+ },
+ end(body) {
+ this._body = body;
+ this.writableEnded = true;
+ },
+ };
+ }
+
+ it('400s a GET without glbUrl (no chromium spin-up on junk)', async () => {
+ const { default: handler } = await import('../api/render/glb.js');
+ const res = makeRes();
+ await handler(makeReq('/api/render/glb'), res);
+ expect(res.statusCode).toBe(400);
+ expect(JSON.parse(res._body).error).toBe('bad_request');
+ });
+
+ it('400s a GET pointing at a private address (SSRF guard holds on the GET path)', async () => {
+ const { default: handler } = await import('../api/render/glb.js');
+ const res = makeRes();
+ await handler(makeReq('/api/render/glb?glbUrl=' + encodeURIComponent('https://10.0.0.8/a.glb')), res);
+ expect(res.statusCode).toBe(400);
+ });
});
describe('buildViewerUrl / buildArLaunchUrl', () => {