@helix3/helix-cli 0.1.7-helix3.43 → 0.1.7-helix3.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ability.d.ts +2 -2
- package/dist/ability.js +6 -5
- package/dist/ability.js.map +1 -1
- package/dist/character/stages/conform.js +12 -3
- package/dist/character/stages/conform.js.map +1 -1
- package/dist/gesture/axisReference.d.ts +22 -0
- package/dist/gesture/axisReference.js +32 -0
- package/dist/gesture/axisReference.js.map +1 -0
- package/dist/gesture/capture.d.ts +75 -0
- package/dist/gesture/capture.js +274 -0
- package/dist/gesture/capture.js.map +1 -0
- package/dist/gesture/harnessPage.d.ts +17 -0
- package/dist/gesture/harnessPage.js +147 -0
- package/dist/gesture/harnessPage.js.map +1 -0
- package/dist/gesture/inspect.d.ts +104 -0
- package/dist/gesture/inspect.js +357 -0
- package/dist/gesture/inspect.js.map +1 -0
- package/dist/gesture/rig.d.ts +12 -0
- package/dist/gesture/rig.js +111 -0
- package/dist/gesture/rig.js.map +1 -0
- package/dist/gesture/worldRuntime.d.ts +27 -0
- package/dist/gesture/worldRuntime.js +73 -0
- package/dist/gesture/worldRuntime.js.map +1 -0
- package/dist/index.js +123 -0
- package/dist/index.js.map +1 -1
- package/dist/install.d.ts +2 -2
- package/dist/install.js +5 -9
- package/dist/install.js.map +1 -1
- package/dist/lib.d.ts +15 -0
- package/dist/lib.js +31 -0
- package/dist/lib.js.map +1 -1
- package/dist/paths.d.ts +4 -0
- package/dist/paths.js +11 -0
- package/dist/paths.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/vendor/README.md +40 -0
- package/vendor/capture-body.glb +0 -0
- package/vendor/capture-face.glb +0 -0
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_BONES = void 0;
|
|
4
|
+
exports.compass = compass;
|
|
5
|
+
exports.describePose = describePose;
|
|
6
|
+
exports.inspectGesture = inspectGesture;
|
|
7
|
+
exports.formatInspect = formatInspect;
|
|
8
|
+
exports.relevantAxisRows = relevantAxisRows;
|
|
9
|
+
// PORTED from helix-web-engine-new/systems/humanoid-character/scripts/pose.mjs — the source of truth for
|
|
10
|
+
// pose observability. SYNC OBLIGATION: fix bugs there first, then mirror the change here; do not diverge.
|
|
11
|
+
/**
|
|
12
|
+
* Headless pose observability — answers "where does this clip actually put the body, and what is it
|
|
13
|
+
* actually doing" without a browser.
|
|
14
|
+
*
|
|
15
|
+
* WHY THIS EXISTS
|
|
16
|
+
* ---------------
|
|
17
|
+
* The bone axis table describes what each axis does FROM REST. Those meanings stop being true the moment
|
|
18
|
+
* a parent rotates: rotations chain, so a child's "raises the arm" axis is carried wherever the parent
|
|
19
|
+
* twist put it. Authoring a large multi-joint pose therefore cannot be reasoned out from the table alone
|
|
20
|
+
* — the only ground truth is where the bones land once the whole chain is posed.
|
|
21
|
+
*
|
|
22
|
+
* Runs the world's OWN compileGesture + GesturePlayer, so it cannot drift from what the world renders.
|
|
23
|
+
*/
|
|
24
|
+
const node_fs_1 = require("node:fs");
|
|
25
|
+
const rig_1 = require("./rig");
|
|
26
|
+
const worldRuntime_1 = require("./worldRuntime");
|
|
27
|
+
const axisReference_1 = require("./axisReference");
|
|
28
|
+
exports.DEFAULT_BONES = ['clavicle_r', 'upperarm_r', 'lowerarm_r', 'hand_r', 'head', 'spine_03'];
|
|
29
|
+
const MOTION_SAMPLES = 64;
|
|
30
|
+
const AXIS_PROBE_DEG = 10;
|
|
31
|
+
const round = (v, n = 3) => Math.round(v * 10 ** n) / 10 ** n;
|
|
32
|
+
const vec = (v) => [round(v.x), round(v.y), round(v.z)];
|
|
33
|
+
const AXIS_NAMES = ['x', 'y', 'z'];
|
|
34
|
+
/** Exported for tests: these two produce the human-facing readback, and are duck-typed on .x/.y/.z so
|
|
35
|
+
* they need no three. A sign error here silently misleads every measurement an agent takes. */
|
|
36
|
+
/** Coarse compass for a unit vector — never a precise angle, because conformed rigs differ by ~20° at the extremities. */
|
|
37
|
+
function compass(v) {
|
|
38
|
+
const opts = [
|
|
39
|
+
['up', v.y], ['down', -v.y], ['forward', v.z], ['backward', -v.z],
|
|
40
|
+
['character-left', v.x], ['character-right', -v.x],
|
|
41
|
+
].sort((a, b) => b[1] - a[1]);
|
|
42
|
+
return opts[0][1] < 0.8 ? `${opts[0][0]} and ${opts[1][0]}` : opts[0][0];
|
|
43
|
+
}
|
|
44
|
+
const worldOf = (three, bone) => { const p = new three.Vector3(); bone.getWorldPosition(p); return p; };
|
|
45
|
+
const childBone = (bone) => bone.children.find((c) => c.isBone === true);
|
|
46
|
+
/** The bone's TIP (its child joint). Rotating a bone does not move its own origin — only the tip moves,
|
|
47
|
+
* which is why wrist rotation is invisible to a hand_r position probe. */
|
|
48
|
+
const tipOf = (three, bone) => { const c = childBone(bone); return c !== undefined ? worldOf(three, c) : worldOf(three, bone); };
|
|
49
|
+
function poseAt(ctx, gesture, seconds) {
|
|
50
|
+
for (const [bone, q] of ctx.rig.bind)
|
|
51
|
+
bone.quaternion.copy(q);
|
|
52
|
+
ctx.player.pose(gesture, seconds);
|
|
53
|
+
ctx.rig.root.updateMatrixWorld(true);
|
|
54
|
+
}
|
|
55
|
+
// ---- Self-calibrating hand frame ---------------------------------------------------------------------
|
|
56
|
+
// Conform rebinds every character to the canonical skeleton but AIMS each mapped bone at that character's
|
|
57
|
+
// own child joint (shortestArc4) — so hand frames differ by up to ~20° between rigs. Deriving the palm
|
|
58
|
+
// from THIS rig's own bind pose absorbs that arc by construction; a canonical constant would not.
|
|
59
|
+
function handFrame(ctx, handName) {
|
|
60
|
+
const { three, rig } = ctx;
|
|
61
|
+
const hand = rig.find(handName);
|
|
62
|
+
if (hand === null)
|
|
63
|
+
return null;
|
|
64
|
+
const side = handName.endsWith('_l') ? '_l' : '_r';
|
|
65
|
+
const fingerBone = rig.find(`middle_01${side}`) ?? rig.find(`index_01${side}`);
|
|
66
|
+
const thumbBone = rig.find(`thumb_01${side}`);
|
|
67
|
+
if (fingerBone === null || thumbBone === null)
|
|
68
|
+
return { unavailable: 'rig lacks finger bones' };
|
|
69
|
+
for (const [bone, q] of rig.bind)
|
|
70
|
+
bone.quaternion.copy(q);
|
|
71
|
+
rig.root.updateMatrixWorld(true);
|
|
72
|
+
const origin = worldOf(three, hand);
|
|
73
|
+
const fingers = worldOf(three, fingerBone).sub(origin).normalize();
|
|
74
|
+
const thumb = worldOf(three, thumbBone).sub(origin).normalize();
|
|
75
|
+
const palm = new three.Vector3().crossVectors(fingers, thumb).normalize();
|
|
76
|
+
// Cross-product handedness is a convention, not a measurement — fix it per side rather than sniffing a
|
|
77
|
+
// component. Verified on body-m / body-f / web-viking: right-hand cross(fingers,thumb) points INTO the
|
|
78
|
+
// palm on all three, and the left hand mirrors it exactly (Y/Z negated, X equal).
|
|
79
|
+
if (side === '_r')
|
|
80
|
+
palm.negate();
|
|
81
|
+
const bindQ = new three.Quaternion();
|
|
82
|
+
hand.getWorldQuaternion(bindQ);
|
|
83
|
+
const inv = bindQ.clone().invert();
|
|
84
|
+
return { hand, fingersLocal: fingers.applyQuaternion(inv), palmLocal: palm.applyQuaternion(inv) };
|
|
85
|
+
}
|
|
86
|
+
function facingNow(ctx, frame) {
|
|
87
|
+
if (frame === null)
|
|
88
|
+
return null;
|
|
89
|
+
if ('unavailable' in frame)
|
|
90
|
+
return { unavailable: frame.unavailable };
|
|
91
|
+
const q = new ctx.three.Quaternion();
|
|
92
|
+
frame.hand.getWorldQuaternion(q);
|
|
93
|
+
const palm = frame.palmLocal.clone().applyQuaternion(q);
|
|
94
|
+
const fingers = frame.fingersLocal.clone().applyQuaternion(q);
|
|
95
|
+
return { palm: vec(palm), fingers: vec(fingers), reads: `palm faces ${compass(palm)}, fingers point ${compass(fingers)}` };
|
|
96
|
+
}
|
|
97
|
+
/** Plain-English readback so an agent with no eyes can still tell a good pose from a broken one. */
|
|
98
|
+
function describePose(name, pos, dir, ref) {
|
|
99
|
+
const parts = [];
|
|
100
|
+
if (ref.head !== null) {
|
|
101
|
+
const d = pos.y - ref.head;
|
|
102
|
+
if (d > 0.08)
|
|
103
|
+
parts.push(`${round(d, 2)}m above head`);
|
|
104
|
+
else if (d > -0.08)
|
|
105
|
+
parts.push('at head height');
|
|
106
|
+
else if (pos.y > ref.shoulder - 0.08)
|
|
107
|
+
parts.push('between shoulder and head');
|
|
108
|
+
else if (pos.y > ref.hip)
|
|
109
|
+
parts.push('between hip and shoulder');
|
|
110
|
+
else
|
|
111
|
+
parts.push('below hip');
|
|
112
|
+
}
|
|
113
|
+
const side = pos.x - ref.centerX;
|
|
114
|
+
if (Math.abs(side) > 0.12)
|
|
115
|
+
parts.push(`${round(Math.abs(side), 2)}m to the ${side > 0 ? 'character-left' : 'character-right'}`);
|
|
116
|
+
else
|
|
117
|
+
parts.push('near the midline');
|
|
118
|
+
const fwd = pos.z - ref.centerZ;
|
|
119
|
+
if (Math.abs(fwd) > 0.12)
|
|
120
|
+
parts.push(fwd > 0 ? `${round(fwd, 2)}m in front` : `${round(-fwd, 2)}m behind`);
|
|
121
|
+
if (dir !== null)
|
|
122
|
+
parts.push(`points ${compass(dir)}`);
|
|
123
|
+
return `${name}: ${parts.join(', ')}`;
|
|
124
|
+
}
|
|
125
|
+
function refsNow(ctx) {
|
|
126
|
+
const at = (n) => { const b = ctx.rig.find(n); return b !== null ? worldOf(ctx.three, b) : null; };
|
|
127
|
+
const head = at('head'), clav = at('clavicle_r'), pelvis = at('pelvis'), spine = at('spine_03');
|
|
128
|
+
return {
|
|
129
|
+
head: head !== null ? head.y : null,
|
|
130
|
+
shoulder: clav !== null ? clav.y : 0,
|
|
131
|
+
hip: pelvis !== null ? pelvis.y : 0,
|
|
132
|
+
centerX: spine !== null ? spine.x : 0,
|
|
133
|
+
centerZ: spine !== null ? spine.z : 0,
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
async function inspectGesture(opts) {
|
|
137
|
+
let raw;
|
|
138
|
+
try {
|
|
139
|
+
raw = opts.clip === '-' ? (0, node_fs_1.readFileSync)(0, 'utf8') : (0, node_fs_1.readFileSync)(opts.clip, 'utf8');
|
|
140
|
+
}
|
|
141
|
+
catch (err) {
|
|
142
|
+
throw new Error(`cannot read the gesture clip ${opts.clip}: ${err instanceof Error ? err.message : String(err)}`);
|
|
143
|
+
}
|
|
144
|
+
let source;
|
|
145
|
+
try {
|
|
146
|
+
source = JSON.parse(raw);
|
|
147
|
+
}
|
|
148
|
+
catch (err) {
|
|
149
|
+
throw new Error(`${opts.clip} is not valid JSON: ${err.message}`);
|
|
150
|
+
}
|
|
151
|
+
const runtime = await (0, worldRuntime_1.loadGestureRuntime)(opts.worldDir);
|
|
152
|
+
const { three } = runtime;
|
|
153
|
+
const compiled = runtime.compileGesture(source);
|
|
154
|
+
const rig = opts.rig ? await (0, rig_1.glbRig)(three, opts.rig) : (0, rig_1.canonicalRig)(three);
|
|
155
|
+
// The player captures the bind pose at construction — must happen before anything poses the rig.
|
|
156
|
+
const ctx = { three, rig, player: new runtime.GesturePlayer(rig.root) };
|
|
157
|
+
const bones = opts.bones ?? exports.DEFAULT_BONES;
|
|
158
|
+
const times = (opts.times ?? []).length > 0 || opts.motion === true || opts.axes === true ? (opts.times ?? []) : ['0'];
|
|
159
|
+
const handFrames = new Map();
|
|
160
|
+
for (const name of bones)
|
|
161
|
+
if (/^hand_(l|r)$/.test(name))
|
|
162
|
+
handFrames.set(name, handFrame(ctx, name));
|
|
163
|
+
// ---- static frames --------------------------------------------------------------------------------
|
|
164
|
+
const frames = [];
|
|
165
|
+
for (const spec of times) {
|
|
166
|
+
const seconds = spec.endsWith('%') ? (parseFloat(spec) / 100) * compiled.gesture.duration : parseFloat(spec);
|
|
167
|
+
if (Number.isNaN(seconds))
|
|
168
|
+
throw new Error(`--t: '${spec}' is not a number of seconds or a percentage`);
|
|
169
|
+
poseAt(ctx, compiled.gesture, seconds);
|
|
170
|
+
const ref = refsNow(ctx);
|
|
171
|
+
const out = {};
|
|
172
|
+
for (const name of bones) {
|
|
173
|
+
const bone = rig.find(name);
|
|
174
|
+
if (bone === null) {
|
|
175
|
+
out[name] = { reads: `${name}: no such bone`, error: 'no such bone' };
|
|
176
|
+
continue;
|
|
177
|
+
}
|
|
178
|
+
const pos = worldOf(three, bone);
|
|
179
|
+
const child = childBone(bone);
|
|
180
|
+
const dir = child !== undefined ? worldOf(three, child).sub(pos).normalize() : null;
|
|
181
|
+
const entry = { pos: vec(pos), dir: dir !== null ? vec(dir) : null, reads: describePose(name, pos, dir, ref) };
|
|
182
|
+
if (handFrames.has(name))
|
|
183
|
+
entry.facing = facingNow(ctx, handFrames.get(name));
|
|
184
|
+
out[name] = entry;
|
|
185
|
+
}
|
|
186
|
+
frames.push({ t: seconds, bones: out });
|
|
187
|
+
}
|
|
188
|
+
// ---- --motion: what the clip DOES over time -------------------------------------------------------
|
|
189
|
+
// A static frame cannot show this. Tracks each bone's TIP, so wrist/finger rotation is visible.
|
|
190
|
+
let motion = null;
|
|
191
|
+
if (opts.motion === true) {
|
|
192
|
+
motion = {};
|
|
193
|
+
const paths = new Map(bones.map((n) => [n, []]));
|
|
194
|
+
const [w0, w1] = opts.motionWindow ?? [0, compiled.gesture.duration];
|
|
195
|
+
for (let i = 0; i < MOTION_SAMPLES; i++) {
|
|
196
|
+
poseAt(ctx, compiled.gesture, w0 + (i / (MOTION_SAMPLES - 1)) * (w1 - w0));
|
|
197
|
+
for (const name of bones) {
|
|
198
|
+
const bone = rig.find(name);
|
|
199
|
+
if (bone !== null)
|
|
200
|
+
paths.get(name).push(tipOf(three, bone));
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
for (const [name, path] of paths) {
|
|
204
|
+
if (path.length === 0) {
|
|
205
|
+
motion[name] = { reads: `${name}: no such bone`, error: 'no such bone' };
|
|
206
|
+
continue;
|
|
207
|
+
}
|
|
208
|
+
const ext = ['x', 'y', 'z'].map((k) => {
|
|
209
|
+
const vals = path.map((p) => p[k]);
|
|
210
|
+
return Math.max(...vals) - Math.min(...vals);
|
|
211
|
+
});
|
|
212
|
+
const [lateral, vertical, depth] = ext;
|
|
213
|
+
let length = 0;
|
|
214
|
+
for (let i = 1; i < path.length; i++)
|
|
215
|
+
length += path[i].distanceTo(path[i - 1]);
|
|
216
|
+
const dominant = ext.indexOf(Math.max(...ext));
|
|
217
|
+
const total = Math.hypot(lateral, vertical, depth) || 1;
|
|
218
|
+
// Reversals along the dominant axis: a wave has several, a one-way reach has none.
|
|
219
|
+
const key = ['x', 'y', 'z'][dominant];
|
|
220
|
+
let reversals = 0, sign = 0;
|
|
221
|
+
for (let i = 1; i < path.length; i++) {
|
|
222
|
+
const d = path[i][key] - path[i - 1][key];
|
|
223
|
+
if (Math.abs(d) < 1e-4)
|
|
224
|
+
continue;
|
|
225
|
+
const s = Math.sign(d);
|
|
226
|
+
if (sign !== 0 && s !== sign)
|
|
227
|
+
reversals++;
|
|
228
|
+
sign = s;
|
|
229
|
+
}
|
|
230
|
+
const label = ['side-to-side', 'up-and-down', 'front-to-back'][dominant];
|
|
231
|
+
const purity = round(ext[dominant] / total, 2);
|
|
232
|
+
motion[name] = {
|
|
233
|
+
lateral: round(lateral), vertical: round(vertical), depth: round(depth),
|
|
234
|
+
pathLength: round(length), dominant: label, purity, reversals,
|
|
235
|
+
reads: `${name}: moves ${round(ext[dominant], 2)}m ${label} (purity ${purity}), `
|
|
236
|
+
+ `lateral ${round(lateral, 2)} / vertical ${round(vertical, 2)} / depth ${round(depth, 2)}, ${reversals} reversal(s)`,
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
// ---- --axes: what each keyed axis actually does AT the posed chain ---------------------------------
|
|
241
|
+
// The rest-frame table cannot answer this once parents have rotated. Perturbs the SOURCE key value (what
|
|
242
|
+
// an author would edit) and recompiles, so the reported effect is exactly what changing that number does.
|
|
243
|
+
let axes = null;
|
|
244
|
+
if (opts.axes === true) {
|
|
245
|
+
const keys = Array.isArray(source.keys) ? source.keys : [];
|
|
246
|
+
const probeName = opts.probe ?? [...bones].reverse().find((n) => rig.find(n) !== null) ?? 'hand_r';
|
|
247
|
+
axes = { probe: probeName, keys: [] };
|
|
248
|
+
for (let ki = 0; ki < keys.length; ki++) {
|
|
249
|
+
const key = keys[ki];
|
|
250
|
+
const bonesAtKey = key.bones ?? {};
|
|
251
|
+
const t = key.t ?? 0;
|
|
252
|
+
poseAt(ctx, compiled.gesture, t);
|
|
253
|
+
const probeBone = rig.find(probeName);
|
|
254
|
+
if (probeBone === null)
|
|
255
|
+
break;
|
|
256
|
+
const base = tipOf(three, probeBone);
|
|
257
|
+
const rows = [];
|
|
258
|
+
for (const boneName of Object.keys(bonesAtKey)) {
|
|
259
|
+
for (let ai = 0; ai < 3; ai++) {
|
|
260
|
+
const probeSource = JSON.parse(JSON.stringify(source));
|
|
261
|
+
probeSource.keys[ki].bones[boneName][ai] += AXIS_PROBE_DEG;
|
|
262
|
+
let probeGesture;
|
|
263
|
+
try {
|
|
264
|
+
probeGesture = runtime.compileGesture(probeSource).gesture;
|
|
265
|
+
}
|
|
266
|
+
catch {
|
|
267
|
+
continue;
|
|
268
|
+
}
|
|
269
|
+
poseAt(ctx, probeGesture, t);
|
|
270
|
+
const moved = tipOf(three, rig.find(probeName)).sub(base);
|
|
271
|
+
const mag = moved.length();
|
|
272
|
+
if (mag < 1e-4) {
|
|
273
|
+
rows.push({ axis: `${boneName}.${AXIS_NAMES[ai]}`, magnitude: 0, reads: `${boneName}.${AXIS_NAMES[ai]}: no effect on ${probeName}` });
|
|
274
|
+
continue;
|
|
275
|
+
}
|
|
276
|
+
const unit = moved.clone().normalize();
|
|
277
|
+
rows.push({
|
|
278
|
+
axis: `${boneName}.${AXIS_NAMES[ai]}`, magnitude: round(mag), delta: vec(moved),
|
|
279
|
+
reads: `${boneName}.${AXIS_NAMES[ai]}: +${AXIS_PROBE_DEG}° moves ${probeName} ${round(mag, 3)}m ${compass(unit)}`,
|
|
280
|
+
});
|
|
281
|
+
poseAt(ctx, compiled.gesture, t);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
rows.sort((a, b) => b.magnitude - a.magnitude);
|
|
285
|
+
axes.keys.push({ t, rows });
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
return {
|
|
289
|
+
clip: compiled.gesture.name,
|
|
290
|
+
duration: compiled.gesture.duration,
|
|
291
|
+
rig: rig.source,
|
|
292
|
+
system: runtime.systemPath,
|
|
293
|
+
warnings: compiled.warnings ?? [],
|
|
294
|
+
frames,
|
|
295
|
+
motion,
|
|
296
|
+
axes,
|
|
297
|
+
keyedAxisRows: relevantAxisRows(runtime.axisTable, source),
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
/** Human-readable report. `--json` returns the InspectResult instead. */
|
|
301
|
+
function formatInspect(r, opts = {}) {
|
|
302
|
+
const out = [`${r.clip} (${r.duration}s) — rig ${r.rig}`];
|
|
303
|
+
if (r.warnings.length > 0)
|
|
304
|
+
out.push(`warnings:\n ${r.warnings.join('\n ')}`);
|
|
305
|
+
for (const f of r.frames) {
|
|
306
|
+
out.push(`\nt=${f.t}s`);
|
|
307
|
+
for (const [name, b] of Object.entries(f.bones)) {
|
|
308
|
+
out.push(` ${b.reads}`);
|
|
309
|
+
if (b.pos !== undefined)
|
|
310
|
+
out.push(` pos=${JSON.stringify(b.pos)} dir=${JSON.stringify(b.dir)}`);
|
|
311
|
+
if (b.facing != null)
|
|
312
|
+
out.push(` ${b.facing.unavailable !== undefined ? `facing unavailable — ${b.facing.unavailable}` : b.facing.reads}`);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
if (r.motion !== null) {
|
|
316
|
+
out.push(`\nmotion over ${opts.motionWindow ? `t=${opts.motionWindow[0]}..${opts.motionWindow[1]}` : 'the whole clip'}`);
|
|
317
|
+
for (const m of Object.values(r.motion))
|
|
318
|
+
out.push(` ${m.reads}`);
|
|
319
|
+
}
|
|
320
|
+
if (r.axes !== null) {
|
|
321
|
+
out.push(`\naxis effects at the posed chain (probe: ${r.axes.probe}, +${AXIS_PROBE_DEG}° each)`);
|
|
322
|
+
for (const k of r.axes.keys) {
|
|
323
|
+
if (k.rows.length === 0)
|
|
324
|
+
continue;
|
|
325
|
+
out.push(` t=${k.t}s`);
|
|
326
|
+
for (const row of k.rows.slice(0, 8))
|
|
327
|
+
out.push(` ${row.reads}`);
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
if (r.warnings.length > 0 && r.keyedAxisRows.length > 0) {
|
|
331
|
+
out.push('\nnatural ranges for the bones this clip keys (outside them warns, it does not fail)');
|
|
332
|
+
for (const row of r.keyedAxisRows) {
|
|
333
|
+
out.push(` ${row.bones} x ${row.natural.x.join('…')} y ${row.natural.y.join('…')} z ${row.natural.z.join('…')}`);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
return out.join('\n');
|
|
337
|
+
}
|
|
338
|
+
/** Natural-range context for the bones a clip actually keys — the table rows that matter, not all 15. */
|
|
339
|
+
function relevantAxisRows(table, clipJson) {
|
|
340
|
+
if (table === null)
|
|
341
|
+
return [];
|
|
342
|
+
const keyed = new Set();
|
|
343
|
+
for (const key of Array.isArray(clipJson?.keys) ? clipJson.keys : [])
|
|
344
|
+
for (const b of Object.keys(key.bones ?? {}))
|
|
345
|
+
keyed.add(b);
|
|
346
|
+
const seen = new Set();
|
|
347
|
+
const hits = [];
|
|
348
|
+
for (const bone of keyed) {
|
|
349
|
+
const ref = (0, axisReference_1.axisReferenceFor)(table, bone);
|
|
350
|
+
if (ref === undefined || seen.has(ref))
|
|
351
|
+
continue;
|
|
352
|
+
seen.add(ref);
|
|
353
|
+
hits.push({ bones: ref.bones.source, axes: ref.axes, natural: ref.natural });
|
|
354
|
+
}
|
|
355
|
+
return hits;
|
|
356
|
+
}
|
|
357
|
+
//# sourceMappingURL=inspect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspect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the pose reset restores from this. */
|
|
4
|
+
bind: Map<any, any>;
|
|
5
|
+
find: (name: string) => any | null;
|
|
6
|
+
source: string;
|
|
7
|
+
}
|
|
8
|
+
/** The embedded canonical skeleton: local rest transforms are column-major mat4s, decomposed to TRS. */
|
|
9
|
+
export declare function canonicalRig(three: any): Rig;
|
|
10
|
+
/** A custom character's own rig. Only names + TRS are read, so KTX2 textures never need transcoding.
|
|
11
|
+
* Mirrors `buildRig` in the engine's scripts/pose.mjs — same SYNC OBLIGATION as ./inspect.ts. */
|
|
12
|
+
export declare function glbRig(three: any, glbPath: string): Promise<Rig>;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.canonicalRig = canonicalRig;
|
|
37
|
+
exports.glbRig = glbRig;
|
|
38
|
+
// Builds the bone tree the gesture player poses. Default source is the canonical helix-humanoid@1 rest
|
|
39
|
+
// skeleton already embedded for the conform pipeline — so inspecting a clip needs no asset download and
|
|
40
|
+
// no network. `--rig <glb>` swaps in a custom character's own skeleton (conform aims each mapped bone at
|
|
41
|
+
// that character's child joint, so extremity frames differ by up to ~20° between rigs).
|
|
42
|
+
const canonicalSkeletonData_1 = require("../character/canonicalSkeletonData");
|
|
43
|
+
function finalize(root, source) {
|
|
44
|
+
root.updateMatrixWorld(true);
|
|
45
|
+
const bind = new Map();
|
|
46
|
+
const byName = new Map();
|
|
47
|
+
root.traverse((n) => {
|
|
48
|
+
if (n.isBone !== true)
|
|
49
|
+
return;
|
|
50
|
+
bind.set(n, n.quaternion.clone());
|
|
51
|
+
if (!byName.has(n.name))
|
|
52
|
+
byName.set(n.name, n);
|
|
53
|
+
});
|
|
54
|
+
return { root, bind, find: (name) => byName.get(name) ?? null, source };
|
|
55
|
+
}
|
|
56
|
+
/** The embedded canonical skeleton: local rest transforms are column-major mat4s, decomposed to TRS. */
|
|
57
|
+
function canonicalRig(three) {
|
|
58
|
+
const bones = new Map();
|
|
59
|
+
const root = new three.Object3D();
|
|
60
|
+
const m = new three.Matrix4();
|
|
61
|
+
for (const node of canonicalSkeletonData_1.CANONICAL_SKELETON_NODES) {
|
|
62
|
+
const bone = new three.Bone();
|
|
63
|
+
bone.name = node.name;
|
|
64
|
+
m.fromArray(node.local);
|
|
65
|
+
m.decompose(bone.position, bone.quaternion, bone.scale);
|
|
66
|
+
bones.set(node.name, bone);
|
|
67
|
+
const parent = node.parent === null ? root : bones.get(node.parent);
|
|
68
|
+
if (parent === undefined)
|
|
69
|
+
throw new Error(`canonical skeleton is out of order: ${node.name} precedes its parent ${node.parent}`);
|
|
70
|
+
parent.add(bone);
|
|
71
|
+
}
|
|
72
|
+
if (!bones.has(canonicalSkeletonData_1.CANONICAL_SKELETON_ROOT))
|
|
73
|
+
throw new Error(`canonical skeleton has no root '${canonicalSkeletonData_1.CANONICAL_SKELETON_ROOT}'`);
|
|
74
|
+
return finalize(root, `canonical helix-humanoid@1 (embedded, ${bones.size} bones)`);
|
|
75
|
+
}
|
|
76
|
+
/** A custom character's own rig. Only names + TRS are read, so KTX2 textures never need transcoding.
|
|
77
|
+
* Mirrors `buildRig` in the engine's scripts/pose.mjs — same SYNC OBLIGATION as ./inspect.ts. */
|
|
78
|
+
async function glbRig(three, glbPath) {
|
|
79
|
+
const { NodeIO } = await Promise.resolve().then(() => __importStar(require('@gltf-transform/core')));
|
|
80
|
+
const { ALL_EXTENSIONS } = await Promise.resolve().then(() => __importStar(require('@gltf-transform/extensions')));
|
|
81
|
+
// Extensions must be registered even though only the node hierarchy is read: the reader validates
|
|
82
|
+
// extensionsRequired up front, and the shipped bodies carry KTX2.
|
|
83
|
+
let doc;
|
|
84
|
+
try {
|
|
85
|
+
doc = await new NodeIO().registerExtensions(ALL_EXTENSIONS).read(glbPath);
|
|
86
|
+
}
|
|
87
|
+
catch (err) {
|
|
88
|
+
// The reader fails deep inside on a non-GLB (e.g. "reading 'version'"), which says nothing useful.
|
|
89
|
+
throw new Error(`--rig: ${glbPath} is not a readable .glb/.gltf — ${err instanceof Error ? err.message : String(err)}`);
|
|
90
|
+
}
|
|
91
|
+
const root = new three.Object3D();
|
|
92
|
+
let count = 0;
|
|
93
|
+
const convert = (node) => {
|
|
94
|
+
const bone = new three.Bone();
|
|
95
|
+
bone.name = node.getName();
|
|
96
|
+
bone.position.fromArray(node.getTranslation());
|
|
97
|
+
bone.quaternion.fromArray(node.getRotation());
|
|
98
|
+
bone.scale.fromArray(node.getScale());
|
|
99
|
+
count++;
|
|
100
|
+
for (const child of node.listChildren())
|
|
101
|
+
bone.add(convert(child));
|
|
102
|
+
return bone;
|
|
103
|
+
};
|
|
104
|
+
const scene = doc.getRoot().listScenes()[0];
|
|
105
|
+
if (scene === undefined)
|
|
106
|
+
throw new Error(`${glbPath} has no scene`);
|
|
107
|
+
for (const node of scene.listChildren())
|
|
108
|
+
root.add(convert(node));
|
|
109
|
+
return finalize(root, `${glbPath} (${count} nodes)`);
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=rig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rig.js","sourceRoot":"","sources":["../../src/gesture/rig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,oCAgBC;AAID,wBA4BC;AA3ED,uGAAuG;AACvG,wGAAwG;AACxG,yGAAyG;AACzG,wFAAwF;AACxF,8EAAuG;AAUvG,SAAS,QAAQ,CAAC,IAAS,EAAE,MAAc;IACzC,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC7B,MAAM,IAAI,GAAG,IAAI,GAAG,EAAY,CAAC;IACjC,MAAM,MAAM,GAAG,IAAI,GAAG,EAAe,CAAC;IACtC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAM,EAAE,EAAE;QACvB,IAAI,CAAC,CAAC,MAAM,KAAK,IAAI;YAAE,OAAO;QAC9B,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC;QAClC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;YAAE,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE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,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QACtC,KAAK,EAAE,CAAC;QACR,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,YAAY,EAAE;YAAE,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC;QAClE,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IACF,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;IAC5C,IAAI,KAAK,KAAK,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,eAAe,CAAC,CAAC;IACpE,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,YAAY,EAAE;QAAE,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACjE,OAAO,QAAQ,CAAC,IAAI,EAAE,GAAG,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { BoneAxisReference } from './axisReference';
|
|
2
|
+
export declare const SYSTEM_SLUG = "humanoid-character";
|
|
3
|
+
/** The subset of @helix/humanoid-character's public API the gesture tools use. */
|
|
4
|
+
export interface GestureRuntime {
|
|
5
|
+
three: any;
|
|
6
|
+
compileGesture: (json: unknown) => {
|
|
7
|
+
gesture: any;
|
|
8
|
+
warnings: string[];
|
|
9
|
+
};
|
|
10
|
+
GesturePlayer: new (root: any) => {
|
|
11
|
+
pose: (gesture: any, t: number, weight?: number) => void;
|
|
12
|
+
};
|
|
13
|
+
/** Absent on systems pinned before the table was exported — callers degrade instead of failing. */
|
|
14
|
+
axisTable: readonly BoneAxisReference[] | null;
|
|
15
|
+
systemPath: string;
|
|
16
|
+
}
|
|
17
|
+
/** Walk node_modules the way Node does. require.resolve is not usable here: three's `exports` map has no
|
|
18
|
+
* "./package.json" entry, so resolving into the package to find its root is blocked. Exported so capture
|
|
19
|
+
* resolves three the same way (hoisted/workspace layouts) and fails with this same npm-install message. */
|
|
20
|
+
export declare function threeRoot(worldDir: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* The exact file Node gives the system's own bare `import … from 'three'`, so the CLI and the system share
|
|
23
|
+
* ONE module instance — two instances would break every instanceof inside the player. Exported for tests:
|
|
24
|
+
* it is the only part of this module they can reach, since Jest cannot load real ESM through importEsm.
|
|
25
|
+
*/
|
|
26
|
+
export declare function threeEsmPath(worldDir: string): string;
|
|
27
|
+
export declare function loadGestureRuntime(worldDir: string): Promise<GestureRuntime>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SYSTEM_SLUG = void 0;
|
|
4
|
+
exports.threeRoot = threeRoot;
|
|
5
|
+
exports.threeEsmPath = threeEsmPath;
|
|
6
|
+
exports.loadGestureRuntime = loadGestureRuntime;
|
|
7
|
+
// Loads a world's OWN installed humanoid-character system (+ the three it was built against) so gesture
|
|
8
|
+
// tooling runs the real compiler and player rather than a reimplementation that could drift. Everything
|
|
9
|
+
// comes from the world: the code `helix install` downloaded, and the `three` in its node_modules.
|
|
10
|
+
const node_fs_1 = require("node:fs");
|
|
11
|
+
const node_path_1 = require("node:path");
|
|
12
|
+
const node_url_1 = require("node:url");
|
|
13
|
+
const esm_1 = require("../character/esm");
|
|
14
|
+
const paths_1 = require("../paths");
|
|
15
|
+
exports.SYSTEM_SLUG = 'humanoid-character';
|
|
16
|
+
function systemEntry(worldDir) {
|
|
17
|
+
const entry = (0, node_path_1.join)(worldDir, 'public', paths_1.MODULES_DIR, exports.SYSTEM_SLUG, 'index.js');
|
|
18
|
+
if (!(0, node_fs_1.existsSync)(entry)) {
|
|
19
|
+
throw new Error(`no installed ${exports.SYSTEM_SLUG} found at public/${paths_1.MODULES_DIR}/${exports.SYSTEM_SLUG}/index.js\n`
|
|
20
|
+
+ ` Gesture tools run the world's OWN pinned system, so the world must be installed first:\n`
|
|
21
|
+
+ ` cd ${worldDir} && npm install && helix install\n`
|
|
22
|
+
+ ' (via MCP: npm install, then install_world_packages on this directory)');
|
|
23
|
+
}
|
|
24
|
+
return entry;
|
|
25
|
+
}
|
|
26
|
+
/** Walk node_modules the way Node does. require.resolve is not usable here: three's `exports` map has no
|
|
27
|
+
* "./package.json" entry, so resolving into the package to find its root is blocked. Exported so capture
|
|
28
|
+
* resolves three the same way (hoisted/workspace layouts) and fails with this same npm-install message. */
|
|
29
|
+
function threeRoot(worldDir) {
|
|
30
|
+
for (let dir = worldDir;;) {
|
|
31
|
+
const candidate = (0, node_path_1.join)(dir, 'node_modules', 'three');
|
|
32
|
+
if ((0, node_fs_1.existsSync)((0, node_path_1.join)(candidate, 'package.json')))
|
|
33
|
+
return candidate;
|
|
34
|
+
const parent = (0, node_path_1.dirname)(dir);
|
|
35
|
+
if (parent === dir)
|
|
36
|
+
break;
|
|
37
|
+
dir = parent;
|
|
38
|
+
}
|
|
39
|
+
throw new Error(`three is not installed in ${worldDir}\n`
|
|
40
|
+
+ ' The character system imports three as an external — install the world\'s dependencies:\n'
|
|
41
|
+
+ ` cd ${worldDir} && npm install`);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The exact file Node gives the system's own bare `import … from 'three'`, so the CLI and the system share
|
|
45
|
+
* ONE module instance — two instances would break every instanceof inside the player. Exported for tests:
|
|
46
|
+
* it is the only part of this module they can reach, since Jest cannot load real ESM through importEsm.
|
|
47
|
+
*/
|
|
48
|
+
function threeEsmPath(worldDir) {
|
|
49
|
+
const root = threeRoot(worldDir);
|
|
50
|
+
const pkg = JSON.parse((0, node_fs_1.readFileSync)((0, node_path_1.join)(root, 'package.json'), 'utf8'));
|
|
51
|
+
const rel = pkg.exports?.['.']?.import ?? pkg.module ?? './build/three.module.js';
|
|
52
|
+
const esm = (0, node_path_1.join)(root, rel);
|
|
53
|
+
if (!(0, node_fs_1.existsSync)(esm))
|
|
54
|
+
throw new Error(`three at ${root} has no ESM entry at ${rel} — unexpected layout`);
|
|
55
|
+
return esm;
|
|
56
|
+
}
|
|
57
|
+
async function loadGestureRuntime(worldDir) {
|
|
58
|
+
const entry = systemEntry(worldDir);
|
|
59
|
+
const three = await (0, esm_1.importEsm)((0, node_url_1.pathToFileURL)(threeEsmPath(worldDir)).href);
|
|
60
|
+
const system = await (0, esm_1.importEsm)((0, node_url_1.pathToFileURL)(entry).href);
|
|
61
|
+
if (typeof system.compileGesture !== 'function' || typeof system.GesturePlayer !== 'function') {
|
|
62
|
+
throw new Error(`the installed ${exports.SYSTEM_SLUG} does not export compileGesture/GesturePlayer — it predates the gesture DSL.\n`
|
|
63
|
+
+ ' Re-pin a newer version in helix.json and rerun `helix install`.');
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
three,
|
|
67
|
+
compileGesture: system.compileGesture,
|
|
68
|
+
GesturePlayer: system.GesturePlayer,
|
|
69
|
+
axisTable: Array.isArray(system.BONE_AXIS_REFERENCE) ? system.BONE_AXIS_REFERENCE : null,
|
|
70
|
+
systemPath: entry,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=worldRuntime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worldRuntime.js","sourceRoot":"","sources":["../../src/gesture/worldRuntime.ts"],"names":[],"mappings":";;;AAsCA,8BAaC;AAOD,oCAOC;AAED,gDAiBC;AApFD,wGAAwG;AACxG,wGAAwG;AACxG,kGAAkG;AAClG,qCAAmD;AACnD,yCAA0C;AAC1C,uCAAyC;AACzC,0CAA6C;AAC7C,oCAAuC;AAG1B,QAAA,WAAW,GAAG,oBAAoB,CAAC;AAYhD,SAAS,WAAW,CAAC,QAAgB;IACnC,MAAM,KAAK,GAAG,IAAA,gBAAI,EAAC,QAAQ,EAAE,QAAQ,EAAE,mBAAW,EAAE,mBAAW,EAAE,UAAU,CAAC,CAAC;IAC7E,IAAI,CAAC,IAAA,oBAAU,EAA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