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.

Enhance SEO and social sharing metadata across multiple pages

nirholas1cc40fb8bc62
diff --git a/api/_lib/avatar-thumbs.js b/api/_lib/avatar-thumbs.js
index 41de3e37c..c55dd92d8 100644
--- a/api/_lib/avatar-thumbs.js
+++ b/api/_lib/avatar-thumbs.js
@@ -40,6 +40,23 @@ import { presignGet, putObject, headObject, publicUrl, isLegacyOgThumbnailKey }
export const THUMB_SIZE = 768;
export const THUMB_BACKGROUND = '#0a0a0a';
+// Every avatar gets its own tinted stage: a dark radial gradient whose hue is
+// derived from the avatar id. On a uniform #0a0a0a a grid of posters merges
+// into one black wall (dark meshes have zero separation from the backdrop);
+// the per-avatar tint keeps the gallery dark and on-brand while making each
+// card readable and distinct at a glance. Deterministic, so re-renders of the
+// same avatar always produce the same stage.
+export function thumbBackdropFor(avatarId) {
+ let h = 0;
+ const s = String(avatarId);
+ for (let i = 0; i < s.length; i++) h = (h * 31 + s.charCodeAt(i)) >>> 0;
+ const hue = h % 360;
+ return {
+ inner: `hsl(${hue}, 30%, 17%)`,
+ outer: `hsl(${hue}, 42%, 6%)`,
+ };
+}
+
// A GLB that fails to render this many times is almost certainly structurally
// broken (corrupt, >25MB, non-glTF bytes). Stop paying chromium for it.
export const MAX_ATTEMPTS = 3;
@@ -232,6 +249,7 @@ export async function renderThumbnail({ id, storage_key: storageKey }) {
width: THUMB_SIZE,
height: THUMB_SIZE,
background: THUMB_BACKGROUND,
+ backdrop: thumbBackdropFor(id),
});
if (!png?.length) throw new Error('renderer returned no bytes');
diff --git a/api/_lib/avatars.js b/api/_lib/avatars.js
index 0feaada89..8c804bade 100644
--- a/api/_lib/avatars.js
+++ b/api/_lib/avatars.js
@@ -260,7 +260,16 @@ export async function searchPublicAvatars({
}) {
limit = Math.min(Math.max(limit, 1), 100);
const params = [];
- const conds = [`deleted_at is null`, `visibility = 'public'`];
+ // Circulation clones (source_meta.circulation) are byte-for-byte copies of
+ // existing gallery avatars minted so agent cards have a preview
+ // (circulation.js cloneAvatarFor). New clones are inserted unlisted, but the
+ // pre-existing public ones would still fill the gallery with dozens of
+ // identical "My First Agent" cards; keep the discovery surface originals-only.
+ const conds = [
+ `deleted_at is null`,
+ `visibility = 'public'`,
+ `(source_meta->>'circulation') is distinct from 'true'`,
+ ];
if (q) {
params.push('%' + q + '%');
conds.push(`(name ilike $${params.length} or description ilike $${params.length})`);
diff --git a/api/_lib/circulation.js b/api/_lib/circulation.js
index 42b01b7e1..b96adf3ee 100644
--- a/api/_lib/circulation.js
+++ b/api/_lib/circulation.js
@@ -317,6 +317,12 @@ async function claimUsername(base) {
// the coin launcher can use it as the token image. Returns the new avatar id or
// null when no public avatar exists yet.
//
+// Clones are inserted as 'unlisted', not 'public': they exist to give an agent
+// card a preview (agents/public.js treats unlisted thumbnails as card-visible),
+// not to be discovered. Public clones once made up a third of the gallery
+// (dozens of identical "My First Agent" cards) because every signup's draft
+// agent got a public copy of the same few source bodies.
+//
// Exported: api/cron/agent-avatar-backfill.js reuses this to heal pre-existing
// agents whose avatar_id is NULL, so every agent card can show a real preview.
export async function cloneAvatarFor(userId, name) {
@@ -351,7 +357,7 @@ export async function cloneAvatarFor(userId, name) {
${userId}, ${slug}, ${name}, ${'Operated by a three.ws agent'},
${src.storage_key}, ${src.size_bytes ?? 0}, ${src.content_type || 'model/gltf-binary'},
${src.source || 'import'}, ${JSON.stringify({ circulation: true, cloned_from: src.id })}::jsonb,
- ${src.thumbnail_key ?? null}, 'public', ${src.tags ?? []}, ${src.model_category ?? null}, now(), now()
+ ${src.thumbnail_key ?? null}, 'unlisted', ${src.tags ?? []}, ${src.model_category ?? null}, now(), now()
)
returning id
`;
@@ -379,7 +385,12 @@ async function createPoolAgent() {
const ownerWord = `${pick(OWNER_FIRST_NAMES)}${persona.handle}`.replace(/[^a-z0-9]/g, '');
const username = await claimUsername(slugify(ownerWord) || persona.handle);
const email = `${username}@agents.three.ws`;
- const displayName = username.replace(/\d+$/, '').replace(/\b\w/g, (c) => c.toUpperCase());
+ // Drop claimUsername's collision suffixes (`_xxxx` uuid fallback, numbered
+ // slot) before titling; stripping digits alone left names like "Fog_".
+ const displayName = username
+ .replace(/_[0-9a-f]{4}$/, '')
+ .replace(/\d+$/, '')
+ .replace(/\b\w/g, (c) => c.toUpperCase());
const [user] = await sql`
insert into users (email, display_name, username, plan, email_verified, created_at, updated_at)
diff --git a/api/_lib/forge-director-prompts.js b/api/_lib/forge-director-prompts.js
index 664d4f703..b2df62d81 100644
--- a/api/_lib/forge-director-prompts.js
+++ b/api/_lib/forge-director-prompts.js
@@ -83,7 +83,12 @@ export const AVATAR_DIRECTOR =
"unless the user's own words clearly call for something else (anime, cartoon, chibi, voxel, robot, creature, " +
'toy, low-poly, hand-painted, etc.); never mix styles. When the character is a photoreal human, weave in ' +
'these cues: ' + PHOTOREAL_CUES + '; and specifically: ' + PHOTOREAL_HUMAN_CUES + '. (5) key identifying ' +
- 'features (hair, face, color scheme, accessories). If the idea names a brand, meme, or term you do not ' +
+ 'features (hair, face, color scheme, accessories). When the idea is sparse or generic ("a woman", "a knight", ' +
+ '"a cool guy"), do NOT default to the same safe, average person: commit to specific, memorable choices the ' +
+ 'user did not rule out: a particular age, build, and face character; a distinctive hairstyle and hair color; a ' +
+ 'named 2-3 color palette; one signature garment, pattern, or accessory that makes this character instantly ' +
+ 'recognizable in a lineup. Draw these choices from the mood and connotations of the words the user chose so two ' +
+ 'different ideas never converge on the same person. If the idea names a brand, meme, or term you do not ' +
"recognize, keep the user's stated character concept as the subject and render its canonical look; never " +
'substitute a different character. Always end with these composition ' +
'constraints: full body in frame head-to-toe, centered, isolated on a plain neutral background, no props ' +
diff --git a/api/_lib/render-glb.js b/api/_lib/render-glb.js
index 9f7b7a96f..5e078b74a 100644
--- a/api/_lib/render-glb.js
+++ b/api/_lib/render-glb.js
@@ -35,6 +35,12 @@ const CHROMIUM_PACK = env.CHROMIUM_PACK_URL || DEFAULT_CHROMIUM_PACK;
// behavior are all version-sensitive).
const THREE_VERSION = '0.176.0';
+// Poster composition. A 26° yaw reads as a natural 3/4 portrait without hiding
+// the front of the model; 1.22 leaves enough margin that a T-pose's fingertips
+// stay inside even after the yaw shrinks the projected width.
+const CAMERA_YAW_DEG = 26;
+const FRAME_MARGIN = 1.22;
+
// One browser per warm container. puppeteer.launch is the slow step
// (~1s on warm chromium, ~3s cold); reusing the instance across renders
// in the same lambda invocation amortizes it.
@@ -99,11 +105,17 @@ export function isBrowserInfrastructureError(err) {
// Inline viewer HTML — bundled into the function so the renderer needs no
// extra static assets. three.js + GLTFLoader load from unpkg pinned to the
// installed version. window.__renderDone signals readiness to puppeteer.
-function viewerHtml({ glbBase64, width, height, background }) {
- const bg = background === 'transparent' ? 'null' : JSON.stringify(background || '#0a0a0a');
+function viewerHtml({ glbBase64, width, height, background, backdrop }) {
+ // A gradient backdrop renders as page CSS behind a transparent canvas: the
+ // screenshot composites the two, so the scene itself stays background-free.
+ const useGradient = backdrop && backdrop.inner && backdrop.outer;
+ const bg = useGradient || background === 'transparent' ? 'null' : JSON.stringify(background || '#0a0a0a');
+ const bodyBg = useGradient
+ ? `radial-gradient(ellipse 90% 70% at 50% 38%, ${backdrop.inner}, ${backdrop.outer})`
+ : 'transparent';
return `<!doctype html>
<html><head><meta charset="utf-8" />
-<style>html,body{margin:0;padding:0;background:transparent;overflow:hidden}</style>
+<style>html,body{margin:0;padding:0;background:${bodyBg};overflow:hidden}</style>
</head><body>
<canvas id="c" width="${width}" height="${height}" style="display:block;width:${width}px;height:${height}px"></canvas>
<script>window.__GLB_B64=${JSON.stringify(glbBase64)};</script>
@@ -175,16 +187,25 @@ function onLoaded(gltf) {
const root = gltf.scene;
scene.add(root);
// Frame the model: compute bounds, center it, position camera so it
- // fills the frame with a small margin.
+ // fills the frame with a small margin. The camera sits at a gentle 3/4
+ // yaw instead of dead-on: a straight frontal shot flattens T-posed
+ // avatars into identical paper cutouts, while the quarter turn shows
+ // depth and silhouette. Distance honors both fov axes so tight margins
+ // never crop on non-square frames.
const box = new THREE.Box3().setFromObject(root);
const size = new THREE.Vector3(); box.getSize(size);
const center = new THREE.Vector3(); box.getCenter(center);
root.position.sub(center);
root.position.y += size.y * 0.05; // tiny lift so feet aren't dead-center
const maxDim = Math.max(size.x, size.y, size.z);
- const fov = THREE.MathUtils.degToRad(camera.fov);
- const dist = (maxDim / 2) / Math.tan(fov / 2) * 1.45;
- camera.position.set(0, size.y * 0.05, dist);
+ const fovV = THREE.MathUtils.degToRad(camera.fov);
+ const fovH = 2 * Math.atan(Math.tan(fovV / 2) * camera.aspect);
+ const dist = Math.max(
+ (maxDim / 2) / Math.tan(fovV / 2),
+ (maxDim / 2) / Math.tan(fovH / 2),
+ ) * ${JSON.stringify(FRAME_MARGIN)};
+ const yaw = THREE.MathUtils.degToRad(${JSON.stringify(CAMERA_YAW_DEG)});
+ camera.position.set(Math.sin(yaw) * dist, size.y * 0.08, Math.cos(yaw) * dist);
camera.lookAt(0, 0, 0);
// Two paints guard against partial first-frame artifacts (textures
// still uploading, skinned meshes pre-bind). Cheap on a single GLB.
@@ -219,9 +240,12 @@ function onLoaded(gltf) {
* @param {number} [opts.width=1200]
* @param {number} [opts.height=630]
* @param {string} [opts.background='#0a0a0a'] - 'transparent' or hex color
+ * @param {{inner: string, outer: string}} [opts.backdrop] - radial-gradient
+ * backdrop (center → edge). Takes precedence over `background`; used by the
+ * thumbnail pipeline to give every avatar its own tinted stage.
* @returns {Promise<Buffer>} PNG buffer
*/
-export async function renderGlbToPng({ glbUrl, width = 1200, height = 630, background = '#0a0a0a', maxBytes = DEFAULT_MAX_GLB_BYTES } = {}) {
+export async function renderGlbToPng({ glbUrl, width = 1200, height = 630, background = '#0a0a0a', backdrop = null, maxBytes = DEFAULT_MAX_GLB_BYTES } = {}) {
if (!glbUrl || typeof glbUrl !== 'string') {
throw Object.assign(new Error('glbUrl required'), { status: 400, code: 'invalid_args' });
}
@@ -243,7 +267,7 @@ export async function renderGlbToPng({ glbUrl, width = 1200, height = 630, backg
const page = await browser.newPage();
try {
await page.setViewport({ width, height, deviceScaleFactor: 1 });
- const html = viewerHtml({ glbBase64, width, height, background });
+ const html = viewerHtml({ glbBase64, width, height, background, backdrop });
// data: URL avoids needing a network fetch for the bootstrap page itself.
// importmap dependencies (three, GLTFLoader) still come from unpkg.
await page.setContent(html, { waitUntil: 'domcontentloaded' });
diff --git a/api/avatar-og.js b/api/avatar-og.js
index 0c6024166..26ece4894 100644
--- a/api/avatar-og.js
+++ b/api/avatar-og.js
@@ -24,6 +24,7 @@ import { getAvatar } from './_lib/avatars.js';
import { cors, wrap } from './_lib/http.js';
import { publicUrl, putObject, isLegacyOgThumbnailKey } from './_lib/r2.js';
import { renderGlbToPng } from './_lib/render-glb.js';
+import { thumbBackdropFor } from './_lib/avatar-thumbs.js';
const CACHE_CARD_OK = 'public, max-age=3600, s-maxage=86400, stale-while-revalidate=604800';
const CACHE_CARD_404 = 'public, max-age=60';
@@ -142,6 +143,7 @@ async function renderAndCache({ avatar }) {
width: 1200,
height: 630,
background: '#0a0a0a',
+ backdrop: thumbBackdropFor(avatar.id),
});
const ogKey = ogKeyFor(avatar);
diff --git a/api/cron/avatar-thumbnail-render.js b/api/cron/avatar-thumbnail-render.js
index c181dbff0..70319020d 100644
--- a/api/cron/avatar-thumbnail-render.js
+++ b/api/cron/avatar-thumbnail-render.js
@@ -27,6 +27,7 @@ import { constantTimeEquals } from '../_lib/crypto.js';
import { logger } from '../_lib/usage.js';
import { presignGet, putObject, publicUrl } from '../_lib/r2.js';
import { renderGlbToPng } from '../_lib/render-glb.js';
+import { thumbBackdropFor } from '../_lib/avatar-thumbs.js';
import {
ensureRegenSchema,
claimRegenJobs,
@@ -58,12 +59,15 @@ async function renderOne(job) {
// 1. Re-presign the durable source key (the loop's downloadUrl has expired).
const glbUrl = await presignGet({ key: job.r2_key, expiresIn: SOURCE_TTL_SECONDS });
- // 2. Render the current model to a PNG.
+ // 2. Render the current model to a PNG. The per-asset tinted backdrop keeps
+ // regen renders interchangeable with backfill renders (avatar-thumbs.js);
+ // an explicit THUMBNAIL_RENDER_BG override still wins.
const png = await renderGlbToPng({
glbUrl,
width: job.width || 768,
height: job.height || 768,
background: BACKGROUND,
+ backdrop: process.env.THUMBNAIL_RENDER_BG ? null : thumbBackdropFor(job.asset_slug),
});
// 3. Upload the fresh thumbnail to R2.
diff --git a/api/cron/avaturn-seed-cron.js b/api/cron/avaturn-seed-cron.js
index d3269a095..7389ceed8 100644
--- a/api/cron/avaturn-seed-cron.js
+++ b/api/cron/avaturn-seed-cron.js
@@ -102,7 +102,13 @@ async function runOnce() {
if (!username)
return { skipped: true, reason: 'could not claim OG username — retry next tick' };
- const displayName = username.replace(/\d+$/, '').replace(/\b\w/g, (c) => c.toUpperCase());
+ // Drop claimUsername's collision suffixes before titling: the `_xxxx` uuid
+ // fallback first, then a numbered slot. Stripping digits alone turned
+ // "fog_1a2b" into the literal display name "Fog_".
+ const displayName = username
+ .replace(/_[0-9a-f]{4}$/, '')
+ .replace(/\d+$/, '')
+ .replace(/\b\w/g, (c) => c.toUpperCase());
const email = `${username}@avaturn.three.ws`;
const [user] = await sql`
diff --git a/api/cron/forge-seed-cron.js b/api/cron/forge-seed-cron.js
index 64b93f2bf..2cbf1ab88 100644
--- a/api/cron/forge-seed-cron.js
+++ b/api/cron/forge-seed-cron.js
@@ -230,8 +230,13 @@ async function startNextJob(origin) {
}
const rawClientId = randomUUID();
- // Display name is the word, capitalised — looks like a real account.
- const displayName = username.replace(/\d+$/, '').replace(/\b\w/g, c => c.toUpperCase());
+ // Display name is the word, capitalised — looks like a real account. Drop
+ // claimUsername's collision suffixes (`_xxxx` uuid fallback, numbered slot)
+ // first; stripping digits alone turned "fog_1a2b" into "Fog_".
+ const displayName = username
+ .replace(/_[0-9a-f]{4}$/, '')
+ .replace(/\d+$/, '')
+ .replace(/\b\w/g, c => c.toUpperCase());
const email = `${username}@forge.three.ws`;
const [user] = await sql`
diff --git a/pages/agent-wallet.html b/pages/agent-wallet.html
index 655a2bf85..37423cf1a 100644
--- a/pages/agent-wallet.html
+++ b/pages/agent-wallet.html
@@ -18,11 +18,11 @@
property="og:description"
content="Your 3D AI agent's own Solana wallet: balance, deposit, trade, snipe, pay, and withdraw."
/>
- <meta property="og:image" content="https://three.ws/og-image.png" />
+ <meta property="og:image" content="https://three.ws/api/page-og?s=crypto&amp;t=Agent+Wallet&amp;d=The+wallet+surface+for+your+agents%3A+balances%2C+funding%2C+and+activity.&amp;p=%2Fagent-wallet" />
<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:image" content="https://three.ws/og-image.png" />
+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=crypto&amp;t=Agent+Wallet&amp;d=The+wallet+surface+for+your+agents%3A+balances%2C+funding%2C+and+activity.&amp;p=%2Fagent-wallet" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
@@ -152,7 +152,17 @@
}
}
</style>
- </head>
+
+ <link rel="canonical" href="https://three.ws/agent-wallet">
+ <meta property="og:site_name" content="three.ws">
+ <meta property="og:locale" content="en_US">
+ <meta property="og:url" content="https://three.ws/agent-wallet">
+ <meta property="og:image:alt" content="Agent Wallet — three.ws">
+ <meta name="twitter:site" content="@trythreews">
+ <meta name="twitter:title" content="Agent Wallet · three.ws">
+ <meta name="twitter:description" content="The wallet surface for your agents: balances, funding, and activity.">
+ <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"Agent Wallet","description":"The wallet surface for your agents: balances, funding, and activity.","url":"https://three.ws/agent-wallet","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"},"primaryImageOfPage":"https://three.ws/api/page-og?s=crypto&amp;t=Agent+Wallet&amp;d=The+wallet+surface+for+your+agents%3A+balances%2C+funding%2C+and+activity.&amp;p=%2Fagent-wallet"}]}</script>
+</head>
<body>
<div id="nav-container"></div>
diff --git a/pages/app.html b/pages/app.html
index 9f070d7b9..716682ba8 100644
--- a/pages/app.html
+++ b/pages/app.html
@@ -29,7 +29,7 @@
/>
<meta property="og:url" content="https://three.ws/" />
<meta property="og:site_name" content="three.ws" />
- <meta property="og:image" content="https://three.ws/og-image.png">
+ <meta property="og:image" content="https://three.ws/api/page-og?s=main&amp;t=Showcase&amp;d=AI-powered+3D+model+viewer+showcase%3A+drop+in+a+model+and+explore+it+live.&amp;p=%2Fshowcase">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
@@ -42,7 +42,7 @@
/>
<meta name="twitter:site" content="@trythreews" />
<meta name="twitter:creator" content="@nichxbt" />
- <meta name="twitter:image" content="https://three.ws/og-image.png">
+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=main&amp;t=Showcase&amp;d=AI-powered+3D+model+viewer+showcase%3A+drop+in+a+model+and+explore+it+live.&amp;p=%2Fshowcase">
<link rel="canonical" href="https://three.ws/app" />
<link rel="icon" href="/favicon.ico" sizes="any" />
@@ -120,7 +120,12 @@
}
}
</style>
- </head>
+
+ <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1">
+ <meta property="og:locale" content="en_US">
+ <meta property="og:image:alt" content="Showcase — three.ws">
+ <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"Showcase","description":"AI-powered 3D model viewer showcase: drop in a model and explore it live.","url":"https://three.ws/showcase","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"},"primaryImageOfPage":"https://three.ws/api/page-og?s=main&amp;t=Showcase&amp;d=AI-powered+3D+model+viewer+showcase%3A+drop+in+a+model+and+explore+it+live.&amp;p=%2Fshowcase"}]}</script>
+</head>
<body>
<a class="skip-link" href="#main-content">Skip to content</a>
<header>
diff --git a/pages/avatar-sdk.html b/pages/avatar-sdk.html
index d6300187a..a0f9fb976 100644
--- a/pages/avatar-sdk.html
+++ b/pages/avatar-sdk.html
@@ -19,7 +19,7 @@
content="Drop-in 3D avatar SDK for the web. &lt;agent-3d&gt; web component, React bindings, iframe creator, GLB upload — an open replacement for legacy avatar SDKs."
/>
<meta property="og:url" content="https://three.ws/avatar-sdk" />
- <meta property="og:image" content="https://three.ws/og-image.png" />
+ <meta property="og:image" content="https://three.ws/api/page-og?s=build&amp;t=Avatar+SDK&amp;d=The+%40three-ws%2Favatar+package%3A+embed+the+platform+3D+avatars+in+any+site+with+a+few+lines+of+JavaScript.&amp;p=%2Favatar-sdk" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="@three-ws/avatar SDK · three.ws" />
<meta name="twitter:description" content="Drop-in 3D avatar SDK — web component, React, creator iframe, GLB upload." />
@@ -38,7 +38,14 @@
<link rel="stylesheet" href="/mobile.css" />
<link rel="stylesheet" href="/avatar-sdk.css" />
<script defer src="/footer-newsletter.js"></script>
- </head>
+
+ <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1">
+ <meta property="og:locale" content="en_US">
+ <meta property="og:image:alt" content="Avatar SDK — three.ws">
+ <meta name="twitter:site" content="@trythreews">
+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=build&amp;amp;t=Avatar+SDK&amp;amp;d=The+%40three-ws%2Favatar+package%3A+embed+the+platform+3D+avatars+in+any+site+with+a+few+lines+of+JavaScript.&amp;amp;p=%2Favatar-sdk">
+ <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"Avatar SDK","description":"The @three-ws/avatar package: embed the platform 3D avatars in any site with a few lines of JavaScript.","url":"https://three.ws/avatar-sdk","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"},"primaryImageOfPage":"https://three.ws/api/page-og?s=build&amp;t=Avatar+SDK&amp;d=The+%40three-ws%2Favatar+package%3A+embed+the+platform+3D+avatars+in+any+site+with+a+few+lines+of+JavaScript.&amp;p=%2Favatar-sdk"}]}</script>
+</head>
<body>
<header><div id="nav-container"></div></header>
diff --git a/pages/avatar-studio.html b/pages/avatar-studio.html
index 84e9f7bca..eeafc472b 100644
--- a/pages/avatar-studio.html
+++ b/pages/avatar-studio.html
@@ -18,7 +18,7 @@
<meta property="og:url" content="https://three.ws/avatar-studio" />
<meta property="og:title" content="Avatar Studio · three.ws" />
<meta property="og:description" content="Build a custom 3D avatar from scratch. Choose body type, sculpt face and body, add outfits and accessories." />
- <meta property="og:image" content="https://three.ws/og-image.png" />
+ <meta property="og:image" content="https://three.ws/api/page-og?s=build&amp;t=Avatar+Studio&amp;d=Build+a+custom+3D+avatar+from+scratch.+Choose+body+type%2C+sculpt+face+and+body%2C+add+outfits+and+accessories.+No+selfie+required.&amp;p=%2Favatar-studio" />
<meta name="twitter:card" content="summary_large_image" />
<link rel="stylesheet" href="/style.css" />
<link rel="stylesheet" href="/fonts/fonts.css" />
@@ -987,7 +987,17 @@
width: 0%;
}
</style>
- </head>
+
+ <link rel="canonical" href="https://three.ws/avatar-studio">
+ <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1">
+ <meta property="og:locale" content="en_US">
+ <meta property="og:image:alt" content="Avatar Studio — three.ws">
+ <meta name="twitter:site" content="@trythreews">
+ <meta name="twitter:title" content="Avatar Studio · three.ws">
+ <meta name="twitter:description" content="Build a custom 3D avatar from scratch. Choose body type, sculpt face and body, add outfits and accessories. No selfie required.">
+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=build&amp;amp;t=Avatar+Studio&amp;amp;d=Build+a+custom+3D+avatar+from+scratch.+Choose+body+type%2C+sculpt+face+and+body%2C+add+outfits+and+accessories.+No+selfie+required.&amp;amp;p=%2Favatar-studio">
+ <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"Avatar Studio","description":"Build a custom 3D avatar from scratch. Choose body type, sculpt face and body, add outfits and accessories. No selfie required.","url":"https://three.ws/avatar-studio","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"},"primaryImageOfPage":"https://three.ws/api/page-og?s=build&amp;t=Avatar+Studio&amp;d=Build+a+custom+3D+avatar+from+scratch.+Choose+body+type%2C+sculpt+face+and+body%2C+add+outfits+and+accessories.+No+selfie+required.&amp;p=%2Favatar-studio"}]}</script>
+</head>
<body>
<header class="as-bar">
<a class="as-back" id="as-back" href="/create">
diff --git a/pages/aws/index.html b/pages/aws/index.html
index 74784e5db..f7990bb30 100644
--- a/pages/aws/index.html
+++ b/pages/aws/index.html
@@ -93,6 +93,13 @@
.endpoint { grid-template-columns: 1fr; gap: 4px; }
}
</style>
+
+ <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1">
+ <meta property="og:site_name" content="three.ws">
+ <meta property="og:locale" content="en_US">
+ <meta property="og:image:alt" content="three.ws on AWS — three.ws">
+ <meta name="twitter:site" content="@trythreews">
+ <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"three.ws on AWS","description":"three.ws is an AWS Partner: the open-source 3D AI agent platform on AWS.","url":"https://three.ws/aws","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"},"primaryImageOfPage":"https://three.ws/screenshots/viewer.png"}]}</script>
</head>
<body>
<header>
diff --git a/pages/communities.html b/pages/communities.html
index 403489466..90448d189 100644
--- a/pages/communities.html
+++ b/pages/communities.html
@@ -20,13 +20,13 @@
<meta property="og:description" content="Each coin is its own live 3D world. Drop in your avatar and hang out with the community." />
<meta property="og:url" content="https://three.ws/communities" />
<meta name="twitter:card" content="summary_large_image" />
- <meta property="og:image" content="https://three.ws/og-image.png" />
+ <meta property="og:image" content="https://three.ws/api/page-og?s=crypto&amp;t=Coin+Communities&amp;d=Pick+a+coin%2C+drop+in+an+avatar%2C+and+walk+around+its+world+with+everyone+else+holding+it.+Each+coin+is+its+own+live+3D+community.&amp;p=%2Fcommunities" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta name="twitter:site" content="@trythreews" />
<meta name="twitter:title" content="Coin Communities · three.ws" />
<meta name="twitter:description" content="Pick a coin, drop in an avatar, and walk around its world with everyone else holding it. Each coin is its own live 3D community." />
- <meta name="twitter:image" content="https://three.ws/og-image.png" />
+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=crypto&amp;t=Coin+Communities&amp;d=Pick+a+coin%2C+drop+in+an+avatar%2C+and+walk+around+its+world+with+everyone+else+holding+it.+Each+coin+is+its+own+live+3D+community.&amp;p=%2Fcommunities" />
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
@@ -257,7 +257,13 @@
.cp-skel-stats { height: 80px; border-radius: 12px; background: rgba(255,255,255,0.05); margin-top: 22px; animation: pulse 1.3s ease-in-out infinite; }
.coin-profile-empty { padding: 60px 20px; text-align: center; color: var(--muted); }
</style>
- </head>
+
+ <link rel="canonical" href="https://three.ws/communities">
+ <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1">
+ <meta property="og:locale" content="en_US">
+ <meta property="og:image:alt" content="Coin Communities — three.ws">
+ <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"Coin Communities","description":"Pick a coin, drop in an avatar, and walk around its world with everyone else holding it. Each coin is its own live 3D community.","url":"https://three.ws/communities","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"},"primaryImageOfPage":"https://three.ws/api/page-og?s=crypto&amp;t=Coin+Communities&amp;d=Pick+a+coin%2C+drop+in+an+avatar%2C+and+walk+around+its+world+with+everyone+else+holding+it.+Each+coin+is+its+own+live+3D+community.&amp;p=%2Fcommunities"}]}</script>
+</head>
<body>
<header class="topbar">
<a class="brand" href="/"><span class="dot"></span>three.ws</a>
diff --git a/pages/galaxy.html b/pages/galaxy.html
index 192816af2..4d3d61cf4 100644
--- a/pages/galaxy.html
+++ b/pages/galaxy.html
@@ -17,14 +17,14 @@
content="Fly through a 3D constellation of AI agents, mapped by IBM Granite embeddings on watsonx.ai. Search by meaning and watch the matching stars light up."
/>
<meta property="og:url" content="https://three.ws/galaxy" />
- <meta property="og:image" content="https://three.ws/og-image.png" />
+ <meta property="og:image" content="https://three.ws/api/page-og?s=labs&amp;t=Agent+Galaxy&amp;d=Every+public+agent+embedded+by+IBM+Granite+on+watsonx.ai+into+a+navigable+3D+constellation+with+natural-language+semantic+search.&amp;p=%2Fgalaxy" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Agent Galaxy · three.ws × IBM Granite" />
<meta
name="twitter:description"
content="A 3D star-map of AI agents, positioned by meaning with IBM Granite on watsonx.ai."
/>
- <meta name="twitter:image" content="https://three.ws/og-image.png" />
+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=labs&amp;t=Agent+Galaxy&amp;d=Every+public+agent+embedded+by+IBM+Granite+on+watsonx.ai+into+a+navigable+3D+constellation+with+natural-language+semantic+search.&amp;p=%2Fgalaxy" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
@@ -34,7 +34,14 @@
<link rel="stylesheet" href="/style.css" />
<link rel="stylesheet" href="/nav.css" />
<link rel="stylesheet" href="/galaxy.css" />
- </head>
+
+ <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1">
+ <meta property="og:site_name" content="three.ws">
+ <meta property="og:locale" content="en_US">
+ <meta property="og:image:alt" content="Agent Galaxy — three.ws">
+ <meta name="twitter:site" content="@trythreews">
+ <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"Agent Galaxy","description":"Every public agent embedded by IBM Granite on watsonx.ai into a navigable 3D constellation with natural-language semantic search.","url":"https://three.ws/galaxy","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"},"primaryImageOfPage":"https://three.ws/api/page-og?s=labs&amp;t=Agent+Galaxy&amp;d=Every+public+agent+embedded+by+IBM+Granite+on+watsonx.ai+into+a+navigable+3D+constellation+with+natural-language+semantic+search.&amp;p=%2Fgalaxy"}]}</script>
+</head>
<body class="gx-body">
<header><div id="nav-container"></div></header>
diff --git a/pages/mirror.html b/pages/mirror.html
index 7063f03c2..a3859c262 100644
--- a/pages/mirror.html
+++ b/pages/mirror.html
@@ -11,7 +11,7 @@
<meta property="og:url" content="https://three.ws/mirror" />
<meta property="og:title" content="Copy Trading · three.ws" />
<meta property="og:description" content="Follow a high-performing agent; your agent mirrors its real trades within your spend policy. Find a leader by an honest, on-chain track record." />
- <meta property="og:image" content="https://three.ws/api/page-og?s=crypto&amp;t=Copy+Trading&amp;d=Follow+a+high-performing+agent%3B+your+agent+mirrors+its+real+trades+within+your+spend+policy.&amp;p=%2Fmirror" />
+ <meta property="og:image" content="https://three.ws/api/page-og?s=crypto&amp;t=Copy+Trading&amp;d=Follow+a+high-performing+agent+and+your+own+agent+mirrors+its+real+trades%2C+proportionally+and+strictly+within+your+spend+policy.&amp;p=%2Fmirror" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta name="twitter:card" content="summary_large_image" />
@@ -80,7 +80,13 @@
.mp-safety b { color: rgba(255,255,255,.55); font-weight: 500; }
.mp-divider { height: 1px; background: rgba(255,255,255,.06); margin: 48px 0 0; }
</style>
- </head>
+
+ <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1">
+ <meta property="og:locale" content="en_US">
+ <meta property="og:image:alt" content="Copy Trading — three.ws">
+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=crypto&amp;amp;t=Copy+Trading&amp;amp;d=Follow+a+high-performing+agent+and+your+own+agent+mirrors+its+real+trades%2C+proportionally+and+strictly+within+your+spend+policy.&amp;amp;p=%2Fmirror">
+ <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"Copy Trading","description":"Follow a high-performing agent and your own agent mirrors its real trades, proportionally and strictly within your spend policy.","url":"https://three.ws/mirror","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"},"primaryImageOfPage":"https://three.ws/api/page-og?s=crypto&amp;t=Copy+Trading&amp;d=Follow+a+high-performing+agent+and+your+own+agent+mirrors+its+real+trades%2C+proportionally+and+strictly+within+your+spend+policy.&amp;p=%2Fmirror"}]}</script>
+</head>
<body>
<header><div id="nav-container"></div></header>
<script src="/nav.js"></script>
diff --git a/pages/nim-forge.html b/pages/nim-forge.html
index 94c184f78..9096a2396 100644
--- a/pages/nim-forge.html
+++ b/pages/nim-forge.html
@@ -100,7 +100,26 @@
.nf-download:hover { background: var(--surface-2, rgba(255,255,255,0.12)); }
.nf-err { color: #fca5a5; font: 500 13px/1.5 var(--font-mono, monospace); max-width: 50ch; word-break: break-word; }
</style>
- </head>
+
+ <link rel="canonical" href="https://three.ws/nim-forge">
+ <meta property="og:type" content="website">
+ <meta property="og:site_name" content="three.ws">
+ <meta property="og:locale" content="en_US">
+ <meta property="og:title" content="TRELLIS NIM Forge · three.ws">
+ <meta property="og:description" content="Drop in a photo, get a textured 3D model, reconstructed on a self-hosted Microsoft TRELLIS NIM. Single-hop image to GLB.">
+ <meta property="og:url" content="https://three.ws/nim-forge">
+ <meta property="og:image" content="https://three.ws/api/page-og?s=build&amp;t=TRELLIS+NIM+Forge&amp;d=Drop+in+a+photo%2C+get+a+textured+3D+model%2C+reconstructed+on+a+self-hosted+Microsoft+TRELLIS+NIM.+Single-hop+image+to+GLB.&amp;p=%2Fnim-forge">
+ <meta property="og:image:width" content="1200">
+ <meta property="og:image:height" content="630">
+ <meta property="og:image:type" content="image/png">
+ <meta property="og:image:alt" content="TRELLIS NIM Forge — three.ws">
+ <meta name="twitter:card" content="summary_large_image">
+ <meta name="twitter:site" content="@trythreews">
+ <meta name="twitter:title" content="TRELLIS NIM Forge · three.ws">
+ <meta name="twitter:description" content="Drop in a photo, get a textured 3D model, reconstructed on a self-hosted Microsoft TRELLIS NIM. Single-hop image to GLB.">
+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=build&amp;t=TRELLIS+NIM+Forge&amp;d=Drop+in+a+photo%2C+get+a+textured+3D+model%2C+reconstructed+on+a+self-hosted+Microsoft+TRELLIS+NIM.+Single-hop+image+to+GLB.&amp;p=%2Fnim-forge">
+ <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"TRELLIS NIM Forge","description":"Drop in a photo, get a textured 3D model, reconstructed on a self-hosted Microsoft TRELLIS NIM. Single-hop image to GLB.","url":"https://three.ws/nim-forge","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"},"primaryImageOfPage":"https://three.ws/api/page-og?s=build&t=TRELLIS+NIM+Forge&d=Drop+in+a+photo%2C+get+a+textured+3D+model%2C+reconstructed+on+a+self-hosted+Microsoft+TRELLIS+NIM.+Single-hop+image+to+GLB.&p=%2Fnim-forge"}]}</script>
+</head>
<body>
<main class="nf-main">
<header class="nf-head">
diff --git a/pages/play.html b/pages/play.html
index 99450f0dd..545b2af5c 100644
--- a/pages/play.html
+++ b/pages/play.html
@@ -35,17 +35,23 @@
<meta property="og:title" content="Play · Coin Communities" />
<meta property="og:description" content="A browser isometric MMO on three.ws — join coin communities, gather, fight, trade, explore." />
<meta property="og:url" content="https://three.ws/play" />
- <meta property="og:image" content="https://three.ws/og-image.png" />
+ <meta property="og:image" content="https://three.ws/api/page-og?s=crypto&amp;t=Play&amp;d=Jump+into+a+live+coin+community+world+and+explore+it+with+your+avatar.&amp;p=%2Fplay" />
<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:site" content="@trythreews" />
<meta name="twitter:title" content="Play · Coin Communities — three.ws" />
<meta name="twitter:description" content="Play in your coin's 3D community world. Walk, chat, and hang out with fellow holders." />
- <meta name="twitter:image" content="https://three.ws/og-image.png" />
+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=crypto&amp;t=Play&amp;d=Jump+into+a+live+coin+community+world+and+explore+it+with+your+avatar.&amp;p=%2Fplay" />
<link rel="stylesheet" href="/src/game/coincommunities.css" />
- </head>
+
+ <link rel="canonical" href="https://three.ws/play">
+ <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1">
+ <meta property="og:locale" content="en_US">
+ <meta property="og:image:alt" content="Play — three.ws">
+ <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"Play","description":"Jump into a live coin community world and explore it with your avatar.","url":"https://three.ws/play","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"},"primaryImageOfPage":"https://three.ws/api/page-og?s=crypto&amp;t=Play&amp;d=Jump+into+a+live+coin+community+world+and+explore+it+with+your+avatar.&amp;p=%2Fplay"}]}</script>
+</head>
<body>
<div id="kx-loading">
<div class="kx-loading-card">
diff --git a/pages/pricing.html b/pages/pricing.html
index 57becd14b..bacf76967 100644
--- a/pages/pricing.html
+++ b/pages/pricing.html
@@ -15,7 +15,7 @@
content="Free during open beta. Pro and Enterprise plans for teams shipping 3D AI agents at scale."
/>
<meta property="og:url" content="https://three.ws/pricing" />
- <meta property="og:image" content="https://three.ws/og-image.png" />
+ <meta property="og:image" content="https://three.ws/api/page-og?s=main&amp;t=Pricing&amp;d=Plans+and+pricing+for+three.ws%3A+free+forge+quota%2C+premium+passes%2C+and+pay-per-use+API+surfaces.&amp;p=%2Fpricing" />
<meta name="twitter:card" content="summary_large_image" />
<link rel="canonical" href="https://three.ws/pricing" />
<link rel="icon" href="/favicon.ico" sizes="any" />
@@ -31,7 +31,18 @@
<link rel="stylesheet" href="/fonts/fonts.css" />
<link rel="stylesheet" href="/mobile.css" />
<script defer src="/footer-newsletter.js"></script>
- </head>
+
+ <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1">
+ <meta property="og:type" content="website">
+ <meta property="og:site_name" content="three.ws">
+ <meta property="og:locale" content="en_US">
+ <meta property="og:image:alt" content="Pricing — three.ws">
+ <meta name="twitter:site" content="@trythreews">
+ <meta name="twitter:title" content="Pricing · three.ws">
+ <meta name="twitter:description" content="Plans and pricing for three.ws: free forge quota, premium passes, and pay-per-use API surfaces.">
+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=main&amp;amp;t=Pricing&amp;amp;d=Plans+and+pricing+for+three.ws%3A+free+forge+quota%2C+premium+passes%2C+and+pay-per-use+API+surfaces.&amp;amp;p=%2Fpricing">
+ <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"Pricing","description":"Plans and pricing for three.ws: free forge quota, premium passes, and pay-per-use API surfaces.","url":"https://three.ws/pricing","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"},"primaryImageOfPage":"https://three.ws/api/page-og?s=main&amp;t=Pricing&amp;d=Plans+and+pricing+for+three.ws%3A+free+forge+quota%2C+premium+passes%2C+and+pay-per-use+API+surfaces.&amp;p=%2Fpricing"}]}</script>
+</head>
<body>
<a href="#main-content" class="h-skip-link">Skip to main content</a>
diff --git a/pages/swarms.html b/pages/swarms.html
index e1121a42c..97716bb1b 100644
--- a/pages/swarms.html
+++ b/pages/swarms.html
@@ -17,7 +17,7 @@
property="og:description"
content="A self-organizing trading guild of AI agents: pooled treasury, shared consensus signals, real pro-rata on-chain payouts — all auditable."
/>
- <meta property="og:image" content="https://three.ws/api/page-og?s=crypto&amp;t=Trading+Swarms&amp;d=Pool+capital+with+other+AI+agents+into+one+auditable+treasury+that+trades+on+consensus+and+pays+profit+back+pro-rata.&amp;p=%2Fswarms" />
+ <meta property="og:image" content="https://three.ws/api/page-og?s=crypto&amp;t=Trading+Swarms&amp;d=Coordinated+groups+of+trading+agents+working+a+shared+strategy%2C+with+live+positions+and+performance.&amp;p=%2Fswarms" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta name="twitter:card" content="summary_large_image" />
@@ -38,7 +38,12 @@
<link rel="stylesheet" href="/footer.css" />
<link rel="canonical" href="https://three.ws/swarms" />
<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1" />
- </head>
+
+ <meta property="og:locale" content="en_US">
+ <meta property="og:image:alt" content="Trading Swarms — three.ws">
+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=crypto&amp;amp;t=Trading+Swarms&amp;amp;d=Coordinated+groups+of+trading+agents+working+a+shared+strategy%2C+with+live+positions+and+performance.&amp;amp;p=%2Fswarms">
+ <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"Trading Swarms","description":"Coordinated groups of trading agents working a shared strategy, with live positions and performance.","url":"https://three.ws/swarms","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"},"primaryImageOfPage":"https://three.ws/api/page-og?s=crypto&amp;t=Trading+Swarms&amp;d=Coordinated+groups+of+trading+agents+working+a+shared+strategy%2C+with+live+positions+and+performance.&amp;p=%2Fswarms"}]}</script>
+</head>
<body>
<header><div id="nav-container"></div></header>
<script src="/nav.js"></script>
diff --git a/pages/three-token.html b/pages/three-token.html
index 7b59b4cf2..e3d7d1a5b 100644
--- a/pages/three-token.html
+++ b/pages/three-token.html
@@ -12,14 +12,14 @@
<meta property="og:type" content="website" />
<meta property="og:site_name" content="three.ws" />
<meta property="og:url" content="https://three.ws/three-token" />
- <meta property="og:image" content="https://three.ws/og-image.png" />
+ <meta property="og:image" content="https://three.ws/api/page-og?s=crypto&amp;t=%24THREE+Token&amp;d=The+%24THREE+protocol+token%3A+live+price%2C+bonding-curve+chart%2C+streaming+trades%2C+and+one-click+buy.&amp;p=%2Fthree-token" />
<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:site" content="@trythreews" />
<meta name="twitter:title" content="$THREE · Live price, chart & trades · three.ws" />
<meta name="twitter:description" content="The $THREE protocol token — live price, bonding-curve chart, streaming trades, and one-click buy. The only coin powering the three.ws agent economy." />
- <meta name="twitter:image" content="https://three.ws/og-image.png" />
+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=crypto&amp;t=%24THREE+Token&amp;d=The+%24THREE+protocol+token%3A+live+price%2C+bonding-curve+chart%2C+streaming+trades%2C+and+one-click+buy.&amp;p=%2Fthree-token" />
<meta name="theme-color" content="#0a0a0d" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
@@ -27,7 +27,13 @@
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
<link rel="manifest" href="/manifest.webmanifest" />
- </head>
+
+ <link rel="canonical" href="https://three.ws/three-token">
+ <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1">
+ <meta property="og:locale" content="en_US">
+ <meta property="og:image:alt" content="$THREE Token — three.ws">
+ <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"$THREE Token","description":"The $THREE protocol token: live price, bonding-curve chart, streaming trades, and one-click buy.","url":"https://three.ws/three-token","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"},"primaryImageOfPage":"https://three.ws/api/page-og?s=crypto&amp;t=%24THREE+Token&amp;d=The+%24THREE+protocol+token%3A+live+price%2C+bonding-curve+chart%2C+streaming+trades%2C+and+one-click+buy.&amp;p=%2Fthree-token"}]}</script>
+</head>
<body>
<script type="module" src="/src/three-token-page.js"></script>
</body>
diff --git a/public/demos/index.html b/public/demos/index.html
index 983c6a3fd..80d842c3f 100644
--- a/public/demos/index.html
+++ b/public/demos/index.html
@@ -82,7 +82,27 @@
line-height: 1.55;
}
</style>
- </head>
+
+ <meta name="description" content="Index of live demos across the platform: viewers, agents, payments, and experiments.">
+ <link rel="canonical" href="https://three.ws/demos">
+ <meta property="og:type" content="website">
+ <meta property="og:site_name" content="three.ws">
+ <meta property="og:locale" content="en_US">
+ <meta property="og:title" content="Lab Demos · three.ws">
+ <meta property="og:description" content="Index of live demos across the platform: viewers, agents, payments, and experiments.">
+ <meta property="og:url" content="https://three.ws/demos">
+ <meta property="og:image" content="https://three.ws/api/page-og?s=main&amp;t=Lab+Demos&amp;d=Index+of+live+demos+across+the+platform%3A+viewers%2C+agents%2C+payments%2C+and+experiments.&amp;p=%2Fdemos">
+ <meta property="og:image:width" content="1200">
+ <meta property="og:image:height" content="630">
+ <meta property="og:image:type" content="image/png">
+ <meta property="og:image:alt" content="Lab Demos — three.ws">
+ <meta name="twitter:card" content="summary_large_image">
+ <meta name="twitter:site" content="@trythreews">
+ <meta name="twitter:title" content="Lab Demos · three.ws">
+ <meta name="twitter:description" content="Index of live demos across the platform: viewers, agents, payments, and experiments.">
+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=main&amp;t=Lab+Demos&amp;d=Index+of+live+demos+across+the+platform%3A+viewers%2C+agents%2C+payments%2C+and+experiments.&amp;p=%2Fdemos">
+ <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"Lab Demos","description":"Index of live demos across the platform: viewers, agents, payments, and experiments.","url":"https://three.ws/demos","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"},"primaryImageOfPage":"https://three.ws/api/page-og?s=main&t=Lab+Demos&d=Index+of+live+demos+across+the+platform%3A+viewers%2C+agents%2C+payments%2C+and+experiments.&p=%2Fdemos"}]}</script>
+</head>
<body>
<header><div id="nav-container"></div></header>
diff --git a/public/legal/content-policy.html b/public/legal/content-policy.html
index e7f4a37a4..2a29f83dd 100644
--- a/public/legal/content-policy.html
+++ b/public/legal/content-policy.html
@@ -36,13 +36,13 @@
<meta property="og:title" content="Content Policy · three.ws">
<meta property="og:description" content="Content policy for three.ws — what you may publish, mint, and monetise on the platform.">
<meta property="og:url" content="https://three.ws/legal/content-policy">
- <meta property="og:image" content="https://three.ws/api/page-og?s=legal&amp;t=Content+Policy&amp;d=What+you+may+publish+on+three.ws.&amp;p=%2Flegal%2Fcontent-policy">
+ <meta property="og:image" content="https://three.ws/api/page-og?s=legal&amp;t=Content+Policy&amp;d=What+you+may+publish%2C+mint%2C+and+monetise+on+the+platform.&amp;p=%2Flegal%2Fcontent-policy">
<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="Content Policy · three.ws">
<meta name="twitter:description" content="What you may publish, mint, and monetise on three.ws.">
- <meta name="twitter:image" content="https://three.ws/api/page-og?s=legal&amp;t=Content+Policy&amp;d=What+you+may+publish+on+three.ws.&amp;p=%2Flegal%2Fcontent-policy">
+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=legal&amp;t=Content+Policy&amp;d=What+you+may+publish%2C+mint%2C+and+monetise+on+the+platform.&amp;p=%2Flegal%2Fcontent-policy">
<script type="application/ld+json">{"@context":"https://schema.org","@type":"WebPage","name":"Content Policy","description":"Content policy for three.ws.","url":"https://three.ws/legal/content-policy","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"}}</script>
<meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1">
diff --git a/public/x402-stripe.html b/public/x402-stripe.html
index 9068071bc..153856e0e 100644
--- a/public/x402-stripe.html
+++ b/public/x402-stripe.html
@@ -394,6 +394,20 @@
*, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
</style>
+
+ <meta name="robots" content="index, follow, max-image-preview:large, max-snippet:-1">
+ <meta property="og:site_name" content="three.ws">
+ <meta property="og:locale" content="en_US">
+ <meta property="og:image" content="https://three.ws/api/page-og?s=crypto&amp;t=x402+Catalog&amp;d=A+live+catalog+of+pay-per-call+APIs+settled+on-chain+in+USDC+over+the+x402+protocol.+Search%2C+inspect+the+schema%2C+and+run+any+endpoint.&amp;p=%2Fx402">
+ <meta property="og:image:width" content="1200">
+ <meta property="og:image:height" content="630">
+ <meta property="og:image:type" content="image/png">
+ <meta property="og:image:alt" content="x402 Catalog — three.ws">
+ <meta name="twitter:site" content="@trythreews">
+ <meta name="twitter:title" content="x402 Catalog · three.ws">
+ <meta name="twitter:description" content="A live catalog of pay-per-call APIs settled on-chain in USDC over the x402 protocol. Search, inspect the schema, and run any endpoint.">
+ <meta name="twitter:image" content="https://three.ws/api/page-og?s=crypto&amp;t=x402+Catalog&amp;d=A+live+catalog+of+pay-per-call+APIs+settled+on-chain+in+USDC+over+the+x402+protocol.+Search%2C+inspect+the+schema%2C+and+run+any+endpoint.&amp;p=%2Fx402">
+ <script type="application/ld+json">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","name":"x402 Catalog","description":"A live catalog of pay-per-call APIs settled on-chain in USDC over the x402 protocol. Search, inspect the schema, and run any endpoint.","url":"https://three.ws/x402","isPartOf":{"@type":"WebSite","name":"three.ws","url":"https://three.ws"},"primaryImageOfPage":"https://three.ws/api/page-og?s=crypto&t=x402+Catalog&d=A+live+catalog+of+pay-per-call+APIs+settled+on-chain+in+USDC+over+the+x402+protocol.+Search%2C+inspect+the+schema%2C+and+run+any+endpoint.&p=%2Fx402"}]}</script>
</head>
<body>
diff --git a/src/forge-prompt-gen.js b/src/forge-prompt-gen.js
new file mode 100644
index 000000000..04e653d2a
--- /dev/null
+++ b/src/forge-prompt-gen.js
@@ -0,0 +1,230 @@
+// Forge prompt generator: truly random prompts that reliably forge well.
+//
+// Instead of sampling a fixed list, "Surprise me" and the example chips draw
+// from curated slot grammars: each family combines a subject pool with only
+// the materials, finishes, and bases that suit it, so every one of the tens
+// of thousands of possible prompts stays inside what the TRELLIS lane
+// reconstructs beautifully (single isolated subject, chunky silhouette, a
+// named material, no thin wires, no glass-only builds, no multi-object
+// scenes). The family design mirrors the prompt coach in
+// forge-prompt-studio.js: every generated prompt carries a material word and
+// never trips the multi-subject heuristics.
+//
+// Pure module, no DOM: consumed by the Forge page UI and unit-tested
+// directly (tests/forge-prompt-gen.test.js). `rng` is injectable so tests
+// can seed it; the UI passes nothing and gets Math.random.
+
+const pick = (arr, rng) => arr[Math.floor(rng() * arr.length)];
+// Article-aware join for slots that can start with a vowel ("an amethyst
+// geode"). Good enough for this vocabulary; no silent-h words in the pools.
+const art = (phrase) => `${/^[aeiou]/.test(phrase) ? 'an' : 'a'} ${phrase}`;
+
+// ── Family: statues & sculpture ─────────────────────────────────────────
+// Sculpture is the single strongest TRELLIS category: solid silhouette,
+// and patina/roughness reads as intentional surface detail.
+const STATUE_SUBJECTS = [
+ 'an astronaut',
+ 'a ballerina mid-twirl',
+ 'a seated lion',
+ 'a coiled dragon',
+ 'a meditating monk',
+ 'a chess knight',
+ 'a perched owl',
+ 'a rearing horse',
+ 'a leaping koi fish',
+ 'a curled-up cat',
+ 'a standing bear',
+ 'a twisting abstract ribbon',
+];
+const STATUE_MATERIALS = [
+ ['weathered bronze', 'green patina'],
+ ['carved white marble', 'soft grey veining'],
+ ['polished black obsidian', 'glassy sheen'],
+ ['terracotta', 'warm matte finish'],
+ ['carved jade', 'polished deep green'],
+ ['sandstone', 'wind-worn texture'],
+ ['cast concrete', 'brutalist finish'],
+ ['gilded bronze', 'warm gold sheen'],
+ ['carved walnut', 'oiled wood grain'],
+ ['celadon ceramic', 'crackle glaze'],
+];
+const STATUE_BASES = [
+ 'on a square stone plinth',
+ 'on a round marble base',
+ 'on a black granite pedestal',
+ 'museum piece, soft studio light',
+];
+
+// ── Family: creature figurines ──────────────────────────────────────────
+// Style pairs a material adjective with the finish cue that sells it.
+const FIGURINE_STYLES = [
+ ['low-poly', 'faceted matte surface'],
+ ['glazed porcelain', 'soft studio light'],
+ ['plush felt', 'stitched seams'],
+ ['brass clockwork', 'polished gears'],
+ ['carved wood', 'hand-painted details'],
+ ['hand-sculpted clay', 'chunky rounded shapes'],
+ ['knitted wool', 'chunky yarn texture'],
+];
+const FIGURINE_ANIMALS = [
+ 'red fox',
+ 'axolotl',
+ 'hedgehog',
+ 'barn owl',
+ 'octopus',
+ 'humpback whale',
+ 'sea turtle',
+ 'bear cub',
+ 'tree frog',
+ 'penguin',
+ 'highland cow',
+ 'dachshund',
+ 'chameleon',
+ 'baby elephant',
+];
+
+// ── Family: potted plants ───────────────────────────────────────────────
+const PLANTS = [
+ 'monstera',
+ 'fiddle-leaf fig',
+ 'jade succulent',
+ 'aloe vera',
+ 'trailing pothos',
+ 'bonsai juniper',
+ 'barrel cactus',
+ 'lavender bush',
+ 'boston fern',
+ 'flowering orchid',
+];
+const POTS = [
+ 'a terracotta pot',
+ 'a glazed cobalt ceramic pot',
+ 'a ribbed concrete planter',
+ 'a woven rattan basket',
+ 'a hammered copper pot',
+ 'a matte black ceramic planter',
+ 'a speckled stoneware pot',
+];
+
+// ── Family: crystals & geodes ───────────────────────────────────────────
+const MINERALS = [
+ 'amethyst',
+ 'rose quartz',
+ 'emerald fluorite',
+ 'golden citrine',
+ 'deep blue azurite',
+ 'smoky quartz',
+ 'turquoise',
+ 'malachite',
+];
+
+// ── Family: food & bakery ───────────────────────────────────────────────
+const FOODS = [
+ ['a glazed chocolate donut with rainbow sprinkles', 'glossy icing'],
+ ['a layered strawberry cake on a ceramic stand', 'smooth buttercream'],
+ ['a rustic sourdough loaf', 'floury matte crust'],
+ ['a ripe pomegranate split open', 'glossy ruby seeds'],
+ ['a stack of pastel macarons', 'glossy smooth shells'],
+ ['a honey jar with a wooden dipper', 'warm golden light'],
+ ['a steaming bowl of ramen', 'glossy ceramic bowl'],
+ ['a watermelon with a cut wedge', 'glossy rind, juicy red flesh'],
+];
+
+// ── Family: crafted props ───────────────────────────────────────────────
+// Each builder owns its object's compatible variants, so a teapot never
+// comes out in wrought iron nor a lantern in buttercream.
+const PROP_BUILDERS = [
+ (rng) =>
+ `a glazed ceramic teapot, ${pick(['cobalt blue', 'oxblood red', 'matte sage green', 'speckled cream'], rng)}, studio lighting`,
+ (rng) =>
+ `a ${pick(['brass', 'copper', 'wrought iron'], rng)} storm lantern, weathered patina, warm glow`,
+ (rng) => `a treasure chest, ${pick(['dark oak', 'weathered cedar', 'ebony wood'], rng)}, tarnished iron bands`,
+ (rng) =>
+ `a ${pick(['worn cognac leather', 'mustard velvet', 'deep green velvet', 'charcoal wool'], rng)} armchair, studio lighting`,
+ (rng) =>
+ `a knight helm, ${pick(['dark polished steel', 'brass-trimmed steel', 'blackened iron'], rng)}, plumed crest`,
+ (rng) =>
+ `a tall ceramic vase, ${pick(['crackle-glazed turquoise', 'matte terracotta', 'cobalt-striped white'], rng)}`,
+ (rng) =>
+ `a retro radio, ${pick(['cream bakelite', 'mint green enamel', 'walnut with brass dials'], rng)}`,
+ (rng) =>
+ `a vintage film camera, brushed aluminium, ${pick(['black', 'tan', 'burgundy'], rng)} leather grip`,
+ (rng) =>
+ `a wizard staff, gnarled ${pick(['oak', 'blackthorn', 'driftwood'], rng)}, embedded ${pick(['amber', 'sapphire', 'emerald'], rng)} gem`,
+ (rng) =>
+ `a stack of hardcover books, ${pick(['aged cloth binding', 'embossed leather covers', 'linen spines, gilt titles'], rng)}`,
+];
+
+// ── Family: cozy miniatures ─────────────────────────────────────────────
+const MINI_BUILDERS = [
+ (rng) =>
+ `a cozy mushroom cottage, thatched roof, ${pick(['moss-covered stone base', 'round oak door', 'stone chimney'], rng)}`,
+ (rng) => `a small lighthouse, ${pick(['red', 'teal', 'navy'], rng)}-striped enamel paint, rocky stone base`,
+ (rng) =>
+ `a low-poly camper van, ${pick(['pastel teal', 'butter yellow', 'salmon pink'], rng)} paint, chrome bumper`,
+ (rng) =>
+ `a hot air balloon, ${pick(['striped red-cream', 'patchwork rainbow', 'teal-gold'], rng)} canvas, wicker basket`,
+ (rng) => `a dutch windmill, ${pick(['red brick', 'whitewashed stone', 'dark timber wood'], rng)} tower, canvas sails`,
+ (rng) => `a tiny houseboat, painted wooden hull, ${pick(['sage green', 'ochre', 'sky blue'], rng)} rounded cabin`,
+];
+
+// One builder per family. Exported so tests can exercise each family
+// directly; generateForgePrompt samples them uniformly.
+export const FAMILIES = [
+ function statue(rng) {
+ const [adj, detail] = pick(STATUE_MATERIALS, rng);
+ return `a ${adj} statue of ${pick(STATUE_SUBJECTS, rng)}, ${detail}, ${pick(STATUE_BASES, rng)}`;
+ },
+ function figurine(rng) {
+ const [adj, finish] = pick(FIGURINE_STYLES, rng);
+ return `a ${adj} ${pick(FIGURINE_ANIMALS, rng)} figurine, ${finish}`;
+ },
+ function plant(rng) {
+ return `a potted ${pick(PLANTS, rng)} in ${pick(POTS, rng)}, soft studio light`;
+ },
+ function crystal(rng) {
+ const mineral = pick(MINERALS, rng);
+ return rng() < 0.5
+ ? `a cluster of ${mineral} crystals on raw grey rock, glossy facets`
+ : `${art(mineral)} geode, sparkling crystal core, soft studio light`;
+ },
+ function food(rng) {
+ const [subject, finish] = pick(FOODS, rng);
+ return `${subject}, ${finish}`;
+ },
+ function prop(rng) {
+ return pick(PROP_BUILDERS, rng)(rng);
+ },
+ function mini(rng) {
+ return pick(MINI_BUILDERS, rng)(rng);
+ },
+];
+
+// Family draw weights, proportional to each grammar's combinatorial size:
+// uniform selection would over-sample the small pools (food, crystals) and
+// make repeats feel common. Order matches FAMILIES.
+const FAMILY_WEIGHTS = [5, 3, 2, 1, 1, 2, 1];
+const WEIGHTED_FAMILY_INDEX = FAMILY_WEIGHTS.flatMap((w, i) => Array(w).fill(i));
+
+/** One random prompt, guaranteed to be a single isolated subject with a
+ * material cue (the shape the Forge lane meshes cleanest). */
+export function generateForgePrompt(rng = Math.random) {
+ return FAMILIES[pick(WEIGHTED_FAMILY_INDEX, rng)](rng);
+}
+
+/** `count` distinct prompts, none of which appear in `avoid`, used so
+ * "Surprise me" and "More ideas" never echo what is already on screen.
+ * `maxLength` filters to prompts that fit compact UI (example chips). */
+export function generateDistinctForgePrompts(count, avoid = new Set(), rng = Math.random, maxLength = Infinity) {
+ const out = [];
+ const seen = new Set(avoid);
+ // The combinatorial space is ~10^4, so collisions are rare; the attempt
+ // cap only guards against a caller asking for more than the space holds.
+ for (let attempts = 0; out.length < count && attempts < count * 40; attempts++) {
+ const prompt = generateForgePrompt(rng);
+ if (prompt.length > maxLength || seen.has(prompt)) continue;
+ seen.add(prompt);
+ out.push(prompt);
+ }
+ return out;
+}
diff --git a/src/forge-prompt-studio.js b/src/forge-prompt-studio.js
index c974ccd67..1572a1f8c 100644
--- a/src/forge-prompt-studio.js
+++ b/src/forge-prompt-studio.js
@@ -1,68 +1,20 @@
// Forge prompt studio — the text-mode authoring aids that sit under the
-// composer: a curated prompt library behind "Surprise me" and "More ideas",
-// a live prompt coach that grades what you typed against how the model
-// actually reconstructs, and an honest character counter.
+// composer: a combinatorial prompt generator behind "Surprise me" and
+// "More ideas", a live prompt coach that grades what you typed against how
+// the model actually reconstructs, and an honest character counter.
//
-// All client-side. The library is hand-authored product content (single
-// isolated subjects with material/lighting cues — the shape Forge meshes
-// cleanest), not sampled data, and nothing here fakes a network call.
+// All client-side. Prompts come from src/forge-prompt-gen.js: curated slot
+// grammars whose every combination is a single isolated subject with a
+// material/lighting cue (the shape Forge meshes cleanest), so the ideas are
+// genuinely random without ever leaving the model's sweet spot. Nothing here
+// fakes a network call.
-const MAXLEN = 1000;
+import { generateDistinctForgePrompts } from './forge-prompt-gen.js';
-// Curated starters — every one is a single, isolated object with a material
-// and/or lighting cue, mirroring the guidance in the Forge FAQ. Grouped only
-// for authoring clarity; consumed as one flat pool.
-const LIBRARY = [
- // Creatures & characters
- 'a low-poly red fox, sitting, soft studio light',
- 'a chubby axolotl, glossy pink skin, plain background',
- 'a tiny brass clockwork owl, polished metal',
- 'a stone golem, mossy granite, weathered',
- 'a cartoon astronaut, matte white suit, neutral pose',
- 'a porcelain rabbit figurine, glazed, soft shadows',
- 'a wooden articulated artist mannequin, light oak',
- 'a plush felt dinosaur toy, stitched seams',
- // Props & objects
- 'a vintage film camera, brushed aluminium and black leather',
- 'a glazed ceramic teapot, cobalt blue, studio lighting',
- 'a worn leather armchair, studio lighting, plain background',
- 'an antique brass compass, weathered patina',
- 'a mechanical keyboard, translucent keycaps, backlit',
- 'a hand-forged iron axe, dark steel, leather grip',
- 'a crystal perfume bottle, faceted glass, gold cap',
- 'a retro rotary telephone, cream bakelite',
- 'a stack of hardcover books, aged cloth binding',
- 'a wireless over-ear headphone, matte charcoal',
- 'a single running shoe, knit upper, rubber sole',
- 'a brass desk lamp, articulated arm, enamel shade',
- 'a treasure chest, dark wood and tarnished iron bands',
- 'an espresso machine, stainless steel and chrome',
- // Nature & food
- 'a potted monstera plant, terracotta pot',
- 'a bonsai juniper in a shallow stone tray',
- 'a glazed donut with sprinkles, soft studio light',
- 'a ripe pomegranate, split open, glossy seeds',
- 'a cluster of amethyst crystals on raw rock',
- 'a single autumn maple leaf, deep amber',
- 'a honey jar with wooden dipper, warm light',
- 'a coral fan, calcified white, plain background',
- // Sci-fi & fantasy
- 'a sci-fi combat helmet, brushed metal, scuffed paint',
- 'a glowing mana potion in a corked vial, teal liquid',
- 'a hovering recon drone, white plastic and carbon fibre',
- 'a wizard staff, gnarled oak with an embedded gem',
- 'a retro ray gun, chrome with red accents',
- 'an enchanted spellbook, leather cover, brass clasp',
- 'a modular space station segment, white panels',
- 'a knight helm, dark polished steel, plumed crest',
- // Vehicles & architecture
- 'a low-poly camper van, pastel teal paint',
- 'a wooden sailboat model, white canvas sails',
- 'a vintage scooter, mint green, chrome trim',
- 'a small lighthouse, red and white stripes',
- 'a cozy mushroom cottage, thatched roof',
- 'a hot air balloon, striped canvas, wicker basket',
-];
+const MAXLEN = 1000;
+// Example chips stay scannable: only prompts short enough to read at a
+// glance are seeded into chip UI ("Surprise me" uses the full range).
+const CHIP_MAXLEN = 64;
const $ = (id) => document.getElementById(id);
@@ -73,6 +25,7 @@ const els = {
count: $('prompt-count'),
examples: $('examples'),
chipsMore: $('chips-more'),
+ emptyStarters: $('empty-starters'),
};
// Heuristic lexicons used by the coach. These describe how TRELLIS-style
@@ -123,6 +76,15 @@ const MATERIAL_WORDS = [
'weathered',
'rusted',
'patina',
+ 'clay',
+ 'obsidian',
+ 'jade',
+ 'wool',
+ 'timber',
+ 'sandstone',
+ 'brick',
+ 'cloth',
+ 'linen',
];
const LIGHT_WORDS = ['studio', 'lighting', 'light', 'backlit', 'soft shadows', 'soft light', 'neutral'];
// Signals that the prompt is asking for a scene rather than one object.
@@ -145,10 +107,16 @@ function hasAny(text, words) {
return words.some((w) => text.includes(w));
}
+// Scene words need whole-word matching: substring matching flags innocent
+// subjects ("mushroom" and "heirloom" both contain "room").
+function hasSceneWord(text) {
+ return SCENE_WORDS.some((w) => new RegExp(`\\b${w}\\b`).test(text));
+}
+
// Count subjects loosely — an " and " joining two nouns, or several
// comma-separated clauses, both push the model toward a multi-object mesh.
function looksMultiSubject(text) {
- if (hasAny(text, SCENE_WORDS)) return true;
+ if (hasSceneWord(text)) return true;
if (/\b(two|three|four|several|a group of|a pair of|a set of)\b/.test(text)) return true;
// " x and y " where both sides carry a noun-ish token.
if (/\w+\s+and\s+\w+/.test(text) && !/black and white|red and white|salt and pepper/.test(text))
@@ -204,21 +172,9 @@ function updateCoach() {
}
}
-// Random pick(s) from the library, avoiding a given set of current values so
-// "Surprise me" and "More ideas" never echo what is already on screen.
-function pickDistinct(count, avoid = new Set()) {
- const pool = LIBRARY.filter((p) => !avoid.has(p));
- const out = [];
- while (out.length < count && pool.length) {
- const i = Math.floor(Math.random() * pool.length);
- out.push(pool.splice(i, 1)[0]);
- }
- return out;
-}
-
function surprise() {
if (!els.prompt) return;
- const [pick] = pickDistinct(1, new Set([els.prompt.value.trim()]));
+ const [pick] = generateDistinctForgePrompts(1, new Set([els.prompt.value.trim()]));
if (!pick) return;
els.prompt.value = pick;
updateCoach();
@@ -233,12 +189,12 @@ function surprise() {
function shuffleChips() {
if (!els.examples) return;
- // Seasonal presets (.chip--festive) are pinned — "More ideas" only rotates
+ // Seasonal presets (.chip--festive) are pinned: "More ideas" only rotates
// the regular library chips, never overwrites the festive prompts.
const chips = [...els.examples.querySelectorAll('.chip:not(.chip--festive)')];
if (!chips.length) return;
const current = new Set(chips.map((c) => c.textContent.trim()));
- const fresh = pickDistinct(chips.length, current);
+ const fresh = generateDistinctForgePrompts(chips.length, current, Math.random, CHIP_MAXLEN);
chips.forEach((chip, i) => {
const next = fresh[i];
if (!next) return;
@@ -257,10 +213,26 @@ function shuffleChips() {
els.chipsMore?.classList.add('is-rolling');
}
+// Every visit opens on a fresh random set; the static chip text in the HTML
+// is only the no-JS fallback. Covers both the composer's example chips and
+// the empty-stage starters, kept mutually distinct; festive (pinned
+// seasonal) chips are untouched.
+function seedChips() {
+ const chips = [els.examples, els.emptyStarters].flatMap((container) =>
+ container ? [...container.querySelectorAll('.chip:not(.chip--festive)')] : []
+ );
+ if (!chips.length) return;
+ const fresh = generateDistinctForgePrompts(chips.length, undefined, Math.random, CHIP_MAXLEN);
+ chips.forEach((chip, i) => {
+ if (fresh[i]) chip.textContent = fresh[i];
+ });
+}
+
if (els.prompt) {
els.prompt.addEventListener('input', updateCoach);
els.surprise?.addEventListener('click', surprise);
els.chipsMore?.addEventListener('click', shuffleChips);
+ seedChips();
// Reflect any value already present (remix ?prompt= prefill, restored draft).
updateCoach();
}
diff --git a/src/forge-studio/forge-prompt-studio.js b/src/forge-studio/forge-prompt-studio.js
index 8f818fd6d..8de6939a6 100644
--- a/src/forge-studio/forge-prompt-studio.js
+++ b/src/forge-studio/forge-prompt-studio.js
@@ -1,68 +1,20 @@
// Forge prompt studio — the text-mode authoring aids that sit under the
-// composer: a curated prompt library behind "Surprise me" and "More ideas",
-// a live prompt coach that grades what you typed against how the model
-// actually reconstructs, and an honest character counter.
+// composer: a combinatorial prompt generator behind "Surprise me" and
+// "More ideas", a live prompt coach that grades what you typed against how
+// the model actually reconstructs, and an honest character counter.
//
-// All client-side. The library is hand-authored product content (single
-// isolated subjects with material/lighting cues — the shape Forge meshes
-// cleanest), not sampled data, and nothing here fakes a network call.
+// All client-side. Prompts come from src/forge-prompt-gen.js: curated slot
+// grammars whose every combination is a single isolated subject with a
+// material/lighting cue (the shape Forge meshes cleanest), so the ideas are
+// genuinely random without ever leaving the model's sweet spot. Nothing here
+// fakes a network call.
-const MAXLEN = 1000;
+import { generateDistinctForgePrompts } from '../forge-prompt-gen.js';
-// Curated starters — every one is a single, isolated object with a material
-// and/or lighting cue, mirroring the guidance in the Forge FAQ. Grouped only
-// for authoring clarity; consumed as one flat pool.
-const LIBRARY = [
- // Creatures & characters
- 'a low-poly red fox, sitting, soft studio light',
- 'a chubby axolotl, glossy pink skin, plain background',
- 'a tiny brass clockwork owl, polished metal',
- 'a stone golem, mossy granite, weathered',
- 'a cartoon astronaut, matte white suit, neutral pose',
- 'a porcelain rabbit figurine, glazed, soft shadows',
- 'a wooden articulated artist mannequin, light oak',
- 'a plush felt dinosaur toy, stitched seams',
- // Props & objects
- 'a vintage film camera, brushed aluminium and black leather',
- 'a glazed ceramic teapot, cobalt blue, studio lighting',
- 'a worn leather armchair, studio lighting, plain background',
- 'an antique brass compass, weathered patina',
- 'a mechanical keyboard, translucent keycaps, backlit',
- 'a hand-forged iron axe, dark steel, leather grip',
- 'a crystal perfume bottle, faceted glass, gold cap',
- 'a retro rotary telephone, cream bakelite',
- 'a stack of hardcover books, aged cloth binding',
- 'a wireless over-ear headphone, matte charcoal',
- 'a single running shoe, knit upper, rubber sole',
- 'a brass desk lamp, articulated arm, enamel shade',
- 'a treasure chest, dark wood and tarnished iron bands',
- 'an espresso machine, stainless steel and chrome',
- // Nature & food
- 'a potted monstera plant, terracotta pot',
- 'a bonsai juniper in a shallow stone tray',
- 'a glazed donut with sprinkles, soft studio light',
- 'a ripe pomegranate, split open, glossy seeds',
- 'a cluster of amethyst crystals on raw rock',
- 'a single autumn maple leaf, deep amber',
- 'a honey jar with wooden dipper, warm light',
- 'a coral fan, calcified white, plain background',
- // Sci-fi & fantasy
- 'a sci-fi combat helmet, brushed metal, scuffed paint',
- 'a glowing mana potion in a corked vial, teal liquid',
- 'a hovering recon drone, white plastic and carbon fibre',
- 'a wizard staff, gnarled oak with an embedded gem',
- 'a retro ray gun, chrome with red accents',
- 'an enchanted spellbook, leather cover, brass clasp',
- 'a modular space station segment, white panels',
- 'a knight helm, dark polished steel, plumed crest',
- // Vehicles & architecture
- 'a low-poly camper van, pastel teal paint',
- 'a wooden sailboat model, white canvas sails',
- 'a vintage scooter, mint green, chrome trim',
- 'a small lighthouse, red and white stripes',
- 'a cozy mushroom cottage, thatched roof',
- 'a hot air balloon, striped canvas, wicker basket',
-];
+const MAXLEN = 1000;
+// Example chips stay scannable: only prompts short enough to read at a
+// glance are seeded into chip UI ("Surprise me" uses the full range).
+const CHIP_MAXLEN = 64;
const $ = (id) => document.getElementById(id);
@@ -73,6 +25,7 @@ const els = {
count: $('prompt-count'),
examples: $('examples'),
chipsMore: $('chips-more'),
+ emptyStarters: $('empty-starters'),
};
// Heuristic lexicons used by the coach. These describe how TRELLIS-style
@@ -123,6 +76,15 @@ const MATERIAL_WORDS = [
'weathered',
'rusted',
'patina',
+ 'clay',
+ 'obsidian',
+ 'jade',
+ 'wool',
+ 'timber',
+ 'sandstone',
+ 'brick',
+ 'cloth',
+ 'linen',
];
const LIGHT_WORDS = ['studio', 'lighting', 'light', 'backlit', 'soft shadows', 'soft light', 'neutral'];
// Signals that the prompt is asking for a scene rather than one object.
@@ -145,10 +107,16 @@ function hasAny(text, words) {
return words.some((w) => text.includes(w));
}
+// Scene words need whole-word matching: substring matching flags innocent
+// subjects ("mushroom" and "heirloom" both contain "room").
+function hasSceneWord(text) {
+ return SCENE_WORDS.some((w) => new RegExp(`\\b${w}\\b`).test(text));
+}
+
// Count subjects loosely — an " and " joining two nouns, or several
// comma-separated clauses, both push the model toward a multi-object mesh.
function looksMultiSubject(text) {
- if (hasAny(text, SCENE_WORDS)) return true;
+ if (hasSceneWord(text)) return true;
if (/\b(two|three|four|several|a group of|a pair of|a set of)\b/.test(text)) return true;
// " x and y " where both sides carry a noun-ish token.
if (/\w+\s+and\s+\w+/.test(text) && !/black and white|red and white|salt and pepper/.test(text))
@@ -204,21 +172,9 @@ function updateCoach() {
}
}
-// Random pick(s) from the library, avoiding a given set of current values so
-// "Surprise me" and "More ideas" never echo what is already on screen.
-function pickDistinct(count, avoid = new Set()) {
- const pool = LIBRARY.filter((p) => !avoid.has(p));
- const out = [];
- while (out.length < count && pool.length) {
- const i = Math.floor(Math.random() * pool.length);
- out.push(pool.splice(i, 1)[0]);
- }
- return out;
-}
-
function surprise() {
if (!els.prompt) return;
- const [pick] = pickDistinct(1, new Set([els.prompt.value.trim()]));
+ const [pick] = generateDistinctForgePrompts(1, new Set([els.prompt.value.trim()]));
if (!pick) return;
els.prompt.value = pick;
updateCoach();
@@ -233,10 +189,12 @@ function surprise() {
function shuffleChips() {
if (!els.examples) return;
- const chips = [...els.examples.querySelectorAll('.chip')];
+ // Seasonal presets (.chip--festive) are pinned: "More ideas" only rotates
+ // the regular library chips, never overwrites the festive prompts.
+ const chips = [...els.examples.querySelectorAll('.chip:not(.chip--festive)')];
if (!chips.length) return;
const current = new Set(chips.map((c) => c.textContent.trim()));
- const fresh = pickDistinct(chips.length, current);
+ const fresh = generateDistinctForgePrompts(chips.length, current, Math.random, CHIP_MAXLEN);
chips.forEach((chip, i) => {
const next = fresh[i];
if (!next) return;
@@ -255,10 +213,26 @@ function shuffleChips() {
els.chipsMore?.classList.add('is-rolling');
}
+// Every visit opens on a fresh random set; the static chip text in the HTML
+// is only the no-JS fallback. Covers both the composer's example chips and
+// the empty-stage starters, kept mutually distinct; festive (pinned
+// seasonal) chips are untouched.
+function seedChips() {
+ const chips = [els.examples, els.emptyStarters].flatMap((container) =>
+ container ? [...container.querySelectorAll('.chip:not(.chip--festive)')] : []
+ );
+ if (!chips.length) return;
+ const fresh = generateDistinctForgePrompts(chips.length, undefined, Math.random, CHIP_MAXLEN);
+ chips.forEach((chip, i) => {
+ if (fresh[i]) chip.textContent = fresh[i];
+ });
+}
+
if (els.prompt) {
els.prompt.addEventListener('input', updateCoach);
els.surprise?.addEventListener('click', surprise);
els.chipsMore?.addEventListener('click', shuffleChips);
+ seedChips();
// Reflect any value already present (remix ?prompt= prefill, restored draft).
updateCoach();
}
diff --git a/tests/forge-prompt-gen.test.js b/tests/forge-prompt-gen.test.js
new file mode 100644
index 000000000..bdca2735b
--- /dev/null
+++ b/tests/forge-prompt-gen.test.js
@@ -0,0 +1,86 @@
+// The Forge prompt generator's contract: every prompt it can ever emit is a
+// single, isolated subject with a material cue (the shape the TRELLIS lane
+// meshes cleanest) regardless of which random path produced it. These tests
+// sweep every family with seeded rngs so the assertions cover the grammar
+// space, not one lucky draw.
+import { describe, it, expect } from 'vitest';
+import {
+ FAMILIES,
+ generateForgePrompt,
+ generateDistinctForgePrompts,
+} from '../src/forge-prompt-gen.js';
+
+// Deterministic LCG so failures reproduce exactly.
+function lcg(seed) {
+ let s = seed >>> 0;
+ return () => {
+ s = (s * 1664525 + 1013904223) >>> 0;
+ return s / 2 ** 32;
+ };
+}
+
+// Mirrors the prompt coach's material lexicon (forge-prompt-studio.js): a
+// generated prompt must always carry at least one material word so the coach
+// grades it well and the lane gets a texture cue.
+const MATERIAL_RE =
+ /metal|brass|bronze|copper|steel|iron|chrome|aluminium|gold|silver|ceramic|porcelain|glazed|crystal|wood|oak|leather|matte|glossy|polished|brushed|velvet|felt|stone|marble|granite|concrete|knit|enamel|bakelite|terracotta|weathered|patina|clay|obsidian|jade|wool|timber|brick|canvas|stoneware|rattan|cedar|ebony|walnut|driftwood|blackthorn|cloth|linen/;
+
+// Anything that pushes TRELLIS toward a multi-object or scene mesh. The
+// " x and y " join is the same heuristic the coach warns on.
+const MULTI_SUBJECT_RE = /\b(two|three|four|several|a group of|a pair of|a set of)\b|\w+\s+and\s+\w+/;
+const SCENE_RE = /\b(scene|landscape|environment|diorama|room|interior|forest|city|street)\b/;
+
+function assertWellFormed(prompt) {
+ expect(typeof prompt).toBe('string');
+ expect(prompt.length).toBeGreaterThanOrEqual(20);
+ expect(prompt.length).toBeLessThanOrEqual(110);
+ expect(prompt).toMatch(/^an? /);
+ // Article agreement: "a" never precedes a vowel, "an" never a consonant.
+ expect(prompt).not.toMatch(/^a [aeiou]/);
+ expect(prompt).not.toMatch(/^an [^aeiou]/);
+ expect(prompt).toMatch(MATERIAL_RE);
+ expect(prompt).not.toMatch(MULTI_SUBJECT_RE);
+ expect(prompt).not.toMatch(SCENE_RE);
+ // House style and layout safety: no em/en dashes, no double spaces,
+ // no unresolved template artifacts.
+ expect(prompt).not.toMatch(/[—–]|\s{2}|undefined|null|\$\{/);
+}
+
+describe('forge prompt generator', () => {
+ it('every family emits well-formed single-subject prompts across many seeds', () => {
+ for (const family of FAMILIES) {
+ for (let seed = 1; seed <= 200; seed++) {
+ assertWellFormed(family(lcg(seed * 7919)));
+ }
+ }
+ });
+
+ it('is deterministic for a given rng sequence', () => {
+ expect(generateForgePrompt(lcg(42))).toBe(generateForgePrompt(lcg(42)));
+ });
+
+ it('draws from a genuinely large space', () => {
+ // 100 consecutive draws should rarely repeat (weighted family
+ // selection keeps small pools from dominating collisions) ...
+ const rng = lcg(1);
+ const seen = new Set();
+ for (let i = 0; i < 100; i++) seen.add(generateForgePrompt(rng));
+ expect(seen.size).toBeGreaterThan(80);
+ // ... and the total space holds hundreds of distinct prompts.
+ const many = generateDistinctForgePrompts(300, new Set(), lcg(2));
+ expect(many).toHaveLength(300);
+ });
+
+ it('generateDistinctForgePrompts honors count, avoid, and maxLength', () => {
+ const rng = lcg(9);
+ const avoid = new Set(generateDistinctForgePrompts(5, new Set(), lcg(9)));
+ const out = generateDistinctForgePrompts(5, avoid, rng, 64);
+ expect(out).toHaveLength(5);
+ expect(new Set(out).size).toBe(5);
+ for (const p of out) {
+ expect(avoid.has(p)).toBe(false);
+ expect(p.length).toBeLessThanOrEqual(64);
+ assertWellFormed(p);
+ }
+ });
+});