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(embed): remove xr-spatial-tracking from iframe allow attributes
nirholas4364873c32eb
diff --git a/public/embed.js b/public/embed.jsindex 2a4dc4d24..71280826e 100644--- a/public/embed.js+++ b/public/embed.js@@ -47,7 +47,7 @@iframe.src = src;iframe.title = 'three.ws widget ' + widgetId;iframe.loading = 'lazy';- iframe.allow = 'autoplay; xr-spatial-tracking; clipboard-write';+ iframe.allow = 'autoplay; clipboard-write';iframe.setAttribute('width', width);iframe.setAttribute('height', height);iframe.style.border = border + 'px solid transparent';diff --git a/public/studio/index.html b/public/studio/index.htmlindex fc9164048..16a204ce9 100644--- a/public/studio/index.html+++ b/public/studio/index.html@@ -63,7 +63,7 @@<iframeid="preview-iframe"title="Live widget preview"- allow="autoplay; xr-spatial-tracking"+ allow="autoplay"loading="eager"></iframe></div>@@ -221,7 +221,7 @@<iframeid="embed-preview-iframe"title="Embed preview"- allow="autoplay; xr-spatial-tracking"+ allow="autoplay"></iframe></div>diff --git a/rider/package-lock.json b/rider/package-lock.jsonindex 4bff278c8..9379164b4 100644--- a/rider/package-lock.json+++ b/rider/package-lock.json@@ -3483,7 +3483,7 @@},"node_modules/aframe/node_modules/debug": {"version": "2.2.0",- "resolved": "git+ssh://[email protected]/ngokevin/debug.git#ef5f8e66d49ce8bc64c6f282c15f8b7164409e3a",+ "resolved": "git+https://github.com/ngokevin/debug.git#ef5f8e66d49ce8bc64c6f282c15f8b7164409e3a","integrity": "sha512-rUI9wkpSlmwV2QQcE+jDnEdUPyRG+alTguuGlIJHW1PRMycHzpGy24htiAOiBdg6jYFXduQw4JuA1lvKh3DwzA==","license": "MIT"},@@ -6671,7 +6671,7 @@},"node_modules/document-register-element": {"version": "0.5.4",- "resolved": "git+ssh://[email protected]/dmarcos/document-register-element.git#8ccc532b7f3744be954574caf3072a5fd260ca90",+ "resolved": "git+https://github.com/dmarcos/document-register-element.git#8ccc532b7f3744be954574caf3072a5fd260ca90","integrity": "sha512-dwvGei9I/m1pYQ/9aNODyVmvSWBtlncfIROn5Sbi4MVnIcZKre5QaWx+AGLI/j6VH9sp8jwLyeuWP1micANT0g==","license": "MIT"},@@ -18880,7 +18880,7 @@},"node_modules/three": {"version": "0.90.0",- "resolved": "git+ssh://[email protected]/supermedium/three.js.git#5ef2887ab3621cae54fa129a500424d6caa25b62",+ "resolved": "git+https://github.com/supermedium/three.js.git#5ef2887ab3621cae54fa129a500424d6caa25b62","integrity": "sha512-I3qUdpDBTltVg6YXEZQeckf6GCq8u/6elelab9kfHzkloUzb9aexZyNVyselBejvSmqxq70VIJksRQgxGoeJ1Q==","license": "MIT"},@@ -20783,7 +20783,7 @@},"node_modules/zip-loader": {"version": "1.1.0",- "resolved": "git+ssh://[email protected]/ngokevin/ziploader.git#b50d8d21725ad0597e01f7e901bf0e92c73b26ae",+ "resolved": "git+https://github.com/ngokevin/ziploader.git#b50d8d21725ad0597e01f7e901bf0e92c73b26ae","integrity": "sha512-Xwdw2kBKxoQF9yCCB3ll0kuhWpzySaiVh2NSocDbY+aTnsJENKcDP4C6QR36q2O7o3V5QjRtpMtetFzSanwCCA==","license": "MIT","dependencies": {@@ -23123,7 +23123,7 @@},"dependencies": {"debug": {- "version": "git+ssh://[email protected]/ngokevin/debug.git#ef5f8e66d49ce8bc64c6f282c15f8b7164409e3a",+ "version": "git+https://github.com/ngokevin/debug.git#ef5f8e66d49ce8bc64c6f282c15f8b7164409e3a","integrity": "sha512-rUI9wkpSlmwV2QQcE+jDnEdUPyRG+alTguuGlIJHW1PRMycHzpGy24htiAOiBdg6jYFXduQw4JuA1lvKh3DwzA==","from": "debug@github:ngokevin/debug#noTimestamp"},@@ -26105,7 +26105,7 @@}},"document-register-element": {- "version": "git+ssh://[email protected]/dmarcos/document-register-element.git#8ccc532b7f3744be954574caf3072a5fd260ca90",+ "version": "git+https://github.com/dmarcos/document-register-element.git#8ccc532b7f3744be954574caf3072a5fd260ca90","integrity": "sha512-dwvGei9I/m1pYQ/9aNODyVmvSWBtlncfIROn5Sbi4MVnIcZKre5QaWx+AGLI/j6VH9sp8jwLyeuWP1micANT0g==","from": "document-register-element@github:dmarcos/document-register-element#8ccc532b7"},@@ -36207,7 +36207,7 @@"integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ="},"three": {- "version": "git+ssh://[email protected]/supermedium/three.js.git#5ef2887ab3621cae54fa129a500424d6caa25b62",+ "version": "git+https://github.com/supermedium/three.js.git#5ef2887ab3621cae54fa129a500424d6caa25b62","integrity": "sha512-I3qUdpDBTltVg6YXEZQeckf6GCq8u/6elelab9kfHzkloUzb9aexZyNVyselBejvSmqxq70VIJksRQgxGoeJ1Q==","from": "three@github:supermedium/three.js#r90fixMTLLoader"},@@ -37733,7 +37733,7 @@"integrity": "sha1-AI4G2AlDIMNy28L47XagymyKxBk="},"zip-loader": {- "version": "git+ssh://[email protected]/ngokevin/ziploader.git#b50d8d21725ad0597e01f7e901bf0e92c73b26ae",+ "version": "git+https://github.com/ngokevin/ziploader.git#b50d8d21725ad0597e01f7e901bf0e92c73b26ae","integrity": "sha512-Xwdw2kBKxoQF9yCCB3ll0kuhWpzySaiVh2NSocDbY+aTnsJENKcDP4C6QR36q2O7o3V5QjRtpMtetFzSanwCCA==","from": "zip-loader@github:ngokevin/ziploader#xhrdist","requires": {diff --git a/rider/src/components/agent-picker.js b/rider/src/components/agent-picker.jsindex 3fe26767a..63e0f5e1b 100644--- a/rider/src/components/agent-picker.js+++ b/rider/src/components/agent-picker.js@@ -7,10 +7,8 @@// { type: 'rider:setAgent', agentId: 'cz' }// { type: 'rider:setAgent', url: 'https://.../foo.glb', name: 'Foo' }-// Goes through webpack-dev-server proxy → three.ws to dodge CORS on-// non-whitelisted origins (e.g. Codespaces forwarded URLs).-const API_ORIGIN = '';-const EXPLORE_PATH = '/threews-api/explore';+// Always call three.ws directly — explore API allows all origins.+const EXPLORE_URL = 'https://three.ws/api/explore';const FALLBACK_AGENTS = [{ id: 'cz', name: 'CZ', url: 'https://raw.githubusercontent.com/overstepping/-/main/cz.glb' }];@@ -37,7 +35,7 @@ AFRAME.registerSystem('agent-picker', {},fetchPublicAvatars: function (query = '') {- const url = new URL(EXPLORE_PATH, window.location.origin);+ const url = new URL(EXPLORE_URL);url.searchParams.set('only3d', '1');url.searchParams.set('limit', '40');if (query) url.searchParams.set('q', query);@@ -214,8 +212,10 @@ function escapeHtml (s) {return String(s).replace(/[&<>"']/g, c => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));}-// R2 public bucket sends no CORS headers, so three.js can't fetch GLBs-// cross-origin. Route them through the dev-server proxy.+// In dev (non-production hosts) R2 lacks CORS for the forwarded origin,+// so route through the webpack-dev-server proxy. On three.ws the R2+// bucket allows the production origin directly.function rewriteGlbUrl (url) {+ if (window.location.hostname === 'three.ws') return url;return url.replace(/^https:\/\/pub-2534e921bf9c4314addcd4d8a6e98b7b\.r2\.dev/, '/r2-proxy');}diff --git a/rider/webpack.config.js b/rider/webpack.config.jsindex a6eb7342c..81e138480 100644--- a/rider/webpack.config.js+++ b/rider/webpack.config.js@@ -1,4 +1,3 @@-var fs = require('fs');var ip = require('ip');var path = require('path');var webpack = require('webpack');@@ -26,12 +25,6 @@ module.exports = {? `${process.env.CODESPACE_NAME}-3000.${process.env.GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN || 'app.github.dev'}`: undefined,proxy: {- '/threews-api': {- target: 'https://three.ws',- changeOrigin: true,- secure: true,- pathRewrite: { '^/threews-api': '/api' }- },'/r2-proxy': {target: 'https://pub-2534e921bf9c4314addcd4d8a6e98b7b.r2.dev',changeOrigin: true,