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
feat: remove 'Docs' link from navigation across multiple pages and add tutorials page
nirholas99167d753f71
diff --git a/api/rider/firebase.js b/api/rider/firebase.jsnew file mode 100644index 000000000..9322f382c--- /dev/null+++ b/api/rider/firebase.js@@ -0,0 +1,16 @@+import { cors, json, method, wrap } from '../_lib/http.js';+import { env } from '../_lib/env.js';++export default wrap(async (req, res) => {+ if (cors(req, res, { methods: 'GET,OPTIONS' })) return;+ if (!method(req, res, ['GET'])) return;++ return json(res, 200, {+ apiKey: env.RIDER_FIREBASE_API_KEY ?? null,+ authDomain: env.RIDER_FIREBASE_AUTH_DOMAIN ?? null,+ databaseURL: env.RIDER_FIREBASE_DATABASE_URL ?? null,+ projectId: env.RIDER_FIREBASE_PROJECT_ID ?? null,+ storageBucket: env.RIDER_FIREBASE_STORAGE_BUCKET ?? null,+ messagingSenderId: env.RIDER_FIREBASE_MESSAGING_SENDER_ID ?? null,+ });+});diff --git a/home.html b/home.htmlindex 0e0a7a027..69a6a830e 100644--- a/home.html+++ b/home.html@@ -216,7 +216,6 @@</ul></li><li class="nav-item" role="none"><a href="/chat" role="menuitem">Chat</a></li>- <li class="nav-item" role="none"><a href="/docs" role="menuitem">Docs</a></li><li class="nav-item" role="none"><a href="/features" role="menuitem">Features</a></li>diff --git a/public/docs-widgets.html b/public/docs-widgets.htmlindex ffbacbe6e..3004c5ba1 100644--- a/public/docs-widgets.html+++ b/public/docs-widgets.html@@ -224,7 +224,6 @@</li></ul></li>- <li class="nav-item" role="none"><a href="/docs" role="menuitem">Docs</a></li></ul></nav></header>diff --git a/public/features/index.html b/public/features/index.htmlindex 06b0e2fd9..a5567576c 100644--- a/public/features/index.html+++ b/public/features/index.html@@ -130,7 +130,6 @@</li></ul></li>- <li class="nav-item" role="none"><a href="/docs" role="menuitem">Docs</a></li></ul></nav></header>diff --git a/public/widgets-gallery/index.html b/public/widgets-gallery/index.htmlindex 627070775..42742a19f 100644--- a/public/widgets-gallery/index.html+++ b/public/widgets-gallery/index.html@@ -127,7 +127,6 @@</li></ul></li>- <li class="nav-item" role="none"><a href="/docs" role="menuitem">Docs</a></li></ul></nav></header>diff --git a/rider/src/components/leaderboard.js b/rider/src/components/leaderboard.jsindex bbedd1a55..7301ec945 100644--- a/rider/src/components/leaderboard.js+++ b/rider/src/components/leaderboard.js@@ -13,13 +13,6 @@ const ba = /(fuc)|(ass)|(nig)|(shit)|(retard)/gi;*/AFRAME.registerComponent('leaderboard', {schema: {- apiKey: {type: 'string'},- authDomain: {type: 'string'},- databaseURL: {type: 'string'},- projectId: {type: 'string'},- storageBucket: {type: 'string'},- messagingSenderId: {type: 'string'},-challengeId: {default: ''},difficulty: {default: ''},beatmapCharacteristic: { default: '' },@@ -41,6 +34,24 @@ AFRAME.registerComponent('leaderboard', {localStorage.setItem('threewsusername', this.username);});this.el.addEventListener('leaderboardsubmit', this.addScore.bind(this));++ this.initFirebase();+ },++ initFirebase: async function () {+ try {+ const response = await fetch('/api/rider/firebase');+ const firebaseConfig = await response.json();++ if (firebaseConfig.apiKey && !firebase.apps.length) {+ firebase.initializeApp(firebaseConfig);+ this.firestore = firebase.firestore();+ this.firestore.settings({});+ this.db = this.firestore.collection('scores');+ }+ } catch (e) {+ console.error('Error fetching Firebase config', e);+ }},update: function (oldData) {diff --git a/rider/src/components/multiplayer.js b/rider/src/components/multiplayer.jsindex 3130841e7..b09c4d138 100644--- a/rider/src/components/multiplayer.js+++ b/rider/src/components/multiplayer.js@@ -14,14 +14,7 @@ const SCORE_TICK_MS = 250;* Live state streams via per-player nodes; opponent HUD shows rank + delta.*/AFRAME.registerComponent('multiplayer', {- schema: {- apiKey: { type: 'string' },- authDomain: { type: 'string' },- databaseURL: { type: 'string' },- projectId: { type: 'string' },- storageBucket: { type: 'string' },- messagingSenderId: { type: 'string' }- },+ schema: {},init: function () {this.client = null;@@ -67,22 +60,25 @@ AFRAME.registerComponent('multiplayer', {}},- _ensureClient: function () {+ _ensureClient: async function () {if (this.client) return this.client;- if (!this.data.apiKey) {- console.error('[multiplayer] Missing Firebase config');++ try {+ const response = await fetch('/api/rider/firebase');+ const firebaseConfig = await response.json();++ if (firebaseConfig.apiKey) {+ this.client = new MultiplayerClient(firebaseConfig);+ this.client.onRoomUpdate(this.onRoomUpdate);+ return this.client;+ } else {+ console.error('[multiplayer] Missing Firebase config');+ return null;+ }+ } catch (e) {+ console.error('[multiplayer] Error fetching Firebase config', e);return null;}- this.client = new MultiplayerClient({- apiKey: this.data.apiKey,- authDomain: this.data.authDomain,- databaseURL: this.data.databaseURL,- projectId: this.data.projectId,- storageBucket: this.data.storageBucket,- messagingSenderId: this.data.messagingSenderId- });- this.client.onRoomUpdate(this.onRoomUpdate);- return this.client;},_name: function () {@@ -90,7 +86,7 @@ AFRAME.registerComponent('multiplayer', {},onCreate: async function () {- const c = this._ensureClient();+ const c = await this._ensureClient();if (!c) return;this.el.sceneEl.emit('mpconnecting', null, false);try {@@ -103,7 +99,7 @@ AFRAME.registerComponent('multiplayer', {},onJoin: async function (evt) {- const c = this._ensureClient();+ const c = await this._ensureClient();if (!c) return;const code = (evt.detail && evt.detail.code) || '';if (!code || code.length < 4) {diff --git a/rider/src/scene.html b/rider/src/scene.htmlindex 389f6ff54..7e086afcf 100644--- a/rider/src/scene.html+++ b/rider/src/scene.html@@ -1,9 +1,3 @@-<!-- https://freesound.org/people/deleted_user_2731495/sounds/183881/ -->-<audio id="introSong" src="assets/sounds/menu.ogg" loop></audio>--{% set firestore = true and 'threews-prod' or 'threews-dev' %}-{% set firekey = true and 'REDACTED_FIREBASE_KEY' or 'AIzaSyALCaDKg0b7aD3nOyRv_f5RTZ1vedrGyWw' %}-<a-scenebind__beat-generator="challengeId: challenge.id; difficulty: challenge.difficulty; beatmapCharacteristic: challenge.beatmapCharacteristic; gameMode: gameMode; has3DOFVR: has3DOFVR; hasSongLoadError: hasSongLoadError; isPlaying: isPlaying; isZipFetching: isZipFetching; menuSelectedChallengeId: menuSelectedChallenge.id; songDuration: challenge.metadata.duration; speed: speed"bind__beat-system="gameMode: gameMode; hasVR: hasVR; isLoading: isLoading; isPlaying: isPlaying"@@ -30,8 +24,8 @@{% if DEBUG_INSPECTOR %}inspector="url: http://localhost:3333/dist/aframe-inspector.js"{% endif %}- leaderboard="apiKey: {{ firekey }}; authDomain: {{ firestore }}.firebaseapp.com; databaseURL: https://{{ firestore }}.firebaseio.com; projectId: {{ firestore }}; storageBucket: {{ firestore }}.appspot.com; messagingSenderId: 172125624222"- multiplayer="apiKey: {{ firekey }}; authDomain: {{ firestore }}.firebaseapp.com; databaseURL: https://{{ firestore }}.firebaseio.com; projectId: {{ firestore }}; storageBucket: {{ firestore }}.appspot.com; messagingSenderId: 172125624222"+ leaderboard+ multiplayerloading-screen="backgroundColor: #000"pool__beat-arrow-blue="mixin: arrowBlueBeat; size: 30; container: #beatContainer; dynamic: true"pool__beat-arrow-red="mixin: arrowRedBeat; size: 30; container: #beatContainer; dynamic: true"diff --git a/tutorials.html b/tutorials.htmlnew file mode 100644index 000000000..ab522c11e--- /dev/null+++ b/tutorials.html@@ -0,0 +1,237 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="utf-8" />+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />+ <title>three.ws — Tutorials</title>+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />+ <meta name="author" content="nirholas" />+ <meta+ name="description"+ content="Tutorials for creating and using 3D agents."+ />+ <meta name="theme-color" content="#000000" />++ <meta property="og:type" content="website" />+ <meta property="og:site_name" content="three.ws" />+ <meta property="og:title" content="three.ws — Tutorials" />+ <meta+ property="og:description"+ content="Tutorials for creating and using 3D agents."+ />+ <meta property="og:url" content="https://three.ws/tutorials" />+ <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="three.ws — Tutorials" />+ <meta+ name="twitter:description"+ content="Tutorials for creating and using 3D agents."+ />+ <meta name="twitter:image" content="https://three.ws/og-image.png" />++ <link rel="canonical" href="https://three.ws/tutorials" />+ <link rel="shortcut icon" href="/favicon.ico" />+ <link rel="apple-touch-icon" href="/pwa-192x192.png" />+ <link rel="preconnect" href="https://fonts.googleapis.com" />+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />+ <link rel="stylesheet" href="/style.css" />+ <link rel="stylesheet" href="/home.css" />+ <link rel="stylesheet" href="/footer.css" />+ <script defer src="/footer-newsletter.js"></script>+ <link+ href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400&family=Space+Grotesk:wght@500;600;700&display=swap"+ rel="stylesheet"+ />+ </head>+ <body>+ <header>+ <h1>+ <a href="/" aria-label="three.ws home"+ ><img class="wordmark-logo" src="/three.svg" alt="" aria-hidden="true" /><span+ class="wordmark-dot"+ aria-hidden="true"+ ></span+ >three.ws</a+ >+ </h1>+ <nav class="home-nav" aria-label="Primary">+ <ul class="nav-root" role="menubar">+ <li class="nav-item nav-has-menu" role="none">+ <button+ type="button"+ class="nav-trigger"+ aria-haspopup="true"+ aria-expanded="false"+ role="menuitem"+ >+ Build<span class="nav-caret" aria-hidden="true">▾</span>+ </button>+ <ul class="nav-menu" role="menu" aria-label="Build">+ <li role="none">+ <a href="/create" role="menuitem"+ ><span class="nav-mi-title">Create agent</span+ ><span class="nav-mi-sub">Avatar + brain wizard</span></a+ >+ </li>+ <li role="none">+ <a href="/app" role="menuitem"+ ><span class="nav-mi-title">Viewer</span+ ><span class="nav-mi-sub">Drag-and-drop GLB</span></a+ >+ </li>+ <li role="none">+ <a href="/validation" role="menuitem"+ ><span class="nav-mi-title">glTF Validator</span+ ><span class="nav-mi-sub">Khronos spec check</span></a+ >+ </li>+ </ul>+ </li>+ <li class="nav-item nav-has-menu" role="none">+ <button+ type="button"+ class="nav-trigger"+ aria-haspopup="true"+ aria-expanded="false"+ role="menuitem"+ >+ Discover<span class="nav-caret" aria-hidden="true">▾</span>+ </button>+ <ul class="nav-menu" role="menu" aria-label="Discover">+ <li role="none">+ <a href="/discover" role="menuitem"+ ><span class="nav-mi-title">Agents</span+ ><span class="nav-mi-sub">Public directory</span></a+ >+ </li>+ <li role="none">+ <a href="/widgets" role="menuitem"+ ><span class="nav-mi-title">Widgets gallery</span+ ><span class="nav-mi-sub">Embeddable showcases</span></a+ >+ </li>+ <li role="none">+ <a href="/reputation" role="menuitem"+ ><span class="nav-mi-title">Reputation</span+ ><span class="nav-mi-sub">ERC-8004 registry</span></a+ >+ </li>+ </ul>+ </li>+ <li class="nav-item nav-has-menu" role="none">+ <button+ type="button"+ class="nav-trigger"+ aria-haspopup="true"+ aria-expanded="false"+ role="menuitem"+ >+ Solana<span class="nav-caret" aria-hidden="true">▾</span>+ </button>+ <ul class="nav-menu" role="menu" aria-label="Solana">+ <li role="none">+ <a href="/pumpfun" role="menuitem"+ ><span class="nav-mi-title">Pump.fun stream</span+ ><span class="nav-mi-sub">Mint agent tokens</span></a+ >+ </li>+ <li role="none">+ <a href="/vanity-wallet" role="menuitem"+ ><span class="nav-mi-title">Vanity wallet</span+ ><span class="nav-mi-sub">Grind a Solana address</span></a+ >+ </li>+ <li role="none">+ <a href="/strategy-lab" role="menuitem"+ ><span class="nav-mi-title">Strategy Lab</span+ ><span class="nav-mi-sub">DCA + subscriptions</span></a+ >+ </li>+ <li role="none">+ <a href="/pump-live.html" role="menuitem"+ ><span class="nav-mi-title">Live launches</span+ ><span class="nav-mi-sub">Real-time mint feed</span></a+ >+ </li>+ <li role="none">+ <a href="/pump-dashboard.html" role="menuitem"+ ><span class="nav-mi-title">Pump Dashboard</span+ ><span class="nav-mi-sub">Watches · scanner · quotes</span></a+ >+ </li>+ <li role="none">+ <a href="/docs#solana" role="menuitem"+ ><span class="nav-mi-title">Solana SDK</span+ ><span class="nav-mi-sub">Attestations + agent-kit</span></a+ >+ </li>+ </ul>+ </li>+ <li class="nav-item nav-has-menu" role="none">+ <button+ type="button"+ class="nav-trigger"+ aria-haspopup="true"+ aria-expanded="false"+ role="menuitem"+ >+ Embed<span class="nav-caret" aria-hidden="true">▾</span>+ </button>+ <ul class="nav-menu" role="menu" aria-label="Embed">+ <li role="none">+ <a href="/studio" role="menuitem"+ ><span class="nav-mi-title">Widget Studio</span+ ><span class="nav-mi-sub">Pick avatar → copy snippet</span></a+ >+ </li>+ <li role="none">+ <a href="/artifact" role="menuitem"+ ><span class="nav-mi-title">Artifact viewer</span+ ><span class="nav-mi-sub">Claude artifact bundle</span></a+ >+ </li>+ <li role="none">+ <a href="/docs#embedding" role="menuitem"+ ><span class="nav-mi-title">Embed docs</span+ ><span class="nav-mi-sub">iframe + oEmbed</span></a+ >+ </li>+ <li role="none">+ <a href="/docs#web-component" role="menuitem"+ ><span class="nav-mi-title"><agent-3d></span+ ><span class="nav-mi-sub">Web component reference</span></a+ >+ </li>+ </ul>+ </li>+ <li class="nav-item" role="none"><a href="/chat" role="menuitem">Chat</a></li>+ <li class="nav-item" role="none"><a href="/docs" role="menuitem">Docs</a></li>+ <li class="nav-item" role="none">+ <a href="/features" role="menuitem">Features</a>+ </li>+ <li class="nav-item" id="home-nav-my-agents-li" role="none" hidden>+ <a href="/my-agents" id="home-nav-my-agents" role="menuitem">My Agents</a>+ </li>+ <li class="nav-item" id="home-nav-user-li" role="none" hidden>+ <a href="/dashboard" id="home-nav-user" class="nav-user" role="menuitem"></a>+ </li>+ <li class="nav-item" role="none">+ <a href="/login" class="nav-cta" id="home-nav-cta" role="menuitem"+ >Get started</a+ >+ </li>+ </ul>+ </nav>+ </header>+ <main id="main-content">+ <section>+ <h1>Tutorials</h1>+ <p>Here you will find tutorials on how to create and use 3D agents.</p>+ <!-- Add tutorials here -->+ </section>+ </main>+ </body>+</html>