@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,920 @@
|
|
|
1
|
+
import { useCurrentSheet } from '@dreamerbird/r3f';
|
|
2
|
+
import { getStudioSync, onChange, types as t, val } from '@dreamerbird/core';
|
|
3
|
+
import { privateAPI } from '@dreamerbird/core/privateAPIs';
|
|
4
|
+
import getStudioInternal from '@dreamerbird/studio/getStudio';
|
|
5
|
+
import getDeep from './getDeep';
|
|
6
|
+
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
7
|
+
import { useFrame, useThree } from '@react-three/fiber';
|
|
8
|
+
import { TransformControls } from '@react-three/drei';
|
|
9
|
+
import { BufferAttribute, BufferGeometry, Color, ConeGeometry, DoubleSide, Group, InstancedMesh, Line, LineBasicMaterial, Matrix4, Mesh, MeshBasicMaterial, OctahedronGeometry, Quaternion, SphereGeometry, Vector3, } from 'three';
|
|
10
|
+
import { registerEditorOnly } from './editorOnly';
|
|
11
|
+
import { useModalGrab } from './modalGrab';
|
|
12
|
+
import { translate } from '@dreamerbird/studio/i18n';
|
|
13
|
+
// 模块顶层 label 用 translate:自带副作用导入,保证词条先注册(同 ShotCamera)
|
|
14
|
+
import './i18n';
|
|
15
|
+
import { isSelectSuppressed, suppressSelectBriefly, useSelectionGizmoTarget, } from './PlacementManager';
|
|
16
|
+
import { buildCurve, buildLinePositions, composePathMatrix, directionArrowMatrices, effectiveHandles, effectiveUs, extendPathPoint, IDENTITY_PATH_TRANSFORM, nextPointKey, parsePathPoints, sampleCurve, serializePathPoints, withDraggedHandle, withMovedPoint, withMovedU, withResetU, } from './pathModel';
|
|
17
|
+
import { formatSceneObjectId } from './agent/objectIds';
|
|
18
|
+
import { registerSceneSheetObject, unregisterSceneSheetObject, } from './agent/runtime/objectRuntime';
|
|
19
|
+
import { registerPathSampler } from './agent/runtime/pathRuntime';
|
|
20
|
+
/**
|
|
21
|
+
* 运镜路径:一条可编辑的空间曲线(机位用,同一个组件将来可复用)。
|
|
22
|
+
* 模型对齐 Blender 的曲线对象:
|
|
23
|
+
*
|
|
24
|
+
* - 路径对象 = 变换(位置/旋转/缩放)+ 曲线(points:几何底账,隐藏)
|
|
25
|
+
* + 行进(progress:0~1 行进进度,可见可打关键帧)三部分——对齐
|
|
26
|
+
* Blender:物体模式动变换(整体移动/旋转/缩放),曲线数据里除了几何
|
|
27
|
+
* 还有 Path Animation(Evaluation Time),行进节奏的家是曲线
|
|
28
|
+
* - 控制点是纯数据,存在 `${metaKey}` 对象的 points 文本属性里(JSON 底账,
|
|
29
|
+
* 勿手改),坐标是相对路径原点的局部坐标——不是 theatre 对象,不进大纲、
|
|
30
|
+
* 不上时间轴,编辑全部在视口里;世界位置 = 变换矩阵 × 局部坐标
|
|
31
|
+
* - 平时(对象模式)显示路径线(实线,普通蓝色);方向箭头(沿线小圆锥,
|
|
32
|
+
* 指向行进进度 0→1 的方向,Blender 曲线方向刻度的对应物)只在编辑
|
|
33
|
+
* 模式出现。选中路径(点线/大纲)线变黄、路径原点出现小黄标,挂整体
|
|
34
|
+
* 移动箭头、G 整体抓取(改的是路径的变换属性,点数据不动);右键路径线
|
|
35
|
+
* 或按 Tab 进入编辑模式:线变亮黄、控制点圆点出现,可点选、挂三轴箭头
|
|
36
|
+
* 沿轴精拖,
|
|
37
|
+
* 或按 G 进入 Blender 式模态抓取:点跟随鼠标(视图平面),X/Y/Z 锁轴,
|
|
38
|
+
* 左键/回车确认,右键/Esc 取消
|
|
39
|
+
* - 选中的控制点显示贝塞尔手柄(小圆点+连线):按住小圆点直接拖;
|
|
40
|
+
* 默认自动(平滑穿过),拖动后转手动,两手柄方向共线(Blender 的"对齐");
|
|
41
|
+
* App 层另有数值浮条(显示的是局部坐标);点级增删在编辑浮条
|
|
42
|
+
* (PathEditBar:加点/删除选中点),不进全局菜单。
|
|
43
|
+
* 控制点/手柄都是屏幕恒定大小的实心标记(深度测试关掉、画在最上层),
|
|
44
|
+
* 对齐 Blender 的屏幕空间编辑 UI:任何缩放级别下同样清晰、同样好点
|
|
45
|
+
* - 拖动/增删都是一次 scrub 提交 = 一步撤销;镜头视角下整体隐藏
|
|
46
|
+
*/
|
|
47
|
+
export const POS_PATH_KEY = 'Pos Path';
|
|
48
|
+
/** 路径的显示名(目前只有机位路径一条;菜单/浮条里展示用) */
|
|
49
|
+
export function pathLabel(metaKey) {
|
|
50
|
+
return '机位路径';
|
|
51
|
+
}
|
|
52
|
+
/** 路径对象自己的名字(大纲里显示的那个,如 "Pos Path"):取名单键
|
|
53
|
+
* 的最后一段。给"选目标"类的下拉用——选项显示对象真名,不是功能标签 */
|
|
54
|
+
export function pathObjectName(metaKey) {
|
|
55
|
+
return metaKey.split('/').pop()?.trim() || metaKey;
|
|
56
|
+
}
|
|
57
|
+
/** 路径线折线的顶点缓冲容量(段数多了会自动降低每段细分,不会溢出) */
|
|
58
|
+
const LINE_BUFFER_VERTS = 256;
|
|
59
|
+
/** 控制点圆点的屏幕尺寸(px,恒定不随缩放——Blender 的屏幕空间编辑标记) */
|
|
60
|
+
const POINT_SIZE_PX = 13;
|
|
61
|
+
/** 手柄圆点的屏幕直径(px,同上) */
|
|
62
|
+
const HANDLE_SIZE_PX = 10;
|
|
63
|
+
const metaConfigCache = new Map();
|
|
64
|
+
/**
|
|
65
|
+
* 路径对象 = 变换(位置/旋转/缩放,对齐 Blender 物体模式的对象变换,
|
|
66
|
+
* 可打关键帧 = 整条路径的动画)+ 曲线(points:几何底账,隐藏)
|
|
67
|
+
* + 行进(progress:0~1 行进进度,对齐曲线侧的 Evaluation Time,
|
|
68
|
+
* 行进节奏的家是曲线,不是跟随者)三部分。
|
|
69
|
+
*
|
|
70
|
+
* 控制点是相对路径原点的局部坐标;默认变换是单位阵,老场景的点
|
|
71
|
+
* (原本就是世界坐标)无缝过渡。
|
|
72
|
+
*/
|
|
73
|
+
export function getPathMeta(sheet, metaKey) {
|
|
74
|
+
var _a;
|
|
75
|
+
let config = metaConfigCache.get(metaKey);
|
|
76
|
+
if (!config) {
|
|
77
|
+
// hidden: 纯数据底账不在属性面板出现(编辑全在视口/菜单,勿手改)
|
|
78
|
+
config = {
|
|
79
|
+
points: t.string('[]', { label: '控制点名单(JSON)', hidden: true }),
|
|
80
|
+
progress: t.number(0, {
|
|
81
|
+
range: [0, 1],
|
|
82
|
+
label: () => translate('pg.props.pathProgress'),
|
|
83
|
+
}),
|
|
84
|
+
position: t.compound({ x: t.number(0), y: t.number(0), z: t.number(0) }, { label: () => translate('pg.props.position') }),
|
|
85
|
+
rotation: t.compound({ x: t.number(0), y: t.number(0), z: t.number(0) }, { label: () => translate('pg.props.rotationRadian') }),
|
|
86
|
+
scale: t.compound({ x: t.number(1), y: t.number(1), z: t.number(1) }, { label: () => translate('pg.props.scale') }),
|
|
87
|
+
};
|
|
88
|
+
metaConfigCache.set(metaKey, config);
|
|
89
|
+
}
|
|
90
|
+
const meta = sheet.object(metaKey, config);
|
|
91
|
+
((_a = window).__cameraPathMeta ?? (_a.__cameraPathMeta = {}))[metaKey] = meta;
|
|
92
|
+
return meta;
|
|
93
|
+
}
|
|
94
|
+
/** 响应式读名单:meta 为 null(对象不存在)时按空名单算 */
|
|
95
|
+
function usePathPointEntries(meta) {
|
|
96
|
+
const [entries, setEntries] = useState(() => meta ? parsePathPoints(meta.value.points) : []);
|
|
97
|
+
useEffect(() => {
|
|
98
|
+
if (!meta) {
|
|
99
|
+
setEntries([]);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
setEntries(parsePathPoints(meta.value.points));
|
|
103
|
+
return meta.onValuesChange(() => setEntries(parsePathPoints(meta.value.points)));
|
|
104
|
+
}, [meta]);
|
|
105
|
+
return entries;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* 路径对象是否存在(只探测,不创建):走内部对象表——sheet.object
|
|
109
|
+
* 查不存在就会顺手创建,那是"没点就不出现"要躲开的
|
|
110
|
+
*/
|
|
111
|
+
export function pathExists(sheet, metaKey) {
|
|
112
|
+
return privateAPI(sheet).getObject(metaKey) != null;
|
|
113
|
+
}
|
|
114
|
+
/** 响应式存在性:订阅内部对象表,任何途径增删对象都会触发。
|
|
115
|
+
* 返回渲染期直读的实时值(state 只负责触发重渲染)——
|
|
116
|
+
* key 切换时不存在"上一 key 的过期存在性"窗口 */
|
|
117
|
+
export function usePathExists(sheet, metaKey) {
|
|
118
|
+
const [, setProbe] = useState(0);
|
|
119
|
+
useEffect(() => {
|
|
120
|
+
setProbe((n) => n + 1);
|
|
121
|
+
return onChange(privateAPI(sheet).objectsP, () => setProbe((n) => n + 1));
|
|
122
|
+
}, [sheet, metaKey]);
|
|
123
|
+
return pathExists(sheet, metaKey);
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* 响应式:路径是否有控制点。对象不存在(未注册/已删除)时算没有,
|
|
127
|
+
* 绝不顺手创建——创建只发生在注册表加行后的组件挂载。
|
|
128
|
+
* 空路径时驱动自动回退手动(见 ShotCamera),相机仍可拖;
|
|
129
|
+
* ShotCamera 用它决定要不要锁掉移动箭头
|
|
130
|
+
*/
|
|
131
|
+
export function usePathHasPoints(sheet, metaKey) {
|
|
132
|
+
const exists = usePathExists(sheet, metaKey);
|
|
133
|
+
const meta = useMemo(() => (exists ? getPathMeta(sheet, metaKey) : null), [sheet, metaKey, exists]);
|
|
134
|
+
return usePathPointEntries(meta).length > 0;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* 自愈:points 必须是静态纯数据。属性面板上每个属性都有打关键帧的菱形,
|
|
138
|
+
* 误点一下(或撤销把它变回去)就会把 points 变成序列轨道——之后读写全部
|
|
139
|
+
* 随播放头漂移,增删/拖动写进去的都是关键帧,表现为"改了又回来/删不掉"。
|
|
140
|
+
* 这里监听轨道表,发现 points 被上帧就立刻摊平回静态(取当前播放头的值,
|
|
141
|
+
* 同 studio 右键菜单的 Make static;不可撤销的只是不进撤销栈,照常落盘)。
|
|
142
|
+
*
|
|
143
|
+
* 必须等 studio.initialized(持久态恢复完成)再开始监听:恢复过程中历史
|
|
144
|
+
* 状态是半成品(轨道可能已在、后面的静态覆盖还没回放到),这时摊平会把
|
|
145
|
+
* 过期值重新固化成最新静态值,名单"清空又复活"就是这么来的。
|
|
146
|
+
*/
|
|
147
|
+
function useKeepPointsPropStatic(meta) {
|
|
148
|
+
useEffect(() => {
|
|
149
|
+
const internal = privateAPI(meta);
|
|
150
|
+
let cancelled = false;
|
|
151
|
+
let untap;
|
|
152
|
+
void getStudioInternal().initialized.then(() => {
|
|
153
|
+
if (cancelled)
|
|
154
|
+
return;
|
|
155
|
+
untap = onChange(internal.template.getMapOfValidSequenceTracks_forStudio(), (tracks) => {
|
|
156
|
+
if (typeof getDeep(tracks, ['points']) !== 'string')
|
|
157
|
+
return;
|
|
158
|
+
getStudioInternal().transaction(({ stateEditors }) => {
|
|
159
|
+
stateEditors.coreByProject.historic.sheetsById.sequence.setPrimitivePropAsStatic({
|
|
160
|
+
...internal.address,
|
|
161
|
+
pathToProp: ['points'],
|
|
162
|
+
value: meta.value.points,
|
|
163
|
+
});
|
|
164
|
+
}, false);
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
return () => {
|
|
168
|
+
cancelled = true;
|
|
169
|
+
untap?.();
|
|
170
|
+
};
|
|
171
|
+
}, [meta]);
|
|
172
|
+
}
|
|
173
|
+
const pathRegistry = new Map();
|
|
174
|
+
/** 读路径对象当前的变换属性(默认值兜底:对象还没持久化过时也是单位阵) */
|
|
175
|
+
function readPathTransform(meta) {
|
|
176
|
+
return {
|
|
177
|
+
position: val(meta.props.position) ?? {
|
|
178
|
+
...IDENTITY_PATH_TRANSFORM.position,
|
|
179
|
+
},
|
|
180
|
+
rotation: val(meta.props.rotation) ?? {
|
|
181
|
+
...IDENTITY_PATH_TRANSFORM.rotation,
|
|
182
|
+
},
|
|
183
|
+
scale: val(meta.props.scale) ?? {
|
|
184
|
+
...IDENTITY_PATH_TRANSFORM.scale,
|
|
185
|
+
},
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* 按进度在路径上取点(世界坐标):锚点分段取局部点(进度落在哪两个点的
|
|
190
|
+
* 锚点之间,就在那段贝塞尔里按弧长取点;锚点全自动时 = 全程弧长等比),
|
|
191
|
+
* 再乘路径的整体变换矩阵。路径为空返回 false,调用方回退到手动驱动;
|
|
192
|
+
* 单点路径任何进度都取那个点。
|
|
193
|
+
*/
|
|
194
|
+
export function samplePathPoint(metaKey, u, out) {
|
|
195
|
+
const reg = pathRegistry.get(metaKey);
|
|
196
|
+
if (!reg || reg.entries.length === 0)
|
|
197
|
+
return false;
|
|
198
|
+
if (!reg.curve) {
|
|
199
|
+
const p = reg.entries[0].position;
|
|
200
|
+
out.set(p.x, p.y, p.z);
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
sampleCurve(reg.curve, reg.us, u, out);
|
|
204
|
+
}
|
|
205
|
+
out.applyMatrix4(reg.matrix);
|
|
206
|
+
return true;
|
|
207
|
+
}
|
|
208
|
+
// ---------------------------------------------------------------------------
|
|
209
|
+
// 加点/删点(工具栏按钮调;一次 scrub 提交 = 一步撤销)
|
|
210
|
+
/**
|
|
211
|
+
* 加一个控制点:路径为空时用 seed 播种(机位路径=绕目标的弧),
|
|
212
|
+
* 否则沿最后一段方向延伸。seed 为空且名单为空时不动作。
|
|
213
|
+
*
|
|
214
|
+
* seed 给的是世界坐标(从相机/目标的当前位置算出来),控制点存的是
|
|
215
|
+
* 局部坐标——按路径当前变换的逆矩阵换算;变换是单位阵时两者相等。
|
|
216
|
+
*
|
|
217
|
+
* onSeeded:路径从无到有(播种)时,在同一次提交里顺带写入(比如
|
|
218
|
+
* 自动把驱动切到"沿路径"——Blender 的约束加上即生效,不存在
|
|
219
|
+
* "路径建好了却还停在手动"的中间态)。撤销一次 = 点和模式一起回退
|
|
220
|
+
*/
|
|
221
|
+
export function addPathPoint(sheet, metaKey, seed, onSeeded) {
|
|
222
|
+
const studio = getStudioSync();
|
|
223
|
+
if (!studio)
|
|
224
|
+
return;
|
|
225
|
+
const meta = getPathMeta(sheet, metaKey);
|
|
226
|
+
const list = parsePathPoints(meta.value.points);
|
|
227
|
+
const seeded = list.length === 0;
|
|
228
|
+
let next;
|
|
229
|
+
if (seeded) {
|
|
230
|
+
if (!seed || seed.length === 0)
|
|
231
|
+
return;
|
|
232
|
+
const inv = pathRegistry.get(metaKey)?.matrix.clone().invert();
|
|
233
|
+
next = seed.map((world, i) => {
|
|
234
|
+
const local = inv
|
|
235
|
+
? new Vector3(world.x, world.y, world.z).applyMatrix4(inv)
|
|
236
|
+
: null;
|
|
237
|
+
return {
|
|
238
|
+
key: `P${i + 1}`,
|
|
239
|
+
position: local
|
|
240
|
+
? { x: local.x, y: local.y, z: local.z }
|
|
241
|
+
: { x: world.x, y: world.y, z: world.z },
|
|
242
|
+
};
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
next = [...list, { key: nextPointKey(list), position: extendPathPoint(list) }];
|
|
247
|
+
}
|
|
248
|
+
const scrub = studio.scrub();
|
|
249
|
+
scrub.capture(({ set }) => {
|
|
250
|
+
set(meta.props.points, serializePathPoints(next));
|
|
251
|
+
if (seeded)
|
|
252
|
+
onSeeded?.(set);
|
|
253
|
+
});
|
|
254
|
+
scrub.commit();
|
|
255
|
+
}
|
|
256
|
+
/** 删掉指定控制点。点不在名单里返回 false,调用方提示 */
|
|
257
|
+
export function deletePathPoint(sheet, metaKey, pointKey) {
|
|
258
|
+
const studio = getStudioSync();
|
|
259
|
+
if (!studio)
|
|
260
|
+
return false;
|
|
261
|
+
const meta = getPathMeta(sheet, metaKey);
|
|
262
|
+
const list = parsePathPoints(meta.value.points);
|
|
263
|
+
const next = list.filter((e) => e.key !== pointKey);
|
|
264
|
+
if (next.length === list.length)
|
|
265
|
+
return false;
|
|
266
|
+
const scrub = studio.scrub();
|
|
267
|
+
scrub.capture(({ set }) => set(meta.props.points, serializePathPoints(next)));
|
|
268
|
+
scrub.commit();
|
|
269
|
+
return true;
|
|
270
|
+
}
|
|
271
|
+
/** 直接读一次名单(菜单动作用;不是响应式,组件里要响应式用 usePathHasPoints) */
|
|
272
|
+
export function readPathPoints(sheet, metaKey) {
|
|
273
|
+
return parsePathPoints(getPathMeta(sheet, metaKey).value.points);
|
|
274
|
+
}
|
|
275
|
+
// ---------------------------------------------------------------------------
|
|
276
|
+
// 场景组件
|
|
277
|
+
function makePathLine() {
|
|
278
|
+
const geo = new BufferGeometry();
|
|
279
|
+
geo.setAttribute('position', new BufferAttribute(new Float32Array(LINE_BUFFER_VERTS * 3), 3));
|
|
280
|
+
const line = new Line(geo, new LineBasicMaterial({ color: 0xffffff, toneMapped: false }));
|
|
281
|
+
// 顶点随名单重写,包围球会重算(Line raycast 粗测依赖它);
|
|
282
|
+
// 渲染剔除与 drawRange 零填充缓冲的包围球不配合,frustumCulled 直接关掉更稳
|
|
283
|
+
line.frustumCulled = false;
|
|
284
|
+
return line;
|
|
285
|
+
}
|
|
286
|
+
function makeProgressMarker() {
|
|
287
|
+
return new Mesh(new SphereGeometry(0.12, 16, 12), new MeshBasicMaterial({ color: 0xffffff, toneMapped: false }));
|
|
288
|
+
}
|
|
289
|
+
function makeHandleLine() {
|
|
290
|
+
const geo = new BufferGeometry();
|
|
291
|
+
geo.setAttribute('position', new BufferAttribute(new Float32Array(2 * 3), 3));
|
|
292
|
+
const line = new Line(geo,
|
|
293
|
+
// 编辑标记画在场景最上层(Blender 同款:编辑 UI 不被模型挡住)
|
|
294
|
+
new LineBasicMaterial({
|
|
295
|
+
color: 0xffffff,
|
|
296
|
+
toneMapped: false,
|
|
297
|
+
depthTest: false,
|
|
298
|
+
transparent: true,
|
|
299
|
+
}));
|
|
300
|
+
line.frustumCulled = false;
|
|
301
|
+
line.renderOrder = 19;
|
|
302
|
+
return line;
|
|
303
|
+
}
|
|
304
|
+
/** 选中态的线色:亮黄(Blender 的选中高亮),与路径底色无关;原点标记也用这档 */
|
|
305
|
+
const SELECTED_LINE_COLOR = new Color(0xffcc33);
|
|
306
|
+
/** 编辑态的线色:比选中再亮一档的黄,一眼看出"我在编辑这条路径" */
|
|
307
|
+
const EDITING_LINE_COLOR = new Color(0xffcc33).lerp(new Color(0xffffff), 0.45);
|
|
308
|
+
/** 方向箭头(Blender 曲线方向刻度的对应物,仅编辑模式显示):小圆锥沿切线
|
|
309
|
+
* 指向行进方向,实例化渲染,名单变化时重铺。比线暗一档(同色系 0.85) */
|
|
310
|
+
const ARROW_MAX = 64;
|
|
311
|
+
const ARROW_RADIUS = 0.07;
|
|
312
|
+
const ARROW_HEIGHT = 0.22;
|
|
313
|
+
function makeDirectionArrows() {
|
|
314
|
+
const mesh = new InstancedMesh(new ConeGeometry(ARROW_RADIUS, ARROW_HEIGHT, 10), new MeshBasicMaterial({ color: 0xffffff, toneMapped: false }), ARROW_MAX);
|
|
315
|
+
mesh.count = 0;
|
|
316
|
+
mesh.frustumCulled = false;
|
|
317
|
+
return mesh;
|
|
318
|
+
}
|
|
319
|
+
/** 路径原点标记(Blender 物体原点圆点的对应物):选中路径时显示,
|
|
320
|
+
* 和整体移动箭头同位置——不然箭头悬在空白处不知道是啥的 */
|
|
321
|
+
function makeOriginMarker() {
|
|
322
|
+
const mesh = new Mesh(new OctahedronGeometry(0.12), new MeshBasicMaterial({ color: 0xffffff, toneMapped: false }));
|
|
323
|
+
mesh.visible = false;
|
|
324
|
+
mesh.frustumCulled = false;
|
|
325
|
+
return mesh;
|
|
326
|
+
}
|
|
327
|
+
export function CameraPath({ metaKey, color, hidden, editing, selectedKey, onSelectPoint, onContextMenu, progressOf, }) {
|
|
328
|
+
const sheet = useCurrentSheet();
|
|
329
|
+
const meta = useMemo(() => getPathMeta(sheet, metaKey), [sheet, metaKey]);
|
|
330
|
+
// 卸载即脱离:注册表移除(含撤销"添加路径")会卸载本组件;路径对象
|
|
331
|
+
// 不是 editable,不自动脱离,这里兜底。removePathFromRegistry 已显式
|
|
332
|
+
// 脱离过的话,探测到不存在就跳过(detachObject 对不存在的 key 只告警,
|
|
333
|
+
// 但没必要刷那条警告)
|
|
334
|
+
useEffect(() => () => {
|
|
335
|
+
if (pathExists(sheet, metaKey))
|
|
336
|
+
sheet.detachObject(metaKey);
|
|
337
|
+
}, [sheet, metaKey]);
|
|
338
|
+
const entries = usePathPointEntries(meta);
|
|
339
|
+
useKeepPointsPropStatic(meta);
|
|
340
|
+
const curve = useMemo(() => buildCurve(entries), [entries]);
|
|
341
|
+
// 每个点的生效进度锚点(名单/曲线变化时重算,见 pathModel.effectiveUs)
|
|
342
|
+
const us = useMemo(() => effectiveUs(entries, curve), [entries, curve]);
|
|
343
|
+
const line = useMemo(makePathLine, []);
|
|
344
|
+
const marker = useMemo(makeProgressMarker, []);
|
|
345
|
+
const handleLineL = useMemo(makeHandleLine, []);
|
|
346
|
+
const handleLineR = useMemo(makeHandleLine, []);
|
|
347
|
+
const arrows = useMemo(makeDirectionArrows, []);
|
|
348
|
+
const originMarker = useMemo(makeOriginMarker, []);
|
|
349
|
+
// 控制点/手柄的场景节点:控制点挂三轴箭头用(纯数据,不是 theatre 对象)
|
|
350
|
+
const pointNodesRef = useRef(new Map());
|
|
351
|
+
const handleNodesRef = useRef({
|
|
352
|
+
left: null,
|
|
353
|
+
right: null,
|
|
354
|
+
});
|
|
355
|
+
const scrubRef = useRef(undefined);
|
|
356
|
+
// Blender 式模态抓取:G 键抓控制点 / 按住手柄圆点直接拖,共用一套
|
|
357
|
+
const { start: startGrab, active: grabActive } = useModalGrab();
|
|
358
|
+
const invalidate = useThree((s) => s.invalidate);
|
|
359
|
+
// 路径整体变换(Blender 物体模式):线/控制点/手柄/进度标记全挂在
|
|
360
|
+
// 这个分组下,组内一律用局部坐标;世界位置由分组的变换算。分组本体
|
|
361
|
+
// 同时是"选中路径 → 整体移动箭头"的附着目标(箭头在路径原点)
|
|
362
|
+
const pathRoot = useMemo(() => new Group(), []);
|
|
363
|
+
// 变换属性(面板数字/时间轴/撤销/整体拖拽)→ 分组 + 采样登记表的矩阵。
|
|
364
|
+
// 走 onValuesChange 主动应用 + invalidate:frameloop="demand" 下光改
|
|
365
|
+
// 属性不会自己出新帧(本组件只订阅了 points,变换变了不会重渲染)
|
|
366
|
+
useEffect(() => {
|
|
367
|
+
const apply = () => {
|
|
368
|
+
const tr = readPathTransform(meta);
|
|
369
|
+
pathRoot.position.set(tr.position.x, tr.position.y, tr.position.z);
|
|
370
|
+
pathRoot.rotation.set(tr.rotation.x, tr.rotation.y, tr.rotation.z);
|
|
371
|
+
pathRoot.scale.set(tr.scale.x, tr.scale.y, tr.scale.z);
|
|
372
|
+
pathRoot.updateMatrixWorld(true);
|
|
373
|
+
const reg = pathRegistry.get(metaKey);
|
|
374
|
+
if (reg)
|
|
375
|
+
composePathMatrix(tr, reg.matrix);
|
|
376
|
+
invalidate();
|
|
377
|
+
};
|
|
378
|
+
apply();
|
|
379
|
+
return meta.onValuesChange(apply);
|
|
380
|
+
}, [meta, metaKey, pathRoot, invalidate]);
|
|
381
|
+
// 名单/曲线/锚点/矩阵登记给 ShotCamera 每帧采样
|
|
382
|
+
useEffect(() => {
|
|
383
|
+
const matrix = composePathMatrix(readPathTransform(meta), new Matrix4());
|
|
384
|
+
pathRegistry.set(metaKey, { entries, curve, us, matrix });
|
|
385
|
+
return () => {
|
|
386
|
+
pathRegistry.delete(metaKey);
|
|
387
|
+
};
|
|
388
|
+
}, [metaKey, meta, entries, curve, us]);
|
|
389
|
+
// Agent 运行时登记(2026-10-17,Task 11):meta 句柄填充即登记
|
|
390
|
+
// path:<key> 的 SheetObject(objectRuntime;scene/objects 查询与领域
|
|
391
|
+
// 命令的解析底账),并把当前曲线的采样函数注册到 pathRuntime——
|
|
392
|
+
// paths.sample 与 ShotCamera 每帧采样读同一份登记表(samplePathPoint
|
|
393
|
+
// 按 metaKey 直读上面的 pathRegistry,名单/矩阵随渲染更新)。卸载只
|
|
394
|
+
// 解绑自己的 pathKey:两处清理都校验同一对象/函数引用,防过期
|
|
395
|
+
// cleanup 抹掉新代次的登记
|
|
396
|
+
useEffect(() => {
|
|
397
|
+
const id = formatSceneObjectId('path', metaKey);
|
|
398
|
+
registerSceneSheetObject(id, meta);
|
|
399
|
+
const unbindSampler = registerPathSampler(metaKey, (u, out) => samplePathPoint(metaKey, u, out));
|
|
400
|
+
return () => {
|
|
401
|
+
unregisterSceneSheetObject(id, meta);
|
|
402
|
+
unbindSampler();
|
|
403
|
+
};
|
|
404
|
+
}, [metaKey, meta]);
|
|
405
|
+
// 路径本身可被选中(对齐 Blender:曲线是一等公民物体)——左键点线
|
|
406
|
+
// 选中对应的名单对象(大纲高亮、属性面板出现),线色微微提亮
|
|
407
|
+
const [isSelected, setIsSelected] = useState(false);
|
|
408
|
+
useEffect(() => {
|
|
409
|
+
const studio = getStudioSync();
|
|
410
|
+
if (!studio)
|
|
411
|
+
return;
|
|
412
|
+
const sync = () => setIsSelected(studio.selection.includes(meta));
|
|
413
|
+
sync();
|
|
414
|
+
return studio.onSelectionChange(sync);
|
|
415
|
+
}, [meta]);
|
|
416
|
+
// 对象模式的整体编辑(Blender):选中路径且不在编辑模式时,路径原点
|
|
417
|
+
// (pathRoot)挂整体移动箭头,SelectionGizmo 的 G 抓取/R/S 模式也跟着
|
|
418
|
+
// 生效——写回的都是路径对象的变换属性,控制点局部数据不动。编辑模式
|
|
419
|
+
// 下注销,和控制点箭头不撞车
|
|
420
|
+
const metaRef = useRef(meta);
|
|
421
|
+
const pathRootRef = useRef(pathRoot);
|
|
422
|
+
// 路径有自己的选中高亮(线变亮黄),不再画包围盒
|
|
423
|
+
useSelectionGizmoTarget(metaRef, pathRootRef, !editing, {
|
|
424
|
+
boxHighlight: false,
|
|
425
|
+
});
|
|
426
|
+
useEffect(() => registerEditorOnly(line), [line]);
|
|
427
|
+
useEffect(() => registerEditorOnly(marker), [marker]);
|
|
428
|
+
useEffect(() => registerEditorOnly(handleLineL), [handleLineL]);
|
|
429
|
+
useEffect(() => registerEditorOnly(handleLineR), [handleLineR]);
|
|
430
|
+
useEffect(() => registerEditorOnly(arrows), [arrows]);
|
|
431
|
+
useEffect(() => registerEditorOnly(originMarker), [originMarker]);
|
|
432
|
+
// 调试/自动化验证挂钩:浏览器里直接摸线对象(射线/包围球排查用),
|
|
433
|
+
// 与 __cameraPathEdit 同套;卸载自清
|
|
434
|
+
useEffect(() => {
|
|
435
|
+
var _a;
|
|
436
|
+
const bag = ((_a = window).__cameraPathLines ?? (_a.__cameraPathLines = {}));
|
|
437
|
+
bag[metaKey] = { line, pathRoot };
|
|
438
|
+
return () => {
|
|
439
|
+
delete bag[metaKey];
|
|
440
|
+
};
|
|
441
|
+
}, [line, pathRoot, metaKey]);
|
|
442
|
+
// 名单变化 → 重写路径线顶点 + 重铺方向箭头(不用每帧:纯数据,变了才重建)
|
|
443
|
+
useEffect(() => {
|
|
444
|
+
const attr = line.geometry.getAttribute('position');
|
|
445
|
+
const count = buildLinePositions(entries, attr.array);
|
|
446
|
+
line.geometry.setDrawRange(0, count);
|
|
447
|
+
attr.needsUpdate = true;
|
|
448
|
+
// 顶点是固定长缓冲就地重写,Line raycast 缓存的包围球不会自己更新;
|
|
449
|
+
// 不重算的话平移/加点后射线粗测还在旧位置,点选/右键间歇性漏判
|
|
450
|
+
line.geometry.computeBoundingSphere();
|
|
451
|
+
line.visible = !hidden && count > 0;
|
|
452
|
+
// 方向箭头只在编辑模式出现(对齐 Blender:方向刻度是编辑态的叠加层),
|
|
453
|
+
// 跟着线走:线可见且编辑中才可见
|
|
454
|
+
const mats = directionArrowMatrices(curve, ARROW_MAX);
|
|
455
|
+
mats.forEach((m, i) => arrows.setMatrixAt(i, m));
|
|
456
|
+
arrows.count = mats.length;
|
|
457
|
+
arrows.instanceMatrix.needsUpdate = true;
|
|
458
|
+
arrows.visible = line.visible && editing;
|
|
459
|
+
}, [entries, curve, line, arrows, hidden, editing]);
|
|
460
|
+
// 模式/选中态 → 颜色和可见性(普通=蓝 → 选中=黄 → 编辑=亮黄)
|
|
461
|
+
useEffect(() => {
|
|
462
|
+
const lineColor = editing
|
|
463
|
+
? EDITING_LINE_COLOR
|
|
464
|
+
: isSelected
|
|
465
|
+
? SELECTED_LINE_COLOR
|
|
466
|
+
: new Color(color);
|
|
467
|
+
line.material.color.copy(lineColor);
|
|
468
|
+
marker.material.color.set(color);
|
|
469
|
+
arrows.material.color
|
|
470
|
+
.copy(lineColor)
|
|
471
|
+
.multiplyScalar(0.85);
|
|
472
|
+
originMarker.material.color.copy(SELECTED_LINE_COLOR);
|
|
473
|
+
// 原点标记只在选中(对象模式)时出现;编辑模式选中态被清空,自然不出现
|
|
474
|
+
originMarker.visible = isSelected && !hidden;
|
|
475
|
+
}, [editing, isSelected, color, hidden, line, marker, arrows, originMarker]);
|
|
476
|
+
const selectedIdx = entries.findIndex((e) => e.key === selectedKey);
|
|
477
|
+
const selectedEntry = selectedIdx >= 0 ? entries[selectedIdx] : undefined;
|
|
478
|
+
// 选中的点被删/撤销掉了 → 通知 App 清选中
|
|
479
|
+
useEffect(() => {
|
|
480
|
+
if (selectedKey && !selectedEntry) {
|
|
481
|
+
onSelectPoint(null);
|
|
482
|
+
}
|
|
483
|
+
}, [selectedKey, selectedEntry, onSelectPoint]);
|
|
484
|
+
// Esc:只取消进行中的拖拽(scrub 废弃即回滚),不退出编辑模式——同 Blender
|
|
485
|
+
useEffect(() => {
|
|
486
|
+
const onKey = (e) => {
|
|
487
|
+
if (e.key === 'Escape' && scrubRef.current) {
|
|
488
|
+
scrubRef.current.discard();
|
|
489
|
+
scrubRef.current = undefined;
|
|
490
|
+
}
|
|
491
|
+
};
|
|
492
|
+
window.addEventListener('keydown', onKey);
|
|
493
|
+
return () => window.removeEventListener('keydown', onKey);
|
|
494
|
+
}, []);
|
|
495
|
+
// 进度标记 + 手柄连线:每帧跟(进度属性可能在上时间轴播放)
|
|
496
|
+
useFrame(() => {
|
|
497
|
+
// 只有一个点时没有曲线也没有线,进度标记钉在那个点上充当落点标识,
|
|
498
|
+
// 否则单点路径在视口里完全不可见、不可选(只能从大纲进);
|
|
499
|
+
// 编辑模式下控制点圆点已在,不叠这个标记
|
|
500
|
+
const showMarker = !hidden && (curve ? true : entries.length > 0 && !editing);
|
|
501
|
+
marker.visible = showMarker;
|
|
502
|
+
if (showMarker && curve) {
|
|
503
|
+
sampleCurve(curve, us, progressOf(), marker.position);
|
|
504
|
+
}
|
|
505
|
+
else if (showMarker) {
|
|
506
|
+
const p = entries[0].position;
|
|
507
|
+
marker.position.set(p.x, p.y, p.z);
|
|
508
|
+
}
|
|
509
|
+
// 手柄连线两端直接读节点当前位置:拖拽中也严丝合缝
|
|
510
|
+
const pointNode = selectedKey
|
|
511
|
+
? pointNodesRef.current.get(selectedKey)
|
|
512
|
+
: undefined;
|
|
513
|
+
const showHandles = editing && !hidden && !!pointNode && !!handleNodesRef.current.left;
|
|
514
|
+
handleLineL.visible = !!showHandles;
|
|
515
|
+
handleLineR.visible = !!showHandles;
|
|
516
|
+
if (showHandles && pointNode) {
|
|
517
|
+
const { left, right } = handleNodesRef.current;
|
|
518
|
+
const writeLine = (lineObj, target) => {
|
|
519
|
+
if (!target)
|
|
520
|
+
return;
|
|
521
|
+
const attr = lineObj.geometry.getAttribute('position');
|
|
522
|
+
const arr = attr.array;
|
|
523
|
+
arr[0] = pointNode.position.x;
|
|
524
|
+
arr[1] = pointNode.position.y;
|
|
525
|
+
arr[2] = pointNode.position.z;
|
|
526
|
+
arr[3] = target.position.x;
|
|
527
|
+
arr[4] = target.position.y;
|
|
528
|
+
arr[5] = target.position.z;
|
|
529
|
+
attr.needsUpdate = true;
|
|
530
|
+
};
|
|
531
|
+
writeLine(handleLineL, left);
|
|
532
|
+
writeLine(handleLineR, right);
|
|
533
|
+
}
|
|
534
|
+
});
|
|
535
|
+
// 控制点/手柄 = 屏幕恒定大小的编辑标记(Blender 同款:编辑 UI 叠加在
|
|
536
|
+
// 画面上,不随视图缩放):每帧按到主相机的距离反推世界缩放,控制点圆片
|
|
537
|
+
// 再广告牌化正对相机;路径自身的整体旋转/缩放也一并抵消,屏幕上永远
|
|
538
|
+
// 同样大、同样正。深度测试已关(材质上),画在场景最上层
|
|
539
|
+
const markerTmp = useRef({
|
|
540
|
+
pos: new Vector3(),
|
|
541
|
+
rootQuat: new Quaternion(),
|
|
542
|
+
rootScale: new Vector3(),
|
|
543
|
+
q: new Quaternion(),
|
|
544
|
+
});
|
|
545
|
+
useFrame((state) => {
|
|
546
|
+
if (!editing || hidden)
|
|
547
|
+
return;
|
|
548
|
+
const fov = state.camera.fov;
|
|
549
|
+
if (typeof fov !== 'number')
|
|
550
|
+
return;
|
|
551
|
+
const tan = Math.tan((fov * Math.PI) / 360);
|
|
552
|
+
const hPx = state.size.height;
|
|
553
|
+
const { pos, rootQuat, rootScale, q } = markerTmp.current;
|
|
554
|
+
pathRoot.getWorldQuaternion(rootQuat);
|
|
555
|
+
pathRoot.getWorldScale(rootScale);
|
|
556
|
+
const applyScreenSize = (node, px, billboard) => {
|
|
557
|
+
if (!node)
|
|
558
|
+
return;
|
|
559
|
+
const dist = node.getWorldPosition(pos).distanceTo(state.camera.position);
|
|
560
|
+
const s = (2 * dist * tan * px) / hPx;
|
|
561
|
+
node.scale.set(s / rootScale.x, s / rootScale.y, s / rootScale.z);
|
|
562
|
+
if (billboard) {
|
|
563
|
+
node.quaternion.copy(q.copy(rootQuat).invert().multiply(state.camera.quaternion));
|
|
564
|
+
}
|
|
565
|
+
};
|
|
566
|
+
for (const node of pointNodesRef.current.values()) {
|
|
567
|
+
applyScreenSize(node, POINT_SIZE_PX, true);
|
|
568
|
+
}
|
|
569
|
+
applyScreenSize(handleNodesRef.current.left, HANDLE_SIZE_PX, false);
|
|
570
|
+
applyScreenSize(handleNodesRef.current.right, HANDLE_SIZE_PX, false);
|
|
571
|
+
});
|
|
572
|
+
const selectPointByKey = (key) => {
|
|
573
|
+
// 清掉 theatre 对象的选中,对象 gizmo 和点的 gizmo 不同时出现
|
|
574
|
+
getStudioSync()?.setSelection([]);
|
|
575
|
+
onSelectPoint(key);
|
|
576
|
+
};
|
|
577
|
+
const selectPoint = (key) => (event) => {
|
|
578
|
+
if (isSelectSuppressed())
|
|
579
|
+
return;
|
|
580
|
+
event.stopPropagation();
|
|
581
|
+
selectPointByKey(key);
|
|
582
|
+
};
|
|
583
|
+
// G:Blender 式模态抓取——选中的控制点跟随鼠标(过起点、正对相机的
|
|
584
|
+
// 平面),X/Y/Z 锁轴,左键/回车确认,右键/Esc 整个废弃弹回原位
|
|
585
|
+
useEffect(() => {
|
|
586
|
+
const onKey = (e) => {
|
|
587
|
+
if (e.code !== 'KeyG' || !editing || hidden || !selectedEntry)
|
|
588
|
+
return;
|
|
589
|
+
const target = e.target;
|
|
590
|
+
if (target &&
|
|
591
|
+
(target.tagName === 'INPUT' ||
|
|
592
|
+
target.tagName === 'TEXTAREA' ||
|
|
593
|
+
target.isContentEditable))
|
|
594
|
+
return;
|
|
595
|
+
// 箭头拖动中途不抢(scrub 一次只能开一个语义)
|
|
596
|
+
if (scrubRef.current)
|
|
597
|
+
return;
|
|
598
|
+
// 基线名单在起手时定格:整个抓取期间反复以它为底改写同一个点,
|
|
599
|
+
// 一次确认 = 一步撤销(手柄镜像长度也取基线,拖多远超几度不累积)
|
|
600
|
+
const baseline = entries;
|
|
601
|
+
const key = selectedEntry.key;
|
|
602
|
+
const p = selectedEntry.position;
|
|
603
|
+
// 抓取平面/捕获位置是世界坐标;起点和写回都要过一遍路径变换
|
|
604
|
+
// (点存的是相对路径原点的局部坐标)
|
|
605
|
+
startGrab({
|
|
606
|
+
startPos: pathRoot.localToWorld(new Vector3(p.x, p.y, p.z)),
|
|
607
|
+
dragging: false,
|
|
608
|
+
capture: (scrub, worldPos) => {
|
|
609
|
+
const local = pathRoot.worldToLocal(worldPos.clone());
|
|
610
|
+
scrub.capture(({ set }) => set(meta.props.points, serializePathPoints(withMovedPoint(baseline, key, {
|
|
611
|
+
x: local.x,
|
|
612
|
+
y: local.y,
|
|
613
|
+
z: local.z,
|
|
614
|
+
}))));
|
|
615
|
+
},
|
|
616
|
+
});
|
|
617
|
+
};
|
|
618
|
+
window.addEventListener('keydown', onKey);
|
|
619
|
+
return () => window.removeEventListener('keydown', onKey);
|
|
620
|
+
}, [editing, hidden, selectedEntry, entries, meta, pathRoot, startGrab]);
|
|
621
|
+
// 拖动写回:按下开 scrub,拖动逐帧 capture,松手一次 commit = 一步撤销
|
|
622
|
+
const gizmoTarget = selectedKey
|
|
623
|
+
? pointNodesRef.current.get(selectedKey)
|
|
624
|
+
: undefined;
|
|
625
|
+
// 点手柄的 controls 实例(ref 回调里填),给"节点被移除即摘手柄"用
|
|
626
|
+
const pointGizmoRef = useRef(null);
|
|
627
|
+
// 手柄附着的点网格被移出场景(删点/撤销/整条路径卸载)时立刻摘手柄:
|
|
628
|
+
// gizmoTarget 是渲染期读 ref 算出来的,删除点的那次渲染还会拿到已死的
|
|
629
|
+
// 网格,React 下一次渲染才摘掉——空窗期 helper 每帧更新会撞 three 的
|
|
630
|
+
// "must be a part of the scene graph" 报错。'removed' 事件同步于移除
|
|
631
|
+
useEffect(() => {
|
|
632
|
+
if (!gizmoTarget)
|
|
633
|
+
return;
|
|
634
|
+
const detach = () => pointGizmoRef.current?.detach?.();
|
|
635
|
+
gizmoTarget.addEventListener('removed', detach);
|
|
636
|
+
return () => gizmoTarget.removeEventListener('removed', detach);
|
|
637
|
+
}, [gizmoTarget]);
|
|
638
|
+
const onGizmoDown = () => {
|
|
639
|
+
suppressSelectBriefly();
|
|
640
|
+
scrubRef.current = getStudioSync()?.scrub();
|
|
641
|
+
};
|
|
642
|
+
const onGizmoChange = () => {
|
|
643
|
+
suppressSelectBriefly();
|
|
644
|
+
const scrub = scrubRef.current;
|
|
645
|
+
if (!scrub || !selectedKey)
|
|
646
|
+
return;
|
|
647
|
+
const node = pointNodesRef.current.get(selectedKey);
|
|
648
|
+
if (!node)
|
|
649
|
+
return;
|
|
650
|
+
const p = node.position;
|
|
651
|
+
scrub.capture(({ set }) => set(meta.props.points, serializePathPoints(withMovedPoint(entries, selectedKey, { x: p.x, y: p.y, z: p.z }))));
|
|
652
|
+
};
|
|
653
|
+
const onGizmoUp = () => {
|
|
654
|
+
suppressSelectBriefly();
|
|
655
|
+
scrubRef.current?.commit();
|
|
656
|
+
scrubRef.current = undefined;
|
|
657
|
+
};
|
|
658
|
+
const handles = selectedEntry
|
|
659
|
+
? effectiveHandles(entries, selectedIdx)
|
|
660
|
+
: undefined;
|
|
661
|
+
// 手柄圆点按住直接拖:和 G 同一套模态抓取(鼠标起手,松手确认,
|
|
662
|
+
// Esc 取消);拖的是"手柄相对控制点的偏移",平面过手柄起点
|
|
663
|
+
const startHandleDrag = (side) => (event) => {
|
|
664
|
+
if (isSelectSuppressed() || event.nativeEvent.button !== 0)
|
|
665
|
+
return;
|
|
666
|
+
event.stopPropagation();
|
|
667
|
+
if (!selectedEntry || !handles)
|
|
668
|
+
return;
|
|
669
|
+
const baseline = entries;
|
|
670
|
+
const key = selectedEntry.key;
|
|
671
|
+
const p = selectedEntry.position;
|
|
672
|
+
const h = handles[side];
|
|
673
|
+
// 抓取平面/捕获位置是世界坐标:起点把局部手柄端点乘上路径变换,
|
|
674
|
+
// 写回时反算回局部再减控制点位置,得到局部偏移
|
|
675
|
+
startGrab({
|
|
676
|
+
startPos: pathRoot.localToWorld(new Vector3(p.x + h.x, p.y + h.y, p.z + h.z)),
|
|
677
|
+
dragging: true,
|
|
678
|
+
capture: (scrub, worldPos) => {
|
|
679
|
+
suppressSelectBriefly();
|
|
680
|
+
const local = pathRoot.worldToLocal(worldPos.clone());
|
|
681
|
+
scrub.capture(({ set }) => set(meta.props.points, serializePathPoints(withDraggedHandle(baseline, key, side, {
|
|
682
|
+
x: local.x - p.x,
|
|
683
|
+
y: local.y - p.y,
|
|
684
|
+
z: local.z - p.z,
|
|
685
|
+
}))));
|
|
686
|
+
},
|
|
687
|
+
});
|
|
688
|
+
};
|
|
689
|
+
// 点线(或单点落点标记)= 选中这条路径;右键 = 路径菜单。
|
|
690
|
+
// 线和标记共用一套,行为不分载体
|
|
691
|
+
const handlePathClick = (event) => {
|
|
692
|
+
// 镜头视角下路径不可见,不响应(线还在原地,只是没画)
|
|
693
|
+
if (hidden || isSelectSuppressed())
|
|
694
|
+
return;
|
|
695
|
+
event.stopPropagation();
|
|
696
|
+
if (editing) {
|
|
697
|
+
// 编辑模式:点标记正好坐在曲线上,线 1 个世界单位的命中
|
|
698
|
+
// 半径总会先吃到瞄准标记的点击——从同一次射线的全部命中
|
|
699
|
+
// 里找到点标记并转发;其余点击就地吞掉,不穿透选中后面
|
|
700
|
+
// 的东西(Blender 编辑模式:其他物体不响应视口点击)
|
|
701
|
+
for (const hit of event.intersections) {
|
|
702
|
+
for (const [key, node] of pointNodesRef.current) {
|
|
703
|
+
if (hit.object === node) {
|
|
704
|
+
selectPointByKey(key);
|
|
705
|
+
return;
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
return;
|
|
710
|
+
}
|
|
711
|
+
// 点线 = 选中这条路径(名单对象):大纲高亮、Tab/右键随之作用到它
|
|
712
|
+
getStudioSync()?.setSelection([meta]);
|
|
713
|
+
};
|
|
714
|
+
const handlePathContextMenu = (event) => {
|
|
715
|
+
// 镜头视角下路径不可见,右键不响应(线还在原地,只是没画)
|
|
716
|
+
if (hidden)
|
|
717
|
+
return;
|
|
718
|
+
event.stopPropagation();
|
|
719
|
+
event.nativeEvent.preventDefault();
|
|
720
|
+
onContextMenu(metaKey, event.nativeEvent.clientX, event.nativeEvent.clientY);
|
|
721
|
+
};
|
|
722
|
+
return (React.createElement(React.Fragment, null,
|
|
723
|
+
React.createElement("primitive", { object: pathRoot },
|
|
724
|
+
React.createElement("primitive", { object: line, onClick: handlePathClick, onContextMenu: handlePathContextMenu }),
|
|
725
|
+
React.createElement("primitive", { object: marker, onClick: handlePathClick, onContextMenu: handlePathContextMenu }),
|
|
726
|
+
React.createElement("primitive", { object: arrows }),
|
|
727
|
+
React.createElement("primitive", { object: originMarker }),
|
|
728
|
+
editing &&
|
|
729
|
+
!hidden &&
|
|
730
|
+
entries.map((entry) => (React.createElement("mesh", { key: entry.key, ref: (node) => {
|
|
731
|
+
if (node) {
|
|
732
|
+
pointNodesRef.current.set(entry.key, node);
|
|
733
|
+
registerEditorOnly(node);
|
|
734
|
+
}
|
|
735
|
+
else {
|
|
736
|
+
pointNodesRef.current.delete(entry.key);
|
|
737
|
+
}
|
|
738
|
+
}, position: [entry.position.x, entry.position.y, entry.position.z], onClick: selectPoint(entry.key), renderOrder: 20 },
|
|
739
|
+
React.createElement("circleGeometry", { args: [0.5, 24] }),
|
|
740
|
+
React.createElement("meshBasicMaterial", { color: entry.key === selectedKey ? '#ffffff' : color, toneMapped: false, side: DoubleSide, depthTest: false, transparent: true })))),
|
|
741
|
+
editing && !hidden && selectedEntry && handles && (React.createElement(React.Fragment, null,
|
|
742
|
+
React.createElement("primitive", { object: handleLineL }),
|
|
743
|
+
React.createElement("primitive", { object: handleLineR }),
|
|
744
|
+
['left', 'right'].map((side) => {
|
|
745
|
+
const h = handles[side];
|
|
746
|
+
const p = selectedEntry.position;
|
|
747
|
+
return (React.createElement("mesh", { key: side, ref: (node) => {
|
|
748
|
+
handleNodesRef.current[side] = node;
|
|
749
|
+
if (node)
|
|
750
|
+
registerEditorOnly(node);
|
|
751
|
+
}, position: [p.x + h.x, p.y + h.y, p.z + h.z], onPointerDown: startHandleDrag(side), renderOrder: 20 },
|
|
752
|
+
React.createElement("sphereGeometry", { args: [0.5, 16, 12] }),
|
|
753
|
+
React.createElement("meshBasicMaterial", { color: color, toneMapped: false, depthTest: false, transparent: true })));
|
|
754
|
+
})))),
|
|
755
|
+
editing && !hidden && !grabActive && gizmoTarget && (React.createElement(TransformControls, { ref: (controls) => {
|
|
756
|
+
pointGizmoRef.current = controls;
|
|
757
|
+
// 箭头本体登记为"仅编辑视角":画中画/镜头视角渲染时不入画。
|
|
758
|
+
// three 0.185 的 TransformControls 不是 Object3D,可视部分在 getHelper()
|
|
759
|
+
if (!controls)
|
|
760
|
+
return;
|
|
761
|
+
const root = typeof controls.getHelper === 'function'
|
|
762
|
+
? controls.getHelper()
|
|
763
|
+
: controls;
|
|
764
|
+
return registerEditorOnly(root);
|
|
765
|
+
}, object: gizmoTarget, mode: "translate", onMouseDown: onGizmoDown, onObjectChange: onGizmoChange, onMouseUp: onGizmoUp }))));
|
|
766
|
+
}
|
|
767
|
+
// ---------------------------------------------------------------------------
|
|
768
|
+
// 路径编辑模式的工具浮条:加点/删点。点级操作的家——全局菜单不出现
|
|
769
|
+
// 这些(见菜单设计文档)。选中点的数值/锚点编辑在它下面的 PathPointEditor。
|
|
770
|
+
export function PathEditBar({ hasSelection, onAddPoint, onDeleteSelected, }) {
|
|
771
|
+
const btn = (disabled) => ({
|
|
772
|
+
padding: '3px 10px',
|
|
773
|
+
borderRadius: 4,
|
|
774
|
+
border: '1px solid #555',
|
|
775
|
+
background: 'transparent',
|
|
776
|
+
color: disabled ? '#777' : '#eee',
|
|
777
|
+
cursor: disabled ? 'default' : 'pointer',
|
|
778
|
+
fontSize: 12,
|
|
779
|
+
});
|
|
780
|
+
return (React.createElement("div", { style: {
|
|
781
|
+
position: 'absolute',
|
|
782
|
+
top: 56,
|
|
783
|
+
left: '50%',
|
|
784
|
+
transform: 'translateX(-50%)',
|
|
785
|
+
zIndex: 11,
|
|
786
|
+
display: 'flex',
|
|
787
|
+
alignItems: 'center',
|
|
788
|
+
gap: 8,
|
|
789
|
+
padding: '6px 12px',
|
|
790
|
+
background: '#272730',
|
|
791
|
+
border: '1px solid #444',
|
|
792
|
+
borderRadius: 6,
|
|
793
|
+
fontSize: 12,
|
|
794
|
+
color: '#eee',
|
|
795
|
+
} },
|
|
796
|
+
React.createElement("button", { style: btn(false), onClick: onAddPoint, title: "\u5728\u8DEF\u5F84\u672B\u5C3E\u7EED\u4E00\u4E2A\u63A7\u5236\u70B9" }, "\u52A0\u70B9"),
|
|
797
|
+
React.createElement("button", { style: btn(!hasSelection), disabled: !hasSelection, onClick: onDeleteSelected, title: hasSelection ? '删除选中的控制点' : '先点选一个控制点' }, "\u5220\u9664\u9009\u4E2D\u70B9")));
|
|
798
|
+
}
|
|
799
|
+
// ---------------------------------------------------------------------------
|
|
800
|
+
// 数值浮条:编辑模式下选中控制点时的 X/Y/Z 数字输入(Blender N 面板的对应物),
|
|
801
|
+
// 外加进度锚点 u 的微调(不改路径形状、只改这个点在全程进度中的位置 =
|
|
802
|
+
// 局部变速)和"钉到播放头"(抵达时间变成时间轴上的标准关键帧)
|
|
803
|
+
/** 关键帧值和锚点判定"对得上"的容差(钉的时候写的就是锚点值,浮点直比即可) */
|
|
804
|
+
const PIN_MATCH_EPS = 5e-4;
|
|
805
|
+
/** 一次输入提交 = 一步撤销;非法输入直接丢弃回显当前值 */
|
|
806
|
+
export function PathPointEditor({ sheet, metaKey, pointKey, onPinAtPlayhead, progressKeyframes, }) {
|
|
807
|
+
const meta = useMemo(() => getPathMeta(sheet, metaKey), [sheet, metaKey]);
|
|
808
|
+
const entries = usePathPointEntries(meta);
|
|
809
|
+
const curve = useMemo(() => buildCurve(entries), [entries]);
|
|
810
|
+
const us = useMemo(() => effectiveUs(entries, curve), [entries, curve]);
|
|
811
|
+
const idx = entries.findIndex((e) => e.key === pointKey);
|
|
812
|
+
const entry = idx >= 0 ? entries[idx] : undefined;
|
|
813
|
+
if (!entry)
|
|
814
|
+
return null;
|
|
815
|
+
// 端点锚点恒为 0/1(路径首尾的语义),只有中间点开放微调
|
|
816
|
+
const isMiddle = idx > 0 && idx < entries.length - 1;
|
|
817
|
+
const uEffective = us[idx] ?? 0;
|
|
818
|
+
const pinnedTimes = (progressKeyframes ?? [])
|
|
819
|
+
.filter((k) => Math.abs(k.value - uEffective) < PIN_MATCH_EPS)
|
|
820
|
+
.map((k) => k.position);
|
|
821
|
+
const commitU = (v) => {
|
|
822
|
+
const studio = getStudioSync();
|
|
823
|
+
if (!studio)
|
|
824
|
+
return;
|
|
825
|
+
const scrub = studio.scrub();
|
|
826
|
+
scrub.capture(({ set }) => set(meta.props.points, serializePathPoints(withMovedU(entries, pointKey, v, curve))));
|
|
827
|
+
scrub.commit();
|
|
828
|
+
};
|
|
829
|
+
const resetU = () => {
|
|
830
|
+
const studio = getStudioSync();
|
|
831
|
+
if (!studio)
|
|
832
|
+
return;
|
|
833
|
+
const scrub = studio.scrub();
|
|
834
|
+
scrub.capture(({ set }) => set(meta.props.points, serializePathPoints(withResetU(entries, pointKey))));
|
|
835
|
+
scrub.commit();
|
|
836
|
+
};
|
|
837
|
+
return (React.createElement("div", { style: {
|
|
838
|
+
position: 'absolute',
|
|
839
|
+
top: 96,
|
|
840
|
+
left: '50%',
|
|
841
|
+
transform: 'translateX(-50%)',
|
|
842
|
+
zIndex: 11,
|
|
843
|
+
display: 'flex',
|
|
844
|
+
alignItems: 'center',
|
|
845
|
+
gap: 8,
|
|
846
|
+
padding: '6px 12px',
|
|
847
|
+
background: '#272730',
|
|
848
|
+
border: '1px solid #444',
|
|
849
|
+
borderRadius: 6,
|
|
850
|
+
fontSize: 12,
|
|
851
|
+
color: '#eee',
|
|
852
|
+
} },
|
|
853
|
+
React.createElement("span", { style: { color: '#999' } },
|
|
854
|
+
pathLabel(metaKey),
|
|
855
|
+
" \u00B7 ",
|
|
856
|
+
pointKey),
|
|
857
|
+
['x', 'y', 'z'].map((axis) => (React.createElement(AxisInput, { key: axis, axis: axis, value: entry.position[axis], onCommit: (v) => {
|
|
858
|
+
const studio = getStudioSync();
|
|
859
|
+
if (!studio)
|
|
860
|
+
return;
|
|
861
|
+
const scrub = studio.scrub();
|
|
862
|
+
scrub.capture(({ set }) => set(meta.props.points, serializePathPoints(withMovedPoint(entries, pointKey, {
|
|
863
|
+
...entry.position,
|
|
864
|
+
[axis]: v,
|
|
865
|
+
}))));
|
|
866
|
+
scrub.commit();
|
|
867
|
+
} }))),
|
|
868
|
+
isMiddle && (React.createElement(NumberInput, { label: "\u8FDB\u5EA6", title: "\u8FDB\u5EA6\u951A\u70B9(0~1):\u884C\u8FDB\u8FDB\u5EA6\u8D70\u5230\u8FD9\u4E2A\u503C\u65F6\u76F8\u673A\u6B63\u597D\u8FC7\u8FD9\u4E2A\u70B9;\u6539\u5B83\u4E0D\u6539\u8DEF\u5F84\u5F62\u72B6,\u53EA\u6539\u8282\u594F(\u5C40\u90E8\u53D8\u901F)", value: Math.round(uEffective * 1000) / 1000, step: 0.01, width: 56, onCommit: commitU })),
|
|
869
|
+
isMiddle && entry.u !== undefined && (React.createElement("button", { onClick: resetU, title: "\u6E05\u6389\u624B\u52A8\u951A\u70B9,\u56DE\u5230\u81EA\u52A8(\u5F27\u957F\u7B49\u6BD4)", style: {
|
|
870
|
+
background: 'transparent',
|
|
871
|
+
border: '1px solid #555',
|
|
872
|
+
borderRadius: 4,
|
|
873
|
+
color: '#bbb',
|
|
874
|
+
cursor: 'pointer',
|
|
875
|
+
fontSize: 11,
|
|
876
|
+
padding: '2px 6px',
|
|
877
|
+
} }, "\u81EA\u52A8")),
|
|
878
|
+
onPinAtPlayhead && (React.createElement("button", { onClick: () => onPinAtPlayhead(uEffective), title: "\u5728\u5F53\u524D\u64AD\u653E\u5934\u65F6\u95F4\u7ED9\u884C\u8FDB\u8FDB\u5EA6\u6253\u4E00\u4E2A\u503C=\u8BE5\u70B9\u951A\u70B9\u7684\u5173\u952E\u5E27:\u8FD9\u4E2A\u70B9\u7684\u62B5\u8FBE\u65F6\u95F4\u5C31\u6B64\u4E0A\u65F6\u95F4\u8F74,\u62D6\u5173\u952E\u5E27\u5373\u6539\u65F6\u95F4", style: {
|
|
879
|
+
background: '#3a4a66',
|
|
880
|
+
border: '1px solid #557',
|
|
881
|
+
borderRadius: 4,
|
|
882
|
+
color: '#cfe1ff',
|
|
883
|
+
cursor: 'pointer',
|
|
884
|
+
fontSize: 11,
|
|
885
|
+
padding: '2px 8px',
|
|
886
|
+
} }, "\u9489\u5230\u64AD\u653E\u5934")),
|
|
887
|
+
pinnedTimes.length > 0 && (React.createElement("span", { style: { color: '#9fb8dd' } },
|
|
888
|
+
"\u5DF2\u9489:",
|
|
889
|
+
pinnedTimes.map((t) => `t=${t.toFixed(2)}s`).join('、')))));
|
|
890
|
+
}
|
|
891
|
+
function AxisInput({ axis, value, onCommit, }) {
|
|
892
|
+
return (React.createElement(NumberInput, { label: axis, title: "\u63A7\u5236\u70B9\u7684\u5C40\u90E8\u5750\u6807(\u76F8\u5BF9\u8DEF\u5F84\u539F\u70B9);\u6574\u4F53\u632A\u8DEF\u5F84\u7528\u5BF9\u8C61\u6A21\u5F0F\u7684\u4F4D\u7F6E\u5C5E\u6027/\u79FB\u52A8\u7BAD\u5934", value: value, step: 0.1, width: 72, onCommit: onCommit }));
|
|
893
|
+
}
|
|
894
|
+
/** 通用数值输入:未聚焦显示外部值(拖箭头/撤销实时反映),聚焦后是本地草稿,回车/失焦提交 */
|
|
895
|
+
function NumberInput({ label, title, value, step, width, onCommit, }) {
|
|
896
|
+
const [draft, setDraft] = useState(null);
|
|
897
|
+
const shown = draft ?? String(Math.round(value * 1000) / 1000);
|
|
898
|
+
const commit = () => {
|
|
899
|
+
if (draft !== null) {
|
|
900
|
+
const v = Number(draft);
|
|
901
|
+
if (Number.isFinite(v) && v !== value)
|
|
902
|
+
onCommit(v);
|
|
903
|
+
}
|
|
904
|
+
setDraft(null);
|
|
905
|
+
};
|
|
906
|
+
return (React.createElement("label", { title: title, style: { display: 'flex', alignItems: 'center', gap: 4 } },
|
|
907
|
+
React.createElement("span", { style: { color: '#999', textTransform: 'uppercase' } }, label),
|
|
908
|
+
React.createElement("input", { type: "number", step: step, value: shown, onFocus: () => setDraft(shown), onChange: (e) => setDraft(e.target.value), onBlur: commit, onKeyDown: (e) => {
|
|
909
|
+
if (e.key === 'Enter')
|
|
910
|
+
e.target.blur();
|
|
911
|
+
}, style: {
|
|
912
|
+
width,
|
|
913
|
+
background: '#1b1b22',
|
|
914
|
+
border: '1px solid #444',
|
|
915
|
+
borderRadius: 4,
|
|
916
|
+
color: '#eee',
|
|
917
|
+
fontSize: 12,
|
|
918
|
+
padding: '3px 6px',
|
|
919
|
+
} })));
|
|
920
|
+
}
|