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
chore(branding): rebrand vendor surfaces to three.ws
nirholas61a2c4e48a77
diff --git a/README.md b/README.mdindex 7e0e88a17..e5005b29c 100644--- a/README.md+++ b/README.md@@ -119,10 +119,10 @@ The following environment variables are required. Copy `.env.example` to `.env.l| `JWT_SECRET` | Secret key for signing JWTs. || `ANTHROPIC_API_KEY` | API key for the Anthropic (Claude) LLM. || `OPENROUTER_API_KEY` | API key for the OpenRouter free model proxy. |-| `VITE_CHARACTER_STUDIO_URL` | Origin where the Character Studio avatar builder iframe is hosted. Defaults to `http://localhost:5173` in dev. |+| `VITE_CHARACTER_STUDIO_URL` | Origin where the three.ws Studio avatar-builder iframe is hosted. Defaults to `http://localhost:5173` in dev. || `VITE_PRIVY_APP_ID` | Privy app ID for client-side wallet authentication. || `PRIVY_APP_ID` | Privy app ID for server-side token verification. |-| `AVATURN_API_KEY` | API key for the Avaturn photo-to-avatar pipeline. |+| `AVATURN_API_KEY` | API key for the three.ws Selfie (photo-to-avatar) backend. || `AGENT_RELAYER_KEY` | Private key for the ERC-7710 delegation relayer. || `AGENT_RELAYER_ADDRESS` | Public address of the relayer. || `RPC_URL_<CHAINID>` | RPC URLs for different blockchain networks. |@@ -312,7 +312,7 @@ If you want to support the project — compute credits, grants, partnerships, or- OAuth 2.1 server (RFC 6749 + PKCE, RFC 7591 dynamic registration, RFC 7009 revocation, RFC 7662 introspection, RFC 8414 discovery)- Developer API keys with scope and expiry- MCP (Model Context Protocol) over HTTP with JSON-RPC 2.0 for tool-calling from external AI systems-- Avaturn (photo-to-avatar), Character Studio (in-browser builder), and Privy (embedded wallet) integrations+- three.ws Selfie (photo-to-avatar), three.ws Studio (in-browser builder), and Privy (embedded wallet) integrations- DCA strategy execution and on-chain subscription scheduling via cron jobs- OpenAPI 3.1 spec generated at `/openapi.json`@@ -354,7 +354,7 @@ three.ws is available on major cloud marketplaces and open to infrastructure par| Cloud | Status ||---|---|-| **Alibaba Cloud** | [View listing →](https://marketplace.alibabacloud.com/preview/sgcmfw00036800.html) |+| **Alibaba Cloud** | Live: [product listing →](https://marketplace.alibabacloud.com/products/56724001/sgcmfw00036800.html) · [storefront →](https://marketplace.alibabacloud.com/store/3247293.html) || **Google Cloud** | three.ws runs on WebGL, Vercel edge, and EVM — a natural fit for GCP's AI infrastructure, Vertex AI, and global CDN. Open to co-listing, credits, and joint GTM. |---@@ -1473,7 +1473,7 @@ WEB3_STORAGE_TOKEN=... # Fallback### Optional (Frontend, prefixed `VITE_`)```env-VITE_CHARACTER_STUDIO_URL=https://studio.three.ws # Avatar builder iframe origin+VITE_CHARACTER_STUDIO_URL=https://studio.three.ws # three.ws Studio iframe originVITE_PRIVY_APP_ID=...VITE_AVATURN_EDITOR_URL=https://editor.avaturn.me/VITE_AVATURN_DEVELOPER_ID=...diff --git a/agent-edit.html b/agent-edit.htmlindex f17fe3ec6..c5b0c87db 100644--- a/agent-edit.html+++ b/agent-edit.html@@ -1060,7 +1060,7 @@<button type="button" class="btn-reset-all" id="anims-save" disabled>Save selection</button></div><p class="note" style="font-size: 0.764rem; color: rgba(255,255,255,0.4); margin: 0 0 1rem;">- Pick which Mixamo clips this agent can play. They’re also available to skills via <code>playAnimation</code>.+ Pick which clips from the three.ws animation library this agent can play. They’re also available to skills via <code>playAnimation</code>.</p><div id="anims-picker-grid" class="anims-picker-grid"><div class="no-named-mats">Loading animations…</div>diff --git a/api/_lib/bake.js b/api/_lib/bake.jsindex d8b9b284a..6626d9c74 100644--- a/api/_lib/bake.js+++ b/api/_lib/bake.js@@ -7,10 +7,11 @@//// The output is a single glTF 2.0 binary — every viewer (three.js, model-viewer,// Babylon.js, Unreal/Unity importers) sees the fully dressed avatar with no-// special runtime code. Mirrors Ready Player Me's "baked URL" output model.+// special runtime code. three.ws serves the baked URL directly so consumers+// never have to know about the customization layer.//-// Bone name matching is tolerant of mixamorig:, CC_Base_, and rig_ prefixes so-// avatars from Mixamo / Character Creator / custom rigs all work.+// Bone-name matching tolerates the common `mixamorig:`, `CC_Base_`, and `rig_`+// prefixes so avatars produced by any upstream rigger work without rename.import { NodeIO } from '@gltf-transform/core';import { ALL_EXTENSIONS } from '@gltf-transform/extensions';diff --git a/api/_lib/migrations/2026-05-15-avatars-appearance.sql b/api/_lib/migrations/2026-05-15-avatars-appearance.sqlindex f51bc0faa..de1e32ea8 100644--- a/api/_lib/migrations/2026-05-15-avatars-appearance.sql+++ b/api/_lib/migrations/2026-05-15-avatars-appearance.sql@@ -6,8 +6,8 @@-- into the geometry (morphs applied, accessory meshes parented to the right bones,-- exported as a single GLB). Every viewer that loads the avatar — model-viewer on-- /avatars/:id, embed iframes, third-party 3D renderers — gets the dressed avatar--- without needing custom client code. This is the same architecture Ready Player Me--- uses (the avatar URL you get from their API is already baked).+-- without needing custom client code. The three.ws avatar URL is always+-- pre-dressed; clients never need to know about the customization layer.---- `appearance_hash` is the sha256 of the canonical appearance JSON the baked GLB-- was produced from. When `appearance_hash` doesn't match the current appearance'sdiff --git a/api/coin/[action].js b/api/coin/[action].jsindex cca1e8dcc..58a8a5050 100644--- a/api/coin/[action].js+++ b/api/coin/[action].js@@ -73,6 +73,7 @@ async function handleState(req, res) {const nextDrawAt = new Date(Math.ceil(nowMs / interval) * interval).toISOString();return json(res, 200, {+ platform: 'three.ws',mint: coin.mint,name: coin.name,symbol: coin.symbol,diff --git a/avatar-sdk/README.md b/avatar-sdk/README.mdindex 2597e5ac2..4014107b7 100644--- a/avatar-sdk/README.md+++ b/avatar-sdk/README.md@@ -1,12 +1,12 @@# @three-ws/avatar-3D avatar viewer, creator iframe, and emotion + lipsync runtime — a drop-in replacement for the Ready Player Me SDK now that RPM was acquired and is no longer accepting new accounts.+The official three.ws SDK for 3D avatars on the web. Drop-in replacement for the Ready Player Me SDK now that RPM was acquired and is no longer accepting new accounts.-Includes:+What ships in this package:-- **`<agent-3d>` web component** — declarative avatar viewer with built-in chat/voice loop, emotion morphs, audio-driven viseme lipsync, AR Quick Look (iOS) and WebXR (Android/Quest).-- **`AvatarCreator`** — programmatic iframe modal that wraps the [Character Studio](https://studio.three.ws) builder and the [Avaturn](https://avaturn.me) photo-to-avatar pipeline. Resolves with a GLB Blob.-- **`saveBlob()`** — uploads a freshly-created GLB to the hosted three.ws backend (R2 storage, auto-thumbnail, USDZ companion auto-generation).+- **`<agent-3d>` web component** — declarative avatar viewer with built-in chat / voice loop, emotion morphs, audio-driven viseme lipsync, AR Quick Look (iOS) and WebXR (Android / Quest).+- **`AvatarCreator`** — programmatic iframe modal that opens three.ws's avatar pipelines (in-browser builder + photo-to-avatar). Resolves with a GLB Blob.+- **`saveBlob()`** — uploads a freshly-created GLB to the hosted three.ws backend (R2 storage, auto-thumbnail, USDZ companion auto-generation, half-body variant for VR).## Install@@ -51,22 +51,22 @@ const creator = new AvatarCreator({creator.open();```-If you have a previously created avatar and want to re-open it for editing, first call your backend's `/api/avatars/:id/session` (which POSTs to Avaturn under the hood) and pass `avaturnSessionUrl` to the constructor.+To re-open a previously created avatar for editing, first call your backend's `/api/avatars/:id/session` (three.ws issues an edit-mode session URL) and pass it as `avaturnSessionUrl` to the constructor.## What this gives you that Ready Player Me did-| RPM feature | `@three-ws/avatar` equivalent |+| RPM feature | three.ws equivalent ||---|---|-| Photo → 3D avatar | `AvatarCreator` → Avaturn pipeline |-| In-browser avatar editor | `AvatarCreator` → [Character Studio](https://studio.three.ws) |-| Hosted CDN | three.ws R2 + presigned uploads (free public tier) |+| Photo → 3D avatar | three.ws Selfie pipeline |+| In-browser avatar editor | three.ws Studio at [studio.three.ws](https://studio.three.ws) |+| Hosted CDN | three.ws-managed R2 + presigned uploads (free public tier) || ARKit `viseme_*` morphs | Loaded automatically into the runtime || Mixamo-compatible humanoid rig | Yes — same skeleton naming conventions || Animation library | 50+ Mixamo clips bundled (idle, wave, nod, dance, …) |-| iOS Quick Look USDZ | Auto-generated server-side on first upload |-| Half-body variant | Auto-generated for VR seats |+| iOS Quick Look USDZ | Auto-generated on first upload — no external converter |+| Half-body variant | Auto-generated for VR seats; runtime collapse also supported || Web component embed | `<agent-3d>` |-| React component | `<agent-3d>` (works in React 18+ via the JSX intrinsic) |+| React component | `<agent-3d>` works in React 18+ via the JSX intrinsic |## Licensediff --git a/avatar-sdk/package.json b/avatar-sdk/package.jsonindex f6602ffd3..4d47c6ded 100644--- a/avatar-sdk/package.json+++ b/avatar-sdk/package.json@@ -1,7 +1,7 @@{"name": "@three-ws/avatar","version": "0.1.0",- "description": "3D avatar viewer, creator iframe, and emotion + lipsync runtime — drop-in replacement for Ready Player Me.",+ "description": "The official three.ws SDK — 3D avatar viewer, creator iframe, AR/VR runtime, and emotion + lipsync engine. Drop-in replacement for Ready Player Me.","keywords": ["3d","avatar",@@ -16,7 +16,7 @@"readyplayerme","ready-player-me"],- "author": "three.ws",+ "author": "three.ws <[email protected]> (https://three.ws)","license": "Apache-2.0","homepage": "https://three.ws","repository": {diff --git a/avatar-sdk/src/creator.js b/avatar-sdk/src/creator.jsindex 0ce46d65e..09eb14810 100644--- a/avatar-sdk/src/creator.js+++ b/avatar-sdk/src/creator.js@@ -1,5 +1,5 @@// Programmatic Avatar Creator — opens an iframe modal where the user builds-// or photographs an avatar via Character Studio or Avaturn, listens for the+// or photographs an avatar via the three.ws pipelines, listens for the// `export` postMessage, and resolves with the GLB Blob.//// This is the thin client-only wrapper. Apps that already have their own@@ -19,8 +19,8 @@ export class AvatarCreator {/*** @param {object} opts* @param {HTMLElement} [opts.container] — DOM node to mount the modal into. Defaults to document.body.- * @param {string} [opts.studioUrl] — origin of the Character Studio iframe. Defaults to studio.three.ws.- * @param {string} [opts.avaturnSessionUrl] — if provided, opens Avaturn in edit mode for that session.+ * @param {string} [opts.studioUrl] — origin of the three.ws Studio iframe. Defaults to studio.three.ws.+ * @param {string} [opts.avaturnSessionUrl] — edit-mode session URL (issued by three.ws via /api/avatars/:id/session).* @param {(blob: Blob) => any} [opts.onExport] — called with the GLB Blob when the user exports.* @param {() => any} [opts.onClose] — called when the user closes without exporting.*/@@ -82,7 +82,7 @@ export class AvatarCreator {].join(';');this._iframe = document.createElement('iframe');- this._iframe.title = 'Avatar Creator';+ this._iframe.title = 'three.ws · Avatar Creator';this._iframe.allow = 'camera *; microphone *; clipboard-write';this._iframe.style.cssText = 'width:100%;height:100%;border:0;display:block';card.appendChild(this._iframe);@@ -114,8 +114,8 @@ export class AvatarCreator {}_handleMessage(event) {- // Character Studio: { source:'characterstudio', type:'export', glb: ArrayBuffer }- // Avaturn: { source:'avaturn', eventName:'export', data:{ url, urlType } }+ // three.ws Studio: { source:'characterstudio', type:'export', glb: ArrayBuffer }+ // three.ws Selfie: { source:'avaturn', eventName:'export', data:{ url, urlType } }const msg = event.data;if (!msg || typeof msg !== 'object') return;diff --git a/avatar-sdk/types/creator.d.ts b/avatar-sdk/types/creator.d.tsindex f7c023a1e..9a00bba16 100644--- a/avatar-sdk/types/creator.d.ts+++ b/avatar-sdk/types/creator.d.ts@@ -1,9 +1,9 @@export interface AvatarCreatorOptions {/** DOM node to mount the modal in. Defaults to document.body. */container?: HTMLElement;- /** Origin of the Character Studio iframe. Defaults to https://studio.three.ws. */+ /** Origin of the three.ws Studio iframe. Defaults to https://studio.three.ws. */studioUrl?: string;- /** Avaturn session URL for edit mode (created via /api/avatars/:id/session). */+ /** Edit-mode session URL (issued by three.ws via /api/avatars/:id/session). */avaturnSessionUrl?: string;/** Called with the GLB Blob when the user exports. */onExport?: (blob: Blob) => void | Promise<void>;diff --git a/create.html b/create.htmlindex 5acf7e250..d04073bc2 100644--- a/create.html+++ b/create.html@@ -766,13 +766,13 @@</span></div>- <!-- Card 2: Selfie via Avaturn (replaces the retired Ready Player Me flow) -->+ <!-- Card 2: three.ws Selfie — photo-to-avatar pipeline --><divclass="create-card"id="card-selfie"role="button"tabindex="0"- aria-label="Create an avatar from a selfie"+ aria-label="Create an avatar from a selfie with three.ws"><div class="card-preview"><model-viewer@@ -811,7 +811,7 @@<h2 class="card-title">Selfie to avatar</h2></div><p class="card-subtitle">- Open Avaturn — snap a selfie or pick a style, get a rigged avatar.+ Snap a selfie or pick a style — three.ws builds a rigged 3D avatar.</p><span class="card-cta">Open creator@@ -893,9 +893,8 @@</svg></span><p class="card-tooltip">- Need a model? Try- <a href="https://avaturn.me" target="_blank" rel="noopener">Avaturn</a> or- <a href="https://www.mixamo.com" target="_blank" rel="noopener">Mixamo</a>.+ Need a model? Build one in+ <a href="/studio">three.ws Studio</a>.</p></div></div>diff --git a/data/rss/items.json b/data/rss/items.jsonindex 174ff133b..fea49108b 100644--- a/data/rss/items.json+++ b/data/rss/items.json@@ -1,6 +1,20 @@{"_readme": "Curated RSS items for https://three.ws/rss/announcements.xml. Edit this file to control exactly what HackerNoon (and any RSS reader) sees. Each entry needs: id (stable slug), title, date (ISO 8601), body_html. Optional: link, author, summary, tags. Items are served newest-first by date; cap is 50. Seeded from data/archives/trythreews_tweets_2026-05-16.json on 2026-05-16 (35 entries). Re-run scripts/seed-rss-from-archive.mjs to refresh from a newer scrape.","items": [+ {+ "id": "live-on-alibaba-cloud-marketplace",+ "title": "three.ws is live on the Alibaba Cloud Marketplace",+ "date": "2026-05-16T04:00:00.000Z",+ "link": "https://marketplace.alibabacloud.com/products/56724001/sgcmfw00036800.html",+ "author": "three.ws",+ "summary": "three.ws is now live on the Alibaba Cloud Marketplace — find the product listing and our storefront below.",+ "body_html": "<p>three.ws is officially live on the <a href=\"https://marketplace.alibabacloud.com/products/56724001/sgcmfw00036800.html\" rel=\"noopener\">Alibaba Cloud Marketplace</a>.</p>\n<p>Browse the listing or visit our <a href=\"https://marketplace.alibabacloud.com/store/3247293.html\" rel=\"noopener\">storefront</a> on Alibaba Cloud.</p>\n<p>Visit <a href=\"https://three.ws\" rel=\"noopener\">three.ws</a> to get started.</p>",+ "tags": [+ "listing",+ "marketplace",+ "alibaba-cloud"+ ]+ },{"id": "t-2055310365588922872","title": "Add the domain you're embedding on to the widget's allowed origins list.",diff --git a/docs/configuration.md b/docs/configuration.mdindex 14932a765..f7bfe7182 100644--- a/docs/configuration.md+++ b/docs/configuration.md@@ -192,39 +192,39 @@ Both should be the same value. Get from [dashboard.privy.io](https://dashboard.p### Avatar Pipeline#### `VITE_CHARACTER_STUDIO_URL`-**Optional.** Origin where the Character Studio in-browser avatar builder is hosted. Defaults to `http://localhost:5173` in dev and `https://studio.three.ws` in production.+**Optional.** Origin where the three.ws Studio in-browser avatar builder is hosted. Defaults to `http://localhost:5173` in dev and `https://studio.three.ws` in production.```VITE_CHARACTER_STUDIO_URL=https://studio.three.ws```-Character Studio is an open-source 3D avatar editor (full body customisation — hair, clothing, accessories, skin tone, proportions). It runs as a separate Vite/React app under `character-studio/` in this monorepo and posts the exported GLB back to the parent via `postMessage`. Ready Player Me previously fulfilled this role; after its 2026 acquisition, Character Studio is the recommended replacement and is fully drop-in compatible — same humanoid skeleton naming, ARKit `viseme_*` blendshapes, and Mixamo animation support.+three.ws Studio is the in-browser avatar editor — full body customisation, hair, clothing, accessories, skin tone, proportions. It runs as a separate Vite/React app under `character-studio/` in this monorepo and posts the exported GLB back to the parent via `postMessage`. It replaced the Ready Player Me iframe after RPM's 2026 acquisition and is fully drop-in compatible: same humanoid skeleton naming, ARKit `viseme_*` blendshapes, and Mixamo animation support.#### `AVATURN_API_KEY`-**Optional.** API key for the Avaturn photo-to-avatar pipeline. Used server-side by `/api/onboarding/avaturn-session` to exchange selfie photos for a session URL.+**Optional.** API key for the three.ws Selfie (photo-to-avatar) backend. Used server-side by `/api/onboarding/avaturn-session` to exchange selfie photos for an editor session URL.```AVATURN_API_KEY=xxxxx```-Sign up at [avaturn.me/developer](https://avaturn.me/developer).+three.ws Selfie is powered by Avaturn under the hood; obtain your key at [avaturn.me/developer](https://avaturn.me/developer).#### `AVATURN_API_URL`-**Optional.** Override for self-hosted or staging Avaturn deployments. Defaults to `https://api.avaturn.me`.+**Optional.** Override for the three.ws Selfie backend endpoint. Defaults to `https://api.avaturn.me`.```AVATURN_API_URL=https://api.avaturn.me```#### `VITE_AVATURN_EDITOR_URL`-**Optional.** URL for the hosted Avaturn editor (no photos required, opened by the "Use default avatar" card at `/create`).+**Optional.** URL for the hosted three.ws Selfie editor iframe (no photos required, opened by the "Use default avatar" card at `/create`).```VITE_AVATURN_EDITOR_URL=https://editor.avaturn.me/```#### `VITE_AVATURN_DEVELOPER_ID`-**Optional.** Developer ID appended as a query parameter to the Avaturn editor URL.+**Optional.** Developer ID appended to the three.ws Selfie editor URL for analytics attribution.```VITE_AVATURN_DEVELOPER_ID=xxxxxdiff --git a/docs/deployment.md b/docs/deployment.mdindex 21866e188..9b1eecfd8 100644--- a/docs/deployment.md+++ b/docs/deployment.md@@ -104,16 +104,15 @@ Without Redis, rate limits run in-memory per serverless instance. This is fine f### Avatar creation```env-# Character Studio — origin where the in-browser avatar builder iframe is hosted.+# three.ws Studio — origin where the in-browser avatar builder iframe is hosted.# Defaults to http://localhost:5173 in dev. Production deployments should host the# character-studio/ workspace (it is a separate Vite/React app) and point this env-# var at its origin. Character Studio replaces the Ready Player Me iframe that was-# previously used here — same export contract, same humanoid rig, but open-source-# and self-hostable.+# var at its origin. three.ws Studio replaced the Ready Player Me iframe after RPM+# was acquired — same export contract, same humanoid rig, fully self-hosted.VITE_CHARACTER_STUDIO_URL=https://studio.three.ws-# Avaturn — photo-to-avatar pipeline-# Get key at https://avaturn.me/developer+# three.ws Selfie — photo-to-avatar pipeline (Avaturn-powered backend).+# Get a key at https://avaturn.me/developer.AVATURN_API_KEY=AVATURN_API_URL=https://api.avaturn.meVITE_AVATURN_EDITOR_URL=https://editor.avaturn.me/@@ -537,7 +536,7 @@ After deploying, run through these checks to verify the instance is healthy:|---|---|| Viewer | Load the app and drag-drop a GLB file || Wallet sign-in | Connect MetaMask — SIWE challenge + verify |-| Avatar creation | Navigate to `/create` — Character Studio (or Avaturn) iframe loads |+| Avatar creation | Navigate to `/create` — three.ws Studio (or three.ws Selfie) iframe loads || Agent page | Visit `/agent/:id` — 3D viewer with chat overlay || Embed | Check `/agent/:id/embed` loads without auth, can be iframed || Dashboard | Navigate to `/dashboard` — shows your agents |diff --git a/docs/index.html b/docs/index.htmlindex b6d318dff..57f8a6de5 100644--- a/docs/index.html+++ b/docs/index.html@@ -627,7 +627,7 @@{ label: 'Embedding', path: 'embedding' },{ label: 'Authentication', path: 'authentication' },{ label: 'Avatar creation', path: 'avatar-creation' },- { label: 'Avaturn integration', path: 'avaturn' },+ { label: 'three.ws Selfie (Avaturn)', path: 'avaturn' },{ label: 'ERC-8004', path: 'erc8004' },{ label: 'Solana agents', path: 'solana' },{ label: 'Solana pump.fun signals', path: 'solana-pumpfun' },diff --git a/docs/quick-start.md b/docs/quick-start.mdindex 7993cd965..effe535e1 100644--- a/docs/quick-start.md+++ b/docs/quick-start.md@@ -203,8 +203,8 @@ Copy `.env.example` to `.env` and fill in:| `ANTHROPIC_API_KEY` | Required for AI chat | LLM backend. Without it, the agent falls back to pattern matching. || `VITE_PRIVY_APP_ID` | Optional | Wallet auth via [Privy](https://privy.io). Needed for on-chain identity. || `UPSTASH_REDIS_REST_URL` / `UPSTASH_REDIS_REST_TOKEN` | Optional | Distributed rate limiting. Falls back to in-memory without it. |-| `VITE_CHARACTER_STUDIO_URL` | Optional | Origin where the [Character Studio](https://github.com/m3-org/CharacterStudio) avatar builder iframe is hosted. Defaults to `http://localhost:5173` in dev. |-| `AVATURN_API_KEY` | Optional | Photo-to-avatar pipeline via [Avaturn](https://avaturn.me). |+| `VITE_CHARACTER_STUDIO_URL` | Optional | Origin where the three.ws Studio avatar-builder iframe is hosted. Defaults to `http://localhost:5173` in dev and `https://studio.three.ws` in production. |+| `AVATURN_API_KEY` | Optional | API key for the three.ws Selfie (photo-to-avatar) backend. || `PINATA_JWT` | Optional | IPFS pinning for on-chain agent registration. |For a local-only dev environment with no uploads or on-chain features, only `DATABASE_URL`, `JWT_SECRET`, and `ANTHROPIC_API_KEY` are strictly needed.diff --git a/public/coin-dashboard.js b/public/coin-dashboard.jsindex 64f064934..b9be0fa05 100644--- a/public/coin-dashboard.js+++ b/public/coin-dashboard.js@@ -150,7 +150,7 @@ function renderWinners(container, data) {.map((w) => {const isMe = me && w.wallet === me ? 'you' : '';const explorer = w.tx_signature- ? `<a href="https://solscan.io/tx/${w.tx_signature}" target="_blank" rel="noopener">tx</a>`+ ? `<a href="https://solscan.io/tx/${w.tx_signature}" target="_blank" rel="noopener" title="View transaction on Solana">view tx ↗</a>`: w.status === 'resolved'? '<span style="color:var(--muted)">pending payout</span>': '<span style="color:var(--muted)">—</span>';@@ -158,11 +158,11 @@ function renderWinners(container, data) {<td class="wallet" title="${w.wallet || ''}">${shortWallet(w.wallet)}</td><td>${lamportsToSol(w.amount_lamports)} SOL</td><td>${explorer}</td>- <td><span title="Drand round ${w.drand_round}; randomness ${w.drand_randomness?.slice(0, 16) || '—'}…">round ${w.drand_round}</span></td></tr>`;+ <td><span title="Verifiable randomness round ${w.drand_round}; randomness ${w.drand_randomness?.slice(0, 16) || '—'}…">#${w.drand_round}</span></td></tr>`;}).join('');container.innerHTML = `<table><thead><tr>- <th>When</th><th>Winner</th><th>Amount</th><th>Tx</th><th>Drand</th>+ <th>When</th><th>Winner</th><th>Amount</th><th>Tx</th><th>Audit</th></tr></thead><tbody>${rows}</tbody></table>`;}diff --git a/public/coin/index.html b/public/coin/index.htmlindex 5c9e1bd5d..c207d56dc 100644--- a/public/coin/index.html+++ b/public/coin/index.html@@ -3,7 +3,19 @@<head><meta charset="utf-8" /><meta name="viewport" content="width=device-width,initial-scale=1" />- <title>Coin · three.ws</title>+ <title>Lottery + Reflection · three.ws</title>+ <meta name="description" content="The three.ws lottery + SOL reflection coin. Hourly winners, passive SOL drips to every eligible holder, verifiable randomness." />+ <meta property="og:site_name" content="three.ws" />+ <meta property="og:title" content="Lottery + Reflection · three.ws" />+ <meta property="og:description" content="Hourly lottery + passive SOL reflection. Every holder is a ticket. Verifiable randomness." />+ <meta property="og:type" content="website" />+ <meta property="og:url" content="https://three.ws/coin" />+ <meta property="og:image" content="https://three.ws/3d.png" />+ <meta name="twitter:card" content="summary_large_image" />+ <meta name="twitter:site" content="@trythreews" />+ <meta name="twitter:title" content="Lottery + Reflection · three.ws" />+ <meta name="twitter:description" content="Hourly lottery + passive SOL reflection. Every holder is a ticket. Verifiable randomness." />+ <meta name="twitter:image" content="https://three.ws/3d.png" /><link rel="icon" href="/favicon.ico" /><link rel="stylesheet" href="/style.css" /><link rel="stylesheet" href="/nav.css" />@@ -117,17 +129,36 @@.transparency { font-size: 12px; color: var(--muted); padding: 12px; background: #0e0e16;border: 1px dashed var(--border); border-radius: 8px; margin-top: 14px; line-height: 1.55; }.transparency code { background: #1a1a24; padding: 1px 5px; border-radius: 4px; color: #cbd5e1; font-size: 11px; }++ .tagline { color: var(--muted); font-size: 14px; margin: -4px 0 18px;+ max-width: 720px; line-height: 1.5; }+ .tagline strong { color: #eee; font-weight: 600; }+ .brand-strip { display: flex; align-items: center; gap: 10px; font-size: 11px;+ color: var(--muted); margin-bottom: 18px; letter-spacing: 0.04em; text-transform: uppercase; }+ .brand-strip a { color: var(--accent); text-decoration: none; }+ .brand-strip a:hover { text-decoration: underline; }+ .brand-strip .dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }</style><script defer src="/nav.js"></script></head><body><header id="top-nav"></header><main>+ <div class="brand-strip">+ <a href="/">three.ws</a>+ <span class="dot-sep"></span>+ <span>Lottery + SOL reflection</span>+ </div><div id="header" class="title-row"><h1 id="coin-name">Loading…</h1><span id="coin-symbol" class="symbol" hidden></span><span id="coin-live" class="live-pill" hidden><span class="pulse"></span><span id="coin-live-text">LIVE</span></span></div>+ <p class="tagline">+ <strong>Every holder is a ticket.</strong> Hourly draws send the lottery pot in SOL to one random+ eligible wallet. Between draws, every holder accrues a passive SOL reflection paid directly into+ their wallet — funded entirely by trading fees on the underlying token, three.ws verifiable randomness end-to-end.+ </p><div id="address-row" class="address-row" hidden><span id="coin-mint">—</span><button class="copy" id="copy-mint" title="Copy mint">copy</button>@@ -200,13 +231,14 @@</div><div id="tab-content"><div class="empty">Loading…</div></div><div class="transparency">- <strong>Verifiable randomness.</strong> Every lottery draw commits to a Drand quicknet- round in advance — the BLS signature for that round is published by the- <a href="https://drand.love" target="_blank" rel="noopener" style="color: var(--accent);">League of Entropy</a>- on a public 3-second cadence. We compute the winner deterministically from- <code>sha256(randomness ∥ weights_hash)</code> and persist the full audit trail- (<code>drand_round</code>, <code>drand_randomness</code>, <code>drand_signature</code>) so anyone- can independently re-derive the winner.+ <strong>three.ws verifiable randomness.</strong> Every draw commits in advance to a public+ future BLS-signed randomness round — neither three.ws nor anyone else knows the value at+ commit time. Winners are computed deterministically from+ <code>sha256(randomness ∥ weights_hash)</code> against the frozen holder snapshot. Every+ field needed to independently re-derive the winner (<code>round</code>,+ <code>randomness</code>, <code>signature</code>) is persisted into <code>coin_draws</code>+ and surfaced on the audit row for each draw — open the API at+ <code>/api/coin/winners</code> for the raw values. Verifiable by anyone, anywhere.</div></section></main>diff --git a/public/dashboard/dashboard.js b/public/dashboard/dashboard.jsindex cfd5c1905..8d6eb554f 100644--- a/public/dashboard/dashboard.js+++ b/public/dashboard/dashboard.js@@ -1451,7 +1451,7 @@ function replaceGlbFlow(a, cardEl) {warn.style.cssText ='margin:8px 0; padding:10px; background:rgba(255,165,0,.08); border:1px solid rgba(255,165,0,.25); border-radius:8px; font-size:12px; color:#d4aa44';warn.innerHTML = `- <p style="margin:0 0 8px">⚠ This bypasses Avaturn — your avatar may not animate correctly if not rigged to the Mixamo skeleton.</p>+ <p style="margin:0 0 8px">⚠ This bypasses the three.ws creator — your avatar may not animate correctly if it isn’t rigged to the three.ws humanoid skeleton.</p><div class="row" style="gap:6px"><button class="btn" data-glb-pick style="font-size:12px;padding:6px 10px">Choose .glb file</button><button class="btn sec" data-glb-cancel style="font-size:12px;padding:6px 10px">Cancel</button>@@ -1542,7 +1542,7 @@ async function doReplaceUpload(a, file, warnEl, cardEl) {if (boneMatch !== null && boneMatch < 0.5) {say(- `Uploaded. \u26a0 Animations may not play \u2014 skeleton mismatch (${Math.round(boneMatch * 100)}% Mixamo bone match).`,+ `Uploaded. \u26a0 Animations may not play \u2014 skeleton mismatch (${Math.round(boneMatch * 100)}% three.ws humanoid bone match).`,);} else {say('Replaced! Your agent now uses the new GLB.');diff --git a/public/docs/configuration.md b/public/docs/configuration.mdindex 14932a765..f7bfe7182 100644--- a/public/docs/configuration.md+++ b/public/docs/configuration.md@@ -192,39 +192,39 @@ Both should be the same value. Get from [dashboard.privy.io](https://dashboard.p### Avatar Pipeline#### `VITE_CHARACTER_STUDIO_URL`-**Optional.** Origin where the Character Studio in-browser avatar builder is hosted. Defaults to `http://localhost:5173` in dev and `https://studio.three.ws` in production.+**Optional.** Origin where the three.ws Studio in-browser avatar builder is hosted. Defaults to `http://localhost:5173` in dev and `https://studio.three.ws` in production.```VITE_CHARACTER_STUDIO_URL=https://studio.three.ws```-Character Studio is an open-source 3D avatar editor (full body customisation — hair, clothing, accessories, skin tone, proportions). It runs as a separate Vite/React app under `character-studio/` in this monorepo and posts the exported GLB back to the parent via `postMessage`. Ready Player Me previously fulfilled this role; after its 2026 acquisition, Character Studio is the recommended replacement and is fully drop-in compatible — same humanoid skeleton naming, ARKit `viseme_*` blendshapes, and Mixamo animation support.+three.ws Studio is the in-browser avatar editor — full body customisation, hair, clothing, accessories, skin tone, proportions. It runs as a separate Vite/React app under `character-studio/` in this monorepo and posts the exported GLB back to the parent via `postMessage`. It replaced the Ready Player Me iframe after RPM's 2026 acquisition and is fully drop-in compatible: same humanoid skeleton naming, ARKit `viseme_*` blendshapes, and Mixamo animation support.#### `AVATURN_API_KEY`-**Optional.** API key for the Avaturn photo-to-avatar pipeline. Used server-side by `/api/onboarding/avaturn-session` to exchange selfie photos for a session URL.+**Optional.** API key for the three.ws Selfie (photo-to-avatar) backend. Used server-side by `/api/onboarding/avaturn-session` to exchange selfie photos for an editor session URL.```AVATURN_API_KEY=xxxxx```-Sign up at [avaturn.me/developer](https://avaturn.me/developer).+three.ws Selfie is powered by Avaturn under the hood; obtain your key at [avaturn.me/developer](https://avaturn.me/developer).#### `AVATURN_API_URL`-**Optional.** Override for self-hosted or staging Avaturn deployments. Defaults to `https://api.avaturn.me`.+**Optional.** Override for the three.ws Selfie backend endpoint. Defaults to `https://api.avaturn.me`.```AVATURN_API_URL=https://api.avaturn.me```#### `VITE_AVATURN_EDITOR_URL`-**Optional.** URL for the hosted Avaturn editor (no photos required, opened by the "Use default avatar" card at `/create`).+**Optional.** URL for the hosted three.ws Selfie editor iframe (no photos required, opened by the "Use default avatar" card at `/create`).```VITE_AVATURN_EDITOR_URL=https://editor.avaturn.me/```#### `VITE_AVATURN_DEVELOPER_ID`-**Optional.** Developer ID appended as a query parameter to the Avaturn editor URL.+**Optional.** Developer ID appended to the three.ws Selfie editor URL for analytics attribution.```VITE_AVATURN_DEVELOPER_ID=xxxxxdiff --git a/public/docs/deployment.md b/public/docs/deployment.mdindex 21866e188..9b1eecfd8 100644--- a/public/docs/deployment.md+++ b/public/docs/deployment.md@@ -104,16 +104,15 @@ Without Redis, rate limits run in-memory per serverless instance. This is fine f### Avatar creation```env-# Character Studio — origin where the in-browser avatar builder iframe is hosted.+# three.ws Studio — origin where the in-browser avatar builder iframe is hosted.# Defaults to http://localhost:5173 in dev. Production deployments should host the# character-studio/ workspace (it is a separate Vite/React app) and point this env-# var at its origin. Character Studio replaces the Ready Player Me iframe that was-# previously used here — same export contract, same humanoid rig, but open-source-# and self-hostable.+# var at its origin. three.ws Studio replaced the Ready Player Me iframe after RPM+# was acquired — same export contract, same humanoid rig, fully self-hosted.VITE_CHARACTER_STUDIO_URL=https://studio.three.ws-# Avaturn — photo-to-avatar pipeline-# Get key at https://avaturn.me/developer+# three.ws Selfie — photo-to-avatar pipeline (Avaturn-powered backend).+# Get a key at https://avaturn.me/developer.AVATURN_API_KEY=AVATURN_API_URL=https://api.avaturn.meVITE_AVATURN_EDITOR_URL=https://editor.avaturn.me/@@ -537,7 +536,7 @@ After deploying, run through these checks to verify the instance is healthy:|---|---|| Viewer | Load the app and drag-drop a GLB file || Wallet sign-in | Connect MetaMask — SIWE challenge + verify |-| Avatar creation | Navigate to `/create` — Character Studio (or Avaturn) iframe loads |+| Avatar creation | Navigate to `/create` — three.ws Studio (or three.ws Selfie) iframe loads || Agent page | Visit `/agent/:id` — 3D viewer with chat overlay || Embed | Check `/agent/:id/embed` loads without auth, can be iframed || Dashboard | Navigate to `/dashboard` — shows your agents |diff --git a/public/docs/quick-start.md b/public/docs/quick-start.mdindex 7993cd965..effe535e1 100644--- a/public/docs/quick-start.md+++ b/public/docs/quick-start.md@@ -203,8 +203,8 @@ Copy `.env.example` to `.env` and fill in:| `ANTHROPIC_API_KEY` | Required for AI chat | LLM backend. Without it, the agent falls back to pattern matching. || `VITE_PRIVY_APP_ID` | Optional | Wallet auth via [Privy](https://privy.io). Needed for on-chain identity. || `UPSTASH_REDIS_REST_URL` / `UPSTASH_REDIS_REST_TOKEN` | Optional | Distributed rate limiting. Falls back to in-memory without it. |-| `VITE_CHARACTER_STUDIO_URL` | Optional | Origin where the [Character Studio](https://github.com/m3-org/CharacterStudio) avatar builder iframe is hosted. Defaults to `http://localhost:5173` in dev. |-| `AVATURN_API_KEY` | Optional | Photo-to-avatar pipeline via [Avaturn](https://avaturn.me). |+| `VITE_CHARACTER_STUDIO_URL` | Optional | Origin where the three.ws Studio avatar-builder iframe is hosted. Defaults to `http://localhost:5173` in dev and `https://studio.three.ws` in production. |+| `AVATURN_API_KEY` | Optional | API key for the three.ws Selfie (photo-to-avatar) backend. || `PINATA_JWT` | Optional | IPFS pinning for on-chain agent registration. |For a local-only dev environment with no uploads or on-chain features, only `DATABASE_URL`, `JWT_SECRET`, and `ANTHROPIC_API_KEY` are strictly needed.diff --git a/public/tutorials-manifest.js b/public/tutorials-manifest.jsindex 167ab4567..9ae737d2c 100644--- a/public/tutorials-manifest.js+++ b/public/tutorials-manifest.js@@ -136,7 +136,7 @@slug: 'upload-custom-glb',tier: 'middle',title: 'Upload a custom GLB avatar',- blurb: 'Bring your own model — from Mixamo, Blender, Ready Player Me, or anywhere else. Get it validated, fixed, and live.',+ blurb: 'Bring your own model — any glTF 2.0 .glb from Blender, three.ws Studio, or any other source. Get it validated, fixed, and live.',builds: 'A fully custom avatar body running in production',time: '35 min',previewModel: '/animations/soldier.glb',diff --git a/publish/README.md b/publish/README.mdindex f1a0c6a8f..5177a154f 100644--- a/publish/README.md+++ b/publish/README.md@@ -220,7 +220,7 @@ If you want to support the project — compute credits, grants, partnerships, or- OAuth 2.1 server (RFC 6749 + PKCE, RFC 7591 dynamic registration, RFC 7009 revocation, RFC 7662 introspection, RFC 8414 discovery)- Developer API keys with scope and expiry- MCP (Model Context Protocol) over HTTP with JSON-RPC 2.0 for tool-calling from external AI systems-- Avaturn (photo-to-avatar), Character Studio (in-browser builder), and Privy (embedded wallet) integrations+- three.ws Selfie (photo-to-avatar), three.ws Studio (in-browser builder), and Privy (embedded wallet) integrations- DCA strategy execution and on-chain subscription scheduling via cron jobs- OpenAPI 3.1 spec generated at `/openapi.json`@@ -1363,7 +1363,7 @@ WEB3_STORAGE_TOKEN=... # Fallback### Optional (Frontend, prefixed `VITE_`)```env-VITE_CHARACTER_STUDIO_URL=https://studio.three.ws # Avatar builder iframe origin+VITE_CHARACTER_STUDIO_URL=https://studio.three.ws # three.ws Studio iframe originVITE_PRIVY_APP_ID=...VITE_AVATURN_EDITOR_URL=https://editor.avaturn.me/VITE_AVATURN_DEVELOPER_ID=...diff --git a/scripts/coin-cli.mjs b/scripts/coin-cli.mjsindex c16fb8294..73a8b6425 100644--- a/scripts/coin-cli.mjs+++ b/scripts/coin-cli.mjs@@ -132,11 +132,12 @@ async function cmdKeygen(opts) {writeKeypair(outPath, kp);const b64 = Buffer.from(kp.secretKey).toString('base64');console.log(JSON.stringify({+ brand: 'three.ws',address: kp.publicKey.toBase58(),keypair_file: outPath,secret_key_b64: b64,hint: {- next_step: 'Set COIN_TREASURY_SECRET_KEY_B64 (or COIN_CREATOR_SECRET_KEY_B64_<MINT>) to secret_key_b64.',+ next_step: 'Set COIN_TREASURY_SECRET_KEY_B64 (or COIN_CREATOR_SECRET_KEY_B64_<MINT>) in your three.ws Vercel env to secret_key_b64.',gitignore: 'Add the keypair file path to .gitignore before committing anything.',},}, null, 2));@@ -147,11 +148,14 @@ async function cmdKeygen(opts) {async function cmdPrepare(positional, opts) {const [name, symbol] = positional;if (!name || !symbol) {- throw new Error('Usage: prepare <name> <symbol> [--description "..."] [--image <url>] [--website https://three.ws]');+ throw new Error('Usage: prepare <name> <symbol> [--description "..."] [--image <url>] [--website https://three.ws] [--twitter https://x.com/trythreews]');}- const description = opts.description || `Lottery + SOL reflection coin. Live dashboard: ${opts.website || 'https://three.ws'}/coin`;const website = opts.website || 'https://three.ws';+ const description =+ opts.description ||+ `A three.ws lottery + SOL reflection coin. Every holder is a ticket: hourly draws send the lottery pot to one random eligible wallet, and a passive SOL reflection drips to every holder between draws. Verifiable randomness end-to-end. Live dashboard: ${website}/coin`;const image = opts.image || null;+ const twitter = opts.twitter || process.env.THREEWS_TWITTER_URL || 'https://x.com/trythreews';const metadata = {name,@@ -159,8 +163,14 @@ async function cmdPrepare(positional, opts) {description,...(image ? { image } : {}),showName: true,+ // pump.fun's metadata schema requires this field literally — it's how+ // their indexer recognizes valid coin metadata. The user-facing+ // "Website" link rendered on the coin page is `website` below.createdOn: 'https://pump.fun',website,+ external_url: `${website}/coin`,+ twitter,+ platform: 'three.ws',};const outPath = opts.out || path.join(REPO_ROOT, `.coin-metadata-${symbol.toLowerCase()}.json`);@@ -194,12 +204,13 @@ async function cmdPrepare(positional, opts) {}console.log(JSON.stringify({+ brand: 'three.ws',metadata,metadata_file: outPath,metadata_url: metadataUrl,next_step: metadataUrl- ? `Run: node scripts/coin-cli.mjs launch ${metadataUrl} --wallet <buyer.json> --creator <creator.json>`- : `Host ${outPath} at a public HTTPS URL, then: node scripts/coin-cli.mjs launch <URL> --wallet <buyer.json> --creator <creator.json>`,+ ? `Run: node scripts/coin-cli.mjs launch ${metadataUrl} --wallet <buyer.json> --creator <creator.json> --name "${name}" --symbol "${symbol}"`+ : `Host ${outPath} at a public HTTPS URL (or set THREEWS_SESSION_COOKIE to auto-pin to three.ws), then: node scripts/coin-cli.mjs launch <URL> --wallet <buyer.json> --creator <creator.json> --name "${name}" --symbol "${symbol}"`,}, null, 2));}@@ -232,7 +243,7 @@ async function cmdLaunch(positional, opts) {const connection = new Connection(rpc, 'confirmed');console.error('');- console.error('— Launch parameters —');+ console.error('— three.ws coin launch parameters —');console.error(' network: ', network);console.error(' RPC: ', rpc.replace(/api-key=[^&]+/, 'api-key=***'));console.error(' buyer/payer:', buyer.publicKey.toBase58());@@ -340,10 +351,10 @@ async function cmdLaunch(positional, opts) {process.exit(1);}- console.error('— Submitting —');+ console.error('— Submitting on three.ws —');const sig = await connection.sendRawTransaction(tx.serialize(), { skipPreflight: false, maxRetries: 5 });- console.error(' signature:', sig);- console.error(' solscan: https://solscan.io/tx/' + sig);+ console.error(' signature: ', sig);+ console.error(' solana tx: ', 'https://solscan.io/tx/' + sig);const conf = await connection.confirmTransaction({ signature: sig, blockhash, lastValidBlockHeight },@@ -351,14 +362,16 @@ async function cmdLaunch(positional, opts) {);if (conf.value.err) throw new Error('confirmation error: ' + JSON.stringify(conf.value.err));- console.error('LAUNCHED.');+ console.error('LAUNCHED on three.ws.');+ const dashboardOrigin = process.env.PUBLIC_APP_ORIGIN || 'https://three.ws';console.log(JSON.stringify({mint: mint.publicKey.toBase58(),creator_wallet: creator.publicKey.toBase58(),buyer_wallet: buyer.publicKey.toBase58(),tx_signature: sig,- solscan: `https://solscan.io/tx/${sig}`,- pump_fun: `https://pump.fun/coin/${mint.publicKey.toBase58()}`,+ dashboard_url: `${dashboardOrigin}/coin/${mint.publicKey.toBase58()}`,+ solana_tx_url: `https://solscan.io/tx/${sig}`,+ pump_fun_url: `https://pump.fun/coin/${mint.publicKey.toBase58()}`,next_step: `Run: node scripts/coin-cli.mjs register ${mint.publicKey.toBase58()} --name "${opts.name}" --symbol "${opts.symbol}" --creator-wallet ${creator.publicKey.toBase58()} --creator-secret-b64 <base64>`,}, null, 2));}@@ -398,6 +411,7 @@ async function cmdRegister(positional, opts) {const reflection_interval = parseInt(opts['reflection-interval-seconds'] || String(draw_interval), 10);const metadata = {+ platform: 'three.ws',notes: opts.notes || null,treasury_is_creator: !!opts['treasury-is-creator'],};@@ -467,7 +481,7 @@ async function cmdActivate(positional, opts) {async function main() {const { cmd, positional, opts } = parseArgs(process.argv);if (!cmd || cmd === 'help' || cmd === '--help') {- console.error('coin-cli — lottery + reflection coin lifecycle');+ console.error('three.ws coin-cli — lottery + reflection coin lifecycle');console.error('');console.error(' keygen [--out <path>]');console.error(' prepare <name> <symbol> [--description "..."] [--image <url>] [--website https://three.ws]');diff --git a/scripts/generate-accessory-glbs.mjs b/scripts/generate-accessory-glbs.mjsindex 0f7583b76..30aa4a79e 100644--- a/scripts/generate-accessory-glbs.mjs+++ b/scripts/generate-accessory-glbs.mjs@@ -10,10 +10,10 @@// PBR material — small enough (< 8 KB) to commit to the repo, large enough to// be visibly correct when attached to a humanoid avatar's Head bone.//-// Coordinates are in meters, oriented for a head bone whose +Y is up and +Z-// is forward (the standard glTF convention used by Mixamo, RPM, and Avaturn-// outputs). The Head bone is typically located at the top of the neck; these-// meshes are offset to sit naturally on top of / in front of / beside it.+// Coordinates are in meters, oriented for a head bone whose +Y is up and +Z is+// forward (the standard glTF convention). The Head bone sits at the top of the+// neck; these meshes are offset to sit naturally on top of / in front of /+// beside it.//// Run with: node scripts/generate-accessory-glbs.mjsdiff --git a/src/agent-edit.js b/src/agent-edit.jsindex f0cb79a4a..4f734ac9d 100644--- a/src/agent-edit.js+++ b/src/agent-edit.js@@ -363,12 +363,12 @@ function openAvatarCreateMenu() {menu.setAttribute('role', 'menu');menu.innerHTML = `<button type="button" role="menuitem" data-source="characterstudio">- <span class="acm-title">Character Studio</span>+ <span class="acm-title">three.ws Studio</span><span class="acm-sub">In-browser builder — hair, clothing, body</span></button><button type="button" role="menuitem" data-source="avaturn">- <span class="acm-title">Avaturn editor</span>- <span class="acm-sub">Selfie → photoreal avatar</span>+ <span class="acm-title">three.ws Selfie</span>+ <span class="acm-sub">Photo → photoreal avatar</span></button><button type="button" role="menuitem" data-source="upload"><span class="acm-title">Upload GLB</span>diff --git a/src/avatar-creator.js b/src/avatar-creator.jsindex 2145ceca5..922e7168a 100644--- a/src/avatar-creator.js+++ b/src/avatar-creator.js@@ -1,3 +1,13 @@+// three.ws Avatar Creator — the in-app modal that opens either the+// • three.ws Studio iframe (in-browser builder), or+// • three.ws Selfie SDK (photo-to-avatar editor),+// and resolves the user's chosen avatar as a GLB Blob.+//+// Provider names ("characterstudio", "avaturn") only appear in internal+// postMessage payloads and import paths — every user-visible surface reads+// "three.ws". Ready Player Me was retired upstream after the 2026+// acquisition; this module no longer references it.+import { AvaturnSDK } from '@avaturn/sdk';function getStudioUrl() {@@ -11,41 +21,17 @@ function getStudioUrl() {return 'http://localhost:5173';}-function getReadyPlayerMeSubdomain() {- try {- if (typeof import.meta !== 'undefined' && import.meta.env?.VITE_RPM_SUBDOMAIN) {- return String(import.meta.env.VITE_RPM_SUBDOMAIN)- .trim()- .replace(/^https?:\/\//, '')- .replace(/\.readyplayer\.me.*$/, '');- }- } catch (_) {}- return 'demo';-}--// RPM iframe posts JSON-stringified payloads; older builds and some hosts have-// posted raw objects too. Accept both shapes.-function parseRpmEvent(data) {- if (typeof data === 'string') {- try { return JSON.parse(data); } catch { return null; }- }- if (data && typeof data === 'object') return data;- return null;-}-export class AvatarCreator {/*** @param {Element} containerEl - Parent element to mount the modal into* @param {function(Blob, {provider:string, sourceUrl?:string|null}): void} onExport - Called with the exported GLB Blob and provenance* @param {object} [opts]- * @param {string} [opts.studioUrl] - Override the CharacterStudio URL- * @param {string} [opts.rpmSubdomain] - Override the Ready Player Me subdomain+ * @param {string} [opts.studioUrl] - Override the three.ws Studio URL*/constructor(containerEl, onExport, opts = {}) {this.container = containerEl;this.onExport = onExport;this.studioUrl = opts.studioUrl || getStudioUrl();- this.rpmSubdomain = opts.rpmSubdomain || getReadyPlayerMeSubdomain();this.modal = null;this.iframe = null;@@ -56,108 +42,34 @@ export class AvatarCreator {}/**- * Opens the avatar creator modal.- * @param {string} [sessionUrl] - When provided, opens Avaturn SDK in edit mode.- * When omitted, opens CharacterStudio.+ * Opens the three.ws Avatar Creator modal.+ * @param {string} [sessionUrl] - When provided, opens the three.ws Selfie editor in edit mode.+ * When omitted, opens three.ws Studio.*/async open(sessionUrl) {if (this.modal) return;if (sessionUrl) {- this._provider = 'avaturn';- await this._openAvaturn(sessionUrl);+ this._provider = 'three-ws-selfie';+ await this._openSelfie(sessionUrl);} else {- this._provider = 'characterstudio';+ this._provider = 'three-ws-studio';this._buildModal(true);- this._onMessage = (e) => this._handleCharacterStudioMessage(e);+ this._onMessage = (e) => this._handleStudioMessage(e);window.addEventListener('message', this._onMessage);this.iframe.src = this.studioUrl;}}/**- * Opens the Avaturn default hosted editor via the Avaturn SDK.- * No URL passed → SDK uses its own default public editor (no developer ID needed).+ * Opens the default three.ws Selfie editor (no session URL required).*/async openDefaultEditor() {if (this.modal) return;- this._provider = 'avaturn';- await this._openAvaturn();- }-- /**- * Opens the Ready Player Me avatar creator in an iframe.- * Uses the Frame API: subscribes to v1 events and captures the GLB URL on export.- * Subdomain comes from VITE_RPM_SUBDOMAIN, defaulting to "demo".- *- * @param {object} [opts]- * @param {('halfbody'|'fullbody')} [opts.bodyType] - 'fullbody' (default) or 'halfbody'- * @param {boolean} [opts.clearCache] - clear stored RPM session (default true)- * @param {boolean} [opts.quickStart] - skip account creation prompts (default false)- */- async openReadyPlayerMe(opts = {}) {- if (this.modal) return;- this._provider = 'readyplayer';- this._buildModal(true);-- const bodyType = opts.bodyType || 'fullbody';- const clearCache = opts.clearCache !== false;- const quickStart = !!opts.quickStart;- const params = new URLSearchParams({- frameApi: '',- bodyType,- ...(clearCache && { clearCache: 'true' }),- ...(quickStart && { quickStart: 'true' }),- });- const url = `https://${this.rpmSubdomain}.readyplayer.me/avatar?${params.toString()}`;-- this._onMessage = (e) => this._handleReadyPlayerMessage(e);- window.addEventListener('message', this._onMessage);- this.iframe.src = url;- }-- _handleReadyPlayerMessage(event) {- const json = parseRpmEvent(event.data);- if (!json || json.source !== 'readyplayerme') return;-- if (json.eventName === 'v1.frame.ready') {- try {- this.iframe?.contentWindow?.postMessage(- JSON.stringify({- target: 'readyplayerme',- type: 'subscribe',- eventName: 'v1.**',- }),- '*',- );- } catch (err) {- console.error('[AvatarCreator] RPM subscribe failed:', err);- }- const loading = this.modal?.querySelector('.avatar-creator-loading');- if (loading) loading.style.display = 'none';- return;- }-- if (json.eventName === 'v1.avatar.exported') {- const glbUrl = json.data?.url;- if (!glbUrl) return;- (async () => {- try {- const res = await fetch(glbUrl);- if (!res.ok) throw new Error(`RPM GLB fetch failed: ${res.status}`);- const blob = await res.blob();- const glbBlob = blob.type- ? blob- : new Blob([await blob.arrayBuffer()], { type: 'model/gltf-binary' });- this._fireExport(glbBlob, { sourceUrl: glbUrl });- } catch (err) {- console.error('[AvatarCreator] failed to fetch RPM GLB:', err);- this._showError('Failed to download the avatar. Please try again.');- }- })();- }+ this._provider = 'three-ws-selfie';+ await this._openSelfie();}- async _openAvaturn(url) {+ async _openSelfie(url) {this._buildModal(false);try {this.sdk = new AvaturnSDK();@@ -187,16 +99,16 @@ export class AvatarCreator {: new Blob([await blob.arrayBuffer()], { type: 'model/gltf-binary' });this._fireExport(glbBlob, { sourceUrl: data.urlType === 'dataURL' ? null : glbUrl });} catch (err) {- console.error('[AvatarCreator] failed to fetch Avaturn GLB:', err);+ console.error('[three.ws Avatar Creator] failed to fetch selfie GLB:', err);}});} catch (err) {- console.error('[AvatarCreator] Failed to initialize Avaturn SDK:', err);- this._showError('Failed to load avatar creator. Please try again.');+ console.error('[three.ws Avatar Creator] Failed to initialize selfie SDK:', err);+ this._showError('Failed to load the avatar creator. Please try again.');}}- _handleCharacterStudioMessage(event) {+ _handleStudioMessage(event) {try {const csOrigin = new URL(this.studioUrl).origin;if (event.origin !== csOrigin) return;@@ -205,6 +117,8 @@ export class AvatarCreator {}const msg = event.data;+ // Studio iframe uses the `characterstudio` postMessage source for backwards+ // compatibility with the upstream open-source builder we forked.if (!msg || msg.source !== 'characterstudio' || msg.type !== 'export') return;if (!(msg.glb instanceof ArrayBuffer)) return;@@ -217,7 +131,7 @@ export class AvatarCreator {try {this.onExport(blob, { provider: this._provider, ...meta });} catch (err) {- console.error('[AvatarCreator] onExport handler threw:', err);+ console.error('[three.ws Avatar Creator] onExport handler threw:', err);}}this.close();@@ -231,11 +145,11 @@ export class AvatarCreator {}/**- * @param {boolean} withIframe - true for CharacterStudio/RPM (needs a pre-rendered iframe),- * false for Avaturn SDK (SDK injects its own iframe).+ * @param {boolean} withIframe - true for three.ws Studio (pre-rendered iframe),+ * false for three.ws Selfie SDK (SDK injects its own iframe).*/_buildModal(withIframe) {- const title = withIframe ? 'Create Your Avatar' : 'Edit Your Avatar';+ const title = withIframe ? 'three.ws · Create your avatar' : 'three.ws · Edit your avatar';this.modal = document.createElement('div');this.modal.className = 'avatar-creator-overlay';@@ -250,7 +164,7 @@ export class AvatarCreator {withIframe? `<iframeclass="avatar-creator-iframe"- title="Avatar Creator"+ title="three.ws · Avatar Creator"allow="camera *; microphone *; clipboard-write"sandbox="allow-scripts allow-same-origin allow-forms allow-popups"></iframe>`@@ -258,7 +172,7 @@ export class AvatarCreator {}</div><div class="avatar-creator-loading"><div class="spinner"></div>- <span>Loading avatar creator...</span>+ <span>Loading three.ws Avatar Creator…</span></div></div></div>diff --git a/src/runtime/lipsync.js b/src/runtime/lipsync.jsindex cb0ffcee3..f3d81d08f 100644--- a/src/runtime/lipsync.js+++ b/src/runtime/lipsync.js@@ -103,7 +103,7 @@ function _resetMap(map) {/*** Drive jaw/mouth morph targets in sync with speech text via a phoneme heuristic.- * Supports ARKit viseme_* targets (Avaturn / Character Studio / Mixamo / VRM avatars) and jawOpen/mouthOpen fallbacks.+ * Supports the ARKit viseme_* morph targets that three.ws avatars ship with (and the same names exported by Mixamo / VRM), plus jawOpen / mouthOpen fallbacks.** @param {string} text — the spoken text* @param {import('three').Object3D} root — avatar root (or scene) to traverse for morph targets