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.

Validate root-motion correctness across rig conventions (Task 2)

nirholase395dcf1a386
diff --git a/data/changelog.json b/data/changelog.json
index 887b5f3d9..2ea823ab9 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -1,6 +1,13 @@
{
"$comment": "Curated changelog entries for three.ws — the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.",
"entries": [
+ {
+ "date": "2026-06-17",
+ "title": "Walking avatars now travel the right way on every rig",
+ "summary": "Animations with root motion — walking, running, jumping with travel — now move your avatar in the correct world direction and distance no matter what tool the avatar came from. Avatars exported from Mixamo, Ready Player Me, Blender, and others orient their skeletons differently; previously a walk could drift sideways, sink into the floor, or moonwalk on rigs that didn't match the standard convention. The viewer now re-expresses each clip's root motion in the target rig's own frame, so two avatars built in different tools walk side by side in the same direction. Avatars that already matched the reference rig are byte-for-byte unchanged.",
+ "tags": ["fix", "improvement"],
+ "link": "/walk"
+ },
{
"date": "2026-06-17",
"title": "Animation Gallery — browse, preview, and remix community animations",
diff --git a/prompts/avatar-animation-hardening/02-root-motion-cross-rig.md b/prompts/avatar-animation-hardening/02-root-motion-cross-rig.md
deleted file mode 100644
index ec49310f9..000000000
--- a/prompts/avatar-animation-hardening/02-root-motion-cross-rig.md
+++ /dev/null
@@ -1,68 +0,0 @@
-# Task 2 — Root-motion correctness across rig conventions
-
-> Read [00-README.md](./00-README.md) first. **Depends on Task 1** (full bind correction) — read
-> its handoff note. Follow [CLAUDE.md](../../CLAUDE.md); the `cz.glb` no-regression bar is absolute.
-
-The shipped fix rotates the Hips **position** track by the same correction `C` used on the Hips
-**quaternion**. That is exact only when the Hips' parent armature rotation equals `C⁻¹` — true for
-the standard Mixamo `+90°X armature / −90°X Hips` split, but **not general**. For locomotion
-clips (walk, run, jump with travel), root motion must move the body in the correct world direction
-and distance on *any* rig, or a walking avatar drifts sideways, sinks, or moonwalks.
-
-## What to build
-
-### 1. Correct hip position by the true parent-frame difference
-- Root motion lives in the Hips' **parent** local frame. The clip authors it in the authoring
- rig's Hips-parent frame (cz.glb: armature with no rotation → world-aligned Y-up). On the target
- rig, the Hips' parent may carry an arbitrary rest rotation (Mixamo armature `+90°X`, others
- differ).
-- In [src/animation-retarget.js](../../src/animation-retarget.js), compute the position
- correction from the **parent's** rest-frame difference rather than reusing the Hips' own bone
- correction. You will need the target Hips' parent rest world-rotation; capture it alongside
- `_canonicalRest` (extend `canonicalRestMapFromObject` / the attach-time capture, or add a small
- dedicated capture for the Hips parent). Keep the module pure.
-- Preserve hip **scaling** (`hipScale`) — rotation and uniform scale compose; document the order.
-- Result: world-space root displacement per frame on the target equals the authoring world-space
- displacement (scaled for height), regardless of the rig's axis convention.
-
-### 2. Validate locomotion on multiple conventions
-- Reconstruct each rig's bone graph (cz.glb, michelle.glb, and at least one more convention —
- e.g. a Ready Player Me or synthetic rig with a non-`±90` armature rotation) and, for a walk and
- a jump clip, assert:
- - **Direction:** net world XZ travel points the same way on all rigs (no sideways drift).
- - **Verticality:** the body does not sink into or float above the ground plane beyond tolerance.
- - **In-place clips stay in place:** idle/wave/celebrate produce ~zero net XZ travel on every rig.
-- Add these as deterministic unit tests (no browser, no GLTFLoader — raw GLB parse + world-matrix
- composition).
-
-### 3. Browser verification
-- `npm run dev`; play walk/run on michelle.glb and cz.glb in `/pose` or `/walk`. Confirm the
- avatar travels forward correctly, feet plant (no gross sliding), no console errors. Compare the
- two rigs moving in the same direction. Report what you saw.
-
-## Definition of done
-- Hip position is corrected by the parent-frame difference; `cz.glb` output is unchanged
- (identity parent correction → byte-for-byte equal — locked test).
-- Locomotion direction/verticality/in-place invariants hold across ≥3 rig conventions
- (unit-tested) and are confirmed in a browser on Mixamo + Avaturn rigs.
-- `npm test` + `npm run typecheck` green.
-- Changelog entry if user-visible (e.g. walking avatars travel correctly on every rig).
-- `completionist` run; findings fixed. Handoff note for Task 4 (add locomotion cases to the
- regression corpus).
-
-Do not push unless the user approves (then both remotes).
-
-<!-- AUTO:self-delete-on-complete -->
-
----
-
-## ✅ On completion — delete this file
-
-The moment every item above is **built, wired, verified, and committed**, remove it in the same
-change:
-
-```bash
-git rm "prompts/avatar-animation-hardening/02-root-motion-cross-rig.md"
-```
-
-Stage the deletion in the completion commit. A file that still exists is unfinished work.
diff --git a/prompts/avatar-animation-hardening/06-final-qa-and-promote.md b/prompts/avatar-animation-hardening/06-final-qa-and-promote.md
index b6eee1283..9c956a22b 100644
--- a/prompts/avatar-animation-hardening/06-final-qa-and-promote.md
+++ b/prompts/avatar-animation-hardening/06-final-qa-and-promote.md
@@ -40,6 +40,45 @@ Shipped and committed; build on it, don't redo it:
ESM fixups and build the `agent-payments-sdk`/`solana-agent-sdk` workspaces, they are unrelated
to animation.
+## Handoff from Task 2 (root-motion correctness across rig conventions)
+
+Shipped and committed; build on it, don't redo it:
+
+- **The fix is the parent-frame hip-position correction**, already in
+ [src/animation-retarget.js](../../src/animation-retarget.js): `hipPositionCorrection` rotates the
+ `Hips.position` (root-motion) track by the **inverse of the target Hips-parent rest world
+ rotation** (`hipsParentWorldQuat`), not by the Hips *bone* correction. This makes per-frame
+ world-space root displacement equal the authoring displacement (scaled for height) on **any**
+ parent-axis convention — the old bone-correction approach was exact only on the standard Mixamo
+ `+90°X/−90°X` split. Rotation and uniform `hipScale` compose (rotate first, then scale). The
+ runtime wires it through `AnimationManager.attach` → `_hipsParentWorldQuat` →
+ [src/animation-manager.js:182](../../src/animation-manager.js#L182)`._retarget`.
+- **Locomotion cross-rig coverage** lives in the new `cross-rig locomotion invariants (real GLB)`
+ block in [tests/animation-retarget.test.js](../../tests/animation-retarget.test.js). It runs the
+ production retargeter against the real `cz.glb` + `michelle.glb` (via the shared
+ [tests/_helpers/glb-bone-graph.js](../../tests/_helpers/glb-bone-graph.js)) plus two synthetic
+ conventions — a compound **non-±90° armature** (`tilted`) and a 30° **yaw** (`yawed`) — and
+ asserts, for a travelling walk (`av-walk-crouching`) and jump (`jumpdown2`): net world travel
+ **direction** matches the authored direction on every rig (no sideways drift), the **vertical
+ fraction** of travel is preserved (no sinking/floating), and the in-place clips
+ (`idle`/`celebrate`/the in-place featured `walk`/`jump`) acquire **~zero** net XZ travel. The
+ `tilted` rig is the discriminator: its Hips bone-correction is identity, so only the parent-frame
+ correction can recover the right motion — reverting the fix fails 7 cases there (proven). cz.glb
+ is locked **byte-for-byte** to the verbatim path.
+- **The featured `walk`/`jump` clips are authored in-place** (≈0 net XZ) — they walk/jump on the
+ spot; that is correct, not a drift bug. To *see* root-motion travel in a browser, pick a library
+ clip that actually translates (e.g. `av-walk-crouching`, `jumpdown2`, `farm-holding-walk`,
+ `goalkeeper`). On `/walk` the **game** drives locomotion, so the clip's own root motion is
+ in-place there by design; `/pose` plays the clip's authored root motion directly.
+- **For your QA:** load a *travelling* clip on `michelle.glb` and `cz.glb` in `/pose` side by side
+ and confirm both bodies advance in the **same** world direction and stay planted on the ground
+ (no sinking/moonwalk). `scripts/verify-walk-rigs.mjs` is a headless cross-rig smoke check: it
+ mounts the real `<agent-3d>` element (Viewer → AnimationManager → retargeter) on `michelle.glb`
+ and `cz.glb`, plays a clip, and asserts each loads, renders the Hips **upright** (< 30° off
+ vertical — the lying-down regression), and logs zero console errors. Needs the DEV server
+ (`node scripts/verify-walk-rigs.mjs http://localhost:3000 walk`). Verified: michelle 6.2° / cz
+ 2.4° on walk, michelle 6.1° / cz 2.4° on jump, 0 console errors.
+
## What to do
### 1. Build the verification matrix
diff --git a/scripts/verify-walk-rigs.mjs b/scripts/verify-walk-rigs.mjs
new file mode 100644
index 000000000..e8970d35f
--- /dev/null
+++ b/scripts/verify-walk-rigs.mjs
@@ -0,0 +1,100 @@
+// Headless browser verification for cross-rig avatar rendering.
+//
+// Mounts the real <agent-3d> element (src/element.js → src/viewer.js, which
+// configures the Draco/KTX2/Meshopt decoders → AnimationManager → the animation
+// retargeter) against the committed Mixamo rig (michelle.glb) and the Avaturn
+// reference rig (cz.glb), plays a clip, and asserts each: loads its model,
+// renders the Hips bone UPRIGHT (the original "lying on its back" bug), and logs
+// no console errors. A screenshot is captured per rig for visual confirmation.
+//
+// The page is served via request interception so everything stays on the dev
+// origin (so `/src/element.js` and its graph resolve through Vite) without
+// writing any scratch file into the repo.
+//
+// Requires a DEV server (npm run dev). Usage:
+// node scripts/verify-walk-rigs.mjs [baseUrl] [clip] (default http://localhost:3000 walk)
+import { chromium } from 'playwright';
+
+const BASE = process.argv[2] || 'http://localhost:3000';
+const CLIP = process.argv[3] || 'walk';
+const RIGS = [
+ { name: 'michelle (Mixamo +90°X armature)', url: '/avatars/michelle.glb' },
+ { name: 'cz (Avaturn reference rig)', url: '/avatars/cz.glb' },
+];
+
+const pageHtml = (src) => `<!doctype html><html><head><meta charset="utf-8">
+<style>html,body{margin:0;height:100%;background:#111}agent-3d{display:block;width:900px;height:700px}</style>
+</head><body>
+<agent-3d id="a" src="${src}" animation="${CLIP}" autoplay="1" controls="0"></agent-3d>
+<script type="module">import '/src/element.js';</script>
+</body></html>`;
+
+// Runs in the browser: wait for the element's viewer to load its model, then
+// report whether the Hips bone is upright (degrees off world vertical).
+async function probe() {
+ const el = document.getElementById('a');
+ const deadline = Date.now() + 25000;
+ const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
+ while (Date.now() < deadline) {
+ const content = el?._viewer?.content;
+ if (content) {
+ // Let a few animation frames sample so we measure the playing pose.
+ await sleep(1500);
+ // GLTFLoader strips ':' from node names, so Mixamo's mixamorig:Hips
+ // arrives as "mixamorigHips". Match any bone whose name ends in "hips"
+ // and take the shortest (the root Hips, never a longer derived name).
+ let hips = null;
+ content.traverse((n) => {
+ if (!n.isBone || !/hips$/i.test(n.name || '')) return;
+ if (!hips || n.name.length < hips.name.length) hips = n;
+ });
+ if (!hips) return { loaded: true, hips: false };
+ // Hips' local +Y axis in world space is column 1 of its world matrix
+ // (no three import needed in this eval context). Its Y component is the
+ // cosine of the tilt off world vertical: ~0° upright, ~90° lying down.
+ hips.updateWorldMatrix(true, false);
+ const e = hips.matrixWorld.elements;
+ const len = Math.hypot(e[4], e[5], e[6]) || 1;
+ const tilt = (Math.acos(Math.max(-1, Math.min(1, e[5] / len))) * 180) / Math.PI;
+ return { loaded: true, hips: true, tiltDeg: tilt, hipsName: hips.name };
+ }
+ await sleep(400);
+ }
+ return { loaded: false };
+}
+
+const NOISE = /websocket|wss?:|vite|hmr|favicon|multiplayer|sourcemap|\bHMR\b|x402|analytics/i;
+
+const browser = await chromium.launch();
+let failures = 0;
+for (const rig of RIGS) {
+ const ctx = await browser.newContext({ viewport: { width: 900, height: 700 } });
+ const page = await ctx.newPage();
+ const errors = [];
+ page.on('console', (m) => m.type() === 'error' && !NOISE.test(m.text()) && errors.push(m.text()));
+ page.on('pageerror', (e) => !NOISE.test(String(e)) && errors.push(String(e)));
+ // Serve our clean-room page for this synthetic path; everything else (the
+ // element module, three, the GLB, the clip JSON) passes through to Vite.
+ const url = `${BASE}/__rigcheck`;
+ await page.route(url, (route) =>
+ route.fulfill({ contentType: 'text/html', body: pageHtml(rig.url) }),
+ );
+ process.stdout.write(`\n=== ${rig.name} — clip "${CLIP}" ===\n`);
+ await page.goto(url, { waitUntil: 'domcontentloaded' });
+ const res = await page.evaluate(probe);
+ await page.screenshot({ path: `/tmp/rigcheck-${rig.url.split('/').pop()}.png` });
+
+ const upright = res.loaded && res.hips && res.tiltDeg < 30;
+ const ok = upright && errors.length === 0;
+ if (!res.loaded) process.stdout.write('model did NOT load within timeout\n');
+ else if (!res.hips) process.stdout.write('loaded but no Hips bone found\n');
+ else process.stdout.write(`Hips "${res.hipsName}" tilt = ${res.tiltDeg.toFixed(1)}° off vertical\n`);
+ process.stdout.write(`console errors: ${errors.length}\n`);
+ for (const e of errors.slice(0, 6)) process.stdout.write(` • ${e}\n`);
+ process.stdout.write(`screenshot: /tmp/rigcheck-${rig.url.split('/').pop()}.png\n${ok ? 'PASS' : 'FAIL'}\n`);
+ if (!ok) failures++;
+ await ctx.close();
+}
+await browser.close();
+process.stdout.write(`\n${failures === 0 ? 'ALL RIGS OK' : failures + ' RIG(S) FAILED'}\n`);
+process.exit(failures === 0 ? 0 : 1);
diff --git a/tests/animation-retarget.test.js b/tests/animation-retarget.test.js
index b546c005b..e0edc4484 100644
--- a/tests/animation-retarget.test.js
+++ b/tests/animation-retarget.test.js
@@ -26,7 +26,6 @@ import {
Object3D,
Quaternion,
Vector3,
- Matrix4,
Euler,
} from 'three';
import {
@@ -39,6 +38,8 @@ import {
MIN_COVERAGE,
} from '../src/animation-retarget.js';
import { CANONICAL_REST } from '../src/animation-canonical-rest.js';
+import { canonicalizeBoneName } from '../src/glb-canonicalize.js';
+import { loadBoneGraph } from './_helpers/glb-bone-graph.js';
// Build a SkinnedMesh-rooted skeleton from a list of bone names so
// canonicalNodeMapFromObject finds it the way it would in a real GLB.
@@ -325,3 +326,171 @@ describe('scaleClipSpeed', () => {
expect(clip.duration).toBe(origDur);
});
});
+
+// ---------------------------------------------------------------------------
+// Cross-rig locomotion invariants, validated against the real shipped GLB rigs
+// (cz.glb, michelle.glb) plus two synthetic conventions, using a raw GLB parse
+// and world-matrix composition — no GLTFLoader, no browser, fully deterministic.
+//
+// What this guards: root motion lives in the Hips' *parent* local frame, so to
+// preserve world-space travel the retargeter rotates the hip-position track by
+// the inverse of the target Hips-parent rest rotation (animation-retarget.js →
+// hipPositionCorrection). The earlier, narrower fix rotated by the Hips *bone*
+// correction, which is exact only on the standard Mixamo +90°X/−90°X split. The
+// `tilted` rig below carries a compound, non-±90° armature rotation while its
+// Hips sit at the authoring rest (so the Hips bone correction is identity): only
+// the parent-frame correction can recover the right world direction, so a
+// regression to the bone-correction approach makes the direction/verticality
+// assertions fail there.
+// ---------------------------------------------------------------------------
+describe('cross-rig locomotion invariants (real GLB)', () => {
+ const REPO = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
+ const clipPath = (n) => path.join(REPO, 'public/animations/clips', `${n}.json`);
+ const glbPath = (n) => path.join(REPO, 'public/avatars', `${n}.glb`);
+
+ // Real GLB rigs are reconstructed with the shared bone-graph helper
+ // (tests/_helpers/glb-bone-graph.js) — the same raw-JSON-chunk parse +
+ // SkinnedMesh/Skeleton reconstruction the upright-invariant corpus uses, so
+ // production's canonical readers see these rigs exactly as a GLTFLoader scene.
+ const realRig = (name) => loadBoneGraph(glbPath(name)).root;
+
+ // A synthetic rig: every canonical bone at the authoring rest (so per-bone
+ // limb corrections are identity), parented under an armature carrying an
+ // arbitrary rest rotation. This isolates the hip-position correction — the
+ // armature rotation is the *only* thing the root motion must compensate for.
+ function buildSyntheticRig(armatureQuat) {
+ const root = new Object3D();
+ const armature = new Object3D();
+ armature.name = 'Armature';
+ armature.quaternion.copy(armatureQuat);
+ root.add(armature);
+ const names = Object.keys(CANONICAL_REST);
+ const byName = {};
+ for (const nm of names) {
+ const b = new Bone();
+ b.name = nm;
+ b.quaternion.fromArray(CANONICAL_REST[nm]);
+ byName[nm] = b;
+ }
+ byName.Hips.position.set(0, 1, 0); // a plausible rest hip height
+ armature.add(byName.Hips);
+ for (const nm of names) if (nm !== 'Hips') byName.Hips.add(byName[nm]);
+ const mesh = new SkinnedMesh(new BufferGeometry());
+ mesh.bind(new Skeleton(names.map((n) => byName[n])));
+ root.add(mesh);
+ root.updateMatrixWorld(true);
+ return root;
+ }
+
+ function loadClip(name) {
+ const clip = AnimationClip.parse(JSON.parse(fs.readFileSync(clipPath(name), 'utf8')));
+ clip.name = name;
+ return clip;
+ }
+
+ function findHips(root) {
+ let hips = null;
+ root.traverse((n) => {
+ if (!hips && n.isBone && canonicalizeBoneName(n.name || '') === 'Hips') hips = n;
+ });
+ return hips;
+ }
+
+ // Net world-space hip displacement over a retargeted clip, expressed in
+ // hip-heights (dividing out the rig's overall scale so rigs authored in metres
+ // and in centimetres are directly comparable). Composes the real world matrix
+ // of the Hips' parent — the frame the position track binds into — so this is
+ // what the avatar actually does on screen, not a re-derivation of the maths.
+ function worldHipNet(root, clip) {
+ const hips = findHips(root);
+ root.updateMatrixWorld(true);
+ const restHeight = Math.abs(new Vector3().setFromMatrixPosition(hips.matrixWorld).y) || 1;
+ const parentWorld = hips.parent.matrixWorld.clone();
+ const { clip: out, coverage } = retargetClipToObject(clip, root, { minCoverage: 0 });
+ expect(coverage).toBeGreaterThan(MIN_COVERAGE); // the rig really animates
+ const track = out.tracks.find((t) => t.name === `${hips.name}.position`);
+ const v = track.values;
+ const last = v.length - 3;
+ const p0 = new Vector3(v[0], v[1], v[2]).applyMatrix4(parentWorld);
+ const pN = new Vector3(v[last], v[last + 1], v[last + 2]).applyMatrix4(parentWorld);
+ return pN.sub(p0).divideScalar(restHeight);
+ }
+
+ // Authored net displacement straight from the clip (the authoring rig is
+ // world-Y-up, so this *is* the intended world direction every rig must match).
+ function authoredNet(clip) {
+ const t = clip.tracks.find(
+ (tr) => tr.name.endsWith('.position') && canonicalizeBoneName(tr.name.split('.')[0]) === 'Hips',
+ );
+ const v = t.values;
+ const last = v.length - 3;
+ return new Vector3(v[last] - v[0], v[last + 1] - v[1], v[last + 2] - v[2]);
+ }
+
+ // Four conventions: cz (authoring rig, identity armature), michelle (Mixamo
+ // +90°X armature / −90°X Hips), and two synthetics — a compound non-±90°
+ // armature and a pure 30° yaw (an upright RPM-style placement rotation).
+ const rigs = {
+ cz: realRig('cz'),
+ michelle: realRig('michelle'),
+ tilted: buildSyntheticRig(
+ new Quaternion().setFromEuler(
+ new Euler((25 * Math.PI) / 180, (40 * Math.PI) / 180, (15 * Math.PI) / 180, 'XYZ'),
+ ),
+ ),
+ yawed: buildSyntheticRig(new Quaternion().setFromAxisAngle(new Vector3(0, 1, 0), Math.PI / 6)),
+ };
+ const rigNames = Object.keys(rigs);
+
+ // Clips that actually travel (the in-place featured walk/jump have ~zero net
+ // translation, so a non-trivial library clip is used to test direction).
+ const WALK = 'av-walk-crouching'; // pure forward (+Z), flat ground
+ const JUMP = 'jumpdown2'; // forward + downward arc
+
+ describe.each([WALK, JUMP])('%s travels the authored world direction on every rig', (name) => {
+ const clip = loadClip(name);
+ const authored = authoredNet(clip);
+ const authoredDir = authored.clone().normalize();
+
+ it.each(rigNames)('direction matches on %s (no sideways drift)', (rigName) => {
+ const world = worldHipNet(rigs[rigName], clip);
+ // World travel must point the same way as the authored travel: a unit-dot
+ // near 1 means the heading is preserved and nothing leaked sideways.
+ expect(world.clone().normalize().dot(authoredDir)).toBeGreaterThan(0.999);
+ });
+
+ it.each(rigNames)('verticality matches on %s (no sinking / floating)', (rigName) => {
+ const world = worldHipNet(rigs[rigName], clip);
+ const worldVertFrac = world.y / world.length();
+ const authoredVertFrac = authored.y / authored.length();
+ // The share of travel that is vertical is preserved, so a forward walk
+ // stays on the ground and a jump arcs by exactly its authored amount —
+ // horizontal motion never bleeds into the up axis (or vice-versa).
+ expect(Math.abs(worldVertFrac - authoredVertFrac)).toBeLessThan(0.02);
+ });
+ });
+
+ // In-place performances must not acquire net horizontal travel on any rig.
+ describe.each(['idle', 'celebrate', 'walk', 'jump'])('%s stays in place on every rig', (name) => {
+ const clip = loadClip(name);
+
+ it.each(rigNames)('net XZ travel is ~zero on %s', (rigName) => {
+ const world = worldHipNet(rigs[rigName], clip);
+ expect(Math.hypot(world.x, world.z)).toBeLessThan(0.01);
+ });
+ });
+
+ it('cz.glb output is byte-for-byte identical to the verbatim (uncorrected) clip', () => {
+ // cz is the authoring rig: identity armature, identity Hips rest. Every
+ // correction collapses to identity, so the retarget must be a no-op — the
+ // absolute no-regression bar for the whole initiative.
+ const clip = loadClip(WALK);
+ const corrected = retargetClipToObject(clip, rigs.cz, { minCoverage: 0 }).clip;
+ const map = canonicalNodeMapFromObject(rigs.cz);
+ const verbatim = retargetClip(clip, map, { hipScale: 1, minCoverage: 0 }).clip;
+ const byName = new Map(verbatim.tracks.map((t) => [t.name, t]));
+ for (const t of corrected.tracks) {
+ expect(Array.from(t.values)).toEqual(Array.from(byName.get(t.name).values));
+ }
+ });
+});