@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,544 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 资产库框体:模型/路径/姿势/动作四种类型的选择面板,一个组件四个实例。
|
|
3
|
+
*
|
|
4
|
+
* 样式对齐 theatre 原生面板:骨架/标题栏配色取自 studio BasePanel
|
|
5
|
+
* (panel-bg #282b2f、TitleBar #25272b),按钮复用 studio DetailPanelButton,
|
|
6
|
+
* 卡片右键菜单复用 studio ContextMenu。--theatre-* 令牌定义在 studio 的
|
|
7
|
+
* shadow DOM(:host),主文档不可见,一律带同值兜底——令牌将来全局化时
|
|
8
|
+
* 自动接管(同 TopToolbar 的策略)。
|
|
9
|
+
*/
|
|
10
|
+
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
11
|
+
import styled from 'styled-components';
|
|
12
|
+
import DetailPanelButton from '@dreamerbird/studio/uiComponents/DetailPanelButton';
|
|
13
|
+
import { useI18n } from '@dreamerbird/studio/i18n';
|
|
14
|
+
import { CanvasContextMenu } from '../contextMenu';
|
|
15
|
+
import { countLibraryEntryUsage } from '../PlacementManager';
|
|
16
|
+
import { PATH_PRESETS } from '../pathPresets';
|
|
17
|
+
import { PathPresetThumb } from '../PathPresetThumb';
|
|
18
|
+
import { getLibrary, useLibraryEntries, useRigAliases } from './library';
|
|
19
|
+
import { planImport, executeImport, realImportDeps } from './importPipeline';
|
|
20
|
+
import { backfillModelThumbnails } from './thumbnail';
|
|
21
|
+
import { useModelThumbUrl } from './useModelThumbUrl';
|
|
22
|
+
import { getUiConfig } from '../uiConfig';
|
|
23
|
+
/** 框体标题:一个组件四个实例,按类型各显各的(key 见 ./i18n) */
|
|
24
|
+
const KIND_TITLE_KEYS = {
|
|
25
|
+
model: 'pg.lib.title.model',
|
|
26
|
+
pose: 'pg.lib.title.pose',
|
|
27
|
+
animation: 'pg.lib.title.animation',
|
|
28
|
+
path: 'pg.lib.title.path',
|
|
29
|
+
};
|
|
30
|
+
/** 预设卡片的显示名:内置预设自带中英双名,按界面语言取 */
|
|
31
|
+
function presetDisplayName(preset, language) {
|
|
32
|
+
return language.toLowerCase().startsWith('zh') ? preset.name : preset.en;
|
|
33
|
+
}
|
|
34
|
+
/** 多框体同开时贴左边缘按类型错开,避免完全重叠 */
|
|
35
|
+
const KIND_OFFSET = {
|
|
36
|
+
model: 0,
|
|
37
|
+
path: 16,
|
|
38
|
+
pose: 32,
|
|
39
|
+
animation: 48,
|
|
40
|
+
};
|
|
41
|
+
/** 卡片手势阈值:按下后移动超过 4px 算拖拽(沿用场景点选的拖拽判定惯例) */
|
|
42
|
+
const DRAG_THRESHOLD_PX = 4;
|
|
43
|
+
// ---------------------------------------------------------------------------
|
|
44
|
+
// 样式(theatre 原生色系,var() 全部带同值兜底)
|
|
45
|
+
/** 面板骨架:对齐 studio BasePanel 的底色/文字/字体 */
|
|
46
|
+
const Panel = styled.div `
|
|
47
|
+
position: fixed;
|
|
48
|
+
top: 0;
|
|
49
|
+
bottom: 0;
|
|
50
|
+
width: 260px;
|
|
51
|
+
/* studio 大纲面板的层级是 100,面板必须盖过它;基准可配(ui.zIndexBase)。
|
|
52
|
+
函数插值:渲染期现读,setUiConfig(boot 时)之后挂的首帧即生效 */
|
|
53
|
+
z-index: ${() => getUiConfig().zIndexBase};
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: column;
|
|
56
|
+
background: var(--theatre-panel-bg, #282b2f);
|
|
57
|
+
border-right: 1px solid var(--theatre-panel-border, #1f1f1f);
|
|
58
|
+
color: var(--theatre-text-primary, #ffffff);
|
|
59
|
+
font-size: var(--theatre-font-size, 11px);
|
|
60
|
+
font-family: var(
|
|
61
|
+
--theatre-font-family,
|
|
62
|
+
-apple-system,
|
|
63
|
+
BlinkMacSystemFont,
|
|
64
|
+
Segoe WPC,
|
|
65
|
+
Segoe Editor,
|
|
66
|
+
HelveticaNeue-Light,
|
|
67
|
+
Ubuntu,
|
|
68
|
+
Droid Sans,
|
|
69
|
+
sans-serif
|
|
70
|
+
);
|
|
71
|
+
`;
|
|
72
|
+
/** 头部:照抄 studio 面板 TitleBar 的配色(#25272b + 黑色细分隔线) */
|
|
73
|
+
const Head = styled.div `
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
gap: 4px;
|
|
77
|
+
padding: 4px 6px 4px 12px;
|
|
78
|
+
background-color: #25272b;
|
|
79
|
+
border-bottom: 1px solid rgb(0 0 0 / 13%);
|
|
80
|
+
`;
|
|
81
|
+
const HeadTitle = styled.span `
|
|
82
|
+
font-size: 11px;
|
|
83
|
+
font-weight: 600;
|
|
84
|
+
color: var(--theatre-head-title, #bbbbbb);
|
|
85
|
+
`;
|
|
86
|
+
const HeadSpacer = styled.div `
|
|
87
|
+
flex: 1;
|
|
88
|
+
`;
|
|
89
|
+
/** 头部小图标按钮:透明底,hover 用原生工具条按钮的 hover 色 */
|
|
90
|
+
const HeadButton = styled.button `
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
justify-content: center;
|
|
94
|
+
width: 24px;
|
|
95
|
+
height: 24px;
|
|
96
|
+
padding: 0;
|
|
97
|
+
border: none;
|
|
98
|
+
border-radius: 2px;
|
|
99
|
+
background: transparent;
|
|
100
|
+
color: var(--theatre-text-secondary, #cccccc);
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
&:hover {
|
|
103
|
+
background: rgba(59, 63, 69, 0.8);
|
|
104
|
+
color: var(--theatre-text-primary, #ffffff);
|
|
105
|
+
}
|
|
106
|
+
&:disabled {
|
|
107
|
+
opacity: 0.45;
|
|
108
|
+
cursor: default;
|
|
109
|
+
&:hover {
|
|
110
|
+
background: transparent;
|
|
111
|
+
color: var(--theatre-text-secondary, #cccccc);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
`;
|
|
115
|
+
/** filterRig 提示条:弱化处理,用文字弱化色 */
|
|
116
|
+
const HintBar = styled.div `
|
|
117
|
+
padding: 8px 12px;
|
|
118
|
+
font-size: 11px;
|
|
119
|
+
color: var(--theatre-text-muted, #888888);
|
|
120
|
+
background: rgba(0, 0, 0, 0.15);
|
|
121
|
+
border-bottom: 1px solid var(--theatre-panel-border, #1f1f1f);
|
|
122
|
+
`;
|
|
123
|
+
/** 姿势框体顶部工具行(抽帧存姿势) */
|
|
124
|
+
const ToolRow = styled.div `
|
|
125
|
+
display: flex;
|
|
126
|
+
padding: 8px 12px;
|
|
127
|
+
border-bottom: 1px solid var(--theatre-panel-border, #1f1f1f);
|
|
128
|
+
/* DetailPanelButton 是 block + flex-grow,这里给它一行 */
|
|
129
|
+
& > * {
|
|
130
|
+
flex: 1;
|
|
131
|
+
}
|
|
132
|
+
`;
|
|
133
|
+
/** 姿势状态行(spec §6.2):来源 + 帧数居左,打帧/清除靠右 */
|
|
134
|
+
const StatusRow = styled.div `
|
|
135
|
+
display: flex;
|
|
136
|
+
align-items: center;
|
|
137
|
+
gap: 8px;
|
|
138
|
+
padding: 4px 8px;
|
|
139
|
+
border-bottom: 1px solid var(--theatre-panel-border, #1f1f1f);
|
|
140
|
+
font-size: 11px;
|
|
141
|
+
color: var(--theatre-text-secondary, #cccccc);
|
|
142
|
+
`;
|
|
143
|
+
const StatusText = styled.span `
|
|
144
|
+
flex: 1;
|
|
145
|
+
overflow: hidden;
|
|
146
|
+
text-overflow: ellipsis;
|
|
147
|
+
white-space: nowrap;
|
|
148
|
+
`;
|
|
149
|
+
const Grid = styled.div `
|
|
150
|
+
flex: 1;
|
|
151
|
+
overflow-y: auto;
|
|
152
|
+
padding: 12px;
|
|
153
|
+
display: grid;
|
|
154
|
+
grid-template-columns: 1fr 1fr;
|
|
155
|
+
gap: 8px;
|
|
156
|
+
align-content: start;
|
|
157
|
+
`;
|
|
158
|
+
/** 卡片:面板色系,hover 用原生工具条按钮的 hover 色 */
|
|
159
|
+
const Card = styled.div `
|
|
160
|
+
position: relative;
|
|
161
|
+
height: 96px;
|
|
162
|
+
border-radius: 3px;
|
|
163
|
+
background: rgba(0, 0, 0, 0.18);
|
|
164
|
+
border: 1px solid var(--theatre-panel-border, #1f1f1f);
|
|
165
|
+
overflow: hidden;
|
|
166
|
+
cursor: pointer;
|
|
167
|
+
user-select: none;
|
|
168
|
+
&:hover {
|
|
169
|
+
background: rgba(59, 63, 69, 0.8);
|
|
170
|
+
}
|
|
171
|
+
&[data-disabled='true'] {
|
|
172
|
+
cursor: default;
|
|
173
|
+
opacity: 0.5;
|
|
174
|
+
&:hover {
|
|
175
|
+
background: rgba(0, 0, 0, 0.18);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
`;
|
|
179
|
+
const Thumb = styled.div `
|
|
180
|
+
width: 100%;
|
|
181
|
+
height: 64px;
|
|
182
|
+
display: flex;
|
|
183
|
+
align-items: center;
|
|
184
|
+
justify-content: center;
|
|
185
|
+
font-size: 24px;
|
|
186
|
+
background: rgba(0, 0, 0, 0.25);
|
|
187
|
+
`;
|
|
188
|
+
const Label = styled.div `
|
|
189
|
+
position: absolute;
|
|
190
|
+
bottom: 6px;
|
|
191
|
+
left: 6px;
|
|
192
|
+
right: 6px;
|
|
193
|
+
font-size: 11px;
|
|
194
|
+
color: var(--theatre-text-primary, #ffffff);
|
|
195
|
+
white-space: nowrap;
|
|
196
|
+
overflow: hidden;
|
|
197
|
+
text-overflow: ellipsis;
|
|
198
|
+
`;
|
|
199
|
+
const Tag = styled.div `
|
|
200
|
+
position: absolute;
|
|
201
|
+
top: 6px;
|
|
202
|
+
right: 6px;
|
|
203
|
+
padding: 2px 6px;
|
|
204
|
+
border-radius: 2px;
|
|
205
|
+
font-size: 10px;
|
|
206
|
+
color: var(--theatre-text-secondary, #cccccc);
|
|
207
|
+
background: rgba(0, 0, 0, 0.45);
|
|
208
|
+
max-width: 60%;
|
|
209
|
+
overflow: hidden;
|
|
210
|
+
text-overflow: ellipsis;
|
|
211
|
+
white-space: nowrap;
|
|
212
|
+
`;
|
|
213
|
+
/** 导入确认弹层:面板色系,盖在框体之上 */
|
|
214
|
+
const Overlay = styled.div `
|
|
215
|
+
position: absolute;
|
|
216
|
+
inset: 0;
|
|
217
|
+
z-index: 20;
|
|
218
|
+
display: flex;
|
|
219
|
+
flex-direction: column;
|
|
220
|
+
justify-content: center;
|
|
221
|
+
padding: 16px;
|
|
222
|
+
background: var(--theatre-panel-bg-99, rgba(40, 43, 47, 0.99));
|
|
223
|
+
`;
|
|
224
|
+
const OverlayTitle = styled.div `
|
|
225
|
+
font-size: 12px;
|
|
226
|
+
font-weight: 600;
|
|
227
|
+
margin-bottom: 10px;
|
|
228
|
+
`;
|
|
229
|
+
const MutedText = styled.div `
|
|
230
|
+
font-size: 11px;
|
|
231
|
+
color: var(--theatre-text-muted, #888888);
|
|
232
|
+
`;
|
|
233
|
+
const SimilarCard = styled.div `
|
|
234
|
+
padding: 8px 10px;
|
|
235
|
+
margin-bottom: 6px;
|
|
236
|
+
border-radius: 3px;
|
|
237
|
+
border: 1px solid var(--theatre-panel-border, #1f1f1f);
|
|
238
|
+
background: rgba(0, 0, 0, 0.18);
|
|
239
|
+
font-size: 11px;
|
|
240
|
+
`;
|
|
241
|
+
/** 取消按钮:DetailPanelButton 的透明变体(teal 底让给主按钮) */
|
|
242
|
+
const GhostButton = styled(DetailPanelButton) `
|
|
243
|
+
flex-grow: 0;
|
|
244
|
+
background: transparent;
|
|
245
|
+
border-color: var(--theatre-panel-border, #1f1f1f);
|
|
246
|
+
&:hover {
|
|
247
|
+
background: rgba(59, 63, 69, 0.8);
|
|
248
|
+
border-color: var(--theatre-panel-border, #1f1f1f);
|
|
249
|
+
}
|
|
250
|
+
`;
|
|
251
|
+
const ConfirmButton = styled(DetailPanelButton) `
|
|
252
|
+
flex-grow: 0;
|
|
253
|
+
`;
|
|
254
|
+
/** 头部图标:导入(箭头出托盘向上)/ 关闭。16×16、currentColor */
|
|
255
|
+
const ImportIcon = () => (React.createElement("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none" },
|
|
256
|
+
React.createElement("path", { d: "M8 10.5V4M4.8 7.2L8 4l3.2 3.2", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }),
|
|
257
|
+
React.createElement("path", { d: "M2.5 11.5v1a1 1 0 001 1h9a1 1 0 001-1v-1", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round" })));
|
|
258
|
+
const CloseIcon = () => (React.createElement("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none" },
|
|
259
|
+
React.createElement("path", { d: "M4.5 4.5l7 7M11.5 4.5l-7 7", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round" })));
|
|
260
|
+
// ---------------------------------------------------------------------------
|
|
261
|
+
/**
|
|
262
|
+
* 卡片手势:按下后移动超阈值 = 拖拽(onDragStart 触发一次),否则松开 = 点击。
|
|
263
|
+
* 监听挂 window:拖出卡片后移动/松手照样生效。右键不走这里(另有 onContextMenu)。
|
|
264
|
+
*/
|
|
265
|
+
function useCardGesture(onClick, onDragStart) {
|
|
266
|
+
const gestureRef = useRef(null);
|
|
267
|
+
const onClickRef = useRef(onClick);
|
|
268
|
+
const onDragStartRef = useRef(onDragStart);
|
|
269
|
+
onClickRef.current = onClick;
|
|
270
|
+
onDragStartRef.current = onDragStart;
|
|
271
|
+
useEffect(() => {
|
|
272
|
+
const onMove = (ev) => {
|
|
273
|
+
const g = gestureRef.current;
|
|
274
|
+
if (!g || g.dragging)
|
|
275
|
+
return;
|
|
276
|
+
if (Math.hypot(ev.clientX - g.x, ev.clientY - g.y) > DRAG_THRESHOLD_PX) {
|
|
277
|
+
const start = onDragStartRef.current;
|
|
278
|
+
if (!start)
|
|
279
|
+
return;
|
|
280
|
+
g.dragging = true;
|
|
281
|
+
start(g.item);
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
const onUp = (ev) => {
|
|
285
|
+
// 按住左键时再松右键/中键也会触发 pointerup:只认左键松手,
|
|
286
|
+
// 其他键的 up 不清手势也不结算,等左键自己的 up
|
|
287
|
+
if (ev.button !== 0)
|
|
288
|
+
return;
|
|
289
|
+
const g = gestureRef.current;
|
|
290
|
+
gestureRef.current = null;
|
|
291
|
+
if (g && !g.dragging)
|
|
292
|
+
onClickRef.current(g.item);
|
|
293
|
+
};
|
|
294
|
+
// pointercancel/blur:手势被系统打断,清掉 gestureRef,否则陈旧手势
|
|
295
|
+
// 会在下一次任意 pointerup 变成幻影放置
|
|
296
|
+
const onCancel = () => {
|
|
297
|
+
gestureRef.current = null;
|
|
298
|
+
};
|
|
299
|
+
window.addEventListener('pointermove', onMove);
|
|
300
|
+
window.addEventListener('pointerup', onUp);
|
|
301
|
+
window.addEventListener('pointercancel', onCancel);
|
|
302
|
+
window.addEventListener('blur', onCancel);
|
|
303
|
+
return () => {
|
|
304
|
+
window.removeEventListener('pointermove', onMove);
|
|
305
|
+
window.removeEventListener('pointerup', onUp);
|
|
306
|
+
window.removeEventListener('pointercancel', onCancel);
|
|
307
|
+
window.removeEventListener('blur', onCancel);
|
|
308
|
+
};
|
|
309
|
+
}, []);
|
|
310
|
+
return useCallback((item) => (ev) => {
|
|
311
|
+
if (ev.button !== 0)
|
|
312
|
+
return;
|
|
313
|
+
gestureRef.current = { item, x: ev.clientX, y: ev.clientY, dragging: false };
|
|
314
|
+
}, []);
|
|
315
|
+
}
|
|
316
|
+
export function AssetLibraryPanel({ kind, onPlaceModel, onDragStartModel, onPlacePreset, onDragStartPreset, filterRig, onClose, onApplyAnimation, onApplyPose, onSavePose, canSavePose, applyDisabled, disabled, poseStatus, poseKeyframeCount, onWritePoseKeyframe, onClearPose, }) {
|
|
317
|
+
const models = useLibraryEntries('model');
|
|
318
|
+
const poses = useLibraryEntries('pose');
|
|
319
|
+
const animations = useLibraryEntries('animation');
|
|
320
|
+
const { t, language } = useI18n();
|
|
321
|
+
const fileRef = useRef(null);
|
|
322
|
+
const [plan, setPlan] = useState(null);
|
|
323
|
+
const [choices, setChoices] = useState([]);
|
|
324
|
+
const [busy, setBusy] = useState(false);
|
|
325
|
+
const [menu, setMenu] = useState(null);
|
|
326
|
+
// 缩略图懒加载抽到 useModelThumbUrl(注册制改造:宿主模型框体也用它)
|
|
327
|
+
const { getThumbUrl: thumbUrl, dropThumbUrl } = useModelThumbUrl();
|
|
328
|
+
const modelGesture = useCardGesture((entry) => onPlaceModel?.(entry), onDragStartModel);
|
|
329
|
+
const presetGesture = useCardGesture((preset) => onPlacePreset?.(preset), (preset) => onDragStartPreset?.(preset));
|
|
330
|
+
const mountedRef = useRef(true);
|
|
331
|
+
useEffect(() => {
|
|
332
|
+
mountedRef.current = true;
|
|
333
|
+
return () => {
|
|
334
|
+
mountedRef.current = false;
|
|
335
|
+
};
|
|
336
|
+
}, []);
|
|
337
|
+
// 内置模型不再随框体播种(2026-10-10 目录化):StaticCatalogSource
|
|
338
|
+
// 以只读目录并入聚合库,条目随 listEntries 自然在列
|
|
339
|
+
const rigAliases = useRigAliases();
|
|
340
|
+
/** 骨架标签文案:有别名显示别名,否则短哈希 */
|
|
341
|
+
const rigLabel = (rig) => rigAliases[rig] ?? (rig.length > 12 ? rig.slice(0, 11) + '…' : rig);
|
|
342
|
+
const renameRig = (rig) => (ev) => {
|
|
343
|
+
ev.stopPropagation(); // 标签在卡片内,不能触发卡片的放置/套用
|
|
344
|
+
const name = window
|
|
345
|
+
.prompt(t('pg.lib.rigRenamePrompt'), rigAliases[rig] ?? '')
|
|
346
|
+
?.trim();
|
|
347
|
+
if (name)
|
|
348
|
+
void getLibrary()
|
|
349
|
+
.setRigAlias(rig, name)
|
|
350
|
+
.catch((err) => console.warn('[assetLibrary] 设置骨架别名失败', err));
|
|
351
|
+
};
|
|
352
|
+
const onPickFiles = async (files) => {
|
|
353
|
+
if (!files?.length)
|
|
354
|
+
return;
|
|
355
|
+
setBusy(true);
|
|
356
|
+
try {
|
|
357
|
+
const p = await planImport([...files], getLibrary(), realImportDeps(), t);
|
|
358
|
+
if (!mountedRef.current)
|
|
359
|
+
return;
|
|
360
|
+
setChoices(p.similar.map(() => 'reuse'));
|
|
361
|
+
setPlan(p);
|
|
362
|
+
}
|
|
363
|
+
finally {
|
|
364
|
+
if (mountedRef.current)
|
|
365
|
+
setBusy(false);
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
const confirmImport = async () => {
|
|
369
|
+
if (!plan)
|
|
370
|
+
return;
|
|
371
|
+
setBusy(true);
|
|
372
|
+
try {
|
|
373
|
+
await executeImport(plan, choices, getLibrary());
|
|
374
|
+
// 补缩略图:导入成功的 model 项逐个渲染
|
|
375
|
+
await backfillModelThumbnails(plan.items, getLibrary());
|
|
376
|
+
if (!mountedRef.current)
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
finally {
|
|
380
|
+
if (mountedRef.current) {
|
|
381
|
+
setBusy(false);
|
|
382
|
+
setPlan(null);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
};
|
|
386
|
+
const removeEntry = async (id) => {
|
|
387
|
+
const entry = await getLibrary().getEntry(id);
|
|
388
|
+
if (!entry)
|
|
389
|
+
return;
|
|
390
|
+
const usage = countLibraryEntryUsage(id);
|
|
391
|
+
const message = usage > 0
|
|
392
|
+
? t('pg.lib.delete.inUse', { name: entry.name, count: usage })
|
|
393
|
+
: t('pg.lib.delete.unused', { name: entry.name });
|
|
394
|
+
if (!window.confirm(message))
|
|
395
|
+
return;
|
|
396
|
+
await getLibrary().deleteEntryDeep(id);
|
|
397
|
+
if (mountedRef.current) {
|
|
398
|
+
dropThumbUrl(id);
|
|
399
|
+
}
|
|
400
|
+
};
|
|
401
|
+
const renameEntry = async (id) => {
|
|
402
|
+
const entry = await getLibrary().getEntry(id);
|
|
403
|
+
if (!entry)
|
|
404
|
+
return;
|
|
405
|
+
const name = window.prompt(t('pg.lib.renamePrompt'), entry.name)?.trim();
|
|
406
|
+
if (name)
|
|
407
|
+
await getLibrary().renameEntry(id, name);
|
|
408
|
+
};
|
|
409
|
+
const renderModelCard = (entry) => {
|
|
410
|
+
const url = thumbUrl(entry);
|
|
411
|
+
return (React.createElement(Card, { key: entry.id, onPointerDown: modelGesture(entry), onDragStart: (ev) => ev.preventDefault(), onContextMenu: (ev) => {
|
|
412
|
+
ev.preventDefault();
|
|
413
|
+
setMenu({ x: ev.clientX, y: ev.clientY, id: entry.id });
|
|
414
|
+
} },
|
|
415
|
+
url ? (React.createElement("img", { src: url, alt: entry.name, draggable: false, style: { width: '100%', height: 64, objectFit: 'cover' } })) : (React.createElement(Thumb, null, "\uD83D\uDCE6")),
|
|
416
|
+
React.createElement(Label, { title: entry.name }, entry.name)));
|
|
417
|
+
};
|
|
418
|
+
const sortBySelectedRig = (list) => {
|
|
419
|
+
if (!filterRig)
|
|
420
|
+
return list;
|
|
421
|
+
return [...list].sort((a, b) => {
|
|
422
|
+
const aSame = a.rig === filterRig ? 1 : 0;
|
|
423
|
+
const bSame = b.rig === filterRig ? 1 : 0;
|
|
424
|
+
return bSame - aSame;
|
|
425
|
+
});
|
|
426
|
+
};
|
|
427
|
+
const renderApplyCard = (entry, icon, onApply, extra) => {
|
|
428
|
+
const rigMismatch = filterRig ? entry.rig !== filterRig : false;
|
|
429
|
+
const cardDisabled = disabled || applyDisabled || !onApply || rigMismatch;
|
|
430
|
+
return (React.createElement(Card, { key: entry.id, "data-disabled": cardDisabled, onClick: cardDisabled ? undefined : () => onApply(entry), onContextMenu: (ev) => {
|
|
431
|
+
ev.preventDefault();
|
|
432
|
+
setMenu({ x: ev.clientX, y: ev.clientY, id: entry.id });
|
|
433
|
+
} },
|
|
434
|
+
React.createElement(Thumb, null, icon),
|
|
435
|
+
React.createElement(Tag, { style: getLibrary().canWrite ? { cursor: 'pointer' } : undefined, title: t('pg.lib.rigTitle', { rig: entry.rig }), onClick: getLibrary().canWrite ? renameRig(entry.rig) : undefined },
|
|
436
|
+
rigLabel(entry.rig),
|
|
437
|
+
rigMismatch && t('pg.lib.rigMismatch')),
|
|
438
|
+
React.createElement(Label, { title: entry.name }, entry.name),
|
|
439
|
+
extra));
|
|
440
|
+
};
|
|
441
|
+
const renderAnimationCard = (entry) => renderApplyCard(entry, '🎬', onApplyAnimation, React.createElement("div", { style: {
|
|
442
|
+
position: 'absolute',
|
|
443
|
+
bottom: 24,
|
|
444
|
+
left: 6,
|
|
445
|
+
fontSize: 10,
|
|
446
|
+
color: 'var(--theatre-text-muted, #888888)',
|
|
447
|
+
} },
|
|
448
|
+
entry.duration.toFixed(2),
|
|
449
|
+
"s"));
|
|
450
|
+
const renderPoseCard = (entry) => renderApplyCard(entry, '🧍', onApplyPose);
|
|
451
|
+
// 预设卡片:内置不可删改,无右键菜单、无骨架标签;动画缩略图即运镜轨迹
|
|
452
|
+
const renderPresetCard = (preset) => (React.createElement(Card, { key: preset.id, onPointerDown: presetGesture(preset), onDragStart: (ev) => ev.preventDefault(), title: t('pg.lib.modelCardTitle') },
|
|
453
|
+
React.createElement(Thumb, { style: { fontSize: 0 } },
|
|
454
|
+
React.createElement(PathPresetThumb, { preset: preset })),
|
|
455
|
+
React.createElement(Label, null, presetDisplayName(preset, language))));
|
|
456
|
+
const visibleAnimations = sortBySelectedRig(animations);
|
|
457
|
+
const visiblePoses = sortBySelectedRig(poses);
|
|
458
|
+
return (React.createElement(Panel, { style: { left: KIND_OFFSET[kind] } },
|
|
459
|
+
React.createElement(Head, null,
|
|
460
|
+
React.createElement(HeadTitle, null, t(KIND_TITLE_KEYS[kind])),
|
|
461
|
+
React.createElement(HeadSpacer, null),
|
|
462
|
+
kind !== 'path' && getLibrary().canWrite && (React.createElement(HeadButton, { disabled: busy, onClick: () => fileRef.current?.click(), title: t('pg.lib.import') },
|
|
463
|
+
React.createElement(ImportIcon, null))),
|
|
464
|
+
React.createElement(HeadButton, { onClick: onClose, title: t('pg.lib.close') },
|
|
465
|
+
React.createElement(CloseIcon, null))),
|
|
466
|
+
React.createElement("input", { ref: fileRef, type: "file", multiple: true, style: { display: 'none' }, onChange: (ev) => {
|
|
467
|
+
void onPickFiles(ev.target.files);
|
|
468
|
+
ev.target.value = '';
|
|
469
|
+
} }),
|
|
470
|
+
(kind === 'animation' || kind === 'pose') && filterRig && (React.createElement(HintBar, null, t('pg.lib.filterHint'))),
|
|
471
|
+
kind === 'pose' && getLibrary().canWrite && (React.createElement(ToolRow, null,
|
|
472
|
+
React.createElement(DetailPanelButton, { disabled: !canSavePose, onClick: () => void onSavePose?.(), title: canSavePose ? undefined : t('pg.lib.savePoseDisabled') }, t('pg.lib.savePose')))),
|
|
473
|
+
kind === 'pose' && poseStatus !== undefined && (React.createElement(StatusRow, null,
|
|
474
|
+
React.createElement(StatusText, null,
|
|
475
|
+
poseStatus,
|
|
476
|
+
typeof poseKeyframeCount === 'number' &&
|
|
477
|
+
` · ${poseKeyframeCount} ${t('pg.pose.keyframesUnit')}`),
|
|
478
|
+
onWritePoseKeyframe && (React.createElement(GhostButton, { onClick: onWritePoseKeyframe }, t('pg.pose.addKeyframe'))),
|
|
479
|
+
onClearPose && (React.createElement(GhostButton, { onClick: onClearPose }, t('pg.pose.clear'))))),
|
|
480
|
+
React.createElement(Grid, null, kind === 'model'
|
|
481
|
+
? models.map(renderModelCard)
|
|
482
|
+
: kind === 'pose'
|
|
483
|
+
? visiblePoses.map(renderPoseCard)
|
|
484
|
+
: kind === 'path'
|
|
485
|
+
? PATH_PRESETS.map(renderPresetCard)
|
|
486
|
+
: visibleAnimations.map(renderAnimationCard)),
|
|
487
|
+
plan && (React.createElement(Overlay, null,
|
|
488
|
+
React.createElement(OverlayTitle, null, plan.summary),
|
|
489
|
+
plan.items.some((i) => i.type === 'skip') && (React.createElement(MutedText, { style: {
|
|
490
|
+
maxHeight: 120,
|
|
491
|
+
overflowY: 'auto',
|
|
492
|
+
marginBottom: 12,
|
|
493
|
+
} }, plan.items
|
|
494
|
+
.filter((i) => i.type === 'skip')
|
|
495
|
+
.map((i, idx) => (React.createElement("div", { key: idx, style: { marginBottom: 4 } },
|
|
496
|
+
i.name,
|
|
497
|
+
": ",
|
|
498
|
+
i.reason))))),
|
|
499
|
+
plan.similar.length > 0 && (React.createElement("div", { style: { marginBottom: 12 } },
|
|
500
|
+
React.createElement(MutedText, { style: { marginBottom: 6 } }, t('pg.lib.similar.title')),
|
|
501
|
+
plan.similar.map((s, idx) => (React.createElement(SimilarCard, { key: `${s.index}-${s.existingName}` },
|
|
502
|
+
React.createElement("div", { style: {
|
|
503
|
+
marginBottom: 4,
|
|
504
|
+
color: 'var(--theatre-text-primary, #ffffff)',
|
|
505
|
+
} }, t('pg.lib.similar.desc', {
|
|
506
|
+
newName: s.newName,
|
|
507
|
+
existingName: s.existingName,
|
|
508
|
+
})),
|
|
509
|
+
React.createElement("label", { style: { marginRight: 16, cursor: 'pointer' } },
|
|
510
|
+
React.createElement("input", { type: "radio", name: `similar-${idx}`, checked: choices[idx] === 'reuse', onChange: () => setChoices((prev) => {
|
|
511
|
+
const next = [...prev];
|
|
512
|
+
next[idx] = 'reuse';
|
|
513
|
+
return next;
|
|
514
|
+
}), style: { marginRight: 4 } }),
|
|
515
|
+
t('pg.lib.similar.reuse')),
|
|
516
|
+
React.createElement("label", { style: { cursor: 'pointer' } },
|
|
517
|
+
React.createElement("input", { type: "radio", name: `similar-${idx}`, checked: choices[idx] === 'keep', onChange: () => setChoices((prev) => {
|
|
518
|
+
const next = [...prev];
|
|
519
|
+
next[idx] = 'keep';
|
|
520
|
+
return next;
|
|
521
|
+
}), style: { marginRight: 4 } }),
|
|
522
|
+
t('pg.lib.similar.keep'))))))),
|
|
523
|
+
React.createElement("div", { style: { display: 'flex', gap: 10, justifyContent: 'flex-end' } },
|
|
524
|
+
React.createElement(GhostButton, { disabled: busy, onClick: () => setPlan(null) }, t('pg.lib.cancel')),
|
|
525
|
+
React.createElement(ConfirmButton, { disabled: busy, onClick: () => void confirmImport() }, t('pg.lib.confirm'))))),
|
|
526
|
+
menu && getLibrary().canWrite && (React.createElement(CanvasContextMenu, { position: { x: menu.x, y: menu.y }, onClose: () => setMenu(null), items: [
|
|
527
|
+
{
|
|
528
|
+
type: 'normal',
|
|
529
|
+
label: t('pg.lib.ctx.rename'),
|
|
530
|
+
callback: () => {
|
|
531
|
+
void renameEntry(menu.id);
|
|
532
|
+
setMenu(null);
|
|
533
|
+
},
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
type: 'normal',
|
|
537
|
+
label: t('pg.lib.ctx.delete'),
|
|
538
|
+
callback: () => {
|
|
539
|
+
void removeEntry(menu.id);
|
|
540
|
+
setMenu(null);
|
|
541
|
+
},
|
|
542
|
+
},
|
|
543
|
+
] }))));
|
|
544
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssetLibraryPanel.viewer.test.d.ts","sourceRoot":"","sources":["../../src/assetLibrary/AssetLibraryPanel.viewer.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* 纯查看器模式的骨架族标签(终审 M-6):改名入口与导入/删除入口同套
|
|
6
|
+
* canWrite 判别——纯查看器下标签仍是纯展示,点击不再弹改名 prompt
|
|
7
|
+
* (修复前可点但 setRigAlias 抛 auth 被 catch 成 console-only)。
|
|
8
|
+
*
|
|
9
|
+
* 重依赖逐项 doMock(与 CameraScene.test.tsx 同套手法;jest-esbuild
|
|
10
|
+
* 不提升 jest.mock,doMock 先行登记 + 运行时 require):
|
|
11
|
+
* PlacementManager(three/r3f 重链)、importPipeline/thumbnail(导入与
|
|
12
|
+
* 缩略图副作用)、useModelThumbUrl(hook)、PathPresetThumb(预设卡片)、
|
|
13
|
+
* contextMenu(studio ContextMenu)。i18n 用模块级 fallback(全局
|
|
14
|
+
* translate 单例,pg.* 词条已由 camera-studio i18n 模块注册)。
|
|
15
|
+
*/
|
|
16
|
+
import React from 'react';
|
|
17
|
+
import { act } from 'react-dom/test-utils';
|
|
18
|
+
import ReactDOM from 'react-dom/client';
|
|
19
|
+
globalThis.IS_REACT_ACT_ENVIRONMENT = true;
|
|
20
|
+
const noop = () => { };
|
|
21
|
+
jest.doMock('../PlacementManager', () => ({
|
|
22
|
+
__esModule: true,
|
|
23
|
+
countLibraryEntryUsage: () => 0,
|
|
24
|
+
}));
|
|
25
|
+
jest.doMock('./importPipeline', () => ({
|
|
26
|
+
__esModule: true,
|
|
27
|
+
planImport: async () => {
|
|
28
|
+
throw new Error('test 未布置导入');
|
|
29
|
+
},
|
|
30
|
+
executeImport: async () => { },
|
|
31
|
+
realImportDeps: () => ({}),
|
|
32
|
+
}));
|
|
33
|
+
jest.doMock('./thumbnail', () => ({
|
|
34
|
+
__esModule: true,
|
|
35
|
+
backfillModelThumbnails: async () => { },
|
|
36
|
+
}));
|
|
37
|
+
jest.doMock('./useModelThumbUrl', () => ({
|
|
38
|
+
__esModule: true,
|
|
39
|
+
useModelThumbUrl: () => ({
|
|
40
|
+
getThumbUrl: () => undefined,
|
|
41
|
+
dropThumbUrl: noop,
|
|
42
|
+
}),
|
|
43
|
+
}));
|
|
44
|
+
jest.doMock('../PathPresetThumb', () => ({
|
|
45
|
+
__esModule: true,
|
|
46
|
+
PathPresetThumb: () => null,
|
|
47
|
+
}));
|
|
48
|
+
jest.doMock('../contextMenu', () => ({
|
|
49
|
+
__esModule: true,
|
|
50
|
+
CanvasContextMenu: () => null,
|
|
51
|
+
}));
|
|
52
|
+
const { AssetLibraryPanel } = require('./AssetLibraryPanel');
|
|
53
|
+
const { configureLibrary } = require('./library');
|
|
54
|
+
/** 造一个持有一条姿势条目(骨架 rig-test)的源;writable 决定查看器模式 */
|
|
55
|
+
function makeSource(writable) {
|
|
56
|
+
const entries = [
|
|
57
|
+
{
|
|
58
|
+
id: 'pose-1',
|
|
59
|
+
kind: 'pose',
|
|
60
|
+
name: '姿势一',
|
|
61
|
+
rig: 'rig-test',
|
|
62
|
+
bones: {},
|
|
63
|
+
createdAt: 1,
|
|
64
|
+
},
|
|
65
|
+
];
|
|
66
|
+
const base = {
|
|
67
|
+
id: writable ? 'idb' : 'catalog',
|
|
68
|
+
listEntries: async () => entries,
|
|
69
|
+
getEntry: async (id) => entries.find((e) => e.id === id),
|
|
70
|
+
getBlobUrl: async () => '',
|
|
71
|
+
};
|
|
72
|
+
if (!writable)
|
|
73
|
+
return { ...base, capabilities: { writable: false } };
|
|
74
|
+
return {
|
|
75
|
+
...base,
|
|
76
|
+
capabilities: { writable: true },
|
|
77
|
+
putEntry: async () => { },
|
|
78
|
+
deleteEntry: async () => { },
|
|
79
|
+
putBlob: async () => 'blob:x',
|
|
80
|
+
deleteBlob: async () => { },
|
|
81
|
+
getRigAliases: async () => [],
|
|
82
|
+
putRigAlias: async () => { },
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
async function renderPosePanel(writable) {
|
|
86
|
+
configureLibrary({ sources: [makeSource(writable)] });
|
|
87
|
+
const el = document.createElement('div');
|
|
88
|
+
document.body.appendChild(el);
|
|
89
|
+
const root = ReactDOM.createRoot(el);
|
|
90
|
+
await act(async () => {
|
|
91
|
+
root.render(React.createElement(AssetLibraryPanel, {
|
|
92
|
+
kind: 'pose',
|
|
93
|
+
onClose: noop,
|
|
94
|
+
onApplyPose: noop,
|
|
95
|
+
}));
|
|
96
|
+
});
|
|
97
|
+
await act(async () => { }); // 冲刷库条目/别名订阅的异步 effect
|
|
98
|
+
return el;
|
|
99
|
+
}
|
|
100
|
+
/** 卡片上的骨架族标签:文本 = 族 id(无别名时) */
|
|
101
|
+
function findRigTag(el) {
|
|
102
|
+
return [...el.querySelectorAll('div')].find((d) => d.textContent === 'rig-test');
|
|
103
|
+
}
|
|
104
|
+
test('纯查看器:族标签点击不弹改名 prompt(入口隐藏)', async () => {
|
|
105
|
+
const promptSpy = jest.spyOn(window, 'prompt').mockReturnValue('新族名');
|
|
106
|
+
try {
|
|
107
|
+
const el = await renderPosePanel(false);
|
|
108
|
+
const tag = findRigTag(el);
|
|
109
|
+
expect(tag).toBeTruthy(); // 标签本身仍在(纯展示)
|
|
110
|
+
await act(async () => {
|
|
111
|
+
tag.dispatchEvent(new MouseEvent('click', { bubbles: true }));
|
|
112
|
+
});
|
|
113
|
+
expect(promptSpy).not.toHaveBeenCalled();
|
|
114
|
+
}
|
|
115
|
+
finally {
|
|
116
|
+
promptSpy.mockRestore();
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
test('可写源:族标签点击弹改名 prompt(入口仍在)', async () => {
|
|
120
|
+
const promptSpy = jest.spyOn(window, 'prompt').mockReturnValue('新族名');
|
|
121
|
+
try {
|
|
122
|
+
const el = await renderPosePanel(true);
|
|
123
|
+
const tag = findRigTag(el);
|
|
124
|
+
expect(tag).toBeTruthy();
|
|
125
|
+
await act(async () => {
|
|
126
|
+
tag.dispatchEvent(new MouseEvent('click', { bubbles: true }));
|
|
127
|
+
});
|
|
128
|
+
expect(promptSpy).toHaveBeenCalledTimes(1);
|
|
129
|
+
}
|
|
130
|
+
finally {
|
|
131
|
+
promptSpy.mockRestore();
|
|
132
|
+
}
|
|
133
|
+
});
|