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(play): schedule Community Meetup #2 with Meetup Star Shades as its souvenir
nirholas0e184e441265
diff --git a/docs/event-souvenirs.md b/docs/event-souvenirs.mdindex c36e1d1f8..0312f65be 100644--- a/docs/event-souvenirs.md+++ b/docs/event-souvenirs.md@@ -14,10 +14,19 @@ about you. This one says exactly one thing, permanently, to every player whowalks past you.The first one is the **Meetup Laurel**: a gold laurel circlet, open at the-front, with three pearl berries in the gap. It was granted at the-[`$THREE` First Holders Meetup](play-live-events.md). That window has closed, so-the laurel is now exactly what this page promises: owned only by the players who-were in the world that day, and never granted again.+front, with three pearl berries in the gap. It was configured for the+[`$THREE` First Holders Meetup](play-live-events.md) on 2026-08-09, but the+multiplayer service was not redeployed with the grant code before that window,+so the grant never ran and nobody holds one. The window has closed, and the+laurel stays retired rather than being handed out later under a different+event's name.++The second is the **Meetup Star Shades**: gold star-shaped frames with smoked+lenses, worn in the eyewear slot so they sit alongside any headwear. They are+the souvenir for the `$THREE` Community Meetup #2 on 2026-09-25, 16:00 to 17:00+UTC. The lesson from the first event is now a pre-flight step (see+[Verifying it](#verifying-it)): the multiplayer service must be running a build+that contains the grant before the window opens.---@@ -205,6 +214,18 @@ node scripts/play-souvenir-ui-check.mjs # the card and the wardrobe, inode scripts/play-souvenir-e2e.mjs # the whole feature through the real /play world```+**Before a real window, check production too.** The first event's grant never+ran because the multiplayer service was still on a build from before the grant+code landed. Compare the live revision's creation time with the last commit under+`multiplayer/src`, and redeploy (`cd multiplayer && ./deploy-cloudrun.sh`) if+the repo is ahead:++```bash+gcloud run services describe three-ws-multiplayer --region us-central1 \+ --format='value(status.latestReadyRevisionName,metadata.annotations."serving.knative.dev/lastModifier")'+git log -1 --format='%h %ci' -- multiplayer/src+```+**The conformance run** boots Colyseus on a private port against an event configit serves itself, then joins with the real `colyseus.js` client and walks thecontract: granted once on join, announced once, equips, published on the shareddiff --git a/multiplayer/src/cosmetics-catalog.js b/multiplayer/src/cosmetics-catalog.jsindex ec8c2d5b6..92bfc568a 100644--- a/multiplayer/src/cosmetics-catalog.js+++ b/multiplayer/src/cosmetics-catalog.js@@ -60,6 +60,7 @@ export const COSMETICS = [{ id: 'eye-none', name: 'None', slot: 'eyewear', rarity: 'common', tier: 'free', price: 0, visual: null },{ id: 'glasses-round', name: 'Round frames', slot: 'eyewear', rarity: 'common', tier: 'free', price: 0, visual: { prop: '/accessories/glasses-round.glb', anchor: 'face' }, thumb: '/accessories/thumbs/glasses-round.png' },{ id: 'glasses-shades', name: 'Shades', slot: 'eyewear', rarity: 'rare', tier: 'premium', price: 350, visual: { prop: '/accessories/glasses-shades.glb', anchor: 'face' }, thumb: '/accessories/thumbs/glasses-shades.png' },+ { id: 'star-shades-meetup-2', name: 'Meetup Star Shades', slot: 'eyewear', rarity: 'legendary', tier: 'event', price: 0, visual: { prop: '/accessories/star-shades-meetup-2.glb', anchor: 'face' }, thumb: '/accessories/thumbs/star-shades-meetup-2.png' },// ── Earrings (prop, anchored at ear level) ────────────────────────────────{ id: 'earring-none', name: 'None', slot: 'earrings', rarity: 'common', tier: 'free', price: 0, visual: null },diff --git a/public/accessories/star-shades-meetup-2.glb b/public/accessories/star-shades-meetup-2.glbnew file mode 100644index 000000000..077ed1cf5Binary files /dev/null and b/public/accessories/star-shades-meetup-2.glb differdiff --git a/public/accessories/thumbs/star-shades-meetup-2.png b/public/accessories/thumbs/star-shades-meetup-2.pngnew file mode 100644index 000000000..46335eb3cBinary files /dev/null and b/public/accessories/thumbs/star-shades-meetup-2.png differdiff --git a/public/event.json b/public/event.jsonindex 256a9277b..08aca2b7c 100644--- a/public/event.json+++ b/public/event.json@@ -1,9 +1,19 @@{- "id": null,- "name": null,- "tagline": null,- "startsAt": null,- "endsAt": null,- "link": null,- "note": "No event is scheduled. This file stays in place between events so /event.json answers 200 with an explicit no-event state instead of putting a 404 in every visitor console. Schedule the next event with: npm run event:schedule -- --start <ISO> --duration <minutes> --apply"+ "id": "three-community-meetup-2",+ "name": "$THREE Community Meetup #2",+ "tagline": "The Three.ws User Group on IBM Community, meeting inside the world.",+ "startsAt": "2026-09-25T16:00:00Z",+ "endsAt": "2026-09-25T17:00:00Z",+ "link": "/play?coin=FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump&name=three.ws&symbol=three",+ "linkLabel": "Join the meetup",+ "souvenir": { "cosmeticId": "star-shades-meetup-2" },+ "agenda": [+ { "atMin": 0, "title": "Doors open in the plaza", "detail": "Welcome and controls", "icon": "👋" },+ { "atMin": 6, "title": "Live build: one sentence to a rigged agent", "detail": "Then we wear it", "icon": "🧍" },+ { "atMin": 15, "title": "Forge into the world", "detail": "Type /forge in chat", "icon": "🔨" },+ { "atMin": 24, "title": "An agent pays for a tool", "detail": "At the Agent Exchange", "icon": "🧾" },+ { "atMin": 30, "title": "Community showcase", "detail": "Members show what they brought", "icon": "🎤" },+ { "atMin": 42, "title": "Open Q&A and what ships next", "detail": "Ask anything", "icon": "💬" },+ { "atMin": 55, "title": "Group photo", "detail": "Gather at the totem", "icon": "📸" }+ ]}diff --git a/scripts/generate-accessory-glbs.mjs b/scripts/generate-accessory-glbs.mjsindex cb7ed6987..436c363ca 100644--- a/scripts/generate-accessory-glbs.mjs+++ b/scripts/generate-accessory-glbs.mjs@@ -6,9 +6,9 @@// hat-baseball.glb, hat-beanie.glb, hat-cowboy.glb,// glasses-round.glb, glasses-shades.glb,// earrings-hoops.glb, earrings-studs.glb-// One more is the /play wardrobe's event souvenir (multiplayer/src/-// cosmetics-catalog.js, tier 'event'), which is granted, never sold:-// laurel-meetup.glb+// The rest are the /play wardrobe's event souvenirs (multiplayer/src/+// cosmetics-catalog.js, tier 'event'), which are granted, never sold:+// laurel-meetup.glb, star-shades-meetup-2.glb//// Each is a real glTF 2.0 binary with positions, normals, UVs, indices, and a// PBR material, small enough to commit to the repo, large enough to be visibly@@ -230,6 +230,58 @@ function sphere({ r = 1, segments = 16, rings = 10 } = {}) {// element is authored as a loop and emitted as a single primitive.// Hamilton product, `a` applied AFTER `b` (q = a ⊗ b), both [x,y,z,w].+// Flat five-point star in the XY plane, extruded `depth` along Z, first point+// straight up. Faces are flat-shaded (each cap and each side quad has its own+// vertices) so the facets read as cut metal rather than a soft blob.+function starPrism({ outerR = 1, innerR = 0.4, points = 5, depth = 0.01 } = {}) {+ const positions = [];+ const normals = [];+ const uvs = [];+ const indices = [];+ const outline = [];+ for (let k = 0; k < points * 2; k++) {+ const a = Math.PI / 2 + (k * Math.PI) / points;+ const r = k % 2 ? innerR : outerR;+ outline.push([r * Math.cos(a), r * Math.sin(a)]);+ }+ const n = outline.length;+ const half = depth / 2;++ // Caps: a fan from the centre, wound so each faces outward.+ for (const nz of [1, -1]) {+ const base = positions.length / 3;+ positions.push(0, 0, half * nz);+ normals.push(0, 0, nz);+ uvs.push(0.5, 0.5);+ for (const [x, y] of outline) {+ positions.push(x, y, half * nz);+ normals.push(0, 0, nz);+ uvs.push(0.5 + x / (2 * outerR), 0.5 + y / (2 * outerR));+ }+ for (let i = 0; i < n; i++) {+ const a = base + 1 + i;+ const b = base + 1 + ((i + 1) % n);+ if (nz > 0) indices.push(base, a, b);+ else indices.push(base, b, a);+ }+ }++ // Sides: one quad per outline edge, normal pointing away from the star.+ for (let i = 0; i < n; i++) {+ const [px, py] = outline[i];+ const [qx, qy] = outline[(i + 1) % n];+ const len = Math.hypot(qx - px, qy - py) || 1;+ const nx = (qy - py) / len;+ const ny = -(qx - px) / len;+ const base = positions.length / 3;+ positions.push(px, py, half, qx, qy, half, qx, qy, -half, px, py, -half);+ for (let k = 0; k < 4; k++) normals.push(nx, ny, 0);+ uvs.push(0, 0, 1, 0, 1, 1, 0, 1);+ indices.push(base, base + 3, base + 2, base, base + 2, base + 1);+ }+ return { positions, normals, uvs, indices };+}+function quatMul(a, b) {const [ax, ay, az, aw] = a;const [bx, by, bz, bw] = b;@@ -532,6 +584,14 @@ const ACCESSORIES = {rootName: 'LaurelMeetup',parts: laurelParts(),},++ // The second meetup's souvenir: gold star-shaped shades with smoked lenses.+ // Eyewear rather than headwear on purpose, so anyone holding both souvenirs+ // can wear them together. Same grant rules as the laurel.+ 'star-shades-meetup-2.glb': {+ rootName: 'StarShadesMeetup2',+ parts: starShadesParts(),+ },};// Build the laurel's three primitives: the circlet band, the merged leaf ring,@@ -594,6 +654,35 @@ function laurelParts() {];}+// Build the star shades' three primitives: the merged gold frames, the merged+// smoked lenses set just proud of them, and the bridge. Positions follow the+// round glasses so the pair lands on the same eye line.+function starShadesParts() {+ const LENS_X = 0.038;+ const EYE_Y = 0.005;+ const FRAME_Z = 0.085;+ const GOLD = [0.9, 0.74, 0.26];++ const frame = starPrism({ outerR: 0.038, innerR: 0.019, depth: 0.006 });+ const lens = starPrism({ outerR: 0.031, innerR: 0.0145, depth: 0.003 });+ const frames = [-LENS_X, LENS_X].map((x) => transformGeom(frame, { translate: [x, EYE_Y, FRAME_Z] }));+ const lenses = [-LENS_X, LENS_X].map((x) => transformGeom(lens, { translate: [x, EYE_Y, FRAME_Z + 0.003] }));++ return [+ { name: 'frames', geom: mergeGeoms(frames), color: GOLD, metallic: 0.9, roughness: 0.25 },+ { name: 'lenses', geom: mergeGeoms(lenses), color: [0.06, 0.05, 0.09], metallic: 0.3, roughness: 0.08 },+ {+ name: 'bridge',+ geom: cylinder({ r: 0.004, y0: 0, y1: 0.016, segments: 8 }),+ color: GOLD,+ metallic: 0.9,+ roughness: 0.25,+ translate: [-0.008, EYE_Y + 0.012, FRAME_Z],+ rotation: [0, 0, -0.707, 0.707], // lie horizontally along X+ },+ ];+}+// ── Main ───────────────────────────────────────────────────────────────────async function main() {diff --git a/scripts/play-souvenir-conformance.mjs b/scripts/play-souvenir-conformance.mjsindex 1c9a96ab5..a178460ec 100644--- a/scripts/play-souvenir-conformance.mjs+++ b/scripts/play-souvenir-conformance.mjs@@ -23,7 +23,8 @@// behind. It needs no Vite, no GPU and no display, which is what lets it run on// a machine too loaded to hold a WebGL page open.//-// node scripts/play-souvenir-conformance.mjs+// node scripts/play-souvenir-conformance.mjs # the laurel+// node scripts/play-souvenir-conformance.mjs star-shades-meetup-2 # any event souvenir//// Exit code is 0 only when every check passes.@@ -32,6 +33,7 @@ import { createServer } from 'node:http';import { spawn } from 'node:child_process';import { resolve, dirname } from 'node:path';import { fileURLToPath } from 'node:url';+import { getCosmetic } from '../multiplayer/src/cosmetics-catalog.js';const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), '..');const MP_PORT = Number(process.env.MP_PORT || 2572);@@ -39,7 +41,14 @@ const CONFIG_PORT = Number(process.env.CONFIG_PORT || 4601);const ENDPOINT = `ws://127.0.0.1:${MP_PORT}`;const MINT = 'FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump';const OTHER_MINT = 'THREEsynthetic1111111111111111111111111111';-const SOUVENIR_ID = 'laurel-meetup';+const SOUVENIR_ID = process.argv[2] || 'laurel-meetup';+// The wardrobe slot the souvenir equips into, read from the catalog so a+// headwear laurel and eyewear shades are held to the same contract.+const SLOT = getCosmetic(SOUVENIR_ID)?.slot;+if (getCosmetic(SOUVENIR_ID)?.tier !== 'event') {+ console.error(`${SOUVENIR_ID} is not an event-tier cosmetic in multiplayer/src/cosmetics-catalog.js`);+ process.exit(1);+}const TTL_MS = 4000;const t0 = Date.now();@@ -137,6 +146,10 @@ async function join({ coin = MINT, guestToken = '', name = 'QA' } = {}) {// this run has no opinion about. colyseus.js warns once per unhandled type,// which drowns the checks; absorb the lot with a wildcard handler.room.onMessage('*', () => {});+ // Handlers are attached, so say so the way the real client does+ // (src/game/community-net.js). The server holds the join snapshot (profile,+ // guest token) until this arrives, falling back only after JOIN_SETTLE_MS.+ room.send('ready');// Let the join handshake finish: the profile echo and any grant both land in// the first moments after the room resolves.@@ -179,11 +192,11 @@ async function main() {check('live window: owned exactly once', alice.owned().filter((i) => i === SOUVENIR_ID).length === 1,`owned=${JSON.stringify(alice.owned())}`);check('live window: not auto-equipped over the player\'s own fit',- alice.equipped().headwear !== SOUVENIR_ID,- `headwear=${alice.equipped().headwear}`);+ alice.equipped()[SLOT] !== SOUVENIR_ID,+ `${SLOT}=${alice.equipped()[SLOT]}`);await alice.equip(SOUVENIR_ID);- check('live window: it equips', alice.equipped().headwear === SOUVENIR_ID,+ check('live window: it equips', alice.equipped()[SLOT] === SOUVENIR_ID,JSON.stringify(alice.equipped()));check('live window: published on the shared schema',String(alice.wireFor(alice.room.sessionId) || '').split(',').includes(SOUVENIR_ID),@@ -226,7 +239,7 @@ async function main() {aliceAgain.owned().filter((i) => i === SOUVENIR_ID).length === 1,`owned=${JSON.stringify(aliceAgain.owned())}`);check('rejoin: still worn, so the equip persisted across the reconnect',- aliceAgain.equipped().headwear === SOUVENIR_ID,+ aliceAgain.equipped()[SLOT] === SOUVENIR_ID,JSON.stringify(aliceAgain.equipped()));// ── 5. closed window ───────────────────────────────────────────────────@@ -241,9 +254,9 @@ async function main() {check('closed window: they cannot equip what they were never granted',await (async () => {await dave.equip(SOUVENIR_ID);- return dave.equipped().headwear !== SOUVENIR_ID;+ return dave.equipped()[SLOT] !== SOUVENIR_ID;})(),- `headwear=${dave.equipped().headwear}`);+ `${SLOT}=${dave.equipped()[SLOT]}`);await dave.leave();await aliceAgain.leave();@@ -251,12 +264,12 @@ async function main() {check('closed window: an earlier attendee still owns it',aliceAfter.owned().includes(SOUVENIR_ID), `owned=${JSON.stringify(aliceAfter.owned())}`);check('closed window: and is still wearing it',- aliceAfter.equipped().headwear === SOUVENIR_ID, JSON.stringify(aliceAfter.equipped()));+ aliceAfter.equipped()[SLOT] === SOUVENIR_ID, JSON.stringify(aliceAfter.equipped()));// Unequip and re-equip after the event to prove ownership is not time-scoped.await aliceAfter.equip('head-none');await aliceAfter.equip(SOUVENIR_ID);check('closed window: they can still take it off and put it back on',- aliceAfter.equipped().headwear === SOUVENIR_ID, JSON.stringify(aliceAfter.equipped()));+ aliceAfter.equipped()[SLOT] === SOUVENIR_ID, JSON.stringify(aliceAfter.equipped()));await aliceAfter.leave();} finally {configServer.close();