Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
feat(marketing): draw the Android launch post as one picture cut into X's four tiles
nirholascf9926ec43a5
diff --git a/docs/x-posts/android-app-launch.md b/docs/x-posts/android-app-launch.mdindex f4b4fc057..1d855ae10 100644--- a/docs/x-posts/android-app-launch.md+++ b/docs/x-posts/android-app-launch.md@@ -49,6 +49,12 @@ What the app adds over the website:3.95 MB, Android 6 and up, open source. The Solana dApp Store listing is in review.```+## The four images++The artwork and the X copy live in [`../../marketing/android-launch/`](../../marketing/android-launch/), generated by `npm run build:x-grid`. One composition is drawn at 4096x2304 and quartered, so X's 2x2 collage reassembles into the picture that was drawn: every quadrant of a 16:9 rectangle is itself 16:9, which is the aspect of the cell it lands in, so nothing is cropped.++**Attach the tiles in the order in [`kit/IMAGE-ORDER.md`](../../marketing/android-launch/kit/IMAGE-ORDER.md).** X fills the grid in attachment order, and any other order scrambles the composition. Per-image alt text and the follow-up replies are in [`kit/post.md`](../../marketing/android-launch/kit/post.md).+## X (@trythreews), held until the account is restoredDo not post this while `@trythreews` is suspended; seediff --git a/marketing/android-launch/README.md b/marketing/android-launch/README.mdnew file mode 100644index 000000000..53640aa34--- /dev/null+++ b/marketing/android-launch/README.md@@ -0,0 +1,81 @@+# `android-launch/`: the Android announcement kit++The post that announces three.ws as an Android app, and the artwork for it.+Everything here is generated, not hand-exported, so a change to the product or+the brand re-renders rather than drifts.++```bash+npm run build:x-grid+```++That runs [`scripts/make-x-grid.mjs`](../../scripts/make-x-grid.mjs).++## The four-image grid++X lays four attached images out in a 2x2 collage. The kit exploits one property+of rectangles to make that collage a single picture: **every quadrant of a+rectangle has the same aspect ratio as the whole.** So the composition is drawn+once at 4096 x 2304 (16:9), cut in four, and each 2048 x 1152 tile is itself+16:9. X drops each tile into a cell of the same aspect and crops nothing, and+the post reassembles into the image that was drawn.++It is the Seeker carousel idea turned through ninety degrees. That one+([`solana-mobile/scripts/make-screenshots.mjs`](../../solana-mobile/scripts/make-screenshots.mjs))+slices a 5400 x 1920 strip for a store listing that scrolls horizontally; this+one slices a plane for a grid.++| File | What it is |+| --- | --- |+| `kit/android-launch-master-16x9.png` | The uncut composition. Use it wherever a single image is wanted. |+| `kit/images/01-top-left.png` … `04-bottom-right.png` | The four tiles, in upload order. |+| `kit/IMAGE-ORDER.md` | The order, restated where someone attaching the images will look. |+| `kit/post.md` | The post copy. |++Two rules the composition is built around, both learned from how the collage+actually behaves:++1. **Upload order is the layout.** X fills the grid 1, 2 across the top then+ 3, 4 across the bottom, in the order the images were attached. Attach them+ out of order and the picture reassembles scrambled.+2. **Nothing solid may cross a cut.** This is where the grid differs from the+ store carousel, and it is worth understanding before editing the layout. A+ carousel shows one panel at a time, so a phone centred on a seam reads as+ "continues offscreen" and makes the strip feel continuous. X shows all four+ tiles at once with a gutter between them, so the identical phone reads as+ broken alignment: half a face on the left, half on the right, a gap through+ the middle. The first draft of this composition did exactly that and had to+ be rebuilt.++ So every phone sits wholly inside one tile, the headline block sits entirely+ inside the top left, and the footer entirely inside the bottom right. Only+ the scenery crosses: the glow field, the light beam and the floor. Those are+ soft and edgeless, so a gutter through them reads as continuity rather than+ damage. Tapping one image opens only that image, and some clients render the+ four as a list rather than a collage, so each tile has to be a finished+ picture on its own terms.++ The rule is enforced, not just documented. `make-x-grid.mjs` computes each+ phone's rotated extent, works out which tile it lands in, and throws if it+ comes within 96px of that tile's edge. A layout change that would push a+ phone across a seam fails the build instead of shipping.++A third constraint is defensive: X's collage container has changed aspect+before, and a quadrant can only ever be trimmed on one axis when it does. That+96px keep-out is what absorbs it.++A consequence worth knowing: a 9:16 phone cannot fill a 16:9 tile, so a+quadrant holding one phone looks empty. Each populated quadrant holds a layered+pair instead, a smaller one set back and dimmed behind a larger one in front.++## The phones hold real product++Each phone in the composition is a real capture of the shipping product, reused+from the Play listing run:++```bash+node solana-mobile/scripts/make-screenshots.mjs --target=play --keep-raw+```++That writes `solana-mobile/publish-play/media/phone/raw/screen-*.png`, which+this script reads. Nothing is mocked or drawn to look like product UI, so the+announcement cannot show a screen the app does not have.diff --git a/marketing/android-launch/kit/IMAGE-ORDER.md b/marketing/android-launch/kit/IMAGE-ORDER.mdnew file mode 100644index 000000000..15b68ecda--- /dev/null+++ b/marketing/android-launch/kit/IMAGE-ORDER.md@@ -0,0 +1,17 @@+# Image insertion order++X lays four images out in a 2x2 grid and fills it in UPLOAD ORDER. Attach them+in exactly this sequence or the composition reassembles wrong:++| Slot | File |+| --- | --- |+| top left | `images/01-top-left.png` |+| top right | `images/02-top-right.png` |+| bottom left | `images/03-bottom-left.png` |+| bottom right | `images/04-bottom-right.png` |++Each tile is 2048x1152 (16:9), the same aspect as the cell it lands in, so X+crops nothing. `android-launch-master-16x9.png` is the uncut composition, for+reference and for surfaces that take a single image.++Regenerate with `npm run build:x-grid`.diff --git a/marketing/android-launch/kit/post.md b/marketing/android-launch/kit/post.mdnew file mode 100644index 000000000..c88bc9555--- /dev/null+++ b/marketing/android-launch/kit/post.md@@ -0,0 +1,59 @@+# Android launch post++Attach the four tiles from `images/` in the order in `IMAGE-ORDER.md`. Getting+the order wrong reassembles the composition scrambled.++## Post++```+three.ws is now an Android app.++Take a selfie, get back a rigged 3D avatar. Or describe an object and get a textured 3D model. Both on your phone, both yours.++Free. Open source. Android 6.0+.++github.com/nirholas/three.ws/releases/tag/v1.0.0+```++243 characters.++## Alt text++X takes alt text per image, and the four tiles are read one at a time by a+screen reader, so each describes its own quadrant rather than the whole grid.++| Image | Alt text |+| --- | --- |+| `01-top-left.png` | The three.ws logo above the words "Now an Android app", on a dark blue field. Below: turn a photo or a prompt into 3D models and AI agents you own, on your phone. |+| `02-top-right.png` | An Android phone showing the three.ws create screen, asking "What do you want to create?" with options to build an AI agent, make a 3D avatar, or generate a 3D model. |+| `03-bottom-left.png` | An Android phone showing the three.ws marketplace: a grid of 3D characters and models published by the community, with filters for agents, avatars and scenes. |+| `04-bottom-right.png` | Two Android phones. One shows a rigged 3D character posed mid-animation with its file details; the other shows the selfie-to-avatar capture screen. |++## Follow-up replies++Optional. Each stands alone, so post any subset.++```+It is a Trusted Web Activity, so it is the real three.ws running full screen with no address bar, and three.ws links open in the app instead of the browser.++The signing certificate is published at three.ws/.well-known/assetlinks.json. Android checks it. If the two disagree, the app is not ours.+```++```+No wallet needed. Creating models, chatting with agents and browsing are free and touch no chain at all.++Connect one only if you want to deploy an agent on Solana as an asset you hold. Signing happens in your own wallet app; three.ws never sees a key.+```++```+The Android packaging, the Mobile Wallet Adapter integration and the whole release pipeline are open source under Apache 2.0.++github.com/nirholas/three.ws/tree/main/solana-mobile+```++## Before posting++- The Google Play listing is not live yet, so nothing here claims it is. Add the+ Play badge to a follow-up once production access lands.+- Owner approval is required before this goes out. See the external-channel gate+ in [`CLAUDE.md`](../../../CLAUDE.md).diff --git a/package.json b/package.jsonindex ebce5eb6c..1d680e9f2 100644--- a/package.json+++ b/package.json@@ -164,6 +164,7 @@"build:brand-assets": "node scripts/render-brand-assets.mjs","build:wordmark": "node scripts/render-wordmark.mjs","build:play-assets": "node scripts/render-play-assets.mjs",+ "build:x-grid": "node scripts/make-x-grid.mjs","build:dapp-store-media": "node solana-mobile/scripts/make-media.mjs","build:dapp-store-previews": "node solana-mobile/scripts/make-screenshots.mjs","render:pumpfun-verified": "node scripts/render-pumpfun-verified.mjs",diff --git a/scripts/make-x-grid.mjs b/scripts/make-x-grid.mjsnew file mode 100644index 000000000..978353614--- /dev/null+++ b/scripts/make-x-grid.mjs@@ -0,0 +1,243 @@+#!/usr/bin/env node+/**+ * Builds the Android launch announcement as ONE composition sliced into the+ * four images X lays out in a 2x2 grid.+ *+ * The trick is a property of rectangles: every quadrant of a rectangle has the+ * same aspect ratio as the whole. So a 16:9 master cut in four gives four 16:9+ * tiles, X drops each into a cell of its 2x2 collage without cropping, and the+ * post reassembles into the picture that was drawn. Same idea as the Seeker+ * carousel in solana-mobile/scripts/make-screenshots.mjs, which slices a strip+ * for a horizontally scrolling store listing; this slices a plane.+ *+ * Two things follow from that and are load-bearing:+ *+ * 1. Upload order is the layout. X fills its grid 1,2 across the top and 3,4+ * across the bottom, in upload order. IMAGE-ORDER.md is written beside the+ * tiles so the order cannot be lost between here and the post.+ * 2. Every tile has to survive alone, and nothing solid may cross a cut.+ * Someone tapping one image sees only it, clients that do not render the+ * collage show them as a list, and the collage itself puts a gutter+ * between the cells. An object centred on a seam therefore reads as broken+ * rather than continuous, which is the opposite of how the same trick+ * behaves in a store carousel that shows one panel at a time. Each+ * quadrant holds whole subjects; only the glow, beam and floor cross.+ *+ * The phones hold real captures of the shipping product, reused from the+ * Play listing run (`make-screenshots.mjs --target=play --keep-raw`), so the+ * announcement cannot show UI the app does not have.+ *+ * Usage:+ * npm run build:x-grid+ * node scripts/make-x-grid.mjs --out=/tmp/grid+ */+import sharp from 'sharp';+import { chromium } from 'playwright';+import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';+import { fileURLToPath } from 'node:url';+import path from 'node:path';++const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');+const RAW = path.join(ROOT, 'solana-mobile/publish-play/media/phone/raw');++const args = Object.fromEntries(process.argv.slice(2).map((a) => {+ const m = a.match(/^--([^=]+)(?:=(.*))?$/);+ return m ? [m[1], m[2] ?? true] : [a, true];+}));+const OUT = args.out ? path.resolve(String(args.out)) : path.join(ROOT, 'marketing/android-launch/kit/images');++/* 16:9 master, so each 2048x1152 quadrant is 16:9 too. X caps an upload well+ above this, and the tiles stay crisp when a client renders them full width. */+const W = 4096;+const H = 2304;+const BG = '#080814';++/* X's collage container is not documented and has changed before. Whatever+ aspect it uses, each cell inherits it, so a quadrant can only ever be+ trimmed slightly on one axis. Nothing that carries meaning goes within this+ many pixels of a quadrant's own edge. */+const SAFE = 96;++const FONT_FACES = [+ ['Space Grotesk', '300 700', 'space-grotesk-latin.woff2'],+ ['Inter', '300 800', 'inter-latin.woff2'],+].map(([family, weight, file]) => `@font-face{font-family:'${family}';font-style:normal;font-weight:${weight};src:url(data:font/woff2;base64,${readFileSync(path.join(ROOT, 'public/fonts', file)).toString('base64')}) format('woff2');}`).join('\n');++const MARK_URI = `data:image/png;base64,${readFileSync(path.join(ROOT, 'public/pwa-512x512.png')).toString('base64')}`;++/** The product screens, one per phone. Raws come from the Play listing run. */+const SCREENS = ['screen-1', 'screen-2', 'screen-3', 'screen-4', 'screen-5'];+const missing = SCREENS.filter((s) => !existsSync(path.join(RAW, `${s}.png`)));+if (missing.length) {+ throw new Error(+ `[x-grid] missing raw captures: ${missing.join(', ')}\n` ++ 'Run: node solana-mobile/scripts/make-screenshots.mjs --target=play --keep-raw',+ );+}+const shots = Object.fromEntries(SCREENS.map((s) => [s, `data:image/png;base64,${readFileSync(path.join(RAW, `${s}.png`)).toString('base64')}`]));++/**+ * Phones, anchored to a quadrant centre and offset within it.+ *+ * Every phone sits wholly inside one tile. A store carousel shows one panel at+ * a time, so an object centred on a seam reads as "continues offscreen"; X+ * shows all four at once with a gutter between them, where the same object just+ * reads as broken. Only the glow, the beam and the floor cross the cuts.+ *+ * A single 9:16 phone cannot fill a 16:9 tile, so each populated quadrant holds+ * a layered pair: a smaller one set back, a larger one in front.+ */+const Q = { topRight: [W * 0.75, H * 0.25], bottomLeft: [W * 0.25, H * 0.75], bottomRight: [W * 0.75, H * 0.75] };+const PHONE_LAYOUT = [+ { screen: 'screen-4', at: Q.topRight, dx: -298, dy: -44, w: 404, tilt: -7, back: true },+ { screen: 'screen-1', at: Q.topRight, dx: 142, dy: 34, w: 486, tilt: 3 },+ { screen: 'screen-5', at: Q.bottomLeft, dx: 292, dy: -50, w: 404, tilt: 7, back: true },+ { screen: 'screen-2', at: Q.bottomLeft, dx: -148, dy: 30, w: 486, tilt: -3 },+ { screen: 'screen-3', at: Q.bottomRight, dx: -210, dy: 18, w: 500, tilt: -2 },+];++/* The phone is 9:16 plus a 13px bezel each side; this is the drawn height, used+ to assert every phone clears its own tile's edges before anything renders. */+const phoneHeight = (w) => (w - 26) * (1920 / 1080) + 26;++const PHONES = PHONE_LAYOUT.map(({ screen, at, dx, dy, w, tilt, back }) => {+ const cx = at[0] + dx;+ const cy = at[1] + dy;+ const h = phoneHeight(w);+ /* A rotated box needs more room than its width; check the rotated extent. */+ const rad = Math.abs(tilt) * Math.PI / 180;+ const halfW = (w * Math.cos(rad) + h * Math.sin(rad)) / 2;+ const halfH = (h * Math.cos(rad) + w * Math.sin(rad)) / 2;+ /* Which tile is this phone in, and does it stay clear of that tile's edges? */+ const qx = cx < W / 2 ? 0 : W / 2;+ const qy = cy < H / 2 ? 0 : H / 2;+ const clear = [cx - halfW - qx, qx + W / 2 - (cx + halfW), cy - halfH - qy, qy + H / 2 - (cy + halfH)];+ if (Math.min(...clear) < SAFE) {+ throw new Error(+ `[x-grid] ${screen} comes within ${Math.round(Math.min(...clear))}px of its tile edge ` ++ `(minimum ${SAFE}); it would be cut by the collage seam`,+ );+ }+ return `<div class="phone${back ? ' back' : ''}" style="left:${cx}px;top:${cy}px;width:${w}px;--tilt:${tilt}deg">+ <img src="${shots[screen]}" alt="">+ </div>`;+}).join('\n');++const html = `<!doctype html><meta charset="utf-8"><style>+${FONT_FACES}+*{margin:0;padding:0;box-sizing:border-box}+body{width:${W}px;height:${H}px;background:${BG};color:#fff;overflow:hidden;position:relative;+ font-family:'Inter',sans-serif;-webkit-font-smoothing:antialiased}+/* One continuous field behind all four tiles. It ignores both seams, which is+ what makes the reassembled post read as a single photograph. */+.glow{position:absolute;inset:0;+ background:+ radial-gradient(42% 48% at 14% 22%, rgba(96,140,255,.30), transparent 70%),+ radial-gradient(38% 46% at 74% 18%, rgba(64,196,255,.22), transparent 72%),+ radial-gradient(40% 50% at 34% 84%, rgba(150,90,255,.26), transparent 70%),+ radial-gradient(36% 48% at 88% 78%, rgba(120,110,255,.24), transparent 72%),+ linear-gradient(160deg, #0a0a1c 0%, #080814 58%, #06060f 100%)}+.beam{position:absolute;left:-8%;right:-8%;top:34%;height:520px;transform:rotate(-4deg);+ background:linear-gradient(90deg, transparent, rgba(150,200,255,.14) 18%, rgba(190,220,255,.24) 52%, rgba(150,200,255,.14) 82%, transparent);+ filter:blur(80px)}+.floor{position:absolute;left:0;right:0;bottom:0;height:640px;+ background:linear-gradient(180deg, transparent, rgba(4,5,16,.80))}++/* Headline block, wholly inside the top-left quadrant and clear of its edges. */+.head{position:absolute;left:${SAFE + 34}px;top:${SAFE + 96}px;width:${W / 2 - SAFE * 2 - 40}px}+.lockup{display:flex;align-items:center;gap:26px;margin-bottom:44px}+.lockup img{width:104px;height:104px;border-radius:26px}+.lockup span{font-family:'Space Grotesk',sans-serif;font-weight:600;font-size:68px;letter-spacing:-.045em}+h1{font-family:'Space Grotesk',sans-serif;font-weight:600;font-size:132px;line-height:1.02;letter-spacing:-.04em}+h1 em{font-style:normal;color:#8fb4ff}+.head p{margin-top:34px;font-size:41px;line-height:1.38;color:#9bb0d4;max-width:900px}++/* Phones. Two straddle a seam on purpose: the composition has to cross the+ cuts, or the four tiles read as four unrelated posters. */+.phone{position:absolute;transform:translate(-50%,-50%) rotate(var(--tilt,0deg));+ border-radius:58px;padding:13px;background:linear-gradient(160deg,#2f3350,#12131f 58%,#262a40);+ box-shadow:0 52px 140px rgba(3,4,14,.82), 0 0 0 1px rgba(255,255,255,.07) inset}+.phone img{display:block;width:100%;border-radius:47px;background:${BG}}+.phone.back{opacity:.86;filter:saturate(.92) brightness(.88)}++/* Footer line, wholly inside the bottom-right quadrant. */+.foot{position:absolute;right:${SAFE + 34}px;bottom:${SAFE + 40}px;text-align:right}+.foot .big{font-family:'Space Grotesk',sans-serif;font-weight:600;font-size:56px;letter-spacing:-.03em}+.foot .small{margin-top:18px;font-size:32px;color:#8fa3c6;line-height:1.45}+</style><body>+<div class="glow"></div><div class="beam"></div><div class="floor"></div>++<div class="head">+ <div class="lockup"><img src="${MARK_URI}" alt=""><span>three.ws</span></div>+ <h1>Now an<br><em>Android app.</em></h1>+ <p>Turn a photo or a prompt into 3D models and AI agents you own, on your phone.</p>+</div>++${PHONES}++<div class="foot">+ <div class="big">three.ws</div>+ <div class="small">Android 6.0+ · free · open source</div>+</div>+</body>`;++mkdirSync(OUT, { recursive: true });++const browser = await chromium.launch();+let master;+try {+ const page = await browser.newPage({ viewport: { width: W, height: H }, deviceScaleFactor: 1 });+ await page.setContent(html, { waitUntil: 'load' });+ const loaded = await page.evaluate(async () => {+ await document.fonts.ready;+ return document.fonts.check('600 132px "Space Grotesk"') && document.fonts.check('400 41px "Inter"');+ });+ if (!loaded) throw new Error('[x-grid] brand fonts did not load; the composition would render in a fallback face');+ master = await page.screenshot({ type: 'png' });+} finally {+ await browser.close();+}++writeFileSync(path.join(OUT, '..', 'android-launch-master-16x9.png'), await sharp(master).removeAlpha().png({ compressionLevel: 9 }).toBuffer());++/* Quadrants in X's fill order: 1,2 across the top, then 3,4. */+const TILES = [+ ['01-top-left.png', 0, 0],+ ['02-top-right.png', W / 2, 0],+ ['03-bottom-left.png', 0, H / 2],+ ['04-bottom-right.png', W / 2, H / 2],+];+for (const [name, left, top] of TILES) {+ const tile = await sharp(master)+ .extract({ left, top, width: W / 2, height: H / 2 })+ .flatten({ background: BG })+ .removeAlpha()+ .png({ compressionLevel: 9 })+ .toBuffer();+ /* X re-encodes a PNG over 5 MB as JPEG, which bands these gradients. */+ if (tile.length > 5 * 1024 * 1024) {+ throw new Error(`[x-grid] ${name} is ${(tile.length / 1024 / 1024).toFixed(2)} MB; X re-encodes above 5 MB`);+ }+ writeFileSync(path.join(OUT, name), tile);+ console.log(`[x-grid] ${name} ${W / 2}x${H / 2} ${Math.round(tile.length / 1024)} KB`);+}++writeFileSync(path.join(OUT, '..', 'IMAGE-ORDER.md'), `# Image insertion order++X lays four images out in a 2x2 grid and fills it in UPLOAD ORDER. Attach them+in exactly this sequence or the composition reassembles wrong:++| Slot | File |+| --- | --- |+| top left | \`images/01-top-left.png\` |+| top right | \`images/02-top-right.png\` |+| bottom left | \`images/03-bottom-left.png\` |+| bottom right | \`images/04-bottom-right.png\` |++Each tile is ${W / 2}x${H / 2} (16:9), the same aspect as the cell it lands in, so X+crops nothing. \`android-launch-master-16x9.png\` is the uncut composition, for+reference and for surfaces that take a single image.++Regenerate with \`npm run build:x-grid\`.+`);+console.log(`[x-grid] master + IMAGE-ORDER.md -> ${path.relative(ROOT, path.join(OUT, '..'))}/`);