Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
fix(x-content): refuse to film when the browser draws emoji as empty boxes
nirholas34160d4f587e
diff --git a/api/_lib/x-content/verify.js b/api/_lib/x-content/verify.jsindex b188e734f..909c21569 100644--- a/api/_lib/x-content/verify.js+++ b/api/_lib/x-content/verify.js@@ -85,14 +85,43 @@ export function describeBrowserError(message) {return `the browser cannot start: ${text.split('\n')[0]}`;}+// A machine with no colour emoji font Chromium can use draws every emoji as an+// empty box, and a reel filmed there shows the product broken where it is not.+// Debian's Noto Color Emoji is a bitmap font this Chromium skips, so the fix is+// the outline (COLRv1) build of the same font.+export const EMOJI_FONT_FIX = 'install the COLRv1 build of Noto Color Emoji: curl -sSL -o ~/.local/share/fonts/Noto-COLRv1.ttf --create-dirs https://raw.githubusercontent.com/googlefonts/noto-emoji/main/2D/fonts/Noto-COLRv1.ttf && fc-cache -f';++// Draws an emoji and counts the pixels that carry colour. A box or a missing+// glyph is grey or empty; a drawn emoji is mostly colour.+export async function emojiRendersInColor(page, text = '\u{1F44B}') {+ return page.evaluate((glyph) => {+ const canvas = document.createElement('canvas');+ canvas.width = canvas.height = 64;+ const context = canvas.getContext('2d');+ context.font = '48px sans-serif';+ context.textBaseline = 'top';+ context.fillText(glyph, 4, 4);+ const { data } = context.getImageData(0, 0, 64, 64);+ let coloured = 0;+ for (let i = 0; i < data.length; i += 4) {+ if (data[i + 3] > 128 && Math.max(data[i], data[i + 1], data[i + 2]) - Math.min(data[i], data[i + 1], data[i + 2]) > 60) coloured++;+ }+ return coloured > 100;+ }, text);+}+export async function browserProblem() {+ let browser;try {const { chromium } = await import('playwright');- const browser = await chromium.launch();- await browser.close();+ browser = await chromium.launch();+ const page = await browser.newPage();+ if (!(await emojiRendersInColor(page))) return `the browser draws emoji as empty boxes on this machine, so reels would show the product broken; ${EMOJI_FONT_FIX}`;return null;} catch (err) {return describeBrowserError(err?.message || err);+ } finally {+ await browser?.close().catch(() => {});}}diff --git a/docs/ops/x-story-findings-2026-09-30.md b/docs/ops/x-story-findings-2026-09-30.mdindex a1ef5a215..6dc1d420a 100644--- a/docs/ops/x-story-findings-2026-09-30.md+++ b/docs/ops/x-story-findings-2026-09-30.md@@ -70,7 +70,7 @@ holds: a surface that did not pass is listed here instead of being posted.| `/globe` | Works, and the story is filmed, but held for the owner: it shows conflict and force-posture layers over military bases and nuclear sites, and the conflict layer misclassifies (a story about US House district maps tagged as conventional military force). The 30-day request takes 4 to 16 s. || `/sonar` | Works and was filmed, then withdrawn: the stage avatar (`/avatars/cz.glb`, used by `src/animations-live-preview.js`) is the likeness of a figure tied to another crypto project. After a push zoom the head leaves the frame. || `/labs` | `categorize()` in `src/labs.js` files every page it does not recognise as x402, so Animation Gallery and Character Library are badged and filtered as x402. A filter scrolls a heading naming another coin into view, and that heading contains an em-dash. Its live card previews slow the browser so badly that a 9 second scenario took 11 minutes. |-| `/rankings` | The Creations board shows the public QA account and T-pose thumbnails; medal emoji render as empty boxes. |+| `/rankings` | The Creations board shows the public QA account and T-pose thumbnails. (Medal emoji drawn as empty boxes were the filming machine missing a colour emoji font, not the page.) || `/walk-leaderboard`, `/daily-match`, `/reputation/market` | Effectively empty (one walker, one competitor, no stakes). || `/search`, `/ledger`, `/showcase` | Results, decision rows and chain chips name third-party coins and chains. `/search` returns twelve generations all titled the same for one query. || `/hydrate`, `/bundles` | A connect-wallet wall and a sign-in wall, with nothing to show signed out. |diff --git a/docs/x-story-author-brief.md b/docs/x-story-author-brief.mdindex 347f06a1b..a3c72035b 100644--- a/docs/x-story-author-brief.md+++ b/docs/x-story-author-brief.md@@ -50,7 +50,9 @@ production and has been filmed, so that `public/x-media/<id>/reel.mp4` and`{ "type": "proof", "fact": "agents", "min": 500 }`, so the post stays true as the count moves.- Check the browser starts before you scout or prove:`node -e "require('playwright').chromium.launch().then(b=>{console.log('ok');return b.close()})"`.- If it reports a missing library, run `npx playwright install-deps chromium` once.+ If it reports a missing library, run `npx playwright install-deps chromium` once. `scout`,+ `prove` and `advance` also refuse to run when the browser draws emoji as empty boxes, and print+ the one command that installs a colour emoji font it can use.## How to workdiff --git a/tests/x-content-reel.test.js b/tests/x-content-reel.test.jsindex 97f890d4b..0de54158d 100644--- a/tests/x-content-reel.test.js+++ b/tests/x-content-reel.test.js@@ -9,6 +9,7 @@ import { SITE_CHROME, chromeStylesheet } from '../api/_lib/x-content/site-chromeimport { PREMIUM_MAX_LENGTH, STANDARD_MAX_LENGTH, maxLengthOf } from '../api/_lib/x-content/quality.js';import { validateItem } from '../api/_lib/x-content/queue.js';import { contentHash } from '../api/_lib/x-content/review.js';+import { emojiRendersInColor } from '../api/_lib/x-content/verify.js';import { buildReviewRequest } from '../api/_lib/x-content/editor.js';import { bestPosts } from '../api/_lib/x-content/outcomes.js';@@ -403,6 +404,18 @@ describe.skipIf(!browserStarts)('caption fit', () => {expect(clipped).toEqual([long]);}, 60_000);+ it('tells a glyph drawn in one colour from an emoji drawn in colour', async () => {+ const { chromium } = await import('playwright');+ const browser = await chromium.launch();+ try {+ const page = await browser.newPage();+ expect(await emojiRendersInColor(page, 'A')).toBe(false);+ expect(await emojiRendersInColor(page, '\u25A1')).toBe(false);+ } finally {+ await browser.close();+ }+ }, 60_000);+it('has nothing to measure in a scenario without captions', async () => {expect(await captionsThatClip({ steps: [{ goto: 'https://three.ws/' }] })).toEqual([]);});