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.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
feat(packages): extract @three-ws/retarget — standalone humanoid animation engine
fudjia109c585dc4dc
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 1278d4f7a..9f79145b3 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -4,6 +4,10 @@Public history for [three.ws](https://three.ws), newest first. New pages come from `added` dates in data/pages.json; everything else is curated in data/changelog.json. Also available as [JSON](https://three.ws/changelog.json) and [RSS](https://three.ws/changelog.xml), live at [three.ws/changelog](https://three.ws/changelog).+## 2026-07-05++- **@three-ws/retarget — the animation engine behind every avatar, now a standalone package** — The rig-agnostic animation system that powers all three.ws avatars is now on npm as @three-ws/retarget. It maps bone names from Mixamo, VRM/VRoid, Avaturn, Daz, MakeHuman, Unreal, and Blender rigs onto one canonical skeleton, retargets any clip onto any humanoid with rest-pose and hip-axis correction, and ships the crossfading runtime that keeps characters from ever freezing in a T-pose. Only dependency: your own copy of Three.js. Same engine, same tests (2,800 lines of them) — now usable in any Three.js project. `[sdk, feature]`+## 2026-07-04- **Markets — Live Crypto Prices** (`/coins`) — Live global cryptocurrency market data: total market cap, dominance, Fear & Greed, and the top coins with prices, 24h/7d moves, and 7d sparklines. Every coin links to a rich /coin/:id detail page with an interactive chart, market stats, related news, and official links.diff --git a/STRUCTURE.md b/STRUCTURE.mdindex 71611c33c..48feb6279 100644--- a/STRUCTURE.md+++ b/STRUCTURE.md@@ -61,6 +61,7 @@ mcp-server/ → @three-ws/mcp-servermultiplayer/ → @three-ws/multiplayerpackages/avatar-schema/ → @three-ws/avatar-schemapackages/avatar-cli/ → @three-ws/avatar-cli+packages/retarget/ → @three-ws/retarget (humanoid bone canonicalizer + clip retargeting engine, extracted from src/)packages/viewer-presets/ → @three-ws/viewer-presetspackages/avatar-agent-mcp/ → @three-ws/avatar-agent-mcp (MCP server — avatar agent tools)packages/pumpfun-mcp/ → @three-ws/pumpfun-mcp (MCP server — pump.fun launch tools)diff --git a/data/changelog.json b/data/changelog.jsonindex 3b920882f..b1185c7bb 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,15 @@{"$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-07-05",+ "title": "@three-ws/retarget — the animation engine behind every avatar, now a standalone package",+ "summary": "The rig-agnostic animation system that powers all three.ws avatars is now on npm as @three-ws/retarget. It maps bone names from Mixamo, VRM/VRoid, Avaturn, Daz, MakeHuman, Unreal, and Blender rigs onto one canonical skeleton, retargets any clip onto any humanoid with rest-pose and hip-axis correction, and ships the crossfading runtime that keeps characters from ever freezing in a T-pose. Only dependency: your own copy of Three.js. Same engine, same tests (2,800 lines of them) — now usable in any Three.js project.",+ "tags": [+ "sdk",+ "feature"+ ]+ },{"date": "2026-07-04","title": "30+ background jobs were unreachable in production — payouts, subscriptions, and buybacks are back",diff --git a/packages/retarget/LICENSE b/packages/retarget/LICENSEnew file mode 100644index 000000000..8e2251ab4--- /dev/null+++ b/packages/retarget/LICENSE@@ -0,0 +1,180 @@+ Apache License+ Version 2.0, January 2004+ http://www.apache.org/licenses/++ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION++ 1. Definitions.++ "License" shall mean the terms and conditions for use, reproduction,+ and distribution as defined by Sections 1 through 9 of this document.++ "Licensor" shall mean the copyright owner or entity authorized by+ the copyright owner that is granting the License.++ "Legal Entity" shall mean the union of the acting entity and all+ other entities that control, are controlled by, or are under common+ control with that entity. For the purposes of this definition,+ "control" means (i) the power, direct or indirect, to cause the+ direction or management of such entity, whether by contract or+ otherwise, or (ii) ownership of fifty percent (50%) or more of the+ outstanding shares, or (iii) beneficial ownership of such entity.++ "You" (or "Your") shall mean an individual or Legal Entity+ exercising permissions granted by this License.++ "Source" form shall mean the preferred form for making modifications,+ including but not limited to software source code, documentation+ source, and configuration files.++ "Object" form shall mean any form resulting from mechanical+ transformation or translation of a Source form, including but+ not limited to compiled object code, generated documentation,+ and conversions to other media types.++ "Work" shall mean the work of authorship made available under+ the License, as indicated by a copyright notice that is included in+ or attached to the work (an example is provided in the Appendix below).++ "Derivative Works" shall mean any work, whether in Source or Object+ form, that is based on (or derived from) the Work and for which the+ editorial revisions, annotations, elaborations, or other transformations+ represent, as a whole, an original work of authorship. For the purposes+ of this License, Derivative Works shall not include works that remain+ separable from, or merely link (or bind by name) to the interfaces of,+ the Work and Derivative Works thereof.++ "Contribution" shall mean, as submitted to the Licensor for inclusion+ in the Work by the copyright owner or by an individual or Legal Entity+ authorized to submit on behalf of the copyright owner. For the purposes+ of this definition, "submitted" means any form of electronic, verbal,+ or written communication sent to the Licensor or its representatives,+ including but not limited to communication on electronic mailing lists,+ source code control systems, and issue tracking systems that are managed+ by, or on behalf of, the Licensor for the purpose of discussing and+ improving the Work, but excluding communication that is conspicuously+ marked or designated in writing by the copyright owner as "Not a+ Contribution."++ "Contributor" shall mean Licensor and any Legal Entity on behalf of+ whom a Contribution has been received by the Licensor and included+ within the Work.++ 2. Grant of Copyright License. Subject to the terms and conditions of+ this License, each Contributor hereby grants to You a perpetual,+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable+ copyright license to reproduce, prepare Derivative Works of,+ publicly display, publicly perform, sublicense, and distribute the+ Work and such Derivative Works in Source or Object form.++ 3. Grant of Patent License. Subject to the terms and conditions of+ this License, each Contributor hereby grants to You a perpetual,+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable+ (except as stated in this section) patent license to make, have made,+ use, offer to sell, sell, import, and otherwise transfer the Work,+ where such license applies only to those patent claims licensable+ by such Contributor that are necessarily infringed by their+ Contribution(s) alone or by the combination of their Contribution(s)+ with the Work to which such Contribution(s) was submitted. If You+ institute patent litigation against any entity (including a cross-claim+ or counterclaim in a lawsuit) alleging that the Work or any+ Contribution embodied within the Work constitutes direct or contributory+ patent infringement, then any patent licenses granted to You under+ this License for that Work shall terminate as of the date such+ litigation is filed.++ 4. Redistribution. You may reproduce and distribute copies of the+ Work or Derivative Works thereof in any medium, with or without+ modifications, and in Source or Object form, provided that You+ meet the following conditions:++ (a) You must give any other recipients of the Work or Derivative+ Works a copy of this License; and++ (b) You must cause any modified files to carry prominent notices+ stating that You changed the files; and++ (c) You must retain, in the Source form of any Derivative Works+ that You distribute, all copyright, patent, trademark, and+ attribution notices from the Source form of the Work,+ excluding those notices that do not pertain to any part of+ the Derivative Works; and++ (d) If the Work includes a "NOTICE" text file as part of its+ distribution, You must include a readable copy of the+ attribution notices contained within such NOTICE file, in+ at least one of the following places: within a NOTICE text+ file distributed as part of the Derivative Works; within+ the Source form or documentation, if provided along with the+ Derivative Works; or, within a display generated by the+ Derivative Works, if and wherever such third-party notices+ normally appear. The contents of the NOTICE file are for+ informational purposes only and do not modify the License.+ You may add Your own attribution notices within Derivative+ Works that You distribute, alongside or in addition to the+ NOTICE text from the Work, provided that such additional+ attribution notices cannot be construed as modifying the License.++ You may add Your own license statement for Your modifications and+ may provide additional grant of rights to use, copy, modify, merge,+ publish, distribute, sublicense, and/or sell copies of the+ Derivative Works, and to permit persons to whom the Derivative Works+ are furnished to do so.++ 5. Submission of Contributions. Unless You explicitly state otherwise,+ any Contribution intentionally submitted for inclusion in the Work+ by You to the Licensor shall be under the terms and conditions of+ this License, without any additional terms or conditions.+ Notwithstanding the above, nothing herein shall supersede or modify+ the terms of any separate license agreement you may have executed+ with Licensor regarding such Contributions.++ 6. Trademarks. This License does not grant permission to use the trade+ names, trademarks, service marks, or product names of the Licensor,+ except as required for reasonable and customary use in describing the+ origin of the Work and reproducing the content of the NOTICE file.++ 7. Disclaimer of Warranty. Unless required by applicable law or+ agreed to in writing, Licensor provides the Work (and each+ Contributor provides its Contributions) on an "AS IS" BASIS,+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or+ implied, including, without limitation, any warranties or conditions+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A+ PARTICULAR PURPOSE. You are solely responsible for determining the+ appropriateness of using or reproducing the Work and assume any+ risks associated with Your exercise of permissions under this License.++ 8. Limitation of Liability. In no event and under no legal theory,+ whether in tort (including negligence), contract, or otherwise,+ unless required by applicable law (such as deliberate and grossly+ negligent acts) or agreed to in writing, shall any Contributor be+ liable to You for damages, including any direct, indirect, special,+ incidental, or exemplary damages of any character arising as a+ result of this License or out of the use or inability to use the+ Work (including but not limited to damages for loss of goodwill,+ work stoppage, computer failure or malfunction, or all other+ commercial damages or losses), even if such Contributor has been+ advised of the possibility of such damages.++ 9. Accepting Warranty or Additional Liability. While redistributing+ the Work or Derivative Works thereof, You may choose to offer,+ and charge a fee for, acceptance of support, warranty, indemnity,+ or other liability obligations and/or rights consistent with this+ License. However, in accepting such obligations, You may offer only+ conditions consistent with this License.++ END OF TERMS AND CONDITIONS++ Copyright 2026 nirholas++ Licensed under the Apache License, Version 2.0 (the "License");+ you may not use this file except in compliance with the License.+ You may obtain a copy of the License at++ http://www.apache.org/licenses/LICENSE-2.0++ Unless required by applicable law or agreed to in writing, software+ distributed under the License is distributed on an "AS IS" BASIS,+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+ See the License for the specific language governing permissions and+ limitations under the License.diff --git a/packages/retarget/README.md b/packages/retarget/README.mdnew file mode 100644index 000000000..5db846033--- /dev/null+++ b/packages/retarget/README.md@@ -0,0 +1,112 @@+# @three-ws/retarget++> **Retarget animations onto any humanoid GLB.** One package that maps any rig's bone names onto a canonical skeleton, retargets clips onto it with rest-pose and hip-axis correction, and drives them with a crossfading runtime — so no humanoid ever freezes in a T-pose.++This is the animation engine behind every avatar on [three.ws](https://three.ws) — the same code that lets [`@three-ws/walk`](https://www.npmjs.com/package/@three-ws/walk), [`@three-ws/tour`](https://www.npmjs.com/package/@three-ws/tour), and the platform's viewers animate a GLB from **any** source without a curated rig allowlist. Extracted here so you can use it with plain Three.js.++**Rig conventions it understands out of the box:** Mixamo (`mixamorig:LeftArm`), Avaturn / Wolf3D, VRM 0.x / VRoid (`J_Bip_L_UpperArm`), VRM 1.0, Daz/Genesis, MakeHuman, Unreal mannequin, HumanIK/Maya, Blender `.L`/`.R`, bare `shoulderL`-style names, and casing/separator variants of all of them. A rig that genuinely isn't a skinned humanoid is detected and refused cleanly — never half-animated.++---++## Install++```bash+npm install @three-ws/retarget three+```++`three` is a peer dependency (>= 0.150).++## Quick start — play a clip on a rig it was never made for++```js+import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';+import { canonicalizeGLBBones, retargetClipToObject, parseClipJSON } from '@three-ws/retarget';++// 1. Canonicalize the avatar's bone names (byte-safe GLB rewrite, in memory).+const raw = await fetch('/avatars/anything-humanoid.glb').then((r) => r.arrayBuffer());+const { buffer } = canonicalizeGLBBones(raw);+const gltf = await new GLTFLoader().parseAsync(buffer, '');++// 2. Retarget a canonical-space clip onto it — rest-pose (A/T-pose) skew and+// hip up-axis differences are corrected automatically.+const clipJSON = await fetch('https://three.ws/animations/clips/walk.json').then((r) => r.json());+const clip = parseClipJSON(clipJSON, 'walk');+const retargeted = retargetClipToObject(clip, gltf.scene);++// 3. Play it with your own mixer…+const mixer = new THREE.AnimationMixer(gltf.scene);+mixer.clipAction(retargeted).play();+```++`retargetClipToObject` returns `null` when bone coverage is below `MIN_COVERAGE` (50%) — that's the "this isn't a humanoid" gate. Handle it; don't force-play.++## Or let the runtime drive everything++`AnimationManager` owns the mixer: it loads a clip library from a manifest, retargets per-rig, crossfades between states, layers one-shot overlays (wave, jump) over a base loop (idle, walk), and rejects clips that would leave the character fallen or broken.++```js+import { AnimationManager } from '@three-ws/retarget';++const manager = new AnimationManager();+manager.attach(gltf.scene);++if (manager.supportsCanonicalClips()) {+ manager.setAnimationDefs([+ { name: 'idle', url: 'https://three.ws/animations/clips/idle.json', loop: true },+ { name: 'walk', url: 'https://three.ws/animations/clips/walk.json', loop: true },+ { name: 'wave', url: 'https://three.ws/animations/clips/wave.json', loop: false },+ ]);+ await manager.loadAll();+ manager.crossfadeTo('idle', 0.25);+}++// per frame:+manager.update(deltaSeconds);+```++The clip URLs above are real — three.ws serves its shared clip library with open CORS, so the snippet runs as-is. Ship your own clips in production if you need guaranteed availability.++## API surface++**Canonicalize** (`glb-canonicalize`):+| Export | What it does |+| --- | --- |+| `CANONICAL_BONES` | The frozen 53-bone canonical humanoid set |+| `canonicalizeBoneName(name)` | One bone name → canonical name (or passthrough) |+| `canonicalizeJointNodes(json)` | Rename joints across a parsed glTF JSON tree |+| `canonicalizeArmatureOrientation(json)` | Normalize armature up-axis quirks |+| `canonicalizeGLBBones(arrayBuffer)` | The whole pipeline on a GLB binary — byte-exact when nothing needs changing |++**Retarget** (`animation-retarget`):+| Export | What it does |+| --- | --- |+| `retargetClipToObject(clip, root, opts?)` | Clip → any Object3D hierarchy (most common) |+| `retargetClipToRig(clip, rig, opts?)` / `retargetClip(clip, map, opts?)` | Lower-level variants when you already hold a rig/node map |+| `canonicalNodeMapFromObject/FromRig`, `canonicalRestMapFrom…`, `canonicalWorldRestMapFrom…` | Build the bone/rest lookups yourself |+| `hipsParentWorldQuat`, `hipRestHeight`, `hipRestLocalHeight`, `clipHipBaselineY` | Hip-space helpers (root motion, height normalization) |+| `scaleClipSpeed(clip, factor)`, `parseClipJSON(json, name)` | Clip utilities |+| `MIN_COVERAGE` | The humanoid-coverage gate (0.5) |++**Drive** (`animation-manager`):+| Export | What it does |+| --- | --- |+| `AnimationManager` | attach/detach, `setAnimationDefs`, `loadAll`, `crossfadeTo`, overlays, `supportsCanonicalClips()`, fallen-pose guards, `update(dt)` |+| `measureHipsTiltDeg(clip, model, map)` | Diagnostic: how far a retargeted clip tilts the hips |++**Reference data:** `CANONICAL_REST`, `CANONICAL_REST_WORLD` — the canonical rig's rest quaternions the corrections are computed against.++## How it works++Retargeting quality comes from doing the correction in world space: for each bone the engine computes `q' = L · q · R`, where `L`/`R` are derived from the difference between the clip's canonical rest pose and the target rig's actual rest pose (so an A-pose character plays T-pose clips without shoulder skew), plus a hip-space fix for rigs whose hips aren't Y-up. Coverage below 50% of the canonical bones aborts the retarget instead of producing a half-puppet.++Hit a skeleton convention it doesn't know? Add the bone-name mapping to the canonicalizer and it works everywhere at once — that's the design: **map names once, never maintain a rig allowlist.**++## Related packages++- [`@three-ws/walk`](https://www.npmjs.com/package/@three-ws/walk) — a walking avatar companion for any site, built on this engine+- [`@three-ws/tour`](https://www.npmjs.com/package/@three-ws/tour) — guided site tours with a walking narrator+- [`@three-ws/page-agent`](https://www.npmjs.com/package/@three-ws/page-agent) — a docked, talking page narrator++## License++Apache-2.0 © three.wsdiff --git a/packages/retarget/build.mjs b/packages/retarget/build.mjsnew file mode 100644index 000000000..bb6cd4d35--- /dev/null+++ b/packages/retarget/build.mjs@@ -0,0 +1,32 @@+#!/usr/bin/env node+// Build @three-ws/retarget into a self-contained, publishable ES module.+// =======================================================================+// The entry re-exports the engine from the monorepo source; esbuild bundles+// those files (and the tiny shared logger) into dist/index.mjs, leaving only+// `three` external as the peer dependency — the same publish pattern as+// @three-ws/walk.++import { build } from 'esbuild';+import { mkdirSync, rmSync } from 'node:fs';+import { dirname, resolve } from 'node:path';+import { fileURLToPath } from 'node:url';++const here = dirname(fileURLToPath(import.meta.url));+const outDir = resolve(here, 'dist');++rmSync(outDir, { recursive: true, force: true });+mkdirSync(outDir, { recursive: true });++await build({+ entryPoints: [resolve(here, 'src/index.js')],+ outfile: resolve(outDir, 'index.mjs'),+ bundle: true,+ format: 'esm',+ platform: 'browser',+ target: 'es2020',+ external: ['three', 'three/addons/*'],+ legalComments: 'none',+ logLevel: 'info',+});++console.log('[retarget] built dist/index.mjs');diff --git a/packages/retarget/package.json b/packages/retarget/package.jsonnew file mode 100644index 000000000..991c548c6--- /dev/null+++ b/packages/retarget/package.json@@ -0,0 +1,66 @@+{+ "name": "@three-ws/retarget",+ "version": "0.1.0",+ "description": "Retarget animations onto any humanoid GLB. Canonicalizes bone names from Mixamo, Avaturn, VRM/VRoid, Daz/Genesis, MakeHuman, Unreal, and Blender rigs onto one canonical skeleton, retargets clips with rest-pose and hip-axis correction, and drives them with a crossfading runtime — so no rig ever freezes in a T-pose.",+ "keywords": [+ "three.js",+ "animation",+ "retargeting",+ "retarget",+ "humanoid",+ "rig",+ "skeleton",+ "bone-mapping",+ "mixamo",+ "vrm",+ "vroid",+ "avaturn",+ "gltf",+ "glb",+ "avatar",+ "3d"+ ],+ "author": "three.ws <[email protected]> (https://three.ws)",+ "license": "Apache-2.0",+ "homepage": "https://three.ws",+ "repository": {+ "type": "git",+ "url": "git+https://github.com/nirholas/three.ws.git",+ "directory": "packages/retarget"+ },+ "bugs": {+ "url": "https://github.com/nirholas/three.ws/issues"+ },+ "type": "module",+ "main": "./dist/index.mjs",+ "module": "./dist/index.mjs",+ "exports": {+ ".": {+ "import": "./dist/index.mjs",+ "default": "./dist/index.mjs"+ }+ },+ "files": [+ "dist",+ "README.md",+ "LICENSE"+ ],+ "sideEffects": false,+ "scripts": {+ "build": "node build.mjs",+ "test": "node --test test/*.test.mjs",+ "prepublishOnly": "npm run build && npm test"+ },+ "peerDependencies": {+ "three": ">=0.150.0"+ },+ "devDependencies": {+ "esbuild": "^0.27.7"+ },+ "engines": {+ "node": ">=18"+ },+ "publishConfig": {+ "access": "public"+ }+}diff --git a/packages/retarget/src/index.js b/packages/retarget/src/index.jsnew file mode 100644index 000000000..8727080e7--- /dev/null+++ b/packages/retarget/src/index.js@@ -0,0 +1,47 @@+// @three-ws/retarget — public entry.+// ===================================+// Re-exports the platform's rig-agnostic humanoid animation engine from the+// monorepo source (the seam walk-sdk's PROMOTION NOTE designates); the publish+// build bundles everything into dist/ so npm consumers get one standalone+// package whose only dependency is their own copy of Three.js.+//+// 1. canonicalize — map any humanoid rig's bone names (Mixamo, Avaturn,+// VRM/VRoid, VRM 1.0, Daz/Genesis, MakeHuman, Unreal, Blender `.L`,+// simple `shoulderL` rigs, …) onto the frozen canonical bone set, either+// on a parsed glTF JSON tree or byte-exactly inside a GLB ArrayBuffer.+// 2. retarget — play any canonical-space AnimationClip on that rig, with+// rest-pose (A/T-pose) correction, hip up-axis fixes, and coverage gates+// so a non-humanoid never half-animates.+// 3. drive — the AnimationManager runtime that loads clip libraries,+// crossfades, layers overlays, and refuses fallen/broken poses.++export {+ CANONICAL_BONES,+ canonicalizeBoneName,+ canonicalizeJointNodes,+ canonicalizeArmatureOrientation,+ canonicalizeGLBBones,+} from '../../../src/glb-canonicalize.js';++export {+ MIN_COVERAGE,+ canonicalNodeMapFromObject,+ canonicalNodeMapFromRig,+ canonicalRestMapFromObject,+ canonicalRestMapFromRig,+ canonicalWorldRestMapFromObject,+ canonicalWorldRestMapFromRig,+ hipsParentWorldQuat,+ hipRestHeight,+ hipRestLocalHeight,+ clipHipBaselineY,+ retargetClip,+ retargetClipToRig,+ retargetClipToObject,+ scaleClipSpeed,+ parseClipJSON,+} from '../../../src/animation-retarget.js';++export { AnimationManager, measureHipsTiltDeg } from '../../../src/animation-manager.js';++export { CANONICAL_REST, CANONICAL_REST_WORLD } from '../../../src/animation-canonical-rest.js';diff --git a/packages/retarget/test/exports.test.mjs b/packages/retarget/test/exports.test.mjsnew file mode 100644index 000000000..7e061557c--- /dev/null+++ b/packages/retarget/test/exports.test.mjs@@ -0,0 +1,49 @@+// @three-ws/retarget — published-surface smoke tests.+// =====================================================+// The engine's deep behavioral coverage lives in the monorepo suite+// (tests/glb-canonicalize.test.js, tests/animation-retarget.test.js,+// tests/animation-upright-invariant.test.js — ~2.8k lines, run by root+// vitest). This file guards the PACKAGE: the bundled dist exposes the full+// export surface and the canonicalizer actually resolves real-world rig+// names. `node --test`, runs against dist/ (build first — prepublishOnly does).++import { test } from 'node:test';+import assert from 'node:assert/strict';+import * as retarget from '../dist/index.mjs';++test('dist exposes the full engine surface', () => {+ for (const name of [+ 'CANONICAL_BONES', 'canonicalizeBoneName', 'canonicalizeJointNodes',+ 'canonicalizeArmatureOrientation', 'canonicalizeGLBBones',+ 'MIN_COVERAGE', 'canonicalNodeMapFromObject', 'canonicalNodeMapFromRig',+ 'canonicalRestMapFromObject', 'canonicalRestMapFromRig',+ 'canonicalWorldRestMapFromObject', 'canonicalWorldRestMapFromRig',+ 'hipsParentWorldQuat', 'hipRestHeight', 'hipRestLocalHeight',+ 'clipHipBaselineY', 'retargetClip', 'retargetClipToRig',+ 'retargetClipToObject', 'scaleClipSpeed', 'parseClipJSON',+ 'AnimationManager', 'measureHipsTiltDeg',+ 'CANONICAL_REST', 'CANONICAL_REST_WORLD',+ ]) {+ assert.ok(name in retarget, `missing export: ${name}`);+ }+});++test('canonicalizeBoneName maps the major rig conventions to canonical bones', () => {+ const canon = new Set(retarget.CANONICAL_BONES);+ for (const raw of [+ 'mixamorig:LeftArm', // Mixamo+ 'J_Bip_L_UpperArm', // VRM / VRoid+ 'LeftArm', // Avaturn / canonical passthrough+ ]) {+ const mapped = retarget.canonicalizeBoneName(raw);+ assert.ok(canon.has(mapped), `${raw} → ${mapped} not in CANONICAL_BONES`);+ }+});++test('canonical rest data covers the canonical skeleton', () => {+ assert.ok(retarget.CANONICAL_BONES.length >= 50);+ assert.ok(Object.keys(retarget.CANONICAL_REST).length > 0);+ for (const bone of Object.keys(retarget.CANONICAL_REST)) {+ assert.ok(retarget.CANONICAL_BONES.includes(bone), `rest bone ${bone} not canonical`);+ }+});diff --git a/public/changelog.json b/public/changelog.jsonindex 89ec447ec..b75351df0 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,11 +1,22 @@{- "generated_at": "2026-07-04T22:43:53.800Z",+ "generated_at": "2026-07-05T04:26:17.161Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws","url": "https://three.ws"},"entries": [+ {+ "date": "2026-07-05",+ "type": "update",+ "title": "@three-ws/retarget — the animation engine behind every avatar, now a standalone package",+ "summary": "The rig-agnostic animation system that powers all three.ws avatars is now on npm as @three-ws/retarget. It maps bone names from Mixamo, VRM/VRoid, Avaturn, Daz, MakeHuman, Unreal, and Blender rigs onto one canonical skeleton, retargets any clip onto any humanoid with rest-pose and hip-axis correction, and ships the crossfading runtime that keeps characters from ever freezing in a T-pose. Only dependency: your own copy of Three.js. Same engine, same tests (2,800 lines of them) — now usable in any Three.js project.",+ "link": null,+ "tags": [+ "sdk",+ "feature"+ ]+ },{"date": "2026-07-04","type": "launch",diff --git a/public/changelog.xml b/public/changelog.xmlindex f8de71f98..0a92c7163 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -6,6 +6,14 @@<atom:link href="https://three.ws/changelog.xml" rel="self" type="application/rss+xml"/><description>What's new on three.ws — features, improvements, and releases, newest first.</description><language>en</language>+ <item>+ <title>@three-ws/retarget — the animation engine behind every avatar, now a standalone package</title>+ <link>https://three.ws/changelog</link>+ <guid isPermaLink="false">2026-07-05:@three-ws/retarget — the animation engine behind every avatar, now a standalone package</guid>+ <pubDate>Sun, 05 Jul 2026 12:00:00 GMT</pubDate>+ <category>sdk</category>+ <description>The rig-agnostic animation system that powers all three.ws avatars is now on npm as @three-ws/retarget. It maps bone names from Mixamo, VRM/VRoid, Avaturn, Daz, MakeHuman, Unreal, and Blender rigs onto one canonical skeleton, retargets any clip onto any humanoid with rest-pose and hip-axis correction, and ships the crossfading runtime that keeps characters from ever freezing in a T-pose. Only dependency: your own copy of Three.js. Same engine, same tests (2,800 lines of them) — now usable in any Three.js project.</description>+ </item><item><title>Markets — Live Crypto Prices</title><link>https://three.ws/coins</link>diff --git a/public/features.json b/public/features.jsonindex 4853866f1..ba8f71722 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-07-04T22:43:53.788Z",+ "generated_at": "2026-07-05T04:26:17.149Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",diff --git a/walk-sdk/src/internal/runtime.js b/walk-sdk/src/internal/runtime.jsindex 00289a5de..587823e60 100644--- a/walk-sdk/src/internal/runtime.js+++ b/walk-sdk/src/internal/runtime.js@@ -9,9 +9,9 @@// (`build.mjs`, esbuild with `three` external) bundles it into a self-contained// `dist/`, so npm consumers get one standalone file with nothing to resolve.//-// PROMOTION NOTE — when this package is split into its own external repo-// (see the repo's STRUCTURE.md "Promotion path"), replace this single import-// with a vendored copy of src/animation-manager.js and its two dependencies.-// This file is the only seam that reaches back into the monorepo.+// The engine is also published standalone as @three-ws/retarget+// (packages/retarget) — same source, same seam pattern. If this package is+// ever split into its own external repo, depend on @three-ws/retarget instead+// of vendoring; this file is the only seam that reaches back into the monorepo.export { AnimationManager } from '../../../src/animation-manager.js';