@volter/game-editor 0.5.108 → 0.5.110
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/BUNDLED_NOTICES +22 -22
- package/catalog/entries/blender.json +2 -2
- package/catalog/entries/music.json +2 -2
- package/dist/.vite/manifest.json +2173 -2173
- package/dist/assets/{AssetBudgetPanel-QorQ6jVY.js → AssetBudgetPanel-CA5WnTKY.js} +3 -3
- package/dist/assets/{AudioViewer-Bg1U_na-.js → AudioViewer-D9bHbFfE.js} +1 -1
- package/dist/assets/{CanvasBoardDocument-DdK4TlZF.js → CanvasBoardDocument-C-Rmqno1.js} +1 -1
- package/dist/assets/{CanvasSceneViewport-PImZsSzn.js → CanvasSceneViewport-GPeqRbJF.js} +1 -1
- package/dist/assets/{ColorInput-DlZ-RUhX.js → ColorInput-LOPjrHkP.js} +1 -1
- package/dist/assets/{ColorPicker-DDjV94Br.js → ColorPicker-CshnU6f7.js} +1 -1
- package/dist/assets/{EntityModelDocument-BXWWtzBN.js → EntityModelDocument-Dlp-8g7D.js} +1 -1
- package/dist/assets/{EnvironmentAssetDocument-C8X9deOy.js → EnvironmentAssetDocument-CgRbt4Jo.js} +1 -1
- package/dist/assets/{GameplaySessionTimeline-CcDf30gB.js → GameplaySessionTimeline-E-BE0EU7.js} +1 -1
- package/dist/assets/{ImageViewer-DQkqjiV8.js → ImageViewer-DLZttZzB.js} +1 -1
- package/dist/assets/InspectorObjectPreview-bpSm22I-.js +1 -0
- package/dist/assets/{JsonAssetDocument-DGbEShUJ.js → JsonAssetDocument-DIecsd7l.js} +1 -1
- package/dist/assets/{LiveModuleDocument-CSQEuhox.js → LiveModuleDocument-BOR_N7Na.js} +1 -1
- package/dist/assets/{LutAssetDocument-BXW8a6qT.js → LutAssetDocument-Rvj1GVIa.js} +1 -1
- package/dist/assets/{ModelAssetDocument-CHYL9aG2.js → ModelAssetDocument-l9npox50.js} +1 -1
- package/dist/assets/{NonThreeAuthoringBootstrap-Bcr-edIN.js → NonThreeAuthoringBootstrap-BSPTW9LM.js} +1 -1
- package/dist/assets/{Object3DDocumentToolbar-DNxMGImP.js → Object3DDocumentToolbar-DY8a0Occ.js} +1 -1
- package/dist/assets/Object3DDocumentViewport-C7LPv0rT.js +2 -0
- package/dist/assets/{Object3DPreview-DnfvoJIJ.js → Object3DPreview-F5H47D4e.js} +1 -1
- package/dist/assets/{OnlineAssetDetail-DuZPhT-L.js → OnlineAssetDetail-DHbh9BHq.js} +1 -1
- package/dist/assets/{PlayBar-DCrB4B1r.js → PlayBar-Cp3N-KCf.js} +1 -1
- package/dist/assets/{QuarksAssetDocument-DVun-iiS.js → QuarksAssetDocument-CJ55waf3.js} +1 -1
- package/dist/assets/{ReactCanvasControls-C6miAF3y.js → ReactCanvasControls-BZIKnBe_.js} +1 -1
- package/dist/assets/{RootSelectionOverlay-Cj_42uH4.js → RootSelectionOverlay-DbREUgIb.js} +1 -1
- package/dist/assets/{ShaderAssetDocument-CLNw98jZ.js → ShaderAssetDocument-C0I3j_bn.js} +1 -1
- package/dist/assets/{ShadowEditor-9nnKpjO2.js → ShadowEditor-DQJHrmnw.js} +1 -1
- package/dist/assets/{SourceAssetViewer-L-bCy9Ex.js → SourceAssetViewer-GaiKwcan.js} +1 -1
- package/dist/assets/{StageHost-BStYoTUX.js → StageHost-DooxiRtf.js} +2 -2
- package/dist/assets/{StoryPreviewMount-BtSW2Lb5.js → StoryPreviewMount-Dn5LTh6d.js} +1 -1
- package/dist/assets/{ThreeBoardDocument-DVZufDXd.js → ThreeBoardDocument-BSveW9kd.js} +2 -2
- package/dist/assets/{ThreeIsolationSceneContent-CA1FHe5l.js → ThreeIsolationSceneContent-VRHOzKbZ.js} +1 -1
- package/dist/assets/{ToolObject3DPreview-BIKclI4p.js → ToolObject3DPreview-bl5ZiSTf.js} +1 -1
- package/dist/assets/{Toolbar-BOhrx3BY.js → Toolbar-BthqVrvk.js} +1 -1
- package/dist/assets/{TransientHint-BzXrECrw.js → TransientHint-BfLO2bn2.js} +1 -1
- package/dist/assets/{VideoViewer-BePNvCo8.js → VideoViewer-CfMklFgO.js} +1 -1
- package/dist/assets/{ViewportShadingMenu-DieQf7SR.js → ViewportShadingMenu-BwML2aq7.js} +1 -1
- package/dist/assets/{active-ingest-P-9N-lwD.js → active-ingest-CjTOfvPo.js} +2 -2
- package/dist/assets/{animation-clock-DdHfE1_8.js → animation-clock-dqOcJ1jx.js} +1 -1
- package/dist/assets/{animation-mixers.service-ChGxps0c.js → animation-mixers.service-Cyr-o0Ys.js} +1 -1
- package/dist/assets/{animation-timeline.utility-CXN1efiJ.js → animation-timeline.utility-BVVP_uKf.js} +1 -1
- package/dist/assets/{asset-budget-asset.menu-LVDzBtTs.js → asset-budget-asset.menu-BBvMPohD.js} +1 -1
- package/dist/assets/{asset-budget.action-ChAMAMG2.js → asset-budget.action-C_vm5rI8.js} +1 -1
- package/dist/assets/{asset-budget.document-DtKHPjSg.js → asset-budget.document-O0KxG1Xs.js} +1 -1
- package/dist/assets/{asset-budget.menu-BVJarp8S.js → asset-budget.menu-DoTOigvn.js} +1 -1
- package/dist/assets/{asset-editor-persistence-CF8bStFQ.js → asset-editor-persistence-BDtXtYHv.js} +1 -1
- package/dist/assets/{asset-loaders-ByDJsV0c.js → asset-loaders-oyqCjokK.js} +1 -1
- package/dist/assets/{asset-preview-D_mr_kfU.js → asset-preview-DeoFAm2V.js} +1 -1
- package/dist/assets/{audio-unlock.service-CkM-XBlF.js → audio-unlock.service-p06da4Yi.js} +1 -1
- package/dist/assets/{audio.utility-YcoHxrkp.js → audio.utility-ChNs1GrX.js} +1 -1
- package/dist/assets/autoplay.service-CaAzAiui.js +1 -0
- package/dist/assets/{babylon-authoring-adapter-s9kkPTGQ.js → babylon-authoring-adapter-DitAm5jy.js} +1 -1
- package/dist/assets/{binding-resolver-DWeB_XxW.js → binding-resolver-DmISbZ_C.js} +2 -2
- package/dist/assets/{blender-emscripten-engine-RAyyfT0y.js → blender-emscripten-engine-DrQ7iKAw.js} +1 -1
- package/dist/assets/{blender-node-editor.document-9XIWHDtH.js → blender-node-editor.document-CjFrwIsm.js} +1 -1
- package/dist/assets/{blender-properties-tab-B0_Lk021.js → blender-properties-tab-DPfPDJEM.js} +1 -1
- package/dist/assets/{blender-runtime-host-DqdHNsyo.js → blender-runtime-host-ujsU3CHo.js} +3 -3
- package/dist/assets/{blender-runtime-skin-DKFIhKDc.js → blender-runtime-skin-CwUNCSeX.js} +32 -32
- package/dist/assets/{blender-runtime.document-BF7bxi3H.js → blender-runtime.document-DSE6A3hU.js} +1 -1
- package/dist/assets/{blender-screenshot.menu-BmIsjB0h.js → blender-screenshot.menu-CGpBxeEq.js} +1 -1
- package/dist/assets/{blender-timeline.document-C1kk6l2T.js → blender-timeline.document-BW8pAn48.js} +1 -1
- package/dist/assets/{blender-uv-editor.document-P3S825_B.js → blender-uv-editor.document-AVdfD3lL.js} +1 -1
- package/dist/assets/{blender-version.status-UlsMYg5E.js → blender-version.status-5pbhDXPd.js} +1 -1
- package/dist/assets/{blender-wali-engine-NtBfKpqX.js → blender-wali-engine-DRlkIoxZ.js} +1 -1
- package/dist/assets/{blender.command-mif4R2hu.js → blender.command-Tiwc3_Hq.js} +1 -1
- package/dist/assets/{board-guides-D-8XTzQj.js → board-guides-siB7DLLo.js} +1 -1
- package/dist/assets/{bridge.command-BvcgwKBU.js → bridge.command-Bwvk9KTP.js} +3 -3
- package/dist/assets/{browserAll-BJifDlVb.js → browserAll-DatQc6Hg.js} +1 -1
- package/dist/assets/{build-player.document-WVBd9FAb.js → build-player.document-5galC35i.js} +1 -1
- package/dist/assets/{build-profiles.document-DZq1dZAc.js → build-profiles.document-BtgtKY3e.js} +1 -1
- package/dist/assets/{build-progress.status-Cb3NQY_h.js → build-progress.status-CELO9Hk6.js} +1 -1
- package/dist/assets/{build-session-ZAJtZEPd.js → build-session-CmSSnwbl.js} +1 -1
- package/dist/assets/{build.action-Dkd49KI3.js → build.action-DtWKh5ZO.js} +1 -1
- package/dist/assets/{build.command-DcyjEAeB.js → build.command-CPSdPV-6.js} +1 -1
- package/dist/assets/{build.header-BBi3L1EG.js → build.header-B_esAQuh.js} +1 -1
- package/dist/assets/{build.menu-CrFuKfdU.js → build.menu-Bl9QiO1i.js} +1 -1
- package/dist/assets/{build.service-B1DOzaYx.js → build.service-3C_qeoGz.js} +1 -1
- package/dist/assets/{camera-ClX7A1rz.js → camera-CvN4e2Zz.js} +1 -1
- package/dist/assets/{camera-runtime.inspector-DadF_6Y0.js → camera-runtime.inspector-DSvOIBHY.js} +1 -1
- package/dist/assets/{canvas-design-mount-B3NGn7ab.js → canvas-design-mount-DBtUNmrt.js} +3 -3
- package/dist/assets/{canvas-entry-runtime-DRbpmRh6.js → canvas-entry-runtime-C2mS5iAy.js} +2 -2
- package/dist/assets/{canvas-preview-frames-CbvLKzk1.js → canvas-preview-frames-ciVf8XNo.js} +1 -1
- package/dist/assets/{canvas-story-capture.service-DDdCj7eB.js → canvas-story-capture.service-Be2yHqJ5.js} +2 -2
- package/dist/assets/{capability-coverage-D9QD-rt7.js → capability-coverage-C4P-DBKm.js} +1 -1
- package/dist/assets/{collaboration-presence-DFgm-wIj.js → collaboration-presence-3cLXKw77.js} +1 -1
- package/dist/assets/{collider-CV5alY5b.js → collider-DRQ_g1zi.js} +1 -1
- package/dist/assets/{component-board.service-DiRsyVPA.js → component-board.service-BuJB7tbp.js} +2 -2
- package/dist/assets/{component-board.service-BhGHT7LO.js → component-board.service-D6bAXKxC.js} +2 -2
- package/dist/assets/{component-board.service-L78fhiMe.js → component-board.service-DGzNpMjz.js} +2 -2
- package/dist/assets/{component-contracts.service-dOZUydlV.js → component-contracts.service-DdihP393.js} +1 -1
- package/dist/assets/{component-instance-root-BNDWrUkC.js → component-instance-root-z47Ib-DX.js} +1 -1
- package/dist/assets/{component-verbs.command-yidei2PQ.js → component-verbs.command-DE37VF0z.js} +1 -1
- package/dist/assets/{component-verbs.service-BWJS8Kyo.js → component-verbs.service-p8nz1DC6.js} +1 -1
- package/dist/assets/{config-rJ9cCMiJ.js → config-CdxEVH0n.js} +2 -2
- package/dist/assets/{configurations-cHt-z2BW.js → configurations-3ggfkdh8.js} +1 -1
- package/dist/assets/{connection.status-D40TvPgq.js → connection.status-L7HOKlna.js} +1 -1
- package/dist/assets/{constraints.inspector-BxnP4zez.js → constraints.inspector-BccsKc10.js} +1 -1
- package/dist/assets/{content-bounds-CaZcBNYF.js → content-bounds-BzOnMMA9.js} +1 -1
- package/dist/assets/{contract-system-adapters-BeyBY6uU.js → contract-system-adapters-DEkFby0m.js} +1 -1
- package/dist/assets/{coverage.service-Bkh7Jqi9.js → coverage.service-Dh3aFjA4.js} +1 -1
- package/dist/assets/{create-runtime-DEL8IBsg.js → create-runtime-CIgubwcC.js} +1 -1
- package/dist/assets/{curve-BQz9RIaA.js → curve-PXFWOu1h.js} +1 -1
- package/dist/assets/{data-asset-BoykURl_.js → data-asset-JCTDHYos.js} +1 -1
- package/dist/assets/{data-ref-orpnwauu.js → data-ref-D8GloBWb.js} +1 -1
- package/dist/assets/{debug-bridge-DpAIxpxr.js → debug-bridge-Bn0fBpNA.js} +1 -1
- package/dist/assets/{debug-registry-DKNGAsE6.js → debug-registry-b9SNCcVT.js} +1 -1
- package/dist/assets/{deferred-ingest-play-BYWgrVZN.js → deferred-ingest-play-EBHoQATQ.js} +2 -2
- package/dist/assets/{design-time-canvas-mount-B-mtCXNZ.js → design-time-canvas-mount-DOnlywHv.js} +2 -2
- package/dist/assets/{design-time-layers-BYVCDUHn.js → design-time-layers-Cqjx6T_b.js} +1 -1
- package/dist/assets/{design-time-mount.service-3gMHaUOK.js → design-time-mount.service-51cvhzrM.js} +2 -2
- package/dist/assets/{design-time-mount.service-Cp4u6NGI.js → design-time-mount.service-CjHEWF1r.js} +2 -2
- package/dist/assets/{design-time-react-mount-Dt5hEtwi.js → design-time-react-mount-C4_WfKCT.js} +1 -1
- package/dist/assets/{document-preview-three-C86kLB3l.js → document-preview-three-Dph0qWUe.js} +1 -1
- package/dist/assets/{dom-authoring-adapter-DdKF8aGL.js → dom-authoring-adapter-CMXOivlg.js} +1 -1
- package/dist/assets/{draco3d-CqrYtM39.js → draco3d-wRpcYGCF.js} +1 -1
- package/dist/assets/{edit-mode-audio.service-DastYEVQ.js → edit-mode-audio.service-BON9_pwC.js} +1 -1
- package/dist/assets/{edit-mode-authoring-BfHszfD3.js → edit-mode-authoring-DsZ-2V4q.js} +1 -1
- package/dist/assets/{edit-mode-networking.service-BZ1cEawB.js → edit-mode-networking.service-B1jvzsUe.js} +1 -1
- package/dist/assets/{editor-api-CNRvYvra.js → editor-api-BBBw0rAh.js} +1 -1
- package/dist/assets/{editor-layers-D-sKmDua.js → editor-layers-wmPhuj0X.js} +1 -1
- package/dist/assets/{editor-shell-store-BMZxpcut.js → editor-shell-store-LRVyeXM-.js} +1 -1
- package/dist/assets/{entity-object-Ai-uXVow.js → entity-object-DWKBk3rf.js} +1 -1
- package/dist/assets/{extend-BUAqlHkG.js → extend-Hb3YZk-l.js} +1 -1
- package/dist/assets/{fork-menu-OuLP7Lau.js → fork-menu-Bz8tnAZP.js} +1 -1
- package/dist/assets/{frame-debugger-store-B7kEPPwE.js → frame-debugger-store-XDqmRybm.js} +1 -1
- package/dist/assets/{game-contract-seams-DOVpGKKj.js → game-contract-seams-Dq1vGRC1.js} +1 -1
- package/dist/assets/{game-css-scope-transform-BKtVEQ73.js → game-css-scope-transform-CE-77RAD.js} +1 -1
- package/dist/assets/{game-document.service-BVYI1WcU.js → game-document.service-C4GqAnuP.js} +1 -1
- package/dist/assets/{game-eval.command-BcF5uF72.js → game-eval.command-S1AUTAe6.js} +1 -1
- package/dist/assets/{game-module-access-D4VyMdFg.js → game-module-access-Cpd1pqcr.js} +1 -1
- package/dist/assets/{game-network--h-FxD5b.js → game-network-DcXic1hU.js} +3 -3
- package/dist/assets/{gameplay-export-CyvkC-oL.js → gameplay-export-CXYuIXwM.js} +1 -1
- package/dist/assets/{gameplay-replay-Cple4DnH.js → gameplay-replay-Bn9Tff0H.js} +1 -1
- package/dist/assets/{gameplay.command-B-MHvpFd.js → gameplay.command-B9QmrfQx.js} +1 -1
- package/dist/assets/{generation-jobs-YJG2Y7kw.js → generation-jobs-DbXxsaSZ.js} +1 -1
- package/dist/assets/{generation.service-CeIwfVH5.js → generation.service-CVz0jrH8.js} +1 -1
- package/dist/assets/{generations-BpEvY421.js → generations-BuSgXNmm.js} +1 -1
- package/dist/assets/{generations.status-FLkppvzr.js → generations.status-DUr_PjwO.js} +1 -1
- package/dist/assets/{hierarchy-marks-CyrGt6dv.js → hierarchy-marks-BjIT-DOf.js} +1 -1
- package/dist/assets/{hosted-asset-materialization-BBfrvEh8.js → hosted-asset-materialization-rUtmDeMy.js} +1 -1
- package/dist/assets/{index-CG_0jl_O.js → index-BB2JZnar.js} +1 -1
- package/dist/assets/{index-DbdVWXvM.js → index-BTzFwm1R.js} +2 -2
- package/dist/assets/{index-FuK_gLVP.js → index-BYdQuKKk.js} +7 -7
- package/dist/assets/{index-BvlsL2ds.js → index-BsyTLFdL.js} +1 -1
- package/dist/assets/{index-NJ73w2W0.js → index-C0gUuD--.js} +1 -1
- package/dist/assets/{index-IJBqVun0.js → index-CwHA-Zn2.js} +1 -1
- package/dist/assets/{index-D6AmWXbZ.js → index-DPXH0DLI.js} +1 -1
- package/dist/assets/{index-CzfiOQG9.js → index-Dv6KjGDu.js} +1 -1
- package/dist/assets/{index-DqaGRnl8.js → index-yUo6ZJ1K.js} +1 -1
- package/dist/assets/{inference-diagnostics-D771II31.js → inference-diagnostics-DylK1Zco.js} +1 -1
- package/dist/assets/{ingest-boot-viewport-DrWIqiaT.js → ingest-boot-viewport-CWPpaeQX.js} +1 -1
- package/dist/assets/{ingest-siblings-CJcw40b3.js → ingest-siblings-ChSVCnmP.js} +1 -1
- package/dist/assets/{ingest-source-persistence-DWpLWVYc.js → ingest-source-persistence-G4DRJGE8.js} +1 -1
- package/dist/assets/{ingest.service-CfI2uUJk.js → ingest.service-0fE22SDc.js} +1 -1
- package/dist/assets/{inspect-G9yzBKkf.js → inspect-CazPcKcv.js} +1 -1
- package/dist/assets/instances.command-Cff8g0Qu.js +1 -0
- package/dist/assets/{json-history-resource-Lm6Gsl0p.js → json-history-resource-D-FoaxLT.js} +1 -1
- package/dist/assets/{layered-pick-CmpZSo8j.js → layered-pick-C73ZQGcv.js} +1 -1
- package/dist/assets/{light-BsEXvLKm.js → light-xGJK3Wlj.js} +1 -1
- package/dist/assets/{live-project-verbs-BPAULlyy.js → live-project-verbs-DYPJ4HjP.js} +1 -1
- package/dist/assets/{machine.document-BqYyC7-_.js → machine.document-D3px2bzJ.js} +1 -1
- package/dist/assets/{machines.finder-iE0GRJmX.js → machines.finder-BebmWb2J.js} +1 -1
- package/dist/assets/{material-CmZk61au.js → material-P9SjD3Ot.js} +1 -1
- package/dist/assets/{material-factory-CgKRNyTJ.js → material-factory-DZpGzP1J.js} +1 -1
- package/dist/assets/{mesh-CFQNtglF.js → mesh-NhmM6AvO.js} +1 -1
- package/dist/assets/{model-asset-sections.service-C9aBbNhg.js → model-asset-sections.service-XoDCR7K7.js} +1 -1
- package/dist/assets/{model-inspection-CRXVM5Wz.js → model-inspection-CRQL0kkD.js} +1 -1
- package/dist/assets/{model-thumbnail-n5yOZ3A6.js → model-thumbnail-BSBXqm11.js} +1 -1
- package/dist/assets/{models.finder-Cv0yUUsA.js → models.finder-CyqMFbNG.js} +1 -1
- package/dist/assets/{module-mode-D9wou5Sv.js → module-mode-CrdDk1MO.js} +2 -2
- package/dist/assets/{mount-canvas-ingest-root-BQBEy7uJ.js → mount-canvas-ingest-root-CNhapYXw.js} +2 -2
- package/dist/assets/{mount-dom-ingest-root-B7TIeWwv.js → mount-dom-ingest-root-fz_nUR-I.js} +2 -2
- package/dist/assets/{mount-ingest-root-DLk-bjRI.js → mount-ingest-root-CnOI0tzn.js} +2 -2
- package/dist/assets/{mount-manifest-BSC4x0OM.js → mount-manifest-DtOieSVW.js} +1 -1
- package/dist/assets/{mount-three-ingest-root-IXJdEORK.js → mount-three-ingest-root-B11KDTlC.js} +1 -1
- package/dist/assets/{mounted-authoring-BRUN-BOo.js → mounted-authoring-CqEcYmBB.js} +1 -1
- package/dist/assets/{mounted-story-viewport-source-CJ9v75Cz.js → mounted-story-viewport-source-ClFcc8ZE.js} +1 -1
- package/dist/assets/{native-debug-module-DCjfoqQ_.js → native-debug-module-xmmPMHBo.js} +1 -1
- package/dist/assets/{navigation-B4ScoRYf.js → navigation-B5MSEPQo.js} +1 -1
- package/dist/assets/{navmesh.menu-DWzhh3-1.js → navmesh.menu-CjCV-1Zk.js} +1 -1
- package/dist/assets/{navmesh.service-DfXqZNTC.js → navmesh.service-DJaVLPIT.js} +1 -1
- package/dist/assets/network-observer.service-DX1ZcyzF.js +1 -0
- package/dist/assets/{network.utility-BbPILdSn.js → network.utility-CHVTUNSl.js} +1 -1
- package/dist/assets/{object3d-document-session-registry-yyskXT42.js → object3d-document-session-registry-RFHXjepL.js} +2 -2
- package/dist/assets/{oid-transform-B9wsHs5H.js → oid-transform-DOVsETju.js} +1 -1
- package/dist/assets/{particles-DGKxyAuH.js → particles-CcUkRyUm.js} +1 -1
- package/dist/assets/{pixi-authoring-adapter-DS-A0P3M.js → pixi-authoring-adapter-CDcz5ySv.js} +1 -1
- package/dist/assets/{pixi-live-write-target-BjARuRSW.js → pixi-live-write-target-BjlNk1ws.js} +1 -1
- package/dist/assets/{play.command-DCc8asMJ.js → play.command-MX_nXHxk.js} +2 -2
- package/dist/assets/{presentation-FoTcsbFF.js → presentation-Dy8F-23e.js} +1 -1
- package/dist/assets/{product-CxzQQY-2.js → product-DKcPhhH3.js} +1 -1
- package/dist/assets/{profiler.action-smxgfcL_.js → profiler.action-CrVcze1d.js} +1 -1
- package/dist/assets/{profiler.menu-CPgp7nBA.js → profiler.menu-BT8Gbk-H.js} +1 -1
- package/dist/assets/{profiler.utility-BlJIqjBl.js → profiler.utility-BK7-JszO.js} +1 -1
- package/dist/assets/{project-authoring-session-D5Hx87VG.js → project-authoring-session-C7hSaUoI.js} +2 -2
- package/dist/assets/{properties-bone-constraints.inspector-Dfagnx_P.js → properties-bone-constraints.inspector-DojLcDWI.js} +1 -1
- package/dist/assets/{properties-bone.inspector-CcZ9t3x_.js → properties-bone.inspector-BKtnxYej.js} +1 -1
- package/dist/assets/{properties-collection.inspector-XJfAy2LF.js → properties-collection.inspector-CJwK055D.js} +1 -1
- package/dist/assets/{properties-constraints.inspector-Duy4wn7B.js → properties-constraints.inspector-BMr_2fNW.js} +1 -1
- package/dist/assets/{properties-data.inspector-Dtcc2RcP.js → properties-data.inspector-eP5kPx_x.js} +1 -1
- package/dist/assets/{properties-material.inspector-BsmleciZ.js → properties-material.inspector-DzcTJXqu.js} +1 -1
- package/dist/assets/{properties-modifiers.inspector-BG6NJU2U.js → properties-modifiers.inspector-BPnJY0K9.js} +1 -1
- package/dist/assets/{properties-object.inspector-lIRXMKBd.js → properties-object.inspector-CiU_g5eW.js} +1 -1
- package/dist/assets/{properties-output.inspector-DFzeIW2j.js → properties-output.inspector-B7-0cxFB.js} +1 -1
- package/dist/assets/{properties-particles.inspector-ClVqIBAW.js → properties-particles.inspector-B_dIFFES.js} +1 -1
- package/dist/assets/{properties-physics.inspector-JJK-q6VU.js → properties-physics.inspector-BrZZssu5.js} +1 -1
- package/dist/assets/{properties-render.inspector-K0TdbYo2.js → properties-render.inspector-Cr3ILbCE.js} +1 -1
- package/dist/assets/{properties-scene.inspector-7LMlqHIJ.js → properties-scene.inspector-CCT-Wwlq.js} +1 -1
- package/dist/assets/{properties-texture.inspector-DRcLLne7.js → properties-texture.inspector-BbDSLSIf.js} +1 -1
- package/dist/assets/{properties-view-layer.inspector-BLbQJdxQ.js → properties-view-layer.inspector-CMFsWlWn.js} +1 -1
- package/dist/assets/{properties-world.inspector-pbOvsUWM.js → properties-world.inspector-QOI3frGi.js} +1 -1
- package/dist/assets/{r3f-design-session-DtYg0f6U.js → r3f-design-session-DYcgEMWW.js} +2 -2
- package/dist/assets/{r3f-physics-binding-Cy9jQdnd.js → r3f-physics-binding-CmlqQXpO.js} +1 -1
- package/dist/assets/{r3f-source-authoring-adapter-CGBlpkG7.js → r3f-source-authoring-adapter-DlK-JsAS.js} +1 -1
- package/dist/assets/{react-canvas-navigation-CKXOs-Wq.js → react-canvas-navigation-CcPcwMkG.js} +1 -1
- package/dist/assets/{react-inspector.service-CsTte-N1.js → react-inspector.service-CXeQPCph.js} +1 -1
- package/dist/assets/{react-story-board-DP8miK58.js → react-story-board-JyxJfFaY.js} +1 -1
- package/dist/assets/{react-three-rapier.esm-DNUgm9WI.js → react-three-rapier.esm-CUxniyd-.js} +1 -1
- package/dist/assets/{react-world-authoring-adapter-DDSKeNtx.js → react-world-authoring-adapter-D9avM44a.js} +1 -1
- package/dist/assets/{realm-services-CIoOWxZe.js → realm-services-D8d7aUSw.js} +1 -1
- package/dist/assets/{reflection-probe-capture.inspector-YbluVpTC.js → reflection-probe-capture.inspector-BU0Ixoxz.js} +1 -1
- package/dist/assets/{registry-D3NMBnZ_.js → registry-BDw0X1Ht.js} +1 -1
- package/dist/assets/{relative-import-specifier-BHYY_mHM.js → relative-import-specifier-BGUMwtft.js} +1 -1
- package/dist/assets/{render-env-ufPT6kcg.js → render-env-COdmMCld.js} +1 -1
- package/dist/assets/{render-features-Dt3ItOxf.js → render-features-B9DvCMxj.js} +1 -1
- package/dist/assets/{render-settings-y6lgf9KB.js → render-settings-BZQKFQ-S.js} +1 -1
- package/dist/assets/{resolve-three-DPJIomXU.js → resolve-three-CBuaRQ3h.js} +3 -3
- package/dist/assets/{root-seam-contract-DjLE5lpJ.js → root-seam-contract-CnveH2Nm.js} +1 -1
- package/dist/assets/{run-selection-DkkDSK2k.js → run-selection-CIf2tl8R.js} +1 -1
- package/dist/assets/{scene-capture-B9TCnOqE.js → scene-capture-C58hCZOG.js} +1 -1
- package/dist/assets/{scene-document.service-BQ4YJ85A.js → scene-document.service-2jk9EV45.js} +2 -2
- package/dist/assets/{scene-framing-Rs5Y89nN.js → scene-framing-C0vuzmLH.js} +1 -1
- package/dist/assets/{seeded-random-DMenDilU.js → seeded-random-C4zhXjCn.js} +1 -1
- package/dist/assets/{session-D32o2Hbx.js → session-BfHWkUIf.js} +81 -1
- package/dist/assets/{setup-renderer-FNGzSUCJ.js → setup-renderer-B5wilQJH.js} +1 -1
- package/dist/assets/{source-object3d-authoring-adapter-Ckfk03in.js → source-object3d-authoring-adapter-PbUdA5Q2.js} +1 -1
- package/dist/assets/{source-persistence-backend-D2wE734G.js → source-persistence-backend-Sj6uuBrM.js} +1 -1
- package/dist/assets/{stage-keyboard-BnGgOfba.js → stage-keyboard-9ZzYQNd5.js} +1 -1
- package/dist/assets/{stage-overlay-set-Cy_kPcLc.js → stage-overlay-set-CguBU7J4.js} +1 -1
- package/dist/assets/{stage-presence-markers-DkQfTXSi.js → stage-presence-markers-DXjy7DL7.js} +1 -1
- package/dist/assets/{stage-transform-tools-Z4MP8ho5.js → stage-transform-tools-DiblXG_Z.js} +1 -1
- package/dist/assets/{standard-viewport-dressing-wQb-yfhP.js → standard-viewport-dressing-DpCqZowy.js} +1 -1
- package/dist/assets/{state-watch.action-C1Sr4Sig.js → state-watch.action-Ct5Wy0zu.js} +1 -1
- package/dist/assets/{state-watch.menu-izjaH3rb.js → state-watch.menu-Bf6HJvqy.js} +1 -1
- package/dist/assets/{state-watch.utility-DkKZOOWC.js → state-watch.utility-efli4QQe.js} +1 -1
- package/dist/assets/{story-capture-DoBmQaJy.js → story-capture-DAzlViX7.js} +1 -1
- package/dist/assets/{story-documents-BzadiI5m.js → story-documents-BYIxqRcJ.js} +1 -1
- package/dist/assets/{story-documents.service-ClHoqS_S.js → story-documents.service-B7jaECxU.js} +1 -1
- package/dist/assets/{story-documents.service-B2XyP9fa.js → story-documents.service-BAoQMTa4.js} +1 -1
- package/dist/assets/{story-media-presence-BQezZJvw.js → story-media-presence-B0ccG2oZ.js} +1 -1
- package/dist/assets/{story-pixi-preview-CvSUXb1O.js → story-pixi-preview-qNGRD1RG.js} +1 -1
- package/dist/assets/{story-presentation-BFgjqHVE.js → story-presentation-B85RFwXM.js} +1 -1
- package/dist/assets/{story-three-preview-EJG3Ki2M.js → story-three-preview-C-kpIz3s.js} +2 -2
- package/dist/assets/{studio-environment-Bj3Hi-UK.js → studio-environment-BXrrTMN4.js} +1 -1
- package/dist/assets/{surface-state-BfErS6v0.js → surface-state-D9U0kgz0.js} +1 -1
- package/dist/assets/{syntactic-prop-specs-BD-AJdiW.js → syntactic-prop-specs-Ca4XG7zz.js} +1 -1
- package/dist/assets/{team-playtest.service-BHn-MVSU.js → team-playtest.service-BVasG50-.js} +1 -1
- package/dist/assets/{three-CQVC3sHg.js → three-D4bun8tv.js} +1 -1
- package/dist/assets/{three-authoring-adapter-C5QXFs1Q.js → three-authoring-adapter-VpfMe64G.js} +1 -1
- package/dist/assets/three-authoring.service-Dgj0R5Mm.js +2 -0
- package/dist/assets/{three-ingest-runtime-ClA0ZFjY.js → three-ingest-runtime-DI_J7mdv.js} +1 -1
- package/dist/assets/{three-integration-UeCSuDl8.js → three-integration-BzTWd5jX.js} +2 -2
- package/dist/assets/three-integration.service-CHDRTJ4I.js +1 -0
- package/dist/assets/{three-projection-core-Ckpx-u5r.js → three-projection-core-DTAhpWX4.js} +1 -1
- package/dist/assets/{three-state-DNgFvLbw.js → three-state-ctKrzvps.js} +1 -1
- package/dist/assets/{three-story-capture.service-Bh4T4UDu.js → three-story-capture.service-9OfuwiWo.js} +2 -2
- package/dist/assets/{three-story-model-z5ueli9r.js → three-story-model-UEeiGz1i.js} +1 -1
- package/dist/assets/{three-viewport-presentation-5KZ0zq__.js → three-viewport-presentation-Zf87KDhY.js} +1 -1
- package/dist/assets/{transform-mode-request-B6ZoHm8Z.js → transform-mode-request-D9k3BUHW.js} +1 -1
- package/dist/assets/{transport-strip-B6uA0CS2.js → transport-strip-CwOW82Og.js} +1 -1
- package/dist/assets/transport.header-B4EdCaSb.js +1 -0
- package/dist/assets/{tuples-9hzaeddD.js → tuples-B8Z8h1FP.js} +1 -1
- package/dist/assets/{ui-board-document-CZR37-MH.js → ui-board-document-B7_C_NlR.js} +2 -2
- package/dist/assets/{user-data-thHakLdm.js → user-data-CJW19F-2.js} +1 -1
- package/dist/assets/{utility-view-state-mgk7IW1_.js → utility-view-state-D_vE7sm3.js} +1 -1
- package/dist/assets/{viewport-door-BfcEF1aj.js → viewport-door-BW0xEXr5.js} +1 -1
- package/dist/assets/{viewport-root-presentation-BPc-lH1E.js → viewport-root-presentation-Cy219iw-.js} +1 -1
- package/dist/assets/{viewport-surface-status-B-dxhyXW.js → viewport-surface-status-CO8m-4fj.js} +1 -1
- package/dist/assets/{webworkerAll-M6nIvbjt.js → webworkerAll-DXnaOz71.js} +1 -1
- package/dist/assets/worker-CIByxsbl.js +2 -0
- package/dist/assets/{workspace-arrangement-avVz3tND.js → workspace-arrangement-DwFkSdlq.js} +1 -1
- package/dist/assets/{world-documents-tYDBGv-F.js → world-documents-DXzZtfR9.js} +1 -1
- package/dist/assets/{world-root-stage-binding-5pbD7Ije.js → world-root-stage-binding-C7HH_DuY.js} +1 -1
- package/dist/assets/{xstate-animation-binding-Cvl5K9w5.js → xstate-animation-binding-DMnWdBYa.js} +1 -1
- package/dist/assets/{xstate-animation-meta-y4vMVZGC.js → xstate-animation-meta-DzRq8jno.js} +1 -1
- package/dist-node/cli.js +16 -16
- package/package.json +16 -16
- package/dist/assets/InspectorObjectPreview-DaEwQeSD.js +0 -1
- package/dist/assets/Object3DDocumentViewport-DBReT61I.js +0 -2
- package/dist/assets/autoplay.service-D4JLEyog.js +0 -1
- package/dist/assets/instances.command-aJdpUuvP.js +0 -1
- package/dist/assets/network-observer.service-HeuDmPJy.js +0 -1
- package/dist/assets/three-authoring.service-Cns4jd_9.js +0 -2
- package/dist/assets/three-integration.service-CLAsbasx.js +0 -1
- package/dist/assets/transport.header-CHCQGfOl.js +0 -1
- package/dist/assets/worker-Gb6BRf7P.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ToolObject3DPreview-
|
|
2
|
-
import{aH as Ne,kW as Le,kV as re,aG as Fe,lV as ze,g8 as Be,dt as He,aD as We,_ as M,ak as qe,lW as Ue,lX as Ge,lY as $e,lZ as Qe,l_ as Ye,l$ as Je,m0 as Ke,m1 as Ze,m2 as Xe,hk as et,m3 as tt,b_ as rt,m4 as nt,m5 as ot,m6 as _e,kY as z,E as ne,F as at,y as F,bL as st,m7 as it,r as Se,K as ct,G as ut,m8 as lt,m9 as dt,ma as G,T as ft,c$ as pt,kN as mt}from"./index-FuK_gLVP.js";import{r as ht}from"./host-hierarchy-objects-BV3WqU2w.js";import{m as Pe,l as vt}from"./renderer-ownership-BovSEcLv.js";import{W as Ee}from"./three.module-BLhyNg0e.js";import{cP as Me,ej as Ce,_ as Z,I as gt,fo as A,V as Ae,dp as X,cp as B,el as wt,bh as oe,d5 as yt,T as bt,c1 as ae,cu as _t,aI as St,d as Pt,ct as Et,cx as Mt}from"./three.core-3arARmh6.js";import{i as Ct}from"./preview-renderer-BrYNFV1p.js";import{a as At}from"./layered-pick-CmpZSo8j.js";import{g as W}from"./user-data-thHakLdm.js";import{a as y}from"./jsx-runtime-DPjLkJKQ.js";import{r as g}from"./index-nmcBqr7Y.js";import{r as Tt}from"./model-thumbnail-n5yOZ3A6.js";import{c as kt,a as Te}from"./object3d-document-session-registry-yyskXT42.js";import{t as j}from"./three-state-DNgFvLbw.js";import{a as q}from"./entity-object-Ai-uXVow.js";import{i as ke,c as It}from"./hierarchy-marks-CyrGt6dv.js";import{a as Ot}from"./component-instance-root-BNDWrUkC.js";import{a as xt}from"./three-contract-Dkt6PmWY.js";import{t as V}from"./editor-shell-store-BMZxpcut.js";import{d as Dt,a as U,b as Rt}from"./viewport-door-BfcEF1aj.js";import{a as jt}from"./content-bounds-CaZcBNYF.js";import{h as Vt,d as Ie,p as Nt,j as se,r as ie,s as Lt,k as ce,A as Ft,n as zt,o as Bt,b as Ht,q as Wt,m as qt,t as Ut,f as Gt,C as $t,u as ue,v as Qt,w as $,x as Yt,y as Jt,z as Kt,B as Zt,D as Xt,E as er,F as tr,c as rr,a as nr}from"./asset-preview-D_mr_kfU.js";const or=1,O=[];function K(t){const e=O.indexOf(t);e>=0&&O.splice(e,1),t.renderer.dispose(),t.renderer.forceContextLoss(),t.canvas.remove()}function ar(t,e){const r=document.createElement("canvas");r.style.width="100%",r.style.height="100%",r.style.display="block",r.width=Math.max(1,t),r.height=Math.max(1,e);const n={canvas:r,renderer:Pe(new Ee({canvas:r,antialias:!0,alpha:!0})),leased:!0,lost:!1,onContextLost:null};return r.addEventListener("webglcontextlost",()=>{n.lost=!0,n.onContextLost?.();const o=O.indexOf(n);o>=0&&O.splice(o,1),n.leased||K(n)}),O.push(n),n}function sr(t){const{renderer:e}=t;e.setRenderTarget(null),e.setScissorTest(!1),e.setViewport(0,0,Math.max(1,t.canvas.width),Math.max(1,t.canvas.height)),e.setScissor(0,0,Math.max(1,t.canvas.width),Math.max(1,t.canvas.height)),e.autoClear=!0,e.autoClearColor=!0,e.autoClearDepth=!0,e.autoClearStencil=!0,e.sortObjects=!0,e.localClippingEnabled=!1,e.clippingPlanes=[],e.shadowMap.enabled=!1,e.shadowMap.autoUpdate=!0,e.toneMapping=Me,e.toneMappingExposure=1,e.outputColorSpace=Ce,e.xr.enabled=!1,e.setAnimationLoop(null),e.setClearColor(0,0),e.clear(!0,!0,!0),e.info.reset()}function Cn(t,e,r){let n=O.find(s=>!s.leased&&!s.lost);n||(n=ar(t,e)),n.leased=!0,n.onContextLost=r??null;const o=n;let a=!1;return{canvas:o.canvas,renderer:o.renderer,release(){if(a)return;if(a=!0,o.leased=!1,o.onContextLost=null,o.canvas.remove(),o.lost){K(o);return}sr(o);const s=O.filter(i=>!i.leased&&!i.lost);for(const i of s.slice(or))K(i)}}}function ir(){return{active:O.filter(t=>t.leased&&!t.lost).length,idle:O.filter(t=>!t.leased&&!t.lost).length}}function cr(t,e){if(e!==null&&Ne(e))for(const n of t.values())n.visible=!1}const ur=new Z("#aaaaaa");function lr(t){t.background=ur,t.fog=null,t.environment=null,t.traverse(e=>{W(e,"envObject")&&(e.visible=!1)})}const dr={activeAuthoring:t=>We(t),panelAuthoring:t=>He(t).adapter,pick:(t,e,r,n)=>At(t,e,r,{intent:n}),toolOwner:(t,e)=>Be(t,e),toolOwnerPainted:(t,e)=>re(t)&&ze(t,e),threeSurfaceShowing:(t,e)=>re(t)&&(e instanceof Fe?e.childAdapters().some(r=>r.kind==="three"):!e.rects&&typeof e.hierarchy.object3D=="function"),threeViewportRootId:t=>Le(t),applyRootHiddenVisibility:cr,suppressRootEnvironment:lr},fr=g.lazy(async()=>({default:(await M(async()=>{const{ToolObject3DPreview:t}=await import("./ToolObject3DPreview-BIKclI4p.js");return{ToolObject3DPreview:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]))).ToolObject3DPreview})),pr=g.lazy(async()=>({default:(await M(async()=>{const{ToolObject3DAuthoring:t}=await import("./StageHost-BStYoTUX.js").then(e=>e.S);return{ToolObject3DAuthoring:t}},__vite__mapDeps([32,4,5,2,6,1,7,8,9,10,11,33,34,35,12,13,36,16,17,21,37,38,39,40,19,25,26,27,28,41,18,42,43,44,45,46,47,48,49,31,20,22,23,24,14,50,51,52,53,54,55,30,56,57,58]))).ToolObject3DAuthoring}));function mr(t){return y.jsx(g.Suspense,{fallback:y.jsx("div",{style:{minHeight:240},children:"Loading 3D preview…"}),children:y.jsx(fr,{...t})})}function hr(t){return g.useEffect(()=>qe(t.documentId),[t.documentId]),y.jsx(g.Suspense,{fallback:y.jsx("div",{style:{minHeight:240},children:"Loading 3D authoring surface…"}),children:y.jsx(pr,{...t})})}const le={model:g.lazy(async()=>{const{ModelAssetDocument:t}=await M(async()=>{const{ModelAssetDocument:e}=await import("./ModelAssetDocument-CHYL9aG2.js");return{ModelAssetDocument:e}},__vite__mapDeps([59,1,2,5,6,7,8,4,9,10,11,15,16,17,18,19,20,21,22,12,13,23,24,25,26,27,28,29,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,14,50,51,52,53,54,55,30,56,57,58,60,61,62]));return{default:e=>y.jsx(t,{documentId:e.documentId,assetPath:e.assetPath,displayName:e.displayName,active:e.active})}}),"entity-model":g.lazy(async()=>{const{EntityModelDocument:t}=await M(async()=>{const{EntityModelDocument:e}=await import("./EntityModelDocument-BXWWtzBN.js");return{EntityModelDocument:e}},__vite__mapDeps([63,1,2,34,35,12,13,36,16,17,4,5,6,7,8,9,10,11,21,37,38,42,15,18,19,20,22,23,24,25,26,27,28,29,32,33,39,40,41,43,44,45,46,47,48,49,31,14,50,51,52,53,54,55,30,56,57,58,60,61,62]));return{default:e=>y.jsx(t,{documentId:e.documentId,entityId:e.entityId??"",displayName:e.displayName,active:e.active})}}),environment:g.lazy(async()=>{const{EnvironmentAssetDocument:t}=await M(async()=>{const{EnvironmentAssetDocument:e}=await import("./EnvironmentAssetDocument-C8X9deOy.js");return{EnvironmentAssetDocument:e}},__vite__mapDeps([64,1,2,4,5,6,7,8,9,10,11,12,13,14,27,28,65]));return{default:e=>y.jsx(t,{documentId:e.documentId,assetPath:e.assetPath,active:e.active})}}),lut:g.lazy(async()=>{const{LutAssetDocument:t}=await M(async()=>{const{LutAssetDocument:e}=await import("./LutAssetDocument-BXW8a6qT.js");return{LutAssetDocument:e}},__vite__mapDeps([66,1,2,4,5,6,7,8,9,10,11,67,12,13,65]));return{default:e=>y.jsx(t,{documentId:e.documentId,assetPath:e.assetPath,active:e.active})}}),shader:g.lazy(async()=>{const{ShaderAssetDocument:t}=await M(async()=>{const{ShaderAssetDocument:e}=await import("./ShaderAssetDocument-CLNw98jZ.js");return{ShaderAssetDocument:e}},__vite__mapDeps([68,1,2,4,5,6,7,8,9,10,11,69,12,13,65]));return{default:e=>y.jsx(t,{documentId:e.documentId,assetPath:e.assetPath,active:e.active})}}),"model-preview":g.lazy(async()=>{const{Object3DPreview:t}=await M(async()=>{const{Object3DPreview:e}=await import("./Object3DPreview-DnfvoJIJ.js");return{Object3DPreview:e}},__vite__mapDeps([3,4,5,2,6,1,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]));return{default:e=>y.jsx(t,{assetPath:e.assetPath,...e.materialPath?{materialPath:e.materialPath}:{},displayName:e.displayName})}}),module:g.lazy(async()=>{const{LiveModuleDocument:t}=await M(async()=>{const{LiveModuleDocument:e}=await import("./LiveModuleDocument-CSQEuhox.js");return{LiveModuleDocument:e}},__vite__mapDeps([70,1,2,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,12,13,23,24,25,26,27,28,29,53,71,58,39,40]));return{default:e=>e.projectRoot?y.jsx(t,{documentId:e.documentId,projectRoot:e.projectRoot,modulePath:(e.assetPath.split(/[?#]/,1)[0]??e.assetPath).replace(/^\//,""),displayName:e.displayName,active:e.active,fallback:e.fallback}):e.fallback}})},vr={recognize:async(t,e)=>(await M(async()=>{const{loadNativeQuarksJsonSource:r}=await import("./QuarksAssetDocument-DVun-iiS.js");return{loadNativeQuarksJsonSource:r}},__vite__mapDeps([72,1,2,5,6,7,8,4,9,10,11,20,21,17,22,12,13,23,24,25,26,27,28,51,73,32,33,34,35,36,16,37,38,39,40,19,41,18,42,43,44,45,46,47,48,49,31,14,50,52,53,54,55,30,56,57,58,60,61,62,15,29]))).loadNativeQuarksJsonSource(t,e),Viewer:g.lazy(async()=>{const{QuarksAssetDocument:t}=await M(async()=>{const{QuarksAssetDocument:e}=await import("./QuarksAssetDocument-DVun-iiS.js");return{QuarksAssetDocument:e}},__vite__mapDeps([72,1,2,5,6,7,8,4,9,10,11,20,21,17,22,12,13,23,24,25,26,27,28,51,73,32,33,34,35,36,16,37,38,39,40,19,41,18,42,43,44,45,46,47,48,49,31,14,50,52,53,54,55,30,56,57,58,60,61,62,15,29]));return{default:e=>y.jsx(t,{documentId:e.documentId,assetPath:e.assetPath,displayName:e.displayName,active:e.active,source:e.content})}})};function gr(){const t=[...Object.keys(le).map(e=>Ue(e,le[e])),Ge(vr)];return()=>{for(const e of t)e()}}async function de(t){const e=new Image;return e.src=t,await e.decode(),e}function wr(){return $e((t,e)=>{const r=j();if(r&&r.viewportCanvas()===t)return(async()=>{const o=await Qe(t);if(o)return o;const a=r.captureViewportImage(e);return a?de(a):null})();const n=kt().find(o=>o.renderer.domElement===t);return n?(async()=>{const o=await n.requestPresentedFrame();if(o)return o;const a=n.captureImage(e);return a?de(a):null})():null})}function yr(t){const e=It(t);if(e||ke(t)||W(t,"authoringRoot")===!0||!Ot(t))return e;const r=W(t,"authoringComponent");return typeof r=="string"&&r?r:void 0}function br(t){if(typeof t.object3D!="function")return Ye;const r=new Map;return n=>{if(r.has(n))return r.get(n);const o=xt(t,n),a=o?{componentRoot:yr(o),authoredEntity:W(o,"authoringRoot")===!0,builtInternal:ke(o)}:void 0;return r.set(n,a),a}}const _r=1e-4,Sr="World-anchored — content is placed in world space by the game each frame; moving this container offsets future placements away from their source.";function Oe(t){if(!t)return 0;const e=t;if(e.isInstancedMesh!==!0)return 0;const r=e.count;return typeof r=="number"&&r>0?r:0}function Pr(t){const e=t.elements;for(let r=0;r<16;r++){const n=r%5===0?1:0,o=e[r];if(!Number.isFinite(o)||Math.abs(o-n)>_r)return!1}return!0}const fe=new gt,pe=new A;function Er(t,e){const r=Oe(t);if(r===0)return null;const n=Mr(t,e);return{units:r,detail:xe(r),worldAnchored:n,note:n?Sr:null}}function Mr(t,e){if(!e||e.isEmpty()||!Pr(t.matrixWorld))return!1;const r=t.geometry;return r.boundingBox===null&&r.computeBoundingBox(),r.boundingBox?(fe.copy(r.boundingBox),e.getCenter(pe),!fe.containsPoint(pe)):!1}function Cr(t){const e=Oe(t);return e===0?null:xe(e)}function xe(t){return`${t} instanced unit${t===1?"":"s"}`}function Ar(){return Je({detail:(t,e,r)=>Cr(q(t,V(r).objectMap,e)),marks:t=>br(t),structureLog:t=>{const e=V(t);return{epoch:()=>e.gizmoEpoch,parentChangesSince:r=>e.ingestObjectMapChangesSince(r)}}})}function Tr(t){return Math.min(1600,Math.max(800,900+t*25))}function kr(t){return t<.5?4*t*t*t:1-(-2*t+2)**3/2}function De(t,e,r=new A(0,1,0)){const n=new A().subVectors(e,t),o=n.length();if(o<1e-6)return[t.clone(),t.clone(),e.clone(),e.clone()];const a=Math.min(o*.18,6),s=new A().crossVectors(n,r);s.lengthSq()>1e-9?s.normalize().multiplyScalar(Math.min(o*.08,2.5)):s.set(0,0,0);const i=r.clone().normalize().multiplyScalar(a),u=t.clone().addScaledVector(n,.3).add(i).add(s),m=e.clone().addScaledVector(n,-.3).addScaledVector(i,.6).addScaledVector(s,.5);return[t.clone(),u,m,e.clone()]}const Ir=1<<31;function Or(t){return(t.layers.mask&Ir)!==0||/gizmo/i.test(t.name)}function Re(t){if(Or(t))return null;if(t.isCamera)return t;for(const e of t.children){const r=Re(e);if(r)return r}return null}function xr(t,e,r){const n=new A,o=new X;return e.getWorldPosition(n),e.getWorldQuaternion(o),{entityId:t,position:n.toArray(),quaternion:o.toArray(),fov:r}}function Dr(t){for(const[e,r]of t.objectMap){const n=Re(r);if(!n)continue;const o=n;return xr(e,n,o.isPerspectiveCamera?o.fov:60)}return null}function Rr(t){t.curve=new Ae(De(t.startPos,t.endPos))}let N=null;function jr(t){const e=U(),r=j()?.objectMap,n=r?Dr({objectMap:r}):null;if(!n||!e)return!1;const o=e.camera.position.clone(),a=new A().fromArray(n.position);return N={runtime:{startPos:o,startQuat:e.camera.quaternion.clone(),startFov:e.camera.fov,endPos:a,endQuat:new X().fromArray(n.quaternion),endFov:n.fov,curve:new Ae(De(o,a)),startedAt:performance.now(),durationMs:Tr(o.distanceTo(a)),landed:!1},snapshot:{position:e.camera.position.clone(),target:e.orbit.target.clone(),up:e.camera.up.clone(),fov:e.camera.fov},onLanded:t,getLiveCamera:null,driving:!0},e.orbit.enabled=!1,!0}function Vr(){const t=U(),e=N;if(!e||(e.driving=!1,!t))return;const r=t.camera,n=new A(0,0,-1).applyQuaternion(r.quaternion),o=Math.max(1,e.snapshot.position.distanceTo(e.snapshot.target));t.orbit.target.copy(r.position).addScaledVector(n,o),r.up.set(0,1,0).applyQuaternion(r.quaternion),t.orbit.enabled=!0}function Nr(){const t=N;if(!t)return;N=null;const e=U();if(!e)return;const r=t.snapshot;e.camera.position.copy(r.position),e.orbit.target.copy(r.target),e.camera.up.copy(r.up),e.camera.lookAt(r.target),e.camera.fov!==r.fov&&(e.camera.fov=r.fov,e.camera.updateProjectionMatrix()),e.orbit.enabled=!0,e.orbit.update()}const Q=new A,me=new X;Dt(Lr);function Lr(){const t=N,e=U();if(!t||!e||!t.driving)return;const r=t.runtime,n=t.getLiveCamera?.()??null,o=n?.isObject3D?n:null;if(o){o.getWorldPosition(Q),o.getWorldQuaternion(me),Q.distanceToSquared(r.endPos)>1e-8&&(r.endPos.copy(Q),Rr(r)),r.endQuat.copy(me);const u=o.fov;typeof u=="number"&&(r.endFov=u)}const a=e.camera;if(r.landed){a.position.copy(r.endPos),a.quaternion.copy(r.endQuat),a.fov!==r.endFov&&(a.fov=r.endFov,a.updateProjectionMatrix());return}const s=Math.min(1,(performance.now()-r.startedAt)/r.durationMs),i=kr(s);a.position.copy(r.curve.getPoint(i)),a.quaternion.slerpQuaternions(r.startQuat,r.endQuat,i),a.fov=r.startFov+(r.endFov-r.startFov)*i,a.updateProjectionMatrix(),s>=1&&(r.landed=!0,t.onLanded())}function Fr(){return Ke({begin:jr,track:t=>{N&&(N.getLiveCamera=t)},settle:Vr,end:Nr})}const zr=g.lazy(()=>M(()=>import("./InspectorObjectPreview-DaEwQeSD.js"),__vite__mapDeps([74,1,2,63,34,35,12,13,36,16,17,4,5,6,7,8,9,10,11,21,37,38,42,15,18,19,20,22,23,24,25,26,27,28,29,32,33,39,40,41,43,44,45,46,47,48,49,31,14,50,51,52,53,54,55,30,56,57,58,60,61,62])).then(t=>({default:t.InspectorObjectPreview})));function Br(t,e){return{preview:t.isCamera?null:({displayName:r,previewKey:n,actions:o})=>a=>g.createElement(Xe,{picture:()=>g.createElement(zr,{previewKey:n,object:t,displayName:r,fill:!0}),previewKey:n,actions:o,...a?{mode:a}:{}}),instanced:Er(t,jt(t)),assetDocument:e}}function Hr(){return Ze((t,e)=>{const r=j();if(!r)return null;const n=q(t,r.objectMap,e);return n?Br(n,r.objectMap.has(e)?{open:()=>et("asset-editor:entity",r.shell,{entityId:e,title:n.name||e})}:null):null})}const he=new WeakMap,ee={activeAuthoring(t){let e=he.get(t);return e||(e=rt(t,"No authoring adapter"),he.set(t,e)),e},panelAuthoring(t){return ee.activeAuthoring(t)},pick(){return null},toolOwner:tt,toolOwnerPainted(){return!0},threeSurfaceShowing(t,e){return!e.rects&&typeof e.hierarchy.object3D=="function"},threeViewportRootId(){return null},applyRootHiddenVisibility(){},suppressRootEnvironment(){}};let H=ee;function Wr(t){if(H!==t){if(H!==ee)throw new Error("A viewport authoring policy is already installed.");H=t}}function An(){return H}const ve=0,qr=16777215,ge=10;function Ur(t){return Nt(t,"Compare reference GLB")}function we(t,e){const r=Ht(t),n=new oe;n.rotation.y=Wt(e),n.add(r);const o=new oe;o.add(n),o.updateWorldMatrix(!0,!0);const a=qt(o,"front"),s=[a.center.x-a.size.x/2,a.center.y-a.size.y/2,a.center.z-a.size.z/2],i=[a.center.x+a.size.x/2,a.center.y+a.size.y/2,a.center.z+a.size.z/2],u=Ut(s,i);return o.scale.setScalar(u.scale),o.position.set(...u.position),o.updateWorldMatrix(!0,!0),{wrapper:o,dispose:()=>Gt(r)}}function Gr(t,e){const r=$t,n=r*e,o=new yt(-n,n,r,-r,.01,ge*4),a=t==="front"?new A(0,0,1):new A(1,0,0);return o.position.set(0,ue,0).addScaledVector(a,ge),o.up.set(0,1,0),o.lookAt(0,ue,0),o.updateProjectionMatrix(),o.updateMatrixWorld(!0),o}function $r(t,e,r={}){const n=se(r.width),o=se(r.height),a=n/o,s=[];let i=null;try{const u=we(t,ie(t));s.push(u.dispose);const m=we(e,r.refForward??ie(e));s.push(m.dispose);const P=new B({color:qr});s.push(()=>P.dispose());const T=f=>{const c=new wt;return c.background=new Z(ve),c.overrideMaterial=P,c.add(f),c},d=T(u.wrapper),w=T(m.wrapper),b=Pe(new Ee({antialias:!1,alpha:!1,preserveDrawingBuffer:!0}));i=b,b.setPixelRatio(1),b.toneMapping=Me,b.setClearColor(ve,1),b.setSize(n,o,!1);const k=document.createElement("canvas");k.width=n,k.height=o;const _=k.getContext("2d");if(!_)throw new Error("Unable to create the compare readback canvas.");const E=(f,c,D,v)=>{b.render(f,c),_.clearRect(0,0,n,o),_.drawImage(b.domElement,0,0);const S=_.getImageData(0,0,n,o).data,R=Lt(S,n*o);if(!R.some(te=>te!==0))throw new Error(`Compare ${v} view rendered an empty ${D} silhouette — nothing to score.`);return{image:{base64:ce(k),mimeType:"image/png"},mask:R}},h=document.createElement("canvas");h.width=n,h.height=o;const C=h.getContext("2d");if(!C)throw new Error("Unable to create the compare overlay canvas.");const x=[];for(const f of Ft){const c=Gr(f,a),D=E(d,c,"asset",f),v=E(w,c,"reference",f),S=zt(D.mask,v.mask);C.putImageData(new ImageData(Bt(D.mask,v.mask),n,o),0,0),x.push({view:f,iou:S.iou,overlay:{base64:ce(h),mimeType:"image/png"},asset:D.image,ref:v.image})}return{width:n,height:o,views:x}}finally{i?.dispose(),i?.forceContextLoss();for(const u of s.reverse())u()}}async function Qr(t,e,r={}){const n=await Vt(t);try{return await je(n,e,r)}finally{Ie(n)}}async function je(t,e,r={}){const n=await Ur(e);try{return $r(t,n,r)}finally{Ie(n)}}async function Yr(t,e){const r=e.assetPath,n=e.entityId,o=e.glbBase64;if(+(typeof r=="string")+ +(typeof n=="string")+ +(typeof o=="string")!==1)return{ok:!1,error:"capture-asset-preview requires exactly one of assetPath, entityId or glbBase64."};const s=e.width,i=e.height,u=e.background,m=e.shots,P=e.shotSet,T=e.forward,d=e.compare,w=e.stage,b=e.camera,k=e.pose;if(s!==void 0&&typeof s!="number"||i!==void 0&&typeof i!="number"||u!==void 0&&u!=="neutral"&&u!=="transparent"||m!==void 0&&m!=="source")return{ok:!1,error:"Invalid asset preview dimensions, background, or shots mode."};if(w!==void 0&&w!=="lab"&&w!=="scene")return{ok:!1,error:`capture-asset-preview stage must be "lab" or "scene", got ${String(w)}.`};if(P!==void 0&&m!==void 0)return{ok:!1,error:"capture-asset-preview cannot combine a shotSet definition with a shots mode."};const _=nt("capture-asset-preview",b);if(typeof _=="string")return{ok:!1,error:_};const E=ot("capture-asset-preview",k);if(typeof E=="string")return{ok:!1,error:E};if((_||E)&&(m!==void 0||P!==void 0||d!==void 0||w==="scene"))return{ok:!1,error:'capture-asset-preview cannot combine camera/pose with a shots mode, a shotSet definition, compare, or stage "scene" — those legs stage their own cameras and poses.'};let h;if(P!==void 0)try{h=Qt(P)}catch(c){return{ok:!1,error:c instanceof Error?c.message:String(c)}}const C=$(T);if(m==="source"&&C===null)return{ok:!1,error:"capture-asset-preview --shots source requires a non-degenerate forward [x,y,z]."};if(d!==void 0){if(m!==void 0||h!==void 0)return{ok:!1,error:"capture-asset-preview cannot combine compare with shots."};if(typeof d!="object"||d===null||typeof d.glbBase64!="string"||d.forward!==void 0&&$(d.forward)===null)return{ok:!1,error:"capture-asset-preview compare requires { glbBase64: string, forward?: [x, y, z] } with a non-degenerate ground-plane forward."}}if(typeof o=="string"){if(m!==void 0||d!==void 0)return{ok:!1,error:"capture-asset-preview cannot combine glbBase64 with a named shots mode or compare."};if(w==="scene")return{ok:!1,error:'capture-asset-preview stage "scene" photographs a live scene entity — glbBase64 bytes stand nowhere in the scene.'}}const x=w==="scene"?t.scene:null;if(w==="scene"){if(typeof n!="string")return{ok:!1,error:'capture-asset-preview stage "scene" photographs a live scene entity — pass entityId, not assetPath.'};if(m!==void 0||h!==void 0||d!==void 0)return{ok:!1,error:'capture-asset-preview cannot combine stage "scene" with a shots mode, a shotSet definition or compare.'};if(!x)return{ok:!1,error:'capture-asset-preview stage "scene" requires a bound viewport scene; none is bound yet.'}}const f=typeof n=="string"?q(_e(t.shell),t.objectMap,n):null;if(typeof n=="string"&&!f)return{ok:!1,error:`Entity not found: ${n}`};try{const c={...typeof s=="number"?{width:s}:{},...typeof i=="number"?{height:i}:{},...u?{background:u}:{},..._?{camera:_}:{},...E?{pose:E}:{}};if(d!==void 0){const v=d,S=$(v.forward),R={...typeof s=="number"?{width:s}:{},...typeof i=="number"?{height:i}:{},...S?{refForward:S}:{}};return{ok:!0,data:{...typeof r=="string"?await Qr(r,v.glbBase64,R):await je(f,v.glbBase64,R)}}}return h!==void 0?{ok:!0,data:{...typeof o=="string"?await Yt(o,h,c):typeof r=="string"?await Jt(r,h,c):Kt(f,h,c)}}:m==="source"?{ok:!0,data:{...typeof r=="string"?await Zt(r,C,c):Xt(f,C,c)}}:x?{ok:!0,data:{...er(f,x,c)}}:typeof o=="string"?{ok:!0,data:{...await tr(o,c)}}:{ok:!0,data:{...typeof r=="string"?await rr(r,c):nr(f,c)}}}catch(c){return{ok:!1,error:c instanceof Error?c.message:String(c)}}}const Ve=256;function Jr(t){const e=Math.min(1,Math.max(0,t));return e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055}function Y(t,e,r){const n=Math.hypot(t,e,r)||1;return[t/n,e/n,r/n]}function Kr(t=Ve){const e=document.createElement("canvas");e.width=t,e.height=t;const r=e.getContext("2d");if(!r)return e;const n=r.createImageData(t,t),o=Y(-.45,.62,.64),a=Y(.65,-.35,.5),s=Y(o[0],o[1],o[2]+1),i=[.7,.69,.68],u=[.34,.4,.52],m=[.85,.88,1];for(let P=0;P<t;P++)for(let T=0;T<t;T++){const d=(T+.5)/t/.5-1,w=1-(P+.5)/t/.5,b=d*d+w*w,k=b>1,_=k?1/Math.sqrt(b):1,E=d*_,h=w*_,C=k?0:Math.sqrt(Math.max(0,1-b)),x=Math.max(0,E*o[0]+h*o[1]+C*o[2]),f=Math.max(0,E*a[0]+h*a[1]+C*a[2]),c=Math.max(0,E*s[0]+h*s[1]+C*s[2])**42*.5,D=(1-C)**3.2*.4,v=(P*t+T)*4;for(let S=0;S<3;S++){const R=i[S]*(.16+.8*x)+u[S]*.3*f+m[S]*D+c;n.data[v+S]=Math.round(Jr(R)*255)}n.data[v+3]=255}return r.putImageData(n,0,0),e}function Zr(t=Ve){const e=new bt(Kr(t));return e.colorSpace=Ce,e.minFilter=ae,e.magFilter=ae,e.generateMipmaps=!1,e.needsUpdate=!0,e}const ye=["solid","preview","rendered","clay","unlit","wireframe","matcap","normals","overdraw"];function Xr(t){return t.color?.clone()??new Z(12502993)}function J(t,e){return t[e]??null}class Tn{_derived=new Map;_normals=new _t;_matcap=null;_matcapTexture=null;_overdraw=new B({color:16777215,transparent:!0,opacity:.08,depthTest:!1,depthWrite:!1,blending:Pt,side:St,toneMapped:!1});render(e,r,n,o=()=>!0){if(r==="solid"||r==="preview"||r==="rendered"){n();return}const a=[];e.traverse(s=>{const i=s;!i.isMesh||!i.material||!o(i)||(a.push({mesh:i,material:i.material}),i.material=Array.isArray(i.material)?i.material.map(u=>this._materialFor(u,r)):this._materialFor(i.material,r))});try{n()}finally{for(const{mesh:s,material:i}of a)s.material=i}}dispose(){for(const e of this._derived.values())e.clay.dispose(),e.unlit.dispose(),e.wireframe.dispose();this._derived.clear(),this._normals.dispose(),this._overdraw.dispose(),this._matcap?.dispose(),this._matcapTexture?.dispose(),this._matcap=null,this._matcapTexture=null}_materialFor(e,r){if(r==="normals")return this._normals;if(r==="overdraw")return this._overdraw;if(r==="matcap")return this._matcap||(this._matcapTexture=Zr(),this._matcap=new Et({matcap:this._matcapTexture,toneMapped:!1})),this._matcap;let n=this._derived.get(e);if(!n){const o={color:Xr(e),map:J(e,"map"),alphaMap:J(e,"alphaMap"),alphaTest:e.alphaTest,opacity:e.opacity,transparent:e.transparent,side:e.side,depthTest:e.depthTest,depthWrite:e.depthWrite,vertexColors:!!e.vertexColors,fog:e.fog??!0};n={clay:new Mt({color:11450048,roughness:.82,metalness:0,flatShading:!0,alphaMap:J(e,"alphaMap"),alphaTest:e.alphaTest,opacity:e.opacity,transparent:e.transparent,side:e.side,depthTest:e.depthTest,depthWrite:e.depthWrite}),unlit:new B(o),wireframe:new B({...o,wireframe:!0})},this._derived.set(e,n)}return n[r]}}function I(){const t=F();return t?Te(t):null}function l(t,e,r="none"){return{...e===void 0?{}:{timeoutMs:e},derivedRefresh:r,handle:n=>{const o=j();return o?t(o,n):{ok:!1,error:`${n.type} needs an editor session; none has opened yet.`}}}}const p={ok:!0},en={"focus-entity":l((t,e)=>(I()?.frameIds([e.id])||t.shell.focusOnEntity(e.id),p)),"frame-entity":l((t,e)=>{const r=e.id;if(typeof r!="string"||r.length===0)return{ok:!1,error:'frame-entity requires a string "id" (the entity to frame).'};const n=I();if(n)return n.frameIds([r])?p:{ok:!1,error:`Entity not found: ${r}`,data:{code:"ENTITY_NOT_FOUND"}};const o=_e(t.shell);return o.hierarchy.node(r)!==null&&o.rects||q(o,t.objectMap,r)?(t.shell.focusOnEntity(r),p):{ok:!1,error:`Entity not found: ${r}`,data:{code:"ENTITY_NOT_FOUND"}}}),"focus-selection":l(t=>(I()?.frameSelection()||t.shell.focusOnSelection(),p)),"view-preset":l((t,e)=>{const r=e.preset,n=["top","front","right","perspective"];if(typeof r!="string"||!n.includes(r))return{ok:!1,error:`view-preset requires one of ${n.join(", ")}, got ${r===void 0?"nothing":JSON.stringify(r)}.`};const o=r,a=I();return a?a.setViewPreset(o==="perspective"?"isometric":o):t.shell.setViewPreset(o),p}),"set-camera":l((t,e)=>{const r=e.position,n=e.target,o=e.fov;if(!r||!n||typeof r.x!="number"||typeof r.y!="number"||typeof r.z!="number"||typeof n.x!="number"||typeof n.y!="number"||typeof n.z!="number")return{ok:!1,error:"set-camera requires numeric {x,y,z} position and target."};const a=I();return a?a.setCameraPose(r,n,o):t.shell.setCameraPose(r,n,o),p}),"document-orbit":l((t,e)=>be(e),12e4),"document-turntable":l((t,e)=>be(e),12e4),"document-frame":l((t,e)=>{const r=I();if(!r)return{ok:!1,error:"document-frame needs an Object3D document open and active. For the Scene viewport use `frame-entity`/`focus-selection`.",data:{code:"NO_ACTIVE_OBJECT3D_DOCUMENT"}};const n=e.fit;return n!==void 0&&(typeof n!="number"||!(n>=.1&&n<=10))?{ok:!1,error:'document-frame: "fit" must be a number in 0.1..10.'}:r.frame(typeof n=="number"?n:1)?{ok:!0,data:{...r.cameraPose()}}:{ok:!1,error:"Nothing to frame: the document subject has no measurable bounds.",data:{code:"EMPTY_FRAME_BOUNDS"}}}),"document-frame-cost":l((t,e)=>{const r=e.frames??60;if(typeof r!="number"||!Number.isInteger(r)||r<1||r>600)return{ok:!1,error:'document-frame-cost: "frames" must be a whole number in 1..600.'};const n=e.stage;if(n!==void 0&&typeof n!="string")return{ok:!1,error:'document-frame-cost: "stage" names a stage by its document id.'};const o=n??F(),a=Rt(),s=a.find(u=>u.documentId===o);if(!s)return{ok:!1,error:`document-frame-cost: no 3D stage draws ${o===null?"the active document":JSON.stringify(o)}. The mounted stages are: ${a.map(u=>u.documentId).join(", ")||"none"}.`};const i=s.rig().frameCost;return i?{ok:!0,data:{stage:s.documentId,...i(r)}}:{ok:!1,error:`document-frame-cost: the stage for ${JSON.stringify(s.documentId)} has no frame of its own to measure.`}},12e4),"capture-viewport":l(async(t,e)=>{const r=it(e);if("error"in r)return{ok:!1,error:r.error};if(t.hasAdoptedScene)try{const s=await Se().documents.captureActive(r.size);return{ok:!0,data:{base64:s.base64,mimeType:s.mimeType}}}catch(s){return{ok:!1,error:s instanceof Error?s.message:String(s)}}const n=t.captureViewportImage(r.size);if(!n)return{ok:!1,error:`This door photographs the editor's own three.js Scene viewport, and nothing has bound one (no renderer/scene/camera). A canvas-surface world (a first-party canvas root, or a PixiJS/Phaser/Babylon ingest) never binds it — it draws on its own canvas in the Game document. Capture that through \`capture-active-document\` (\`editor.captureActiveDocument()\`) or the running game through \`bridge-screenshot\` (${ct("screenshot")}).`};const o=n.indexOf(",");return{ok:!0,data:{base64:o>=0?n.slice(o+1):n,mimeType:"image/png"}}},void 0,"if-content-changed"),"capture-asset-preview":l((t,e)=>Yr(t,e),3e4,"if-content-changed"),"set-grid":l((t,e)=>{const r=F();return!r||!ne(r)?{ok:!1,error:"set-grid: the active document draws no grid."}:(st(r,e.enabled),p)}),"set-helpers":l((t,e)=>{const r=z(t.shell);return r.showHelpers!==e.enabled&&r.toggleHelpers(),p}),"set-stats":l((t,e)=>{const r=z(t.shell);return V(r).showStats!==e.enabled&&V(r).toggleStats(),p}),"set-shading-mode":l((t,e)=>{const r=I(),n=e.mode,o=r?[...ye,"uv","vertex-colors"]:ye;if(typeof n!="string"||!o.includes(n))return{ok:!1,error:`No shading mode "${String(n)}"; the modes are ${o.join(", ")}.`};if(n==="preview"||n==="rendered"){const a=F(),s=a?ne(a)?.stageKind:void 0;if(!r||!s||at(s)?.modes?.[n]?.lighting===void 0)return{ok:!1,error:`Shading mode "${n}" is lit as a stage says, and the active document's stage says nothing for it.`}}return r?r.setMode(e.mode):t.setShadingMode(e.mode),p}),"set-helper-type":l((t,e)=>{const r=z(t.shell),n=e.helperType,o=I();return o&&n==="bounds"?(o.setBounds(e.enabled),p):o&&n==="skeletons"?(o.setSkeleton(e.enabled),p):(r.helperVisibility[n]!==e.enabled&&r.toggleHelperType(n),p)}),"set-transform-mode":l((t,e)=>(t.shell.setTransformMode(e.mode),p)),"set-transform-space":l((t,e)=>(t.shell.setTransformSpace(e.space),p)),"set-snap":l((t,e)=>(t.shell.snapEnabled!==e.enabled&&t.shell.toggleSnap(),p))};async function be(t){const e=I();if(!e)return{ok:!1,error:`${t.type} needs an Object3D document open and active (a model, a live module, an entity model). Open one with \`editor.openAsset(<path>)\` first.`,data:{code:"NO_ACTIVE_OBJECT3D_DOCUMENT"}};const r=t.type==="document-orbit"?t.duration:t.seconds;return r!==void 0&&(typeof r!="number"||!(r>=0&&r<=60))?{ok:!1,error:`${t.type}: the move's length must be a number of seconds in 0..60.`}:{ok:!0,data:{...t.type==="document-orbit"?await e.orbit({...typeof t.azimuth=="number"?{azimuth:t.azimuth}:{},...typeof t.elevation=="number"?{elevation:t.elevation}:{},...typeof r=="number"?{duration:r}:{}}):await e.turntable({...typeof r=="number"?{seconds:r}:{},...typeof t.revolutions=="number"?{revolutions:t.revolutions}:{}})}}}function tn(){return Se().session.reportFacet(()=>{const t=j();if(!t)return{};const e=z(t.shell),r=F(),n=r?Te(r)?.presentation():void 0,o=V(e).cameraPose;return{showGrid:r?ut(r):!0,showHelpers:e.showHelpers,showStats:V(e).showStats,shadingMode:n?.mode??t.shadingMode,helperVisibility:{...e.helperVisibility,...n?{bounds:n.bounds,skeletons:n.skeleton}:{}},transformMode:e.transformMode,transformSpace:t.shell.transformSpace,snapEnabled:t.shell.snapEnabled,...o?{camera:{position:{x:o.position.x,y:o.position.y,z:o.position.z},target:{x:o.target.x,y:o.target.y,z:o.target.z},fov:o.fov}}:{}}})}const rn={save:t=>mt("view",t),saveThumbnail:pt},nn=new Map;let L=null;function kn(){if(L)return L;const t=[lt({Object3DPreview:mr,Object3DAuthoring:hr}),dt("three-viewport",en),gr(),Hr(),Tt(),tn(),wr(),Ar(),Fr(),ht({object:e=>j()?.objectMap.get(e)??null,objects:()=>j()?.objectMap??nn}),G("hostLive",vt),G("interactive",ir),G("inspectorPreview",Ct),ft(e=>V(e).attachStatePersistence(rn))];return Wr(dr),L=()=>{for(const e of t.reverse())e();L=null},L}export{Tn as V,Cn as a,Er as d,kn as e,Oe as i,An as v};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ToolObject3DPreview-bl5ZiSTf.js","assets/jsx-runtime-DPjLkJKQ.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/Object3DPreview-F5H47D4e.js","assets/index-BYdQuKKk.js","assets/index-nmcBqr7Y.js","assets/index-D_NuPfjr.js","assets/index-CtzuWnCS.js","assets/index-CinJrH5C.js","assets/index-FUuS4qwW.js","assets/client-DNXj_opT.js","assets/index-CPiRKiDC.css","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/OrbitControls-B13MKuwC.js","assets/asset-preview-DeoFAm2V.js","assets/editor-layers-wmPhuj0X.js","assets/workspace-arrangement-DwFkSdlq.js","assets/renderer-ownership-BovSEcLv.js","assets/hierarchy-marks-BjIT-DOf.js","assets/studio-environment-BXrrTMN4.js","assets/user-data-CJW19F-2.js","assets/KTX2Loader-CaqVE6nY.js","assets/GLTFLoader-KeoruJgS.js","assets/BufferGeometryUtils-B22h7jo4.js","assets/environment-Dg-YaLsA.js","assets/RoomEnvironment-BkknvS_I.js","assets/EXRLoader-CITMBvGd.js","assets/HDRLoader-BTGuGhVo.js","assets/bitmap-label-Ct4k6ehY.js","assets/editor-presentation-activity-CqJH4G9t.js","assets/model-thumbnail-BSBXqm11.js","assets/StageHost-DooxiRtf.js","assets/three-state-ctKrzvps.js","assets/editor-shell-store-LRVyeXM-.js","assets/output-pass-HurwNl0G.js","assets/Pass-D1MRT672.js","assets/entity-object-DWKBk3rf.js","assets/three-contract-Dkt6PmWY.js","assets/standard-viewport-dressing-DpCqZowy.js","assets/content-bounds-BzOnMMA9.js","assets/preview-renderer-BrYNFV1p.js","assets/live-mixers-B-bwLZ7c.js","assets/live-gesture-lock-DJbrjOqf.js","assets/model-inspection-CRQL0kkD.js","assets/three-viewport-presentation-Zf87KDhY.js","assets/clip-planes-CnAI6DZn.js","assets/three-D4bun8tv.js","assets/component-instance-root-z47Ib-DX.js","assets/viewport-editor-controls-BYaAZ_Ku.js","assets/LineSegments2-DN9pUfWA.js","assets/three.quarks.esm-C_HmSKXo.js","assets/scene-framing-C0vuzmLH.js","assets/object3d-document-session-registry-RFHXjepL.js","assets/source-object3d-authoring-adapter-PbUdA5Q2.js","assets/three-projection-core-DTAhpWX4.js","assets/viewport-door-BW0xEXr5.js","assets/transport-strip-CwOW82Og.js","assets/viewport-surface-status-CO8m-4fj.js","assets/ModelAssetDocument-l9npox50.js","assets/host-hierarchy-objects-BV3WqU2w.js","assets/layered-pick-C73ZQGcv.js","assets/root-stacking-BEd9ZvxC.js","assets/EntityModelDocument-Dlp-8g7D.js","assets/EnvironmentAssetDocument-CgRbt4Jo.js","assets/asset-editor-persistence-BDtXtYHv.js","assets/LutAssetDocument-Rvj1GVIa.js","assets/index-DHhMOs_s.js","assets/ShaderAssetDocument-C0I3j_bn.js","assets/ColorInput-LOPjrHkP.js","assets/LiveModuleDocument-BOR_N7Na.js","assets/Object3DDocumentViewport-C7LPv0rT.js","assets/QuarksAssetDocument-CJ55waf3.js","assets/project-provenance-BGnJXJwa.js","assets/InspectorObjectPreview-bpSm22I-.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{aH as Ne,kW as Le,kV as re,aG as Fe,lV as ze,g8 as Be,dt as He,aD as We,_ as M,ak as qe,lW as Ue,lX as Ge,lY as $e,lZ as Qe,l_ as Ye,l$ as Je,m0 as Ke,m1 as Ze,m2 as Xe,hk as et,m3 as tt,b_ as rt,m4 as nt,m5 as ot,m6 as _e,kY as z,E as ne,F as at,y as F,bL as st,m7 as it,r as Se,K as ct,G as ut,m8 as lt,m9 as dt,ma as G,T as ft,c$ as pt,kN as mt}from"./index-BYdQuKKk.js";import{r as ht}from"./host-hierarchy-objects-BV3WqU2w.js";import{m as Pe,l as vt}from"./renderer-ownership-BovSEcLv.js";import{W as Ee}from"./three.module-BLhyNg0e.js";import{cP as Me,ej as Ce,_ as Z,I as gt,fo as A,V as Ae,dp as X,cp as B,el as wt,bh as oe,d5 as yt,T as bt,c1 as ae,cu as _t,aI as St,d as Pt,ct as Et,cx as Mt}from"./three.core-3arARmh6.js";import{i as Ct}from"./preview-renderer-BrYNFV1p.js";import{a as At}from"./layered-pick-C73ZQGcv.js";import{g as W}from"./user-data-CJW19F-2.js";import{a as y}from"./jsx-runtime-DPjLkJKQ.js";import{r as g}from"./index-nmcBqr7Y.js";import{r as Tt}from"./model-thumbnail-BSBXqm11.js";import{c as kt,a as Te}from"./object3d-document-session-registry-RFHXjepL.js";import{t as j}from"./three-state-ctKrzvps.js";import{a as q}from"./entity-object-DWKBk3rf.js";import{i as ke,c as It}from"./hierarchy-marks-BjIT-DOf.js";import{a as Ot}from"./component-instance-root-z47Ib-DX.js";import{a as xt}from"./three-contract-Dkt6PmWY.js";import{t as V}from"./editor-shell-store-LRVyeXM-.js";import{d as Dt,a as U,b as Rt}from"./viewport-door-BW0xEXr5.js";import{a as jt}from"./content-bounds-BzOnMMA9.js";import{h as Vt,d as Ie,p as Nt,j as se,r as ie,s as Lt,k as ce,A as Ft,n as zt,o as Bt,b as Ht,q as Wt,m as qt,t as Ut,f as Gt,C as $t,u as ue,v as Qt,w as $,x as Yt,y as Jt,z as Kt,B as Zt,D as Xt,E as er,F as tr,c as rr,a as nr}from"./asset-preview-DeoFAm2V.js";const or=1,O=[];function K(t){const e=O.indexOf(t);e>=0&&O.splice(e,1),t.renderer.dispose(),t.renderer.forceContextLoss(),t.canvas.remove()}function ar(t,e){const r=document.createElement("canvas");r.style.width="100%",r.style.height="100%",r.style.display="block",r.width=Math.max(1,t),r.height=Math.max(1,e);const n={canvas:r,renderer:Pe(new Ee({canvas:r,antialias:!0,alpha:!0})),leased:!0,lost:!1,onContextLost:null};return r.addEventListener("webglcontextlost",()=>{n.lost=!0,n.onContextLost?.();const o=O.indexOf(n);o>=0&&O.splice(o,1),n.leased||K(n)}),O.push(n),n}function sr(t){const{renderer:e}=t;e.setRenderTarget(null),e.setScissorTest(!1),e.setViewport(0,0,Math.max(1,t.canvas.width),Math.max(1,t.canvas.height)),e.setScissor(0,0,Math.max(1,t.canvas.width),Math.max(1,t.canvas.height)),e.autoClear=!0,e.autoClearColor=!0,e.autoClearDepth=!0,e.autoClearStencil=!0,e.sortObjects=!0,e.localClippingEnabled=!1,e.clippingPlanes=[],e.shadowMap.enabled=!1,e.shadowMap.autoUpdate=!0,e.toneMapping=Me,e.toneMappingExposure=1,e.outputColorSpace=Ce,e.xr.enabled=!1,e.setAnimationLoop(null),e.setClearColor(0,0),e.clear(!0,!0,!0),e.info.reset()}function Cn(t,e,r){let n=O.find(s=>!s.leased&&!s.lost);n||(n=ar(t,e)),n.leased=!0,n.onContextLost=r??null;const o=n;let a=!1;return{canvas:o.canvas,renderer:o.renderer,release(){if(a)return;if(a=!0,o.leased=!1,o.onContextLost=null,o.canvas.remove(),o.lost){K(o);return}sr(o);const s=O.filter(i=>!i.leased&&!i.lost);for(const i of s.slice(or))K(i)}}}function ir(){return{active:O.filter(t=>t.leased&&!t.lost).length,idle:O.filter(t=>!t.leased&&!t.lost).length}}function cr(t,e){if(e!==null&&Ne(e))for(const n of t.values())n.visible=!1}const ur=new Z("#aaaaaa");function lr(t){t.background=ur,t.fog=null,t.environment=null,t.traverse(e=>{W(e,"envObject")&&(e.visible=!1)})}const dr={activeAuthoring:t=>We(t),panelAuthoring:t=>He(t).adapter,pick:(t,e,r,n)=>At(t,e,r,{intent:n}),toolOwner:(t,e)=>Be(t,e),toolOwnerPainted:(t,e)=>re(t)&&ze(t,e),threeSurfaceShowing:(t,e)=>re(t)&&(e instanceof Fe?e.childAdapters().some(r=>r.kind==="three"):!e.rects&&typeof e.hierarchy.object3D=="function"),threeViewportRootId:t=>Le(t),applyRootHiddenVisibility:cr,suppressRootEnvironment:lr},fr=g.lazy(async()=>({default:(await M(async()=>{const{ToolObject3DPreview:t}=await import("./ToolObject3DPreview-bl5ZiSTf.js");return{ToolObject3DPreview:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]))).ToolObject3DPreview})),pr=g.lazy(async()=>({default:(await M(async()=>{const{ToolObject3DAuthoring:t}=await import("./StageHost-DooxiRtf.js").then(e=>e.S);return{ToolObject3DAuthoring:t}},__vite__mapDeps([32,4,5,2,6,1,7,8,9,10,11,33,34,35,12,13,36,16,17,21,37,38,39,40,19,25,26,27,28,41,18,42,43,44,45,46,47,48,49,31,20,22,23,24,14,50,51,52,53,54,55,30,56,57,58]))).ToolObject3DAuthoring}));function mr(t){return y.jsx(g.Suspense,{fallback:y.jsx("div",{style:{minHeight:240},children:"Loading 3D preview…"}),children:y.jsx(fr,{...t})})}function hr(t){return g.useEffect(()=>qe(t.documentId),[t.documentId]),y.jsx(g.Suspense,{fallback:y.jsx("div",{style:{minHeight:240},children:"Loading 3D authoring surface…"}),children:y.jsx(pr,{...t})})}const le={model:g.lazy(async()=>{const{ModelAssetDocument:t}=await M(async()=>{const{ModelAssetDocument:e}=await import("./ModelAssetDocument-l9npox50.js");return{ModelAssetDocument:e}},__vite__mapDeps([59,1,2,5,6,7,8,4,9,10,11,15,16,17,18,19,20,21,22,12,13,23,24,25,26,27,28,29,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,14,50,51,52,53,54,55,30,56,57,58,60,61,62]));return{default:e=>y.jsx(t,{documentId:e.documentId,assetPath:e.assetPath,displayName:e.displayName,active:e.active})}}),"entity-model":g.lazy(async()=>{const{EntityModelDocument:t}=await M(async()=>{const{EntityModelDocument:e}=await import("./EntityModelDocument-Dlp-8g7D.js");return{EntityModelDocument:e}},__vite__mapDeps([63,1,2,34,35,12,13,36,16,17,4,5,6,7,8,9,10,11,21,37,38,42,15,18,19,20,22,23,24,25,26,27,28,29,32,33,39,40,41,43,44,45,46,47,48,49,31,14,50,51,52,53,54,55,30,56,57,58,60,61,62]));return{default:e=>y.jsx(t,{documentId:e.documentId,entityId:e.entityId??"",displayName:e.displayName,active:e.active})}}),environment:g.lazy(async()=>{const{EnvironmentAssetDocument:t}=await M(async()=>{const{EnvironmentAssetDocument:e}=await import("./EnvironmentAssetDocument-CgRbt4Jo.js");return{EnvironmentAssetDocument:e}},__vite__mapDeps([64,1,2,4,5,6,7,8,9,10,11,12,13,14,27,28,65]));return{default:e=>y.jsx(t,{documentId:e.documentId,assetPath:e.assetPath,active:e.active})}}),lut:g.lazy(async()=>{const{LutAssetDocument:t}=await M(async()=>{const{LutAssetDocument:e}=await import("./LutAssetDocument-Rvj1GVIa.js");return{LutAssetDocument:e}},__vite__mapDeps([66,1,2,4,5,6,7,8,9,10,11,67,12,13,65]));return{default:e=>y.jsx(t,{documentId:e.documentId,assetPath:e.assetPath,active:e.active})}}),shader:g.lazy(async()=>{const{ShaderAssetDocument:t}=await M(async()=>{const{ShaderAssetDocument:e}=await import("./ShaderAssetDocument-C0I3j_bn.js");return{ShaderAssetDocument:e}},__vite__mapDeps([68,1,2,4,5,6,7,8,9,10,11,69,12,13,65]));return{default:e=>y.jsx(t,{documentId:e.documentId,assetPath:e.assetPath,active:e.active})}}),"model-preview":g.lazy(async()=>{const{Object3DPreview:t}=await M(async()=>{const{Object3DPreview:e}=await import("./Object3DPreview-F5H47D4e.js");return{Object3DPreview:e}},__vite__mapDeps([3,4,5,2,6,1,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]));return{default:e=>y.jsx(t,{assetPath:e.assetPath,...e.materialPath?{materialPath:e.materialPath}:{},displayName:e.displayName})}}),module:g.lazy(async()=>{const{LiveModuleDocument:t}=await M(async()=>{const{LiveModuleDocument:e}=await import("./LiveModuleDocument-BOR_N7Na.js");return{LiveModuleDocument:e}},__vite__mapDeps([70,1,2,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,12,13,23,24,25,26,27,28,29,53,71,58,39,40]));return{default:e=>e.projectRoot?y.jsx(t,{documentId:e.documentId,projectRoot:e.projectRoot,modulePath:(e.assetPath.split(/[?#]/,1)[0]??e.assetPath).replace(/^\//,""),displayName:e.displayName,active:e.active,fallback:e.fallback}):e.fallback}})},vr={recognize:async(t,e)=>(await M(async()=>{const{loadNativeQuarksJsonSource:r}=await import("./QuarksAssetDocument-CJ55waf3.js");return{loadNativeQuarksJsonSource:r}},__vite__mapDeps([72,1,2,5,6,7,8,4,9,10,11,20,21,17,22,12,13,23,24,25,26,27,28,51,73,32,33,34,35,36,16,37,38,39,40,19,41,18,42,43,44,45,46,47,48,49,31,14,50,52,53,54,55,30,56,57,58,60,61,62,15,29]))).loadNativeQuarksJsonSource(t,e),Viewer:g.lazy(async()=>{const{QuarksAssetDocument:t}=await M(async()=>{const{QuarksAssetDocument:e}=await import("./QuarksAssetDocument-CJ55waf3.js");return{QuarksAssetDocument:e}},__vite__mapDeps([72,1,2,5,6,7,8,4,9,10,11,20,21,17,22,12,13,23,24,25,26,27,28,51,73,32,33,34,35,36,16,37,38,39,40,19,41,18,42,43,44,45,46,47,48,49,31,14,50,52,53,54,55,30,56,57,58,60,61,62,15,29]));return{default:e=>y.jsx(t,{documentId:e.documentId,assetPath:e.assetPath,displayName:e.displayName,active:e.active,source:e.content})}})};function gr(){const t=[...Object.keys(le).map(e=>Ue(e,le[e])),Ge(vr)];return()=>{for(const e of t)e()}}async function de(t){const e=new Image;return e.src=t,await e.decode(),e}function wr(){return $e((t,e)=>{const r=j();if(r&&r.viewportCanvas()===t)return(async()=>{const o=await Qe(t);if(o)return o;const a=r.captureViewportImage(e);return a?de(a):null})();const n=kt().find(o=>o.renderer.domElement===t);return n?(async()=>{const o=await n.requestPresentedFrame();if(o)return o;const a=n.captureImage(e);return a?de(a):null})():null})}function yr(t){const e=It(t);if(e||ke(t)||W(t,"authoringRoot")===!0||!Ot(t))return e;const r=W(t,"authoringComponent");return typeof r=="string"&&r?r:void 0}function br(t){if(typeof t.object3D!="function")return Ye;const r=new Map;return n=>{if(r.has(n))return r.get(n);const o=xt(t,n),a=o?{componentRoot:yr(o),authoredEntity:W(o,"authoringRoot")===!0,builtInternal:ke(o)}:void 0;return r.set(n,a),a}}const _r=1e-4,Sr="World-anchored — content is placed in world space by the game each frame; moving this container offsets future placements away from their source.";function Oe(t){if(!t)return 0;const e=t;if(e.isInstancedMesh!==!0)return 0;const r=e.count;return typeof r=="number"&&r>0?r:0}function Pr(t){const e=t.elements;for(let r=0;r<16;r++){const n=r%5===0?1:0,o=e[r];if(!Number.isFinite(o)||Math.abs(o-n)>_r)return!1}return!0}const fe=new gt,pe=new A;function Er(t,e){const r=Oe(t);if(r===0)return null;const n=Mr(t,e);return{units:r,detail:xe(r),worldAnchored:n,note:n?Sr:null}}function Mr(t,e){if(!e||e.isEmpty()||!Pr(t.matrixWorld))return!1;const r=t.geometry;return r.boundingBox===null&&r.computeBoundingBox(),r.boundingBox?(fe.copy(r.boundingBox),e.getCenter(pe),!fe.containsPoint(pe)):!1}function Cr(t){const e=Oe(t);return e===0?null:xe(e)}function xe(t){return`${t} instanced unit${t===1?"":"s"}`}function Ar(){return Je({detail:(t,e,r)=>Cr(q(t,V(r).objectMap,e)),marks:t=>br(t),structureLog:t=>{const e=V(t);return{epoch:()=>e.gizmoEpoch,parentChangesSince:r=>e.ingestObjectMapChangesSince(r)}}})}function Tr(t){return Math.min(1600,Math.max(800,900+t*25))}function kr(t){return t<.5?4*t*t*t:1-(-2*t+2)**3/2}function De(t,e,r=new A(0,1,0)){const n=new A().subVectors(e,t),o=n.length();if(o<1e-6)return[t.clone(),t.clone(),e.clone(),e.clone()];const a=Math.min(o*.18,6),s=new A().crossVectors(n,r);s.lengthSq()>1e-9?s.normalize().multiplyScalar(Math.min(o*.08,2.5)):s.set(0,0,0);const i=r.clone().normalize().multiplyScalar(a),u=t.clone().addScaledVector(n,.3).add(i).add(s),m=e.clone().addScaledVector(n,-.3).addScaledVector(i,.6).addScaledVector(s,.5);return[t.clone(),u,m,e.clone()]}const Ir=1<<31;function Or(t){return(t.layers.mask&Ir)!==0||/gizmo/i.test(t.name)}function Re(t){if(Or(t))return null;if(t.isCamera)return t;for(const e of t.children){const r=Re(e);if(r)return r}return null}function xr(t,e,r){const n=new A,o=new X;return e.getWorldPosition(n),e.getWorldQuaternion(o),{entityId:t,position:n.toArray(),quaternion:o.toArray(),fov:r}}function Dr(t){for(const[e,r]of t.objectMap){const n=Re(r);if(!n)continue;const o=n;return xr(e,n,o.isPerspectiveCamera?o.fov:60)}return null}function Rr(t){t.curve=new Ae(De(t.startPos,t.endPos))}let N=null;function jr(t){const e=U(),r=j()?.objectMap,n=r?Dr({objectMap:r}):null;if(!n||!e)return!1;const o=e.camera.position.clone(),a=new A().fromArray(n.position);return N={runtime:{startPos:o,startQuat:e.camera.quaternion.clone(),startFov:e.camera.fov,endPos:a,endQuat:new X().fromArray(n.quaternion),endFov:n.fov,curve:new Ae(De(o,a)),startedAt:performance.now(),durationMs:Tr(o.distanceTo(a)),landed:!1},snapshot:{position:e.camera.position.clone(),target:e.orbit.target.clone(),up:e.camera.up.clone(),fov:e.camera.fov},onLanded:t,getLiveCamera:null,driving:!0},e.orbit.enabled=!1,!0}function Vr(){const t=U(),e=N;if(!e||(e.driving=!1,!t))return;const r=t.camera,n=new A(0,0,-1).applyQuaternion(r.quaternion),o=Math.max(1,e.snapshot.position.distanceTo(e.snapshot.target));t.orbit.target.copy(r.position).addScaledVector(n,o),r.up.set(0,1,0).applyQuaternion(r.quaternion),t.orbit.enabled=!0}function Nr(){const t=N;if(!t)return;N=null;const e=U();if(!e)return;const r=t.snapshot;e.camera.position.copy(r.position),e.orbit.target.copy(r.target),e.camera.up.copy(r.up),e.camera.lookAt(r.target),e.camera.fov!==r.fov&&(e.camera.fov=r.fov,e.camera.updateProjectionMatrix()),e.orbit.enabled=!0,e.orbit.update()}const Q=new A,me=new X;Dt(Lr);function Lr(){const t=N,e=U();if(!t||!e||!t.driving)return;const r=t.runtime,n=t.getLiveCamera?.()??null,o=n?.isObject3D?n:null;if(o){o.getWorldPosition(Q),o.getWorldQuaternion(me),Q.distanceToSquared(r.endPos)>1e-8&&(r.endPos.copy(Q),Rr(r)),r.endQuat.copy(me);const u=o.fov;typeof u=="number"&&(r.endFov=u)}const a=e.camera;if(r.landed){a.position.copy(r.endPos),a.quaternion.copy(r.endQuat),a.fov!==r.endFov&&(a.fov=r.endFov,a.updateProjectionMatrix());return}const s=Math.min(1,(performance.now()-r.startedAt)/r.durationMs),i=kr(s);a.position.copy(r.curve.getPoint(i)),a.quaternion.slerpQuaternions(r.startQuat,r.endQuat,i),a.fov=r.startFov+(r.endFov-r.startFov)*i,a.updateProjectionMatrix(),s>=1&&(r.landed=!0,t.onLanded())}function Fr(){return Ke({begin:jr,track:t=>{N&&(N.getLiveCamera=t)},settle:Vr,end:Nr})}const zr=g.lazy(()=>M(()=>import("./InspectorObjectPreview-bpSm22I-.js"),__vite__mapDeps([74,1,2,63,34,35,12,13,36,16,17,4,5,6,7,8,9,10,11,21,37,38,42,15,18,19,20,22,23,24,25,26,27,28,29,32,33,39,40,41,43,44,45,46,47,48,49,31,14,50,51,52,53,54,55,30,56,57,58,60,61,62])).then(t=>({default:t.InspectorObjectPreview})));function Br(t,e){return{preview:t.isCamera?null:({displayName:r,previewKey:n,actions:o})=>a=>g.createElement(Xe,{picture:()=>g.createElement(zr,{previewKey:n,object:t,displayName:r,fill:!0}),previewKey:n,actions:o,...a?{mode:a}:{}}),instanced:Er(t,jt(t)),assetDocument:e}}function Hr(){return Ze((t,e)=>{const r=j();if(!r)return null;const n=q(t,r.objectMap,e);return n?Br(n,r.objectMap.has(e)?{open:()=>et("asset-editor:entity",r.shell,{entityId:e,title:n.name||e})}:null):null})}const he=new WeakMap,ee={activeAuthoring(t){let e=he.get(t);return e||(e=rt(t,"No authoring adapter"),he.set(t,e)),e},panelAuthoring(t){return ee.activeAuthoring(t)},pick(){return null},toolOwner:tt,toolOwnerPainted(){return!0},threeSurfaceShowing(t,e){return!e.rects&&typeof e.hierarchy.object3D=="function"},threeViewportRootId(){return null},applyRootHiddenVisibility(){},suppressRootEnvironment(){}};let H=ee;function Wr(t){if(H!==t){if(H!==ee)throw new Error("A viewport authoring policy is already installed.");H=t}}function An(){return H}const ve=0,qr=16777215,ge=10;function Ur(t){return Nt(t,"Compare reference GLB")}function we(t,e){const r=Ht(t),n=new oe;n.rotation.y=Wt(e),n.add(r);const o=new oe;o.add(n),o.updateWorldMatrix(!0,!0);const a=qt(o,"front"),s=[a.center.x-a.size.x/2,a.center.y-a.size.y/2,a.center.z-a.size.z/2],i=[a.center.x+a.size.x/2,a.center.y+a.size.y/2,a.center.z+a.size.z/2],u=Ut(s,i);return o.scale.setScalar(u.scale),o.position.set(...u.position),o.updateWorldMatrix(!0,!0),{wrapper:o,dispose:()=>Gt(r)}}function Gr(t,e){const r=$t,n=r*e,o=new yt(-n,n,r,-r,.01,ge*4),a=t==="front"?new A(0,0,1):new A(1,0,0);return o.position.set(0,ue,0).addScaledVector(a,ge),o.up.set(0,1,0),o.lookAt(0,ue,0),o.updateProjectionMatrix(),o.updateMatrixWorld(!0),o}function $r(t,e,r={}){const n=se(r.width),o=se(r.height),a=n/o,s=[];let i=null;try{const u=we(t,ie(t));s.push(u.dispose);const m=we(e,r.refForward??ie(e));s.push(m.dispose);const P=new B({color:qr});s.push(()=>P.dispose());const T=f=>{const c=new wt;return c.background=new Z(ve),c.overrideMaterial=P,c.add(f),c},d=T(u.wrapper),w=T(m.wrapper),b=Pe(new Ee({antialias:!1,alpha:!1,preserveDrawingBuffer:!0}));i=b,b.setPixelRatio(1),b.toneMapping=Me,b.setClearColor(ve,1),b.setSize(n,o,!1);const k=document.createElement("canvas");k.width=n,k.height=o;const _=k.getContext("2d");if(!_)throw new Error("Unable to create the compare readback canvas.");const E=(f,c,D,v)=>{b.render(f,c),_.clearRect(0,0,n,o),_.drawImage(b.domElement,0,0);const S=_.getImageData(0,0,n,o).data,R=Lt(S,n*o);if(!R.some(te=>te!==0))throw new Error(`Compare ${v} view rendered an empty ${D} silhouette — nothing to score.`);return{image:{base64:ce(k),mimeType:"image/png"},mask:R}},h=document.createElement("canvas");h.width=n,h.height=o;const C=h.getContext("2d");if(!C)throw new Error("Unable to create the compare overlay canvas.");const x=[];for(const f of Ft){const c=Gr(f,a),D=E(d,c,"asset",f),v=E(w,c,"reference",f),S=zt(D.mask,v.mask);C.putImageData(new ImageData(Bt(D.mask,v.mask),n,o),0,0),x.push({view:f,iou:S.iou,overlay:{base64:ce(h),mimeType:"image/png"},asset:D.image,ref:v.image})}return{width:n,height:o,views:x}}finally{i?.dispose(),i?.forceContextLoss();for(const u of s.reverse())u()}}async function Qr(t,e,r={}){const n=await Vt(t);try{return await je(n,e,r)}finally{Ie(n)}}async function je(t,e,r={}){const n=await Ur(e);try{return $r(t,n,r)}finally{Ie(n)}}async function Yr(t,e){const r=e.assetPath,n=e.entityId,o=e.glbBase64;if(+(typeof r=="string")+ +(typeof n=="string")+ +(typeof o=="string")!==1)return{ok:!1,error:"capture-asset-preview requires exactly one of assetPath, entityId or glbBase64."};const s=e.width,i=e.height,u=e.background,m=e.shots,P=e.shotSet,T=e.forward,d=e.compare,w=e.stage,b=e.camera,k=e.pose;if(s!==void 0&&typeof s!="number"||i!==void 0&&typeof i!="number"||u!==void 0&&u!=="neutral"&&u!=="transparent"||m!==void 0&&m!=="source")return{ok:!1,error:"Invalid asset preview dimensions, background, or shots mode."};if(w!==void 0&&w!=="lab"&&w!=="scene")return{ok:!1,error:`capture-asset-preview stage must be "lab" or "scene", got ${String(w)}.`};if(P!==void 0&&m!==void 0)return{ok:!1,error:"capture-asset-preview cannot combine a shotSet definition with a shots mode."};const _=nt("capture-asset-preview",b);if(typeof _=="string")return{ok:!1,error:_};const E=ot("capture-asset-preview",k);if(typeof E=="string")return{ok:!1,error:E};if((_||E)&&(m!==void 0||P!==void 0||d!==void 0||w==="scene"))return{ok:!1,error:'capture-asset-preview cannot combine camera/pose with a shots mode, a shotSet definition, compare, or stage "scene" — those legs stage their own cameras and poses.'};let h;if(P!==void 0)try{h=Qt(P)}catch(c){return{ok:!1,error:c instanceof Error?c.message:String(c)}}const C=$(T);if(m==="source"&&C===null)return{ok:!1,error:"capture-asset-preview --shots source requires a non-degenerate forward [x,y,z]."};if(d!==void 0){if(m!==void 0||h!==void 0)return{ok:!1,error:"capture-asset-preview cannot combine compare with shots."};if(typeof d!="object"||d===null||typeof d.glbBase64!="string"||d.forward!==void 0&&$(d.forward)===null)return{ok:!1,error:"capture-asset-preview compare requires { glbBase64: string, forward?: [x, y, z] } with a non-degenerate ground-plane forward."}}if(typeof o=="string"){if(m!==void 0||d!==void 0)return{ok:!1,error:"capture-asset-preview cannot combine glbBase64 with a named shots mode or compare."};if(w==="scene")return{ok:!1,error:'capture-asset-preview stage "scene" photographs a live scene entity — glbBase64 bytes stand nowhere in the scene.'}}const x=w==="scene"?t.scene:null;if(w==="scene"){if(typeof n!="string")return{ok:!1,error:'capture-asset-preview stage "scene" photographs a live scene entity — pass entityId, not assetPath.'};if(m!==void 0||h!==void 0||d!==void 0)return{ok:!1,error:'capture-asset-preview cannot combine stage "scene" with a shots mode, a shotSet definition or compare.'};if(!x)return{ok:!1,error:'capture-asset-preview stage "scene" requires a bound viewport scene; none is bound yet.'}}const f=typeof n=="string"?q(_e(t.shell),t.objectMap,n):null;if(typeof n=="string"&&!f)return{ok:!1,error:`Entity not found: ${n}`};try{const c={...typeof s=="number"?{width:s}:{},...typeof i=="number"?{height:i}:{},...u?{background:u}:{},..._?{camera:_}:{},...E?{pose:E}:{}};if(d!==void 0){const v=d,S=$(v.forward),R={...typeof s=="number"?{width:s}:{},...typeof i=="number"?{height:i}:{},...S?{refForward:S}:{}};return{ok:!0,data:{...typeof r=="string"?await Qr(r,v.glbBase64,R):await je(f,v.glbBase64,R)}}}return h!==void 0?{ok:!0,data:{...typeof o=="string"?await Yt(o,h,c):typeof r=="string"?await Jt(r,h,c):Kt(f,h,c)}}:m==="source"?{ok:!0,data:{...typeof r=="string"?await Zt(r,C,c):Xt(f,C,c)}}:x?{ok:!0,data:{...er(f,x,c)}}:typeof o=="string"?{ok:!0,data:{...await tr(o,c)}}:{ok:!0,data:{...typeof r=="string"?await rr(r,c):nr(f,c)}}}catch(c){return{ok:!1,error:c instanceof Error?c.message:String(c)}}}const Ve=256;function Jr(t){const e=Math.min(1,Math.max(0,t));return e<=.0031308?e*12.92:1.055*e**(1/2.4)-.055}function Y(t,e,r){const n=Math.hypot(t,e,r)||1;return[t/n,e/n,r/n]}function Kr(t=Ve){const e=document.createElement("canvas");e.width=t,e.height=t;const r=e.getContext("2d");if(!r)return e;const n=r.createImageData(t,t),o=Y(-.45,.62,.64),a=Y(.65,-.35,.5),s=Y(o[0],o[1],o[2]+1),i=[.7,.69,.68],u=[.34,.4,.52],m=[.85,.88,1];for(let P=0;P<t;P++)for(let T=0;T<t;T++){const d=(T+.5)/t/.5-1,w=1-(P+.5)/t/.5,b=d*d+w*w,k=b>1,_=k?1/Math.sqrt(b):1,E=d*_,h=w*_,C=k?0:Math.sqrt(Math.max(0,1-b)),x=Math.max(0,E*o[0]+h*o[1]+C*o[2]),f=Math.max(0,E*a[0]+h*a[1]+C*a[2]),c=Math.max(0,E*s[0]+h*s[1]+C*s[2])**42*.5,D=(1-C)**3.2*.4,v=(P*t+T)*4;for(let S=0;S<3;S++){const R=i[S]*(.16+.8*x)+u[S]*.3*f+m[S]*D+c;n.data[v+S]=Math.round(Jr(R)*255)}n.data[v+3]=255}return r.putImageData(n,0,0),e}function Zr(t=Ve){const e=new bt(Kr(t));return e.colorSpace=Ce,e.minFilter=ae,e.magFilter=ae,e.generateMipmaps=!1,e.needsUpdate=!0,e}const ye=["solid","preview","rendered","clay","unlit","wireframe","matcap","normals","overdraw"];function Xr(t){return t.color?.clone()??new Z(12502993)}function J(t,e){return t[e]??null}class Tn{_derived=new Map;_normals=new _t;_matcap=null;_matcapTexture=null;_overdraw=new B({color:16777215,transparent:!0,opacity:.08,depthTest:!1,depthWrite:!1,blending:Pt,side:St,toneMapped:!1});render(e,r,n,o=()=>!0){if(r==="solid"||r==="preview"||r==="rendered"){n();return}const a=[];e.traverse(s=>{const i=s;!i.isMesh||!i.material||!o(i)||(a.push({mesh:i,material:i.material}),i.material=Array.isArray(i.material)?i.material.map(u=>this._materialFor(u,r)):this._materialFor(i.material,r))});try{n()}finally{for(const{mesh:s,material:i}of a)s.material=i}}dispose(){for(const e of this._derived.values())e.clay.dispose(),e.unlit.dispose(),e.wireframe.dispose();this._derived.clear(),this._normals.dispose(),this._overdraw.dispose(),this._matcap?.dispose(),this._matcapTexture?.dispose(),this._matcap=null,this._matcapTexture=null}_materialFor(e,r){if(r==="normals")return this._normals;if(r==="overdraw")return this._overdraw;if(r==="matcap")return this._matcap||(this._matcapTexture=Zr(),this._matcap=new Et({matcap:this._matcapTexture,toneMapped:!1})),this._matcap;let n=this._derived.get(e);if(!n){const o={color:Xr(e),map:J(e,"map"),alphaMap:J(e,"alphaMap"),alphaTest:e.alphaTest,opacity:e.opacity,transparent:e.transparent,side:e.side,depthTest:e.depthTest,depthWrite:e.depthWrite,vertexColors:!!e.vertexColors,fog:e.fog??!0};n={clay:new Mt({color:11450048,roughness:.82,metalness:0,flatShading:!0,alphaMap:J(e,"alphaMap"),alphaTest:e.alphaTest,opacity:e.opacity,transparent:e.transparent,side:e.side,depthTest:e.depthTest,depthWrite:e.depthWrite}),unlit:new B(o),wireframe:new B({...o,wireframe:!0})},this._derived.set(e,n)}return n[r]}}function I(){const t=F();return t?Te(t):null}function l(t,e,r="none"){return{...e===void 0?{}:{timeoutMs:e},derivedRefresh:r,handle:n=>{const o=j();return o?t(o,n):{ok:!1,error:`${n.type} needs an editor session; none has opened yet.`}}}}const p={ok:!0},en={"focus-entity":l((t,e)=>(I()?.frameIds([e.id])||t.shell.focusOnEntity(e.id),p)),"frame-entity":l((t,e)=>{const r=e.id;if(typeof r!="string"||r.length===0)return{ok:!1,error:'frame-entity requires a string "id" (the entity to frame).'};const n=I();if(n)return n.frameIds([r])?p:{ok:!1,error:`Entity not found: ${r}`,data:{code:"ENTITY_NOT_FOUND"}};const o=_e(t.shell);return o.hierarchy.node(r)!==null&&o.rects||q(o,t.objectMap,r)?(t.shell.focusOnEntity(r),p):{ok:!1,error:`Entity not found: ${r}`,data:{code:"ENTITY_NOT_FOUND"}}}),"focus-selection":l(t=>(I()?.frameSelection()||t.shell.focusOnSelection(),p)),"view-preset":l((t,e)=>{const r=e.preset,n=["top","front","right","perspective"];if(typeof r!="string"||!n.includes(r))return{ok:!1,error:`view-preset requires one of ${n.join(", ")}, got ${r===void 0?"nothing":JSON.stringify(r)}.`};const o=r,a=I();return a?a.setViewPreset(o==="perspective"?"isometric":o):t.shell.setViewPreset(o),p}),"set-camera":l((t,e)=>{const r=e.position,n=e.target,o=e.fov;if(!r||!n||typeof r.x!="number"||typeof r.y!="number"||typeof r.z!="number"||typeof n.x!="number"||typeof n.y!="number"||typeof n.z!="number")return{ok:!1,error:"set-camera requires numeric {x,y,z} position and target."};const a=I();return a?a.setCameraPose(r,n,o):t.shell.setCameraPose(r,n,o),p}),"document-orbit":l((t,e)=>be(e),12e4),"document-turntable":l((t,e)=>be(e),12e4),"document-frame":l((t,e)=>{const r=I();if(!r)return{ok:!1,error:"document-frame needs an Object3D document open and active. For the Scene viewport use `frame-entity`/`focus-selection`.",data:{code:"NO_ACTIVE_OBJECT3D_DOCUMENT"}};const n=e.fit;return n!==void 0&&(typeof n!="number"||!(n>=.1&&n<=10))?{ok:!1,error:'document-frame: "fit" must be a number in 0.1..10.'}:r.frame(typeof n=="number"?n:1)?{ok:!0,data:{...r.cameraPose()}}:{ok:!1,error:"Nothing to frame: the document subject has no measurable bounds.",data:{code:"EMPTY_FRAME_BOUNDS"}}}),"document-frame-cost":l((t,e)=>{const r=e.frames??60;if(typeof r!="number"||!Number.isInteger(r)||r<1||r>600)return{ok:!1,error:'document-frame-cost: "frames" must be a whole number in 1..600.'};const n=e.stage;if(n!==void 0&&typeof n!="string")return{ok:!1,error:'document-frame-cost: "stage" names a stage by its document id.'};const o=n??F(),a=Rt(),s=a.find(u=>u.documentId===o);if(!s)return{ok:!1,error:`document-frame-cost: no 3D stage draws ${o===null?"the active document":JSON.stringify(o)}. The mounted stages are: ${a.map(u=>u.documentId).join(", ")||"none"}.`};const i=s.rig().frameCost;return i?{ok:!0,data:{stage:s.documentId,...i(r)}}:{ok:!1,error:`document-frame-cost: the stage for ${JSON.stringify(s.documentId)} has no frame of its own to measure.`}},12e4),"capture-viewport":l(async(t,e)=>{const r=it(e);if("error"in r)return{ok:!1,error:r.error};if(t.hasAdoptedScene)try{const s=await Se().documents.captureActive(r.size);return{ok:!0,data:{base64:s.base64,mimeType:s.mimeType}}}catch(s){return{ok:!1,error:s instanceof Error?s.message:String(s)}}const n=t.captureViewportImage(r.size);if(!n)return{ok:!1,error:`This door photographs the editor's own three.js Scene viewport, and nothing has bound one (no renderer/scene/camera). A canvas-surface world (a first-party canvas root, or a PixiJS/Phaser/Babylon ingest) never binds it — it draws on its own canvas in the Game document. Capture that through \`capture-active-document\` (\`editor.captureActiveDocument()\`) or the running game through \`bridge-screenshot\` (${ct("screenshot")}).`};const o=n.indexOf(",");return{ok:!0,data:{base64:o>=0?n.slice(o+1):n,mimeType:"image/png"}}},void 0,"if-content-changed"),"capture-asset-preview":l((t,e)=>Yr(t,e),3e4,"if-content-changed"),"set-grid":l((t,e)=>{const r=F();return!r||!ne(r)?{ok:!1,error:"set-grid: the active document draws no grid."}:(st(r,e.enabled),p)}),"set-helpers":l((t,e)=>{const r=z(t.shell);return r.showHelpers!==e.enabled&&r.toggleHelpers(),p}),"set-stats":l((t,e)=>{const r=z(t.shell);return V(r).showStats!==e.enabled&&V(r).toggleStats(),p}),"set-shading-mode":l((t,e)=>{const r=I(),n=e.mode,o=r?[...ye,"uv","vertex-colors"]:ye;if(typeof n!="string"||!o.includes(n))return{ok:!1,error:`No shading mode "${String(n)}"; the modes are ${o.join(", ")}.`};if(n==="preview"||n==="rendered"){const a=F(),s=a?ne(a)?.stageKind:void 0;if(!r||!s||at(s)?.modes?.[n]?.lighting===void 0)return{ok:!1,error:`Shading mode "${n}" is lit as a stage says, and the active document's stage says nothing for it.`}}return r?r.setMode(e.mode):t.setShadingMode(e.mode),p}),"set-helper-type":l((t,e)=>{const r=z(t.shell),n=e.helperType,o=I();return o&&n==="bounds"?(o.setBounds(e.enabled),p):o&&n==="skeletons"?(o.setSkeleton(e.enabled),p):(r.helperVisibility[n]!==e.enabled&&r.toggleHelperType(n),p)}),"set-transform-mode":l((t,e)=>(t.shell.setTransformMode(e.mode),p)),"set-transform-space":l((t,e)=>(t.shell.setTransformSpace(e.space),p)),"set-snap":l((t,e)=>(t.shell.snapEnabled!==e.enabled&&t.shell.toggleSnap(),p))};async function be(t){const e=I();if(!e)return{ok:!1,error:`${t.type} needs an Object3D document open and active (a model, a live module, an entity model). Open one with \`editor.openAsset(<path>)\` first.`,data:{code:"NO_ACTIVE_OBJECT3D_DOCUMENT"}};const r=t.type==="document-orbit"?t.duration:t.seconds;return r!==void 0&&(typeof r!="number"||!(r>=0&&r<=60))?{ok:!1,error:`${t.type}: the move's length must be a number of seconds in 0..60.`}:{ok:!0,data:{...t.type==="document-orbit"?await e.orbit({...typeof t.azimuth=="number"?{azimuth:t.azimuth}:{},...typeof t.elevation=="number"?{elevation:t.elevation}:{},...typeof r=="number"?{duration:r}:{}}):await e.turntable({...typeof r=="number"?{seconds:r}:{},...typeof t.revolutions=="number"?{revolutions:t.revolutions}:{}})}}}function tn(){return Se().session.reportFacet(()=>{const t=j();if(!t)return{};const e=z(t.shell),r=F(),n=r?Te(r)?.presentation():void 0,o=V(e).cameraPose;return{showGrid:r?ut(r):!0,showHelpers:e.showHelpers,showStats:V(e).showStats,shadingMode:n?.mode??t.shadingMode,helperVisibility:{...e.helperVisibility,...n?{bounds:n.bounds,skeletons:n.skeleton}:{}},transformMode:e.transformMode,transformSpace:t.shell.transformSpace,snapEnabled:t.shell.snapEnabled,...o?{camera:{position:{x:o.position.x,y:o.position.y,z:o.position.z},target:{x:o.target.x,y:o.target.y,z:o.target.z},fov:o.fov}}:{}}})}const rn={save:t=>mt("view",t),saveThumbnail:pt},nn=new Map;let L=null;function kn(){if(L)return L;const t=[lt({Object3DPreview:mr,Object3DAuthoring:hr}),dt("three-viewport",en),gr(),Hr(),Tt(),tn(),wr(),Ar(),Fr(),ht({object:e=>j()?.objectMap.get(e)??null,objects:()=>j()?.objectMap??nn}),G("hostLive",vt),G("interactive",ir),G("inspectorPreview",Ct),ft(e=>V(e).attachStatePersistence(rn))];return Wr(dr),L=()=>{for(const e of t.reverse())e();L=null},L}export{Tn as V,Cn as a,Er as d,kn as e,Oe as i,An as v};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as r}from"./three-integration-BzTWd5jX.js";import"./index-BYdQuKKk.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./host-hierarchy-objects-BV3WqU2w.js";import"./renderer-ownership-BovSEcLv.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./preview-renderer-BrYNFV1p.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./layered-pick-C73ZQGcv.js";import"./root-stacking-BEd9ZvxC.js";import"./user-data-CJW19F-2.js";import"./workspace-arrangement-DwFkSdlq.js";import"./model-thumbnail-BSBXqm11.js";import"./studio-environment-BXrrTMN4.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./object3d-document-session-registry-RFHXjepL.js";import"./three-state-ctKrzvps.js";import"./editor-shell-store-LRVyeXM-.js";import"./output-pass-HurwNl0G.js";import"./Pass-D1MRT672.js";import"./editor-layers-wmPhuj0X.js";import"./entity-object-DWKBk3rf.js";import"./three-contract-Dkt6PmWY.js";import"./hierarchy-marks-BjIT-DOf.js";import"./component-instance-root-z47Ib-DX.js";import"./viewport-door-BW0xEXr5.js";import"./content-bounds-BzOnMMA9.js";import"./asset-preview-DeoFAm2V.js";import"./bitmap-label-Ct4k6ehY.js";const Q="workspace.service";function R(){return r()}export{Q as point,R as start};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isEditorOwnedObject as f}from"./editor-layers-
|
|
1
|
+
import{isEditorOwnedObject as f}from"./editor-layers-wmPhuj0X.js";import{o as h,n as I}from"./three-D4bun8tv.js";import{g as n}from"./user-data-CJW19F-2.js";import{fo as u,dp as O}from"./three.core-3arARmh6.js";const l=new u,p=new O,c=new u;function m(e){return e.matrixAutoUpdate===!1?(e.matrix.decompose(l,p,c),{position:l.toArray(),quaternion:p.toArray(),scale:c.toArray()}):{position:e.position.toArray(),quaternion:e.quaternion.toArray(),scale:e.scale.toArray()}}function y(e,t){return e.length===t.length&&e.every((o,s)=>o===t[s])}class v{constructor(t){this.options=t,this.selected=[...t.initial]}adopted=[];selected;current(){const t=[...this.options.store.selectedEntityIds].filter(this.options.owns);return y(t,this.adopted)||(this.adopted=t,this.selected=t,this.options.onChange?.(t)),[...this.selected]}publish(t){this.selected=[...t];const o=this.selected.filter(this.options.owns);this.adopted=o,this.options.onChange?.(o),this.options.store.selectMultiple(o)}}function q(e){if(!e)return{position:[0,0,0],rotation:[0,0,0,1],scale:[1,1,1]};const t=m(e);return{position:t.position,rotation:t.quaternion,scale:t.scale}}function a(e){return e.type==="Object3D"&&e.name===""&&h(e)===null&&e.userData.oid===void 0&&n(e,"authoringInstance")===void 0&&n(e,"authoringRoot")!==!0&&n(e,"volterComponentRoot")===void 0}class C{constructor(t){this.options=t,this.rootIdSet=new Set(t.rootIds)}rootIdSet;childObjects(t){return t.children.flatMap(o=>f(o)?[]:a(o)?this.childObjects(o):[o])}childIds(t){return this.options.projector.childIdsOf(this.childObjects(t))}rootObjects(){return this.options.rootIds.flatMap(t=>{const o=this.options.projector.objectOf(t);return o?a(o)?this.childObjects(o):[o]:[]})}rootIds(){return this.options.projector.childIdsOf(this.rootObjects())}parentId(t){const{projector:o,scene:s,documentNodeId:i}=this.options,d=o.idOf(t);if(d!==null&&this.rootIdSet.has(d))return i;let r=t.parent;for(;r&&r!==s&&a(r);)r=r.parent;return r&&r!==s?o.idOf(r)??i:i}node(t){const o=h(t);return{id:this.options.projector.idOf(t),label:o?.label||t.name||t.type||"Object3D",role:"entity",kind:I(t),...o?.typeLabel?{typeLabel:o.typeLabel}:{},parentId:this.parentId(t),childIds:this.childIds(t)}}}export{C,v as S,q as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as r}from"./editor-shell-store-
|
|
1
|
+
import{t as r}from"./editor-shell-store-LRVyeXM-.js";import{T as o,U as n,V as u}from"./index-BYdQuKKk.js";function a(t){return t===null?null:r(t)}function l(){return r(n())}function S(){return a(u())}function f(t){return o(e=>t(r(e)))}export{a,f as o,S as t,l as u};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/story-three-preview-
|
|
2
|
-
import{fr as i,_ as n,fs as a}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/story-three-preview-C-kpIz3s.js","assets/index-BYdQuKKk.js","assets/index-nmcBqr7Y.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-D_NuPfjr.js","assets/jsx-runtime-DPjLkJKQ.js","assets/index-CtzuWnCS.js","assets/index-CinJrH5C.js","assets/index-FUuS4qwW.js","assets/client-DNXj_opT.js","assets/index-CPiRKiDC.css","assets/asset-preview-DeoFAm2V.js","assets/editor-layers-wmPhuj0X.js","assets/workspace-arrangement-DwFkSdlq.js","assets/renderer-ownership-BovSEcLv.js","assets/hierarchy-marks-BjIT-DOf.js","assets/studio-environment-BXrrTMN4.js","assets/user-data-CJW19F-2.js","assets/KTX2Loader-CaqVE6nY.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/GLTFLoader-KeoruJgS.js","assets/BufferGeometryUtils-B22h7jo4.js","assets/environment-Dg-YaLsA.js","assets/RoomEnvironment-BkknvS_I.js","assets/EXRLoader-CITMBvGd.js","assets/HDRLoader-BTGuGhVo.js","assets/bitmap-label-Ct4k6ehY.js","assets/crash-null-boundary-v3a0uEgw.js","assets/events-156d8d12.esm-CYeuVCYr.js","assets/index-bQE2NA0D.js","assets/story-mount-turn-DFRTj5hi.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{fr as i,_ as n,fs as a}from"./index-BYdQuKKk.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";function s(){return typeof WebGLRenderingContext<"u"&&typeof navigator<"u"&&!navigator.userAgent.toLowerCase().includes("jsdom")}function p(){return s()?i("three",async(e,o)=>{const r=await n(()=>import("./story-three-preview-C-kpIz3s.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]));try{return await r.captureStoryComponentThumbnail(e,o)}catch(t){throw r.isStoryThreeClassificationRefusal(t)?new a("This story is not a three.js story."):t}}):()=>{}}const C="workspace.service";function T(){return p()}export{C as point,T as start};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{au as d,aw as a,av as m}from"./index-
|
|
1
|
+
import{au as d,aw as a,av as m}from"./index-BYdQuKKk.js";function u(o){return o.children.length>0}function c(o){const n=m(),t=[];for(const e of o){const r=d({modulePath:e.modulePath,regions:n});if(r.medium==="dom"){t.push(e);continue}r.via==="undeclared"&&e.modulePath&&a(e.modulePath,r.reason)}return t}export{c as d,u as m};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/spark.module-Byplgb8G.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/Pass-D1MRT672.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{kQ as Oi,kX as ht,lj as De,lk as Re,ll as je,kP as ki,lm as Di,ln as Fe,d7 as Ri,lo as Z,eX as Lt,dv as V,Z as It,lp as te,aH as ji,fC as Fi,bq as Gi,kS as Ge,kT as Be,kU as Ve,dp as We,al as Ot,lq as Bi,lr as Vi,ls as Xe,jT as Ne,bs as Wi,_ as Xi}from"./index-FuK_gLVP.js";import{a as Ni,i as st}from"./standard-viewport-dressing-wQb-yfhP.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{E as Ye,a as qe,f as Yi}from"./clip-planes-CnAI6DZn.js";import{b as qi,a as Vt,C as Qe,e as Qi,d as Zi}from"./content-bounds-CaZcBNYF.js";import{EDITOR_LAYER as P,isInEditorOwnedSubtree as J,EDITOR_SELECTION_LAYER as _e,isEditorOwnedObject as Ui}from"./editor-layers-D-sKmDua.js";import{e as ge,r as Wt,f as Ze}from"./three-CQVC3sHg.js";import{g as tt,s as W}from"./user-data-thHakLdm.js";import{d as Ki,s as $i,a as Ji}from"./model-thumbnail-n5yOZ3A6.js";import{d as Ue,e as ts}from"./model-inspection-CRXVM5Wz.js";import{OrbitControls as es}from"./OrbitControls-B13MKuwC.js";import"./three.module-BLhyNg0e.js";import{a8 as is,fo as p,dp as L,e6 as nt,cW as qt,cp as R,bX as lt,aq as O,K as I,N as mt,a$ as Mt,co as y,cZ as at,bV as Y,e$ as yt,ey as U,aV as bi,cm as ft,db as xi,aI as Qt,bh as K,eV as ss,_ as C,cj as j,aO as Si,c0 as Zt,b_ as Ci,I as xt,cP as os,c8 as ns,e as rs,ap as as,A as ls,c7 as Ee,b$ as cs,da as Ke,fd as et,el as hs,d9 as ds,d5 as $e,j as ps,aE as us,eg as fs,cg as dt,fA as ms,aF as _s,de as gs,eD as ys,bk as vs,S as ws,ex as bs,a5 as xs,ej as it,eE as Je,eF as ti,em as Ss,T as Mi,c1 as Ai}from"./three.core-3arARmh6.js";import{L as ye,a as ve,b as we}from"./LineSegments2-DN9pUfWA.js";import{B as Cs}from"./three.quarks.esm-C_HmSKXo.js";import{b as Ms,e as As}from"./live-gesture-lock-DJbrjOqf.js";import{f as Ps}from"./editor-shell-store-BMZxpcut.js";import{a as Hs,e as Es}from"./entity-object-Ai-uXVow.js";import{e as Ts,v as kt,i as zs,d as Ls}from"./three-integration-UeCSuDl8.js";import{f as ei,v as Is,s as Os}from"./scene-framing-Rs5Y89nN.js";import{a as ks}from"./live-mixers-B-bwLZ7c.js";function be(c){const t=tt(c,"triggerVolume");if(!t||typeof t!="object")return null;const{radius:e}=t;return typeof e=="number"&&Number.isFinite(e)&&e>0?{radius:e}:null}const ot=new nt,k=new p,$=new p,T=new L,ii={X:new p(1,0,0),Y:new p(0,1,0),Z:new p(0,0,1)},ee={type:"change"},si={type:"mouseDown",mode:null},oi={type:"mouseUp",mode:null},ni={type:"objectChange"};class ie extends is{constructor(t,e=null){super(void 0,e);const i=new Bs(this);this._root=i;const s=new Vs;this._gizmo=s,i.add(s);const o=new Ws;this._plane=o,i.add(o);const n=this;function r(w,S){let z=S;Object.defineProperty(n,w,{get:function(){return z!==void 0?z:S},set:function(x){z!==x&&(z=x,o[w]=x,s[w]=x,n.dispatchEvent({type:w+"-changed",value:x}),n.dispatchEvent(ee))}}),n[w]=S,o[w]=S,s[w]=S}r("camera",t),r("object",void 0),r("enabled",!0),r("axis",null),r("mode","translate"),r("translationSnap",null),r("rotationSnap",null),r("scaleSnap",null),r("space","world"),r("size",1),r("dragging",!1),r("showX",!0),r("showY",!0),r("showZ",!0),r("minX",-1/0),r("maxX",1/0),r("minY",-1/0),r("maxY",1/0),r("minZ",-1/0),r("maxZ",1/0);const l=new p,a=new p,h=new L,d=new L,f=new p,u=new L,m=new p,_=new p,g=new p,v=0,b=new p;r("worldPosition",l),r("worldPositionStart",a),r("worldQuaternion",h),r("worldQuaternionStart",d),r("cameraPosition",f),r("cameraQuaternion",u),r("pointStart",m),r("pointEnd",_),r("rotationAxis",g),r("rotationAngle",v),r("eye",b),this._offset=new p,this._startNorm=new p,this._endNorm=new p,this._cameraScale=new p,this._parentPosition=new p,this._parentQuaternion=new L,this._parentQuaternionInv=new L,this._parentScale=new p,this._worldScaleStart=new p,this._worldQuaternionInv=new L,this._worldScale=new p,this._positionStart=new p,this._quaternionStart=new L,this._scaleStart=new p,this._getPointer=Ds.bind(this),this._onPointerDown=js.bind(this),this._onPointerHover=Rs.bind(this),this._onPointerMove=Fs.bind(this),this._onPointerUp=Gs.bind(this),e!==null&&this.connect(e)}connect(t){super.connect(t),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointermove",this._onPointerHover),this.domElement.addEventListener("pointerup",this._onPointerUp),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerHover),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.style.touchAction="auto"}getHelper(){return this._root}pointerHover(t){if(this.object===void 0||this.dragging===!0)return;t!==null&&ot.setFromCamera(t,this.camera);const e=se(this._gizmo.picker[this.mode],ot);e?this.axis=e.object.name:this.axis=null}pointerDown(t){if(!(this.object===void 0||this.dragging===!0||t!=null&&t.button!==0)&&this.axis!==null){t!==null&&ot.setFromCamera(t,this.camera);const e=se(this._plane,ot,!0);e&&(this.object.updateMatrixWorld(),this.object.parent.updateMatrixWorld(),this._positionStart.copy(this.object.position),this._quaternionStart.copy(this.object.quaternion),this._scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this._worldScaleStart),this.pointStart.copy(e.point).sub(this.worldPositionStart)),this.dragging=!0,si.mode=this.mode,this.dispatchEvent(si)}}pointerMove(t){const e=this.axis,i=this.mode,s=this.object;let o=this.space;if(i==="scale"?o="local":(e==="E"||e==="XYZE"||e==="XYZ")&&(o="world"),s===void 0||e===null||this.dragging===!1||t!==null&&t.button!==-1)return;t!==null&&ot.setFromCamera(t,this.camera);const n=se(this._plane,ot,!0);if(n){if(this.pointEnd.copy(n.point).sub(this.worldPositionStart),i==="translate")this._offset.copy(this.pointEnd).sub(this.pointStart),o==="local"&&e!=="XYZ"&&this._offset.applyQuaternion(this._worldQuaternionInv),e.indexOf("X")===-1&&(this._offset.x=0),e.indexOf("Y")===-1&&(this._offset.y=0),e.indexOf("Z")===-1&&(this._offset.z=0),o==="local"&&e!=="XYZ"?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),s.position.copy(this._offset).add(this._positionStart),this.translationSnap&&(o==="local"&&(s.position.applyQuaternion(T.copy(this._quaternionStart).invert()),e.search("X")!==-1&&(s.position.x=Math.round(s.position.x/this.translationSnap)*this.translationSnap),e.search("Y")!==-1&&(s.position.y=Math.round(s.position.y/this.translationSnap)*this.translationSnap),e.search("Z")!==-1&&(s.position.z=Math.round(s.position.z/this.translationSnap)*this.translationSnap),s.position.applyQuaternion(this._quaternionStart)),o==="world"&&(s.parent&&s.position.add(k.setFromMatrixPosition(s.parent.matrixWorld)),e.search("X")!==-1&&(s.position.x=Math.round(s.position.x/this.translationSnap)*this.translationSnap),e.search("Y")!==-1&&(s.position.y=Math.round(s.position.y/this.translationSnap)*this.translationSnap),e.search("Z")!==-1&&(s.position.z=Math.round(s.position.z/this.translationSnap)*this.translationSnap),s.parent&&s.position.sub(k.setFromMatrixPosition(s.parent.matrixWorld)))),s.position.x=Math.max(this.minX,Math.min(this.maxX,s.position.x)),s.position.y=Math.max(this.minY,Math.min(this.maxY,s.position.y)),s.position.z=Math.max(this.minZ,Math.min(this.maxZ,s.position.z));else if(i==="scale"){if(e.search("XYZ")!==-1){let r=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(r*=-1),$.set(r,r,r)}else k.copy(this.pointStart),$.copy(this.pointEnd),k.applyQuaternion(this._worldQuaternionInv),$.applyQuaternion(this._worldQuaternionInv),$.divide(k),e.search("X")===-1&&($.x=1),e.search("Y")===-1&&($.y=1),e.search("Z")===-1&&($.z=1);s.scale.copy(this._scaleStart).multiply($),this.scaleSnap&&(e.search("X")!==-1&&(s.scale.x=Math.round(s.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),e.search("Y")!==-1&&(s.scale.y=Math.round(s.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),e.search("Z")!==-1&&(s.scale.z=Math.round(s.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(i==="rotate"){this._offset.copy(this.pointEnd).sub(this.pointStart);const r=20/this.worldPosition.distanceTo(k.setFromMatrixPosition(this.camera.matrixWorld));let l=!1;e==="XYZE"?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(k.copy(this.rotationAxis).cross(this.eye))*r):(e==="X"||e==="Y"||e==="Z")&&(this.rotationAxis.copy(ii[e]),k.copy(ii[e]),o==="local"&&k.applyQuaternion(this.worldQuaternion),k.cross(this.eye),k.length()===0?l=!0:this.rotationAngle=this._offset.dot(k.normalize())*r),(e==="E"||l)&&(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this._startNorm.copy(this.pointStart).normalize(),this._endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=this._endNorm.cross(this._startNorm).dot(this.eye)<0?1:-1),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),o==="local"&&e!=="E"&&e!=="XYZE"?(s.quaternion.copy(this._quaternionStart),s.quaternion.multiply(T.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),s.quaternion.copy(T.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),s.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(ee),this.dispatchEvent(ni)}}pointerUp(t){t!==null&&t.button!==0||(this.dragging&&this.axis!==null&&(oi.mode=this.mode,this.dispatchEvent(oi)),this.dragging=!1,this.axis=null)}dispose(){this.disconnect(),this._root.dispose()}attach(t){return this.object=t,this._root.visible=!0,this}detach(){return this.object=void 0,this.axis=null,this._root.visible=!1,this}reset(){this.enabled&&this.dragging&&(this.object.position.copy(this._positionStart),this.object.quaternion.copy(this._quaternionStart),this.object.scale.copy(this._scaleStart),this.dispatchEvent(ee),this.dispatchEvent(ni),this.pointStart.copy(this.pointEnd))}getRaycaster(){return ot}getMode(){return this.mode}setMode(t){this.mode=t}setTranslationSnap(t){this.translationSnap=t}setRotationSnap(t){this.rotationSnap=t}setScaleSnap(t){this.scaleSnap=t}setSize(t){this.size=t}setSpace(t){this.space=t}setColors(t,e,i,s){const o=this._gizmo.materialLib;o.xAxis.color.set(t),o.yAxis.color.set(e),o.zAxis.color.set(i),o.active.color.set(s),o.xAxisTransparent.color.set(t),o.yAxisTransparent.color.set(e),o.zAxisTransparent.color.set(i),o.activeTransparent.color.set(s),o.xAxis._color&&o.xAxis._color.set(t),o.yAxis._color&&o.yAxis._color.set(e),o.zAxis._color&&o.zAxis._color.set(i),o.active._color&&o.active._color.set(s),o.xAxisTransparent._color&&o.xAxisTransparent._color.set(t),o.yAxisTransparent._color&&o.yAxisTransparent._color.set(e),o.zAxisTransparent._color&&o.zAxisTransparent._color.set(i),o.activeTransparent._color&&o.activeTransparent._color.set(s)}}function Ds(c){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:c.button};{const t=this.domElement.getBoundingClientRect();return{x:(c.clientX-t.left)/t.width*2-1,y:-(c.clientY-t.top)/t.height*2+1,button:c.button}}}function Rs(c){if(this.enabled)switch(c.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(c));break}}function js(c){this.enabled&&(document.pointerLockElement||this.domElement.setPointerCapture(c.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.pointerHover(this._getPointer(c)),this.pointerDown(this._getPointer(c)))}function Fs(c){this.enabled&&this.pointerMove(this._getPointer(c))}function Gs(c){this.enabled&&(this.domElement.releasePointerCapture(c.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(c)))}function se(c,t,e){const i=t.intersectObject(c,!0);for(let s=0;s<i.length;s++)if(i[s].object.visible||e)return i[s];return!1}const Dt=new bi,H=new p(0,1,0),ri=new p(0,0,0),ai=new ft,Rt=new L,Xt=new L,N=new p,li=new ft,St=new p(1,0,0),rt=new p(0,1,0),Ct=new p(0,0,1),jt=new p,vt=new p,wt=new p;class Bs extends qt{constructor(t){super(),this.isTransformControlsRoot=!0,this.controls=t,this.visible=!1}updateMatrixWorld(t){const e=this.controls;e.object!==void 0&&(e.object.updateMatrixWorld(),e.object.parent===null?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):e.object.parent.matrixWorld.decompose(e._parentPosition,e._parentQuaternion,e._parentScale),e.object.matrixWorld.decompose(e.worldPosition,e.worldQuaternion,e._worldScale),e._parentQuaternionInv.copy(e._parentQuaternion).invert(),e._worldQuaternionInv.copy(e.worldQuaternion).invert()),e.camera.updateMatrixWorld(),e.camera.matrixWorld.decompose(e.cameraPosition,e.cameraQuaternion,e._cameraScale),e.camera.isOrthographicCamera?e.camera.getWorldDirection(e.eye).negate():e.eye.copy(e.cameraPosition).sub(e.worldPosition).normalize(),super.updateMatrixWorld(t)}dispose(){this.traverse(function(t){t.geometry&&t.geometry.dispose(),t.material&&t.material.dispose()})}}class Vs extends qt{constructor(){super(),this.isTransformControlsGizmo=!0,this.type="TransformControlsGizmo";const t=new R({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),e=new lt({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),i=t.clone();i.opacity=.15;const s=e.clone();s.opacity=.5;const o=t.clone();o.color.setHex(16711680);const n=t.clone();n.color.setHex(65280);const r=t.clone();r.color.setHex(255);const l=t.clone();l.color.setHex(16711680),l.opacity=.5;const a=t.clone();a.color.setHex(65280),a.opacity=.5;const h=t.clone();h.color.setHex(255),h.opacity=.5;const d=t.clone();d.opacity=.25;const f=t.clone();f.color.setHex(16776960),f.opacity=.25;const u=t.clone();u.color.setHex(16776960);const m=t.clone();m.color.setHex(7895160),this.materialLib={xAxis:o,yAxis:n,zAxis:r,active:u,xAxisTransparent:l,yAxisTransparent:a,zAxisTransparent:h,activeTransparent:f};const _=new O(0,.04,.1,12);_.translate(0,.05,0);const g=new I(.08,.08,.08);g.translate(0,.04,0);const v=new mt;v.setAttribute("position",new Mt([0,0,0,1,0,0],3));const b=new O(.0075,.0075,.5,3);b.translate(0,.25,0);function w(F,Ht){const B=new yt(F,.0075,3,64,Ht*Math.PI*2);return B.rotateY(Math.PI/2),B.rotateX(Math.PI/2),B}function S(){const F=new mt;return F.setAttribute("position",new Mt([0,0,0,1,1,1],3)),F}const z={X:[[new y(_,o),[.5,0,0],[0,0,-Math.PI/2]],[new y(_,o),[-.5,0,0],[0,0,Math.PI/2]],[new y(b,o),[0,0,0],[0,0,-Math.PI/2]]],Y:[[new y(_,n),[0,.5,0]],[new y(_,n),[0,-.5,0],[Math.PI,0,0]],[new y(b,n)]],Z:[[new y(_,r),[0,0,.5],[Math.PI/2,0,0]],[new y(_,r),[0,0,-.5],[-Math.PI/2,0,0]],[new y(b,r),null,[Math.PI/2,0,0]]],XYZ:[[new y(new at(.1,0),d),[0,0,0]]],XY:[[new y(new I(.15,.15,.01),h),[.15,.15,0]]],YZ:[[new y(new I(.15,.15,.01),l),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new y(new I(.15,.15,.01),a),[.15,0,.15],[-Math.PI/2,0,0]]]},x={X:[[new y(new O(.2,0,.6,4),i),[.3,0,0],[0,0,-Math.PI/2]],[new y(new O(.2,0,.6,4),i),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new y(new O(.2,0,.6,4),i),[0,.3,0]],[new y(new O(.2,0,.6,4),i),[0,-.3,0],[0,0,Math.PI]]],Z:[[new y(new O(.2,0,.6,4),i),[0,0,.3],[Math.PI/2,0,0]],[new y(new O(.2,0,.6,4),i),[0,0,-.3],[-Math.PI/2,0,0]]],XYZ:[[new y(new at(.2,0),i)]],XY:[[new y(new I(.2,.2,.01),i),[.15,.15,0]]],YZ:[[new y(new I(.2,.2,.01),i),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new y(new I(.2,.2,.01),i),[.15,0,.15],[-Math.PI/2,0,0]]]},A={START:[[new y(new at(.01,2),s),null,null,null,"helper"]],END:[[new y(new at(.01,2),s),null,null,null,"helper"]],DELTA:[[new Y(S(),s),null,null,null,"helper"]],X:[[new Y(v,s),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new Y(v,s),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new Y(v,s),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},M={XYZE:[[new y(w(.5,1),m),null,[0,Math.PI/2,0]]],X:[[new y(w(.5,.5),o)]],Y:[[new y(w(.5,.5),n),null,[0,0,-Math.PI/2]]],Z:[[new y(w(.5,.5),r),null,[0,Math.PI/2,0]]],E:[[new y(w(.75,1),f),null,[0,Math.PI/2,0]]]},E={AXIS:[[new Y(v,s),[-1e3,0,0],null,[1e6,1,1],"helper"]]},G={XYZE:[[new y(new U(.25,10,8),i)]],X:[[new y(new yt(.5,.1,4,24),i),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new y(new yt(.5,.1,4,24),i),[0,0,0],[Math.PI/2,0,0]]],Z:[[new y(new yt(.5,.1,4,24),i),[0,0,0],[0,0,-Math.PI/2]]],E:[[new y(new yt(.75,.1,2,24),i)]]},$t={X:[[new y(g,o),[.5,0,0],[0,0,-Math.PI/2]],[new y(b,o),[0,0,0],[0,0,-Math.PI/2]],[new y(g,o),[-.5,0,0],[0,0,Math.PI/2]]],Y:[[new y(g,n),[0,.5,0]],[new y(b,n)],[new y(g,n),[0,-.5,0],[0,0,Math.PI]]],Z:[[new y(g,r),[0,0,.5],[Math.PI/2,0,0]],[new y(b,r),[0,0,0],[Math.PI/2,0,0]],[new y(g,r),[0,0,-.5],[-Math.PI/2,0,0]]],XY:[[new y(new I(.15,.15,.01),h),[.15,.15,0]]],YZ:[[new y(new I(.15,.15,.01),l),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new y(new I(.15,.15,.01),a),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new y(new I(.1,.1,.1),d)]]},Pt={X:[[new y(new O(.2,0,.6,4),i),[.3,0,0],[0,0,-Math.PI/2]],[new y(new O(.2,0,.6,4),i),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new y(new O(.2,0,.6,4),i),[0,.3,0]],[new y(new O(.2,0,.6,4),i),[0,-.3,0],[0,0,Math.PI]]],Z:[[new y(new O(.2,0,.6,4),i),[0,0,.3],[Math.PI/2,0,0]],[new y(new O(.2,0,.6,4),i),[0,0,-.3],[-Math.PI/2,0,0]]],XY:[[new y(new I(.2,.2,.01),i),[.15,.15,0]]],YZ:[[new y(new I(.2,.2,.01),i),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new y(new I(.2,.2,.01),i),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new y(new I(.2,.2,.2),i),[0,0,0]]]},Jt={X:[[new Y(v,s),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new Y(v,s),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new Y(v,s),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]};function Q(F){const Ht=new qt;for(const B in F)for(let ct=F[B].length;ct--;){const D=F[B][ct][0].clone(),Et=F[B][ct][1],Tt=F[B][ct][2],zt=F[B][ct][3],Ii=F[B][ct][4];D.name=B,D.tag=Ii,Et&&D.position.set(Et[0],Et[1],Et[2]),Tt&&D.rotation.set(Tt[0],Tt[1],Tt[2]),zt&&D.scale.set(zt[0],zt[1],zt[2]),D.updateMatrix();const ke=D.geometry.clone();ke.applyMatrix4(D.matrix),D.geometry=ke,D.renderOrder=1/0,D.position.set(0,0,0),D.rotation.set(0,0,0),D.scale.set(1,1,1),Ht.add(D)}return Ht}this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=Q(z)),this.add(this.gizmo.rotate=Q(M)),this.add(this.gizmo.scale=Q($t)),this.add(this.picker.translate=Q(x)),this.add(this.picker.rotate=Q(G)),this.add(this.picker.scale=Q(Pt)),this.add(this.helper.translate=Q(A)),this.add(this.helper.rotate=Q(E)),this.add(this.helper.scale=Q(Jt)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}updateMatrixWorld(t){const i=(this.mode==="scale"?"local":this.space)==="local"?this.worldQuaternion:Xt;this.gizmo.translate.visible=this.mode==="translate",this.gizmo.rotate.visible=this.mode==="rotate",this.gizmo.scale.visible=this.mode==="scale",this.helper.translate.visible=this.mode==="translate",this.helper.rotate.visible=this.mode==="rotate",this.helper.scale.visible=this.mode==="scale";let s=[];s=s.concat(this.picker[this.mode].children),s=s.concat(this.gizmo[this.mode].children),s=s.concat(this.helper[this.mode].children);for(let o=0;o<s.length;o++){const n=s[o];n.visible=!0,n.rotation.set(0,0,0),n.position.copy(this.worldPosition);let r;if(this.camera.isOrthographicCamera?r=(this.camera.top-this.camera.bottom)/this.camera.zoom:r=this.worldPosition.distanceTo(this.cameraPosition)*Math.min(1.9*Math.tan(Math.PI*this.camera.fov/360)/this.camera.zoom,7),n.scale.set(1,1,1).multiplyScalar(r*this.size/4),n.tag==="helper"){n.visible=!1,n.name==="AXIS"?(n.visible=!!this.axis,this.axis==="X"&&(T.setFromEuler(Dt.set(0,0,0)),n.quaternion.copy(i).multiply(T),Math.abs(H.copy(St).applyQuaternion(i).dot(this.eye))>.9&&(n.visible=!1)),this.axis==="Y"&&(T.setFromEuler(Dt.set(0,0,Math.PI/2)),n.quaternion.copy(i).multiply(T),Math.abs(H.copy(rt).applyQuaternion(i).dot(this.eye))>.9&&(n.visible=!1)),this.axis==="Z"&&(T.setFromEuler(Dt.set(0,Math.PI/2,0)),n.quaternion.copy(i).multiply(T),Math.abs(H.copy(Ct).applyQuaternion(i).dot(this.eye))>.9&&(n.visible=!1)),this.axis==="XYZE"&&(T.setFromEuler(Dt.set(0,Math.PI/2,0)),H.copy(this.rotationAxis),n.quaternion.setFromRotationMatrix(ai.lookAt(ri,H,rt)),n.quaternion.multiply(T),n.visible=this.dragging),this.axis==="E"&&(n.visible=!1)):n.name==="START"?(n.position.copy(this.worldPositionStart),n.visible=this.dragging):n.name==="END"?(n.position.copy(this.worldPosition),n.visible=this.dragging):n.name==="DELTA"?(n.position.copy(this.worldPositionStart),n.quaternion.copy(this.worldQuaternionStart),k.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),k.applyQuaternion(this.worldQuaternionStart.clone().invert()),n.scale.copy(k),n.visible=this.dragging):(n.quaternion.copy(i),this.dragging?n.position.copy(this.worldPositionStart):n.position.copy(this.worldPosition),this.axis&&(n.visible=this.axis.search(n.name)!==-1));continue}n.quaternion.copy(i),this.mode==="translate"||this.mode==="scale"?(n.name==="X"&&Math.abs(H.copy(St).applyQuaternion(i).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="Y"&&Math.abs(H.copy(rt).applyQuaternion(i).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="Z"&&Math.abs(H.copy(Ct).applyQuaternion(i).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="XY"&&Math.abs(H.copy(Ct).applyQuaternion(i).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="YZ"&&Math.abs(H.copy(St).applyQuaternion(i).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="XZ"&&Math.abs(H.copy(rt).applyQuaternion(i).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1)):this.mode==="rotate"&&(Rt.copy(i),H.copy(this.eye).applyQuaternion(T.copy(i).invert()),n.name.search("E")!==-1&&n.quaternion.setFromRotationMatrix(ai.lookAt(this.eye,ri,rt)),n.name==="X"&&(T.setFromAxisAngle(St,Math.atan2(-H.y,H.z)),T.multiplyQuaternions(Rt,T),n.quaternion.copy(T)),n.name==="Y"&&(T.setFromAxisAngle(rt,Math.atan2(H.x,H.z)),T.multiplyQuaternions(Rt,T),n.quaternion.copy(T)),n.name==="Z"&&(T.setFromAxisAngle(Ct,Math.atan2(H.y,H.x)),T.multiplyQuaternions(Rt,T),n.quaternion.copy(T))),n.visible=n.visible&&(n.name.indexOf("X")===-1||this.showX),n.visible=n.visible&&(n.name.indexOf("Y")===-1||this.showY),n.visible=n.visible&&(n.name.indexOf("Z")===-1||this.showZ),n.visible=n.visible&&(n.name.indexOf("E")===-1||this.showX&&this.showY&&this.showZ),n.material._color=n.material._color||n.material.color.clone(),n.material._opacity=n.material._opacity||n.material.opacity,n.material.color.copy(n.material._color),n.material.opacity=n.material._opacity,this.enabled&&this.axis&&(n.name===this.axis?(n.material.color.copy(this.materialLib.active.color),n.material.opacity=1):this.axis.split("").some(function(l){return n.name===l})&&(n.material.color.copy(this.materialLib.active.color),n.material.opacity=1))}super.updateMatrixWorld(t)}}class Ws extends y{constructor(){super(new xi(1e5,1e5,2,2),new R({visible:!1,wireframe:!0,side:Qt,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(t){let e=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(e="local"),jt.copy(St).applyQuaternion(e==="local"?this.worldQuaternion:Xt),vt.copy(rt).applyQuaternion(e==="local"?this.worldQuaternion:Xt),wt.copy(Ct).applyQuaternion(e==="local"?this.worldQuaternion:Xt),H.copy(vt),this.mode){case"translate":case"scale":switch(this.axis){case"X":H.copy(this.eye).cross(jt),N.copy(jt).cross(H);break;case"Y":H.copy(this.eye).cross(vt),N.copy(vt).cross(H);break;case"Z":H.copy(this.eye).cross(wt),N.copy(wt).cross(H);break;case"XY":N.copy(wt);break;case"YZ":N.copy(jt);break;case"XZ":H.copy(wt),N.copy(vt);break;case"XYZ":case"E":N.set(0,0,0);break}break;case"rotate":default:N.set(0,0,0)}N.length()===0?this.quaternion.copy(this.cameraQuaternion):(li.lookAt(k.set(0,0,0),N,H),this.quaternion.setFromRotationMatrix(li)),super.updateMatrixWorld(t)}}const oe=new C(4441855),Ft=new C(16758858),Gt=new C(14185983),Xs=new C(16731496),ci=new C(16777215);function ne(c){return new Y(new mt,new lt({color:c,depthTest:!1,depthWrite:!1,transparent:!0,toneMapped:!1}))}function re(c,t){return new y(c,new R({color:t,depthTest:!1,depthWrite:!1,transparent:!0,toneMapped:!1}))}function ae(c,t){if(c.visible=t.length>1,!c.visible)return;let e=c.geometry.getAttribute("position");(!e||e.count!==t.length)&&(e=new Mt(t.length*3,3),c.geometry.setAttribute("position",e));for(let i=0;i<t.length;i++)e.setXYZ(i,t[i].x,t[i].y,t[i].z);e.needsUpdate=!0,c.geometry.computeBoundingSphere()}class Ns extends K{constructor(t){super(),this.source=t,this.name="Constraint Helper",this.renderOrder=999,W(this,"editorHelper",!0),W(this,"editorHelperType","constraints"),this.layers.set(P),this.refreshStructure()}selected=!1;hoveredControl=null;selectedObjects=new Set;visuals=[];setSelected(t){this.selected=t}setSelectedObjects(t){this.selectedObjects=t}controlMeshes(){return this.visuals.flatMap(t=>[t.targetHit,t.poleHit].filter(e=>e.visible))}presents(t){return t===this.source?!0:this.visuals.some(e=>{const i=e.mark.getSnapshot();return t===i.target||t===i.pole})}controlFor(t){for(const e of this.visuals){const i=e.mark.getSnapshot();if((t===e.target||t===e.targetHit)&&i.target)return{kind:"target",label:i.target.name||`${e.mark.config.label} target`,object:i.target,mesh:e.target};if((t===e.pole||t===e.poleHit)&&i.pole)return{kind:"pole",label:i.pole.name||`${e.mark.config.label} pole`,object:i.pole,mesh:e.pole}}return null}setHoveredControl(t){this.hoveredControl=t}update(t){this.refreshStructure();for(const e of this.visuals)this.updateVisual(e,t)}dispose(){this.clearVisuals(),this.removeFromParent()}refreshStructure(){const t=ge(this.source);t.length===this.visuals.length&&t.every((i,s)=>{const o=i.getSnapshot(),n=o.chain.length>0?o.chain.length:o.constrained?1:0;return this.visuals[s]?.mark===i&&this.visuals[s]?.positions.length===n})||(this.clearVisuals(),this.visuals=t.map(i=>this.makeVisual(i)))}makeVisual(t){const e=t.getSnapshot(),i=e.chain.length>0?e.chain:e.constrained?[e.constrained]:[],s=ne(oe),o=ne(Ft),n=ne(Gt),r=i.map(()=>re(new U(.035,10,7),oe)),l=re(new at(.085),Ft),a=re(new ss(.075),Gt),h=new R({transparent:!0,opacity:0,depthTest:!1,depthWrite:!1,colorWrite:!1}),d=new y(new U(.16,10,7),h),f=new y(new U(.15,10,7),h.clone());for(const u of[s,o,n,...r,l,a,d,f])u.renderOrder=this.renderOrder,u.layers.set(P),this.add(u);return{mark:t,chain:s,targetLine:o,poleLine:n,joints:r,target:l,pole:a,targetHit:d,poleHit:f,positions:i.map(()=>new p),targetPosition:new p,polePosition:new p}}updateVisual(t,e){const i=t.mark.getSnapshot(),s=i.chain.length>0?i.chain:i.constrained?[i.constrained]:[];for(let f=0;f<s.length;f++)s[f].getWorldPosition(t.positions[f]);ae(t.chain,t.positions);for(let f=0;f<t.joints.length;f++){const u=t.joints[f],m=t.positions[f];u.visible=!!m,m&&(u.position.copy(m),u.scale.setScalar(this.handleScale(e,m)))}const o=t.positions.at(-1),n=i.target?.getWorldPosition(t.targetPosition)??null,r=i.pole?.getWorldPosition(t.polePosition)??null;ae(t.targetLine,o&&n?[o,n]:[]),ae(t.poleLine,t.positions[0]&&r?[t.positions[0],r]:[]),t.target.visible=n!==null,n&&(t.target.position.copy(n),t.target.scale.setScalar(this.handleScale(e,n)*(this.hoveredControl===t.target?1.22:1))),t.targetHit.visible=n!==null,n&&(t.targetHit.position.copy(n),t.targetHit.scale.copy(t.target.scale)),t.pole.visible=r!==null,r&&(t.pole.position.copy(r),t.pole.scale.setScalar(this.handleScale(e,r)*(this.hoveredControl===t.pole?1.22:1))),t.poleHit.visible=r!==null,r&&(t.poleHit.position.copy(r),t.poleHit.scale.copy(t.pole.scale));const l=i.status==="error"||i.status==="unresolved",a=this.selected?1:.52;for(const f of[t.chain,...t.joints]){const u=f.material;u.color.copy(l?Xs:oe),u.opacity=a}const h=this.hoveredControl===t.target||i.target!==null&&this.selectedObjects.has(i.target),d=this.hoveredControl===t.pole||i.pole!==null&&this.selectedObjects.has(i.pole);t.target.material.color.copy(h?ci:Ft),t.pole.material.color.copy(d?ci:Gt),t.targetLine.material.color.copy(Ft),t.poleLine.material.color.copy(Gt),t.targetLine.material.opacity=a,t.poleLine.material.opacity=a,t.target.material.opacity=h?1:a,t.pole.material.opacity=d?1:a}handleScale(t,e){return j.clamp(t.position.distanceTo(e)/8,.65,4)}clearVisuals(){for(const t of[...this.children]){t.removeFromParent();const e=t;e.geometry.dispose();const i=Array.isArray(e.material)?e.material:[e.material];for(const s of i)s.dispose()}this.visuals=[],this.hoveredControl=null}}const Ys=new C(4892927),qs=new C(7718143),Qs=new C(16758858),Zs=new C(16777215);class Us extends K{constructor(t){super(),this.source=t,this.name="Reflection Probe Helper",this.matrixAutoUpdate=!1,this.renderOrder=998,W(this,"editorHelper",!0),W(this,"editorHelperType","reflection-probes"),this.layers.set(P),this.refresh(!0)}signature="";selected=!1;setSelected(t){this.selected!==t&&(this.selected=t,this.refresh(!0))}update(){this.refresh(!1),this.source.updateWorldMatrix(!0,!1),this.matrix.copy(this.source.matrixWorld),this.matrixWorldNeedsUpdate=!0}dispose(){this.clearVisuals(),this.removeFromParent()}refresh(t){const e=Wt(this.source);if(!e)return;const i=e.config,s=JSON.stringify(i);if(!t&&s===this.signature)return;this.signature=s,this.clearVisuals();const o=this.selected?qs:Ys,n=this.selected?1:.62,r=Math.max(0,i.blendDistance);if(i.shape==="sphere"){const a=Math.max(.01,i.radius);this.addWire(new U(a,24,16),o,n),r>0&&a-r>.01&&this.addWire(new U(a-r,20,12),o,this.selected?.55:.28)}else{const[a,h,d]=i.size.map(u=>Math.max(.01,u));this.addWire(new I(a,h,d),o,n);const f=[a-r*2,h-r*2,d-r*2];r>0&&f.every(u=>u>.01)&&this.addWire(new I(f[0],f[1],f[2]),o,this.selected?.55:.28)}if(i.parallaxProjection){const[a,h,d]=i.parallaxSize.map(u=>Math.max(.01,u));this.addWire(new I(a,h,d),Qs,this.selected?.9:.45).position.fromArray(i.parallaxOffset)}this.addWire(new at(this.selected?.16:.11),Zs,this.selected?1:.72).position.fromArray(i.captureOffset),this.traverse(a=>a.layers.set(P))}addWire(t,e,i){const s=new Si(t);t.dispose();const o=new lt({color:e,depthTest:!1,transparent:!0,opacity:i,toneMapped:!1}),n=new Zt(s,o);return n.renderOrder=this.renderOrder,this.add(n),n}clearVisuals(){for(const t of[...this.children]){t.removeFromParent();const e=t;e.geometry?.dispose();const i=Array.isArray(e.material)?e.material:[e.material];for(const s of i)s?.dispose()}}}const Te=new WeakMap,Pi=new U(1,12,8);function _t(c){return new p(c[0],c[1],c[2])}function At(c){const t={color:c.color,transparent:!0,opacity:c.opacity??.68,depthTest:!1};return c.dashed?new Ci({...t,dashSize:.18,gapSize:.12}):new lt(t)}function X(c,t,e,i=!1){const s=i&&t.length>0?[...t,t[0]]:[...t],o=new Y(new mt().setFromPoints(s),e);o.renderOrder=997,o.layers.set(P),e instanceof Ci&&o.computeLineDistances(),c.add(o)}function Nt(c,t,e,i,s=64){const o=[];for(let n=0;n<s;n++){const r=n/s*Math.PI*2;o.push(c.clone().addScaledVector(e,Math.cos(r)*t).addScaledVector(i,Math.sin(r)*t))}return o}function Ks(c){const t=new K,e=_t(c.center),i=At(c);return X(t,Nt(e,c.radius,new p(1,0,0),new p(0,1,0)),i,!0),X(t,Nt(e,c.radius,new p(1,0,0),new p(0,0,1)),i,!0),X(t,Nt(e,c.radius,new p(0,1,0),new p(0,0,1)),i,!0),t}function $s(c){const t=new K;return X(t,c.points.map(_t),At(c)),t}function Js(c){const t=new K,e=_t(c.origin),i=_t(c.direction).normalize(),s=Math.abs(i.y)<.9?new p(0,1,0):new p(1,0,0),o=new p().crossVectors(s,i).normalize(),n=new p().crossVectors(i,o).normalize(),r=j.degToRad(Math.max(0,Math.min(360,c.angle))/2),l=At(c),a=[];for(let h=0;h<64;h++){const d=h/64*Math.PI*2,f=o.clone().multiplyScalar(Math.cos(d)).addScaledVector(n,Math.sin(d));a.push(e.clone().addScaledVector(i,Math.cos(r)*c.length).addScaledVector(f,Math.sin(r)*c.length))}X(t,a,l,!0);for(const h of[0,16,32,48])X(t,[e,a[h]],l);return t}function to(c,t,e){return c.applyQuaternion(new L(...e)).add(new p(...t))}function eo(c){const t=new K,e=At(c),[i,s,o]=c.halfExtents,n=[[-i,-s,-o],[i,-s,-o],[i,s,-o],[-i,s,-o],[-i,-s,o],[i,-s,o],[i,s,o],[-i,s,o]].map(([r,l,a])=>to(new p(r,l,a),c.center,c.rotation));for(const[r,l]of[[0,1],[1,2],[2,3],[3,0],[4,5],[5,6],[6,7],[7,4],[0,4],[1,5],[2,6],[3,7]])X(t,[n[r],n[l]],e);return t}function io(c){const t=new K,e=At(c),i=new L(...c.rotation),s=_t(c.center),o=r=>r.applyQuaternion(i).add(s),n=(r,l,a)=>Nt(new p(0,r,0),c.radius,l,a).map(o);X(t,n(c.halfHeight,new p(1,0,0),new p(0,0,1)),e,!0),X(t,n(-c.halfHeight,new p(1,0,0),new p(0,0,1)),e,!0);for(const[r,l]of[[c.radius,0],[-c.radius,0],[0,c.radius],[0,-c.radius]])X(t,[o(new p(r,-c.halfHeight,l)),o(new p(r,c.halfHeight,l))],e);for(const r of["x","z"]){const l=[];for(let a=0;a<=32;a++){const h=a/32*Math.PI,d=new p(0,c.halfHeight+Math.sin(h)*c.radius,0);d[r]=Math.cos(h)*c.radius,l.push(o(d))}for(let a=0;a<=32;a++){const h=Math.PI+a/32*Math.PI,d=new p(0,-c.halfHeight+Math.sin(h)*c.radius,0);d[r]=Math.cos(h)*c.radius,l.push(o(d))}X(t,l,e)}return t}function so(c){const t=c.kind==="line"?$s(c):c.kind==="sphere"?Ks(c):c.kind==="cone"?Js(c):c.kind==="box"?eo(c):io(c);return t.layers.set(P),t.traverse(e=>e.layers.set(P)),t}function oo(c,t){const e=new R({color:t.color,depthTest:!1,transparent:!0,opacity:t.writable?.92:.35}),i=new y(Pi,e);return Object.defineProperty(i,"isSpatialHandleMesh",{value:!0}),i.position.copy(_t(t.position)),i.renderOrder=998,i.layers.set(P),Te.set(i,{nodeId:c,handle:t}),i}function no(c,t){const e=[],i=[];for(const s of t){for(const o of s.guides)e.push(so(o));for(const o of s.handles){const n=oo(c,o);e.push(n),i.push(n)}}return{roots:e,handles:i}}function hi(c){return Te.get(c)??null}function le(c,t){const e=Te.get(c);c.material.color.set(t&&e?.handle.writable?"#ffffff":e?.handle.color??"#ffffff")}function di(c,t){const e=c.position.distanceTo(t.position);c.scale.setScalar(Math.max(.025,e*.012))}function ro(c,t,e){const i=c,s=i.geometry;s&&s!==Pi&&!t.has(s)&&(s.dispose(),t.add(s));const o=Array.isArray(i.material)?i.material:i.material?[i.material]:[];for(const n of o)e.has(n)||(n.dispose(),e.add(n))}function pi(c){const t=new Set,e=new Set;for(const i of c)i.removeFromParent(),i.traverse(s=>ro(s,t,e))}function ce(c,t,e,i=1.15){if(c.isEmpty())return 3;const s=e.clone().normalize(),o=Math.abs(s.dot(t.up))>.999?new p(0,0,1):t.up,n=new p().crossVectors(o,s).normalize(),r=new p().crossVectors(s,n).normalize(),l=c.getCenter(new p);let a=0,h=0,d=0;for(const _ of[c.min.x,c.max.x])for(const g of[c.min.y,c.max.y])for(const v of[c.min.z,c.max.z]){const b=new p(_,g,v).sub(l);d=Math.max(d,Math.abs(b.dot(n))),h=Math.max(h,Math.abs(b.dot(r))),a=Math.max(a,Math.abs(b.dot(s)))}const f=j.degToRad(t.fov*.5),u=Math.atan(Math.tan(f)*Math.max(t.aspect,.01)),m=Math.max(h/Math.tan(f),d/Math.tan(u));return Math.max(m*i+a,t.near*4,.01)}const ao=3,lo=.05,co=.03,ho=.6,po=.15,uo=.08,fo=3,mo=.45,Hi=.001,_o=24,go=6,yo=[[0,0,0],[0,0,1],[0,1,0],[0,1,1],[1,0,0],[1,0,1],[1,1,0],[1,1,1]];function vo(c){const t=j.clamp(c*po,uo,fo);return Math.max(Math.min(t,c*mo),Hi)}function he(c){return j.clamp(c*lo,co,ho)}function wo(c,t,e=!1){const{min:i,max:s}=c,o=h=>e?Math.max(h/2,Hi):vo(h),n=o(s.x-i.x),r=o(s.y-i.y),l=o(s.z-i.z);let a=0;for(const[h,d,f]of yo){const u=h===0?i.x:s.x,m=d===0?i.y:s.y,_=f===0?i.z:s.z,g=h===0?n:-n,v=d===0?r:-r,b=f===0?l:-l;t[a++]=u,t[a++]=m,t[a++]=_,t[a++]=u+g,t[a++]=m,t[a++]=_,t[a++]=u,t[a++]=m,t[a++]=_,t[a++]=u,t[a++]=m+v,t[a++]=_,t[a++]=u,t[a++]=m,t[a++]=_,t[a++]=u,t[a++]=m,t[a++]=_+b}}class de extends ye{entityObject;_fixedSize;_edges;_objectFrame;_toObject=new ft;_point=new p;_axisX=new p;_axisY=new p;_axisZ=new p;_scale=new p;_positions=new Float32Array(_o*go);_box=new xt;_worldPos=new p;_fixedExtent=new p;_standoff=new p;_lastRootMatrix=new Float32Array(16);_requiresContinuousBounds;constructor(t,e){const i=new ve,s=new we({color:e.color,linewidth:e.lineWidth??ao,worldUnits:!1,alphaToCoverage:!0,toneMapped:!1,depthTest:!1,depthWrite:!1});super(i,s),this.entityObject=t,this._fixedSize=e.fixedSize,this._edges=e.edges===!0,this._objectFrame=e.frame==="object";let o=!1;t.traverse(n=>{const r=n;(n.isSkinnedMesh||Array.isArray(r.morphTargetInfluences)&&r.morphTargetInfluences.length>0||ks(n)!==null)&&(o=!0)}),this._requiresContinuousBounds=o,this.renderOrder=1,this.frustumCulled=!1,i.setPositions(this._positions),this.update()}setColor(t){this.material.color.setHex(t)}updateIfNeeded(){this.entityObject.updateWorldMatrix(!0,!1);const t=this.entityObject.matrixWorld.elements;let e=!1;for(let i=0;i<t.length;i++)if(t[i]!==this._lastRootMatrix[i]){e=!0;break}(e||this._requiresContinuousBounds)&&this.update()}update(){this.entityObject.updateWorldMatrix(!0,!1);const t=this._objectFrame&&this._fixedSize===void 0&&Math.abs(this.entityObject.matrixWorld.determinant())>1e-30;this.entityObject.matrixWorld.extractBasis(this._axisX,this._axisY,this._axisZ);const e=t?this._scale.set(this._axisX.length(),this._axisY.length(),this._axisZ.length()):this._scale.set(1,1,1);if(this._fixedSize!==void 0)this.entityObject.getWorldPosition(this._worldPos),this._fixedExtent.setScalar(this._fixedSize),this._box.setFromCenterAndSize(this._worldPos,this._fixedExtent);else if(t?(this._toObject.copy(this.entityObject.matrixWorld).invert(),qi(this.entityObject,this._toObject,this._box)):Vt(this.entityObject,this._box),this._box.isEmpty())return;if(this._box.getSize(this._standoff).multiply(e),this._standoff.set(he(this._standoff.x),he(this._standoff.y),he(this._standoff.z)).divide(e),this._box.expandByVector(this._standoff),wo(this._box,this._positions,this._edges),t){const s=this.entityObject.matrixWorld;for(let o=0;o<this._positions.length;o+=3)this._point.set(this._positions[o],this._positions[o+1],this._positions[o+2]).applyMatrix4(s),this._positions[o]=this._point.x,this._positions[o+1]=this._point.y,this._positions[o+2]=this._point.z}const i=this.geometry.getAttribute("instanceStart");i&&(i.data.needsUpdate=!0),this._lastRootMatrix.set(this.entityObject.matrixWorld.elements)}dispose(){this.geometry.dispose(),this.material.dispose()}}function bo({BlendFunction:c,KernelSize:t,OutlineEffect:e},i,s,o){const n=new e(i,s,{blendFunction:c.ALPHA,visibleEdgeColor:o.visible,hiddenEdgeColor:o.hidden,edgeStrength:5,pulseSpeed:0,blur:!0,kernelSize:t.MEDIUM,resolutionScale:.5,xRay:!0});n.selectionLayer=_e,s.layers.disable(_e);const r=n.getFragmentShader(),l="vec3 color=edge.x*visibleEdgeColor+edge.y*hiddenEdgeColor;",a="edge*=(edgeStrength*mask.x*pulse);";r.includes(l)&&r.includes(a)&&(n.setFragmentShader(r.replace("uniform float edgeStrength;","uniform float edgeStrength;uniform float volterCrisp;").replace(a,"edge*=(edgeStrength*(volterCrisp>0.5?1.0:mask.x)*pulse);").replace(l,`${l}if(volterCrisp>0.5){float volterSum=edge.x+edge.y;if(volterSum>0.0)color/=volterSum;edge=min(edge,vec2(1.0));}`)),n.uniforms.set("volterCrisp",{value:0}));const h=n.update.bind(n);return n.update=(d,f,u)=>{const m=n.camera,_=m.layers.isEnabled(P);m.layers.disable(P);try{h(d,f,u)}finally{_&&m.layers.enable(P)}},gt.set(n,{colors:o,roots:0}),Kt(n),n}const xe=new WeakMap;function An(c,t,e,i,s){const o=xe.get(t)?.pop();return o?(o.mainScene=e,o.mainCamera=i,i.layers.disable(_e),gt.set(o,{colors:s,roots:0}),Kt(o),o):bo(c,e,i,s)}function Pn(c,t,e){t.selection.clear(),e?.setEffects([]);const i=xe.get(c)??[];i.includes(t)||i.push(t),xe.set(c,i)}const xo=`uniform lowp sampler2D inputBuffer;uniform vec2 texelSize;uniform float volterReach;
|
|
2
|
+
import{kQ as Oi,kX as ht,lj as De,lk as Re,ll as je,kP as ki,lm as Di,ln as Fe,d7 as Ri,lo as Z,eX as Lt,dv as V,Z as It,lp as te,aH as ji,fC as Fi,bq as Gi,kS as Ge,kT as Be,kU as Ve,dp as We,al as Ot,lq as Bi,lr as Vi,ls as Xe,jT as Ne,bs as Wi,_ as Xi}from"./index-BYdQuKKk.js";import{a as Ni,i as st}from"./standard-viewport-dressing-DpCqZowy.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{E as Ye,a as qe,f as Yi}from"./clip-planes-CnAI6DZn.js";import{b as qi,a as Vt,C as Qe,e as Qi,d as Zi}from"./content-bounds-BzOnMMA9.js";import{EDITOR_LAYER as P,isInEditorOwnedSubtree as J,EDITOR_SELECTION_LAYER as _e,isEditorOwnedObject as Ui}from"./editor-layers-wmPhuj0X.js";import{e as ge,r as Wt,f as Ze}from"./three-D4bun8tv.js";import{g as tt,s as W}from"./user-data-CJW19F-2.js";import{d as Ki,s as $i,a as Ji}from"./model-thumbnail-BSBXqm11.js";import{d as Ue,e as ts}from"./model-inspection-CRQL0kkD.js";import{OrbitControls as es}from"./OrbitControls-B13MKuwC.js";import"./three.module-BLhyNg0e.js";import{a8 as is,fo as p,dp as L,e6 as nt,cW as qt,cp as R,bX as lt,aq as O,K as I,N as mt,a$ as Mt,co as y,cZ as at,bV as Y,e$ as yt,ey as U,aV as bi,cm as ft,db as xi,aI as Qt,bh as K,eV as ss,_ as C,cj as j,aO as Si,c0 as Zt,b_ as Ci,I as xt,cP as os,c8 as ns,e as rs,ap as as,A as ls,c7 as Ee,b$ as cs,da as Ke,fd as et,el as hs,d9 as ds,d5 as $e,j as ps,aE as us,eg as fs,cg as dt,fA as ms,aF as _s,de as gs,eD as ys,bk as vs,S as ws,ex as bs,a5 as xs,ej as it,eE as Je,eF as ti,em as Ss,T as Mi,c1 as Ai}from"./three.core-3arARmh6.js";import{L as ye,a as ve,b as we}from"./LineSegments2-DN9pUfWA.js";import{B as Cs}from"./three.quarks.esm-C_HmSKXo.js";import{b as Ms,e as As}from"./live-gesture-lock-DJbrjOqf.js";import{f as Ps}from"./editor-shell-store-LRVyeXM-.js";import{a as Hs,e as Es}from"./entity-object-DWKBk3rf.js";import{e as Ts,v as kt,i as zs,d as Ls}from"./three-integration-BzTWd5jX.js";import{f as ei,v as Is,s as Os}from"./scene-framing-C0vuzmLH.js";import{a as ks}from"./live-mixers-B-bwLZ7c.js";function be(c){const t=tt(c,"triggerVolume");if(!t||typeof t!="object")return null;const{radius:e}=t;return typeof e=="number"&&Number.isFinite(e)&&e>0?{radius:e}:null}const ot=new nt,k=new p,$=new p,T=new L,ii={X:new p(1,0,0),Y:new p(0,1,0),Z:new p(0,0,1)},ee={type:"change"},si={type:"mouseDown",mode:null},oi={type:"mouseUp",mode:null},ni={type:"objectChange"};class ie extends is{constructor(t,e=null){super(void 0,e);const i=new Bs(this);this._root=i;const s=new Vs;this._gizmo=s,i.add(s);const o=new Ws;this._plane=o,i.add(o);const n=this;function r(w,S){let z=S;Object.defineProperty(n,w,{get:function(){return z!==void 0?z:S},set:function(x){z!==x&&(z=x,o[w]=x,s[w]=x,n.dispatchEvent({type:w+"-changed",value:x}),n.dispatchEvent(ee))}}),n[w]=S,o[w]=S,s[w]=S}r("camera",t),r("object",void 0),r("enabled",!0),r("axis",null),r("mode","translate"),r("translationSnap",null),r("rotationSnap",null),r("scaleSnap",null),r("space","world"),r("size",1),r("dragging",!1),r("showX",!0),r("showY",!0),r("showZ",!0),r("minX",-1/0),r("maxX",1/0),r("minY",-1/0),r("maxY",1/0),r("minZ",-1/0),r("maxZ",1/0);const l=new p,a=new p,h=new L,d=new L,f=new p,u=new L,m=new p,_=new p,g=new p,v=0,b=new p;r("worldPosition",l),r("worldPositionStart",a),r("worldQuaternion",h),r("worldQuaternionStart",d),r("cameraPosition",f),r("cameraQuaternion",u),r("pointStart",m),r("pointEnd",_),r("rotationAxis",g),r("rotationAngle",v),r("eye",b),this._offset=new p,this._startNorm=new p,this._endNorm=new p,this._cameraScale=new p,this._parentPosition=new p,this._parentQuaternion=new L,this._parentQuaternionInv=new L,this._parentScale=new p,this._worldScaleStart=new p,this._worldQuaternionInv=new L,this._worldScale=new p,this._positionStart=new p,this._quaternionStart=new L,this._scaleStart=new p,this._getPointer=Ds.bind(this),this._onPointerDown=js.bind(this),this._onPointerHover=Rs.bind(this),this._onPointerMove=Fs.bind(this),this._onPointerUp=Gs.bind(this),e!==null&&this.connect(e)}connect(t){super.connect(t),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointermove",this._onPointerHover),this.domElement.addEventListener("pointerup",this._onPointerUp),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerHover),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.style.touchAction="auto"}getHelper(){return this._root}pointerHover(t){if(this.object===void 0||this.dragging===!0)return;t!==null&&ot.setFromCamera(t,this.camera);const e=se(this._gizmo.picker[this.mode],ot);e?this.axis=e.object.name:this.axis=null}pointerDown(t){if(!(this.object===void 0||this.dragging===!0||t!=null&&t.button!==0)&&this.axis!==null){t!==null&&ot.setFromCamera(t,this.camera);const e=se(this._plane,ot,!0);e&&(this.object.updateMatrixWorld(),this.object.parent.updateMatrixWorld(),this._positionStart.copy(this.object.position),this._quaternionStart.copy(this.object.quaternion),this._scaleStart.copy(this.object.scale),this.object.matrixWorld.decompose(this.worldPositionStart,this.worldQuaternionStart,this._worldScaleStart),this.pointStart.copy(e.point).sub(this.worldPositionStart)),this.dragging=!0,si.mode=this.mode,this.dispatchEvent(si)}}pointerMove(t){const e=this.axis,i=this.mode,s=this.object;let o=this.space;if(i==="scale"?o="local":(e==="E"||e==="XYZE"||e==="XYZ")&&(o="world"),s===void 0||e===null||this.dragging===!1||t!==null&&t.button!==-1)return;t!==null&&ot.setFromCamera(t,this.camera);const n=se(this._plane,ot,!0);if(n){if(this.pointEnd.copy(n.point).sub(this.worldPositionStart),i==="translate")this._offset.copy(this.pointEnd).sub(this.pointStart),o==="local"&&e!=="XYZ"&&this._offset.applyQuaternion(this._worldQuaternionInv),e.indexOf("X")===-1&&(this._offset.x=0),e.indexOf("Y")===-1&&(this._offset.y=0),e.indexOf("Z")===-1&&(this._offset.z=0),o==="local"&&e!=="XYZ"?this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale):this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale),s.position.copy(this._offset).add(this._positionStart),this.translationSnap&&(o==="local"&&(s.position.applyQuaternion(T.copy(this._quaternionStart).invert()),e.search("X")!==-1&&(s.position.x=Math.round(s.position.x/this.translationSnap)*this.translationSnap),e.search("Y")!==-1&&(s.position.y=Math.round(s.position.y/this.translationSnap)*this.translationSnap),e.search("Z")!==-1&&(s.position.z=Math.round(s.position.z/this.translationSnap)*this.translationSnap),s.position.applyQuaternion(this._quaternionStart)),o==="world"&&(s.parent&&s.position.add(k.setFromMatrixPosition(s.parent.matrixWorld)),e.search("X")!==-1&&(s.position.x=Math.round(s.position.x/this.translationSnap)*this.translationSnap),e.search("Y")!==-1&&(s.position.y=Math.round(s.position.y/this.translationSnap)*this.translationSnap),e.search("Z")!==-1&&(s.position.z=Math.round(s.position.z/this.translationSnap)*this.translationSnap),s.parent&&s.position.sub(k.setFromMatrixPosition(s.parent.matrixWorld)))),s.position.x=Math.max(this.minX,Math.min(this.maxX,s.position.x)),s.position.y=Math.max(this.minY,Math.min(this.maxY,s.position.y)),s.position.z=Math.max(this.minZ,Math.min(this.maxZ,s.position.z));else if(i==="scale"){if(e.search("XYZ")!==-1){let r=this.pointEnd.length()/this.pointStart.length();this.pointEnd.dot(this.pointStart)<0&&(r*=-1),$.set(r,r,r)}else k.copy(this.pointStart),$.copy(this.pointEnd),k.applyQuaternion(this._worldQuaternionInv),$.applyQuaternion(this._worldQuaternionInv),$.divide(k),e.search("X")===-1&&($.x=1),e.search("Y")===-1&&($.y=1),e.search("Z")===-1&&($.z=1);s.scale.copy(this._scaleStart).multiply($),this.scaleSnap&&(e.search("X")!==-1&&(s.scale.x=Math.round(s.scale.x/this.scaleSnap)*this.scaleSnap||this.scaleSnap),e.search("Y")!==-1&&(s.scale.y=Math.round(s.scale.y/this.scaleSnap)*this.scaleSnap||this.scaleSnap),e.search("Z")!==-1&&(s.scale.z=Math.round(s.scale.z/this.scaleSnap)*this.scaleSnap||this.scaleSnap))}else if(i==="rotate"){this._offset.copy(this.pointEnd).sub(this.pointStart);const r=20/this.worldPosition.distanceTo(k.setFromMatrixPosition(this.camera.matrixWorld));let l=!1;e==="XYZE"?(this.rotationAxis.copy(this._offset).cross(this.eye).normalize(),this.rotationAngle=this._offset.dot(k.copy(this.rotationAxis).cross(this.eye))*r):(e==="X"||e==="Y"||e==="Z")&&(this.rotationAxis.copy(ii[e]),k.copy(ii[e]),o==="local"&&k.applyQuaternion(this.worldQuaternion),k.cross(this.eye),k.length()===0?l=!0:this.rotationAngle=this._offset.dot(k.normalize())*r),(e==="E"||l)&&(this.rotationAxis.copy(this.eye),this.rotationAngle=this.pointEnd.angleTo(this.pointStart),this._startNorm.copy(this.pointStart).normalize(),this._endNorm.copy(this.pointEnd).normalize(),this.rotationAngle*=this._endNorm.cross(this._startNorm).dot(this.eye)<0?1:-1),this.rotationSnap&&(this.rotationAngle=Math.round(this.rotationAngle/this.rotationSnap)*this.rotationSnap),o==="local"&&e!=="E"&&e!=="XYZE"?(s.quaternion.copy(this._quaternionStart),s.quaternion.multiply(T.setFromAxisAngle(this.rotationAxis,this.rotationAngle)).normalize()):(this.rotationAxis.applyQuaternion(this._parentQuaternionInv),s.quaternion.copy(T.setFromAxisAngle(this.rotationAxis,this.rotationAngle)),s.quaternion.multiply(this._quaternionStart).normalize())}this.dispatchEvent(ee),this.dispatchEvent(ni)}}pointerUp(t){t!==null&&t.button!==0||(this.dragging&&this.axis!==null&&(oi.mode=this.mode,this.dispatchEvent(oi)),this.dragging=!1,this.axis=null)}dispose(){this.disconnect(),this._root.dispose()}attach(t){return this.object=t,this._root.visible=!0,this}detach(){return this.object=void 0,this.axis=null,this._root.visible=!1,this}reset(){this.enabled&&this.dragging&&(this.object.position.copy(this._positionStart),this.object.quaternion.copy(this._quaternionStart),this.object.scale.copy(this._scaleStart),this.dispatchEvent(ee),this.dispatchEvent(ni),this.pointStart.copy(this.pointEnd))}getRaycaster(){return ot}getMode(){return this.mode}setMode(t){this.mode=t}setTranslationSnap(t){this.translationSnap=t}setRotationSnap(t){this.rotationSnap=t}setScaleSnap(t){this.scaleSnap=t}setSize(t){this.size=t}setSpace(t){this.space=t}setColors(t,e,i,s){const o=this._gizmo.materialLib;o.xAxis.color.set(t),o.yAxis.color.set(e),o.zAxis.color.set(i),o.active.color.set(s),o.xAxisTransparent.color.set(t),o.yAxisTransparent.color.set(e),o.zAxisTransparent.color.set(i),o.activeTransparent.color.set(s),o.xAxis._color&&o.xAxis._color.set(t),o.yAxis._color&&o.yAxis._color.set(e),o.zAxis._color&&o.zAxis._color.set(i),o.active._color&&o.active._color.set(s),o.xAxisTransparent._color&&o.xAxisTransparent._color.set(t),o.yAxisTransparent._color&&o.yAxisTransparent._color.set(e),o.zAxisTransparent._color&&o.zAxisTransparent._color.set(i),o.activeTransparent._color&&o.activeTransparent._color.set(s)}}function Ds(c){if(this.domElement.ownerDocument.pointerLockElement)return{x:0,y:0,button:c.button};{const t=this.domElement.getBoundingClientRect();return{x:(c.clientX-t.left)/t.width*2-1,y:-(c.clientY-t.top)/t.height*2+1,button:c.button}}}function Rs(c){if(this.enabled)switch(c.pointerType){case"mouse":case"pen":this.pointerHover(this._getPointer(c));break}}function js(c){this.enabled&&(document.pointerLockElement||this.domElement.setPointerCapture(c.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.pointerHover(this._getPointer(c)),this.pointerDown(this._getPointer(c)))}function Fs(c){this.enabled&&this.pointerMove(this._getPointer(c))}function Gs(c){this.enabled&&(this.domElement.releasePointerCapture(c.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.pointerUp(this._getPointer(c)))}function se(c,t,e){const i=t.intersectObject(c,!0);for(let s=0;s<i.length;s++)if(i[s].object.visible||e)return i[s];return!1}const Dt=new bi,H=new p(0,1,0),ri=new p(0,0,0),ai=new ft,Rt=new L,Xt=new L,N=new p,li=new ft,St=new p(1,0,0),rt=new p(0,1,0),Ct=new p(0,0,1),jt=new p,vt=new p,wt=new p;class Bs extends qt{constructor(t){super(),this.isTransformControlsRoot=!0,this.controls=t,this.visible=!1}updateMatrixWorld(t){const e=this.controls;e.object!==void 0&&(e.object.updateMatrixWorld(),e.object.parent===null?console.error("TransformControls: The attached 3D object must be a part of the scene graph."):e.object.parent.matrixWorld.decompose(e._parentPosition,e._parentQuaternion,e._parentScale),e.object.matrixWorld.decompose(e.worldPosition,e.worldQuaternion,e._worldScale),e._parentQuaternionInv.copy(e._parentQuaternion).invert(),e._worldQuaternionInv.copy(e.worldQuaternion).invert()),e.camera.updateMatrixWorld(),e.camera.matrixWorld.decompose(e.cameraPosition,e.cameraQuaternion,e._cameraScale),e.camera.isOrthographicCamera?e.camera.getWorldDirection(e.eye).negate():e.eye.copy(e.cameraPosition).sub(e.worldPosition).normalize(),super.updateMatrixWorld(t)}dispose(){this.traverse(function(t){t.geometry&&t.geometry.dispose(),t.material&&t.material.dispose()})}}class Vs extends qt{constructor(){super(),this.isTransformControlsGizmo=!0,this.type="TransformControlsGizmo";const t=new R({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),e=new lt({depthTest:!1,depthWrite:!1,fog:!1,toneMapped:!1,transparent:!0}),i=t.clone();i.opacity=.15;const s=e.clone();s.opacity=.5;const o=t.clone();o.color.setHex(16711680);const n=t.clone();n.color.setHex(65280);const r=t.clone();r.color.setHex(255);const l=t.clone();l.color.setHex(16711680),l.opacity=.5;const a=t.clone();a.color.setHex(65280),a.opacity=.5;const h=t.clone();h.color.setHex(255),h.opacity=.5;const d=t.clone();d.opacity=.25;const f=t.clone();f.color.setHex(16776960),f.opacity=.25;const u=t.clone();u.color.setHex(16776960);const m=t.clone();m.color.setHex(7895160),this.materialLib={xAxis:o,yAxis:n,zAxis:r,active:u,xAxisTransparent:l,yAxisTransparent:a,zAxisTransparent:h,activeTransparent:f};const _=new O(0,.04,.1,12);_.translate(0,.05,0);const g=new I(.08,.08,.08);g.translate(0,.04,0);const v=new mt;v.setAttribute("position",new Mt([0,0,0,1,0,0],3));const b=new O(.0075,.0075,.5,3);b.translate(0,.25,0);function w(F,Ht){const B=new yt(F,.0075,3,64,Ht*Math.PI*2);return B.rotateY(Math.PI/2),B.rotateX(Math.PI/2),B}function S(){const F=new mt;return F.setAttribute("position",new Mt([0,0,0,1,1,1],3)),F}const z={X:[[new y(_,o),[.5,0,0],[0,0,-Math.PI/2]],[new y(_,o),[-.5,0,0],[0,0,Math.PI/2]],[new y(b,o),[0,0,0],[0,0,-Math.PI/2]]],Y:[[new y(_,n),[0,.5,0]],[new y(_,n),[0,-.5,0],[Math.PI,0,0]],[new y(b,n)]],Z:[[new y(_,r),[0,0,.5],[Math.PI/2,0,0]],[new y(_,r),[0,0,-.5],[-Math.PI/2,0,0]],[new y(b,r),null,[Math.PI/2,0,0]]],XYZ:[[new y(new at(.1,0),d),[0,0,0]]],XY:[[new y(new I(.15,.15,.01),h),[.15,.15,0]]],YZ:[[new y(new I(.15,.15,.01),l),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new y(new I(.15,.15,.01),a),[.15,0,.15],[-Math.PI/2,0,0]]]},x={X:[[new y(new O(.2,0,.6,4),i),[.3,0,0],[0,0,-Math.PI/2]],[new y(new O(.2,0,.6,4),i),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new y(new O(.2,0,.6,4),i),[0,.3,0]],[new y(new O(.2,0,.6,4),i),[0,-.3,0],[0,0,Math.PI]]],Z:[[new y(new O(.2,0,.6,4),i),[0,0,.3],[Math.PI/2,0,0]],[new y(new O(.2,0,.6,4),i),[0,0,-.3],[-Math.PI/2,0,0]]],XYZ:[[new y(new at(.2,0),i)]],XY:[[new y(new I(.2,.2,.01),i),[.15,.15,0]]],YZ:[[new y(new I(.2,.2,.01),i),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new y(new I(.2,.2,.01),i),[.15,0,.15],[-Math.PI/2,0,0]]]},A={START:[[new y(new at(.01,2),s),null,null,null,"helper"]],END:[[new y(new at(.01,2),s),null,null,null,"helper"]],DELTA:[[new Y(S(),s),null,null,null,"helper"]],X:[[new Y(v,s),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new Y(v,s),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new Y(v,s),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]},M={XYZE:[[new y(w(.5,1),m),null,[0,Math.PI/2,0]]],X:[[new y(w(.5,.5),o)]],Y:[[new y(w(.5,.5),n),null,[0,0,-Math.PI/2]]],Z:[[new y(w(.5,.5),r),null,[0,Math.PI/2,0]]],E:[[new y(w(.75,1),f),null,[0,Math.PI/2,0]]]},E={AXIS:[[new Y(v,s),[-1e3,0,0],null,[1e6,1,1],"helper"]]},G={XYZE:[[new y(new U(.25,10,8),i)]],X:[[new y(new yt(.5,.1,4,24),i),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new y(new yt(.5,.1,4,24),i),[0,0,0],[Math.PI/2,0,0]]],Z:[[new y(new yt(.5,.1,4,24),i),[0,0,0],[0,0,-Math.PI/2]]],E:[[new y(new yt(.75,.1,2,24),i)]]},$t={X:[[new y(g,o),[.5,0,0],[0,0,-Math.PI/2]],[new y(b,o),[0,0,0],[0,0,-Math.PI/2]],[new y(g,o),[-.5,0,0],[0,0,Math.PI/2]]],Y:[[new y(g,n),[0,.5,0]],[new y(b,n)],[new y(g,n),[0,-.5,0],[0,0,Math.PI]]],Z:[[new y(g,r),[0,0,.5],[Math.PI/2,0,0]],[new y(b,r),[0,0,0],[Math.PI/2,0,0]],[new y(g,r),[0,0,-.5],[-Math.PI/2,0,0]]],XY:[[new y(new I(.15,.15,.01),h),[.15,.15,0]]],YZ:[[new y(new I(.15,.15,.01),l),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new y(new I(.15,.15,.01),a),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new y(new I(.1,.1,.1),d)]]},Pt={X:[[new y(new O(.2,0,.6,4),i),[.3,0,0],[0,0,-Math.PI/2]],[new y(new O(.2,0,.6,4),i),[-.3,0,0],[0,0,Math.PI/2]]],Y:[[new y(new O(.2,0,.6,4),i),[0,.3,0]],[new y(new O(.2,0,.6,4),i),[0,-.3,0],[0,0,Math.PI]]],Z:[[new y(new O(.2,0,.6,4),i),[0,0,.3],[Math.PI/2,0,0]],[new y(new O(.2,0,.6,4),i),[0,0,-.3],[-Math.PI/2,0,0]]],XY:[[new y(new I(.2,.2,.01),i),[.15,.15,0]]],YZ:[[new y(new I(.2,.2,.01),i),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new y(new I(.2,.2,.01),i),[.15,0,.15],[-Math.PI/2,0,0]]],XYZ:[[new y(new I(.2,.2,.2),i),[0,0,0]]]},Jt={X:[[new Y(v,s),[-1e3,0,0],null,[1e6,1,1],"helper"]],Y:[[new Y(v,s),[0,-1e3,0],[0,0,Math.PI/2],[1e6,1,1],"helper"]],Z:[[new Y(v,s),[0,0,-1e3],[0,-Math.PI/2,0],[1e6,1,1],"helper"]]};function Q(F){const Ht=new qt;for(const B in F)for(let ct=F[B].length;ct--;){const D=F[B][ct][0].clone(),Et=F[B][ct][1],Tt=F[B][ct][2],zt=F[B][ct][3],Ii=F[B][ct][4];D.name=B,D.tag=Ii,Et&&D.position.set(Et[0],Et[1],Et[2]),Tt&&D.rotation.set(Tt[0],Tt[1],Tt[2]),zt&&D.scale.set(zt[0],zt[1],zt[2]),D.updateMatrix();const ke=D.geometry.clone();ke.applyMatrix4(D.matrix),D.geometry=ke,D.renderOrder=1/0,D.position.set(0,0,0),D.rotation.set(0,0,0),D.scale.set(1,1,1),Ht.add(D)}return Ht}this.gizmo={},this.picker={},this.helper={},this.add(this.gizmo.translate=Q(z)),this.add(this.gizmo.rotate=Q(M)),this.add(this.gizmo.scale=Q($t)),this.add(this.picker.translate=Q(x)),this.add(this.picker.rotate=Q(G)),this.add(this.picker.scale=Q(Pt)),this.add(this.helper.translate=Q(A)),this.add(this.helper.rotate=Q(E)),this.add(this.helper.scale=Q(Jt)),this.picker.translate.visible=!1,this.picker.rotate.visible=!1,this.picker.scale.visible=!1}updateMatrixWorld(t){const i=(this.mode==="scale"?"local":this.space)==="local"?this.worldQuaternion:Xt;this.gizmo.translate.visible=this.mode==="translate",this.gizmo.rotate.visible=this.mode==="rotate",this.gizmo.scale.visible=this.mode==="scale",this.helper.translate.visible=this.mode==="translate",this.helper.rotate.visible=this.mode==="rotate",this.helper.scale.visible=this.mode==="scale";let s=[];s=s.concat(this.picker[this.mode].children),s=s.concat(this.gizmo[this.mode].children),s=s.concat(this.helper[this.mode].children);for(let o=0;o<s.length;o++){const n=s[o];n.visible=!0,n.rotation.set(0,0,0),n.position.copy(this.worldPosition);let r;if(this.camera.isOrthographicCamera?r=(this.camera.top-this.camera.bottom)/this.camera.zoom:r=this.worldPosition.distanceTo(this.cameraPosition)*Math.min(1.9*Math.tan(Math.PI*this.camera.fov/360)/this.camera.zoom,7),n.scale.set(1,1,1).multiplyScalar(r*this.size/4),n.tag==="helper"){n.visible=!1,n.name==="AXIS"?(n.visible=!!this.axis,this.axis==="X"&&(T.setFromEuler(Dt.set(0,0,0)),n.quaternion.copy(i).multiply(T),Math.abs(H.copy(St).applyQuaternion(i).dot(this.eye))>.9&&(n.visible=!1)),this.axis==="Y"&&(T.setFromEuler(Dt.set(0,0,Math.PI/2)),n.quaternion.copy(i).multiply(T),Math.abs(H.copy(rt).applyQuaternion(i).dot(this.eye))>.9&&(n.visible=!1)),this.axis==="Z"&&(T.setFromEuler(Dt.set(0,Math.PI/2,0)),n.quaternion.copy(i).multiply(T),Math.abs(H.copy(Ct).applyQuaternion(i).dot(this.eye))>.9&&(n.visible=!1)),this.axis==="XYZE"&&(T.setFromEuler(Dt.set(0,Math.PI/2,0)),H.copy(this.rotationAxis),n.quaternion.setFromRotationMatrix(ai.lookAt(ri,H,rt)),n.quaternion.multiply(T),n.visible=this.dragging),this.axis==="E"&&(n.visible=!1)):n.name==="START"?(n.position.copy(this.worldPositionStart),n.visible=this.dragging):n.name==="END"?(n.position.copy(this.worldPosition),n.visible=this.dragging):n.name==="DELTA"?(n.position.copy(this.worldPositionStart),n.quaternion.copy(this.worldQuaternionStart),k.set(1e-10,1e-10,1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1),k.applyQuaternion(this.worldQuaternionStart.clone().invert()),n.scale.copy(k),n.visible=this.dragging):(n.quaternion.copy(i),this.dragging?n.position.copy(this.worldPositionStart):n.position.copy(this.worldPosition),this.axis&&(n.visible=this.axis.search(n.name)!==-1));continue}n.quaternion.copy(i),this.mode==="translate"||this.mode==="scale"?(n.name==="X"&&Math.abs(H.copy(St).applyQuaternion(i).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="Y"&&Math.abs(H.copy(rt).applyQuaternion(i).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="Z"&&Math.abs(H.copy(Ct).applyQuaternion(i).dot(this.eye))>.99&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="XY"&&Math.abs(H.copy(Ct).applyQuaternion(i).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="YZ"&&Math.abs(H.copy(St).applyQuaternion(i).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1),n.name==="XZ"&&Math.abs(H.copy(rt).applyQuaternion(i).dot(this.eye))<.2&&(n.scale.set(1e-10,1e-10,1e-10),n.visible=!1)):this.mode==="rotate"&&(Rt.copy(i),H.copy(this.eye).applyQuaternion(T.copy(i).invert()),n.name.search("E")!==-1&&n.quaternion.setFromRotationMatrix(ai.lookAt(this.eye,ri,rt)),n.name==="X"&&(T.setFromAxisAngle(St,Math.atan2(-H.y,H.z)),T.multiplyQuaternions(Rt,T),n.quaternion.copy(T)),n.name==="Y"&&(T.setFromAxisAngle(rt,Math.atan2(H.x,H.z)),T.multiplyQuaternions(Rt,T),n.quaternion.copy(T)),n.name==="Z"&&(T.setFromAxisAngle(Ct,Math.atan2(H.y,H.x)),T.multiplyQuaternions(Rt,T),n.quaternion.copy(T))),n.visible=n.visible&&(n.name.indexOf("X")===-1||this.showX),n.visible=n.visible&&(n.name.indexOf("Y")===-1||this.showY),n.visible=n.visible&&(n.name.indexOf("Z")===-1||this.showZ),n.visible=n.visible&&(n.name.indexOf("E")===-1||this.showX&&this.showY&&this.showZ),n.material._color=n.material._color||n.material.color.clone(),n.material._opacity=n.material._opacity||n.material.opacity,n.material.color.copy(n.material._color),n.material.opacity=n.material._opacity,this.enabled&&this.axis&&(n.name===this.axis?(n.material.color.copy(this.materialLib.active.color),n.material.opacity=1):this.axis.split("").some(function(l){return n.name===l})&&(n.material.color.copy(this.materialLib.active.color),n.material.opacity=1))}super.updateMatrixWorld(t)}}class Ws extends y{constructor(){super(new xi(1e5,1e5,2,2),new R({visible:!1,wireframe:!0,side:Qt,transparent:!0,opacity:.1,toneMapped:!1})),this.isTransformControlsPlane=!0,this.type="TransformControlsPlane"}updateMatrixWorld(t){let e=this.space;switch(this.position.copy(this.worldPosition),this.mode==="scale"&&(e="local"),jt.copy(St).applyQuaternion(e==="local"?this.worldQuaternion:Xt),vt.copy(rt).applyQuaternion(e==="local"?this.worldQuaternion:Xt),wt.copy(Ct).applyQuaternion(e==="local"?this.worldQuaternion:Xt),H.copy(vt),this.mode){case"translate":case"scale":switch(this.axis){case"X":H.copy(this.eye).cross(jt),N.copy(jt).cross(H);break;case"Y":H.copy(this.eye).cross(vt),N.copy(vt).cross(H);break;case"Z":H.copy(this.eye).cross(wt),N.copy(wt).cross(H);break;case"XY":N.copy(wt);break;case"YZ":N.copy(jt);break;case"XZ":H.copy(wt),N.copy(vt);break;case"XYZ":case"E":N.set(0,0,0);break}break;case"rotate":default:N.set(0,0,0)}N.length()===0?this.quaternion.copy(this.cameraQuaternion):(li.lookAt(k.set(0,0,0),N,H),this.quaternion.setFromRotationMatrix(li)),super.updateMatrixWorld(t)}}const oe=new C(4441855),Ft=new C(16758858),Gt=new C(14185983),Xs=new C(16731496),ci=new C(16777215);function ne(c){return new Y(new mt,new lt({color:c,depthTest:!1,depthWrite:!1,transparent:!0,toneMapped:!1}))}function re(c,t){return new y(c,new R({color:t,depthTest:!1,depthWrite:!1,transparent:!0,toneMapped:!1}))}function ae(c,t){if(c.visible=t.length>1,!c.visible)return;let e=c.geometry.getAttribute("position");(!e||e.count!==t.length)&&(e=new Mt(t.length*3,3),c.geometry.setAttribute("position",e));for(let i=0;i<t.length;i++)e.setXYZ(i,t[i].x,t[i].y,t[i].z);e.needsUpdate=!0,c.geometry.computeBoundingSphere()}class Ns extends K{constructor(t){super(),this.source=t,this.name="Constraint Helper",this.renderOrder=999,W(this,"editorHelper",!0),W(this,"editorHelperType","constraints"),this.layers.set(P),this.refreshStructure()}selected=!1;hoveredControl=null;selectedObjects=new Set;visuals=[];setSelected(t){this.selected=t}setSelectedObjects(t){this.selectedObjects=t}controlMeshes(){return this.visuals.flatMap(t=>[t.targetHit,t.poleHit].filter(e=>e.visible))}presents(t){return t===this.source?!0:this.visuals.some(e=>{const i=e.mark.getSnapshot();return t===i.target||t===i.pole})}controlFor(t){for(const e of this.visuals){const i=e.mark.getSnapshot();if((t===e.target||t===e.targetHit)&&i.target)return{kind:"target",label:i.target.name||`${e.mark.config.label} target`,object:i.target,mesh:e.target};if((t===e.pole||t===e.poleHit)&&i.pole)return{kind:"pole",label:i.pole.name||`${e.mark.config.label} pole`,object:i.pole,mesh:e.pole}}return null}setHoveredControl(t){this.hoveredControl=t}update(t){this.refreshStructure();for(const e of this.visuals)this.updateVisual(e,t)}dispose(){this.clearVisuals(),this.removeFromParent()}refreshStructure(){const t=ge(this.source);t.length===this.visuals.length&&t.every((i,s)=>{const o=i.getSnapshot(),n=o.chain.length>0?o.chain.length:o.constrained?1:0;return this.visuals[s]?.mark===i&&this.visuals[s]?.positions.length===n})||(this.clearVisuals(),this.visuals=t.map(i=>this.makeVisual(i)))}makeVisual(t){const e=t.getSnapshot(),i=e.chain.length>0?e.chain:e.constrained?[e.constrained]:[],s=ne(oe),o=ne(Ft),n=ne(Gt),r=i.map(()=>re(new U(.035,10,7),oe)),l=re(new at(.085),Ft),a=re(new ss(.075),Gt),h=new R({transparent:!0,opacity:0,depthTest:!1,depthWrite:!1,colorWrite:!1}),d=new y(new U(.16,10,7),h),f=new y(new U(.15,10,7),h.clone());for(const u of[s,o,n,...r,l,a,d,f])u.renderOrder=this.renderOrder,u.layers.set(P),this.add(u);return{mark:t,chain:s,targetLine:o,poleLine:n,joints:r,target:l,pole:a,targetHit:d,poleHit:f,positions:i.map(()=>new p),targetPosition:new p,polePosition:new p}}updateVisual(t,e){const i=t.mark.getSnapshot(),s=i.chain.length>0?i.chain:i.constrained?[i.constrained]:[];for(let f=0;f<s.length;f++)s[f].getWorldPosition(t.positions[f]);ae(t.chain,t.positions);for(let f=0;f<t.joints.length;f++){const u=t.joints[f],m=t.positions[f];u.visible=!!m,m&&(u.position.copy(m),u.scale.setScalar(this.handleScale(e,m)))}const o=t.positions.at(-1),n=i.target?.getWorldPosition(t.targetPosition)??null,r=i.pole?.getWorldPosition(t.polePosition)??null;ae(t.targetLine,o&&n?[o,n]:[]),ae(t.poleLine,t.positions[0]&&r?[t.positions[0],r]:[]),t.target.visible=n!==null,n&&(t.target.position.copy(n),t.target.scale.setScalar(this.handleScale(e,n)*(this.hoveredControl===t.target?1.22:1))),t.targetHit.visible=n!==null,n&&(t.targetHit.position.copy(n),t.targetHit.scale.copy(t.target.scale)),t.pole.visible=r!==null,r&&(t.pole.position.copy(r),t.pole.scale.setScalar(this.handleScale(e,r)*(this.hoveredControl===t.pole?1.22:1))),t.poleHit.visible=r!==null,r&&(t.poleHit.position.copy(r),t.poleHit.scale.copy(t.pole.scale));const l=i.status==="error"||i.status==="unresolved",a=this.selected?1:.52;for(const f of[t.chain,...t.joints]){const u=f.material;u.color.copy(l?Xs:oe),u.opacity=a}const h=this.hoveredControl===t.target||i.target!==null&&this.selectedObjects.has(i.target),d=this.hoveredControl===t.pole||i.pole!==null&&this.selectedObjects.has(i.pole);t.target.material.color.copy(h?ci:Ft),t.pole.material.color.copy(d?ci:Gt),t.targetLine.material.color.copy(Ft),t.poleLine.material.color.copy(Gt),t.targetLine.material.opacity=a,t.poleLine.material.opacity=a,t.target.material.opacity=h?1:a,t.pole.material.opacity=d?1:a}handleScale(t,e){return j.clamp(t.position.distanceTo(e)/8,.65,4)}clearVisuals(){for(const t of[...this.children]){t.removeFromParent();const e=t;e.geometry.dispose();const i=Array.isArray(e.material)?e.material:[e.material];for(const s of i)s.dispose()}this.visuals=[],this.hoveredControl=null}}const Ys=new C(4892927),qs=new C(7718143),Qs=new C(16758858),Zs=new C(16777215);class Us extends K{constructor(t){super(),this.source=t,this.name="Reflection Probe Helper",this.matrixAutoUpdate=!1,this.renderOrder=998,W(this,"editorHelper",!0),W(this,"editorHelperType","reflection-probes"),this.layers.set(P),this.refresh(!0)}signature="";selected=!1;setSelected(t){this.selected!==t&&(this.selected=t,this.refresh(!0))}update(){this.refresh(!1),this.source.updateWorldMatrix(!0,!1),this.matrix.copy(this.source.matrixWorld),this.matrixWorldNeedsUpdate=!0}dispose(){this.clearVisuals(),this.removeFromParent()}refresh(t){const e=Wt(this.source);if(!e)return;const i=e.config,s=JSON.stringify(i);if(!t&&s===this.signature)return;this.signature=s,this.clearVisuals();const o=this.selected?qs:Ys,n=this.selected?1:.62,r=Math.max(0,i.blendDistance);if(i.shape==="sphere"){const a=Math.max(.01,i.radius);this.addWire(new U(a,24,16),o,n),r>0&&a-r>.01&&this.addWire(new U(a-r,20,12),o,this.selected?.55:.28)}else{const[a,h,d]=i.size.map(u=>Math.max(.01,u));this.addWire(new I(a,h,d),o,n);const f=[a-r*2,h-r*2,d-r*2];r>0&&f.every(u=>u>.01)&&this.addWire(new I(f[0],f[1],f[2]),o,this.selected?.55:.28)}if(i.parallaxProjection){const[a,h,d]=i.parallaxSize.map(u=>Math.max(.01,u));this.addWire(new I(a,h,d),Qs,this.selected?.9:.45).position.fromArray(i.parallaxOffset)}this.addWire(new at(this.selected?.16:.11),Zs,this.selected?1:.72).position.fromArray(i.captureOffset),this.traverse(a=>a.layers.set(P))}addWire(t,e,i){const s=new Si(t);t.dispose();const o=new lt({color:e,depthTest:!1,transparent:!0,opacity:i,toneMapped:!1}),n=new Zt(s,o);return n.renderOrder=this.renderOrder,this.add(n),n}clearVisuals(){for(const t of[...this.children]){t.removeFromParent();const e=t;e.geometry?.dispose();const i=Array.isArray(e.material)?e.material:[e.material];for(const s of i)s?.dispose()}}}const Te=new WeakMap,Pi=new U(1,12,8);function _t(c){return new p(c[0],c[1],c[2])}function At(c){const t={color:c.color,transparent:!0,opacity:c.opacity??.68,depthTest:!1};return c.dashed?new Ci({...t,dashSize:.18,gapSize:.12}):new lt(t)}function X(c,t,e,i=!1){const s=i&&t.length>0?[...t,t[0]]:[...t],o=new Y(new mt().setFromPoints(s),e);o.renderOrder=997,o.layers.set(P),e instanceof Ci&&o.computeLineDistances(),c.add(o)}function Nt(c,t,e,i,s=64){const o=[];for(let n=0;n<s;n++){const r=n/s*Math.PI*2;o.push(c.clone().addScaledVector(e,Math.cos(r)*t).addScaledVector(i,Math.sin(r)*t))}return o}function Ks(c){const t=new K,e=_t(c.center),i=At(c);return X(t,Nt(e,c.radius,new p(1,0,0),new p(0,1,0)),i,!0),X(t,Nt(e,c.radius,new p(1,0,0),new p(0,0,1)),i,!0),X(t,Nt(e,c.radius,new p(0,1,0),new p(0,0,1)),i,!0),t}function $s(c){const t=new K;return X(t,c.points.map(_t),At(c)),t}function Js(c){const t=new K,e=_t(c.origin),i=_t(c.direction).normalize(),s=Math.abs(i.y)<.9?new p(0,1,0):new p(1,0,0),o=new p().crossVectors(s,i).normalize(),n=new p().crossVectors(i,o).normalize(),r=j.degToRad(Math.max(0,Math.min(360,c.angle))/2),l=At(c),a=[];for(let h=0;h<64;h++){const d=h/64*Math.PI*2,f=o.clone().multiplyScalar(Math.cos(d)).addScaledVector(n,Math.sin(d));a.push(e.clone().addScaledVector(i,Math.cos(r)*c.length).addScaledVector(f,Math.sin(r)*c.length))}X(t,a,l,!0);for(const h of[0,16,32,48])X(t,[e,a[h]],l);return t}function to(c,t,e){return c.applyQuaternion(new L(...e)).add(new p(...t))}function eo(c){const t=new K,e=At(c),[i,s,o]=c.halfExtents,n=[[-i,-s,-o],[i,-s,-o],[i,s,-o],[-i,s,-o],[-i,-s,o],[i,-s,o],[i,s,o],[-i,s,o]].map(([r,l,a])=>to(new p(r,l,a),c.center,c.rotation));for(const[r,l]of[[0,1],[1,2],[2,3],[3,0],[4,5],[5,6],[6,7],[7,4],[0,4],[1,5],[2,6],[3,7]])X(t,[n[r],n[l]],e);return t}function io(c){const t=new K,e=At(c),i=new L(...c.rotation),s=_t(c.center),o=r=>r.applyQuaternion(i).add(s),n=(r,l,a)=>Nt(new p(0,r,0),c.radius,l,a).map(o);X(t,n(c.halfHeight,new p(1,0,0),new p(0,0,1)),e,!0),X(t,n(-c.halfHeight,new p(1,0,0),new p(0,0,1)),e,!0);for(const[r,l]of[[c.radius,0],[-c.radius,0],[0,c.radius],[0,-c.radius]])X(t,[o(new p(r,-c.halfHeight,l)),o(new p(r,c.halfHeight,l))],e);for(const r of["x","z"]){const l=[];for(let a=0;a<=32;a++){const h=a/32*Math.PI,d=new p(0,c.halfHeight+Math.sin(h)*c.radius,0);d[r]=Math.cos(h)*c.radius,l.push(o(d))}for(let a=0;a<=32;a++){const h=Math.PI+a/32*Math.PI,d=new p(0,-c.halfHeight+Math.sin(h)*c.radius,0);d[r]=Math.cos(h)*c.radius,l.push(o(d))}X(t,l,e)}return t}function so(c){const t=c.kind==="line"?$s(c):c.kind==="sphere"?Ks(c):c.kind==="cone"?Js(c):c.kind==="box"?eo(c):io(c);return t.layers.set(P),t.traverse(e=>e.layers.set(P)),t}function oo(c,t){const e=new R({color:t.color,depthTest:!1,transparent:!0,opacity:t.writable?.92:.35}),i=new y(Pi,e);return Object.defineProperty(i,"isSpatialHandleMesh",{value:!0}),i.position.copy(_t(t.position)),i.renderOrder=998,i.layers.set(P),Te.set(i,{nodeId:c,handle:t}),i}function no(c,t){const e=[],i=[];for(const s of t){for(const o of s.guides)e.push(so(o));for(const o of s.handles){const n=oo(c,o);e.push(n),i.push(n)}}return{roots:e,handles:i}}function hi(c){return Te.get(c)??null}function le(c,t){const e=Te.get(c);c.material.color.set(t&&e?.handle.writable?"#ffffff":e?.handle.color??"#ffffff")}function di(c,t){const e=c.position.distanceTo(t.position);c.scale.setScalar(Math.max(.025,e*.012))}function ro(c,t,e){const i=c,s=i.geometry;s&&s!==Pi&&!t.has(s)&&(s.dispose(),t.add(s));const o=Array.isArray(i.material)?i.material:i.material?[i.material]:[];for(const n of o)e.has(n)||(n.dispose(),e.add(n))}function pi(c){const t=new Set,e=new Set;for(const i of c)i.removeFromParent(),i.traverse(s=>ro(s,t,e))}function ce(c,t,e,i=1.15){if(c.isEmpty())return 3;const s=e.clone().normalize(),o=Math.abs(s.dot(t.up))>.999?new p(0,0,1):t.up,n=new p().crossVectors(o,s).normalize(),r=new p().crossVectors(s,n).normalize(),l=c.getCenter(new p);let a=0,h=0,d=0;for(const _ of[c.min.x,c.max.x])for(const g of[c.min.y,c.max.y])for(const v of[c.min.z,c.max.z]){const b=new p(_,g,v).sub(l);d=Math.max(d,Math.abs(b.dot(n))),h=Math.max(h,Math.abs(b.dot(r))),a=Math.max(a,Math.abs(b.dot(s)))}const f=j.degToRad(t.fov*.5),u=Math.atan(Math.tan(f)*Math.max(t.aspect,.01)),m=Math.max(h/Math.tan(f),d/Math.tan(u));return Math.max(m*i+a,t.near*4,.01)}const ao=3,lo=.05,co=.03,ho=.6,po=.15,uo=.08,fo=3,mo=.45,Hi=.001,_o=24,go=6,yo=[[0,0,0],[0,0,1],[0,1,0],[0,1,1],[1,0,0],[1,0,1],[1,1,0],[1,1,1]];function vo(c){const t=j.clamp(c*po,uo,fo);return Math.max(Math.min(t,c*mo),Hi)}function he(c){return j.clamp(c*lo,co,ho)}function wo(c,t,e=!1){const{min:i,max:s}=c,o=h=>e?Math.max(h/2,Hi):vo(h),n=o(s.x-i.x),r=o(s.y-i.y),l=o(s.z-i.z);let a=0;for(const[h,d,f]of yo){const u=h===0?i.x:s.x,m=d===0?i.y:s.y,_=f===0?i.z:s.z,g=h===0?n:-n,v=d===0?r:-r,b=f===0?l:-l;t[a++]=u,t[a++]=m,t[a++]=_,t[a++]=u+g,t[a++]=m,t[a++]=_,t[a++]=u,t[a++]=m,t[a++]=_,t[a++]=u,t[a++]=m+v,t[a++]=_,t[a++]=u,t[a++]=m,t[a++]=_,t[a++]=u,t[a++]=m,t[a++]=_+b}}class de extends ye{entityObject;_fixedSize;_edges;_objectFrame;_toObject=new ft;_point=new p;_axisX=new p;_axisY=new p;_axisZ=new p;_scale=new p;_positions=new Float32Array(_o*go);_box=new xt;_worldPos=new p;_fixedExtent=new p;_standoff=new p;_lastRootMatrix=new Float32Array(16);_requiresContinuousBounds;constructor(t,e){const i=new ve,s=new we({color:e.color,linewidth:e.lineWidth??ao,worldUnits:!1,alphaToCoverage:!0,toneMapped:!1,depthTest:!1,depthWrite:!1});super(i,s),this.entityObject=t,this._fixedSize=e.fixedSize,this._edges=e.edges===!0,this._objectFrame=e.frame==="object";let o=!1;t.traverse(n=>{const r=n;(n.isSkinnedMesh||Array.isArray(r.morphTargetInfluences)&&r.morphTargetInfluences.length>0||ks(n)!==null)&&(o=!0)}),this._requiresContinuousBounds=o,this.renderOrder=1,this.frustumCulled=!1,i.setPositions(this._positions),this.update()}setColor(t){this.material.color.setHex(t)}updateIfNeeded(){this.entityObject.updateWorldMatrix(!0,!1);const t=this.entityObject.matrixWorld.elements;let e=!1;for(let i=0;i<t.length;i++)if(t[i]!==this._lastRootMatrix[i]){e=!0;break}(e||this._requiresContinuousBounds)&&this.update()}update(){this.entityObject.updateWorldMatrix(!0,!1);const t=this._objectFrame&&this._fixedSize===void 0&&Math.abs(this.entityObject.matrixWorld.determinant())>1e-30;this.entityObject.matrixWorld.extractBasis(this._axisX,this._axisY,this._axisZ);const e=t?this._scale.set(this._axisX.length(),this._axisY.length(),this._axisZ.length()):this._scale.set(1,1,1);if(this._fixedSize!==void 0)this.entityObject.getWorldPosition(this._worldPos),this._fixedExtent.setScalar(this._fixedSize),this._box.setFromCenterAndSize(this._worldPos,this._fixedExtent);else if(t?(this._toObject.copy(this.entityObject.matrixWorld).invert(),qi(this.entityObject,this._toObject,this._box)):Vt(this.entityObject,this._box),this._box.isEmpty())return;if(this._box.getSize(this._standoff).multiply(e),this._standoff.set(he(this._standoff.x),he(this._standoff.y),he(this._standoff.z)).divide(e),this._box.expandByVector(this._standoff),wo(this._box,this._positions,this._edges),t){const s=this.entityObject.matrixWorld;for(let o=0;o<this._positions.length;o+=3)this._point.set(this._positions[o],this._positions[o+1],this._positions[o+2]).applyMatrix4(s),this._positions[o]=this._point.x,this._positions[o+1]=this._point.y,this._positions[o+2]=this._point.z}const i=this.geometry.getAttribute("instanceStart");i&&(i.data.needsUpdate=!0),this._lastRootMatrix.set(this.entityObject.matrixWorld.elements)}dispose(){this.geometry.dispose(),this.material.dispose()}}function bo({BlendFunction:c,KernelSize:t,OutlineEffect:e},i,s,o){const n=new e(i,s,{blendFunction:c.ALPHA,visibleEdgeColor:o.visible,hiddenEdgeColor:o.hidden,edgeStrength:5,pulseSpeed:0,blur:!0,kernelSize:t.MEDIUM,resolutionScale:.5,xRay:!0});n.selectionLayer=_e,s.layers.disable(_e);const r=n.getFragmentShader(),l="vec3 color=edge.x*visibleEdgeColor+edge.y*hiddenEdgeColor;",a="edge*=(edgeStrength*mask.x*pulse);";r.includes(l)&&r.includes(a)&&(n.setFragmentShader(r.replace("uniform float edgeStrength;","uniform float edgeStrength;uniform float volterCrisp;").replace(a,"edge*=(edgeStrength*(volterCrisp>0.5?1.0:mask.x)*pulse);").replace(l,`${l}if(volterCrisp>0.5){float volterSum=edge.x+edge.y;if(volterSum>0.0)color/=volterSum;edge=min(edge,vec2(1.0));}`)),n.uniforms.set("volterCrisp",{value:0}));const h=n.update.bind(n);return n.update=(d,f,u)=>{const m=n.camera,_=m.layers.isEnabled(P);m.layers.disable(P);try{h(d,f,u)}finally{_&&m.layers.enable(P)}},gt.set(n,{colors:o,roots:0}),Kt(n),n}const xe=new WeakMap;function An(c,t,e,i,s){const o=xe.get(t)?.pop();return o?(o.mainScene=e,o.mainCamera=i,i.layers.disable(_e),gt.set(o,{colors:s,roots:0}),Kt(o),o):bo(c,e,i,s)}function Pn(c,t,e){t.selection.clear(),e?.setEffects([]);const i=xe.get(c)??[];i.includes(t)||i.push(t),xe.set(c,i)}const xo=`uniform lowp sampler2D inputBuffer;uniform vec2 texelSize;uniform float volterReach;
|
|
3
3
|
varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;
|
|
4
4
|
void main(){
|
|
5
5
|
vec2 uv=(vUv0+vUv1)*0.5;
|
package/dist/assets/{transform-mode-request-B6ZoHm8Z.js → transform-mode-request-D9k3BUHW.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dr as c,ds as u,dt as l,du as f,dv as m}from"./index-
|
|
1
|
+
import{dr as c,ds as u,dt as l,du as f,dv as m}from"./index-BYdQuKKk.js";function g(t,r){if(t.setTransformMode(r),r==="select")return;const n=[...t.selectedEntityIds];if(n.length===0)return;const s=c(t),a=((s===null?null:u(s)?.adapter)??l(t).adapter).transforms?.editability;if(!a)return;let e;for(const i of n){const o=f(d=>a(i,d));if(!o.locked)return;e??=o.reason}e&&m(e)}export{g as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as l}from"./jsx-runtime-DPjLkJKQ.js";import{r as c}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{al as b,aM as v,a7 as x,a8 as r,aN as j,aL as i}from"./index-
|
|
1
|
+
import{a as l}from"./jsx-runtime-DPjLkJKQ.js";import{r as c}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{al as b,aM as v,a7 as x,a8 as r,aN as j,aL as i}from"./index-BYdQuKKk.js";const S=[.25,.5,1,2];function y(a,s){const t=Math.round(a*s);return`${a.toFixed(2)}s · f${t}`}function E({transport:a}){const s=c.useSyncExternalStore(c.useCallback(e=>a?a.subscribe(e):()=>{},[a]),c.useCallback(()=>a?.snapshot()??null,[a]));if(!a||!s||s.activeSubject===null)return null;const t=s.driver==="world",n=s.playbackState==="playing",{start:h,end:m,fps:o,loop:g}=s.range,d=s.subjects.find(e=>e.id===s.activeSubject),p=s.subjects.length>1?s.subjects:null,u=a.activeClips();return l.jsxs("section",{"aria-label":"Transport","data-testid":"stage-transport-strip",style:{display:"flex",alignItems:"center",gap:"var(--volter-space-2)",padding:"var(--volter-space-1) var(--volter-space-3)",borderTop:`var(--volter-stroke-resting) solid ${b.boundary.default}`,background:b.surface.raised},children:[l.jsx(v,{size:"compact","aria-label":n?"Pause":"Play",disabled:t,onClick:()=>n?a.pause():a.play(),children:l.jsx(x,{icon:n?r.transport.pause:r.transport.play})}),l.jsx(v,{size:"compact","aria-label":"Stop",disabled:t,onClick:()=>a.stop(),children:l.jsx(x,{icon:r.transport.stop})}),l.jsx(j,{"aria-label":"Playhead",type:"range",min:h,max:m,step:1/o,value:s.time,disabled:t,onChange:e=>a.seek(Number(e.target.value)),style:{flex:1}}),l.jsx(i,{as:"span",variant:"caption",children:y(s.time,o)}),p?l.jsx("select",{"aria-label":"Subject",value:s.activeSubject,disabled:t,onChange:e=>a.setActiveSubject(e.target.value),children:p.map(e=>l.jsx("option",{value:e.id,children:e.label},e.id))}):null,u?l.jsx("select",{"aria-label":"Clip",disabled:t,onChange:e=>a.setActiveClip(e.target.value),children:u.map(e=>l.jsx("option",{value:e.id,children:e.label},e.id))}):null,l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"var(--volter-space-1)"},children:[l.jsx("input",{type:"checkbox",checked:g,disabled:t,onChange:e=>a.setLoop(e.target.checked)}),l.jsx(i,{as:"span",variant:"caption",children:"Loop"})]}),l.jsx("select",{"aria-label":"Speed",value:String(s.timeScale),disabled:t,onChange:e=>a.setTimeScale(Number(e.target.value)),children:S.map(e=>l.jsxs("option",{value:String(e),children:[e,"×"]},e))}),t?l.jsx(i,{as:"span",variant:"caption",children:"The world is driving time (Play); pause the game to scrub"}):d?l.jsx(i,{as:"span",variant:"caption",children:d.label}):null]})}export{E as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o}from"./jsx-runtime-DPjLkJKQ.js";import{r as t}from"./index-BYdQuKKk.js";import{r as m}from"./index-nmcBqr7Y.js";import{P as p}from"./PlayBar-Cp3N-KCf.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-D_NuPfjr.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./configurations-3ggfkdh8.js";import"./run-selection-CIf2tl8R.js";import"./game-network-DcXic1hU.js";import"./index-OZVqp6xS.js";import"./index-Da9JhEvW.js";import"./native-debug-module-xmmPMHBo.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-b9SNCcVT.js";import"./contract-system-adapters-DEkFby0m.js";import"./game-contract-seams-Dq1vGRC1.js";import"./seeded-random-C4zhXjCn.js";import"./game-audio-BeCyd0Ha.js";import"./rapier-physics-adapter-CaZqWLu0.js";import"./events-156d8d12.esm-CYeuVCYr.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./index-bQE2NA0D.js";import"./live-project-verbs-DYPJ4HjP.js";import"./capability-coverage-C4P-DBKm.js";import"./edit-mode-authoring-DsZ-2V4q.js";import"./json-history-resource-D-FoaxLT.js";import"./binding-resolver-DmISbZ_C.js";import"./adapter-surface-Y37Nzcyw.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./realm-services-D8d7aUSw.js";import"./canvas-entry-runtime-C2mS5iAy.js";import"./three-ingest-runtime-DI_J7mdv.js";import"./EffectComposer-BEAt0PtQ.js";import"./CopyShader-BzTUYzf6.js";import"./ShaderPass-DTnDQXm0.js";import"./Pass-D1MRT672.js";import"./CSS3DRenderer-BsAqfavI.js";import"./relative-path-guard-GiM7Lsz8.js";import"./react-root-BHA-cdrW.js";import"./editor-presentation-activity-CqJH4G9t.js";import"./active-ingest-CjTOfvPo.js";import"./ingest-source-persistence-G4DRJGE8.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-Cy219iw-.js";import"./mounted-authoring-CqEcYmBB.js";import"./entity-object-DWKBk3rf.js";import"./user-data-CJW19F-2.js";import"./workspace-arrangement-DwFkSdlq.js";import"./three-contract-Dkt6PmWY.js";import"./three-D4bun8tv.js";import"./editor-layers-wmPhuj0X.js";import"./component-instance-root-z47Ib-DX.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-authoring-adapter-VpfMe64G.js";import"./source-persistence-backend-Sj6uuBrM.js";import"./three-projection-core-DTAhpWX4.js";import"./body-marks-C1LxJtQb.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./structural-ids-BOo2BRoY.js";import"./object3d-authoring-subject-XccsO0xG.js";import"./r3f-physics-binding-CmlqQXpO.js";import"./deferred-ingest-play-EBHoQATQ.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-D9avM44a.js";import"./board-guides-siB7DLLo.js";import"./relative-import-specifier-BGUMwtft.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-CazPcKcv.js";import"./inference-diagnostics-DylK1Zco.js";import"./writer-tw6EcuVO.js";import"./three-state-ctKrzvps.js";import"./editor-shell-store-LRVyeXM-.js";import"./output-pass-HurwNl0G.js";import"./viewport-door-BW0xEXr5.js";import"./game-surface-defaults-D8S4cRxi.js";const Dr="workspace.header",Fr=0;function Gr(){const{project:r}=t();return m.useSyncExternalStore(r.subscribe,r.mounts,r.mounts)?o.jsx(p,{}):null}export{Gr as default,Fr as order,Dr as point};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e2 as e,c6 as o,u as r}from"./index-
|
|
1
|
+
import{e2 as e,c6 as o,u as r}from"./index-BYdQuKKk.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const t=e([o(),o(),o()]).describe("3D vector as [x, y, z]"),i=e([o(),o(),o(),o()]).describe("Quaternion as [x, y, z, w]"),u=r({position:t.optional().describe("World-space position [x, y, z]"),rotation:i.optional().describe("Rotation quaternion [x, y, z, w]"),scale:t.optional().describe("Scale factor per axis [x, y, z]. Defaults to [1, 1, 1]")}).describe("Local transform relative to parent entity");export{i as QuatSchema,u as TransformSchema,t as Vec3Schema};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/story-capture-
|
|
2
|
-
import{dK as s,as as m,dL as p,aC as n,_ as c,ba as d}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/story-capture-DAzlViX7.js","assets/react-story-board-JyxJfFaY.js","assets/jsx-runtime-DPjLkJKQ.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-nmcBqr7Y.js","assets/index-D_NuPfjr.js","assets/index-CtzuWnCS.js","assets/index-CinJrH5C.js","assets/index-BYdQuKKk.js","assets/index-FUuS4qwW.js","assets/client-DNXj_opT.js","assets/index-CPiRKiDC.css","assets/bitmap-label-Ct4k6ehY.js","assets/StoryPreviewMount-Dn5LTh6d.js","assets/story-presentation-B85RFwXM.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{dK as s,as as m,dL as p,aC as n,_ as c,ba as d}from"./index-BYdQuKKk.js";import{a as u}from"./jsx-runtime-DPjLkJKQ.js";import{d as l,p as v,r as P}from"./design-time-layers-Cqjx6T_b.js";import{RootDocumentContent as _}from"./world-documents-DXzZtfR9.js";import{U as w}from"./component-board.service-BuJB7tbp.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./root-stacking-BEd9ZvxC.js";import"./edit-mode-authoring-DsZ-2V4q.js";import"./design-time-mount-registry-DUpXCg1U.js";import"./react-story-board-JyxJfFaY.js";import"./game-surface-defaults-D8S4cRxi.js";import"./react-canvas-navigation-CcPcwMkG.js";import"./component-board-registry-DrIa2csL.js";import"./surface-state-D9U0kgz0.js";import"./board-guides-siB7DLLo.js";import"./CanvasSceneViewport-GPeqRbJF.js";import"./RootSelectionOverlay-DbREUgIb.js";import"./eyedropper-session-bjPXnfeX.js";import"./layered-pick-C73ZQGcv.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./inspect-CazPcKcv.js";import"./inference-diagnostics-DylK1Zco.js";import"./Toolbar-BthqVrvk.js";import"./transform-mode-request-D9k3BUHW.js";import"./TransientHint-BfLO2bn2.js";import"./ReactCanvasControls-BZIKnBe_.js";import"./story-media-presence-B0ccG2oZ.js";const y={revision:()=>JSON.stringify(d().map(({id:i,modulePath:t})=>[i,t])),subscribe:m,capture:async({width:i,height:t})=>{const{captureDomStoryBoardPreview:o}=await c(async()=>{const{captureDomStoryBoardPreview:e}=await import("./story-capture-DAzlViX7.js");return{captureDomStoryBoardPreview:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]));return o(i,t)}};function Z({store:i,composite:t}){const o=l(t).find(r=>r.kind==="dom")??v(),e=r=>u.jsx(_,{...r,composite:t,descriptor:o,store:i});s({id:p,title:w,kind:"world",workspaceRole:"authored-subject",provenance:{rootId:o.worldId,...o.path?{sourcePath:o.path}:{}},Content:e,preview:y,presentation:()=>{const r=n()?.rootPath,a=r?P(r,o.worldId):void 0;return{kind:"workspace",id:p,...a?{story:a}:{}}}},{category:"canvas",default:!t.childAdapters().some(r=>r.kind==="three"||r.kind==="canvas")})}export{Z as installUiBoard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{O as n}from"./workspace-arrangement-
|
|
1
|
+
import{O as n}from"./workspace-arrangement-DwFkSdlq.js";const r={...n,entityId:"entityId",forward:"forward",tags:"tags",attributes:"attributes",navRole:"navRole",pivot:"pivot",splineCurve:"splineCurve",splineControlPoint:"splineControlPoint",_camera:"_camera",_particleSystem:"_particleSystem",gaussianSplat:"gaussianSplat",__sharedGeometry:"__sharedGeometry",__shadeOrig:"__shadeOrig",__shadeUnlit:"__shadeUnlit",__ingest:"__ingest",__ingestNextId:"__ingestNextId",authoringRoot:"authoringRoot",authoringInstance:"authoringInstance",authoringLabel:"authoringLabel",authoringComponent:"authoringComponent",authoringDocument:"authoringDocument",authoringHierarchyId:"authoringHierarchyId",authoringHierarchyParentId:"authoringHierarchyParentId",authoringHierarchyOrder:"authoringHierarchyOrder",editorIcon:"editorIcon",envObject:"envObject",constraints:"constraints",authoringSubject:"authoringSubject",reflectionProbe:"reflectionProbe",triggerVolume:"triggerVolume",vcDirIdx:"vcDirIdx"};function o(t,e){return t?t.userData[r[e]]:void 0}function s(t,e,a){t.userData[r[e]]=a}function u(t,e){return t?t.userData[r[e]]!==void 0:!1}export{o as g,u as h,s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aa as l}from"./index-
|
|
1
|
+
import{aa as l}from"./index-BYdQuKKk.js";function a(c,i){let t=i,s=0;const r=new Set,o=()=>{s++;for(const e of r)e()},n=e=>{t!==e&&(t=e,o())};return{subscribe(e){return r.add(e),()=>{r.delete(e)}},version:()=>s,active:()=>t,select:n,open(e){n(e),l(c)},notify:o,reset(){t=i,o()}}}const p=a("tool:profiler.utility","profiler");export{p};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{y as w}from"./index-
|
|
1
|
+
import{y as w}from"./index-BYdQuKKk.js";const s=new Map,f=new Map;function g(e){let t=f.get(e);return t||(t={frameListeners:new Set,helpers:new Map},f.set(e,t)),t}const l=new Set,c=new Set;function i(){for(const t of s.values())if(t.presenting)return t;const e=w();if(e!==null){const t=s.get(e);if(t)return t}return s.values().next().value??null}let a=null;function p(){a=null;const e=v();for(const t of c)t(e)}function h(e,t){const n=g(e);return{documentId:e,rig:()=>s.get(e)?.rig??t,setHelper:(r,o)=>{n.helpers.set(r,o),s.get(e)?.setHelper(r,o)},onFrame:r=>(n.frameListeners.add(r),()=>{n.frameListeners.delete(r)})}}function S(e,t,n,r){const o=g(r.documentId),u={documentId:r.documentId,rig:e,present:t,setHelper:n,frameListeners:o.frameListeners,helpers:o.helpers,presenting:!1};s.set(r.documentId,u);for(const[d,m]of u.helpers)n(d,m);return p(),()=>{s.get(r.documentId)===u&&(s.delete(r.documentId),p())}}function I(e,t){const n=i();n&&(n.helpers.set(e,t),n.setHelper(e,t))}function V(){return i()?.rig??null}function y(e){const t=i();if(!t)return null;const n=t.present(e);if(!n)return null;t.presenting=!0;let r=!1;return{worldId:n.worldId,dispose:()=>{r||(r=!0,t.presenting=!1),n.dispose()}}}function F(e){return l.add(e),()=>{l.delete(e)}}function v(){return a||(a=[...s.values()].map(e=>h(e.documentId,e.rig))),a}function H(e){const t=f.get(e);return t?[...t.helpers].filter(([,n])=>n!==null).map(([n])=>n):[]}function b(e){return c.add(e),()=>{c.delete(e)}}function x(e,t){const n=s.get(e);if(n){for(const r of n.frameListeners)r(t);if(i()===n)for(const r of l)r(t)}}export{V as a,v as b,S as c,F as d,b as o,y as p,x as r,I as s,H as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s}from"./mounted-authoring-
|
|
1
|
+
import{s}from"./mounted-authoring-CqEcYmBB.js";import{s as u}from"./three-D4bun8tv.js";import{t as m}from"./three-contract-Dkt6PmWY.js";function c(t,d){const e=d.find(i=>i.mounted.kind==="three");if(!e||e.mounted.kind!=="three")return null;const n=m(e.mounted).scene,o=e.mounted.authoring;o&&s(n,o),u(n,a(e.id)),t.enterPlayScene(n,e.mounted.rendererConfig);let r=!1;return{worldId:e.id,dispose(){r||(r=!0,t.releaseAdoptedScene(n))}}}function a(t){return t??"main"}export{a as l,c as p};
|
package/dist/assets/{viewport-surface-status-B-dxhyXW.js → viewport-surface-status-CO8m-4fj.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./jsx-runtime-DPjLkJKQ.js";import"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{al as i}from"./index-
|
|
1
|
+
import{a as r}from"./jsx-runtime-DPjLkJKQ.js";import"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{al as i}from"./index-BYdQuKKk.js";const m="Preparing the viewport…",n="Preparing 3D component previews…";function c(e){return!Number.isFinite(e)||e<1?n:e===1?"Preparing 1 component preview…":`Preparing ${e} component previews…`}function u({testId:e,children:t}){return r.jsx("div",{"data-testid":e,style:{position:"absolute",inset:0,padding:16,fontSize:12,color:i.content.muted,pointerEvents:"none"},children:t})}export{m as O,u as V,c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as t,d as i,f as r,g as m}from"./index-
|
|
1
|
+
import{e as t,d as i,f as r,g as m}from"./index-BTzFwm1R.js";import"./index-BYdQuKKk.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";t.add(i,r);t.add(m);
|