@dreamerbird/camera-studio 0.0.0-stage → 0.2.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/LICENSE +866 -0
- package/assets/models/Y Bot.glb +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-base-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-base-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-point-relaxed-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-point-relaxed-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-point-straight-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-point-straight-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-relaxed-01-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-relaxed-01-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-relaxed-02-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-relaxed-02-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-relaxed-03-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-relaxed-03-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-relaxed-04-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-relaxed-04-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-relaxed-05-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-relaxed-05-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-relaxed-06-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-01-base-relaxed-06-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-bowl-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-bowl-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-card-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-card-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-claw-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-claw-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-fist-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-fist-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-grip-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-grip-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-ko-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-ko-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-nail-check-01-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-nail-check-01-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-nail-check-02-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-nail-check-02-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-offer-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-offer-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-push-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-push-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-push-the-button-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-push-the-button-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-scratch-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-scratch-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-spread-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-spread-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-write-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-02-other-write-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-cobblepot-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-cobblepot-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-fingers-crossed-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-fingers-crossed-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-five-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-five-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-four-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-four-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-four-ring-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-four-ring-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-fu-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-fu-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-index-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-index-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-martian-reactor-switch-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-martian-reactor-switch-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-one-does-not-simply-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-one-does-not-simply-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-peace-flipped-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-peace-flipped.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-peace-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-peace-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-perfect-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-perfect-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-pinky-swear-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-pinky-swear-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-rock-out-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-rock-out-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-scout-salute-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-scout-salute-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-spock-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-spock-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-stop-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-stop-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-surf-s-up-flipped-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-surf-s-up-flipped-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-surf-s-up-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-surf-s-up-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-three-hicox-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-three-hicox-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-three-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-three-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-three-ring-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-three-ring-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-thumbs-up-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-03-signs-thumbs-up-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-detonator-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-detonator-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-grip-sword-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-grip-sword-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-gun-01-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-gun-01-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-gun-02-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-gun-02-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-gun-03-l-cock-the-hammer.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-gun-03-r-cock-the-hammer.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-hadoken-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-hadoken-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-pistol-double-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-pistol-double-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-pistol-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-pistol-r.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-throw-l.png +0 -0
- package/assets/poseThumbs/qbx-hands-04-weapons-throw-r.png +0 -0
- package/dist/Anchors.d.ts +11 -0
- package/dist/Anchors.d.ts.map +1 -0
- package/dist/Anchors.js +315 -0
- package/dist/App.hostFlows.test.d.ts +2 -0
- package/dist/App.hostFlows.test.d.ts.map +1 -0
- package/dist/App.hostFlows.test.js +48 -0
- package/dist/CameraPath.d.ts +130 -0
- package/dist/CameraPath.d.ts.map +1 -0
- package/dist/CameraPath.js +920 -0
- package/dist/CameraScene.d.ts +45 -0
- package/dist/CameraScene.d.ts.map +1 -0
- package/dist/CameraScene.js +1777 -0
- package/dist/CameraScene.test.d.ts +2 -0
- package/dist/CameraScene.test.d.ts.map +1 -0
- package/dist/CameraScene.test.js +259 -0
- package/dist/PathPresetDropRig.d.ts +27 -0
- package/dist/PathPresetDropRig.d.ts.map +1 -0
- package/dist/PathPresetDropRig.js +192 -0
- package/dist/PathPresetThumb.d.ts +11 -0
- package/dist/PathPresetThumb.d.ts.map +1 -0
- package/dist/PathPresetThumb.js +85 -0
- package/dist/PipCameraSelector.d.ts +15 -0
- package/dist/PipCameraSelector.d.ts.map +1 -0
- package/dist/PipCameraSelector.js +92 -0
- package/dist/PlacementManager.d.ts +252 -0
- package/dist/PlacementManager.d.ts.map +1 -0
- package/dist/PlacementManager.js +1552 -0
- package/dist/ShotCamera.d.ts +21 -0
- package/dist/ShotCamera.d.ts.map +1 -0
- package/dist/ShotCamera.js +568 -0
- package/dist/TopToolbar.d.ts +43 -0
- package/dist/TopToolbar.d.ts.map +1 -0
- package/dist/TopToolbar.js +167 -0
- package/dist/TopToolbar.test.d.ts +2 -0
- package/dist/TopToolbar.test.d.ts.map +1 -0
- package/dist/TopToolbar.test.js +107 -0
- package/dist/agent/api.d.ts +95 -0
- package/dist/agent/api.d.ts.map +1 -0
- package/dist/agent/api.js +337 -0
- package/dist/agent/api.test.d.ts +2 -0
- package/dist/agent/api.test.d.ts.map +1 -0
- package/dist/agent/api.test.js +907 -0
- package/dist/agent/bridgeClient.d.ts +62 -0
- package/dist/agent/bridgeClient.d.ts.map +1 -0
- package/dist/agent/bridgeClient.js +277 -0
- package/dist/agent/bridgeClient.test.d.ts +2 -0
- package/dist/agent/bridgeClient.test.d.ts.map +1 -0
- package/dist/agent/bridgeClient.test.js +413 -0
- package/dist/agent/bridgeFiles.d.ts +33 -0
- package/dist/agent/bridgeFiles.d.ts.map +1 -0
- package/dist/agent/bridgeFiles.js +193 -0
- package/dist/agent/bridgeFiles.test.d.ts +2 -0
- package/dist/agent/bridgeFiles.test.d.ts.map +1 -0
- package/dist/agent/bridgeFiles.test.js +220 -0
- package/dist/agent/commands/anchors.d.ts +43 -0
- package/dist/agent/commands/anchors.d.ts.map +1 -0
- package/dist/agent/commands/anchors.js +331 -0
- package/dist/agent/commands/anchors.test.d.ts +2 -0
- package/dist/agent/commands/anchors.test.d.ts.map +1 -0
- package/dist/agent/commands/anchors.test.js +447 -0
- package/dist/agent/commands/animations.d.ts +47 -0
- package/dist/agent/commands/animations.d.ts.map +1 -0
- package/dist/agent/commands/animations.js +245 -0
- package/dist/agent/commands/animations.test.d.ts +2 -0
- package/dist/agent/commands/animations.test.d.ts.map +1 -0
- package/dist/agent/commands/animations.test.js +426 -0
- package/dist/agent/commands/assets.d.ts +34 -0
- package/dist/agent/commands/assets.d.ts.map +1 -0
- package/dist/agent/commands/assets.js +367 -0
- package/dist/agent/commands/assets.test.d.ts +2 -0
- package/dist/agent/commands/assets.test.d.ts.map +1 -0
- package/dist/agent/commands/assets.test.js +405 -0
- package/dist/agent/commands/bindings.realStudio.test.d.ts +21 -0
- package/dist/agent/commands/bindings.realStudio.test.d.ts.map +1 -0
- package/dist/agent/commands/bindings.realStudio.test.js +281 -0
- package/dist/agent/commands/cameras.d.ts +65 -0
- package/dist/agent/commands/cameras.d.ts.map +1 -0
- package/dist/agent/commands/cameras.js +498 -0
- package/dist/agent/commands/cameras.test.d.ts +2 -0
- package/dist/agent/commands/cameras.test.d.ts.map +1 -0
- package/dist/agent/commands/cameras.test.js +560 -0
- package/dist/agent/commands/delete.test.d.ts +2 -0
- package/dist/agent/commands/delete.test.d.ts.map +1 -0
- package/dist/agent/commands/delete.test.js +518 -0
- package/dist/agent/commands/exports.d.ts +12 -0
- package/dist/agent/commands/exports.d.ts.map +1 -0
- package/dist/agent/commands/exports.js +132 -0
- package/dist/agent/commands/exports.test.d.ts +2 -0
- package/dist/agent/commands/exports.test.d.ts.map +1 -0
- package/dist/agent/commands/exports.test.js +402 -0
- package/dist/agent/commands/history.d.ts +17 -0
- package/dist/agent/commands/history.d.ts.map +1 -0
- package/dist/agent/commands/history.js +96 -0
- package/dist/agent/commands/history.test.d.ts +2 -0
- package/dist/agent/commands/history.test.d.ts.map +1 -0
- package/dist/agent/commands/history.test.js +140 -0
- package/dist/agent/commands/jobs.d.ts +23 -0
- package/dist/agent/commands/jobs.d.ts.map +1 -0
- package/dist/agent/commands/jobs.js +66 -0
- package/dist/agent/commands/keyframes.d.ts +42 -0
- package/dist/agent/commands/keyframes.d.ts.map +1 -0
- package/dist/agent/commands/keyframes.js +310 -0
- package/dist/agent/commands/keyframes.realStudio.test.d.ts +11 -0
- package/dist/agent/commands/keyframes.realStudio.test.d.ts.map +1 -0
- package/dist/agent/commands/keyframes.realStudio.test.js +95 -0
- package/dist/agent/commands/keyframes.test.d.ts +2 -0
- package/dist/agent/commands/keyframes.test.d.ts.map +1 -0
- package/dist/agent/commands/keyframes.test.js +474 -0
- package/dist/agent/commands/models.d.ts +34 -0
- package/dist/agent/commands/models.d.ts.map +1 -0
- package/dist/agent/commands/models.js +137 -0
- package/dist/agent/commands/models.test.d.ts +2 -0
- package/dist/agent/commands/models.test.d.ts.map +1 -0
- package/dist/agent/commands/models.test.js +268 -0
- package/dist/agent/commands/objects.d.ts +4 -0
- package/dist/agent/commands/objects.d.ts.map +1 -0
- package/dist/agent/commands/objects.js +182 -0
- package/dist/agent/commands/objects.test.d.ts +2 -0
- package/dist/agent/commands/objects.test.d.ts.map +1 -0
- package/dist/agent/commands/objects.test.js +316 -0
- package/dist/agent/commands/paths.d.ts +111 -0
- package/dist/agent/commands/paths.d.ts.map +1 -0
- package/dist/agent/commands/paths.js +576 -0
- package/dist/agent/commands/paths.test.d.ts +2 -0
- package/dist/agent/commands/paths.test.d.ts.map +1 -0
- package/dist/agent/commands/paths.test.js +773 -0
- package/dist/agent/commands/poses.d.ts +101 -0
- package/dist/agent/commands/poses.d.ts.map +1 -0
- package/dist/agent/commands/poses.js +500 -0
- package/dist/agent/commands/poses.realStudio.test.d.ts +15 -0
- package/dist/agent/commands/poses.realStudio.test.d.ts.map +1 -0
- package/dist/agent/commands/poses.realStudio.test.js +161 -0
- package/dist/agent/commands/poses.test.d.ts +2 -0
- package/dist/agent/commands/poses.test.d.ts.map +1 -0
- package/dist/agent/commands/poses.test.js +735 -0
- package/dist/agent/commands/project.d.ts +12 -0
- package/dist/agent/commands/project.d.ts.map +1 -0
- package/dist/agent/commands/project.js +42 -0
- package/dist/agent/commands/project.test.d.ts +2 -0
- package/dist/agent/commands/project.test.d.ts.map +1 -0
- package/dist/agent/commands/project.test.js +125 -0
- package/dist/agent/commands/revision.realStudio.test.d.ts +14 -0
- package/dist/agent/commands/revision.realStudio.test.d.ts.map +1 -0
- package/dist/agent/commands/revision.realStudio.test.js +129 -0
- package/dist/agent/commands/scene.d.ts +32 -0
- package/dist/agent/commands/scene.d.ts.map +1 -0
- package/dist/agent/commands/scene.js +100 -0
- package/dist/agent/commands/scene.test.d.ts +2 -0
- package/dist/agent/commands/scene.test.d.ts.map +1 -0
- package/dist/agent/commands/scene.test.js +147 -0
- package/dist/agent/commands/selection.d.ts +21 -0
- package/dist/agent/commands/selection.d.ts.map +1 -0
- package/dist/agent/commands/selection.js +101 -0
- package/dist/agent/commands/selection.test.d.ts +2 -0
- package/dist/agent/commands/selection.test.d.ts.map +1 -0
- package/dist/agent/commands/selection.test.js +173 -0
- package/dist/agent/commands/sequence.d.ts +25 -0
- package/dist/agent/commands/sequence.d.ts.map +1 -0
- package/dist/agent/commands/sequence.js +174 -0
- package/dist/agent/commands/sequence.test.d.ts +2 -0
- package/dist/agent/commands/sequence.test.d.ts.map +1 -0
- package/dist/agent/commands/sequence.test.js +264 -0
- package/dist/agent/commands/ui.d.ts +40 -0
- package/dist/agent/commands/ui.d.ts.map +1 -0
- package/dist/agent/commands/ui.js +166 -0
- package/dist/agent/commands/view.d.ts +61 -0
- package/dist/agent/commands/view.d.ts.map +1 -0
- package/dist/agent/commands/view.js +229 -0
- package/dist/agent/commands/view.test.d.ts +2 -0
- package/dist/agent/commands/view.test.d.ts.map +1 -0
- package/dist/agent/commands/view.test.js +347 -0
- package/dist/agent/contractCoverage.test.d.ts +2 -0
- package/dist/agent/contractCoverage.test.d.ts.map +1 -0
- package/dist/agent/contractCoverage.test.js +87 -0
- package/dist/agent/deleteHandlers.d.ts +61 -0
- package/dist/agent/deleteHandlers.d.ts.map +1 -0
- package/dist/agent/deleteHandlers.js +41 -0
- package/dist/agent/errors.d.ts +24 -0
- package/dist/agent/errors.d.ts.map +1 -0
- package/dist/agent/errors.js +59 -0
- package/dist/agent/errors.test.d.ts +2 -0
- package/dist/agent/errors.test.d.ts.map +1 -0
- package/dist/agent/errors.test.js +25 -0
- package/dist/agent/expectedCommands.d.ts +9 -0
- package/dist/agent/expectedCommands.d.ts.map +1 -0
- package/dist/agent/expectedCommands.js +79 -0
- package/dist/agent/jobs.d.ts +52 -0
- package/dist/agent/jobs.d.ts.map +1 -0
- package/dist/agent/jobs.js +175 -0
- package/dist/agent/jobs.test.d.ts +2 -0
- package/dist/agent/jobs.test.d.ts.map +1 -0
- package/dist/agent/jobs.test.js +281 -0
- package/dist/agent/keyframeTracks.d.ts +57 -0
- package/dist/agent/keyframeTracks.d.ts.map +1 -0
- package/dist/agent/keyframeTracks.js +127 -0
- package/dist/agent/objectIds.d.ts +7 -0
- package/dist/agent/objectIds.d.ts.map +1 -0
- package/dist/agent/objectIds.js +20 -0
- package/dist/agent/objectIds.test.d.ts +2 -0
- package/dist/agent/objectIds.test.d.ts.map +1 -0
- package/dist/agent/objectIds.test.js +10 -0
- package/dist/agent/objectResolver.d.ts +34 -0
- package/dist/agent/objectResolver.d.ts.map +1 -0
- package/dist/agent/objectResolver.js +112 -0
- package/dist/agent/pathCommands.d.ts +78 -0
- package/dist/agent/pathCommands.d.ts.map +1 -0
- package/dist/agent/pathCommands.js +240 -0
- package/dist/agent/propAccess.d.ts +42 -0
- package/dist/agent/propAccess.d.ts.map +1 -0
- package/dist/agent/propAccess.js +181 -0
- package/dist/agent/registerCommands.d.ts +9 -0
- package/dist/agent/registerCommands.d.ts.map +1 -0
- package/dist/agent/registerCommands.js +77 -0
- package/dist/agent/registry.d.ts +33 -0
- package/dist/agent/registry.d.ts.map +1 -0
- package/dist/agent/registry.js +55 -0
- package/dist/agent/registry.test.d.ts +2 -0
- package/dist/agent/registry.test.d.ts.map +1 -0
- package/dist/agent/registry.test.js +106 -0
- package/dist/agent/runtime/animationStatus.d.ts +25 -0
- package/dist/agent/runtime/animationStatus.d.ts.map +1 -0
- package/dist/agent/runtime/animationStatus.js +13 -0
- package/dist/agent/runtime/cameraLifecycle.d.ts +37 -0
- package/dist/agent/runtime/cameraLifecycle.d.ts.map +1 -0
- package/dist/agent/runtime/cameraLifecycle.js +112 -0
- package/dist/agent/runtime/directorView.d.ts +42 -0
- package/dist/agent/runtime/directorView.d.ts.map +1 -0
- package/dist/agent/runtime/directorView.js +27 -0
- package/dist/agent/runtime/exportRuntime.d.ts +95 -0
- package/dist/agent/runtime/exportRuntime.d.ts.map +1 -0
- package/dist/agent/runtime/exportRuntime.js +227 -0
- package/dist/agent/runtime/objectRuntime.d.ts +26 -0
- package/dist/agent/runtime/objectRuntime.d.ts.map +1 -0
- package/dist/agent/runtime/objectRuntime.js +29 -0
- package/dist/agent/runtime/pathRuntime.d.ts +21 -0
- package/dist/agent/runtime/pathRuntime.d.ts.map +1 -0
- package/dist/agent/runtime/pathRuntime.js +13 -0
- package/dist/agent/runtime/placementLifecycle.d.ts +34 -0
- package/dist/agent/runtime/placementLifecycle.d.ts.map +1 -0
- package/dist/agent/runtime/placementLifecycle.js +63 -0
- package/dist/agent/runtime/placementLifecycle.test.d.ts +2 -0
- package/dist/agent/runtime/placementLifecycle.test.d.ts.map +1 -0
- package/dist/agent/runtime/placementLifecycle.test.js +68 -0
- package/dist/agent/runtime/poseSessionRuntime.d.ts +17 -0
- package/dist/agent/runtime/poseSessionRuntime.d.ts.map +1 -0
- package/dist/agent/runtime/poseSessionRuntime.js +64 -0
- package/dist/agent/runtime.d.ts +67 -0
- package/dist/agent/runtime.d.ts.map +1 -0
- package/dist/agent/runtime.js +214 -0
- package/dist/agent/runtime.test.d.ts +2 -0
- package/dist/agent/runtime.test.d.ts.map +1 -0
- package/dist/agent/runtime.test.js +142 -0
- package/dist/agent/sequenceLength.d.ts +20 -0
- package/dist/agent/sequenceLength.d.ts.map +1 -0
- package/dist/agent/sequenceLength.js +18 -0
- package/dist/agent/types.d.ts +70 -0
- package/dist/agent/types.d.ts.map +1 -0
- package/dist/agent/types.js +6 -0
- package/dist/agent/validation.d.ts +7 -0
- package/dist/agent/validation.d.ts.map +1 -0
- package/dist/agent/validation.js +39 -0
- package/dist/aimTargets.d.ts +128 -0
- package/dist/aimTargets.d.ts.map +1 -0
- package/dist/aimTargets.js +367 -0
- package/dist/aimTargets.test.d.ts +2 -0
- package/dist/aimTargets.test.d.ts.map +1 -0
- package/dist/aimTargets.test.js +84 -0
- package/dist/anchorParenting.test.d.ts +2 -0
- package/dist/anchorParenting.test.d.ts.map +1 -0
- package/dist/anchorParenting.test.js +87 -0
- package/dist/anchorsRegistry.d.ts +45 -0
- package/dist/anchorsRegistry.d.ts.map +1 -0
- package/dist/anchorsRegistry.js +101 -0
- package/dist/anchorsRegistry.test.d.ts +2 -0
- package/dist/anchorsRegistry.test.d.ts.map +1 -0
- package/dist/anchorsRegistry.test.js +29 -0
- package/dist/assetLibrary/AssetLibraryPanel.d.ts +35 -0
- package/dist/assetLibrary/AssetLibraryPanel.d.ts.map +1 -0
- package/dist/assetLibrary/AssetLibraryPanel.js +544 -0
- package/dist/assetLibrary/AssetLibraryPanel.viewer.test.d.ts +2 -0
- package/dist/assetLibrary/AssetLibraryPanel.viewer.test.d.ts.map +1 -0
- package/dist/assetLibrary/AssetLibraryPanel.viewer.test.js +133 -0
- package/dist/assetLibrary/ModelPickerSlot.d.ts +24 -0
- package/dist/assetLibrary/ModelPickerSlot.d.ts.map +1 -0
- package/dist/assetLibrary/ModelPickerSlot.js +32 -0
- package/dist/assetLibrary/catalogThumbs.d.ts +7 -0
- package/dist/assetLibrary/catalogThumbs.d.ts.map +1 -0
- package/dist/assetLibrary/catalogThumbs.js +75 -0
- package/dist/assetLibrary/classify.d.ts +14 -0
- package/dist/assetLibrary/classify.d.ts.map +1 -0
- package/dist/assetLibrary/classify.js +43 -0
- package/dist/assetLibrary/classify.test.d.ts +2 -0
- package/dist/assetLibrary/classify.test.d.ts.map +1 -0
- package/dist/assetLibrary/classify.test.js +44 -0
- package/dist/assetLibrary/contract.indexeddb.test.d.ts +2 -0
- package/dist/assetLibrary/contract.indexeddb.test.d.ts.map +1 -0
- package/dist/assetLibrary/contract.indexeddb.test.js +10 -0
- package/dist/assetLibrary/contractTests.d.ts +12 -0
- package/dist/assetLibrary/contractTests.d.ts.map +1 -0
- package/dist/assetLibrary/contractTests.js +51 -0
- package/dist/assetLibrary/dispose.d.ts +4 -0
- package/dist/assetLibrary/dispose.d.ts.map +1 -0
- package/dist/assetLibrary/dispose.js +21 -0
- package/dist/assetLibrary/draco.d.ts +6 -0
- package/dist/assetLibrary/draco.d.ts.map +1 -0
- package/dist/assetLibrary/draco.js +45 -0
- package/dist/assetLibrary/draco.test.d.ts +2 -0
- package/dist/assetLibrary/draco.test.d.ts.map +1 -0
- package/dist/assetLibrary/draco.test.js +93 -0
- package/dist/assetLibrary/exportGLB.d.ts +45 -0
- package/dist/assetLibrary/exportGLB.d.ts.map +1 -0
- package/dist/assetLibrary/exportGLB.js +125 -0
- package/dist/assetLibrary/exportGLB.test.d.ts +2 -0
- package/dist/assetLibrary/exportGLB.test.d.ts.map +1 -0
- package/dist/assetLibrary/exportGLB.test.js +127 -0
- package/dist/assetLibrary/gltfLoader.d.ts +8 -0
- package/dist/assetLibrary/gltfLoader.d.ts.map +1 -0
- package/dist/assetLibrary/gltfLoader.js +11 -0
- package/dist/assetLibrary/hash.d.ts +7 -0
- package/dist/assetLibrary/hash.d.ts.map +1 -0
- package/dist/assetLibrary/hash.js +17 -0
- package/dist/assetLibrary/importModelFile.d.ts +5 -0
- package/dist/assetLibrary/importModelFile.d.ts.map +1 -0
- package/dist/assetLibrary/importModelFile.js +19 -0
- package/dist/assetLibrary/importModelFile.test.d.ts +2 -0
- package/dist/assetLibrary/importModelFile.test.d.ts.map +1 -0
- package/dist/assetLibrary/importModelFile.test.js +77 -0
- package/dist/assetLibrary/importPipeline.d.ts +61 -0
- package/dist/assetLibrary/importPipeline.d.ts.map +1 -0
- package/dist/assetLibrary/importPipeline.js +253 -0
- package/dist/assetLibrary/importPipeline.test.d.ts +2 -0
- package/dist/assetLibrary/importPipeline.test.d.ts.map +1 -0
- package/dist/assetLibrary/importPipeline.test.js +188 -0
- package/dist/assetLibrary/indexedDBBackend.d.ts +31 -0
- package/dist/assetLibrary/indexedDBBackend.d.ts.map +1 -0
- package/dist/assetLibrary/indexedDBBackend.js +134 -0
- package/dist/assetLibrary/indexedDBBackend.test.d.ts +2 -0
- package/dist/assetLibrary/indexedDBBackend.test.d.ts.map +1 -0
- package/dist/assetLibrary/indexedDBBackend.test.js +148 -0
- package/dist/assetLibrary/legacySeedCleanup.d.ts +19 -0
- package/dist/assetLibrary/legacySeedCleanup.d.ts.map +1 -0
- package/dist/assetLibrary/legacySeedCleanup.js +50 -0
- package/dist/assetLibrary/legacySeedCleanup.test.d.ts +2 -0
- package/dist/assetLibrary/legacySeedCleanup.test.d.ts.map +1 -0
- package/dist/assetLibrary/legacySeedCleanup.test.js +74 -0
- package/dist/assetLibrary/library.d.ts +122 -0
- package/dist/assetLibrary/library.d.ts.map +1 -0
- package/dist/assetLibrary/library.js +424 -0
- package/dist/assetLibrary/library.test.d.ts +2 -0
- package/dist/assetLibrary/library.test.d.ts.map +1 -0
- package/dist/assetLibrary/library.test.js +520 -0
- package/dist/assetLibrary/options.d.ts +9 -0
- package/dist/assetLibrary/options.d.ts.map +1 -0
- package/dist/assetLibrary/options.js +20 -0
- package/dist/assetLibrary/options.test.d.ts +2 -0
- package/dist/assetLibrary/options.test.d.ts.map +1 -0
- package/dist/assetLibrary/options.test.js +70 -0
- package/dist/assetLibrary/pose.d.ts +15 -0
- package/dist/assetLibrary/pose.d.ts.map +1 -0
- package/dist/assetLibrary/pose.js +41 -0
- package/dist/assetLibrary/pose.test.d.ts +2 -0
- package/dist/assetLibrary/pose.test.d.ts.map +1 -0
- package/dist/assetLibrary/pose.test.js +45 -0
- package/dist/assetLibrary/poseThumbnail.d.ts +30 -0
- package/dist/assetLibrary/poseThumbnail.d.ts.map +1 -0
- package/dist/assetLibrary/poseThumbnail.js +144 -0
- package/dist/assetLibrary/poseThumbnail.test.d.ts +2 -0
- package/dist/assetLibrary/poseThumbnail.test.d.ts.map +1 -0
- package/dist/assetLibrary/poseThumbnail.test.js +111 -0
- package/dist/assetLibrary/rig.d.ts +14 -0
- package/dist/assetLibrary/rig.d.ts.map +1 -0
- package/dist/assetLibrary/rig.js +33 -0
- package/dist/assetLibrary/rig.test.d.ts +2 -0
- package/dist/assetLibrary/rig.test.d.ts.map +1 -0
- package/dist/assetLibrary/rig.test.js +55 -0
- package/dist/assetLibrary/seedAssetsManifest.d.ts +24 -0
- package/dist/assetLibrary/seedAssetsManifest.d.ts.map +1 -0
- package/dist/assetLibrary/seedAssetsManifest.js +347 -0
- package/dist/assetLibrary/seedBuiltinPoses.d.ts +29 -0
- package/dist/assetLibrary/seedBuiltinPoses.d.ts.map +1 -0
- package/dist/assetLibrary/seedBuiltinPoses.js +114 -0
- package/dist/assetLibrary/seedBuiltinPoses.test.d.ts +2 -0
- package/dist/assetLibrary/seedBuiltinPoses.test.d.ts.map +1 -0
- package/dist/assetLibrary/seedBuiltinPoses.test.js +176 -0
- package/dist/assetLibrary/seedPoses.d.ts +8 -0
- package/dist/assetLibrary/seedPoses.d.ts.map +1 -0
- package/dist/assetLibrary/seedPoses.js +2414 -0
- package/dist/assetLibrary/seedPosesDpl.d.ts +8 -0
- package/dist/assetLibrary/seedPosesDpl.d.ts.map +1 -0
- package/dist/assetLibrary/seedPosesDpl.js +11660 -0
- package/dist/assetLibrary/seedPosesQbx.d.ts +8 -0
- package/dist/assetLibrary/seedPosesQbx.d.ts.map +1 -0
- package/dist/assetLibrary/seedPosesQbx.js +5612 -0
- package/dist/assetLibrary/seedPosesQbx.test.d.ts +2 -0
- package/dist/assetLibrary/seedPosesQbx.test.d.ts.map +1 -0
- package/dist/assetLibrary/seedPosesQbx.test.js +181 -0
- package/dist/assetLibrary/source.d.ts +45 -0
- package/dist/assetLibrary/source.d.ts.map +1 -0
- package/dist/assetLibrary/source.js +11 -0
- package/dist/assetLibrary/source.test.d.ts +2 -0
- package/dist/assetLibrary/source.test.d.ts.map +1 -0
- package/dist/assetLibrary/source.test.js +28 -0
- package/dist/assetLibrary/staticCatalogSource.d.ts +48 -0
- package/dist/assetLibrary/staticCatalogSource.d.ts.map +1 -0
- package/dist/assetLibrary/staticCatalogSource.js +140 -0
- package/dist/assetLibrary/staticCatalogSource.test.d.ts +2 -0
- package/dist/assetLibrary/staticCatalogSource.test.d.ts.map +1 -0
- package/dist/assetLibrary/staticCatalogSource.test.js +154 -0
- package/dist/assetLibrary/thumbnail.d.ts +14 -0
- package/dist/assetLibrary/thumbnail.d.ts.map +1 -0
- package/dist/assetLibrary/thumbnail.js +70 -0
- package/dist/assetLibrary/types.d.ts +54 -0
- package/dist/assetLibrary/types.d.ts.map +1 -0
- package/dist/assetLibrary/types.js +1 -0
- package/dist/assetLibrary/useModelThumbUrl.d.ts +10 -0
- package/dist/assetLibrary/useModelThumbUrl.d.ts.map +1 -0
- package/dist/assetLibrary/useModelThumbUrl.js +56 -0
- package/dist/boneAnchorWiring.test.d.ts +2 -0
- package/dist/boneAnchorWiring.test.d.ts.map +1 -0
- package/dist/boneAnchorWiring.test.js +173 -0
- package/dist/boneAnchors.d.ts +30 -0
- package/dist/boneAnchors.d.ts.map +1 -0
- package/dist/boneAnchors.js +111 -0
- package/dist/boneAnchors.test.d.ts +2 -0
- package/dist/boneAnchors.test.d.ts.map +1 -0
- package/dist/boneAnchors.test.js +98 -0
- package/dist/bootstrap.d.ts +37 -0
- package/dist/bootstrap.d.ts.map +1 -0
- package/dist/bootstrap.js +394 -0
- package/dist/bootstrap.test.d.ts +2 -0
- package/dist/bootstrap.test.d.ts.map +1 -0
- package/dist/bootstrap.test.js +647 -0
- package/dist/cameraRegistry.d.ts +65 -0
- package/dist/cameraRegistry.d.ts.map +1 -0
- package/dist/cameraRegistry.js +151 -0
- package/dist/cameraRegistry.test.d.ts +2 -0
- package/dist/cameraRegistry.test.d.ts.map +1 -0
- package/dist/cameraRegistry.test.js +68 -0
- package/dist/config.d.ts +92 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +1 -0
- package/dist/contextMenu.d.ts +16 -0
- package/dist/contextMenu.d.ts.map +1 -0
- package/dist/contextMenu.js +10 -0
- package/dist/dropPoint.d.ts +61 -0
- package/dist/dropPoint.d.ts.map +1 -0
- package/dist/dropPoint.js +97 -0
- package/dist/dropPoint.test.d.ts +2 -0
- package/dist/dropPoint.test.d.ts.map +1 -0
- package/dist/dropPoint.test.js +174 -0
- package/dist/editorOnly.d.ts +6 -0
- package/dist/editorOnly.d.ts.map +1 -0
- package/dist/editorOnly.js +32 -0
- package/dist/errors.d.ts +24 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +13 -0
- package/dist/firstScreenGate.d.ts +28 -0
- package/dist/firstScreenGate.d.ts.map +1 -0
- package/dist/firstScreenGate.js +67 -0
- package/dist/firstScreenGate.test.d.ts +2 -0
- package/dist/firstScreenGate.test.d.ts.map +1 -0
- package/dist/firstScreenGate.test.js +83 -0
- package/dist/gestureProps.d.ts +99 -0
- package/dist/gestureProps.d.ts.map +1 -0
- package/dist/gestureProps.js +118 -0
- package/dist/gestureProps.test.d.ts +2 -0
- package/dist/gestureProps.test.d.ts.map +1 -0
- package/dist/gestureProps.test.js +182 -0
- package/dist/gesturePropsEditor.d.ts +27 -0
- package/dist/gesturePropsEditor.d.ts.map +1 -0
- package/dist/gesturePropsEditor.js +121 -0
- package/dist/getDeep.d.ts +8 -0
- package/dist/getDeep.d.ts.map +1 -0
- package/dist/getDeep.js +15 -0
- package/dist/gizmoRegistry.test.d.ts +2 -0
- package/dist/gizmoRegistry.test.d.ts.map +1 -0
- package/dist/gizmoRegistry.test.js +40 -0
- package/dist/hostFlows.d.ts +55 -0
- package/dist/hostFlows.d.ts.map +1 -0
- package/dist/hostFlows.js +77 -0
- package/dist/hostFlows.test.d.ts +2 -0
- package/dist/hostFlows.test.d.ts.map +1 -0
- package/dist/hostFlows.test.js +191 -0
- package/dist/i18n.d.ts +26 -0
- package/dist/i18n.d.ts.map +1 -0
- package/dist/i18n.js +271 -0
- package/dist/i18n.test.d.ts +2 -0
- package/dist/i18n.test.d.ts.map +1 -0
- package/dist/i18n.test.js +41 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/menuModel.d.ts +51 -0
- package/dist/menuModel.d.ts.map +1 -0
- package/dist/menuModel.js +111 -0
- package/dist/menuModel.test.d.ts +2 -0
- package/dist/menuModel.test.d.ts.map +1 -0
- package/dist/menuModel.test.js +197 -0
- package/dist/modalGrab.d.ts +29 -0
- package/dist/modalGrab.d.ts.map +1 -0
- package/dist/modalGrab.js +127 -0
- package/dist/outlineObjectMenu.d.ts +41 -0
- package/dist/outlineObjectMenu.d.ts.map +1 -0
- package/dist/outlineObjectMenu.js +58 -0
- package/dist/outlineObjectMenu.test.d.ts +2 -0
- package/dist/outlineObjectMenu.test.d.ts.map +1 -0
- package/dist/outlineObjectMenu.test.js +83 -0
- package/dist/pathBinding.d.ts +16 -0
- package/dist/pathBinding.d.ts.map +1 -0
- package/dist/pathBinding.js +19 -0
- package/dist/pathBinding.test.d.ts +2 -0
- package/dist/pathBinding.test.d.ts.map +1 -0
- package/dist/pathBinding.test.js +14 -0
- package/dist/pathModel.d.ts +123 -0
- package/dist/pathModel.d.ts.map +1 -0
- package/dist/pathModel.js +343 -0
- package/dist/pathModel.test.d.ts +2 -0
- package/dist/pathModel.test.d.ts.map +1 -0
- package/dist/pathModel.test.js +394 -0
- package/dist/pathPresets.d.ts +38 -0
- package/dist/pathPresets.d.ts.map +1 -0
- package/dist/pathPresets.js +180 -0
- package/dist/pathPresets.test.d.ts +2 -0
- package/dist/pathPresets.test.d.ts.map +1 -0
- package/dist/pathPresets.test.js +154 -0
- package/dist/pathRegistry.d.ts +46 -0
- package/dist/pathRegistry.d.ts.map +1 -0
- package/dist/pathRegistry.js +105 -0
- package/dist/pathRegistry.test.d.ts +2 -0
- package/dist/pathRegistry.test.d.ts.map +1 -0
- package/dist/pathRegistry.test.js +23 -0
- package/dist/pickerRegistry.d.ts +49 -0
- package/dist/pickerRegistry.d.ts.map +1 -0
- package/dist/pickerRegistry.js +17 -0
- package/dist/pickerRegistry.test.d.ts +2 -0
- package/dist/pickerRegistry.test.d.ts.map +1 -0
- package/dist/pickerRegistry.test.js +31 -0
- package/dist/pipLayout.d.ts +7 -0
- package/dist/pipLayout.d.ts.map +1 -0
- package/dist/pipLayout.js +58 -0
- package/dist/placementKey.test.d.ts +2 -0
- package/dist/placementKey.test.d.ts.map +1 -0
- package/dist/placementKey.test.js +32 -0
- package/dist/placementPoseProps.d.ts +29 -0
- package/dist/placementPoseProps.d.ts.map +1 -0
- package/dist/placementPoseProps.js +43 -0
- package/dist/placementPoseProps.test.d.ts +2 -0
- package/dist/placementPoseProps.test.d.ts.map +1 -0
- package/dist/placementPoseProps.test.js +35 -0
- package/dist/poseMode/PoseModeBar.d.ts +18 -0
- package/dist/poseMode/PoseModeBar.d.ts.map +1 -0
- package/dist/poseMode/PoseModeBar.js +127 -0
- package/dist/poseMode/PoseModeRig.d.ts +9 -0
- package/dist/poseMode/PoseModeRig.d.ts.map +1 -0
- package/dist/poseMode/PoseModeRig.js +300 -0
- package/dist/poseMode/PosePickerFrame.d.ts +42 -0
- package/dist/poseMode/PosePickerFrame.d.ts.map +1 -0
- package/dist/poseMode/PosePickerFrame.js +164 -0
- package/dist/poseMode/PosePropEditor.d.ts +30 -0
- package/dist/poseMode/PosePropEditor.d.ts.map +1 -0
- package/dist/poseMode/PosePropEditor.js +139 -0
- package/dist/poseMode/controlSpec.d.ts +26 -0
- package/dist/poseMode/controlSpec.d.ts.map +1 -0
- package/dist/poseMode/controlSpec.js +157 -0
- package/dist/poseMode/controlSpec.test.d.ts +2 -0
- package/dist/poseMode/controlSpec.test.d.ts.map +1 -0
- package/dist/poseMode/controlSpec.test.js +196 -0
- package/dist/poseMode/dragState.d.ts +16 -0
- package/dist/poseMode/dragState.d.ts.map +1 -0
- package/dist/poseMode/dragState.js +15 -0
- package/dist/poseMode/dragState.test.d.ts +2 -0
- package/dist/poseMode/dragState.test.d.ts.map +1 -0
- package/dist/poseMode/dragState.test.js +23 -0
- package/dist/poseMode/poseDisplayText.d.ts +18 -0
- package/dist/poseMode/poseDisplayText.d.ts.map +1 -0
- package/dist/poseMode/poseDisplayText.js +13 -0
- package/dist/poseMode/poseDisplayText.test.d.ts +2 -0
- package/dist/poseMode/poseDisplayText.test.d.ts.map +1 -0
- package/dist/poseMode/poseDisplayText.test.js +35 -0
- package/dist/poseMode/poseExitGuard.d.ts +8 -0
- package/dist/poseMode/poseExitGuard.d.ts.map +1 -0
- package/dist/poseMode/poseExitGuard.js +13 -0
- package/dist/poseMode/poseExitGuard.test.d.ts +2 -0
- package/dist/poseMode/poseExitGuard.test.d.ts.map +1 -0
- package/dist/poseMode/poseExitGuard.test.js +41 -0
- package/dist/poseMode/poseFrame.d.ts +11 -0
- package/dist/poseMode/poseFrame.d.ts.map +1 -0
- package/dist/poseMode/poseFrame.js +7 -0
- package/dist/poseMode/poseFrame.test.d.ts +2 -0
- package/dist/poseMode/poseFrame.test.d.ts.map +1 -0
- package/dist/poseMode/poseFrame.test.js +25 -0
- package/dist/poseMode/poseInterpolate.d.ts +4 -0
- package/dist/poseMode/poseInterpolate.d.ts.map +1 -0
- package/dist/poseMode/poseInterpolate.js +75 -0
- package/dist/poseMode/poseInterpolate.test.d.ts +2 -0
- package/dist/poseMode/poseInterpolate.test.d.ts.map +1 -0
- package/dist/poseMode/poseInterpolate.test.js +61 -0
- package/dist/poseMode/poseLibResolve.d.ts +9 -0
- package/dist/poseMode/poseLibResolve.d.ts.map +1 -0
- package/dist/poseMode/poseLibResolve.js +49 -0
- package/dist/poseMode/poseLibResolve.test.d.ts +2 -0
- package/dist/poseMode/poseLibResolve.test.d.ts.map +1 -0
- package/dist/poseMode/poseLibResolve.test.js +59 -0
- package/dist/poseMode/poseMigration.d.ts +5 -0
- package/dist/poseMode/poseMigration.d.ts.map +1 -0
- package/dist/poseMode/poseMigration.js +16 -0
- package/dist/poseMode/poseMigration.test.d.ts +2 -0
- package/dist/poseMode/poseMigration.test.d.ts.map +1 -0
- package/dist/poseMode/poseMigration.test.js +25 -0
- package/dist/poseMode/poseOptions.d.ts +45 -0
- package/dist/poseMode/poseOptions.d.ts.map +1 -0
- package/dist/poseMode/poseOptions.js +39 -0
- package/dist/poseMode/poseOptions.test.d.ts +2 -0
- package/dist/poseMode/poseOptions.test.d.ts.map +1 -0
- package/dist/poseMode/poseOptions.test.js +83 -0
- package/dist/poseMode/poseOverride.d.ts +13 -0
- package/dist/poseMode/poseOverride.d.ts.map +1 -0
- package/dist/poseMode/poseOverride.js +26 -0
- package/dist/poseMode/poseOverride.test.d.ts +2 -0
- package/dist/poseMode/poseOverride.test.d.ts.map +1 -0
- package/dist/poseMode/poseOverride.test.js +23 -0
- package/dist/poseMode/poseRetarget.d.ts +17 -0
- package/dist/poseMode/poseRetarget.d.ts.map +1 -0
- package/dist/poseMode/poseRetarget.js +53 -0
- package/dist/poseMode/poseRetarget.test.d.ts +2 -0
- package/dist/poseMode/poseRetarget.test.d.ts.map +1 -0
- package/dist/poseMode/poseRetarget.test.js +88 -0
- package/dist/poseMode/poseSession.d.ts +58 -0
- package/dist/poseMode/poseSession.d.ts.map +1 -0
- package/dist/poseMode/poseSession.js +183 -0
- package/dist/poseMode/poseSession.test.d.ts +2 -0
- package/dist/poseMode/poseSession.test.d.ts.map +1 -0
- package/dist/poseMode/poseSession.test.js +159 -0
- package/dist/poseMode/poseSessionHooks.test.d.ts +2 -0
- package/dist/poseMode/poseSessionHooks.test.d.ts.map +1 -0
- package/dist/poseMode/poseSessionHooks.test.js +49 -0
- package/dist/poseMode/poseTrack.d.ts +30 -0
- package/dist/poseMode/poseTrack.d.ts.map +1 -0
- package/dist/poseMode/poseTrack.js +155 -0
- package/dist/poseMode/poseTrack.test.d.ts +2 -0
- package/dist/poseMode/poseTrack.test.d.ts.map +1 -0
- package/dist/poseMode/poseTrack.test.js +84 -0
- package/dist/poseMode/poseValue.d.ts +22 -0
- package/dist/poseMode/poseValue.d.ts.map +1 -0
- package/dist/poseMode/poseValue.js +73 -0
- package/dist/poseMode/poseValue.test.d.ts +2 -0
- package/dist/poseMode/poseValue.test.d.ts.map +1 -0
- package/dist/poseMode/poseValue.test.js +62 -0
- package/dist/poseMode/savePose.d.ts +23 -0
- package/dist/poseMode/savePose.d.ts.map +1 -0
- package/dist/poseMode/savePose.js +29 -0
- package/dist/poseMode/selectionModes.d.ts +14 -0
- package/dist/poseMode/selectionModes.d.ts.map +1 -0
- package/dist/poseMode/selectionModes.js +39 -0
- package/dist/poseMode/selectionModes.test.d.ts +2 -0
- package/dist/poseMode/selectionModes.test.d.ts.map +1 -0
- package/dist/poseMode/selectionModes.test.js +91 -0
- package/dist/poseNameMessages.d.ts +13 -0
- package/dist/poseNameMessages.d.ts.map +1 -0
- package/dist/poseNameMessages.js +370 -0
- package/dist/poseNames.d.ts +14 -0
- package/dist/poseNames.d.ts.map +1 -0
- package/dist/poseNames.js +21 -0
- package/dist/poseNames.test.d.ts +2 -0
- package/dist/poseNames.test.d.ts.map +1 -0
- package/dist/poseNames.test.js +41 -0
- package/dist/poseStatusText.d.ts +2 -0
- package/dist/poseStatusText.d.ts.map +1 -0
- package/dist/poseStatusText.js +11 -0
- package/dist/poseStatusText.test.d.ts +2 -0
- package/dist/poseStatusText.test.d.ts.map +1 -0
- package/dist/poseStatusText.test.js +21 -0
- package/dist/presetThumbGeometry.d.ts +26 -0
- package/dist/presetThumbGeometry.d.ts.map +1 -0
- package/dist/presetThumbGeometry.js +103 -0
- package/dist/presetThumbGeometry.test.d.ts +2 -0
- package/dist/presetThumbGeometry.test.d.ts.map +1 -0
- package/dist/presetThumbGeometry.test.js +83 -0
- package/dist/selectionOutline.d.ts +42 -0
- package/dist/selectionOutline.d.ts.map +1 -0
- package/dist/selectionOutline.js +174 -0
- package/dist/selectionOutline.test.d.ts +2 -0
- package/dist/selectionOutline.test.d.ts.map +1 -0
- package/dist/selectionOutline.test.js +58 -0
- package/dist/smoke.test.d.ts +1 -0
- package/dist/smoke.test.d.ts.map +1 -0
- package/dist/smoke.test.js +17 -0
- package/dist/uiConfig.d.ts +16 -0
- package/dist/uiConfig.d.ts.map +1 -0
- package/dist/uiConfig.js +13 -0
- package/dist/uiConfig.test.d.ts +2 -0
- package/dist/uiConfig.test.d.ts.map +1 -0
- package/dist/uiConfig.test.js +98 -0
- package/dist/undoShortcuts.d.ts +28 -0
- package/dist/undoShortcuts.d.ts.map +1 -0
- package/dist/undoShortcuts.js +59 -0
- package/dist/undoShortcuts.test.d.ts +2 -0
- package/dist/undoShortcuts.test.d.ts.map +1 -0
- package/dist/undoShortcuts.test.js +37 -0
- package/dist/useCameraStudio.d.ts +3 -0
- package/dist/useCameraStudio.d.ts.map +1 -0
- package/dist/useCameraStudio.js +86 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +11 -0
- package/dist/videoExport/BlobCollectSink.d.ts +25 -0
- package/dist/videoExport/BlobCollectSink.d.ts.map +1 -0
- package/dist/videoExport/BlobCollectSink.js +56 -0
- package/dist/videoExport/BlobCollectSink.test.d.ts +2 -0
- package/dist/videoExport/BlobCollectSink.test.d.ts.map +1 -0
- package/dist/videoExport/BlobCollectSink.test.js +78 -0
- package/dist/videoExport/encoder.d.ts +34 -0
- package/dist/videoExport/encoder.d.ts.map +1 -0
- package/dist/videoExport/encoder.js +61 -0
- package/dist/videoExport/encoder.test.d.ts +2 -0
- package/dist/videoExport/encoder.test.d.ts.map +1 -0
- package/dist/videoExport/encoder.test.js +21 -0
- package/dist/videoExport/exporter.d.ts +24 -0
- package/dist/videoExport/exporter.d.ts.map +1 -0
- package/dist/videoExport/exporter.js +74 -0
- package/dist/videoExport/sinks.d.ts +55 -0
- package/dist/videoExport/sinks.d.ts.map +1 -0
- package/dist/videoExport/sinks.js +69 -0
- package/package.json +59 -3
- package/README.md +0 -3
|
@@ -0,0 +1,735 @@
|
|
|
1
|
+
let projectSeq = 0;
|
|
2
|
+
/** 晚绑定:doMock 工厂只跑一次,两个 Studio 通道都读当前 setup 的 studio */
|
|
3
|
+
let activeFakeStudio;
|
|
4
|
+
jest.doMock('@dreamerbird/core', () => ({
|
|
5
|
+
...jest.requireActual('@dreamerbird/core'),
|
|
6
|
+
getStudioSync: () => activeFakeStudio,
|
|
7
|
+
}));
|
|
8
|
+
jest.doMock('@dreamerbird/studio/getStudio', () => ({
|
|
9
|
+
__esModule: true,
|
|
10
|
+
default: () => activeFakeStudio,
|
|
11
|
+
}));
|
|
12
|
+
/** 缩略图补图是后台旁路:本套件只验证它被触发,不跑真实离屏渲染 */
|
|
13
|
+
const backfillPoseThumbnails = jest.fn(async (_lib, _opts) => { });
|
|
14
|
+
jest.doMock('../../assetLibrary/poseThumbnail', () => ({
|
|
15
|
+
__esModule: true,
|
|
16
|
+
backfillPoseThumbnails: (lib, opts) => backfillPoseThumbnails(lib, opts),
|
|
17
|
+
}));
|
|
18
|
+
const cleanups = [];
|
|
19
|
+
afterEach(() => {
|
|
20
|
+
backfillPoseThumbnails.mockClear();
|
|
21
|
+
while (cleanups.length)
|
|
22
|
+
cleanups.pop()();
|
|
23
|
+
});
|
|
24
|
+
const ctx = () => ({
|
|
25
|
+
requestId: 'test',
|
|
26
|
+
signal: new AbortController().signal,
|
|
27
|
+
});
|
|
28
|
+
function setup(options = {}) {
|
|
29
|
+
const { getPointerParts } = require('@dreamerbird/dataverse');
|
|
30
|
+
const core = require('@dreamerbird/core');
|
|
31
|
+
const { globals } = require('@dreamerbird/core/globals');
|
|
32
|
+
const { AgentCommandRegistry } = require('../registry');
|
|
33
|
+
const { createAgentRuntime } = require('../runtime');
|
|
34
|
+
const objectRuntime = require('../runtime/objectRuntime');
|
|
35
|
+
const poseSessionRuntime = require('../runtime/poseSessionRuntime');
|
|
36
|
+
const poseSession = require('../../poseMode/poseSession');
|
|
37
|
+
const { registerPoseCommands } = require('./poses');
|
|
38
|
+
const { PLACEMENTS_REGISTRY_KEY } = require('../../PlacementManager');
|
|
39
|
+
const { LibraryError } = require('../../assetLibrary/source');
|
|
40
|
+
const three = require('three');
|
|
41
|
+
/** 事务调用记录(op 顺序 + 关键参数) */
|
|
42
|
+
const calls = [];
|
|
43
|
+
const fakeStudio = {
|
|
44
|
+
transaction: jest.fn((fn) => fn({
|
|
45
|
+
set: (pointer, value) => {
|
|
46
|
+
const { path } = getPointerParts(pointer);
|
|
47
|
+
calls.push({ op: 'set', path: path.join('.'), value });
|
|
48
|
+
},
|
|
49
|
+
unset: (pointer) => {
|
|
50
|
+
const { path } = getPointerParts(pointer);
|
|
51
|
+
calls.push({ op: 'unset', path: path.join('.') });
|
|
52
|
+
},
|
|
53
|
+
stateEditors: {
|
|
54
|
+
coreByProject: {
|
|
55
|
+
historic: {
|
|
56
|
+
sheetsById: {
|
|
57
|
+
sequence: {
|
|
58
|
+
setPrimitivePropAsStatic: jest.fn((args) => {
|
|
59
|
+
calls.push({ op: 'setPrimitivePropAsStatic', args });
|
|
60
|
+
}),
|
|
61
|
+
},
|
|
62
|
+
staticOverrides: {
|
|
63
|
+
byObject: {
|
|
64
|
+
unsetValueOfPrimitiveProp: jest.fn((args) => {
|
|
65
|
+
calls.push({ op: 'unsetStatic', args });
|
|
66
|
+
}),
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
})),
|
|
74
|
+
};
|
|
75
|
+
activeFakeStudio = fakeStudio;
|
|
76
|
+
cleanups.push(() => {
|
|
77
|
+
activeFakeStudio = undefined;
|
|
78
|
+
});
|
|
79
|
+
const keyframe = (id, position, value) => ({
|
|
80
|
+
id,
|
|
81
|
+
position,
|
|
82
|
+
connectedRight: true,
|
|
83
|
+
handles: [0.5, 0.5, 0.5, 0.5],
|
|
84
|
+
value,
|
|
85
|
+
});
|
|
86
|
+
const state = {
|
|
87
|
+
definitionVersion: globals.currentProjectStateDefinitionVersion,
|
|
88
|
+
sheetsById: {
|
|
89
|
+
Scene: {
|
|
90
|
+
staticOverrides: { byObject: {} },
|
|
91
|
+
sequence: {
|
|
92
|
+
type: 'PositionalSequence',
|
|
93
|
+
length: 10,
|
|
94
|
+
subUnitsPerUnit: 30,
|
|
95
|
+
tracksByObject: options.tracks
|
|
96
|
+
? {
|
|
97
|
+
Foo: {
|
|
98
|
+
trackIdByPropPath: options.tracks.trackIdByPropPath,
|
|
99
|
+
trackData: Object.fromEntries(Object.values(options.tracks.trackIdByPropPath).map((trackId) => [
|
|
100
|
+
trackId,
|
|
101
|
+
{
|
|
102
|
+
type: 'BasicKeyframedTrack',
|
|
103
|
+
keyframes: {
|
|
104
|
+
byId: {
|
|
105
|
+
kf1: keyframe('kf1', 0, options.tracks.keyframeValue),
|
|
106
|
+
},
|
|
107
|
+
allIds: { kf1: true },
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
])),
|
|
111
|
+
},
|
|
112
|
+
}
|
|
113
|
+
: {},
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
const project = core.getProject(`agent-poses-${++projectSeq}`, {
|
|
119
|
+
state: state,
|
|
120
|
+
});
|
|
121
|
+
const sheet = project.sheet('Scene');
|
|
122
|
+
// —— 资产库假:姿势/手势/模型/动画条目 ——
|
|
123
|
+
const poseEntry = {
|
|
124
|
+
id: 'pose-1',
|
|
125
|
+
kind: 'pose',
|
|
126
|
+
name: '坐姿',
|
|
127
|
+
rig: 'mixamo',
|
|
128
|
+
bones: { Hips: { rotation: [0, 0, 0, 1] } },
|
|
129
|
+
createdAt: 1,
|
|
130
|
+
};
|
|
131
|
+
const gestureLeft = {
|
|
132
|
+
id: 'gest-l',
|
|
133
|
+
kind: 'pose',
|
|
134
|
+
name: 'Fu · 左手',
|
|
135
|
+
rig: 'mixamo',
|
|
136
|
+
bones: {
|
|
137
|
+
LeftHandIndex1: {
|
|
138
|
+
rotation: [0, 0, 0, 1],
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
createdAt: 2,
|
|
142
|
+
};
|
|
143
|
+
const gestureRight = {
|
|
144
|
+
id: 'gest-r',
|
|
145
|
+
kind: 'pose',
|
|
146
|
+
name: 'Fu · 右手',
|
|
147
|
+
rig: 'mixamo',
|
|
148
|
+
bones: {
|
|
149
|
+
RightHandIndex1: {
|
|
150
|
+
rotation: [0, 0, 0, 1],
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
createdAt: 3,
|
|
154
|
+
};
|
|
155
|
+
const gestureDual = {
|
|
156
|
+
id: 'gest-dual',
|
|
157
|
+
kind: 'pose',
|
|
158
|
+
name: '放松',
|
|
159
|
+
rig: 'mixamo',
|
|
160
|
+
bones: {
|
|
161
|
+
LeftHandThumb1: {},
|
|
162
|
+
RightHandThumb1: {},
|
|
163
|
+
},
|
|
164
|
+
createdAt: 4,
|
|
165
|
+
};
|
|
166
|
+
const modelEntry = {
|
|
167
|
+
id: 'model-1',
|
|
168
|
+
kind: 'model',
|
|
169
|
+
name: 'Y Bot',
|
|
170
|
+
rig: 'mixamo',
|
|
171
|
+
blobId: 'blob-1',
|
|
172
|
+
contentHash: 'hash-1',
|
|
173
|
+
boneCount: 65,
|
|
174
|
+
vertexCount: 1000,
|
|
175
|
+
createdAt: 0,
|
|
176
|
+
};
|
|
177
|
+
const entries = new Map([poseEntry, gestureLeft, gestureRight, gestureDual, modelEntry].map((entry) => [entry.id, entry]));
|
|
178
|
+
const library = {
|
|
179
|
+
getEntry: jest.fn(async (id) => entries.get(id)),
|
|
180
|
+
listEntries: jest.fn(async (kind) => [...entries.values()].filter((entry) => !kind || entry.kind === kind)),
|
|
181
|
+
putEntry: jest.fn(async (entry) => {
|
|
182
|
+
entries.set(entry.id, entry);
|
|
183
|
+
}),
|
|
184
|
+
};
|
|
185
|
+
let notifyHistoric = () => { };
|
|
186
|
+
const runtime = createAgentRuntime({
|
|
187
|
+
project,
|
|
188
|
+
sheet,
|
|
189
|
+
library: library,
|
|
190
|
+
getStudio: () => fakeStudio,
|
|
191
|
+
subscribeHistoric: (listener) => {
|
|
192
|
+
notifyHistoric = listener;
|
|
193
|
+
return () => { };
|
|
194
|
+
},
|
|
195
|
+
});
|
|
196
|
+
const registry = new AgentCommandRegistry();
|
|
197
|
+
registerPoseCommands(registry, runtime);
|
|
198
|
+
/** Scene Runtime handler:当前 Foo 的放置条目 + Three 实例(逐用例可换) */
|
|
199
|
+
let placementForFoo;
|
|
200
|
+
const getModelPlacement = jest.fn(({ key }) => key === 'Foo' ? placementForFoo : undefined);
|
|
201
|
+
if (options.bindPlacementHandler !== false) {
|
|
202
|
+
cleanups.push(runtime.bindHandlers({ getModelPlacement }));
|
|
203
|
+
}
|
|
204
|
+
/** 登记后的清理(模块级登记表跨用例存活,必须逐用例清) */
|
|
205
|
+
function registerMounted(id, obj) {
|
|
206
|
+
objectRuntime.registerSceneSheetObject(id, obj);
|
|
207
|
+
cleanups.push(() => objectRuntime.unregisterSceneSheetObject(id, obj));
|
|
208
|
+
}
|
|
209
|
+
/** 布景:注册表写 'Foo' 条目并把 SheetObject 登记为 model:Foo */
|
|
210
|
+
function mountFoo() {
|
|
211
|
+
const t = core.types;
|
|
212
|
+
const registryObj = sheet.object(PLACEMENTS_REGISTRY_KEY, { list: t.string('[]') }, { hideFromOutline: true });
|
|
213
|
+
registryObj.initialValue = {
|
|
214
|
+
list: JSON.stringify([
|
|
215
|
+
{ key: 'Foo', libraryEntryId: 'model-1', position: { x: 0, y: 0, z: 0 } },
|
|
216
|
+
]),
|
|
217
|
+
};
|
|
218
|
+
const obj = sheet.object('Foo', {
|
|
219
|
+
position: t.compound({
|
|
220
|
+
x: t.number(0),
|
|
221
|
+
y: t.number(0),
|
|
222
|
+
z: t.number(0),
|
|
223
|
+
}),
|
|
224
|
+
pose: t.string(''),
|
|
225
|
+
gestureL: t.string(''),
|
|
226
|
+
gestureR: t.string(''),
|
|
227
|
+
animation: t.string(''),
|
|
228
|
+
});
|
|
229
|
+
registerMounted('model:Foo', obj);
|
|
230
|
+
return obj;
|
|
231
|
+
}
|
|
232
|
+
/** 带骨骼的 Three 实例(capturePose / rigIdOf 用) */
|
|
233
|
+
function boneInstance() {
|
|
234
|
+
const group = new three.Group();
|
|
235
|
+
const hips = new three.Bone();
|
|
236
|
+
hips.name = 'mixamorigHips';
|
|
237
|
+
group.add(hips);
|
|
238
|
+
return group;
|
|
239
|
+
}
|
|
240
|
+
/** 登记 Rig 句柄并随用例清理(模拟 PoseModeRig 挂载/卸载) */
|
|
241
|
+
function registerRig(key, handlers) {
|
|
242
|
+
const unregister = poseSessionRuntime.registerPoseSessionRig(key, handlers);
|
|
243
|
+
cleanups.push(unregister);
|
|
244
|
+
return handlers;
|
|
245
|
+
}
|
|
246
|
+
cleanups.push(() => poseSession.clearPoseSession());
|
|
247
|
+
return {
|
|
248
|
+
core,
|
|
249
|
+
project,
|
|
250
|
+
sheet,
|
|
251
|
+
registry,
|
|
252
|
+
runtime,
|
|
253
|
+
fakeStudio,
|
|
254
|
+
calls,
|
|
255
|
+
library,
|
|
256
|
+
entries,
|
|
257
|
+
LibraryError,
|
|
258
|
+
mountFoo,
|
|
259
|
+
boneInstance,
|
|
260
|
+
registerRig,
|
|
261
|
+
poseSession,
|
|
262
|
+
poseSessionRuntime,
|
|
263
|
+
setPlacementForFoo: (p) => {
|
|
264
|
+
placementForFoo = p;
|
|
265
|
+
},
|
|
266
|
+
getModelPlacement,
|
|
267
|
+
notifyHistoric: () => notifyHistoric(),
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
const COMMAND_NAMES = [
|
|
271
|
+
'poses.apply',
|
|
272
|
+
'poses.applyCustom',
|
|
273
|
+
'poses.clear',
|
|
274
|
+
'poses.saveCurrent',
|
|
275
|
+
'poses.setGesture',
|
|
276
|
+
'poses.session.start',
|
|
277
|
+
'poses.session.commit',
|
|
278
|
+
'poses.session.cancel',
|
|
279
|
+
];
|
|
280
|
+
describe('poses 命令注册', () => {
|
|
281
|
+
test('八个命令全部注册', () => {
|
|
282
|
+
const { registry } = setup();
|
|
283
|
+
for (const name of COMMAND_NAMES) {
|
|
284
|
+
expect(registry.has(name)).toBe(true);
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
test('元数据:写姿势/手势为项目单步命令并接受 expectedRevision;saveCurrent 属资产域;会话命令属会话域', () => {
|
|
288
|
+
const { registry } = setup();
|
|
289
|
+
const described = new Map(registry.describe().commands.map((c) => [c.name, c]));
|
|
290
|
+
for (const name of [
|
|
291
|
+
'poses.apply',
|
|
292
|
+
'poses.applyCustom',
|
|
293
|
+
'poses.clear',
|
|
294
|
+
'poses.setGesture',
|
|
295
|
+
]) {
|
|
296
|
+
expect(described.get(name)).toMatchObject({
|
|
297
|
+
kind: 'mutation',
|
|
298
|
+
stateDomain: 'project',
|
|
299
|
+
undoable: 'single-step',
|
|
300
|
+
completion: 'committed',
|
|
301
|
+
acceptsExpectedRevision: true,
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
expect(described.get('poses.saveCurrent')).toMatchObject({
|
|
305
|
+
kind: 'mutation',
|
|
306
|
+
stateDomain: 'asset',
|
|
307
|
+
undoable: 'none',
|
|
308
|
+
acceptsExpectedRevision: false,
|
|
309
|
+
});
|
|
310
|
+
for (const name of [
|
|
311
|
+
'poses.session.start',
|
|
312
|
+
'poses.session.commit',
|
|
313
|
+
'poses.session.cancel',
|
|
314
|
+
]) {
|
|
315
|
+
expect(described.get(name)).toMatchObject({
|
|
316
|
+
kind: 'mutation',
|
|
317
|
+
stateDomain: 'session',
|
|
318
|
+
acceptsExpectedRevision: false,
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
});
|
|
323
|
+
describe('poses.apply', () => {
|
|
324
|
+
test('库姿势存在:单个事务以 serializeLibPose 写 props.pose 静态值', async () => {
|
|
325
|
+
const { registry, fakeStudio, calls, mountFoo } = setup();
|
|
326
|
+
mountFoo();
|
|
327
|
+
const result = await registry.execute('poses.apply', { objectId: 'model:Foo', assetId: 'pose-1' }, ctx());
|
|
328
|
+
expect(fakeStudio.transaction).toHaveBeenCalledTimes(1);
|
|
329
|
+
expect(calls).toEqual([
|
|
330
|
+
{
|
|
331
|
+
op: 'set',
|
|
332
|
+
path: 'pose',
|
|
333
|
+
value: JSON.stringify({ kind: 'lib', id: 'pose-1' }),
|
|
334
|
+
},
|
|
335
|
+
]);
|
|
336
|
+
expect(result).toEqual({ revision: 1 });
|
|
337
|
+
});
|
|
338
|
+
test('资产不存在 ASSET_NOT_FOUND;非姿势条目 INVALID_ARGUMENT;均不写', async () => {
|
|
339
|
+
const { registry, fakeStudio, mountFoo } = setup();
|
|
340
|
+
mountFoo();
|
|
341
|
+
await expect(registry.execute('poses.apply', { objectId: 'model:Foo', assetId: 'nope' }, ctx())).rejects.toMatchObject({ code: 'ASSET_NOT_FOUND' });
|
|
342
|
+
await expect(registry.execute('poses.apply', { objectId: 'model:Foo', assetId: 'model-1' }, ctx())).rejects.toMatchObject({ code: 'INVALID_ARGUMENT' });
|
|
343
|
+
expect(fakeStudio.transaction).not.toHaveBeenCalled();
|
|
344
|
+
});
|
|
345
|
+
test('pose 已建轨返回 INVALID_STATE,不写关键帧', async () => {
|
|
346
|
+
const { registry, fakeStudio, mountFoo } = setup({
|
|
347
|
+
tracks: {
|
|
348
|
+
trackIdByPropPath: { '["pose"]': 'track-pose' },
|
|
349
|
+
keyframeValue: JSON.stringify({ kind: 'lib', id: 'pose-1' }),
|
|
350
|
+
},
|
|
351
|
+
});
|
|
352
|
+
mountFoo();
|
|
353
|
+
await expect(registry.execute('poses.apply', { objectId: 'model:Foo', assetId: 'pose-1' }, ctx())).rejects.toMatchObject({ code: 'INVALID_STATE' });
|
|
354
|
+
expect(fakeStudio.transaction).not.toHaveBeenCalled();
|
|
355
|
+
});
|
|
356
|
+
test('expectedRevision 冲突返回 REVISION_CONFLICT 且不进入事务', async () => {
|
|
357
|
+
const { registry, fakeStudio, mountFoo, notifyHistoric } = setup();
|
|
358
|
+
mountFoo();
|
|
359
|
+
notifyHistoric();
|
|
360
|
+
await expect(registry.execute('poses.apply', { objectId: 'model:Foo', assetId: 'pose-1', expectedRevision: 1 }, ctx())).rejects.toMatchObject({
|
|
361
|
+
code: 'REVISION_CONFLICT',
|
|
362
|
+
details: { expectedRevision: 1, actualRevision: 2 },
|
|
363
|
+
});
|
|
364
|
+
expect(fakeStudio.transaction).not.toHaveBeenCalled();
|
|
365
|
+
});
|
|
366
|
+
test('对象不存在/类型不符/未挂载分别 OBJECT_NOT_FOUND/INVALID_ID_KIND/INVALID_STATE', async () => {
|
|
367
|
+
const { registry, mountFoo } = setup();
|
|
368
|
+
await expect(registry.execute('poses.apply', { objectId: 'model:Nope', assetId: 'pose-1' }, ctx())).rejects.toMatchObject({ code: 'OBJECT_NOT_FOUND' });
|
|
369
|
+
await expect(registry.execute('poses.apply', { objectId: 'camera:Foo', assetId: 'pose-1' }, ctx())).rejects.toMatchObject({ code: 'INVALID_ID_KIND' });
|
|
370
|
+
// 注册表有条目但运行时未挂载
|
|
371
|
+
const obj = mountFoo();
|
|
372
|
+
const objectRuntime = require('../runtime/objectRuntime');
|
|
373
|
+
objectRuntime.unregisterSceneSheetObject('model:Foo', obj);
|
|
374
|
+
await expect(registry.execute('poses.apply', { objectId: 'model:Foo', assetId: 'pose-1' }, ctx())).rejects.toMatchObject({ code: 'INVALID_STATE' });
|
|
375
|
+
});
|
|
376
|
+
test('Studio 不可用返回 SCENE_UNAVAILABLE', async () => {
|
|
377
|
+
const { registry, mountFoo } = setup();
|
|
378
|
+
mountFoo();
|
|
379
|
+
activeFakeStudio = undefined;
|
|
380
|
+
await expect(registry.execute('poses.apply', { objectId: 'model:Foo', assetId: 'pose-1' }, ctx())).rejects.toMatchObject({ code: 'SCENE_UNAVAILABLE' });
|
|
381
|
+
});
|
|
382
|
+
});
|
|
383
|
+
describe('poses.applyCustom', () => {
|
|
384
|
+
const bones = {
|
|
385
|
+
mixamorigHips: { rotation: [0, 0, 0, 1], position: [0, 1, 0] },
|
|
386
|
+
mixamorigSpine: { rotation: [0.1, 0, 0, 0.99] },
|
|
387
|
+
};
|
|
388
|
+
test('合法骨骼快照以 serializeCustomPose 写 props.pose', async () => {
|
|
389
|
+
const { registry, calls, mountFoo } = setup();
|
|
390
|
+
mountFoo();
|
|
391
|
+
const result = await registry.execute('poses.applyCustom', { objectId: 'model:Foo', bones }, ctx());
|
|
392
|
+
expect(calls).toEqual([
|
|
393
|
+
{
|
|
394
|
+
op: 'set',
|
|
395
|
+
path: 'pose',
|
|
396
|
+
value: JSON.stringify({ kind: 'custom', bones }),
|
|
397
|
+
},
|
|
398
|
+
]);
|
|
399
|
+
expect(result).toEqual({ revision: 1 });
|
|
400
|
+
});
|
|
401
|
+
test('骨骼形状校验:空表/非对象/缺字段/坏数组/NaN 一律 INVALID_ARGUMENT', async () => {
|
|
402
|
+
const { registry, fakeStudio, mountFoo } = setup();
|
|
403
|
+
mountFoo();
|
|
404
|
+
const bads = [
|
|
405
|
+
{},
|
|
406
|
+
'bones',
|
|
407
|
+
{ Hips: {} },
|
|
408
|
+
{ Hips: { rotation: [0, 0, 0] } },
|
|
409
|
+
{ Hips: { rotation: [0, 0, 0, NaN] } },
|
|
410
|
+
{ Hips: { position: [0, 1] } },
|
|
411
|
+
{ Hips: { rotation: [0, 0, 0, 1], scale: 1 } },
|
|
412
|
+
];
|
|
413
|
+
for (const bad of bads) {
|
|
414
|
+
await expect(registry.execute('poses.applyCustom', { objectId: 'model:Foo', bones: bad }, ctx())).rejects.toMatchObject({ code: 'INVALID_ARGUMENT' });
|
|
415
|
+
}
|
|
416
|
+
expect(fakeStudio.transaction).not.toHaveBeenCalled();
|
|
417
|
+
});
|
|
418
|
+
test('pose 已建轨返回 INVALID_STATE', async () => {
|
|
419
|
+
const { registry, fakeStudio, mountFoo } = setup({
|
|
420
|
+
tracks: {
|
|
421
|
+
trackIdByPropPath: { '["pose"]': 'track-pose' },
|
|
422
|
+
keyframeValue: '',
|
|
423
|
+
},
|
|
424
|
+
});
|
|
425
|
+
mountFoo();
|
|
426
|
+
await expect(registry.execute('poses.applyCustom', { objectId: 'model:Foo', bones }, ctx())).rejects.toMatchObject({ code: 'INVALID_STATE' });
|
|
427
|
+
expect(fakeStudio.transaction).not.toHaveBeenCalled();
|
|
428
|
+
});
|
|
429
|
+
});
|
|
430
|
+
describe('poses.setGesture', () => {
|
|
431
|
+
test('左/右侧分别写 gestureL/gestureR(serializeLibPose)', async () => {
|
|
432
|
+
const { registry, calls, mountFoo } = setup();
|
|
433
|
+
mountFoo();
|
|
434
|
+
await registry.execute('poses.setGesture', { objectId: 'model:Foo', side: 'left', assetId: 'gest-l' }, ctx());
|
|
435
|
+
await registry.execute('poses.setGesture', { objectId: 'model:Foo', side: 'right', assetId: 'gest-r' }, ctx());
|
|
436
|
+
expect(calls).toEqual([
|
|
437
|
+
{
|
|
438
|
+
op: 'set',
|
|
439
|
+
path: 'gestureL',
|
|
440
|
+
value: JSON.stringify({ kind: 'lib', id: 'gest-l' }),
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
op: 'set',
|
|
444
|
+
path: 'gestureR',
|
|
445
|
+
value: JSON.stringify({ kind: 'lib', id: 'gest-r' }),
|
|
446
|
+
},
|
|
447
|
+
]);
|
|
448
|
+
});
|
|
449
|
+
test('无侧后缀的双手手势两侧都可用', async () => {
|
|
450
|
+
const { registry, calls, mountFoo } = setup();
|
|
451
|
+
mountFoo();
|
|
452
|
+
await registry.execute('poses.setGesture', { objectId: 'model:Foo', side: 'right', assetId: 'gest-dual' }, ctx());
|
|
453
|
+
expect(calls[0]).toMatchObject({ op: 'set', path: 'gestureR' });
|
|
454
|
+
});
|
|
455
|
+
test('侧别不符 INVALID_ARGUMENT(左手势写到右侧)', async () => {
|
|
456
|
+
const { registry, fakeStudio, mountFoo } = setup();
|
|
457
|
+
mountFoo();
|
|
458
|
+
await expect(registry.execute('poses.setGesture', { objectId: 'model:Foo', side: 'right', assetId: 'gest-l' }, ctx())).rejects.toMatchObject({ code: 'INVALID_ARGUMENT' });
|
|
459
|
+
expect(fakeStudio.transaction).not.toHaveBeenCalled();
|
|
460
|
+
});
|
|
461
|
+
test('非手势条目(全身姿势)INVALID_ARGUMENT;assetId null 清空本侧', async () => {
|
|
462
|
+
const { registry, calls, mountFoo } = setup();
|
|
463
|
+
mountFoo();
|
|
464
|
+
await expect(registry.execute('poses.setGesture', { objectId: 'model:Foo', side: 'left', assetId: 'pose-1' }, ctx())).rejects.toMatchObject({ code: 'INVALID_ARGUMENT' });
|
|
465
|
+
await registry.execute('poses.setGesture', { objectId: 'model:Foo', side: 'left', assetId: null }, ctx());
|
|
466
|
+
expect(calls).toEqual([{ op: 'set', path: 'gestureL', value: '' }]);
|
|
467
|
+
});
|
|
468
|
+
test('资产不存在 ASSET_NOT_FOUND;side 非法 INVALID_ARGUMENT;gestureL 已建轨 INVALID_STATE', async () => {
|
|
469
|
+
const { registry, fakeStudio, mountFoo } = setup({
|
|
470
|
+
tracks: {
|
|
471
|
+
trackIdByPropPath: { '["gestureL"]': 'track-gl' },
|
|
472
|
+
keyframeValue: '',
|
|
473
|
+
},
|
|
474
|
+
});
|
|
475
|
+
mountFoo();
|
|
476
|
+
await expect(registry.execute('poses.setGesture', { objectId: 'model:Foo', side: 'left', assetId: 'nope' }, ctx())).rejects.toMatchObject({ code: 'ASSET_NOT_FOUND' });
|
|
477
|
+
await expect(registry.execute('poses.setGesture', { objectId: 'model:Foo', side: 'middle', assetId: 'gest-l' }, ctx())).rejects.toMatchObject({ code: 'INVALID_ARGUMENT' });
|
|
478
|
+
await expect(registry.execute('poses.setGesture', { objectId: 'model:Foo', side: 'left', assetId: 'gest-l' }, ctx())).rejects.toMatchObject({ code: 'INVALID_STATE' });
|
|
479
|
+
expect(fakeStudio.transaction).not.toHaveBeenCalled();
|
|
480
|
+
});
|
|
481
|
+
});
|
|
482
|
+
describe('poses.clear', () => {
|
|
483
|
+
test('无轨有静态:单事务只调 unsetValueOfPrimitiveProp,返回 cleared:true', async () => {
|
|
484
|
+
const { registry, fakeStudio, calls, mountFoo } = setup();
|
|
485
|
+
const obj = mountFoo();
|
|
486
|
+
obj.initialValue = { pose: JSON.stringify({ kind: 'lib', id: 'pose-1' }) };
|
|
487
|
+
const result = await registry.execute('poses.clear', { objectId: 'model:Foo' }, ctx());
|
|
488
|
+
expect(fakeStudio.transaction).toHaveBeenCalledTimes(1);
|
|
489
|
+
// 假 Studio 不落库,真实状态变化由 poses.realStudio.test.ts 验证
|
|
490
|
+
expect(calls).toEqual([
|
|
491
|
+
{
|
|
492
|
+
op: 'unsetStatic',
|
|
493
|
+
args: expect.objectContaining({
|
|
494
|
+
objectKey: 'Foo',
|
|
495
|
+
sheetId: 'Scene',
|
|
496
|
+
pathToProp: ['pose'],
|
|
497
|
+
}),
|
|
498
|
+
},
|
|
499
|
+
]);
|
|
500
|
+
expect(result).toEqual({ cleared: true, revision: 1 });
|
|
501
|
+
});
|
|
502
|
+
test('已建轨:单个事务内先 setPrimitivePropAsStatic 再 unsetValueOfPrimitiveProp(一个撤销步骤)', async () => {
|
|
503
|
+
const poseJson = JSON.stringify({ kind: 'lib', id: 'pose-1' });
|
|
504
|
+
const { registry, fakeStudio, calls, mountFoo } = setup({
|
|
505
|
+
tracks: {
|
|
506
|
+
trackIdByPropPath: { '["pose"]': 'track-pose' },
|
|
507
|
+
keyframeValue: poseJson,
|
|
508
|
+
},
|
|
509
|
+
});
|
|
510
|
+
mountFoo();
|
|
511
|
+
const result = await registry.execute('poses.clear', { objectId: 'model:Foo' }, ctx());
|
|
512
|
+
expect(fakeStudio.transaction).toHaveBeenCalledTimes(1);
|
|
513
|
+
// value 是删轨时落下的当前求值(假 Studio 布景的初始态轨道不经求值
|
|
514
|
+
// 器跑出帧值,这里只验调用形状;落值正确性由 realStudio 测试覆盖)
|
|
515
|
+
expect(calls).toEqual([
|
|
516
|
+
{
|
|
517
|
+
op: 'setPrimitivePropAsStatic',
|
|
518
|
+
args: expect.objectContaining({
|
|
519
|
+
objectKey: 'Foo',
|
|
520
|
+
pathToProp: ['pose'],
|
|
521
|
+
value: expect.any(String),
|
|
522
|
+
}),
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
op: 'unsetStatic',
|
|
526
|
+
args: expect.objectContaining({ objectKey: 'Foo', pathToProp: ['pose'] }),
|
|
527
|
+
},
|
|
528
|
+
]);
|
|
529
|
+
expect(result).toEqual({ cleared: true, revision: 1 });
|
|
530
|
+
});
|
|
531
|
+
test('空姿势:不进事务,返回明确的 cleared:false 而非静默 no-op', async () => {
|
|
532
|
+
const { registry, fakeStudio, mountFoo } = setup();
|
|
533
|
+
mountFoo();
|
|
534
|
+
const result = await registry.execute('poses.clear', { objectId: 'model:Foo' }, ctx());
|
|
535
|
+
expect(result).toEqual({ cleared: false, revision: 1 });
|
|
536
|
+
expect(fakeStudio.transaction).not.toHaveBeenCalled();
|
|
537
|
+
});
|
|
538
|
+
test('expectedRevision 冲突返回 REVISION_CONFLICT 且不进入事务', async () => {
|
|
539
|
+
const { registry, fakeStudio, mountFoo, notifyHistoric } = setup();
|
|
540
|
+
mountFoo();
|
|
541
|
+
notifyHistoric();
|
|
542
|
+
await expect(registry.execute('poses.clear', { objectId: 'model:Foo', expectedRevision: 1 }, ctx())).rejects.toMatchObject({ code: 'REVISION_CONFLICT' });
|
|
543
|
+
expect(fakeStudio.transaction).not.toHaveBeenCalled();
|
|
544
|
+
});
|
|
545
|
+
test('Studio 不可用返回 SCENE_UNAVAILABLE', async () => {
|
|
546
|
+
const { registry, mountFoo } = setup();
|
|
547
|
+
const obj = mountFoo();
|
|
548
|
+
obj.initialValue = { pose: JSON.stringify({ kind: 'lib', id: 'pose-1' }) };
|
|
549
|
+
activeFakeStudio = undefined;
|
|
550
|
+
await expect(registry.execute('poses.clear', { objectId: 'model:Foo' }, ctx())).rejects.toMatchObject({ code: 'SCENE_UNAVAILABLE' });
|
|
551
|
+
});
|
|
552
|
+
});
|
|
553
|
+
describe('poses.saveCurrent', () => {
|
|
554
|
+
test('从 Scene Runtime 取得已挂载实例:capturePose 入库,返回新姿势条目', async () => {
|
|
555
|
+
const { registry, library, mountFoo, boneInstance, setPlacementForFoo } = setup();
|
|
556
|
+
mountFoo();
|
|
557
|
+
setPlacementForFoo({
|
|
558
|
+
entry: {
|
|
559
|
+
key: 'Foo',
|
|
560
|
+
libraryEntryId: 'model-1',
|
|
561
|
+
position: { x: 0, y: 0, z: 0 },
|
|
562
|
+
},
|
|
563
|
+
instance: boneInstance(),
|
|
564
|
+
});
|
|
565
|
+
const result = (await registry.execute('poses.saveCurrent', { objectId: 'model:Foo', name: '我的姿势' }, ctx()));
|
|
566
|
+
expect(result).toMatchObject({
|
|
567
|
+
kind: 'pose',
|
|
568
|
+
name: '我的姿势',
|
|
569
|
+
// rig 取库模型条目(GLB 洗骨骼名,实例重算可能不一致)
|
|
570
|
+
rig: 'mixamo',
|
|
571
|
+
});
|
|
572
|
+
expect(result.bones).toHaveProperty('mixamorigHips');
|
|
573
|
+
expect(library.putEntry).toHaveBeenCalledTimes(1);
|
|
574
|
+
expect(backfillPoseThumbnails).toHaveBeenCalled();
|
|
575
|
+
});
|
|
576
|
+
test('省略名称时默认 姿势-N(库姿势数 + 1)', async () => {
|
|
577
|
+
const { registry, mountFoo, boneInstance, setPlacementForFoo } = setup();
|
|
578
|
+
mountFoo();
|
|
579
|
+
setPlacementForFoo({
|
|
580
|
+
entry: {
|
|
581
|
+
key: 'Foo',
|
|
582
|
+
libraryEntryId: 'model-1',
|
|
583
|
+
position: { x: 0, y: 0, z: 0 },
|
|
584
|
+
},
|
|
585
|
+
instance: boneInstance(),
|
|
586
|
+
});
|
|
587
|
+
// 库里已有 pose-1/gest-l/gest-r/gest-dual 四个姿势条目
|
|
588
|
+
const result = (await registry.execute('poses.saveCurrent', { objectId: 'model:Foo' }, ctx()));
|
|
589
|
+
expect(result.name).toBe('姿势-5');
|
|
590
|
+
});
|
|
591
|
+
test('实例未挂载 INVALID_STATE;Scene Runtime 未绑定 SCENE_UNAVAILABLE', async () => {
|
|
592
|
+
const { registry, mountFoo } = setup();
|
|
593
|
+
mountFoo();
|
|
594
|
+
// handler 已绑定但返回 undefined(模型未挂载)
|
|
595
|
+
await expect(registry.execute('poses.saveCurrent', { objectId: 'model:Foo' }, ctx())).rejects.toMatchObject({ code: 'INVALID_STATE' });
|
|
596
|
+
// handler 未绑定
|
|
597
|
+
const bare = setup({ bindPlacementHandler: false });
|
|
598
|
+
bare.mountFoo();
|
|
599
|
+
await expect(bare.registry.execute('poses.saveCurrent', { objectId: 'model:Foo' }, ctx())).rejects.toMatchObject({ code: 'SCENE_UNAVAILABLE' });
|
|
600
|
+
});
|
|
601
|
+
test('静态骨架(无骨骼实例且无库 rig)INVALID_STATE,不入库', async () => {
|
|
602
|
+
const { registry, library, mountFoo, setPlacementForFoo, core } = setup();
|
|
603
|
+
mountFoo();
|
|
604
|
+
const empty = new (require('three').Group)();
|
|
605
|
+
setPlacementForFoo({
|
|
606
|
+
entry: { key: 'Foo', position: { x: 0, y: 0, z: 0 } },
|
|
607
|
+
instance: empty,
|
|
608
|
+
});
|
|
609
|
+
await expect(registry.execute('poses.saveCurrent', { objectId: 'model:Foo' }, ctx())).rejects.toMatchObject({ code: 'INVALID_STATE' });
|
|
610
|
+
expect(library.putEntry).not.toHaveBeenCalled();
|
|
611
|
+
void core;
|
|
612
|
+
});
|
|
613
|
+
test('Library 配额错误映射 STORAGE_ERROR,不静默成功', async () => {
|
|
614
|
+
const { registry, library, mountFoo, boneInstance, setPlacementForFoo, LibraryError, } = setup();
|
|
615
|
+
mountFoo();
|
|
616
|
+
setPlacementForFoo({
|
|
617
|
+
entry: {
|
|
618
|
+
key: 'Foo',
|
|
619
|
+
libraryEntryId: 'model-1',
|
|
620
|
+
position: { x: 0, y: 0, z: 0 },
|
|
621
|
+
},
|
|
622
|
+
instance: boneInstance(),
|
|
623
|
+
});
|
|
624
|
+
library.putEntry.mockRejectedValueOnce(new LibraryError('quota', '存储配额已满'));
|
|
625
|
+
await expect(registry.execute('poses.saveCurrent', { objectId: 'model:Foo' }, ctx())).rejects.toMatchObject({ code: 'STORAGE_ERROR' });
|
|
626
|
+
});
|
|
627
|
+
});
|
|
628
|
+
describe('poses.session', () => {
|
|
629
|
+
test('start:进入会话并等 Rig 挂载兑现;期间 promise 保持 pending', async () => {
|
|
630
|
+
const { registry, mountFoo, boneInstance, setPlacementForFoo, poseSession, registerRig, } = setup();
|
|
631
|
+
mountFoo();
|
|
632
|
+
setPlacementForFoo({
|
|
633
|
+
entry: {
|
|
634
|
+
key: 'Foo',
|
|
635
|
+
libraryEntryId: 'model-1',
|
|
636
|
+
position: { x: 0, y: 0, z: 0 },
|
|
637
|
+
},
|
|
638
|
+
instance: boneInstance(),
|
|
639
|
+
});
|
|
640
|
+
let settled = false;
|
|
641
|
+
const promise = registry
|
|
642
|
+
.execute('poses.session.start', { objectId: 'model:Foo' }, ctx())
|
|
643
|
+
.then((r) => {
|
|
644
|
+
settled = true;
|
|
645
|
+
return r;
|
|
646
|
+
});
|
|
647
|
+
// 同步段已进会话;Rig 未登记前不兑现
|
|
648
|
+
expect(poseSession.getPoseSession()).toEqual({ key: 'Foo' });
|
|
649
|
+
await Promise.resolve();
|
|
650
|
+
expect(settled).toBe(false);
|
|
651
|
+
registerRig('Foo', { commit: () => { }, cancel: () => { } });
|
|
652
|
+
await expect(promise).resolves.toMatchObject({ objectId: 'model:Foo' });
|
|
653
|
+
});
|
|
654
|
+
test('start:Rig 未能挂载(会话被清)拒绝 INVALID_STATE,不悬挂', async () => {
|
|
655
|
+
const { registry, mountFoo, boneInstance, setPlacementForFoo, poseSession } = setup();
|
|
656
|
+
mountFoo();
|
|
657
|
+
setPlacementForFoo({
|
|
658
|
+
entry: {
|
|
659
|
+
key: 'Foo',
|
|
660
|
+
libraryEntryId: 'model-1',
|
|
661
|
+
position: { x: 0, y: 0, z: 0 },
|
|
662
|
+
},
|
|
663
|
+
instance: boneInstance(),
|
|
664
|
+
});
|
|
665
|
+
const promise = registry.execute('poses.session.start', { objectId: 'model:Foo' }, ctx());
|
|
666
|
+
expect(poseSession.getPoseSession()).toEqual({ key: 'Foo' });
|
|
667
|
+
// 模拟 PoseModeRig 防御路径(无根骨/无装配表):直接清会话
|
|
668
|
+
poseSession.clearPoseSession();
|
|
669
|
+
await expect(promise).rejects.toMatchObject({ code: 'INVALID_STATE' });
|
|
670
|
+
});
|
|
671
|
+
test('start:模型实例未挂载 INVALID_STATE;handler 未绑定 SCENE_UNAVAILABLE;类型不符 INVALID_ID_KIND', async () => {
|
|
672
|
+
const { registry, mountFoo, boneInstance, setPlacementForFoo } = setup();
|
|
673
|
+
mountFoo();
|
|
674
|
+
await expect(registry.execute('poses.session.start', { objectId: 'model:Foo' }, ctx())).rejects.toMatchObject({ code: 'INVALID_STATE' });
|
|
675
|
+
setPlacementForFoo({
|
|
676
|
+
entry: {
|
|
677
|
+
key: 'Foo',
|
|
678
|
+
libraryEntryId: 'model-1',
|
|
679
|
+
position: { x: 0, y: 0, z: 0 },
|
|
680
|
+
},
|
|
681
|
+
instance: boneInstance(),
|
|
682
|
+
});
|
|
683
|
+
await expect(registry.execute('poses.session.start', { objectId: 'camera:Foo' }, ctx())).rejects.toMatchObject({ code: 'INVALID_ID_KIND' });
|
|
684
|
+
// handler 未绑定
|
|
685
|
+
const bare = setup({ bindPlacementHandler: false });
|
|
686
|
+
bare.mountFoo();
|
|
687
|
+
await expect(bare.registry.execute('poses.session.start', { objectId: 'model:Foo' }, ctx())).rejects.toMatchObject({ code: 'SCENE_UNAVAILABLE' });
|
|
688
|
+
});
|
|
689
|
+
test('start:同键会话已激活且 Rig 已登记时立即兑现(幂等)', async () => {
|
|
690
|
+
const { registry, mountFoo, boneInstance, setPlacementForFoo, poseSession, registerRig, } = setup();
|
|
691
|
+
mountFoo();
|
|
692
|
+
setPlacementForFoo({
|
|
693
|
+
entry: {
|
|
694
|
+
key: 'Foo',
|
|
695
|
+
libraryEntryId: 'model-1',
|
|
696
|
+
position: { x: 0, y: 0, z: 0 },
|
|
697
|
+
},
|
|
698
|
+
instance: boneInstance(),
|
|
699
|
+
});
|
|
700
|
+
poseSession.enterPoseSession('Foo');
|
|
701
|
+
registerRig('Foo', { commit: () => { }, cancel: () => { } });
|
|
702
|
+
await expect(registry.execute('poses.session.start', { objectId: 'model:Foo' }, ctx())).resolves.toMatchObject({ objectId: 'model:Foo' });
|
|
703
|
+
});
|
|
704
|
+
test('commit/cancel:调用 PoseModeRig 登记的句柄;返回会话对象 ID', async () => {
|
|
705
|
+
const { registry, poseSession, registerRig } = setup();
|
|
706
|
+
poseSession.enterPoseSession('Foo');
|
|
707
|
+
const commit = jest.fn(() => poseSession.clearPoseSession());
|
|
708
|
+
const cancel = jest.fn(() => poseSession.clearPoseSession());
|
|
709
|
+
registerRig('Foo', { commit, cancel });
|
|
710
|
+
await expect(registry.execute('poses.session.commit', {}, ctx())).resolves.toEqual({ objectId: 'model:Foo' });
|
|
711
|
+
expect(commit).toHaveBeenCalledTimes(1);
|
|
712
|
+
expect(cancel).not.toHaveBeenCalled();
|
|
713
|
+
poseSession.enterPoseSession('Foo');
|
|
714
|
+
await expect(registry.execute('poses.session.cancel', {}, ctx())).resolves.toEqual({ objectId: 'model:Foo' });
|
|
715
|
+
expect(cancel).toHaveBeenCalledTimes(1);
|
|
716
|
+
});
|
|
717
|
+
test('commit/cancel:无会话 INVALID_STATE;会话在但 Rig 未登记 INVALID_STATE', async () => {
|
|
718
|
+
const { registry, poseSession } = setup();
|
|
719
|
+
await expect(registry.execute('poses.session.commit', {}, ctx())).rejects.toMatchObject({ code: 'INVALID_STATE' });
|
|
720
|
+
await expect(registry.execute('poses.session.cancel', {}, ctx())).rejects.toMatchObject({ code: 'INVALID_STATE' });
|
|
721
|
+
poseSession.enterPoseSession('Foo');
|
|
722
|
+
await expect(registry.execute('poses.session.commit', {}, ctx())).rejects.toMatchObject({ code: 'INVALID_STATE' });
|
|
723
|
+
await expect(registry.execute('poses.session.cancel', {}, ctx())).rejects.toMatchObject({ code: 'INVALID_STATE' });
|
|
724
|
+
});
|
|
725
|
+
});
|
|
726
|
+
describe('会话生命周期', () => {
|
|
727
|
+
test('dispose 后命令拒绝 API_DISPOSED', async () => {
|
|
728
|
+
const { registry, runtime, mountFoo } = setup();
|
|
729
|
+
mountFoo();
|
|
730
|
+
runtime.dispose();
|
|
731
|
+
await expect(registry.execute('poses.apply', { objectId: 'model:Foo', assetId: 'pose-1' }, ctx())).rejects.toMatchObject({ code: 'API_DISPOSED' });
|
|
732
|
+
await expect(registry.execute('poses.session.commit', {}, ctx())).rejects.toMatchObject({ code: 'API_DISPOSED' });
|
|
733
|
+
});
|
|
734
|
+
});
|
|
735
|
+
export {};
|