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.

fix: map CC spine01/02

nirholas7727961ef37b
diff --git a/src/glb-canonicalize.js b/src/glb-canonicalize.js
index 26edf9aae..1b00a9e4f 100644
--- a/src/glb-canonicalize.js
+++ b/src/glb-canonicalize.js
@@ -441,6 +441,12 @@ function _lookupBone(name) {
// tables below. Without this an entire CC export maps zero bones and lands in
// a bind-pose T-pose.
s = s.replace(/^CC_Base_/i, '');
+ // Reallusion CC3/CC4 numbered spine: CC_Base_Spine01/02 -> Spine01/02 after
+ // the vendor prefix is stripped. Unlike Unreal's spine_01, the CC names have
+ // no separator before their digits, so these exact matches cannot collide with
+ // Mixamo's de-duplication suffix handling for Spine_02.
+ if (/^spine01$/i.test(s)) return 'Spine';
+ if (/^spine02$/i.test(s)) return 'Spine1';
// Sketchfab / Maya joint exports prefix every joint `j_` (`j_pelvis`, `j_L_hip`,
// `j_spine_0`). Stripping it leaves stems the canonical + sided tables resolve.
// The negative lookahead protects VRM/VRoid, whose `J_Bip_*` / `J_Sec_*` names
diff --git a/tests/glb-canonicalize.test.js b/tests/glb-canonicalize.test.js
index 85f5996a7..f50bd57a5 100644
--- a/tests/glb-canonicalize.test.js
+++ b/tests/glb-canonicalize.test.js
@@ -241,6 +241,8 @@ describe('canonicalizeBoneName', () => {
it.each([
['CC_Base_Hip', 'Hips'],
['CC_Base_Pelvis', 'Hips'],
+ ['CC_Base_Spine01', 'Spine'],
+ ['CC_Base_Spine02', 'Spine1'],
['CC_Base_Head', 'Head'],
['CC_Base_NeckTwist01', 'Neck'],
['CC_Base_L_Clavicle', 'LeftShoulder'],