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.
Context
three.ws plays one shared animation library on any humanoid avatar by rewriting every bone name to one canonical skeleton. The map is src/glb-canonicalize.js, and Rig Doctor (src/rig-report.js) names which convention an uploaded skeleton follows.
Characters from Valve's Source engine (and models exported from its tools) use a Biped-derived skeleton behind a ValveBiped. prefix: ValveBiped.Bip01_Pelvis, ValveBiped.Bip01_L_UpperArm, ValveBiped.Bip01_Spine4, ValveBiped.Bip01_Neck1, ValveBiped.Bip01_Head1. None of them map today, in either the raw glTF spelling or the spelling three.js produces at runtime (its PropertyBinding.sanitizeNodeName deletes the ., giving ValveBipedBip01_Pelvis). Rig Doctor also reports these rigs as unrecognised, because its biped fingerprint only matches names that start with Bip.
Verified on main:
node --input-type=module -e "
import { canonicalizeBoneName as c } from './src/glb-canonicalize.js';
for (const n of ['ValveBiped.Bip01_Pelvis', 'ValveBipedBip01_Pelvis', 'ValveBiped.Bip01_L_UpperArm', 'Bip01_L_UpperArm', 'Bip01_Spine4', 'Bip01_Neck1', 'Bip01_Head1']) console.log(n, '->', c(n));
"
ValveBiped.Bip01_Pelvis -> null
ValveBipedBip01_Pelvis -> null
ValveBiped.Bip01_L_UpperArm -> null
Bip01_L_UpperArm -> LeftArm
Bip01_Spine4 -> null
Bip01_Neck1 -> null
Bip01_Head1 -> null
The fourth line is the good news: once the ValveBiped prefix is gone, the existing 3ds Max Biped handling already maps the limbs. What is left is the prefix and the few joints Source numbers differently.
What to change
- In
_lookupBoneinsrc/glb-canonicalize.js, strip a leadingValveBipedprefix (with or without the.) before the existingBip<NN>strip, with a comment naming the sanitizer case. - Map the Source-specific spellings:
Spine4(the top of Source's four-joint spine; choose the canonical target and say why in the comment),Neck1toNeck,Head1toHead. - Add a
sourceentry toCONVENTIONSinsrc/rig-report.jsthat matches joints starting withValveBiped., placed before thebipedentry so it wins. Add its row to the conventions table indocs/rig-doctor.md.
Fingers are tracked in the separate Biped finger-chain issue; once that lands, Source fingers map through the same path with no extra work here.
Acceptance criteria
- Pelvis, the spine chain, neck, head, clavicles, upper arms, forearms, hands, thighs, calves, and feet resolve for both
ValveBiped.Bip01_*andValveBipedBip01_*. - No mapping crosses sides (test both
LandR). - Every existing Biped case still passes.
-
detectConventionreports the new convention for a skeleton ofValveBiped.joints; a test intests/rig-report.test.jsproves it. - The Rig Doctor doc table has the new row, and the drift test that compares supported conventions with documented ones passes.
How to test
npx vitest run tests/glb-canonicalize.test.js tests/rig-report.test.js
npm test
Comment "taking this" before you start.