@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,103 @@
|
|
|
1
|
+
import { presetPoints } from './pathPresets';
|
|
2
|
+
export const THUMB_VW = 100;
|
|
3
|
+
export const THUMB_VH = 64;
|
|
4
|
+
/** 四周留白:取景锥探出路径边缘,要多留一点 */
|
|
5
|
+
const PAD = 12;
|
|
6
|
+
const COS30 = Math.cos(Math.PI / 6);
|
|
7
|
+
/** 3/4 轴测投影:y 直上,x/z 各向左右下方退 */
|
|
8
|
+
function project(p) {
|
|
9
|
+
return [(p.x - p.z) * COS30, -p.y + (p.x + p.z) * 0.3];
|
|
10
|
+
}
|
|
11
|
+
/** 地面投影:压掉高度 */
|
|
12
|
+
function projectGround(p) {
|
|
13
|
+
return project({ x: p.x, y: 0, z: p.z });
|
|
14
|
+
}
|
|
15
|
+
/** Catmull-Rom → 三次贝塞尔;closed 时首尾环绕 */
|
|
16
|
+
export function smoothPath(pts, closed) {
|
|
17
|
+
const n = pts.length;
|
|
18
|
+
if (n < 2)
|
|
19
|
+
return '';
|
|
20
|
+
if (n === 2)
|
|
21
|
+
return `M ${pts[0][0]} ${pts[0][1]} L ${pts[1][0].toFixed(1)} ${pts[1][1].toFixed(1)}`;
|
|
22
|
+
const get = (i) => closed ? pts[(i + n) % n] : pts[Math.max(0, Math.min(n - 1, i))];
|
|
23
|
+
let d = `M ${pts[0][0].toFixed(1)} ${pts[0][1].toFixed(1)}`;
|
|
24
|
+
const segs = closed ? n : n - 1;
|
|
25
|
+
for (let i = 0; i < segs; i++) {
|
|
26
|
+
const p0 = get(i - 1);
|
|
27
|
+
const p1 = get(i);
|
|
28
|
+
const p2 = get(i + 1);
|
|
29
|
+
const p3 = get(i + 2);
|
|
30
|
+
const c1 = [p1[0] + (p2[0] - p0[0]) / 6, p1[1] + (p2[1] - p0[1]) / 6];
|
|
31
|
+
const c2 = [p2[0] - (p3[0] - p1[0]) / 6, p2[1] - (p3[1] - p1[1]) / 6];
|
|
32
|
+
d += ` C ${c1[0].toFixed(1)} ${c1[1].toFixed(1)} ${c2[0].toFixed(1)} ${c2[1].toFixed(1)} ${p2[0].toFixed(1)} ${p2[1].toFixed(1)}`;
|
|
33
|
+
}
|
|
34
|
+
return d + (closed ? ' Z' : '');
|
|
35
|
+
}
|
|
36
|
+
/** 以原点为落点生成预设的缩略图几何 */
|
|
37
|
+
export function buildPresetThumb(preset) {
|
|
38
|
+
const pts = presetPoints(preset, { x: 0, y: 0, z: 0 });
|
|
39
|
+
const path2 = pts.map(project);
|
|
40
|
+
const ground2 = pts.map(projectGround);
|
|
41
|
+
// 网格范围:包住路径地面投影和原点,向外取整扩 2
|
|
42
|
+
let gx0 = 0;
|
|
43
|
+
let gx1 = 0;
|
|
44
|
+
let gz0 = 0;
|
|
45
|
+
let gz1 = 0;
|
|
46
|
+
for (const q of pts) {
|
|
47
|
+
gx0 = Math.min(gx0, q.x);
|
|
48
|
+
gx1 = Math.max(gx1, q.x);
|
|
49
|
+
gz0 = Math.min(gz0, q.z);
|
|
50
|
+
gz1 = Math.max(gz1, q.z);
|
|
51
|
+
}
|
|
52
|
+
gx0 = Math.floor(gx0) - 2;
|
|
53
|
+
gx1 = Math.ceil(gx1) + 2;
|
|
54
|
+
gz0 = Math.floor(gz0) - 2;
|
|
55
|
+
gz1 = Math.ceil(gz1) + 2;
|
|
56
|
+
const gridLines = [];
|
|
57
|
+
for (let x = gx0; x <= gx1; x += 2) {
|
|
58
|
+
gridLines.push([
|
|
59
|
+
projectGround({ x, y: 0, z: gz0 }),
|
|
60
|
+
projectGround({ x, y: 0, z: gz1 }),
|
|
61
|
+
]);
|
|
62
|
+
}
|
|
63
|
+
for (let z = gz0; z <= gz1; z += 2) {
|
|
64
|
+
gridLines.push([
|
|
65
|
+
projectGround({ x: gx0, y: 0, z }),
|
|
66
|
+
projectGround({ x: gx1, y: 0, z }),
|
|
67
|
+
]);
|
|
68
|
+
}
|
|
69
|
+
// 统一归一化:路径(含高度)+ 地面投影 + 网格一起进框
|
|
70
|
+
const all = [...path2, ...ground2, ...gridLines.flat()];
|
|
71
|
+
let minX = Infinity;
|
|
72
|
+
let maxX = -Infinity;
|
|
73
|
+
let minY = Infinity;
|
|
74
|
+
let maxY = -Infinity;
|
|
75
|
+
for (const [x, y] of all) {
|
|
76
|
+
minX = Math.min(minX, x);
|
|
77
|
+
maxX = Math.max(maxX, x);
|
|
78
|
+
minY = Math.min(minY, y);
|
|
79
|
+
maxY = Math.max(maxY, y);
|
|
80
|
+
}
|
|
81
|
+
const w = maxX - minX || 1;
|
|
82
|
+
const h = maxY - minY || 1;
|
|
83
|
+
const s = Math.min((THUMB_VW - PAD * 2) / w, (THUMB_VH - PAD * 2) / h);
|
|
84
|
+
const ox = (THUMB_VW - w * s) / 2;
|
|
85
|
+
const oy = (THUMB_VH - h * s) / 2;
|
|
86
|
+
const fit = ([x, y]) => [ox + (x - minX) * s, oy + (y - minY) * s];
|
|
87
|
+
const pathF = path2.map(fit);
|
|
88
|
+
const groundF = ground2.map(fit);
|
|
89
|
+
const hasHeight = pts.some((q) => Math.abs(q.y) > 0.01);
|
|
90
|
+
const gridD = gridLines
|
|
91
|
+
.map(([a, b]) => {
|
|
92
|
+
const [ax, ay] = fit(a);
|
|
93
|
+
const [bx, by] = fit(b);
|
|
94
|
+
return `M ${ax.toFixed(1)} ${ay.toFixed(1)} L ${bx.toFixed(1)} ${by.toFixed(1)}`;
|
|
95
|
+
})
|
|
96
|
+
.join(' ');
|
|
97
|
+
return {
|
|
98
|
+
d: smoothPath(pathF, preset.closed),
|
|
99
|
+
groundD: hasHeight ? smoothPath(groundF, preset.closed) : undefined,
|
|
100
|
+
gridD,
|
|
101
|
+
subject: fit(projectGround({ x: 0, y: 0, z: 0 })),
|
|
102
|
+
};
|
|
103
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presetThumbGeometry.test.d.ts","sourceRoot":"","sources":["../src/presetThumbGeometry.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { PATH_PRESETS } from './pathPresets';
|
|
2
|
+
import { buildPresetThumb, smoothPath, THUMB_VH, THUMB_VW, } from './presetThumbGeometry';
|
|
3
|
+
/** 抽出 path d 里的所有坐标数对 */
|
|
4
|
+
function coordsOf(d) {
|
|
5
|
+
const nums = d.match(/-?\d+(\.\d+)?/g)?.map(Number) ?? [];
|
|
6
|
+
const out = [];
|
|
7
|
+
for (let i = 0; i + 1 < nums.length; i += 2)
|
|
8
|
+
out.push([nums[i], nums[i + 1]]);
|
|
9
|
+
return out;
|
|
10
|
+
}
|
|
11
|
+
describe('smoothPath', () => {
|
|
12
|
+
it('两点退化直线,三点成平滑曲线', () => {
|
|
13
|
+
expect(smoothPath([
|
|
14
|
+
[0, 0],
|
|
15
|
+
[10, 0],
|
|
16
|
+
], false)).toBe('M 0 0 L 10.0 0.0');
|
|
17
|
+
const d = smoothPath([
|
|
18
|
+
[0, 0],
|
|
19
|
+
[5, 5],
|
|
20
|
+
[10, 0],
|
|
21
|
+
], false);
|
|
22
|
+
expect(d.startsWith('M 0.0 0.0 C')).toBe(true);
|
|
23
|
+
expect(d.endsWith('10.0 0.0')).toBe(true);
|
|
24
|
+
});
|
|
25
|
+
it('闭合路径以 Z 收尾,段数等于点数;开放路径段数少一', () => {
|
|
26
|
+
const pts = [
|
|
27
|
+
[0, 0],
|
|
28
|
+
[10, 0],
|
|
29
|
+
[10, 10],
|
|
30
|
+
[0, 10],
|
|
31
|
+
];
|
|
32
|
+
expect(smoothPath(pts, true).endsWith('Z')).toBe(true);
|
|
33
|
+
expect((smoothPath(pts, true).match(/C /g) ?? []).length).toBe(4);
|
|
34
|
+
expect((smoothPath(pts, false).match(/C /g) ?? []).length).toBe(3);
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
describe('buildPresetThumb', () => {
|
|
38
|
+
it('11 个预设全部产出合法几何,坐标不出 viewBox', () => {
|
|
39
|
+
expect(PATH_PRESETS).toHaveLength(11);
|
|
40
|
+
for (const preset of PATH_PRESETS) {
|
|
41
|
+
const thumb = buildPresetThumb(preset);
|
|
42
|
+
expect(thumb.d.length).toBeGreaterThan(0);
|
|
43
|
+
expect(thumb.gridD.length).toBeGreaterThan(0);
|
|
44
|
+
// 网格和路径的所有坐标都在 viewBox 内
|
|
45
|
+
for (const [x, y] of [...coordsOf(thumb.d), ...coordsOf(thumb.gridD)]) {
|
|
46
|
+
expect(x).toBeGreaterThanOrEqual(0);
|
|
47
|
+
expect(x).toBeLessThanOrEqual(THUMB_VW);
|
|
48
|
+
expect(y).toBeGreaterThanOrEqual(0);
|
|
49
|
+
expect(y).toBeLessThanOrEqual(THUMB_VH);
|
|
50
|
+
}
|
|
51
|
+
// 主体十字也在框内
|
|
52
|
+
expect(thumb.subject[0]).toBeGreaterThanOrEqual(0);
|
|
53
|
+
expect(thumb.subject[0]).toBeLessThanOrEqual(THUMB_VW);
|
|
54
|
+
expect(thumb.subject[1]).toBeGreaterThanOrEqual(0);
|
|
55
|
+
expect(thumb.subject[1]).toBeLessThanOrEqual(THUMB_VH);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
it('带高度的预设有地面投影,平面预设没有', () => {
|
|
59
|
+
const withHeight = ['reveal', 'spiralUp', 'crane', 'dive', 'figure8v'];
|
|
60
|
+
for (const preset of PATH_PRESETS) {
|
|
61
|
+
const thumb = buildPresetThumb(preset);
|
|
62
|
+
if (withHeight.includes(preset.id)) {
|
|
63
|
+
expect(thumb.groundD).toBeDefined();
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
expect(thumb.groundD).toBeUndefined();
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
it('闭合预设的路径以 Z 收尾,开放的不闭合', () => {
|
|
71
|
+
for (const preset of PATH_PRESETS) {
|
|
72
|
+
const thumb = buildPresetThumb(preset);
|
|
73
|
+
expect(thumb.d.endsWith('Z')).toBe(preset.closed);
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
it('升降摇臂:路径主体在主体十字上方(屏幕上 y 更小)', () => {
|
|
77
|
+
const crane = PATH_PRESETS.find((p) => p.id === 'crane');
|
|
78
|
+
const thumb = buildPresetThumb(crane);
|
|
79
|
+
const ys = coordsOf(thumb.d).map(([, y]) => y);
|
|
80
|
+
// 路径最高点明显高于主体(屏幕坐标 y 更小)
|
|
81
|
+
expect(Math.min(...ys)).toBeLessThan(thumb.subject[1] - 10);
|
|
82
|
+
});
|
|
83
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 选中轮廓线(Blender 式):不往场景里挂任何辅助网格,屏幕空间画剪影描边。
|
|
3
|
+
*
|
|
4
|
+
* 原理(与 Blender 的选中描边同思路):
|
|
5
|
+
* 1) 蒙版 pass:场景画成纯黑(写深度),选中物画成纯白,得到"可见剪影"
|
|
6
|
+
* 蒙版——整个选中物是一张联合蒙版,所以只有外剪影有边,绝不会有内部线;
|
|
7
|
+
* 被其他物体挡住的部分不进蒙版,描边只落在看得见的部分(同 Blender);
|
|
8
|
+
* 蒙皮网格走正常渲染管线,骨骼动画/姿势播放时剪影跟着变形。
|
|
9
|
+
* 2) 合成 pass:全屏着色器在蒙版外圈 uThicknessPx 像素内画橙色边,
|
|
10
|
+
* 宽度按物理像素恒定,与距离无关。
|
|
11
|
+
*
|
|
12
|
+
* 两步都在 useFrame 回调里同步完成,不往场景树加任何节点,选中物零侵入。
|
|
13
|
+
*/
|
|
14
|
+
import { Scene } from 'three';
|
|
15
|
+
import type { Camera, Object3D, WebGLRenderer } from 'three';
|
|
16
|
+
/** 选中高亮橙:与锚点/相机视锥的选中色一致(Blender 式选中橙) */
|
|
17
|
+
export declare const SELECTION_OUTLINE_COLOR = 16756768;
|
|
18
|
+
/** 蒙版 pass 用的临时图层:只把选中物画进蒙版,不动对象常驻层 */
|
|
19
|
+
export declare const OUTLINE_LAYER = 7;
|
|
20
|
+
/**
|
|
21
|
+
* 把 node 下所有网格临时开进 OUTLINE_LAYER,fn 结束后逐个还原。
|
|
22
|
+
* 只动网格(可渲染物),分组/骨骼等纯节点保持原样。
|
|
23
|
+
*/
|
|
24
|
+
export declare function withOutlineLayer<T>(node: Object3D, fn: () => T): T;
|
|
25
|
+
export type OutlineSize = {
|
|
26
|
+
width: number;
|
|
27
|
+
height: number;
|
|
28
|
+
};
|
|
29
|
+
export type SelectionOutlineRenderer = {
|
|
30
|
+
/**
|
|
31
|
+
* 在当前帧的渲染结果上叠加选中描边。调用时机:主视角场景画完之后、
|
|
32
|
+
* 画中画之前(调用方的 useFrame 优先级管这件事)。
|
|
33
|
+
*/
|
|
34
|
+
render: (gl: WebGLRenderer, scene: Scene, camera: Camera, node: Object3D, size: OutlineSize, dpr: number, thicknessPx?: number) => void;
|
|
35
|
+
dispose: () => void;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* 持有蒙版 RT 与合成着色器的描边渲染器。一个选中态一个实例,
|
|
39
|
+
* 卸载时 dispose(跟随 SelectionOutlineHighlight 的生命周期)。
|
|
40
|
+
*/
|
|
41
|
+
export declare function createSelectionOutlineRenderer(): SelectionOutlineRenderer;
|
|
42
|
+
//# sourceMappingURL=selectionOutline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectionOutline.d.ts","sourceRoot":"","sources":["../src/selectionOutline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAOL,KAAK,EAIN,MAAM,OAAO,CAAA;AACd,OAAO,KAAK,EAAC,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAC,MAAM,OAAO,CAAA;AAG1D,yCAAyC;AACzC,eAAO,MAAM,uBAAuB,WAAW,CAAA;AAK/C,uCAAuC;AACvC,eAAO,MAAM,aAAa,IAAI,CAAA;AAE9B;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,CAAC,GAAG,CAAC,CAalE;AAED,MAAM,MAAM,WAAW,GAAG;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAC,CAAA;AAEzD,MAAM,MAAM,wBAAwB,GAAG;IACrC;;;OAGG;IACH,MAAM,EAAE,CACN,EAAE,EAAE,aAAa,EACjB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,QAAQ,EACd,IAAI,EAAE,WAAW,EACjB,GAAG,EAAE,MAAM,EACX,WAAW,CAAC,EAAE,MAAM,KACjB,IAAI,CAAA;IACT,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,CAAA;AAmDD;;;GAGG;AACH,wBAAgB,8BAA8B,IAAI,wBAAwB,CAwGzE"}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 选中轮廓线(Blender 式):不往场景里挂任何辅助网格,屏幕空间画剪影描边。
|
|
3
|
+
*
|
|
4
|
+
* 原理(与 Blender 的选中描边同思路):
|
|
5
|
+
* 1) 蒙版 pass:场景画成纯黑(写深度),选中物画成纯白,得到"可见剪影"
|
|
6
|
+
* 蒙版——整个选中物是一张联合蒙版,所以只有外剪影有边,绝不会有内部线;
|
|
7
|
+
* 被其他物体挡住的部分不进蒙版,描边只落在看得见的部分(同 Blender);
|
|
8
|
+
* 蒙皮网格走正常渲染管线,骨骼动画/姿势播放时剪影跟着变形。
|
|
9
|
+
* 2) 合成 pass:全屏着色器在蒙版外圈 uThicknessPx 像素内画橙色边,
|
|
10
|
+
* 宽度按物理像素恒定,与距离无关。
|
|
11
|
+
*
|
|
12
|
+
* 两步都在 useFrame 回调里同步完成,不往场景树加任何节点,选中物零侵入。
|
|
13
|
+
*/
|
|
14
|
+
import { BufferGeometry, BufferAttribute, Color, Mesh, MeshBasicMaterial, OrthographicCamera, Scene, ShaderMaterial, Vector3, WebGLRenderTarget, } from 'three';
|
|
15
|
+
import { withEditorOnlyHidden } from './editorOnly';
|
|
16
|
+
/** 选中高亮橙:与锚点/相机视锥的选中色一致(Blender 式选中橙) */
|
|
17
|
+
export const SELECTION_OUTLINE_COLOR = 0xffb020;
|
|
18
|
+
/** 描边宽度(CSS 像素,合成时乘 dpr 换算物理像素) */
|
|
19
|
+
const DEFAULT_THICKNESS_PX = 4;
|
|
20
|
+
/** 蒙版 pass 用的临时图层:只把选中物画进蒙版,不动对象常驻层 */
|
|
21
|
+
export const OUTLINE_LAYER = 7;
|
|
22
|
+
/**
|
|
23
|
+
* 把 node 下所有网格临时开进 OUTLINE_LAYER,fn 结束后逐个还原。
|
|
24
|
+
* 只动网格(可渲染物),分组/骨骼等纯节点保持原样。
|
|
25
|
+
*/
|
|
26
|
+
export function withOutlineLayer(node, fn) {
|
|
27
|
+
const touched = [];
|
|
28
|
+
node.traverse((child) => {
|
|
29
|
+
if (child.isMesh) {
|
|
30
|
+
touched.push({ obj: child, mask: child.layers.mask });
|
|
31
|
+
child.layers.enable(OUTLINE_LAYER);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
try {
|
|
35
|
+
return fn();
|
|
36
|
+
}
|
|
37
|
+
finally {
|
|
38
|
+
for (const { obj, mask } of touched)
|
|
39
|
+
obj.layers.mask = mask;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/** 全屏三角形:比 Quad 少一次顶点插值,后处理通行做法 */
|
|
43
|
+
function makeFullscreenTriangle() {
|
|
44
|
+
const geo = new BufferGeometry();
|
|
45
|
+
geo.setAttribute('position', new BufferAttribute(new Float32Array([-1, -1, 0, 3, -1, 0, -1, 3, 0]), 3));
|
|
46
|
+
geo.setAttribute('uv', new BufferAttribute(new Float32Array([0, 0, 2, 0, 0, 2]), 2));
|
|
47
|
+
return geo;
|
|
48
|
+
}
|
|
49
|
+
const OUTLINE_FRAG = /* glsl */ `
|
|
50
|
+
varying vec2 vUv;
|
|
51
|
+
uniform sampler2D tMask;
|
|
52
|
+
uniform vec2 uResolution; // 蒙版物理像素尺寸
|
|
53
|
+
uniform float uThicknessPx; // 描边宽(物理像素)
|
|
54
|
+
uniform vec3 uColor;
|
|
55
|
+
|
|
56
|
+
void main() {
|
|
57
|
+
// 蒙版内部(物体本体)不画:描边只出现在剪影外圈
|
|
58
|
+
if (texture2D(tMask, vUv).r > 0.5) discard;
|
|
59
|
+
|
|
60
|
+
// 环采一周:半径 uThicknessPx 内有蒙版像素 → 在描边带上。
|
|
61
|
+
// 命中比例直接当 alpha:剪影处约半圈命中,向外渐隐,自带抗锯齿。
|
|
62
|
+
vec2 radius = uThicknessPx / uResolution;
|
|
63
|
+
const int TAPS = 12;
|
|
64
|
+
float acc = 0.0;
|
|
65
|
+
for (int i = 0; i < TAPS; i++) {
|
|
66
|
+
float a = float(i) * 6.2831853 / float(TAPS);
|
|
67
|
+
vec2 off = vec2(cos(a), sin(a)) * radius;
|
|
68
|
+
acc += step(0.5, texture2D(tMask, vUv + off).r);
|
|
69
|
+
}
|
|
70
|
+
float alpha = acc / float(TAPS);
|
|
71
|
+
if (alpha <= 0.0) discard;
|
|
72
|
+
gl_FragColor = vec4(uColor, alpha);
|
|
73
|
+
}
|
|
74
|
+
`;
|
|
75
|
+
const OUTLINE_VERT = /* glsl */ `
|
|
76
|
+
varying vec2 vUv;
|
|
77
|
+
void main() {
|
|
78
|
+
vUv = uv;
|
|
79
|
+
gl_Position = vec4(position.xy, 0.0, 1.0);
|
|
80
|
+
}
|
|
81
|
+
`;
|
|
82
|
+
/**
|
|
83
|
+
* 持有蒙版 RT 与合成着色器的描边渲染器。一个选中态一个实例,
|
|
84
|
+
* 卸载时 dispose(跟随 SelectionOutlineHighlight 的生命周期)。
|
|
85
|
+
*/
|
|
86
|
+
export function createSelectionOutlineRenderer() {
|
|
87
|
+
// 蒙版 RT:只要 r 通道够不够,RGBA8 最省;深度必须开(遮挡裁剪靠它)
|
|
88
|
+
const maskRT = new WebGLRenderTarget(1, 1, { depthBuffer: true });
|
|
89
|
+
// 蒙版材质:纯色、不吃雾、不吃色调映射,保证白是 1.0、黑是 0.0
|
|
90
|
+
const blackMat = new MeshBasicMaterial({ color: 0x000000 });
|
|
91
|
+
blackMat.fog = false;
|
|
92
|
+
blackMat.toneMapped = false;
|
|
93
|
+
const whiteMat = new MeshBasicMaterial({ color: 0xffffff });
|
|
94
|
+
whiteMat.fog = false;
|
|
95
|
+
whiteMat.toneMapped = false;
|
|
96
|
+
const outlineMat = new ShaderMaterial({
|
|
97
|
+
transparent: true,
|
|
98
|
+
depthTest: false,
|
|
99
|
+
depthWrite: false,
|
|
100
|
+
uniforms: {
|
|
101
|
+
tMask: { value: maskRT.texture },
|
|
102
|
+
uResolution: { value: { x: 1, y: 1 } },
|
|
103
|
+
uThicknessPx: { value: DEFAULT_THICKNESS_PX },
|
|
104
|
+
// ShaderMaterial 的输出不经过 three 的色彩空间转换,片元直写画布;
|
|
105
|
+
// 所以这里直接给画布的 sRGB 值(0xffb020),不走 Color 的线性换算
|
|
106
|
+
uColor: { value: new Vector3(1.0, 176 / 255, 32 / 255) },
|
|
107
|
+
},
|
|
108
|
+
vertexShader: OUTLINE_VERT,
|
|
109
|
+
fragmentShader: OUTLINE_FRAG,
|
|
110
|
+
});
|
|
111
|
+
const quad = new Mesh(makeFullscreenTriangle(), outlineMat);
|
|
112
|
+
quad.frustumCulled = false;
|
|
113
|
+
const quadScene = new Scene();
|
|
114
|
+
quadScene.add(quad);
|
|
115
|
+
const quadCam = new OrthographicCamera(-1, 1, 1, -1, 0, 1);
|
|
116
|
+
const clearColorBackup = new Color();
|
|
117
|
+
function render(gl, scene, camera, node, size, dpr, thicknessPx = DEFAULT_THICKNESS_PX) {
|
|
118
|
+
const w = Math.max(1, Math.round(size.width * dpr));
|
|
119
|
+
const h = Math.max(1, Math.round(size.height * dpr));
|
|
120
|
+
if (maskRT.width !== w || maskRT.height !== h)
|
|
121
|
+
maskRT.setSize(w, h);
|
|
122
|
+
outlineMat.uniforms.uResolution.value.x = w;
|
|
123
|
+
outlineMat.uniforms.uResolution.value.y = h;
|
|
124
|
+
outlineMat.uniforms.uThicknessPx.value = thicknessPx * dpr;
|
|
125
|
+
// 保存现场:渲染目标/清屏色/autoClear/场景背景与覆盖材质/相机层
|
|
126
|
+
const prevRT = gl.getRenderTarget();
|
|
127
|
+
const prevAutoClear = gl.autoClear;
|
|
128
|
+
gl.getClearColor(clearColorBackup);
|
|
129
|
+
const prevClearAlpha = gl.getClearAlpha();
|
|
130
|
+
const prevBackground = scene.background;
|
|
131
|
+
const prevOverride = scene.overrideMaterial;
|
|
132
|
+
const prevCamLayers = camera.layers.mask;
|
|
133
|
+
try {
|
|
134
|
+
gl.setRenderTarget(maskRT);
|
|
135
|
+
gl.setClearColor(0x000000, 1);
|
|
136
|
+
gl.clear(true, true, false);
|
|
137
|
+
gl.autoClear = false;
|
|
138
|
+
scene.background = null;
|
|
139
|
+
// pass 1:全场景画黑并把深度写进蒙版 RT——被挡住的选中物部分
|
|
140
|
+
// 在 pass 2 里会被深度裁掉,描边只描看得见的剪影(同 Blender)。
|
|
141
|
+
// 编辑辅助对象(网格地面/手柄/视锥线)藏起来,不当遮挡物。
|
|
142
|
+
scene.overrideMaterial = blackMat;
|
|
143
|
+
withEditorOnlyHidden(() => gl.render(scene, camera));
|
|
144
|
+
// pass 2:同一 RT 上只画选中物(白),深度沿用 pass 1 的场景深度
|
|
145
|
+
scene.overrideMaterial = whiteMat;
|
|
146
|
+
camera.layers.set(OUTLINE_LAYER);
|
|
147
|
+
try {
|
|
148
|
+
withOutlineLayer(node, () => gl.render(scene, camera));
|
|
149
|
+
}
|
|
150
|
+
finally {
|
|
151
|
+
camera.layers.mask = prevCamLayers;
|
|
152
|
+
}
|
|
153
|
+
// 合成:蒙版外圈画橙色边,直写当前帧缓冲(叠在主视角画面上)
|
|
154
|
+
gl.setRenderTarget(prevRT);
|
|
155
|
+
gl.render(quadScene, quadCam);
|
|
156
|
+
}
|
|
157
|
+
finally {
|
|
158
|
+
scene.background = prevBackground;
|
|
159
|
+
scene.overrideMaterial = prevOverride;
|
|
160
|
+
camera.layers.mask = prevCamLayers;
|
|
161
|
+
gl.setRenderTarget(prevRT);
|
|
162
|
+
gl.setClearColor(clearColorBackup, prevClearAlpha);
|
|
163
|
+
gl.autoClear = prevAutoClear;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
function dispose() {
|
|
167
|
+
maskRT.dispose();
|
|
168
|
+
blackMat.dispose();
|
|
169
|
+
whiteMat.dispose();
|
|
170
|
+
outlineMat.dispose();
|
|
171
|
+
quad.geometry.dispose();
|
|
172
|
+
}
|
|
173
|
+
return { render, dispose };
|
|
174
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectionOutline.test.d.ts","sourceRoot":"","sources":["../src/selectionOutline.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 选中轮廓线(Blender 式)的可测逻辑:withOutlineLayer 在蒙版 pass 期间
|
|
3
|
+
* 把目标子树的网格临时开进描边层,结束后逐个还原。
|
|
4
|
+
* 渲染本体(RT/着色器)依赖 WebGL,在浏览器实测里验证。
|
|
5
|
+
*/
|
|
6
|
+
import { BoxGeometry, Group, Mesh, MeshBasicMaterial } from 'three';
|
|
7
|
+
import { OUTLINE_LAYER, SELECTION_OUTLINE_COLOR, withOutlineLayer, } from './selectionOutline';
|
|
8
|
+
function meshUnder(root, name) {
|
|
9
|
+
const m = new Mesh(new BoxGeometry(), new MeshBasicMaterial());
|
|
10
|
+
m.name = name;
|
|
11
|
+
root.add(m);
|
|
12
|
+
return m;
|
|
13
|
+
}
|
|
14
|
+
test('蒙版 pass 期间子树网格全部开描边层,非网格不动', () => {
|
|
15
|
+
const root = new Group();
|
|
16
|
+
const a = meshUnder(root, 'a');
|
|
17
|
+
const inner = new Group();
|
|
18
|
+
root.add(inner);
|
|
19
|
+
const b = meshUnder(inner, 'b');
|
|
20
|
+
const innerMask = inner.layers.mask;
|
|
21
|
+
withOutlineLayer(root, () => {
|
|
22
|
+
expect(a.layers.test(maskOf(OUTLINE_LAYER))).toBe(true);
|
|
23
|
+
expect(b.layers.test(maskOf(OUTLINE_LAYER))).toBe(true);
|
|
24
|
+
// 纯分组不是可渲染网格,不该被动
|
|
25
|
+
expect(inner.layers.mask).toBe(innerMask);
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
test('结束后还原每个对象的原始 layers(原本就在描边层的保持开)', () => {
|
|
29
|
+
const root = new Group();
|
|
30
|
+
const a = meshUnder(root, 'a');
|
|
31
|
+
const b = meshUnder(root, 'b');
|
|
32
|
+
b.layers.enable(OUTLINE_LAYER); // 本来就开着
|
|
33
|
+
const maskA = a.layers.mask;
|
|
34
|
+
const maskB = b.layers.mask;
|
|
35
|
+
withOutlineLayer(root, () => { });
|
|
36
|
+
expect(a.layers.mask).toBe(maskA);
|
|
37
|
+
expect(b.layers.mask).toBe(maskB);
|
|
38
|
+
});
|
|
39
|
+
test('fn 抛错也照样还原(finally 语义)', () => {
|
|
40
|
+
const root = new Group();
|
|
41
|
+
const a = meshUnder(root, 'a');
|
|
42
|
+
const maskA = a.layers.mask;
|
|
43
|
+
expect(() => withOutlineLayer(root, () => {
|
|
44
|
+
throw new Error('boom');
|
|
45
|
+
})).toThrow('boom');
|
|
46
|
+
expect(a.layers.mask).toBe(maskA);
|
|
47
|
+
});
|
|
48
|
+
test('返回值透传', () => {
|
|
49
|
+
const root = new Group();
|
|
50
|
+
expect(withOutlineLayer(root, () => 42)).toBe(42);
|
|
51
|
+
});
|
|
52
|
+
test('选中橙保持 Blender 橙', () => {
|
|
53
|
+
expect(SELECTION_OUTLINE_COLOR).toBe(0xffb020);
|
|
54
|
+
});
|
|
55
|
+
function maskOf(layer) {
|
|
56
|
+
// three 的 Layers.test 需要一个 Layers 实例;这里用 bit 对象的掩码形式
|
|
57
|
+
return { mask: 1 << layer };
|
|
58
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=smoke.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smoke.test.d.ts","sourceRoot":"","sources":["../src/smoke.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* 包骨架冒烟:index 公开面可导入。
|
|
4
|
+
*
|
|
5
|
+
* bootstrap 现带 studio 根模块副作用导入(T10 fix round 1:根模块加载即
|
|
6
|
+
* new Studio() 向 core 自注册)——真身进 jsdom 会装全局监听/定时器,
|
|
7
|
+
* jest worker 退不干净。按 R8 裁定与 bootstrap.test.tsx 同款手法替身
|
|
8
|
+
* (jest-esbuild 不提升 jest.mock:doMock + 运行时 import)。
|
|
9
|
+
*/
|
|
10
|
+
jest.doMock('@dreamerbird/studio', () => ({
|
|
11
|
+
__esModule: true,
|
|
12
|
+
}));
|
|
13
|
+
test('包骨架可导入,版本号与 package.json 同步', async () => {
|
|
14
|
+
const { version } = require('../package.json');
|
|
15
|
+
const { CAMERA_STUDIO_VERSION } = await import('./index');
|
|
16
|
+
expect(CAMERA_STUDIO_VERSION).toBe(version);
|
|
17
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UI 装配可配层(spec §3 ui 字段 / §7 约束):停靠框 portal 容器 /
|
|
3
|
+
* z-index 基准 / 语言。模块级单值,bootstrap 在 boot 时一次写入
|
|
4
|
+
* (config.ui ?? 空对象);boot 级保留语义与 R14 一致——dispose 不复位,
|
|
5
|
+
* 重挂幂等复用。缺省 = 现状:portal → document.body、zIndexBase 1000。
|
|
6
|
+
*/
|
|
7
|
+
/** UI 装配(spec §3 ui 字段):停靠框 portal 容器 / z-index 基准 / 语言 */
|
|
8
|
+
type UiConfig = {
|
|
9
|
+
portalContainer?: HTMLElement;
|
|
10
|
+
zIndexBase?: number;
|
|
11
|
+
locale?: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function setUiConfig(cfg: UiConfig): void;
|
|
14
|
+
export declare function getUiConfig(): Required<Pick<UiConfig, 'zIndexBase'>> & UiConfig;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=uiConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uiConfig.d.ts","sourceRoot":"","sources":["../src/uiConfig.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,2DAA2D;AAC3D,KAAK,QAAQ,GAAG;IACd,eAAe,CAAC,EAAE,WAAW,CAAA;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,QAAQ,GAAG,IAAI,CAE/C;AACD,wBAAgB,WAAW,IAAI,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC,GACnE,QAAQ,CAET"}
|
package/dist/uiConfig.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UI 装配可配层(spec §3 ui 字段 / §7 约束):停靠框 portal 容器 /
|
|
3
|
+
* z-index 基准 / 语言。模块级单值,bootstrap 在 boot 时一次写入
|
|
4
|
+
* (config.ui ?? 空对象);boot 级保留语义与 R14 一致——dispose 不复位,
|
|
5
|
+
* 重挂幂等复用。缺省 = 现状:portal → document.body、zIndexBase 1000。
|
|
6
|
+
*/
|
|
7
|
+
let current = {};
|
|
8
|
+
export function setUiConfig(cfg) {
|
|
9
|
+
current = cfg;
|
|
10
|
+
}
|
|
11
|
+
export function getUiConfig() {
|
|
12
|
+
return { zIndexBase: 1000, ...current };
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uiConfig.test.d.ts","sourceRoot":"","sources":["../src/uiConfig.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @jest-environment jsdom
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* UI 装配可配(T9,spec §3 ui 字段 / §7 约束):
|
|
6
|
+
* - getUiConfig 缺省/合并语义(单测);
|
|
7
|
+
* - portalContainer 可配:真实 PosePropEditor 点开姿势选择框,
|
|
8
|
+
* 断言框渲染进宿主给的容器且 z-index 以配置为基准;
|
|
9
|
+
* - 缺省复位:portal 回 document.body、z-index 基准回 1000。
|
|
10
|
+
*
|
|
11
|
+
* PosePropEditor 走真实链路(库单例 + fake-indexeddb + 内置目录),
|
|
12
|
+
* 不整树渲染场景。React 19 act 环境开关手写(testing-library 缺席,R13
|
|
13
|
+
* 先例);真实模块链下 react/react-dom 静态 import 安全(无
|
|
14
|
+
* resetModules)。
|
|
15
|
+
*/
|
|
16
|
+
import { IDBFactory } from 'fake-indexeddb';
|
|
17
|
+
import React from 'react';
|
|
18
|
+
import { act } from 'react-dom/test-utils';
|
|
19
|
+
import ReactDOM from 'react-dom/client';
|
|
20
|
+
import { getUiConfig, setUiConfig } from './uiConfig';
|
|
21
|
+
import PosePropEditor from './poseMode/PosePropEditor';
|
|
22
|
+
globalThis.IS_REACT_ACT_ENVIRONMENT = true;
|
|
23
|
+
globalThis.indexedDB = new IDBFactory();
|
|
24
|
+
URL.createObjectURL = jest.fn(() => 'blob:mock-url');
|
|
25
|
+
URL.revokeObjectURL = jest.fn();
|
|
26
|
+
afterEach(() => {
|
|
27
|
+
setUiConfig({}); // 模块级单值,用例间必须复位
|
|
28
|
+
});
|
|
29
|
+
describe('getUiConfig 缺省与合并', () => {
|
|
30
|
+
it('缺省 = 现状:portal 无指定容器、zIndexBase 1000', () => {
|
|
31
|
+
expect(getUiConfig()).toEqual({ zIndexBase: 1000 });
|
|
32
|
+
});
|
|
33
|
+
it('setUiConfig 整体替换:portalContainer/zIndexBase/locale 合并进读侧', () => {
|
|
34
|
+
const host = document.createElement('div');
|
|
35
|
+
setUiConfig({ portalContainer: host, zIndexBase: 5000, locale: 'zh-CN' });
|
|
36
|
+
expect(getUiConfig()).toEqual({
|
|
37
|
+
portalContainer: host,
|
|
38
|
+
zIndexBase: 5000,
|
|
39
|
+
locale: 'zh-CN',
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
/** 渲染真实 PosePropEditor 并点值区域,返回宿主容器与卸载器 */
|
|
44
|
+
async function renderPicker(ui, mount) {
|
|
45
|
+
setUiConfig(ui);
|
|
46
|
+
const root = ReactDOM.createRoot(mount);
|
|
47
|
+
// 替身只喂断言用到的字段;propConfig 等其余必填项经 unknown 转成
|
|
48
|
+
// 组件 props 型让行(never 不能展开)
|
|
49
|
+
const editorProps = {
|
|
50
|
+
editingTools: { permanentlySetValue: jest.fn() },
|
|
51
|
+
value: '',
|
|
52
|
+
obj: undefined,
|
|
53
|
+
};
|
|
54
|
+
await act(async () => {
|
|
55
|
+
root.render(React.createElement(PosePropEditor, { ...editorProps }));
|
|
56
|
+
});
|
|
57
|
+
// 库条目异步装载(listEntries)再渲染;补两拍冲刷微任务
|
|
58
|
+
await act(async () => { });
|
|
59
|
+
await act(async () => { });
|
|
60
|
+
const value = mount.querySelector('[data-testid="PosePropValue"]');
|
|
61
|
+
expect(value).not.toBeNull();
|
|
62
|
+
await act(async () => {
|
|
63
|
+
value.dispatchEvent(new MouseEvent('click', { bubbles: true }));
|
|
64
|
+
});
|
|
65
|
+
return {
|
|
66
|
+
host: ui.portalContainer,
|
|
67
|
+
unmount: async () => {
|
|
68
|
+
await act(async () => {
|
|
69
|
+
root.unmount();
|
|
70
|
+
});
|
|
71
|
+
mount.remove();
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
describe('portalContainer 可配(真实姿势属性编辑器)', () => {
|
|
76
|
+
it('portalContainer 可配:选择框渲染进宿主给的容器,z-index 以 5000 为基准', async () => {
|
|
77
|
+
const mount = document.createElement('div');
|
|
78
|
+
document.body.appendChild(mount);
|
|
79
|
+
const host = document.createElement('div');
|
|
80
|
+
document.body.appendChild(host);
|
|
81
|
+
const { unmount } = await renderPicker({ portalContainer: host, zIndexBase: 5000 }, mount);
|
|
82
|
+
const frame = host.querySelector('[data-testid="PosePickerFrame"]');
|
|
83
|
+
expect(frame).not.toBeNull(); // 渲染进了宿主容器,而非 document.body 直挂
|
|
84
|
+
expect(document.body.querySelectorAll('[data-testid="PosePickerFrame"]')).toHaveLength(1);
|
|
85
|
+
expect(frame.style.zIndex).toBe('5000');
|
|
86
|
+
await unmount();
|
|
87
|
+
host.remove();
|
|
88
|
+
});
|
|
89
|
+
it('缺省:portal 落 document.body,z-index 基准 1000', async () => {
|
|
90
|
+
const mount = document.createElement('div');
|
|
91
|
+
document.body.appendChild(mount);
|
|
92
|
+
const { unmount } = await renderPicker({}, mount);
|
|
93
|
+
const frame = document.body.querySelector('[data-testid="PosePickerFrame"]');
|
|
94
|
+
expect(frame).not.toBeNull();
|
|
95
|
+
expect(frame.style.zIndex).toBe('1000');
|
|
96
|
+
await unmount();
|
|
97
|
+
});
|
|
98
|
+
});
|