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
Add positional goldens tests for signing lane
nirholasd562a20df95b
diff --git a/STRUCTURE.md b/STRUCTURE.mdindex c7e1ce24f..f361628e2 100644--- a/STRUCTURE.md+++ b/STRUCTURE.md@@ -47,7 +47,7 @@ bottom.| Conversational refinement + remix economy | Iterate: [api/_mcp-studio/tools.js](api/_mcp-studio/tools.js) `refine_model` (free, on `/api/mcp-studio`) + [mcp-server/src/tools/refine-model.js](mcp-server/src/tools/refine-model.js) (paid stdio, $0.25); shared lineage core [mcp-server/src/tools/_lineage.js](mcp-server/src/tools/_lineage.js). Remix (paid track): feed [api/remix-feed.js](api/remix-feed.js) `→ /api/remix-feed` (free browse/publish/lineage), settlement [api/x402/remix-asset.js](api/x402/remix-asset.js) `→ /api/x402/remix-asset` + core [api/_lib/remix-settlement.js](api/_lib/remix-settlement.js) + split math [api/_lib/remix-royalty.js](api/_lib/remix-royalty.js). Docs [docs/remix.md](docs/remix.md), [docs/mcp-studio.md](docs/mcp-studio.md). | Live | Talk to a model to iterate it ("make it metallic") — real anchored re-generation with a revertable/branchable version lineage rendered as a viewer version strip; free on both the OpenAI 3D Studio and the paid MCP server. Creators publish a finished model as remixable (provenance + license + royalty on the existing `forge_creations` rows — no parallel store); another agent pays $0.25 USDC to remix it and a creator-set royalty (≤20%, capped) routes on-chain to the original creator via the audited `transferSolanaUSDC` rail. Split/caps/payout unit-tested ([tests/remix-settlement.test.js](tests/remix-settlement.test.js), [tests/remix-royalty.test.js](tests/remix-royalty.test.js), [tests/refine-lineage.test.js](tests/refine-lineage.test.js)). Free track stays crypto-free. Prompt 09. || Restyle Studio (material/PBR editor + AI restyle + variants) | [pages/restyle.html](pages/restyle.html) `→ /restyle`, [src/restyle.js](src/restyle.js). PBR preset/variant library [packages/viewer-presets/src/materials.js](packages/viewer-presets/src/materials.js) (`@three-ws/viewer-presets`). AI restyle + persistence core [api/_lib/material-studio-store.js](api/_lib/material-studio-store.js), free hosted endpoint [api/material-studio.js](api/material-studio.js) `→ /api/material-studio`; paid agent twin [mcp-server/src/tools/restyle-material.js](mcp-server/src/tools/restyle-material.js) (`restyle_material`, $0.05 stdio MCP), thin core [mcp-server/src/tools/_material-core.js](mcp-server/src/tools/_material-core.js). Shares the `refine_model` lineage core ([mcp-server/src/tools/_lineage.js](mcp-server/src/tools/_lineage.js)) so a restyle/variant is just another kind of version, feeding prompt 09 remix. Docs: [docs/mcp-tools.md](docs/mcp-tools.md). | Live | Re-skin any GLB without regenerating its mesh: live PBR editing (color/metalness/roughness/emissive/texture) with a one-click preset library (14 looks — chrome, gold, glass, wood…), seeded reproducible colorway variants (mulberry32 PRNG — same base+seed → same set), and free-text AI restyle ("make it chrome", "cyberpunk neon") via IBM Granite-proposed PBR factors applied + re-exported server-side. Every AI restyle / saved checkpoint mints a real, `gltf-validator`-checked, durably-stored GLB recorded in an immutable parent→child lineage — non-destructive in the durable sense, not just an in-browser Reset. Roadmap prompt 06. || Embodiment — a living agent body in the chat | Hosted embed [pages/embodiment/embed.html](pages/embodiment/embed.html) `→ /embodiment/embed` (Vite input + vercel route, `frame-ancestors *`); engine [apps-sdk/embodiment/embodiment-stage.js](apps-sdk/embodiment/embodiment-stage.js) (`EmbodimentStage`) + [overlay.js](apps-sdk/embodiment/overlay.js); persona tools (free) [api/_mcp-studio/persona-tools.js](api/_mcp-studio/persona-tools.js) → `/api/mcp-studio` (`create_agent_persona`, `get_agent_persona`, `persona_say`) and (paid) [api/_mcp3d/tools/studio.js](api/_mcp3d/tools/studio.js); shared inline-body artifact [api/_lib/embodiment-artifact.js](api/_lib/embodiment-artifact.js); identity store [api/_lib/persona-store.js](api/_lib/persona-store.js) (Postgres `agent_personas` + fs fallback + durable R2 GLB); reload route [api/mcp3d/persona.js](api/mcp3d/persona.js) `→ /api/mcp3d/persona`. Emotion/rig/lip-sync cores under [src/embodiment/](src/embodiment) + [src/voice/](src/voice). | Live | A generated avatar becomes a persistent, named body that renders inline in ChatGPT/Claude: it lip-syncs each reply, blends the matching expression + gesture, idles between turns, and reloads by `persona_id` in a fresh session (the id is the capability — no sign-in). Rides the universal canonicalize/retarget clip library; a rig without face morphs animates the jaw, a non-humanoid GLB falls back to a gentle idle (`decideRigMode`/`supportsCanonicalClips`) — never a bind-pose T-pose. Zero crypto/token surface. Tests: [tests/persona-store.test.js](tests/persona-store.test.js), [tests/api/persona-resolve-route.test.js](tests/api/persona-resolve-route.test.js), [tests/mcp-studio.test.js](tests/mcp-studio.test.js), [tests/embodiment-rig-mode.test.js](tests/embodiment-rig-mode.test.js). Evidence: [prompts/store-submissions/_generated/embodiment/](prompts/store-submissions/_generated/embodiment/). Store-submission prompt 07. |-| Spatial MCP (3D as a native response type) | Spec [specs/SPATIAL_MCP.md](specs/SPATIAL_MCP.md), pure validator/builder [api/_lib/spatial-mcp.js](api/_lib/spatial-mcp.js), validator tool [api/_mcp3d/tools/spatial.js](api/_mcp3d/tools/spatial.js) (`validate_spatial_response`, free), reference renderer [public/spatial-mcp/spatial-renderer.js](public/spatial-mcp/spatial-renderer.js) + demo [public/spatial-mcp/index.html](public/spatial-mcp/index.html) `→ /spatial-mcp`, docs [docs/spatial-mcp.md](docs/spatial-mcp.md). | Live · both stores | Open (CC0) shape for returning a live, interactive 3D scene as a first-class MCP tool result (scene GLB, camera, environment, animation, AR handoff, affordances) instead of a URL. Every three.ws 3D generator emits a conformant artifact under `structuredContent.spatial`; the validator returns actionable errors, not a boolean; the framework-free reference renderer displays any conformant payload — including one transformed from a foreign tool result (portability proof at `/spatial-mcp`). Zero coin surface — reusable in the OpenAI free app. Tests: [tests/spatial-mcp.test.js](tests/spatial-mcp.test.js). Evidence: [prompts/store-submissions/_generated/spatial-mcp/](prompts/store-submissions/_generated/spatial-mcp/). Store-submission prompt 20. |+| Spatial MCP (3D as a native response type) | Spec [specs/SPATIAL_MCP.md](specs/SPATIAL_MCP.md), pure validator/builder [public/spatial-mcp/spatial-validator.js](public/spatial-mcp/spatial-validator.js) (published at `https://three.ws/spatial-mcp/spatial-validator.js`; server-side re-export [api/_lib/spatial-mcp.js](api/_lib/spatial-mcp.js)), validator tool [api/_mcp3d/tools/spatial.js](api/_mcp3d/tools/spatial.js) (`validate_spatial_response`, free), reference renderer [public/spatial-mcp/spatial-renderer.js](public/spatial-mcp/spatial-renderer.js) + demo/checker [public/spatial-mcp/index.html](public/spatial-mcp/index.html) + [public/spatial-mcp/demo.js](public/spatial-mcp/demo.js) `→ /spatial-mcp`, docs [docs/spatial-mcp.md](docs/spatial-mcp.md). | Live · both stores | Open (CC0) shape for returning a live, interactive 3D scene as a first-class MCP tool result (scene GLB, camera, environment, animation, AR handoff, affordances) instead of a URL. Every three.ws 3D generator emits a conformant artifact under `structuredContent.spatial`; the validator returns actionable errors, not a boolean; the framework-free reference renderer displays any conformant payload — including one transformed from a foreign tool result (portability proof at `/spatial-mcp`). The page runs the real validator in the browser: every rendered payload shows its verdict, and a paste-in checker validates arbitrary payloads as you type (with a deliberately broken example) so an implementer debugs an adapter without leaving the page. Zero coin surface — reusable in the OpenAI free app. Tests: [tests/spatial-mcp.test.js](tests/spatial-mcp.test.js), render smoke [tests/e2e/spatial-mcp-render.spec.js](tests/e2e/spatial-mcp-render.spec.js). Evidence: [prompts/store-submissions/_generated/spatial-mcp/](prompts/store-submissions/_generated/spatial-mcp/). Store-submission prompt 20. || AR-ready exports ("View in your space") | Device-routing core [api/_lib/ar-launch.js](api/_lib/ar-launch.js), UA-branched launch endpoint [api/ar.js](api/ar.js) `→ /api/ar`, MCP tool [api/_mcp3d/tools/ar.js](api/_mcp3d/tools/ar.js) (`export_ar`, free), in-viewer AR button [public/viewer.html](public/viewer.html), docs [docs/ar.md](docs/ar.md). | Live · both stores | `GET /api/ar?src=<glb>` branches on the request User-Agent server-side: iOS → Apple Quick Look (USDZ generated from the GLB on the fly by model-viewer's three.js USDZExporter — real conversion, no server USD tooling), Android → 302 Google Scene Viewer ARCore intent with browser fallback, desktop → WebGL viewer. Bad input rejected at the boundary with a designed error page. `export_ar` returns the AR launch link + a conformant Spatial-MCP artifact; response is OpenAI-clean (no ids/coin surface). `kind=avatar` is the living-agent lane: the launch page leads with a "Bring it to life" handoff into `/irl?avatar=<glb>` (avatar-producing tools return `irlUrl` automatically), and Android serves the launch page instead of the blind Scene Viewer redirect so the living path stays visible. Shared links unfurl: the launch page's `og:image` points at `GET /api/render/glb?glbUrl=` ([api/render/glb.js](api/render/glb.js), server-side PNG of the actual model, CDN-cached a day) and the page carries "Create your own" → `/ar` conversion CTAs. Tests: [tests/ar-export.test.js](tests/ar-export.test.js). Evidence: [prompts/store-submissions/_generated/ar/](prompts/store-submissions/_generated/ar/). Store-submission prompt 21. || AR Forge (prompt → model → your room) | [public/ar-forge.html](public/ar-forge.html) `→ /ar` (self-contained page, CDN model-viewer + local meshopt decoder, no Vite registration needed; vercel route sets `xr-spatial-tracking` permissions-policy) | Live | Mobile-first app: one prompt hits the free NVIDIA lane (`POST /api/forge {backend:"nvidia"}`, poll `?job=`), the result renders in an AR-capable `<model-viewer>` with "View in your space" (WebXR / Scene Viewer / Quick Look). Non-AR devices get a QR handoff to `GET /api/ar?src=` (server-side UA routing) plus a copyable `/viewer?src=` share link. Deep link `/ar?src=<glb>&title=` reopens any shared model; recent forges persist in localStorage. Designed idle/working/failed/result states; https-only GLB guard. || Daily Forge (daily challenge + creator streak) | [pages/daily.html](pages/daily.html) `→ /daily` + [src/daily.js](src/daily.js), deterministic theme rotation [src/daily/daily-theme.js](src/daily/daily-theme.js), streak state machine [src/daily/creator-streak.js](src/daily/creator-streak.js) | Live | The **anonymous-first retention loop** the platform lacked: the logged-in streak system ([api/_lib/streaks.js](api/_lib/streaks.js)) needs an account, so the no-sign-up forge majority had no reason to return. Every UTC day resolves to one curated creative theme (the same for everyone, hashed from the date — no backend, no randomness) with a running "Day N" counter; forging today's theme on the free lane lights a localStorage streak (consecutive-day state machine: extend / reset-on-gap / never-double-count, `best` preserved, at-risk vs lapsed display), and milestones (3/7/14/30/50/100/365) fire a celebration. The generation lands in the shared recents so it's one tap from `/ar` and `/ar/studio`; a "Fresh from the community" strip reads `/api/forge-gallery?scope=community`. `changefreq: daily` in the sitemap. Tests: [tests/daily-theme.test.js](tests/daily-theme.test.js), [tests/creator-streak.test.js](tests/creator-streak.test.js). |@@ -85,7 +85,7 @@ bottom.| Character Library | [pages/character-library.html](pages/character-library.html) + [src/character-library.js](src/character-library.js) → `/character-library`, API [api/avatars/library.js](api/avatars/library.js) | Live at `/character-library` | 106 professionally rigged Mixamo characters (skinned GLB + thumbnails on R2, `avatars/mixamo/`), each drives the full animation library. Pipeline: [scripts/fetch-mixamo-avatars.mjs](scripts/fetch-mixamo-avatars.mjs) → [scripts/convert-mixamo-avatars.mjs](scripts/convert-mixamo-avatars.mjs) → [scripts/fetch-mixamo-avatar-thumbnails.mjs](scripts/fetch-mixamo-avatar-thumbnails.mjs) → [scripts/build-mixamo-avatar-library.mjs](scripts/build-mixamo-avatar-library.mjs) publishes `avatars/library/manifest.json`. Cards deep-link into the 3D viewer (`/app#model=`), Widget Studio (`/studio?model=`), and Animation Studio (`/pose?src=`). Mirrors the animation-library R2-manifest pattern (no DB). See [public/avatars/mixamo/README.md](public/avatars/mixamo/README.md) || Object Library | [pages/objects.html](pages/objects.html) + [src/objects-library.js](src/objects-library.js) → `/objects`, API [api/objects/library.js](api/objects/library.js) | Live at `/objects` | Hundreds of CC0 (public-domain) 3D props from Poly Haven (packed to GLB on R2, `objects/polyhaven/`). Pipeline: [scripts/fetch-polyhaven-objects.mjs](scripts/fetch-polyhaven-objects.mjs) (glTF→GLB via @gltf-transform) → [scripts/render-glb-thumbnails.mjs](scripts/render-glb-thumbnails.mjs) → [scripts/build-object-library.mjs](scripts/build-object-library.mjs) publishes `objects/library/manifest.json`. Same R2-manifest pattern as the Character/animation libraries (no DB). Cards preview in the 3D viewer (`/app#model=`), place into AR Studio (`/ar/studio?src=`), and download the GLB directly (CC0). AR Studio's tray also has an Objects tab over the same manifest. || Motion Swap (avatar body-swap in video) | [pages/motion-swap.html](pages/motion-swap.html) `→ /motion-swap` + [src/motion-swap.js](src/motion-swap.js), API [api/motion-swap.js](api/motion-swap.js), worker [workers/model-video2motion/](workers/model-video2motion) | Live | Upload a video of one person, get it back with a 3D avatar performing their motion. The worker (CPU Cloud Run, MediaPipe pose + selfie segmentation, both Apache-2.0) tracks 33 world landmarks per frame, solves them onto the canonical Wolf3D skeleton with an in-house bend-plane IK solver ([pose_solver.py](workers/model-video2motion/pose_solver.py), pure NumPy, unit-tested), and emits a standard `AnimationClip.toJSON()` + person-mask video + per-frame screen anchors. The browser composites in one WebGL scene: footage on a shader quad with the subject pixelated under the mask, avatar retargeted via [src/animation-retarget.js](src/animation-retarget.js) and pinned to the subject's anchor each frame, MediaRecorder export with original audio. Provider mode `video2motion` (`GCP_VIDEO2MOTION_URL`) in [api/_providers/gcp.js](api/_providers/gcp.js). Docs: [docs/motion-swap.md](docs/motion-swap.md). Tests: [workers/model-video2motion/test_pose_solver.py](workers/model-video2motion/test_pose_solver.py). |-| Sign Language (feature home) | [pages/sign-language.html](pages/sign-language.html) `→ /sign-language` + [src/sign-language-page.js](src/sign-language-page.js) | Live | The front door for signing avatars: a live avatar signing on arrival (PoseStage + [src/sign-speech.js](src/sign-speech.js) SignSpeaker, portrait-framed), an input that signs or spells anything you type (reporting which words were which), a playable vocabulary of every word with a real sign, and an embedded webcam sign-recognition demo. Engines: [src/sign-rig.js](src/sign-rig.js) (skeleton measured from the bind pose → forward kinematics + two-bone arm IK, so a sign is authored as a place in signing space, not as joint angles), [src/sign-handshapes.js](src/sign-handshapes.js) (A–Z, 0–9, and the named shapes), [src/sign-clip.js](src/sign-clip.js) (resting signer, phase poser, eased timeline → clip JSON), [src/sign-dictionary.js](src/sign-dictionary.js) (the lexical vocabulary, one- and two-handed), [src/fingerspelling.js](src/fingerspelling.js) (the manual alphabet), [src/sign-speech.js](src/sign-speech.js) (text→one signing clip, signs where they exist and spelling for the rest), [src/sign-input.js](src/sign-input.js) (browser Holistic landmarks → text). Docs: [docs/sign-language.md](docs/sign-language.md). Tests: `tests/{sign-rig,sign-dictionary,fingerspelling,sign-speech,sign-input}.test.js`. |+| Sign Language (feature home) | [pages/sign-language.html](pages/sign-language.html) `→ /sign-language` + [src/sign-language-page.js](src/sign-language-page.js) | Live | The front door for signing avatars: a live avatar signing on arrival (PoseStage + [src/sign-speech.js](src/sign-speech.js) SignSpeaker, portrait-framed), an input that signs or spells anything you type (reporting which words were which), a playable vocabulary of every word with a real sign, and an embedded webcam sign-recognition demo. Controls for signing speed and left- vs right-handed signing. Engines: [src/sign-rig.js](src/sign-rig.js) (skeleton measured from the bind pose → forward kinematics, two-bone arm IK, and hand geometry, so a sign is authored as a place in signing space or as CONTACT — "fingertips on the palm" — never as joint angles), [src/sign-handshapes.js](src/sign-handshapes.js) (A–Z, 0–9, and the named shapes), [src/sign-clip.js](src/sign-clip.js) (resting signer, phase poser, non-manual face markers, eased timeline → clip JSON), [src/sign-dictionary.js](src/sign-dictionary.js) (the lexical vocabulary, one- and two-handed), [src/fingerspelling.js](src/fingerspelling.js) (the manual alphabet), [src/sign-speech.js](src/sign-speech.js) (text→one signing clip: hands rise once and lower once, signs where they exist and spelling for the rest), [src/sign-input.js](src/sign-input.js) (browser Holistic landmarks → text). Face markers ride a morph-target lane through [src/animation-retarget.js](src/animation-retarget.js), re-pointed at whichever meshes the target avatar owns. Tools: `npm run sign:sheet` (contact sheet of every sign, [scripts/sign-contact-sheet.mjs](scripts/sign-contact-sheet.mjs)), `npm run build:sign-goldens` (positional snapshot). Docs: [docs/sign-language.md](docs/sign-language.md). Tests: `tests/{sign-rig,sign-dictionary,sign-linguistics,sign-goldens,fingerspelling,sign-speech,sign-input}.test.js`. || ASL recognition (webcam signing → text) | worker [workers/model-asl-recognition/](workers/model-asl-recognition), API [api/asl-recognition.js](api/asl-recognition.js) (`GCP_ASL_RECOGNITION_URL`) | Live | The reverse direction of [sign speech](docs/sign-language.md): the browser extracts MediaPipe landmarks from the webcam (video never leaves the device) and the worker transcribes continuous ASL fingerspelling to text on CPU via LiteRT, with a decode-confidence score and an LLM cleanup pass on the API. Model: Kaggle 2023 ASLFR 1st-place (Apache-2.0 code + weights, FSboard CC BY 4.0 corpus — the license-clean chain most ASL models lack). Cloud Run gen2 + `patchelf --clear-execstack` on the LiteRT .so. Next: word-level signs (PopSign retrain). Tests: [workers/model-asl-recognition/test_decode.py](workers/model-asl-recognition/test_decode.py). || Avatar thumbnail coverage | [api/_lib/avatar-thumbs.js](api/_lib/avatar-thumbs.js) + crons [api/cron/avatar-thumbnail-backfill.js](api/cron/avatar-thumbnail-backfill.js) (absent thumbnails, `*/5`) and [api/cron/avatar-thumbnail-render.js](api/cron/avatar-thumbnail-render.js) (stale marketplace thumbnails, `*/10`) | Live | The single owner of `avatars.thumbnail_key`. Enforces the invariant that a thumbnail key is persisted **only after** its R2 object is confirmed to exist — a key pointing at a missing object makes R2 return 404 `text/plain`, which Chrome blocks as `ERR_BLOCKED_BY_ORB` inside an `<img>`. Fills coverage cheapest-first: zero-copy adoption of `forge_creations.preview_key`, then a headless-chromium GLB→PNG render to `thumb/<avatarId>.png` ([api/_lib/render-glb.js](api/_lib/render-glb.js)). Bounded retries via the `avatar_thumbnail_backfill` claim ledger ([migration](api/_lib/migrations/20260709120000_avatar_thumbnail_backfill.sql)), with `isBrowserInfrastructureError()` separating an OOM-killed browser from a genuinely broken model so a crash never retires healthy avatars. Bulk runner: [scripts/backfill-avatar-thumbnails.mjs](scripts/backfill-avatar-thumbnails.mjs) (`--status`, `--adopt-only`, `--loop`, `--reset-infra`). Docs: [docs/avatar-thumbnails.md](docs/avatar-thumbnails.md). Tests: [tests/avatar-thumbs.test.js](tests/avatar-thumbs.test.js), [tests/home-thumbnail-orb.test.js](tests/home-thumbnail-orb.test.js) || Forge model categorization | Classifier [api/_lib/forge-classify.js](api/_lib/forge-classify.js), wired at generation in [api/_lib/forge-store.js](api/_lib/forge-store.js) (`createCreation`), backfill [scripts/backfill-forge-categories.mjs](scripts/backfill-forge-categories.mjs), coloured badges in [src/forge-showcase.js](src/forge-showcase.js) + `/forge-studio` twin | Live | Assigns every forge model a `model_category` (avatar/accessory/item/scene/creature/vehicle/other) from its prompt with a deterministic, dependency-free keyword classifier — most-specific-first so "a knight riding a horse" is an avatar, not a creature. Nothing set the category before, so ~99.8% of the corpus was `other` and the category badges, filters, and Forge-Off category dimension were dead; the classifier now runs inline on every generation (all lanes) and reclassifies ~85% of the 9.8k-row back catalogue (dry-run verified). Coloured category pills render across the showcase/gallery/community feed. Tests: [tests/forge-classify.test.js](tests/forge-classify.test.js). |diff --git a/docs/sign-language.md b/docs/sign-language.mdindex 59b91debc..745f22cbf 100644--- a/docs/sign-language.md+++ b/docs/sign-language.md@@ -14,6 +14,9 @@ three.ws avatars can communicate in American Sign Language. Words with a sign ar```- **Sign INTO the chat with your camera.** The 🎥 button in the agent chat opens your webcam with a mirrored self-view: fingerspell at the camera, click again, and the transcription lands in the message box for review before sending. Landmarks are extracted in your browser (MediaPipe Holistic), so video never leaves your device — only pose coordinates go to the recognizer ([workers/model-asl-recognition](../workers/model-asl-recognition), the Kaggle-2023 1st-place fingerspelling model; Apache-2.0 weights, CC BY 4.0 corpus). Expect a 10–20% character error rate on webcam fingerspelling; the chat model is robust to it.+- **Signed sentences, not lists of words.** A signer raises their hands once for a sentence and lowers them once at the end. The compiler does the same: only the first word leads in from rest, only the last settles back, and everything between keeps the hands up in signing space. You can also set the pace (0.5×, 0.75×, 1×) and switch the avatar to left-handed signing, since about one signer in ten is left-dominant.+- **Contact that actually touches.** Signs like FALL, HELP, GOOD and KNOW are defined by contact: two fingers stand *on* the flat palm, the fingertips touch the *forehead*. Those are solved from the posed geometry rather than from a fixed wrist coordinate, so the contact still lands on an avatar with longer fingers or a bigger head.+- **Non-manual markers.** In ASL the face is grammar: raised brows mark a yes/no question, furrowed brows a wh-question. Signs carry those markers as blendshape lanes, applied on any avatar that ships ARKit face shapes (most generated avatars do). An avatar without them still signs; it just loses the marker.- **A lexical sign vocabulary.** Common words are SIGNED, not spelled: `HELLO`, `THANK`, `HAPPY`, `SORRY`, `HELP`, `LOVE`, `WANT`, `YALL` and the rest of [`src/sign-dictionary.js`](../src/sign-dictionary.js), two-handed where the sign is two-handed. Browse and play the whole vocabulary at [/sign-language](https://three.ws/sign-language). A word with no sign fingerspells, in the same clip, with no seam.- **Motion capture with hands.** The video-to-motion worker tracks 21 landmarks per hand and solves all 30 finger joints, so a video of a real signer becomes a retargetable animation clip — the path for growing the vocabulary from real signers.@@ -21,7 +24,7 @@ three.ws avatars can communicate in American Sign Language. Words with a sign arSigning is a spatial language. A sign is a handshape, a place on or in front of the body, and a movement between places — never a list of joint angles. The stack is built that way, as dependency-free JavaScript modules:-- [`src/sign-rig.js`](../src/sign-rig.js) — kinematics for the canonical skeleton. It **measures** the reference rig (bone axes, bone lengths, each hand's palm and thumb-side directions, the parent chain) from the generated bind pose in `src/animation-canonical-rest.js` rather than assuming a convention, then offers forward kinematics (`Pose`) and a two-bone arm IK (`solveArm`) that puts a wrist at a POINT with a natural elbow. Assuming the convention instead of measuring it is what once left the signing arm pointing behind the avatar's back.+- [`src/sign-rig.js`](../src/sign-rig.js) — kinematics for the canonical skeleton. It **measures** the reference rig (bone axes, bone lengths, each hand's palm and thumb-side directions, where its fingertips are, the parent chain) from the generated bind pose in `src/animation-canonical-rest.js` rather than assuming a convention, then offers forward kinematics (`Pose`), a two-bone arm IK (`solveArm`) that puts a wrist at a POINT with a natural elbow, and the hand geometry (`handPoint`, `handPartOffset`) that contact is solved from. Assuming the convention instead of measuring it is what once left the signing arm pointing behind the avatar's back.- [`src/sign-handshapes.js`](../src/sign-handshapes.js) — the handshape catalogue: A–Z, 0–9, and the named shapes with no letter (`CLAW`, `FLAT_O`, `BENT_B`, `OPEN_8`, `ILY`). Each is per-finger curl, splay, and a thumb preset.- [`src/sign-clip.js`](../src/sign-clip.js) — the authoring layer: a resting signer to start and end from, `posePhase()` to solve one phase of a sign, and `SignTimeline` to string phases together with eased transitions, a breathing idle, and clip output.- [`src/sign-dictionary.js`](../src/sign-dictionary.js) — the vocabulary. Each sign lists its phases; `both:` poses two hands from one description because places and directions are body-relative, so the non-dominant hand mirrors for free.@@ -55,13 +58,60 @@ WELCOME: {},```-Anchors (`forehead`, `nose`, `chin`, `mouth`, `sternum`, `belly`, `shoulder`, `hip`) are measured off the reference skeleton, and offsets are metres: `out` away from the midline, `in` toward it, `forward` toward the person reading. Directions take the same words. Because a sign is described anatomically, the same entry reads correctly on a tall avatar, a short one, and either hand.+Anchors (`forehead`, `nose`, `chin`, `mouth`, `sternum`, `belly`, `shoulder`, `hip`) are measured off the reference skeleton and follow the body, so a place on the chin stays on the chin when the head turns. Offsets are metres: `out` away from the midline, `in` toward it, `forward` toward the person reading. Directions take the same words. Because a sign is described anatomically, the same entry reads correctly on a tall avatar, a short one, and either hand.++A sign defined by contact says so instead of guessing a coordinate. `touch` names the part of the acting hand, and what it meets — the other hand, or a place on the body:++```js+FALL: {+ gloss: 'Two legs stand on the flat palm, then tip over onto their back.',+ phases: [+ { t: 0.32, left: BASE_PALM,+ right: { shape: 'V', touch: { part: 'fingertips', on: 'palm' }, fingers: 'down', palm: 'back' }, hold: 0.16 },+ { t: 0.3, left: BASE_PALM,+ right: { shape: 'V', touch: { part: 'edge', on: 'palm', out: 0.09, up: 0.02 },+ fingers: ['out', 'forward'], palm: 'up' }, head: { turn: -4, tilt: 4 }, hold: 0.2 },+ ],+},+```++The solver works backwards: the hand's orientation is known from `fingers`/`palm`, so the offset from the wrist to the touching part is known, and the wrist goes wherever puts that part on the target. Hand parts are `wrist`, `palm`, `back`, `knuckles`, `fingers`, `edge`, `fingertips`, `indextip`, `middletip`, `thumbtip`; `gap` holds a clearance instead of touching.++Grammar on the face is a `face:` key, naming a marker (`question`, `wh`, `negate`, `topic`, `pleasant`, `concern`, `intense`) or explicit blendshape weights:++```js+{ face: 'wh', t: 0.3, both: { shape: '5', at: NEUTRAL, fingers: ['forward', 'out'], palm: 'up' },+ head: { tilt: 3, nod: -3 } },+```Chat surfaces integrate through `AgentAvatar.setSignLanguage(true)`: the avatar layer already receives every assistant reply (the protocol `SPEAK` event), so signing rides the same event with no per-surface plumbing. Rigs without finger bones are refused with an explanation rather than signing wrong.+## Checking a sign++Two tools, because signing fails in two different ways.++**Positional goldens** catch a sign drifting. `tests/sign-goldens.test.js` compares every sign's wrists, elbows and fingertips at four moments against `tests/fixtures/sign-poses.json`, with an 8 mm tolerance. A change to the IK, an anchor, or a shared handshape moves many signs at once, and no property assertion notices five centimetres. After an intended change, re-record and read the diff:++```bash+node scripts/build-sign-goldens.mjs+```++**A contact sheet** catches a sign being illegible, which is a judgement made by looking. With the dev server running:++```bash+npm run sign:sheet # every sign, one frame each+npm run sign:sheet -- --letters # the manual alphabet+npm run sign:sheet -- --sign FALL --frames 8 # one sign over time+npm run sign:sheet -- --dominant Left # left-handed signer+```++`tests/sign-linguistics.test.js` additionally lints the vocabulary against Battison's constraints: when both hands move they must share a handshape, and a passive hand of a different handshape must be one of the unmarked set. A new entry is checked against the language, not just against whether it renders.+## Honest scope-The vocabulary is a core set of citation-form signs, strung together in English word order. That is signed English, not ASL grammar: real ASL reorders sentences, inflects verbs through space, and carries grammar on the face. The signs here are authored from standard descriptions, not captured from a specific signer, so they read as clear citation forms rather than as any individual's signing. Words with no entry are fingerspelled letter by letter. Non-manual markers are limited to head and torso movement, because the reference avatar carries no facial blendshapes.+The vocabulary is a core set of citation-form signs, strung together in English word order. That is signed English, not ASL grammar: real ASL reorders sentences, inflects verbs through space, and carries grammar on the face. The signs here are authored from standard descriptions, not captured from a specific signer, so they read as clear citation forms rather than as any individual's signing. Words with no entry are fingerspelled letter by letter.++Non-manual markers cover brows, eyes and mouth on avatars that carry ARKit blendshapes; the reference avatar on /sign-language has none, so its markers are compiled into the clip with nothing to drive. Marker coverage is also a fraction of what the face does in real ASL, which includes mouth morphemes, eye gaze, and body shift that this does not model.None of this replaces a human interpreter. It makes an avatar legible to signers instead of silent.@@ -69,7 +119,7 @@ None of this replaces a human interpreter. It makes an avatar legible to signers1. **Captured signs** — clips from real signers (commissioned, community capture through [Motion Swap](https://three.ws/motion-swap), permissively licensed video) replacing authored entries word by word, through the same dictionary interface.2. **Word-level sign recognition** — the current recognizer reads fingerspelling; a 250-sign vocabulary model (MIT architecture retrained on the CC BY 4.0 PopSign corpus) will let common signs be recognized directly.-3. **Non-manual markers** — eyebrow and mouth blendshape tracks alongside the hand tracks, on avatars that carry the morph targets.+3. **Review by Deaf signers** — the vocabulary is authored, not validated. Growing it past a core set should follow review and capture, not more authoring.4. **Standalone package** — the engines are platform-free by design and will ship as an npm package plus reference integration.## Relateddiff --git a/docs/spatial-mcp.md b/docs/spatial-mcp.mdindex 62313922e..7090cb86b 100644--- a/docs/spatial-mcp.md+++ b/docs/spatial-mcp.md@@ -3,8 +3,9 @@Spatial MCP is an open shape for returning a **live, interactive 3D scene** as an MCP tool result instead of a URL in text. A conformant host renders it inline — orbit, animate, place in AR — with an embedded component. three.ws is the reference implementation; the shape is renderer-agnostic and carries **no** payment, wallet, or coin surface, so it drops into crypto-free app stores unchanged.- **Spec:** [`specs/SPATIAL_MCP.md`](https://github.com/nirholas/three.ws/blob/main/specs/SPATIAL_MCP.md) (v0.1, CC0)-- **Validator (code):** [`api/_lib/spatial-mcp.js`](https://github.com/nirholas/three.ws/blob/main/api/_lib/spatial-mcp.js) — `validateSpatialArtifact()`, `buildSpatialArtifact()`+- **Validator (import it):** `https://three.ws/spatial-mcp/spatial-validator.js` — `validateSpatialArtifact()`, `buildSpatialArtifact()`. Source: [`public/spatial-mcp/spatial-validator.js`](https://github.com/nirholas/three.ws/blob/main/public/spatial-mcp/spatial-validator.js); server-side code imports the same module via `api/_lib/spatial-mcp.js`.- **Validator (MCP tool):** `validate_spatial_response({ artifact })` on the three.ws 3D Studio server+- **Validator (no code at all):** paste a payload into the checker on [`/spatial-mcp`](https://three.ws/spatial-mcp) and read the diagnostics- **Reference renderer:** [`/spatial-mcp`](https://three.ws/spatial-mcp) — `public/spatial-mcp/spatial-renderer.js`## Quick start — emit a conformant artifact@@ -32,7 +33,7 @@ return {## Validate before you ship```js-import { validateSpatialArtifact } from './spatial-mcp.js';+import { validateSpatialArtifact } from 'https://three.ws/spatial-mcp/spatial-validator.js';const { valid, errors, warnings } = validateSpatialArtifact(spatial);if (!valid) throw new Error('non-conformant: ' + errors.map(e => `${e.path}: ${e.message}`).join('; '));@@ -40,6 +41,10 @@ if (!valid) throw new Error('non-conformant: ' + errors.map(e => `${e.path}: ${e`errors` and `warnings` each name the offending `path` and the fix, so you can correct output rather than guess. Wire it into CI as an invariant over every 3D tool's real output (three.ws does — see `tests/spatial-mcp.test.js`).+The validator is dependency-free and runs anywhere: a browser, a Node tool, a CI step. It is the same module the reference page loads, so what the page reports about a payload is what your build will report.++**Or validate nothing yourself.** The checker on [`/spatial-mcp`](https://three.ws/spatial-mcp) runs that module in your browser against whatever you paste, as you type, and lists every `path` with its fix. It also ships a deliberately broken example so you can see the diagnostics before you have a payload of your own. Conformant payloads render in place; unusable ones show the renderer's designed fallback, which is what a host would show a user.+Agents can validate over MCP without importing anything:```jsonc@@ -70,7 +75,7 @@ function toSpatialArtifact(f) {}```-The live demo at [`/spatial-mcp`](https://three.ws/spatial-mcp) renders exactly this transform beside a native three.ws artifact — the same renderer displays both, proving portability.+The live demo at [`/spatial-mcp`](https://three.ws/spatial-mcp) renders exactly this transform beside a native three.ws artifact — the same renderer displays both, proving portability. Both frames carry the validator's verdict underneath, so the conformance claim on that page is demonstrated rather than asserted.## Render it yourselfdiff --git a/package.json b/package.jsonindex 512509a1a..18908f259 100644--- a/package.json+++ b/package.json@@ -162,6 +162,8 @@"build:animations": "node scripts/build-animations.mjs","convert:fbx": "node scripts/fbx-to-glb.mjs","build:canonical-rest": "node scripts/build-canonical-rest.mjs",+ "build:sign-goldens": "node scripts/build-sign-goldens.mjs",+ "sign:sheet": "node scripts/sign-contact-sheet.mjs","extract:animations": "node scripts/extract-glb-animations.mjs && npm run build:animations","bake:mannequin": "node scripts/bake-mannequin-glb.mjs","build:club-props": "node scripts/build-club-props.mjs",diff --git a/pages/sign-language.html b/pages/sign-language.htmlindex 20113c985..0b330d939 100644--- a/pages/sign-language.html+++ b/pages/sign-language.html@@ -107,6 +107,20 @@.sl-cam-result[data-state='ok'] { border-color: rgba(56,211,159,.5); }.sl-cam-hint { font-size: 13px; color: var(--ink-dim); line-height: 1.5; }+ /* Speed + dominant hand */+ .sl-settings { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 16px; }+ .sl-setting { display: flex; align-items: center; gap: 9px; }+ .sl-setting-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-dim); }+ .sl-opts { display: inline-flex; gap: 4px; padding: 3px; border: 1px solid var(--stroke); border-radius: 999px; background: var(--surface-2); }+ .sl-opt {+ appearance: none; border: 0; background: transparent; color: var(--ink-dim);+ font: inherit; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 999px;+ cursor: pointer; transition: color .14s ease, background .14s ease;+ }+ .sl-opt:hover { color: var(--ink); }+ .sl-opt:focus-visible { outline: 2px solid rgba(167,139,250,.9); outline-offset: 1px; }+ .sl-opt[aria-pressed='true'] { color: var(--ink); background: rgba(167,139,250,.2); }+/* Vocabulary */.sl-vocab { margin-top: clamp(48px, 6vw, 76px); }.sl-vocab h2 { font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -.02em; margin: 0 0 10px; }@@ -180,6 +194,17 @@<button class="sl-phrase-chip" type="button" data-sl-phrase="42">42</button><button class="sl-phrase-chip" type="button" data-sl-phrase="GM">gm</button></div>++ <div class="sl-settings">+ <div class="sl-setting">+ <span class="sl-setting-label" id="sl-speed-label">Speed</span>+ <div class="sl-opts" id="sl-speed" role="group" aria-labelledby="sl-speed-label"></div>+ </div>+ <div class="sl-setting">+ <span class="sl-setting-label" id="sl-hand-label">Signing hand</span>+ <div class="sl-opts" id="sl-hand" role="group" aria-labelledby="sl-hand-label"></div>+ </div>+ </div></div></div></section>diff --git a/public/spatial-mcp/index.html b/public/spatial-mcp/index.htmlindex 7e08d0679..8818eae46 100644--- a/public/spatial-mcp/index.html+++ b/public/spatial-mcp/index.html@@ -52,6 +52,9 @@.checker textarea:focus-visible { outline:2px solid var(--accent); outline-offset:1px; }.report { display:grid; gap:6px; }.report-pills { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }+ /* The checker's own stage sits inside a padded card, so it needs its own edge to+ read as a viewport rather than as empty card space. */+ #stage-check { border:1px solid rgba(255,255,255,0.08); border-radius:10px; background:rgba(0,0,0,0.22); }.diag { display:grid; grid-template-columns:auto 1fr; gap:10px; align-items:baseline;padding:8px 10px; border-radius:8px; background:rgba(255,255,255,0.04); font-size:12.5px; line-height:1.5; }.diag code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space:nowrap; }diff --git a/scripts/build-sign-goldens.mjs b/scripts/build-sign-goldens.mjsnew file mode 100644index 000000000..1e6edeecf--- /dev/null+++ b/scripts/build-sign-goldens.mjs@@ -0,0 +1,86 @@+#!/usr/bin/env node+/**+ * build-sign-goldens.mjs — snapshot where every sign puts the hands.+ *+ * A sign is a shape in space, so the honest regression test is positional: at+ * fixed moments through each clip, where are the wrists, the fingertips, the+ * elbows? This writes those positions to tests/fixtures/sign-poses.json, and+ * tests/sign-goldens.test.js compares against them.+ *+ * That catches the class of change no assertion anticipates: a tweak to the IK+ * pole, the anchor table, or a handshape that quietly moves twenty signs. The+ * threshold is in centimetres, so intentional retuning shows up as a readable+ * diff rather than a wall of noise.+ *+ * Re-run after an intended change and review the diff:+ * node scripts/build-sign-goldens.mjs+ *+ * Reads: src/sign-dictionary.js, src/fingerspelling.js+ * Writes: tests/fixtures/sign-poses.json+ */++import fs from 'node:fs';+import path from 'node:path';+import { fileURLToPath } from 'node:url';++import { buildFingerspellingClip } from '../src/fingerspelling.js';+import { SIGNS, buildSignClip } from '../src/sign-dictionary.js';+import { Pose, handPoint } from '../src/sign-rig.js';++const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');+const OUT = path.join(ROOT, 'tests/fixtures/sign-poses.json');++/** Fractions of a clip's duration to sample. Skips the very ends (both rest). */+export const SAMPLES = [0.25, 0.45, 0.65, 0.85];++/** Points that describe a sign: where each hand is, and what it points with. */+function measure(pose) {+ const out = {};+ for (const side of ['Left', 'Right']) {+ out[`${side.toLowerCase()}Wrist`] = pose.worldPos(`${side}Hand`);+ out[`${side.toLowerCase()}Elbow`] = pose.worldPos(`${side}ForeArm`);+ out[`${side.toLowerCase()}Tips`] = handPoint(pose, side, 'fingertips');+ }+ return out;+}++function poseAtTime(clip, time) {+ const pose = new Pose();+ for (const track of clip.tracks) {+ if (track.type !== 'quaternion') continue;+ let i = 0;+ while (i + 1 < track.times.length && track.times[i + 1] <= time) i++;+ pose.setLocal(track.name.split('.')[0], track.values.slice(i * 4, i * 4 + 4));+ }+ return pose;+}++const round = (v) => v.map((n) => Math.round(n * 10000) / 10000);++/** Golden entries for one clip: one measurement per sample point. */+export function sampleClip(clip) {+ return SAMPLES.map((u) => {+ const points = measure(poseAtTime(clip, clip.duration * u));+ return Object.fromEntries(Object.entries(points).map(([k, v]) => [k, round(v)]));+ });+}++export function buildGoldens() {+ const signs = {};+ for (const word of Object.keys(SIGNS).sort()) signs[word] = sampleClip(buildSignClip(word));+ // A handful of letters stand in for the alphabet: one fist, one flat hand,+ // one that points, one traced, and the two lowered letters.+ const spelling = {};+ for (const letter of ['A', 'B', 'D', 'J', 'P', 'Q', 'Z']) {+ spelling[letter] = sampleClip(buildFingerspellingClip(letter));+ }+ return { signs, spelling };+}++if (import.meta.url === `file://${process.argv[1]}`) {+ const goldens = buildGoldens();+ fs.mkdirSync(path.dirname(OUT), { recursive: true });+ fs.writeFileSync(OUT, `${JSON.stringify(goldens, null, '\t')}\n`);+ const count = Object.keys(goldens.signs).length + Object.keys(goldens.spelling).length;+ console.log(`wrote ${path.relative(ROOT, OUT)} — ${count} clips × ${SAMPLES.length} samples`);+}diff --git a/scripts/sign-contact-sheet.html b/scripts/sign-contact-sheet.htmlnew file mode 100644index 000000000..21eae0fd2--- /dev/null+++ b/scripts/sign-contact-sheet.html@@ -0,0 +1,176 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="utf-8" />+ <title>sign contact sheet</title>+ <style>+ html, body { margin: 0; background: #2f5bb7; }+ canvas { display: block; }+ #labels { position: fixed; inset: 0; pointer-events: none; font: 700 20px system-ui; color: #ffe600; }+ #labels div { position: absolute; text-shadow: 0 1px 3px rgba(0,0,0,.5); }+ </style>+ </head>+ <body>+ <!--+ Dev-only contact sheet for the signing lane. Not part of the site build+ (vite's inputs are enumerated explicitly in vite.config.js) — it is loaded+ by scripts/sign-contact-sheet.mjs against `npm run dev`.++ Signing is judged by eye: whether a handshape reads, whether two hands+ actually meet, whether an arm looks like an arm. The numeric tests in+ tests/sign-*.test.js catch geometry regressions, but only a picture shows+ whether a sign is legible. This renders every sign (or every letter) as one+ frame per cell so the whole vocabulary can be reviewed at a glance.++ Query params:+ mode=vocab|letters|frames|sign what to lay out (default vocab)+ words=HELLO,HAPPY subset for vocab mode+ word=ABCDEF the word for letters/frames/sign mode+ avatar=/avatars/cz.glb which rig to render on+ dominant=Right|Left signing hand+ cols, w, h, n grid shape and frame count+ -->+ <div id="labels"></div>+ <script type="module">+ import * as THREE from 'three';+ import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';+ import { RoomEnvironment } from 'three/addons/environments/RoomEnvironment.js';+ import { AnimationManager } from '/src/animation-manager.js';+ import { getMeshoptDecoder } from '/src/viewer/internal.js';+ import { DEFAULT_TIMING, buildFingerspellingClip } from '/src/fingerspelling.js';+ import { SIGNS, buildSignClip } from '/src/sign-dictionary.js';++ const params = new URLSearchParams(location.search);+ const mode = params.get('mode') || 'vocab';+ const word = params.get('word') || 'ABCDEFGHIJKL';+ const dominant = params.get('dominant') === 'Left' ? 'Left' : 'Right';+ const cols = +(params.get('cols') || 6);+ const cellW = +(params.get('w') || 240);+ const cellH = +(params.get('h') || 300);++ // Each cell is {clip, time, label}. Building one clip per cell keeps the+ // cells independent, which matters because a single mixer carries state+ // between actions and would quietly blend one sign into the next.+ const cells = [];+ if (mode === 'vocab') {+ const words = (params.get('words') || Object.keys(SIGNS).join(',')).split(',');+ for (const w of words) {+ const clip = buildSignClip(w, { dominant });+ if (clip) cells.push({ clip, time: clip.duration - 0.42, label: w });+ }+ } else if (mode === 'sign') {+ const clip = buildSignClip(word, { dominant });+ const n = +(params.get('n') || 8);+ for (let i = 0; i < n; i++) {+ const t = (clip.duration * (i + 0.5)) / n;+ cells.push({ clip, time: t, label: `${t.toFixed(2)}s` });+ }+ } else if (mode === 'frames') {+ const clip = buildFingerspellingClip(word, { dominant });+ const n = +(params.get('n') || 12);+ for (let i = 0; i < n; i++) {+ const t = (clip.duration * i) / (n - 1);+ cells.push({ clip, time: t, label: `${t.toFixed(2)}s` });+ }+ } else {+ // One cell per letter, sampled in the middle of that letter's hold.+ const letters = [...word.toUpperCase().replace(/[^A-Z0-9]/g, '')];+ const clip = buildFingerspellingClip(letters.join(''), { dominant });+ let t = DEFAULT_TIMING.leadSeconds;+ for (const ch of letters) {+ const traced = ch === 'J' || ch === 'Z';+ const span = traced ? DEFAULT_TIMING.motionSeconds : DEFAULT_TIMING.holdSeconds;+ const mid = t + DEFAULT_TIMING.transitionSeconds + span * (traced ? 0.85 : 0.6);+ t += DEFAULT_TIMING.transitionSeconds + span;+ cells.push({ clip, time: mid, label: ch });+ }+ }+ if (!cells.length) throw new Error('nothing to render');++ const rows = Math.ceil(cells.length / cols);+ const W = cols * cellW;+ const H = rows * cellH;++ const renderer = new THREE.WebGLRenderer({ antialias: true });+ renderer.setPixelRatio(1);+ renderer.setSize(W, H);+ renderer.outputColorSpace = THREE.SRGBColorSpace;+ renderer.toneMapping = THREE.ACESFilmicToneMapping;+ renderer.autoClear = false;+ renderer.setScissorTest(true);+ document.body.appendChild(renderer.domElement);++ const scene = new THREE.Scene();+ scene.background = new THREE.Color(0x2f5bb7);+ const pmrem = new THREE.PMREMGenerator(renderer);+ scene.environment = pmrem.fromScene(new RoomEnvironment(), 0.04).texture;+ pmrem.dispose();+ scene.add(new THREE.HemisphereLight(0xffffff, 0x39404d, 1));+ const key = new THREE.DirectionalLight(0xffffff, 1.6);+ key.position.set(1.5, 2.5, 3);+ scene.add(key, new THREE.AmbientLight(0xffffff, 0.4));++ const loader = new GLTFLoader();+ loader.setMeshoptDecoder(await getMeshoptDecoder());+ const gltf = await loader.loadAsync(params.get('avatar') || '/avatars/cz.glb');+ const model = gltf.scene;+ model.traverse((n) => { if (n.isMesh) n.frustumCulled = false; });+ scene.add(model);++ // Retarget through the real runtime path, so the sheet shows what the site+ // shows rather than what the authoring code intended.+ const anim = new AnimationManager();+ anim.attach(model);+ const bound = new Map();+ for (const cell of cells) {+ if (bound.has(cell.clip)) continue;+ const name = `cell-${bound.size}`;+ anim.injectClip(name, cell.clip, { loop: false });+ const action = anim.actions.get(name);+ if (!action) throw new Error(`clip did not bind: ${cell.label}`);+ bound.set(cell.clip, action.getClip());+ }++ const camera = new THREE.PerspectiveCamera(30, cellW / cellH, 0.05, 50);+ const labels = document.getElementById('labels');+ const head = (() => {+ let found = null;+ model.traverse((n) => { if (!found && /head$/i.test(n.name)) found = n; });+ return found;+ })();+ const headPos = new THREE.Vector3();++ renderer.clear();+ cells.forEach((cell, i) => {+ // A fresh mixer per cell: swapping actions on one mixer leaves stale+ // accumulator state that silently blends the pose toward the bind pose.+ const mixer = new THREE.AnimationMixer(model);+ const action = mixer.clipAction(bound.get(cell.clip));+ action.play();+ action.paused = true;+ action.time = Math.max(0, Math.min(cell.time, cell.clip.duration - 1e-4));+ mixer.update(0);+ model.updateWorldMatrix(true, true);++ const col = i % cols;+ const row = (i / cols) | 0;+ renderer.setViewport(col * cellW, H - (row + 1) * cellH, cellW, cellH);+ renderer.setScissor(col * cellW, H - (row + 1) * cellH, cellW, cellH);+ head.getWorldPosition(headPos);+ const focus = new THREE.Vector3(0, headPos.y - 0.36, 0);+ camera.position.set(0, focus.y + 0.18, 2);+ camera.lookAt(focus);+ camera.updateProjectionMatrix();+ renderer.render(scene, camera);++ const el = document.createElement('div');+ el.textContent = cell.label;+ el.style.left = `${col * cellW + 12}px`;+ el.style.top = `${row * cellH + 10}px`;+ labels.appendChild(el);+ });++ document.title = 'ready';+ </script>+ </body>+</html>diff --git a/scripts/sign-contact-sheet.mjs b/scripts/sign-contact-sheet.mjsnew file mode 100644index 000000000..a7076fbb5--- /dev/null+++ b/scripts/sign-contact-sheet.mjs@@ -0,0 +1,97 @@+#!/usr/bin/env node+/**+ * sign-contact-sheet.mjs — render the signing vocabulary (or the alphabet) as a+ * single reviewable image.+ *+ * The numeric tests in tests/sign-*.test.js prove a hand reaches the right point+ * and two hands actually meet. They cannot tell you whether a sign is LEGIBLE —+ * that is a judgement made by looking, and it is how the arm-behind-the-body bug+ * was caught in the first place. This drives a real browser through the real+ * retarget path and lays every sign out as one frame per cell, so a change to the+ * solver can be eyeballed across the whole vocabulary in one picture.+ *+ * Requires the dev server (`npm run dev`).+ *+ * node scripts/sign-contact-sheet.mjs # whole vocabulary+ * node scripts/sign-contact-sheet.mjs --letters # the manual alphabet+ * node scripts/sign-contact-sheet.mjs --words HAPPY,FALL # a subset+ * node scripts/sign-contact-sheet.mjs --sign FALL # one sign over time+ * node scripts/sign-contact-sheet.mjs --dominant Left # left-handed signer+ * node scripts/sign-contact-sheet.mjs --avatar /avatars/x.glb+ * node scripts/sign-contact-sheet.mjs --out /tmp/sheet.png --cols 6+ *+ * Note: headless Chromium renders WebGL through SwiftShader. Avatars with many+ * morph targets animate far too slowly there to review this way; use a light rig.+ */++import { chromium } from 'playwright';++const argv = process.argv.slice(2);+const flag = (name, fallback = null) => {+ const i = argv.indexOf(`--${name}`);+ return i === -1 ? fallback : (argv[i + 1] ?? true);+};+const has = (name) => argv.includes(`--${name}`);++if (has('help')) {+ console.log(import.meta.url && new URL(import.meta.url).pathname);+ console.log('see the header of this file for usage');+ process.exit(0);+}++const base = process.env.BASE_URL || 'http://localhost:3000';+const out = flag('out', '/tmp/sign-contact-sheet.png');+const query = new URLSearchParams();++if (has('letters')) {+ query.set('mode', 'letters');+ query.set('word', flag('word', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'));+} else if (flag('sign')) {+ query.set('mode', 'sign');+ query.set('word', flag('sign'));+ query.set('n', flag('frames', '8'));+} else if (flag('spell')) {+ query.set('mode', 'frames');+ query.set('word', flag('spell'));+ query.set('n', flag('frames', '12'));+} else {+ query.set('mode', 'vocab');+ if (flag('words')) query.set('words', flag('words'));+}+for (const name of ['cols', 'w', 'h', 'avatar', 'dominant']) {+ if (flag(name)) query.set(name, flag(name));+}++const url = `${base}/scripts/sign-contact-sheet.html?${query}`;+console.log(`rendering ${url}`);++const browser = await chromium.launch({+ args: ['--use-gl=angle', '--use-angle=swiftshader', '--enable-unsafe-swiftshader'],+});+const page = await browser.newPage({ viewport: { width: 1600, height: 1200 } });+const problems = [];+page.on('console', (m) => {+ if (m.type() === 'error' && !/websocket|\[vite\]/i.test(m.text())) problems.push(m.text());+});+// The dev server's HMR socket cannot reach a headless page through a forwarded+// port; that failure says nothing about the render.+page.on('pageerror', (e) => {+ if (!/WebSocket/i.test(String(e))) problems.push(String(e));+});++let ok = true;+try {+ await page.goto(url, { waitUntil: 'load', timeout: 60_000 });+ await page.waitForFunction(() => document.title === 'ready', null, { timeout: 120_000 });+ await page.waitForTimeout(300);+ const box = await (await page.$('canvas')).boundingBox();+ await page.screenshot({ path: out, clip: { x: 0, y: 0, width: box.width, height: box.height } });+ console.log(`wrote ${out} (${Math.round(box.width)}×${Math.round(box.height)})`);+} catch (err) {+ ok = false;+ console.error(`render failed: ${err.message}`);+ console.error(`is the dev server running? (npm run dev, or set BASE_URL)`);+}+if (problems.length) console.error(`page errors:\n ${problems.join('\n ')}`);+await browser.close();+process.exit(ok && !problems.length ? 0 : 1);diff --git a/specs/SPATIAL_MCP.md b/specs/SPATIAL_MCP.mdindex aad44a327..47a36eae6 100644--- a/specs/SPATIAL_MCP.md+++ b/specs/SPATIAL_MCP.md@@ -2,7 +2,7 @@**Version 0.1** · Open specification · License: CC0 / public domain (adopt freely)-> Reference implementation: [three.ws](https://three.ws). Validator: `api/_lib/spatial-mcp.js`. Reference renderer: [`/spatial-mcp`](https://three.ws/spatial-mcp). Adoption guide: [`docs/spatial-mcp.md`](../docs/spatial-mcp.md).+> Reference implementation: [three.ws](https://three.ws). Validator: `public/spatial-mcp/spatial-validator.js`, published at `https://three.ws/spatial-mcp/spatial-validator.js`. Reference renderer + live conformance checker: [`/spatial-mcp`](https://three.ws/spatial-mcp). Adoption guide: [`docs/spatial-mcp.md`](../docs/spatial-mcp.md).## The problem@@ -80,7 +80,13 @@ A Spatial MCP artifact is a JSON object placed in a tool result's `structuredCon## Conformance-Validate an artifact with `validateSpatialArtifact(payload)` (`api/_lib/spatial-mcp.js`) or the MCP tool `validate_spatial_response({ artifact })` on the three.ws 3D Studio server. Both return actionable diagnostics:+Validate an artifact three ways, all the same implementation:++- **Import it** from `https://three.ws/spatial-mcp/spatial-validator.js` (source: `public/spatial-mcp/spatial-validator.js`; server-side code re-exports it via `api/_lib/spatial-mcp.js`). Dependency-free, runs in a browser or in Node.+- **Call the MCP tool** `validate_spatial_response({ artifact })` on the three.ws 3D Studio server.+- **Paste it** into the checker on [`/spatial-mcp`](https://three.ws/spatial-mcp), which validates as you type and renders whatever passes.++All three return actionable diagnostics:```js{ valid: false, version: "0.1",diff --git a/src/animation-manager.js b/src/animation-manager.jsindex da3388013..e9fd1e87e 100644--- a/src/animation-manager.js+++ b/src/animation-manager.js@@ -16,6 +16,7 @@ import {clipHipBaselineY,hipRestLocalHeight,hipsParentWorldQuat,+ morphTargetMapFromObject,retargetClip,} from './animation-retarget.js';import { relaxUndrivenArms } from './animation-arm-relax.js';@@ -203,6 +204,10 @@ export class AnimationManager {// World rotation of the Hips' parent (within the model), so root motion is// re-expressed in the rig's own frame and travels the right way on any rig.this._hipsParentWorldQuat = hipsParentWorldQuat(model);+ // Blendshapes this avatar carries, so a clip's face lanes (the non-manual+ // markers a signed question needs) can be re-pointed at its own meshes. An+ // avatar with no face shapes simply gets no face lanes.+ this._morphTargets = morphTargetMapFromObject(model);// Rest height of the Hips in the parent's local units (metres for a// metre-native rig, ~100 for a centimetre-scale Mixamo armature). Hip// tracks set the Hips' *local* position, so _retarget scales each clip by@@ -244,6 +249,7 @@ export class AnimationManager {targetRest: this._canonicalRest,targetWorldRest: this._canonicalWorldRest,hipsParentWorldQuat: this._hipsParentWorldQuat,+ morphTargets: this._morphTargets,hipScale,});return out;@@ -318,6 +324,7 @@ export class AnimationManager {this._canonicalRest = null;this._canonicalWorldRest = null;this._hipsParentWorldQuat = null;+ this._morphTargets = null;this._hipTargetLocalY = 0;this._canonicalClipsSupported = false;this.actions.clear();diff --git a/src/animation-retarget.js b/src/animation-retarget.jsindex 7f9d67792..127be71d3 100644--- a/src/animation-retarget.js+++ b/src/animation-retarget.js@@ -60,6 +60,10 @@ const SOURCE_WORLD_REST = new Map(// rig that already matches the authoring convention round-trips bit-for-bit.const BIND_EPSILON = 1e-6;+// Track property prefix for a blendshape lane, e.g.+// `Face.morphTargetInfluences[browInnerUp]`.+const MORPH_PROPERTY = 'morphTargetInfluences[';+const _v = new Vector3();const _q = new Quaternion();@@ -72,6 +76,7 @@ const _q = new Quaternion();* @property {number} coverage matched / total (0–1).* @property {string[]} dropped Canonical bone names the target rig lacks.* @property {number} hipScale Factor applied to hip translation (1 = none).+ * @property {number} face Blendshape lanes bound on the target (0 = no face).*//**@@ -211,6 +216,27 @@ export function canonicalWorldRestMapFromRig(rig) {return map;}+/**+ * Map every blendshape name the target carries to the mesh nodes that own it, so+ * a face lane authored once can be re-pointed at this avatar. Faces are commonly+ * split across several meshes (head, teeth, brows), and all of them need driving.+ *+ * @param {import('three').Object3D} root+ * @returns {Map<string,string[]>}+ */+export function morphTargetMapFromObject(root) {+ const map = new Map();+ root.traverse((node) => {+ if (!node?.morphTargetDictionary || !node.name) return;+ for (const shape of Object.keys(node.morphTargetDictionary)) {+ if (!map.has(shape)) map.set(shape, []);+ const meshes = map.get(shape);+ if (!meshes.includes(node.name)) meshes.push(node.name);+ }+ });+ return map;+}+/*** Per-bone bind correction `{L, R}` such that `q' = L · q · R` re-expresses a clip* bone's keyframe so it produces the SAME world-space rotation delta on a target@@ -418,7 +444,7 @@ export function clipHipBaselineY(clip) {** @param {AnimationClip} clip* @param {Map<string,string>} canonicalToNode- * @param {{ hipScale?: number, minCoverage?: number }} [opts]+ * @param {{ hipScale?: number, minCoverage?: number, morphTargets?: Map<string,string[]> }} [opts]* @returns {RetargetResult}*/export function retargetClip(clip, canonicalToNode, opts = {}) {@@ -428,6 +454,7 @@ export function retargetClip(clip, canonicalToNode, opts = {}) {const hipsPosCorrection = hipPositionCorrection(opts.hipsParentWorldQuat, corrections);const dropped = [];const tracks = [];+ const faceTracks = [];// Denominator counts only *retargetable* tracks (see below), so a clip baked// with per-bone position/scale channels still reports honest coverage.let total = 0;@@ -437,6 +464,31 @@ export function retargetClip(clip, canonicalToNode, opts = {}) {if (dot === -1) continue;const boneRaw = track.name.slice(0, dot);const property = track.name.slice(dot + 1);++ // Face (morph-target) lanes. Signing carries grammar on the face — raised+ // brows make a question, furrowed brows a wh-question — so a clip may drive+ // blendshapes as well as bones. They are authored against a placeholder node+ // (`Face.morphTargetInfluences[browInnerUp]`) and re-pointed here at whatever+ // mesh on THIS avatar owns that shape, because the mesh is named differently+ // on every rig and a face is often split across several. An avatar with no+ // such shape simply loses the lane: the sign still performs, just without the+ // marker. They never count toward bone coverage, so a face-less rig is not+ // judged to have failed the retarget.+ if (property.startsWith(MORPH_PROPERTY)) {+ const shape = property.slice(MORPH_PROPERTY.length, -1);+ const meshes = opts.morphTargets instanceof Map ? opts.morphTargets.get(shape) : null;+ if (!meshes?.length) {+ dropped.push(shape);+ continue;+ }+ for (const meshName of meshes) {+ const next = track.clone();+ next.name = `${meshName}.${property}`;+ faceTracks.push(next);+ }+ continue;+ }+const canonical = canonicalizeBoneName(boneRaw) || boneRaw;// The clips are baked from cz with a full position/quaternion/scale channel@@ -484,11 +536,11 @@ export function retargetClip(clip, canonicalToNode, opts = {}) {const matched = tracks.length;const coverage = total > 0 ? matched / total : 0;if (coverage < minCoverage) {- return { clip: null, matched, total, coverage, dropped, hipScale };+ return { clip: null, matched, total, coverage, dropped, hipScale, face: 0 };}const out = clip.clone();- out.tracks = tracks;- return { clip: out, matched, total, coverage, dropped, hipScale };+ out.tracks = [...tracks, ...faceTracks];+ return { clip: out, matched, total, coverage, dropped, hipScale, face: faceTracks.length };}/**@@ -539,6 +591,7 @@ export function retargetClipToRig(clip, rig, opts = {}) {targetRest,targetWorldRest,hipsParentWorldQuat: hipsParent,+ morphTargets: opts.morphTargets ?? (rig.root ? morphTargetMapFromObject(rig.root) : undefined),});}@@ -561,6 +614,7 @@ export function retargetClipToObject(clip, root, opts = {}) {targetRest,targetWorldRest,hipsParentWorldQuat: hipsParentWorld,+ morphTargets: opts.morphTargets ?? morphTargetMapFromObject(root),});}diff --git a/src/sign-clip.js b/src/sign-clip.jsindex 0f0d78306..eed6443eb 100644--- a/src/sign-clip.js+++ b/src/sign-clip.js@@ -133,6 +133,71 @@ function contactPoint(pose, side, touch) {return vAdd(base, [outward * (touch.out ?? 0), touch.up ?? 0, touch.forward ?? 0]);}+// ── non-manual markers ─────────────────────────────────────────────────────+//+// In ASL the face is grammar, not decoration: raised brows mark a yes/no+// question, furrowed brows a wh-question, a headshake carries negation, and the+// same manual sign means different things under different markers. These presets+// name the markers a sign can carry; they compile to ARKit-standard blendshape+// weights, which is what most avatar pipelines (Ready Player Me, Avaturn, VRM+// with ARKit shapes) expose. An avatar without them loses the marker and keeps+// the sign — see the face lane in src/animation-retarget.js.+export const FACE_MARKERS = Object.freeze({+ /** Yes/no question: brows up, head slightly forward. */+ question: { browInnerUp: 0.75, browOuterUpLeft: 0.6, browOuterUpRight: 0.6 },+ /** Wh-question (WHAT, WHY, HOW): brows down and drawn together. */+ wh: { browDownLeft: 0.7, browDownRight: 0.7, eyeSquintLeft: 0.25, eyeSquintRight: 0.25 },+ /** Negation, alongside the headshake the sign itself carries. */+ negate: { browDownLeft: 0.4, browDownRight: 0.4, mouthPucker: 0.2 },+ /** Topic marker: brows up, held. */+ topic: { browInnerUp: 0.55, browOuterUpLeft: 0.45, browOuterUpRight: 0.45 },+ /** Pleasure, on signs that carry it lexically (HAPPY, GOOD, NICE). */+ pleasant: { mouthSmileLeft: 0.45, mouthSmileRight: 0.45, cheekSquintLeft: 0.3, cheekSquintRight: 0.3 },+ /** Concern or apology (SORRY, BAD). */+ concern: { browInnerUp: 0.45, mouthFrownLeft: 0.3, mouthFrownRight: 0.3 },+ /** Effort or intensity — the "cs"/"mm" mouth of a close, careful sign. */+ intense: { jawOpen: 0.12, eyeSquintLeft: 0.35, eyeSquintRight: 0.35, cheekPuff: 0.15 },+ /** Nothing: a neutral face, which is itself a grammatical choice. */+ neutral: {},+});++/**+ * Resolve a phase's `face:` into blendshape weights. Accepts a marker name, a+ * list of them, or explicit `{shapeName: weight}`.+ * @param {string|string[]|object} spec+ * @returns {Record<string, number>}+ */+export function faceWeights(spec) {+ if (!spec) return {};+ if (typeof spec === 'object' && !Array.isArray(spec)) {+ // Explicit weights, or a marker name with an intensity: { question: 0.5 }.+ const out = {};+ for (const [key, value] of Object.entries(spec)) {+ if (FACE_MARKERS[key]) {+ for (const [shape, w] of Object.entries(FACE_MARKERS[key])) out[shape] = w * value;+ } else {+ out[key] = value;+ }+ }+ return out;+ }+ const names = Array.isArray(spec) ? spec : [spec];+ const out = {};+ for (const name of names) {+ const marker = FACE_MARKERS[name];+ if (!marker) throw new Error(`unknown face marker "${name}"`);+ for (const [shape, w] of Object.entries(marker)) out[shape] = Math.max(out[shape] ?? 0, w);+ }+ return out;+}++// Every shape any marker can touch. A phase that does not use a shape must still+// drive it to zero, or a marker from an earlier phase would stick to the face for+// the rest of the utterance.+const FACE_SHAPES = Object.freeze([+ ...new Set(Object.values(FACE_MARKERS).flatMap((m) => Object.keys(m))),+]);+// ── the resting signer ─────────────────────────────────────────────────────/** Where a relaxed arm hangs: down the side, elbow soft, palm toward the thigh. */@@ -303,6 +368,8 @@ export function posePhase(spec, base = restingPose()) {pose.setLocal('Head', qMul(pose.getLocal('Head'), qSlerp([0, 0, 0, 1], q, 0.55)));}+ if (spec.face) pose.setFace(faceWeights(spec.face));+// The hand being touched has to exist before the hand touching it, so a hand// whose spec has no `touch` is posed first.const hands = ['Left', 'Right']@@ -447,6 +514,21 @@ export class SignTimeline {}tracks.push({ type: 'quaternion', name: `${bone}.quaternion`, times: [...times], values });}++ // Face lanes, only for the shapes this clip actually uses. Authored against+ // a placeholder node; src/animation-retarget.js re-points them at whichever+ // meshes on the target avatar own each shape, and drops them when it has no+ // face at all.+ for (const shape of FACE_SHAPES) {+ if (!keys.some((k) => k.pose.getFace(shape) > 0)) continue;+ tracks.push({+ type: 'number',+ name: `Face.morphTargetInfluences[${shape}]`,+ times: [...times],+ values: keys.map((k) => k.pose.getFace(shape)),+ });+ }+return {name,duration: times[times.length - 1],@@ -457,11 +539,15 @@ export class SignTimeline {}}-/** Per-bone slerp between two poses. */+/** Per-bone slerp plus per-shape lerp between two poses. */function blend(a, b, t) {const out = new Pose(a);const bones = new Set([...a.local.keys(), ...b.local.keys()]);for (const bone of bones) out.setLocal(bone, qSlerp(a.getLocal(bone), b.getLocal(bone), t));+ const shapes = new Set([...a.face.keys(), ...b.face.keys()]);+ for (const shape of shapes) {+ out.face.set(shape, a.getFace(shape) + (b.getFace(shape) - a.getFace(shape)) * t);+ }return out;}diff --git a/src/sign-dictionary.js b/src/sign-dictionary.jsindex e7e636d98..348d4084d 100644--- a/src/sign-dictionary.js+++ b/src/sign-dictionary.js@@ -48,15 +48,15 @@ export const SIGNS = Object.freeze({HELLO: {gloss: 'Flat hand salutes out from the temple.',phases: [- { t: 0.3, right: { shape: 'FLAT', at: { anchor: 'forehead', out: 0.11, up: -0.03, forward: 0.1 }, fingers: ['up', 'in'], palm: ['forward', 'down'] }, head: { nod: 2 }, hold: 0.1 },- { t: 0.32, right: { shape: 'FLAT', at: { anchor: 'forehead', out: 0.21, up: -0.07, forward: 0.18 }, fingers: ['up', 'out'], palm: 'forward' }, head: { nod: -2 }, hold: 0.18 },+ { face: 'pleasant', t: 0.3, right: { shape: 'FLAT', at: { anchor: 'forehead', out: 0.11, up: -0.03, forward: 0.1 }, fingers: ['up', 'in'], palm: ['forward', 'down'] }, head: { nod: 2 }, hold: 0.1 },+ { face: 'pleasant', t: 0.32, right: { shape: 'FLAT', at: { anchor: 'forehead', out: 0.21, up: -0.07, forward: 0.18 }, fingers: ['up', 'out'], palm: 'forward' }, head: { nod: -2 }, hold: 0.18 },],},THANK: {gloss: 'Flat hand moves out and down from the chin.',phases: [- { t: 0.3, right: { shape: 'FLAT', touch: { to: 'chin', part: 'fingertips', out: 0.02, forward: 0.01 }, fingers: ['up', 'in'], palm: 'back' }, head: { nod: 3 }, hold: 0.12 },- { t: 0.34, right: { shape: 'FLAT', at: { anchor: 'chin', out: 0.08, up: -0.16, forward: 0.28 }, fingers: ['forward', 'up'], palm: 'up' }, head: { nod: 6 }, hold: 0.16 },+ { face: 'pleasant', t: 0.3, right: { shape: 'FLAT', touch: { to: 'chin', part: 'fingertips', out: 0.02, forward: 0.01 }, fingers: ['up', 'in'], palm: 'back' }, head: { nod: 3 }, hold: 0.12 },+ { face: 'pleasant', t: 0.34, right: { shape: 'FLAT', at: { anchor: 'chin', out: 0.08, up: -0.16, forward: 0.28 }, fingers: ['forward', 'up'], palm: 'up' }, head: { nod: 6 }, hold: 0.16 },],},PLEASE: {@@ -72,35 +72,35 @@ export const SIGNS = Object.freeze({SORRY: {gloss: 'A-hand circles over the heart.',phases: [- { t: 0.3, right: { shape: 'A', at: { anchor: 'sternum', out: 0.03, up: 0.02, forward: 0.14 }, fingers: 'up', palm: 'back' }, head: { nod: 5, tilt: 3 } },- { t: 0.26, right: { shape: 'A', at: { anchor: 'sternum', out: 0.1, up: -0.04, forward: 0.14 }, fingers: 'up', palm: 'back' }, head: { nod: 5, tilt: 3 } },- { t: 0.26, right: { shape: 'A', at: { anchor: 'sternum', out: 0.03, up: -0.09, forward: 0.14 }, fingers: 'up', palm: 'back' }, head: { nod: 5, tilt: 3 } },- { t: 0.26, right: { shape: 'A', at: { anchor: 'sternum', out: 0.03, up: 0.02, forward: 0.14 }, fingers: 'up', palm: 'back' }, head: { nod: 5, tilt: 3 }, hold: 0.12 },+ { face: 'concern', t: 0.3, right: { shape: 'A', at: { anchor: 'sternum', out: 0.03, up: 0.02, forward: 0.14 }, fingers: 'up', palm: 'back' }, head: { nod: 5, tilt: 3 } },+ { face: 'concern', t: 0.26, right: { shape: 'A', at: { anchor: 'sternum', out: 0.1, up: -0.04, forward: 0.14 }, fingers: 'up', palm: 'back' }, head: { nod: 5, tilt: 3 } },+ { face: 'concern', t: 0.26, right: { shape: 'A', at: { anchor: 'sternum', out: 0.03, up: -0.09, forward: 0.14 }, fingers: 'up', palm: 'back' }, head: { nod: 5, tilt: 3 } },+ { face: 'concern', t: 0.26, right: { shape: 'A', at: { anchor: 'sternum', out: 0.03, up: 0.02, forward: 0.14 }, fingers: 'up', palm: 'back' }, head: { nod: 5, tilt: 3 }, hold: 0.12 },],},YES: {gloss: 'S-hand nods at the wrist, like a head saying yes.',phases: [- { t: 0.28, right: { shape: 'S', at: NEUTRAL, fingers: 'up', palm: 'forward' }, head: { nod: 3 } },- { t: 0.18, right: { shape: 'S', at: NEUTRAL, fingers: ['forward', 'down'], palm: ['forward', 'down'] }, head: { nod: 7 } },- { t: 0.18, right: { shape: 'S', at: NEUTRAL, fingers: 'up', palm: 'forward' }, head: { nod: 2 } },- { t: 0.18, right: { shape: 'S', at: NEUTRAL, fingers: ['forward', 'down'], palm: ['forward', 'down'] }, head: { nod: 7 }, hold: 0.12 },+ { face: 'question', t: 0.28, right: { shape: 'S', at: NEUTRAL, fingers: 'up', palm: 'forward' }, head: { nod: 3 } },+ { face: 'question', t: 0.18, right: { shape: 'S', at: NEUTRAL, fingers: ['forward', 'down'], palm: ['forward', 'down'] }, head: { nod: 7 } },+ { face: 'question', t: 0.18, right: { shape: 'S', at: NEUTRAL, fingers: 'up', palm: 'forward' }, head: { nod: 2 } },+ { face: 'question', t: 0.18, right: { shape: 'S', at: NEUTRAL, fingers: ['forward', 'down'], palm: ['forward', 'down'] }, head: { nod: 7 }, hold: 0.12 },],},NO: {gloss: 'Index and middle finger snap shut against the thumb.',phases: [- { t: 0.28, right: { shape: 'U', at: { anchor: 'chin', out: 0.14, up: -0.1, forward: 0.24 }, fingers: ['forward', 'up'], palm: ['down', 'forward'] }, head: { turn: 4 } },- { t: 0.2, right: { shape: 'FLAT_O', at: { anchor: 'chin', out: 0.14, up: -0.1, forward: 0.24 }, fingers: ['forward', 'up'], palm: ['down', 'forward'] }, head: { turn: -4 }, hold: 0.16 },+ { face: 'negate', t: 0.28, right: { shape: 'U', at: { anchor: 'chin', out: 0.14, up: -0.1, forward: 0.24 }, fingers: ['forward', 'up'], palm: ['down', 'forward'] }, head: { turn: 4 } },+ { face: 'negate', t: 0.2, right: { shape: 'FLAT_O', at: { anchor: 'chin', out: 0.14, up: -0.1, forward: 0.24 }, fingers: ['forward', 'up'], palm: ['down', 'forward'] }, head: { turn: -4 }, hold: 0.16 },],},HAPPY: {gloss: 'Both flat hands brush up the chest in circles.',phases: [- { t: 0.3, both: { shape: 'FLAT', at: { anchor: 'sternum', out: 0.14, up: -0.13, forward: 0.16 }, fingers: ['up', 'in'], palm: 'back' }, head: { nod: -2 } },- { t: 0.24, both: { shape: 'FLAT', at: { anchor: 'sternum', out: 0.16, up: 0.01, forward: 0.19 }, fingers: ['up', 'in'], palm: ['back', 'down'] }, head: { nod: -4 } },- { t: 0.24, both: { shape: 'FLAT', at: { anchor: 'sternum', out: 0.14, up: -0.13, forward: 0.16 }, fingers: ['up', 'in'], palm: 'back' }, head: { nod: -2 } },- { t: 0.24, both: { shape: 'FLAT', at: { anchor: 'sternum', out: 0.16, up: 0.01, forward: 0.19 }, fingers: ['up', 'in'], palm: ['back', 'down'] }, head: { nod: -4 }, hold: 0.14 },+ { face: 'pleasant', t: 0.3, both: { shape: 'FLAT', at: { anchor: 'sternum', out: 0.14, up: -0.13, forward: 0.16 }, fingers: ['up', 'in'], palm: 'back' }, head: { nod: -2 } },+ { face: 'pleasant', t: 0.24, both: { shape: 'FLAT', at: { anchor: 'sternum', out: 0.16, up: 0.01, forward: 0.19 }, fingers: ['up', 'in'], palm: ['back', 'down'] }, head: { nod: -4 } },+ { face: 'pleasant', t: 0.24, both: { shape: 'FLAT', at: { anchor: 'sternum', out: 0.14, up: -0.13, forward: 0.16 }, fingers: ['up', 'in'], palm: 'back' }, head: { nod: -2 } },+ { face: 'pleasant', t: 0.24, both: { shape: 'FLAT', at: { anchor: 'sternum', out: 0.16, up: 0.01, forward: 0.19 }, fingers: ['up', 'in'], palm: ['back', 'down'] }, head: { nod: -4 }, hold: 0.14 },],},FALL: {@@ -141,28 +141,28 @@ export const SIGNS = Object.freeze({HELP: {gloss: 'A-hand rides the flat palm upward.',phases: [- { t: 0.32, left: BASE_PALM, right: { shape: 'A', touch: { part: 'wrist', on: 'palm' }, fingers: 'up', palm: 'in' } },- { t: 0.28, left: { ...BASE_PALM, at: { anchor: 'sternum', out: 0.06, up: 0.02, forward: 0.26 } }, right: { shape: 'A', touch: { part: 'wrist', on: 'palm' }, fingers: 'up', palm: 'in' }, hold: 0.16 },+ { face: 'intense', t: 0.32, left: BASE_PALM, right: { shape: 'A', touch: { part: 'wrist', on: 'palm' }, fingers: 'up', palm: 'in' } },+ { face: 'intense', t: 0.28, left: { ...BASE_PALM, at: { anchor: 'sternum', out: 0.06, up: 0.02, forward: 0.26 } }, right: { shape: 'A', touch: { part: 'wrist', on: 'palm' }, fingers: 'up', palm: 'in' }, hold: 0.16 },],},GOOD: {gloss: 'Flat hand comes down from the chin onto the other palm.',phases: [- { t: 0.3, right: { shape: 'FLAT', touch: { to: 'chin', part: 'fingertips', out: 0.02, forward: 0.02 }, fingers: ['up', 'in'], palm: 'back' }, left: BASE_PALM, head: { nod: 3 } },- { t: 0.3, right: { shape: 'FLAT', touch: { part: 'palm', on: 'palm' }, fingers: ['forward', 'in'], palm: 'up' }, left: BASE_PALM, head: { nod: 5 }, hold: 0.18 },+ { face: 'pleasant', t: 0.3, right: { shape: 'FLAT', touch: { to: 'chin', part: 'fingertips', out: 0.02, forward: 0.02 }, fingers: ['up', 'in'], palm: 'back' }, left: BASE_PALM, head: { nod: 3 } },+ { face: 'pleasant', t: 0.3, right: { shape: 'FLAT', touch: { part: 'palm', on: 'palm' }, fingers: ['forward', 'in'], palm: 'up' }, left: BASE_PALM, head: { nod: 5 }, hold: 0.18 },],},BAD: {gloss: 'Flat hand leaves the chin and turns palm-down.',phases: [- { t: 0.3, right: { shape: 'FLAT', touch: { to: 'chin', part: 'fingertips', out: 0.02, forward: 0.02 }, fingers: ['up', 'in'], palm: 'back' }, head: { nod: 2 } },- { t: 0.3, right: { shape: 'FLAT', at: { anchor: 'chin', out: 0.14, up: -0.2, forward: 0.24 }, fingers: ['forward', 'out'], palm: 'down' }, head: { nod: -3, turn: -5 }, hold: 0.16 },+ { face: 'negate', t: 0.3, right: { shape: 'FLAT', touch: { to: 'chin', part: 'fingertips', out: 0.02, forward: 0.02 }, fingers: ['up', 'in'], palm: 'back' }, head: { nod: 2 } },+ { face: 'negate', t: 0.3, right: { shape: 'FLAT', at: { anchor: 'chin', out: 0.14, up: -0.2, forward: 0.24 }, fingers: ['forward', 'out'], palm: 'down' }, head: { nod: -3, turn: -5 }, hold: 0.16 },],},LOVE: {gloss: 'Both arms cross over the heart.',phases: [- { t: 0.36, left: { shape: 'S', at: { anchor: 'sternum', out: -0.07, up: 0.02, forward: 0.15 }, fingers: ['up', 'in'], palm: 'back' }, right: { shape: 'S', at: { anchor: 'sternum', out: -0.07, up: -0.05, forward: 0.17 }, fingers: ['up', 'in'], palm: 'back' }, head: { nod: 4, tilt: 3 }, hold: 0.3 },+ { face: 'pleasant', t: 0.36, left: { shape: 'S', at: { anchor: 'sternum', out: -0.07, up: 0.02, forward: 0.15 }, fingers: ['up', 'in'], palm: 'back' }, right: { shape: 'S', at: { anchor: 'sternum', out: -0.07, up: -0.05, forward: 0.17 }, fingers: ['up', 'in'], palm: 'back' }, head: { nod: 4, tilt: 3 }, hold: 0.3 },],},LEARN: {@@ -196,8 +196,8 @@ export const SIGNS = Object.freeze({WANT: {gloss: 'Both claw hands draw in toward the body.',phases: [- { t: 0.32, both: { shape: 'CLAW', at: { anchor: 'sternum', out: 0.11, up: -0.04, forward: 0.32 }, fingers: 'forward', palm: 'up' } },- { t: 0.3, both: { shape: 'CLAW', at: { anchor: 'sternum', out: 0.11, up: -0.08, forward: 0.19 }, fingers: ['forward', 'up'], palm: 'up' }, head: { nod: 3 }, hold: 0.16 },+ { face: 'intense', t: 0.32, both: { shape: 'CLAW', at: { anchor: 'sternum', out: 0.11, up: -0.04, forward: 0.32 }, fingers: 'forward', palm: 'up' } },+ { face: 'intense', t: 0.3, both: { shape: 'CLAW', at: { anchor: 'sternum', out: 0.11, up: -0.08, forward: 0.19 }, fingers: ['forward', 'up'], palm: 'up' }, head: { nod: 3 }, hold: 0.16 },],},MORE: {@@ -212,8 +212,8 @@ export const SIGNS = Object.freeze({STOP: {gloss: 'Flat hand chops down onto the other palm.',phases: [- { t: 0.3, left: { ...BASE_PALM, at: { anchor: 'sternum', out: 0.04, up: -0.06, forward: 0.26 } }, right: { shape: 'FLAT', at: { anchor: 'sternum', out: 0.04, up: 0.09, forward: 0.26 }, fingers: ['forward', 'up'], palm: 'in' } },- { t: 0.2, left: { ...BASE_PALM, at: { anchor: 'sternum', out: 0.04, up: -0.06, forward: 0.26 } }, right: { shape: 'FLAT', touch: { part: 'edge', on: 'palm' }, fingers: 'forward', palm: 'in' }, head: { nod: 3 }, hold: 0.2 },+ { face: 'intense', t: 0.3, left: { ...BASE_PALM, at: { anchor: 'sternum', out: 0.04, up: -0.06, forward: 0.26 } }, right: { shape: 'FLAT', at: { anchor: 'sternum', out: 0.04, up: 0.09, forward: 0.26 }, fingers: ['forward', 'up'], palm: 'in' } },+ { face: 'intense', t: 0.2, left: { ...BASE_PALM, at: { anchor: 'sternum', out: 0.04, up: -0.06, forward: 0.26 } }, right: { shape: 'FLAT', touch: { part: 'edge', on: 'palm' }, fingers: 'forward', palm: 'in' }, head: { nod: 3 }, hold: 0.2 },],},WORK: {@@ -242,23 +242,23 @@ export const SIGNS = Object.freeze({NICE: {gloss: 'Flat hand slides cleanly across the other palm.',phases: [- { t: 0.32, left: { ...BASE_PALM, fingers: ['forward', 'out'] }, right: { shape: 'FLAT', touch: { part: 'palm', on: 'palm', out: -0.08 }, fingers: ['forward', 'out'], palm: 'down' } },- { t: 0.32, left: { ...BASE_PALM, fingers: ['forward', 'out'] }, right: { shape: 'FLAT', touch: { part: 'palm', on: 'palm', out: 0.15 }, fingers: ['forward', 'out'], palm: 'down' }, hold: 0.16 },+ { face: 'pleasant', t: 0.32, left: { ...BASE_PALM, fingers: ['forward', 'out'] }, right: { shape: 'FLAT', touch: { part: 'palm', on: 'palm', out: -0.08 }, fingers: ['forward', 'out'], palm: 'down' } },+ { face: 'pleasant', t: 0.32, left: { ...BASE_PALM, fingers: ['forward', 'out'] }, right: { shape: 'FLAT', touch: { part: 'palm', on: 'palm', out: 0.15 }, fingers: ['forward', 'out'], palm: 'down' }, hold: 0.16 },],},WELCOME: {gloss: 'Open palm sweeps in toward the body, inviting.',phases: [- { t: 0.32, right: { shape: 'FLAT', at: { anchor: 'sternum', out: 0.22, up: -0.04, forward: 0.3 }, fingers: ['forward', 'out'], palm: 'up' }, head: { turn: -4 } },- { t: 0.34, right: { shape: 'FLAT', at: { anchor: 'sternum', out: 0.02, up: -0.06, forward: 0.22 }, fingers: ['forward', 'in'], palm: 'up' }, head: { nod: 4 }, hold: 0.18 },+ { face: 'pleasant', t: 0.32, right: { shape: 'FLAT', at: { anchor: 'sternum', out: 0.22, up: -0.04, forward: 0.3 }, fingers: ['forward', 'out'], palm: 'up' }, head: { turn: -4 } },+ { face: 'pleasant', t: 0.34, right: { shape: 'FLAT', at: { anchor: 'sternum', out: 0.02, up: -0.06, forward: 0.22 }, fingers: ['forward', 'in'], palm: 'up' }, head: { nod: 4 }, hold: 0.18 },],},WHAT: {gloss: 'Both palms turn up and shake, with a questioning brow.',phases: [- { t: 0.3, both: { shape: '5', at: { anchor: 'sternum', out: 0.15, up: -0.08, forward: 0.26 }, fingers: ['forward', 'out'], palm: 'up' }, head: { tilt: 3, nod: -3 } },- { t: 0.16, both: { shape: '5', at: { anchor: 'sternum', out: 0.18, up: -0.06, forward: 0.26 }, fingers: ['forward', 'out'], palm: 'up' }, head: { tilt: 3, nod: -3 } },- { t: 0.16, both: { shape: '5', at: { anchor: 'sternum', out: 0.15, up: -0.08, forward: 0.26 }, fingers: ['forward', 'out'], palm: 'up' }, head: { tilt: 3, nod: -3 }, hold: 0.16 },+ { face: 'wh', t: 0.3, both: { shape: '5', at: { anchor: 'sternum', out: 0.15, up: -0.08, forward: 0.26 }, fingers: ['forward', 'out'], palm: 'up' }, head: { tilt: 3, nod: -3 } },+ { face: 'wh', t: 0.16, both: { shape: '5', at: { anchor: 'sternum', out: 0.18, up: -0.06, forward: 0.26 }, fingers: ['forward', 'out'], palm: 'up' }, head: { tilt: 3, nod: -3 } },+ { face: 'wh', t: 0.16, both: { shape: '5', at: { anchor: 'sternum', out: 0.15, up: -0.08, forward: 0.26 }, fingers: ['forward', 'out'], palm: 'up' }, head: { tilt: 3, nod: -3 }, hold: 0.16 },],},FINISH: {diff --git a/src/sign-language-page.js b/src/sign-language-page.jsindex 0f78203ad..76959bc5f 100644--- a/src/sign-language-page.js+++ b/src/sign-language-page.js@@ -9,13 +9,26 @@// (src/sign-speech.js) drives it exactly like a text-to-speech engine.import { PoseStage } from './avatar-pose.js';-import { SignSpeaker } from './sign-speech.js';+import { CHAT_TIMING, SignSpeaker } from './sign-speech.js';import { normalizeWord } from './fingerspelling.js';-import { SIGNS, signGloss } from './sign-dictionary.js';+import { SIGNS, signGloss, signLookup } from './sign-dictionary.js';import { log } from './shared/log.js';+// The reference rig: light enough to animate smoothly everywhere, including on+// software renderers. It carries no face blendshapes, so the non-manual markers+// a signed question needs (raised brows, furrowed brows) are compiled into the+// clip but have nothing to drive here — they land on any avatar that ships ARKit+// shapes, which most generated avatars do. See docs/sign-language.md.const HERO_AVATAR = '/avatars/cz.glb';+// Signing speed. Learners and many Deaf viewers want it slower, and signing is+// content, so it cannot simply be reduced away like decorative motion.+const SPEEDS = [+ { label: '0.5×', rate: 0.5 },+ { label: '0.75×', rate: 0.75 },+ { label: '1×', rate: 1 },+];+// Phrases the hero cycles through so a first-time visitor immediately sees the// avatar signing real content, not a static pose. Each mixes lexical signs with// fingerspelling, which is what the feature actually does.@@ -23,6 +36,13 @@ const DEMO_PHRASES = ['HELLO', 'HAPPY TO MEET YOU', 'WELCOME TO THREE WS', 'THANconst $ = (sel, root = document) => root.querySelector(sel);+/** Stretch every duration in the chat timing so the whole utterance slows. */+function scaleTiming(rate) {+ const out = {};+ for (const [key, value] of Object.entries(CHAT_TIMING)) out[key] = value / rate;+ return out;+}+async function boot() {const stageHost = $('#sl-stage');if (!stageHost) return;@@ -38,6 +58,49 @@ async function boot() {if (status) status.textContent = msg || '';};+ // Speed and dominant hand are baked into the compiled clips, so changing+ // either rebuilds the speaker (cheap: the vocabulary is compiled lazily and+ // cached per setting).+ let rate = 1;+ let dominant = 'Right';+ /** The last thing signed, so a settings change can show itself immediately. */+ let lastPhrase = null;+ const rebuildSpeaker = () => {+ if (!stage.anim) return;+ speaker?.cancel();+ speaker = new SignSpeaker({+ manager: stage.anim,+ dominant,+ signs: signLookup({ dominant, rate }),+ timing: rate === 1 ? null : scaleTiming(rate),+ });+ };+ const replay = async () => {+ if (!speaker || !lastPhrase) return;+ try {+ const result = await speaker.speak(lastPhrase);+ if (!result.superseded) setStatus(describeResult(result));+ } catch {+ /* a superseded replay is not an error worth surfacing */+ }+ };+ const applySetting = (fn) => {+ fn();+ rebuildSpeaker();+ replay();+ };+ const setRate = (value) => applySetting(() => { rate = value; });+ const setDominant = (value) => applySetting(() => { dominant = value; });++ // Tell the visitor which words were SIGNED and which were spelled — the+ // distinction is the whole point of having a dictionary.+ const describeResult = ({ signed, spelled }) => {+ const parts = [];+ if (signed?.length) parts.push(`signed ${signed.map((w) => w.toLowerCase()).join(', ')}`);+ if (spelled?.length) parts.push(`spelled ${spelled.map((w) => w.toLowerCase()).join(', ')}`);+ return parts.length ? parts.join(' · ') : 'Type anything and watch the avatar sign it.';+ };+try {const { supported } = await stage.mount();stage.start();@@ -45,7 +108,7 @@ async function boot() {setStatus('This avatar can’t sign, but the tools below still work.');return;}- speaker = new SignSpeaker({ manager: stage.anim });+ rebuildSpeaker();} catch (err) {log.warn('[sign-language] stage mount failed', err?.message);setStatus('Live preview unavailable — the spelling tools below still work.');@@ -75,15 +138,6 @@ async function boot() {const spellInput = $('#sl-spell-input');const spellBtn = $('#sl-spell-btn');- // Tell the visitor which words were SIGNED and which were spelled — the- // distinction is the whole point of having a dictionary.- const describeResult = ({ signed, spelled }) => {- const parts = [];- if (signed?.length) parts.push(`signed ${signed.map((w) => w.toLowerCase()).join(', ')}`);- if (spelled?.length) parts.push(`spelled ${spelled.map((w) => w.toLowerCase()).join(', ')}`);- return parts.length ? parts.join(' · ') : 'Type anything and watch the avatar sign it.';- };-const spellIt = async () => {if (!speaker) return;const raw = spellInput.value.trim();@@ -94,6 +148,7 @@ async function boot() {}stopHero();heroActive = false;+ lastPhrase = raw;setStatus(`Signing: “${norm.toLowerCase()}”`);try {const result = await speaker.speak(raw);@@ -117,6 +172,44 @@ async function boot() {});});+ // ── Signing speed and dominant hand ───────────────────────────────────────+ const speedHost = $('#sl-speed');+ if (speedHost) {+ SPEEDS.forEach(({ label, rate }) => {+ const btn = document.createElement('button');+ btn.type = 'button';+ btn.className = 'sl-opt';+ btn.textContent = label;+ btn.setAttribute('aria-pressed', String(rate === 1));+ btn.addEventListener('click', () => {+ speedHost.querySelectorAll('.sl-opt').forEach((b) => b.setAttribute('aria-pressed', 'false'));+ btn.setAttribute('aria-pressed', 'true');+ setRate(rate);+ });+ speedHost.appendChild(btn);+ });+ }++ const handHost = $('#sl-hand');+ if (handHost) {+ [+ { label: 'Right-handed', side: 'Right' },+ { label: 'Left-handed', side: 'Left' },+ ].forEach(({ label, side }) => {+ const btn = document.createElement('button');+ btn.type = 'button';+ btn.className = 'sl-opt';+ btn.textContent = label;+ btn.setAttribute('aria-pressed', String(side === 'Right'));+ btn.addEventListener('click', () => {+ handHost.querySelectorAll('.sl-opt').forEach((b) => b.setAttribute('aria-pressed', 'false'));+ btn.setAttribute('aria-pressed', 'true');+ setDominant(side);+ });+ handHost.appendChild(btn);+ });+ }+// ── Vocabulary: every word with a real sign, playable ─────────────────────const vocabHost = $('#sl-vocab-chips');if (vocabHost) {@@ -138,6 +231,7 @@ async function boot() {active?.setAttribute('aria-pressed', 'false');active = chip;chip.setAttribute('aria-pressed', 'true');+ lastPhrase = word;setStatus(gloss ? `${word.toLowerCase()} — ${gloss}` : `Signing “${word.toLowerCase()}”`);try {const result = await speaker.speak(word);diff --git a/src/sign-rig.js b/src/sign-rig.jsindex c56c6b091..1213c6e79 100644--- a/src/sign-rig.js+++ b/src/sign-rig.js@@ -569,6 +569,13 @@ export class Pose {constructor(from = null) {/** @type {Map<string, number[]>} */this.local = new Map(from ? from.local : []);+ /**+ * Blendshape weights, 0–1 by name. ASL carries grammar on the face, so a+ * pose is not complete without it: raised brows make a yes/no question,+ * furrowed brows a wh-question, and neither is optional decoration.+ * @type {Map<string, number>}+ */+ this.face = new Map(from ? from.face : []);this._worldQ = new Map();this._worldP = new Map();}@@ -654,6 +661,19 @@ export class Pose {return this.setWorldQuat(bone, orientQuat(axisLocal, rl, dirWorld, refWorld));}+ /** Set blendshape weights by name, merging with whatever is already set. */+ setFace(weights) {+ for (const [shape, value] of Object.entries(weights ?? {})) {+ this.face.set(shape, Math.max(0, Math.min(1, value)));+ }+ return this;+ }++ /** Weight of one blendshape under this pose (0 when unset). */+ getFace(shape) {+ return this.face.get(shape) ?? 0;+ }+/** Plain `{bone: [x,y,z,w]}` of every posed bone — the clip track payload. */locals() {return Object.fromEntries(this.local);diff --git a/tests/animation-retarget.test.js b/tests/animation-retarget.test.jsindex 4aaff7d47..fc9ad4511 100644--- a/tests/animation-retarget.test.js+++ b/tests/animation-retarget.test.js@@ -21,6 +21,7 @@ import {Skeleton,BufferGeometry,QuaternionKeyframeTrack,+ NumberKeyframeTrack,VectorKeyframeTrack,AnimationClip,Object3D,@@ -612,3 +613,66 @@ describe('world-delta correctness — limb retarget preserves world motion', ()expect(worldDirErr(actual, expected)).toBeGreaterThan(5);});});++describe('face (morph target) lanes', () => {+ /** A rig with two meshes that share some blendshapes and differ on others. */+ function faceRig() {+ const root = new Object3D();+ root.name = 'Armature';+ const hips = new Bone();+ hips.name = 'Hips';+ root.add(hips);+ const head = new Object3D();+ head.name = 'Wolf3D_Head';+ head.morphTargetDictionary = { browInnerUp: 0, mouthSmileLeft: 1 };+ head.morphTargetInfluences = [0, 0];+ const teeth = new Object3D();+ teeth.name = 'Wolf3D_Teeth';+ teeth.morphTargetDictionary = { mouthSmileLeft: 0 };+ teeth.morphTargetInfluences = [0];+ root.add(head, teeth);+ return root;+ }++ const faceClip = () =>+ new AnimationClip('sign', 1, [+ new QuaternionKeyframeTrack('Hips.quaternion', [0, 1], [0, 0, 0, 1, 0, 0, 0, 1]),+ new NumberKeyframeTrack('Face.morphTargetInfluences[browInnerUp]', [0, 1], [0, 0.8]),+ new NumberKeyframeTrack('Face.morphTargetInfluences[mouthSmileLeft]', [0, 1], [0, 0.5]),+ new NumberKeyframeTrack('Face.morphTargetInfluences[tongueOut]', [0, 1], [0, 1]),+ ]);++ it('re-points each face lane at every mesh that owns the shape', () => {+ const root = faceRig();+ const { clip, face } = retargetClipToObject(faceClip(), root);+ const names = clip.tracks.map((t) => t.name);+ // browInnerUp lives on one mesh, mouthSmileLeft on two, tongueOut on none.+ expect(names).toContain('Wolf3D_Head.morphTargetInfluences[browInnerUp]');+ expect(names).toContain('Wolf3D_Head.morphTargetInfluences[mouthSmileLeft]');+ expect(names).toContain('Wolf3D_Teeth.morphTargetInfluences[mouthSmileLeft]');+ expect(names.some((n) => n.includes('tongueOut'))).toBe(false);+ expect(face).toBe(3);+ });++ it('drops the whole face lane on a rig with no blendshapes, keeping the motion', () => {+ const root = new Object3D();+ const hips = new Bone();+ hips.name = 'Hips';+ root.add(hips);+ const { clip, coverage, face } = retargetClipToObject(faceClip(), root);+ expect(face).toBe(0);+ expect(clip.tracks.map((t) => t.name)).toEqual(['Hips.quaternion']);+ // Face lanes must not drag bone coverage down and fail the retarget.+ expect(coverage).toBe(1);+ });++ it('leaves a clip with no face lanes untouched', () => {+ const root = faceRig();+ const plain = new AnimationClip('walk', 1, [+ new QuaternionKeyframeTrack('Hips.quaternion', [0, 1], [0, 0, 0, 1, 0, 0, 0, 1]),+ ]);+ const { clip, face } = retargetClipToObject(plain, root);+ expect(face).toBe(0);+ expect(clip.tracks).toHaveLength(1);+ });+});diff --git a/tests/e2e/spatial-mcp-render.spec.js b/tests/e2e/spatial-mcp-render.spec.jsindex bdf5e6164..44265c5fa 100644--- a/tests/e2e/spatial-mcp-render.spec.js+++ b/tests/e2e/spatial-mcp-render.spec.js@@ -80,10 +80,14 @@ for (const urlForm of URL_FORMS) {// A viewer element proves the artifact was accepted. Only `loaded` proves// the GLB behind it exists and decoded.+ // 60s: the success path settles in ~3s locally, so this is headroom for a+ // cold CI box on a multi-megabyte GLB, not a wait we expect to use. Keeping+ // it tight matters because this is the assertion a dead asset trips, and a+ // failing test should say so quickly.await expect.poll(() => viewer.evaluate((el) => el.loaded === true), {message: `${stage.label}: GLB never finished loading`,- timeout: 120_000,+ timeout: 60_000,}).toBe(true);diff --git a/tests/fixtures/sign-poses.json b/tests/fixtures/sign-poses.jsonnew file mode 100644index 000000000..294ae750c--- /dev/null+++ b/tests/fixtures/sign-poses.json@@ -0,0 +1,5076 @@+{+ "signs": {+ "AGAIN": [+ {+ "leftWrist": [+ 0.0662,+ 1.246,+ 0.2246+ ],+ "leftElbow": [+ 0.2326,+ 1.2593,+ 0.0154+ ],+ "leftTips": [+ -0.0251,+ 1.1866,+ 0.3594+ ],+ "rightWrist": [+ -0.1556,+ 1.3305,+ 0.261+ ],+ "rightElbow": [+ -0.2817,+ 1.2733,+ 0.0319+ ],+ "rightTips": [+ -0.212,+ 1.4184,+ 0.3787+ ]+ },+ {+ "leftWrist": [+ 0.0607,+ 1.3474,+ 0.2539+ ],+ "leftElbow": [+ 0.2113,+ 1.265,+ 0.0485+ ],+ "leftTips": [+ -0.0537,+ 1.3404,+ 0.385+ ],+ "rightWrist": [+ -0.1993,+ 1.4575,+ 0.2568+ ],+ "rightElbow": [+ -0.284,+ 1.2858,+ 0.0699+ ],+ "rightTips": [+ -0.3061,+ 1.5532,+ 0.3088+ ]+ },+ {+ "leftWrist": [+ 0.061,+ 1.3466,+ 0.2543+ ],+ "leftElbow": [+ 0.2113,+ 1.2648,+ 0.0485+ ],+ "leftTips": [+ -0.0532,+ 1.3393,+ 0.3856+ ],+ "rightWrist": [+ -0.1019,+ 1.4573,+ 0.2521+ ],+ "rightElbow": [+ -0.2222,+ 1.2812,+ 0.0905+ ],+ "rightTips": [+ 0.0053,+ 1.3603,+ 0.3008+ ]+ },+ {+ "leftWrist": [+ 0.0596,+ 1.3212,+ 0.249+ ],+ "leftElbow": [+ 0.2166,+ 1.2627,+ 0.0403+ ],+ "leftTips": [+ -0.05,+ 1.2995,+ 0.3823+ ],+ "rightWrist": [+ -0.1153,+ 1.4366,+ 0.2642+ ],+ "rightElbow": [+ -0.2261,+ 1.2768,+ 0.0804+ ],+ "rightTips": [+ 0.0068,+ 1.3523,+ 0.3046+ ]+ }+ ],+ "BAD": [+ {+ "leftWrist": [+ 0.2591,+ 1.0381,+ 0.0287+ ],+ "leftElbow": [+ 0.2932,+ 1.2784,+ -0.0841+ ],+ "leftTips": [+ 0.2663,+ 0.9067,+ 0.132+ ],+ "rightWrist": [+ -0.1049,+ 1.345,+ 0.0808+ ],+ "rightElbow": [+ -0.2996,+ 1.2836,+ -0.0923+ ],+ "rightTips": [+ 0.0336,+ 1.4174,+ 0.1556+ ]+ },+ {+ "leftWrist": [+ 0.2591,+ 1.0379,+ 0.0276+ ],+ "leftElbow": [+ 0.2931,+ 1.2788,+ -0.084+ ],+ "leftTips": [+ 0.2663,+ 0.906,+ 0.1302+ ],+ "rightWrist": [+ -0.1345,+ 1.4564,+ 0.0265+ ],+ "rightElbow": [+ -0.3022,+ 1.2861,+ -0.0938+ ],+ "rightTips": [+ -0.0198,+ 1.5872,+ 0.0332+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0378,+ 0.0268+ ],+ "leftElbow": [+ 0.293,+ 1.279,+ -0.084+ ],+ "leftTips": [+ 0.2664,+ 0.9055,+ 0.129+ ],+ "rightWrist": [+ -0.1639,+ 1.4076,+ 0.254+ ],+ "rightElbow": [+ -0.266,+ 1.2721,+ 0.047+ ],+ "rightTips": [+ -0.2781,+ 1.4111,+ 0.3854+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0377,+ 0.0266+ ],+ "leftElbow": [+ 0.2929,+ 1.279,+ -0.0842+ ],+ "leftTips": [+ 0.2664,+ 0.9054,+ 0.1286+ ],+ "rightWrist": [+ -0.1772,+ 1.3902,+ 0.2609+ ],+ "rightElbow": [+ -0.2669,+ 1.2702,+ 0.0391+ ],+ "rightTips": [+ -0.2799,+ 1.3756,+ 0.4006+ ]+ }+ ],+ "FALL": [+ {+ "leftWrist": [+ 0.0662,+ 1.246,+ 0.2246+ ],+ "leftElbow": [+ 0.2326,+ 1.2593,+ 0.0154+ ],+ "leftTips": [+ -0.0251,+ 1.1866,+ 0.3594+ ],+ "rightWrist": [+ -0.0164,+ 1.3781,+ 0.3115+ ],+ "rightElbow": [+ -0.1714,+ 1.2949,+ 0.1098+ ],+ "rightTips": [+ 0.0437,+ 1.216,+ 0.2998+ ]+ },+ {+ "leftWrist": [+ 0.0607,+ 1.3474,+ 0.2539+ ],+ "leftElbow": [+ 0.2113,+ 1.265,+ 0.0485+ ],+ "leftTips": [+ -0.0537,+ 1.3404,+ 0.385+ ],+ "rightWrist": [+ -0.0064,+ 1.5349,+ 0.297+ ],+ "rightElbow": [+ -0.1342,+ 1.3443,+ 0.1591+ ],+ "rightTips": [+ 0.005,+ 1.3612,+ 0.3003+ ]+ },+ {+ "leftWrist": [+ 0.061,+ 1.3465,+ 0.2544+ ],+ "leftElbow": [+ 0.2113,+ 1.2648,+ 0.0485+ ],+ "leftTips": [+ -0.0531,+ 1.3392,+ 0.3856+ ],+ "rightWrist": [+ -0.0463,+ 1.3953,+ 0.2203+ ],+ "rightElbow": [+ -0.2043,+ 1.2645,+ 0.0483+ ],+ "rightTips": [+ -0.2068,+ 1.377,+ 0.2853+ ]+ },+ {+ "leftWrist": [+ 0.0597,+ 1.3214,+ 0.2488+ ],+ "leftElbow": [+ 0.2167,+ 1.2628,+ 0.0401+ ],+ "leftTips": [+ -0.0498,+ 1.2999,+ 0.3822+ ],+ "rightWrist": [+ -0.056,+ 1.3538,+ 0.2029+ ],+ "rightElbow": [+ -0.224,+ 1.2587,+ 0.0175+ ],+ "rightTips": [+ -0.1771,+ 1.3587,+ 0.3276+ ]+ }+ ],+ "FINISH": [+ {+ "leftWrist": [+ 0.0918,+ 1.3502,+ 0.2715+ ],+ "leftElbow": [+ 0.2343,+ 1.2706,+ 0.0594+ ],+ "leftTips": [+ 0.0468,+ 1.4876,+ 0.367+ ],+ "rightWrist": [+ -0.0911,+ 1.3502,+ 0.2718+ ],+ "rightElbow": [+ -0.2342,+ 1.2707,+ 0.06+ ],+ "rightTips": [+ -0.0457,+ 1.4876,+ 0.3671+ ]+ },+ {+ "leftWrist": [+ 0.1007,+ 1.4774,+ 0.2564+ ],+ "leftElbow": [+ 0.2169,+ 1.2896,+ 0.1053+ ],+ "leftTips": [+ 0.1123,+ 1.651,+ 0.2639+ ],+ "rightWrist": [+ -0.0993,+ 1.4775,+ 0.2569+ ],+ "rightElbow": [+ -0.2164,+ 1.2898,+ 0.1063+ ],+ "rightTips": [+ -0.1107,+ 1.6511,+ 0.2644+ ]+ },+ {+ "leftWrist": [+ 0.201,+ 1.3562,+ 0.274+ ],+ "leftElbow": [+ 0.2785,+ 1.2719,+ 0.0321+ ],+ "leftTips": [+ 0.3161,+ 1.3596,+ 0.4046+ ],+ "rightWrist": [+ -0.199,+ 1.3565,+ 0.2753+ ],+ "rightElbow": [+ -0.2783,+ 1.2723,+ 0.034+ ],+ "rightTips": [+ -0.3133,+ 1.36,+ 0.4067+ ]+ },+ {+ "leftWrist": [+ 0.2119,+ 1.3392,+ 0.2745+ ],+ "leftElbow": [+ 0.2785,+ 1.2703,+ 0.0246+ ],+ "leftTips": [+ 0.3178,+ 1.3239,+ 0.4117+ ],+ "rightWrist": [+ -0.2095,+ 1.3396,+ 0.2764+ ],+ "rightElbow": [+ -0.2783,+ 1.2708,+ 0.027+ ],+ "rightTips": [+ -0.3142,+ 1.3245,+ 0.4144+ ]+ }+ ],+ "FRIEND": [+ {+ "leftWrist": [+ 0.051,+ 1.2876,+ 0.2536+ ],+ "leftElbow": [+ 0.2179,+ 1.2647,+ 0.0456+ ],+ "leftTips": [+ -0.0244,+ 1.2918,+ 0.3002+ ],+ "rightWrist": [+ -0.103,+ 1.3529,+ 0.3022+ ],+ "rightElbow": [+ -0.2083,+ 1.2725,+ 0.0697+ ],+ "rightTips": [+ -0.0522,+ 1.3043,+ 0.3565+ ]+ },+ {+ "leftWrist": [+ 0.0508,+ 1.407,+ 0.2752+ ],+ "leftElbow": [+ 0.1924,+ 1.2798,+ 0.087+ ],+ "leftTips": [+ 0.0016,+ 1.4524,+ 0.3151+ ],+ "rightWrist": [+ -0.0492,+ 1.467,+ 0.2767+ ],+ "rightElbow": [+ -0.1804,+ 1.2971,+ 0.1168+ ],+ "rightTips": [+ -0.0098,+ 1.4204,+ 0.3253+ ]+ },+ {+ "leftWrist": [+ 0.0542,+ 1.4587,+ 0.2785+ ],+ "leftElbow": [+ 0.1828,+ 1.2936,+ 0.1116+ ],+ "leftTips": [+ -0.011,+ 1.4292,+ 0.3095+ ],+ "rightWrist": [+ -0.0515,+ 1.4151,+ 0.2796+ ],+ "rightElbow": [+ -0.19,+ 1.2822,+ 0.0932+ ],+ "rightTips": [+ -0.0006,+ 1.4654,+ 0.3107+ ]+ },+ {+ "leftWrist": [+ 0.0644,+ 1.4405,+ 0.2876+ ],+ "leftElbow": [+ 0.1879,+ 1.2891,+ 0.1047+ ],+ "leftTips": [+ 0.0224,+ 1.3947,+ 0.3357+ ],+ "rightWrist": [+ -0.0454,+ 1.3768,+ 0.2735+ ],+ "rightElbow": [+ -0.1982,+ 1.2751,+ 0.0787+ ],+ "rightTips": [+ 0.0111,+ 1.4131,+ 0.3143+ ]+ }+ ],+ "GOOD": [+ {+ "leftWrist": [+ 0.0662,+ 1.246,+ 0.2246+ ],+ "leftElbow": [+ 0.2326,+ 1.2593,+ 0.0154+ ],+ "leftTips": [+ -0.0252,+ 1.1867,+ 0.3594+ ],+ "rightWrist": [+ -0.1057,+ 1.3438,+ 0.0805+ ],+ "rightElbow": [+ -0.3006,+ 1.2843,+ -0.0931+ ],+ "rightTips": [+ 0.0327,+ 1.4162,+ 0.1553+ ]+ },+ {+ "leftWrist": [+ 0.0607,+ 1.3474,+ 0.2538+ ],+ "leftElbow": [+ 0.2113,+ 1.265,+ 0.0485+ ],+ "leftTips": [+ -0.0537,+ 1.3406,+ 0.385+ ],+ "rightWrist": [+ -0.1345,+ 1.4554,+ 0.0265+ ],+ "rightElbow": [+ -0.3036,+ 1.287,+ -0.0948+ ],+ "rightTips": [+ -0.0198,+ 1.5862,+ 0.0331+ ]+ },+ {+ "leftWrist": [+ 0.0609,+ 1.3466,+ 0.2543+ ],+ "leftElbow": [+ 0.2113,+ 1.2648,+ 0.0486+ ],+ "leftTips": [+ -0.0533,+ 1.3393,+ 0.3855+ ],+ "rightWrist": [+ -0.0507,+ 1.3467,+ 0.2547+ ],+ "rightElbow": [+ -0.2057,+ 1.2656,+ 0.0521+ ],+ "rightTips": [+ 0.0644,+ 1.3393,+ 0.3851+ ]+ },+ {+ "leftWrist": [+ 0.0596,+ 1.3212,+ 0.249+ ],+ "leftElbow": [+ 0.2166,+ 1.2627,+ 0.0403+ ],+ "leftTips": [+ -0.05,+ 1.2995,+ 0.3823+ ],+ "rightWrist": [+ -0.0497,+ 1.3211,+ 0.2494+ ],+ "rightElbow": [+ -0.2115,+ 1.2634,+ 0.0442+ ],+ "rightTips": [+ 0.0611,+ 1.2994,+ 0.3818+ ]+ }+ ],+ "HAPPY": [+ {+ "leftWrist": [+ 0.1434,+ 1.2891,+ 0.1748+ ],+ "leftElbow": [+ 0.28,+ 1.2683,+ -0.0544+ ],+ "leftTips": [+ 0.0239,+ 1.4122,+ 0.2037+ ],+ "rightWrist": [+ -0.1428,+ 1.2892,+ 0.1754+ ],+ "rightElbow": [+ -0.2803,+ 1.2685,+ -0.0533+ ],+ "rightTips": [+ -0.023,+ 1.4122,+ 0.2038+ ]+ },+ {+ "leftWrist": [+ 0.1578,+ 1.4272,+ 0.207+ ],+ "leftElbow": [+ 0.2681,+ 1.2671,+ 0.0231+ ],+ "leftTips": [+ 0.0422,+ 1.5575,+ 0.2085+ ],+ "rightWrist": [+ -0.1563,+ 1.4274,+ 0.208+ ],+ "rightElbow": [+ -0.268,+ 1.2674,+ 0.0248+ ],+ "rightTips": [+ -0.0405,+ 1.5575,+ 0.2087+ ]+ },+ {+ "leftWrist": [+ 0.1438,+ 1.3302,+ 0.1847+ ],+ "leftElbow": [+ 0.2764,+ 1.2658,+ -0.0387+ ],+ "leftTips": [+ 0.0278,+ 1.4599,+ 0.191+ ],+ "rightWrist": [+ -0.1421,+ 1.3304,+ 0.1859+ ],+ "rightElbow": [+ -0.2768,+ 1.2663,+ -0.0363+ ],+ "rightTips": [+ -0.0258,+ 1.4599,+ 0.1912+ ]+ },+ {+ "leftWrist": [+ 0.1645,+ 1.4253,+ 0.219+ ],+ "leftElbow": [+ 0.268,+ 1.2682,+ 0.0286+ ],+ "leftTips": [+ 0.0535,+ 1.5571,+ 0.2429+ ],+ "rightWrist": [+ -0.1618,+ 1.4256,+ 0.2208+ ],+ "rightElbow": [+ -0.2677,+ 1.2688,+ 0.0315+ ],+ "rightTips": [+ -0.0503,+ 1.5572,+ 0.2434+ ]+ }+ ],+ "HELLO": [+ {+ "leftWrist": [+ 0.2591,+ 1.0381,+ 0.0287+ ],+ "leftElbow": [+ 0.2932,+ 1.2784,+ -0.0841+ ],+ "leftTips": [+ 0.2663,+ 0.9067,+ 0.132+ ],+ "rightWrist": [+ -0.1472,+ 1.6151,+ 0.2405+ ],+ "rightElbow": [+ -0.1591,+ 1.356,+ 0.1745+ ],+ "rightTips": [+ -0.038,+ 1.7471,+ 0.2663+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0379,+ 0.0273+ ],+ "leftElbow": [+ 0.293,+ 1.2789,+ -0.084+ ],+ "leftTips": [+ 0.2664,+ 0.9058,+ 0.1297+ ],+ "rightWrist": [+ -0.1095,+ 1.6837,+ 0.0861+ ],+ "rightElbow": [+ -0.1289,+ 1.4497,+ 0.2145+ ],+ "rightTips": [+ 0.0177,+ 1.8021,+ 0.0762+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0378,+ 0.0267+ ],+ "leftElbow": [+ 0.2929,+ 1.2791,+ -0.0841+ ],+ "leftTips": [+ 0.2664,+ 0.9054,+ 0.1287+ ],+ "rightWrist": [+ -0.2091,+ 1.6551,+ 0.1626+ ],+ "rightElbow": [+ -0.3468,+ 1.4259,+ 0.1732+ ],+ "rightTips": [+ -0.3236,+ 1.7862,+ 0.1597+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0377,+ 0.0265+ ],+ "leftElbow": [+ 0.2929,+ 1.279,+ -0.0843+ ],+ "leftTips": [+ 0.2665,+ 0.9054,+ 0.1287+ ],+ "rightWrist": [+ -0.227,+ 1.6478,+ 0.1856+ ],+ "rightElbow": [+ -0.3417,+ 1.4067,+ 0.1675+ ],+ "rightTips": [+ -0.3412,+ 1.7762,+ 0.2128+ ]+ }+ ],+ "HELP": [+ {+ "leftWrist": [+ 0.0662,+ 1.246,+ 0.2246+ ],+ "leftElbow": [+ 0.2326,+ 1.2593,+ 0.0154+ ],+ "leftTips": [+ -0.0251,+ 1.1866,+ 0.3594+ ],+ "rightWrist": [+ -0.0439,+ 1.2491,+ 0.2791+ ],+ "rightElbow": [+ -0.1923,+ 1.2681,+ 0.0571+ ],+ "rightTips": [+ -0.0346,+ 1.2849,+ 0.337+ ]+ },+ {+ "leftWrist": [+ 0.0607,+ 1.3474,+ 0.2539+ ],+ "leftElbow": [+ 0.2113,+ 1.265,+ 0.0485+ ],+ "leftTips": [+ -0.0537,+ 1.3404,+ 0.385+ ],+ "rightWrist": [+ 0.005,+ 1.3612,+ 0.3003+ ],+ "rightElbow": [+ -0.157,+ 1.2904,+ 0.0993+ ],+ "rightTips": [+ 0.0083,+ 1.4233,+ 0.2992+ ]+ },+ {+ "leftWrist": [+ 0.0611,+ 1.4561,+ 0.2769+ ],+ "leftElbow": [+ 0.1903,+ 1.2918,+ 0.1097+ ],+ "leftTips": [+ -0.0531,+ 1.4488,+ 0.4081+ ],+ "rightWrist": [+ 0.0054,+ 1.4698,+ 0.3234+ ],+ "rightElbow": [+ -0.1383,+ 1.3292,+ 0.1467+ ],+ "rightTips": [+ 0.0088,+ 1.5319,+ 0.3225+ ]+ },+ {+ "leftWrist": [+ 0.0547,+ 1.4244,+ 0.2779+ ],+ "leftElbow": [+ 0.1965,+ 1.2852,+ 0.0986+ ],+ "leftTips": [+ -0.052,+ 1.4029,+ 0.4136+ ],+ "rightWrist": [+ -0.0014,+ 1.4337,+ 0.3279+ ],+ "rightElbow": [+ -0.147,+ 1.3169,+ 0.1361+ ],+ "rightTips": [+ 0.0041,+ 1.492,+ 0.3423+ ]+ }+ ],+ "KNOW": [+ {+ "leftWrist": [+ 0.2591,+ 1.0381,+ 0.0287+ ],+ "leftElbow": [+ 0.2932,+ 1.2784,+ -0.0841+ ],+ "leftTips": [+ 0.2663,+ 0.9067,+ 0.132+ ],+ "rightWrist": [+ -0.3172,+ 1.4974,+ 0.1415+ ],+ "rightElbow": [+ -0.4197,+ 1.3863,+ -0.0794+ ],+ "rightTips": [+ -0.224,+ 1.5703,+ 0.2451+ ]+ },+ {+ "leftWrist": [+ 0.2591,+ 1.038,+ 0.0281+ ],+ "leftElbow": [+ 0.2931,+ 1.2786,+ -0.084+ ],+ "leftTips": [+ 0.2663,+ 0.9063,+ 0.131+ ],+ "rightWrist": [+ -0.2618,+ 1.5821,+ 0.0173+ ],+ "rightElbow": [+ -0.4193,+ 1.4139,+ -0.1188+ ],+ "rightTips": [+ -0.1338,+ 1.6615,+ 0.0485+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0378,+ 0.0271+ ],+ "leftElbow": [+ 0.293,+ 1.279,+ -0.084+ ],+ "leftTips": [+ 0.2664,+ 0.9057,+ 0.1295+ ],+ "rightWrist": [+ -0.2072,+ 1.6006,+ -0.025+ ],+ "rightElbow": [+ -0.4041,+ 1.5029,+ -0.1777+ ],+ "rightTips": [+ -0.0698,+ 1.6664,+ -0.0168+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0378,+ 0.0267+ ],+ "leftElbow": [+ 0.2929,+ 1.2791,+ -0.0841+ ],+ "leftTips": [+ 0.2664,+ 0.9054,+ 0.1288+ ],+ "rightWrist": [+ -0.2434,+ 1.6011,+ 0.0177+ ],+ "rightElbow": [+ -0.4178,+ 1.4984,+ -0.1574+ ],+ "rightTips": [+ -0.1149,+ 1.6796,+ 0.0491+ ]+ }+ ],+ "LEARN": [+ {+ "leftWrist": [+ 0.0662,+ 1.246,+ 0.2246+ ],+ "leftElbow": [+ 0.2326,+ 1.2593,+ 0.0154+ ],+ "leftTips": [+ -0.0251,+ 1.1866,+ 0.3594+ ],+ "rightWrist": [+ -0.0418,+ 1.3269,+ 0.3476+ ],+ "rightElbow": [+ -0.1712,+ 1.2983,+ 0.1151+ ],+ "rightTips": [+ -0.051,+ 1.1942,+ 0.3085+ ]+ },+ {+ "leftWrist": [+ 0.0608,+ 1.347,+ 0.2541+ ],+ "leftElbow": [+ 0.2113,+ 1.2649,+ 0.0486+ ],+ "leftTips": [+ -0.0535,+ 1.34,+ 0.3852+ ],+ "rightWrist": [+ 0.0199,+ 1.452,+ 0.2958+ ],+ "rightElbow": [+ -0.1541,+ 1.3199,+ 0.1412+ ],+ "rightTips": [+ -0.0432,+ 1.3941,+ 0.2406+ ]+ },+ {+ "leftWrist": [+ 0.0611,+ 1.3465,+ 0.2544+ ],+ "leftElbow": [+ 0.2113,+ 1.2647,+ 0.0485+ ],+ "leftTips": [+ -0.0531,+ 1.3391,+ 0.3857+ ],+ "rightWrist": [+ -0.0571,+ 1.6148,+ 0.0541+ ],+ "rightElbow": [+ -0.0225,+ 1.3494,+ 0.0583+ ],+ "rightTips": [+ 0.0108,+ 1.6363,+ 0.0247+ ]+ },+ {+ "leftWrist": [+ 0.0597,+ 1.3215,+ 0.2488+ ],+ "leftElbow": [+ 0.2167,+ 1.2628,+ 0.04+ ],+ "leftTips": [+ -0.0498,+ 1.3,+ 0.3821+ ],+ "rightWrist": [+ -0.0588,+ 1.6129,+ 0.0421+ ],+ "rightElbow": [+ -0.016,+ 1.3487,+ 0.0389+ ],+ "rightTips": [+ -0.0032,+ 1.6574,+ -0.0017+ ]+ }+ ],+ "LOVE": [+ {+ "leftWrist": [+ -0.0462,+ 1.3265,+ 0.1946+ ],+ "leftElbow": [+ 0.149,+ 1.265,+ 0.0222+ ],+ "leftTips": [+ -0.1118,+ 1.3303,+ 0.2147+ ],+ "rightWrist": [+ 0.0262,+ 1.2712,+ 0.197+ ],+ "rightElbow": [+ -0.1694,+ 1.26,+ 0.0147+ ],+ "rightTips": [+ 0.0913,+ 1.2753,+ 0.2186+ ]+ },+ {+ "leftWrist": [+ -0.0683,+ 1.4275,+ 0.1765+ ],+ "leftElbow": [+ 0.1104,+ 1.2814,+ 0.041+ ],+ "leftTips": [+ -0.1166,+ 1.4635,+ 0.1801+ ],+ "rightWrist": [+ 0.0628,+ 1.3596,+ 0.1906+ ],+ "rightElbow": [+ -0.1352,+ 1.2709,+ 0.0339+ ],+ "rightTips": [+ 0.111,+ 1.3957,+ 0.1943+ ]+ },+ {+ "leftWrist": [+ -0.0693,+ 1.459,+ 0.1672+ ],+ "leftElbow": [+ 0.098,+ 1.2884,+ 0.0466+ ],+ "leftTips": [+ -0.112,+ 1.5042,+ 0.1646+ ],+ "rightWrist": [+ 0.0707,+ 1.3884,+ 0.1851+ ],+ "rightElbow": [+ -0.1239,+ 1.2757,+ 0.0399+ ],+ "rightTips": [+ 0.1133,+ 1.4336,+ 0.1823+ ]+ },+ {+ "leftWrist": [+ -0.0679,+ 1.4266,+ 0.178+ ],+ "leftElbow": [+ 0.1105,+ 1.2812,+ 0.0413+ ],+ "leftTips": [+ -0.1161,+ 1.4626,+ 0.1818+ ],+ "rightWrist": [+ 0.0632,+ 1.3586,+ 0.1914+ ],+ "rightElbow": [+ -0.1352,+ 1.2708,+ 0.0346+ ],+ "rightTips": [+ 0.1114,+ 1.3946,+ 0.1952+ ]+ }+ ],+ "ME": [+ {+ "leftWrist": [+ 0.2591,+ 1.0381,+ 0.0287+ ],+ "leftElbow": [+ 0.2932,+ 1.2784,+ -0.0841+ ],+ "leftTips": [+ 0.2663,+ 0.9067,+ 0.1321+ ],+ "rightWrist": [+ -0.115,+ 1.3321,+ 0.2178+ ],+ "rightElbow": [+ -0.23,+ 1.2563,+ -0.0117+ ],+ "rightTips": [+ -0.015,+ 1.3907,+ 0.2059+ ]+ },+ {+ "leftWrist": [+ 0.2591,+ 1.038,+ 0.0282+ ],+ "leftElbow": [+ 0.2931,+ 1.2786,+ -0.084+ ],+ "leftTips": [+ 0.2663,+ 0.9064,+ 0.1311+ ],+ "rightWrist": [+ -0.0653,+ 1.4026,+ 0.1751+ ],+ "rightElbow": [+ -0.2121,+ 1.2565,+ 0.0056+ ],+ "rightTips": [+ 0.02,+ 1.423,+ 0.1014+ ]+ },+ {+ "leftWrist": [+ 0.2591,+ 1.0379,+ 0.0277+ ],+ "leftElbow": [+ 0.2931,+ 1.2788,+ -0.084+ ],+ "leftTips": [+ 0.2663,+ 0.906,+ 0.1303+ ],+ "rightWrist": [+ -0.0496,+ 1.4196,+ 0.1555+ ],+ "rightElbow": [+ -0.206,+ 1.2571,+ 0.0114+ ],+ "rightTips": [+ 0.0272,+ 1.4214,+ 0.0687+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0378,+ 0.0267+ ],+ "leftElbow": [+ 0.2929,+ 1.2791,+ -0.084+ ],+ "leftTips": [+ 0.2664,+ 0.9054,+ 0.1288+ ],+ "rightWrist": [+ -0.1144,+ 1.3302,+ 0.2194+ ],+ "rightElbow": [+ -0.2301,+ 1.2566,+ -0.0105+ ],+ "rightTips": [+ -0.0144,+ 1.3888,+ 0.2078+ ]+ }+ ],+ "MEET": [+ {+ "leftWrist": [+ 0.1818,+ 1.342,+ 0.2913+ ],+ "leftElbow": [+ 0.2678,+ 1.2733,+ 0.0473+ ],+ "leftTips": [+ 0.1821,+ 1.4309,+ 0.3665+ ],+ "rightWrist": [+ -0.181,+ 1.3421,+ 0.2918+ ],+ "rightElbow": [+ -0.2677,+ 1.2734,+ 0.048+ ],+ "rightTips": [+ -0.1811,+ 1.431,+ 0.367+ ]+ },+ {+ "leftWrist": [+ 0.1708,+ 1.457,+ 0.2758+ ],+ "leftElbow": [+ 0.2647,+ 1.2891,+ 0.0898+ ],+ "leftTips": [+ 0.1716,+ 1.5727,+ 0.2704+ ],+ "rightWrist": [+ -0.1692,+ 1.4571,+ 0.2767+ ],+ "rightElbow": [+ -0.2643,+ 1.2893,+ 0.0911+ ],+ "rightTips": [+ -0.17,+ 1.5729,+ 0.2713+ ]+ },+ {+ "leftWrist": [+ 0.0411,+ 1.4562,+ 0.2769+ ],+ "leftElbow": [+ 0.1759,+ 1.2945,+ 0.1117+ ],+ "leftTips": [+ 0.042,+ 1.572,+ 0.2719+ ],+ "rightWrist": [+ -0.0389,+ 1.4562,+ 0.2772+ ],+ "rightElbow": [+ -0.1751,+ 1.2947,+ 0.1129+ ],+ "rightTips": [+ -0.0397,+ 1.572,+ 0.2722+ ]+ },+ {+ "leftWrist": [+ 0.0477,+ 1.4261,+ 0.2852+ ],+ "leftElbow": [+ 0.1831,+ 1.2872,+ 0.1008+ ],+ "leftTips": [+ 0.0453,+ 1.5395,+ 0.3015+ ],+ "rightWrist": [+ -0.0449,+ 1.4262,+ 0.2856+ ],+ "rightElbow": [+ -0.1822,+ 1.2875,+ 0.1024+ ],+ "rightTips": [+ -0.0422,+ 1.5396,+ 0.3019+ ]+ }+ ],+ "MORE": [+ {+ "leftWrist": [+ 0.1616,+ 1.3381,+ 0.2931+ ],+ "leftElbow": [+ 0.2426,+ 1.2681,+ 0.0478+ ],+ "leftTips": [+ 0.0904,+ 1.3452,+ 0.3688+ ],+ "rightWrist": [+ -0.1608,+ 1.3382,+ 0.2935+ ],+ "rightElbow": [+ -0.2425,+ 1.2682,+ 0.0484+ ],+ "rightTips": [+ -0.0894,+ 1.3452,+ 0.369+ ]+ },+ {+ "leftWrist": [+ 0.0604,+ 1.4362,+ 0.2768+ ],+ "leftElbow": [+ 0.1935,+ 1.2861,+ 0.0997+ ],+ "leftTips": [+ -0.0037,+ 1.4359,+ 0.3197+ ],+ "rightWrist": [+ -0.0824,+ 1.4365,+ 0.2767+ ],+ "rightElbow": [+ -0.2095,+ 1.2841,+ 0.0972+ ],+ "rightTips": [+ -0.0181,+ 1.4362,+ 0.3192+ ]+ },+ {+ "leftWrist": [+ 0.0814,+ 1.4353,+ 0.2778+ ],+ "leftElbow": [+ 0.2078,+ 1.284,+ 0.0968+ ],+ "leftTips": [+ 0.0175,+ 1.4349,+ 0.3207+ ],+ "rightWrist": [+ -0.093,+ 1.4359,+ 0.2776+ ],+ "rightElbow": [+ -0.2168,+ 1.2834,+ 0.0958+ ],+ "rightTips": [+ -0.0286,+ 1.4355,+ 0.32+ ]+ },+ {+ "leftWrist": [+ 0.0653,+ 1.412,+ 0.2848+ ],+ "leftElbow": [+ 0.1937,+ 1.281,+ 0.0899+ ],+ "leftTips": [+ -0.0021,+ 1.4133,+ 0.3342+ ],+ "rightWrist": [+ -0.0903,+ 1.4136,+ 0.2853+ ],+ "rightElbow": [+ -0.2112,+ 1.2793,+ 0.0878+ ],+ "rightTips": [+ -0.0225,+ 1.4155,+ 0.3342+ ]+ }+ ],+ "NAME": [+ {+ "leftWrist": [+ 0.0964,+ 1.3091,+ 0.2783+ ],+ "leftElbow": [+ 0.2177,+ 1.2643,+ 0.044+ ],+ "leftTips": [+ -0.0171,+ 1.299,+ 0.4088+ ],+ "rightWrist": [+ -0.1011,+ 1.3709,+ 0.3014+ ],+ "rightElbow": [+ -0.205,+ 1.2744,+ 0.0744+ ],+ "rightTips": [+ 0.0282,+ 1.3727,+ 0.4167+ ]+ },+ {+ "leftWrist": [+ 0.0509,+ 1.4168,+ 0.2657+ ],+ "leftElbow": [+ 0.192,+ 1.2787,+ 0.0849+ ],+ "leftTips": [+ -0.076,+ 1.4263,+ 0.3845+ ],+ "rightWrist": [+ -0.0489,+ 1.4489,+ 0.267+ ],+ "rightElbow": [+ -0.1846,+ 1.2876,+ 0.1021+ ],+ "rightTips": [+ 0.0823,+ 1.4527,+ 0.3814+ ]+ },+ {+ "leftWrist": [+ 0.0512,+ 1.4162,+ 0.2661+ ],+ "leftElbow": [+ 0.192,+ 1.2785,+ 0.0849+ ],+ "leftTips": [+ -0.0756,+ 1.4255,+ 0.3851+ ],+ "rightWrist": [+ -0.0486,+ 1.4484,+ 0.2677+ ],+ "rightElbow": [+ -0.1845,+ 1.2874,+ 0.1025+ ],+ "rightTips": [+ 0.0827,+ 1.4519,+ 0.3819+ ]+ },+ {+ "leftWrist": [+ 0.0621,+ 1.3909,+ 0.2732+ ],+ "leftElbow": [+ 0.1984,+ 1.2739,+ 0.0748+ ],+ "leftTips": [+ -0.0625,+ 1.3961,+ 0.3945+ ],+ "rightWrist": [+ -0.0625,+ 1.4178,+ 0.277+ ],+ "rightElbow": [+ -0.1928,+ 1.2797,+ 0.0883+ ],+ "rightTips": [+ 0.0693,+ 1.4207,+ 0.3905+ ]+ }+ ],+ "NICE": [+ {+ "leftWrist": [+ 0.0662,+ 1.246,+ 0.2246+ ],+ "leftElbow": [+ 0.2326,+ 1.2593,+ 0.0154+ ],+ "leftTips": [+ 0.151,+ 1.263,+ 0.3747+ ],+ "rightWrist": [+ 0.1481,+ 1.2296,+ 0.2136+ ],+ "rightElbow": [+ -0.0648,+ 1.3241,+ 0.0817+ ],+ "rightTips": [+ 0.0944,+ 1.1314,+ 0.3459+ ]+ },+ {+ "leftWrist": [+ 0.0607,+ 1.3474,+ 0.2539+ ],+ "leftElbow": [+ 0.2113,+ 1.265,+ 0.0485+ ],+ "leftTips": [+ 0.1919,+ 1.3405,+ 0.3681+ ],+ "rightWrist": [+ 0.2163,+ 1.3837,+ 0.2467+ ],+ "rightElbow": [+ -0.0079,+ 1.4045,+ 0.102+ ],+ "rightTips": [+ 0.1019,+ 1.3875,+ 0.378+ ]+ },+ {+ "leftWrist": [+ 0.061,+ 1.3466,+ 0.2543+ ],+ "leftElbow": [+ 0.2113,+ 1.2648,+ 0.0485+ ],+ "leftTips": [+ 0.1923,+ 1.3393,+ 0.3684+ ],+ "rightWrist": [+ 0.0129,+ 1.3751,+ 0.2647+ ],+ "rightElbow": [+ -0.1565,+ 1.2807,+ 0.0803+ ],+ "rightTips": [+ -0.1012,+ 1.3786,+ 0.3961+ ]+ },+ {+ "leftWrist": [+ 0.0596,+ 1.3212,+ 0.249+ ],+ "leftElbow": [+ 0.2167,+ 1.2627,+ 0.0402+ ],+ "leftTips": [+ 0.1821,+ 1.3239,+ 0.3725+ ],+ "rightWrist": [+ -0.0026,+ 1.3505,+ 0.2703+ ],+ "rightElbow": [+ -0.1654,+ 1.2753,+ 0.0716+ ],+ "rightTips": [+ -0.1042,+ 1.3342,+ 0.4106+ ]+ }+ ],+ "NO": [+ {+ "leftWrist": [+ 0.2591,+ 1.0381,+ 0.0287+ ],+ "leftElbow": [+ 0.2932,+ 1.2784,+ -0.0841+ ],+ "leftTips": [+ 0.2663,+ 0.9067,+ 0.1321+ ],+ "rightWrist": [+ -0.1796,+ 1.394,+ 0.2996+ ],+ "rightElbow": [+ -0.2425,+ 1.2751,+ 0.0683+ ],+ "rightTips": [+ -0.1698,+ 1.4546,+ 0.4616+ ]+ },+ {+ "leftWrist": [+ 0.2591,+ 1.0379,+ 0.0277+ ],+ "leftElbow": [+ 0.2931,+ 1.2788,+ -0.084+ ],+ "leftTips": [+ 0.2663,+ 0.906,+ 0.1303+ ],+ "rightWrist": [+ -0.1193,+ 1.492,+ 0.2637+ ],+ "rightElbow": [+ -0.229,+ 1.2972,+ 0.1166+ ],+ "rightTips": [+ -0.1074,+ 1.6172,+ 0.3841+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0378,+ 0.0271+ ],+ "leftElbow": [+ 0.293,+ 1.279,+ -0.084+ ],+ "leftTips": [+ 0.2664,+ 0.9057,+ 0.1294+ ],+ "rightWrist": [+ -0.1584,+ 1.493,+ 0.2454+ ],+ "rightElbow": [+ -0.2594,+ 1.2924,+ 0.0998+ ],+ "rightTips": [+ -0.2009,+ 1.5379,+ 0.2913+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0378,+ 0.0266+ ],+ "leftElbow": [+ 0.2929,+ 1.2791,+ -0.0841+ ],+ "leftTips": [+ 0.2664,+ 0.9054,+ 0.1287+ ],+ "rightWrist": [+ -0.1744,+ 1.4763,+ 0.2582+ ],+ "rightElbow": [+ -0.2602,+ 1.2869,+ 0.0896+ ],+ "rightTips": [+ -0.2209,+ 1.5157,+ 0.3155+ ]+ }+ ],+ "PLEASE": [+ {+ "leftWrist": [+ 0.2591,+ 1.038,+ 0.0281+ ],+ "leftElbow": [+ 0.2931,+ 1.2786,+ -0.084+ ],+ "leftTips": [+ 0.2663,+ 0.9063,+ 0.131+ ],+ "rightWrist": [+ -0.0135,+ 1.4435,+ 0.1586+ ],+ "rightElbow": [+ -0.1654,+ 1.2636,+ 0.0313+ ],+ "rightTips": [+ 0.1096,+ 1.5638,+ 0.1842+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0378,+ 0.0268+ ],+ "leftElbow": [+ 0.293,+ 1.279,+ -0.084+ ],+ "leftTips": [+ 0.2664,+ 0.9055,+ 0.1289+ ],+ "rightWrist": [+ -0.0777,+ 1.4114,+ 0.1474+ ],+ "rightElbow": [+ -0.2329,+ 1.2571,+ -0.0066+ ],+ "rightTips": [+ 0.0371,+ 1.5422,+ 0.1549+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0377,+ 0.0265+ ],+ "leftElbow": [+ 0.2929,+ 1.279,+ -0.0844+ ],+ "leftTips": [+ 0.2665,+ 0.9055,+ 0.1287+ ],+ "rightWrist": [+ 0.032,+ 1.4103,+ 0.1467+ ],+ "rightElbow": [+ -0.1493,+ 1.2636,+ 0.0153+ ],+ "rightTips": [+ 0.1468,+ 1.541,+ 0.1535+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0378,+ 0.0271+ ],+ "leftElbow": [+ 0.2928,+ 1.2784,+ -0.0851+ ],+ "leftTips": [+ 0.2665,+ 0.9061,+ 0.13+ ],+ "rightWrist": [+ -0.019,+ 1.4701,+ 0.1459+ ],+ "rightElbow": [+ -0.1559,+ 1.2669,+ 0.0382+ ],+ "rightTips": [+ 0.0959,+ 1.6008,+ 0.152+ ]+ }+ ],+ "SEE": [+ {+ "leftWrist": [+ 0.2591,+ 1.0381,+ 0.0287+ ],+ "leftElbow": [+ 0.2932,+ 1.2784,+ -0.0841+ ],+ "leftTips": [+ 0.2663,+ 0.9067,+ 0.132+ ],+ "rightWrist": [+ -0.0205,+ 1.344,+ 0.1235+ ],+ "rightElbow": [+ -0.2156,+ 1.2554,+ -0.0369+ ],+ "rightTips": [+ 0.0458,+ 1.4834,+ 0.2021+ ]+ },+ {+ "leftWrist": [+ 0.2591,+ 1.0379,+ 0.0276+ ],+ "leftElbow": [+ 0.2931,+ 1.2788,+ -0.084+ ],+ "leftTips": [+ 0.2663,+ 0.906,+ 0.1302+ ],+ "rightWrist": [+ -0.0369,+ 1.4542,+ 0.074+ ],+ "rightElbow": [+ -0.1857,+ 1.2557,+ -0.0263+ ],+ "rightTips": [+ -0.0483,+ 1.6278,+ 0.0815+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0378,+ 0.0268+ ],+ "leftElbow": [+ 0.293,+ 1.279,+ -0.084+ ],+ "leftTips": [+ 0.2664,+ 0.9055,+ 0.129+ ],+ "rightWrist": [+ -0.1087,+ 1.6499,+ 0.2941+ ],+ "rightElbow": [+ -0.2091,+ 1.4145,+ 0.2156+ ],+ "rightTips": [+ -0.0966,+ 1.6527,+ 0.4678+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0377,+ 0.0266+ ],+ "leftElbow": [+ 0.2929,+ 1.279,+ -0.0842+ ],+ "leftTips": [+ 0.2664,+ 0.9054,+ 0.1286+ ],+ "rightWrist": [+ -0.1132,+ 1.616,+ 0.3177+ ],+ "rightElbow": [+ -0.2117,+ 1.3934,+ 0.2063+ ],+ "rightTips": [+ -0.0844,+ 1.6056,+ 0.4889+ ]+ }+ ],+ "SORRY": [+ {+ "leftWrist": [+ 0.2591,+ 1.038,+ 0.0281+ ],+ "leftElbow": [+ 0.2931,+ 1.2786,+ -0.084+ ],+ "leftTips": [+ 0.2663,+ 0.9063,+ 0.131+ ],+ "rightWrist": [+ -0.0244,+ 1.4335,+ 0.1676+ ],+ "rightElbow": [+ -0.1783,+ 1.262,+ 0.0314+ ],+ "rightTips": [+ -0.0133,+ 1.4926,+ 0.1723+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0378,+ 0.0271+ ],+ "leftElbow": [+ 0.293,+ 1.279,+ -0.084+ ],+ "leftTips": [+ 0.2664,+ 0.9056,+ 0.1293+ ],+ "rightWrist": [+ -0.0878,+ 1.4069,+ 0.1577+ ],+ "rightElbow": [+ -0.2382,+ 1.2578,+ -0.0059+ ],+ "rightTips": [+ -0.0895,+ 1.469,+ 0.1553+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0377,+ 0.0265+ ],+ "leftElbow": [+ 0.2929,+ 1.279,+ -0.0842+ ],+ "leftTips": [+ 0.2664,+ 0.9054,+ 0.1286+ ],+ "rightWrist": [+ -0.0263,+ 1.3667,+ 0.1569+ ],+ "rightElbow": [+ -0.2093,+ 1.2557,+ -0.0038+ ],+ "rightTips": [+ -0.0282,+ 1.4288,+ 0.1546+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0378,+ 0.0268+ ],+ "leftElbow": [+ 0.2928,+ 1.2786,+ -0.0848+ ],+ "leftTips": [+ 0.2665,+ 0.9058,+ 0.1294+ ],+ "rightWrist": [+ -0.0237,+ 1.4331,+ 0.1683+ ],+ "rightElbow": [+ -0.1782,+ 1.262,+ 0.0323+ ],+ "rightTips": [+ -0.0126,+ 1.4922,+ 0.1731+ ]+ }+ ],+ "STOP": [+ {+ "leftWrist": [+ 0.0495,+ 1.2647,+ 0.2469+ ],+ "leftElbow": [+ 0.2169,+ 1.2627,+ 0.0381+ ],+ "leftTips": [+ -0.0387,+ 1.2063,+ 0.3842+ ],+ "rightWrist": [+ -0.0643,+ 1.3878,+ 0.3107+ ],+ "rightElbow": [+ -0.1915,+ 1.2862,+ 0.0983+ ],+ "rightTips": [+ -0.0508,+ 1.4545,+ 0.47+ ]+ },+ {+ "leftWrist": [+ 0.0407,+ 1.377,+ 0.2745+ ],+ "leftElbow": [+ 0.1904,+ 1.2755,+ 0.0772+ ],+ "leftTips": [+ -0.0736,+ 1.3701,+ 0.4056+ ],+ "rightWrist": [+ -0.0392,+ 1.5271,+ 0.2778+ ],+ "rightElbow": [+ -0.1597,+ 1.3258,+ 0.1489+ ],+ "rightTips": [+ -0.0442,+ 1.6566,+ 0.394+ ]+ },+ {+ "leftWrist": [+ 0.0409,+ 1.3764,+ 0.2749+ ],+ "leftElbow": [+ 0.1904,+ 1.2753,+ 0.0773+ ],+ "leftTips": [+ -0.0733,+ 1.3692,+ 0.4061+ ],+ "rightWrist": [+ -0.018,+ 1.4433,+ 0.2377+ ],+ "rightElbow": [+ -0.1653,+ 1.2809,+ 0.0842+ ],+ "rightTips": [+ -0.0228,+ 1.4523,+ 0.4115+ ]+ },+ {+ "leftWrist": [+ 0.0403,+ 1.3479,+ 0.2706+ ],+ "leftElbow": [+ 0.1971,+ 1.2711,+ 0.0677+ ],+ "leftTips": [+ -0.0684,+ 1.3264,+ 0.4047+ ],+ "rightWrist": [+ -0.0248,+ 1.415,+ 0.2486+ ],+ "rightElbow": [+ -0.1736,+ 1.2756,+ 0.0752+ ],+ "rightTips": [+ -0.0256,+ 1.4127,+ 0.4226+ ]+ }+ ],+ "THANK": [+ {+ "leftWrist": [+ 0.2591,+ 1.0381,+ 0.0287+ ],+ "leftElbow": [+ 0.2932,+ 1.2784,+ -0.0841+ ],+ "leftTips": [+ 0.2663,+ 0.9067,+ 0.132+ ],+ "rightWrist": [+ -0.1057,+ 1.3423,+ 0.0709+ ],+ "rightElbow": [+ -0.3071,+ 1.2884,+ -0.097+ ],+ "rightTips": [+ 0.0339,+ 1.4137,+ 0.1445+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0379,+ 0.0273+ ],+ "leftElbow": [+ 0.293,+ 1.2789,+ -0.084+ ],+ "leftTips": [+ 0.2664,+ 0.9057,+ 0.1296+ ],+ "rightWrist": [+ -0.1345,+ 1.4557,+ 0.017+ ],+ "rightElbow": [+ -0.3126,+ 1.2929,+ -0.0989+ ],+ "rightTips": [+ -0.0198,+ 1.5865,+ 0.0238+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0378,+ 0.0267+ ],+ "leftElbow": [+ 0.2929,+ 1.2791,+ -0.084+ ],+ "leftTips": [+ 0.2664,+ 0.9054,+ 0.1288+ ],+ "rightWrist": [+ -0.0949,+ 1.3931,+ 0.2492+ ],+ "rightElbow": [+ -0.2225,+ 1.266,+ 0.0512+ ],+ "rightTips": [+ -0.0947,+ 1.5237,+ 0.3644+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0377,+ 0.0265+ ],+ "leftElbow": [+ 0.2929,+ 1.279,+ -0.0844+ ],+ "leftTips": [+ 0.2665,+ 0.9055,+ 0.1287+ ],+ "rightWrist": [+ -0.0738,+ 1.3707,+ 0.2755+ ],+ "rightElbow": [+ -0.2173,+ 1.2727,+ 0.072+ ],+ "rightTips": [+ -0.07,+ 1.4778,+ 0.4126+ ]+ }+ ],+ "THINK": [+ {+ "leftWrist": [+ 0.2591,+ 1.0381,+ 0.0287+ ],+ "leftElbow": [+ 0.2932,+ 1.2784,+ -0.0841+ ],+ "leftTips": [+ 0.2663,+ 0.9067,+ 0.132+ ],+ "rightWrist": [+ -0.2243,+ 1.5527,+ 0.1521+ ],+ "rightElbow": [+ -0.3722,+ 1.3442,+ 0.0726+ ],+ "rightTips": [+ -0.1755,+ 1.6347,+ 0.2189+ ]+ },+ {+ "leftWrist": [+ 0.2591,+ 1.038,+ 0.0281+ ],+ "leftElbow": [+ 0.2931,+ 1.2786,+ -0.084+ ],+ "leftTips": [+ 0.2663,+ 0.9063,+ 0.131+ ],+ "rightWrist": [+ -0.2057,+ 1.565,+ 0.0376+ ],+ "rightElbow": [+ -0.3972,+ 1.3846,+ 0.0865+ ],+ "rightTips": [+ -0.1334,+ 1.6534,+ 0.0484+ ]+ },+ {+ "leftWrist": [+ 0.2591,+ 1.0379,+ 0.0276+ ],+ "leftElbow": [+ 0.2931,+ 1.2788,+ -0.084+ ],+ "leftTips": [+ 0.2663,+ 0.906,+ 0.1302+ ],+ "rightWrist": [+ -0.2009,+ 1.5502,+ 0.0045+ ],+ "rightElbow": [+ -0.4051,+ 1.3989,+ 0.0884+ ],+ "rightTips": [+ -0.1197,+ 1.6327,+ -0.0015+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0378,+ 0.0267+ ],+ "leftElbow": [+ 0.2929,+ 1.2791,+ -0.0841+ ],+ "leftTips": [+ 0.2664,+ 0.9054,+ 0.1287+ ],+ "rightWrist": [+ -0.2238,+ 1.5514,+ 0.1561+ ],+ "rightElbow": [+ -0.3719,+ 1.3437,+ 0.0751+ ],+ "rightTips": [+ -0.1747,+ 1.6329,+ 0.2234+ ]+ }+ ],+ "THREE": [+ {+ "leftWrist": [+ 0.2591,+ 1.0381,+ 0.0287+ ],+ "leftElbow": [+ 0.2932,+ 1.2784,+ -0.0841+ ],+ "leftTips": [+ 0.2663,+ 0.9067,+ 0.132+ ],+ "rightWrist": [+ -0.2628,+ 1.4484,+ 0.2799+ ],+ "rightElbow": [+ -0.2857,+ 1.2863,+ 0.0682+ ],+ "rightTips": [+ -0.3001,+ 1.5895,+ 0.3732+ ]+ },+ {+ "leftWrist": [+ 0.2591,+ 1.038,+ 0.0281+ ],+ "leftElbow": [+ 0.2931,+ 1.2786,+ -0.084+ ],+ "leftTips": [+ 0.2663,+ 0.9063,+ 0.131+ ],+ "rightWrist": [+ -0.217,+ 1.5191,+ 0.2456+ ],+ "rightElbow": [+ -0.2896,+ 1.3048,+ 0.1025+ ],+ "rightTips": [+ -0.2204,+ 1.6917,+ 0.2666+ ]+ },+ {+ "leftWrist": [+ 0.2591,+ 1.0379,+ 0.0276+ ],+ "leftElbow": [+ 0.2931,+ 1.2788,+ -0.084+ ],+ "leftTips": [+ 0.2663,+ 0.906,+ 0.1302+ ],+ "rightWrist": [+ -0.1993,+ 1.5324,+ 0.2344+ ],+ "rightElbow": [+ -0.2914,+ 1.3122,+ 0.1134+ ],+ "rightTips": [+ -0.1877,+ 1.7061,+ 0.231+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0378,+ 0.0266+ ],+ "leftElbow": [+ 0.2929,+ 1.2791,+ -0.0841+ ],+ "leftTips": [+ 0.2664,+ 0.9054,+ 0.1287+ ],+ "rightWrist": [+ -0.262,+ 1.446,+ 0.2831+ ],+ "rightElbow": [+ -0.2855,+ 1.2859,+ 0.0699+ ],+ "rightTips": [+ -0.2989,+ 1.5863,+ 0.3778+ ]+ }+ ],+ "WANT": [+ {+ "leftWrist": [+ 0.1076,+ 1.2741,+ 0.2998+ ],+ "leftElbow": [+ 0.2372,+ 1.2733,+ 0.0657+ ],+ "leftTips": [+ 0.0625,+ 1.2297,+ 0.4232+ ],+ "rightWrist": [+ -0.1068,+ 1.2741,+ 0.3001+ ],+ "rightElbow": [+ -0.237,+ 1.2734,+ 0.0663+ ],+ "rightTips": [+ -0.0614,+ 1.2297,+ 0.4234+ ]+ },+ {+ "leftWrist": [+ 0.1109,+ 1.3957,+ 0.3348+ ],+ "leftElbow": [+ 0.2215,+ 1.2945,+ 0.113+ ],+ "leftTips": [+ 0.0565,+ 1.3933,+ 0.448+ ],+ "rightWrist": [+ -0.1091,+ 1.3958,+ 0.3353+ ],+ "rightElbow": [+ -0.221,+ 1.2948,+ 0.1142+ ],+ "rightTips": [+ -0.0541,+ 1.3934,+ 0.4483+ ]+ },+ {+ "leftWrist": [+ 0.1108,+ 1.3578,+ 0.2044+ ],+ "leftElbow": [+ 0.2517,+ 1.2601,+ -0.0012+ ],+ "leftTips": [+ 0.0564,+ 1.4358,+ 0.2864+ ],+ "rightWrist": [+ -0.1092,+ 1.3579,+ 0.2052+ ],+ "rightElbow": [+ -0.2517,+ 1.2605,+ 0.0007+ ],+ "rightTips": [+ -0.0541,+ 1.4359,+ 0.2869+ ]+ },+ {+ "leftWrist": [+ 0.1034,+ 1.3337,+ 0.2018+ ],+ "leftElbow": [+ 0.2542,+ 1.2602,+ -0.0067+ ],+ "leftTips": [+ 0.0398,+ 1.401,+ 0.2916+ ],+ "rightWrist": [+ -0.1015,+ 1.3339,+ 0.2027+ ],+ "rightElbow": [+ -0.2543,+ 1.2606,+ -0.0044+ ],+ "rightTips": [+ -0.037,+ 1.4011,+ 0.2919+ ]+ }+ ],+ "WELCOME": [+ {+ "leftWrist": [+ 0.2591,+ 1.0381,+ 0.0287+ ],+ "leftElbow": [+ 0.2932,+ 1.2784,+ -0.0841+ ],+ "leftTips": [+ 0.2663,+ 0.9067,+ 0.1319+ ],+ "rightWrist": [+ -0.1873,+ 1.2774,+ 0.2899+ ],+ "rightElbow": [+ -0.2804,+ 1.2746,+ 0.0389+ ],+ "rightTips": [+ -0.284,+ 1.2767,+ 0.4336+ ]+ },+ {+ "leftWrist": [+ 0.2591,+ 1.0379,+ 0.0275+ ],+ "leftElbow": [+ 0.2931,+ 1.2788,+ -0.084+ ],+ "leftTips": [+ 0.2663,+ 0.9059,+ 0.1301+ ],+ "rightWrist": [+ -0.2191,+ 1.3963,+ 0.3156+ ],+ "rightElbow": [+ -0.2824,+ 1.289,+ 0.0787+ ],+ "rightTips": [+ -0.3498,+ 1.3895,+ 0.4306+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0378,+ 0.0267+ ],+ "leftElbow": [+ 0.2929,+ 1.2791,+ -0.084+ ],+ "leftTips": [+ 0.2664,+ 0.9055,+ 0.1289+ ],+ "rightWrist": [+ -0.0191,+ 1.3771,+ 0.2354+ ],+ "rightElbow": [+ -0.1837,+ 1.2673,+ 0.0551+ ],+ "rightTips": [+ 0.0961,+ 1.3696,+ 0.3658+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0377,+ 0.0265+ ],+ "leftElbow": [+ 0.2929,+ 1.279,+ -0.0843+ ],+ "leftTips": [+ 0.2664,+ 0.9054,+ 0.1286+ ],+ "rightWrist": [+ -0.0176,+ 1.3501,+ 0.2323+ ],+ "rightElbow": [+ -0.1911,+ 1.2645,+ 0.0473+ ],+ "rightTips": [+ 0.0928,+ 1.3294,+ 0.3651+ ]+ }+ ],+ "WHAT": [+ {+ "leftWrist": [+ 0.1327,+ 1.2532,+ 0.2444+ ],+ "leftElbow": [+ 0.2638,+ 1.2643,+ 0.0113+ ],+ "leftTips": [+ 0.2215,+ 1.2603,+ 0.3931+ ],+ "rightWrist": [+ -0.1321,+ 1.2532,+ 0.2448+ ],+ "rightElbow": [+ -0.2638,+ 1.2644,+ 0.012+ ],+ "rightTips": [+ -0.2205,+ 1.2604,+ 0.3936+ ]+ },+ {+ "leftWrist": [+ 0.1555,+ 1.3599,+ 0.2742+ ],+ "leftElbow": [+ 0.2587,+ 1.2698,+ 0.0443+ ],+ "leftTips": [+ 0.2867,+ 1.3529,+ 0.3884+ ],+ "rightWrist": [+ -0.154,+ 1.3601,+ 0.275+ ],+ "rightElbow": [+ -0.2585,+ 1.2701,+ 0.0457+ ],+ "rightTips": [+ -0.2846,+ 1.3532,+ 0.3899+ ]+ },+ {+ "leftWrist": [+ 0.151,+ 1.3561,+ 0.2742+ ],+ "leftElbow": [+ 0.2565,+ 1.2691,+ 0.0441+ ],+ "leftTips": [+ 0.2824,+ 1.3488,+ 0.3883+ ],+ "rightWrist": [+ -0.149,+ 1.3563,+ 0.2753+ ],+ "rightElbow": [+ -0.2563,+ 1.2695,+ 0.046+ ],+ "rightTips": [+ -0.2795,+ 1.3492,+ 0.3904+ ]+ },+ {+ "leftWrist": [+ 0.144,+ 1.3301,+ 0.2696+ ],+ "leftElbow": [+ 0.2582,+ 1.2673,+ 0.0358+ ],+ "leftTips": [+ 0.2671,+ 1.3299,+ 0.3925+ ],+ "rightWrist": [+ -0.1416,+ 1.3303,+ 0.2709+ ],+ "rightElbow": [+ -0.258,+ 1.2678,+ 0.0381+ ],+ "rightTips": [+ -0.2635,+ 1.3304,+ 0.3949+ ]+ }+ ],+ "WORK": [+ {+ "leftWrist": [+ 0.0846,+ 1.2623,+ 0.2737+ ],+ "leftElbow": [+ 0.2094,+ 1.2621,+ 0.0369+ ],+ "leftTips": [+ 0.0606,+ 1.2416,+ 0.3347+ ],+ "rightWrist": [+ -0.0869,+ 1.3459,+ 0.2876+ ],+ "rightElbow": [+ -0.2007,+ 1.2682,+ 0.0581+ ],+ "rightTips": [+ -0.0568,+ 1.3276,+ 0.3466+ ]+ },+ {+ "leftWrist": [+ 0.0208,+ 1.3567,+ 0.2744+ ],+ "leftElbow": [+ 0.1797,+ 1.2753,+ 0.0749+ ],+ "leftTips": [+ -0.0242,+ 1.3528,+ 0.3171+ ],+ "rightWrist": [+ -0.0483,+ 1.4202,+ 0.268+ ],+ "rightElbow": [+ -0.1896,+ 1.2804,+ 0.0888+ ],+ "rightTips": [+ -0.003,+ 1.4162,+ 0.3105+ ]+ },+ {+ "leftWrist": [+ 0.0211,+ 1.356,+ 0.2748+ ],+ "leftElbow": [+ 0.1798,+ 1.2751,+ 0.075+ ],+ "leftTips": [+ -0.0238,+ 1.3521,+ 0.3175+ ],+ "rightWrist": [+ -0.0283,+ 1.4317,+ 0.2576+ ],+ "rightElbow": [+ -0.1747,+ 1.2823,+ 0.0906+ ],+ "rightTips": [+ 0.0169,+ 1.4276,+ 0.3+ ]+ },+ {+ "leftWrist": [+ 0.0368,+ 1.3338,+ 0.2778+ ],+ "leftElbow": [+ 0.1872,+ 1.2709,+ 0.0655+ ],+ "leftTips": [+ -0.0022,+ 1.3281,+ 0.3235+ ],+ "rightWrist": [+ -0.0437,+ 1.384,+ 0.2649+ ],+ "rightElbow": [+ -0.1882,+ 1.2719,+ 0.0694+ ],+ "rightTips": [+ -0.0037,+ 1.3786,+ 0.3097+ ]+ }+ ],+ "YALL": [+ {+ "leftWrist": [+ 0.2591,+ 1.0381,+ 0.0287+ ],+ "leftElbow": [+ 0.2932,+ 1.2784,+ -0.0841+ ],+ "leftTips": [+ 0.2663,+ 0.9067,+ 0.132+ ],+ "rightWrist": [+ 0.028,+ 1.2493,+ 0.2674+ ],+ "rightElbow": [+ -0.1508,+ 1.2788,+ 0.0704+ ],+ "rightTips": [+ 0.1165,+ 1.1951,+ 0.4061+ ]+ },+ {+ "leftWrist": [+ 0.2591,+ 1.0379,+ 0.0276+ ],+ "leftElbow": [+ 0.2931,+ 1.2788,+ -0.084+ ],+ "leftTips": [+ 0.2663,+ 0.906,+ 0.1302+ ],+ "rightWrist": [+ 0.0808,+ 1.3766,+ 0.2944+ ],+ "rightElbow": [+ -0.1031,+ 1.3161,+ 0.1096+ ],+ "rightTips": [+ 0.1958,+ 1.3696,+ 0.425+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0378,+ 0.0268+ ],+ "leftElbow": [+ 0.293,+ 1.279,+ -0.084+ ],+ "leftTips": [+ 0.2664,+ 0.9055,+ 0.129+ ],+ "rightWrist": [+ -0.2146,+ 1.382,+ 0.2837+ ],+ "rightElbow": [+ -0.2788,+ 1.2757,+ 0.0466+ ],+ "rightTips": [+ -0.314,+ 1.3717,+ 0.4263+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0377,+ 0.0265+ ],+ "leftElbow": [+ 0.2929,+ 1.279,+ -0.0843+ ],+ "leftTips": [+ 0.2665,+ 0.9054,+ 0.1287+ ],+ "rightWrist": [+ -0.2446,+ 1.3687,+ 0.2598+ ],+ "rightElbow": [+ -0.3022,+ 1.2774,+ 0.0149+ ],+ "rightTips": [+ -0.3678,+ 1.364,+ 0.3826+ ]+ }+ ],+ "YES": [+ {+ "leftWrist": [+ 0.2591,+ 1.0381,+ 0.0287+ ],+ "leftElbow": [+ 0.2932,+ 1.2784,+ -0.0841+ ],+ "leftTips": [+ 0.2663,+ 0.9067,+ 0.1321+ ],+ "rightWrist": [+ -0.2025,+ 1.3411,+ 0.2885+ ],+ "rightElbow": [+ -0.2531,+ 1.2668,+ 0.0364+ ],+ "rightTips": [+ -0.2444,+ 1.379,+ 0.3276+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0379,+ 0.0273+ ],+ "leftElbow": [+ 0.293,+ 1.2789,+ -0.084+ ],+ "leftTips": [+ 0.2664,+ 0.9058,+ 0.1296+ ],+ "rightWrist": [+ -0.1291,+ 1.4167,+ 0.2762+ ],+ "rightElbow": [+ -0.2423,+ 1.2779,+ 0.0773+ ],+ "rightTips": [+ -0.156,+ 1.3835,+ 0.3213+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0378,+ 0.0267+ ],+ "leftElbow": [+ 0.2929,+ 1.2791,+ -0.0841+ ],+ "leftTips": [+ 0.2664,+ 0.9054,+ 0.1287+ ],+ "rightWrist": [+ -0.1288,+ 1.4161,+ 0.2768+ ],+ "rightElbow": [+ -0.2422,+ 1.2778,+ 0.0777+ ],+ "rightTips": [+ -0.1822,+ 1.4306,+ 0.3053+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0377,+ 0.0265+ ],+ "leftElbow": [+ 0.2928,+ 1.2789,+ -0.0844+ ],+ "leftTips": [+ 0.2665,+ 0.9055,+ 0.1287+ ],+ "rightWrist": [+ -0.1442,+ 1.3988,+ 0.2827+ ],+ "rightElbow": [+ -0.2447,+ 1.2744,+ 0.0681+ ],+ "rightTips": [+ -0.1281,+ 1.3536,+ 0.3193+ ]+ }+ ],+ "YOU": [+ {+ "leftWrist": [+ 0.2591,+ 1.0381,+ 0.0287+ ],+ "leftElbow": [+ 0.2932,+ 1.2784,+ -0.0841+ ],+ "leftTips": [+ 0.2663,+ 0.9067,+ 0.1321+ ],+ "rightWrist": [+ -0.1071,+ 1.352,+ 0.3284+ ],+ "rightElbow": [+ -0.2093,+ 1.2821,+ 0.0911+ ],+ "rightTips": [+ -0.0873,+ 1.3158,+ 0.4373+ ]+ },+ {+ "leftWrist": [+ 0.2591,+ 1.038,+ 0.0282+ ],+ "leftElbow": [+ 0.2931,+ 1.2786,+ -0.084+ ],+ "leftTips": [+ 0.2663,+ 0.9064,+ 0.1311+ ],+ "rightWrist": [+ -0.0707,+ 1.4482,+ 0.3233+ ],+ "rightElbow": [+ -0.1898,+ 1.3063,+ 0.1301+ ],+ "rightTips": [+ -0.059,+ 1.4383,+ 0.4369+ ]+ },+ {+ "leftWrist": [+ 0.2591,+ 1.0379,+ 0.0277+ ],+ "leftElbow": [+ 0.2931,+ 1.2788,+ -0.084+ ],+ "leftTips": [+ 0.2663,+ 0.906,+ 0.1303+ ],+ "rightWrist": [+ -0.0592,+ 1.4763,+ 0.3167+ ],+ "rightElbow": [+ -0.1836,+ 1.3159,+ 0.1423+ ],+ "rightTips": [+ -0.0521,+ 1.4758,+ 0.4324+ ]+ },+ {+ "leftWrist": [+ 0.259,+ 1.0378,+ 0.0267+ ],+ "leftElbow": [+ 0.2929,+ 1.2791,+ -0.084+ ],+ "leftTips": [+ 0.2664,+ 0.9054,+ 0.1288+ ],+ "rightWrist": [+ -0.1062,+ 1.3491,+ 0.3302+ ],+ "rightElbow": [+ -0.2091,+ 1.2815,+ 0.0926+ ],+ "rightTips": [+ -0.0861,+ 1.3119,+ 0.4387+ ]+ }+ ]+ },+ "spelling": {+ "A": [+ {+ "leftWrist": [+ 0.2587,+ 1.0388,+ 0.0375+ ],+ "leftElbow": [+ 0.2959,+ 1.2794,+ -0.0739+ ],+ "leftTips": [+ 0.2627,+ 0.9074,+ 0.1408+ ],+ "rightWrist": [+ -0.2565,+ 1.5267,+ 0.1709+ ],+ "rightElbow": [+ -0.3333,+ 1.3031,+ 0.0454+ ],+ "rightTips": [+ -0.2748,+ 1.6927,+ 0.1804+ ]+ },+ {+ "leftWrist": [+ 0.2587,+ 1.0387,+ 0.0367+ ],+ "leftElbow": [+ 0.2958,+ 1.2796,+ -0.0738+ ],+ "leftTips": [+ 0.2628,+ 0.9068,+ 0.1395+ ],+ "rightWrist": [+ -0.2596,+ 1.5565,+ 0.2018+ ],+ "rightElbow": [+ -0.3406,+ 1.3285,+ 0.0874+ ],+ "rightTips": [+ -0.2578,+ 1.6185,+ 0.2059+ ]+ },+ {+ "leftWrist": [+ 0.2587,+ 1.0386,+ 0.036+ ],+ "leftElbow": [+ 0.2958,+ 1.2799,+ -0.0738+ ],+ "leftTips": [+ 0.2629,+ 0.9064,+ 0.1384+ ],+ "rightWrist": [+ -0.2594,+ 1.5559,+ 0.2032+ ],+ "rightElbow": [+ -0.3406,+ 1.3283,+ 0.0882+ ],+ "rightTips": [+ -0.2576,+ 1.6179,+ 0.2075+ ]+ },+ {+ "leftWrist": [+ 0.2587,+ 1.0384,+ 0.035+ ],+ "leftElbow": [+ 0.2955,+ 1.2798,+ -0.0746+ ],+ "leftTips": [+ 0.2632,+ 0.9061,+ 0.1372+ ],+ "rightWrist": [+ -0.2753,+ 1.5425,+ 0.2173+ ],+ "rightElbow": [+ -0.3349,+ 1.3197,+ 0.0816+ ],+ "rightTips": [+ -0.2848,+ 1.6009,+ 0.2294+ ]+ }+ ],+ "B": [+ {+ "leftWrist": [+ 0.2587,+ 1.0388,+ 0.0375+ ],+ "leftElbow": [+ 0.2959,+ 1.2794,+ -0.0739+ ],+ "leftTips": [+ 0.2627,+ 0.9074,+ 0.1408+ ],+ "rightWrist": [+ -0.2565,+ 1.5267,+ 0.1709+ ],+ "rightElbow": [+ -0.3333,+ 1.3031,+ 0.0454+ ],+ "rightTips": [+ -0.2748,+ 1.6927,+ 0.1804+ ]+ },+ {+ "leftWrist": [+ 0.2587,+ 1.0387,+ 0.0367+ ],+ "leftElbow": [+ 0.2958,+ 1.2796,+ -0.0738+ ],+ "leftTips": [+ 0.2628,+ 0.9068,+ 0.1395+ ],+ "rightWrist": [+ -0.2596,+ 1.5565,+ 0.2018+ ],+ "rightElbow": [+ -0.3406,+ 1.3285,+ 0.0874+ ],+ "rightTips": [+ -0.2481,+ 1.7302,+ 0.1984+ ]+ },+ {+ "leftWrist": [+ 0.2587,+ 1.0386,+ 0.036+ ],+ "leftElbow": [+ 0.2958,+ 1.2799,+ -0.0738+ ],+ "leftTips": [+ 0.2629,+ 0.9064,+ 0.1384+ ],+ "rightWrist": [+ -0.2594,+ 1.5559,+ 0.2032+ ],+ "rightElbow": [+ -0.3406,+ 1.3283,+ 0.0882+ ],+ "rightTips": [+ -0.2479,+ 1.7296,+ 0.2003+ ]+ },+ {+ "leftWrist": [+ 0.2587,+ 1.0384,+ 0.035+ ],+ "leftElbow": [+ 0.2955,+ 1.2798,+ -0.0746+ ],+ "leftTips": [+ 0.2632,+ 0.9061,+ 0.1372+ ],+ "rightWrist": [+ -0.2753,+ 1.5425,+ 0.2173+ ],+ "rightElbow": [+ -0.3349,+ 1.3197,+ 0.0816+ ],+ "rightTips": [+ -0.2808,+ 1.7153,+ 0.2366+ ]+ }+ ],+ "D": [+ {+ "leftWrist": [+ 0.2587,+ 1.0388,+ 0.0375+ ],+ "leftElbow": [+ 0.2959,+ 1.2794,+ -0.0739+ ],+ "leftTips": [+ 0.2627,+ 0.9074,+ 0.1408+ ],+ "rightWrist": [+ -0.2565,+ 1.5267,+ 0.1709+ ],+ "rightElbow": [+ -0.3333,+ 1.3031,+ 0.0454+ ],+ "rightTips": [+ -0.2748,+ 1.6927,+ 0.1804+ ]+ },+ {+ "leftWrist": [+ 0.2587,+ 1.0387,+ 0.0367+ ],+ "leftElbow": [+ 0.2958,+ 1.2796,+ -0.0738+ ],+ "leftTips": [+ 0.2628,+ 0.9068,+ 0.1395+ ],+ "rightWrist": [+ -0.2596,+ 1.5565,+ 0.2018+ ],+ "rightElbow": [+ -0.3406,+ 1.3285,+ 0.0874+ ],+ "rightTips": [+ -0.2738,+ 1.6764,+ 0.2004+ ]+ },+ {+ "leftWrist": [+ 0.2587,+ 1.0386,+ 0.036+ ],+ "leftElbow": [+ 0.2958,+ 1.2799,+ -0.0738+ ],+ "leftTips": [+ 0.2629,+ 0.9064,+ 0.1384+ ],+ "rightWrist": [+ -0.2594,+ 1.5559,+ 0.2032+ ],+ "rightElbow": [+ -0.3406,+ 1.3283,+ 0.0882+ ],+ "rightTips": [+ -0.2735,+ 1.6759,+ 0.2022+ ]+ },+ {+ "leftWrist": [+ 0.2587,+ 1.0384,+ 0.035+ ],+ "leftElbow": [+ 0.2955,+ 1.2798,+ -0.0746+ ],+ "leftTips": [+ 0.2632,+ 0.9061,+ 0.1372+ ],+ "rightWrist": [+ -0.2753,+ 1.5425,+ 0.2173+ ],+ "rightElbow": [+ -0.3349,+ 1.3197,+ 0.0816+ ],+ "rightTips": [+ -0.3029,+ 1.6618,+ 0.2332+ ]+ }+ ],+ "J": [+ {+ "leftWrist": [+ 0.2587,+ 1.0388,+ 0.0371+ ],+ "leftElbow": [+ 0.2959,+ 1.2795,+ -0.0738+ ],+ "leftTips": [+ 0.2627,+ 0.9071,+ 0.1402+ ],+ "rightWrist": [+ -0.259,+ 1.5499,+ 0.1877+ ],+ "rightElbow": [+ -0.3411,+ 1.3216,+ 0.0747+ ],+ "rightTips": [+ -0.2972,+ 1.6395,+ 0.2226+ ]+ },+ {+ "leftWrist": [+ 0.2587,+ 1.0386,+ 0.0361+ ],+ "leftElbow": [+ 0.2958,+ 1.2798,+ -0.0738+ ],+ "leftTips": [+ 0.2629,+ 0.9064,+ 0.1386+ ],+ "rightWrist": [+ -0.271,+ 1.5162,+ 0.2099+ ],+ "rightElbow": [+ -0.3353,+ 1.3075,+ 0.0552+ ],+ "rightTips": [+ -0.267,+ 1.5782,+ 0.2121+ ]+ },+ {+ "leftWrist": [+ 0.2587,+ 1.0385,+ 0.0355+ ],+ "leftElbow": [+ 0.2957,+ 1.2799,+ -0.074+ ],+ "leftTips": [+ 0.2629,+ 0.9062,+ 0.1378+ ],+ "rightWrist": [+ -0.227,+ 1.4265,+ 0.2112+ ],+ "rightElbow": [+ -0.2976,+ 1.2743,+ 0.0027+ ],+ "rightTips": [+ -0.1784,+ 1.4584,+ 0.2333+ ]+ },+ {+ "leftWrist": [+ 0.2587,+ 1.0385,+ 0.0352+ ],+ "leftElbow": [+ 0.2954,+ 1.2795,+ -0.0752+ ],+ "leftTips": [+ 0.2632,+ 0.9065,+ 0.1379+ ],+ "rightWrist": [+ -0.173,+ 1.4424,+ 0.2248+ ],+ "rightElbow": [+ -0.2753,+ 1.2751,+ 0.0427+ ],+ "rightTips": [+ -0.1684,+ 1.5009,+ 0.2389+ ]+ }+ ],+ "P": [+ {+ "leftWrist": [+ 0.2587,+ 1.0388,+ 0.0375+ ],+ "leftElbow": [+ 0.2959,+ 1.2794,+ -0.0739+ ],+ "leftTips": [+ 0.2627,+ 0.9074,+ 0.1408+ ],+ "rightWrist": [+ -0.2565,+ 1.5267,+ 0.1709+ ],+ "rightElbow": [+ -0.3333,+ 1.3031,+ 0.0454+ ],+ "rightTips": [+ -0.2748,+ 1.6927,+ 0.1804+ ]+ },+ {+ "leftWrist": [+ 0.2587,+ 1.0387,+ 0.0367+ ],+ "leftElbow": [+ 0.2958,+ 1.2796,+ -0.0738+ ],+ "leftTips": [+ 0.2628,+ 0.9068,+ 0.1395+ ],+ "rightWrist": [+ -0.2042,+ 1.3476,+ 0.1997+ ],+ "rightElbow": [+ -0.2898,+ 1.2696,+ -0.0416+ ],+ "rightTips": [+ -0.2104,+ 1.221,+ 0.2944+ ]+ },+ {+ "leftWrist": [+ 0.2587,+ 1.0386,+ 0.036+ ],+ "leftElbow": [+ 0.2958,+ 1.2799,+ -0.0738+ ],+ "leftTips": [+ 0.2629,+ 0.9064,+ 0.1384+ ],+ "rightWrist": [+ -0.204,+ 1.347,+ 0.2004+ ],+ "rightElbow": [+ -0.2899,+ 1.2698,+ -0.041+ ],+ "rightTips": [+ -0.2102,+ 1.2201,+ 0.2947+ ]+ },+ {+ "leftWrist": [+ 0.2587,+ 1.0384,+ 0.035+ ],+ "leftElbow": [+ 0.2955,+ 1.2798,+ -0.0746+ ],+ "leftTips": [+ 0.2632,+ 0.9061,+ 0.1372+ ],+ "rightWrist": [+ -0.2065,+ 1.3256,+ 0.2051+ ],+ "rightElbow": [+ -0.2896,+ 1.27,+ -0.0432+ ],+ "rightTips": [+ -0.2105,+ 1.1977,+ 0.2998+ ]+ }+ ],+ "Q": [+ {+ "leftWrist": [+ 0.2587,+ 1.0388,+ 0.0375+ ],+ "leftElbow": [+ 0.2959,+ 1.2794,+ -0.0739+ ],+ "leftTips": [+ 0.2627,+ 0.9074,+ 0.1408+ ],+ "rightWrist": [+ -0.2565,+ 1.5267,+ 0.1709+ ],+ "rightElbow": [+ -0.3333,+ 1.3031,+ 0.0454+ ],+ "rightTips": [+ -0.2748,+ 1.6927,+ 0.1804+ ]+ },+ {+ "leftWrist": [+ 0.2587,+ 1.0387,+ 0.0367+ ],+ "leftElbow": [+ 0.2958,+ 1.2796,+ -0.0738+ ],+ "leftTips": [+ 0.2628,+ 0.9068,+ 0.1395+ ],+ "rightWrist": [+ -0.1821,+ 1.3278,+ 0.1819+ ],+ "rightElbow": [+ -0.2877,+ 1.2702,+ -0.0572+ ],+ "rightTips": [+ -0.1751,+ 1.2456,+ 0.2633+ ]+ },+ {+ "leftWrist": [+ 0.2587,+ 1.0386,+ 0.036+ ],+ "leftElbow": [+ 0.2958,+ 1.2799,+ -0.0738+ ],+ "leftTips": [+ 0.2629,+ 0.9064,+ 0.1384+ ],+ "rightWrist": [+ -0.1819,+ 1.3273,+ 0.1825+ ],+ "rightElbow": [+ -0.2878,+ 1.2705,+ -0.0567+ ],+ "rightTips": [+ -0.1749,+ 1.2449,+ 0.2637+ ]+ },+ {+ "leftWrist": [+ 0.2587,+ 1.0384,+ 0.035+ ],+ "leftElbow": [+ 0.2955,+ 1.2798,+ -0.0746+ ],+ "leftTips": [+ 0.2632,+ 0.9061,+ 0.1372+ ],+ "rightWrist": [+ -0.1809,+ 1.3052,+ 0.185+ ],+ "rightElbow": [+ -0.2879,+ 1.2709,+ -0.0579+ ],+ "rightTips": [+ -0.1715,+ 1.2211,+ 0.2622+ ]+ }+ ],+ "Z": [+ {+ "leftWrist": [+ 0.2587,+ 1.0388,+ 0.0371+ ],+ "leftElbow": [+ 0.2959,+ 1.2795,+ -0.0738+ ],+ "leftTips": [+ 0.2627,+ 0.9071,+ 0.1402+ ],+ "rightWrist": [+ -0.2797,+ 1.5636,+ 0.1921+ ],+ "rightElbow": [+ -0.3613,+ 1.3377,+ 0.074+ ],+ "rightTips": [+ -0.2991,+ 1.6935,+ 0.2067+ ]+ },+ {+ "leftWrist": [+ 0.2587,+ 1.0386,+ 0.0361+ ],+ "leftElbow": [+ 0.2958,+ 1.2798,+ -0.0738+ ],+ "leftTips": [+ 0.2629,+ 0.9064,+ 0.1385+ ],+ "rightWrist": [+ -0.2211,+ 1.6167,+ 0.2114+ ],+ "rightElbow": [+ -0.3241,+ 1.3766,+ 0.1532+ ],+ "rightTips": [+ -0.213,+ 1.7323,+ 0.2128+ ]+ },+ {+ "leftWrist": [+ 0.2587,+ 1.0385,+ 0.0355+ ],+ "leftElbow": [+ 0.2957,+ 1.2799,+ -0.074+ ],+ "leftTips": [+ 0.2629,+ 0.9062,+ 0.1378+ ],+ "rightWrist": [+ -0.3078,+ 1.5045,+ 0.2004+ ],+ "rightElbow": [+ -0.344,+ 1.3037,+ 0.0272+ ],+ "rightTips": [+ -0.301,+ 1.6202,+ 0.2013+ ]+ },+ {+ "leftWrist": [+ 0.2587,+ 1.0385,+ 0.0352+ ],+ "leftElbow": [+ 0.2954,+ 1.2795,+ -0.0752+ ],+ "leftTips": [+ 0.2632,+ 0.9065,+ 0.1379+ ],+ "rightWrist": [+ -0.2077,+ 1.497,+ 0.2221+ ],+ "rightElbow": [+ -0.2821,+ 1.2883,+ 0.072+ ],+ "rightTips": [+ -0.2141,+ 1.6102,+ 0.239+ ]+ }+ ]+ }+}diff --git a/tests/sign-dictionary.test.js b/tests/sign-dictionary.test.jsindex 390056eca..3545340be 100644--- a/tests/sign-dictionary.test.js+++ b/tests/sign-dictionary.test.js@@ -68,11 +68,22 @@ describe('compiled clips', () => {expect(clip, word).toBeTruthy();expect(clip.duration, word).toBeGreaterThan(0.5);for (const track of clip.tracks) {- expect(track.type, `${word}:${track.name}`).toBe('quaternion');- expect(track.values.length).toBe(track.times.length * 4);for (let i = 1; i < track.times.length; i++) {expect(track.times[i], `${word}:${track.name}`).toBeGreaterThan(track.times[i - 1]);}+ if (track.type === 'number') {+ // A face lane: one weight per key, inside 0–1, and neutral at both+ // ends so a marker cannot stick to the face after the sign.+ expect(track.name, word).toMatch(/^Face\.morphTargetInfluences\[\w+\]$/);+ expect(track.values.length).toBe(track.times.length);+ for (const v of track.values) expect(v, `${word}:${track.name}`).toBeGreaterThanOrEqual(0);+ for (const v of track.values) expect(v, `${word}:${track.name}`).toBeLessThanOrEqual(1);+ expect(track.values[0], word).toBe(0);+ expect(track.values.at(-1), word).toBe(0);+ continue;+ }+ expect(track.type, `${word}:${track.name}`).toBe('quaternion');+ expect(track.values.length).toBe(track.times.length * 4);for (let i = 0; i < track.values.length; i += 4) {expect(Math.hypot(...track.values.slice(i, i + 4))).toBeCloseTo(1, 6);}@@ -84,10 +95,26 @@ describe('compiled clips', () => {for (const word of WORDS) {const names = buildSignClip(word).tracks.map((t) => t.name);expect(names.some((n) => n.startsWith('Hips')), word).toBe(false);- expect(names.every((n) => n.endsWith('.quaternion')), word).toBe(true);+ // Bone rotations and face weights only: no translation, no scale.+ expect(+ names.every((n) => n.endsWith('.quaternion') || n.includes('morphTargetInfluences')),+ word,+ ).toBe(true);}});+ it('carries non-manual markers on the signs whose grammar needs them', () => {+ const shapes = (word) =>+ buildSignClip(word)+ .tracks.filter((t) => t.type === 'number')+ .map((t) => t.name.match(/\[(\w+)\]/)[1]);+ // A wh-question furrows the brows; a plain pointing sign carries no marker.+ expect(shapes('WHAT')).toContain('browDownLeft');+ expect(shapes('SORRY')).toContain('browInnerUp');+ expect(shapes('HAPPY')).toContain('mouthSmileLeft');+ expect(shapes('YOU')).toEqual([]);+ });+it('is deterministic', () => {expect(buildSignClip('HAPPY')).toEqual(buildSignClip('HAPPY'));});diff --git a/tests/sign-goldens.test.js b/tests/sign-goldens.test.jsnew file mode 100644index 000000000..8daa12324--- /dev/null+++ b/tests/sign-goldens.test.js@@ -0,0 +1,67 @@+/**+ * Positional goldens for the signing lane.+ *+ * The other sign tests assert properties ("in front of the body", "the elbow+ * hangs", "the fingertips touch the palm"). This one asserts the actual shape:+ * where every sign puts both wrists, elbows, and fingertips at four moments+ * through its clip, against a recorded snapshot.+ *+ * It exists because the failure mode here is silent and wide. A change to the IK+ * pole, an anchor, or a shared handshape moves every sign that uses it, and no+ * property assertion notices a sign drifting five centimetres off. The tolerance+ * is deliberately loose enough to ignore floating-point noise and tight enough+ * that a real change has to be acknowledged:+ *+ * node scripts/build-sign-goldens.mjs # re-record, then review the diff+ */++import fs from 'node:fs';+import path from 'node:path';+import { fileURLToPath } from 'node:url';++import { describe, expect, it } from 'vitest';++import { buildGoldens } from '../scripts/build-sign-goldens.mjs';++const FIXTURE = path.resolve(+ path.dirname(fileURLToPath(import.meta.url)),+ 'fixtures/sign-poses.json',+);++// 8 mm. Below a fingertip's width, so a sign cannot drift visibly without this+// failing, and well above any floating-point wobble.+const TOLERANCE = 0.008;++const recorded = JSON.parse(fs.readFileSync(FIXTURE, 'utf8'));+const current = buildGoldens();++const distance = (a, b) => Math.hypot(a[0] - b[0], a[1] - b[1], a[2] - b[2]);++describe('recorded sign poses', () => {+ for (const group of ['signs', 'spelling']) {+ it(`${group}: covers the same clips as the snapshot`, () => {+ expect(Object.keys(current[group]).sort()).toEqual(Object.keys(recorded[group]).sort());+ });++ it(`${group}: every hand lands where it was recorded`, () => {+ const drifted = [];+ for (const [word, samples] of Object.entries(recorded[group])) {+ const now = current[group][word];+ if (!now) continue;+ samples.forEach((sample, i) => {+ for (const [point, value] of Object.entries(sample)) {+ const moved = distance(value, now[i][point]);+ if (moved > TOLERANCE) {+ drifted.push(`${word} sample ${i} ${point}: moved ${(moved * 100).toFixed(1)}cm`);+ }+ }+ });+ }+ expect(+ drifted,+ `${drifted.length} point(s) moved. If intended, re-record with:\n` ++ ` node scripts/build-sign-goldens.mjs\n\n ${drifted.slice(0, 12).join('\n ')}`,+ ).toEqual([]);+ });+ }+});