@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,773 @@
|
|
|
1
|
+
var _a;
|
|
2
|
+
/* eslint-disable import/no-extraneous-dependencies */
|
|
3
|
+
/**
|
|
4
|
+
* paths / paths.session 命令(2026-10-17,Task 11):listPresets /
|
|
5
|
+
* createPreset / addPoint / updatePoint / deletePoint / setPointTiming /
|
|
6
|
+
* sample + startEditing / exitEditing / selectPoint。
|
|
7
|
+
*
|
|
8
|
+
* 真实 Studio 行为测试(同 keyframes.realStudio.test.ts 的引导方式,
|
|
9
|
+
* node 环境:jsdom 会把 studio 依赖链上的 jose 解析成 ESM browser 构建,
|
|
10
|
+
* jest 转不了):领域写入经真事务落库,meta.value / 注册表清单 / 撤销栈
|
|
11
|
+
* 直接断言。revision 用捕获的 subscribeHistoric listener 手工推进(同
|
|
12
|
+
* cameras.test.ts 约定);Scene Runtime 会话 handler 与路径采样器用假
|
|
13
|
+
* 实现经 bindHandlers / pathRuntime 登记,形状与接线后的 CameraScene /
|
|
14
|
+
* CameraPath 绑定一致。
|
|
15
|
+
*/
|
|
16
|
+
// getPathMeta 的调试挂钩写 window.__cameraPathMeta;node 环境补一个
|
|
17
|
+
// 全局壳(模块顶层只定义不触碰,测试期调用才写)
|
|
18
|
+
;
|
|
19
|
+
(_a = globalThis).window ?? (_a.window = globalThis);
|
|
20
|
+
import '@dreamerbird/studio';
|
|
21
|
+
import theatre, { getProject, types as t, val } from '@dreamerbird/core';
|
|
22
|
+
import { privateAPI } from '@dreamerbird/core/privateAPIs';
|
|
23
|
+
import { globals } from '@dreamerbird/core/globals';
|
|
24
|
+
import getStudio from '@dreamerbird/studio/getStudio';
|
|
25
|
+
import { getCoreTicker } from '@dreamerbird/core/coreTicker';
|
|
26
|
+
import { AgentCommandRegistry } from '../registry';
|
|
27
|
+
import { createAgentRuntime } from '../runtime';
|
|
28
|
+
import * as objectRuntime from '../runtime/objectRuntime';
|
|
29
|
+
import * as pathRuntime from '../runtime/pathRuntime';
|
|
30
|
+
import { registerPathCommands } from './paths';
|
|
31
|
+
import { getPathMeta, pathExists } from '../../CameraPath';
|
|
32
|
+
import { getPathsRegistry, PATHS_REGISTRY_KEY, readPathEntries, } from '../../pathRegistry';
|
|
33
|
+
import { parsePathPoints, sampleEntries, withDraggedHandle, } from '../../pathModel';
|
|
34
|
+
import { PATH_PRESETS } from '../../pathPresets';
|
|
35
|
+
import { CAMERAS_REGISTRY_KEY } from '../../cameraRegistry';
|
|
36
|
+
import { PLACEMENTS_REGISTRY_KEY } from '../../PlacementManager';
|
|
37
|
+
const studio = getStudio();
|
|
38
|
+
void theatre.init({ studio: true, usePersistentStorage: false });
|
|
39
|
+
let projectSeq = 0;
|
|
40
|
+
const PATH_KEY = 'Pos Path';
|
|
41
|
+
const ctx = () => ({
|
|
42
|
+
requestId: 'test',
|
|
43
|
+
signal: new AbortController().signal,
|
|
44
|
+
});
|
|
45
|
+
const cleanups = [];
|
|
46
|
+
afterEach(() => {
|
|
47
|
+
while (cleanups.length)
|
|
48
|
+
cleanups.pop()();
|
|
49
|
+
});
|
|
50
|
+
/** 探 saaz 撤销栈(私有路径,同 studio undoHistory.test.ts 的取证方式) */
|
|
51
|
+
const undoStackOf = () => {
|
|
52
|
+
const s = studio;
|
|
53
|
+
const saaz = (s._store?._saaz ?? s._saaz);
|
|
54
|
+
return saaz?._atom?.get?.()?.undoRedo?.stack ?? [];
|
|
55
|
+
};
|
|
56
|
+
async function setup(options = {}) {
|
|
57
|
+
const state = {
|
|
58
|
+
definitionVersion: globals.currentProjectStateDefinitionVersion,
|
|
59
|
+
sheetsById: {
|
|
60
|
+
Scene: {
|
|
61
|
+
staticOverrides: { byObject: {} },
|
|
62
|
+
sequence: {
|
|
63
|
+
type: 'PositionalSequence',
|
|
64
|
+
length: 10,
|
|
65
|
+
subUnitsPerUnit: 30,
|
|
66
|
+
tracksByObject: options.sequencedPoints
|
|
67
|
+
? {
|
|
68
|
+
[PATH_KEY]: {
|
|
69
|
+
trackIdByPropPath: { '["points"]': 'track-points' },
|
|
70
|
+
trackData: {
|
|
71
|
+
'track-points': {
|
|
72
|
+
type: 'BasicKeyframedTrack',
|
|
73
|
+
keyframes: {
|
|
74
|
+
byId: {
|
|
75
|
+
kf1: {
|
|
76
|
+
id: 'kf1',
|
|
77
|
+
position: 0,
|
|
78
|
+
connectedRight: true,
|
|
79
|
+
handles: [0.5, 0.5, 0.5, 0.5],
|
|
80
|
+
value: JSON.stringify([
|
|
81
|
+
{ key: 'P1', position: { x: 0, y: 0, z: 0 } },
|
|
82
|
+
]),
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
allIds: { kf1: true },
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
}
|
|
91
|
+
: {},
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
const project = getProject(`agent-paths-${++projectSeq}`, {
|
|
97
|
+
state: state,
|
|
98
|
+
});
|
|
99
|
+
getCoreTicker().tick();
|
|
100
|
+
await project.ready;
|
|
101
|
+
const sheet = project.sheet('Scene');
|
|
102
|
+
let notifyHistoric = () => { };
|
|
103
|
+
const runtime = createAgentRuntime({
|
|
104
|
+
project,
|
|
105
|
+
sheet,
|
|
106
|
+
library: {},
|
|
107
|
+
getStudio: () => studio,
|
|
108
|
+
subscribeHistoric: (listener) => {
|
|
109
|
+
notifyHistoric = listener;
|
|
110
|
+
return () => { };
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
const registry = new AgentCommandRegistry();
|
|
114
|
+
registerPathCommands(registry, runtime);
|
|
115
|
+
/** 读路径当前控制点名单(测试断言用;meta 已由布景/命令创建) */
|
|
116
|
+
const pointsOf = (key) => parsePathPoints(getPathMeta(sheet, key).value.points);
|
|
117
|
+
/** 注册表清单里的 pathKey(布景/断言用;注册表对象此时已存在) */
|
|
118
|
+
const registeredPaths = () => readPathEntries(getPathsRegistry(sheet)).map((e) => e.pathKey);
|
|
119
|
+
/** 注册表对象是否已被创建(无副作用断言:只探测,不创建) */
|
|
120
|
+
const registryCreated = () => privateAPI(sheet).getObject(PATHS_REGISTRY_KEY) != null;
|
|
121
|
+
/**
|
|
122
|
+
* 布景:注册表加行 + meta 播点(全走 initialValue,不产生历史/撤销步)。
|
|
123
|
+
* 每个测试只调用一次(initialValue 只在没有覆盖时生效)。
|
|
124
|
+
*/
|
|
125
|
+
const seedPaths = (entries) => {
|
|
126
|
+
for (const { key, points } of entries) {
|
|
127
|
+
if (points.length === 0)
|
|
128
|
+
continue;
|
|
129
|
+
const meta = getPathMeta(sheet, key);
|
|
130
|
+
meta.initialValue = {
|
|
131
|
+
points: JSON.stringify(points.map((p, i) => ({ key: `P${i + 1}`, position: p }))),
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
const registryObj = sheet.object(PATHS_REGISTRY_KEY, { list: t.string('[]') }, { hideFromOutline: true });
|
|
135
|
+
registryObj.initialValue = {
|
|
136
|
+
list: JSON.stringify(entries.map(({ key }) => ({ pathKey: key }))),
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
/** 布景:占住一个放置位(findFreeSpot 的避让输入) */
|
|
140
|
+
const seedPlacementAt = (position) => {
|
|
141
|
+
const registryObj = sheet.object(PLACEMENTS_REGISTRY_KEY, { list: t.string('[]') }, { hideFromOutline: true });
|
|
142
|
+
registryObj.initialValue = {
|
|
143
|
+
list: JSON.stringify([{ key: 'Y Bot', position }]),
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
/** 布景:一台绑定指定路径的相机(登记 objectRuntime,同 ShotCamera 接线) */
|
|
147
|
+
const seedBoundCamera = (cameraKey, pathKey) => {
|
|
148
|
+
const obj = sheet.object(cameraKey, {
|
|
149
|
+
position: t.compound({ x: t.number(9), y: t.number(9), z: t.number(9) }),
|
|
150
|
+
pathKey: t.string(''),
|
|
151
|
+
});
|
|
152
|
+
obj.initialValue = { pathKey, position: { x: 9, y: 9, z: 9 } };
|
|
153
|
+
const id = `camera:${cameraKey}`;
|
|
154
|
+
objectRuntime.registerSceneSheetObject(id, obj);
|
|
155
|
+
cleanups.push(() => objectRuntime.unregisterSceneSheetObject(id, obj));
|
|
156
|
+
const registryObj = sheet.object(CAMERAS_REGISTRY_KEY, { list: t.string('[]') }, { hideFromOutline: true });
|
|
157
|
+
registryObj.initialValue = {
|
|
158
|
+
list: JSON.stringify([{ cameraKey }]),
|
|
159
|
+
};
|
|
160
|
+
return obj;
|
|
161
|
+
};
|
|
162
|
+
return {
|
|
163
|
+
sheet,
|
|
164
|
+
runtime,
|
|
165
|
+
registry,
|
|
166
|
+
notifyHistoric: () => notifyHistoric(),
|
|
167
|
+
pointsOf,
|
|
168
|
+
registeredPaths,
|
|
169
|
+
registryCreated,
|
|
170
|
+
seedPaths,
|
|
171
|
+
seedPlacementAt,
|
|
172
|
+
seedBoundCamera,
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
describe('paths 注册与元数据', () => {
|
|
176
|
+
test('十条命令全部注册;写命令单步可撤销,查询/会话不进历史', async () => {
|
|
177
|
+
const { registry } = await setup();
|
|
178
|
+
for (const name of [
|
|
179
|
+
'paths.listPresets',
|
|
180
|
+
'paths.createPreset',
|
|
181
|
+
'paths.addPoint',
|
|
182
|
+
'paths.updatePoint',
|
|
183
|
+
'paths.deletePoint',
|
|
184
|
+
'paths.setPointTiming',
|
|
185
|
+
'paths.sample',
|
|
186
|
+
'paths.session.startEditing',
|
|
187
|
+
'paths.session.exitEditing',
|
|
188
|
+
'paths.session.selectPoint',
|
|
189
|
+
]) {
|
|
190
|
+
expect(registry.has(name)).toBe(true);
|
|
191
|
+
}
|
|
192
|
+
const described = new Map(registry.describe().commands.map((c) => [c.name, c]));
|
|
193
|
+
expect(described.get('paths.listPresets')).toMatchObject({
|
|
194
|
+
kind: 'query',
|
|
195
|
+
undoable: 'none',
|
|
196
|
+
acceptsExpectedRevision: false,
|
|
197
|
+
});
|
|
198
|
+
expect(described.get('paths.sample')).toMatchObject({
|
|
199
|
+
kind: 'query',
|
|
200
|
+
acceptsExpectedRevision: false,
|
|
201
|
+
});
|
|
202
|
+
for (const name of [
|
|
203
|
+
'paths.createPreset',
|
|
204
|
+
'paths.addPoint',
|
|
205
|
+
'paths.updatePoint',
|
|
206
|
+
'paths.deletePoint',
|
|
207
|
+
'paths.setPointTiming',
|
|
208
|
+
]) {
|
|
209
|
+
expect(described.get(name)).toMatchObject({
|
|
210
|
+
kind: 'mutation',
|
|
211
|
+
stateDomain: 'project',
|
|
212
|
+
undoable: 'single-step',
|
|
213
|
+
completion: 'committed',
|
|
214
|
+
acceptsExpectedRevision: true,
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
for (const name of [
|
|
218
|
+
'paths.session.startEditing',
|
|
219
|
+
'paths.session.exitEditing',
|
|
220
|
+
'paths.session.selectPoint',
|
|
221
|
+
]) {
|
|
222
|
+
expect(described.get(name)).toMatchObject({
|
|
223
|
+
kind: 'mutation',
|
|
224
|
+
stateDomain: 'session',
|
|
225
|
+
undoable: 'none',
|
|
226
|
+
acceptsExpectedRevision: false,
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
test('会话销毁后调用 → API_DISPOSED', async () => {
|
|
231
|
+
const { registry, runtime } = await setup();
|
|
232
|
+
runtime.dispose();
|
|
233
|
+
await expect(registry.execute('paths.listPresets', {}, ctx())).rejects.toMatchObject({ code: 'API_DISPOSED' });
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
describe('paths.listPresets', () => {
|
|
237
|
+
test('返回 11 个内置预设;无副作用(不创建注册表对象)', async () => {
|
|
238
|
+
const { registry, registryCreated } = await setup();
|
|
239
|
+
const presets = (await registry.execute('paths.listPresets', {}, ctx()));
|
|
240
|
+
expect(presets).toHaveLength(11);
|
|
241
|
+
expect(presets.map((p) => p.id)).toEqual(PATH_PRESETS.map((p) => p.id));
|
|
242
|
+
expect(presets[0]).toMatchObject({ id: 'circle', name: '环绕圆' });
|
|
243
|
+
expect(registryCreated()).toBe(false);
|
|
244
|
+
});
|
|
245
|
+
});
|
|
246
|
+
describe('paths.createPreset', () => {
|
|
247
|
+
test('空场景落在原点:一个事务同时写 meta points/position 和注册表,一步撤销完整回滚', async () => {
|
|
248
|
+
const { registry, sheet, pointsOf, registeredPaths } = await setup();
|
|
249
|
+
const stackBefore = undoStackOf().length;
|
|
250
|
+
await expect(registry.execute('paths.createPreset', { preset: 'line' }, ctx())).resolves.toEqual({
|
|
251
|
+
pathId: `path:${PATH_KEY}`,
|
|
252
|
+
pointKeys: ['P1', 'P2'],
|
|
253
|
+
revision: 1,
|
|
254
|
+
});
|
|
255
|
+
expect(registeredPaths()).toEqual([PATH_KEY]);
|
|
256
|
+
// 预设点 = 相对落点的局部坐标(presetPlacement),落点写进位置变换
|
|
257
|
+
expect(pointsOf(PATH_KEY)).toEqual([
|
|
258
|
+
{ key: 'P1', position: { x: -5, y: 0, z: 0 } },
|
|
259
|
+
{ key: 'P2', position: { x: 5, y: 0, z: 0 } },
|
|
260
|
+
]);
|
|
261
|
+
expect(val(getPathMeta(sheet, PATH_KEY).props.position)).toEqual({
|
|
262
|
+
x: 0,
|
|
263
|
+
y: 0,
|
|
264
|
+
z: 0,
|
|
265
|
+
});
|
|
266
|
+
// 一个命令一个撤销步骤(spec 8.6)
|
|
267
|
+
expect(undoStackOf().length).toBe(stackBefore + 1);
|
|
268
|
+
studio.undo();
|
|
269
|
+
expect(registeredPaths()).toEqual([]);
|
|
270
|
+
expect(getPathMeta(sheet, PATH_KEY).value.points).toBe('[]');
|
|
271
|
+
});
|
|
272
|
+
test('显式 at 为落点;原点被占用时 findFreeSpot 沿 +X 错开', async () => {
|
|
273
|
+
const explicit = await setup();
|
|
274
|
+
await explicit.registry.execute('paths.createPreset', { preset: 'line', at: { x: 10, y: 3, z: -2 } }, ctx());
|
|
275
|
+
expect(val(getPathMeta(explicit.sheet, PATH_KEY).props.position)).toEqual({
|
|
276
|
+
x: 10,
|
|
277
|
+
y: 3,
|
|
278
|
+
z: -2,
|
|
279
|
+
});
|
|
280
|
+
// 落点只进位置变换,控制点仍是局部坐标
|
|
281
|
+
expect(explicit.pointsOf(PATH_KEY)).toEqual([
|
|
282
|
+
{ key: 'P1', position: { x: -5, y: 0, z: 0 } },
|
|
283
|
+
{ key: 'P2', position: { x: 5, y: 0, z: 0 } },
|
|
284
|
+
]);
|
|
285
|
+
const occupied = await setup();
|
|
286
|
+
occupied.seedPlacementAt({ x: 0, y: 0, z: 0 });
|
|
287
|
+
await occupied.registry.execute('paths.createPreset', { preset: 'line' }, ctx());
|
|
288
|
+
expect(val(getPathMeta(occupied.sheet, PATH_KEY).props.position)).toEqual({
|
|
289
|
+
x: 2,
|
|
290
|
+
y: 0,
|
|
291
|
+
z: 0,
|
|
292
|
+
});
|
|
293
|
+
});
|
|
294
|
+
test('第二条路径取下一个可用 key,并避开已有路径的落点', async () => {
|
|
295
|
+
const { registry, sheet, registeredPaths, pointsOf } = await setup();
|
|
296
|
+
await registry.execute('paths.createPreset', { preset: 'line' }, ctx());
|
|
297
|
+
await expect(registry.execute('paths.createPreset', { preset: 'circle' }, ctx())).resolves.toMatchObject({
|
|
298
|
+
pathId: 'path:Pos Path 2',
|
|
299
|
+
pointKeys: ['P1', 'P2', 'P3', 'P4', 'P5', 'P6', 'P7', 'P8'],
|
|
300
|
+
});
|
|
301
|
+
expect(registeredPaths()).toEqual([PATH_KEY, 'Pos Path 2']);
|
|
302
|
+
expect(val(getPathMeta(sheet, 'Pos Path 2').props.position)).toEqual({
|
|
303
|
+
x: 2,
|
|
304
|
+
y: 0,
|
|
305
|
+
z: 0,
|
|
306
|
+
});
|
|
307
|
+
expect(pointsOf('Pos Path 2')).toHaveLength(8);
|
|
308
|
+
});
|
|
309
|
+
test('未知预设 → INVALID_ARGUMENT,无任何写入(注册表对象都不创建)', async () => {
|
|
310
|
+
const { registry, registryCreated } = await setup();
|
|
311
|
+
await expect(registry.execute('paths.createPreset', { preset: 'nope' }, ctx())).rejects.toMatchObject({ code: 'INVALID_ARGUMENT' });
|
|
312
|
+
expect(registryCreated()).toBe(false);
|
|
313
|
+
});
|
|
314
|
+
test('expectedRevision 冲突 → REVISION_CONFLICT,先于任何写入', async () => {
|
|
315
|
+
const { registry, notifyHistoric, registeredPaths } = await setup();
|
|
316
|
+
notifyHistoric();
|
|
317
|
+
await expect(registry.execute('paths.createPreset', { preset: 'line', expectedRevision: 1 }, ctx())).rejects.toMatchObject({
|
|
318
|
+
code: 'REVISION_CONFLICT',
|
|
319
|
+
details: { expectedRevision: 1, actualRevision: 2 },
|
|
320
|
+
});
|
|
321
|
+
expect(registeredPaths()).toEqual([]);
|
|
322
|
+
});
|
|
323
|
+
test('同名孤儿(注册表空但对象带旧点)先真删再播种,不把新预设接在旧点上', async () => {
|
|
324
|
+
const { registry, sheet, pointsOf, registeredPaths } = await setup();
|
|
325
|
+
// 孤儿:对象在、注册表没有(撤销只退登记没退播种的残留)
|
|
326
|
+
const orphan = getPathMeta(sheet, PATH_KEY);
|
|
327
|
+
orphan.initialValue = {
|
|
328
|
+
points: JSON.stringify([
|
|
329
|
+
{ key: 'P1', position: { x: 100, y: 0, z: 0 } },
|
|
330
|
+
{ key: 'P2', position: { x: 200, y: 0, z: 0 } },
|
|
331
|
+
{ key: 'P3', position: { x: 300, y: 0, z: 0 } },
|
|
332
|
+
]),
|
|
333
|
+
};
|
|
334
|
+
await expect(registry.execute('paths.createPreset', { preset: 'line' }, ctx())).resolves.toMatchObject({ pathId: `path:${PATH_KEY}` });
|
|
335
|
+
expect(registeredPaths()).toEqual([PATH_KEY]);
|
|
336
|
+
// 孤儿旧点被清掉,名单 = 新预设的两个点(不是 3+2 延伸)
|
|
337
|
+
expect(pointsOf(PATH_KEY)).toEqual([
|
|
338
|
+
{ key: 'P1', position: { x: -5, y: 0, z: 0 } },
|
|
339
|
+
{ key: 'P2', position: { x: 5, y: 0, z: 0 } },
|
|
340
|
+
]);
|
|
341
|
+
});
|
|
342
|
+
});
|
|
343
|
+
describe('paths.addPoint', () => {
|
|
344
|
+
test('沿最后一段方向延伸等长一段;一次事务 = 一步撤销', async () => {
|
|
345
|
+
const { registry, pointsOf, seedPaths } = await setup();
|
|
346
|
+
seedPaths([
|
|
347
|
+
{
|
|
348
|
+
key: PATH_KEY,
|
|
349
|
+
points: [
|
|
350
|
+
{ x: 0, y: 0, z: 0 },
|
|
351
|
+
{ x: 4, y: 0, z: 0 },
|
|
352
|
+
],
|
|
353
|
+
},
|
|
354
|
+
]);
|
|
355
|
+
const stackBefore = undoStackOf().length;
|
|
356
|
+
await expect(registry.execute('paths.addPoint', { pathId: `path:${PATH_KEY}` }, ctx())).resolves.toEqual({ pointKey: 'P3', revision: 1 });
|
|
357
|
+
expect(pointsOf(PATH_KEY)).toEqual([
|
|
358
|
+
{ key: 'P1', position: { x: 0, y: 0, z: 0 } },
|
|
359
|
+
{ key: 'P2', position: { x: 4, y: 0, z: 0 } },
|
|
360
|
+
{ key: 'P3', position: { x: 8, y: 0, z: 0 } },
|
|
361
|
+
]);
|
|
362
|
+
expect(undoStackOf().length).toBe(stackBefore + 1);
|
|
363
|
+
studio.undo();
|
|
364
|
+
expect(pointsOf(PATH_KEY)).toHaveLength(2);
|
|
365
|
+
});
|
|
366
|
+
test('点命名不复用删过的号:删掉 P2 后新点仍是 P3', async () => {
|
|
367
|
+
const { registry, pointsOf, seedPaths } = await setup();
|
|
368
|
+
seedPaths([
|
|
369
|
+
{
|
|
370
|
+
key: PATH_KEY,
|
|
371
|
+
points: [
|
|
372
|
+
{ x: 0, y: 0, z: 0 },
|
|
373
|
+
{ x: 2, y: 0, z: 0 },
|
|
374
|
+
{ x: 4, y: 0, z: 0 },
|
|
375
|
+
],
|
|
376
|
+
},
|
|
377
|
+
]);
|
|
378
|
+
await registry.execute('paths.deletePoint', { pathId: `path:${PATH_KEY}`, pointKey: 'P2' }, ctx());
|
|
379
|
+
await expect(registry.execute('paths.addPoint', { pathId: `path:${PATH_KEY}` }, ctx())).resolves.toMatchObject({ pointKey: 'P4' });
|
|
380
|
+
expect(pointsOf(PATH_KEY).map((e) => e.key)).toEqual(['P1', 'P3', 'P4']);
|
|
381
|
+
});
|
|
382
|
+
test('路径未登记 → OBJECT_NOT_FOUND;类型不符 → INVALID_ID_KIND;不写点', async () => {
|
|
383
|
+
const { registry, seedPaths, registryCreated } = await setup();
|
|
384
|
+
await expect(registry.execute('paths.addPoint', { pathId: 'path:Ghost' }, ctx())).rejects.toMatchObject({ code: 'OBJECT_NOT_FOUND' });
|
|
385
|
+
expect(registryCreated()).toBe(false);
|
|
386
|
+
seedPaths([
|
|
387
|
+
{
|
|
388
|
+
key: PATH_KEY,
|
|
389
|
+
points: [
|
|
390
|
+
{ x: 0, y: 0, z: 0 },
|
|
391
|
+
{ x: 4, y: 0, z: 0 },
|
|
392
|
+
],
|
|
393
|
+
},
|
|
394
|
+
]);
|
|
395
|
+
await expect(registry.execute('paths.addPoint', { pathId: `model:${PATH_KEY}` }, ctx())).rejects.toMatchObject({ code: 'INVALID_ID_KIND' });
|
|
396
|
+
await expect(registry.execute('paths.addPoint', { pathId: PATH_KEY }, ctx())).rejects.toMatchObject({ code: 'INVALID_ID_KIND' });
|
|
397
|
+
});
|
|
398
|
+
test('已登记但名单为空 → INVALID_STATE(没点就不出现,不给空路径续点)', async () => {
|
|
399
|
+
const { registry, seedPaths } = await setup();
|
|
400
|
+
seedPaths([{ key: PATH_KEY, points: [] }]);
|
|
401
|
+
await expect(registry.execute('paths.addPoint', { pathId: `path:${PATH_KEY}` }, ctx())).rejects.toMatchObject({ code: 'INVALID_STATE' });
|
|
402
|
+
});
|
|
403
|
+
test('points 已建轨 → INVALID_STATE;expectedRevision 冲突 → REVISION_CONFLICT;都不写点', async () => {
|
|
404
|
+
const sequenced = await setup({ sequencedPoints: true });
|
|
405
|
+
sequenced.seedPaths([{ key: PATH_KEY, points: [] }]);
|
|
406
|
+
await expect(sequenced.registry.execute('paths.addPoint', { pathId: `path:${PATH_KEY}` }, ctx())).rejects.toMatchObject({ code: 'INVALID_STATE' });
|
|
407
|
+
const conflicted = await setup();
|
|
408
|
+
conflicted.seedPaths([
|
|
409
|
+
{
|
|
410
|
+
key: PATH_KEY,
|
|
411
|
+
points: [
|
|
412
|
+
{ x: 0, y: 0, z: 0 },
|
|
413
|
+
{ x: 4, y: 0, z: 0 },
|
|
414
|
+
],
|
|
415
|
+
},
|
|
416
|
+
]);
|
|
417
|
+
conflicted.notifyHistoric();
|
|
418
|
+
await expect(conflicted.registry.execute('paths.addPoint', { pathId: `path:${PATH_KEY}`, expectedRevision: 1 }, ctx())).rejects.toMatchObject({ code: 'REVISION_CONFLICT' });
|
|
419
|
+
expect(conflicted.pointsOf(PATH_KEY)).toHaveLength(2);
|
|
420
|
+
});
|
|
421
|
+
});
|
|
422
|
+
describe('paths.updatePoint', () => {
|
|
423
|
+
test('移动控制点:只写目标点,其余原样;一次事务', async () => {
|
|
424
|
+
const { registry, pointsOf, seedPaths } = await setup();
|
|
425
|
+
seedPaths([
|
|
426
|
+
{
|
|
427
|
+
key: PATH_KEY,
|
|
428
|
+
points: [
|
|
429
|
+
{ x: 0, y: 0, z: 0 },
|
|
430
|
+
{ x: 4, y: 0, z: 0 },
|
|
431
|
+
{ x: 8, y: 0, z: 0 },
|
|
432
|
+
],
|
|
433
|
+
},
|
|
434
|
+
]);
|
|
435
|
+
await expect(registry.execute('paths.updatePoint', {
|
|
436
|
+
pathId: `path:${PATH_KEY}`,
|
|
437
|
+
pointKey: 'P2',
|
|
438
|
+
position: { x: 4, y: 2, z: -1 },
|
|
439
|
+
}, ctx())).resolves.toEqual({ revision: 1 });
|
|
440
|
+
expect(pointsOf(PATH_KEY)).toEqual([
|
|
441
|
+
{ key: 'P1', position: { x: 0, y: 0, z: 0 } },
|
|
442
|
+
{ key: 'P2', position: { x: 4, y: 2, z: -1 } },
|
|
443
|
+
{ key: 'P3', position: { x: 8, y: 0, z: 0 } },
|
|
444
|
+
]);
|
|
445
|
+
});
|
|
446
|
+
test('拖手柄:与 UI 同一 withDraggedHandle 对齐规则(被拖侧取新偏移,另一侧共线镜像)', async () => {
|
|
447
|
+
const { registry, pointsOf, seedPaths } = await setup();
|
|
448
|
+
seedPaths([
|
|
449
|
+
{
|
|
450
|
+
key: PATH_KEY,
|
|
451
|
+
points: [
|
|
452
|
+
{ x: 0, y: 0, z: 0 },
|
|
453
|
+
{ x: 10, y: 0, z: 0 },
|
|
454
|
+
],
|
|
455
|
+
},
|
|
456
|
+
]);
|
|
457
|
+
const before = pointsOf(PATH_KEY);
|
|
458
|
+
await registry.execute('paths.updatePoint', {
|
|
459
|
+
pathId: `path:${PATH_KEY}`,
|
|
460
|
+
pointKey: 'P1',
|
|
461
|
+
handles: { side: 'right', offset: { x: 2, y: 2, z: 0 } },
|
|
462
|
+
}, ctx());
|
|
463
|
+
expect(pointsOf(PATH_KEY)).toEqual(withDraggedHandle(before, 'P1', 'right', { x: 2, y: 2, z: 0 }));
|
|
464
|
+
});
|
|
465
|
+
test('非法手柄侧别 / NaN / 空 patch → INVALID_ARGUMENT;未知点 → PATH_POINT_NOT_FOUND;均不写', async () => {
|
|
466
|
+
const { registry, pointsOf, seedPaths } = await setup();
|
|
467
|
+
seedPaths([
|
|
468
|
+
{
|
|
469
|
+
key: PATH_KEY,
|
|
470
|
+
points: [
|
|
471
|
+
{ x: 0, y: 0, z: 0 },
|
|
472
|
+
{ x: 10, y: 0, z: 0 },
|
|
473
|
+
],
|
|
474
|
+
},
|
|
475
|
+
]);
|
|
476
|
+
const before = pointsOf(PATH_KEY);
|
|
477
|
+
await expect(registry.execute('paths.updatePoint', {
|
|
478
|
+
pathId: `path:${PATH_KEY}`,
|
|
479
|
+
pointKey: 'P1',
|
|
480
|
+
handles: { side: 'up', offset: { x: 1, y: 0, z: 0 } },
|
|
481
|
+
}, ctx())).rejects.toMatchObject({ code: 'INVALID_ARGUMENT' });
|
|
482
|
+
await expect(registry.execute('paths.updatePoint', {
|
|
483
|
+
pathId: `path:${PATH_KEY}`,
|
|
484
|
+
pointKey: 'P1',
|
|
485
|
+
position: { x: NaN, y: 0, z: 0 },
|
|
486
|
+
}, ctx())).rejects.toMatchObject({ code: 'INVALID_ARGUMENT' });
|
|
487
|
+
await expect(registry.execute('paths.updatePoint', { pathId: `path:${PATH_KEY}`, pointKey: 'P1' }, ctx())).rejects.toMatchObject({ code: 'INVALID_ARGUMENT' });
|
|
488
|
+
await expect(registry.execute('paths.updatePoint', {
|
|
489
|
+
pathId: `path:${PATH_KEY}`,
|
|
490
|
+
pointKey: 'P9',
|
|
491
|
+
position: { x: 1, y: 0, z: 0 },
|
|
492
|
+
}, ctx())).rejects.toMatchObject({ code: 'PATH_POINT_NOT_FOUND' });
|
|
493
|
+
expect(pointsOf(PATH_KEY)).toEqual(before);
|
|
494
|
+
});
|
|
495
|
+
test('points 已建轨 → INVALID_STATE;expectedRevision 冲突 → REVISION_CONFLICT', async () => {
|
|
496
|
+
const sequenced = await setup({ sequencedPoints: true });
|
|
497
|
+
sequenced.seedPaths([{ key: PATH_KEY, points: [] }]);
|
|
498
|
+
await expect(sequenced.registry.execute('paths.updatePoint', {
|
|
499
|
+
pathId: `path:${PATH_KEY}`,
|
|
500
|
+
pointKey: 'P1',
|
|
501
|
+
position: { x: 1, y: 0, z: 0 },
|
|
502
|
+
}, ctx())).rejects.toMatchObject({ code: 'INVALID_STATE' });
|
|
503
|
+
const conflicted = await setup();
|
|
504
|
+
conflicted.seedPaths([
|
|
505
|
+
{
|
|
506
|
+
key: PATH_KEY,
|
|
507
|
+
points: [
|
|
508
|
+
{ x: 0, y: 0, z: 0 },
|
|
509
|
+
{ x: 10, y: 0, z: 0 },
|
|
510
|
+
],
|
|
511
|
+
},
|
|
512
|
+
]);
|
|
513
|
+
conflicted.notifyHistoric();
|
|
514
|
+
await expect(conflicted.registry.execute('paths.updatePoint', {
|
|
515
|
+
pathId: `path:${PATH_KEY}`,
|
|
516
|
+
pointKey: 'P1',
|
|
517
|
+
position: { x: 1, y: 0, z: 0 },
|
|
518
|
+
expectedRevision: 1,
|
|
519
|
+
}, ctx())).rejects.toMatchObject({ code: 'REVISION_CONFLICT' });
|
|
520
|
+
expect(conflicted.pointsOf(PATH_KEY)[0]?.position).toEqual({
|
|
521
|
+
x: 0,
|
|
522
|
+
y: 0,
|
|
523
|
+
z: 0,
|
|
524
|
+
});
|
|
525
|
+
});
|
|
526
|
+
});
|
|
527
|
+
describe('paths.setPointTiming', () => {
|
|
528
|
+
const threePoints = [
|
|
529
|
+
{
|
|
530
|
+
key: PATH_KEY,
|
|
531
|
+
points: [
|
|
532
|
+
{ x: 0, y: 0, z: 0 },
|
|
533
|
+
{ x: 5, y: 0, z: 0 },
|
|
534
|
+
{ x: 10, y: 0, z: 0 },
|
|
535
|
+
],
|
|
536
|
+
},
|
|
537
|
+
];
|
|
538
|
+
test('内部点钉锚点:写入显式 u;u:null 恢复自动(回到弧长等比)', async () => {
|
|
539
|
+
const { registry, pointsOf, seedPaths } = await setup();
|
|
540
|
+
seedPaths(threePoints);
|
|
541
|
+
await expect(registry.execute('paths.setPointTiming', { pathId: `path:${PATH_KEY}`, pointKey: 'P2', u: 0.9 }, ctx())).resolves.toEqual({ revision: 1 });
|
|
542
|
+
expect(pointsOf(PATH_KEY)[1]).toMatchObject({ key: 'P2', u: 0.9 });
|
|
543
|
+
await expect(registry.execute('paths.setPointTiming', { pathId: `path:${PATH_KEY}`, pointKey: 'P2', u: null }, ctx())).resolves.toEqual({ revision: 1 });
|
|
544
|
+
expect(pointsOf(PATH_KEY)[1]?.u).toBeUndefined();
|
|
545
|
+
});
|
|
546
|
+
test('首尾点 u 固定 0/1:显式设置与恢复都拒绝(INVALID_ARGUMENT)', async () => {
|
|
547
|
+
const { registry, pointsOf, seedPaths } = await setup();
|
|
548
|
+
seedPaths(threePoints);
|
|
549
|
+
const before = pointsOf(PATH_KEY);
|
|
550
|
+
await expect(registry.execute('paths.setPointTiming', { pathId: `path:${PATH_KEY}`, pointKey: 'P1', u: 0.2 }, ctx())).rejects.toMatchObject({ code: 'INVALID_ARGUMENT' });
|
|
551
|
+
await expect(registry.execute('paths.setPointTiming', { pathId: `path:${PATH_KEY}`, pointKey: 'P3', u: 0.8 }, ctx())).rejects.toMatchObject({ code: 'INVALID_ARGUMENT' });
|
|
552
|
+
await expect(registry.execute('paths.setPointTiming', { pathId: `path:${PATH_KEY}`, pointKey: 'P1', u: null }, ctx())).rejects.toMatchObject({ code: 'INVALID_ARGUMENT' });
|
|
553
|
+
expect(pointsOf(PATH_KEY)).toEqual(before);
|
|
554
|
+
});
|
|
555
|
+
test('u 超出 0–1 / NaN / 缺 u → INVALID_ARGUMENT;未知点 → PATH_POINT_NOT_FOUND;均不写', async () => {
|
|
556
|
+
const { registry, pointsOf, seedPaths } = await setup();
|
|
557
|
+
seedPaths(threePoints);
|
|
558
|
+
const before = pointsOf(PATH_KEY);
|
|
559
|
+
for (const u of [1.5, -0.2, NaN]) {
|
|
560
|
+
await expect(registry.execute('paths.setPointTiming', { pathId: `path:${PATH_KEY}`, pointKey: 'P2', u }, ctx())).rejects.toMatchObject({ code: 'INVALID_ARGUMENT' });
|
|
561
|
+
}
|
|
562
|
+
await expect(registry.execute('paths.setPointTiming', { pathId: `path:${PATH_KEY}`, pointKey: 'P2' }, ctx())).rejects.toMatchObject({ code: 'INVALID_ARGUMENT' });
|
|
563
|
+
await expect(registry.execute('paths.setPointTiming', { pathId: `path:${PATH_KEY}`, pointKey: 'P9', u: 0.5 }, ctx())).rejects.toMatchObject({ code: 'PATH_POINT_NOT_FOUND' });
|
|
564
|
+
expect(pointsOf(PATH_KEY)).toEqual(before);
|
|
565
|
+
});
|
|
566
|
+
});
|
|
567
|
+
describe('paths.deletePoint', () => {
|
|
568
|
+
test('删非最后一点:只更新 points,注册表行保留', async () => {
|
|
569
|
+
const { registry, pointsOf, registeredPaths, seedPaths } = await setup();
|
|
570
|
+
seedPaths([
|
|
571
|
+
{
|
|
572
|
+
key: PATH_KEY,
|
|
573
|
+
points: [
|
|
574
|
+
{ x: 0, y: 0, z: 0 },
|
|
575
|
+
{ x: 5, y: 0, z: 0 },
|
|
576
|
+
{ x: 10, y: 0, z: 0 },
|
|
577
|
+
],
|
|
578
|
+
},
|
|
579
|
+
]);
|
|
580
|
+
await expect(registry.execute('paths.deletePoint', { pathId: `path:${PATH_KEY}`, pointKey: 'P2' }, ctx())).resolves.toEqual({ revision: 1, pathDeleted: false });
|
|
581
|
+
expect(pointsOf(PATH_KEY).map((e) => e.key)).toEqual(['P1', 'P3']);
|
|
582
|
+
expect(registeredPaths()).toEqual([PATH_KEY]);
|
|
583
|
+
});
|
|
584
|
+
test('删最后一点 = 删除整条路径(deletePathDomain):注册表清理、对象脱离、绑定相机定格回退', async () => {
|
|
585
|
+
const { registry, sheet, registeredPaths, seedPaths, seedBoundCamera } = await setup();
|
|
586
|
+
seedPaths([{ key: PATH_KEY, points: [{ x: 3, y: 4, z: 5 }] }]);
|
|
587
|
+
const camera = seedBoundCamera('Shot Camera', PATH_KEY);
|
|
588
|
+
// 挂载采样器(生产由 CameraPath 登记):采样到 (1,2,3) 作为定格机位
|
|
589
|
+
cleanups.push(pathRuntime.registerPathSampler(PATH_KEY, (_u, out) => {
|
|
590
|
+
out.set(1, 2, 3);
|
|
591
|
+
return true;
|
|
592
|
+
}));
|
|
593
|
+
await expect(registry.execute('paths.deletePoint', { pathId: `path:${PATH_KEY}`, pointKey: 'P1' }, ctx())).resolves.toMatchObject({ pathDeleted: true });
|
|
594
|
+
expect(registeredPaths()).toEqual([]);
|
|
595
|
+
expect(pathExists(sheet, PATH_KEY)).toBe(false);
|
|
596
|
+
// 绑定相机:pathKey 清空 + 机位定格在删除前的采样位置
|
|
597
|
+
expect(val(camera.props.pathKey)).toBe('');
|
|
598
|
+
expect(val(camera.props.position)).toEqual({ x: 1, y: 2, z: 3 });
|
|
599
|
+
});
|
|
600
|
+
test('删最后一点也是一步撤销(undoable:single-step 元数据属实,Task 11 遗留修正):undo 一次还原注册表与相机绑定', async () => {
|
|
601
|
+
const { registry, registeredPaths, seedPaths, seedBoundCamera } = await setup();
|
|
602
|
+
seedPaths([{ key: PATH_KEY, points: [{ x: 3, y: 4, z: 5 }] }]);
|
|
603
|
+
const camera = seedBoundCamera('Shot Camera', PATH_KEY);
|
|
604
|
+
cleanups.push(pathRuntime.registerPathSampler(PATH_KEY, (_u, out) => {
|
|
605
|
+
out.set(1, 2, 3);
|
|
606
|
+
return true;
|
|
607
|
+
}));
|
|
608
|
+
const stackBefore = undoStackOf().length;
|
|
609
|
+
await registry.execute('paths.deletePoint', { pathId: `path:${PATH_KEY}`, pointKey: 'P1' }, ctx());
|
|
610
|
+
// Task 14 把 removePathFromRegistry 的两步提交合并为单事务后,
|
|
611
|
+
// 最后一点删除 = 整路径删除同样只有一个撤销步骤
|
|
612
|
+
expect(undoStackOf().length).toBe(stackBefore + 1);
|
|
613
|
+
studio.undo();
|
|
614
|
+
expect(registeredPaths()).toEqual([PATH_KEY]);
|
|
615
|
+
expect(val(camera.props.pathKey)).toBe(PATH_KEY);
|
|
616
|
+
expect(val(camera.props.position)).toEqual({ x: 9, y: 9, z: 9 });
|
|
617
|
+
});
|
|
618
|
+
test('删最后一点但路径未挂载(无采样器):相机只清绑定,不定格机位', async () => {
|
|
619
|
+
const { registry, registeredPaths, seedPaths, seedBoundCamera } = await setup();
|
|
620
|
+
seedPaths([{ key: PATH_KEY, points: [{ x: 3, y: 4, z: 5 }] }]);
|
|
621
|
+
const camera = seedBoundCamera('Shot Camera', PATH_KEY);
|
|
622
|
+
await expect(registry.execute('paths.deletePoint', { pathId: `path:${PATH_KEY}`, pointKey: 'P1' }, ctx())).resolves.toMatchObject({ pathDeleted: true });
|
|
623
|
+
expect(registeredPaths()).toEqual([]);
|
|
624
|
+
expect(val(camera.props.pathKey)).toBe('');
|
|
625
|
+
expect(val(camera.props.position)).toEqual({ x: 9, y: 9, z: 9 });
|
|
626
|
+
});
|
|
627
|
+
test('未知点 → PATH_POINT_NOT_FOUND;路径未登记 → OBJECT_NOT_FOUND', async () => {
|
|
628
|
+
const { registry, pointsOf, seedPaths } = await setup();
|
|
629
|
+
seedPaths([
|
|
630
|
+
{
|
|
631
|
+
key: PATH_KEY,
|
|
632
|
+
points: [
|
|
633
|
+
{ x: 0, y: 0, z: 0 },
|
|
634
|
+
{ x: 4, y: 0, z: 0 },
|
|
635
|
+
],
|
|
636
|
+
},
|
|
637
|
+
]);
|
|
638
|
+
await expect(registry.execute('paths.deletePoint', { pathId: `path:${PATH_KEY}`, pointKey: 'P9' }, ctx())).rejects.toMatchObject({ code: 'PATH_POINT_NOT_FOUND' });
|
|
639
|
+
await expect(registry.execute('paths.deletePoint', { pathId: 'path:Ghost', pointKey: 'P1' }, ctx())).rejects.toMatchObject({ code: 'OBJECT_NOT_FOUND' });
|
|
640
|
+
expect(pointsOf(PATH_KEY)).toHaveLength(2);
|
|
641
|
+
});
|
|
642
|
+
});
|
|
643
|
+
describe('paths.sample', () => {
|
|
644
|
+
test('0 / 0.5 / 1 与当前渲染同一曲线实现(sampleEntries)取世界坐标', async () => {
|
|
645
|
+
const { registry, pointsOf, seedPaths } = await setup();
|
|
646
|
+
seedPaths([
|
|
647
|
+
{
|
|
648
|
+
key: PATH_KEY,
|
|
649
|
+
points: [
|
|
650
|
+
{ x: 0, y: 0, z: 0 },
|
|
651
|
+
{ x: 10, y: 0, z: 0 },
|
|
652
|
+
],
|
|
653
|
+
},
|
|
654
|
+
]);
|
|
655
|
+
// 挂载采样器(生产由 CameraPath 登记;这里直接复用渲染同款曲线实现)
|
|
656
|
+
cleanups.push(pathRuntime.registerPathSampler(PATH_KEY, (u, out) => sampleEntries(pointsOf(PATH_KEY), u, out)));
|
|
657
|
+
const at = async (u) => (await registry.execute('paths.sample', { pathId: `path:${PATH_KEY}`, u }, ctx()));
|
|
658
|
+
expect(await at(0)).toEqual({ position: { x: 0, y: 0, z: 0 } });
|
|
659
|
+
expect(await at(1)).toEqual({ position: { x: 10, y: 0, z: 0 } });
|
|
660
|
+
const mid = await at(0.5);
|
|
661
|
+
expect(mid.position.x).toBeCloseTo(5, 6);
|
|
662
|
+
expect(mid.position.y).toBeCloseTo(0, 6);
|
|
663
|
+
});
|
|
664
|
+
test('路径已登记但未挂载(无采样器)→ INVALID_STATE;不创建 meta 对象', async () => {
|
|
665
|
+
const { registry, sheet, seedPaths } = await setup();
|
|
666
|
+
// 只写注册表行:meta 对象不存在 = 组件未挂载
|
|
667
|
+
seedPaths([{ key: PATH_KEY, points: [] }]);
|
|
668
|
+
expect(pathExists(sheet, PATH_KEY)).toBe(false);
|
|
669
|
+
await expect(registry.execute('paths.sample', { pathId: `path:${PATH_KEY}`, u: 0.5 }, ctx())).rejects.toMatchObject({ code: 'INVALID_STATE' });
|
|
670
|
+
// 查询无副作用:不调用会创建 meta 的读取函数
|
|
671
|
+
expect(pathExists(sheet, PATH_KEY)).toBe(false);
|
|
672
|
+
});
|
|
673
|
+
test('路径未登记 → OBJECT_NOT_FOUND(注册表对象都不创建);类型不符 → INVALID_ID_KIND', async () => {
|
|
674
|
+
const { registry, registryCreated } = await setup();
|
|
675
|
+
await expect(registry.execute('paths.sample', { pathId: 'path:Ghost', u: 0 }, ctx())).rejects.toMatchObject({ code: 'OBJECT_NOT_FOUND' });
|
|
676
|
+
expect(registryCreated()).toBe(false);
|
|
677
|
+
await expect(registry.execute('paths.sample', { pathId: 'model:Foo', u: 0 }, ctx())).rejects.toMatchObject({ code: 'INVALID_ID_KIND' });
|
|
678
|
+
});
|
|
679
|
+
});
|
|
680
|
+
describe('paths.session', () => {
|
|
681
|
+
test('startEditing 只接受已登记路径;经 Scene Runtime handler 进入编辑', async () => {
|
|
682
|
+
const { registry, runtime, seedPaths } = await setup();
|
|
683
|
+
seedPaths([
|
|
684
|
+
{
|
|
685
|
+
key: PATH_KEY,
|
|
686
|
+
points: [
|
|
687
|
+
{ x: 0, y: 0, z: 0 },
|
|
688
|
+
{ x: 4, y: 0, z: 0 },
|
|
689
|
+
],
|
|
690
|
+
},
|
|
691
|
+
]);
|
|
692
|
+
const startPathEditing = jest.fn();
|
|
693
|
+
cleanups.push(runtime.bindHandlers({ startPathEditing }));
|
|
694
|
+
await expect(registry.execute('paths.session.startEditing', { pathId: `path:${PATH_KEY}` }, ctx())).resolves.toBeUndefined();
|
|
695
|
+
expect(startPathEditing).toHaveBeenCalledWith({ pathKey: PATH_KEY });
|
|
696
|
+
await expect(registry.execute('paths.session.startEditing', { pathId: 'path:Ghost' }, ctx())).rejects.toMatchObject({ code: 'OBJECT_NOT_FOUND' });
|
|
697
|
+
expect(startPathEditing).toHaveBeenCalledTimes(1);
|
|
698
|
+
});
|
|
699
|
+
test('Scene Runtime 未绑定 handler → SCENE_UNAVAILABLE', async () => {
|
|
700
|
+
const { registry, seedPaths } = await setup();
|
|
701
|
+
seedPaths([
|
|
702
|
+
{
|
|
703
|
+
key: PATH_KEY,
|
|
704
|
+
points: [
|
|
705
|
+
{ x: 0, y: 0, z: 0 },
|
|
706
|
+
{ x: 4, y: 0, z: 0 },
|
|
707
|
+
],
|
|
708
|
+
},
|
|
709
|
+
]);
|
|
710
|
+
await expect(registry.execute('paths.session.startEditing', { pathId: `path:${PATH_KEY}` }, ctx())).rejects.toMatchObject({ code: 'SCENE_UNAVAILABLE' });
|
|
711
|
+
await expect(registry.execute('paths.session.exitEditing', {}, ctx())).rejects.toMatchObject({ code: 'SCENE_UNAVAILABLE' });
|
|
712
|
+
await expect(registry.execute('paths.session.selectPoint', { pathId: `path:${PATH_KEY}`, pointKey: 'P1' }, ctx())).rejects.toMatchObject({ code: 'SCENE_UNAVAILABLE' });
|
|
713
|
+
});
|
|
714
|
+
test('selectPoint:点存在且路径正在编辑 → 经 handler 选中', async () => {
|
|
715
|
+
const { registry, runtime, seedPaths } = await setup();
|
|
716
|
+
seedPaths([
|
|
717
|
+
{
|
|
718
|
+
key: PATH_KEY,
|
|
719
|
+
points: [
|
|
720
|
+
{ x: 0, y: 0, z: 0 },
|
|
721
|
+
{ x: 4, y: 0, z: 0 },
|
|
722
|
+
],
|
|
723
|
+
},
|
|
724
|
+
]);
|
|
725
|
+
const selectPathPoint = jest.fn();
|
|
726
|
+
cleanups.push(runtime.bindHandlers({
|
|
727
|
+
getPathEditingState: () => ({ pathKey: PATH_KEY, pointKey: null }),
|
|
728
|
+
selectPathPoint,
|
|
729
|
+
}));
|
|
730
|
+
await expect(registry.execute('paths.session.selectPoint', { pathId: `path:${PATH_KEY}`, pointKey: 'P2' }, ctx())).resolves.toBeUndefined();
|
|
731
|
+
expect(selectPathPoint).toHaveBeenCalledWith({
|
|
732
|
+
pathKey: PATH_KEY,
|
|
733
|
+
pointKey: 'P2',
|
|
734
|
+
});
|
|
735
|
+
});
|
|
736
|
+
test('selectPoint:路径未在编辑 → INVALID_STATE;点不存在 → PATH_POINT_NOT_FOUND;handler 不被调用', async () => {
|
|
737
|
+
const { registry, runtime, seedPaths } = await setup();
|
|
738
|
+
seedPaths([
|
|
739
|
+
{
|
|
740
|
+
key: PATH_KEY,
|
|
741
|
+
points: [
|
|
742
|
+
{ x: 0, y: 0, z: 0 },
|
|
743
|
+
{ x: 4, y: 0, z: 0 },
|
|
744
|
+
],
|
|
745
|
+
},
|
|
746
|
+
]);
|
|
747
|
+
const selectPathPoint = jest.fn();
|
|
748
|
+
const state = { pathKey: null, pointKey: null };
|
|
749
|
+
cleanups.push(runtime.bindHandlers({
|
|
750
|
+
getPathEditingState: () => state,
|
|
751
|
+
selectPathPoint,
|
|
752
|
+
}));
|
|
753
|
+
// 没有在编辑任何路径
|
|
754
|
+
await expect(registry.execute('paths.session.selectPoint', { pathId: `path:${PATH_KEY}`, pointKey: 'P1' }, ctx())).rejects.toMatchObject({ code: 'INVALID_STATE' });
|
|
755
|
+
// 在编辑别的路径
|
|
756
|
+
state.pathKey = 'Pos Path 2';
|
|
757
|
+
await expect(registry.execute('paths.session.selectPoint', { pathId: `path:${PATH_KEY}`, pointKey: 'P1' }, ctx())).rejects.toMatchObject({ code: 'INVALID_STATE' });
|
|
758
|
+
// 正在编辑但点不存在
|
|
759
|
+
state.pathKey = PATH_KEY;
|
|
760
|
+
await expect(registry.execute('paths.session.selectPoint', { pathId: `path:${PATH_KEY}`, pointKey: 'P9' }, ctx())).rejects.toMatchObject({ code: 'PATH_POINT_NOT_FOUND' });
|
|
761
|
+
expect(selectPathPoint).not.toHaveBeenCalled();
|
|
762
|
+
});
|
|
763
|
+
test('exitEditing 清空编辑态和点选择:与 selection.clear 共用同一 runtime 清理函数', async () => {
|
|
764
|
+
const { registry, runtime } = await setup();
|
|
765
|
+
const exitPathEditing = jest.fn();
|
|
766
|
+
const clearPathPointSelection = jest.fn();
|
|
767
|
+
cleanups.push(runtime.bindHandlers({ exitPathEditing, clearPathPointSelection }));
|
|
768
|
+
await expect(registry.execute('paths.session.exitEditing', {}, ctx())).resolves.toBeUndefined();
|
|
769
|
+
expect(exitPathEditing).toHaveBeenCalledTimes(1);
|
|
770
|
+
// 与 selection.clear 相同的点选择清理(handler 同签名同语义)
|
|
771
|
+
expect(clearPathPointSelection).toHaveBeenCalledTimes(1);
|
|
772
|
+
});
|
|
773
|
+
});
|