@volter/game-editor 0.5.123 → 0.5.125
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 +2215 -2215
- package/dist/assets/{AssetBudgetPanel-BysmQBG_.js → AssetBudgetPanel-BSgP_Ly5.js} +3 -3
- package/dist/assets/{AudioViewer-uCMtO6Qm.js → AudioViewer-B88kBiQH.js} +1 -1
- package/dist/assets/{CanvasBoardDocument-CkEEUE29.js → CanvasBoardDocument-BmyDdzzT.js} +1 -1
- package/dist/assets/{CanvasSceneViewport-D-WC3mNK.js → CanvasSceneViewport-DN9DYpjz.js} +1 -1
- package/dist/assets/{ColorInput-CN0VduhS.js → ColorInput-D6i_QXM-.js} +1 -1
- package/dist/assets/{ColorPicker-CuKRMJx9.js → ColorPicker-VBKN9sk0.js} +1 -1
- package/dist/assets/{EntityModelDocument-BDA_oS8p.js → EntityModelDocument-Bbp4eSk-.js} +1 -1
- package/dist/assets/{EnvironmentAssetDocument-DjGu7n7g.js → EnvironmentAssetDocument-CHl6PCV6.js} +1 -1
- package/dist/assets/{GameplaySessionTimeline-k3HDIyvv.js → GameplaySessionTimeline-DSCmUHiz.js} +1 -1
- package/dist/assets/{ImageViewer-tSj0VFS7.js → ImageViewer-RDOE-ikb.js} +1 -1
- package/dist/assets/InspectorObjectPreview-CkyqYsEo.js +1 -0
- package/dist/assets/{JsonAssetDocument-CQn3Stfz.js → JsonAssetDocument-y-ihqubn.js} +1 -1
- package/dist/assets/{LiveModuleDocument-BF3ci_zZ.js → LiveModuleDocument-BRKWZS4J.js} +1 -1
- package/dist/assets/{LutAssetDocument-B7gtucKj.js → LutAssetDocument-D6redjUn.js} +1 -1
- package/dist/assets/{ModelAssetDocument-BuH5TXMy.js → ModelAssetDocument-DXcUg5-F.js} +1 -1
- package/dist/assets/{NonThreeAuthoringBootstrap-CGG_oev2.js → NonThreeAuthoringBootstrap-CpZS3Gow.js} +1 -1
- package/dist/assets/{Object3DDocumentToolbar-DzOa0MS0.js → Object3DDocumentToolbar-C7g33hHW.js} +1 -1
- package/dist/assets/Object3DDocumentViewport-CTE6_O8m.js +2 -0
- package/dist/assets/{Object3DPreview-CKQ1KIx8.js → Object3DPreview-CWZeky9X.js} +1 -1
- package/dist/assets/{OnlineAssetDetail-CbL2a4y5.js → OnlineAssetDetail-Wm_N9tmK.js} +1 -1
- package/dist/assets/{PlayBar-D5IYibD2.js → PlayBar-BSCkbbWm.js} +1 -1
- package/dist/assets/{QuarksAssetDocument-BF6EI6Uu.js → QuarksAssetDocument-C2d8g6QR.js} +1 -1
- package/dist/assets/{ReactCanvasControls-N8mnfQ7L.js → ReactCanvasControls-DZZEWbJH.js} +1 -1
- package/dist/assets/{RootSelectionOverlay-MwydsqCP.js → RootSelectionOverlay-BlDdfAyN.js} +1 -1
- package/dist/assets/{ShaderAssetDocument-Dov33U4p.js → ShaderAssetDocument-BMIhoIDU.js} +1 -1
- package/dist/assets/{ShadowEditor-CAnkvnG7.js → ShadowEditor-DJfc5awF.js} +1 -1
- package/dist/assets/{SourceAssetViewer-CBWzh8PN.js → SourceAssetViewer-CSS85AGm.js} +1 -1
- package/dist/assets/{StageHost-BQE2Andh.js → StageHost-BHQB10fP.js} +2 -2
- package/dist/assets/{StoryPreviewMount-ffSr6f2V.js → StoryPreviewMount-DtOeByMH.js} +1 -1
- package/dist/assets/{ThreeBoardDocument-D2tVpmRM.js → ThreeBoardDocument-CU7hSmxx.js} +2 -2
- package/dist/assets/{ThreeIsolationSceneContent-D3AkgyPd.js → ThreeIsolationSceneContent-CZFEUx5D.js} +1 -1
- package/dist/assets/{ToolObject3DPreview-BBUepvqt.js → ToolObject3DPreview-BZ-bqJjM.js} +1 -1
- package/dist/assets/{Toolbar-DradHOfY.js → Toolbar-bpjNJw1o.js} +1 -1
- package/dist/assets/{TransientHint-BYh124CI.js → TransientHint-Cs1xJsTR.js} +1 -1
- package/dist/assets/{VideoViewer-DFzfdlat.js → VideoViewer-DNcS3fPO.js} +1 -1
- package/dist/assets/{ViewportShadingMenu-Bgwv-ojb.js → ViewportShadingMenu-BGdf_ugP.js} +1 -1
- package/dist/assets/{active-ingest-OwQi1wU2.js → active-ingest-Ddr-rqpl.js} +2 -2
- package/dist/assets/{animation-clock-NMnEZeR6.js → animation-clock-BBk2Uf4j.js} +1 -1
- package/dist/assets/{animation-mixers.service-BaNkZdZK.js → animation-mixers.service-q4aIDhxx.js} +1 -1
- package/dist/assets/{animation-timeline.utility-B_yTDOtw.js → animation-timeline.utility-D6rFf4EX.js} +1 -1
- package/dist/assets/{asset-budget-asset.menu-HsA9f8Rf.js → asset-budget-asset.menu-DEuaaKC5.js} +1 -1
- package/dist/assets/{asset-budget.action-C9JhXwoQ.js → asset-budget.action-v70qmoCd.js} +1 -1
- package/dist/assets/{asset-budget.document-BBjghhxS.js → asset-budget.document-BeuS8SRM.js} +1 -1
- package/dist/assets/{asset-budget.menu-CNeKVzuN.js → asset-budget.menu-bK7bDVj7.js} +1 -1
- package/dist/assets/{asset-editor-persistence-B6AwoID4.js → asset-editor-persistence-C8kiK_is.js} +1 -1
- package/dist/assets/{asset-loaders-CvFbBNk5.js → asset-loaders-CZ_1eTic.js} +1 -1
- package/dist/assets/{asset-preview-B-UHTAVy.js → asset-preview-Cck2dsj4.js} +1 -1
- package/dist/assets/{audio-unlock.service-CL5_a6ru.js → audio-unlock.service-DzW-k8nv.js} +1 -1
- package/dist/assets/{audio.utility-DzLS3QwP.js → audio.utility-CZfoTgEQ.js} +1 -1
- package/dist/assets/autoplay.service-Bd6xIgdv.js +1 -0
- package/dist/assets/{babylon-authoring-adapter-DBDw_8of.js → babylon-authoring-adapter-B1-f9m-3.js} +1 -1
- package/dist/assets/{binding-resolver-DfUFoIdA.js → binding-resolver-BcV7It57.js} +2 -2
- package/dist/assets/blender-emscripten-engine-DYUe8C3o.js +2 -0
- package/dist/assets/{blender-node-editor.document-DrhXAm5t.js → blender-node-editor.document-gGXQ4eC4.js} +1 -1
- package/dist/assets/{blender-properties-tab-aKKbSTiu.js → blender-properties-tab-_2HlBre8.js} +1 -1
- package/dist/assets/blender-runtime-host-B3OHRnyq.js +7 -0
- package/dist/assets/{blender-runtime-skin-BL8Bt4al.js → blender-runtime-skin-V9L1oa_d.js} +1 -1
- package/dist/assets/{blender-runtime.document-Be-HHxIi.js → blender-runtime.document-YfVgb0xw.js} +1 -1
- package/dist/assets/{blender-screenshot.menu-_KaVhtpX.js → blender-screenshot.menu-DJW5wTB1.js} +1 -1
- package/dist/assets/{blender-timeline.document-COGHP-8s.js → blender-timeline.document-nci9H4b6.js} +1 -1
- package/dist/assets/{blender-uv-editor.document-CfkrRRXy.js → blender-uv-editor.document-hAy3fFV_.js} +1 -1
- package/dist/assets/{blender-version.status-YSeY8Xgv.js → blender-version.status-IBwLAxXR.js} +1 -1
- package/dist/assets/{blender-wali-engine-m92Rao9b.js → blender-wali-engine-CJZJEcgn.js} +1 -1
- package/dist/assets/{blender.command-BUDOweup.js → blender.command-B_7KUtv7.js} +1 -1
- package/dist/assets/{board-guides-D1_vqIjE.js → board-guides-CLF_VLvL.js} +1 -1
- package/dist/assets/{bridge.command-Q8r-REHS.js → bridge.command-DgsgKZa4.js} +3 -3
- package/dist/assets/{browserAll-sDfLeEo4.js → browserAll-DnBssp_8.js} +1 -1
- package/dist/assets/{build-player.document-BP1foVez.js → build-player.document-ue8n3WPX.js} +1 -1
- package/dist/assets/{build-profiles.document-BLkANcgy.js → build-profiles.document-BoxCYqFz.js} +1 -1
- package/dist/assets/{build-progress.status-aew2nCwQ.js → build-progress.status-DIVFq_Wm.js} +1 -1
- package/dist/assets/{build-session-QPGnfc8_.js → build-session-LR4kIgAX.js} +1 -1
- package/dist/assets/{build.action-DbsUhR0h.js → build.action-B1Tw-IoK.js} +1 -1
- package/dist/assets/{build.command-T3R0G4zY.js → build.command-CtmztNo9.js} +1 -1
- package/dist/assets/{build.header-BJld0xQX.js → build.header-DDLkcelu.js} +1 -1
- package/dist/assets/{build.menu-DK2-m5Sd.js → build.menu-BAwLd2ek.js} +1 -1
- package/dist/assets/{build.service-zGgv3a6V.js → build.service-B-FnDXxN.js} +1 -1
- package/dist/assets/{camera-CzPogR22.js → camera-DuP48tI_.js} +1 -1
- package/dist/assets/{camera-runtime.inspector-DrEocezO.js → camera-runtime.inspector-CziDqZQb.js} +1 -1
- package/dist/assets/{canvas-design-mount-CQkL5wVK.js → canvas-design-mount-BABOs-lh.js} +3 -3
- package/dist/assets/{canvas-entry-runtime-B0t6FIl8.js → canvas-entry-runtime-Dcf218s2.js} +2 -2
- package/dist/assets/{canvas-preview-frames-DJmgjKpm.js → canvas-preview-frames-DNGxYzHV.js} +1 -1
- package/dist/assets/{canvas-story-capture.service-B6HRp4Al.js → canvas-story-capture.service-BJpDDwVH.js} +2 -2
- package/dist/assets/{capability-coverage-BMpOdSTg.js → capability-coverage-6PwUP4oX.js} +1 -1
- package/dist/assets/{collaboration-presence-DBgevks5.js → collaboration-presence-BNBw47jA.js} +1 -1
- package/dist/assets/{collider-Ds9xpoEt.js → collider-DAF9Z2X4.js} +1 -1
- package/dist/assets/{component-board.service-BEp_pMBF.js → component-board.service-Dv4HPrwH.js} +2 -2
- package/dist/assets/{component-board.service-Bdl-AaPy.js → component-board.service-ihMRMzy3.js} +2 -2
- package/dist/assets/{component-board.service-B8ePqR_F.js → component-board.service-khBXmwDQ.js} +2 -2
- package/dist/assets/{component-contracts.service-brlBfCxz.js → component-contracts.service-CwplNZn-.js} +1 -1
- package/dist/assets/{component-instance-root-B5BfGdnt.js → component-instance-root-9er-zSAY.js} +1 -1
- package/dist/assets/{component-verbs.command-CF5svJXI.js → component-verbs.command-z-I0Ro4a.js} +1 -1
- package/dist/assets/{component-verbs.service-BgFc6_Sp.js → component-verbs.service-DwLwoLTJ.js} +1 -1
- package/dist/assets/{config-B_bow8n4.js → config-DQzlvYVI.js} +2 -2
- package/dist/assets/{configurations-CHFyGmDI.js → configurations-oKsIhTb-.js} +1 -1
- package/dist/assets/{connection.status-DwxeUdvu.js → connection.status-BqYA7Z5e.js} +1 -1
- package/dist/assets/{constraints.inspector-CjM_NN35.js → constraints.inspector-CVyV22tC.js} +1 -1
- package/dist/assets/{content-bounds-B1oiinxO.js → content-bounds-DuSmUtY1.js} +1 -1
- package/dist/assets/{contract-system-adapters-CI2vuspF.js → contract-system-adapters-C66CNkAk.js} +1 -1
- package/dist/assets/{coverage.service-BC_p3oT6.js → coverage.service-DwFCo4w8.js} +1 -1
- package/dist/assets/{create-runtime-DnWgeeXm.js → create-runtime-B2p75b5q.js} +1 -1
- package/dist/assets/{curve-CqGPvcv5.js → curve-Dw4divzX.js} +1 -1
- package/dist/assets/{data-asset-DysZpjxs.js → data-asset-BSxK3Y_h.js} +1 -1
- package/dist/assets/{data-ref-CpeNHUAS.js → data-ref-BUs2PbaF.js} +1 -1
- package/dist/assets/{debug-bridge-C11lW4bU.js → debug-bridge-BdoOc1Jv.js} +1 -1
- package/dist/assets/{debug-registry-BUrxqM8q.js → debug-registry-BosYnV_Z.js} +1 -1
- package/dist/assets/{deferred-ingest-play-Pu1midXi.js → deferred-ingest-play-BOUu0VgE.js} +2 -2
- package/dist/assets/{design-time-canvas-mount-TRHTxn72.js → design-time-canvas-mount-Ds-zq4CU.js} +2 -2
- package/dist/assets/{design-time-layers-aG_eVn9e.js → design-time-layers-B0DteFiV.js} +1 -1
- package/dist/assets/{design-time-mount.service-DJPea29D.js → design-time-mount.service-CfOBd_-9.js} +2 -2
- package/dist/assets/{design-time-mount.service-vxQP3BqL.js → design-time-mount.service-CrQoKi6N.js} +2 -2
- package/dist/assets/{design-time-react-mount-ChxYjfQE.js → design-time-react-mount-B6BJiTeO.js} +1 -1
- package/dist/assets/{document-preview-three-BAEH4qJJ.js → document-preview-three-4FxFY9Cx.js} +1 -1
- package/dist/assets/{dom-authoring-adapter-DiB_ur5X.js → dom-authoring-adapter-vourOD4d.js} +1 -1
- package/dist/assets/{draco3d-CnfBciy9.js → draco3d-Bk4s3p1H.js} +1 -1
- package/dist/assets/{edit-mode-audio.service-BIYK9EMX.js → edit-mode-audio.service-DRpU_FFF.js} +1 -1
- package/dist/assets/{edit-mode-authoring-BpOCBtRZ.js → edit-mode-authoring-z2Uu4CrX.js} +1 -1
- package/dist/assets/{edit-mode-networking.service-Bs-EUCvr.js → edit-mode-networking.service-DhwnIn2o.js} +1 -1
- package/dist/assets/{editor-api-BbJjTHb-.js → editor-api-hojxsk8T.js} +1 -1
- package/dist/assets/{editor-layers-Di-Sxkb4.js → editor-layers-CSl6S15k.js} +1 -1
- package/dist/assets/{editor-shell-store-DToX9C1w.js → editor-shell-store-DTfKHHYD.js} +1 -1
- package/dist/assets/{entity-object-CvJ7cBnl.js → entity-object-BO1_Qmt8.js} +1 -1
- package/dist/assets/{extend-Spkd5La6.js → extend-BedwRP5_.js} +1 -1
- package/dist/assets/{fork-menu-CrLcBlUS.js → fork-menu-BWmJjb_A.js} +1 -1
- package/dist/assets/{frame-debugger-store-ZXELq7Sw.js → frame-debugger-store-Gu32HGGD.js} +1 -1
- package/dist/assets/{game-contract-seams-RMTHm5pd.js → game-contract-seams-DQGwjObL.js} +1 -1
- package/dist/assets/{game-css-scope-transform-BnXCYTQq.js → game-css-scope-transform-DYa5L1dk.js} +1 -1
- package/dist/assets/{game-document.service-BWTs51yz.js → game-document.service-CG1egqq7.js} +1 -1
- package/dist/assets/{game-eval.command-B-fkb9B7.js → game-eval.command-D9LYcy3m.js} +1 -1
- package/dist/assets/{game-module-access-CjJpYwTG.js → game-module-access-DfYSoZjk.js} +1 -1
- package/dist/assets/{game-network-BPFXnsMB.js → game-network-BZdvwJ0a.js} +3 -3
- package/dist/assets/{gameplay-export-CKXF61ot.js → gameplay-export-BVH9PKaE.js} +1 -1
- package/dist/assets/{gameplay-replay-DmxzPNcF.js → gameplay-replay-BLLppt8C.js} +1 -1
- package/dist/assets/{gameplay.command-wUNlfL6T.js → gameplay.command-Djp-Aok2.js} +1 -1
- package/dist/assets/{generation-jobs-CICFuGNY.js → generation-jobs-CsXRg1Tq.js} +1 -1
- package/dist/assets/{generation.service-BfYJsdqm.js → generation.service-Cn7nGBEo.js} +1 -1
- package/dist/assets/{generations-DH_O5Lew.js → generations-BqPU1fPO.js} +1 -1
- package/dist/assets/{generations.status-BLngol5q.js → generations.status-CJUE5vVY.js} +1 -1
- package/dist/assets/{hierarchy-marks-CDIrCtK7.js → hierarchy-marks-B4XzZe8e.js} +1 -1
- package/dist/assets/{hosted-asset-materialization-C0-58jgj.js → hosted-asset-materialization-iHAqPmZ-.js} +1 -1
- package/dist/assets/{index-2skV9cWR.js → index-By0elT7x.js} +1 -1
- package/dist/assets/{index-KLCk86kp.js → index-C1mcZ_qc.js} +2 -2
- package/dist/assets/{index-emt5RtDN.js → index-C9f8SWpp.js} +1 -1
- package/dist/assets/{index-OSyT3g5i.js → index-COorqncb.js} +1 -1
- package/dist/assets/{index-fAvZ5TX8.js → index-CRj7mn0r.js} +1 -1
- package/dist/assets/{index-DxPXoAEa.js → index-CvVYuIWr.js} +1 -1
- package/dist/assets/{index-lVvSBt-F.js → index-F91ICQ72.js} +1 -1
- package/dist/assets/{index-Cm23IIsy.js → index-X7FPqr0y.js} +1 -1
- package/dist/assets/{index-BXVB2CCJ.js → index-r-FuctN5.js} +7 -7
- package/dist/assets/{inference-diagnostics-CJEVHw4r.js → inference-diagnostics-D4Iu86es.js} +1 -1
- package/dist/assets/{ingest-boot-viewport-y0bXLVn5.js → ingest-boot-viewport-DdHb1LeO.js} +1 -1
- package/dist/assets/{ingest-siblings-DRbw9wlK.js → ingest-siblings-Cf-McyY_.js} +1 -1
- package/dist/assets/{ingest-source-persistence-CDk8QnEz.js → ingest-source-persistence-BwINDLYc.js} +1 -1
- package/dist/assets/{ingest.service-Djhwt3md.js → ingest.service-B8hV6YT4.js} +1 -1
- package/dist/assets/{inspect-D11YCyvL.js → inspect-sYciyXgK.js} +1 -1
- package/dist/assets/instances.command-Dj-9DRxh.js +1 -0
- package/dist/assets/{json-history-resource-BjxiSBwH.js → json-history-resource-DuT7scib.js} +1 -1
- package/dist/assets/{layered-pick-D1bPiejF.js → layered-pick-1v6rbWkT.js} +1 -1
- package/dist/assets/{light-2wT5NDWa.js → light-B3S378yT.js} +1 -1
- package/dist/assets/{live-project-verbs-BOojwbU5.js → live-project-verbs-BnaccVli.js} +1 -1
- package/dist/assets/{machine.document-BeIZE4p7.js → machine.document-BG1voYon.js} +1 -1
- package/dist/assets/{machines.finder-D9ImanFI.js → machines.finder-G0u80stL.js} +1 -1
- package/dist/assets/{material-BbmFLNh4.js → material-BCw5pv20.js} +1 -1
- package/dist/assets/{material-factory-EOVCyE5v.js → material-factory-zynl18MK.js} +1 -1
- package/dist/assets/{mesh-B7mkXP1n.js → mesh-q9baasmD.js} +1 -1
- package/dist/assets/{model-asset-sections.service-DQuUrJqa.js → model-asset-sections.service-DL_H2GfH.js} +1 -1
- package/dist/assets/{model-inspection-D-91nWIA.js → model-inspection-BbRgz6bo.js} +1 -1
- package/dist/assets/{model-thumbnail-cXQYT6FJ.js → model-thumbnail-DSDxaYgd.js} +1 -1
- package/dist/assets/{models.finder-DCL3T1sC.js → models.finder-Dy-J43qR.js} +1 -1
- package/dist/assets/{module-mode-DeRqXLY_.js → module-mode-DNU-E0nG.js} +2 -2
- package/dist/assets/{mount-canvas-ingest-root-C9ga6Jlt.js → mount-canvas-ingest-root-CQ4W-gUR.js} +2 -2
- package/dist/assets/{mount-dom-ingest-root-C6EokmvO.js → mount-dom-ingest-root-COjIeP_R.js} +2 -2
- package/dist/assets/{mount-ingest-root-CItPPhBw.js → mount-ingest-root-CWdNrIZI.js} +2 -2
- package/dist/assets/{mount-manifest-DhkcL_wI.js → mount-manifest-qdcv5b_0.js} +1 -1
- package/dist/assets/{mount-three-ingest-root-MskuDjok.js → mount-three-ingest-root-DztDwD1p.js} +1 -1
- package/dist/assets/{mounted-authoring-19FVLQog.js → mounted-authoring-DKn1UEnI.js} +1 -1
- package/dist/assets/{mounted-story-viewport-source-BNd5ADqn.js → mounted-story-viewport-source-Dj51da9b.js} +1 -1
- package/dist/assets/{native-debug-module-CZZTGl7D.js → native-debug-module-C5xRtrQJ.js} +1 -1
- package/dist/assets/{navigation-CHes-GFg.js → navigation-6i4sFL2e.js} +1 -1
- package/dist/assets/{navmesh.menu-DZgduW-s.js → navmesh.menu-BeWFiE7d.js} +1 -1
- package/dist/assets/{navmesh.service-CcRyX5mz.js → navmesh.service-y9zoEU38.js} +1 -1
- package/dist/assets/network-observer.service-rq9XQOmV.js +1 -0
- package/dist/assets/{network.utility-Oqqx9LjL.js → network.utility-D_HsH5qj.js} +1 -1
- package/dist/assets/{object3d-document-session-registry-BDr1NgeR.js → object3d-document-session-registry-BGuY8anX.js} +2 -2
- package/dist/assets/{oid-transform-DZPcPm0C.js → oid-transform-wqjngb9T.js} +1 -1
- package/dist/assets/{particles-CigJXTCH.js → particles-Cjg6XQEP.js} +1 -1
- package/dist/assets/{pixi-authoring-adapter-CF67LGDH.js → pixi-authoring-adapter-CMpVEOut.js} +1 -1
- package/dist/assets/{pixi-live-write-target-D-w4D37i.js → pixi-live-write-target-714CPh5C.js} +1 -1
- package/dist/assets/{play.command-BPJQFNt3.js → play.command-CIcot8mf.js} +2 -2
- package/dist/assets/{presentation-Djf9ZyxE.js → presentation-DUidVzGI.js} +1 -1
- package/dist/assets/{product-KaWAfP5B.js → product-emJUqslE.js} +1 -1
- package/dist/assets/{profiler.action-D6x3d4ce.js → profiler.action-Tb9vn81X.js} +1 -1
- package/dist/assets/{profiler.menu-DfH-uyfU.js → profiler.menu-D2hXzK6K.js} +1 -1
- package/dist/assets/{profiler.utility-BeRQ67Ng.js → profiler.utility-go2J_Rus.js} +1 -1
- package/dist/assets/{project-authoring-session-DU1h_iyK.js → project-authoring-session-BvXLxd7m.js} +2 -2
- package/dist/assets/{properties-bone-constraints.inspector-CNdANgzl.js → properties-bone-constraints.inspector-BZ_l2-st.js} +1 -1
- package/dist/assets/{properties-bone.inspector-BWec1rav.js → properties-bone.inspector-BZB51VMV.js} +1 -1
- package/dist/assets/{properties-collection.inspector-2_ncyxd3.js → properties-collection.inspector-C84oF9Qk.js} +1 -1
- package/dist/assets/{properties-constraints.inspector-DEzDMVqM.js → properties-constraints.inspector-BZ5gjhkK.js} +1 -1
- package/dist/assets/{properties-data.inspector-BP0qny28.js → properties-data.inspector-BFRP4RBX.js} +1 -1
- package/dist/assets/{properties-material.inspector-BrvIkV-4.js → properties-material.inspector-Z0poViuH.js} +1 -1
- package/dist/assets/{properties-modifiers.inspector-Cp2SABm-.js → properties-modifiers.inspector-e-sflJxR.js} +1 -1
- package/dist/assets/{properties-object.inspector-D2PsrcBN.js → properties-object.inspector-B2MUPsKe.js} +1 -1
- package/dist/assets/{properties-output.inspector-CTM1xlm0.js → properties-output.inspector-Cl8ANiOA.js} +1 -1
- package/dist/assets/{properties-particles.inspector-DnDAHnyn.js → properties-particles.inspector-g8R7Qtlh.js} +1 -1
- package/dist/assets/{properties-physics.inspector-CHPrmGxj.js → properties-physics.inspector-BN1ScnFc.js} +1 -1
- package/dist/assets/{properties-render.inspector-Cf8wz8Mb.js → properties-render.inspector-BWmwuLsA.js} +1 -1
- package/dist/assets/{properties-scene.inspector-DMZkSReH.js → properties-scene.inspector-lBiqvysz.js} +1 -1
- package/dist/assets/{properties-texture.inspector-Byv4_ZAr.js → properties-texture.inspector-CkIJP_1b.js} +1 -1
- package/dist/assets/{properties-view-layer.inspector-CecBjcop.js → properties-view-layer.inspector-bWpA77BN.js} +1 -1
- package/dist/assets/{properties-world.inspector-CkMw1QwO.js → properties-world.inspector-C1GaZ5qr.js} +1 -1
- package/dist/assets/{r3f-design-session-CX2aKIPx.js → r3f-design-session-DbA50oqd.js} +2 -2
- package/dist/assets/{r3f-physics-binding-DKJjSbrS.js → r3f-physics-binding-yDE4SctS.js} +1 -1
- package/dist/assets/{r3f-source-authoring-adapter-zJJ0KIdd.js → r3f-source-authoring-adapter-BCy1GWt8.js} +1 -1
- package/dist/assets/{react-canvas-navigation-DJBlLwSn.js → react-canvas-navigation-S-IbbVDw.js} +1 -1
- package/dist/assets/{react-inspector.service-B8R9PzCT.js → react-inspector.service-Brsft7TJ.js} +1 -1
- package/dist/assets/{react-story-board-CZiQwIjp.js → react-story-board-B-wnwU1y.js} +1 -1
- package/dist/assets/{react-three-rapier.esm-CaDeXd_O.js → react-three-rapier.esm-ChxOJQrA.js} +1 -1
- package/dist/assets/{react-world-authoring-adapter-CJZvLLTb.js → react-world-authoring-adapter-CwnR93ZA.js} +1 -1
- package/dist/assets/{realm-services-B3fBgPfS.js → realm-services-CsCNzgGK.js} +1 -1
- package/dist/assets/{reflection-probe-capture.inspector-Cz1LpjWg.js → reflection-probe-capture.inspector-DGhpuOM-.js} +1 -1
- package/dist/assets/{registry-YMhNlE_v.js → registry-DVdPAH9u.js} +1 -1
- package/dist/assets/{relative-import-specifier-C9qPPniQ.js → relative-import-specifier-DGpgcbeS.js} +1 -1
- package/dist/assets/{render-env-DvbgSP_d.js → render-env-Dy3Kf2gg.js} +1 -1
- package/dist/assets/{render-features-I7WI6sPB.js → render-features-BjJcszQ2.js} +1 -1
- package/dist/assets/{render-settings-CFDezcHc.js → render-settings-CergIZPU.js} +1 -1
- package/dist/assets/{resolve-three-1713hydJ.js → resolve-three-l_1-CXHl.js} +3 -3
- package/dist/assets/{root-seam-contract-CRzr6ELF.js → root-seam-contract-9QibVtGc.js} +1 -1
- package/dist/assets/{run-selection-Bp_JGqbH.js → run-selection-DOsR8mOQ.js} +1 -1
- package/dist/assets/{scene-capture-DF4ler-B.js → scene-capture-CrqaUEgL.js} +1 -1
- package/dist/assets/{scene-document.service-CBfYD1wm.js → scene-document.service-WItYUlyc.js} +2 -2
- package/dist/assets/{scene-framing-Dvl_HllI.js → scene-framing-BxVkSlg3.js} +1 -1
- package/dist/assets/{seeded-random-DvO5_b-V.js → seeded-random-BTqVP8Ii.js} +1 -1
- package/dist/assets/{session-CUkTPVzt.js → session-B6eyWDVn.js} +9 -2
- package/dist/assets/{setup-renderer-C19l3QPP.js → setup-renderer-B2da1u8k.js} +1 -1
- package/dist/assets/{source-object3d-authoring-adapter-DqyeA5Gi.js → source-object3d-authoring-adapter-BKZ8oj3D.js} +1 -1
- package/dist/assets/{source-persistence-backend-DUcIwEKt.js → source-persistence-backend-Con5sRZv.js} +1 -1
- package/dist/assets/{stage-keyboard-BxDJo5L6.js → stage-keyboard-DGE-4Jpn.js} +1 -1
- package/dist/assets/{stage-overlay-set-BFQNONVA.js → stage-overlay-set-CKtVcxiT.js} +1 -1
- package/dist/assets/{stage-presence-markers-tP7LbyL4.js → stage-presence-markers-tb8yyWjE.js} +1 -1
- package/dist/assets/{stage-transform-tools-BOb4Jvpf.js → stage-transform-tools-DdbkruEz.js} +1 -1
- package/dist/assets/{standard-viewport-dressing-CPhcdhes.js → standard-viewport-dressing-BmMrgEAi.js} +1 -1
- package/dist/assets/{state-watch.action-COw8ciff.js → state-watch.action-BaJIFmyr.js} +1 -1
- package/dist/assets/{state-watch.menu-Bp1yK6NN.js → state-watch.menu-ByA3Z9q-.js} +1 -1
- package/dist/assets/{state-watch.utility-A8u6pD1W.js → state-watch.utility-C2Sugdxe.js} +1 -1
- package/dist/assets/{story-capture-BeOmBW8F.js → story-capture-D1xcKwr0.js} +1 -1
- package/dist/assets/{story-documents-CH6KQEcx.js → story-documents-z4AFSTsH.js} +1 -1
- package/dist/assets/{story-documents.service-CMfiTOnL.js → story-documents.service-BNFBCFet.js} +1 -1
- package/dist/assets/{story-documents.service-BSHA9ubk.js → story-documents.service-gHigvC0Y.js} +1 -1
- package/dist/assets/{story-media-presence-2bXhsyvN.js → story-media-presence-Ctf8e6_2.js} +1 -1
- package/dist/assets/{story-pixi-preview-B0SVQDjm.js → story-pixi-preview-B64Fbglp.js} +1 -1
- package/dist/assets/{story-presentation-D5JgJ2Ki.js → story-presentation-CioG0A_4.js} +1 -1
- package/dist/assets/{story-three-preview-C41-INUA.js → story-three-preview-9zj9LGo3.js} +2 -2
- package/dist/assets/{studio-environment-B-4SKPDH.js → studio-environment-CLaX3ria.js} +1 -1
- package/dist/assets/{surface-state-ykoiBqgs.js → surface-state-CB3HOhtC.js} +1 -1
- package/dist/assets/{syntactic-prop-specs-BbyHOtID.js → syntactic-prop-specs-Ce1hcg_C.js} +1 -1
- package/dist/assets/{team-playtest.service-BDqzMOw-.js → team-playtest.service-D9-q_kQm.js} +1 -1
- package/dist/assets/{three-68SmB1Ck.js → three-BGqB-uVq.js} +1 -1
- package/dist/assets/{three-authoring-adapter-B_QRJiNW.js → three-authoring-adapter-BO7jI7-8.js} +1 -1
- package/dist/assets/three-authoring.service-CIJV-GMf.js +2 -0
- package/dist/assets/{three-ingest-runtime-CKfIYjBZ.js → three-ingest-runtime-CzLs2nNM.js} +1 -1
- package/dist/assets/{three-integration-Z5vJfmPY.js → three-integration-qc8Reb1Y.js} +2 -2
- package/dist/assets/three-integration.service-DTYLz684.js +1 -0
- package/dist/assets/{three-projection-core-M9NSM8mB.js → three-projection-core-CFyOC4Fp.js} +1 -1
- package/dist/assets/{three-state-2djt5OHj.js → three-state-z8gBcifl.js} +1 -1
- package/dist/assets/{three-story-capture.service-CDmLJAB0.js → three-story-capture.service-c2yjqEby.js} +2 -2
- package/dist/assets/{three-story-model-D7HjuDEG.js → three-story-model-St9GMyHp.js} +1 -1
- package/dist/assets/{three-viewport-presentation-DZWRJPHj.js → three-viewport-presentation-BjXL1Zjv.js} +1 -1
- package/dist/assets/{transform-mode-request-CuCY7Mob.js → transform-mode-request-C7qEF7HB.js} +1 -1
- package/dist/assets/{transport-strip-D-YT7L1X.js → transport-strip-e122YmzD.js} +1 -1
- package/dist/assets/transport.header-C9_a76-g.js +1 -0
- package/dist/assets/{tuples-_sCcrfk4.js → tuples-BUz9vxL7.js} +1 -1
- package/dist/assets/{ui-board-document-BZQYviLs.js → ui-board-document-DEqHspRN.js} +2 -2
- package/dist/assets/{user-data-Mb2RP3n0.js → user-data-CPxKRceo.js} +1 -1
- package/dist/assets/{utility-view-state-6FUa52WH.js → utility-view-state-B-gZQZIN.js} +1 -1
- package/dist/assets/{viewport-door-DeUzmAvD.js → viewport-door-K-5DUW7m.js} +1 -1
- package/dist/assets/{viewport-root-presentation-DXOA1mF_.js → viewport-root-presentation-PTTfkoRf.js} +1 -1
- package/dist/assets/{viewport-surface-status-CdpqFwwg.js → viewport-surface-status-BTqSVzg2.js} +1 -1
- package/dist/assets/{webworkerAll-CgDZxHvP.js → webworkerAll-DhL2BYVu.js} +1 -1
- package/dist/assets/worker-CdXe6YZE.js +2 -0
- package/dist/assets/{workspace-arrangement--rzUYvPc.js → workspace-arrangement-BOOvdRY-.js} +1 -1
- package/dist/assets/{world-documents-CLXtIOlf.js → world-documents-FtLCiCQe.js} +1 -1
- package/dist/assets/{world-root-stage-binding-gRhxHhxP.js → world-root-stage-binding-FTlof7qc.js} +1 -1
- package/dist/assets/{xstate-animation-binding-BIE8WxFb.js → xstate-animation-binding-C06bUoKl.js} +1 -1
- package/dist/assets/{xstate-animation-meta-BGdNFaQy.js → xstate-animation-meta-h_xoeBCJ.js} +1 -1
- package/dist-node/cli.js +16 -16
- package/package.json +16 -16
- package/dist/assets/InspectorObjectPreview-CJtqQ2wH.js +0 -1
- package/dist/assets/Object3DDocumentViewport-C40xKIJD.js +0 -2
- package/dist/assets/autoplay.service-Cn9x6qdk.js +0 -1
- package/dist/assets/blender-emscripten-engine-DOovVqbG.js +0 -2
- package/dist/assets/blender-runtime-host-CAi_I7p4.js +0 -7
- package/dist/assets/instances.command-BYjIsB6s.js +0 -1
- package/dist/assets/network-observer.service-Bj9AQlzw.js +0 -1
- package/dist/assets/three-authoring.service-sjZ1wXZT.js +0 -2
- package/dist/assets/three-integration.service-ClW_z8pd.js +0 -1
- package/dist/assets/transport.header-Dzpy88_i.js +0 -1
- package/dist/assets/worker-DUIHhopS.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/react-three-rapier.esm-
|
|
2
|
-
import{X as U,h6 as W,h7 as z,_ as H}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/react-three-rapier.esm-ChxOJQrA.js","assets/index-r-FuctN5.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/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/events-156d8d12.esm-CYeuVCYr.js","assets/index-bQE2NA0D.js","assets/BufferGeometryUtils-FJZNEiJN.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{X as U,h6 as W,h7 as z,_ as H}from"./index-r-FuctN5.js";import{r as F}from"./index-nmcBqr7Y.js";import{a as G}from"./asset-preview-Cck2dsj4.js";import{C as $}from"./crash-null-boundary-v3a0uEgw.js";import{T as q}from"./three.module-BLhyNg0e.js";import{e as Q,f as V}from"./events-156d8d12.esm-CYeuVCYr.js";import{r as X}from"./story-mount-turn-DFRTj5hi.js";import{A as J,ej as K,d7 as Y}from"./three.core-3arARmh6.js";import"./jsx-runtime-DPjLkJKQ.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"./editor-layers-CSl6S15k.js";import"./workspace-arrangement-BOOvdRY-.js";import"./renderer-ownership-BovSEcLv.js";import"./hierarchy-marks-B4XzZe8e.js";import"./studio-environment-CLaX3ria.js";import"./user-data-CPxKRceo.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./bitmap-label-Ct4k6ehY.js";import"./index-bQE2NA0D.js";const Z=1/60,ee=6,te=15,N=1e-4,ne=2,re=10,oe=250,ie=4e3;function g(e){e.updateMatrixWorld(!0);const t=[];return e.traverse(n=>{const r=n.matrixWorld.elements;t.push(r[12],r[13],r[14])}),t}function D(e){let t=0;return e.traverse(()=>{t++}),t}function x(e,t){if(e.length!==t.length)return Number.NaN;let n=0;for(let r=0;r<t.length;r+=3){const o=t[r]-e[r],a=t[r+1]-e[r+1],i=t[r+2]-e[r+2],s=Math.sqrt(o*o+a*a+i*i);if(!Number.isFinite(s))return Number.NaN;s>n&&(n=s)}return n}const se=()=>new Promise(e=>setTimeout(e,0));async function ae(e,t,n){const r=n();let o=D(e),a=r,i=!1;for(;n()-r<ie;){if(n()-a>=oe){i=!0;break}await t();const s=D(e);s!==o&&(o=s,a=n())}return{buildWaitMs:n()-r,buildSettled:i}}function C(e){return{outcome:e,steps:0,lastMotion:0,buildWaitMs:0,buildSettled:!0}}function ce(e){return e.hasPhysicsSubscriber!==!1}async function ue(e,t={}){const n=t.yieldTurn??se,r=t.now??(()=>Date.now()),o=e.update?.bind(e);if(!o)return C("unsupported");if(!ce(e))return C("still");const{buildWaitMs:a,buildSettled:i}=await ae(e.scene,n,r);let s=g(e.scene),l=0,u=0,h=!1,E=0,y="still";for(let d=0;d<te;d++){for(let w=0;w<ee;w++)o(Z),l++;await n();const m=g(e.scene),p=x(s,m);if(s=m,!Number.isFinite(p)){u=0;continue}if(E=p,p>N){h=!0,u=0,y="budget";continue}if(u++,h&&u>=ne){y="rest";break}}for(let d=0;d<re;d++){await n();const m=g(e.scene),p=x(s,m);if(s=m,Number.isFinite(p)&&p<=N)break}return{outcome:y,steps:l,lastMotion:E,buildWaitMs:a,buildSettled:i}}const le={packaged:!1,createElement:F.createElement,createR3FRoot:V,extendThree:Q,three:q};let R=null;async function de(){const e=await import(W);for(const t of["createElement","createR3FRoot","extendThree"])if(typeof e[t]!="function")throw new Error(`The packaged R3F preview runtime did not export ${t} as a function — see vite-plugin-module-doorways.ts.`);if(typeof e.projectThree!="object"||e.projectThree===null)throw new Error("The packaged R3F preview runtime did not export projectThree — see vite-plugin-module-doorways.ts.");return{packaged:!0,createElement:e.createElement,createR3FRoot:e.createR3FRoot,extendThree:e.extendThree,three:e.projectThree}}async function me(){return await U()?(R||(R=de()),R):le}let T=null;function nt(){return T}const v="volter:story-preview-root",pe=1e4;function P(e){if(typeof e=="function"){const t=e;return t.displayName||t.name||""}if(e&&typeof e=="object"){const t=e;return typeof t.displayName=="string"&&t.displayName.length>0?t.displayName:typeof t.name=="string"&&t.name.length>0?t.name:P(t.type??t.render)}return""}function fe(e){const t=e,n=t._reactInternals??t._reactInternalFiber;return n&&typeof n=="object"?n:void 0}function he(e){const t=[P(e.type),P(e.elementType)];if(!(t.includes("RigidBody")||t.includes("InstancedRigidBodies")))return{provider:t.includes("Physics"),body:!1,movingBody:!1};const r=e.memoizedProps&&typeof e.memoizedProps=="object"?e.memoizedProps:{};return{provider:t.includes("Physics"),body:!0,movingBody:r.type!=="fixed"}}function ye(e){const t=e?[e]:[],n=new Set;let r=!1,o=!1,a=!1;for(;t.length>0;){const i=t.pop();if(n.has(i))continue;n.add(i);const s=he(i);r||=s.provider,o||=s.body,a||=s.movingBody,i.child&&t.push(i.child),i.sibling&&t.push(i.sibling)}return r?!o||a:!1}class we extends F.Component{componentDidMount(){this.props.onReport(ye(fe(this)))}render(){return this.props.children??null}}function Ee(e){return e instanceof Error&&e.message.includes("is not part of the THREE namespace")}function L(e){return Ee(e)?!0:e instanceof Error?e.message.includes("Hooks can only be used within the Canvas component")||e.message.includes("useGame: no Game in context"):!1}function rt(e){return L(e)}function I(e){return e instanceof Error&&e.message.includes("useRapier must be used within <Physics")}async function Te(e){try{return(e.packaged?await import("/@id/@react-three/rapier"):await H(()=>import("./react-three-rapier.esm-ChxOJQrA.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]))).Physics}catch{return null}}function Se(e,t,n){const r=globalThis,o=r.reportError,a=typeof o=="function"?o.bind(globalThis):i=>{console.error(i)};r.reportError=i=>{L(i)||t&&I(i)||a(i)};try{return n(e)}finally{r.reportError=o}}function be(e){return{domElement:e,xr:{enabled:!1,addEventListener(){},removeEventListener(){},setAnimationLoop(){},getSession(){return null}},shadowMap:{enabled:!1,type:Y},outputColorSpace:K,toneMapping:J,setPixelRatio(){},setSize(){},setClearColor(){},setClearAlpha(){},setViewport(){},setScissor(){},setScissorTest(){},setAnimationLoop(){},clear(){},render(){},compile(){},dispose(){},getPixelRatio(){return 1},getContext(){return null}}}let O=null;function k(e){return X(()=>e(Pe))}function ge(e){O!==e.extendThree&&(O=e.extendThree,e.extendThree(e.three))}async function Re(e,t={}){return k(n=>n(e,t))}function ve(e){return k(async()=>e.dispose())}async function Pe(e,t={}){const n=z();T=null;const r=n?Date.now():0,o=await me(),a=n?Date.now()-r:0,i=n?Date.now():0;typeof e.load=="function"&&await e.load();const s=n?Date.now()-i:0;try{return await j(o,e,t,void 0,{timed:n,runtimeMs:a,loadMs:s})}catch(l){if(!I(l))throw l;const u=await Te(o);if(!u)throw l;return await j(o,e,t,h=>o.createElement(u,{paused:!1},h),{timed:n,runtimeMs:a,loadMs:s})}}async function j(e,t,n,r,o){ge(e);const a=document.createElement("canvas"),i=Se(a,r===void 0,e.createR3FRoot);let s;const l=new Promise(c=>{s=c});await i.configure({gl:(()=>be(a)),frameloop:"never",size:{width:128,height:96,top:0,left:0},onCreated:c=>s(c)});let u=null,h;const E=new Promise((c,b)=>{h=b}),y=c=>{u??=new Error("mountStoryObject3D: the story threw while reconciling into an R3F root — it does not render `three` content (a DOM/React story), or its component crashed. Original error: "+String(c instanceof Error?c.message:c),{cause:c}),h(u)},d=e.createElement(t,n);let m=!1;const p=c=>{m=c};i.render(e.createElement("group",{name:v},e.createElement($,{onCaught:y},e.createElement(we,{onReport:p},r?r(d):d))));const w=o?.timed?Date.now():0;let M;const f=await Promise.race([l,E,new Promise((c,b)=>{M=setTimeout(()=>b(new Error("mountStoryObject3D: onCreated did not fire within 10s — the story never reached its first R3F commit and never threw. Either it is still SUSPENDED on a slow load (a suspending loader with no <Suspense> boundary holds the first commit until its content is ready), or its render is hung.")),pe)})]).catch(c=>{throw o?.timed&&(T={runtimeMs:o.runtimeMs,loadMs:o.loadMs,fiberMs:Date.now()-w,settleMs:0}),i.unmount(),c}).finally(()=>clearTimeout(M));if(u)throw i.unmount(),u;f.clock.autoStart=!1,f.clock.stop();const S=f.scene.getObjectByName(v);if(!S)throw i.unmount(),new Error(`mountStoryObject3D: the story's wrapper group ("${v}") is not in the scene after its first commit — the story rendered nothing mountable.`);const A=o?.timed?Date.now()-w:0,B=o?.timed?Date.now():0;await ue({scene:S,update:c=>{f.advance(f.clock.elapsedTime+Math.min(c,.1),!1)},hasPhysicsSubscriber:m}),o?.timed&&(T={runtimeMs:o.runtimeMs,loadMs:o.loadMs,fiberMs:A,settleMs:Date.now()-B});let _=f.clock.elapsedTime;return{root:S,scene:f.scene,advance(c){!(c>0)||!Number.isFinite(c)||(_+=Math.min(c,.1),f.advance(_,!1))},dispose(){i.unmount()}}}async function ot(e,t={}){const n=await Re(e,t.props??{});try{const r=G(n.root,{width:t.width??128,height:t.height??96,...t.camera===void 0?{}:{camera:t.camera},...t.pose===void 0?{}:{pose:t.pose}}),o=r.views.find(a=>a.view==="perspective")??r.views[0];if(!o)throw new Error("Story preview capture returned no views.");return`data:${o.mimeType};base64,${o.base64}`}finally{await ve(n)}}function it(){return typeof WebGLRenderingContext<"u"&&typeof navigator<"u"&&!navigator.userAgent.toLowerCase().includes("jsdom")}export{v as PREVIEW_ROOT_NAME,ot as captureStoryComponentThumbnail,ve as disposeStoryObject3D,rt as isStoryThreeClassificationRefusal,nt as lastStoryMountPhaseTiming,Re as mountStoryObject3D,it as supportsThreeStoryCapture,k as withStoryMountTurn};
|
|
@@ -1,2 +1,2 @@
|
|
|
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{_ as g}from"./index-
|
|
2
|
+
import{_ as g}from"./index-r-FuctN5.js";import{s as f}from"./user-data-CPxKRceo.js";import{D as T,K as S,M as E}from"./KTX2Loader-CaqVE6nY.js";import{GLTFLoader as L}from"./GLTFLoader-KeoruJgS.js";import{cc as M,eX as v,fo as p,co as I,K as b}from"./three.core-3arARmh6.js";import{createStandardEnvironment as x}from"./environment-Dg-YaLsA.js";let D="/";function w(t){return t.startsWith("/")||t.startsWith("http")||t.startsWith("data:")||t.startsWith("blob:")?t:D+t}const r=new M;r.setURLModifier(w);new v(r);const h=new T(r);h.setDecoderPath("/jsm/libs/draco/gltf/");const _=new S(r);_.setTranscoderPath("/jsm/libs/basis/");const l=new L(r);l.setDRACOLoader(h);l.setKTX2Loader(_);l.setMeshoptDecoder(E);function N(t){return w(t)}const i=new Map;async function z(t,a){let e=i.get(t);!e&&a&&(e=Promise.resolve(a),i.set(t,e)),e||(e=fetch(N(t)).then(async s=>{if(!s.ok)throw new Error(`Failed to load Gaussian splat: ${t} (${s.status} ${s.statusText})`);return new Uint8Array(await s.arrayBuffer())}),i.set(t,e));try{const[{SplatMesh:s},u]=await Promise.all([g(()=>import("./spark.module-Byplgb8G.js"),__vite__mapDeps([0,1,2,3])),e]),o=new s({fileBytes:u,fileName:t,raycastable:!0});await o.initialized,f(o,"gaussianSplat",{src:t,numSplats:o.numSplats});const d=o.getBoundingBox();if(!d.isEmpty()){const m=d.getSize(new p).multiplyScalar(1.5),y=d.getCenter(new p),n=new I(new b(m.x,m.y,m.z));n.name="__volter_splat_bounds",n.position.copy(y),n.visible=!1,n.raycast=()=>{},f(n,"engineInternal",!0),o.add(n)}return o}catch(s){throw i.delete(t),s}}const O=.45,C=.25,c=new WeakMap;function K(t,a){let e=c.get(a);e||(e=x(a),c.set(a,e)),t.environment=e.texture,t.environmentIntensity=O}function V(t){const a=c.get(t);a&&(c.delete(t),a.dispose())}export{C as S,K as a,V as d,l as g,z as l,N as r};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as s}from"./jsx-runtime-DPjLkJKQ.js";import"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{eB as a}from"./index-
|
|
1
|
+
import{a as s}from"./jsx-runtime-DPjLkJKQ.js";import"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{eB as a}from"./index-r-FuctN5.js";function $({explanation:e,testId:t,style:o}){return e?s.jsx(a,{"data-testid":t,tone:e.tone,title:e.title,description:s.jsx("span",{style:{whiteSpace:"pre-wrap"},children:e.description}),style:{position:"absolute",inset:0,pointerEvents:"none",...o}}):null}function r(e){return e.map(t=>`“${t}”`).join(", ")}function d(e,t){const o=t.map(n=>n.worldId);return{tone:"error",title:o.length===1?`${e} root ${r(o)} failed`:`${o.length} ${e} roots failed`,description:`${t.map(n=>`${n.worldId} (${n.kind}, ${n.identity}): ${n.message}`).join(`
|
|
2
2
|
`)}
|
|
3
3
|
If this followed an edit, Undo (Ctrl+Z) restores the previous source and remounts.`}}function c(e,t){return{tone:"loading",title:t.length===0?`Loading ${e}`:t.length===1?`Loading ${e} root ${r(t)}`:`Loading ${t.length} ${e} roots`,description:t.length===0?"Reading the project declaration to identify the root that belongs here.":`Waiting for ${r(t)} to finish mounting.`}}function u(e,t){return t.length===0?{tone:"neutral",title:`No ${e} root`,description:"No declared root belongs to this surface."}:{tone:"neutral",title:"No renderable content",description:(t.length===1?`Root ${r(t)} mounted successfully but currently produces no renderable content.`:`Roots ${r(t)} mounted successfully but currently produce no renderable content.`)+" If this world builds its content under its game systems, press Play (▶) to run it."}}function m(e){if(e.content==="present")return null;if(e.playSuspended)return{tone:"neutral",title:"Editing paused during Play",description:`${r(e.rootIds)} is running in the Game tab. Press Stop (⏹) to edit it here.`};const t=new Set(e.rootIds),o=(e.failures??[]).filter(i=>t.has(i.worldId));if(o.length>0)return d(e.surface,o);if(e.disclosure)return{tone:"neutral",title:`No ${e.surface} editor for ${r(e.rootIds)}`,description:e.disclosure};const n=(e.readiness??[]).filter(i=>i.state==="waiting"&&t.has(i.rootId)).map(i=>i.rootId),l=n.length>0?n:e.rootIds;return e.phase==="loading"||n.length>0||e.content==="unknown"?c(e.surface,l):u(e.surface,e.rootIds)}export{$ as S,m as e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aE as t}from"./index-
|
|
1
|
+
import{aE as t}from"./index-r-FuctN5.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 c(e){if(!e)return{type:null};switch(e.kind){case t.SyntaxKind.StringKeyword:return{type:"string"};case t.SyntaxKind.NumberKeyword:return{type:"number"};case t.SyntaxKind.BooleanKeyword:return{type:"boolean"}}if(t.isUnionTypeNode(e)){const n=[];for(const r of e.types){if(!t.isLiteralTypeNode(r))return{type:null};if(t.isStringLiteral(r.literal))n.push(r.literal.text);else if(t.isNumericLiteral(r.literal))n.push(Number(r.literal.text));else return{type:null}}return n.length>0?{type:"enum",options:n}:{type:null}}return t.isTupleTypeNode(e)&&e.elements.length===3&&e.elements.every(n=>n.kind===t.SyntaxKind.NumberKeyword)?{type:"vec3"}:{type:null}}function y(e,n,r){if(!e||!t.isTypeReferenceNode(e)||!t.isIdentifier(e.typeName)||e.typeArguments&&e.typeArguments.length>0)return e;const s=e.typeName.text,i=f(n,s);if(i)return t.isTypeAliasDeclaration(i)?i.type:e;const a=r.get(s);return a?a.type:e}function m(e,n,r,s){for(const i of e){if(!t.isPropertySignature(i))continue;const a=t.isIdentifier(i.name)||t.isStringLiteral(i.name)?i.name.text:null;a&&n.set(a,{optional:i.questionToken!==void 0,...c(y(i.type,r,s))})}}function f(e,n){for(const r of e.statements)if((t.isTypeAliasDeclaration(r)||t.isInterfaceDeclaration(r))&&r.name.text===n)return r;return null}function p(e,n,r,s,i){if(i>4)return;if(t.isTypeLiteralNode(e)){m(e.members,s,n,r);return}if(t.isIntersectionTypeNode(e)){for(const l of e.types)p(l,n,r,s,i+1);return}if(!t.isTypeReferenceNode(e)||!t.isIdentifier(e.typeName))return;const a=e.typeName.text,o=f(n,a);if(o){t.isTypeAliasDeclaration(o)?p(o.type,n,r,s,i+1):m(o.members,s,n,r);return}const u=r.get(a);u&&p(u.type,u.sf,new Map,s,i+1)}function x(e,n){const r=e.getText(n);if(t.isStringLiteral(e)||t.isNoSubstitutionTemplateLiteral(e))return{defaultText:r,defaultValue:e.text};if(t.isNumericLiteral(e))return{defaultText:r,defaultValue:Number(e.text)};if(t.isPrefixUnaryExpression(e)&&e.operator===t.SyntaxKind.MinusToken&&t.isNumericLiteral(e.operand))return{defaultText:r,defaultValue:-Number(e.operand.text)};if(e.kind===t.SyntaxKind.TrueKeyword)return{defaultText:r,defaultValue:!0};if(e.kind===t.SyntaxKind.FalseKeyword)return{defaultText:r,defaultValue:!1};if(t.isArrayLiteralExpression(e)){const s=[];for(const i of e.elements)if(t.isNumericLiteral(i))s.push(Number(i.text));else if(t.isPrefixUnaryExpression(i)&&i.operator===t.SyntaxKind.MinusToken&&t.isNumericLiteral(i.operand))s.push(-Number(i.operand.text));else return{defaultText:r};return{defaultText:r,defaultValue:s}}return{defaultText:r}}function N(e){return t.isFunctionDeclaration(e)&&e.name&&e.parameters[0]?{name:e.name.text,parameter:e.parameters[0]}:t.isVariableDeclaration(e)&&t.isIdentifier(e.name)&&e.initializer&&(t.isArrowFunction(e.initializer)||t.isFunctionExpression(e.initializer))&&e.initializer.parameters[0]?{name:e.name.text,parameter:e.initializer.parameters[0]}:null}function V(e,n){const r=new Map,s=i=>{const a=N(i);if(a&&/^[A-Z]/.test(a.name)&&!r.has(a.name)){const o=b(a.parameter,e,n);o.length>0&&r.set(a.name,o)}(t.isSourceFile(i)||t.isVariableStatement(i)||t.isVariableDeclarationList(i))&&t.forEachChild(i,s)};return s(e),r}function b(e,n,r){const s=new Map;if(t.isObjectBindingPattern(e.name))for(const a of e.name.elements){if(a.dotDotDotToken)continue;const o=a.propertyName??a.name;!t.isIdentifier(o)||!a.initializer||s.set(o.text,x(a.initializer,n))}const i=new Map;if(e.type&&p(e.type,n,r,i,0),i.size>0){const a=[];for(const[o,u]of i){const l=s.get(o);a.push({name:o,type:u.type,...u.options?{options:u.options}:{},optional:u.optional||l!==void 0,...l??{}})}return a}return[...s].map(([a,o])=>({name:a,type:null,optional:!0,...o}))}export{V as localComponentPropSpecs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{an as d,ao as k,ap as b,aq as N}from"./index-
|
|
1
|
+
import{an as d,ao as k,ap as b,aq as N}from"./index-r-FuctN5.js";import{r as m}from"./collaboration-presence-BNBw47jA.js";import{e as v,j as P,m as I}from"./game-network-BZdvwJ0a.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"./index-OZVqp6xS.js";import"./index-Da9JhEvW.js";import"./native-debug-module-C5xRtrQJ.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-BosYnV_Z.js";import"./contract-system-adapters-C66CNkAk.js";import"./game-contract-seams-DQGwjObL.js";import"./seeded-random-BTqVP8Ii.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-BnaccVli.js";import"./capability-coverage-6PwUP4oX.js";import"./edit-mode-authoring-z2Uu4CrX.js";import"./json-history-resource-DuT7scib.js";import"./binding-resolver-BcV7It57.js";import"./adapter-surface-Y37Nzcyw.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./realm-services-CsCNzgGK.js";import"./canvas-entry-runtime-Dcf218s2.js";import"./three-ingest-runtime-CzLs2nNM.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-Ddr-rqpl.js";import"./ingest-source-persistence-BwINDLYc.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-PTTfkoRf.js";import"./mounted-authoring-DKn1UEnI.js";import"./entity-object-BO1_Qmt8.js";import"./user-data-CPxKRceo.js";import"./workspace-arrangement-BOOvdRY-.js";import"./three-contract-Dkt6PmWY.js";import"./three-BGqB-uVq.js";import"./editor-layers-CSl6S15k.js";import"./component-instance-root-9er-zSAY.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-authoring-adapter-BO7jI7-8.js";import"./source-persistence-backend-Con5sRZv.js";import"./three-projection-core-CFyOC4Fp.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-yDE4SctS.js";import"./deferred-ingest-play-BOUu0VgE.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-CwnR93ZA.js";import"./board-guides-CLF_VLvL.js";import"./relative-import-specifier-DGpgcbeS.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-sYciyXgK.js";import"./inference-diagnostics-D4Iu86es.js";import"./writer-tw6EcuVO.js";import"./three-state-z8gBcifl.js";import"./editor-shell-store-DTfKHHYD.js";import"./output-pass-HurwNl0G.js";import"./viewport-door-K-5DUW7m.js";import"./game-surface-defaults-D8S4cRxi.js";const Yt="workspace.service";function Zt(){let i=null;const p=new Set;let e=null,n=null,a=d();const l=()=>{e?.(),e=null,n?.(),n=null,a=null},y=k(u=>{const w=u.participants.find(r=>r.participantId===b)?.capabilities.includes("test")??!1,t=u.activePlaytest,s=I();if(!w||!t){i=null,l(),m({playtest:null}),s?.mode==="team"&&P(),t||p.clear();return}s?.mode==="team"&&s.id===t.id||i!==t.id&&(p.has(t.id)||(i=t.id,m({playtest:{id:t.id,play:"starting",networking:"connecting",roomName:null,problem:null}}),v(t.seed,{mode:"team",id:t.id,roomKey:t.roomKey,revision:t.revision,participantId:b}).then(()=>{if(i!==t.id)return;l();const r=()=>{const o=d(),c=o?.getConnectionState?.(),f=o?.getRoomInfo?.();m({playtest:{id:t.id,play:"ready",networking:o?c==="connected"&&f?"ready":c==="error"?"error":"connecting":"not-declared",roomName:f?.roomName??null,problem:c==="error"?"The game networking adapter reported an error.":null}})},g=()=>{const o=d();o!==a&&(e?.(),a=o,e=o?.subscribe(r)??null),r()};n=N(g),g()}).catch(r=>{i===t.id&&(i=null,p.add(t.id),m({playtest:{id:t.id,play:"error",networking:"error",roomName:null,problem:r instanceof Error?r.message:String(r)}}))})))});return()=>{l(),y()}}export{Yt as point,Zt as start};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isInEditorOwnedSubtree as V,isEditorOwnedObject as P}from"./editor-layers-
|
|
1
|
+
import{isInEditorOwnedSubtree as V,isEditorOwnedObject as P}from"./editor-layers-CSl6S15k.js";import{g as k}from"./user-data-CPxKRceo.js";import{b as E,c as S}from"./component-instance-root-9er-zSAY.js";import{n as K,e as $,s as A}from"./entity-object-BO1_Qmt8.js";import{s as W}from"./viewport-editor-controls-BYaAZ_Ku.js";import{fd as z,e6 as G,B as U}from"./three.core-3arARmh6.js";function q(n){const t=k(n,"constraints");return Array.isArray(t)?t.filter(e=>!!e&&typeof e=="object"&&typeof e.getSnapshot=="function"&&!!e.config):[]}const M="ingest:camera",J=1<<31;function Q(n){return(n.layers.mask&J)!==0}function Y(n,t){const e=new Map;let r=0,s=0,f=0;const u=(i,c)=>{const o=`ingest:${c}:${i.type}:${i.name||""}`;e.set(o,i),r++,i.isLight?f++:i.isMesh&&s++,d(i,c)},d=(i,c)=>{let o=0;for(const h of i.children)Q(h)||(u(h,c?`${c}/${o}`:`${o}`),o++)};return d(n,""),t&&(e.set(M,t),r++),{byId:e,count:r,meshes:s,lights:f}}function Z(n){const t=k(n,"authoringSubject");return t&&typeof t.label=="string"&&typeof t.kind=="string"?t:null}function X(n){const t=k(n,"reflectionProbe");if(!t||typeof t!="object")return null;const e=t;return e.config&&typeof e.recapture=="function"&&typeof e.getSnapshot=="function"?t:null}let D=null;function ht(n){D=n,W(n?.editorControls??null)}function tt(){return D}function C(n){return n.depthWrite===!1&&n.side===U}function et(n){const t=n.material;return t?Array.isArray(t)?t.length>0&&t.every(C):C(t):!1}function L(n,t,e,r=()=>!1,s){const f=tt();if(!f)return[];const u=f.canvas.getBoundingClientRect();if(u.width<=0||u.height<=0||!Number.isFinite(t)||!Number.isFinite(e)||t<u.left||e<u.top||t>=u.left+u.width||e>=u.top+u.height)return[];const d=new z((t-u.left)/u.width*2-1,-((e-u.top)/u.height)*2+1),i=new G;i.layers.enableAll(),i.setFromCamera(d,f.camera);const c=new Set(s?.objects??n.objectMap.values()),o=[...c].filter(b=>{for(let I=b.parent;I;I=I.parent)if(c.has(I))return!1;return!0});for(const b of o)b.traverse(I=>{const m=I;m.isSkinnedMesh&&(m.boundingBox=null,m.boundingSphere=null)});const h=i.intersectObjects(o,!0),p=[],v=new Set;for(const b of h){if(V(b.object)||et(b.object))continue;let I=b.object,m=null;if(s)for(;I&&m===null;)m=s.idForObject3D(I),I=I.parent;else{const a=K(I);m=a?$(a)??null:null}m!==null&&!r(m)&&!v.has(m)&&(v.add(m),p.push(m))}return nt(p,o,h.length,t,e),p}function nt(n,t,e,r,s){n.length>0||r===0&&s===0||console.info(`[viewport-pick] click selected nothing (candidates ${t.length}, rayHits ${e}, resolvedIds 0)`)}function st(n,t,e,r=()=>!1,s){return L(n,t,e,r,s)[0]??null}const R={count:0,meshes:0,lights:0,instancedMeshes:0,instances:0};let x=0;function H(n){let t=0,e=0;for(const r of n.values()){const s=r.object;s.isInstancedMesh&&(t++,e+=typeof s.count=="number"?s.count:0)}return{instancedMeshes:t,instances:e}}function F(n){let t=0,e=0;for(const r of n.values()){const s=r.object;s.isLight?e++:s.isMesh&&t++}return{count:n.size,meshes:t,lights:e,...H(n)}}function T(n,t){const e=new Map,r=[],s=t.skip??P;t.begin?.(n);const f=(u,d,i,c)=>{if(s(u))return;const o=t.identify(u,{path:d,ownerId:i,ownedByAncestor:c});o!==null&&(A(u,o),e.set(o,{object:u,id:o,parentId:i,childIds:[]}),i===null?r.push(o):e.get(i)?.childIds.push(o));const h=c||o!==null;u.children.forEach((p,v)=>{f(p,[...d,v],o??i,h)}),t.leave?.(u,o)};return n.children.forEach((u,d)=>{f(u,[d],null,!1)}),{nodes:e,rootIds:r,stats:F(e)}}const it="r3f:";function O(n,t){return`${it}${n}:${t}`}function rt(n){const t=new Map,e=new Map,r=(d,i)=>d===i||d.startsWith(`${i}#`)&&/^\d+$/u.test(d.slice(i.length+1)),s=d=>{e.clear();const i=c=>{if(P(c))return;const o=E(c),h=$(c);if(o!==void 0&&h!==void 0){const p=O(n,o);r(h,p)&&!e.has(h)&&e.set(h,c)}for(const p of c.children)i(p)};for(const c of d.children)i(c)},f=(d,i)=>{const c=$(d);if(c===void 0||i===void 0)return c;const o=O(n,i);return r(c,o)?e.get(c)===d?c:void 0:c},u=(d,i)=>{const c=O(n,i);let o=t.get(i)??0,h=S(c,o);for(;e.has(h);)o+=1,h=S(c,o);return t.set(i,o+1),e.set(h,d),h};return{begin:d=>{t.clear(),s(d)},identify:(d,i)=>{const c=E(d),o=f(d,c);if(o!==void 0)return o;const h=c===void 0?void 0:u(d,c);return h!==void 0||!i.ownedByAncestor||k(d,"authoringRoot")===!0?h??`live:${n}:${x++}`:null}}}function N(n,t){return T(n,rt(t))}function pt(n,t){const{nodes:e}=N(n,t),r=new Map;for(const[s,f]of e)r.set(s,f.object);return r}function yt(n,t={}){const e=t.camera;return{incremental:{kind:"live-oid",worldId:n},project:r=>{const s=N(r,n);return!e||[...s.nodes.values()].some(f=>f.object===e)?s:(A(e,M),s.nodes.set(M,{object:e,id:M,parentId:null,childIds:[]}),s.rootIds.push(M),{...s,stats:{...s.stats,count:s.nodes.size}})}}}function gt(n={}){const t=n.camera;return{project:e=>{const r=Y(e,t),s=new Map;for(const[d,i]of r.byId)s.set(i,d);const f=new Map,u=[];for(const[d,i]of r.byId){const c=i.parent,o=(c&&c!==e?s.get(c):void 0)??null,h=i.children.map(p=>s.get(p)).filter(p=>p!==void 0);f.set(d,{object:i,id:d,parentId:o,childIds:h}),o===null&&u.push(d)}return{nodes:f,rootIds:u,stats:{count:r.count,meshes:r.meshes,lights:r.lights,...H(f)}}}}}function It(n){let t=new Map,e=new Map;return{get instanceRoots(){return t},get representatives(){return e},project:r=>{const s=new Map,f=new Map,u=new Map,d=new Set,i=new Map,c=T(r,{identify:(o,h)=>{const p=E(o);if(p===void 0)return O(n,`@${h.path.join(".")}`);const v=s.get(p)??0;return s.set(p,v+1),v===0&&u.set(p,o),d.has(p)||(f.set(p,(f.get(p)??0)+1),d.add(p),i.set(o,p)),S(O(n,p),v)},leave:o=>{const h=i.get(o);h!==void 0&&(d.delete(h),i.delete(o))}});return t=f,e=u,c}}}function mt(n){return{project:t=>T(t,{skip:e=>!!k(e,"editorHelper")||e.isSkeletonHelper===!0,identify:(e,r)=>`source-object:${n}:${r.path.join(".")}`})}}function vt(n){const t=Z(n);return t?t.kind:q(n).length>0?"constraint-owner":X(n)?"reflection-probe":n.isSkinnedMesh?"skinned-mesh":n.isBone?"bone":n.isLight?"light":n.isCamera?"camera":n.type==="Audio"||n.type==="PositionalAudio"||n.type==="AudioListener"?"audio":n.isMesh?"mesh":n.children.length>0?"group":"object"}function ot(n,t){for(let e=n.parent;e!==null;e=e.parent)if(e===t)return!0;return!1}function _(n,t){if(n===t)return!0;for(let e=n.parent;e!==null;e=e.parent)if(e===t)return!0;return!1}class wt{constructor(t,e={}){this.identity=t,this.options=e}nodesById=new Map;objectsById=new Map;idsByObjectIndex=new Map;roots=[];walkStats=R;project(t){if(!t)return this.nodesById=new Map,this.objectsById=new Map,this.idsByObjectIndex=new Map,this.roots=[],this.walkStats=R,this.walkStats;const{nodes:e,rootIds:r,stats:s}=this.identity.project(t);return this.nodesById=e,this.objectsById=new Map([...e].map(([f,u])=>[f,u.object])),this.idsByObjectIndex=new Map([...e].map(([f,u])=>[u.object,f])),this.roots=r,this.walkStats=s,s}projectSubtrees(t,e){const r=this.identity.incremental;if(t===null||r?.kind!=="live-oid")return null;const s=e.filter((a,l)=>e.indexOf(a)===l&&!e.some(y=>y!==a&&ot(a,y))),f=this.roots,u=new Set,d=new Set,i=new Set;for(const a of s)a.traverse(l=>{const y=this.idsByObjectIndex.get(l);if(y===void 0)return;const g=this.nodesById.get(y);g?.parentId!==null&&g?.parentId!==void 0&&i.add(g.parentId),u.add(y),this.nodesById.delete(y),this.objectsById.delete(y),this.idsByObjectIndex.delete(l)});const c=P,o=(a,l)=>{const y=this.objectsById.get(a);return y===void 0||y===l},h=(a,l)=>{const y=$(a);if(y!==void 0&&o(y,a))return y;const g=E(a);if(g!==void 0){const w=O(r.worldId,g);let B=0,j=S(w,B);for(;!o(j,a);)j=S(w,++B);return j}if(!l||k(a,"authoringRoot")===!0){let w=`live:${r.worldId}:${x++}`;for(;!o(w,a);)w=`live:${r.worldId}:${x++}`;return w}return null},p=(a,l,y)=>{if(c(a))return;const g=h(a,y);g!==null&&(A(a,g),this.nodesById.set(g,{object:a,id:g,parentId:l,childIds:[]}),this.objectsById.set(g,a),this.idsByObjectIndex.set(a,g),d.add(g),l!==null&&i.add(l));const w=g??l,B=y||g!==null;for(const j of a.children)p(j,w,B)};for(const a of s){if(!_(a,t))continue;let l=a.parent,y=null;for(;l!==null&&l!==t;){const g=this.idsByObjectIndex.get(l);if(g!==void 0){y=g;break}l=l.parent}p(a,y,y!==null)}const v=a=>{const l=[],y=g=>{if(c(g))return;const w=this.idsByObjectIndex.get(g);if(w!==void 0){l.push(w);return}for(const B of g.children)y(B)};for(const g of a.children)y(g);return l};for(const a of i){const l=this.nodesById.get(a);l!==void 0&&l.childIds.splice(0,l.childIds.length,...v(l.object))}for(const a of d){const l=this.nodesById.get(a);l!==void 0&&l.childIds.splice(0,l.childIds.length,...v(l.object))}const b=v(t),I=this.roots.filter(a=>{const l=this.objectsById.get(a);return l!==void 0&&!_(l,t)&&!u.has(a)});this.roots=[...b,...I],this.walkStats=F(this.nodesById);const m=f.length!==this.roots.length||f.some((a,l)=>a!==this.roots[l]);return{removedIds:u,addedIds:d,changedParentIds:i,rootsChanged:m}}get nodes(){return this.nodesById}get objects(){return this.objectsById}get idsByObject(){return this.idsByObjectIndex}get rootIds(){return this.roots}get stats(){return this.walkStats}node(t){return this.nodesById.get(t)??null}rootNodes(){return this.roots.map(t=>this.nodesById.get(t)).filter(t=>t!==void 0)}objectOf(t){return this.objectsById.get(t)??null}idOf(t){return this.idsByObjectIndex.get(t)??null}childIdsOf(t){const e=[];for(const r of t){const s=this.idsByObjectIndex.get(r);s!==void 0&&e.push(s)}return e}objectMapSnapshot(){return new Map(this.objectsById)}pick(t,e,r,s){return st(t,e,r,s,this.pickProjection())}candidates(t,e,r,s){return L(t,e,r,s,this.pickProjection())}pickProjection(){if(this.options.pickScope!=="store-object-map")return{objects:this.objectsById.values(),idForObject3D:t=>this.idOf(t)}}}export{wt as T,yt as a,gt as b,It as c,mt as d,q as e,ht as f,vt as n,Z as o,X as r,pt as s};
|
package/dist/assets/{three-authoring-adapter-B_QRJiNW.js → three-authoring-adapter-BO7jI7-8.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dx as k,eg as _,Z as v,ay as E,aC as z,eb as O,gC as W,gD as R,q as P,bU as U,gE as G,an as N,bV as L,bS as Q,bT as Y,k as Z,bW as q}from"./index-BXVB2CCJ.js";import{a as ee,o as te,b as C}from"./component-instance-root-B5BfGdnt.js";import{c as re,p as x,m as se,a as oe}from"./source-persistence-backend-DUcIwEKt.js";import{J as ie,c as ne}from"./json-history-resource-BjxiSBwH.js";import{r as f,d as ae,a as ce}from"./ingest-source-persistence-CDk8QnEz.js";import{r as le}from"./three-projection-core-M9NSM8mB.js";import{a as D,T as he,n as ue,b as de}from"./three-68SmB1Ck.js";import{isEditorOwnedObject as T}from"./editor-layers-Di-Sxkb4.js";import{bodyOwningNode as F}from"./body-marks-C1LxJtQb.js";import{colorMaterialOf as y}from"./structural-ids-BOo2BRoY.js";import{object3DAuthoringSubjectOf as H}from"./object3d-authoring-subject-XccsO0xG.js";import{createRapierBodyEditing as fe}from"./rapier-physics-adapter-CaZqWLu0.js";import{getUserData as m}from"./user-data-CODoGZqA.js";import{b as me,c as pe}from"./r3f-physics-binding-DKJjSbrS.js";const be={position:{owner:"self",member:"position",kind:"vector3"},rotation:{owner:"self",member:"rotation",kind:"euler"},scale:{owner:"self",member:"scale",kind:"vector3"},visible:{owner:"self",member:"visible",kind:"boolean"},name:{owner:"self",member:"name",kind:"string"},"material.color":{owner:"material",member:"color",kind:"color"},"light.color":{owner:"self",member:"color",kind:"color"},"light.intensity":{owner:"self",member:"intensity",kind:"number"},"light.distance":{owner:"self",member:"distance",kind:"number"},"camera.fov":{owner:"self",member:"fov",kind:"number"},"camera.near":{owner:"self",member:"near",kind:"number"},"camera.far":{owner:"self",member:"far",kind:"number"},"shadow.cast":{owner:"self",member:"castShadow",kind:"boolean"},"shadow.receive":{owner:"self",member:"receiveShadow",kind:"boolean"}},ye={position:{owner:"self",member:"position",kind:"vector2",componentMembers:["x","y"]},rotation:{owner:"self",member:"rotation",kind:"number"},scale:{owner:"self",member:"scale",kind:"vector2"},visible:{owner:"self",member:"visible",kind:"boolean"},name:{owner:"self",member:"label",kind:"string"},alpha:{owner:"self",member:"alpha",kind:"number"},tint:{owner:"self",member:"tint",kind:"color"}},ge={position:{owner:"self",member:"position",kind:"vector3"},rotation:{owner:"self",member:"rotation",kind:"euler"},scale:{owner:"self",member:"scaling",kind:"vector3"},name:{owner:"self",member:"name",kind:"string"},visible:{owner:"self",member:"isVisible",kind:"boolean"},visibility:{owner:"self",member:"visibility",kind:"number"}};function J(l,t="three"){return(t==="pixi"?ye:t==="babylon"?ge:be)[l]??null}const K="the game's own JSX source (source-stamp write-back)",S={position:"position",rotation:"rotation",scale:"scale",visible:"visible",name:"name","material.color":"color","light.color":"color","light.intensity":"intensity","light.distance":"distance","camera.fov":"fov","camera.near":"near","camera.far":"far","shadow.cast":"castShadow","shadow.receive":"receiveShadow"};function M(l){const t=Math.round(l*1e4)/1e4;return Object.is(t,-0)?"0":String(t)}function V(l,t){const e=J(l)?.kind;return e==="vector3"||e==="euler"?!Array.isArray(t)||t.length!==3||!t.every(r=>typeof r=="number"&&Number.isFinite(r))?null:`[${t.map(M).join(", ")}]`:e==="number"?typeof t=="number"&&Number.isFinite(t)?M(t):null:e==="boolean"?typeof t=="boolean"?String(t):null:(e==="color"||e==="string")&&typeof t=="string"?t.replace(/["\\]/g,""):null}function X(l,t){const e=me(l??void 0,t);if(e)return e;const r=l?.r3fAuthoring;if(!r||t!=="position"&&t!=="rotation"&&t!=="scale")return null;const s=`<${l?.tag??"this component"}>`;return r.simulationOwnedTransform===!0?`${s} drives its own ${t} every frame — this instance is placed by the simulation, not by the editor`:r.transformProps.includes(t)?null:`${s} does not forward ${t} to its native root`}function I(l){const t=l.file.replaceAll("\\","/"),e=z()?.rootPath.replaceAll("\\","/").replace(/\/$/,""),r=e&&t.startsWith(`${e}/`)?t.slice(e.length+1):t;return{anchored:!0,kind:"source",file:r,line:l.line,col:l.col,display:`${r}:${l.line}`}}async function De(l){try{const e=await(l??k("Live source locations"))?.index?.();return r=>{const s=e?.[r];return s?I(s):null}}catch{return()=>null}}async function ve(l,t,e){const r=l.writeProp;if(!r)throw new Error("the gesture-scoped source writer cannot write JSX props");let s=0;for(const{property:o,text:i}of e){const a=await r(t,o,i,{addIfMissing:!0,allowShapeUpgrade:!0});if(a.dynamic)throw new Error(`${o} is bound to a JSX expression, not an authored literal`);if(!a.changed&&a.error)throw new Error(a.error);a.changed&&s++}return s}function we(l){const t=l.backend??k("The Play→source transform committer"),e=_(t,l.history),r=o=>o?!e?.runGesture||!e.writeProp||!e.index?{available:!1,reason:"This editor session cannot open a checksum-guarded project-source gesture."}:{available:!0}:{available:!1,reason:"This live node has no OID source stamp, so no authored literal owns its pose."},s=o=>(v.warn(`[play] Commit live transform to source refused: ${o}`,"play-mode"),{destination:E,persisted:!1});return{availability:r,async commit(o,i){const a=r(o);if(!a.available||!o||!e?.runGesture||!e.index)return s(a.reason??"the source writer is unavailable");const c=(await e.index())[o]??null;if(!c)return s(`the current source index has no entry for OID "${o}"`);const h=["position","rotation","scale"].map(d=>{const j=X(c,d);if(j)throw new Error(j);const w=i[d],$=w===void 0?null:V(d,w);if($===null)throw new Error(`${d} is not a finite transform literal`);return{property:d,text:$}});let u;try{u=await e.runGesture("Commit Play Transform to Source",d=>ve(d,o,h))}catch(d){return s(d instanceof Error?d.message:String(d))}return u===0?(v.log("[play] Source already matches the selected live transform.","play-mode"),{destination:"source already matched the live transform",persisted:!1}):(v.log(`[play] Committed ${u} live transform literal(s) to ${c.file}:${c.line}.`,"play-mode"),{destination:K,persisted:!0})}}}function Se(l){let t=null,e=new Map,r=!1;const s=async()=>{const n=t?.index;if(n)try{e=new Map(Object.entries(await n.call(t))),r=!0}catch{}},o=n=>n?e.get(n)??null:null,i=n=>{const c=o(n);return c?I(c).display:null},a=(n,c)=>{if(!n)return{ok:!1,reason:"this object carries no source stamp — the game built it at runtime rather than writing it as an element of its own source"};if(!t?.writeProp)return{ok:!1,reason:"this editor tier cannot write project source"};const h=S[c];if(!h)return{ok:!1,reason:`${c} has no JSX attribute this seam can write`};const u=X(o(n),h);if(u)return{ok:!1,reason:u};if(!O()){const d=i(n);return{ok:!1,reason:`${d?`written at ${d}`:"source-stamped"}, but this game is playing — hold it to author`}}return{ok:!0}};return{attach(){const n=l.backend??k("This world’s OID source persistence")??null;t=n?_(n,l.history)??n:null,s()},anchor(n){const c=e.get(n);return c?I(c):null},physicsPlaced(n,c){return pe(o(n)??void 0,S[c]??c)},describe({sourceOid:n,property:c}){const h=a(n,c);if(!h.ok)return`Live-only edit — ${h.reason}.`;const u=i(n);return u?`Persisting to ${u}.`:`Persisting to this element's own JSX${r?"":" (source index still loading)"}.`},gate({sourceOid:n,property:c}){return a(n,c)},armed:()=>t?.writeProp!==void 0&&O(),report:(n,c)=>f(n,c),async write(n){const c=a(n.sourceOid,n.property);if(!c.ok)return f(n.label,c.reason),!1;const h=S[n.property],u=V(n.property,n.next);if(u===null)return f(n.label,`the new ${n.property} is not a value this seam can spell as a JSX literal`),!1;try{const d=await t.writeProp(n.sourceOid,h,u,{addIfMissing:!0,allowShapeUpgrade:!0});return d.dynamic?(f(n.label,`${h} at ${i(n.sourceOid)??"this element"} is bound to a JSX expression, not a literal`),!1):d.changed?(v.log(`[ingest] ${n.label} written to the game's own source — ${h} → ${i(n.sourceOid)??n.sourceOid}`),s(),!0):(f(n.label,d.error??"the source writer made no change"),!1)}catch(d){return f(n.label,`the write failed: ${d instanceof Error?d.message:String(d)}`),!1}},removal:{available({sourceOid:n,property:c}){return t?.removeProp?a(n,c).ok:!1},async perform(n){const c=a(n.sourceOid,n.property);if(!c.ok||!t?.removeProp)return f(n.label,c.ok?"this editor tier cannot remove project source":c.reason),!1;const h=S[n.property];try{const u=await t.removeProp(n.sourceOid,h);return u.dynamic?(f(n.label,`${h} at ${i(n.sourceOid)??"this element"} is bound to a JSX expression — removing it would delete the game's own wiring, not an override`),!1):u.changed?(v.log(`[ingest] ${n.label} — ${h} dropped from the game's own source at ${i(n.sourceOid)??n.sourceOid}`),s(),!0):(f(n.label,u.error??`${i(n.sourceOid)??"this element"} authors no ${h} attribute, so there was nothing to drop`),!1)}catch(u){return f(n.label,`the removal failed: ${u instanceof Error?u.message:String(u)}`),!1}}},destination(){return t?.writeProp&&O()?K:E},dispose(){t=null,e=new Map,r=!1}}}const je={source:"live",label:"live",detail:"Running objects adopted from the live scene. Edits affect this session only and are discarded when play stops."},Oe="Applied to the running world; code that drives this transform each frame may overwrite it.",Ce={source:"foreign",label:"live-only",detail:"Unmodified ingested game — edits apply to the running game for this session only and are never saved."},Ie={source:"foreign",label:"game source",detail:"Ingested game whose own source carries the editor's authoring stamps — a literal JSX prop writes back to the game’s own file (expression-bound props stay read-only)."};function p(l){return l.isLight?l:null}function g(l){const t=l;return t.isPointLight||t.isSpotLight?t:null}function ke(l){const t=l;return t.isDirectionalLight||t.isPointLight||t.isSpotLight?t:null}function b(l){const t=l;return t.isPerspectiveCamera?t:null}function B(l){const t=l;return t.isMesh&&t.geometry?t.geometry:null}class A{constructor(t,e,r){if(this.store=t,this.options=r,this.sceneRef=e,this.identity=r.identity,this.projector=new he(this.identity,{pickScope:"projection"}),this.persist=r.persistence??null,this.loop=r.loop,this.frameControl=r.frameControl??"adapter",this.provenance=r.provenance??je,r.sourceCommit){const i={availability:a=>r.sourceCommit.availability(C(this.objectOf(a))),commit:async a=>{const n=this.objectOf(a),c=this.captureChannelBaseline(a)??{},h=await r.sourceCommit.commit(C(n),c);return h.persisted&&this.store.shell.notifyIngestEdit(),h}};Object.assign(this.transforms,{sourceCommit:i})}r.sourceDeclaresStories&&(this.stories=W("three",t.shell,i=>{const a=this.hierarchy.node(i);return a?.role!=="component"?null:{name:a.typeLabel??a.label}})),this.refresh(),this.watchStructure();const s=t.shell.projectHistory;this.historyResource=this.persist&&s?new ie({history:s,kind:"session-state",scope:"session",subject:{...r.journal,id:`${r.journal.id}/live-three-edits`},displayName:"Live edits",capture:()=>this.captureHistoryState(),conflictIdentity:i=>i.edits,restore:async i=>{this.restoreHistoryState(i)}}):null;const o=this.persist;o&&(o.attach({read:(i,a)=>this.readChannel(i,a),apply:(i,a,n)=>this.applyChannel(i,a,n)}),this.persistence={...ne(),get destination(){return o.destination()}},o.readSiteLiterals&&(this.instances=this.creationSiteInstances(o)))}sceneRef;projector;watchedForStructure=new Set;changedStructureRoots=new Set;structureRefreshQueued=!1;disposed=!1;crossSurfaceStructureRevision=0;hasCrossSurfaceStructure=!1;identity;persist;loop;frameControl;instanceLiterals=new Map;instanceLiteralRequests=new Map;markedBodies=fe(t=>{const e=this.objectOf(t);if(!e)return{kind:"unresolved"};const r=F(e);return r?{kind:"body",body:r}:{kind:"no-body"}});bodyOwnershipByObject=new WeakMap;physicsFor(t){const e=R();return e&&P(e,t)!=="unresolved"?e:null}edits={};historyResource;editStartState;editBaseline;capabilities={transform:!0,inspectorFields:!0,persist:!1};stories;instances;provenance;persistence;get scene(){return typeof this.sceneRef=="function"?this.sceneRef():this.sceneRef}refresh(){const t=this.projector.project(this.scene);return this.refreshCrossSurfacePresence(),this.crossSurfaceStructureRevision++,t}crossSurfaceStructureSignature(){return this.hasCrossSurfaceStructure?String(this.crossSurfaceStructureRevision):null}objectCarriesCrossSurfaceStructure(t){return m(t,"authoringHierarchyId")!==void 0||m(t,"authoringHierarchyParentId")!==void 0||m(t,"authoringHierarchyOrder")!==void 0}subtreeCarriesCrossSurfaceStructure(t){let e=!1;return t.traverse(r=>{this.objectCarriesCrossSurfaceStructure(r)&&(e=!0)}),e}refreshCrossSurfacePresence(){this.hasCrossSurfaceStructure=!1;for(const t of this.projector.nodes.values())if(this.objectCarriesCrossSurfaceStructure(t.object)){this.hasCrossSurfaceStructure=!0;return}}onStructureChanged=t=>{T(t.child)||this.disposed||(this.changedStructureRoots.add(t.child),!this.structureRefreshQueued&&(this.structureRefreshQueued=!0,queueMicrotask(()=>{if(this.structureRefreshQueued=!1,this.disposed)return;const e=[...this.changedStructureRoots];this.changedStructureRoots.clear();const r=e.some(o=>this.subtreeCarriesCrossSurfaceStructure(o));for(const o of e)this.unwatchStructureSubtree(o);const s=this.projector.projectSubtrees(this.scene,e);if(s===null)this.refresh(),this.watchStructure();else for(const o of e)this.structureRootIsAttached(o)&&this.watchStructureSubtree(o);r&&(this.refreshCrossSurfacePresence(),this.crossSurfaceStructureRevision++),this.syncAdoptedObjectMap(s??void 0),this.store.notifyIngestObjectMapEdit(s===null?void 0:{changedParentIds:s.changedParentIds,rootsChanged:s.rootsChanged,addedIds:s.addedIds,removedIds:s.removedIds})})))};watchStructure(){for(const e of this.watchedForStructure)e.removeEventListener("childadded",this.onStructureChanged),e.removeEventListener("childremoved",this.onStructureChanged);this.watchedForStructure.clear();const t=this.scene;t&&this.watchStructureSubtree(t)}watchStructureSubtree(t){const e=r=>{if(!(T(r)||this.watchedForStructure.has(r))){r.addEventListener("childadded",this.onStructureChanged),r.addEventListener("childremoved",this.onStructureChanged),this.watchedForStructure.add(r);for(const s of r.children)e(s)}};e(t)}structureRootIsAttached(t){const e=this.scene;if(e===null)return!1;for(let r=t;r!==null;r=r.parent)if(r===e)return!0;return!1}unwatchStructureSubtree(t){t.traverse(e=>{this.watchedForStructure.delete(e)&&(e.removeEventListener("childadded",this.onStructureChanged),e.removeEventListener("childremoved",this.onStructureChanged))})}syncAdoptedObjectMap(t){const e=this.scene;if(!e||this.store.scene!==e)return;const r=this.store.objectMap;if(t===void 0){r.clear();for(const[o,i]of this.projector.objectMapSnapshot())r.set(o,i)}else{for(const o of t.removedIds)r.delete(o);for(const o of t.addedIds){const i=this.projector.objectOf(o);i!==null&&r.set(o,i)}}const s=[...this.store.shell.selectedEntityIds].filter(o=>r.has(o));s.length!==this.store.shell.selectedEntityIds.size&&this.store.shell.selectMultiple(s)}invalidate(){this.refresh()}adoptScene(t){this.sceneRef=t,this.refresh(),this.watchStructure(),this.syncAdoptedObjectMap()}objectOf(t){return this.projector.objectOf(t)}objectMapSnapshot(){return this.projector.objectMapSnapshot()}record(t,e){this.edits[t]={...this.edits[t],...e}}toEditorNode(t){const e=t.object,r=m(e,"authoringHierarchyId"),s=m(e,"authoringHierarchyParentId"),o=m(e,"authoringHierarchyOrder"),i=ee(e)&&m(e,"authoringRoot")!==!0,a=m(e,"authoringComponent"),n=(i?m(e,"authoringLabel"):void 0)||e.name||e.type;return{id:t.id,label:n,role:i?"component":"entity",kind:ue(e),typeLabel:i?a||n:e.type,parentId:t.parentId,childIds:[...t.childIds],...r===void 0?{}:{crossSurfaceId:r},...s===void 0?{}:{crossSurfaceParentId:s},...o===void 0?{}:{crossSurfaceOrder:o}}}hierarchy={crossSurfaceStructureSignature:()=>this.crossSurfaceStructureSignature(),roots:()=>this.projector.rootNodes().map(t=>this.toEditorNode(t)),node:t=>{const e=this.projector.node(t);return e?this.toEditorNode(e):null},object3D:t=>this.objectOf(t),idForObject3D:t=>this.projector.idOf(t)};selection={get:()=>[...this.store.shell.selectedEntityIds],set:t=>this.store.shell.selectMultiple(t),resolve:(t,e)=>{const r=this.hierarchy.node(t);if(!r)return null;const s=[];let o=r,i=0;for(;o&&i++<1e3;)(o.role==="component"||o.role==="instance")&&s.push(o),o=o.parentId?this.hierarchy.node(o.parentId):null;const a=s.reverse();if(a.length===0)return{id:t};const n=e?.scopeId?a.findIndex(u=>u.id===e.scopeId):-1,c=n>=0?Math.min(n+1,a.length-1):0,h=e?.intent==="deep"?Math.min(c+1,a.length-1):c;return{id:a[h].id}}};pickable={pick:(t,e)=>(this.refresh(),this.projector.pick(this.store,t,e)),candidates:(t,e)=>(this.refresh(),this.projector.candidates(this.store,t,e))};truth={resolve:(t,e)=>{const r=this.anchorFor(t,e);return{site:r.anchor,writeAnchorKind:r.anchorKind}}};related=re(t=>this.truth.resolve(t,"position").site);transforms={get:t=>le(this.objectOf(t)),editability:(t,e)=>{if(!this.objectOf(t))return{writable:!1,reason:G};const r=N();return r?.networkId(t)&&!r.editable(t)?{writable:!1,reason:"This transform is controlled by remote or server network authority."}:this.bodyOwns(t)?{writable:!0,reason:"Moves the physics body that owns this node.",...this.removableFlag(t,e)}:this.frameControl==="host"&&this.store.shell.playState==="playing"?{writable:!0,reason:Oe,...this.removableFlag(t,e)}:this.persist?{writable:!0,reason:this.persist.describe(this.anchorFor(t,e)),...this.removableFlag(t,e)}:{writable:!0}},beginEdit:t=>{this.historyResource?.assertCanMutate(),!(!this.objectOf(t)||!this.editableByNetwork(t))&&(this.loop?.pause(),this.physicsFor(t)?.freeze(t),this.markedBodies.freeze(t),this.editStartState=this.persist?this.captureHistoryState():void 0,this.editBaseline=void 0)},apply:(t,e)=>{!this.objectOf(t)||!this.editableByNetwork(t)||(this.persist&&!this.editBaseline&&(this.editBaseline=this.captureChannelBaseline(t)),this.writeTransform(t,e),this.physicsFor(t)?.commit(t,e),this.markedBodies.commit(t,e),this.store.shell.notifyIngestEdit())},endEdit:t=>{this.loop?.resume();const e=this.objectOf(t),r=`Transform ${e?.name||"Object"}`,s=this.editStartState,o=this.editBaseline;return this.editStartState=void 0,this.editBaseline=void 0,e&&(this.physicsFor(t)?.unfreeze(t),this.markedBodies.unfreeze(t),this.store.shell.notifyIngestEdit()),this.persist?this.persistOrJournal(t,r,s,o):void 0},remove:(t,e)=>{if(this.persist?.removal)return U(this.pipedRemove(t,e))}};removableFlag(t,e){const r=this.persist?.removal;return r?r.available(this.anchorFor(t,e))?{removable:!0}:{}:{}}pipedRemove(t,e){const r=this.persist,s=r.removal,o=`Remove ${this.objectOf(t)?.name||"Object"} ${e}`;return{resolve:()=>{const i=this.anchorFor(t,e);return s.available(i)?i.anchorKind==="live-only"?L(r.describe(i)):{reaches:"writer",anchorKind:i.anchorKind,destination:r.destination(),write:()=>s.perform({...i,label:o})}:L(r.describe(i))},record:()=>{},report:i=>{r.armed()&&r.report(o,i)}}}bodyOwns(t){const e=this.objectOf(t);if(!e)return!1;const r=this.bodyOwnershipByObject.get(e);if(r!==void 0)return r;const s=R(),o=s?P(s,t):void 0;if(o==="physics")return this.bodyOwnershipByObject.set(e,!0),!0;const i=F(e)!==void 0;return(i||o==="editor")&&this.bodyOwnershipByObject.set(e,i),i}editableByNetwork(t){const e=N();return e?e.editable(t):!0}inspector={properties:t=>{const e=this.objectOf(t);if(!e)return[];const r=[{path:"name",label:"Name",type:"string"},{path:"visible",label:"Visible",type:"boolean"},{path:"object.type",label:"Native type",type:"string",readonly:!0}],s=H(e);return s?.fields&&r.push(...s.fields().filter(i=>!["name","visible"].includes(i.path)).map(({value:i,...a})=>a)),y(e)&&r.push({path:"material.color",label:"Color",type:"color",group:"Material"}),p(e)&&(r.push({path:"light.intensity",label:"Intensity",type:"number"}),r.push({path:"light.color",label:"Light Color",type:"color"}),g(e)&&r.push({path:"light.distance",label:"Distance",type:"number"}),ke(e)&&r.push({path:"shadow.cast",label:"Cast Shadow",type:"boolean"})),b(e)&&(r.push({path:"camera.fov",label:"FOV",type:"number"}),r.push({path:"camera.near",label:"Near",type:"number"}),r.push({path:"camera.far",label:"Far",type:"number"})),B(e)&&(r.push({path:"mesh.vertices",label:"Vertices",type:"number",readonly:!0}),r.push({path:"shadow.cast",label:"Cast Shadow",type:"boolean"}),r.push({path:"shadow.receive",label:"Receive Shadow",type:"boolean"})),r},get:(t,e)=>{const r=this.objectOf(t);if(!r)return;if(e==="name")return r.name;if(e==="visible")return r.visible;if(e==="object.type")return r.type;const s=H(r)?.fields?.().find(o=>o.path===e);if(s)return s.value();if(e==="material.color"){const o=y(r);return o?`#${o.color.getHexString()}`:void 0}if(e==="light.intensity")return p(r)?.intensity;if(e==="light.distance")return g(r)?.distance;if(e==="light.color"){const o=p(r);return o?`#${o.color.getHexString()}`:void 0}if(e==="camera.fov")return b(r)?.fov;if(e==="camera.near")return b(r)?.near;if(e==="camera.far")return b(r)?.far;if(e==="mesh.vertices"){const o=B(r);return o?o.getAttribute("position")?.count??0:void 0}if(e==="shadow.cast")return r.castShadow;if(e==="shadow.receive")return r.receiveShadow},set:(t,e,r)=>{if(this.historyResource?.assertCanMutate(),!this.persist){this.writeProp(t,e,r);return}const s=this.captureHistoryState(),o=this.readChannel(t,e);this.writeProp(t,e,r);const i=`Set ${this.objectOf(t)?.name||"Object"} ${e}`,a=this.readChannel(t,e);if(!(o!==void 0&&a!==void 0&&JSON.stringify(o)!==JSON.stringify(a))){this.recordHistory(i,s);return}return x({backend:this.persist,subject:()=>this.anchorFor(t,e),baseline:o,next:a,label:i,journal:()=>this.recordHistory(i,s)})}};subscribe(t){return this.store.shell.subscribe(t)}dispose(){this.disposed=!0;for(const t of this.watchedForStructure)t.removeEventListener("childadded",this.onStructureChanged),t.removeEventListener("childremoved",this.onStructureChanged);this.watchedForStructure.clear(),this.changedStructureRoots.clear(),this.historyResource?.dispose(),this.persist?.dispose()}readChannel(t,e){const r=this.objectOf(t);if(r)return e==="position"?r.position.toArray():e==="rotation"?[r.rotation.x,r.rotation.y,r.rotation.z]:e==="scale"?r.scale.toArray():this.inspector.get(t,e)}applyChannel(t,e,r){const s=this.objectOf(t);if(s){if(e==="position"&&Array.isArray(r))s.position.fromArray(r);else if(e==="rotation"&&Array.isArray(r)){const[o,i,a]=r;s.rotation.set(o??0,i??0,a??0)}else if(e==="scale"&&Array.isArray(r))s.scale.fromArray(r);else{this.writeProp(t,e,r);return}this.store.shell.notifyIngestEdit()}}writeTransform(t,e){this.historyResource?.assertCanMutate();const r=this.objectOf(t);r&&(r.position.set(e.position[0],e.position[1],e.position[2]),r.quaternion.set(e.rotation[0],e.rotation[1],e.rotation[2],e.rotation[3]),r.scale.set(e.scale[0],e.scale[1],e.scale[2]),this.record(t,{position:e.position,rotation:e.rotation,scale:e.scale}))}writeProp(t,e,r){const s=this.objectOf(t);if(s){if(e==="name")s.name=String(r);else if(e==="visible")s.visible=!!r,this.record(t,{visible:s.visible});else if(e==="material.color"){const o=y(s);o&&(o.color.set(String(r)),this.record(t,{color:`#${o.color.getHexString()}`}))}else if(e==="light.intensity"){const o=p(s);o&&(o.intensity=Number(r))}else if(e==="light.distance"){const o=g(s);o&&(o.distance=Number(r))}else if(e==="light.color")p(s)?.color.set(String(r));else if(e==="camera.fov"||e==="camera.near"||e==="camera.far"){const o=b(s);o&&(o[e.split(".")[1]]=Number(r),o.updateProjectionMatrix())}else e==="shadow.cast"?s.castShadow=!!r:e==="shadow.receive"&&(s.receiveShadow=!!r);this.store.shell.notifyIngestEdit()}}anchorFor(t,e){const r=this.objectOf(t),s=J(e),o=r&&s?.owner==="material"?y(r):r,i=s?.owner==="material"?te(o):C(o),a=i?this.persist?.anchor?.(i):null;if(a){const h=i?this.persist?.physicsPlaced?.(i,e):!1;return{entityId:t,property:e,anchor:a,anchorKind:h?"physics-binding":"source-prop",instances:1,sourceOid:i}}const n=ae(o);if(n!==null)return{entityId:t,property:e,anchor:ce(n),anchorKind:"data-record",instances:1,...i?{sourceOid:i}:{}};const c=i?this.options.sourceAnchor?.(i)??{anchored:!1,reason:"The source index has not resolved this object’s OID."}:Q(o??null);return{entityId:t,property:e,anchor:c,anchorKind:i?this.persist?.anchor?"source-prop":"live-only":c.anchored?"construction-literal":"live-only",instances:c.anchored&&c.kind==="source"?i?1:Y(c):0,...i?{sourceOid:i}:{}}}measureWriteReach(){this.refresh();let t=0;const e=Z();for(const r of this.projector.nodes.keys()){const s=this.anchorFor(r,"position");e[s.anchorKind]++,s.anchor.anchored&&t++}return{addressable:t,total:this.projector.nodes.size,destination:this.persist?.destination()??E,byKind:e}}captureChannelBaseline(t){const e=this.objectOf(t);if(e)return{position:e.position.toArray(),rotation:[e.rotation.x,e.rotation.y,e.rotation.z],scale:e.scale.toArray()}}persistOrJournal(t,e,r,s){const o=this.persist;if(!o)return;const i=s?this.captureChannelBaseline(t):void 0,a=s&&i?Object.keys(s).filter(c=>JSON.stringify(s[c])!==JSON.stringify(i[c])):[];a.length>1&&o.report(e,se(a));const n=a.length===1?a[0]:null;if(n===null){this.recordHistory(e,r);return}return x({backend:o,subject:()=>this.anchorFor(t,n),baseline:s[n],next:i[n],label:e,journal:()=>this.recordHistory(e,r)})}creationSiteKey(t){const e=t.anchor;return e.anchored&&e.kind==="source"?`${e.file}:${e.line}:${e.col}`:null}instancePropertyPaths(t,e){const r=["position","rotation","scale",...this.inspector.properties(t).filter(s=>!s.readonly).map(s=>s.path)];return[...new Set(r)].filter(s=>this.creationSiteKey(this.anchorFor(t,s))===e)}loadInstanceLiterals(t,e,r,s){const o=this.instanceLiteralRequests.get(s);if(o)return o;const i=this.instancePropertyPaths(e,s).map(n=>({property:n,live:this.readChannel(e,n)})).filter(n=>n.live!==void 0),a=t.readSiteLiterals({anchor:r.anchor,instances:r.instances,writeScope:"creation-site",properties:i}).then(n=>(this.instanceLiterals.set(s,n),this.store.shell.notifyIngestEdit(),n));return this.instanceLiteralRequests.set(s,a),a}sameInstanceValue(t,e){return Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((r,s)=>this.sameInstanceValue(r,e[s])):typeof t=="number"&&typeof e=="number"?Math.abs(t-e)<=1e-6:t===e}instanceComponentName(t){return t.constructor.name||t.type}instanceCountLabel(t){return`${t} ${t===1?"instance":"instances"}`}instanceOverride(t,e,r,s,o){const i=s[r],a=this.readChannel(e,r);if(!i||i.literal===null||a===void 0||this.sameInstanceValue(i.literal,a))return null;const n=t.gate({...this.anchorFor(e,r),writeScope:"creation-site"}),c=i.writable?n.ok?void 0:n.reason:i.reason,h=this.inspector.properties(e).find(u=>u.path===r)?.label??r;return{path:r,label:h,value:a,...i.text?{defaultText:i.text}:{},canApplyToComponent:c===void 0,...c?{applyUnavailableReason:c}:{},affectedInstanceCount:o.instances}}async applyInstanceDefault(t,e,r,s){const o={...this.anchorFor(r,s),writeScope:"creation-site"},i=this.creationSiteKey(o);if(!i)return{changed:!1,message:"This object has no source site."};const a=this.objectOf(r);if(!a)return{changed:!1,message:"This object is no longer in the live world."};const n=(await e(r,o,i))[s];if(!n)return{changed:!1,message:`The construction site names no ${s}.`};if(n.literal===null)return{changed:!1,message:`The construction site names no ${s} default.`};const c=this.readChannel(r,s);if(c===void 0)return{changed:!1,message:`${s} has no live value.`};if(!n.writable)return{changed:!1,message:n.reason??`${s} cannot be rewritten.`};const h=t.gate(o);if(!h.ok)return{changed:!1,message:h.reason};const u=o.instances,d=`Apply ${s} to ${this.instanceComponentName(a)} default (${this.instanceCountLabel(u)})`;if(!await t.write({...o,baseline:n.literal,next:c,label:d}))return{changed:!1,message:`${d} did not land; the console names why.`};this.instanceLiterals.delete(i),this.instanceLiteralRequests.delete(i),this.store.shell.notifyIngestEdit();const w=o.anchor.anchored?o.anchor.display:"this source site";return{changed:!0,message:`${s} now applies to all ${this.instanceCountLabel(u)} from ${w}.`,write:{destination:w,persisted:!0}}}creationSiteInstances(t){const e=async(r,s,o)=>this.instanceLiterals.get(o)??this.loadInstanceLiterals(t,r,s,o);return{describe:r=>{const s=this.anchorFor(r,"position"),o=this.creationSiteKey(s),i=this.objectOf(r);if(!o||!i)return null;const a=this.instanceLiterals.get(o);if(!a)return this.loadInstanceLiterals(t,r,s,o),null;if(Object.keys(a).length===0)return null;const n=this.instancePropertyPaths(r,o).map(c=>this.instanceOverride(t,r,c,a,s)).filter(c=>c!==null);return{componentName:this.instanceComponentName(i),...s.anchor.anchored?{sourcePath:s.anchor.display}:{},overrides:n}},revert:async(r,s)=>{const o=this.anchorFor(r,"position"),i=this.creationSiteKey(o);if(!i)return;const a=await e(r,o,i),n=this.captureHistoryState();let c=0;for(const h of s){const u=a[h]?.literal;u!=null&&(this.applyChannel(r,h,u),c++)}return c>0&&this.recordHistory(`Revert ${c} instance override(s)`,n),c>0?q:void 0},applyToComponent:(r,s)=>this.applyInstanceDefault(t,e,r,s)}}recordHistory(t,e){!this.historyResource||!e||this.historyResource.record(t,e,this.captureHistoryState()).catch(r=>{v.error(`[ingest] failed to journal "${t}" into project history — the edit is applied but has no history entry (it cannot be undone): ${r instanceof Error?r.message:String(r)}`)})}captureHistoryState(){const t={};for(const[e,r]of this.projector.nodes){const s=r.object,o=y(s),i=p(s),a=b(s);t[e]={name:s.name,visible:s.visible,transform:this.transforms.get(e),...o?{color:`#${o.color.getHexString()}`}:{},...i?{lightIntensity:i.intensity,lightColor:`#${i.color.getHexString()}`,...g(s)?{lightDistance:g(s).distance}:{}}:{},...a?{camera:{fov:a.fov,near:a.near,far:a.far}}:{},castShadow:s.castShadow,receiveShadow:s.receiveShadow}}return{edits:structuredClone(this.edits),objects:t}}restoreHistoryState(t){for(const[e,r]of Object.entries(t.objects)){const s=this.objectOf(e);if(!s)continue;s.name=r.name,s.visible=r.visible,s.position.fromArray(r.transform.position),s.quaternion.fromArray(r.transform.rotation),s.scale.fromArray(r.transform.scale),this.physicsFor(e)?.commit(e,r.transform),this.markedBodies.commit(e,r.transform),r.color&&y(s)?.color.set(r.color);const o=p(s);if(o&&(r.lightIntensity!==void 0&&(o.intensity=r.lightIntensity),r.lightColor&&o.color.set(r.lightColor),r.lightDistance!==void 0)){const a=g(s);a&&(a.distance=r.lightDistance)}const i=b(s);i&&r.camera&&(i.fov=r.camera.fov,i.near=r.camera.near,i.far=r.camera.far,i.updateProjectionMatrix()),s.castShadow=r.castShadow,s.receiveShadow=r.receiveShadow}this.edits=structuredClone(t.edits),this.store.shell.notifyIngestEdit()}}function Je(l,t,e){return new A(l,t,{identity:de({camera:e.camera}),journal:e.journal,persistence:oe({history:l.shell.projectHistory,writer:e.sourceWriter}),loop:e.loop,...e.frameControl?{frameControl:e.frameControl}:{},provenance:Ce})}function Ke(l,t,e){return new A(l,t,{identity:D(e.worldId,{camera:e.camera}),journal:e.journal,persistence:Se({history:l.shell.projectHistory,backend:e.backend}),loop:e.loop,...e.frameControl?{frameControl:e.frameControl}:{},provenance:Ie,sourceDeclaresStories:!0})}function Ve(l,t,e,r,s={}){return new A(l,t,{identity:D(e),journal:r,frameControl:"host",sourceAnchor:s.sourceAnchor,...s.explicitSourceCommit?{sourceCommit:we({history:l.shell.projectHistory,...s.backend?{backend:s.backend}:{}})}:{}})}export{Ke as a,Ve as o,De as r,Je as s};
|
|
1
|
+
import{dx as k,eg as _,Z as v,ay as E,aC as z,eb as O,gC as W,gD as R,q as P,bU as U,gE as G,an as N,bV as L,bS as Q,bT as Y,k as Z,bW as q}from"./index-r-FuctN5.js";import{a as ee,o as te,b as C}from"./component-instance-root-9er-zSAY.js";import{c as re,p as x,m as se,a as oe}from"./source-persistence-backend-Con5sRZv.js";import{J as ie,c as ne}from"./json-history-resource-DuT7scib.js";import{r as f,d as ae,a as ce}from"./ingest-source-persistence-BwINDLYc.js";import{r as le}from"./three-projection-core-CFyOC4Fp.js";import{a as D,T as he,n as ue,b as de}from"./three-BGqB-uVq.js";import{isEditorOwnedObject as T}from"./editor-layers-CSl6S15k.js";import{bodyOwningNode as F}from"./body-marks-C1LxJtQb.js";import{colorMaterialOf as y}from"./structural-ids-BOo2BRoY.js";import{object3DAuthoringSubjectOf as H}from"./object3d-authoring-subject-XccsO0xG.js";import{createRapierBodyEditing as fe}from"./rapier-physics-adapter-CaZqWLu0.js";import{getUserData as m}from"./user-data-CODoGZqA.js";import{b as me,c as pe}from"./r3f-physics-binding-yDE4SctS.js";const be={position:{owner:"self",member:"position",kind:"vector3"},rotation:{owner:"self",member:"rotation",kind:"euler"},scale:{owner:"self",member:"scale",kind:"vector3"},visible:{owner:"self",member:"visible",kind:"boolean"},name:{owner:"self",member:"name",kind:"string"},"material.color":{owner:"material",member:"color",kind:"color"},"light.color":{owner:"self",member:"color",kind:"color"},"light.intensity":{owner:"self",member:"intensity",kind:"number"},"light.distance":{owner:"self",member:"distance",kind:"number"},"camera.fov":{owner:"self",member:"fov",kind:"number"},"camera.near":{owner:"self",member:"near",kind:"number"},"camera.far":{owner:"self",member:"far",kind:"number"},"shadow.cast":{owner:"self",member:"castShadow",kind:"boolean"},"shadow.receive":{owner:"self",member:"receiveShadow",kind:"boolean"}},ye={position:{owner:"self",member:"position",kind:"vector2",componentMembers:["x","y"]},rotation:{owner:"self",member:"rotation",kind:"number"},scale:{owner:"self",member:"scale",kind:"vector2"},visible:{owner:"self",member:"visible",kind:"boolean"},name:{owner:"self",member:"label",kind:"string"},alpha:{owner:"self",member:"alpha",kind:"number"},tint:{owner:"self",member:"tint",kind:"color"}},ge={position:{owner:"self",member:"position",kind:"vector3"},rotation:{owner:"self",member:"rotation",kind:"euler"},scale:{owner:"self",member:"scaling",kind:"vector3"},name:{owner:"self",member:"name",kind:"string"},visible:{owner:"self",member:"isVisible",kind:"boolean"},visibility:{owner:"self",member:"visibility",kind:"number"}};function J(l,t="three"){return(t==="pixi"?ye:t==="babylon"?ge:be)[l]??null}const K="the game's own JSX source (source-stamp write-back)",S={position:"position",rotation:"rotation",scale:"scale",visible:"visible",name:"name","material.color":"color","light.color":"color","light.intensity":"intensity","light.distance":"distance","camera.fov":"fov","camera.near":"near","camera.far":"far","shadow.cast":"castShadow","shadow.receive":"receiveShadow"};function M(l){const t=Math.round(l*1e4)/1e4;return Object.is(t,-0)?"0":String(t)}function V(l,t){const e=J(l)?.kind;return e==="vector3"||e==="euler"?!Array.isArray(t)||t.length!==3||!t.every(r=>typeof r=="number"&&Number.isFinite(r))?null:`[${t.map(M).join(", ")}]`:e==="number"?typeof t=="number"&&Number.isFinite(t)?M(t):null:e==="boolean"?typeof t=="boolean"?String(t):null:(e==="color"||e==="string")&&typeof t=="string"?t.replace(/["\\]/g,""):null}function X(l,t){const e=me(l??void 0,t);if(e)return e;const r=l?.r3fAuthoring;if(!r||t!=="position"&&t!=="rotation"&&t!=="scale")return null;const s=`<${l?.tag??"this component"}>`;return r.simulationOwnedTransform===!0?`${s} drives its own ${t} every frame — this instance is placed by the simulation, not by the editor`:r.transformProps.includes(t)?null:`${s} does not forward ${t} to its native root`}function I(l){const t=l.file.replaceAll("\\","/"),e=z()?.rootPath.replaceAll("\\","/").replace(/\/$/,""),r=e&&t.startsWith(`${e}/`)?t.slice(e.length+1):t;return{anchored:!0,kind:"source",file:r,line:l.line,col:l.col,display:`${r}:${l.line}`}}async function De(l){try{const e=await(l??k("Live source locations"))?.index?.();return r=>{const s=e?.[r];return s?I(s):null}}catch{return()=>null}}async function ve(l,t,e){const r=l.writeProp;if(!r)throw new Error("the gesture-scoped source writer cannot write JSX props");let s=0;for(const{property:o,text:i}of e){const a=await r(t,o,i,{addIfMissing:!0,allowShapeUpgrade:!0});if(a.dynamic)throw new Error(`${o} is bound to a JSX expression, not an authored literal`);if(!a.changed&&a.error)throw new Error(a.error);a.changed&&s++}return s}function we(l){const t=l.backend??k("The Play→source transform committer"),e=_(t,l.history),r=o=>o?!e?.runGesture||!e.writeProp||!e.index?{available:!1,reason:"This editor session cannot open a checksum-guarded project-source gesture."}:{available:!0}:{available:!1,reason:"This live node has no OID source stamp, so no authored literal owns its pose."},s=o=>(v.warn(`[play] Commit live transform to source refused: ${o}`,"play-mode"),{destination:E,persisted:!1});return{availability:r,async commit(o,i){const a=r(o);if(!a.available||!o||!e?.runGesture||!e.index)return s(a.reason??"the source writer is unavailable");const c=(await e.index())[o]??null;if(!c)return s(`the current source index has no entry for OID "${o}"`);const h=["position","rotation","scale"].map(d=>{const j=X(c,d);if(j)throw new Error(j);const w=i[d],$=w===void 0?null:V(d,w);if($===null)throw new Error(`${d} is not a finite transform literal`);return{property:d,text:$}});let u;try{u=await e.runGesture("Commit Play Transform to Source",d=>ve(d,o,h))}catch(d){return s(d instanceof Error?d.message:String(d))}return u===0?(v.log("[play] Source already matches the selected live transform.","play-mode"),{destination:"source already matched the live transform",persisted:!1}):(v.log(`[play] Committed ${u} live transform literal(s) to ${c.file}:${c.line}.`,"play-mode"),{destination:K,persisted:!0})}}}function Se(l){let t=null,e=new Map,r=!1;const s=async()=>{const n=t?.index;if(n)try{e=new Map(Object.entries(await n.call(t))),r=!0}catch{}},o=n=>n?e.get(n)??null:null,i=n=>{const c=o(n);return c?I(c).display:null},a=(n,c)=>{if(!n)return{ok:!1,reason:"this object carries no source stamp — the game built it at runtime rather than writing it as an element of its own source"};if(!t?.writeProp)return{ok:!1,reason:"this editor tier cannot write project source"};const h=S[c];if(!h)return{ok:!1,reason:`${c} has no JSX attribute this seam can write`};const u=X(o(n),h);if(u)return{ok:!1,reason:u};if(!O()){const d=i(n);return{ok:!1,reason:`${d?`written at ${d}`:"source-stamped"}, but this game is playing — hold it to author`}}return{ok:!0}};return{attach(){const n=l.backend??k("This world’s OID source persistence")??null;t=n?_(n,l.history)??n:null,s()},anchor(n){const c=e.get(n);return c?I(c):null},physicsPlaced(n,c){return pe(o(n)??void 0,S[c]??c)},describe({sourceOid:n,property:c}){const h=a(n,c);if(!h.ok)return`Live-only edit — ${h.reason}.`;const u=i(n);return u?`Persisting to ${u}.`:`Persisting to this element's own JSX${r?"":" (source index still loading)"}.`},gate({sourceOid:n,property:c}){return a(n,c)},armed:()=>t?.writeProp!==void 0&&O(),report:(n,c)=>f(n,c),async write(n){const c=a(n.sourceOid,n.property);if(!c.ok)return f(n.label,c.reason),!1;const h=S[n.property],u=V(n.property,n.next);if(u===null)return f(n.label,`the new ${n.property} is not a value this seam can spell as a JSX literal`),!1;try{const d=await t.writeProp(n.sourceOid,h,u,{addIfMissing:!0,allowShapeUpgrade:!0});return d.dynamic?(f(n.label,`${h} at ${i(n.sourceOid)??"this element"} is bound to a JSX expression, not a literal`),!1):d.changed?(v.log(`[ingest] ${n.label} written to the game's own source — ${h} → ${i(n.sourceOid)??n.sourceOid}`),s(),!0):(f(n.label,d.error??"the source writer made no change"),!1)}catch(d){return f(n.label,`the write failed: ${d instanceof Error?d.message:String(d)}`),!1}},removal:{available({sourceOid:n,property:c}){return t?.removeProp?a(n,c).ok:!1},async perform(n){const c=a(n.sourceOid,n.property);if(!c.ok||!t?.removeProp)return f(n.label,c.ok?"this editor tier cannot remove project source":c.reason),!1;const h=S[n.property];try{const u=await t.removeProp(n.sourceOid,h);return u.dynamic?(f(n.label,`${h} at ${i(n.sourceOid)??"this element"} is bound to a JSX expression — removing it would delete the game's own wiring, not an override`),!1):u.changed?(v.log(`[ingest] ${n.label} — ${h} dropped from the game's own source at ${i(n.sourceOid)??n.sourceOid}`),s(),!0):(f(n.label,u.error??`${i(n.sourceOid)??"this element"} authors no ${h} attribute, so there was nothing to drop`),!1)}catch(u){return f(n.label,`the removal failed: ${u instanceof Error?u.message:String(u)}`),!1}}},destination(){return t?.writeProp&&O()?K:E},dispose(){t=null,e=new Map,r=!1}}}const je={source:"live",label:"live",detail:"Running objects adopted from the live scene. Edits affect this session only and are discarded when play stops."},Oe="Applied to the running world; code that drives this transform each frame may overwrite it.",Ce={source:"foreign",label:"live-only",detail:"Unmodified ingested game — edits apply to the running game for this session only and are never saved."},Ie={source:"foreign",label:"game source",detail:"Ingested game whose own source carries the editor's authoring stamps — a literal JSX prop writes back to the game’s own file (expression-bound props stay read-only)."};function p(l){return l.isLight?l:null}function g(l){const t=l;return t.isPointLight||t.isSpotLight?t:null}function ke(l){const t=l;return t.isDirectionalLight||t.isPointLight||t.isSpotLight?t:null}function b(l){const t=l;return t.isPerspectiveCamera?t:null}function B(l){const t=l;return t.isMesh&&t.geometry?t.geometry:null}class A{constructor(t,e,r){if(this.store=t,this.options=r,this.sceneRef=e,this.identity=r.identity,this.projector=new he(this.identity,{pickScope:"projection"}),this.persist=r.persistence??null,this.loop=r.loop,this.frameControl=r.frameControl??"adapter",this.provenance=r.provenance??je,r.sourceCommit){const i={availability:a=>r.sourceCommit.availability(C(this.objectOf(a))),commit:async a=>{const n=this.objectOf(a),c=this.captureChannelBaseline(a)??{},h=await r.sourceCommit.commit(C(n),c);return h.persisted&&this.store.shell.notifyIngestEdit(),h}};Object.assign(this.transforms,{sourceCommit:i})}r.sourceDeclaresStories&&(this.stories=W("three",t.shell,i=>{const a=this.hierarchy.node(i);return a?.role!=="component"?null:{name:a.typeLabel??a.label}})),this.refresh(),this.watchStructure();const s=t.shell.projectHistory;this.historyResource=this.persist&&s?new ie({history:s,kind:"session-state",scope:"session",subject:{...r.journal,id:`${r.journal.id}/live-three-edits`},displayName:"Live edits",capture:()=>this.captureHistoryState(),conflictIdentity:i=>i.edits,restore:async i=>{this.restoreHistoryState(i)}}):null;const o=this.persist;o&&(o.attach({read:(i,a)=>this.readChannel(i,a),apply:(i,a,n)=>this.applyChannel(i,a,n)}),this.persistence={...ne(),get destination(){return o.destination()}},o.readSiteLiterals&&(this.instances=this.creationSiteInstances(o)))}sceneRef;projector;watchedForStructure=new Set;changedStructureRoots=new Set;structureRefreshQueued=!1;disposed=!1;crossSurfaceStructureRevision=0;hasCrossSurfaceStructure=!1;identity;persist;loop;frameControl;instanceLiterals=new Map;instanceLiteralRequests=new Map;markedBodies=fe(t=>{const e=this.objectOf(t);if(!e)return{kind:"unresolved"};const r=F(e);return r?{kind:"body",body:r}:{kind:"no-body"}});bodyOwnershipByObject=new WeakMap;physicsFor(t){const e=R();return e&&P(e,t)!=="unresolved"?e:null}edits={};historyResource;editStartState;editBaseline;capabilities={transform:!0,inspectorFields:!0,persist:!1};stories;instances;provenance;persistence;get scene(){return typeof this.sceneRef=="function"?this.sceneRef():this.sceneRef}refresh(){const t=this.projector.project(this.scene);return this.refreshCrossSurfacePresence(),this.crossSurfaceStructureRevision++,t}crossSurfaceStructureSignature(){return this.hasCrossSurfaceStructure?String(this.crossSurfaceStructureRevision):null}objectCarriesCrossSurfaceStructure(t){return m(t,"authoringHierarchyId")!==void 0||m(t,"authoringHierarchyParentId")!==void 0||m(t,"authoringHierarchyOrder")!==void 0}subtreeCarriesCrossSurfaceStructure(t){let e=!1;return t.traverse(r=>{this.objectCarriesCrossSurfaceStructure(r)&&(e=!0)}),e}refreshCrossSurfacePresence(){this.hasCrossSurfaceStructure=!1;for(const t of this.projector.nodes.values())if(this.objectCarriesCrossSurfaceStructure(t.object)){this.hasCrossSurfaceStructure=!0;return}}onStructureChanged=t=>{T(t.child)||this.disposed||(this.changedStructureRoots.add(t.child),!this.structureRefreshQueued&&(this.structureRefreshQueued=!0,queueMicrotask(()=>{if(this.structureRefreshQueued=!1,this.disposed)return;const e=[...this.changedStructureRoots];this.changedStructureRoots.clear();const r=e.some(o=>this.subtreeCarriesCrossSurfaceStructure(o));for(const o of e)this.unwatchStructureSubtree(o);const s=this.projector.projectSubtrees(this.scene,e);if(s===null)this.refresh(),this.watchStructure();else for(const o of e)this.structureRootIsAttached(o)&&this.watchStructureSubtree(o);r&&(this.refreshCrossSurfacePresence(),this.crossSurfaceStructureRevision++),this.syncAdoptedObjectMap(s??void 0),this.store.notifyIngestObjectMapEdit(s===null?void 0:{changedParentIds:s.changedParentIds,rootsChanged:s.rootsChanged,addedIds:s.addedIds,removedIds:s.removedIds})})))};watchStructure(){for(const e of this.watchedForStructure)e.removeEventListener("childadded",this.onStructureChanged),e.removeEventListener("childremoved",this.onStructureChanged);this.watchedForStructure.clear();const t=this.scene;t&&this.watchStructureSubtree(t)}watchStructureSubtree(t){const e=r=>{if(!(T(r)||this.watchedForStructure.has(r))){r.addEventListener("childadded",this.onStructureChanged),r.addEventListener("childremoved",this.onStructureChanged),this.watchedForStructure.add(r);for(const s of r.children)e(s)}};e(t)}structureRootIsAttached(t){const e=this.scene;if(e===null)return!1;for(let r=t;r!==null;r=r.parent)if(r===e)return!0;return!1}unwatchStructureSubtree(t){t.traverse(e=>{this.watchedForStructure.delete(e)&&(e.removeEventListener("childadded",this.onStructureChanged),e.removeEventListener("childremoved",this.onStructureChanged))})}syncAdoptedObjectMap(t){const e=this.scene;if(!e||this.store.scene!==e)return;const r=this.store.objectMap;if(t===void 0){r.clear();for(const[o,i]of this.projector.objectMapSnapshot())r.set(o,i)}else{for(const o of t.removedIds)r.delete(o);for(const o of t.addedIds){const i=this.projector.objectOf(o);i!==null&&r.set(o,i)}}const s=[...this.store.shell.selectedEntityIds].filter(o=>r.has(o));s.length!==this.store.shell.selectedEntityIds.size&&this.store.shell.selectMultiple(s)}invalidate(){this.refresh()}adoptScene(t){this.sceneRef=t,this.refresh(),this.watchStructure(),this.syncAdoptedObjectMap()}objectOf(t){return this.projector.objectOf(t)}objectMapSnapshot(){return this.projector.objectMapSnapshot()}record(t,e){this.edits[t]={...this.edits[t],...e}}toEditorNode(t){const e=t.object,r=m(e,"authoringHierarchyId"),s=m(e,"authoringHierarchyParentId"),o=m(e,"authoringHierarchyOrder"),i=ee(e)&&m(e,"authoringRoot")!==!0,a=m(e,"authoringComponent"),n=(i?m(e,"authoringLabel"):void 0)||e.name||e.type;return{id:t.id,label:n,role:i?"component":"entity",kind:ue(e),typeLabel:i?a||n:e.type,parentId:t.parentId,childIds:[...t.childIds],...r===void 0?{}:{crossSurfaceId:r},...s===void 0?{}:{crossSurfaceParentId:s},...o===void 0?{}:{crossSurfaceOrder:o}}}hierarchy={crossSurfaceStructureSignature:()=>this.crossSurfaceStructureSignature(),roots:()=>this.projector.rootNodes().map(t=>this.toEditorNode(t)),node:t=>{const e=this.projector.node(t);return e?this.toEditorNode(e):null},object3D:t=>this.objectOf(t),idForObject3D:t=>this.projector.idOf(t)};selection={get:()=>[...this.store.shell.selectedEntityIds],set:t=>this.store.shell.selectMultiple(t),resolve:(t,e)=>{const r=this.hierarchy.node(t);if(!r)return null;const s=[];let o=r,i=0;for(;o&&i++<1e3;)(o.role==="component"||o.role==="instance")&&s.push(o),o=o.parentId?this.hierarchy.node(o.parentId):null;const a=s.reverse();if(a.length===0)return{id:t};const n=e?.scopeId?a.findIndex(u=>u.id===e.scopeId):-1,c=n>=0?Math.min(n+1,a.length-1):0,h=e?.intent==="deep"?Math.min(c+1,a.length-1):c;return{id:a[h].id}}};pickable={pick:(t,e)=>(this.refresh(),this.projector.pick(this.store,t,e)),candidates:(t,e)=>(this.refresh(),this.projector.candidates(this.store,t,e))};truth={resolve:(t,e)=>{const r=this.anchorFor(t,e);return{site:r.anchor,writeAnchorKind:r.anchorKind}}};related=re(t=>this.truth.resolve(t,"position").site);transforms={get:t=>le(this.objectOf(t)),editability:(t,e)=>{if(!this.objectOf(t))return{writable:!1,reason:G};const r=N();return r?.networkId(t)&&!r.editable(t)?{writable:!1,reason:"This transform is controlled by remote or server network authority."}:this.bodyOwns(t)?{writable:!0,reason:"Moves the physics body that owns this node.",...this.removableFlag(t,e)}:this.frameControl==="host"&&this.store.shell.playState==="playing"?{writable:!0,reason:Oe,...this.removableFlag(t,e)}:this.persist?{writable:!0,reason:this.persist.describe(this.anchorFor(t,e)),...this.removableFlag(t,e)}:{writable:!0}},beginEdit:t=>{this.historyResource?.assertCanMutate(),!(!this.objectOf(t)||!this.editableByNetwork(t))&&(this.loop?.pause(),this.physicsFor(t)?.freeze(t),this.markedBodies.freeze(t),this.editStartState=this.persist?this.captureHistoryState():void 0,this.editBaseline=void 0)},apply:(t,e)=>{!this.objectOf(t)||!this.editableByNetwork(t)||(this.persist&&!this.editBaseline&&(this.editBaseline=this.captureChannelBaseline(t)),this.writeTransform(t,e),this.physicsFor(t)?.commit(t,e),this.markedBodies.commit(t,e),this.store.shell.notifyIngestEdit())},endEdit:t=>{this.loop?.resume();const e=this.objectOf(t),r=`Transform ${e?.name||"Object"}`,s=this.editStartState,o=this.editBaseline;return this.editStartState=void 0,this.editBaseline=void 0,e&&(this.physicsFor(t)?.unfreeze(t),this.markedBodies.unfreeze(t),this.store.shell.notifyIngestEdit()),this.persist?this.persistOrJournal(t,r,s,o):void 0},remove:(t,e)=>{if(this.persist?.removal)return U(this.pipedRemove(t,e))}};removableFlag(t,e){const r=this.persist?.removal;return r?r.available(this.anchorFor(t,e))?{removable:!0}:{}:{}}pipedRemove(t,e){const r=this.persist,s=r.removal,o=`Remove ${this.objectOf(t)?.name||"Object"} ${e}`;return{resolve:()=>{const i=this.anchorFor(t,e);return s.available(i)?i.anchorKind==="live-only"?L(r.describe(i)):{reaches:"writer",anchorKind:i.anchorKind,destination:r.destination(),write:()=>s.perform({...i,label:o})}:L(r.describe(i))},record:()=>{},report:i=>{r.armed()&&r.report(o,i)}}}bodyOwns(t){const e=this.objectOf(t);if(!e)return!1;const r=this.bodyOwnershipByObject.get(e);if(r!==void 0)return r;const s=R(),o=s?P(s,t):void 0;if(o==="physics")return this.bodyOwnershipByObject.set(e,!0),!0;const i=F(e)!==void 0;return(i||o==="editor")&&this.bodyOwnershipByObject.set(e,i),i}editableByNetwork(t){const e=N();return e?e.editable(t):!0}inspector={properties:t=>{const e=this.objectOf(t);if(!e)return[];const r=[{path:"name",label:"Name",type:"string"},{path:"visible",label:"Visible",type:"boolean"},{path:"object.type",label:"Native type",type:"string",readonly:!0}],s=H(e);return s?.fields&&r.push(...s.fields().filter(i=>!["name","visible"].includes(i.path)).map(({value:i,...a})=>a)),y(e)&&r.push({path:"material.color",label:"Color",type:"color",group:"Material"}),p(e)&&(r.push({path:"light.intensity",label:"Intensity",type:"number"}),r.push({path:"light.color",label:"Light Color",type:"color"}),g(e)&&r.push({path:"light.distance",label:"Distance",type:"number"}),ke(e)&&r.push({path:"shadow.cast",label:"Cast Shadow",type:"boolean"})),b(e)&&(r.push({path:"camera.fov",label:"FOV",type:"number"}),r.push({path:"camera.near",label:"Near",type:"number"}),r.push({path:"camera.far",label:"Far",type:"number"})),B(e)&&(r.push({path:"mesh.vertices",label:"Vertices",type:"number",readonly:!0}),r.push({path:"shadow.cast",label:"Cast Shadow",type:"boolean"}),r.push({path:"shadow.receive",label:"Receive Shadow",type:"boolean"})),r},get:(t,e)=>{const r=this.objectOf(t);if(!r)return;if(e==="name")return r.name;if(e==="visible")return r.visible;if(e==="object.type")return r.type;const s=H(r)?.fields?.().find(o=>o.path===e);if(s)return s.value();if(e==="material.color"){const o=y(r);return o?`#${o.color.getHexString()}`:void 0}if(e==="light.intensity")return p(r)?.intensity;if(e==="light.distance")return g(r)?.distance;if(e==="light.color"){const o=p(r);return o?`#${o.color.getHexString()}`:void 0}if(e==="camera.fov")return b(r)?.fov;if(e==="camera.near")return b(r)?.near;if(e==="camera.far")return b(r)?.far;if(e==="mesh.vertices"){const o=B(r);return o?o.getAttribute("position")?.count??0:void 0}if(e==="shadow.cast")return r.castShadow;if(e==="shadow.receive")return r.receiveShadow},set:(t,e,r)=>{if(this.historyResource?.assertCanMutate(),!this.persist){this.writeProp(t,e,r);return}const s=this.captureHistoryState(),o=this.readChannel(t,e);this.writeProp(t,e,r);const i=`Set ${this.objectOf(t)?.name||"Object"} ${e}`,a=this.readChannel(t,e);if(!(o!==void 0&&a!==void 0&&JSON.stringify(o)!==JSON.stringify(a))){this.recordHistory(i,s);return}return x({backend:this.persist,subject:()=>this.anchorFor(t,e),baseline:o,next:a,label:i,journal:()=>this.recordHistory(i,s)})}};subscribe(t){return this.store.shell.subscribe(t)}dispose(){this.disposed=!0;for(const t of this.watchedForStructure)t.removeEventListener("childadded",this.onStructureChanged),t.removeEventListener("childremoved",this.onStructureChanged);this.watchedForStructure.clear(),this.changedStructureRoots.clear(),this.historyResource?.dispose(),this.persist?.dispose()}readChannel(t,e){const r=this.objectOf(t);if(r)return e==="position"?r.position.toArray():e==="rotation"?[r.rotation.x,r.rotation.y,r.rotation.z]:e==="scale"?r.scale.toArray():this.inspector.get(t,e)}applyChannel(t,e,r){const s=this.objectOf(t);if(s){if(e==="position"&&Array.isArray(r))s.position.fromArray(r);else if(e==="rotation"&&Array.isArray(r)){const[o,i,a]=r;s.rotation.set(o??0,i??0,a??0)}else if(e==="scale"&&Array.isArray(r))s.scale.fromArray(r);else{this.writeProp(t,e,r);return}this.store.shell.notifyIngestEdit()}}writeTransform(t,e){this.historyResource?.assertCanMutate();const r=this.objectOf(t);r&&(r.position.set(e.position[0],e.position[1],e.position[2]),r.quaternion.set(e.rotation[0],e.rotation[1],e.rotation[2],e.rotation[3]),r.scale.set(e.scale[0],e.scale[1],e.scale[2]),this.record(t,{position:e.position,rotation:e.rotation,scale:e.scale}))}writeProp(t,e,r){const s=this.objectOf(t);if(s){if(e==="name")s.name=String(r);else if(e==="visible")s.visible=!!r,this.record(t,{visible:s.visible});else if(e==="material.color"){const o=y(s);o&&(o.color.set(String(r)),this.record(t,{color:`#${o.color.getHexString()}`}))}else if(e==="light.intensity"){const o=p(s);o&&(o.intensity=Number(r))}else if(e==="light.distance"){const o=g(s);o&&(o.distance=Number(r))}else if(e==="light.color")p(s)?.color.set(String(r));else if(e==="camera.fov"||e==="camera.near"||e==="camera.far"){const o=b(s);o&&(o[e.split(".")[1]]=Number(r),o.updateProjectionMatrix())}else e==="shadow.cast"?s.castShadow=!!r:e==="shadow.receive"&&(s.receiveShadow=!!r);this.store.shell.notifyIngestEdit()}}anchorFor(t,e){const r=this.objectOf(t),s=J(e),o=r&&s?.owner==="material"?y(r):r,i=s?.owner==="material"?te(o):C(o),a=i?this.persist?.anchor?.(i):null;if(a){const h=i?this.persist?.physicsPlaced?.(i,e):!1;return{entityId:t,property:e,anchor:a,anchorKind:h?"physics-binding":"source-prop",instances:1,sourceOid:i}}const n=ae(o);if(n!==null)return{entityId:t,property:e,anchor:ce(n),anchorKind:"data-record",instances:1,...i?{sourceOid:i}:{}};const c=i?this.options.sourceAnchor?.(i)??{anchored:!1,reason:"The source index has not resolved this object’s OID."}:Q(o??null);return{entityId:t,property:e,anchor:c,anchorKind:i?this.persist?.anchor?"source-prop":"live-only":c.anchored?"construction-literal":"live-only",instances:c.anchored&&c.kind==="source"?i?1:Y(c):0,...i?{sourceOid:i}:{}}}measureWriteReach(){this.refresh();let t=0;const e=Z();for(const r of this.projector.nodes.keys()){const s=this.anchorFor(r,"position");e[s.anchorKind]++,s.anchor.anchored&&t++}return{addressable:t,total:this.projector.nodes.size,destination:this.persist?.destination()??E,byKind:e}}captureChannelBaseline(t){const e=this.objectOf(t);if(e)return{position:e.position.toArray(),rotation:[e.rotation.x,e.rotation.y,e.rotation.z],scale:e.scale.toArray()}}persistOrJournal(t,e,r,s){const o=this.persist;if(!o)return;const i=s?this.captureChannelBaseline(t):void 0,a=s&&i?Object.keys(s).filter(c=>JSON.stringify(s[c])!==JSON.stringify(i[c])):[];a.length>1&&o.report(e,se(a));const n=a.length===1?a[0]:null;if(n===null){this.recordHistory(e,r);return}return x({backend:o,subject:()=>this.anchorFor(t,n),baseline:s[n],next:i[n],label:e,journal:()=>this.recordHistory(e,r)})}creationSiteKey(t){const e=t.anchor;return e.anchored&&e.kind==="source"?`${e.file}:${e.line}:${e.col}`:null}instancePropertyPaths(t,e){const r=["position","rotation","scale",...this.inspector.properties(t).filter(s=>!s.readonly).map(s=>s.path)];return[...new Set(r)].filter(s=>this.creationSiteKey(this.anchorFor(t,s))===e)}loadInstanceLiterals(t,e,r,s){const o=this.instanceLiteralRequests.get(s);if(o)return o;const i=this.instancePropertyPaths(e,s).map(n=>({property:n,live:this.readChannel(e,n)})).filter(n=>n.live!==void 0),a=t.readSiteLiterals({anchor:r.anchor,instances:r.instances,writeScope:"creation-site",properties:i}).then(n=>(this.instanceLiterals.set(s,n),this.store.shell.notifyIngestEdit(),n));return this.instanceLiteralRequests.set(s,a),a}sameInstanceValue(t,e){return Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((r,s)=>this.sameInstanceValue(r,e[s])):typeof t=="number"&&typeof e=="number"?Math.abs(t-e)<=1e-6:t===e}instanceComponentName(t){return t.constructor.name||t.type}instanceCountLabel(t){return`${t} ${t===1?"instance":"instances"}`}instanceOverride(t,e,r,s,o){const i=s[r],a=this.readChannel(e,r);if(!i||i.literal===null||a===void 0||this.sameInstanceValue(i.literal,a))return null;const n=t.gate({...this.anchorFor(e,r),writeScope:"creation-site"}),c=i.writable?n.ok?void 0:n.reason:i.reason,h=this.inspector.properties(e).find(u=>u.path===r)?.label??r;return{path:r,label:h,value:a,...i.text?{defaultText:i.text}:{},canApplyToComponent:c===void 0,...c?{applyUnavailableReason:c}:{},affectedInstanceCount:o.instances}}async applyInstanceDefault(t,e,r,s){const o={...this.anchorFor(r,s),writeScope:"creation-site"},i=this.creationSiteKey(o);if(!i)return{changed:!1,message:"This object has no source site."};const a=this.objectOf(r);if(!a)return{changed:!1,message:"This object is no longer in the live world."};const n=(await e(r,o,i))[s];if(!n)return{changed:!1,message:`The construction site names no ${s}.`};if(n.literal===null)return{changed:!1,message:`The construction site names no ${s} default.`};const c=this.readChannel(r,s);if(c===void 0)return{changed:!1,message:`${s} has no live value.`};if(!n.writable)return{changed:!1,message:n.reason??`${s} cannot be rewritten.`};const h=t.gate(o);if(!h.ok)return{changed:!1,message:h.reason};const u=o.instances,d=`Apply ${s} to ${this.instanceComponentName(a)} default (${this.instanceCountLabel(u)})`;if(!await t.write({...o,baseline:n.literal,next:c,label:d}))return{changed:!1,message:`${d} did not land; the console names why.`};this.instanceLiterals.delete(i),this.instanceLiteralRequests.delete(i),this.store.shell.notifyIngestEdit();const w=o.anchor.anchored?o.anchor.display:"this source site";return{changed:!0,message:`${s} now applies to all ${this.instanceCountLabel(u)} from ${w}.`,write:{destination:w,persisted:!0}}}creationSiteInstances(t){const e=async(r,s,o)=>this.instanceLiterals.get(o)??this.loadInstanceLiterals(t,r,s,o);return{describe:r=>{const s=this.anchorFor(r,"position"),o=this.creationSiteKey(s),i=this.objectOf(r);if(!o||!i)return null;const a=this.instanceLiterals.get(o);if(!a)return this.loadInstanceLiterals(t,r,s,o),null;if(Object.keys(a).length===0)return null;const n=this.instancePropertyPaths(r,o).map(c=>this.instanceOverride(t,r,c,a,s)).filter(c=>c!==null);return{componentName:this.instanceComponentName(i),...s.anchor.anchored?{sourcePath:s.anchor.display}:{},overrides:n}},revert:async(r,s)=>{const o=this.anchorFor(r,"position"),i=this.creationSiteKey(o);if(!i)return;const a=await e(r,o,i),n=this.captureHistoryState();let c=0;for(const h of s){const u=a[h]?.literal;u!=null&&(this.applyChannel(r,h,u),c++)}return c>0&&this.recordHistory(`Revert ${c} instance override(s)`,n),c>0?q:void 0},applyToComponent:(r,s)=>this.applyInstanceDefault(t,e,r,s)}}recordHistory(t,e){!this.historyResource||!e||this.historyResource.record(t,e,this.captureHistoryState()).catch(r=>{v.error(`[ingest] failed to journal "${t}" into project history — the edit is applied but has no history entry (it cannot be undone): ${r instanceof Error?r.message:String(r)}`)})}captureHistoryState(){const t={};for(const[e,r]of this.projector.nodes){const s=r.object,o=y(s),i=p(s),a=b(s);t[e]={name:s.name,visible:s.visible,transform:this.transforms.get(e),...o?{color:`#${o.color.getHexString()}`}:{},...i?{lightIntensity:i.intensity,lightColor:`#${i.color.getHexString()}`,...g(s)?{lightDistance:g(s).distance}:{}}:{},...a?{camera:{fov:a.fov,near:a.near,far:a.far}}:{},castShadow:s.castShadow,receiveShadow:s.receiveShadow}}return{edits:structuredClone(this.edits),objects:t}}restoreHistoryState(t){for(const[e,r]of Object.entries(t.objects)){const s=this.objectOf(e);if(!s)continue;s.name=r.name,s.visible=r.visible,s.position.fromArray(r.transform.position),s.quaternion.fromArray(r.transform.rotation),s.scale.fromArray(r.transform.scale),this.physicsFor(e)?.commit(e,r.transform),this.markedBodies.commit(e,r.transform),r.color&&y(s)?.color.set(r.color);const o=p(s);if(o&&(r.lightIntensity!==void 0&&(o.intensity=r.lightIntensity),r.lightColor&&o.color.set(r.lightColor),r.lightDistance!==void 0)){const a=g(s);a&&(a.distance=r.lightDistance)}const i=b(s);i&&r.camera&&(i.fov=r.camera.fov,i.near=r.camera.near,i.far=r.camera.far,i.updateProjectionMatrix()),s.castShadow=r.castShadow,s.receiveShadow=r.receiveShadow}this.edits=structuredClone(t.edits),this.store.shell.notifyIngestEdit()}}function Je(l,t,e){return new A(l,t,{identity:de({camera:e.camera}),journal:e.journal,persistence:oe({history:l.shell.projectHistory,writer:e.sourceWriter}),loop:e.loop,...e.frameControl?{frameControl:e.frameControl}:{},provenance:Ce})}function Ke(l,t,e){return new A(l,t,{identity:D(e.worldId,{camera:e.camera}),journal:e.journal,persistence:Se({history:l.shell.projectHistory,backend:e.backend}),loop:e.loop,...e.frameControl?{frameControl:e.frameControl}:{},provenance:Ie,sourceDeclaresStories:!0})}function Ve(l,t,e,r,s={}){return new A(l,t,{identity:D(e),journal:r,frameControl:"host",sourceAnchor:s.sourceAnchor,...s.explicitSourceCommit?{sourceCommit:we({history:l.shell.projectHistory,...s.backend?{backend:s.backend}:{}})}:{}})}export{Ke as a,Ve as o,De as r,Je as s};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/r3f-design-session-DbA50oqd.js","assets/index-r-FuctN5.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/edit-mode-authoring-z2Uu4CrX.js","assets/game-network-BZdvwJ0a.js","assets/index-OZVqp6xS.js","assets/index-Da9JhEvW.js","assets/native-debug-module-C5xRtrQJ.js","assets/native-entry-surface-BE8LJNdu.js","assets/debug-registry-BosYnV_Z.js","assets/contract-system-adapters-C66CNkAk.js","assets/game-contract-seams-DQGwjObL.js","assets/seeded-random-BTqVP8Ii.js","assets/game-audio-BeCyd0Ha.js","assets/rapier-physics-adapter-CaZqWLu0.js","assets/events-156d8d12.esm-CYeuVCYr.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/index-bQE2NA0D.js","assets/live-project-verbs-BnaccVli.js","assets/capability-coverage-6PwUP4oX.js","assets/json-history-resource-DuT7scib.js","assets/binding-resolver-BcV7It57.js","assets/adapter-surface-Y37Nzcyw.js","assets/structural-signature-Dc7skRiy.js","assets/webgl-frame-capture-DdJkM2mi.js","assets/realm-services-CsCNzgGK.js","assets/canvas-entry-runtime-Dcf218s2.js","assets/three-ingest-runtime-CzLs2nNM.js","assets/EffectComposer-BEAt0PtQ.js","assets/CopyShader-BzTUYzf6.js","assets/ShaderPass-DTnDQXm0.js","assets/Pass-D1MRT672.js","assets/CSS3DRenderer-BsAqfavI.js","assets/relative-path-guard-GiM7Lsz8.js","assets/react-root-BHA-cdrW.js","assets/editor-presentation-activity-CqJH4G9t.js","assets/active-ingest-Ddr-rqpl.js","assets/ingest-source-persistence-BwINDLYc.js","assets/pixi-story-model-DNkfnWUV.js","assets/surface-content-Dg9Kkazf.js","assets/viewport-root-presentation-PTTfkoRf.js","assets/mounted-authoring-DKn1UEnI.js","assets/entity-object-BO1_Qmt8.js","assets/user-data-CPxKRceo.js","assets/workspace-arrangement-BOOvdRY-.js","assets/three-contract-Dkt6PmWY.js","assets/three-BGqB-uVq.js","assets/editor-layers-CSl6S15k.js","assets/component-instance-root-9er-zSAY.js","assets/viewport-editor-controls-BYaAZ_Ku.js","assets/three-authoring-adapter-BO7jI7-8.js","assets/source-persistence-backend-Con5sRZv.js","assets/three-projection-core-CFyOC4Fp.js","assets/body-marks-C1LxJtQb.js","assets/user-data-CODoGZqA.js","assets/object-marks-BnvSuCTt.js","assets/structural-ids-BOo2BRoY.js","assets/object3d-authoring-subject-XccsO0xG.js","assets/r3f-physics-binding-yDE4SctS.js","assets/deferred-ingest-play-BOUu0VgE.js","assets/rrweb-Cd2ifIRP.js","assets/react-world-authoring-adapter-CwnR93ZA.js","assets/board-guides-CLF_VLvL.js","assets/relative-import-specifier-DGpgcbeS.js","assets/story-arg-descriptors-Ek86ExX7.js","assets/inspect-sYciyXgK.js","assets/inference-diagnostics-D4Iu86es.js","assets/writer-tw6EcuVO.js","assets/three-state-z8gBcifl.js","assets/editor-shell-store-DTfKHHYD.js","assets/output-pass-HurwNl0G.js","assets/viewport-door-K-5DUW7m.js","assets/game-surface-defaults-D8S4cRxi.js","assets/scene-framing-BxVkSlg3.js","assets/assets-BcrMQHRv.js","assets/loader-BTUKnX5Q.js","assets/KTX2Loader-CaqVE6nY.js","assets/GLTFLoader-KeoruJgS.js","assets/BufferGeometryUtils-B22h7jo4.js","assets/create-runtime-B2p75b5q.js","assets/binding-Bmxqznjk.js","assets/root-stacking-BEd9ZvxC.js","assets/setup-renderer-B2da1u8k.js","assets/index-DHhMOs_s.js","assets/defaults-DKiBJCPN.js","assets/render-settings-CergIZPU.js","assets/render-features-BjJcszQ2.js","assets/loop-gate-report-N52EWFGD.js","assets/system-slot-E2mEdiih.js","assets/performance-profiler-CMbwGBuk.js","assets/live-gesture-lock-DJbrjOqf.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as s,aF as n}from"./index-r-FuctN5.js";import{r as a}from"./design-time-mount-registry-DUpXCg1U.js";import{q as c}from"./edit-mode-authoring-z2Uu4CrX.js";import{a as u}from"./json-history-resource-DuT7scib.js";import{o as h}from"./three-authoring-adapter-BO7jI7-8.js";import{t as i}from"./editor-shell-store-DTfKHHYD.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"./component-instance-root-9er-zSAY.js";import"./user-data-CPxKRceo.js";import"./workspace-arrangement-BOOvdRY-.js";import"./source-persistence-backend-Con5sRZv.js";import"./ingest-source-persistence-BwINDLYc.js";import"./three-projection-core-CFyOC4Fp.js";import"./editor-layers-CSl6S15k.js";import"./three-BGqB-uVq.js";import"./entity-object-BO1_Qmt8.js";import"./three-contract-Dkt6PmWY.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three.core-3arARmh6.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"./rapier-physics-adapter-CaZqWLu0.js";import"./r3f-physics-binding-yDE4SctS.js";import"./output-pass-HurwNl0G.js";import"./three.module-BLhyNg0e.js";import"./Pass-D1MRT672.js";const U="workspace.service";function X(){const r=s(()=>import("./r3f-design-session-DbA50oqd.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,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99]));r.catch(()=>{});const m=n("three",(t,o)=>h(i(t),()=>i(t).scene,o,u(o))),e=a({kind:"three",owner:"@volter/editor-game/three/three-authoring",async mountWorldRootSession(t){const o=t,{mountR3FDesignSession:p}=await r;return p(o.store,o.composite,o.renderer)}});return c(),()=>{e(),m()}}export{U as point,X as start};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{T as n}from"./three.module-BLhyNg0e.js";import{EffectComposer as i}from"./EffectComposer-BEAt0PtQ.js";import{CSS3DRenderer as s}from"./CSS3DRenderer-BsAqfavI.js";import{X as m,Y as c}from"./index-
|
|
1
|
+
import{T as n}from"./three.module-BLhyNg0e.js";import{EffectComposer as i}from"./EffectComposer-BEAt0PtQ.js";import{CSS3DRenderer as s}from"./CSS3DRenderer-BsAqfavI.js";import{X as m,Y as c}from"./index-r-FuctN5.js";const a={three:n,EffectComposer:i,CSS3DRenderer:s};let r=null;async function f(){const e=await import(c),t=["projectThree","EffectComposer","CSS3DRenderer"].filter(o=>e[o]===void 0||e[o]===null);if(t.length>0)throw new Error(`The packaged runtime's synthetic three-ingest module did not export ${t.join(", ")} — see vite-plugin-module-doorways.ts.`);return{three:e.projectThree,EffectComposer:e.EffectComposer,CSS3DRenderer:e.CSS3DRenderer}}async function h(){return await m()?(r||(r=f()),r):a}export{h as r};
|
|
@@ -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-BXVB2CCJ.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-D1bPiejF.js";import{g as W}from"./user-data-Mb2RP3n0.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-cXQYT6FJ.js";import{c as kt,a as Te}from"./object3d-document-session-registry-BDr1NgeR.js";import{t as j}from"./three-state-2djt5OHj.js";import{a as q}from"./entity-object-CvJ7cBnl.js";import{i as ke,c as It}from"./hierarchy-marks-CDIrCtK7.js";import{a as Ot}from"./component-instance-root-B5BfGdnt.js";import{a as xt}from"./three-contract-Dkt6PmWY.js";import{t as V}from"./editor-shell-store-DToX9C1w.js";import{d as Dt,a as U,b as Rt}from"./viewport-door-DeUzmAvD.js";import{a as jt}from"./content-bounds-B1oiinxO.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-B-UHTAVy.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-BBUepvqt.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-BQE2Andh.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-BuH5TXMy.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-BDA_oS8p.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-DjGu7n7g.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-B7gtucKj.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-Dov33U4p.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-CKQ1KIx8.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-BF3ci_zZ.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-BF6EI6Uu.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-BF6EI6Uu.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-CJtqQ2wH.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-BZ-bqJjM.js","assets/jsx-runtime-DPjLkJKQ.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/Object3DPreview-CWZeky9X.js","assets/index-r-FuctN5.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-Cck2dsj4.js","assets/editor-layers-CSl6S15k.js","assets/workspace-arrangement-BOOvdRY-.js","assets/renderer-ownership-BovSEcLv.js","assets/hierarchy-marks-B4XzZe8e.js","assets/studio-environment-CLaX3ria.js","assets/user-data-CPxKRceo.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-DSDxaYgd.js","assets/StageHost-BHQB10fP.js","assets/three-state-z8gBcifl.js","assets/editor-shell-store-DTfKHHYD.js","assets/output-pass-HurwNl0G.js","assets/Pass-D1MRT672.js","assets/entity-object-BO1_Qmt8.js","assets/three-contract-Dkt6PmWY.js","assets/standard-viewport-dressing-BmMrgEAi.js","assets/content-bounds-DuSmUtY1.js","assets/preview-renderer-BrYNFV1p.js","assets/live-mixers-B-bwLZ7c.js","assets/live-gesture-lock-DJbrjOqf.js","assets/model-inspection-BbRgz6bo.js","assets/three-viewport-presentation-BjXL1Zjv.js","assets/clip-planes-CnAI6DZn.js","assets/three-BGqB-uVq.js","assets/component-instance-root-9er-zSAY.js","assets/viewport-editor-controls-BYaAZ_Ku.js","assets/LineSegments2-DN9pUfWA.js","assets/three.quarks.esm-C_HmSKXo.js","assets/scene-framing-BxVkSlg3.js","assets/object3d-document-session-registry-BGuY8anX.js","assets/source-object3d-authoring-adapter-BKZ8oj3D.js","assets/three-projection-core-CFyOC4Fp.js","assets/viewport-door-K-5DUW7m.js","assets/transport-strip-e122YmzD.js","assets/viewport-surface-status-BTqSVzg2.js","assets/ModelAssetDocument-DXcUg5-F.js","assets/host-hierarchy-objects-BV3WqU2w.js","assets/layered-pick-1v6rbWkT.js","assets/root-stacking-BEd9ZvxC.js","assets/EntityModelDocument-Bbp4eSk-.js","assets/EnvironmentAssetDocument-CHl6PCV6.js","assets/asset-editor-persistence-C8kiK_is.js","assets/LutAssetDocument-D6redjUn.js","assets/index-DHhMOs_s.js","assets/ShaderAssetDocument-BMIhoIDU.js","assets/ColorInput-D6i_QXM-.js","assets/LiveModuleDocument-BRKWZS4J.js","assets/Object3DDocumentViewport-CTE6_O8m.js","assets/QuarksAssetDocument-C2d8g6QR.js","assets/project-provenance-BGnJXJwa.js","assets/InspectorObjectPreview-CkyqYsEo.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-r-FuctN5.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-1v6rbWkT.js";import{g as W}from"./user-data-CPxKRceo.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-DSDxaYgd.js";import{c as kt,a as Te}from"./object3d-document-session-registry-BGuY8anX.js";import{t as j}from"./three-state-z8gBcifl.js";import{a as q}from"./entity-object-BO1_Qmt8.js";import{i as ke,c as It}from"./hierarchy-marks-B4XzZe8e.js";import{a as Ot}from"./component-instance-root-9er-zSAY.js";import{a as xt}from"./three-contract-Dkt6PmWY.js";import{t as V}from"./editor-shell-store-DTfKHHYD.js";import{d as Dt,a as U,b as Rt}from"./viewport-door-K-5DUW7m.js";import{a as jt}from"./content-bounds-DuSmUtY1.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-Cck2dsj4.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-BZ-bqJjM.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-BHQB10fP.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-DXcUg5-F.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-Bbp4eSk-.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-CHl6PCV6.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-D6redjUn.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-BMIhoIDU.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-CWZeky9X.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-BRKWZS4J.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-C2d8g6QR.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-C2d8g6QR.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-CkyqYsEo.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-qc8Reb1Y.js";import"./index-r-FuctN5.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-1v6rbWkT.js";import"./root-stacking-BEd9ZvxC.js";import"./user-data-CPxKRceo.js";import"./workspace-arrangement-BOOvdRY-.js";import"./model-thumbnail-DSDxaYgd.js";import"./studio-environment-CLaX3ria.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./object3d-document-session-registry-BGuY8anX.js";import"./three-state-z8gBcifl.js";import"./editor-shell-store-DTfKHHYD.js";import"./output-pass-HurwNl0G.js";import"./Pass-D1MRT672.js";import"./editor-layers-CSl6S15k.js";import"./entity-object-BO1_Qmt8.js";import"./three-contract-Dkt6PmWY.js";import"./hierarchy-marks-B4XzZe8e.js";import"./component-instance-root-9er-zSAY.js";import"./viewport-door-K-5DUW7m.js";import"./content-bounds-DuSmUtY1.js";import"./asset-preview-Cck2dsj4.js";import"./bitmap-label-Ct4k6ehY.js";const Q="workspace.service";function R(){return r()}export{Q as point,R as start};
|