@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,394 @@
|
|
|
1
|
+
import { Matrix4, Quaternion, Vector3 } from 'three';
|
|
2
|
+
import { autoHandles, buildCurve, buildLinePositions, composePathMatrix, directionArrowMatrices, effectiveHandles, effectiveUs, extendPathPoint, IDENTITY_PATH_TRANSFORM, nextPointKey, parsePathPoints, sampleEntries, seedArcPoints, serializePathPoints, withDraggedHandle, withMovedPoint, withMovedU, withResetU, } from './pathModel';
|
|
3
|
+
const pt = (key, x, y = 0, z = 0) => ({
|
|
4
|
+
key,
|
|
5
|
+
position: { x, y, z },
|
|
6
|
+
});
|
|
7
|
+
describe('parsePathPoints / serializePathPoints', () => {
|
|
8
|
+
it('往返一致(含手柄)', () => {
|
|
9
|
+
const entries = [
|
|
10
|
+
{ key: 'P1', position: { x: 1, y: 2, z: 3 } },
|
|
11
|
+
{
|
|
12
|
+
key: 'P2',
|
|
13
|
+
position: { x: -1, y: 0, z: 0.5 },
|
|
14
|
+
handles: { left: { x: -0.5, y: 0, z: 0 }, right: { x: 0.5, y: 0, z: 0 } },
|
|
15
|
+
},
|
|
16
|
+
];
|
|
17
|
+
expect(parsePathPoints(serializePathPoints(entries))).toEqual(entries);
|
|
18
|
+
});
|
|
19
|
+
it('坏 JSON / 非数组 / 缺字段都当空名单', () => {
|
|
20
|
+
expect(parsePathPoints('not json')).toEqual([]);
|
|
21
|
+
expect(parsePathPoints('{"a":1}')).toEqual([]);
|
|
22
|
+
expect(parsePathPoints('[{"key":"P1"}]')).toEqual([]);
|
|
23
|
+
expect(parsePathPoints('[{"key":"P1","position":{"x":1,"y":"bad","z":3}}]')).toEqual([]);
|
|
24
|
+
});
|
|
25
|
+
it('坏手柄被丢弃(回自动),点本身保留', () => {
|
|
26
|
+
const parsed = parsePathPoints('[{"key":"P1","position":{"x":1,"y":2,"z":3},"handles":{"left":{"x":"bad"}}}]');
|
|
27
|
+
expect(parsed).toEqual([{ key: 'P1', position: { x: 1, y: 2, z: 3 } }]);
|
|
28
|
+
});
|
|
29
|
+
it('进度锚点 u 往返一致;坏 u 丢弃,越界夹回 0~1', () => {
|
|
30
|
+
const parsed = parsePathPoints('[{"key":"P1","position":{"x":0,"y":0,"z":0},"u":0.3},' +
|
|
31
|
+
'{"key":"P2","position":{"x":1,"y":0,"z":0},"u":"bad"},' +
|
|
32
|
+
'{"key":"P3","position":{"x":2,"y":0,"z":0},"u":7}]');
|
|
33
|
+
expect(parsed[0].u).toBe(0.3);
|
|
34
|
+
expect(parsed[1].u).toBeUndefined();
|
|
35
|
+
expect(parsed[2].u).toBe(1);
|
|
36
|
+
// 显式 u 序列化后再读回来不变
|
|
37
|
+
const round = parsePathPoints(serializePathPoints(parsed));
|
|
38
|
+
expect(round[0].u).toBe(0.3);
|
|
39
|
+
expect(round[2].u).toBe(1);
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
describe('nextPointKey', () => {
|
|
43
|
+
it('空名单从 P1 开始', () => {
|
|
44
|
+
expect(nextPointKey([])).toBe('P1');
|
|
45
|
+
});
|
|
46
|
+
it('取最大编号 +1,删过的号不复用', () => {
|
|
47
|
+
expect(nextPointKey([pt('P1', 0), pt('P3', 0)])).toBe('P4');
|
|
48
|
+
});
|
|
49
|
+
it('忽略不符合命名规范的 key', () => {
|
|
50
|
+
expect(nextPointKey([{ key: 'foo', position: { x: 0, y: 0, z: 0 } }])).toBe('P1');
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
describe('seedArcPoints', () => {
|
|
54
|
+
it('三个点,起点就是当前机位', () => {
|
|
55
|
+
const [p0, p1, p2] = seedArcPoints({ x: 8, y: 3, z: 0 }, { x: 0, y: 0, z: 0 });
|
|
56
|
+
expect(p0).toEqual({ x: 8, y: 3, z: 0 });
|
|
57
|
+
// 绕 Y 轴转 60° 后离目标距离不变
|
|
58
|
+
const r0 = Math.hypot(8, 0);
|
|
59
|
+
const r2 = Math.hypot(p2.x, p2.z);
|
|
60
|
+
expect(r2).toBeCloseTo(r0, 5);
|
|
61
|
+
// 中点向外鼓:离目标比首尾连线的中点更远
|
|
62
|
+
const midDist = Math.hypot((8 + p2.x) / 2, (0 + p2.z) / 2);
|
|
63
|
+
expect(Math.hypot(p1.x, p1.z)).toBeGreaterThan(midDist);
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
describe('extendPathPoint', () => {
|
|
67
|
+
it('沿最后一段方向延伸等长', () => {
|
|
68
|
+
expect(extendPathPoint([pt('P1', 0), pt('P2', 1, 2, 3)])).toEqual({
|
|
69
|
+
x: 2,
|
|
70
|
+
y: 4,
|
|
71
|
+
z: 6,
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
it('只有一个点时往 +x 挪 2', () => {
|
|
75
|
+
expect(extendPathPoint([pt('P1', 5, 1, 1)])).toEqual({ x: 7, y: 1, z: 1 });
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
describe('autoHandles / effectiveHandles', () => {
|
|
79
|
+
it('中间点:两侧等长共线,方向沿前后点差分', () => {
|
|
80
|
+
const h = autoHandles([
|
|
81
|
+
{ x: 0, y: 0, z: 0 },
|
|
82
|
+
{ x: 3, y: 0, z: 0 },
|
|
83
|
+
{ x: 3, y: 6, z: 0 },
|
|
84
|
+
], 1);
|
|
85
|
+
// 差分 (3,6,0)/6 = (0.5,1,0)
|
|
86
|
+
expect(h.right).toEqual({ x: 0.5, y: 1, z: 0 });
|
|
87
|
+
expect(h.left).toEqual({ x: -0.5, y: -1, z: 0 });
|
|
88
|
+
});
|
|
89
|
+
it('端点:单侧差分的 1/3,另一侧镜像', () => {
|
|
90
|
+
const positions = [
|
|
91
|
+
{ x: 0, y: 0, z: 0 },
|
|
92
|
+
{ x: 3, y: 0, z: 0 },
|
|
93
|
+
{ x: 6, y: 0, z: 0 },
|
|
94
|
+
];
|
|
95
|
+
const first = autoHandles(positions, 0);
|
|
96
|
+
expect(first.right).toEqual({ x: 1, y: 0, z: 0 });
|
|
97
|
+
expect(first.left).toEqual({ x: -1, y: 0, z: 0 });
|
|
98
|
+
const last = autoHandles(positions, 2);
|
|
99
|
+
expect(last.left).toEqual({ x: -1, y: 0, z: 0 });
|
|
100
|
+
expect(last.right).toEqual({ x: 1, y: 0, z: 0 });
|
|
101
|
+
});
|
|
102
|
+
it('有手动手柄时优先手动', () => {
|
|
103
|
+
const manual = { left: { x: -2, y: 0, z: 0 }, right: { x: 2, y: 0, z: 0 } };
|
|
104
|
+
const entries = [{ ...pt('P1', 0), handles: manual }, pt('P2', 5)];
|
|
105
|
+
expect(effectiveHandles(entries, 0)).toBe(manual);
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
describe('withMovedPoint', () => {
|
|
109
|
+
it('只换位置,手柄偏移原样保留(跟着点走)', () => {
|
|
110
|
+
const handles = { left: { x: -1, y: 0, z: 0 }, right: { x: 1, y: 0, z: 0 } };
|
|
111
|
+
const entries = [{ ...pt('P1', 0), handles }, pt('P2', 5)];
|
|
112
|
+
const next = withMovedPoint(entries, 'P1', { x: 1, y: 1, z: 1 });
|
|
113
|
+
expect(next[0]).toEqual({ key: 'P1', position: { x: 1, y: 1, z: 1 }, handles });
|
|
114
|
+
expect(next[1]).toBe(entries[1]);
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
describe('withDraggedHandle', () => {
|
|
118
|
+
it('自动点一拖变手动:被拖侧取新值,另一侧镜像方向、保留自动长度', () => {
|
|
119
|
+
// P2 的自动切线:差分 (P3-P1)/6 = (1,0,0),左长 1 右长 1
|
|
120
|
+
const entries = [pt('P1', 0), pt('P2', 3), pt('P3', 6)];
|
|
121
|
+
const next = withDraggedHandle(entries, 'P2', 'right', { x: 0, y: 2, z: 0 });
|
|
122
|
+
const h = next[1].handles;
|
|
123
|
+
expect(h.right).toEqual({ x: 0, y: 2, z: 0 });
|
|
124
|
+
// 左侧镜像到 (0,-1,0) 方向,长度保留自动值 1
|
|
125
|
+
expect(h.left.x).toBeCloseTo(0, 6);
|
|
126
|
+
expect(h.left.y).toBeCloseTo(-1, 6);
|
|
127
|
+
expect(h.left.z).toBeCloseTo(0, 6);
|
|
128
|
+
});
|
|
129
|
+
it('手动点再拖:另一侧长度保留手动值', () => {
|
|
130
|
+
const entries = [
|
|
131
|
+
pt('P1', 0),
|
|
132
|
+
{
|
|
133
|
+
...pt('P2', 3),
|
|
134
|
+
handles: { left: { x: -4, y: 0, z: 0 }, right: { x: 4, y: 0, z: 0 } },
|
|
135
|
+
},
|
|
136
|
+
pt('P3', 6),
|
|
137
|
+
];
|
|
138
|
+
const next = withDraggedHandle(entries, 'P2', 'left', { x: 0, y: 1, z: 0 });
|
|
139
|
+
const h = next[1].handles;
|
|
140
|
+
expect(h.left).toEqual({ x: 0, y: 1, z: 0 });
|
|
141
|
+
// 右侧镜像到 (0,-4,0):长度保留 4
|
|
142
|
+
expect(h.right.x).toBeCloseTo(0, 6);
|
|
143
|
+
expect(h.right.y).toBeCloseTo(-4, 6);
|
|
144
|
+
});
|
|
145
|
+
it('找不到 key 时原样返回副本', () => {
|
|
146
|
+
const entries = [pt('P1', 0), pt('P2', 3)];
|
|
147
|
+
const next = withDraggedHandle(entries, 'PX', 'left', { x: 1, y: 0, z: 0 });
|
|
148
|
+
expect(next).toEqual(entries);
|
|
149
|
+
expect(next).not.toBe(entries);
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
describe('effectiveUs / 锚点采样', () => {
|
|
153
|
+
const out = new Vector3();
|
|
154
|
+
it('无显式锚点:端点 0/1,单调,与弧长等比采样结果一致', () => {
|
|
155
|
+
const entries = [pt('P1', 0), pt('P2', 3, 4, 0), pt('P3', 6, 4, 0)];
|
|
156
|
+
const us = effectiveUs(entries);
|
|
157
|
+
expect(us[0]).toBe(0);
|
|
158
|
+
expect(us[2]).toBe(1);
|
|
159
|
+
expect(us[1]).toBeGreaterThan(0);
|
|
160
|
+
expect(us[1]).toBeLessThan(1);
|
|
161
|
+
// 全部自动时和旧的全程弧长采样一致(弧长是数值近似,两者细分档不同,放到小数点后 3 位)
|
|
162
|
+
const curve = buildCurve(entries);
|
|
163
|
+
for (const p of [0, 0.25, 0.5, 0.75, 1]) {
|
|
164
|
+
const legacy = curve.getPointAt(p);
|
|
165
|
+
sampleEntries(entries, p, out);
|
|
166
|
+
expect(out.x).toBeCloseTo(legacy.x, 3);
|
|
167
|
+
expect(out.y).toBeCloseTo(legacy.y, 3);
|
|
168
|
+
expect(out.z).toBeCloseTo(legacy.z, 3);
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
it('显式锚点生效:进度=u 时正好落在该点上,其余点自动插值', () => {
|
|
172
|
+
// 共线四点,弧长分数本来是 0, 1/3, 2/3, 1;把 P2 钉到 0.5
|
|
173
|
+
const entries = [
|
|
174
|
+
pt('P1', 0),
|
|
175
|
+
{ ...pt('P2', 1), u: 0.5 },
|
|
176
|
+
pt('P3', 2),
|
|
177
|
+
pt('P4', 3),
|
|
178
|
+
];
|
|
179
|
+
const us = effectiveUs(entries);
|
|
180
|
+
expect(us[1]).toBe(0.5);
|
|
181
|
+
// P3 在锚点 P2(0.5) 和终点(1) 之间按弧长比例:(2-1)/(3-1)=0.5 → 0.75
|
|
182
|
+
expect(us[2]).toBeCloseTo(0.75, 6);
|
|
183
|
+
// 进度 0.5 正好过 P2
|
|
184
|
+
sampleEntries(entries, 0.5, out);
|
|
185
|
+
expect(out.x).toBeCloseTo(1, 6);
|
|
186
|
+
// 进度 0.75 正好过 P3
|
|
187
|
+
sampleEntries(entries, 0.75, out);
|
|
188
|
+
expect(out.x).toBeCloseTo(2, 6);
|
|
189
|
+
// 0.25 落在 P1→P2 段中点(局部弧长一半)
|
|
190
|
+
sampleEntries(entries, 0.25, out);
|
|
191
|
+
expect(out.x).toBeCloseTo(0.5, 3);
|
|
192
|
+
});
|
|
193
|
+
it('违反单调的显式锚点被夹到前锚点值', () => {
|
|
194
|
+
const entries = [
|
|
195
|
+
pt('P1', 0),
|
|
196
|
+
{ ...pt('P2', 1), u: 0.6 },
|
|
197
|
+
{ ...pt('P3', 2), u: 0.2 },
|
|
198
|
+
pt('P4', 3),
|
|
199
|
+
];
|
|
200
|
+
const us = effectiveUs(entries);
|
|
201
|
+
expect(us[1]).toBe(0.6);
|
|
202
|
+
expect(us[2]).toBe(0.6);
|
|
203
|
+
// 夹出来的零宽段采样不炸,连续过渡
|
|
204
|
+
sampleEntries(entries, 0.6, out);
|
|
205
|
+
expect(Number.isFinite(out.x)).toBe(true);
|
|
206
|
+
});
|
|
207
|
+
it('withMovedU:写入并夹在相邻锚点之间;端点不可调', () => {
|
|
208
|
+
const entries = [pt('P1', 0), pt('P2', 1), pt('P3', 2)];
|
|
209
|
+
const next = withMovedU(entries, 'P2', 0.9);
|
|
210
|
+
expect(next[1].u).toBeCloseTo(0.9, 6);
|
|
211
|
+
// 超过右邻(1)被夹回
|
|
212
|
+
const clamped = withMovedU(entries, 'P2', 5);
|
|
213
|
+
expect(clamped[1].u).toBeLessThan(1);
|
|
214
|
+
// 端点不动
|
|
215
|
+
expect(withMovedU(entries, 'P1', 0.5)[0].u).toBeUndefined();
|
|
216
|
+
});
|
|
217
|
+
it('withResetU:清掉显式锚点回自动', () => {
|
|
218
|
+
const entries = [pt('P1', 0), { ...pt('P2', 1), u: 0.5 }, pt('P3', 2)];
|
|
219
|
+
const next = withResetU(entries, 'P2');
|
|
220
|
+
expect(next[1].u).toBeUndefined();
|
|
221
|
+
// 其他点不动,无 u 的点返回原引用
|
|
222
|
+
expect(next[0]).toBe(entries[0]);
|
|
223
|
+
});
|
|
224
|
+
});
|
|
225
|
+
describe('sampleEntries / sampleCurve', () => {
|
|
226
|
+
const out = new Vector3();
|
|
227
|
+
it('0 个点返回 false(调用方回退手动)', () => {
|
|
228
|
+
expect(sampleEntries([], 0.5, out)).toBe(false);
|
|
229
|
+
});
|
|
230
|
+
it('1 个点时任何进度都取它(单点路径)', () => {
|
|
231
|
+
const entries = [pt('P1', 1, 2, 3)];
|
|
232
|
+
for (const u of [0, 0.3, 1]) {
|
|
233
|
+
expect(sampleEntries(entries, u, out)).toBe(true);
|
|
234
|
+
expect(out.x).toBe(1);
|
|
235
|
+
expect(out.y).toBe(2);
|
|
236
|
+
expect(out.z).toBe(3);
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
it('进度越界被夹到 0..1', () => {
|
|
240
|
+
const entries = [pt('P1', 0), pt('P2', 10)];
|
|
241
|
+
sampleEntries(entries, -1, out);
|
|
242
|
+
expect(out.x).toBeCloseTo(0, 5);
|
|
243
|
+
sampleEntries(entries, 2, out);
|
|
244
|
+
expect(out.x).toBeCloseTo(10, 5);
|
|
245
|
+
});
|
|
246
|
+
it('弧长等比:两段不等长时,u=0.5 落在全长一半处', () => {
|
|
247
|
+
// 共线三点 (0,0,0)->(1,0,0)->(11,0,0):第一段长 1,第二段长 10,全长 11
|
|
248
|
+
// 共线时自动手柄也共线,曲线不偏离 x 轴
|
|
249
|
+
const entries = [pt('P1', 0), pt('P2', 1), pt('P3', 11)];
|
|
250
|
+
sampleEntries(entries, 0.5, out);
|
|
251
|
+
// 弧长一半 = 5.5,落在第二段上 x≈5.5(弧长映射是数值近似,放宽到 0.5)
|
|
252
|
+
expect(out.x).toBeGreaterThan(4.5);
|
|
253
|
+
expect(out.x).toBeLessThan(6.5);
|
|
254
|
+
// 若是参数等比(getPoint),u=0.5 会落在两段参数的分界 x≈1 附近
|
|
255
|
+
expect(out.x).toBeGreaterThan(2);
|
|
256
|
+
});
|
|
257
|
+
it('手动手柄改变曲线形状(拉出鼓包)', () => {
|
|
258
|
+
// 两个点一条直线段,把两端手柄都往 +y 拉,中点应明显抬离 x 轴
|
|
259
|
+
const entries = [
|
|
260
|
+
{
|
|
261
|
+
...pt('P1', 0),
|
|
262
|
+
handles: { left: { x: 0, y: 4, z: 0 }, right: { x: 0, y: 4, z: 0 } },
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
...pt('P2', 10),
|
|
266
|
+
handles: { left: { x: 0, y: 4, z: 0 }, right: { x: 0, y: 4, z: 0 } },
|
|
267
|
+
},
|
|
268
|
+
];
|
|
269
|
+
sampleEntries(entries, 0.5, out);
|
|
270
|
+
expect(out.y).toBeGreaterThan(2);
|
|
271
|
+
});
|
|
272
|
+
});
|
|
273
|
+
describe('buildLinePositions', () => {
|
|
274
|
+
it('不足两个点返回 0', () => {
|
|
275
|
+
const buf = new Float32Array(30);
|
|
276
|
+
expect(buildLinePositions([pt('P1', 0)], buf)).toBe(0);
|
|
277
|
+
expect(buildLinePositions([], buf)).toBe(0);
|
|
278
|
+
});
|
|
279
|
+
it('顶点数随缓冲自适应,不溢出,首尾是路径端点', () => {
|
|
280
|
+
const buf = new Float32Array(33 * 3);
|
|
281
|
+
const entries = [pt('P1', 0), pt('P2', 1), pt('P3', 2)];
|
|
282
|
+
const n = buildLinePositions(entries, buf);
|
|
283
|
+
expect(n).toBeLessThanOrEqual(33);
|
|
284
|
+
expect(n).toBeGreaterThan(3);
|
|
285
|
+
expect(buf[0]).toBeCloseTo(0, 5);
|
|
286
|
+
expect(buf[(n - 1) * 3]).toBeCloseTo(2, 5);
|
|
287
|
+
});
|
|
288
|
+
it('点多时每段细分自动降档,仍然不溢出', () => {
|
|
289
|
+
const buf = new Float32Array(64 * 3);
|
|
290
|
+
const entries = Array.from({ length: 20 }, (_, i) => pt(`P${i + 1}`, i));
|
|
291
|
+
const n = buildLinePositions(entries, buf);
|
|
292
|
+
expect(n).toBeLessThanOrEqual(64);
|
|
293
|
+
expect(buf[0]).toBeCloseTo(0, 5);
|
|
294
|
+
expect(buf[(n - 1) * 3]).toBeCloseTo(19, 5);
|
|
295
|
+
});
|
|
296
|
+
});
|
|
297
|
+
describe('buildCurve', () => {
|
|
298
|
+
it('不足两个点返回 null', () => {
|
|
299
|
+
expect(buildCurve([])).toBeNull();
|
|
300
|
+
expect(buildCurve([pt('P1', 0)])).toBeNull();
|
|
301
|
+
});
|
|
302
|
+
});
|
|
303
|
+
describe('composePathMatrix(路径整体变换)', () => {
|
|
304
|
+
const tr = (over) => ({
|
|
305
|
+
position: { x: 0, y: 0, z: 0 },
|
|
306
|
+
rotation: { x: 0, y: 0, z: 0 },
|
|
307
|
+
scale: { x: 1, y: 1, z: 1 },
|
|
308
|
+
...over,
|
|
309
|
+
});
|
|
310
|
+
const apply = (t, x, y, z) => new Vector3(x, y, z).applyMatrix4(composePathMatrix(t, new Matrix4()));
|
|
311
|
+
it('单位变换:局部 = 世界(老场景无缝过渡)', () => {
|
|
312
|
+
const p = apply(IDENTITY_PATH_TRANSFORM, 8, 4.5, -2);
|
|
313
|
+
expect(p.x).toBeCloseTo(8, 10);
|
|
314
|
+
expect(p.y).toBeCloseTo(4.5, 10);
|
|
315
|
+
expect(p.z).toBeCloseTo(-2, 10);
|
|
316
|
+
});
|
|
317
|
+
it('平移:所有点统一位移', () => {
|
|
318
|
+
const p = apply(tr({ position: { x: 2, y: -1, z: 0.5 } }), 8, 4.5, -2);
|
|
319
|
+
expect(p.x).toBeCloseTo(10, 10);
|
|
320
|
+
expect(p.y).toBeCloseTo(3.5, 10);
|
|
321
|
+
expect(p.z).toBeCloseTo(-1.5, 10);
|
|
322
|
+
});
|
|
323
|
+
it('绕 Y 转 90°:+x 轴转到 -z 轴', () => {
|
|
324
|
+
const p = apply(tr({ rotation: { x: 0, y: Math.PI / 2, z: 0 } }), 1, 0, 0);
|
|
325
|
+
expect(p.x).toBeCloseTo(0, 10);
|
|
326
|
+
expect(p.z).toBeCloseTo(-1, 10);
|
|
327
|
+
});
|
|
328
|
+
it('组合顺序 = 缩放→旋转→平移(同 three 的 Object3D)', () => {
|
|
329
|
+
const p = apply(tr({
|
|
330
|
+
position: { x: 10, y: 0, z: 0 },
|
|
331
|
+
rotation: { x: 0, y: Math.PI / 2, z: 0 },
|
|
332
|
+
scale: { x: 2, y: 2, z: 2 },
|
|
333
|
+
}), 1, 0, 0);
|
|
334
|
+
// (1,0,0) → 缩放 (2,0,0) → 旋转 (0,0,-2) → 平移 (10,0,-2)
|
|
335
|
+
expect(p.x).toBeCloseTo(10, 10);
|
|
336
|
+
expect(p.z).toBeCloseTo(-2, 10);
|
|
337
|
+
});
|
|
338
|
+
it('逆矩阵往返:世界→局部→世界 还原(拖拽写回靠这个)', () => {
|
|
339
|
+
const t = tr({
|
|
340
|
+
position: { x: 3, y: -1, z: 2 },
|
|
341
|
+
rotation: { x: 0.3, y: -0.7, z: 0.1 },
|
|
342
|
+
scale: { x: 2, y: 0.5, z: 1.5 },
|
|
343
|
+
});
|
|
344
|
+
const m = composePathMatrix(t, new Matrix4());
|
|
345
|
+
const inv = m.clone().invert();
|
|
346
|
+
const world = new Vector3(7, 2, -4);
|
|
347
|
+
const roundTrip = world.clone().applyMatrix4(inv).applyMatrix4(m);
|
|
348
|
+
expect(roundTrip.distanceTo(world)).toBeLessThan(1e-10);
|
|
349
|
+
});
|
|
350
|
+
});
|
|
351
|
+
describe('directionArrowMatrices(方向箭头)', () => {
|
|
352
|
+
const decompose = (m) => {
|
|
353
|
+
const pos = new Vector3();
|
|
354
|
+
const q = new Quaternion();
|
|
355
|
+
const s = new Vector3();
|
|
356
|
+
m.decompose(pos, q, s);
|
|
357
|
+
return { pos, q };
|
|
358
|
+
};
|
|
359
|
+
it('空曲线/单点 → 没有箭头', () => {
|
|
360
|
+
expect(directionArrowMatrices(null, 64)).toEqual([]);
|
|
361
|
+
expect(directionArrowMatrices(buildCurve([pt('P1', 0)]), 64)).toEqual([]);
|
|
362
|
+
});
|
|
363
|
+
it('直线沿 +x:箭头全在线上,朝向 +x(单位圆锥从 +Y 转过去)', () => {
|
|
364
|
+
const curve = buildCurve([pt('P1', 0), pt('P2', 10)]);
|
|
365
|
+
const mats = directionArrowMatrices(curve, 64);
|
|
366
|
+
// 长 10,间距 1.5 → 7 个
|
|
367
|
+
expect(mats.length).toBe(7);
|
|
368
|
+
for (const m of mats) {
|
|
369
|
+
const { pos, q } = decompose(m);
|
|
370
|
+
expect(pos.y).toBeCloseTo(0, 10);
|
|
371
|
+
expect(pos.z).toBeCloseTo(0, 10);
|
|
372
|
+
expect(pos.x).toBeGreaterThan(0);
|
|
373
|
+
expect(pos.x).toBeLessThan(10);
|
|
374
|
+
const dir = new Vector3(0, 1, 0).applyQuaternion(q);
|
|
375
|
+
expect(dir.x).toBeCloseTo(1, 5);
|
|
376
|
+
expect(dir.y).toBeCloseTo(0, 5);
|
|
377
|
+
}
|
|
378
|
+
// 沿行进方向 x 单调递增(箭头顺序 = 行进顺序)
|
|
379
|
+
for (let i = 1; i < mats.length; i++) {
|
|
380
|
+
expect(decompose(mats[i]).pos.x).toBeGreaterThan(decompose(mats[i - 1]).pos.x);
|
|
381
|
+
}
|
|
382
|
+
});
|
|
383
|
+
it('反向曲线:箭头指向反过来(-x)', () => {
|
|
384
|
+
const curve = buildCurve([pt('P1', 10), pt('P2', 0)]);
|
|
385
|
+
const { q } = decompose(directionArrowMatrices(curve, 64)[0]);
|
|
386
|
+
const dir = new Vector3(0, 1, 0).applyQuaternion(q);
|
|
387
|
+
expect(dir.x).toBeCloseTo(-1, 5);
|
|
388
|
+
});
|
|
389
|
+
it('总数不超容量上限', () => {
|
|
390
|
+
const entries = Array.from({ length: 20 }, (_, i) => pt(`P${i + 1}`, i * 5));
|
|
391
|
+
const mats = directionArrowMatrices(buildCurve(entries), 5);
|
|
392
|
+
expect(mats.length).toBe(5);
|
|
393
|
+
});
|
|
394
|
+
});
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 内置路径预设:几何形状 + 经典运镜,给落点返回一串世界坐标路径点。
|
|
3
|
+
* 纯函数,无 React/theatre 依赖。预设不可删改、不可自定义(用户决策)。
|
|
4
|
+
*
|
|
5
|
+
* 路径是相机轨迹。平面预设的点都在 y = center.y 上(高度由调用方取
|
|
6
|
+
* 活动相机当前 Y);运镜预设带高度变化(螺旋上升/俯冲等),y 是相对
|
|
7
|
+
* 落点的偏移。直线往返的"往返"由行进进度回摆实现,点列不重复。
|
|
8
|
+
*/
|
|
9
|
+
import type { Vec3Like } from './pathModel';
|
|
10
|
+
export type PathPreset = {
|
|
11
|
+
id: 'circle' | 'line' | 'arc' | 'figure8' | 'dollyIn' | 'reveal' | 'spiralUp' | 'crane' | 'orbitPush' | 'dive' | 'figure8v';
|
|
12
|
+
name: string;
|
|
13
|
+
/** 英文运镜名(卡片副标题) */
|
|
14
|
+
en: string;
|
|
15
|
+
/** 缩略图动画:收尾相连的路径无限绕圈,开放路径往返 */
|
|
16
|
+
closed: boolean;
|
|
17
|
+
/** 缩略图一圈(或一个往返)的秒数 */
|
|
18
|
+
durSeconds: number;
|
|
19
|
+
};
|
|
20
|
+
export declare const PATH_PRESETS: readonly PathPreset[];
|
|
21
|
+
/** 给落点返回该形状的路径点(世界坐标;y 为落点高度 + 各形状自身的偏移) */
|
|
22
|
+
export declare function presetPoints(preset: PathPreset, center: Vec3Like): Vec3Like[];
|
|
23
|
+
/**
|
|
24
|
+
* 预设放置方案:落点写进路径的位置变换,控制点围绕局部原点生成。
|
|
25
|
+
* 路径原点(整体移动箭头/原点标记的锚点)从此落在落点上;
|
|
26
|
+
* 世界位置 = 位置 + 局部点,与直接以 center 调 presetPoints 完全等价
|
|
27
|
+
* (放置时旋转/缩放是单位值,纯平移直接相加)。
|
|
28
|
+
*/
|
|
29
|
+
export declare function presetPlacement(preset: PathPreset, center: Vec3Like): {
|
|
30
|
+
points: Vec3Like[];
|
|
31
|
+
position: Vec3Like;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* 模型点击放置的默认位:base(默认原点)被占时沿 +X 每次错开 2。
|
|
35
|
+
* XZ 平面距离小于 1.5 视为占用;100 次保底防死循环。
|
|
36
|
+
*/
|
|
37
|
+
export declare function findFreeSpot(occupied: readonly Vec3Like[], base?: Vec3Like): Vec3Like;
|
|
38
|
+
//# sourceMappingURL=pathPresets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pathPresets.d.ts","sourceRoot":"","sources":["../src/pathPresets.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAA;AAEzC,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EACE,QAAQ,GACR,MAAM,GACN,KAAK,GACL,SAAS,GACT,SAAS,GACT,QAAQ,GACR,UAAU,GACV,OAAO,GACP,WAAW,GACX,MAAM,GACN,UAAU,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,mBAAmB;IACnB,EAAE,EAAE,MAAM,CAAA;IACV,+BAA+B;IAC/B,MAAM,EAAE,OAAO,CAAA;IACf,sBAAsB;IACtB,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,SAAS,UAAU,EA8B7C,CAAA;AAID,4CAA4C;AAC5C,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,GAAG,QAAQ,EAAE,CAsH7E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,QAAQ,GACf;IAAC,MAAM,EAAE,QAAQ,EAAE,CAAC;IAAC,QAAQ,EAAE,QAAQ,CAAA;CAAC,CAK1C;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,SAAS,QAAQ,EAAE,EAC7B,IAAI,GAAE,QAA6B,GAClC,QAAQ,CAYV"}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
export const PATH_PRESETS = [
|
|
2
|
+
{ id: 'circle', name: '环绕圆', en: 'Orbit', closed: true, durSeconds: 6 },
|
|
3
|
+
{ id: 'line', name: '直线往返', en: 'Truck', closed: false, durSeconds: 4 },
|
|
4
|
+
{ id: 'arc', name: '弧线', en: 'Arc', closed: false, durSeconds: 5 },
|
|
5
|
+
{ id: 'figure8', name: '8 字', en: 'Figure-8', closed: true, durSeconds: 7 },
|
|
6
|
+
{ id: 'dollyIn', name: '推近', en: 'Dolly In', closed: false, durSeconds: 3.5 },
|
|
7
|
+
{ id: 'reveal', name: '拉远拉升', en: 'Reveal', closed: false, durSeconds: 5 },
|
|
8
|
+
{
|
|
9
|
+
id: 'spiralUp',
|
|
10
|
+
name: '螺旋上升',
|
|
11
|
+
en: 'Spiral Up',
|
|
12
|
+
closed: false,
|
|
13
|
+
durSeconds: 7,
|
|
14
|
+
},
|
|
15
|
+
{ id: 'crane', name: '升降摇臂', en: 'Crane', closed: false, durSeconds: 4 },
|
|
16
|
+
{
|
|
17
|
+
id: 'orbitPush',
|
|
18
|
+
name: '环绕推近',
|
|
19
|
+
en: 'Orbit Push-in',
|
|
20
|
+
closed: false,
|
|
21
|
+
durSeconds: 6,
|
|
22
|
+
},
|
|
23
|
+
{ id: 'dive', name: '俯冲', en: 'Dive', closed: false, durSeconds: 4 },
|
|
24
|
+
{
|
|
25
|
+
id: 'figure8v',
|
|
26
|
+
name: '立体 8 字',
|
|
27
|
+
en: 'Figure-8 Vert',
|
|
28
|
+
closed: true,
|
|
29
|
+
durSeconds: 8,
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
const TAU = Math.PI * 2;
|
|
33
|
+
/** 给落点返回该形状的路径点(世界坐标;y 为落点高度 + 各形状自身的偏移) */
|
|
34
|
+
export function presetPoints(preset, center) {
|
|
35
|
+
const { x: cx, y, z: cz } = center;
|
|
36
|
+
switch (preset.id) {
|
|
37
|
+
case 'circle': {
|
|
38
|
+
const r = 5;
|
|
39
|
+
const n = 8;
|
|
40
|
+
return Array.from({ length: n }, (_, i) => {
|
|
41
|
+
const a = (i / n) * TAU;
|
|
42
|
+
return { x: cx + r * Math.cos(a), y, z: cz + r * Math.sin(a) };
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
case 'line':
|
|
46
|
+
return [
|
|
47
|
+
{ x: cx - 5, y, z: cz },
|
|
48
|
+
{ x: cx + 5, y, z: cz },
|
|
49
|
+
];
|
|
50
|
+
case 'arc': {
|
|
51
|
+
const r = 6;
|
|
52
|
+
const n = 5;
|
|
53
|
+
return Array.from({ length: n }, (_, i) => {
|
|
54
|
+
const a = (i / (n - 1)) * Math.PI;
|
|
55
|
+
return { x: cx + r * Math.cos(a), y, z: cz + r * Math.sin(a) };
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
case 'figure8': {
|
|
59
|
+
const r = 3;
|
|
60
|
+
const per = 6;
|
|
61
|
+
const pts = [];
|
|
62
|
+
// 左圆:圆心 (cx - r, cz),右缘过落点
|
|
63
|
+
for (let i = 0; i < per; i++) {
|
|
64
|
+
const a = (i / per) * TAU;
|
|
65
|
+
pts.push({ x: cx - r + r * Math.cos(a), y, z: cz + r * Math.sin(a) });
|
|
66
|
+
}
|
|
67
|
+
// 右圆:圆心 (cx + r, cz),左缘过落点
|
|
68
|
+
for (let i = 0; i < per; i++) {
|
|
69
|
+
const a = (i / per) * TAU;
|
|
70
|
+
pts.push({ x: cx + r - r * Math.cos(a), y, z: cz + r * Math.sin(a) });
|
|
71
|
+
}
|
|
72
|
+
return pts;
|
|
73
|
+
}
|
|
74
|
+
// ---- 经典运镜(带高度变化) ----
|
|
75
|
+
case 'dollyIn':
|
|
76
|
+
// 正对主体从远处推到近处,留 2 个身位不穿模
|
|
77
|
+
return [
|
|
78
|
+
{ x: cx, y, z: cz + 10 },
|
|
79
|
+
{ x: cx, y, z: cz + 2 },
|
|
80
|
+
];
|
|
81
|
+
case 'reveal':
|
|
82
|
+
// 近低 → 远高:拉远同时爬升的揭示镜头
|
|
83
|
+
return [
|
|
84
|
+
{ x: cx, y: y + 1, z: cz + 3 },
|
|
85
|
+
{ x: cx, y: y + 3, z: cz + 8 },
|
|
86
|
+
{ x: cx, y: y + 7, z: cz + 14 },
|
|
87
|
+
];
|
|
88
|
+
case 'spiralUp': {
|
|
89
|
+
// 环绕同时爬升:1.5 圈,半径 5,升高 5
|
|
90
|
+
const r = 5;
|
|
91
|
+
const n = 16;
|
|
92
|
+
const turns = 1.5;
|
|
93
|
+
return Array.from({ length: n }, (_, i) => {
|
|
94
|
+
const t = i / (n - 1);
|
|
95
|
+
const a = t * turns * TAU;
|
|
96
|
+
return {
|
|
97
|
+
x: cx + r * Math.cos(a),
|
|
98
|
+
y: y + t * 5,
|
|
99
|
+
z: cz + r * Math.sin(a),
|
|
100
|
+
};
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
case 'crane':
|
|
104
|
+
// 摇臂:低位贴地升到高位俯瞰,带轻微前推
|
|
105
|
+
return [
|
|
106
|
+
{ x: cx, y: y + 0.5, z: cz + 6 },
|
|
107
|
+
{ x: cx, y: y + 3.2, z: cz + 5.5 },
|
|
108
|
+
{ x: cx, y: y + 6, z: cz + 5 },
|
|
109
|
+
];
|
|
110
|
+
case 'orbitPush': {
|
|
111
|
+
// 水平螺旋收缩:绕一圈,半径 7 → 2.5,边绕边靠近
|
|
112
|
+
const n = 12;
|
|
113
|
+
return Array.from({ length: n }, (_, i) => {
|
|
114
|
+
const t = i / (n - 1);
|
|
115
|
+
const r = 7 + (2.5 - 7) * t;
|
|
116
|
+
const a = t * TAU;
|
|
117
|
+
return { x: cx + r * Math.cos(a), y, z: cz + r * Math.sin(a) };
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
case 'dive':
|
|
121
|
+
// 高远俯冲到低近
|
|
122
|
+
return [
|
|
123
|
+
{ x: cx, y: y + 9, z: cz + 12 },
|
|
124
|
+
{ x: cx, y: y + 5, z: cz + 8 },
|
|
125
|
+
{ x: cx, y: y + 2.5, z: cz + 5 },
|
|
126
|
+
{ x: cx, y: y + 1, z: cz + 3 },
|
|
127
|
+
];
|
|
128
|
+
case 'figure8v': {
|
|
129
|
+
// 立体 8 字:平面 8 字叠加正弦起伏,左环低右环高
|
|
130
|
+
const r = 3;
|
|
131
|
+
const per = 6;
|
|
132
|
+
const pts = [];
|
|
133
|
+
for (let i = 0; i < per; i++) {
|
|
134
|
+
const a = (i / per) * TAU;
|
|
135
|
+
pts.push({
|
|
136
|
+
x: cx - r + r * Math.cos(a),
|
|
137
|
+
y: y + 1.2 * Math.sin(a),
|
|
138
|
+
z: cz + r * Math.sin(a),
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
for (let i = 0; i < per; i++) {
|
|
142
|
+
const a = (i / per) * TAU;
|
|
143
|
+
pts.push({
|
|
144
|
+
x: cx + r - r * Math.cos(a),
|
|
145
|
+
y: y + 1.2 * Math.sin(a + Math.PI / 2),
|
|
146
|
+
z: cz + r * Math.sin(a),
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
return pts;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* 预设放置方案:落点写进路径的位置变换,控制点围绕局部原点生成。
|
|
155
|
+
* 路径原点(整体移动箭头/原点标记的锚点)从此落在落点上;
|
|
156
|
+
* 世界位置 = 位置 + 局部点,与直接以 center 调 presetPoints 完全等价
|
|
157
|
+
* (放置时旋转/缩放是单位值,纯平移直接相加)。
|
|
158
|
+
*/
|
|
159
|
+
export function presetPlacement(preset, center) {
|
|
160
|
+
return {
|
|
161
|
+
points: presetPoints(preset, { x: 0, y: 0, z: 0 }),
|
|
162
|
+
position: { ...center },
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* 模型点击放置的默认位:base(默认原点)被占时沿 +X 每次错开 2。
|
|
167
|
+
* XZ 平面距离小于 1.5 视为占用;100 次保底防死循环。
|
|
168
|
+
*/
|
|
169
|
+
export function findFreeSpot(occupied, base = { x: 0, y: 0, z: 0 }) {
|
|
170
|
+
const CLEAR_RADIUS = 1.5;
|
|
171
|
+
const STEP = 2;
|
|
172
|
+
let spot = { ...base };
|
|
173
|
+
for (let guard = 0; guard < 100; guard++) {
|
|
174
|
+
const clash = occupied.some((p) => Math.hypot(p.x - spot.x, p.z - spot.z) < CLEAR_RADIUS);
|
|
175
|
+
if (!clash)
|
|
176
|
+
return spot;
|
|
177
|
+
spot = { x: spot.x + STEP, y: base.y, z: base.z };
|
|
178
|
+
}
|
|
179
|
+
return spot;
|
|
180
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pathPresets.test.d.ts","sourceRoot":"","sources":["../src/pathPresets.test.ts"],"names":[],"mappings":""}
|