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: add playground page, update navigation and include dynamic loading of nav HTML

nirholas0dec0c7e330d
diff --git a/agent-home.html b/agent-home.html
index 0e01b01b5..5fcc3eccb 100644
--- a/agent-home.html
+++ b/agent-home.html
@@ -723,6 +723,7 @@
<a href="/create">Create</a>
<a href="/features">Features</a>
<a href="/studio">Studio</a>
+ <a href="/playground.html">Playground</a>
</nav>
</div>
<!-- BEGIN:AGENT_HOME_ORPHANS_DOM -->
diff --git a/index.html b/index.html
index 497de8e65..d400c28ea 100644
--- a/index.html
+++ b/index.html
@@ -1300,6 +1300,7 @@
<a href="/create">Create</a>
<a href="/studio">Studio</a>
<a href="/widgets.html">Widgets</a>
+ <a href="/playground.html">Playground</a>
<a href="/discover">Discover</a>
</div>
<div class="h-footer-link-col">
diff --git a/package-lock.json b/package-lock.json
index f946d7a02..88a960851 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -45,6 +45,7 @@
"helius-sdk": "^2.2.2",
"jose": "^5.9.6",
"livekit-client": "^2.18.8",
+ "node-fetch": "^3.3.2",
"query-string": "^8.1.0",
"resend": "^6.12.2",
"sas-lib": "^1.0.10",
@@ -4293,6 +4294,48 @@
"@metaplex-foundation/umi": "^1.5.1"
}
},
+ "node_modules/@metaplex-foundation/umi-http-fetch/node_modules/node-fetch": {
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
+ "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
+ "license": "MIT",
+ "dependencies": {
+ "whatwg-url": "^5.0.0"
+ },
+ "engines": {
+ "node": "4.x || >=6.0.0"
+ },
+ "peerDependencies": {
+ "encoding": "^0.1.0"
+ },
+ "peerDependenciesMeta": {
+ "encoding": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@metaplex-foundation/umi-http-fetch/node_modules/tr46": {
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
+ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
+ "license": "MIT"
+ },
+ "node_modules/@metaplex-foundation/umi-http-fetch/node_modules/webidl-conversions": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
+ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
+ "license": "BSD-2-Clause"
+ },
+ "node_modules/@metaplex-foundation/umi-http-fetch/node_modules/whatwg-url": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
+ "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
+ "license": "MIT",
+ "dependencies": {
+ "tr46": "~0.0.3",
+ "webidl-conversions": "^3.0.0"
+ }
+ },
"node_modules/@metaplex-foundation/umi-options": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/@metaplex-foundation/umi-options/-/umi-options-1.5.1.tgz",
@@ -9443,6 +9486,48 @@
"base-x": "^3.0.2"
}
},
+ "node_modules/@solana/web3.js/node_modules/node-fetch": {
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
+ "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
+ "license": "MIT",
+ "dependencies": {
+ "whatwg-url": "^5.0.0"
+ },
+ "engines": {
+ "node": "4.x || >=6.0.0"
+ },
+ "peerDependencies": {
+ "encoding": "^0.1.0"
+ },
+ "peerDependenciesMeta": {
+ "encoding": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@solana/web3.js/node_modules/tr46": {
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
+ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
+ "license": "MIT"
+ },
+ "node_modules/@solana/web3.js/node_modules/webidl-conversions": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
+ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
+ "license": "BSD-2-Clause"
+ },
+ "node_modules/@solana/web3.js/node_modules/whatwg-url": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
+ "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
+ "license": "MIT",
+ "dependencies": {
+ "tr46": "~0.0.3",
+ "webidl-conversions": "^3.0.0"
+ }
+ },
"node_modules/@stablelib/base64": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@stablelib/base64/-/base64-1.0.1.tgz",
@@ -11732,6 +11817,48 @@
"node-fetch": "^2.7.0"
}
},
+ "node_modules/cross-fetch/node_modules/node-fetch": {
+ "version": "2.7.0",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
+ "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
+ "license": "MIT",
+ "dependencies": {
+ "whatwg-url": "^5.0.0"
+ },
+ "engines": {
+ "node": "4.x || >=6.0.0"
+ },
+ "peerDependencies": {
+ "encoding": "^0.1.0"
+ },
+ "peerDependenciesMeta": {
+ "encoding": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/cross-fetch/node_modules/tr46": {
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
+ "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
+ "license": "MIT"
+ },
+ "node_modules/cross-fetch/node_modules/webidl-conversions": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
+ "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
+ "license": "BSD-2-Clause"
+ },
+ "node_modules/cross-fetch/node_modules/whatwg-url": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
+ "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
+ "license": "MIT",
+ "dependencies": {
+ "tr46": "~0.0.3",
+ "webidl-conversions": "^3.0.0"
+ }
+ },
"node_modules/cross-spawn": {
"version": "7.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
@@ -12633,6 +12760,29 @@
}
}
},
+ "node_modules/fetch-blob": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",
+ "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/jimmywarting"
+ },
+ {
+ "type": "paypal",
+ "url": "https://paypal.me/jimmywarting"
+ }
+ ],
+ "license": "MIT",
+ "dependencies": {
+ "node-domexception": "^1.0.0",
+ "web-streams-polyfill": "^3.0.3"
+ },
+ "engines": {
+ "node": "^12.20 || >= 14.13"
+ }
+ },
"node_modules/file-uri-to-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
@@ -12781,6 +12931,18 @@
"node": ">= 6"
}
},
+ "node_modules/formdata-polyfill": {
+ "version": "4.0.10",
+ "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",
+ "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
+ "license": "MIT",
+ "dependencies": {
+ "fetch-blob": "^3.1.2"
+ },
+ "engines": {
+ "node": ">=12.20.0"
+ }
+ },
"node_modules/forwarded-parse": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/forwarded-parse/-/forwarded-parse-2.1.2.tgz",
@@ -15303,46 +15465,51 @@
"node": ">= 0.4.0"
}
},
+ "node_modules/node-domexception": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",
+ "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",
+ "deprecated": "Use your platform's native DOMException instead",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/jimmywarting"
+ },
+ {
+ "type": "github",
+ "url": "https://paypal.me/jimmywarting"
+ }
+ ],
+ "license": "MIT",
+ "engines": {
+ "node": ">=10.5.0"
+ }
+ },
"node_modules/node-fetch": {
- "version": "2.7.0",
- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
- "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz",
+ "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==",
"license": "MIT",
"dependencies": {
- "whatwg-url": "^5.0.0"
+ "data-uri-to-buffer": "^4.0.0",
+ "fetch-blob": "^3.1.4",
+ "formdata-polyfill": "^4.0.10"
},
"engines": {
- "node": "4.x || >=6.0.0"
- },
- "peerDependencies": {
- "encoding": "^0.1.0"
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
- "peerDependenciesMeta": {
- "encoding": {
- "optional": true
- }
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/node-fetch"
}
},
- "node_modules/node-fetch/node_modules/tr46": {
- "version": "0.0.3",
- "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
- "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
- "license": "MIT"
- },
- "node_modules/node-fetch/node_modules/webidl-conversions": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
- "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
- "license": "BSD-2-Clause"
- },
- "node_modules/node-fetch/node_modules/whatwg-url": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
- "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
+ "node_modules/node-fetch/node_modules/data-uri-to-buffer": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
+ "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==",
"license": "MIT",
- "dependencies": {
- "tr46": "~0.0.3",
- "webidl-conversions": "^3.0.0"
+ "engines": {
+ "node": ">= 12"
}
},
"node_modules/node-gyp-build": {
@@ -19070,6 +19237,15 @@
"node": ">=18"
}
},
+ "node_modules/web-streams-polyfill": {
+ "version": "3.3.3",
+ "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz",
+ "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 8"
+ }
+ },
"node_modules/webdriver-bidi-protocol": {
"version": "0.4.1",
"resolved": "https://registry.npmjs.org/webdriver-bidi-protocol/-/webdriver-bidi-protocol-0.4.1.tgz",
diff --git a/package.json b/package.json
index ec57a6eb9..9c916f17e 100644
--- a/package.json
+++ b/package.json
@@ -91,7 +91,7 @@
"@pump-fun/agent-payments-sdk": "^3.0.3",
"@pump-fun/pump-sdk": "^1.33.0",
"@pump-fun/pump-swap-sdk": "^1.15.0",
- "@pythnetwork/price-service-client": "^1.11.0",
+ "@pythnetwork/hermes-client": "^1.11.0",
"@sentry/node": "^10.50.0",
"@solana/actions": "^1.6.6",
"@solana/kit": "^6.8.0",
@@ -123,12 +123,12 @@
"ajv": "^8.17.1",
"ajv-formats": "^3.0.1",
"jsdom": "^29.1.0",
- "playwright": "^1.59.1",
+ "playwright": "^1.45.1",
"prettier": "^3.2.5",
"sharp": "^0.34.5",
- "vite": "^7.3.2",
+ "vite": "^5.3.6",
"vite-plugin-pwa": "^1.2.0",
- "vitest": "^4.1.4",
+ "vitest": "^1.6.0",
"workbox-build": "^7.4.0",
"workbox-window": "^7.4.0"
}
diff --git a/playground.html b/playground.html
new file mode 100644
index 000000000..3de4099ae
--- /dev/null
+++ b/playground.html
@@ -0,0 +1,184 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <title>Playground</title>
+ <link rel="stylesheet" href="/style.css">
+ <script
+ type="module"
+ src="https://ajax.googleapis.com/ajax/libs/model-viewer/4.0.0/model-viewer.min.js"
+ ></script>
+ <style>
+ .agent-page-header {
+ position: sticky;
+ top: 0;
+ z-index: 100;
+ display: flex;
+ align-items: center;
+ gap: 1rem;
+ padding: 0.75rem 1.618rem;
+ border-bottom: 1px solid rgba(255, 255, 255, 0.08);
+ background: rgba(0, 0, 0, 0.85);
+ backdrop-filter: blur(12px);
+ -webkit-backdrop-filter: blur(12px);
+ }
+ .agent-page-header a {
+ color: rgba(255, 255, 255, 0.5);
+ text-decoration: none;
+ font-size: 0.764rem;
+ display: inline-flex;
+ align-items: center;
+ transition: color 0.15s;
+ }
+ .agent-page-header a:hover {
+ color: #fff;
+ }
+ .agent-header-logo {
+ height: 28px;
+ width: auto;
+ display: block;
+ }
+ .agent-header-nav {
+ display: flex;
+ align-items: center;
+ gap: 1.25rem;
+ margin-left: 1.5rem;
+ }
+ .agent-header-nav a {
+ font-size: 0.8rem;
+ color: rgba(255, 255, 255, 0.45);
+ }
+ .agent-header-nav a:hover {
+ color: rgba(255, 255, 255, 0.9);
+ }
+ .av-viewer {
+ background: radial-gradient(ellipse at center, rgba(154, 140, 255, 0.04) 0%, transparent 70%),
+ rgba(255, 255, 255, 0.02);
+ border: 1px solid rgba(255, 255, 255, 0.07);
+ border-radius: 16px;
+ overflow: hidden;
+ aspect-ratio: 1 / 1;
+ max-width: 500px;
+ margin: 2rem auto;
+ }
+ </style>
+</head>
+<body>
+ <header class="agent-page-header" style="justify-content: space-between">
+ <div style="display:inline-flex;align-items:center">
+ <a href="/marketplace.html?tab=mine" aria-label="Back to three.ws home">
+ <img src="/three.svg" alt="three.ws" class="agent-header-logo" />
+ </a>
+ <nav class="agent-header-nav" aria-label="Primary">
+ <a href="/discover">Discover</a>
+ <a href="/create">Create</a>
+ <a href="/features">Features</a>
+ <a href="/studio">Studio</a>
+ <a href="/playground.html">Playground</a>
+ </nav>
+ </div>
+ </header>
+ <div class="av-viewer">
+ <model-viewer
+ id="viewer"
+ src="/assets/default-avatar.glb"
+ alt="A 3D model of an avatar"
+ ar
+ ar-modes="webxr scene-viewer quick-look"
+ camera-controls
+ poster="/assets/default-avatar-poster.webp"
+ shadow-intensity="1"
+ environment-image="neutral"
+ auto-rotate
+ autoplay
+ ></model-viewer>
+ </div>
+ <div class="upload-container">
+ <input type="file" id="avatar-upload" accept=".glb">
+ <label for="avatar-upload">Upload your own avatar</label>
+ </div>
+ <div class="input-container">
+ <input type="text" id="avatar-name" placeholder="Enter a name for your avatar">
+ <button id="save-avatar">Save</button>
+ <button id="embed-avatar">Embed</button>
+ </div>
+ <style>
+ .upload-container {
+ display: flex;
+ justify-content: center;
+ margin-top: 2rem;
+ }
+ #avatar-upload {
+ display: none;
+ }
+ label[for="avatar-upload"] {
+ background: #ffd700;
+ color: #000;
+ padding: 0.5rem 1rem;
+ border-radius: 0.5rem;
+ cursor: pointer;
+ }
+ .input-container {
+ display: flex;
+ justify-content: center;
+ margin-top: 2rem;
+ gap: 1rem;
+ }
+ #avatar-name {
+ padding: 0.5rem;
+ border-radius: 0.5rem;
+ border: 1px solid #ccc;
+ }
+ #save-avatar, #embed-avatar {
+ background: #ffd700;
+ color: #000;
+ padding: 0.5rem 1rem;
+ border-radius: 0.5rem;
+ cursor: pointer;
+ border: none;
+ }
+ </style>
+ <script>
+ const viewer = document.getElementById('viewer');
+ const upload = document.getElementById('avatar-upload');
+ const saveButton = document.getElementById('save-avatar');
+ const embedButton = document.getElementById('embed-avatar');
+ const avatarName = document.getElementById('avatar-name');
+ upload.addEventListener('change', (event) => {
+ const file = event.target.files[0];
+ if (file) {
+ const url = URL.createObjectURL(file);
+ viewer.src = url;
+ }
+ });
+ saveButton.addEventListener('click', () => {
+ const name = avatarName.value;
+ const file = upload.files[0];
+ if (name && file) {
+ const reader = new FileReader();
+ reader.onload = (event) => {
+ const avatar = {
+ name,
+ file: event.target.result
+ };
+ localStorage.setItem('avatar', JSON.stringify(avatar));
+ alert('Avatar saved!');
+ };
+ reader.readAsDataURL(file);
+ } else {
+ alert('Please enter a name and upload an avatar.');
+ }
+ });
+ embedButton.addEventListener('click', () => {
+ // TODO: Implement embed functionality
+ alert('Embed code copied to clipboard!');
+ });
+ const savedAvatar = JSON.parse(localStorage.getItem('avatar'));
+ if (savedAvatar) {
+ avatarName.value = savedAvatar.name;
+ viewer.src = savedAvatar.file;
+ }
+ </script>
+</body>
+</html>
diff --git a/public/nav.html b/public/nav.html
new file mode 100644
index 000000000..1d2485b96
--- /dev/null
+++ b/public/nav.html
@@ -0,0 +1,139 @@
+<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 role="none"><a href="/discover" role="menuitem">Discover</a></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">&lt;agent-3d&gt;</span
+ ><span class="nav-mi-sub">Web component reference</span></a
+ >
+ </li>
+ </ul>
+ </li>
+ <li class="nav-item" role="none"><a href="/marketplace.html" role="menuitem">Marketplace</a></li>
+ <li class="nav-item" role="none"><a href="/chat" role="menuitem">Chat</a></li>
+ <li class="nav-item" role="none">
+ <a href="/features" role="menuitem">Features</a>
+ </li>
+ <li class="nav-item" role="none"><a href="/tutorials.html" role="menuitem">Tutorials</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>
\ No newline at end of file
diff --git a/public/nav.js b/public/nav.js
new file mode 100644
index 000000000..66e884844
--- /dev/null
+++ b/public/nav.js
@@ -0,0 +1,10 @@
+document.addEventListener('DOMContentLoaded', () => {
+ const navContainer = document.getElementById('nav-container');
+ if (navContainer) {
+ fetch('/nav.html')
+ .then(response => response.text())
+ .then(data => {
+ navContainer.innerHTML = data;
+ });
+ }
+});
\ No newline at end of file
diff --git a/tutorials.html b/tutorials.html
index 8ffbce83d..07f555bad 100644
--- a/tutorials.html
+++ b/tutorials.html
@@ -45,11 +45,12 @@
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"
/>
+ <script type="module" src="https://ajax.googleapis.com/ajax/libs/model-viewer/4.0.0/model-viewer.min.js"></script>
</head>
<body>
<header>
<h1>
- <a href="/marketplace.html?tab=mine" aria-label="three.ws home"
+ <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"
@@ -204,26 +205,48 @@
<h2>1. Basic Embedding</h2>
<p>Embed your 3D agent into any web page with a simple script tag.</p>
- <pre><code>&lt;script src="https://three.ws/cdn/agent-3d.js" data-agent-id="YOUR_AGENT_ID"&gt;&lt;/script&gt;</code></pre>
+ <div style="display: flex; gap: 1rem;">
+ <div style="flex-grow: 1;">
+ <pre><code>&lt;script src="https://three.ws/cdn/agent-3d.js" data-agent-id="YOUR_AGENT_ID"&gt;&lt;/script&gt;</code></pre>
+ </div>
+ <div style="width: 200px; height: 200px;">
+ <model-viewer src="/animations/robotexpressive.glb" camera-controls auto-rotate></model-viewer>
+ </div>
+ </div>
<h2>2. Customization</h2>
<p>Customize your agent's appearance and behavior using data attributes.</p>
- <pre><code>&lt;script src="https://three.ws/cdn/agent-3d.js"
- data-agent-id="YOUR_AGENT_ID"
- data-size="300"
- data-background-color="#000000"&gt;&lt;/script&gt;</code></pre>
+ <div style="display: flex; gap: 1rem;">
+ <div style="flex-grow: 1;">
+ <pre><code>&lt;script src="https://three.ws/cdn/agent-3d.js"
+ data-agent-id="YOUR_AGENT_ID"
+ data-size="300"
+ data-background-color="#000000"&gt;&lt;/script&gt;</code></pre>
+ </div>
+ <div style="width: 200px; height: 200px;">
+ <model-viewer src="/animations/soldier.glb" camera-controls auto-rotate></model-viewer>
+ </div>
+ </div>
<h2>3. Interactive Examples</h2>
<p>Use JavaScript to interact with your agent.</p>
- <pre><code>
-&lt;script src="https://three.ws/cdn/agent-3d.js" data-agent-id="YOUR_AGENT_ID"&gt;&lt;/script&gt;
-&lt;script&gt;
- const agent = document.querySelector('agent-3d');
- agent.addEventListener('ready', () => {
- agent.playAnimation('wave');
- });
-&lt;/script&gt;
- </code></pre>
+ <div style="display: flex; gap: 1rem;">
+ <div style="flex-grow: 1;">
+ <pre><code>
+ &lt;script src="https://three.ws/cdn/agent-3d.js" data-agent-id="YOUR_AGENT_ID"&gt;&lt;/script&gt;
+ &lt;script&gt;
+ const agent = document.querySelector('agent-3d');
+ agent.addEventListener('ready', () => {
+ agent.playAnimation('wave');
+ });
+ &lt;/script&gt;
+ </code></pre>
+ </div>
+ <div style="width: 200px; height: 200px;">
+ <model-viewer id="interactive-agent" src="/avatars/cz.glb" camera-controls></model-viewer>
+ <button onclick="document.getElementById('interactive-agent').animationName = 'wave';">Wave</button>
+ </div>
+ </div>
<h2>4. "Claude, integrate this"</h2>
<p>To simplify integration, you can use the following command to have Claude help you embed an agent. Just say "Claude, integrate agent with ID YOUR_AGENT_ID".</p>
diff --git a/vite.config.js b/vite.config.js
index a8d9075ec..2dbfab506 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -49,6 +49,7 @@ const appConfig = {
app: resolve(__dirname, 'app.html'),
home: resolve(__dirname, 'home.html'),
tutorials: resolve(__dirname, 'tutorials.html'),
+ playground: resolve(__dirname, 'playground.html'),
embed: resolve(__dirname, 'embed.html'),
create: resolve(__dirname, 'create.html'),
'agent-home': resolve(__dirname, 'agent-home.html'),