cozyclay 2.1.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +60 -0
- package/README.md +12 -30
- package/bin/agent/agent-routes.mjs +40 -113
- package/bin/agent/agent-runner.mjs +9 -10
- package/bin/agent/cliproxy-provider.mjs +135 -0
- package/bin/agent/credential-store.mjs +30 -7
- package/bin/agent/pi-tools.mjs +4 -1
- package/bin/agent/provider-keys.mjs +32 -0
- package/bin/agent/provider-login.mjs +110 -0
- package/bin/agent/provider-routes.mjs +99 -0
- package/bin/agent/providers.mjs +19 -97
- package/bin/agent/script-tool.mjs +17 -4
- package/bin/agent/studio-motion-reference.mjs +23 -0
- package/bin/agent/studio-prompt.mjs +1 -1
- package/bin/agent/studio-rebase-text.mjs +32 -0
- package/bin/agent/studio-rebase.mjs +26 -39
- package/bin/agent/studio-tools.mjs +9 -28
- package/bin/agent/tool-arguments.mjs +49 -0
- package/bin/agent/turn-frames.mjs +66 -0
- package/bin/codex-auth.mjs +9 -2
- package/bin/cozyclay.mjs +10 -116
- package/bin/live/cli.mjs +3 -3
- package/bin/mcp-runtime.mjs +2 -12
- package/bin/package-signature.mjs +0 -4
- package/dist/app/index.html +7 -6
- package/dist/assets/EXRLoader-CvVIvGVE.js +1 -0
- package/dist/assets/analytics-C9sUnndd.js +1 -0
- package/dist/assets/app-CCh--1Hc.js +5087 -0
- package/dist/assets/app-f-fkV5uP.css +1 -0
- package/dist/assets/compile-worker-CkxiD6lH.js +5 -0
- package/dist/assets/fflate.module-KbGj5-H6.js +5 -0
- package/dist/assets/{first-shot-handoff-msLI71g1.js → first-shot-handoff-CC4xe4HM.js} +1 -1
- package/dist/assets/{landing-ChUvB_zL.js → landing-DjHD8u7k.js} +1 -1
- package/dist/assets/scene-asset-sync-Hx_FzdOH.js +20 -0
- package/dist/assets/scene-asset-sync-_S8NQl5B.css +1 -0
- package/dist/assets/workflow-C4yKH1p4.js +179 -0
- package/dist/cozyclay-package.json +1 -1
- package/dist/index.html +3 -3
- package/dist/sw.js +3 -6
- package/dist/workflow/index.html +5 -4
- package/mcp/LIVE-PROTOCOL.md +7 -47
- package/mcp/README.md +16 -26
- package/mcp/live-hub.mjs +6 -10
- package/mcp/package.json +1 -3
- package/mcp/tool-handlers.mjs +4 -168
- package/package.json +3 -22
- package/src/App.jsx +150 -2624
- package/src/agent-progress.js +79 -0
- package/src/agent-turn-mark.js +30 -0
- package/src/analytics.js +1 -19
- package/src/app-context.js +5 -0
- package/src/app-stage.jsx +2 -34
- package/src/asset-pane.jsx +6 -5
- package/src/camera-block.js +21 -0
- package/src/camera-direction.js +120 -0
- package/src/character-kind.js +3 -9
- package/src/command-bus.js +8 -6
- package/src/commands/cast.js +5 -34
- package/src/commands/elements/character.js +1 -1
- package/src/commands/elements/motion.js +1 -6
- package/src/commands/elements/object.js +6 -2
- package/src/commands/elements/shot.js +4 -1
- package/src/commands/elements.js +38 -14
- package/src/commands/index.js +3 -1
- package/src/commands/kits.js +37 -0
- package/src/commands/motion-timing.js +57 -0
- package/src/commands/motion.js +9 -152
- package/src/commands/motion3-compile.js +65 -0
- package/src/commands/motion3.js +207 -0
- package/src/commands/objects.js +6 -4
- package/src/commands/shot.js +49 -11
- package/src/commands/stage.js +14 -1
- package/src/commands/view.js +4 -1
- package/src/document-mirrors.js +42 -0
- package/src/document-store.js +4 -0
- package/src/domains/cast.js +19 -194
- package/src/domains/motion/motion-range-pin-rules.js +1 -1
- package/src/domains/motion/take-source.js +51 -0
- package/src/domains/motion.js +60 -1838
- package/src/domains/scenes.js +12 -55
- package/src/domains/shots.js +2 -2
- package/src/domains/stage.js +4 -2
- package/src/draft-ghost.js +46 -0
- package/src/draft-ghost.jsx +129 -0
- package/src/dualview.jsx +4 -3
- package/src/effects/EffectsLayer.jsx +112 -0
- package/src/effects/effect-meshes.js +232 -0
- package/src/effects/effect-record.js +103 -0
- package/src/effects/emitter.js +59 -0
- package/src/effects/simulate.js +261 -0
- package/src/effects/state.js +59 -0
- package/src/execution-telemetry.js +2 -3
- package/src/first-success-guide.jsx +5 -5
- package/src/ghost-set.js +257 -0
- package/src/held-object-edit.jsx +113 -0
- package/src/held-object-pose.js +175 -0
- package/src/hierarchy-model.js +1 -1
- package/src/hierarchy-panel.jsx +1 -1
- package/src/imported-mesh.jsx +103 -0
- package/src/kits/held.js +84 -0
- package/src/kits/index.js +70 -0
- package/src/kits/smoking.js +57 -0
- package/src/light-blockers.js +93 -0
- package/src/motion/beat-board-model.js +84 -0
- package/src/motion/beat-board.css +124 -0
- package/src/motion/beat-board.jsx +59 -0
- package/src/motion/center-of-mass.js +66 -0
- package/src/motion/fix-collisions.js +850 -0
- package/src/motion/physics-review.js +118 -0
- package/src/{ardy → motion}/physics-support.js +1 -76
- package/src/motion/rig-snapshot.js +22 -0
- package/src/motion/take-segments.jsx +140 -0
- package/src/{ardy → motion}/timeline-coordinates.js +0 -21
- package/src/{ardy → motion}/timeline.css +1 -2
- package/src/{ardy → motion}/timeline.jsx +42 -413
- package/src/motion/waypoints.js +76 -0
- package/src/motion3/beats.js +83 -0
- package/src/motion3/body.js +158 -0
- package/src/motion3/bones.js +47 -0
- package/src/motion3/carried.js +47 -0
- package/src/motion3/compile-job.js +75 -0
- package/src/motion3/compile-worker.js +10 -0
- package/src/motion3/compiler/anchors.js +105 -0
- package/src/motion3/compiler/arm-orient.js +128 -0
- package/src/motion3/compiler/channels.js +125 -0
- package/src/motion3/compiler/compile.js +205 -0
- package/src/motion3/compiler/gait-rhythm.js +97 -0
- package/src/motion3/compiler/grip.js +171 -0
- package/src/motion3/compiler/head-steady.js +48 -0
- package/src/motion3/compiler/hold.js +134 -0
- package/src/motion3/compiler/idle.js +113 -0
- package/src/motion3/compiler/limbs.js +170 -0
- package/src/motion3/compiler/math.js +72 -0
- package/src/motion3/compiler/pose.js +162 -0
- package/src/motion3/compiler/quat.js +49 -0
- package/src/motion3/compiler/skeleton.js +74 -0
- package/src/motion3/compiler/validate-common.js +32 -0
- package/src/motion3/compiler/validate-goals.js +118 -0
- package/src/motion3/compiler/validate-objects.js +143 -0
- package/src/motion3/compiler/validate-parts.js +116 -0
- package/src/motion3/compiler/validate.js +122 -0
- package/src/motion3/compiler/vocab.js +73 -0
- package/src/motion3/compiler/walk-pelvis.js +275 -0
- package/src/motion3/compiler/walk.js +207 -0
- package/src/motion3/compiler/wrist-clamp.js +32 -0
- package/src/motion3/delta.js +47 -0
- package/src/motion3/describe.js +174 -0
- package/src/motion3/docs.js +27 -0
- package/src/motion3/edit-carry.js +21 -0
- package/src/motion3/fix/ease.js +16 -0
- package/src/motion3/fix/ground.js +37 -0
- package/src/motion3/fix/index.js +52 -0
- package/src/motion3/fix/push.js +71 -0
- package/src/motion3/fix/reach.js +46 -0
- package/src/motion3/fix/retime.js +79 -0
- package/src/motion3/fix/self.js +211 -0
- package/src/motion3/fix/slide.js +70 -0
- package/src/motion3/fix/turn.js +51 -0
- package/src/motion3/follow.js +39 -0
- package/src/motion3/free-motion.js +173 -0
- package/src/motion3/grip-choice.js +130 -0
- package/src/motion3/hold-plan.js +157 -0
- package/src/motion3/json-patch.js +77 -0
- package/src/motion3/key-aim.js +105 -0
- package/src/motion3/key-edit.js +82 -0
- package/src/motion3/lenient.js +127 -0
- package/src/motion3/object-keys.js +236 -0
- package/src/motion3/object-pose.js +182 -0
- package/src/motion3/object-tracks.js +12 -0
- package/src/motion3/pipeline.js +102 -0
- package/src/motion3/playback.js +51 -0
- package/src/motion3/probes.js +91 -0
- package/src/motion3/qa/body-checks.js +34 -0
- package/src/motion3/qa/check-names.js +14 -0
- package/src/motion3/qa/checks.js +121 -0
- package/src/motion3/qa/contact-checks.js +51 -0
- package/src/motion3/qa/explain.js +80 -0
- package/src/motion3/qa/fmt.js +5 -0
- package/src/motion3/qa/foot-checks.js +72 -0
- package/src/motion3/qa/geometry.js +77 -0
- package/src/motion3/qa/goals.js +191 -0
- package/src/motion3/qa/ground.js +60 -0
- package/src/motion3/qa/hints-contact.js +179 -0
- package/src/motion3/qa/hints-goal.js +160 -0
- package/src/motion3/qa/hints-knee.js +24 -0
- package/src/motion3/qa/hints-motion.js +209 -0
- package/src/motion3/qa/hints-object.js +91 -0
- package/src/motion3/qa/index.js +42 -0
- package/src/motion3/qa/key-checks.js +82 -0
- package/src/motion3/qa/near.js +96 -0
- package/src/motion3/qa/object-checks.js +135 -0
- package/src/motion3/qa/patch.js +161 -0
- package/src/motion3/qa/severity.js +38 -0
- package/src/motion3/qa/spec-checks.js +65 -0
- package/src/motion3/qa/style.js +218 -0
- package/src/motion3/qa/wrist-checks.js +69 -0
- package/src/motion3/qa/wrist-obs.js +60 -0
- package/src/motion3/refs.js +120 -0
- package/src/motion3/repair-tune.js +121 -0
- package/src/motion3/repair.js +83 -0
- package/src/motion3/report.js +67 -0
- package/src/motion3/rigs/index.js +14 -0
- package/src/motion3/rigs/x-bot-tpose-body.json +1 -0
- package/src/motion3/rigs/x-bot-tpose.json +1 -0
- package/src/motion3/rigs/y-bot-tpose-body.json +1 -0
- package/src/motion3/rigs/y-bot-tpose.json +1 -0
- package/src/motion3/scene.js +60 -0
- package/src/motion3/schema/brief.js +89 -0
- package/src/motion3/schema/fields.js +44 -0
- package/src/motion3/schema/spec-examples.js +46 -0
- package/src/motion3/schema/topics.js +111 -0
- package/src/motion3/schema/types.js +147 -0
- package/src/motion3/search.js +117 -0
- package/src/motion3/second-hand.js +112 -0
- package/src/motion3/skills/basic.js +82 -0
- package/src/motion3/skills/book.js +76 -0
- package/src/motion3/skills/car.js +145 -0
- package/src/motion3/skills/frames-auto.js +29 -0
- package/src/motion3/skills/index.js +83 -0
- package/src/motion3/skills/info.js +65 -0
- package/src/motion3/skills/smoke-kit.js +109 -0
- package/src/motion3/skills/smoke.js +160 -0
- package/src/motion3/spec-store.js +59 -0
- package/src/motion3/take-edit.js +155 -0
- package/src/motion3/take.js +63 -0
- package/src/motion3/timeline.js +127 -0
- package/src/motion3/views.js +121 -0
- package/src/motion3/walk-plan.js +119 -0
- package/src/object-catalog.jsx +7 -1
- package/src/object-colors.js +98 -0
- package/src/object-gizmo-parts.js +115 -0
- package/src/object-gizmo.jsx +37 -122
- package/src/object-glow.js +139 -0
- package/src/object-hidden.js +33 -0
- package/src/object-look.js +196 -0
- package/src/object-size.js +10 -0
- package/src/object-travel.js +71 -6
- package/src/panels/CameraPanel.jsx +7 -7
- package/src/panels/HdrEnvironmentControls.jsx +59 -0
- package/src/panels/LightPanel.jsx +25 -4
- package/src/panels/ObjectLookPanel.jsx +88 -0
- package/src/panels/PosePanel.jsx +2 -17
- package/src/panels/RigControlPanel.jsx +5 -53
- package/src/panels/SubjectBox.jsx +4 -1
- package/src/panels/details.css +14 -0
- package/src/posestudio.jsx +4 -27
- package/src/project-browser.jsx +3 -4
- package/src/project-resources.js +18 -31
- package/src/project.js +13 -104
- package/src/props.jsx +25 -280
- package/src/rail-dot-drag.js +23 -0
- package/src/render-passes.js +10 -0
- package/src/resource-status.jsx +1 -0
- package/src/result-modal.jsx +4 -19
- package/src/room.jsx +20 -12
- package/src/scene-assets.js +8 -6
- package/src/scene-light-place.js +72 -0
- package/src/scene-lights.jsx +148 -0
- package/src/scene-objects.js +31 -139
- package/src/scenes.js +15 -105
- package/src/semantic-edit.js +2 -5
- package/src/set-pieces.jsx +183 -0
- package/src/settings-menu.jsx +3 -11
- package/src/shell/BottomDock.jsx +9 -51
- package/src/shell/DetailsSlot.jsx +16 -200
- package/src/shell/GhostsMenuGroup.jsx +74 -0
- package/src/shell/LibrarySlot.jsx +1 -3
- package/src/shell/MenuBar.jsx +3 -3
- package/src/shell/PreferencesDialog.jsx +15 -264
- package/src/shell/PreferencesSlot.jsx +2 -8
- package/src/shell/TopBar.jsx +5 -84
- package/src/shell/ViewportToolbar.jsx +10 -70
- package/src/shell/agent-glass.css +19 -6
- package/src/shell/details-selection.js +42 -0
- package/src/shell/ghosts-menu.css +22 -0
- package/src/shell/glass-regions.css +29 -3
- package/src/shell/preferences.css +6 -1
- package/src/shot-authoring.js +4 -7
- package/src/soft-shadows.js +37 -0
- package/src/stage-attach-frames.js +12 -12
- package/src/stage-canvas-rigs.jsx +3 -3
- package/src/stage-capture.jsx +42 -8
- package/src/stage-characters.jsx +22 -216
- package/src/stage-editor-gizmos.jsx +6 -6
- package/src/stage-environment.js +93 -0
- package/src/stage-hdr-builtins.js +107 -0
- package/src/stage-hdr-image.js +116 -0
- package/src/stage-hdr-library.js +70 -0
- package/src/stage-hdr-map.js +94 -0
- package/src/stage-hdr.js +130 -0
- package/src/stage-lighting.js +149 -0
- package/src/stage-occlusion.js +210 -0
- package/src/stage-sky.jsx +159 -0
- package/src/stage-startup-defaults.js +5 -9
- package/src/studio-actions.js +12 -14
- package/src/studio-agent-commands.js +19 -16
- package/src/studio-agent-motion.js +9 -9
- package/src/studio-agent-protocol.js +41 -71
- package/src/studio-app-binding.js +25 -45
- package/src/studio-asset-list.js +17 -0
- package/src/studio-contact-sheet.js +37 -5
- package/src/studio-elements.js +27 -7
- package/src/studio-entity-bounds.js +18 -0
- package/src/studio-error-codes.js +8 -0
- package/src/studio-export-framing.js +152 -0
- package/src/studio-lighting-check.js +103 -0
- package/src/studio-motion-visual.js +150 -0
- package/src/studio-schema-errors.js +80 -0
- package/src/studio-support-gap.js +74 -0
- package/src/styles.css +1 -19
- package/src/timeline-defaults.js +5 -0
- package/src/timeline-extent.js +8 -20
- package/src/tutorial-walk.js +17 -0
- package/src/ui-scrub.js +1 -1
- package/src/use-shot-camera-tracks.js +12 -0
- package/src/view-ghosts.js +97 -0
- package/src/view-ghosts.jsx +49 -0
- package/src/workflow/AgentPanel.jsx +47 -166
- package/src/workflow/AgentProgressCard.jsx +107 -0
- package/src/workflow/AgentReplyText.jsx +37 -0
- package/src/workflow/AgentTurnSteps.jsx +84 -0
- package/src/workflow/LoginPanel.jsx +140 -0
- package/src/workflow/WorkflowBuilder.jsx +7 -23
- package/src/workflow/agent-client.js +54 -51
- package/src/workflow/agent-panel.css +71 -1
- package/src/workflow/agent-progress-card.css +167 -0
- package/src/workflow/agent-progress-view.js +47 -0
- package/src/workflow/agent-turn-steps.css +113 -0
- package/src/workflow/agent-turn.js +191 -0
- package/src/workflow/login-client.js +34 -0
- package/src/workflow/motion-input.js +18 -31
- package/src/workflow/node-schema.js +1 -1
- package/src/workflow/reply-markdown.js +69 -0
- package/src/workflow/scene-asset-sync.js +8 -8
- package/tools/agent-session-stats.mjs +61 -0
- package/tools/dev-full.mjs +5 -56
- package/tools/eslint-baseline.json +12 -13
- package/tools/knip-baseline.json +0 -179
- package/tools/loc-baseline.json +31 -81
- package/tools/motion3/extract-body.mjs +103 -0
- package/tools/motion3/extract-rig.mjs +85 -0
- package/tools/process-supervisor.mjs +0 -88
- package/tools/run-tests.mjs +8 -124
- package/bin/agent/motion-runtime.mjs +0 -76
- package/dist/ardy/cskel27-rest.json +0 -557
- package/dist/assets/analytics-C9pMpW7s.js +0 -1
- package/dist/assets/app-B_2XB9rw.css +0 -1
- package/dist/assets/app-DAuvKPP8.js +0 -4920
- package/dist/assets/config-Bx7pYsD9.js +0 -1
- package/dist/assets/config-DeoFTYzb.css +0 -1
- package/dist/assets/demo-CvKuBgy5.js +0 -1
- package/dist/assets/scene-asset-sync-DKkpjKBV.js +0 -19
- package/dist/assets/scene-asset-sync-DjJ_cJ2R.css +0 -1
- package/dist/assets/ticket-BPk2Ni95.js +0 -1
- package/dist/assets/workflow-jJRBR94Z.js +0 -179
- package/dist/demo/walk-then-stop.npz +0 -0
- package/mcp/ardy-prompts.mjs +0 -218
- package/src/ardy/auto-fix-panel.css +0 -108
- package/src/ardy/auto-physics.js +0 -1194
- package/src/ardy/client.js +0 -153
- package/src/ardy/convert.js +0 -313
- package/src/ardy/cskel27-neutral.js +0 -39
- package/src/ardy/cskel27.js +0 -77
- package/src/ardy/export.js +0 -165
- package/src/ardy/fix-collisions.js +0 -2257
- package/src/ardy/foot-lock.js +0 -230
- package/src/ardy/motion-calibration.js +0 -118
- package/src/ardy/motion-edit.js +0 -213
- package/src/ardy/motion-url.js +0 -55
- package/src/ardy/mp4-duration.js +0 -102
- package/src/ardy/npz.js +0 -595
- package/src/ardy/physics-panel.css +0 -21
- package/src/ardy/physics-panel.jsx +0 -89
- package/src/ardy/physics-refine.js +0 -111
- package/src/ardy/physics-review.js +0 -567
- package/src/ardy/physics-temporal.js +0 -54
- package/src/ardy/platform-fit-panel.css +0 -64
- package/src/ardy/platform-fit-panel.jsx +0 -41
- package/src/ardy/platform-fit.js +0 -326
- package/src/ardy/playback.js +0 -711
- package/src/ardy/pose-pin.js +0 -97
- package/src/ardy/prompt-clips.js +0 -30
- package/src/ardy/retime.js +0 -211
- package/src/ardy/root-drop.js +0 -369
- package/src/ardy/timeline-resize.js +0 -13
- package/src/ardy/to-cskel27.js +0 -225
- package/src/ardy/trim.js +0 -33
- package/src/ardy/waypoints.js +0 -369
- package/src/ardy-bridge-contract.js +0 -281
- package/src/domains/motion/motion-video-capture.js +0 -664
- package/src/i2v-motion-client.js +0 -77
- package/src/i2v-motion-studio.jsx +0 -180
- package/src/line-edit.js +0 -1348
- package/src/motion/generation.js +0 -105
- package/src/motion-readiness-ui.jsx +0 -67
- package/src/motion-readiness.js +0 -40
- package/src/motion-resources.js +0 -177
- package/src/motion-store.js +0 -65
- package/src/motion-trail.js +0 -601
- package/src/multimodel-ingest.js +0 -394
- package/src/panels/PromptBlocksPanel.jsx +0 -444
- package/src/panels/VideoCapturePanel.jsx +0 -181
- package/src/pose-extract/browser.js +0 -42
- package/src/pose-extract/detector.js +0 -100
- package/src/pose-extract/fit.js +0 -227
- package/src/pose-extract/image-frame.js +0 -51
- package/src/pose-extract/index.js +0 -58
- package/src/pose-extract/keyframes.js +0 -74
- package/src/pose-extract/landmarks.js +0 -162
- package/src/pose-extract/mirror.js +0 -153
- package/src/pose-extract/take.js +0 -131
- package/src/pose-extract/video-frames.js +0 -91
- package/src/take-recipe.js +0 -165
- package/src/trail-key-conflicts.js +0 -39
- package/src/trail-pick.js +0 -59
- package/src/use-i2v-capture-modal.js +0 -15
- package/tools/ardy/BRIDGE.md +0 -37
- package/tools/ardy/GVHMR-NPZ.md +0 -68
- package/tools/ardy/README.md +0 -124
- package/tools/ardy/__pycache__/cclay_gvhmr_worker.cpython-313.pyc +0 -0
- package/tools/ardy/artifacts.mjs +0 -34
- package/tools/ardy/bridge.mjs +0 -1732
- package/tools/ardy/bvh-cskel27.mjs +0 -1265
- package/tools/ardy/cclay_constrained_generate.py +0 -561
- package/tools/ardy/cclay_gvhmr_worker.py +0 -264
- package/tools/ardy/cclay_motion_edit.py +0 -510
- package/tools/ardy/cclay_sequence_generate.py +0 -705
- package/tools/ardy/cclay_worker.py +0 -304
- package/tools/ardy/dump-npz.py +0 -205
- package/tools/ardy/extract-rest.mjs +0 -299
- package/tools/ardy/extract.mjs +0 -507
- package/tools/ardy/footage.mjs +0 -467
- package/tools/ardy/gvhmr-floor.mjs +0 -102
- package/tools/ardy/gvhmr-to-cskel27.mjs +0 -21
- package/tools/ardy/gvhmr_fastpath.py +0 -168
- package/tools/ardy/gvhmr_trajectory.py +0 -240
- package/tools/ardy/merge-text-encoder.py +0 -160
- package/tools/ardy/mocap-metrics.mjs +0 -200
- package/tools/ardy/mocap-quality-gate.mjs +0 -110
- package/tools/ardy/motion-stabilize.mjs +0 -348
- package/tools/ardy/npz.mjs +0 -414
- package/tools/ardy/pose-to-npz.mjs +0 -106
- package/tools/ardy/prompt-limits.mjs +0 -5
- package/tools/ardy/run-edit-on-box.sh +0 -73
- package/tools/ardy/run-local.mjs +0 -233
- package/tools/ardy/run-on-box.sh +0 -593
- package/tools/ardy/run-sequence-on-box.sh +0 -177
- package/tools/ardy/runners/gvhmr-worker.mjs +0 -206
- package/tools/ardy/runners/index.mjs +0 -18
- package/tools/ardy/runners/local.mjs +0 -455
- package/tools/ardy/runners/proc.mjs +0 -125
- package/tools/ardy/runners/remote.mjs +0 -252
- package/tools/ardy/setup-local.mjs +0 -189
- package/tools/ardy/setup-text-encoder-on-box.sh +0 -93
- package/tools/ardy/setup-text-encoder.py +0 -306
- package/tools/ardy/smpl-cskel27.mjs +0 -178
- package/tools/ardy/visual-qa.mjs +0 -196
- package/tools/ardy/vq-car.mjs +0 -52
- package/tools/bench/EXP3.md +0 -61
- package/tools/bench/cclay_bench_extract_incam.py +0 -125
- package/tools/bench/cclay_bench_extract_obs.py +0 -204
- package/tools/bench/cclay_bench_runner.py +0 -42
- package/tools/bench/cube-contact.mjs +0 -162
- package/tools/bench/exp3.mjs +0 -152
- package/tools/bench/extract-bench-lib.mjs +0 -216
- package/tools/bench/extract-bench.mjs +0 -302
- package/tools/bench/fal-generate.mjs +0 -88
- package/tools/bench/fit/README.md +0 -189
- package/tools/bench/fit/camera.mjs +0 -59
- package/tools/bench/fit/contact.mjs +0 -419
- package/tools/bench/fit/footlock.mjs +0 -234
- package/tools/bench/fit/motion.mjs +0 -85
- package/tools/bench/fit/pin.mjs +0 -27
- package/tools/bench/fit/remote.mjs +0 -105
- package/tools/bench/fit-bench.mjs +0 -126
- package/tools/bench/fit-sanity.mjs +0 -45
- package/tools/bench/metrics.mjs +0 -313
- package/tools/bench/obs/depth.mjs +0 -258
- package/tools/bench/obs/extrinsics.mjs +0 -175
- package/tools/bench/obs/fit_mannequin_betas.py +0 -340
- package/tools/bench/obs/ground.mjs +0 -294
- package/tools/bench/obs/heading.mjs +0 -151
- package/tools/bench/obs/ladder.mjs +0 -555
- package/tools/bench/obs/mannequin-betas.json +0 -124
- package/tools/bench/obs/remote.mjs +0 -83
- package/tools/bench/obs/rest_joints.py +0 -52
- package/tools/bench/obs/ybot-targets.mjs +0 -49
- package/tools/bench/obs-bench.mjs +0 -520
- package/tools/bench/score.mjs +0 -343
- package/tools/bench/summarize.mjs +0 -86
- package/tools/demo-worker/README.md +0 -137
- package/tools/demo-worker/api-client.mjs +0 -233
- package/tools/demo-worker/generate.mjs +0 -301
- package/tools/demo-worker/index.mjs +0 -466
- package/tools/demo-worker/sign-core.mjs +0 -112
- package/tools/demo-worker/sign.mjs +0 -161
- package/tools/gt-render/browser.mjs +0 -182
- package/tools/gt-render/camera-math.mjs +0 -276
- package/tools/gt-render/page.mjs +0 -267
- package/tools/gt-render/render.mjs +0 -514
- package/tools/gt-render/scene-box.mjs +0 -31
- package/tools/gt-render/take-transform.mjs +0 -87
- package/tools/kimodo/compare-seam.mjs +0 -108
- package/tools/kimodo/constraints.mjs +0 -244
- package/tools/kimodo/edit.mjs +0 -259
- package/tools/kimodo/effector-constraints.mjs +0 -200
- package/tools/kimodo/generate.mjs +0 -646
- package/tools/kimodo/local-output.mjs +0 -265
- package/tools/kimodo/measure-pose.mjs +0 -65
- package/tools/kimodo/measure-preserve.mjs +0 -899
- package/tools/kimodo/measure-waypoints.mjs +0 -55
- package/tools/kimodo/mlx-generate.py +0 -111
- package/tools/kimodo/pose-constraints.mjs +0 -248
- package/tools/kimodo/preserve-mask.mjs +0 -543
- package/tools/kimodo/read-npz.mjs +0 -189
- package/tools/kimodo/run-edit-on-box.mjs +0 -155
- package/tools/kimodo/run-sequence-on-box.mjs +0 -178
- package/tools/kimodo/runner.mjs +0 -284
- package/tools/kimodo/seam-batch.mjs +0 -77
- package/tools/kimodo/setup-local.mjs +0 -30
- package/tools/kimodo/setup-on-box.sh +0 -339
- package/tools/kimodo/soma77-to-cskel27.mjs +0 -305
- package/tools/morphgs/assets/gen_truth.py +0 -39
- package/tools/morphgs/assets/mesh_ori_rig.txt +0 -27
- package/tools/morphgs/assets/playback-check.mjs +0 -30
- package/tools/morphgs/demo-gate.sh +0 -26
- package/tools/morphgs/fbx2morphgs.mjs +0 -68
- package/tools/morphgs/morphgs-to-cskel27.mjs +0 -105
- package/tools/morphgs/patches/preprocess_src-none-mode.patch +0 -76
- package/tools/morphgs/setup-on-cluster.sh +0 -126
- package/tools/projflow/driver.py +0 -1069
- package/tools/projflow/generate.mjs +0 -805
- package/tools/projflow/hml22-to-cskel27.mjs +0 -735
- package/tools/projflow/line-edit-job.mjs +0 -547
- package/tools/projflow/replay.mjs +0 -452
- package/tools/projflow/runner.mjs +0 -269
- package/tools/projflow/service.mjs +0 -742
- package/tools/track/DESIGN.md +0 -513
- package/tools/track/backfill-provenance.mjs +0 -116
- package/tools/track/budget.mjs +0 -8
- package/tools/track/check-rig.mjs +0 -209
- package/tools/track/diagnostics.schema.json +0 -60
- package/tools/track/export-rig.mjs +0 -256
- package/tools/track/fallback.mjs +0 -7
- package/tools/track/fk-parity-fixture.mjs +0 -161
- package/tools/track/gate.mjs +0 -349
- package/tools/track/masks.mjs +0 -318
- package/tools/track/metrics.mjs +0 -201
- package/tools/track/publish-obs.mjs +0 -108
- package/tools/track/py/check_env.py +0 -61
- package/tools/track/py/eval_lr.py +0 -229
- package/tools/track/py/lr_viterbi.py +0 -294
- package/tools/track/py/masks.py +0 -405
- package/tools/track/py/objective.py +0 -382
- package/tools/track/py/rig.py +0 -508
- package/tools/track/py/scene.py +0 -326
- package/tools/track/py/test_joint_indices.py +0 -123
- package/tools/track/py/test_lr_viterbi.py +0 -195
- package/tools/track/py/test_masks.py +0 -229
- package/tools/track/py/test_rig.py +0 -288
- package/tools/track/py/test_scene.py +0 -354
- package/tools/track/py/test_track.py +0 -328
- package/tools/track/py/track.py +0 -411
- package/tools/track/remote.mjs +0 -140
- package/tools/track/rig-dump.mjs +0 -227
- package/tools/track/run-box-tests.mjs +0 -14
- package/tools/track/run-box.mjs +0 -168
- package/tools/track/setup-box.sh +0 -59
- package/tools/track/study-2d.mjs +0 -728
- /package/src/{ardy → motion}/collision-blockers.js +0 -0
- /package/src/{ardy → motion}/ground.js +0 -0
- /package/src/{ardy → motion}/ik-drag.js +0 -0
- /package/src/{ardy → motion}/ik-key-json.js +0 -0
- /package/src/{ardy → motion}/ik.js +0 -0
- /package/src/{ardy → motion}/physics-surface.js +0 -0
- /package/src/{ardy → motion}/playback-clock.js +0 -0
- /package/src/{ardy → motion}/range-pin.js +0 -0
|
@@ -1,265 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Native local SOMA30 float buffers -> Kimodo's SOMA77 NPZ, without Python.
|
|
3
|
-
*
|
|
4
|
-
* Verified source pins (the data below is extracted, not an invented rig):
|
|
5
|
-
* localai-org/kimodo.cpp@568b0253f346fbe369587c7dae73d58594a14c90
|
|
6
|
-
* src/generate.cpp:15-20,60-65: native-endian float bytes and output names.
|
|
7
|
-
* src/motion_decode.cpp:10-12: XYZ roots [T,3], local XYZW [T,J,4],
|
|
8
|
-
* local = transpose(parentGlobal) * global; row-major matrices.
|
|
9
|
-
* src/skeleton.hpp:45-67: SOMA30 joint names, hierarchy and offsets.
|
|
10
|
-
* scripts/convert_motion_to_gguf.py:28-29,240: SOMA models use 30 joints, 30 FPS.
|
|
11
|
-
* nv-tlabs/kimodo@1aece8c124d73d255ceff5086d983b844c9f4e94
|
|
12
|
-
* kimodo/skeleton/definitions.py:85-164: SOMA77 names/parents (same order as
|
|
13
|
-
* SOMA77_JOINTS); :208-237: SOMA30 order; :246-277: canonical expansion:
|
|
14
|
-
* seed relaxed-hand local matrices, overwrite the named 30 joints, run FK.
|
|
15
|
-
* kimodo/skeleton/base.py:70-73: load neutral positions from joints.p.
|
|
16
|
-
* kimodo/skeleton/kinematics.py:48-72,157-183: subtract neutral root, use
|
|
17
|
-
* child-minus-parent offsets; global = parentGlobal * local.
|
|
18
|
-
* kimodo/assets/skeletons/somaskel77/joints.p (77x3 contiguous LE float64):
|
|
19
|
-
* SHA256 dc5fd8e39e0ff312f5d0f536a87ac22ac58445e13443fcb8ab54e6817cb97ce7
|
|
20
|
-
* kimodo/assets/skeletons/somaskel77/relaxed_hands_rest_pose.npy (77x3x3 C-order <f4):
|
|
21
|
-
* SHA256 64a3828e0d1ef1f1de8228c74eba8040c0810d898169f1892d8997a213b2b64c
|
|
22
|
-
*
|
|
23
|
-
* NVIDIA skeleton data/expansion: Copyright (c) 2026 NVIDIA CORPORATION &
|
|
24
|
-
* AFFILIATES. All rights reserved. SPDX-License-Identifier: Apache-2.0
|
|
25
|
-
*
|
|
26
|
-
* cpp does NOT emit 77 joints. Missing fingers/head/toe ends follow NVIDIA's
|
|
27
|
-
* relaxed rest pose, not identity. The same two-file contract is usable by
|
|
28
|
-
* the MLX wrapper. Files carry no header, FPS, skeleton ID or byte-order tag:
|
|
29
|
-
* only SOMA30 at 30 FPS on little-endian local hosts is supported. No claim
|
|
30
|
-
* of big-endian portability, arbitrary model support or inferred metadata.
|
|
31
|
-
*/
|
|
32
|
-
import { readFileSync } from "node:fs";
|
|
33
|
-
import { endianness } from "node:os";
|
|
34
|
-
import { join } from "node:path";
|
|
35
|
-
import { writeNpz } from "../ardy/npz.mjs";
|
|
36
|
-
|
|
37
|
-
// Generated from the pinned named hierarchies. Root is Hips, not BVH's extra Root.
|
|
38
|
-
const PARENTS = [-1, 0, 1, 2, 3, 4, 5, 6, 6, 6, 6, 3, 11, 12, 13, 14, 15, 16, 17, 14, 19, 20, 21, 22, 14, 24, 25, 26, 27, 14, 29, 30, 31, 32, 14, 34, 35, 36, 37, 3, 39, 40, 41, 42, 43, 44, 45, 42, 47, 48, 49, 50, 42, 52, 53, 54, 55, 42, 57, 58, 59, 60, 42, 62, 63, 64, 65, 0, 67, 68, 69, 70, 0, 72, 73, 74, 75];
|
|
39
|
-
const SOMA30_TO_77 = [0, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 18, 28, 39, 40, 41, 42, 46, 56, 67, 68, 69, 70, 72, 73, 74, 75];
|
|
40
|
-
// Parent-relative offsets in metres, extracted from the float64 neutral joints.
|
|
41
|
-
const OFFSETS = [
|
|
42
|
-
[0, 0, 0], // Hips
|
|
43
|
-
[-0.00013727, 0.050037625614476805, -0.0005372666896067667], // Spine1
|
|
44
|
-
[-1.8657410332130735e-09, 0.07125301392692317, -0.00029824854593102964], // Spine2
|
|
45
|
-
[-5.7518839849206565e-09, 0.07550063051507273, -0.00815970991996409], // Chest
|
|
46
|
-
[-0.0018167651690788303, 0.2631129525790038, -0.005533482916249482], // Neck1
|
|
47
|
-
[-2.8510223053918038e-08, 0.07709396639418398, 0.023025854617019993], // Neck2
|
|
48
|
-
[-4.597543699653289e-08, 0.06128915946413971, 0.01953708612715343], // Head
|
|
49
|
-
[3.5979336415923983e-05, 0.1606540240501252, -0.01835379253397452], // HeadEnd
|
|
50
|
-
[2.6368790127171077e-05, 0.004755922495750409, 0.03094940615654751], // Jaw
|
|
51
|
-
[0.03206380787719566, 0.053802051250082306, 0.0758688307547003], // LeftEye
|
|
52
|
-
[-0.032224401727763405, 0.053618690013014, 0.07558233588519858], // RightEye
|
|
53
|
-
[0.016216517548183828, 0.2323716406639265, 0.05113413235915687], // LeftShoulder
|
|
54
|
-
[0.1491984571395857, 2.1939787320235382e-08, -0.05502325756719371], // LeftArm
|
|
55
|
-
[0.28739307789898705, 2.5026838934572027e-09, -2.5878773664946356e-05], // LeftForeArm
|
|
56
|
-
[0.27093981200040373, -7.066251084264508e-09, 2.6089724817620827e-05], // LeftHand
|
|
57
|
-
[0.022764819157403915, -0.013920452593413402, 0.031914129923056804], // LeftHandThumb1
|
|
58
|
-
[0.040128365833829394, -0.018281266164464516, 0.01641654386703534], // LeftHandThumb2
|
|
59
|
-
[0.027985150871132403, 6.679267694487123e-10, -2.822743635361169e-08], // LeftHandThumb3
|
|
60
|
-
[0.03180793099011725, -3.924084146511575e-08, 4.201470514553218e-08], // LeftHandThumbEnd
|
|
61
|
-
[0.03247554774471517, -0.00531997799010181, 0.02296169245930663], // LeftHandIndex1
|
|
62
|
-
[0.06364578329248527, 0.00012059681205822681, 0.0017859956706151887], // LeftHandIndex2
|
|
63
|
-
[0.03662364008467556, 6.022104481751001e-10, 2.228786582375575e-09], // LeftHandIndex3
|
|
64
|
-
[0.023292420053853458, 4.038300810416118e-08, 4.1417497542717285e-08], // LeftHandIndex4
|
|
65
|
-
[0.02759615203779331, -0.0018053748082757504, -0.0011302401430646723], // LeftHandIndexEnd
|
|
66
|
-
[0.031634951248573295, 0.0024098051848970292, 0.01000332261599311], // LeftHandMiddle1
|
|
67
|
-
[0.061907798628576205, -0.0025927821616844593, -0.010025481658581756], // LeftHandMiddle2
|
|
68
|
-
[0.043565201128868414, -3.9144125996148915e-08, -7.213858317992039e-09], // LeftHandMiddle3
|
|
69
|
-
[0.029968770776552467, -7.941124641197561e-08, 1.916610021732157e-09], // LeftHandMiddle4
|
|
70
|
-
[0.02304287359856616, -0.002945688337905261, -0.0003174060327313724], // LeftHandMiddleEnd
|
|
71
|
-
[0.028826430776087486, -0.0005365196119661575, -0.003225431726185689], // LeftHandRing1
|
|
72
|
-
[0.058545409922326375, -0.004862024489686589, -0.013738406597130912], // LeftHandRing2
|
|
73
|
-
[0.04350578232071611, 5.056851604123835e-10, 3.2482461696098364e-08], // LeftHandRing3
|
|
74
|
-
[0.026513211414290416, 7.030818460762589e-08, 2.151285180551632e-08], // LeftHandRing4
|
|
75
|
-
[0.019361051692715625, 0.0007768686737038566, -7.067837662876053e-07], // LeftHandRingEnd
|
|
76
|
-
[0.028654998325629344, -0.0031000517019837415, -0.016003778622878377], // LeftHandPinky1
|
|
77
|
-
[0.05087848631839764, -0.01331141349718662, -0.017712301515047175], // LeftHandPinky2
|
|
78
|
-
[0.030709740795539675, 4.051295432461188e-08, 2.7507847666363716e-09], // LeftHandPinky3
|
|
79
|
-
[0.015496720401442454, 2.5884316912083705e-10, 1.1388101253673177e-08], // LeftHandPinky4
|
|
80
|
-
[0.019448930482861893, -0.0015780209549762225, 0.0005721854955899469], // LeftHandPinkyEnd
|
|
81
|
-
[-0.013801182399705653, 0.23180308551238452, 0.05214157857767408], // RightShoulder
|
|
82
|
-
[-0.15037196207493894, 1.1738790139936839e-07, -0.05545604370327074], // RightArm
|
|
83
|
-
[-0.28736639322161683, 1.8762808196015612e-08, -2.5970935871087383e-05], // RightForeArm
|
|
84
|
-
[-0.27133619762098016, -1.1676740130361907e-09, 2.612693678507097e-05], // RightHand
|
|
85
|
-
[-0.022740317711105185, -0.013839883504850936, 0.03163127194989407], // RightHandThumb1
|
|
86
|
-
[-0.04011429382658016, -0.018274664649153394, 0.016409142225213523], // RightHandThumb2
|
|
87
|
-
[-0.027949350772652704, -3.841258033876471e-08, -3.175294090856928e-08], // RightHandThumb3
|
|
88
|
-
[-0.03183852088016581, 4.180831825184583e-08, 8.003133704359566e-09], // RightHandThumbEnd
|
|
89
|
-
[-0.03253265793925497, -0.0052005725886324905, 0.022828661618524614], // RightHandIndex1
|
|
90
|
-
[-0.06341917085810977, 0.00012470760922905777, 0.0017826574900657675], // RightHandIndex2
|
|
91
|
-
[-0.0365487107051663, -7.864077716801532e-08, -1.440948733597014e-09], // RightHandIndex3
|
|
92
|
-
[-0.023275860449081365, 8.656209637969425e-10, 9.08233731451713e-09], // RightHandIndex4
|
|
93
|
-
[-0.0276178977412862, -0.0018065562762186183, -0.001130778192748809], // RightHandIndexEnd
|
|
94
|
-
[-0.03168105788962827, 0.002465934369192846, 0.010010303813739617], // RightHandMiddle1
|
|
95
|
-
[-0.06180827819827295, -0.0025883551554772843, -0.010008952130262615], // RightHandMiddle2
|
|
96
|
-
[-0.04348901102655145, 1.4588690810946048e-09, -1.8813487434599097e-09], // RightHandMiddle3
|
|
97
|
-
[-0.030002400708201815, -3.8993554107857875e-08, -2.1297912910708816e-08], // RightHandMiddle4
|
|
98
|
-
[-0.02302519694961802, -0.002943697103729992, -0.00031706280391993746], // RightHandMiddleEnd
|
|
99
|
-
[-0.028856900385819784, -0.0006795227401513171, -0.0030885825502642364], // RightHandRing1
|
|
100
|
-
[-0.05854198602585736, -0.00486130167768084, -0.013737309211220189], // RightHandRing2
|
|
101
|
-
[-0.043388100336349544, -3.8646553124355165e-08, -1.933097331513478e-09], // RightHandRing3
|
|
102
|
-
[-0.02654903020581123, -3.917183399870794e-08, 3.8817149244918525e-08], // RightHandRing4
|
|
103
|
-
[-0.019335684270237574, 0.0007752651056781024, -5.246026544766802e-07], // RightHandRingEnd
|
|
104
|
-
[-0.028664251697099297, -0.003427963989546201, -0.015841448874052068], // RightHandPinky1
|
|
105
|
-
[-0.05091371014443247, -0.013320554140404506, -0.01772384508985521], // RightHandPinky2
|
|
106
|
-
[-0.03062664112380975, -3.8360240428580994e-08, 8.515967264699498e-09], // RightHandPinky3
|
|
107
|
-
[-0.015465290567481138, 4.0828027181305515e-08, -2.0749384023466266e-08], // RightHandPinky4
|
|
108
|
-
[-0.019451189105096578, -0.0015771778137836368, 0.0005721110096287285], // RightHandPinkyEnd
|
|
109
|
-
[0.10043214000000002, -0.08434526713056027, 0.025956547303516146], // LeftLeg
|
|
110
|
-
[-9.999999994736442e-09, -0.43221753717004235, -0.008029128048028446], // LeftShin
|
|
111
|
-
[9.999999994736442e-09, -0.4215509590627605, -0.03481522975357983], // LeftFoot
|
|
112
|
-
[0.0, -0.05059472058410097, 0.13231529381811288], // LeftToeBase
|
|
113
|
-
[-9.60661200642976e-05, -0.01647619127208577, 0.0651301714815308], // LeftToeEnd
|
|
114
|
-
[-0.10047278, -0.08295259954688608, 0.02620316950258045], // RightLeg
|
|
115
|
-
[9.999999994736442e-09, -0.4336220589749483, -0.008055558278834429], // RightShin
|
|
116
|
-
[1.9999999989472883e-08, -0.421173943265713, -0.03478397847408046], // RightFoot
|
|
117
|
-
[-3.429076689265287e-09, -0.05079609316564615, 0.13284195550713543], // RightToeBase
|
|
118
|
-
[9.531671626031302e-05, -0.016343780682348985, 0.06460591248071407], // RightToeEnd
|
|
119
|
-
];
|
|
120
|
-
// Only joints NOT overwritten by the 30-joint output. Preserve the asset's
|
|
121
|
-
// float32 matrices verbatim, including its small near-identity roundoff.
|
|
122
|
-
const RELAXED_LOCALS = new Map([
|
|
123
|
-
[7, [1.0, -1.3427583098746254e-06, -3.9264031670427357e-07, 1.3427583098746254e-06, 1.000000238418579, -1.6478944075970503e-07, 3.9264048723453016e-07, 4.464928693437287e-08, 1.000000238418579]], // HeadEnd
|
|
124
|
-
[15, [0.980038046836853, 0.10456321388483047, 0.16909213364124298, -0.10096757858991623, 0.9944452047348022, -0.02974773570895195, -0.17126333713531494, 0.012080984190106392, 0.985151469707489]], // LeftHandThumb1
|
|
125
|
-
[16, [0.9818174839019775, 0.18747958540916443, -0.029765967279672623, -0.18972326815128326, 0.974337637424469, -0.12112738192081451, 0.006293131969869137, 0.12457224726676941, 0.9921908378601074]], // LeftHandThumb2
|
|
126
|
-
[17, [0.9882956147193909, 1.1954236356359615e-07, 0.15255138278007507, 1.2170265506483702e-07, 1.0000003576278687, 1.1255096854512203e-09, -0.15255147218704224, -6.156434473325589e-09, 0.9882957935333252]], // LeftHandThumb3
|
|
127
|
-
[19, [0.9985320568084717, 0.030242079868912697, 0.04493670165538788, -0.03214818984270096, 0.9985869526863098, 0.04232209548354149, -0.043593283742666245, -0.043704744428396225, 0.9980931878089905]], // LeftHandIndex1
|
|
128
|
-
[20, [0.9810277223587036, 0.18235456943511963, 0.06581452488899231, -0.1758711338043213, 0.979948878288269, -0.09364926069974899, -0.08157219737768173, 0.08029749989509583, 0.9934277534484863]], // LeftHandIndex2
|
|
129
|
-
[21, [0.9337304830551147, 0.35797688364982605, -2.539580989946444e-08, -0.3579767346382141, 0.9337307810783386, -8.669996987009654e-08, 1.5877981596190693e-08, -4.312953549856502e-08, 1.000000238418579]], // LeftHandIndex3
|
|
130
|
-
[22, [0.9313047528266907, 0.3588401675224304, 0.06249217316508293, -0.3617202639579773, 0.9312959313392639, 0.04297603294253349, -0.04277715086936951, -0.0626286044716835, 0.9971199631690979]], // LeftHandIndex4
|
|
131
|
-
[23, [1.0, 7.989044803480283e-08, -1.0939109529317648e-07, 8.867302625503726e-08, 1.0000003576278687, -6.046956002592196e-08, 9.944098167125048e-08, -7.377190769375375e-08, 1.000000238418579]], // LeftHandIndexEnd
|
|
132
|
-
[24, [0.9989528059959412, 0.02326994203031063, 0.03939470648765564, -0.023762758821249008, 0.9996448159217834, 0.012091930024325848, -0.039099305868148804, -0.013015532866120338, 0.999150812625885]], // LeftHandMiddle1
|
|
133
|
-
[25, [0.9314213991165161, 0.3638163208961487, -0.009597794152796268, -0.3637995421886444, 0.929991602897644, -0.05259339511394501, -0.010208404622972012, 0.05247814953327179, 0.9985701441764832]], // LeftHandMiddle2
|
|
134
|
-
[26, [0.9710460305213928, 0.23889276385307312, -6.942111774321802e-09, -0.23889261484146118, 0.9710462689399719, -8.680182617126775e-08, 3.955703675728728e-08, -5.6245866630888486e-08, 1.000000238418579]], // LeftHandMiddle3
|
|
135
|
-
[27, [0.9143363833427429, 0.4049510657787323, 0.0019584561232477427, -0.40493232011795044, 0.9142212867736816, 0.015156357549130917, 0.004347181413322687, -0.014651183970272541, 0.9998834729194641]], // LeftHandMiddle4
|
|
136
|
-
[29, [0.9995572566986084, 0.005557473283261061, 0.029233748093247414, -0.005129389464855194, 0.9998792409896851, -0.01469280943274498, -0.029311854392290115, 0.014536227099597454, 0.9994648098945618]], // LeftHandRing1
|
|
137
|
-
[30, [0.9693662524223328, 0.2455878108739853, -0.003998155239969492, -0.24561482667922974, 0.9691089391708374, -0.022401701658964157, -0.0016269013285636902, 0.02269735187292099, 0.99974125623703]], // LeftHandRing2
|
|
138
|
-
[31, [0.8269525766372681, 0.5621064901351929, -0.013640386052429676, -0.562249481678009, 0.8268929719924927, -0.01113723125308752, 0.005018884781748056, 0.016879167407751083, 0.9998450875282288]], // LeftHandRing3
|
|
139
|
-
[32, [0.9393614530563354, 0.34282228350639343, 0.00856061838567257, -0.34251558780670166, 0.9391621947288513, -0.025651078671216965, -0.01683351956307888, 0.02116338536143303, 0.9996344447135925]], // LeftHandRing4
|
|
140
|
-
[33, [1.0000001192092896, 7.095973586501714e-08, 1.34568995946438e-08, 7.095973586501714e-08, 1.0000003576278687, -5.411286352341449e-08, 1.34568995946438e-08, -5.411286352341449e-08, 1.0000001192092896]], // LeftHandRingEnd
|
|
141
|
-
[34, [0.9981033802032471, 0.06012800335884094, 0.013206100091338158, -0.060004234313964844, 0.9981526136398315, -0.009565235115587711, -0.013756813481450081, 0.00875452347099781, 0.99986732006073]], // LeftHandPinky1
|
|
142
|
-
[35, [0.960137665271759, 0.27127575874328613, -0.06741887331008911, -0.2740127742290497, 0.9610827565193176, -0.03517961874604225, 0.055251795798540115, 0.05225076898932457, 0.9971046447753906]], // LeftHandPinky2
|
|
143
|
-
[36, [0.993886411190033, 0.1104077696800232, 2.7541052105561903e-08, -0.11040759831666946, 0.9938867092132568, -7.914825062016462e-08, 4.094326300219109e-08, -5.936898617164843e-08, 1.0000003576278687]], // LeftHandPinky3
|
|
144
|
-
[37, [0.9484628438949585, 0.3047541081905365, 0.08685233443975449, -0.3104344606399536, 0.948600172996521, 0.06155230477452278, -0.06362971663475037, -0.0853421539068222, 0.9943181872367859]], // LeftHandPinky4
|
|
145
|
-
[38, [1.0000001192092896, 1.60153916795025e-07, 3.714115592856615e-08, 1.860044918089443e-08, 1.000000238418579, -3.587032182394978e-08, 3.5881356552636134e-08, -1.0167633490709704e-07, 1.0000003576278687]], // LeftHandPinkyEnd
|
|
146
|
-
[43, [0.9950336217880249, -0.03400981053709984, -0.09354962408542633, 0.03898259624838829, 0.9978938698768616, 0.05185317248106003, 0.09158914536237717, -0.05524258688092232, 0.9942634701728821]], // RightHandThumb1
|
|
147
|
-
[44, [0.9689887166023254, -0.2465875893831253, 0.01598574034869671, 0.246683731675148, 0.9615330696105957, -0.12083777785301208, 0.014426319859921932, 0.12103372812271118, 0.992543637752533]], // RightHandThumb2
|
|
148
|
-
[45, [0.9755706787109375, -6.032398136568418e-09, -0.21968600153923035, -1.4764328426508655e-08, 1.000000238418579, -5.104336864292236e-08, 0.21968604624271393, -7.599813045544579e-08, 0.9755706787109375]], // RightHandThumb3
|
|
149
|
-
[47, [0.9989951848983765, -0.027317475527524948, -0.03553270548582077, 0.029050273820757866, 0.9983665943145752, 0.04920250177383423, 0.03413066640496254, -0.05018545687198639, 0.9981566667556763]], // RightHandIndex1
|
|
150
|
-
[48, [0.9939585328102112, -0.0884183943271637, -0.06502870470285416, 0.08220367133617401, 0.9922928810119629, -0.09272538870573044, 0.07272621244192123, 0.08681940287351608, 0.99356609582901]], // RightHandIndex2
|
|
151
|
-
[49, [0.9815588593482971, -0.1911604106426239, 6.040594513478936e-08, 0.19116035103797913, 0.9815590977668762, -7.543771829432444e-08, 3.969322648345042e-08, -9.051092320078169e-08, 1.000000238418579]], // RightHandIndex3
|
|
152
|
-
[50, [0.975672721862793, -0.20632407069206238, -0.07411642372608185, 0.20932693779468536, 0.9772104024887085, 0.0352504663169384, 0.06515438854694366, -0.049907661974430084, 0.9966265559196472]], // RightHandIndex4
|
|
153
|
-
[51, [1.0, -3.128822712028523e-08, 5.321204454844519e-08, -3.128822712028523e-08, 1.000000238418579, -8.74741346024166e-08, 5.321204454844519e-08, -8.74741346024166e-08, 1.0000001192092896]], // RightHandIndexEnd
|
|
154
|
-
[52, [0.9991795420646667, -0.021660208702087402, -0.03422252833843231, 0.02253466658294201, 0.999424159526825, 0.025378331542015076, 0.03365320712327957, -0.026128867641091347, 0.9990921020507812]], // RightHandMiddle1
|
|
155
|
-
[53, [0.9667755365371704, -0.25422102212905884, 0.026775022968649864, 0.25543513894081116, 0.9647941589355469, -0.06265555322170258, -0.009903957135975361, 0.06741295754909515, 0.9976761341094971]], // RightHandMiddle2
|
|
156
|
-
[54, [0.9689971804618835, -0.2417343407869339, -0.05107900872826576, 0.2459598183631897, 0.9633893966674805, 0.10670134425163269, 0.023415658622980118, -0.1159568503499031, 0.9929783940315247]], // RightHandMiddle3
|
|
157
|
-
[55, [0.941867470741272, -0.3359818756580353, -0.0014353847363963723, 0.3359754681587219, 0.9418008327484131, 0.011499876156449318, -0.0025118428748100996, -0.0113137885928154, 0.9999330043792725]], // RightHandMiddle4
|
|
158
|
-
[57, [0.9996333122253418, -0.0061468142084777355, -0.02637435868382454, 0.00615928927436471, 0.9999812841415405, 0.0003948818484786898, 0.026371527463197708, -0.0005573396338149905, 0.9996522068977356]], // RightHandRing1
|
|
159
|
-
[58, [0.9364164471626282, -0.34295132756233215, 0.07422114908695221, 0.3449566662311554, 0.9384870529174805, -0.015735777094960213, -0.06425891071557999, 0.04033815488219261, 0.997117817401886]], // RightHandRing2
|
|
160
|
-
[59, [0.9467210173606873, -0.32205501198768616, 4.636428840854023e-08, 0.322054922580719, 0.9467213153839111, -6.129761942474943e-08, 9.372781661909357e-09, -8.999508338547457e-08, 1.000000238418579]], // RightHandRing3
|
|
161
|
-
[60, [0.982410728931427, -0.1866968870162964, -0.003674674779176712, 0.18654502928256989, 0.9821150302886963, -0.025529347360134125, 0.008375243283808231, 0.024394650012254715, 0.9996675252914429]], // RightHandRing4
|
|
162
|
-
[61, [1.0, -5.399165914354853e-08, 3.024080186264655e-08, -5.399165914354853e-08, 1.0000003576278687, -7.882910324497061e-08, 3.024080186264655e-08, -7.882910324497061e-08, 1.000000238418579]], // RightHandRingEnd
|
|
163
|
-
[62, [0.9983538389205933, -0.057158663868904114, 0.004752615001052618, 0.05710673704743385, 0.9983140826225281, 0.010412987321615219, -0.005339713301509619, -0.01012459397315979, 0.9999346137046814]], // RightHandPinky1
|
|
164
|
-
[63, [0.9107372164726257, -0.35845717787742615, 0.2051009088754654, 0.35850635170936584, 0.9327439665794373, 0.038242265582084656, -0.20501473546028137, 0.03870117664337158, 0.9779936075210571]], // RightHandPinky2
|
|
165
|
-
[64, [0.9898684024810791, -0.1419883370399475, 5.918328582765753e-08, 0.14198823273181915, 0.9898686408996582, -6.623200476951752e-08, 4.9272500746155856e-08, -7.999228301969197e-08, 1.0000001192092896]], // RightHandPinky3
|
|
166
|
-
[65, [0.9467962980270386, -0.30904620885849, -0.08981873095035553, 0.3149397373199463, 0.9471571445465088, 0.060884833335876465, 0.06625629216432571, -0.08593318611383438, 0.994095504283905]], // RightHandPinky4
|
|
167
|
-
[66, [1.0000001192092896, -9.611500217943103e-08, 5.342175413147743e-08, 9.53837098194299e-09, 1.0000003576278687, -6.045292622047782e-08, 5.2956131924020156e-08, -9.241933440762296e-08, 1.0000001192092896]], // RightHandPinkyEnd
|
|
168
|
-
[71, [1.0, -9.346368123885895e-11, 2.1470714095528365e-11, 8.58312379503623e-12, 1.0000004768371582, -1.1385103704242283e-07, 2.1471657785099296e-11, -4.4665963372381157e-08, 1.0000004768371582]], // LeftToeEnd
|
|
169
|
-
[76, [1.0, 1.1998419618963752e-11, 2.0857204852120503e-12, 6.382799150328466e-11, 1.0000001192092896, -2.5707786122097787e-08, 2.0864421301780567e-12, -6.083076442564561e-08, 1.0000001192092896]], // RightToeEnd
|
|
170
|
-
]);
|
|
171
|
-
|
|
172
|
-
function readFloats(path) {
|
|
173
|
-
const bytes = readFileSync(path);
|
|
174
|
-
if (bytes.length === 0 || bytes.length % 4 !== 0) {
|
|
175
|
-
throw new Error(`writeLocalKimodoNpz: ${path} must contain nonempty float32 bytes`);
|
|
176
|
-
}
|
|
177
|
-
const values = new Float32Array(bytes.length / 4);
|
|
178
|
-
for (let i = 0; i < values.length; i++) {
|
|
179
|
-
values[i] = bytes.readFloatLE(i * 4);
|
|
180
|
-
if (!Number.isFinite(values[i])) {
|
|
181
|
-
throw new Error(`writeLocalKimodoNpz: ${path} has non-finite float at index ${i}`);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
return values;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
function quaternionMatrix(values, offset, frame, joint) {
|
|
188
|
-
let [x, y, z, w] = values.subarray(offset, offset + 4);
|
|
189
|
-
const norm = Math.hypot(x, y, z, w);
|
|
190
|
-
if (norm === 0) {
|
|
191
|
-
throw new Error(`writeLocalKimodoNpz: local_rotations_xyzw.f32 has zero quaternion at frame ${frame}, joint ${joint}`);
|
|
192
|
-
}
|
|
193
|
-
// Both q and -q, and any finite nonzero scaling, represent the same rotation.
|
|
194
|
-
x /= norm; y /= norm; z /= norm; w /= norm;
|
|
195
|
-
return [
|
|
196
|
-
1 - 2 * (y * y + z * z), 2 * (x * y - z * w), 2 * (x * z + y * w),
|
|
197
|
-
2 * (x * y + z * w), 1 - 2 * (x * x + z * z), 2 * (y * z - x * w),
|
|
198
|
-
2 * (x * z - y * w), 2 * (y * z + x * w), 1 - 2 * (x * x + y * y),
|
|
199
|
-
];
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* Synchronously validate local files and write native SOMA77 NPZ members
|
|
204
|
-
* posed_joints [T,77,3], global_rot_mats [T,77,3,3], and scalar fps=30.
|
|
205
|
-
* No output is written until all input and computed arrays have been validated.
|
|
206
|
-
* @param {string} outputDir Directory containing the two little-endian .f32 files.
|
|
207
|
-
* @param {string} npzPath Destination NPZ (its parent directory must exist).
|
|
208
|
-
* @param {{expectedFrames?: number}} [options] Optional requested frame count.
|
|
209
|
-
*/
|
|
210
|
-
export function writeLocalKimodoNpz(outputDir, npzPath, { expectedFrames } = {}) {
|
|
211
|
-
if (endianness() !== "LE") throw new Error("writeLocalKimodoNpz: only little-endian local hosts are supported");
|
|
212
|
-
if (expectedFrames !== undefined && (!Number.isSafeInteger(expectedFrames) || expectedFrames < 1)) {
|
|
213
|
-
throw new Error("writeLocalKimodoNpz: expectedFrames must be a positive integer");
|
|
214
|
-
}
|
|
215
|
-
const roots = readFloats(join(outputDir, "root_positions.f32"));
|
|
216
|
-
if (roots.length % 3 !== 0) {
|
|
217
|
-
throw new Error("writeLocalKimodoNpz: root_positions.f32 must contain complete XYZ frames");
|
|
218
|
-
}
|
|
219
|
-
const frames = roots.length / 3;
|
|
220
|
-
if (expectedFrames !== undefined && frames !== expectedFrames) {
|
|
221
|
-
throw new Error(`writeLocalKimodoNpz: expected ${expectedFrames} frames, root_positions.f32 contains ${frames}`);
|
|
222
|
-
}
|
|
223
|
-
const quaternions = readFloats(join(outputDir, "local_rotations_xyzw.f32"));
|
|
224
|
-
if (quaternions.length !== frames * 30 * 4) {
|
|
225
|
-
throw new Error(`writeLocalKimodoNpz: local_rotations_xyzw.f32 must contain ${frames} frames of 30 SOMA joints (${frames * 30 * 16} bytes), got ${quaternions.byteLength} bytes`);
|
|
226
|
-
}
|
|
227
|
-
const posedJoints = new Float32Array(frames * 77 * 3);
|
|
228
|
-
const globalRotMats = new Float32Array(frames * 77 * 9);
|
|
229
|
-
const locals = new Array(77);
|
|
230
|
-
for (const [joint, matrix] of RELAXED_LOCALS) locals[joint] = matrix;
|
|
231
|
-
for (let frame = 0; frame < frames; frame++) {
|
|
232
|
-
for (let joint = 0; joint < 30; joint++) {
|
|
233
|
-
locals[SOMA30_TO_77[joint]] = quaternionMatrix(quaternions, (frame * 30 + joint) * 4, frame, joint);
|
|
234
|
-
}
|
|
235
|
-
// Keep intermediate FK in double precision; serialize only the final arrays.
|
|
236
|
-
const globals = new Array(77);
|
|
237
|
-
const positions = new Array(77);
|
|
238
|
-
for (let joint = 0; joint < 77; joint++) {
|
|
239
|
-
const parent = PARENTS[joint];
|
|
240
|
-
if (parent < 0) {
|
|
241
|
-
globals[joint] = locals[joint];
|
|
242
|
-
positions[joint] = Array.from(roots.subarray(frame * 3, frame * 3 + 3));
|
|
243
|
-
} else {
|
|
244
|
-
const a = globals[parent], b = locals[joint], offset = OFFSETS[joint];
|
|
245
|
-
const rotation = new Array(9).fill(0);
|
|
246
|
-
const position = positions[parent].slice();
|
|
247
|
-
for (let row = 0; row < 3; row++) {
|
|
248
|
-
for (let k = 0; k < 3; k++) {
|
|
249
|
-
position[row] += a[row * 3 + k] * offset[k];
|
|
250
|
-
for (let col = 0; col < 3; col++) rotation[row * 3 + col] += a[row * 3 + k] * b[k * 3 + col];
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
globals[joint] = rotation;
|
|
254
|
-
positions[joint] = position;
|
|
255
|
-
}
|
|
256
|
-
posedJoints.set(positions[joint], (frame * 77 + joint) * 3);
|
|
257
|
-
globalRotMats.set(globals[joint], (frame * 77 + joint) * 9);
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
writeNpz(npzPath, {
|
|
261
|
-
posed_joints: { data: posedJoints, shape: [frames, 77, 3] },
|
|
262
|
-
global_rot_mats: { data: globalRotMats, shape: [frames, 77, 3, 3] },
|
|
263
|
-
fps: { data: new Int32Array([30]), shape: [] },
|
|
264
|
-
});
|
|
265
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* measure-pose.mjs — how closely did a generated take hit its pinned pose?
|
|
4
|
-
*
|
|
5
|
-
* Compares the GLOBAL rotation of every authored joint at the pinned frame
|
|
6
|
-
* against the authored pose, in degrees. Globals rather than locals because a
|
|
7
|
-
* local error high in the chain is inherited by everything below it, which would
|
|
8
|
-
* count one mistake many times; the global is what the viewer actually sees.
|
|
9
|
-
*
|
|
10
|
-
* usage: measure-pose.mjs <take.npz> <pose.npz> <frame>
|
|
11
|
-
*/
|
|
12
|
-
import { readNpz } from "./read-npz.mjs";
|
|
13
|
-
import { globalRotations, matMul, matTranspose } from "../../src/ardy/convert.js";
|
|
14
|
-
import { CSKEL27_JOINTS } from "../../src/ardy/cskel27.js";
|
|
15
|
-
|
|
16
|
-
const [, , takePath, posePath, frameArg] = process.argv;
|
|
17
|
-
if (!takePath || !posePath) {
|
|
18
|
-
console.error("usage: measure-pose.mjs <take.npz> <pose.npz> <frame>");
|
|
19
|
-
process.exit(2);
|
|
20
|
-
}
|
|
21
|
-
const frame = Number(frameArg);
|
|
22
|
-
|
|
23
|
-
const readLocals = (members, f) => {
|
|
24
|
-
const rot = members.local_rot_mats;
|
|
25
|
-
const J = rot.shape.at(-3);
|
|
26
|
-
const out = [];
|
|
27
|
-
for (let j = 0; j < J; j += 1) {
|
|
28
|
-
const base = (f * J + j) * 9;
|
|
29
|
-
out.push([
|
|
30
|
-
[rot.data[base], rot.data[base + 1], rot.data[base + 2]],
|
|
31
|
-
[rot.data[base + 3], rot.data[base + 4], rot.data[base + 5]],
|
|
32
|
-
[rot.data[base + 6], rot.data[base + 7], rot.data[base + 8]],
|
|
33
|
-
]);
|
|
34
|
-
}
|
|
35
|
-
return out;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
const take = readNpz(takePath);
|
|
39
|
-
const pose = readNpz(posePath);
|
|
40
|
-
const authoredIdx = pose.rotation_constraint_indices
|
|
41
|
-
? Array.from(pose.rotation_constraint_indices.data, (v) => Math.round(v))
|
|
42
|
-
: CSKEL27_JOINTS.map((_, i) => i);
|
|
43
|
-
|
|
44
|
-
const takeGlobals = globalRotations(readLocals(take, frame));
|
|
45
|
-
const poseGlobals = globalRotations(readLocals(pose, 0));
|
|
46
|
-
|
|
47
|
-
const angleBetween = (a, b) => {
|
|
48
|
-
const d = matMul(matTranspose(a), b);
|
|
49
|
-
const trace = d[0][0] + d[1][1] + d[2][2];
|
|
50
|
-
return (Math.acos(Math.min(1, Math.max(-1, (trace - 1) / 2))) * 180) / Math.PI;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
let sum = 0;
|
|
54
|
-
const rows = [];
|
|
55
|
-
for (const j of authoredIdx) {
|
|
56
|
-
const deg = angleBetween(poseGlobals[j], takeGlobals[j]);
|
|
57
|
-
sum += deg;
|
|
58
|
-
rows.push({ name: CSKEL27_JOINTS[j], deg });
|
|
59
|
-
}
|
|
60
|
-
rows.sort((a, b) => b.deg - a.deg);
|
|
61
|
-
console.log(`pinned frame ${frame}, ${authoredIdx.length} authored joints`);
|
|
62
|
-
for (const r of rows) console.log(` ${r.name.padEnd(16)} ${r.deg.toFixed(1)} deg`);
|
|
63
|
-
const mean = sum / authoredIdx.length;
|
|
64
|
-
console.log(`MEAN_ERROR_DEG=${mean.toFixed(2)}`);
|
|
65
|
-
console.log(`MAX_ERROR_DEG=${rows[0].deg.toFixed(2)}`);
|