@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,281 @@
|
|
|
1
|
+
import { AgentJobManager } from './jobs';
|
|
2
|
+
import { AgentApiError } from './errors';
|
|
3
|
+
function deferred() {
|
|
4
|
+
let resolve;
|
|
5
|
+
let reject;
|
|
6
|
+
const promise = new Promise((res, rej) => {
|
|
7
|
+
resolve = res;
|
|
8
|
+
reject = rej;
|
|
9
|
+
});
|
|
10
|
+
return { promise, resolve, reject };
|
|
11
|
+
}
|
|
12
|
+
test('start publishes a running snapshot and update reaches subscribers', async () => {
|
|
13
|
+
const manager = new AgentJobManager();
|
|
14
|
+
const received = [];
|
|
15
|
+
const unsubscribe = manager.subscribe((snapshot) => {
|
|
16
|
+
received.push(snapshot);
|
|
17
|
+
});
|
|
18
|
+
const gate = deferred();
|
|
19
|
+
const handle = manager.start({
|
|
20
|
+
kind: 'test.job',
|
|
21
|
+
cancelable: true,
|
|
22
|
+
execute: async ({ update }) => {
|
|
23
|
+
await Promise.resolve();
|
|
24
|
+
update({ progress: 0.5, phase: 'committed' });
|
|
25
|
+
return gate.promise;
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
const immediate = manager.get(handle.jobId);
|
|
29
|
+
expect(['pending', 'running']).toContain(immediate.state);
|
|
30
|
+
expect(immediate.phase).toBe('accepted');
|
|
31
|
+
expect(immediate.cancelable).toBe(true);
|
|
32
|
+
expect(immediate.jobId).toBe(handle.jobId);
|
|
33
|
+
expect(Object.isFrozen(immediate)).toBe(true);
|
|
34
|
+
expect(received[0]).toMatchObject({ state: 'running', progress: 0 });
|
|
35
|
+
// execute 体内的 update 在微任务后到达
|
|
36
|
+
for (let i = 0; i < 10 && received.length < 2; i += 1) {
|
|
37
|
+
await Promise.resolve();
|
|
38
|
+
}
|
|
39
|
+
expect(received.length).toBeGreaterThanOrEqual(2);
|
|
40
|
+
expect(received[1]).toMatchObject({ progress: 0.5, phase: 'committed' });
|
|
41
|
+
expect(received[1]).not.toBe(received[0]);
|
|
42
|
+
gate.resolve('ok');
|
|
43
|
+
const final = await handle.done;
|
|
44
|
+
expect(final).toMatchObject({
|
|
45
|
+
state: 'succeeded',
|
|
46
|
+
progress: 1,
|
|
47
|
+
result: 'ok',
|
|
48
|
+
});
|
|
49
|
+
expect(manager.get(handle.jobId)).toMatchObject({
|
|
50
|
+
state: 'succeeded',
|
|
51
|
+
result: 'ok',
|
|
52
|
+
});
|
|
53
|
+
unsubscribe();
|
|
54
|
+
});
|
|
55
|
+
test('snapshots are immutable copies that never mutate in place', async () => {
|
|
56
|
+
const manager = new AgentJobManager();
|
|
57
|
+
const seen = [];
|
|
58
|
+
manager.subscribe((snapshot) => {
|
|
59
|
+
seen.push({ progress: snapshot.progress });
|
|
60
|
+
});
|
|
61
|
+
const handle = manager.start({
|
|
62
|
+
kind: 'test.immutable',
|
|
63
|
+
cancelable: false,
|
|
64
|
+
execute: async ({ update }) => {
|
|
65
|
+
update({ progress: 0.5 });
|
|
66
|
+
return 'done';
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
await handle.done;
|
|
70
|
+
expect(seen.map((s) => s.progress)).toEqual([0, 0.5, 1]);
|
|
71
|
+
const final = manager.get(handle.jobId);
|
|
72
|
+
expect(Object.isFrozen(final)).toBe(true);
|
|
73
|
+
});
|
|
74
|
+
test('cancel aborts the signal and maps the job to cancelled', async () => {
|
|
75
|
+
const manager = new AgentJobManager();
|
|
76
|
+
const gate = deferred();
|
|
77
|
+
let seenSignal;
|
|
78
|
+
const handle = manager.start({
|
|
79
|
+
kind: 'test.cancelable',
|
|
80
|
+
cancelable: true,
|
|
81
|
+
execute: ({ signal }) => {
|
|
82
|
+
seenSignal = signal;
|
|
83
|
+
return gate.promise;
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
manager.cancel(handle.jobId);
|
|
87
|
+
expect(seenSignal?.aborted).toBe(true);
|
|
88
|
+
expect(manager.get(handle.jobId)).toMatchObject({ state: 'cancelled' });
|
|
89
|
+
// 取消后 execute 晚到的 resolve 不得覆盖终态
|
|
90
|
+
gate.resolve('late');
|
|
91
|
+
const final = await handle.done;
|
|
92
|
+
expect(final).toMatchObject({ state: 'cancelled' });
|
|
93
|
+
});
|
|
94
|
+
test('cancel on a non-cancelable job throws JOB_NOT_CANCELABLE', () => {
|
|
95
|
+
const manager = new AgentJobManager();
|
|
96
|
+
const handle = manager.start({
|
|
97
|
+
kind: 'test.locked',
|
|
98
|
+
cancelable: false,
|
|
99
|
+
execute: () => new Promise(() => { }),
|
|
100
|
+
});
|
|
101
|
+
try {
|
|
102
|
+
manager.cancel(handle.jobId);
|
|
103
|
+
throw new Error('Expected JOB_NOT_CANCELABLE');
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
expect(error).toBeInstanceOf(AgentApiError);
|
|
107
|
+
expect(error).toMatchObject({ code: 'JOB_NOT_CANCELABLE' });
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
test('cancel or get on an unknown id throws JOB_NOT_FOUND', () => {
|
|
111
|
+
const manager = new AgentJobManager();
|
|
112
|
+
for (const fn of [
|
|
113
|
+
() => manager.cancel('job-missing'),
|
|
114
|
+
() => manager.get('job-missing'),
|
|
115
|
+
]) {
|
|
116
|
+
try {
|
|
117
|
+
fn();
|
|
118
|
+
throw new Error('Expected JOB_NOT_FOUND');
|
|
119
|
+
}
|
|
120
|
+
catch (error) {
|
|
121
|
+
expect(error).toMatchObject({ code: 'JOB_NOT_FOUND' });
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
test('cancel on a finished job throws INVALID_STATE', async () => {
|
|
126
|
+
const manager = new AgentJobManager();
|
|
127
|
+
const handle = manager.start({
|
|
128
|
+
kind: 'test.done',
|
|
129
|
+
cancelable: true,
|
|
130
|
+
execute: async () => 'ok',
|
|
131
|
+
});
|
|
132
|
+
await handle.done;
|
|
133
|
+
try {
|
|
134
|
+
manager.cancel(handle.jobId);
|
|
135
|
+
throw new Error('Expected INVALID_STATE');
|
|
136
|
+
}
|
|
137
|
+
catch (error) {
|
|
138
|
+
expect(error).toMatchObject({ code: 'INVALID_STATE' });
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
test('failure maps to a failed snapshot with a normalized error', async () => {
|
|
142
|
+
const manager = new AgentJobManager();
|
|
143
|
+
const handle = manager.start({
|
|
144
|
+
kind: 'test.fail',
|
|
145
|
+
cancelable: false,
|
|
146
|
+
execute: async () => {
|
|
147
|
+
throw new Error('boom');
|
|
148
|
+
},
|
|
149
|
+
});
|
|
150
|
+
const final = await handle.done;
|
|
151
|
+
expect(final.state).toBe('failed');
|
|
152
|
+
expect(final.result).toBeUndefined();
|
|
153
|
+
expect(final.error).toMatchObject({
|
|
154
|
+
code: 'INTERNAL_ERROR',
|
|
155
|
+
message: 'boom',
|
|
156
|
+
retryable: false,
|
|
157
|
+
});
|
|
158
|
+
expect(manager.get(handle.jobId)).toMatchObject({ state: 'failed' });
|
|
159
|
+
});
|
|
160
|
+
test('structured AgentApiError failures keep their code in the snapshot', async () => {
|
|
161
|
+
const manager = new AgentJobManager();
|
|
162
|
+
const handle = manager.start({
|
|
163
|
+
kind: 'test.domain-fail',
|
|
164
|
+
cancelable: false,
|
|
165
|
+
execute: async () => {
|
|
166
|
+
throw new AgentApiError('RESOURCE_LOAD_FAILED', '模型加载失败', {
|
|
167
|
+
retryable: true,
|
|
168
|
+
details: { assetId: 'a1' },
|
|
169
|
+
});
|
|
170
|
+
},
|
|
171
|
+
});
|
|
172
|
+
const final = await handle.done;
|
|
173
|
+
expect(final).toMatchObject({
|
|
174
|
+
state: 'failed',
|
|
175
|
+
error: {
|
|
176
|
+
code: 'RESOURCE_LOAD_FAILED',
|
|
177
|
+
retryable: true,
|
|
178
|
+
details: { assetId: 'a1' },
|
|
179
|
+
},
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
test('JOB_CANCELLED rejection maps to cancelled (with error code), not failed', async () => {
|
|
183
|
+
const manager = new AgentJobManager();
|
|
184
|
+
const handle = manager.start({
|
|
185
|
+
kind: 'test.user-abort',
|
|
186
|
+
cancelable: true,
|
|
187
|
+
execute: async () => {
|
|
188
|
+
// 用户侧中止(如视频导出 Esc/开录相机被删):非 jobs.cancel 路径,
|
|
189
|
+
// execute 以 JOB_CANCELLED 拒绝,终态应为 cancelled 而非 failed
|
|
190
|
+
throw new AgentApiError('JOB_CANCELLED', '视频导出被中止');
|
|
191
|
+
},
|
|
192
|
+
});
|
|
193
|
+
const final = await handle.done;
|
|
194
|
+
expect(final.state).toBe('cancelled');
|
|
195
|
+
expect(final.error).toMatchObject({ code: 'JOB_CANCELLED' });
|
|
196
|
+
expect(manager.get(handle.jobId)).toMatchObject({ state: 'cancelled' });
|
|
197
|
+
// 已 cancelled 的任务不可再 cancel
|
|
198
|
+
try {
|
|
199
|
+
manager.cancel(handle.jobId);
|
|
200
|
+
throw new Error('Expected INVALID_STATE');
|
|
201
|
+
}
|
|
202
|
+
catch (error) {
|
|
203
|
+
expect(error).toMatchObject({ code: 'INVALID_STATE' });
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
test('falls back to counter-based ids when crypto.randomUUID is unavailable', async () => {
|
|
207
|
+
const globals = globalThis;
|
|
208
|
+
const original = globals.crypto?.randomUUID;
|
|
209
|
+
if (globals.crypto) {
|
|
210
|
+
globals.crypto.randomUUID = undefined;
|
|
211
|
+
}
|
|
212
|
+
try {
|
|
213
|
+
const manager = new AgentJobManager();
|
|
214
|
+
const handle = manager.start({
|
|
215
|
+
kind: 'test.fallback',
|
|
216
|
+
cancelable: true,
|
|
217
|
+
execute: async () => 'ok',
|
|
218
|
+
});
|
|
219
|
+
expect(handle.jobId).toMatch(/^job-\d+-\d+$/);
|
|
220
|
+
await handle.done;
|
|
221
|
+
}
|
|
222
|
+
finally {
|
|
223
|
+
if (globals.crypto && original) {
|
|
224
|
+
globals.crypto.randomUUID = original;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
test('unsubscribe stops notifications', async () => {
|
|
229
|
+
const manager = new AgentJobManager();
|
|
230
|
+
let calls = 0;
|
|
231
|
+
const unsubscribe = manager.subscribe(() => {
|
|
232
|
+
calls += 1;
|
|
233
|
+
});
|
|
234
|
+
const handle = manager.start({
|
|
235
|
+
kind: 'test.unsub',
|
|
236
|
+
cancelable: false,
|
|
237
|
+
execute: async () => 'ok',
|
|
238
|
+
});
|
|
239
|
+
await handle.done;
|
|
240
|
+
expect(calls).toBeGreaterThan(0);
|
|
241
|
+
const before = calls;
|
|
242
|
+
unsubscribe();
|
|
243
|
+
manager.start({
|
|
244
|
+
kind: 'test.unsub2',
|
|
245
|
+
cancelable: false,
|
|
246
|
+
execute: async () => 'ok',
|
|
247
|
+
});
|
|
248
|
+
await Promise.resolve();
|
|
249
|
+
expect(calls).toBe(before);
|
|
250
|
+
});
|
|
251
|
+
test('a throwing subscriber neither corrupts job state nor blocks broadcast', async () => {
|
|
252
|
+
const manager = new AgentJobManager();
|
|
253
|
+
const received = [];
|
|
254
|
+
manager.subscribe(() => {
|
|
255
|
+
throw new Error('subscriber boom');
|
|
256
|
+
});
|
|
257
|
+
manager.subscribe((snapshot) => {
|
|
258
|
+
received.push(`${snapshot.state}:${snapshot.progress}`);
|
|
259
|
+
});
|
|
260
|
+
const handle = manager.start({
|
|
261
|
+
kind: 'test.throwing-subscriber',
|
|
262
|
+
cancelable: true,
|
|
263
|
+
execute: async ({ update }) => {
|
|
264
|
+
update({ progress: 0.5 });
|
|
265
|
+
return 'ok';
|
|
266
|
+
},
|
|
267
|
+
});
|
|
268
|
+
// 订阅者抛错不得被 start 的 catch 误判为任务失败
|
|
269
|
+
const final = await handle.done;
|
|
270
|
+
expect(final).toMatchObject({ state: 'succeeded', progress: 1, result: 'ok' });
|
|
271
|
+
// 抛错订阅者之后的订阅者仍收到每一次广播
|
|
272
|
+
expect(received).toEqual(['running:0', 'running:0.5', 'succeeded:1']);
|
|
273
|
+
// cancel 路径同样隔离订阅者异常
|
|
274
|
+
const cancelable = manager.start({
|
|
275
|
+
kind: 'test.throwing-subscriber-cancel',
|
|
276
|
+
cancelable: true,
|
|
277
|
+
execute: () => new Promise(() => { }),
|
|
278
|
+
});
|
|
279
|
+
expect(() => manager.cancel(cancelable.jobId)).not.toThrow();
|
|
280
|
+
expect(manager.get(cancelable.jobId)).toMatchObject({ state: 'cancelled' });
|
|
281
|
+
});
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { ISheet, ISheetObject } from '@dreamerbird/core';
|
|
2
|
+
import type { $IntentionalAny } from '@dreamerbird/core/types/public';
|
|
3
|
+
/** 单帧摘要:list 的输出元素(不暴露内部 id) */
|
|
4
|
+
export type KeyframeInfo = {
|
|
5
|
+
position: number;
|
|
6
|
+
value: unknown;
|
|
7
|
+
};
|
|
8
|
+
/** move/delete 的源帧定位结果:轨道 id + 帧 id */
|
|
9
|
+
export type KeyframeTarget = {
|
|
10
|
+
trackId: string;
|
|
11
|
+
keyframeId: string;
|
|
12
|
+
};
|
|
13
|
+
/** 指定简单叶子的全部关键帧(位置升序),未建轨返回空数组 */
|
|
14
|
+
export declare function listKeyframes(sheet: ISheet, obj: ISheetObject<$IntentionalAny>, propPath: string[]): KeyframeInfo[];
|
|
15
|
+
/**
|
|
16
|
+
* 定位指定位置(调用方已按 snap 规则处理好)的关键帧;无轨道或该位置
|
|
17
|
+
* 无帧返回 undefined。位置为精确相等:轨道上的帧位置恒为网格吸附值,
|
|
18
|
+
* 网格外的查询位置必然落空。
|
|
19
|
+
*/
|
|
20
|
+
export declare function findKeyframeAt(sheet: ISheet, obj: ISheetObject<$IntentionalAny>, propPath: string[], position: number): KeyframeTarget | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* 写关键帧:先把播放头定位到 position(吸附由命令层按 snap 完成;
|
|
23
|
+
* 事务内 set 的轨道感知写帧依赖播放头位置,core 会先对 position 做
|
|
24
|
+
* 一次网格吸附),再分两档写值:
|
|
25
|
+
*
|
|
26
|
+
* - 已建轨:单个可撤销事务 set(pointer, value);
|
|
27
|
+
* - 首次建轨:先以 undoable:false 的事务 setPrimitivePropAsSequenced
|
|
28
|
+
* 建轨(轨道落进已提交 state),再以第二个可撤销事务 set 写首帧——
|
|
29
|
+
* 事务内 set 的轨道检测只读已提交 track map,看不到同事务新建的
|
|
30
|
+
* 轨道(trackId 随机生成,同 poseTrack.writePoseKeyframe 注释的
|
|
31
|
+
* 已知限制),所以首帧必须等轨道提交后才能落成关键帧;建轨事务
|
|
32
|
+
* 不入撤销栈,整个 keyframes.set 对撤销历史只呈现一步。
|
|
33
|
+
*/
|
|
34
|
+
export declare function setKeyframe(sheet: ISheet, obj: ISheetObject<$IntentionalAny>, propPath: string[], args: {
|
|
35
|
+
position: number;
|
|
36
|
+
value: unknown;
|
|
37
|
+
sequenced: boolean;
|
|
38
|
+
}): void;
|
|
39
|
+
/**
|
|
40
|
+
* 移动关键帧:transformKeyframes 适配(参数形状同 AggregateKeyframeConnector
|
|
41
|
+
* 拖拽),translate 为 from/to 差值,scale 恒 1、origin 恒 0;目标位置由
|
|
42
|
+
* snappingFunction(closestGridPosition)落网格。源帧由命令层经
|
|
43
|
+
* findKeyframeAt 先行校验。
|
|
44
|
+
*/
|
|
45
|
+
export declare function moveKeyframe(sheet: ISheet, obj: ISheetObject<$IntentionalAny>, target: KeyframeTarget, args: {
|
|
46
|
+
from: number;
|
|
47
|
+
to: number;
|
|
48
|
+
}): void;
|
|
49
|
+
/**
|
|
50
|
+
* 删除指定位置的关键帧:播放头定位到 position 后 unset(pointer)——
|
|
51
|
+
* core 的 unset 在 positionSnappedToGrid 处落刀;只删帧,绝不
|
|
52
|
+
* unsequenceProp(轨道保留)。源帧由命令层经 findKeyframeAt 先行校验。
|
|
53
|
+
*/
|
|
54
|
+
export declare function deleteKeyframe(sheet: ISheet, obj: ISheetObject<$IntentionalAny>, propPath: string[], args: {
|
|
55
|
+
position: number;
|
|
56
|
+
}): void;
|
|
57
|
+
//# sourceMappingURL=keyframeTracks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyframeTracks.d.ts","sourceRoot":"","sources":["../../src/agent/keyframeTracks.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAC,MAAM,EAAE,YAAY,EAAC,MAAM,mBAAmB,CAAA;AAC3D,OAAO,KAAK,EACV,eAAe,EAIhB,MAAM,gCAAgC,CAAA;AAMvC,gCAAgC;AAChC,MAAM,MAAM,YAAY,GAAG;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAC,CAAA;AAE7D,uCAAuC;AACvC,MAAM,MAAM,cAAc,GAAG;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAC,CAAA;AAuClE,kCAAkC;AAClC,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,YAAY,CAAC,eAAe,CAAC,EAClC,QAAQ,EAAE,MAAM,EAAE,GACjB,YAAY,EAAE,CAIhB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,YAAY,CAAC,eAAe,CAAC,EAClC,QAAQ,EAAE,MAAM,EAAE,EAClB,QAAQ,EAAE,MAAM,GACf,cAAc,GAAG,SAAS,CAQ5B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CACzB,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,YAAY,CAAC,eAAe,CAAC,EAClC,QAAQ,EAAE,MAAM,EAAE,EAClB,IAAI,EAAE;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,OAAO,CAAA;CAAC,GAC3D,IAAI,CAmBN;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,YAAY,CAAC,eAAe,CAAC,EAClC,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAC,GAC/B,IAAI,CAcN;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,YAAY,CAAC,eAAe,CAAC,EAClC,QAAQ,EAAE,MAAM,EAAE,EAClB,IAAI,EAAE;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,GACvB,IAAI,CAON"}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 关键帧轨道适配(2026-10-17,Task 7):keyframes.* 命令的唯一 core/Studio
|
|
3
|
+
* 访问点,命令层不直接触碰 Studio state。集中三件事:
|
|
4
|
+
*
|
|
5
|
+
* 1. track map 读取:内部 SheetObject template 的
|
|
6
|
+
* getMapOfValidSequenceTracks_forStudio(与 poseTrack.getTrackIdForProp、
|
|
7
|
+
* useEditingToolsForSimpleProp 同一数据源)+ sheet.sequence.getKeyframes
|
|
8
|
+
* 取帧 id/位置;
|
|
9
|
+
* 2. 播放头定位:写 sequence.position(core 语义,先 pause + clamp);
|
|
10
|
+
* 3. 事务写入:内部 Studio(`@dreamerbird/studio/getStudio`,与
|
|
11
|
+
* TransportBar/CameraPath 同路径)的 transaction,api 携带 set/unset
|
|
12
|
+
* 与 stateEditors;transformKeyframes 的参数形状抽自
|
|
13
|
+
* AggregateKeyframeConnector.tsx:167-186(keyframeIds + translate +
|
|
14
|
+
* scale:1 + origin:0 + snappingFunction=sequence.closestGridPosition)。
|
|
15
|
+
*
|
|
16
|
+
* 事务回调同步执行,不跨 await;Studio 未初始化抛 SCENE_UNAVAILABLE。
|
|
17
|
+
*/
|
|
18
|
+
import { getPointerParts } from '@dreamerbird/dataverse';
|
|
19
|
+
import getStudio from '@dreamerbird/studio/getStudio';
|
|
20
|
+
import getDeep from '../getDeep';
|
|
21
|
+
import { AgentApiError } from './errors';
|
|
22
|
+
import { getSimplePropPointer } from './propAccess';
|
|
23
|
+
function requireStudio() {
|
|
24
|
+
const studio = getStudio();
|
|
25
|
+
if (!studio) {
|
|
26
|
+
throw new AgentApiError('SCENE_UNAVAILABLE', 'Studio 不可用,无法操作关键帧');
|
|
27
|
+
}
|
|
28
|
+
return studio;
|
|
29
|
+
}
|
|
30
|
+
function leafPointer(obj, propPath) {
|
|
31
|
+
return getSimplePropPointer(obj, propPath.join('.'));
|
|
32
|
+
}
|
|
33
|
+
/** 叶子路径的轨道 id(未建轨返回 undefined);数据源同 getTrackIdForProp */
|
|
34
|
+
function getTrackIdForPath(pointer, propPath) {
|
|
35
|
+
const { root } = getPointerParts(pointer);
|
|
36
|
+
const tree = root.template
|
|
37
|
+
.getMapOfValidSequenceTracks_forStudio()
|
|
38
|
+
.getValue();
|
|
39
|
+
const trackId = getDeep(tree, propPath);
|
|
40
|
+
return typeof trackId === 'string' ? trackId : undefined;
|
|
41
|
+
}
|
|
42
|
+
/** 指定简单叶子的全部关键帧(位置升序),未建轨返回空数组 */
|
|
43
|
+
export function listKeyframes(sheet, obj, propPath) {
|
|
44
|
+
return sheet.sequence
|
|
45
|
+
.getKeyframes(leafPointer(obj, propPath))
|
|
46
|
+
.map((kf) => ({ position: kf.position, value: kf.value }));
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* 定位指定位置(调用方已按 snap 规则处理好)的关键帧;无轨道或该位置
|
|
50
|
+
* 无帧返回 undefined。位置为精确相等:轨道上的帧位置恒为网格吸附值,
|
|
51
|
+
* 网格外的查询位置必然落空。
|
|
52
|
+
*/
|
|
53
|
+
export function findKeyframeAt(sheet, obj, propPath, position) {
|
|
54
|
+
const pointer = leafPointer(obj, propPath);
|
|
55
|
+
const trackId = getTrackIdForPath(pointer, propPath);
|
|
56
|
+
if (!trackId)
|
|
57
|
+
return undefined;
|
|
58
|
+
const keyframe = sheet.sequence
|
|
59
|
+
.getKeyframes(pointer)
|
|
60
|
+
.find((kf) => kf.position === position);
|
|
61
|
+
return keyframe ? { trackId, keyframeId: keyframe.id } : undefined;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* 写关键帧:先把播放头定位到 position(吸附由命令层按 snap 完成;
|
|
65
|
+
* 事务内 set 的轨道感知写帧依赖播放头位置,core 会先对 position 做
|
|
66
|
+
* 一次网格吸附),再分两档写值:
|
|
67
|
+
*
|
|
68
|
+
* - 已建轨:单个可撤销事务 set(pointer, value);
|
|
69
|
+
* - 首次建轨:先以 undoable:false 的事务 setPrimitivePropAsSequenced
|
|
70
|
+
* 建轨(轨道落进已提交 state),再以第二个可撤销事务 set 写首帧——
|
|
71
|
+
* 事务内 set 的轨道检测只读已提交 track map,看不到同事务新建的
|
|
72
|
+
* 轨道(trackId 随机生成,同 poseTrack.writePoseKeyframe 注释的
|
|
73
|
+
* 已知限制),所以首帧必须等轨道提交后才能落成关键帧;建轨事务
|
|
74
|
+
* 不入撤销栈,整个 keyframes.set 对撤销历史只呈现一步。
|
|
75
|
+
*/
|
|
76
|
+
export function setKeyframe(sheet, obj, propPath, args) {
|
|
77
|
+
const studio = requireStudio();
|
|
78
|
+
const pointer = leafPointer(obj, propPath);
|
|
79
|
+
sheet.sequence.position = args.position;
|
|
80
|
+
if (!args.sequenced) {
|
|
81
|
+
// 建轨:undoable:false,提交生效但不占撤销栈(同 scrub.commit(false))
|
|
82
|
+
studio.transaction(({ stateEditors }) => {
|
|
83
|
+
const { root, path } = getPointerParts(pointer);
|
|
84
|
+
stateEditors.coreByProject.historic.sheetsById.sequence.setPrimitivePropAsSequenced({
|
|
85
|
+
...root.address,
|
|
86
|
+
pathToProp: path,
|
|
87
|
+
});
|
|
88
|
+
}, false);
|
|
89
|
+
}
|
|
90
|
+
studio.transaction(({ set }) => {
|
|
91
|
+
set(pointer, args.value);
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* 移动关键帧:transformKeyframes 适配(参数形状同 AggregateKeyframeConnector
|
|
96
|
+
* 拖拽),translate 为 from/to 差值,scale 恒 1、origin 恒 0;目标位置由
|
|
97
|
+
* snappingFunction(closestGridPosition)落网格。源帧由命令层经
|
|
98
|
+
* findKeyframeAt 先行校验。
|
|
99
|
+
*/
|
|
100
|
+
export function moveKeyframe(sheet, obj, target, args) {
|
|
101
|
+
const studio = requireStudio();
|
|
102
|
+
studio.transaction(({ stateEditors }) => {
|
|
103
|
+
stateEditors.coreByProject.historic.sheetsById.sequence.transformKeyframes({
|
|
104
|
+
...obj.address,
|
|
105
|
+
// id 跨适配层边界按不透明字符串传递,此处回到 core 的名义类型
|
|
106
|
+
trackId: target.trackId,
|
|
107
|
+
keyframeIds: [target.keyframeId],
|
|
108
|
+
translate: args.to - args.from,
|
|
109
|
+
scale: 1,
|
|
110
|
+
origin: 0,
|
|
111
|
+
snappingFunction: sheet.sequence.closestGridPosition,
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* 删除指定位置的关键帧:播放头定位到 position 后 unset(pointer)——
|
|
117
|
+
* core 的 unset 在 positionSnappedToGrid 处落刀;只删帧,绝不
|
|
118
|
+
* unsequenceProp(轨道保留)。源帧由命令层经 findKeyframeAt 先行校验。
|
|
119
|
+
*/
|
|
120
|
+
export function deleteKeyframe(sheet, obj, propPath, args) {
|
|
121
|
+
const studio = requireStudio();
|
|
122
|
+
const pointer = leafPointer(obj, propPath);
|
|
123
|
+
sheet.sequence.position = args.position;
|
|
124
|
+
studio.transaction(({ unset }) => {
|
|
125
|
+
unset(pointer);
|
|
126
|
+
});
|
|
127
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SceneObjectId, SceneObjectKind } from './types';
|
|
2
|
+
export declare function formatSceneObjectId(kind: SceneObjectKind, key: string): SceneObjectId;
|
|
3
|
+
export declare function parseSceneObjectId(id: string): {
|
|
4
|
+
kind: SceneObjectKind;
|
|
5
|
+
key: string;
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=objectIds.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"objectIds.d.ts","sourceRoot":"","sources":["../../src/agent/objectIds.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,aAAa,EAAE,eAAe,EAAC,MAAM,SAAS,CAAA;AAI3D,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,eAAe,EACrB,GAAG,EAAE,MAAM,GACV,aAAa,CAGf;AAED,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG;IAC9C,IAAI,EAAE,eAAe,CAAA;IACrB,GAAG,EAAE,MAAM,CAAA;CACZ,CAQA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 带类型场景对象 ID(spec 8.4):`model:` / `camera:` / `anchor:` / `path:`
|
|
3
|
+
* 前缀 + key。key 内可含额外冒号,解析只按第一个冒号分隔。
|
|
4
|
+
*/
|
|
5
|
+
import { AgentApiError } from './errors';
|
|
6
|
+
const kinds = new Set(['model', 'camera', 'anchor', 'path']);
|
|
7
|
+
export function formatSceneObjectId(kind, key) {
|
|
8
|
+
if (!key)
|
|
9
|
+
throw new AgentApiError('INVALID_ARGUMENT', '对象 key 不能为空');
|
|
10
|
+
return `${kind}:${key}`;
|
|
11
|
+
}
|
|
12
|
+
export function parseSceneObjectId(id) {
|
|
13
|
+
const separator = id.indexOf(':');
|
|
14
|
+
const kind = separator > 0 ? id.slice(0, separator) : '';
|
|
15
|
+
const key = separator > 0 ? id.slice(separator + 1) : '';
|
|
16
|
+
if (!kinds.has(kind) || !key) {
|
|
17
|
+
throw new AgentApiError('INVALID_ID_KIND', `无效场景对象 ID: ${id}`);
|
|
18
|
+
}
|
|
19
|
+
return { kind: kind, key };
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"objectIds.test.d.ts","sourceRoot":"","sources":["../../src/agent/objectIds.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { formatSceneObjectId, parseSceneObjectId } from './objectIds';
|
|
2
|
+
import { AgentApiError } from './errors';
|
|
3
|
+
test('round trips typed ids and preserves additional colons in keys', () => {
|
|
4
|
+
const id = formatSceneObjectId('model', 'Rig:Left');
|
|
5
|
+
expect(id).toBe('model:Rig:Left');
|
|
6
|
+
expect(parseSceneObjectId(id)).toEqual({ kind: 'model', key: 'Rig:Left' });
|
|
7
|
+
});
|
|
8
|
+
test.each(['unknown:x', 'model:', 'model'])('rejects %s', (value) => {
|
|
9
|
+
expect(() => parseSceneObjectId(value)).toThrow(AgentApiError);
|
|
10
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ISheet, ISheetObject } from '@dreamerbird/core';
|
|
2
|
+
import type { SceneObjectId, SceneObjectKind } from './types';
|
|
3
|
+
/** 场景对象摘要(spec 8.4/9):带类型 ID + 当前求值属性 + 挂载状态 */
|
|
4
|
+
export type SceneObjectSummary = {
|
|
5
|
+
id: SceneObjectId;
|
|
6
|
+
kind: SceneObjectKind;
|
|
7
|
+
key: string;
|
|
8
|
+
/** 已挂载:SheetObject 当前求值属性的深拷贝;未挂载:null */
|
|
9
|
+
props: Record<string, unknown> | null;
|
|
10
|
+
/** 运行时 SheetObject 已登记(资源加载状态由领域 handler 另行上报) */
|
|
11
|
+
mounted: boolean;
|
|
12
|
+
};
|
|
13
|
+
/** 场景快照:revision 与对象清单(无副作用) */
|
|
14
|
+
export type SceneSnapshot = {
|
|
15
|
+
revision: number;
|
|
16
|
+
objects: SceneObjectSummary[];
|
|
17
|
+
};
|
|
18
|
+
/** 某类业务对象的全量 key;注册表未创建时为空(不创建) */
|
|
19
|
+
export declare function listSceneObjectKeys(sheet: ISheet, kind: SceneObjectKind): string[];
|
|
20
|
+
/** 全场景对象清单(无副作用) */
|
|
21
|
+
export declare function listSceneObjects(sheet: ISheet): SceneObjectSummary[];
|
|
22
|
+
/**
|
|
23
|
+
* 单个对象摘要。ID 前缀非法抛 INVALID_ID_KIND;注册表里没有抛
|
|
24
|
+
* OBJECT_NOT_FOUND(details 含 objectId 和 kind);有条目但未挂载返回
|
|
25
|
+
* props:null, mounted:false。
|
|
26
|
+
*/
|
|
27
|
+
export declare function getSceneObjectSummary(sheet: ISheet, objectId: string): SceneObjectSummary;
|
|
28
|
+
/**
|
|
29
|
+
* 解析业务 ID 到当前挂载的 SheetObject(未挂载返回 undefined)。
|
|
30
|
+
* expectedKind 用于领域命令的类型约束:类型不匹配抛 INVALID_ID_KIND
|
|
31
|
+
* (spec 8.4:解析时同时校验类型和存在性)。
|
|
32
|
+
*/
|
|
33
|
+
export declare function resolveSceneSheetObject(sheet: ISheet, objectId: string, expectedKind?: SceneObjectKind): ISheetObject<any> | undefined;
|
|
34
|
+
//# sourceMappingURL=objectResolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"objectResolver.d.ts","sourceRoot":"","sources":["../../src/agent/objectResolver.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAC,MAAM,EAAE,YAAY,EAAC,MAAM,mBAAmB,CAAA;AAQ3D,OAAO,KAAK,EAAC,aAAa,EAAE,eAAe,EAAC,MAAM,SAAS,CAAA;AAE3D,gDAAgD;AAChD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,EAAE,aAAa,CAAA;IACjB,IAAI,EAAE,eAAe,CAAA;IACrB,GAAG,EAAE,MAAM,CAAA;IACX,0CAA0C;IAC1C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IACrC,kDAAkD;IAClD,OAAO,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,gCAAgC;AAChC,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,kBAAkB,EAAE,CAAA;CAC9B,CAAA;AAqDD,mCAAmC;AACnC,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,eAAe,GACpB,MAAM,EAAE,CAIV;AAmBD,oBAAoB;AACpB,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,kBAAkB,EAAE,CAMpE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,GACf,kBAAkB,CAQpB;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,YAAY,CAAC,EAAE,eAAe,GAC7B,YAAY,CAAC,GAAG,CAAC,GAAG,SAAS,CAe/B"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent 场景对象 resolver(2026-10-17,Task 4):无副作用是核心契约。
|
|
3
|
+
*
|
|
4
|
+
* 存在性底账 = 四个业务注册表(Placements/Cameras/Anchors/Paths),
|
|
5
|
+
* 只用 privateAPI(sheet).getObject(registryKey) 探测 —— 注册表对象
|
|
6
|
+
* 不存在时按空清单算,绝不创建;也绝不调用 sheet.object / getPathMeta /
|
|
7
|
+
* readPathPoints(它们会顺手创建对象)。
|
|
8
|
+
*
|
|
9
|
+
* 业务 ID 的 key 分别来自 placement key、cameraKey、anchorKey、pathKey,
|
|
10
|
+
* 但不假定这些 key 能绕过运行时直接构造 SheetObject:运行时对象一律经
|
|
11
|
+
* objectRuntime 登记读取。注册表有条目但运行时未挂载时返回
|
|
12
|
+
* props:null, mounted:false,而不是误报 OBJECT_NOT_FOUND
|
|
13
|
+
* (后续写命令对此返回 INVALID_STATE)。
|
|
14
|
+
*/
|
|
15
|
+
import { val } from '@dreamerbird/core';
|
|
16
|
+
import { privateAPI } from '@dreamerbird/core/privateAPIs';
|
|
17
|
+
import { ANCHORS_REGISTRY_KEY, parseAnchorKeys } from '../anchorsRegistry';
|
|
18
|
+
import { CAMERAS_REGISTRY_KEY, parseCameraEntries } from '../cameraRegistry';
|
|
19
|
+
import { PATHS_REGISTRY_KEY, parsePathEntries } from '../pathRegistry';
|
|
20
|
+
import { PLACEMENTS_REGISTRY_KEY, readRegistry } from '../PlacementManager';
|
|
21
|
+
import { AgentApiError } from './errors';
|
|
22
|
+
import { formatSceneObjectId, parseSceneObjectId } from './objectIds';
|
|
23
|
+
import { getSceneSheetObject } from './runtime/objectRuntime';
|
|
24
|
+
const sources = [
|
|
25
|
+
{
|
|
26
|
+
kind: 'model',
|
|
27
|
+
registryKey: PLACEMENTS_REGISTRY_KEY,
|
|
28
|
+
keysFrom: (registry) => readRegistry(registry).map((entry) => entry.key),
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
kind: 'camera',
|
|
32
|
+
registryKey: CAMERAS_REGISTRY_KEY,
|
|
33
|
+
keysFrom: (registry) => parseCameraEntries(val(registry.props.list)).map((entry) => entry.cameraKey),
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
kind: 'anchor',
|
|
37
|
+
registryKey: ANCHORS_REGISTRY_KEY,
|
|
38
|
+
keysFrom: (registry) => parseAnchorKeys(val(registry.props.list)),
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
kind: 'path',
|
|
42
|
+
registryKey: PATHS_REGISTRY_KEY,
|
|
43
|
+
keysFrom: (registry) => parsePathEntries(val(registry.props.list)).map((entry) => entry.pathKey),
|
|
44
|
+
},
|
|
45
|
+
];
|
|
46
|
+
/**
|
|
47
|
+
* 只探测不创建:内部对象表里没有就返回 undefined。
|
|
48
|
+
* getObject 返回的是内部 SheetObject,经 publicApi 拿公开门面再读 props。
|
|
49
|
+
*/
|
|
50
|
+
function peekRegistry(sheet, registryKey) {
|
|
51
|
+
const internal = privateAPI(sheet).getObject(registryKey);
|
|
52
|
+
return (internal?.publicApi ?? undefined);
|
|
53
|
+
}
|
|
54
|
+
function sourceFor(kind) {
|
|
55
|
+
return sources.find((source) => source.kind === kind);
|
|
56
|
+
}
|
|
57
|
+
/** 某类业务对象的全量 key;注册表未创建时为空(不创建) */
|
|
58
|
+
export function listSceneObjectKeys(sheet, kind) {
|
|
59
|
+
const source = sourceFor(kind);
|
|
60
|
+
const registry = peekRegistry(sheet, source.registryKey);
|
|
61
|
+
return registry ? source.keysFrom(registry) : [];
|
|
62
|
+
}
|
|
63
|
+
/** theatre 的值层保证可序列化,JSON 往返即深拷贝(防调用方改返回值污染场景) */
|
|
64
|
+
function deepCopyProps(value) {
|
|
65
|
+
return JSON.parse(JSON.stringify(value ?? {}));
|
|
66
|
+
}
|
|
67
|
+
function summarize(kind, key) {
|
|
68
|
+
const id = formatSceneObjectId(kind, key);
|
|
69
|
+
const obj = getSceneSheetObject(id);
|
|
70
|
+
return {
|
|
71
|
+
id,
|
|
72
|
+
kind,
|
|
73
|
+
key,
|
|
74
|
+
props: obj ? deepCopyProps(obj.value) : null,
|
|
75
|
+
mounted: Boolean(obj),
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
/** 全场景对象清单(无副作用) */
|
|
79
|
+
export function listSceneObjects(sheet) {
|
|
80
|
+
return sources.flatMap((source) => listSceneObjectKeys(sheet, source.kind).map((key) => summarize(source.kind, key)));
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* 单个对象摘要。ID 前缀非法抛 INVALID_ID_KIND;注册表里没有抛
|
|
84
|
+
* OBJECT_NOT_FOUND(details 含 objectId 和 kind);有条目但未挂载返回
|
|
85
|
+
* props:null, mounted:false。
|
|
86
|
+
*/
|
|
87
|
+
export function getSceneObjectSummary(sheet, objectId) {
|
|
88
|
+
const { kind, key } = parseSceneObjectId(objectId);
|
|
89
|
+
if (!listSceneObjectKeys(sheet, kind).includes(key)) {
|
|
90
|
+
throw new AgentApiError('OBJECT_NOT_FOUND', `场景对象不存在: ${objectId}`, {
|
|
91
|
+
details: { objectId, kind },
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
return summarize(kind, key);
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* 解析业务 ID 到当前挂载的 SheetObject(未挂载返回 undefined)。
|
|
98
|
+
* expectedKind 用于领域命令的类型约束:类型不匹配抛 INVALID_ID_KIND
|
|
99
|
+
* (spec 8.4:解析时同时校验类型和存在性)。
|
|
100
|
+
*/
|
|
101
|
+
export function resolveSceneSheetObject(sheet, objectId, expectedKind) {
|
|
102
|
+
const { kind, key } = parseSceneObjectId(objectId);
|
|
103
|
+
if (expectedKind && kind !== expectedKind) {
|
|
104
|
+
throw new AgentApiError('INVALID_ID_KIND', `对象 ${objectId} 的类型是 ${kind},此处需要 ${expectedKind}`, { details: { objectId, kind, expectedKind } });
|
|
105
|
+
}
|
|
106
|
+
if (!listSceneObjectKeys(sheet, kind).includes(key)) {
|
|
107
|
+
throw new AgentApiError('OBJECT_NOT_FOUND', `场景对象不存在: ${objectId}`, {
|
|
108
|
+
details: { objectId, kind },
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
return getSceneSheetObject(formatSceneObjectId(kind, key));
|
|
112
|
+
}
|