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.

feat: improve avatar loading in Live Trading Theater — reveal stage immediately upon roster retrieval to enhance user experience

nrpocbf7133ff861
diff --git a/src/theater-stage.js b/src/theater-stage.js
index f4f7353ba..a9299bf5d 100644
--- a/src/theater-stage.js
+++ b/src/theater-stage.js
@@ -83,14 +83,12 @@ const ALL_REACTION_CLIPS = [...new Set(Object.values(REACTIONS).flat())];
// never detonate. Ordered lightest first so the most-visible front desks paint
// fast. cesium-man's odd 22-bone rig (the earlier "blob") is deliberately out.
const FALLBACK_RIGS = [
- '/avatars/cz.glb', // ~0.6 MB, Avaturn
- '/avatars/default.glb', // ~0.7 MB, Avaturn (platform default)
- '/avatars/xbot.glb', // ~2.9 MB, Mixamo
- '/avatars/michelle.glb', // ~3.2 MB, Mixamo
- '/avatars/realistic-female.glb', // ~5.7 MB, Avaturn
+ '/avatars/cz.glb', // ~0.6 MB, Avaturn
+ '/avatars/default.glb', // ~0.7 MB, Avaturn (platform default)
+ '/avatars/xbot.glb', // ~2.9 MB, Mixamo
+ '/avatars/michelle.glb', // ~3.2 MB, Mixamo
+ '/avatars/realistic-female.glb', // ~5.7 MB, Avaturn
'/avatars/realistic-halfbody.glb',// ~5.9 MB, Avaturn (behind a desk = fine)
- '/avatars/realistic-male.glb', // ~9.7 MB, Avaturn
- '/avatars/selfie-girl.glb', // ~11 MB, Avaturn
];
// A distinct, deterministic colour per desk index (golden-angle hue walk) so that
@@ -374,8 +372,12 @@ export function createStage({ canvas, overlay, onSelect, reducedMotion = false,
// Everything else — an avatar-less agent, or a custom avatar that can't be
// rigged (a forge mesh, which is most of them) — becomes this desk's ASSIGNED
// fallback rig, tinted a unique colour, so no two desks ever look the same.
+ // Forge avatars are static text-to-3D meshes (no skeleton) — trying them is a
+ // wasted multi-MB download that always fails the rig gate, so skip straight to
+ // the assigned Avaturn rig. Only a genuinely riggable custom avatar is tried.
const realUrl = agentAvatarGlb(agent);
- let body = realUrl !== MANNEQUIN_GLB ? await buildBody(realUrl, slot) : null;
+ const tryReal = realUrl !== MANNEQUIN_GLB && !/\/forge\//.test(realUrl);
+ let body = tryReal ? await buildBody(realUrl, slot) : null;
if (disposed || performers.has(agent.id)) { body?.anim?.dispose?.(); return; }
if (!body || !body.drivable) {
body?.anim?.dispose?.();
diff --git a/src/theater.js b/src/theater.js
index f5fa669af..3455a1386 100644
--- a/src/theater.js
+++ b/src/theater.js
@@ -390,7 +390,13 @@ export function initTheater(root) {
await pool(rows, 5, resolveBody);
state.roster = rows;
state.byId = new Map(rows.map((a) => [a.id, a]));
- await stage.setRoster(rows);
+
+ // Reveal the stage as soon as we have the roster — the 3D bodies (heavy
+ // rigged avatars) stream in desk by desk rather than blocking the room
+ // behind a 30s "assembling" wait.
+ showState('stage');
+ maybeShowQuiet();
+ stage.setRoster(rows).catch((e) => log.warn('[theater] setRoster', e?.message));
// $THREE room: drop the coin centerpiece immediately as the room's anchor.
if (state.room.id === 'three') stage.spawnCenterpiece({ tint: 0x8b5cf6 });
@@ -400,9 +406,6 @@ export function initTheater(root) {
// Re-apply any watched highlight that belongs to this room.
for (const id of state.watch) if (state.byId.has(id)) stage.highlight(id);
-
- showState('stage');
- maybeShowQuiet();
} catch (err) {
log.warn('[theater] room load failed', err?.message);
showState('error');