@volter/game-editor 0.5.154 → 0.5.155

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.
Files changed (294) hide show
  1. package/BUNDLED_NOTICES +22 -22
  2. package/catalog/entries/blender.json +2 -2
  3. package/catalog/entries/music.json +2 -2
  4. package/dist/.vite/manifest.json +2129 -2129
  5. package/dist/assets/{AssetBudgetPanel-VWgpnuIc.js → AssetBudgetPanel-B2Wb7-b1.js} +3 -3
  6. package/dist/assets/{AudioViewer-DfHCf1lW.js → AudioViewer-gge--M-h.js} +1 -1
  7. package/dist/assets/{CanvasBoardDocument-CX4PNJyw.js → CanvasBoardDocument-CyGiXrEJ.js} +1 -1
  8. package/dist/assets/{CanvasSceneViewport-CQfbmxpt.js → CanvasSceneViewport-ChG9oRS8.js} +1 -1
  9. package/dist/assets/{ColorInput-BlrT435I.js → ColorInput-Dzpqy-J3.js} +1 -1
  10. package/dist/assets/{ColorPicker-Cd-YIyWU.js → ColorPicker-CqJPBHlh.js} +1 -1
  11. package/dist/assets/{EntityModelDocument-BmKOcswo.js → EntityModelDocument-D7XDf6uB.js} +1 -1
  12. package/dist/assets/{EnvironmentAssetDocument-BEuthcGj.js → EnvironmentAssetDocument-BgO7Hl3g.js} +1 -1
  13. package/dist/assets/{GameplaySessionTimeline-BN2umpRb.js → GameplaySessionTimeline-BBmwHCKA.js} +1 -1
  14. package/dist/assets/{ImageViewer-D9hKvFKP.js → ImageViewer-BjxoscVa.js} +1 -1
  15. package/dist/assets/InspectorObjectPreview-C87CasN_.js +1 -0
  16. package/dist/assets/{JsonAssetDocument-DMhiFUNl.js → JsonAssetDocument-D81JuRAm.js} +1 -1
  17. package/dist/assets/{LiveModuleDocument-ChrbfWzt.js → LiveModuleDocument-bgStMiU1.js} +1 -1
  18. package/dist/assets/{LutAssetDocument-D5cdrT07.js → LutAssetDocument-cl9Jq0Zw.js} +1 -1
  19. package/dist/assets/{ModelAssetDocument-Dh2Yp-5_.js → ModelAssetDocument-CYCLKpxJ.js} +1 -1
  20. package/dist/assets/{NonThreeAuthoringBootstrap-5lJjd2ul.js → NonThreeAuthoringBootstrap-DhHjvD5d.js} +1 -1
  21. package/dist/assets/{Object3DDocumentToolbar-DVNZXciL.js → Object3DDocumentToolbar-CQbARBIW.js} +1 -1
  22. package/dist/assets/Object3DDocumentViewport-BpiyRQ5p.js +2 -0
  23. package/dist/assets/{Object3DPreview-hnWxlKV2.js → Object3DPreview-BOZYzjz_.js} +1 -1
  24. package/dist/assets/{OnlineAssetDetail-TlMhKqz-.js → OnlineAssetDetail-DdKHHjxg.js} +1 -1
  25. package/dist/assets/{PlayBar-YdSOe6Mn.js → PlayBar-CAarfEOh.js} +1 -1
  26. package/dist/assets/{QuarksAssetDocument-CmVrkxb8.js → QuarksAssetDocument-GTbawoy7.js} +1 -1
  27. package/dist/assets/{ReactCanvasControls-Co3jjBJY.js → ReactCanvasControls-DIFkxeKv.js} +1 -1
  28. package/dist/assets/{RootSelectionOverlay-DRjJypx0.js → RootSelectionOverlay-Dv_w1D9s.js} +1 -1
  29. package/dist/assets/{ShaderAssetDocument-Bm1FTj5L.js → ShaderAssetDocument-OA-nshNN.js} +1 -1
  30. package/dist/assets/{ShadowEditor-Ah6UaoTL.js → ShadowEditor-Cp1QVCo9.js} +1 -1
  31. package/dist/assets/{SourceAssetViewer-CRp-jbVU.js → SourceAssetViewer-CGGHBzgL.js} +1 -1
  32. package/dist/assets/{StageHost-j9meef5x.js → StageHost-BMgCrIPG.js} +2 -2
  33. package/dist/assets/{StoryPreviewMount-ChfzCbJ3.js → StoryPreviewMount-CyF7FwI7.js} +1 -1
  34. package/dist/assets/{ThreeBoardDocument-DAGUbLlA.js → ThreeBoardDocument-DCJkLWU8.js} +2 -2
  35. package/dist/assets/{ThreeIsolationSceneContent-D48zPEk7.js → ThreeIsolationSceneContent-CxsM-QHW.js} +1 -1
  36. package/dist/assets/{ToolObject3DPreview-DgLF_qu6.js → ToolObject3DPreview-lsAoRxtr.js} +1 -1
  37. package/dist/assets/{Toolbar-B9tUYMZc.js → Toolbar-yvFlRv8R.js} +1 -1
  38. package/dist/assets/{TransientHint-DXKNt-QA.js → TransientHint-Bslncm_l.js} +1 -1
  39. package/dist/assets/{VideoViewer-Bi0Wh21M.js → VideoViewer-Ba-e91kP.js} +1 -1
  40. package/dist/assets/{ViewportShadingMenu-Csmdi4hc.js → ViewportShadingMenu-CgbuQ0e-.js} +1 -1
  41. package/dist/assets/{active-ingest-CmyN258P.js → active-ingest-CJ2U5L1O.js} +2 -2
  42. package/dist/assets/{animation-clock-BC2sWdly.js → animation-clock-CVpGQSVj.js} +1 -1
  43. package/dist/assets/{animation-mixers.service-DQX6SNau.js → animation-mixers.service-CI0K1tfi.js} +1 -1
  44. package/dist/assets/{animation-timeline.utility-CKWv5WpM.js → animation-timeline.utility-Wg6WxkxK.js} +1 -1
  45. package/dist/assets/{asset-budget-asset.menu-Cb9YAl0T.js → asset-budget-asset.menu-BbCBxjLY.js} +1 -1
  46. package/dist/assets/{asset-budget.action-Cgtt8vU9.js → asset-budget.action-CK8h0v1A.js} +1 -1
  47. package/dist/assets/{asset-budget.document-BVkKAZy5.js → asset-budget.document-CYVcDLvH.js} +1 -1
  48. package/dist/assets/{asset-budget.menu-DNkA4on_.js → asset-budget.menu-BcTijQ2R.js} +1 -1
  49. package/dist/assets/{asset-editor-persistence-BBd80LM5.js → asset-editor-persistence-DWp0E8cc.js} +1 -1
  50. package/dist/assets/{asset-loaders-BcvaZp8m.js → asset-loaders-Bo91oPiL.js} +1 -1
  51. package/dist/assets/{asset-preview-DmWBo3u0.js → asset-preview-BUpxsHNd.js} +1 -1
  52. package/dist/assets/{audio-unlock.service-DdLpyfa_.js → audio-unlock.service-CyiXe5qk.js} +1 -1
  53. package/dist/assets/{audio.utility-Py14n_vZ.js → audio.utility-BN4mANCx.js} +1 -1
  54. package/dist/assets/autoplay.service-CKBqjozr.js +1 -0
  55. package/dist/assets/{babylon-authoring-adapter-rHojeSh-.js → babylon-authoring-adapter-C-EAsfMr.js} +1 -1
  56. package/dist/assets/{binding-resolver-4nTdtOpk.js → binding-resolver-DoOAFM2m.js} +2 -2
  57. package/dist/assets/{blender-node-editor.document-GUoOIqO0.js → blender-node-editor.document-BzkGPs0i.js} +1 -1
  58. package/dist/assets/{blender-properties-tab-DFdr0HH9.js → blender-properties-tab-B1ggqOYB.js} +1 -1
  59. package/dist/assets/{blender-runtime-host-B63tuG7j.js → blender-runtime-host-MJZEPwHA.js} +1 -1
  60. package/dist/assets/{blender-runtime-skin-CPgzavkZ.js → blender-runtime-skin-hw-op7Nt.js} +34 -34
  61. package/dist/assets/{blender-runtime.document-BXMq3aHl.js → blender-runtime.document-CvTyAou8.js} +1 -1
  62. package/dist/assets/{blender-screenshot.menu-eE85nOyL.js → blender-screenshot.menu-C4VXpXVa.js} +1 -1
  63. package/dist/assets/{blender-timeline.document-pcpWfAfg.js → blender-timeline.document-BRFDd7JZ.js} +1 -1
  64. package/dist/assets/{blender-uv-editor.document-BALjSW5I.js → blender-uv-editor.document-CM09ITWu.js} +1 -1
  65. package/dist/assets/{blender-version.status-Iy8VtIIH.js → blender-version.status-CPyc_-kA.js} +1 -1
  66. package/dist/assets/{blender.command-B7a7jadi.js → blender.command-ktKz-2Zi.js} +1 -1
  67. package/dist/assets/{board-guides-Cnfvv0uu.js → board-guides-CCiyx8cT.js} +1 -1
  68. package/dist/assets/{bridge.command-BgMolZm1.js → bridge.command-tP5j6w72.js} +3 -3
  69. package/dist/assets/{browserAll-DNmYiuy_.js → browserAll-BSQVVrNG.js} +1 -1
  70. package/dist/assets/{build-player.document-C0_bEcCK.js → build-player.document-BwbBXtF5.js} +1 -1
  71. package/dist/assets/{build-profiles.document-DT2a6gH1.js → build-profiles.document-UiF_BsjE.js} +1 -1
  72. package/dist/assets/{build-progress.status-ycndNYab.js → build-progress.status-Bf5KpnxC.js} +1 -1
  73. package/dist/assets/{build-session-Bhmr1BX8.js → build-session-C4jVDt-u.js} +1 -1
  74. package/dist/assets/{build.action-DxTFOUGG.js → build.action-DP2d1Uhj.js} +1 -1
  75. package/dist/assets/{build.command-DpKOQydG.js → build.command-D5pyNcoj.js} +1 -1
  76. package/dist/assets/{build.header-zCX7El5x.js → build.header-DupBIAOw.js} +1 -1
  77. package/dist/assets/{build.menu-Y4MQiX4G.js → build.menu-DWrKtdoV.js} +1 -1
  78. package/dist/assets/{build.service-DHiSV5PL.js → build.service-qnz73gSX.js} +1 -1
  79. package/dist/assets/{camera-DI8pqzQ3.js → camera-C74U5X7o.js} +1 -1
  80. package/dist/assets/{camera-runtime.inspector-eJ8cyMzk.js → camera-runtime.inspector-B2l34Xhl.js} +1 -1
  81. package/dist/assets/{canvas-design-mount-CAFDbAPl.js → canvas-design-mount-D4M3E1AX.js} +3 -3
  82. package/dist/assets/{canvas-entry-runtime-CgJkCzp_.js → canvas-entry-runtime-CLOuJcgT.js} +2 -2
  83. package/dist/assets/{canvas-preview-frames-DMZo3rqI.js → canvas-preview-frames-CSCcu2sG.js} +1 -1
  84. package/dist/assets/{canvas-story-capture.service-CHnbQ9OT.js → canvas-story-capture.service-onD_xSpQ.js} +2 -2
  85. package/dist/assets/{capability-coverage-BMuTFU_9.js → capability-coverage-EnZ99FoT.js} +1 -1
  86. package/dist/assets/{collaboration-presence-Dqfb6e2Y.js → collaboration-presence-1_UMOAkw.js} +1 -1
  87. package/dist/assets/{collider-WqTqi5FX.js → collider-C6R1tHfa.js} +1 -1
  88. package/dist/assets/{component-board.service-DJYpMxt6.js → component-board.service-BX_2bwX3.js} +2 -2
  89. package/dist/assets/{component-board.service-RgOavG9Y.js → component-board.service-Ckl-5tA4.js} +2 -2
  90. package/dist/assets/{component-board.service-C-ukHwAR.js → component-board.service-Cuf_SXeA.js} +2 -2
  91. package/dist/assets/{component-contracts.service-B-uhvD4S.js → component-contracts.service-rI-rbvDG.js} +1 -1
  92. package/dist/assets/{component-instance-root-Ctbx3vOO.js → component-instance-root-wO1p-rLr.js} +1 -1
  93. package/dist/assets/{component-verbs.command-C07COqiF.js → component-verbs.command-O2bwqmK3.js} +1 -1
  94. package/dist/assets/{component-verbs.service-EKWGRKJg.js → component-verbs.service-BiiQMtJt.js} +1 -1
  95. package/dist/assets/{config-Bzq-GFuV.js → config-dVnV1cxW.js} +2 -2
  96. package/dist/assets/{configurations-BICGR-Zc.js → configurations-8qaUqMH7.js} +1 -1
  97. package/dist/assets/{connection.status-BMAWlexm.js → connection.status-vH9WCDDg.js} +1 -1
  98. package/dist/assets/{constraints.inspector-DQdAuWx-.js → constraints.inspector-C7UjUxPR.js} +1 -1
  99. package/dist/assets/{content-bounds-D_jbMNmm.js → content-bounds-Dl5Y3LLv.js} +1 -1
  100. package/dist/assets/{contract-system-adapters-D8SzcuZo.js → contract-system-adapters-BDUpDoKd.js} +1 -1
  101. package/dist/assets/{coverage.service-DZ4GmnS6.js → coverage.service-IS7Oklo8.js} +1 -1
  102. package/dist/assets/{create-runtime-BKAyWS74.js → create-runtime-Bucz0XVU.js} +1 -1
  103. package/dist/assets/{curve-DNYPUZIO.js → curve-D0Q6TczG.js} +1 -1
  104. package/dist/assets/{data-asset-LAsOyoML.js → data-asset-B0a1y8M-.js} +1 -1
  105. package/dist/assets/{data-ref-CbopN4AX.js → data-ref-dRt2Wi5L.js} +1 -1
  106. package/dist/assets/{debug-bridge-Cx3PFUcu.js → debug-bridge-EhDkhrLX.js} +1 -1
  107. package/dist/assets/{debug-registry-CcTdmLf3.js → debug-registry-B2THKz1v.js} +1 -1
  108. package/dist/assets/{deferred-ingest-play-DsV_qXEP.js → deferred-ingest-play-To3ZratW.js} +2 -2
  109. package/dist/assets/{design-time-canvas-mount-BGmhI2sv.js → design-time-canvas-mount-BnSaRAbS.js} +2 -2
  110. package/dist/assets/{design-time-layers-CyFYxvKE.js → design-time-layers-OMAIxOrv.js} +1 -1
  111. package/dist/assets/{design-time-mount.service-CeT_SfZi.js → design-time-mount.service-Bgr_nCDs.js} +2 -2
  112. package/dist/assets/{design-time-mount.service-Dui8o0rU.js → design-time-mount.service-RFkiqPIn.js} +2 -2
  113. package/dist/assets/{design-time-react-mount-3LQxFo0f.js → design-time-react-mount-BsSBoX7J.js} +1 -1
  114. package/dist/assets/{document-preview-three-BiKoHIJ7.js → document-preview-three-Qni0oVBw.js} +1 -1
  115. package/dist/assets/{dom-authoring-adapter-DBtypFqH.js → dom-authoring-adapter-DsUgOtQy.js} +1 -1
  116. package/dist/assets/{draco3d-CTue-r-D.js → draco3d-DyZllcka.js} +1 -1
  117. package/dist/assets/{edit-mode-audio.service-4vq1g0yL.js → edit-mode-audio.service-CjXNAZEs.js} +1 -1
  118. package/dist/assets/{edit-mode-authoring-CIXoejcH.js → edit-mode-authoring-BDgZD47j.js} +1 -1
  119. package/dist/assets/{edit-mode-networking.service-vseafVn2.js → edit-mode-networking.service-3dUr2g_0.js} +1 -1
  120. package/dist/assets/{editor-api-BboLGD_u.js → editor-api-DTrNJMXL.js} +1 -1
  121. package/dist/assets/{editor-layers-CYVQVJ5O.js → editor-layers-DwaX5UFy.js} +1 -1
  122. package/dist/assets/{editor-shell-store-B76wIXvV.js → editor-shell-store-aKHbAoCV.js} +1 -1
  123. package/dist/assets/{entity-object-C6hm5vYx.js → entity-object-BLJ-I8XT.js} +1 -1
  124. package/dist/assets/{extend-BUAnZzoH.js → extend-6LrR7eSL.js} +1 -1
  125. package/dist/assets/{fork-menu-D9wqdfzJ.js → fork-menu-V-FM6YuY.js} +1 -1
  126. package/dist/assets/{frame-debugger-store-BnZFxjhV.js → frame-debugger-store-DwDC0wAm.js} +1 -1
  127. package/dist/assets/{game-contract-seams-CzlxJGC2.js → game-contract-seams-C22a4B79.js} +1 -1
  128. package/dist/assets/{game-css-scope-transform-DhimYh-2.js → game-css-scope-transform-Wv0ZdTsR.js} +1 -1
  129. package/dist/assets/{game-document.service-CPeo8J5j.js → game-document.service-BzvFIWCc.js} +1 -1
  130. package/dist/assets/{game-eval.command-Zj-0kehE.js → game-eval.command-DpQn_nY8.js} +1 -1
  131. package/dist/assets/{game-module-access-B2UMV47n.js → game-module-access-BI6oBa8Y.js} +1 -1
  132. package/dist/assets/{game-network-Bof-cN2R.js → game-network-Deo8lcPw.js} +3 -3
  133. package/dist/assets/{gameplay-export-Bq4t4aCy.js → gameplay-export-BOLhxmII.js} +1 -1
  134. package/dist/assets/{gameplay-replay-DP08m8Vv.js → gameplay-replay-Dkvmv6hf.js} +1 -1
  135. package/dist/assets/{gameplay.command-Del3_mAr.js → gameplay.command-DCKqLv7C.js} +1 -1
  136. package/dist/assets/{generation-jobs-Mfqth2Xe.js → generation-jobs-6D562vMB.js} +1 -1
  137. package/dist/assets/{generation.service-CUJTwwYl.js → generation.service-BFRoLb7y.js} +1 -1
  138. package/dist/assets/{generations-CJUKodbu.js → generations-HwV1btKK.js} +1 -1
  139. package/dist/assets/{generations.status-mer9NXCK.js → generations.status-BLiDcKsg.js} +1 -1
  140. package/dist/assets/{hierarchy-marks-sMK9R4NU.js → hierarchy-marks-DeG4E4Ke.js} +1 -1
  141. package/dist/assets/{hosted-asset-materialization-BSvRWupx.js → hosted-asset-materialization-Bod7CEMF.js} +1 -1
  142. package/dist/assets/{index-Com2cl89.js → index-4hL3-0yz.js} +1 -1
  143. package/dist/assets/{index-DUA0RF9E.js → index-CHOT9sYh.js} +2 -2
  144. package/dist/assets/{index-DHFPVxsm.js → index-CLUA6PYq.js} +1 -1
  145. package/dist/assets/{index---JtxLq2.js → index-CdLhNxor.js} +1 -1
  146. package/dist/assets/{index-Cjv2Ynte.js → index-ClgrFOcX.js} +7 -7
  147. package/dist/assets/{index-ICvy7jWw.js → index-CyLPQ8pY.js} +1 -1
  148. package/dist/assets/{index-uTZA4wRW.js → index-DkYeh000.js} +1 -1
  149. package/dist/assets/{index-BpfZiKqX.js → index-KIR4Has5.js} +1 -1
  150. package/dist/assets/{index-CCOqpqGv.js → index-jS3rfNkZ.js} +1 -1
  151. package/dist/assets/{inference-diagnostics-DE1P5w14.js → inference-diagnostics-BmZ5ggEK.js} +1 -1
  152. package/dist/assets/{ingest-boot-viewport-Dynh3g5V.js → ingest-boot-viewport-CipkFljr.js} +1 -1
  153. package/dist/assets/{ingest-siblings-BsIV1T53.js → ingest-siblings-CEwYp-xg.js} +1 -1
  154. package/dist/assets/{ingest-source-persistence-BNek6mSi.js → ingest-source-persistence-CVU1rTj0.js} +1 -1
  155. package/dist/assets/{ingest.service-C0M-0EwA.js → ingest.service-bNqvcqoK.js} +1 -1
  156. package/dist/assets/{inspect-xUKvX80V.js → inspect-BunjdqX7.js} +1 -1
  157. package/dist/assets/instances.command-DzcXdKuG.js +1 -0
  158. package/dist/assets/{json-history-resource-C1pGwXuI.js → json-history-resource-CDEoQe1R.js} +1 -1
  159. package/dist/assets/{layered-pick-ASc-_oGG.js → layered-pick-guh6WlA7.js} +1 -1
  160. package/dist/assets/{light-CHiYAJQ0.js → light-BPZivpCK.js} +1 -1
  161. package/dist/assets/{live-project-verbs-D_8wWaCB.js → live-project-verbs-Bqmxbr2o.js} +1 -1
  162. package/dist/assets/{machine.document-CnvC2j0i.js → machine.document-CAFPFq5K.js} +1 -1
  163. package/dist/assets/{machines.finder-x38pLZFO.js → machines.finder-CbUWReMp.js} +1 -1
  164. package/dist/assets/{material-factory-wvMjnOTo.js → material-factory-BkyOzJ7B.js} +1 -1
  165. package/dist/assets/{material-B9iSj5st.js → material-huG6lNEK.js} +1 -1
  166. package/dist/assets/{mesh-C64nd8qK.js → mesh-CjCfRcFK.js} +1 -1
  167. package/dist/assets/{model-asset-sections.service-UsTToAYb.js → model-asset-sections.service-Dt4V2K2v.js} +1 -1
  168. package/dist/assets/{model-inspection-ae_w8T6s.js → model-inspection-BDA5jikL.js} +1 -1
  169. package/dist/assets/{model-thumbnail-ClOTX_JF.js → model-thumbnail-CF3qGQWb.js} +1 -1
  170. package/dist/assets/{models.finder-Bl6i3QOW.js → models.finder-yh4YeGrA.js} +1 -1
  171. package/dist/assets/{module-mode-CRBEidVP.js → module-mode-D8en13PD.js} +2 -2
  172. package/dist/assets/{mount-canvas-ingest-root-BFKVZ_nn.js → mount-canvas-ingest-root-JOkm2Ypj.js} +2 -2
  173. package/dist/assets/{mount-dom-ingest-root-CUBVJcU_.js → mount-dom-ingest-root-CVXFnJZb.js} +2 -2
  174. package/dist/assets/{mount-ingest-root-CyZae-B7.js → mount-ingest-root-C3o0o28C.js} +2 -2
  175. package/dist/assets/{mount-manifest-BMD5D62M.js → mount-manifest-d7WQ9MYp.js} +1 -1
  176. package/dist/assets/{mount-three-ingest-root-BgBc58nU.js → mount-three-ingest-root-Dqd4XWP1.js} +1 -1
  177. package/dist/assets/{mounted-authoring-DQ0-LgR6.js → mounted-authoring-B697dYuN.js} +1 -1
  178. package/dist/assets/{mounted-story-viewport-source-BsbduGue.js → mounted-story-viewport-source-BvNZ3QQn.js} +1 -1
  179. package/dist/assets/{native-debug-module-BUPFKtBc.js → native-debug-module-iX2-V5kg.js} +1 -1
  180. package/dist/assets/{navigation-DN3By10F.js → navigation-CIl9OY1F.js} +1 -1
  181. package/dist/assets/{navmesh.menu-BkB8EXHu.js → navmesh.menu-DrMoj7Ag.js} +1 -1
  182. package/dist/assets/{navmesh.service-C75Hdd7h.js → navmesh.service-CTr1NVfz.js} +1 -1
  183. package/dist/assets/network-observer.service-DyzpGKA7.js +1 -0
  184. package/dist/assets/{network.utility-C_lQVcOt.js → network.utility-Btexm5ao.js} +1 -1
  185. package/dist/assets/{object3d-document-session-registry-D8XSoEpf.js → object3d-document-session-registry-CADiW-LP.js} +2 -2
  186. package/dist/assets/{oid-transform-CvzWDfCe.js → oid-transform-Ca1oU_Ei.js} +1 -1
  187. package/dist/assets/{particles-JKSmSdCW.js → particles-D1oPwNJh.js} +1 -1
  188. package/dist/assets/{pixi-authoring-adapter-CAS5Elnh.js → pixi-authoring-adapter-B1BBfTju.js} +1 -1
  189. package/dist/assets/{pixi-live-write-target-BO-cO1Gl.js → pixi-live-write-target-BcUhtqmJ.js} +1 -1
  190. package/dist/assets/{play.command-Czxm8cvG.js → play.command-ScnwcvJr.js} +2 -2
  191. package/dist/assets/{presentation-xDN53iEZ.js → presentation-DPfnCjNA.js} +1 -1
  192. package/dist/assets/{product-mtU_pRkY.js → product-D_9saRiZ.js} +1 -1
  193. package/dist/assets/{profiler.action-Beoiw4ON.js → profiler.action-PXTw93E5.js} +1 -1
  194. package/dist/assets/{profiler.menu-BvuSldBS.js → profiler.menu-DPFV6QQD.js} +1 -1
  195. package/dist/assets/{profiler.utility-3qST7Ixj.js → profiler.utility-eDooJGnI.js} +1 -1
  196. package/dist/assets/{project-authoring-session-DAcbPWsU.js → project-authoring-session-BmeutotA.js} +2 -2
  197. package/dist/assets/{properties-bone-constraints.inspector-8yqXfdtn.js → properties-bone-constraints.inspector-BW0V1WXQ.js} +1 -1
  198. package/dist/assets/{properties-bone.inspector-CQ41MY4S.js → properties-bone.inspector-DIvTZhY8.js} +1 -1
  199. package/dist/assets/{properties-collection.inspector-Bdk09XCE.js → properties-collection.inspector-Dbt5XMhs.js} +1 -1
  200. package/dist/assets/{properties-constraints.inspector-CrNnu6jW.js → properties-constraints.inspector-5SvB0GDC.js} +1 -1
  201. package/dist/assets/{properties-data.inspector-84938huJ.js → properties-data.inspector-C-SngIsI.js} +1 -1
  202. package/dist/assets/{properties-material.inspector-BarvuWEj.js → properties-material.inspector-CYAWsvsX.js} +1 -1
  203. package/dist/assets/{properties-modifiers.inspector-Cm2y4Vb6.js → properties-modifiers.inspector-XN6BL-Ll.js} +1 -1
  204. package/dist/assets/{properties-object.inspector-Bf0eY0kG.js → properties-object.inspector-CfryU0kN.js} +1 -1
  205. package/dist/assets/{properties-output.inspector-D_NFrDmS.js → properties-output.inspector-COfgmFUW.js} +1 -1
  206. package/dist/assets/{properties-particles.inspector-BZaLS0X7.js → properties-particles.inspector-BCh0vFr6.js} +1 -1
  207. package/dist/assets/{properties-physics.inspector-BIwFNf1B.js → properties-physics.inspector-B6to1u6U.js} +1 -1
  208. package/dist/assets/{properties-render.inspector-BahRi3z3.js → properties-render.inspector-C4hVfo7j.js} +1 -1
  209. package/dist/assets/{properties-scene.inspector-C9p2pucf.js → properties-scene.inspector-dKta4xn5.js} +1 -1
  210. package/dist/assets/{properties-texture.inspector-J_6EK4f-.js → properties-texture.inspector-ZlNhW25m.js} +1 -1
  211. package/dist/assets/{properties-view-layer.inspector-BgniFnwR.js → properties-view-layer.inspector-CIxHmkDR.js} +1 -1
  212. package/dist/assets/{properties-world.inspector-CzcRcbOY.js → properties-world.inspector-Ce0q2dmK.js} +1 -1
  213. package/dist/assets/{r3f-design-session-C5_NQltq.js → r3f-design-session-1riISktt.js} +2 -2
  214. package/dist/assets/{r3f-physics-binding-BRcBDERW.js → r3f-physics-binding-DuG97FR9.js} +1 -1
  215. package/dist/assets/{r3f-source-authoring-adapter-N_d4ivmu.js → r3f-source-authoring-adapter-B8qqrdwk.js} +1 -1
  216. package/dist/assets/{react-canvas-navigation-BWgmHmpc.js → react-canvas-navigation-CxBm8iw8.js} +1 -1
  217. package/dist/assets/{react-inspector.service-C0telKKC.js → react-inspector.service-BcdePwno.js} +1 -1
  218. package/dist/assets/{react-story-board-CGF1vFuk.js → react-story-board-CMvkLAkF.js} +1 -1
  219. package/dist/assets/{react-three-rapier.esm-C8iL26_6.js → react-three-rapier.esm-D5svf-ME.js} +1 -1
  220. package/dist/assets/{react-world-authoring-adapter-CTCp7U6C.js → react-world-authoring-adapter-Dq8NqvWu.js} +1 -1
  221. package/dist/assets/{realm-services-CbgTofeT.js → realm-services-CqjVBanw.js} +1 -1
  222. package/dist/assets/{reflection-probe-capture.inspector-Dp3WN9X2.js → reflection-probe-capture.inspector-uEvyppEj.js} +1 -1
  223. package/dist/assets/{registry-DPYQgPRv.js → registry-D7lFIA8c.js} +1 -1
  224. package/dist/assets/{relative-import-specifier-CPSPKQKY.js → relative-import-specifier-CA9mSNXO.js} +1 -1
  225. package/dist/assets/{render-env-FpydFP_z.js → render-env-BHasp-z3.js} +1 -1
  226. package/dist/assets/{render-features-BYgh328X.js → render-features-sSb1-c5x.js} +1 -1
  227. package/dist/assets/{render-settings-DeBS5HzD.js → render-settings-CUbo4Sw5.js} +1 -1
  228. package/dist/assets/{resolve-three-BUKYgCMY.js → resolve-three-TQ367RQD.js} +3 -3
  229. package/dist/assets/{root-seam-contract-B33VsC6Z.js → root-seam-contract-CneTgNww.js} +1 -1
  230. package/dist/assets/{run-selection-BdsJXY3k.js → run-selection-CNsOQTEG.js} +1 -1
  231. package/dist/assets/{scene-capture-CMwvLaW9.js → scene-capture-KbdRgsD3.js} +1 -1
  232. package/dist/assets/{scene-document.service-DqReOF6t.js → scene-document.service-CmPSUocW.js} +2 -2
  233. package/dist/assets/{scene-framing-Dq-okRQ_.js → scene-framing-B5JC4NeG.js} +1 -1
  234. package/dist/assets/{seeded-random-BVi4_fs4.js → seeded-random-B6zqGkWP.js} +1 -1
  235. package/dist/assets/{setup-renderer-Cdx_0C3T.js → setup-renderer-efjIBSGF.js} +1 -1
  236. package/dist/assets/{source-object3d-authoring-adapter-CRQ5Iruy.js → source-object3d-authoring-adapter-DeeboYub.js} +1 -1
  237. package/dist/assets/{source-persistence-backend-BMbXR_WB.js → source-persistence-backend-Cwy93SmQ.js} +1 -1
  238. package/dist/assets/{stage-keyboard-ntaDc3sd.js → stage-keyboard-GNCaTXLA.js} +1 -1
  239. package/dist/assets/{stage-overlay-set-CmvMTUuj.js → stage-overlay-set-DV3SCzJb.js} +1 -1
  240. package/dist/assets/{stage-presence-markers--CsmPxKk.js → stage-presence-markers-CBEU1Kzo.js} +1 -1
  241. package/dist/assets/{stage-transform-tools-eaq_pmiw.js → stage-transform-tools-C9nNDW6n.js} +1 -1
  242. package/dist/assets/{standard-viewport-dressing-DaBfL3HV.js → standard-viewport-dressing-BJkGwiNT.js} +1 -1
  243. package/dist/assets/{state-watch.action-BBeD9rI6.js → state-watch.action-Doz_jrzS.js} +1 -1
  244. package/dist/assets/{state-watch.menu-BtjTGcSx.js → state-watch.menu-Dj4DUUxN.js} +1 -1
  245. package/dist/assets/{state-watch.utility-CLrBmLch.js → state-watch.utility-COPa8xpV.js} +1 -1
  246. package/dist/assets/{story-capture-DvMpONUV.js → story-capture-stRSY4PQ.js} +1 -1
  247. package/dist/assets/{story-documents-C1h5_Fvv.js → story-documents-CYzWYY1o.js} +1 -1
  248. package/dist/assets/{story-documents.service-BvSI6xU7.js → story-documents.service-C5r8KFEG.js} +1 -1
  249. package/dist/assets/{story-documents.service-e4GgOiBP.js → story-documents.service-DJBu4rve.js} +1 -1
  250. package/dist/assets/{story-media-presence-UYdQuwtq.js → story-media-presence-D4AIsAtK.js} +1 -1
  251. package/dist/assets/{story-pixi-preview-BVXZsJAe.js → story-pixi-preview-mPo3OFOd.js} +1 -1
  252. package/dist/assets/{story-presentation-CU1g5VGf.js → story-presentation-Dw4Vw65P.js} +1 -1
  253. package/dist/assets/{story-three-preview-DdduzS7D.js → story-three-preview-CWM0Rj7x.js} +2 -2
  254. package/dist/assets/{studio-environment-DZOr5iAy.js → studio-environment-Bw9zMFE8.js} +1 -1
  255. package/dist/assets/{surface-state-C0NqVDj5.js → surface-state-b_H4iOCJ.js} +1 -1
  256. package/dist/assets/{syntactic-prop-specs--oEbzaCI.js → syntactic-prop-specs-BCdwWi-T.js} +1 -1
  257. package/dist/assets/{team-playtest.service-DTvCDmka.js → team-playtest.service-CnxdTghn.js} +1 -1
  258. package/dist/assets/{three-CAVY58Dv.js → three-DWy0sZom.js} +1 -1
  259. package/dist/assets/{three-authoring-adapter-BDMrB8fC.js → three-authoring-adapter-9LcUBPaU.js} +1 -1
  260. package/dist/assets/three-authoring.service-DdTMF4A2.js +2 -0
  261. package/dist/assets/{three-ingest-runtime-BPTa3ryG.js → three-ingest-runtime-x9nLmUl-.js} +1 -1
  262. package/dist/assets/{three-integration-CJIrJnlD.js → three-integration-DB-xQHD5.js} +2 -2
  263. package/dist/assets/three-integration.service-DwToRGIc.js +1 -0
  264. package/dist/assets/{three-projection-core-BnoDtdZY.js → three-projection-core-IUovHgg_.js} +1 -1
  265. package/dist/assets/{three-state-_BZo8PPs.js → three-state-_ImCbP87.js} +1 -1
  266. package/dist/assets/{three-story-capture.service-CzIciMHs.js → three-story-capture.service-wKwfSnqA.js} +2 -2
  267. package/dist/assets/{three-story-model-BZAqoEDw.js → three-story-model-BxWKcl9d.js} +1 -1
  268. package/dist/assets/{three-viewport-presentation-DsFI1PyU.js → three-viewport-presentation-Bg86EsDJ.js} +1 -1
  269. package/dist/assets/{transform-mode-request-ROdyyd8M.js → transform-mode-request-BnV8FSnx.js} +1 -1
  270. package/dist/assets/{transport-strip-DAasOTBr.js → transport-strip-BZQnaxFN.js} +1 -1
  271. package/dist/assets/transport.header-1SF4ZbEd.js +1 -0
  272. package/dist/assets/{tuples-BFQG7BqZ.js → tuples-DR33sMq6.js} +1 -1
  273. package/dist/assets/{ui-board-document-C-DxG3Lj.js → ui-board-document-VJMvm6Ks.js} +2 -2
  274. package/dist/assets/{user-data-DxeJHxTz.js → user-data-DL6HsBPf.js} +1 -1
  275. package/dist/assets/{utility-view-state-CGlE9NdF.js → utility-view-state-ghWXsYXq.js} +1 -1
  276. package/dist/assets/{viewport-door-CTspfOX-.js → viewport-door-BV_lf5uK.js} +1 -1
  277. package/dist/assets/{viewport-root-presentation-Co7zteuS.js → viewport-root-presentation-CKqhX3mt.js} +1 -1
  278. package/dist/assets/{viewport-surface-status-P6QST-xH.js → viewport-surface-status-D7M2L2lI.js} +1 -1
  279. package/dist/assets/{webworkerAll-BH-WTk1P.js → webworkerAll-DDbFvxgB.js} +1 -1
  280. package/dist/assets/{workspace-arrangement-Bq8u7HUK.js → workspace-arrangement-86_8Kk5K.js} +1 -1
  281. package/dist/assets/{world-documents-DP1Ifjck.js → world-documents-DeNJUefV.js} +1 -1
  282. package/dist/assets/{world-root-stage-binding-1BOYY3z-.js → world-root-stage-binding-VOrldLB4.js} +1 -1
  283. package/dist/assets/{xstate-animation-binding-GsfnPsLk.js → xstate-animation-binding-747CfEeB.js} +1 -1
  284. package/dist/assets/{xstate-animation-meta-BS3q6oQo.js → xstate-animation-meta-DNMlMnr-.js} +1 -1
  285. package/dist-node/cli.js +16 -16
  286. package/package.json +16 -16
  287. package/dist/assets/InspectorObjectPreview-Bc9QgcaX.js +0 -1
  288. package/dist/assets/Object3DDocumentViewport-S-0l2Ppm.js +0 -2
  289. package/dist/assets/autoplay.service-BxNf_ohc.js +0 -1
  290. package/dist/assets/instances.command-Cc9TSete.js +0 -1
  291. package/dist/assets/network-observer.service-AzK_SzI2.js +0 -1
  292. package/dist/assets/three-authoring.service-DbhfcSSn.js +0 -2
  293. package/dist/assets/three-integration.service-DTBYyabq.js +0 -1
  294. package/dist/assets/transport.header-QMchTQhw.js +0 -1
@@ -1 +1 @@
1
- import{u as i,v as s,w as a,x as n}from"./index-Cjv2Ynte.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const c=/\bcreateMachine\s*\(/,j={name:"machinesFromModules",schema:i({finder:n("machinesFromModules"),include:s(a().min(1)).min(1).describe("Project-relative globs of the modules that may declare machines (`src/**/*.ts`)")}).strict(),run(m,r){const t=[];for(const e of r.sources??[]){if(!c.test(e.source))continue;const o=(e.path.split("/").pop()??e.path).replace(/\.[cm]?[jt]sx?$/,"");t.push({id:`machine:${e.path}`,label:o,kind:"machine",region:null,authorable:!0,reach:{kind:"root-mount"},source:{path:e.path}})}return{entries:t,notes:[]}}};export{j as finder};
1
+ import{u as i,v as s,w as a,x as n}from"./index-ClgrFOcX.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const c=/\bcreateMachine\s*\(/,j={name:"machinesFromModules",schema:i({finder:n("machinesFromModules"),include:s(a().min(1)).min(1).describe("Project-relative globs of the modules that may declare machines (`src/**/*.ts`)")}).strict(),run(m,r){const t=[];for(const e of r.sources??[]){if(!c.test(e.source))continue;const o=(e.path.split("/").pop()??e.path).replace(/\.[cm]?[jt]sx?$/,"");t.push({id:`machine:${e.path}`,label:o,kind:"machine",region:null,authorable:!0,reach:{kind:"root-mount"},source:{path:e.path}})}return{entries:t,notes:[]}}};export{j as finder};
@@ -1 +1 @@
1
- import{loadTexture as n}from"./asset-loaders-BcvaZp8m.js";import{DEFAULTS as t}from"./defaults-DKiBJCPN.js";import{K as l,U as M,aq as d,db as u,ey as g,cx as p,B as y,aI as v,b4 as f,cw as I,_ as h,cy as R,cp as m}from"./three.core-3arARmh6.js";import"./index-Cjv2Ynte.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"./SkeletonUtils-YH9iLOY_.js";import"./three.module-BLhyNg0e.js";import"./asset-parse-error-BHMwBRU3.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./loader-BTUKnX5Q.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";function j(e){const s=e.args??[];switch(e.type){case"box":return new l(s[0]??1,s[1]??1,s[2]??1);case"sphere":return new g(s[0]??.5,s[1]??32,s[2]??16);case"plane":return new u(s[0]??1,s[1]??1,s[2]??1,s[3]??1);case"cylinder":return new d(s[0]??.5,s[1]??.5,s[2]??1,s[3]??32);case"capsule":return new M(s[0]??.5,s[1]??1,s[2]??4,s[3]??16);default:return new l(1,1,1)}}function z(e){if(!e)return new p({color:t.material.color});const s={};e.map&&(s.map=n(e.map)),e.normalMap&&(s.normalMap=n(e.normalMap)),e.emissiveMap&&(s.emissiveMap=n(e.emissiveMap)),e.aoMap&&(s.aoMap=n(e.aoMap)),e.lightMap&&(s.lightMap=n(e.lightMap)),e.roughnessMap&&(s.roughnessMap=n(e.roughnessMap)),e.metalnessMap&&(s.metalnessMap=n(e.metalnessMap));const i=t.material,a=e.side??i.side,r=a==="back"?y:a==="double"?v:f,o=e.opacity??i.opacity,c=e.transparent??i.transparent;switch(e.type){case"basic":return new m({color:e.color??i.color,...s,lightMapIntensity:e.lightMapIntensity??1,opacity:o,transparent:c,side:r});case"toon":return new R({color:e.color??i.color,...s,lightMapIntensity:e.lightMapIntensity??1,emissive:e.emissive??i.emissive,emissiveIntensity:e.emissiveIntensity??i.emissiveIntensity,opacity:o,transparent:c,side:r});case"physical":return new I({color:e.color??i.color,metalness:e.metalness??i.metalness,roughness:e.roughness??i.roughness,...s,lightMapIntensity:e.lightMapIntensity??1,emissive:e.emissive??i.emissive,emissiveIntensity:e.emissiveIntensity??i.emissiveIntensity,opacity:o,transparent:c,side:r,flatShading:e.flatShading??i.flatShading,...e.clearcoat?{clearcoat:e.clearcoat.clearcoat,clearcoatRoughness:e.clearcoat.clearcoatRoughness??i.clearcoat.clearcoatRoughness,...e.clearcoat.clearcoatMap?{clearcoatMap:n(e.clearcoat.clearcoatMap)}:{},...e.clearcoat.clearcoatRoughnessMap?{clearcoatRoughnessMap:n(e.clearcoat.clearcoatRoughnessMap)}:{}}:{},...e.transmission?{transmission:e.transmission.transmission,ior:e.transmission.ior??i.transmission.ior,thickness:e.transmission.thickness??i.transmission.thickness,...e.transmission.attenuationColor?{attenuationColor:new h(e.transmission.attenuationColor)}:{},attenuationDistance:e.transmission.attenuationDistance??1/0,...e.transmission.transmissionMap?{transmissionMap:n(e.transmission.transmissionMap)}:{}}:{},...e.sheen?{sheen:e.sheen.sheen,sheenColor:new h(e.sheen.sheenColor??i.sheen.sheenColor),sheenRoughness:e.sheen.sheenRoughness??i.sheen.sheenRoughness,...e.sheen.sheenColorMap?{sheenColorMap:n(e.sheen.sheenColorMap)}:{},...e.sheen.sheenRoughnessMap?{sheenRoughnessMap:n(e.sheen.sheenRoughnessMap)}:{}}:{},...e.iridescence?{iridescence:e.iridescence.iridescence,iridescenceIOR:e.iridescence.iridescenceIOR??i.iridescence.iridescenceIOR,iridescenceThicknessRange:e.iridescence.iridescenceThicknessRange??i.iridescence.iridescenceThicknessRange,...e.iridescence.iridescenceMap?{iridescenceMap:n(e.iridescence.iridescenceMap)}:{},...e.iridescence.iridescenceThicknessMap?{iridescenceThicknessMap:n(e.iridescence.iridescenceThicknessMap)}:{}}:{},...e.displacementMap?{displacementMap:n(e.displacementMap)}:{},...e.displacementScale!==void 0?{displacementScale:e.displacementScale}:{},...e.displacementBias!==void 0?{displacementBias:e.displacementBias}:{}});default:return new p({color:e.color??i.color,metalness:e.metalness??i.metalness,roughness:e.roughness??i.roughness,...s,lightMapIntensity:e.lightMapIntensity??1,emissive:e.emissive??i.emissive,emissiveIntensity:e.emissiveIntensity??i.emissiveIntensity,opacity:o,transparent:c,side:r,flatShading:e.flatShading??i.flatShading})}}export{j as createGeometry,z as createMaterial};
1
+ import{loadTexture as n}from"./asset-loaders-Bo91oPiL.js";import{DEFAULTS as t}from"./defaults-DKiBJCPN.js";import{K as l,U as M,aq as d,db as u,ey as g,cx as p,B as y,aI as v,b4 as f,cw as I,_ as h,cy as R,cp as m}from"./three.core-3arARmh6.js";import"./index-ClgrFOcX.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"./SkeletonUtils-YH9iLOY_.js";import"./three.module-BLhyNg0e.js";import"./asset-parse-error-BHMwBRU3.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./loader-BTUKnX5Q.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";function j(e){const s=e.args??[];switch(e.type){case"box":return new l(s[0]??1,s[1]??1,s[2]??1);case"sphere":return new g(s[0]??.5,s[1]??32,s[2]??16);case"plane":return new u(s[0]??1,s[1]??1,s[2]??1,s[3]??1);case"cylinder":return new d(s[0]??.5,s[1]??.5,s[2]??1,s[3]??32);case"capsule":return new M(s[0]??.5,s[1]??1,s[2]??4,s[3]??16);default:return new l(1,1,1)}}function z(e){if(!e)return new p({color:t.material.color});const s={};e.map&&(s.map=n(e.map)),e.normalMap&&(s.normalMap=n(e.normalMap)),e.emissiveMap&&(s.emissiveMap=n(e.emissiveMap)),e.aoMap&&(s.aoMap=n(e.aoMap)),e.lightMap&&(s.lightMap=n(e.lightMap)),e.roughnessMap&&(s.roughnessMap=n(e.roughnessMap)),e.metalnessMap&&(s.metalnessMap=n(e.metalnessMap));const i=t.material,a=e.side??i.side,r=a==="back"?y:a==="double"?v:f,o=e.opacity??i.opacity,c=e.transparent??i.transparent;switch(e.type){case"basic":return new m({color:e.color??i.color,...s,lightMapIntensity:e.lightMapIntensity??1,opacity:o,transparent:c,side:r});case"toon":return new R({color:e.color??i.color,...s,lightMapIntensity:e.lightMapIntensity??1,emissive:e.emissive??i.emissive,emissiveIntensity:e.emissiveIntensity??i.emissiveIntensity,opacity:o,transparent:c,side:r});case"physical":return new I({color:e.color??i.color,metalness:e.metalness??i.metalness,roughness:e.roughness??i.roughness,...s,lightMapIntensity:e.lightMapIntensity??1,emissive:e.emissive??i.emissive,emissiveIntensity:e.emissiveIntensity??i.emissiveIntensity,opacity:o,transparent:c,side:r,flatShading:e.flatShading??i.flatShading,...e.clearcoat?{clearcoat:e.clearcoat.clearcoat,clearcoatRoughness:e.clearcoat.clearcoatRoughness??i.clearcoat.clearcoatRoughness,...e.clearcoat.clearcoatMap?{clearcoatMap:n(e.clearcoat.clearcoatMap)}:{},...e.clearcoat.clearcoatRoughnessMap?{clearcoatRoughnessMap:n(e.clearcoat.clearcoatRoughnessMap)}:{}}:{},...e.transmission?{transmission:e.transmission.transmission,ior:e.transmission.ior??i.transmission.ior,thickness:e.transmission.thickness??i.transmission.thickness,...e.transmission.attenuationColor?{attenuationColor:new h(e.transmission.attenuationColor)}:{},attenuationDistance:e.transmission.attenuationDistance??1/0,...e.transmission.transmissionMap?{transmissionMap:n(e.transmission.transmissionMap)}:{}}:{},...e.sheen?{sheen:e.sheen.sheen,sheenColor:new h(e.sheen.sheenColor??i.sheen.sheenColor),sheenRoughness:e.sheen.sheenRoughness??i.sheen.sheenRoughness,...e.sheen.sheenColorMap?{sheenColorMap:n(e.sheen.sheenColorMap)}:{},...e.sheen.sheenRoughnessMap?{sheenRoughnessMap:n(e.sheen.sheenRoughnessMap)}:{}}:{},...e.iridescence?{iridescence:e.iridescence.iridescence,iridescenceIOR:e.iridescence.iridescenceIOR??i.iridescence.iridescenceIOR,iridescenceThicknessRange:e.iridescence.iridescenceThicknessRange??i.iridescence.iridescenceThicknessRange,...e.iridescence.iridescenceMap?{iridescenceMap:n(e.iridescence.iridescenceMap)}:{},...e.iridescence.iridescenceThicknessMap?{iridescenceThicknessMap:n(e.iridescence.iridescenceThicknessMap)}:{}}:{},...e.displacementMap?{displacementMap:n(e.displacementMap)}:{},...e.displacementScale!==void 0?{displacementScale:e.displacementScale}:{},...e.displacementBias!==void 0?{displacementBias:e.displacementBias}:{}});default:return new p({color:e.color??i.color,metalness:e.metalness??i.metalness,roughness:e.roughness??i.roughness,...s,lightMapIntensity:e.lightMapIntensity??1,emissive:e.emissive??i.emissive,emissiveIntensity:e.emissiveIntensity??i.emissiveIntensity,opacity:o,transparent:c,side:r,flatShading:e.flatShading??i.flatShading})}}export{j as createGeometry,z as createMaterial};
@@ -1 +1 @@
1
- import{u as t,c6 as e,w as i,e2 as o,c5 as a,c4 as s}from"./index-Cjv2Ynte.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const n=t({type:s(["standard","physical","basic","toon"]).describe("Material shading model"),color:i().optional().describe('Base color as CSS hex string (e.g. "#ff0000")'),metalness:e().optional().describe("Metalness factor 0–1 (standard/physical only)"),roughness:e().optional().describe("Roughness factor 0–1 (standard/physical only)"),map:i().optional().describe("Path to albedo/diffuse texture image"),normalMap:i().optional().describe("Path to normal map texture image"),emissive:i().optional().describe("Emissive color as CSS hex string"),emissiveIntensity:e().optional().describe("Emissive light intensity multiplier"),emissiveMap:i().optional().describe("Path to emissive map texture image"),aoMap:i().optional().describe("Path to ambient occlusion map texture image"),lightMap:i().optional().describe("Path to a baked lightmap texture (uses the mesh's second UV set). Applies the pre-baked GI/shadow result on top of the material."),lightMapIntensity:e().optional().describe("Lightmap intensity multiplier (default 1)."),roughnessMap:i().optional().describe("Path to roughness map texture image"),metalnessMap:i().optional().describe("Path to metalness map texture image"),opacity:e().optional().describe("Opacity 0–1. Set transparent: true to enable"),transparent:a().optional().describe("Enable alpha blending for this material"),side:s(["front","back","double"]).optional().describe("Which face sides to render"),flatShading:a().optional().describe("Use flat (faceted) shading instead of smooth"),clearcoat:t({clearcoat:e().describe("Clearcoat layer intensity 0–1"),clearcoatRoughness:e().optional().describe("Clearcoat roughness 0–1"),clearcoatMap:i().optional().describe("Path to clearcoat intensity map"),clearcoatRoughnessMap:i().optional().describe("Path to clearcoat roughness map")}).optional().describe("Clearcoat layer (physical only)"),transmission:t({transmission:e().describe("Transmission intensity 0–1 (glass, liquid)"),ior:e().optional().describe("Index of refraction (default 1.5)"),thickness:e().optional().describe("Volume thickness for refraction"),attenuationColor:i().optional().describe("Color absorbed over distance"),attenuationDistance:e().optional().describe("Distance at which attenuation color takes full effect"),transmissionMap:i().optional().describe("Path to transmission map")}).optional().describe("Light transmission (physical only)"),sheen:t({sheen:e().describe("Sheen intensity 0–1 (fabric, velvet)"),sheenColor:i().optional().describe("Sheen tint color"),sheenRoughness:e().optional().describe("Sheen roughness 0–1"),sheenColorMap:i().optional().describe("Path to sheen color map"),sheenRoughnessMap:i().optional().describe("Path to sheen roughness map")}).optional().describe("Sheen layer (physical only)"),iridescence:t({iridescence:e().describe("Iridescence intensity 0–1 (soap bubbles, oil slick)"),iridescenceIOR:e().optional().describe("Thin-film IOR (default 1.3)"),iridescenceThicknessRange:o([e(),e()]).optional().describe("Min/max thin-film thickness in nm"),iridescenceMap:i().optional().describe("Path to iridescence intensity map"),iridescenceThicknessMap:i().optional().describe("Path to iridescence thickness map")}).optional().describe("Iridescence thin-film (physical only)"),displacementMap:i().optional().describe("Path to displacement/height map"),displacementScale:e().optional().describe("Displacement height multiplier"),displacementBias:e().optional().describe("Displacement offset")}).strict(),g=n.describe("Material appearance properties");export{g as MaterialDescriptorSchema};
1
+ import{u as t,c6 as e,w as i,e2 as o,c5 as a,c4 as s}from"./index-ClgrFOcX.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const n=t({type:s(["standard","physical","basic","toon"]).describe("Material shading model"),color:i().optional().describe('Base color as CSS hex string (e.g. "#ff0000")'),metalness:e().optional().describe("Metalness factor 0–1 (standard/physical only)"),roughness:e().optional().describe("Roughness factor 0–1 (standard/physical only)"),map:i().optional().describe("Path to albedo/diffuse texture image"),normalMap:i().optional().describe("Path to normal map texture image"),emissive:i().optional().describe("Emissive color as CSS hex string"),emissiveIntensity:e().optional().describe("Emissive light intensity multiplier"),emissiveMap:i().optional().describe("Path to emissive map texture image"),aoMap:i().optional().describe("Path to ambient occlusion map texture image"),lightMap:i().optional().describe("Path to a baked lightmap texture (uses the mesh's second UV set). Applies the pre-baked GI/shadow result on top of the material."),lightMapIntensity:e().optional().describe("Lightmap intensity multiplier (default 1)."),roughnessMap:i().optional().describe("Path to roughness map texture image"),metalnessMap:i().optional().describe("Path to metalness map texture image"),opacity:e().optional().describe("Opacity 0–1. Set transparent: true to enable"),transparent:a().optional().describe("Enable alpha blending for this material"),side:s(["front","back","double"]).optional().describe("Which face sides to render"),flatShading:a().optional().describe("Use flat (faceted) shading instead of smooth"),clearcoat:t({clearcoat:e().describe("Clearcoat layer intensity 0–1"),clearcoatRoughness:e().optional().describe("Clearcoat roughness 0–1"),clearcoatMap:i().optional().describe("Path to clearcoat intensity map"),clearcoatRoughnessMap:i().optional().describe("Path to clearcoat roughness map")}).optional().describe("Clearcoat layer (physical only)"),transmission:t({transmission:e().describe("Transmission intensity 0–1 (glass, liquid)"),ior:e().optional().describe("Index of refraction (default 1.5)"),thickness:e().optional().describe("Volume thickness for refraction"),attenuationColor:i().optional().describe("Color absorbed over distance"),attenuationDistance:e().optional().describe("Distance at which attenuation color takes full effect"),transmissionMap:i().optional().describe("Path to transmission map")}).optional().describe("Light transmission (physical only)"),sheen:t({sheen:e().describe("Sheen intensity 0–1 (fabric, velvet)"),sheenColor:i().optional().describe("Sheen tint color"),sheenRoughness:e().optional().describe("Sheen roughness 0–1"),sheenColorMap:i().optional().describe("Path to sheen color map"),sheenRoughnessMap:i().optional().describe("Path to sheen roughness map")}).optional().describe("Sheen layer (physical only)"),iridescence:t({iridescence:e().describe("Iridescence intensity 0–1 (soap bubbles, oil slick)"),iridescenceIOR:e().optional().describe("Thin-film IOR (default 1.3)"),iridescenceThicknessRange:o([e(),e()]).optional().describe("Min/max thin-film thickness in nm"),iridescenceMap:i().optional().describe("Path to iridescence intensity map"),iridescenceThicknessMap:i().optional().describe("Path to iridescence thickness map")}).optional().describe("Iridescence thin-film (physical only)"),displacementMap:i().optional().describe("Path to displacement/height map"),displacementScale:e().optional().describe("Displacement height multiplier"),displacementBias:e().optional().describe("Displacement offset")}).strict(),g=n.describe("Material appearance properties");export{g as MaterialDescriptorSchema};
@@ -1 +1 @@
1
- import{u as s,v as n,w as t,c6 as o,c4 as i}from"./index-Cjv2Ynte.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const r=s({type:i(["box","sphere","plane","cylinder","capsule","gltf","splat"]).describe('Renderable type: a built-in mesh primitive, "gltf" for an external 3D model, or "splat" for a native Gaussian-splat asset'),args:n(o()).optional().describe("Geometry constructor args — box: [w,h,d], sphere: [radius], cylinder: [rTop,rBot,h], capsule: [radius,length], plane: [w,h,widthSegments,heightSegments]"),src:t().optional().describe('Path to the external render asset. Required for "gltf" (GLTF/GLB) and "splat" (SPZ)'),node:t().optional().describe(`Name (or path) of a single node inside the referenced glTF (resolved via getObjectByName) to instantiate as this entity's geometry, instead of the whole file. The geometry stays SHARED from the cached glTF — nothing is copied out. Only meaningful with type: "gltf". CONSTRAINT: a skinned/animated node cannot be lifted out of its armature — if the named node is a SkinnedMesh (or contains one), resolving it throws (degrade loudly, not silently).`),lod:n(s({distance:o().describe("Camera distance in world units at/beyond which this level shows (THREE.LOD threshold). Use 0 for the closest/highest-detail level."),node:t().describe("Name of a node inside the referenced glTF (mesh.src) to show at this distance — resolved via getObjectByName, geometry shared (F4-style). A skinned node throws (atomic-subtree rule).")})).optional().describe("Per-entity Level-of-Detail: distance-keyed glTF sub-nodes swapped by camera distance (THREE.LOD). gltf-only. Gated by the environment.rendering.lod master toggle — when off, only the closest level renders. Cannot combine with node.")}).strict(),y=r.refine(e=>e.type!=="gltf"&&e.type!=="splat"||e.src!=null,{message:"External render asset requires 'src' field"}).refine(e=>e.node==null||e.type==="gltf",{message:"Mesh 'node' is only meaningful with type: 'gltf' (names a sub-node of the referenced glTF)"}).refine(e=>e.lod==null||e.type==="gltf",{message:"Mesh 'lod' is only meaningful with type: 'gltf'"}).refine(e=>!(e.lod&&e.node),{message:"Mesh 'lod' cannot combine with 'node' — LOD is the multi-level form of a node ref"}).describe("Mesh geometry definition");export{y as MeshDescriptorSchema};
1
+ import{u as s,v as n,w as t,c6 as o,c4 as i}from"./index-ClgrFOcX.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const r=s({type:i(["box","sphere","plane","cylinder","capsule","gltf","splat"]).describe('Renderable type: a built-in mesh primitive, "gltf" for an external 3D model, or "splat" for a native Gaussian-splat asset'),args:n(o()).optional().describe("Geometry constructor args — box: [w,h,d], sphere: [radius], cylinder: [rTop,rBot,h], capsule: [radius,length], plane: [w,h,widthSegments,heightSegments]"),src:t().optional().describe('Path to the external render asset. Required for "gltf" (GLTF/GLB) and "splat" (SPZ)'),node:t().optional().describe(`Name (or path) of a single node inside the referenced glTF (resolved via getObjectByName) to instantiate as this entity's geometry, instead of the whole file. The geometry stays SHARED from the cached glTF — nothing is copied out. Only meaningful with type: "gltf". CONSTRAINT: a skinned/animated node cannot be lifted out of its armature — if the named node is a SkinnedMesh (or contains one), resolving it throws (degrade loudly, not silently).`),lod:n(s({distance:o().describe("Camera distance in world units at/beyond which this level shows (THREE.LOD threshold). Use 0 for the closest/highest-detail level."),node:t().describe("Name of a node inside the referenced glTF (mesh.src) to show at this distance — resolved via getObjectByName, geometry shared (F4-style). A skinned node throws (atomic-subtree rule).")})).optional().describe("Per-entity Level-of-Detail: distance-keyed glTF sub-nodes swapped by camera distance (THREE.LOD). gltf-only. Gated by the environment.rendering.lod master toggle — when off, only the closest level renders. Cannot combine with node.")}).strict(),y=r.refine(e=>e.type!=="gltf"&&e.type!=="splat"||e.src!=null,{message:"External render asset requires 'src' field"}).refine(e=>e.node==null||e.type==="gltf",{message:"Mesh 'node' is only meaningful with type: 'gltf' (names a sub-node of the referenced glTF)"}).refine(e=>e.lod==null||e.type==="gltf",{message:"Mesh 'lod' is only meaningful with type: 'gltf'"}).refine(e=>!(e.lod&&e.node),{message:"Mesh 'lod' cannot combine with 'node' — LOD is the multi-level form of a node ref"}).describe("Mesh geometry definition");export{y as MeshDescriptorSchema};
@@ -1 +1 @@
1
- import{a as e}from"./jsx-runtime-DPjLkJKQ.js";import{a as $}from"./three-contract-Dkt6PmWY.js";import{i as N,a as I,b as A,m as P}from"./model-inspection-ae_w8T6s.js";import{eM as y,eO as E,by as B,eN as g,g_ as F,eS as w,g$ as V,h0 as G,bE as z,dT as m,eB as M,bQ as v,a7 as O,a8 as L,fe as j,ff as t,aL as x,aN as U,h1 as R,a6 as T,eX as _,dN as q,h2 as W,h3 as Z,h4 as Q,h5 as H}from"./index-Cjv2Ynte.js";import{S as C}from"./source-object3d-authoring-adapter-CRQ5Iruy.js";import{a as J}from"./project-provenance-BGnJXJwa.js";import{object3DAuthoringSubjectOf as K}from"./object3d-authoring-subject-XccsO0xG.js";import{getUserData as S}from"./user-data-CODoGZqA.js";import{r as b}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{fo as X}from"./three.core-3arARmh6.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./user-data-DxeJHxTz.js";import"./workspace-arrangement-Bq8u7HUK.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./editor-layers-CYVQVJ5O.js";import"./three-CAVY58Dv.js";import"./component-instance-root-Ctbx3vOO.js";import"./entity-object-C6hm5vYx.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-projection-core-BnoDtdZY.js";import"./object-marks-BnvSuCTt.js";function Y(n,r){return r instanceof C&&n?.id===r.documentId}function ee(n,r){return r instanceof C&&n!==null&&n.id!==r.documentId}function s({children:n,code:r=!1}){return e.jsx(x,{variant:r?"code":"body",selectable:!0,truncate:!0,title:typeof n=="string"?n:void 0,children:n})}function D(n){let r=null;return n?.traverse(i=>{!r&&S(i,"gaussianSplat")&&(r=i)}),r}function ne({splat:n}){const r=S(n,"gaussianSplat"),i=n.getBoundingBox().getSize(new X);return e.jsxs(j,{children:[e.jsx(t,{label:"Gaussians",children:e.jsx(s,{children:r.numSplats.toLocaleString()})}),e.jsx(t,{label:"Format",children:e.jsx(s,{children:"SPZ"})}),e.jsx(t,{label:"Bounds",children:e.jsx(s,{children:`${i.x.toFixed(2)} × ${i.y.toFixed(2)} × ${i.z.toFixed(2)}`})}),e.jsx(t,{label:"Level of detail",children:e.jsx(s,{children:"Full source"})}),e.jsx(t,{label:"Picking",children:e.jsx(s,{children:"Gaussian raycast"})}),e.jsx(t,{label:"Collision",hint:"Gaussian splats are visual environment data; use a separate mesh collider.",children:e.jsx(s,{children:"Separate collider required"})})]})}function te({inspection:n,rig:r}){if(!n)return e.jsx(M,{compact:!0,tone:"error",title:"Model unavailable",description:"The native Object3D graph could not be inspected."});const i=[...n.meshes===0?["The asset has no renderable geometry."]:[],...n.geometry.nonFiniteAttributeValues>0?[`${n.geometry.nonFiniteAttributeValues.toLocaleString()} non-finite geometry values can break bounds and selection.`]:[],...r&&!r.valid?["Rig or animation bindings require attention."]:[]];return e.jsxs(e.Fragment,{children:[i.length>0&&e.jsx(v,{tone:"warning",icon:e.jsx(O,{icon:L.status.warning}),children:e.jsx("div",{children:i.map(o=>e.jsx("div",{children:o},o))})}),e.jsxs(j,{children:[e.jsx(t,{label:"Meshes",children:e.jsx(s,{children:n.meshes.toLocaleString()})}),e.jsx(t,{label:"Primitives",children:e.jsx(s,{children:n.primitives.toLocaleString()})}),e.jsx(t,{label:"Vertices",children:e.jsx(s,{children:n.vertices.toLocaleString()})}),e.jsx(t,{label:"Triangles",children:e.jsx(s,{children:n.triangles.toLocaleString()})}),e.jsx(t,{label:"Indexing",children:e.jsxs(s,{children:[n.geometry.indexedMeshes," indexed · ",n.geometry.nonIndexedMeshes," ","non-indexed"]})}),e.jsx(t,{label:"Attributes",children:e.jsx(s,{children:n.geometry.attributes.map(o=>o.name).join(", ")||"None"})}),e.jsx(t,{label:"UV channels",children:e.jsx(s,{children:n.geometry.uvChannels.join(", ")||"None"})}),e.jsx(t,{label:"Morph targets",children:e.jsx(s,{children:n.morphTargets})}),e.jsx(t,{label:"Bounds",children:e.jsx(s,{children:n.bounds?`${n.bounds.x.toFixed(2)} × ${n.bounds.y.toFixed(2)} × ${n.bounds.z.toFixed(2)}`:"None"})}),e.jsx(t,{label:"GPU estimate",children:e.jsxs(s,{children:[(n.memoryBytes/1048576).toFixed(2)," MiB"]})}),e.jsx(t,{label:"Invalid values",children:e.jsx(x,{tone:n.geometry.nonFiniteAttributeValues?"warning":"muted",children:n.geometry.nonFiniteAttributeValues.toLocaleString()})}),e.jsx(t,{label:"LODs",children:e.jsx(s,{children:n.geometry.lodGroups?`${n.geometry.lodLevels} levels`:"Not authored"})}),e.jsx(t,{label:"Collision",hint:"Collision remains a source/import operation when no model metadata exists.",children:e.jsx(s,{children:"Not authored"})})]})]})}function re({rig:n}){const r=[["Non-normalized weights",n.nonNormalizedVertices],["Zero-weight vertices",n.zeroWeightVertices],["Invalid joint indices",n.invalidJointIndices],["Inverse-bind mismatches",n.inverseBindMismatches],["External bones",n.externalBones],["Non-finite animation values",n.nonFiniteAnimationValues],["Unresolved track targets",n.unresolvedTrackTargets.length]];return e.jsxs(e.Fragment,{children:[!n.valid&&e.jsx(v,{tone:"warning",icon:e.jsx(O,{icon:L.status.warning}),children:"Review the non-zero integrity checks below."}),e.jsxs(j,{children:[e.jsx(t,{label:"Deformation",children:e.jsx(s,{children:n.kind==="skinned"?"Skinned mesh":"Rigid attachments"})}),e.jsx(t,{label:"Bones",children:e.jsx(s,{children:n.uniqueBones})}),e.jsx(t,{label:"Root bones",children:e.jsx(s,{children:n.rootBones.join(", ")||"None"})}),n.kind==="skinned"?e.jsxs(e.Fragment,{children:[e.jsx(t,{label:"Skeletons",children:e.jsx(s,{children:n.skeletons})}),e.jsx(t,{label:"Bind mode",children:e.jsx(s,{children:n.bindModes.join(", ")||"None"})}),e.jsx(t,{label:"Weighted vertices",children:e.jsx(s,{children:n.weightedVertices.toLocaleString()})})]}):null,r.filter(([,i])=>i>0).map(([i,o])=>e.jsx(t,{label:i,children:e.jsx(x,{tone:"warning",children:o.toLocaleString()})},i)),n.unresolvedTrackTargets.length?e.jsx(t,{label:"Missing targets",children:e.jsx(s,{children:n.unresolvedTrackTargets.join(", ")})}):null]})]})}function se({adapter:n,inspection:r}){const[i,o]=b.useState(""),a=n.documentRootObject,d=(r?.materialSlots??[]).map((l,u)=>({material:l,rowKey:`${l.id}:${u}`})).filter(({material:l})=>`${l.name} ${l.type} ${l.textureSlots.join(" ")}`.toLowerCase().includes(i.trim().toLowerCase())),c=l=>{if(!a)return;const u=P(a,{id:l})[0],p=u?n.hierarchy.idForObject3D?.(u):null;p&&_(n,[p])};return e.jsxs(e.Fragment,{children:[e.jsx(j,{children:e.jsx(t,{label:"Filter",htmlFor:"model-material-filter",children:e.jsx(U,{id:"model-material-filter",type:"search",value:i,placeholder:"Name, type, or map",onChange:l=>o(l.target.value)})})}),e.jsxs("div",{className:"volter-model-inspector-list",children:[d.map(({material:l,rowKey:u})=>e.jsxs(R,{variant:"raised",border:!0,className:"volter-model-inspector-row",children:[e.jsx("span",{className:"volter-model-material-swatch",style:{background:l.color??void 0},"aria-hidden":"true"}),e.jsxs("div",{children:[e.jsx(x,{as:"strong",variant:"label",truncate:!0,children:l.name}),e.jsxs(x,{variant:"caption",tone:"muted",truncate:!0,children:[l.type," · ",l.usageCount," object",l.usageCount===1?"":"s"," ","· ",l.textureSlots.join(", ")||"no maps",l.transparent?" · transparent":""]})]}),e.jsx(T,{type:"button",variant:"ghost",size:"compact",onClick:()=>c(l.id),children:"Inspect"})]},u)),d.length===0?e.jsx(M,{compact:!0,title:"No matching materials"}):null]})]})}function ie({adapter:n,provenance:r,provenanceLoaded:i}){b.useSyncExternalStore(q,W);const o=r?Z().find(a=>a.tool?.name===r.operationName):void 0;return e.jsxs(e.Fragment,{children:[o?e.jsx("div",{className:"volter-model-inspector-actions",children:e.jsx(T,{type:"button",variant:"ghost",size:"compact",onClick:()=>Q(o.id),children:"Open Source"})}):null,e.jsxs(j,{children:[e.jsx(t,{label:"Path",children:e.jsx(s,{code:!0,children:n.options.sourcePath})}),e.jsx(t,{label:"Truth",children:e.jsx(s,{children:n.provenance.label})}),e.jsx(t,{label:"Ownership",hint:n.provenance.detail,children:e.jsx(s,{children:n.provenance.source})}),i?null:e.jsx(t,{label:"Provenance",children:e.jsx(s,{children:"Loading…"})}),r?e.jsxs(e.Fragment,{children:[e.jsx(t,{label:"Generated by",children:e.jsx(s,{children:r.operationName})}),e.jsx(t,{label:"Tool",children:e.jsx(s,{code:!0,children:r.operationSource??"Not recorded"})}),e.jsx(t,{label:"Generated",children:e.jsx(s,{children:new Date(r.createdAt).toLocaleString()})}),e.jsx(t,{label:"Output hash",children:e.jsx(s,{code:!0,children:r.output.sha256})})]}):i?e.jsx(t,{label:"Provenance",children:e.jsx(s,{children:"Not recorded"})}):null]})]})}const k=new WeakMap;function oe(n){const r=n.documentRootObject??null;if(!r)return;const i=k.get(r);if(i!==void 0)return i??void 0;const o=D(r)?null:N(r),a=o?`${o.meshes} meshes · ${o.triangles.toLocaleString()} triangles`:null;return k.set(r,a),a??void 0}function le({adapter:n}){const r=n,[i,o]=b.useState(null),[a,d]=b.useState(!1),c=r.options.modelSource,l=c?.kind==="project-file"?c.path:null;return b.useEffect(()=>{let u=!1;if(d(!1),!l){o(null),d(!0);return}return J(l).then(p=>{u||(o(p),d(!0))},()=>{u||(o(null),d(!0))}),()=>{u=!0}},[l]),e.jsx("div",{"data-testid":"model-asset-inspector",children:e.jsx(ie,{adapter:r,provenance:i,provenanceLoaded:a})})}function ae({inspection:n}){return e.jsxs(j,{children:[e.jsx(t,{label:"Native type",children:e.jsx(s,{children:n.type})}),e.jsx(t,{label:"Visible",children:e.jsx(s,{children:n.visible?"Yes":"No"})}),e.jsx(t,{label:"Children",children:e.jsx(s,{children:n.children})}),e.jsx(t,{label:"Descendants",children:e.jsx(s,{children:n.descendants})}),e.jsx(t,{label:"Render order",children:e.jsx(s,{children:n.renderOrder})}),e.jsx(t,{label:"Layer mask",children:e.jsxs(s,{code:!0,children:["0x",n.layers.toString(16)]})})]})}function de({geometry:n}){return e.jsxs(e.Fragment,{children:[n.nonFiniteAttributeValues?e.jsxs(v,{tone:"warning",children:[n.nonFiniteAttributeValues.toLocaleString()," non-finite buffer values can break bounds, picking, and selection outlines."]}):null,e.jsxs(j,{children:[e.jsx(t,{label:"Vertices",children:e.jsx(s,{children:n.vertices.toLocaleString()})}),e.jsx(t,{label:"Triangles",children:e.jsx(s,{children:n.triangles.toLocaleString()})}),e.jsx(t,{label:"Index buffer",children:e.jsx(s,{children:n.indexed?"Indexed":"Non-indexed"})}),e.jsx(t,{label:"Attributes",children:e.jsx(s,{children:n.attributes.join(", ")})}),e.jsx(t,{label:"UV channels",children:e.jsx(s,{children:n.uvChannels.join(", ")||"None"})}),e.jsx(t,{label:"Morph targets",children:e.jsx(s,{children:n.morphTargets})}),e.jsx(t,{label:"Invalid values",children:e.jsx(x,{tone:n.nonFiniteAttributeValues?"warning":"muted",children:n.nonFiniteAttributeValues.toLocaleString()})})]})]})}function ce({materials:n}){return e.jsx("div",{className:"volter-model-inspector-list",children:n.map(r=>e.jsxs(R,{variant:"raised",border:!0,className:"volter-model-inspector-row",children:[e.jsx("span",{className:"volter-model-material-swatch",style:{background:r.color??void 0},"aria-hidden":"true"}),e.jsxs("div",{children:[e.jsx(x,{as:"strong",variant:"label",truncate:!0,children:r.name}),e.jsxs(x,{variant:"caption",tone:"muted",truncate:!0,children:[r.type," · ",r.textureSlots.join(", ")||"no maps"]})]})]},r.id))})}function ue({skin:n}){return e.jsxs(j,{children:[e.jsx(t,{label:"Bones",children:e.jsx(s,{children:n.bones})}),e.jsx(t,{label:"Root bones",children:e.jsx(s,{children:n.rootBones.join(", ")||"None"})}),e.jsx(t,{label:"Bind mode",children:e.jsx(s,{children:n.bindMode})})]})}function he({bone:n}){return e.jsxs(j,{children:[e.jsx(t,{label:"Parent",children:e.jsx(s,{children:n.parent??"Skeleton root"})}),e.jsx(t,{label:"Children",children:e.jsx(s,{children:n.children.join(", ")||"None"})})]})}const h={splat:m,geometry:m+10,rig:m+20,materials:m+40,source:m+50},je=new WeakMap,xe=new WeakMap,me=new WeakMap;function f(n,r,i){const o=n.get(r);if(o!==void 0)return o;const a=i();return n.set(r,a),a}function be(n){const r=n,i=r.documentRootObject,o=[],a=D(i);if(i&&a){const d=S(a,"gaussianSplat");o.push({id:"splat",title:"Gaussian Splat",icon:H,order:h.splat,description:`${d.numSplats.toLocaleString()} Gaussians · native SPZ`,body:{kind:"custom",render:()=>e.jsx(ne,{splat:a})}})}else if(i){const d=f(je,i,()=>N(i)),c=f(xe,i,()=>I(i)),l=oe(n);o.push({id:g,title:"Geometry",icon:B,order:h.geometry,...l?{description:l}:{},body:{kind:"custom",render:()=>e.jsx(te,{inspection:d,rig:c})}}),(c.skinnedMeshes>0||c.uniqueBones>0)&&o.push({id:"rig",title:"Rig",icon:F,order:h.rig,description:c.kind==="skinned"?`${c.uniqueBones} bones · ${c.skinnedMeshes} skinned meshes`:`${c.uniqueBones} bones · rigid hierarchy`,body:{kind:"custom",render:()=>e.jsx(re,{rig:c})}}),o.push({id:"materials",title:"Materials",icon:w,order:h.materials,description:`${d.materials} materials`,body:{kind:"custom",render:()=>e.jsx(se,{adapter:r,inspection:d})}})}return o.push({id:"source",title:"Source",icon:V,order:h.source,description:r.provenance.label,defaultOpen:!1,body:{kind:"custom",render:()=>e.jsx(le,{adapter:n})}}),r.options.audit===!1?o.filter(d=>d.id!==g&&d.id!=="source"):o}function pe(n,r){const i=n?$(r.hierarchy,n.id):null;if(!i)return[];if(K(i))return[];const o=f(me,i,()=>A(i)),a=[{id:g,title:"Object",icon:G,order:h.geometry,description:o.type,body:{kind:"custom",render:()=>e.jsx(ae,{inspection:o})}}],d=o.geometry;d&&a.push({id:"geometry",title:"Geometry",icon:B,order:h.geometry+1,description:`${d.triangles.toLocaleString()} triangles`,body:{kind:"custom",render:()=>e.jsx(de,{geometry:d})}}),o.materials.length>0&&a.push({id:"materials",title:"Materials",icon:w,order:h.materials,description:`${o.materials.length} slots`,body:{kind:"custom",render:()=>e.jsx(ce,{materials:o.materials})}});const c=o.skin;c&&a.push({id:"skin",title:"Skin",icon:F,order:h.rig,description:`${c.bones} bones`,body:{kind:"custom",render:()=>e.jsx(ue,{skin:c})}});const l=o.bone;return l&&a.push({id:"bone",title:"Bone",icon:z,order:h.rig+1,description:l.parent??"Skeleton root",body:{kind:"custom",render:()=>e.jsx(he,{bone:l})}}),a}const ge=E();function fe(){ge.ensure(n=>{n(y({match:Y,sections:(r,i)=>be(i)})),n(y({match:ee,sections:pe}))})}const qe="workspace.service";function We(){return fe(),()=>{}}export{qe as point,We as start};
1
+ import{a as e}from"./jsx-runtime-DPjLkJKQ.js";import{a as $}from"./three-contract-Dkt6PmWY.js";import{i as N,a as I,b as A,m as P}from"./model-inspection-BDA5jikL.js";import{eM as y,eO as E,by as B,eN as g,g_ as F,eS as w,g$ as V,h0 as G,bE as z,dT as m,eB as M,bQ as v,a7 as O,a8 as L,fe as j,ff as t,aL as x,aN as U,h1 as R,a6 as T,eX as _,dN as q,h2 as W,h3 as Z,h4 as Q,h5 as H}from"./index-ClgrFOcX.js";import{S as C}from"./source-object3d-authoring-adapter-DeeboYub.js";import{a as J}from"./project-provenance-BGnJXJwa.js";import{object3DAuthoringSubjectOf as K}from"./object3d-authoring-subject-XccsO0xG.js";import{getUserData as S}from"./user-data-CODoGZqA.js";import{r as b}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{fo as X}from"./three.core-3arARmh6.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./user-data-DL6HsBPf.js";import"./workspace-arrangement-86_8Kk5K.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./editor-layers-DwaX5UFy.js";import"./three-DWy0sZom.js";import"./component-instance-root-wO1p-rLr.js";import"./entity-object-BLJ-I8XT.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-projection-core-IUovHgg_.js";import"./object-marks-BnvSuCTt.js";function Y(n,r){return r instanceof C&&n?.id===r.documentId}function ee(n,r){return r instanceof C&&n!==null&&n.id!==r.documentId}function s({children:n,code:r=!1}){return e.jsx(x,{variant:r?"code":"body",selectable:!0,truncate:!0,title:typeof n=="string"?n:void 0,children:n})}function D(n){let r=null;return n?.traverse(i=>{!r&&S(i,"gaussianSplat")&&(r=i)}),r}function ne({splat:n}){const r=S(n,"gaussianSplat"),i=n.getBoundingBox().getSize(new X);return e.jsxs(j,{children:[e.jsx(t,{label:"Gaussians",children:e.jsx(s,{children:r.numSplats.toLocaleString()})}),e.jsx(t,{label:"Format",children:e.jsx(s,{children:"SPZ"})}),e.jsx(t,{label:"Bounds",children:e.jsx(s,{children:`${i.x.toFixed(2)} × ${i.y.toFixed(2)} × ${i.z.toFixed(2)}`})}),e.jsx(t,{label:"Level of detail",children:e.jsx(s,{children:"Full source"})}),e.jsx(t,{label:"Picking",children:e.jsx(s,{children:"Gaussian raycast"})}),e.jsx(t,{label:"Collision",hint:"Gaussian splats are visual environment data; use a separate mesh collider.",children:e.jsx(s,{children:"Separate collider required"})})]})}function te({inspection:n,rig:r}){if(!n)return e.jsx(M,{compact:!0,tone:"error",title:"Model unavailable",description:"The native Object3D graph could not be inspected."});const i=[...n.meshes===0?["The asset has no renderable geometry."]:[],...n.geometry.nonFiniteAttributeValues>0?[`${n.geometry.nonFiniteAttributeValues.toLocaleString()} non-finite geometry values can break bounds and selection.`]:[],...r&&!r.valid?["Rig or animation bindings require attention."]:[]];return e.jsxs(e.Fragment,{children:[i.length>0&&e.jsx(v,{tone:"warning",icon:e.jsx(O,{icon:L.status.warning}),children:e.jsx("div",{children:i.map(o=>e.jsx("div",{children:o},o))})}),e.jsxs(j,{children:[e.jsx(t,{label:"Meshes",children:e.jsx(s,{children:n.meshes.toLocaleString()})}),e.jsx(t,{label:"Primitives",children:e.jsx(s,{children:n.primitives.toLocaleString()})}),e.jsx(t,{label:"Vertices",children:e.jsx(s,{children:n.vertices.toLocaleString()})}),e.jsx(t,{label:"Triangles",children:e.jsx(s,{children:n.triangles.toLocaleString()})}),e.jsx(t,{label:"Indexing",children:e.jsxs(s,{children:[n.geometry.indexedMeshes," indexed · ",n.geometry.nonIndexedMeshes," ","non-indexed"]})}),e.jsx(t,{label:"Attributes",children:e.jsx(s,{children:n.geometry.attributes.map(o=>o.name).join(", ")||"None"})}),e.jsx(t,{label:"UV channels",children:e.jsx(s,{children:n.geometry.uvChannels.join(", ")||"None"})}),e.jsx(t,{label:"Morph targets",children:e.jsx(s,{children:n.morphTargets})}),e.jsx(t,{label:"Bounds",children:e.jsx(s,{children:n.bounds?`${n.bounds.x.toFixed(2)} × ${n.bounds.y.toFixed(2)} × ${n.bounds.z.toFixed(2)}`:"None"})}),e.jsx(t,{label:"GPU estimate",children:e.jsxs(s,{children:[(n.memoryBytes/1048576).toFixed(2)," MiB"]})}),e.jsx(t,{label:"Invalid values",children:e.jsx(x,{tone:n.geometry.nonFiniteAttributeValues?"warning":"muted",children:n.geometry.nonFiniteAttributeValues.toLocaleString()})}),e.jsx(t,{label:"LODs",children:e.jsx(s,{children:n.geometry.lodGroups?`${n.geometry.lodLevels} levels`:"Not authored"})}),e.jsx(t,{label:"Collision",hint:"Collision remains a source/import operation when no model metadata exists.",children:e.jsx(s,{children:"Not authored"})})]})]})}function re({rig:n}){const r=[["Non-normalized weights",n.nonNormalizedVertices],["Zero-weight vertices",n.zeroWeightVertices],["Invalid joint indices",n.invalidJointIndices],["Inverse-bind mismatches",n.inverseBindMismatches],["External bones",n.externalBones],["Non-finite animation values",n.nonFiniteAnimationValues],["Unresolved track targets",n.unresolvedTrackTargets.length]];return e.jsxs(e.Fragment,{children:[!n.valid&&e.jsx(v,{tone:"warning",icon:e.jsx(O,{icon:L.status.warning}),children:"Review the non-zero integrity checks below."}),e.jsxs(j,{children:[e.jsx(t,{label:"Deformation",children:e.jsx(s,{children:n.kind==="skinned"?"Skinned mesh":"Rigid attachments"})}),e.jsx(t,{label:"Bones",children:e.jsx(s,{children:n.uniqueBones})}),e.jsx(t,{label:"Root bones",children:e.jsx(s,{children:n.rootBones.join(", ")||"None"})}),n.kind==="skinned"?e.jsxs(e.Fragment,{children:[e.jsx(t,{label:"Skeletons",children:e.jsx(s,{children:n.skeletons})}),e.jsx(t,{label:"Bind mode",children:e.jsx(s,{children:n.bindModes.join(", ")||"None"})}),e.jsx(t,{label:"Weighted vertices",children:e.jsx(s,{children:n.weightedVertices.toLocaleString()})})]}):null,r.filter(([,i])=>i>0).map(([i,o])=>e.jsx(t,{label:i,children:e.jsx(x,{tone:"warning",children:o.toLocaleString()})},i)),n.unresolvedTrackTargets.length?e.jsx(t,{label:"Missing targets",children:e.jsx(s,{children:n.unresolvedTrackTargets.join(", ")})}):null]})]})}function se({adapter:n,inspection:r}){const[i,o]=b.useState(""),a=n.documentRootObject,d=(r?.materialSlots??[]).map((l,u)=>({material:l,rowKey:`${l.id}:${u}`})).filter(({material:l})=>`${l.name} ${l.type} ${l.textureSlots.join(" ")}`.toLowerCase().includes(i.trim().toLowerCase())),c=l=>{if(!a)return;const u=P(a,{id:l})[0],p=u?n.hierarchy.idForObject3D?.(u):null;p&&_(n,[p])};return e.jsxs(e.Fragment,{children:[e.jsx(j,{children:e.jsx(t,{label:"Filter",htmlFor:"model-material-filter",children:e.jsx(U,{id:"model-material-filter",type:"search",value:i,placeholder:"Name, type, or map",onChange:l=>o(l.target.value)})})}),e.jsxs("div",{className:"volter-model-inspector-list",children:[d.map(({material:l,rowKey:u})=>e.jsxs(R,{variant:"raised",border:!0,className:"volter-model-inspector-row",children:[e.jsx("span",{className:"volter-model-material-swatch",style:{background:l.color??void 0},"aria-hidden":"true"}),e.jsxs("div",{children:[e.jsx(x,{as:"strong",variant:"label",truncate:!0,children:l.name}),e.jsxs(x,{variant:"caption",tone:"muted",truncate:!0,children:[l.type," · ",l.usageCount," object",l.usageCount===1?"":"s"," ","· ",l.textureSlots.join(", ")||"no maps",l.transparent?" · transparent":""]})]}),e.jsx(T,{type:"button",variant:"ghost",size:"compact",onClick:()=>c(l.id),children:"Inspect"})]},u)),d.length===0?e.jsx(M,{compact:!0,title:"No matching materials"}):null]})]})}function ie({adapter:n,provenance:r,provenanceLoaded:i}){b.useSyncExternalStore(q,W);const o=r?Z().find(a=>a.tool?.name===r.operationName):void 0;return e.jsxs(e.Fragment,{children:[o?e.jsx("div",{className:"volter-model-inspector-actions",children:e.jsx(T,{type:"button",variant:"ghost",size:"compact",onClick:()=>Q(o.id),children:"Open Source"})}):null,e.jsxs(j,{children:[e.jsx(t,{label:"Path",children:e.jsx(s,{code:!0,children:n.options.sourcePath})}),e.jsx(t,{label:"Truth",children:e.jsx(s,{children:n.provenance.label})}),e.jsx(t,{label:"Ownership",hint:n.provenance.detail,children:e.jsx(s,{children:n.provenance.source})}),i?null:e.jsx(t,{label:"Provenance",children:e.jsx(s,{children:"Loading…"})}),r?e.jsxs(e.Fragment,{children:[e.jsx(t,{label:"Generated by",children:e.jsx(s,{children:r.operationName})}),e.jsx(t,{label:"Tool",children:e.jsx(s,{code:!0,children:r.operationSource??"Not recorded"})}),e.jsx(t,{label:"Generated",children:e.jsx(s,{children:new Date(r.createdAt).toLocaleString()})}),e.jsx(t,{label:"Output hash",children:e.jsx(s,{code:!0,children:r.output.sha256})})]}):i?e.jsx(t,{label:"Provenance",children:e.jsx(s,{children:"Not recorded"})}):null]})]})}const k=new WeakMap;function oe(n){const r=n.documentRootObject??null;if(!r)return;const i=k.get(r);if(i!==void 0)return i??void 0;const o=D(r)?null:N(r),a=o?`${o.meshes} meshes · ${o.triangles.toLocaleString()} triangles`:null;return k.set(r,a),a??void 0}function le({adapter:n}){const r=n,[i,o]=b.useState(null),[a,d]=b.useState(!1),c=r.options.modelSource,l=c?.kind==="project-file"?c.path:null;return b.useEffect(()=>{let u=!1;if(d(!1),!l){o(null),d(!0);return}return J(l).then(p=>{u||(o(p),d(!0))},()=>{u||(o(null),d(!0))}),()=>{u=!0}},[l]),e.jsx("div",{"data-testid":"model-asset-inspector",children:e.jsx(ie,{adapter:r,provenance:i,provenanceLoaded:a})})}function ae({inspection:n}){return e.jsxs(j,{children:[e.jsx(t,{label:"Native type",children:e.jsx(s,{children:n.type})}),e.jsx(t,{label:"Visible",children:e.jsx(s,{children:n.visible?"Yes":"No"})}),e.jsx(t,{label:"Children",children:e.jsx(s,{children:n.children})}),e.jsx(t,{label:"Descendants",children:e.jsx(s,{children:n.descendants})}),e.jsx(t,{label:"Render order",children:e.jsx(s,{children:n.renderOrder})}),e.jsx(t,{label:"Layer mask",children:e.jsxs(s,{code:!0,children:["0x",n.layers.toString(16)]})})]})}function de({geometry:n}){return e.jsxs(e.Fragment,{children:[n.nonFiniteAttributeValues?e.jsxs(v,{tone:"warning",children:[n.nonFiniteAttributeValues.toLocaleString()," non-finite buffer values can break bounds, picking, and selection outlines."]}):null,e.jsxs(j,{children:[e.jsx(t,{label:"Vertices",children:e.jsx(s,{children:n.vertices.toLocaleString()})}),e.jsx(t,{label:"Triangles",children:e.jsx(s,{children:n.triangles.toLocaleString()})}),e.jsx(t,{label:"Index buffer",children:e.jsx(s,{children:n.indexed?"Indexed":"Non-indexed"})}),e.jsx(t,{label:"Attributes",children:e.jsx(s,{children:n.attributes.join(", ")})}),e.jsx(t,{label:"UV channels",children:e.jsx(s,{children:n.uvChannels.join(", ")||"None"})}),e.jsx(t,{label:"Morph targets",children:e.jsx(s,{children:n.morphTargets})}),e.jsx(t,{label:"Invalid values",children:e.jsx(x,{tone:n.nonFiniteAttributeValues?"warning":"muted",children:n.nonFiniteAttributeValues.toLocaleString()})})]})]})}function ce({materials:n}){return e.jsx("div",{className:"volter-model-inspector-list",children:n.map(r=>e.jsxs(R,{variant:"raised",border:!0,className:"volter-model-inspector-row",children:[e.jsx("span",{className:"volter-model-material-swatch",style:{background:r.color??void 0},"aria-hidden":"true"}),e.jsxs("div",{children:[e.jsx(x,{as:"strong",variant:"label",truncate:!0,children:r.name}),e.jsxs(x,{variant:"caption",tone:"muted",truncate:!0,children:[r.type," · ",r.textureSlots.join(", ")||"no maps"]})]})]},r.id))})}function ue({skin:n}){return e.jsxs(j,{children:[e.jsx(t,{label:"Bones",children:e.jsx(s,{children:n.bones})}),e.jsx(t,{label:"Root bones",children:e.jsx(s,{children:n.rootBones.join(", ")||"None"})}),e.jsx(t,{label:"Bind mode",children:e.jsx(s,{children:n.bindMode})})]})}function he({bone:n}){return e.jsxs(j,{children:[e.jsx(t,{label:"Parent",children:e.jsx(s,{children:n.parent??"Skeleton root"})}),e.jsx(t,{label:"Children",children:e.jsx(s,{children:n.children.join(", ")||"None"})})]})}const h={splat:m,geometry:m+10,rig:m+20,materials:m+40,source:m+50},je=new WeakMap,xe=new WeakMap,me=new WeakMap;function f(n,r,i){const o=n.get(r);if(o!==void 0)return o;const a=i();return n.set(r,a),a}function be(n){const r=n,i=r.documentRootObject,o=[],a=D(i);if(i&&a){const d=S(a,"gaussianSplat");o.push({id:"splat",title:"Gaussian Splat",icon:H,order:h.splat,description:`${d.numSplats.toLocaleString()} Gaussians · native SPZ`,body:{kind:"custom",render:()=>e.jsx(ne,{splat:a})}})}else if(i){const d=f(je,i,()=>N(i)),c=f(xe,i,()=>I(i)),l=oe(n);o.push({id:g,title:"Geometry",icon:B,order:h.geometry,...l?{description:l}:{},body:{kind:"custom",render:()=>e.jsx(te,{inspection:d,rig:c})}}),(c.skinnedMeshes>0||c.uniqueBones>0)&&o.push({id:"rig",title:"Rig",icon:F,order:h.rig,description:c.kind==="skinned"?`${c.uniqueBones} bones · ${c.skinnedMeshes} skinned meshes`:`${c.uniqueBones} bones · rigid hierarchy`,body:{kind:"custom",render:()=>e.jsx(re,{rig:c})}}),o.push({id:"materials",title:"Materials",icon:w,order:h.materials,description:`${d.materials} materials`,body:{kind:"custom",render:()=>e.jsx(se,{adapter:r,inspection:d})}})}return o.push({id:"source",title:"Source",icon:V,order:h.source,description:r.provenance.label,defaultOpen:!1,body:{kind:"custom",render:()=>e.jsx(le,{adapter:n})}}),r.options.audit===!1?o.filter(d=>d.id!==g&&d.id!=="source"):o}function pe(n,r){const i=n?$(r.hierarchy,n.id):null;if(!i)return[];if(K(i))return[];const o=f(me,i,()=>A(i)),a=[{id:g,title:"Object",icon:G,order:h.geometry,description:o.type,body:{kind:"custom",render:()=>e.jsx(ae,{inspection:o})}}],d=o.geometry;d&&a.push({id:"geometry",title:"Geometry",icon:B,order:h.geometry+1,description:`${d.triangles.toLocaleString()} triangles`,body:{kind:"custom",render:()=>e.jsx(de,{geometry:d})}}),o.materials.length>0&&a.push({id:"materials",title:"Materials",icon:w,order:h.materials,description:`${o.materials.length} slots`,body:{kind:"custom",render:()=>e.jsx(ce,{materials:o.materials})}});const c=o.skin;c&&a.push({id:"skin",title:"Skin",icon:F,order:h.rig,description:`${c.bones} bones`,body:{kind:"custom",render:()=>e.jsx(ue,{skin:c})}});const l=o.bone;return l&&a.push({id:"bone",title:"Bone",icon:z,order:h.rig+1,description:l.parent??"Skeleton root",body:{kind:"custom",render:()=>e.jsx(he,{bone:l})}}),a}const ge=E();function fe(){ge.ensure(n=>{n(y({match:Y,sections:(r,i)=>be(i)})),n(y({match:ee,sections:pe}))})}const qe="workspace.service";function We(){return fe(),()=>{}}export{qe as point,We as start};
@@ -1 +1 @@
1
- import{g as q}from"./user-data-DxeJHxTz.js";import{fo as N,dk as W,I as X,cm as F}from"./three.core-3arARmh6.js";function de(e,t){return t.skinnedMeshes>0?"skinned":t.uniqueBones>0?"rigged":e.clips>0?"animated":"static"}const Y=["map","alphaMap","aoMap","bumpMap","displacementMap","emissiveMap","envMap","lightMap","metalnessMap","normalMap","roughnessMap","specularMap"];function Z(e){if(!("color"in e))return null;const t=e.color;return t?.isColor===!0?`#${t.getHexString()}`:null}function E(e){let t=0;for(const n of Object.values(e.attributes)){const s=n.array;for(let i=0;i<s.length;i++)Number.isFinite(Number(s[i]))||t++}return t}function H(e){if(!e)return null;const t=new X,n=new N;for(let s=0;s<e.count;s++)n.set(e.getX(s),e.getY(s),e.getZ(s)),Number.isFinite(n.x)&&Number.isFinite(n.y)&&Number.isFinite(n.z)&&t.expandByPoint(n);return t.isEmpty()?null:t}function G(e){const t=H(e.getAttribute("position"));if(!t)return null;for(const n of e.morphAttributes.position??[]){const s=H(n);s&&(e.morphTargetsRelative?(t.expandByPoint(new N().addVectors(t.min,s.min)),t.expandByPoint(new N().addVectors(t.max,s.max))):t.union(s))}return t}function J(e){return e.matrixAutoUpdate?new F().compose(e.position,e.quaternion,e.scale):e.matrix.clone()}function R(e,t,n){if(q(t,"editorHelper")||t.isSkeletonHelper)return;const s=t;if(!s.isMesh&&!s.isLine&&!s.isPoints||!s.geometry)return;const i=G(s.geometry);if(!i)return;const r=t;if(!r.isInstancedMesh){e.union(i.clone().applyMatrix4(n));return}const l=new F;for(let a=0;a<r.count;a++)r.getMatrixAt(a,l),e.union(i.clone().applyMatrix4(new F().multiplyMatrices(n,l)))}function K(e){const t=new X,n=[];for(let r=e.parent;r;r=r.parent)n.push(r);const s=new F;for(let r=n.length-1;r>=0;r--)s.multiply(J(n[r]));const i=(r,l)=>{const a=new F().multiplyMatrices(l,J(r));R(t,r,a);for(const p of r.children)i(p,a)};return i(e,s),t.isEmpty()?null:t}function me(e){const t=new Set,n=new Set,s=new Map,i=new Map,r=new Map,l=new Set,a=[],p=[];let M=0,v=0,x=0,h=0,T=0,A=0,C=0,S=0,f=0,d=0,b=0,z=0,L=0,P=0,D=0;e.traverse(o=>{if(q(o,"editorHelper")||o.isSkeletonHelper)return;M++;let c=0;for(let u=o.parent;u&&u!==e.parent;u=u.parent)c++;p.push({id:o.uuid,name:o.name||o.type,type:o.type,depth:c}),o.isBone&&A++,o.isLOD&&(P++,D+=o.levels.length);const g=o,B=o;if(!B.isMesh&&!B.isLine&&!B.isPoints)return;v++,g.isInstancedMesh&&b++,g.isSkinnedMesh&&z++;const m=g.geometry;if(m){L+=E(m);const u=m.getAttribute("position");h+=u?.count??0,T+=m.index?Math.floor(m.index.count/3):Math.floor((u?.count??0)/3),x+=Math.max(m.groups.length,1),C+=m.morphAttributes.position?.length??0,m.index?(f++,S+=m.index.array.byteLength):d++;for(const[k,V]of Object.entries(m.attributes)){S+=V.array.byteLength;const y=r.get(k)??{itemSize:V.itemSize,meshes:0};y.meshes++,r.set(k,y),/^uv\d*$/.test(k)&&l.add(k)}}const O=Array.isArray(g.material)?g.material:g.material?[g.material]:[];for(const u of O){t.add(u);const k=i.get(u)??new Set;k.add(o),i.set(u,k);const V=s.get(u)??[];for(const y of Y){const w=u[y];if(w?.isTexture!==!0)continue;n.add(w),V.includes(y)||V.push(y);const $=w.image;a.some(U=>U.materialId===u.uuid&&U.slot===y)||a.push({materialId:u.uuid,materialName:u.name||u.type,slot:y,textureName:w.name||w.source.data?.src||"Texture",width:$?.width??null,height:$?.height??null,format:w.format,colorSpace:w.colorSpace||"none"})}s.set(u,V)}});for(const o of n){const c=o.image;S+=(c?.width??0)*(c?.height??0)*4}const I=K(e)?.getSize(new N)??null;return{nodes:M,meshes:v,primitives:x,vertices:h,triangles:T,materials:t.size,textures:n.size,bones:A,clips:e.animations.length,morphTargets:C,memoryBytes:S,bounds:I?{x:I.x,y:I.y,z:I.z}:null,geometry:{attributes:[...r.entries()].map(([o,c])=>({name:o,itemSize:c.itemSize,meshCount:c.meshes})).sort((o,c)=>o.name.localeCompare(c.name)),uvChannels:[...l].sort(),indexedMeshes:f,nonIndexedMeshes:d,instancedMeshes:b,skinnedMeshes:z,nonFiniteAttributeValues:L,lodGroups:P,lodLevels:D},animationClips:e.animations.map((o,c)=>{const g=new Set;let B=0;for(const m of o.tracks){B+=m.times.length;const O=W.parseTrackName(m.name);O.nodeName&&g.add(O.nodeName)}return{id:`${c}:${o.uuid}`,name:o.name||`Clip ${c+1}`,duration:o.duration,tracks:o.tracks.length,keyframes:B,targets:[...g].sort(),rootMotion:ae(o).length>1}}),hierarchy:p,materialNames:[...t].map(o=>o.name||o.type),textureNames:[...n].map(o=>o.name||o.source.data?.src||"Texture"),materialSlots:[...t].map(o=>({id:o.uuid,name:o.name||o.type,type:o.type,textureSlots:s.get(o)??[],usageCount:i.get(o)?.size??0,meshNames:[...i.get(o)??[]].map(c=>c.name||c.type).sort(),color:Z(o),transparent:o.transparent})),textureBindings:a}}function Q(e){const t=e.geometry.getAttribute("skinIndex"),n=e.geometry.getAttribute("skinWeight");if(!t||!n)return{weightedVertices:0,nonNormalizedVertices:0,zeroWeightVertices:0,invalidJointIndices:0};const s=Math.min(t.count,n.count);let i=0,r=0,l=0;for(let a=0;a<s;a++){const p=[n.getX(a),n.getY(a),n.getZ(a),n.getW(a)],M=[t.getX(a),t.getY(a),t.getZ(a),t.getW(a)],v=p.reduce((x,h)=>x+h,0);v<=1e-6?r++:Math.abs(v-1)>.001&&i++,l+=p.filter((x,h)=>x>1e-6&&(M[h]<0||M[h]>=e.skeleton.bones.length)).length}return{weightedVertices:s,nonNormalizedVertices:i,zeroWeightVertices:r,invalidJointIndices:l}}function _(e){let t=0;for(const n of e.times)Number.isFinite(n)||t++;for(const n of e.values)Number.isFinite(n)||t++;return t}function j(e,t){const n=W.parseTrackName(t.name).nodeName;return n&&!W.findNode(e,n)?n:null}function ee(e){let t=0;const n=new Set;for(const s of e.animations)for(const i of s.tracks){t+=_(i);const r=j(e,i);r&&n.add(r)}return{nonFiniteValues:t,unresolvedTargets:n}}function fe(e){const t=new Set,n=new Set,s=new Set;let i=0,r=0,l=0,a=0,p=0,M=0;const v=new Set,x=new Set,h=new Set;e.traverse(f=>{t.add(f);const d=f;d.isBone&&s.add(d)}),e.traverse(f=>{const d=f;if(!d.isSkinnedMesh)return;i++,h.add(d.bindMode),n.add(d.skeleton),d.skeleton.bones.length!==d.skeleton.boneInverses.length&&M++;for(const z of d.skeleton.bones)s.add(z),t.has(z)||v.add(z);const b=Q(d);r+=b.weightedVertices,l+=b.nonNormalizedVertices,a+=b.zeroWeightVertices,p+=b.invalidJointIndices});const T=ee(e);for(const f of s)(!f.parent?.isBone||!s.has(f.parent))&&x.add(f.name||f.uuid);const A=T.nonFiniteValues,C=T.unresolvedTargets,S=l===0&&a===0&&p===0&&M===0&&v.size===0&&A===0&&C.size===0;return{kind:i>0?"skinned":s.size>0?"rigid":"none",skinnedMeshes:i,skeletons:n.size,uniqueBones:s.size,weightedVertices:r,nonNormalizedVertices:l,zeroWeightVertices:a,invalidJointIndices:p,inverseBindMismatches:M,externalBones:v.size,nonFiniteAnimationValues:A,unresolvedTrackTargets:[...C].sort(),rootBones:[...x].sort(),bindModes:[...h].sort(),valid:S}}function te(e){if(!e)return null;const t=G(e)?.getSize(new N),n=e.getAttribute("position");return{vertices:n?.count??0,triangles:Math.floor((e.index?.count??n?.count??0)/3),indexed:e.index!==null,attributes:Object.keys(e.attributes).sort(),uvChannels:Object.keys(e.attributes).filter(s=>/^uv\d*$/.test(s)).sort(),morphTargets:e.morphAttributes.position?.length??0,nonFiniteAttributeValues:E(e),bounds:t?{x:t.x,y:t.y,z:t.z}:null}}function ne(e){return(Array.isArray(e.material)?e.material:e.material?[e.material]:[]).map(n=>({id:n.uuid,name:n.name||n.type,type:n.type,color:Z(n),textureSlots:Y.filter(s=>n[s]?.isTexture===!0)}))}function se(e){const t=e;return t.isSkinnedMesh?{bones:t.skeleton.bones.length,rootBones:t.skeleton.bones.filter(n=>!n.parent?.isBone).map(n=>n.name||n.uuid),bindMode:t.bindMode}:null}function ie(e){const t=e;return t.isBone?{parent:t.parent?.isBone&&(t.parent?.name||t.parent?.uuid)||null,children:t.children.filter(n=>n.isBone).map(n=>n.name||n.uuid)}:null}function pe(e){let t=-1;e.traverse(()=>t++);const n=e;return{type:e.type,visible:e.visible,children:e.children.length,descendants:t,renderOrder:e.renderOrder,layers:e.layers.mask,geometry:te(n.geometry),materials:ne(n),skin:se(e),bone:ie(e)}}function he(e,t){if(t&&!oe(t))return null;const n=e.clone().normalize();for(const s of["front","back","left","right","top","bottom"])if(re(s).angleTo(n)<.0087)return`${s[0]?.toUpperCase()}${s.slice(1)}`;return null}function oe(e){const t=e.clone().normalize();return Math.max(Math.abs(t.x),Math.abs(t.y),Math.abs(t.z))>Math.cos(.0087)}function re(e){const t={front:[0,0,1],back:[0,0,-1],left:[-1,0,0],right:[1,0,0],top:[0,1,0],bottom:[0,-1,0],isometric:[1,.72,1]};return new N(...t[e]).normalize()}function ge(e){let t=!1,n=!1,s=!1,i=!1;return e.traverse(r=>{const l=r;t||=!!l.geometry?.getAttribute("uv"),n||=!!l.geometry?.getAttribute("color"),s||=!!(r.isBone||l.isSkinnedMesh),i||=r.isLOD===!0}),[{mode:"lit",available:!0},{mode:"unlit",available:!0},{mode:"wireframe",available:!0},{mode:"normals",available:!0},{mode:"uv",available:t,...t?{}:{reason:"No UV channel"}},{mode:"vertex-colors",available:n,...n?{}:{reason:"No vertex colors"}},{mode:"bounds",available:!0},{mode:"skeleton",available:s,...s?{}:{reason:"No skeleton"}},{mode:"collision",available:!1,reason:"No collision metadata"},{mode:"lod",available:i,...i?{}:{reason:"No LOD groups"}}]}function ae(e){const t=e.tracks.filter(i=>i.ValueTypeName==="vector"&&i.name.toLowerCase().endsWith(".position")),n=t.find(i=>/(^|[./])(root|hips|armature)[./]/i.test(i.name))??t[0];if(!n||n.values.length<6)return[];const s=[];for(let i=0;i+2<n.values.length;i+=3)s.push(new N(n.values[i],n.values[i+1],n.values[i+2]));return s}function Me(e,t){const n=[];return e.traverse(s=>{const i=s;(Array.isArray(i.material)?i.material:i.material?[i.material]:[]).some(l=>l.uuid===t.id)&&n.push(i)}),n}export{fe as a,pe as b,de as c,he as d,oe as e,re as f,me as i,Me as m,ge as s};
1
+ import{g as q}from"./user-data-DL6HsBPf.js";import{fo as N,dk as W,I as X,cm as F}from"./three.core-3arARmh6.js";function de(e,t){return t.skinnedMeshes>0?"skinned":t.uniqueBones>0?"rigged":e.clips>0?"animated":"static"}const Y=["map","alphaMap","aoMap","bumpMap","displacementMap","emissiveMap","envMap","lightMap","metalnessMap","normalMap","roughnessMap","specularMap"];function Z(e){if(!("color"in e))return null;const t=e.color;return t?.isColor===!0?`#${t.getHexString()}`:null}function E(e){let t=0;for(const n of Object.values(e.attributes)){const s=n.array;for(let i=0;i<s.length;i++)Number.isFinite(Number(s[i]))||t++}return t}function H(e){if(!e)return null;const t=new X,n=new N;for(let s=0;s<e.count;s++)n.set(e.getX(s),e.getY(s),e.getZ(s)),Number.isFinite(n.x)&&Number.isFinite(n.y)&&Number.isFinite(n.z)&&t.expandByPoint(n);return t.isEmpty()?null:t}function G(e){const t=H(e.getAttribute("position"));if(!t)return null;for(const n of e.morphAttributes.position??[]){const s=H(n);s&&(e.morphTargetsRelative?(t.expandByPoint(new N().addVectors(t.min,s.min)),t.expandByPoint(new N().addVectors(t.max,s.max))):t.union(s))}return t}function J(e){return e.matrixAutoUpdate?new F().compose(e.position,e.quaternion,e.scale):e.matrix.clone()}function R(e,t,n){if(q(t,"editorHelper")||t.isSkeletonHelper)return;const s=t;if(!s.isMesh&&!s.isLine&&!s.isPoints||!s.geometry)return;const i=G(s.geometry);if(!i)return;const r=t;if(!r.isInstancedMesh){e.union(i.clone().applyMatrix4(n));return}const l=new F;for(let a=0;a<r.count;a++)r.getMatrixAt(a,l),e.union(i.clone().applyMatrix4(new F().multiplyMatrices(n,l)))}function K(e){const t=new X,n=[];for(let r=e.parent;r;r=r.parent)n.push(r);const s=new F;for(let r=n.length-1;r>=0;r--)s.multiply(J(n[r]));const i=(r,l)=>{const a=new F().multiplyMatrices(l,J(r));R(t,r,a);for(const p of r.children)i(p,a)};return i(e,s),t.isEmpty()?null:t}function me(e){const t=new Set,n=new Set,s=new Map,i=new Map,r=new Map,l=new Set,a=[],p=[];let M=0,v=0,x=0,h=0,T=0,A=0,C=0,S=0,f=0,d=0,b=0,z=0,L=0,P=0,D=0;e.traverse(o=>{if(q(o,"editorHelper")||o.isSkeletonHelper)return;M++;let c=0;for(let u=o.parent;u&&u!==e.parent;u=u.parent)c++;p.push({id:o.uuid,name:o.name||o.type,type:o.type,depth:c}),o.isBone&&A++,o.isLOD&&(P++,D+=o.levels.length);const g=o,B=o;if(!B.isMesh&&!B.isLine&&!B.isPoints)return;v++,g.isInstancedMesh&&b++,g.isSkinnedMesh&&z++;const m=g.geometry;if(m){L+=E(m);const u=m.getAttribute("position");h+=u?.count??0,T+=m.index?Math.floor(m.index.count/3):Math.floor((u?.count??0)/3),x+=Math.max(m.groups.length,1),C+=m.morphAttributes.position?.length??0,m.index?(f++,S+=m.index.array.byteLength):d++;for(const[k,V]of Object.entries(m.attributes)){S+=V.array.byteLength;const y=r.get(k)??{itemSize:V.itemSize,meshes:0};y.meshes++,r.set(k,y),/^uv\d*$/.test(k)&&l.add(k)}}const O=Array.isArray(g.material)?g.material:g.material?[g.material]:[];for(const u of O){t.add(u);const k=i.get(u)??new Set;k.add(o),i.set(u,k);const V=s.get(u)??[];for(const y of Y){const w=u[y];if(w?.isTexture!==!0)continue;n.add(w),V.includes(y)||V.push(y);const $=w.image;a.some(U=>U.materialId===u.uuid&&U.slot===y)||a.push({materialId:u.uuid,materialName:u.name||u.type,slot:y,textureName:w.name||w.source.data?.src||"Texture",width:$?.width??null,height:$?.height??null,format:w.format,colorSpace:w.colorSpace||"none"})}s.set(u,V)}});for(const o of n){const c=o.image;S+=(c?.width??0)*(c?.height??0)*4}const I=K(e)?.getSize(new N)??null;return{nodes:M,meshes:v,primitives:x,vertices:h,triangles:T,materials:t.size,textures:n.size,bones:A,clips:e.animations.length,morphTargets:C,memoryBytes:S,bounds:I?{x:I.x,y:I.y,z:I.z}:null,geometry:{attributes:[...r.entries()].map(([o,c])=>({name:o,itemSize:c.itemSize,meshCount:c.meshes})).sort((o,c)=>o.name.localeCompare(c.name)),uvChannels:[...l].sort(),indexedMeshes:f,nonIndexedMeshes:d,instancedMeshes:b,skinnedMeshes:z,nonFiniteAttributeValues:L,lodGroups:P,lodLevels:D},animationClips:e.animations.map((o,c)=>{const g=new Set;let B=0;for(const m of o.tracks){B+=m.times.length;const O=W.parseTrackName(m.name);O.nodeName&&g.add(O.nodeName)}return{id:`${c}:${o.uuid}`,name:o.name||`Clip ${c+1}`,duration:o.duration,tracks:o.tracks.length,keyframes:B,targets:[...g].sort(),rootMotion:ae(o).length>1}}),hierarchy:p,materialNames:[...t].map(o=>o.name||o.type),textureNames:[...n].map(o=>o.name||o.source.data?.src||"Texture"),materialSlots:[...t].map(o=>({id:o.uuid,name:o.name||o.type,type:o.type,textureSlots:s.get(o)??[],usageCount:i.get(o)?.size??0,meshNames:[...i.get(o)??[]].map(c=>c.name||c.type).sort(),color:Z(o),transparent:o.transparent})),textureBindings:a}}function Q(e){const t=e.geometry.getAttribute("skinIndex"),n=e.geometry.getAttribute("skinWeight");if(!t||!n)return{weightedVertices:0,nonNormalizedVertices:0,zeroWeightVertices:0,invalidJointIndices:0};const s=Math.min(t.count,n.count);let i=0,r=0,l=0;for(let a=0;a<s;a++){const p=[n.getX(a),n.getY(a),n.getZ(a),n.getW(a)],M=[t.getX(a),t.getY(a),t.getZ(a),t.getW(a)],v=p.reduce((x,h)=>x+h,0);v<=1e-6?r++:Math.abs(v-1)>.001&&i++,l+=p.filter((x,h)=>x>1e-6&&(M[h]<0||M[h]>=e.skeleton.bones.length)).length}return{weightedVertices:s,nonNormalizedVertices:i,zeroWeightVertices:r,invalidJointIndices:l}}function _(e){let t=0;for(const n of e.times)Number.isFinite(n)||t++;for(const n of e.values)Number.isFinite(n)||t++;return t}function j(e,t){const n=W.parseTrackName(t.name).nodeName;return n&&!W.findNode(e,n)?n:null}function ee(e){let t=0;const n=new Set;for(const s of e.animations)for(const i of s.tracks){t+=_(i);const r=j(e,i);r&&n.add(r)}return{nonFiniteValues:t,unresolvedTargets:n}}function fe(e){const t=new Set,n=new Set,s=new Set;let i=0,r=0,l=0,a=0,p=0,M=0;const v=new Set,x=new Set,h=new Set;e.traverse(f=>{t.add(f);const d=f;d.isBone&&s.add(d)}),e.traverse(f=>{const d=f;if(!d.isSkinnedMesh)return;i++,h.add(d.bindMode),n.add(d.skeleton),d.skeleton.bones.length!==d.skeleton.boneInverses.length&&M++;for(const z of d.skeleton.bones)s.add(z),t.has(z)||v.add(z);const b=Q(d);r+=b.weightedVertices,l+=b.nonNormalizedVertices,a+=b.zeroWeightVertices,p+=b.invalidJointIndices});const T=ee(e);for(const f of s)(!f.parent?.isBone||!s.has(f.parent))&&x.add(f.name||f.uuid);const A=T.nonFiniteValues,C=T.unresolvedTargets,S=l===0&&a===0&&p===0&&M===0&&v.size===0&&A===0&&C.size===0;return{kind:i>0?"skinned":s.size>0?"rigid":"none",skinnedMeshes:i,skeletons:n.size,uniqueBones:s.size,weightedVertices:r,nonNormalizedVertices:l,zeroWeightVertices:a,invalidJointIndices:p,inverseBindMismatches:M,externalBones:v.size,nonFiniteAnimationValues:A,unresolvedTrackTargets:[...C].sort(),rootBones:[...x].sort(),bindModes:[...h].sort(),valid:S}}function te(e){if(!e)return null;const t=G(e)?.getSize(new N),n=e.getAttribute("position");return{vertices:n?.count??0,triangles:Math.floor((e.index?.count??n?.count??0)/3),indexed:e.index!==null,attributes:Object.keys(e.attributes).sort(),uvChannels:Object.keys(e.attributes).filter(s=>/^uv\d*$/.test(s)).sort(),morphTargets:e.morphAttributes.position?.length??0,nonFiniteAttributeValues:E(e),bounds:t?{x:t.x,y:t.y,z:t.z}:null}}function ne(e){return(Array.isArray(e.material)?e.material:e.material?[e.material]:[]).map(n=>({id:n.uuid,name:n.name||n.type,type:n.type,color:Z(n),textureSlots:Y.filter(s=>n[s]?.isTexture===!0)}))}function se(e){const t=e;return t.isSkinnedMesh?{bones:t.skeleton.bones.length,rootBones:t.skeleton.bones.filter(n=>!n.parent?.isBone).map(n=>n.name||n.uuid),bindMode:t.bindMode}:null}function ie(e){const t=e;return t.isBone?{parent:t.parent?.isBone&&(t.parent?.name||t.parent?.uuid)||null,children:t.children.filter(n=>n.isBone).map(n=>n.name||n.uuid)}:null}function pe(e){let t=-1;e.traverse(()=>t++);const n=e;return{type:e.type,visible:e.visible,children:e.children.length,descendants:t,renderOrder:e.renderOrder,layers:e.layers.mask,geometry:te(n.geometry),materials:ne(n),skin:se(e),bone:ie(e)}}function he(e,t){if(t&&!oe(t))return null;const n=e.clone().normalize();for(const s of["front","back","left","right","top","bottom"])if(re(s).angleTo(n)<.0087)return`${s[0]?.toUpperCase()}${s.slice(1)}`;return null}function oe(e){const t=e.clone().normalize();return Math.max(Math.abs(t.x),Math.abs(t.y),Math.abs(t.z))>Math.cos(.0087)}function re(e){const t={front:[0,0,1],back:[0,0,-1],left:[-1,0,0],right:[1,0,0],top:[0,1,0],bottom:[0,-1,0],isometric:[1,.72,1]};return new N(...t[e]).normalize()}function ge(e){let t=!1,n=!1,s=!1,i=!1;return e.traverse(r=>{const l=r;t||=!!l.geometry?.getAttribute("uv"),n||=!!l.geometry?.getAttribute("color"),s||=!!(r.isBone||l.isSkinnedMesh),i||=r.isLOD===!0}),[{mode:"lit",available:!0},{mode:"unlit",available:!0},{mode:"wireframe",available:!0},{mode:"normals",available:!0},{mode:"uv",available:t,...t?{}:{reason:"No UV channel"}},{mode:"vertex-colors",available:n,...n?{}:{reason:"No vertex colors"}},{mode:"bounds",available:!0},{mode:"skeleton",available:s,...s?{}:{reason:"No skeleton"}},{mode:"collision",available:!1,reason:"No collision metadata"},{mode:"lod",available:i,...i?{}:{reason:"No LOD groups"}}]}function ae(e){const t=e.tracks.filter(i=>i.ValueTypeName==="vector"&&i.name.toLowerCase().endsWith(".position")),n=t.find(i=>/(^|[./])(root|hips|armature)[./]/i.test(i.name))??t[0];if(!n||n.values.length<6)return[];const s=[];for(let i=0;i+2<n.values.length;i+=3)s.push(new N(n.values[i],n.values[i+1],n.values[i+2]));return s}function Me(e,t){const n=[];return e.traverse(s=>{const i=s;(Array.isArray(i.material)?i.material:i.material?[i.material]:[]).some(l=>l.uuid===t.id)&&n.push(i)}),n}export{fe as a,pe as b,de as c,he as d,oe as e,re as f,me as i,Me as m,ge as s};
@@ -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","assets/FBXLoader-ChsGb__M.js","assets/EXRLoader-CITMBvGd.js","assets/OBJLoader-DfTepLsB.js","assets/MTLLoader-BCzfiTXe.js","assets/ColladaLoader-__ch4DI8.js","assets/STLLoader-CyqVKV76.js","assets/PLYLoader-Dw6FsiIo.js","assets/BVHLoader-CiMtUId6.js","assets/TDSLoader-BYzZwGbL.js"])))=>i.map(i=>d[i]);
2
- import{eC as P,_ as p}from"./index-Cjv2Ynte.js";import{m as B}from"./renderer-ownership-BovSEcLv.js";import{l as O,g as V,a as U,S as W}from"./studio-environment-DZOr5iAy.js";import{h as A}from"./user-data-DxeJHxTz.js";import{W as z}from"./three.module-BLhyNg0e.js";import{bh as D,co as T,cx as R,aI as H,fo as b,df as N,dg as F,eu as G,ej as J,A as X,el as Y,j as $,aE as S,d9 as q,ex as K,eW as g,I as E}from"./three.core-3arARmh6.js";const I=16,Z=3e3,Q=500;function we(a,t){return t-a>=Q}function ge(a){let t=!1;return a.traverse(e=>{!t&&A(e,"gaussianSplat")&&(t=!0)}),t}function j(a){a.autoUpdate=!1,a.sortDirty=!1,a.updateTimeoutId!==-1&&(clearTimeout(a.updateTimeoutId),a.updateTimeoutId=-1),a.sortTimeoutId!==-1&&(clearTimeout(a.sortTimeoutId),a.sortTimeoutId=-1);let t=Z;const e=()=>{if(a.sorting){t>0?(t-=I,setTimeout(e,I)):console.warn("SparkRenderer did not become idle; skipped worker termination.");return}a.dispose()};e()}const M=128;let y=null;const ee=new Set(["glb","gltf","fbx","obj","dae","stl","ply","spz","bvh","3ds"]);function v(a){const t=a.split(/[?#]/,1)[0].toLowerCase(),e=t.slice(t.lastIndexOf(".")+1);return ee.has(e)?e:void 0}class te{renderer;scene;camera;cache=new Map;pending=new Map;sparkRenderer=null;constructor(){const t=document.createElement("canvas");t.width=M,t.height=M,this.renderer=B(new z({canvas:t,alpha:!0,antialias:!0,preserveDrawingBuffer:!0})),this.renderer.setSize(M,M),this.renderer.setPixelRatio(1),this.renderer.outputColorSpace=J,this.renderer.toneMapping=X,this.renderer.toneMappingExposure=1,this.scene=new Y,U(this.scene,this.renderer),this.scene.add(new $(16777215,.8*W));const e=new S(16777215,1.5);e.position.set(3,5,4),this.scene.add(e);const n=new S(16772829,.4);n.position.set(-3,-1,2),this.scene.add(n),this.camera=new q(35,1,.01,1e3)}async render(t){const e=typeof t=="string"?{url:t}:t,n=e.format??v(e.url);if(!n)throw new Error(`No thumbnail loader for ${e.url}`);const r={...e,format:n},o=JSON.stringify(r),u=this.cache.get(o);if(u)return u;const d=this.pending.get(o);if(d)return d;const l=this._render(r);this.pending.set(o,l);try{const m=await l;return this.cache.set(o,m),m}finally{this.pending.delete(o)}}async _render(t){const e=se(await re(t));if(this.scene.add(e),t.format==="spz"&&!this.sparkRenderer){const{SparkRenderer:c}=await p(async()=>{const{SparkRenderer:i}=await import("./spark.module-Byplgb8G.js");return{SparkRenderer:i}},__vite__mapDeps([0,1,2,3]));this.sparkRenderer=new c({renderer:this.renderer,enableLod:!1}),this.scene.add(this.sparkRenderer)}const n=ne(e);if(n.isEmpty())throw this.scene.remove(e),new Error("Model contains no previewable geometry.");const r=n.getCenter(new b),o=n.getBoundingSphere(new K),u=this.camera.fov*Math.PI/180,d=Math.max(o.radius,1e-4)/Math.sin(u/2)*1.18,l=new b(.65,.45,.65).normalize();this.camera.position.set(r.x+d*l.x,r.y+d*l.y,r.z+d*l.z),this.camera.lookAt(r),this.camera.near=d*.01,this.camera.far=d*20,this.camera.updateProjectionMatrix(),t.background==="neutral"?this.renderer.setClearColor(2106410,1):this.renderer.setClearColor(0,0),this.renderer.clear(),this.renderer.render(this.scene,this.camera);const m=ae(this.renderer.domElement,t.background==="neutral"),w=t.output==="webp"?m.toDataURL("image/webp",.86):m.toDataURL("image/png");return this.scene.remove(e),e.traverse(c=>{A(c,"gaussianSplat")&&c.dispose();const i=c;if(i.geometry&&i.geometry.dispose(),i.material){const h=Array.isArray(i.material)?i.material:[i.material];for(const s of h)"map"in s&&s.map instanceof g&&s.map.dispose(),"normalMap"in s&&s.normalMap instanceof g&&s.normalMap.dispose(),"emissiveMap"in s&&s.emissiveMap instanceof g&&s.emissiveMap.dispose(),"aoMap"in s&&s.aoMap instanceof g&&s.aoMap.dispose(),"roughnessMap"in s&&s.roughnessMap instanceof g&&s.roughnessMap.dispose(),"metalnessMap"in s&&s.metalnessMap instanceof g&&s.metalnessMap.dispose(),s.dispose()}}),w}dispose(){this.sparkRenderer&&(this.scene.remove(this.sparkRenderer),j(this.sparkRenderer),this.sparkRenderer=null),this.renderer.dispose(),this.renderer.forceContextLoss(),this.cache.clear(),y=null}}function ae(a,t){const e=document.createElement("canvas");e.width=a.width,e.height=a.height;const n=e.getContext("2d",{willReadFrequently:!0});if(!n)return a;n.drawImage(a,0,0);const r=n.getImageData(0,0,e.width,e.height),o=new Uint8Array(e.width*e.height);let u=0;for(let c=0;c<o.length;c++){const i=c*4;(t?Math.abs(r.data[i]-32)>3||Math.abs(r.data[i+1]-36)>3||Math.abs(r.data[i+2]-42)>3:r.data[i+3]>8)&&(o[c]=1,u++)}const d=u/o.length;if(d<1e-4)return e;const l=new Uint8ClampedArray(r.data);if(t)for(let c=0;c<o.length;c++){if(!o[c])continue;const i=c*4,h=l[i]*.2126+l[i+1]*.7152+l[i+2]*.0722;if(h>=88)continue;const s=88-h;r.data[i]=Math.min(255,l[i]+s),r.data[i+1]=Math.min(255,l[i+1]+s),r.data[i+2]=Math.min(255,l[i+2]+s)}const m=d<.004?2:d<.02?1:0;let w=o;for(let c=0;c<m;c++){const i=w.slice(),h=new Uint8ClampedArray(r.data);for(let s=1;s<e.height-1;s++)for(let _=1;_<e.width-1;_++){const f=s*e.width+_;if(w[f])continue;const L=[f-1,f+1,f-e.width,f+e.width].find(C=>w[C]);if(L===void 0)continue;const k=f*4,x=L*4;r.data.set(h.subarray(x,x+4),k),i[f]=1}w=i}return n.putImageData(r,0,0),e}function ne(a){a.updateWorldMatrix(!0,!0);const t=new E,e=new E;return a.traverseVisible(n=>{if(A(n,"gaussianSplat")){e.copy(n.getBoundingBox()).applyMatrix4(n.matrixWorld),t.union(e);return}const r=n;r.geometry&&(r.geometry.boundingBox||r.geometry.computeBoundingBox(),r.geometry.boundingBox&&(e.copy(r.geometry.boundingBox).applyMatrix4(n.matrixWorld),t.union(e)))}),t}async function re(a){switch(a.format){case"glb":case"gltf":{const t=await V.loadAsync(a.url);return t.scene.animations=[...t.animations],t.scene}case"fbx":{const{FBXLoader:t}=await p(async()=>{const{FBXLoader:e}=await import("./FBXLoader-ChsGb__M.js");return{FBXLoader:e}},__vite__mapDeps([4,1,2,5]));return new t().loadAsync(a.url)}case"obj":{const{OBJLoader:t}=await p(async()=>{const{OBJLoader:r}=await import("./OBJLoader-DfTepLsB.js");return{OBJLoader:r}},__vite__mapDeps([6,1,2])),e=a.materialUrl??await ce(a.url),n=new t;if(e){const{MTLLoader:r}=await p(async()=>{const{MTLLoader:u}=await import("./MTLLoader-BCzfiTXe.js");return{MTLLoader:u}},__vite__mapDeps([7,1,2])),o=await new r().loadAsync(e);o.preload(),n.setMaterials(o)}return n.loadAsync(a.url)}case"dae":{const{ColladaLoader:t}=await p(async()=>{const{ColladaLoader:r}=await import("./ColladaLoader-__ch4DI8.js");return{ColladaLoader:r}},__vite__mapDeps([8,1,2])),e=await new t().loadAsync(a.url),n=e.animations;return n&&(e.scene.animations=[...n]),e.scene}case"stl":{const{STLLoader:t}=await p(async()=>{const{STLLoader:n}=await import("./STLLoader-CyqVKV76.js");return{STLLoader:n}},__vite__mapDeps([9,1,2])),e=await new t().loadAsync(a.url);return new T(e,new R({color:7710680,roughness:.75}))}case"ply":{const{PLYLoader:t}=await p(async()=>{const{PLYLoader:r}=await import("./PLYLoader-Dw6FsiIo.js");return{PLYLoader:r}},__vite__mapDeps([10,1,2])),e=await new t().loadAsync(a.url);if(e.index||e.hasAttribute("normal"))return e.hasAttribute("normal")||e.computeVertexNormals(),new T(e,new R({color:e.hasAttribute("color")?16777215:12112027,vertexColors:e.hasAttribute("color"),roughness:.8,side:H}));e.computeBoundingBox();const n=e.boundingBox?.getSize(new b).length()??1;return new N(e,new F({color:e.hasAttribute("color")?16777215:12112027,vertexColors:e.hasAttribute("color"),size:Math.max(n/220,1e-4),sizeAttenuation:!0}))}case"spz":return O(a.url);case"bvh":{const{BVHLoader:t}=await p(async()=>{const{BVHLoader:o}=await import("./BVHLoader-CiMtUId6.js");return{BVHLoader:o}},__vite__mapDeps([11,1,2])),e=await new t().loadAsync(a.url),n=e.skeleton.bones[0];if(!n)throw new Error("BVH contains no skeleton root.");const r=new D;return r.animations=[e.clip],r.add(n),r}case"3ds":{const{TDSLoader:t}=await p(async()=>{const{TDSLoader:e}=await import("./TDSLoader-BYzZwGbL.js");return{TDSLoader:e}},__vite__mapDeps([12,1,2]));return new t().loadAsync(a.url)}}}function se(a){if(ie(a))return a;a.updateWorldMatrix(!0,!0);const t=new G(a),e=t.geometry.getAttribute("position");if(!e||e.count===0)return t.dispose(),a;t.name="Asset Editor skeleton preview",t.frustumCulled=!1;const n=new D;return n.name=a.name,n.animations=[...a.animations],n.add(a,t),n.updateWorldMatrix(!0,!0),t.updateMatrixWorld(!0),n}function ie(a){let t=!1;return a.traverseVisible(e=>{!t&&oe(e)&&(t=!0)}),t}function oe(a){const t=a;if(t.isSprite)return t.material.visible;const e=a,n=a,r=a;if(!e.isMesh&&!n.isLine&&!r.isPoints)return!1;const o=a,u=a;if(u.isInstancedMesh&&u.count===0)return!1;const d=Array.isArray(o.material)?o.material:[o.material];if(d.length===0||d.every(m=>!m?.visible))return!1;const l=o.geometry?.getAttribute("position");return!!(l&&l.count>0&&o.geometry.drawRange.count!==0)}async function ce(a){const t=a.split(/[?#]/,1)[0],e=`${t.slice(0,t.lastIndexOf("."))}.mtl`;try{return(await fetch(e,{method:"HEAD"})).ok?e:void 0}catch{return}}function le(){return y||(y=new te),y}function Me(){return P({accepts:a=>v(a)!==void 0,render:a=>le().render({url:a,format:v(a),background:"neutral",output:"webp"})})}export{ge as a,se as c,j as d,re as l,v as m,Me as r,we as s};
2
+ import{eC as P,_ as p}from"./index-ClgrFOcX.js";import{m as B}from"./renderer-ownership-BovSEcLv.js";import{l as O,g as V,a as U,S as W}from"./studio-environment-Bw9zMFE8.js";import{h as A}from"./user-data-DL6HsBPf.js";import{W as z}from"./three.module-BLhyNg0e.js";import{bh as D,co as T,cx as R,aI as H,fo as b,df as N,dg as F,eu as G,ej as J,A as X,el as Y,j as $,aE as S,d9 as q,ex as K,eW as g,I as E}from"./three.core-3arARmh6.js";const I=16,Z=3e3,Q=500;function we(a,t){return t-a>=Q}function ge(a){let t=!1;return a.traverse(e=>{!t&&A(e,"gaussianSplat")&&(t=!0)}),t}function j(a){a.autoUpdate=!1,a.sortDirty=!1,a.updateTimeoutId!==-1&&(clearTimeout(a.updateTimeoutId),a.updateTimeoutId=-1),a.sortTimeoutId!==-1&&(clearTimeout(a.sortTimeoutId),a.sortTimeoutId=-1);let t=Z;const e=()=>{if(a.sorting){t>0?(t-=I,setTimeout(e,I)):console.warn("SparkRenderer did not become idle; skipped worker termination.");return}a.dispose()};e()}const M=128;let y=null;const ee=new Set(["glb","gltf","fbx","obj","dae","stl","ply","spz","bvh","3ds"]);function v(a){const t=a.split(/[?#]/,1)[0].toLowerCase(),e=t.slice(t.lastIndexOf(".")+1);return ee.has(e)?e:void 0}class te{renderer;scene;camera;cache=new Map;pending=new Map;sparkRenderer=null;constructor(){const t=document.createElement("canvas");t.width=M,t.height=M,this.renderer=B(new z({canvas:t,alpha:!0,antialias:!0,preserveDrawingBuffer:!0})),this.renderer.setSize(M,M),this.renderer.setPixelRatio(1),this.renderer.outputColorSpace=J,this.renderer.toneMapping=X,this.renderer.toneMappingExposure=1,this.scene=new Y,U(this.scene,this.renderer),this.scene.add(new $(16777215,.8*W));const e=new S(16777215,1.5);e.position.set(3,5,4),this.scene.add(e);const n=new S(16772829,.4);n.position.set(-3,-1,2),this.scene.add(n),this.camera=new q(35,1,.01,1e3)}async render(t){const e=typeof t=="string"?{url:t}:t,n=e.format??v(e.url);if(!n)throw new Error(`No thumbnail loader for ${e.url}`);const r={...e,format:n},o=JSON.stringify(r),u=this.cache.get(o);if(u)return u;const d=this.pending.get(o);if(d)return d;const l=this._render(r);this.pending.set(o,l);try{const m=await l;return this.cache.set(o,m),m}finally{this.pending.delete(o)}}async _render(t){const e=se(await re(t));if(this.scene.add(e),t.format==="spz"&&!this.sparkRenderer){const{SparkRenderer:c}=await p(async()=>{const{SparkRenderer:i}=await import("./spark.module-Byplgb8G.js");return{SparkRenderer:i}},__vite__mapDeps([0,1,2,3]));this.sparkRenderer=new c({renderer:this.renderer,enableLod:!1}),this.scene.add(this.sparkRenderer)}const n=ne(e);if(n.isEmpty())throw this.scene.remove(e),new Error("Model contains no previewable geometry.");const r=n.getCenter(new b),o=n.getBoundingSphere(new K),u=this.camera.fov*Math.PI/180,d=Math.max(o.radius,1e-4)/Math.sin(u/2)*1.18,l=new b(.65,.45,.65).normalize();this.camera.position.set(r.x+d*l.x,r.y+d*l.y,r.z+d*l.z),this.camera.lookAt(r),this.camera.near=d*.01,this.camera.far=d*20,this.camera.updateProjectionMatrix(),t.background==="neutral"?this.renderer.setClearColor(2106410,1):this.renderer.setClearColor(0,0),this.renderer.clear(),this.renderer.render(this.scene,this.camera);const m=ae(this.renderer.domElement,t.background==="neutral"),w=t.output==="webp"?m.toDataURL("image/webp",.86):m.toDataURL("image/png");return this.scene.remove(e),e.traverse(c=>{A(c,"gaussianSplat")&&c.dispose();const i=c;if(i.geometry&&i.geometry.dispose(),i.material){const h=Array.isArray(i.material)?i.material:[i.material];for(const s of h)"map"in s&&s.map instanceof g&&s.map.dispose(),"normalMap"in s&&s.normalMap instanceof g&&s.normalMap.dispose(),"emissiveMap"in s&&s.emissiveMap instanceof g&&s.emissiveMap.dispose(),"aoMap"in s&&s.aoMap instanceof g&&s.aoMap.dispose(),"roughnessMap"in s&&s.roughnessMap instanceof g&&s.roughnessMap.dispose(),"metalnessMap"in s&&s.metalnessMap instanceof g&&s.metalnessMap.dispose(),s.dispose()}}),w}dispose(){this.sparkRenderer&&(this.scene.remove(this.sparkRenderer),j(this.sparkRenderer),this.sparkRenderer=null),this.renderer.dispose(),this.renderer.forceContextLoss(),this.cache.clear(),y=null}}function ae(a,t){const e=document.createElement("canvas");e.width=a.width,e.height=a.height;const n=e.getContext("2d",{willReadFrequently:!0});if(!n)return a;n.drawImage(a,0,0);const r=n.getImageData(0,0,e.width,e.height),o=new Uint8Array(e.width*e.height);let u=0;for(let c=0;c<o.length;c++){const i=c*4;(t?Math.abs(r.data[i]-32)>3||Math.abs(r.data[i+1]-36)>3||Math.abs(r.data[i+2]-42)>3:r.data[i+3]>8)&&(o[c]=1,u++)}const d=u/o.length;if(d<1e-4)return e;const l=new Uint8ClampedArray(r.data);if(t)for(let c=0;c<o.length;c++){if(!o[c])continue;const i=c*4,h=l[i]*.2126+l[i+1]*.7152+l[i+2]*.0722;if(h>=88)continue;const s=88-h;r.data[i]=Math.min(255,l[i]+s),r.data[i+1]=Math.min(255,l[i+1]+s),r.data[i+2]=Math.min(255,l[i+2]+s)}const m=d<.004?2:d<.02?1:0;let w=o;for(let c=0;c<m;c++){const i=w.slice(),h=new Uint8ClampedArray(r.data);for(let s=1;s<e.height-1;s++)for(let _=1;_<e.width-1;_++){const f=s*e.width+_;if(w[f])continue;const L=[f-1,f+1,f-e.width,f+e.width].find(C=>w[C]);if(L===void 0)continue;const k=f*4,x=L*4;r.data.set(h.subarray(x,x+4),k),i[f]=1}w=i}return n.putImageData(r,0,0),e}function ne(a){a.updateWorldMatrix(!0,!0);const t=new E,e=new E;return a.traverseVisible(n=>{if(A(n,"gaussianSplat")){e.copy(n.getBoundingBox()).applyMatrix4(n.matrixWorld),t.union(e);return}const r=n;r.geometry&&(r.geometry.boundingBox||r.geometry.computeBoundingBox(),r.geometry.boundingBox&&(e.copy(r.geometry.boundingBox).applyMatrix4(n.matrixWorld),t.union(e)))}),t}async function re(a){switch(a.format){case"glb":case"gltf":{const t=await V.loadAsync(a.url);return t.scene.animations=[...t.animations],t.scene}case"fbx":{const{FBXLoader:t}=await p(async()=>{const{FBXLoader:e}=await import("./FBXLoader-ChsGb__M.js");return{FBXLoader:e}},__vite__mapDeps([4,1,2,5]));return new t().loadAsync(a.url)}case"obj":{const{OBJLoader:t}=await p(async()=>{const{OBJLoader:r}=await import("./OBJLoader-DfTepLsB.js");return{OBJLoader:r}},__vite__mapDeps([6,1,2])),e=a.materialUrl??await ce(a.url),n=new t;if(e){const{MTLLoader:r}=await p(async()=>{const{MTLLoader:u}=await import("./MTLLoader-BCzfiTXe.js");return{MTLLoader:u}},__vite__mapDeps([7,1,2])),o=await new r().loadAsync(e);o.preload(),n.setMaterials(o)}return n.loadAsync(a.url)}case"dae":{const{ColladaLoader:t}=await p(async()=>{const{ColladaLoader:r}=await import("./ColladaLoader-__ch4DI8.js");return{ColladaLoader:r}},__vite__mapDeps([8,1,2])),e=await new t().loadAsync(a.url),n=e.animations;return n&&(e.scene.animations=[...n]),e.scene}case"stl":{const{STLLoader:t}=await p(async()=>{const{STLLoader:n}=await import("./STLLoader-CyqVKV76.js");return{STLLoader:n}},__vite__mapDeps([9,1,2])),e=await new t().loadAsync(a.url);return new T(e,new R({color:7710680,roughness:.75}))}case"ply":{const{PLYLoader:t}=await p(async()=>{const{PLYLoader:r}=await import("./PLYLoader-Dw6FsiIo.js");return{PLYLoader:r}},__vite__mapDeps([10,1,2])),e=await new t().loadAsync(a.url);if(e.index||e.hasAttribute("normal"))return e.hasAttribute("normal")||e.computeVertexNormals(),new T(e,new R({color:e.hasAttribute("color")?16777215:12112027,vertexColors:e.hasAttribute("color"),roughness:.8,side:H}));e.computeBoundingBox();const n=e.boundingBox?.getSize(new b).length()??1;return new N(e,new F({color:e.hasAttribute("color")?16777215:12112027,vertexColors:e.hasAttribute("color"),size:Math.max(n/220,1e-4),sizeAttenuation:!0}))}case"spz":return O(a.url);case"bvh":{const{BVHLoader:t}=await p(async()=>{const{BVHLoader:o}=await import("./BVHLoader-CiMtUId6.js");return{BVHLoader:o}},__vite__mapDeps([11,1,2])),e=await new t().loadAsync(a.url),n=e.skeleton.bones[0];if(!n)throw new Error("BVH contains no skeleton root.");const r=new D;return r.animations=[e.clip],r.add(n),r}case"3ds":{const{TDSLoader:t}=await p(async()=>{const{TDSLoader:e}=await import("./TDSLoader-BYzZwGbL.js");return{TDSLoader:e}},__vite__mapDeps([12,1,2]));return new t().loadAsync(a.url)}}}function se(a){if(ie(a))return a;a.updateWorldMatrix(!0,!0);const t=new G(a),e=t.geometry.getAttribute("position");if(!e||e.count===0)return t.dispose(),a;t.name="Asset Editor skeleton preview",t.frustumCulled=!1;const n=new D;return n.name=a.name,n.animations=[...a.animations],n.add(a,t),n.updateWorldMatrix(!0,!0),t.updateMatrixWorld(!0),n}function ie(a){let t=!1;return a.traverseVisible(e=>{!t&&oe(e)&&(t=!0)}),t}function oe(a){const t=a;if(t.isSprite)return t.material.visible;const e=a,n=a,r=a;if(!e.isMesh&&!n.isLine&&!r.isPoints)return!1;const o=a,u=a;if(u.isInstancedMesh&&u.count===0)return!1;const d=Array.isArray(o.material)?o.material:[o.material];if(d.length===0||d.every(m=>!m?.visible))return!1;const l=o.geometry?.getAttribute("position");return!!(l&&l.count>0&&o.geometry.drawRange.count!==0)}async function ce(a){const t=a.split(/[?#]/,1)[0],e=`${t.slice(0,t.lastIndexOf("."))}.mtl`;try{return(await fetch(e,{method:"HEAD"})).ok?e:void 0}catch{return}}function le(){return y||(y=new te),y}function Me(){return P({accepts:a=>v(a)!==void 0,render:a=>le().render({url:a,format:v(a),background:"neutral",output:"webp"})})}export{ge as a,se as c,j as d,re as l,v as m,Me as r,we as s};
@@ -1 +1 @@
1
- import{u as n,v as l,w as s,x as m}from"./index-Cjv2Ynte.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const F={name:"modelsFromBlendFiles",schema:n({finder:m("modelsFromBlendFiles"),include:l(s().min(1)).min(1).describe("Project-relative globs of the Blender files to list (`src/models/**/*.blend`)")}).strict(),run(d,r){const o=[],t=[];for(const e of r.files??[]){if(!e.endsWith(".blend"))continue;const i=(e.split("/").pop()??e).replace(/\.blend$/,"");o.push({id:`model:${e}`,label:i,kind:"model",region:null,authorable:!0,reach:{kind:"root-mount"},source:{path:e}})}return o.length===0&&o.push({id:"blender:runtime",label:"Model",kind:"model",region:null,authorable:!0,reach:{kind:"root-mount"}}),{entries:o,notes:t}}};export{F as finder};
1
+ import{u as n,v as l,w as s,x as m}from"./index-ClgrFOcX.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const F={name:"modelsFromBlendFiles",schema:n({finder:m("modelsFromBlendFiles"),include:l(s().min(1)).min(1).describe("Project-relative globs of the Blender files to list (`src/models/**/*.blend`)")}).strict(),run(d,r){const o=[],t=[];for(const e of r.files??[]){if(!e.endsWith(".blend"))continue;const i=(e.split("/").pop()??e).replace(/\.blend$/,"");o.push({id:`model:${e}`,label:i,kind:"model",region:null,authorable:!0,reach:{kind:"root-mount"},source:{path:e}})}return o.length===0&&o.push({id:"blender:runtime",label:"Model",kind:"model",region:null,authorable:!0,reach:{kind:"root-mount"}}),{entries:o,notes:t}}};export{F as finder};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/create-runtime-BKAyWS74.js","assets/adapter-surface-Y37Nzcyw.js","assets/binding-Bmxqznjk.js","assets/root-stacking-BEd9ZvxC.js","assets/assets-BcrMQHRv.js","assets/loader-BTUKnX5Q.js","assets/KTX2Loader-CaqVE6nY.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/GLTFLoader-KeoruJgS.js","assets/BufferGeometryUtils-B22h7jo4.js","assets/setup-renderer-Cdx_0C3T.js","assets/index-DHhMOs_s.js","assets/defaults-DKiBJCPN.js","assets/render-settings-DeBS5HzD.js","assets/render-features-BYgh328X.js","assets/index-Cjv2Ynte.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/seeded-random-BVi4_fs4.js","assets/debug-registry-CcTdmLf3.js","assets/loop-gate-report-N52EWFGD.js","assets/system-slot-E2mEdiih.js","assets/user-data-CODoGZqA.js","assets/object-marks-BnvSuCTt.js","assets/performance-profiler-CMbwGBuk.js"])))=>i.map(i=>d[i]);
2
- import{I as v,J as R,ag as _,Z as s,bX as A,bY as I,aC as b,bZ as C,b_ as P,b$ as M,c0 as g,c1 as y,c2 as S,_ as $,c3 as E}from"./index-Cjv2Ynte.js";import{m as F}from"./capability-coverage-BMuTFU_9.js";import{r as G}from"./binding-resolver-4nTdtOpk.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"./game-contract-seams-CzlxJGC2.js";import"./native-debug-module-BUPFKtBc.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-CcTdmLf3.js";import"./contract-system-adapters-D8SzcuZo.js";import"./adapter-surface-Y37Nzcyw.js";import"./index-DzuOGwVB.js";import"./structural-signature-Dc7skRiy.js";import"./three.core-3arARmh6.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./events-156d8d12.esm-DmeaOP4r.js";import"./three.module-BLhyNg0e.js";import"./realm-services-CbgTofeT.js";import"./canvas-entry-runtime-CgJkCzp_.js";import"./three-ingest-runtime-BPTa3ryG.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";let l=null;function h(){return l!==null}function j(t,o){return t.selection?t:{...t,selection:{get:()=>[...o.shell.selectedEntityIds],set:e=>o.shell.selectMultiple(e)}}}function k(){const t=l;if(t){l=null,M(null),g(null),y(),t.store.shell.setPlayState("stopped");try{t.stop()}catch{}delete window.__volterModule,s.log("Module adapter mode stopped","adapter")}}async function D(t,o,e,i,r,u){const{createGameRuntime:c}=await $(async()=>{const{createGameRuntime:p}=await import("./create-runtime-BKAyWS74.js").then(n=>n.e);return{createGameRuntime:p}},__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])),a=await G({...t,roots:[o]},e);return{session:await c({container:i,roots:a,width:r,height:u}),specs:a}}async function L(t,o,e,i){await C();const r=S();if(!r){s.error("Game container not mounted — cannot auto-mount module adapter","adapter");return}t.shell.setPlayState("playing"),s.log(`Mounting custom adapter module for world "${e.id}" (kind: ${e.surface})`,"adapter");const u=r.clientWidth||800,c=r.clientHeight||600,{session:a,specs:d}=await D(o,e,i,r,u,c),n=a.game.roots[0].mounted,f=d[0].adapter.id;l={store:t,stop:()=>a.stop()};let m;n.authoring?m=j(n.authoring,t):m=P(t.shell,`${f} (no authoring surface)`),M(m),g(n.systems??{}),t.shell.notifyIngestEdit(),y();const w=F(n);window.__volterModule={worldId:e.id,adapterId:f,reach:w}}async function Mt(t){const o=await v().catch(()=>null);if(o&&R(o).length>0)return!1;const e=o?_(o)[0]:void 0;if(e===void 0||e.adapter.type!=="module")return!1;const i=b();if(!i)return s.error("Manifest declares a { module } world but no project is open — cannot auto-mount","adapter"),!0;try{await L(t,o,e,i.rootPath)}catch(r){s.error(`Manifest { module } auto-mount failed: ${r}`,"adapter"),A({worldId:e.id,kind:e.surface,identity:e.adapter.identity,message:I(r)})}return!0}E({id:"module",priority:2,mounted:h,playing:h,stop:k,instanceContainer:()=>null});export{L as enterModuleModeFromManifestRoot,k as exitModuleMode,h as isModuleModeActive,D as mountModuleRootRuntime,Mt as tryManifestModuleRoute,j as withStoreSelection};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/create-runtime-Bucz0XVU.js","assets/adapter-surface-Y37Nzcyw.js","assets/binding-Bmxqznjk.js","assets/root-stacking-BEd9ZvxC.js","assets/assets-BcrMQHRv.js","assets/loader-BTUKnX5Q.js","assets/KTX2Loader-CaqVE6nY.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/GLTFLoader-KeoruJgS.js","assets/BufferGeometryUtils-B22h7jo4.js","assets/setup-renderer-efjIBSGF.js","assets/index-DHhMOs_s.js","assets/defaults-DKiBJCPN.js","assets/render-settings-CUbo4Sw5.js","assets/render-features-sSb1-c5x.js","assets/index-ClgrFOcX.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/seeded-random-B6zqGkWP.js","assets/debug-registry-B2THKz1v.js","assets/loop-gate-report-N52EWFGD.js","assets/system-slot-E2mEdiih.js","assets/user-data-CODoGZqA.js","assets/object-marks-BnvSuCTt.js","assets/performance-profiler-CMbwGBuk.js"])))=>i.map(i=>d[i]);
2
+ import{I as v,J as R,ag as _,Z as s,bX as A,bY as I,aC as b,bZ as C,b_ as P,b$ as M,c0 as g,c1 as y,c2 as S,_ as $,c3 as E}from"./index-ClgrFOcX.js";import{m as F}from"./capability-coverage-EnZ99FoT.js";import{r as G}from"./binding-resolver-DoOAFM2m.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"./game-contract-seams-C22a4B79.js";import"./native-debug-module-iX2-V5kg.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-B2THKz1v.js";import"./contract-system-adapters-BDUpDoKd.js";import"./adapter-surface-Y37Nzcyw.js";import"./index-DzuOGwVB.js";import"./structural-signature-Dc7skRiy.js";import"./three.core-3arARmh6.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./events-156d8d12.esm-DmeaOP4r.js";import"./three.module-BLhyNg0e.js";import"./realm-services-CqjVBanw.js";import"./canvas-entry-runtime-CLOuJcgT.js";import"./three-ingest-runtime-x9nLmUl-.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";let l=null;function h(){return l!==null}function j(t,o){return t.selection?t:{...t,selection:{get:()=>[...o.shell.selectedEntityIds],set:e=>o.shell.selectMultiple(e)}}}function k(){const t=l;if(t){l=null,M(null),g(null),y(),t.store.shell.setPlayState("stopped");try{t.stop()}catch{}delete window.__volterModule,s.log("Module adapter mode stopped","adapter")}}async function D(t,o,e,i,r,u){const{createGameRuntime:c}=await $(async()=>{const{createGameRuntime:p}=await import("./create-runtime-Bucz0XVU.js").then(n=>n.e);return{createGameRuntime:p}},__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])),a=await G({...t,roots:[o]},e);return{session:await c({container:i,roots:a,width:r,height:u}),specs:a}}async function L(t,o,e,i){await C();const r=S();if(!r){s.error("Game container not mounted — cannot auto-mount module adapter","adapter");return}t.shell.setPlayState("playing"),s.log(`Mounting custom adapter module for world "${e.id}" (kind: ${e.surface})`,"adapter");const u=r.clientWidth||800,c=r.clientHeight||600,{session:a,specs:d}=await D(o,e,i,r,u,c),n=a.game.roots[0].mounted,f=d[0].adapter.id;l={store:t,stop:()=>a.stop()};let m;n.authoring?m=j(n.authoring,t):m=P(t.shell,`${f} (no authoring surface)`),M(m),g(n.systems??{}),t.shell.notifyIngestEdit(),y();const w=F(n);window.__volterModule={worldId:e.id,adapterId:f,reach:w}}async function Mt(t){const o=await v().catch(()=>null);if(o&&R(o).length>0)return!1;const e=o?_(o)[0]:void 0;if(e===void 0||e.adapter.type!=="module")return!1;const i=b();if(!i)return s.error("Manifest declares a { module } world but no project is open — cannot auto-mount","adapter"),!0;try{await L(t,o,e,i.rootPath)}catch(r){s.error(`Manifest { module } auto-mount failed: ${r}`,"adapter"),A({worldId:e.id,kind:e.surface,identity:e.adapter.identity,message:I(r)})}return!0}E({id:"module",priority:2,mounted:h,playing:h,stop:k,instanceContainer:()=>null});export{L as enterModuleModeFromManifestRoot,k as exitModuleMode,h as isModuleModeActive,D as mountModuleRootRuntime,Mt as tryManifestModuleRoute,j as withStoreSelection};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Cjv2Ynte.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"])))=>i.map(i=>d[i]);
2
- import{L as z,eD as me,fc as he,d3 as I,d4 as fe,f_ as ge,fo as ye,g3 as ve,g4 as be,g5 as we,g6 as Se,g7 as Ce,fX as xe,c2 as X,Z as g,bZ as Ee,kw as _,_ as N,b$ as J,c1 as K,aC as Ae,j as Ie,c0 as Pe}from"./index-Cjv2Ynte.js";import{m as P}from"./capability-coverage-BMuTFU_9.js";import{n as ke}from"./after-paint-CB4bz1-e.js";import{BabylonAuthoringAdapter as Re}from"./babylon-authoring-adapter-rHojeSh-.js";import{a as k,S as Y,s as De,c as Me,C as $e,D as R,G as je,B as _e,H as T,E as O,T as Te,j as q,k as Z,l as Q,r as ee,p as te,o as ne,U as Ge,K as se,u as Le}from"./active-ingest-CmyN258P.js";import{c as Oe,a as Be}from"./json-history-resource-C1pGwXuI.js";import{P as Fe}from"./pixi-authoring-adapter-CAS5Elnh.js";import{createLiveCanvasWriteTarget as We}from"./pixi-live-write-target-BO-cO1Gl.js";import{a as Ne}from"./source-persistence-backend-BMbXR_WB.js";import{resolveCanvasPixiForEditor as Ve}from"./canvas-entry-runtime-CgJkCzp_.js";import{registerPresentedPixiApps as He,capturePixiDisplayObjectThumbnail as Ue}from"./canvas-preview-frames-DMZo3rqI.js";import{p as ze}from"./contract-system-adapters-D8SzcuZo.js";import{s as Xe,d as Je,f as Ke,b as re,g as Ye,e as ie,w as qe,j as Ze}from"./resolve-three-BUKYgCMY.js";import{createPhysics2DRegistry as Qe}from"./physics-registry-B2Jkp8e6.js";import{composePhysicsAdapters2D as et,createPhysicsAdapter2D as tt}from"./system-adapters-rIC8FSGP.js";import{s as nt}from"./mount-ingest-root-CyZae-B7.js";import{landIngestBootInEdit as ae}from"./ingest-boot-viewport-Dynh3g5V.js";import{a as C}from"./jsx-runtime-DPjLkJKQ.js";import{b as st}from"./react-canvas-navigation-BWgmHmpc.js";import{C as V,a as rt,b as it}from"./CanvasSceneViewport-CQfbmxpt.js";import{R as at}from"./RootSelectionOverlay-DRjJypx0.js";import{e as ot,S as ct}from"./surface-state-C0NqVDj5.js";import{r as w}from"./index-nmcBqr7Y.js";import{b as dt,e as lt,g as ut}from"./registry-DPYQgPRv.js";import{m as pt}from"./game-surface-defaults-D8S4cRxi.js";import"./index-CtzuWnCS.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CinJrH5C.js";import"./index-D_NuPfjr.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./game-contract-seams-CzlxJGC2.js";import"./ingest-source-persistence-BNek6mSi.js";import"./index-DUA0RF9E.js";import"./component-instance-root-Ctbx3vOO.js";import"./user-data-DxeJHxTz.js";import"./workspace-arrangement-Bq8u7HUK.js";import"./pixi-transform-channels-P4rvmusc.js";import"./debug-registry-CcTdmLf3.js";import"./dom-authoring-adapter-DBtypFqH.js";import"./react-world-authoring-adapter-CTCp7U6C.js";import"./board-guides-Cnfvv0uu.js";import"./relative-import-specifier-CPSPKQKY.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-xUKvX80V.js";import"./inference-diagnostics-DE1P5w14.js";import"./writer-tw6EcuVO.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./three.core-3arARmh6.js";import"./three-state-_BZo8PPs.js";import"./editor-shell-store-B76wIXvV.js";import"./output-pass-HurwNl0G.js";import"./three.module-BLhyNg0e.js";import"./Pass-D1MRT672.js";import"./editor-layers-CYVQVJ5O.js";import"./entity-object-C6hm5vYx.js";import"./three-contract-Dkt6PmWY.js";import"./Toolbar-B9tUYMZc.js";import"./transform-mode-request-ROdyyd8M.js";import"./TransientHint-DXKNt-QA.js";import"./layered-pick-ASc-_oGG.js";import"./root-stacking-BEd9ZvxC.js";import"./eyedropper-session-bjPXnfeX.js";import"./react-story-board-CGF1vFuk.js";import"./viewport-editor-controls-BYaAZ_Ku.js";function mt(n){if(typeof n?.game?.scene?.getScenes=="function")return n.game;const e=n?.Phaser?.GAMES;return Array.isArray(e)?e.find(t=>typeof t?.scene?.getScenes=="function")??null:null}function ht(n){const e=n?.__volterBabylon?.engines,t=Array.isArray(e)?e:n?.BABYLON?.Engine?.Instances;return Array.isArray(t)?[...t].reverse().find(s=>Array.isArray(s?.scenes)&&s.scenes.length>0)??null:null}function ft(n){return[0,0,Math.sin(n/2),Math.cos(n/2)]}function gt(n){return 2*Math.atan2(n[2],n[3])}function yt(n){return encodeURIComponent(n||"unnamed")}function vt(n){return Array.isArray(n.list)?n.list:[]}class bt{constructor(e,t){this.game=e,this.store=t}capabilities={transform:!0,inspectorFields:!0,persist:!1};provenance={source:"foreign",label:"live-only",detail:"Live Phaser scene/display lists projected directly — edits apply to native game objects for this session only."};persistence={...Oe(),destination:"live-only (not saved)"};indexed=new Map;listeners=new Set;refresh(){this.reindex();let e=0,t=0;for(const s of this.indexed.values())s.kind==="scene"?e++:t++;return{scenes:e,objects:t}}scenes(){const e=this.game.scene?.getScenes;if(typeof e!="function")return[];const t=e.call(this.game.scene,!0);return Array.isArray(t)?t:[]}reindex(){this.indexed.clear();for(const[e,t]of this.scenes().entries()){const s=t.sys?.settings?.key||`Scene ${e+1}`,r=`phaser:scene:${e}:${yt(s)}`,o=Array.isArray(t.children?.list)?t.children.list:[],a={id:r,label:s,role:"root",kind:"phaser-scene",typeLabel:"Phaser.Scene",parentId:null,childIds:[]};this.indexed.set(r,{kind:"scene",scene:t,node:a}),a.childIds=o.map((i,c)=>this.indexObject(i,r,`${e}/${c}`))}}indexObject(e,t,s){const r=e.type||e.constructor?.name||"GameObject",o=e.name||r,a=`phaser:object:${s}`,i={id:a,label:o,role:"entity",kind:`phaser-${r.toLowerCase()}`,typeLabel:r,parentId:t,childIds:[]};return this.indexed.set(a,{kind:"object",object:e,node:i}),i.childIds=vt(e).map((c,d)=>this.indexObject(c,a,`${s}/${d}`)),a}hierarchy={roots:()=>(this.reindex(),[...this.indexed.values()].filter(e=>e.kind==="scene").map(e=>e.node)),node:e=>(this.reindex(),this.indexed.get(e)?.node??null)};selection={get:()=>[...this.store.shell.selectedEntityIds],set:e=>{this.store.shell.selectMultiple(e),this.notify()}};transforms={dimensions:e=>(this.reindex(),this.indexed.get(e)?.kind==="object"?"2d":null),get:e=>{this.reindex();const t=this.indexed.get(e);if(!t||t.kind!=="object")return{position:[0,0,0],rotation:[0,0,0,1],scale:[1,1,1]};const s=t.object;return{position:[s.x??0,s.y??0,s.depth??0],rotation:ft(s.rotation??0),scale:[s.scaleX??1,s.scaleY??1,1]}},beginEdit:e=>{},apply:(e,t)=>{this.reindex();const s=this.indexed.get(e);!s||s.kind!=="object"||(s.object.x=t.position[0],s.object.y=t.position[1],s.object.depth=t.position[2],s.object.rotation=gt(t.rotation),s.object.scaleX=t.scale[0],s.object.scaleY=t.scale[1],this.notify())},endEdit:e=>{}};inspector={properties:e=>{this.reindex();const t=this.indexed.get(e);return t?t.kind==="scene"?[{path:"key",label:"Scene key",type:"string",readonly:!0}]:[{path:"type",label:"Type",type:"string",readonly:!0},{path:"name",label:"Name",type:"string"},{path:"active",label:"Active",type:"boolean"},{path:"visible",label:"Visible",type:"boolean"},{path:"alpha",label:"Alpha",type:"number"},{path:"depth",label:"Depth",type:"number"}]:[]},get:(e,t)=>{this.reindex();const s=this.indexed.get(e);if(s)return s.kind==="scene"?t==="key"?s.scene.sys?.settings?.key:void 0:t==="type"?s.object.type||s.object.constructor?.name:s.object[t]},set:(e,t,s)=>{this.reindex();const r=this.indexed.get(e);!r||r.kind!=="object"||t==="type"||(r.object[t]=s,this.notify())}};subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}dispose(){this.listeners.clear(),this.indexed.clear()}notify(){for(const e of this.listeners)e();this.store.shell.notifyIngestEdit()}}function wt(n){return We({physics:n.physics,persistence:Ne({history:n.history,writer:n.writer})})}function St(n,e={}){const s=n.Application.prototype;let r=null,o=0;const a=[],i=Object.getOwnPropertyDescriptor(s,"render"),c=s.render;return Object.defineProperty(s,"render",{configurable:!0,writable:!0,value:function(...d){o++;const u=this.stage;if(!r&&u){const p={stage:u,renderer:this.renderer,app:this};if(e.accept?.(p)??!0){r=p;for(const f of a.splice(0))f(r)}}return c?.apply(this,d)}}),{get captured(){return r},getDrawCount(){return o},setPaused(d){const u=r?.app;u?.ticker&&(d?u.ticker.stop():u.ticker.start())},waitForCapture(d){const u=typeof d=="number"?{timeoutMs:d}:d??{},p=u.timeoutMs??1e4;return r?Promise.resolve(r):new Promise((f,x)=>{const y=Xe({budgetMs:p,clock:u.visibility??Je(),onExpire:()=>{const l=a.indexOf(S);l>=0&&a.splice(l,1),u.onWait?.(null),x(new Error(`pixi scene capture timed out after ${p}ms of VISIBLE time (${Math.round(y.elapsedHiddenMs())}ms browser-suspended, which is not counted because no frame can be presented) — the game never rendered, or it bundles its own (un-shared) copy of pixi.js.`))}}),S=l=>{y.cancel(),u.onWait?.(null),f(l)};a.push(S),u.onWait?.(y)})},uninstall(){i?Object.defineProperty(s,"render",i):c&&Object.defineProperty(s,"render",{configurable:!0,writable:!0,value:c})}}}const oe="IngestGame2DLoadError";class Ct extends Error{constructor(e,t){super(`pixi ingest: game "${e}" failed to load: ${t}`,{cause:t}),this.name=oe}}async function xt(n,e,t={}){const s=St(n,{...t.acceptCapture?{accept:t.acceptCapture}:{}});try{if(await e.load(),await t.preferStructuralRuntime?.())return s.uninstall(),null}catch(o){throw s.uninstall(),new Ct(e.id,o)}const r=t.captureTimeoutMs??e.captureTimeoutMs??8e3;try{return{stage:(await s.waitForCapture({timeoutMs:r,...t.onWait?{onWait:t.onWait}:{}})).stage,capture:s,setPaused:a=>s.setPaused(a),dispose:()=>s.uninstall()}}catch(o){throw s.uninstall(),new Error(`pixi ingest: game "${e.id}" rendered no capturable frame within ${r}ms: ${o}`)}}const Et=1500,At=1e4;function It(n,e){const t=e.settleGraceMs??Et,s=e.deadlineMs??At;let r=null,o=null;const a=i=>{e.isHeld()&&(r??=i,o===null&&e.currentScene()===n&&(o=i),e.render(),!(o!==null&&i-o>=t)&&(o===null&&i-r>=s||e.schedule(a)))};e.schedule(a)}function Pt(n){const e=k();if(e?.kind!=="canvas"||!e.session.adapter)return()=>{};const t=z()?.scenes;if(t&&me(t))return()=>{};const s=e.worldId;he({id:I,title:"Scene",kind:"world",workspaceRole:"authored-subject",provenance:{rootId:s},Content:n,closeable:!1,presentation:()=>({kind:"world",id:s})}),fe(I);const r=ge(s,I);return()=>{r(),ye(I,{discardDirty:!0})}}function kt(){const n=z()?.scenes;if(!n?.default)return;const e=n.entries.find(r=>r.id===n.default),t=e?.source?.export??e?.id;return t?(Y()?.storiesFor("")??[]).find(r=>r.label===t||r.id===t)?.id:void 0}function Rt({active:n,adapter:e,documentId:t,store:s,worldId:r,contractSceneId:o}){const a=w.useRef(null),c=w.useRef(ve()).current;w.useSyncExternalStore(s.shell.subscribe,s.shell.getSnapshot);const d=w.useSyncExternalStore(be,we),u=w.useSyncExternalStore(Se,Ce),p=k(),f=e.hierarchy.roots(),x=new Set(e.rects?.emptyContainers?.().map(l=>l.id)??[]),y=f.some(l=>!x.has(l.id)),S=ot({surface:"Ingest scene",rootIds:[r],phase:p?.kind==="canvas"&&p.worldId===r&&p.session.hostEl?"ready":"loading",content:p?.kind!=="canvas"||p.worldId!==r||!p.session.hostEl?"unknown":y?"present":"empty",readiness:d,failures:u});return w.useEffect(()=>xe(t,()=>({adapter:e,nodeId:[...s.shell.selectedEntityIds].find(l=>e.hierarchy.node(l))??null})),[e,t,s]),w.useEffect(()=>{const l=a.current;if(l)return st(l,c)},[c]),w.useEffect(()=>{if(!n)return;const l=a.current,v=k(),b=v?.kind==="canvas"?v.session.hostEl:void 0;if(!(!l||!b))return l.appendChild(b),()=>{const E=X();E&&b.parentElement===l&&E.appendChild(b)}},[n]),w.useEffect(()=>{if(!n)return;const l=o??kt();if(!l)return;const v=Y();v&&v.goToScene(l)},[n,o]),C.jsxs("div",{ref:a,"data-testid":"world-document:ingest-canvas-scene","data-volter-backdrop-color":n?V:void 0,"data-volter-backdrop-policy":n?"dark-frost":void 0,style:{position:"absolute",inset:0,overflow:"hidden",pointerEvents:"auto",backgroundColor:V,touchAction:"none"},children:[C.jsx(rt,{view:c,documentId:t}),C.jsx(at,{adapter:e,view:c,transformModeAware:!0,presentationId:t}),C.jsx(ct,{explanation:S,testId:"ingest-canvas-surface-status",style:{zIndex:20}}),C.jsx(it,{active:n,adapter:e,containerRef:a,view:c,documentId:t})]})}function ce(n){const e=k();if(e?.kind!=="canvas"||!e.session.adapter)return()=>{};const t=e.session.adapter,s=e.worldId;return Pt(o=>C.jsx(Rt,{...o,adapter:t,store:n,worldId:s}))}function Dt(n,e){const{adapter:t}=n;if(t.type!=="ingest")throw new Error(`resolveIngest2DDescriptor: world "${n.id}" is not an { ingest } world.`);if(!n.entry)throw new Error(`resolveIngest2DDescriptor: world "${n.id}" has no \`entry\` — an ingest root mounts the game's own entry module.`);const s=Ke(e);return{id:n.id,name:n.id,description:n.description??"",...t.captureTimeoutMs!==void 0?{captureTimeoutMs:t.captureTimeoutMs}:{},load:re(s.entry(n.entry),t.contractShim===void 0?void 0:s.module(t.contractShim))}}function H(n,e){const t=ut(n,e),s=lt[t];if(!s)throw new Error(`canvas ingest discovery: "${n}"'s module "${e}" did not match any game module (looked for glob key "${t}").`);return s}function Mt({folderId:n,manifest:e,root:t}){const{adapter:s}=t;if(!t.entry)throw new Error(`canvas ingest discovery: "${n}" has no \`entry\` — an ingest root mounts the game's own entry module.`);return{...{id:t.id,name:e.name,description:t.description??"",...s.captureTimeoutMs!==void 0?{captureTimeoutMs:s.captureTimeoutMs}:{}},load:re(H(n,t.entry),s.contractShim===void 0?void 0:H(n,s.contractShim))}}let G=null;function $t(){return G||(G=dt("canvas").map(Mt).sort((n,e)=>n.id.localeCompare(e.id))),G}function jt(n){return $t().find(e=>e.id===n)}const _t="this game imports the host's pixi directly, in the editor's own realm";function de(n,e,t){const s=R()?.systems;let r=null;const{systems:o,renderDebug:a,debugCollisions:i}=qe({contractSystems:s,surface:"canvas",...t?{physics:t}:{},...e?{canvasRuntime:{renderer:e}}:{},setRenderPassHooks:c=>{r?.(),r=c?Ze(e,c):null}});Pe(o),g.log(s?`canvas ingest: "${n}" declares the Volter game contract — ${s.commands?.length??0} commands, ${s.state?.length??0} state providers`:`canvas ingest: "${n}" declares no Volter game contract — game.commands()/game.state() have nothing to answer and will refuse by naming that`,"ingest");for(const c of i)g.error(`canvas ingest: "${n}" — ${c}; it will refuse`,"ingest");return e&&g.log(a?`canvas ingest: "${n}" render debugging is live — the Frame debugger captures through the game's own Pixi renderer (draws are unattributed: Pixi's batcher merges display objects, so no display object is the author of a draw)`:`canvas ingest: "${n}" has no render-debug capability — its renderer exposes no real WebGL2 context, or no prerender/postrender runners to bracket`,"ingest"),{wiring:a,uninstall:()=>r?.()}}function Tt(n,e){return e instanceof Error&&e.name===oe?`canvas ingest: game "${n}" never ran — its own modules failed to load, so nothing could render and there is no canvas runtime in the realm to recognize (${e})`:`canvas ingest: game "${n}" mounted no recognized canvas runtime — the host's pixi captured no frame, and the realm holds no Phaser game or Babylon.js engine on their own public registries either (${e})`}function Gt(n,e){const t=n?.canvas;return t instanceof Node&&e.contains(t)}function le(){return Ie(ze(R()?.systems,"canvas").bound.physics)}function L(n,e){const t=mt(e);if(t)return{runtime:"phaser",adapter:new bt(t,n),mechanism:"this game runs its own Phaser instance in the editor's own realm; the host reads that live game’s active scenes and display lists"};const s=ht(e);return s?{runtime:"babylon",adapter:new Re(s,n),mechanism:"this game runs its own Babylon.js engine in the editor's own realm; the host reads that live engine’s scenes and root nodes"}:null}function U(n,e,t,s,r){const o=r.adapter;o.refresh();const a=ie({primary:o,worldId:t,hostEl:s,store:n}),i=se(),c=()=>i?{loop:null,reason:"the same-realm loop gate holds this game’s scheduling, but no probe has measured that control on this route"}:{loop:null,reason:Ge},d=q(i?{setPaused:p=>{p?i.hold():i.release()}}:{pauseGap:`${r.runtime} exposes no host-controlled loop gate`});let u=()=>{};Z({kind:"canvas",session:{store:n,adapter:o,hostEl:s,lifecycle:d,loop:c,dispose:()=>{u(),o.dispose(),O(),s.remove()}},siblings:[],worldId:t}),u=ce(n),Q(()=>n.shell.playState==="playing"&&n.shell.activeViewportTab==="play"),J(a),de(e.name,void 0,le()),ae(),n.shell.notifyIngestEdit(),K(),ee({reach:P({authoring:a}),reachMechanism:r.mechanism,loop:c}),g.log(`canvas ingest: recognized ${r.runtime} in the realm and captured "${e.name}"`,"ingest"),te("__volterIngest2D",{gameId:t,...ne(a),runtime:r.runtime,get reflected(){return o.refresh()},...d.setPaused?{setPaused:d.setPaused}:{},reach:P({authoring:a}),adapter:a,store:n})}async function Lt(n,e,t){Me(),await Ee();const s=X();if(!s){g.error("Game container not mounted — cannot ingest (canvas)","ingest");return}n.shell.setPlayState("playing"),g.log(`Ingesting unmodified PixiJS game: ${e.name}`,"ingest");const r=$e(R());r.malformed!==null&&g.error(`Ingest game "${e.id}" ${r.malformed} — the host is measuring readiness instead.`,"ingest");const o=r.ready===null?"measured-wait":"contract-ready",a=r.ready===null?"measured":"declared";_({rootId:e.id,mechanism:o,source:a,state:"waiting"});const i=document.createElement("div");i.id="container",i.style.cssText=`position:absolute;inset:0;width:100%;height:100%;overflow:hidden;background:#000;${je}`,pt(i),s.appendChild(i),_e(i);{const{markGameCssScope:h}=await N(async()=>{const{markGameCssScope:$}=await import("./index-Cjv2Ynte.js").then(j=>j.u2);return{markGameCssScope:$}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]));h(i);const m=Ae();if(m){const{ensureScopedGameStyles:$}=await N(async()=>{const{ensureScopedGameStyles:j}=await import("./index-Cjv2Ynte.js").then(pe=>pe.u3);return{ensureScopedGameStyles:j}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]));await $(m.rootPath)}}window.__volterMountCold=!0;const c=await Ve();let d;try{const h=await xt(c,e,{...e.captureTimeoutMs!==void 0?{captureTimeoutMs:e.captureTimeoutMs}:{},acceptCapture:({renderer:m})=>Gt(m,i),onWait:m=>nt(e.id,m),preferStructuralRuntime:async()=>{const m=T();return await m.__volterBabylon?.ready,L(n,m)!==null}});if(h===null){const m=L(n,T());if(m){U(n,e,t,i,m);return}throw new Error(`canvas ingest: game "${e.id}" reported a structural runtime, but it disappeared before dispatch`)}d=h}catch(h){const m=L(n,T());if(m){U(n,e,t,i,m);return}throw O(),i.remove(),_({rootId:e.id,mechanism:o,source:a,state:"failed",failure:r.ready===null?"no-readiness-declaration":"declared-ready-never-resolved"}),new Error(Tt(e.id,h))}const u=d.stage;for(let h=0;h<90&&(u.children?.length??0)===0;h++)await ke();const p=d.capture.captured?.app,f=p?.canvas;f&&(Ye(f),f.parentElement!==i&&i.appendChild(f));const x=He(p?[p]:[]),y=le(),S=tt(Qe()),l=y?et([y,S]):S,v=Te(R(),{onSwitchAccepted:h=>It(h,{isHeld:()=>!Le(),currentScene:()=>v?.active("")??null,render:()=>p?.render(),schedule:m=>requestAnimationFrame(m)})}),b=new Fe(u,n,{pixi:c,journal:Be(t),target:wt({physics:l,history:n.shell.projectHistory}),...v?{stories:v}:{},surface:()=>p?.canvas??null,capturePreview:(h,m)=>Ue(h,{...m,pixi:c})}),E=b.refresh(),A=ie({primary:b,worldId:t,hostEl:i,store:n});let D=null,B=()=>{};const F=se(),W=q({setPaused:h=>{d.setPaused(h),h?F?.hold():F?.release()}});Z({kind:"canvas",session:{store:n,adapter:b,hostEl:i,lifecycle:W,dispose:()=>{B(),D?.uninstall(),D?.wiring?.dispose(),x(),d.dispose(),O(),i.remove()}},siblings:[],worldId:t}),B=ce(n),Q(()=>n.shell.playState==="playing"&&n.shell.activeViewportTab==="play"),J(A),D=de(e.name,d.capture.captured?.renderer,y?l:null),ae(),n.shell.notifyIngestEdit(),K();let M="measured";if(r.ready)try{await r.ready(),M="declared"}catch(h){g.error(`Ingest game "${e.id}" declared \`window.volterGame.ready\` and it REJECTED (${String(h)}) — the frame was already captured, so the host fell back to the measured settle wait. This root now reports readiness as measured.`,"ingest")}_({rootId:e.id,mechanism:M==="declared"?"contract-ready":"measured-wait",source:M,state:"ready"}),ee({reach:P({authoring:A}),reachMechanism:_t,loop:()=>({loop:null,reason:"the host stops and starts the captured PixiJS Application ticker directly, but no probe has measured whether that holds everything this game schedules"})}),g.log(`pixi ingest: captured "${e.name}" (${E.count} nodes, ${E.sprites} sprites)`,"ingest"),te("__volterIngest2D",{gameId:t,...ne(A),drawCount:()=>d.capture.getDrawCount(),get reflected(){return b.refresh()},setPaused:W.setPaused,reach:P({authoring:A}),adapter:A,store:n})}function ue(n,e,t){return De(()=>Lt(n,e,t))}async function Yn(n,e,t){const s=Dt(e,t);return ue(n,s,e.id)}async function qn(n,e){const t=jt(e);if(!t){g.error(`Unknown pixi ingest game: ${e}`,"ingest");return}return ue(n,t,e)}export{ue as mountCanvasIngestRoot,qn as mountCanvasIngestRootById,Yn as mountCanvasIngestRootFromManifest};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-ClgrFOcX.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"])))=>i.map(i=>d[i]);
2
+ import{L as z,eD as me,fc as he,d3 as I,d4 as fe,f_ as ge,fo as ye,g3 as ve,g4 as be,g5 as we,g6 as Se,g7 as Ce,fX as xe,c2 as X,Z as g,bZ as Ee,kw as _,_ as N,b$ as J,c1 as K,aC as Ae,j as Ie,c0 as Pe}from"./index-ClgrFOcX.js";import{m as P}from"./capability-coverage-EnZ99FoT.js";import{n as ke}from"./after-paint-CB4bz1-e.js";import{BabylonAuthoringAdapter as Re}from"./babylon-authoring-adapter-C-EAsfMr.js";import{a as k,S as Y,s as De,c as Me,C as $e,D as R,G as je,B as _e,H as T,E as O,T as Te,j as q,k as Z,l as Q,r as ee,p as te,o as ne,U as Ge,K as se,u as Le}from"./active-ingest-CJ2U5L1O.js";import{c as Oe,a as Be}from"./json-history-resource-CDEoQe1R.js";import{P as Fe}from"./pixi-authoring-adapter-B1BBfTju.js";import{createLiveCanvasWriteTarget as We}from"./pixi-live-write-target-BcUhtqmJ.js";import{a as Ne}from"./source-persistence-backend-Cwy93SmQ.js";import{resolveCanvasPixiForEditor as Ve}from"./canvas-entry-runtime-CLOuJcgT.js";import{registerPresentedPixiApps as He,capturePixiDisplayObjectThumbnail as Ue}from"./canvas-preview-frames-CSCcu2sG.js";import{p as ze}from"./contract-system-adapters-BDUpDoKd.js";import{s as Xe,d as Je,f as Ke,b as re,g as Ye,e as ie,w as qe,j as Ze}from"./resolve-three-TQ367RQD.js";import{createPhysics2DRegistry as Qe}from"./physics-registry-B2Jkp8e6.js";import{composePhysicsAdapters2D as et,createPhysicsAdapter2D as tt}from"./system-adapters-rIC8FSGP.js";import{s as nt}from"./mount-ingest-root-C3o0o28C.js";import{landIngestBootInEdit as ae}from"./ingest-boot-viewport-CipkFljr.js";import{a as C}from"./jsx-runtime-DPjLkJKQ.js";import{b as st}from"./react-canvas-navigation-CxBm8iw8.js";import{C as V,a as rt,b as it}from"./CanvasSceneViewport-ChG9oRS8.js";import{R as at}from"./RootSelectionOverlay-Dv_w1D9s.js";import{e as ot,S as ct}from"./surface-state-b_H4iOCJ.js";import{r as w}from"./index-nmcBqr7Y.js";import{b as dt,e as lt,g as ut}from"./registry-D7lFIA8c.js";import{m as pt}from"./game-surface-defaults-D8S4cRxi.js";import"./index-CtzuWnCS.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CinJrH5C.js";import"./index-D_NuPfjr.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./game-contract-seams-C22a4B79.js";import"./ingest-source-persistence-CVU1rTj0.js";import"./index-CHOT9sYh.js";import"./component-instance-root-wO1p-rLr.js";import"./user-data-DL6HsBPf.js";import"./workspace-arrangement-86_8Kk5K.js";import"./pixi-transform-channels-P4rvmusc.js";import"./debug-registry-B2THKz1v.js";import"./dom-authoring-adapter-DsUgOtQy.js";import"./react-world-authoring-adapter-Dq8NqvWu.js";import"./board-guides-CCiyx8cT.js";import"./relative-import-specifier-CA9mSNXO.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-BunjdqX7.js";import"./inference-diagnostics-BmZ5ggEK.js";import"./writer-tw6EcuVO.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./three.core-3arARmh6.js";import"./three-state-_ImCbP87.js";import"./editor-shell-store-aKHbAoCV.js";import"./output-pass-HurwNl0G.js";import"./three.module-BLhyNg0e.js";import"./Pass-D1MRT672.js";import"./editor-layers-DwaX5UFy.js";import"./entity-object-BLJ-I8XT.js";import"./three-contract-Dkt6PmWY.js";import"./Toolbar-yvFlRv8R.js";import"./transform-mode-request-BnV8FSnx.js";import"./TransientHint-Bslncm_l.js";import"./layered-pick-guh6WlA7.js";import"./root-stacking-BEd9ZvxC.js";import"./eyedropper-session-bjPXnfeX.js";import"./react-story-board-CMvkLAkF.js";import"./viewport-editor-controls-BYaAZ_Ku.js";function mt(n){if(typeof n?.game?.scene?.getScenes=="function")return n.game;const e=n?.Phaser?.GAMES;return Array.isArray(e)?e.find(t=>typeof t?.scene?.getScenes=="function")??null:null}function ht(n){const e=n?.__volterBabylon?.engines,t=Array.isArray(e)?e:n?.BABYLON?.Engine?.Instances;return Array.isArray(t)?[...t].reverse().find(s=>Array.isArray(s?.scenes)&&s.scenes.length>0)??null:null}function ft(n){return[0,0,Math.sin(n/2),Math.cos(n/2)]}function gt(n){return 2*Math.atan2(n[2],n[3])}function yt(n){return encodeURIComponent(n||"unnamed")}function vt(n){return Array.isArray(n.list)?n.list:[]}class bt{constructor(e,t){this.game=e,this.store=t}capabilities={transform:!0,inspectorFields:!0,persist:!1};provenance={source:"foreign",label:"live-only",detail:"Live Phaser scene/display lists projected directly — edits apply to native game objects for this session only."};persistence={...Oe(),destination:"live-only (not saved)"};indexed=new Map;listeners=new Set;refresh(){this.reindex();let e=0,t=0;for(const s of this.indexed.values())s.kind==="scene"?e++:t++;return{scenes:e,objects:t}}scenes(){const e=this.game.scene?.getScenes;if(typeof e!="function")return[];const t=e.call(this.game.scene,!0);return Array.isArray(t)?t:[]}reindex(){this.indexed.clear();for(const[e,t]of this.scenes().entries()){const s=t.sys?.settings?.key||`Scene ${e+1}`,r=`phaser:scene:${e}:${yt(s)}`,o=Array.isArray(t.children?.list)?t.children.list:[],a={id:r,label:s,role:"root",kind:"phaser-scene",typeLabel:"Phaser.Scene",parentId:null,childIds:[]};this.indexed.set(r,{kind:"scene",scene:t,node:a}),a.childIds=o.map((i,c)=>this.indexObject(i,r,`${e}/${c}`))}}indexObject(e,t,s){const r=e.type||e.constructor?.name||"GameObject",o=e.name||r,a=`phaser:object:${s}`,i={id:a,label:o,role:"entity",kind:`phaser-${r.toLowerCase()}`,typeLabel:r,parentId:t,childIds:[]};return this.indexed.set(a,{kind:"object",object:e,node:i}),i.childIds=vt(e).map((c,d)=>this.indexObject(c,a,`${s}/${d}`)),a}hierarchy={roots:()=>(this.reindex(),[...this.indexed.values()].filter(e=>e.kind==="scene").map(e=>e.node)),node:e=>(this.reindex(),this.indexed.get(e)?.node??null)};selection={get:()=>[...this.store.shell.selectedEntityIds],set:e=>{this.store.shell.selectMultiple(e),this.notify()}};transforms={dimensions:e=>(this.reindex(),this.indexed.get(e)?.kind==="object"?"2d":null),get:e=>{this.reindex();const t=this.indexed.get(e);if(!t||t.kind!=="object")return{position:[0,0,0],rotation:[0,0,0,1],scale:[1,1,1]};const s=t.object;return{position:[s.x??0,s.y??0,s.depth??0],rotation:ft(s.rotation??0),scale:[s.scaleX??1,s.scaleY??1,1]}},beginEdit:e=>{},apply:(e,t)=>{this.reindex();const s=this.indexed.get(e);!s||s.kind!=="object"||(s.object.x=t.position[0],s.object.y=t.position[1],s.object.depth=t.position[2],s.object.rotation=gt(t.rotation),s.object.scaleX=t.scale[0],s.object.scaleY=t.scale[1],this.notify())},endEdit:e=>{}};inspector={properties:e=>{this.reindex();const t=this.indexed.get(e);return t?t.kind==="scene"?[{path:"key",label:"Scene key",type:"string",readonly:!0}]:[{path:"type",label:"Type",type:"string",readonly:!0},{path:"name",label:"Name",type:"string"},{path:"active",label:"Active",type:"boolean"},{path:"visible",label:"Visible",type:"boolean"},{path:"alpha",label:"Alpha",type:"number"},{path:"depth",label:"Depth",type:"number"}]:[]},get:(e,t)=>{this.reindex();const s=this.indexed.get(e);if(s)return s.kind==="scene"?t==="key"?s.scene.sys?.settings?.key:void 0:t==="type"?s.object.type||s.object.constructor?.name:s.object[t]},set:(e,t,s)=>{this.reindex();const r=this.indexed.get(e);!r||r.kind!=="object"||t==="type"||(r.object[t]=s,this.notify())}};subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}dispose(){this.listeners.clear(),this.indexed.clear()}notify(){for(const e of this.listeners)e();this.store.shell.notifyIngestEdit()}}function wt(n){return We({physics:n.physics,persistence:Ne({history:n.history,writer:n.writer})})}function St(n,e={}){const s=n.Application.prototype;let r=null,o=0;const a=[],i=Object.getOwnPropertyDescriptor(s,"render"),c=s.render;return Object.defineProperty(s,"render",{configurable:!0,writable:!0,value:function(...d){o++;const u=this.stage;if(!r&&u){const p={stage:u,renderer:this.renderer,app:this};if(e.accept?.(p)??!0){r=p;for(const f of a.splice(0))f(r)}}return c?.apply(this,d)}}),{get captured(){return r},getDrawCount(){return o},setPaused(d){const u=r?.app;u?.ticker&&(d?u.ticker.stop():u.ticker.start())},waitForCapture(d){const u=typeof d=="number"?{timeoutMs:d}:d??{},p=u.timeoutMs??1e4;return r?Promise.resolve(r):new Promise((f,x)=>{const y=Xe({budgetMs:p,clock:u.visibility??Je(),onExpire:()=>{const l=a.indexOf(S);l>=0&&a.splice(l,1),u.onWait?.(null),x(new Error(`pixi scene capture timed out after ${p}ms of VISIBLE time (${Math.round(y.elapsedHiddenMs())}ms browser-suspended, which is not counted because no frame can be presented) — the game never rendered, or it bundles its own (un-shared) copy of pixi.js.`))}}),S=l=>{y.cancel(),u.onWait?.(null),f(l)};a.push(S),u.onWait?.(y)})},uninstall(){i?Object.defineProperty(s,"render",i):c&&Object.defineProperty(s,"render",{configurable:!0,writable:!0,value:c})}}}const oe="IngestGame2DLoadError";class Ct extends Error{constructor(e,t){super(`pixi ingest: game "${e}" failed to load: ${t}`,{cause:t}),this.name=oe}}async function xt(n,e,t={}){const s=St(n,{...t.acceptCapture?{accept:t.acceptCapture}:{}});try{if(await e.load(),await t.preferStructuralRuntime?.())return s.uninstall(),null}catch(o){throw s.uninstall(),new Ct(e.id,o)}const r=t.captureTimeoutMs??e.captureTimeoutMs??8e3;try{return{stage:(await s.waitForCapture({timeoutMs:r,...t.onWait?{onWait:t.onWait}:{}})).stage,capture:s,setPaused:a=>s.setPaused(a),dispose:()=>s.uninstall()}}catch(o){throw s.uninstall(),new Error(`pixi ingest: game "${e.id}" rendered no capturable frame within ${r}ms: ${o}`)}}const Et=1500,At=1e4;function It(n,e){const t=e.settleGraceMs??Et,s=e.deadlineMs??At;let r=null,o=null;const a=i=>{e.isHeld()&&(r??=i,o===null&&e.currentScene()===n&&(o=i),e.render(),!(o!==null&&i-o>=t)&&(o===null&&i-r>=s||e.schedule(a)))};e.schedule(a)}function Pt(n){const e=k();if(e?.kind!=="canvas"||!e.session.adapter)return()=>{};const t=z()?.scenes;if(t&&me(t))return()=>{};const s=e.worldId;he({id:I,title:"Scene",kind:"world",workspaceRole:"authored-subject",provenance:{rootId:s},Content:n,closeable:!1,presentation:()=>({kind:"world",id:s})}),fe(I);const r=ge(s,I);return()=>{r(),ye(I,{discardDirty:!0})}}function kt(){const n=z()?.scenes;if(!n?.default)return;const e=n.entries.find(r=>r.id===n.default),t=e?.source?.export??e?.id;return t?(Y()?.storiesFor("")??[]).find(r=>r.label===t||r.id===t)?.id:void 0}function Rt({active:n,adapter:e,documentId:t,store:s,worldId:r,contractSceneId:o}){const a=w.useRef(null),c=w.useRef(ve()).current;w.useSyncExternalStore(s.shell.subscribe,s.shell.getSnapshot);const d=w.useSyncExternalStore(be,we),u=w.useSyncExternalStore(Se,Ce),p=k(),f=e.hierarchy.roots(),x=new Set(e.rects?.emptyContainers?.().map(l=>l.id)??[]),y=f.some(l=>!x.has(l.id)),S=ot({surface:"Ingest scene",rootIds:[r],phase:p?.kind==="canvas"&&p.worldId===r&&p.session.hostEl?"ready":"loading",content:p?.kind!=="canvas"||p.worldId!==r||!p.session.hostEl?"unknown":y?"present":"empty",readiness:d,failures:u});return w.useEffect(()=>xe(t,()=>({adapter:e,nodeId:[...s.shell.selectedEntityIds].find(l=>e.hierarchy.node(l))??null})),[e,t,s]),w.useEffect(()=>{const l=a.current;if(l)return st(l,c)},[c]),w.useEffect(()=>{if(!n)return;const l=a.current,v=k(),b=v?.kind==="canvas"?v.session.hostEl:void 0;if(!(!l||!b))return l.appendChild(b),()=>{const E=X();E&&b.parentElement===l&&E.appendChild(b)}},[n]),w.useEffect(()=>{if(!n)return;const l=o??kt();if(!l)return;const v=Y();v&&v.goToScene(l)},[n,o]),C.jsxs("div",{ref:a,"data-testid":"world-document:ingest-canvas-scene","data-volter-backdrop-color":n?V:void 0,"data-volter-backdrop-policy":n?"dark-frost":void 0,style:{position:"absolute",inset:0,overflow:"hidden",pointerEvents:"auto",backgroundColor:V,touchAction:"none"},children:[C.jsx(rt,{view:c,documentId:t}),C.jsx(at,{adapter:e,view:c,transformModeAware:!0,presentationId:t}),C.jsx(ct,{explanation:S,testId:"ingest-canvas-surface-status",style:{zIndex:20}}),C.jsx(it,{active:n,adapter:e,containerRef:a,view:c,documentId:t})]})}function ce(n){const e=k();if(e?.kind!=="canvas"||!e.session.adapter)return()=>{};const t=e.session.adapter,s=e.worldId;return Pt(o=>C.jsx(Rt,{...o,adapter:t,store:n,worldId:s}))}function Dt(n,e){const{adapter:t}=n;if(t.type!=="ingest")throw new Error(`resolveIngest2DDescriptor: world "${n.id}" is not an { ingest } world.`);if(!n.entry)throw new Error(`resolveIngest2DDescriptor: world "${n.id}" has no \`entry\` — an ingest root mounts the game's own entry module.`);const s=Ke(e);return{id:n.id,name:n.id,description:n.description??"",...t.captureTimeoutMs!==void 0?{captureTimeoutMs:t.captureTimeoutMs}:{},load:re(s.entry(n.entry),t.contractShim===void 0?void 0:s.module(t.contractShim))}}function H(n,e){const t=ut(n,e),s=lt[t];if(!s)throw new Error(`canvas ingest discovery: "${n}"'s module "${e}" did not match any game module (looked for glob key "${t}").`);return s}function Mt({folderId:n,manifest:e,root:t}){const{adapter:s}=t;if(!t.entry)throw new Error(`canvas ingest discovery: "${n}" has no \`entry\` — an ingest root mounts the game's own entry module.`);return{...{id:t.id,name:e.name,description:t.description??"",...s.captureTimeoutMs!==void 0?{captureTimeoutMs:s.captureTimeoutMs}:{}},load:re(H(n,t.entry),s.contractShim===void 0?void 0:H(n,s.contractShim))}}let G=null;function $t(){return G||(G=dt("canvas").map(Mt).sort((n,e)=>n.id.localeCompare(e.id))),G}function jt(n){return $t().find(e=>e.id===n)}const _t="this game imports the host's pixi directly, in the editor's own realm";function de(n,e,t){const s=R()?.systems;let r=null;const{systems:o,renderDebug:a,debugCollisions:i}=qe({contractSystems:s,surface:"canvas",...t?{physics:t}:{},...e?{canvasRuntime:{renderer:e}}:{},setRenderPassHooks:c=>{r?.(),r=c?Ze(e,c):null}});Pe(o),g.log(s?`canvas ingest: "${n}" declares the Volter game contract — ${s.commands?.length??0} commands, ${s.state?.length??0} state providers`:`canvas ingest: "${n}" declares no Volter game contract — game.commands()/game.state() have nothing to answer and will refuse by naming that`,"ingest");for(const c of i)g.error(`canvas ingest: "${n}" — ${c}; it will refuse`,"ingest");return e&&g.log(a?`canvas ingest: "${n}" render debugging is live — the Frame debugger captures through the game's own Pixi renderer (draws are unattributed: Pixi's batcher merges display objects, so no display object is the author of a draw)`:`canvas ingest: "${n}" has no render-debug capability — its renderer exposes no real WebGL2 context, or no prerender/postrender runners to bracket`,"ingest"),{wiring:a,uninstall:()=>r?.()}}function Tt(n,e){return e instanceof Error&&e.name===oe?`canvas ingest: game "${n}" never ran — its own modules failed to load, so nothing could render and there is no canvas runtime in the realm to recognize (${e})`:`canvas ingest: game "${n}" mounted no recognized canvas runtime — the host's pixi captured no frame, and the realm holds no Phaser game or Babylon.js engine on their own public registries either (${e})`}function Gt(n,e){const t=n?.canvas;return t instanceof Node&&e.contains(t)}function le(){return Ie(ze(R()?.systems,"canvas").bound.physics)}function L(n,e){const t=mt(e);if(t)return{runtime:"phaser",adapter:new bt(t,n),mechanism:"this game runs its own Phaser instance in the editor's own realm; the host reads that live game’s active scenes and display lists"};const s=ht(e);return s?{runtime:"babylon",adapter:new Re(s,n),mechanism:"this game runs its own Babylon.js engine in the editor's own realm; the host reads that live engine’s scenes and root nodes"}:null}function U(n,e,t,s,r){const o=r.adapter;o.refresh();const a=ie({primary:o,worldId:t,hostEl:s,store:n}),i=se(),c=()=>i?{loop:null,reason:"the same-realm loop gate holds this game’s scheduling, but no probe has measured that control on this route"}:{loop:null,reason:Ge},d=q(i?{setPaused:p=>{p?i.hold():i.release()}}:{pauseGap:`${r.runtime} exposes no host-controlled loop gate`});let u=()=>{};Z({kind:"canvas",session:{store:n,adapter:o,hostEl:s,lifecycle:d,loop:c,dispose:()=>{u(),o.dispose(),O(),s.remove()}},siblings:[],worldId:t}),u=ce(n),Q(()=>n.shell.playState==="playing"&&n.shell.activeViewportTab==="play"),J(a),de(e.name,void 0,le()),ae(),n.shell.notifyIngestEdit(),K(),ee({reach:P({authoring:a}),reachMechanism:r.mechanism,loop:c}),g.log(`canvas ingest: recognized ${r.runtime} in the realm and captured "${e.name}"`,"ingest"),te("__volterIngest2D",{gameId:t,...ne(a),runtime:r.runtime,get reflected(){return o.refresh()},...d.setPaused?{setPaused:d.setPaused}:{},reach:P({authoring:a}),adapter:a,store:n})}async function Lt(n,e,t){Me(),await Ee();const s=X();if(!s){g.error("Game container not mounted — cannot ingest (canvas)","ingest");return}n.shell.setPlayState("playing"),g.log(`Ingesting unmodified PixiJS game: ${e.name}`,"ingest");const r=$e(R());r.malformed!==null&&g.error(`Ingest game "${e.id}" ${r.malformed} — the host is measuring readiness instead.`,"ingest");const o=r.ready===null?"measured-wait":"contract-ready",a=r.ready===null?"measured":"declared";_({rootId:e.id,mechanism:o,source:a,state:"waiting"});const i=document.createElement("div");i.id="container",i.style.cssText=`position:absolute;inset:0;width:100%;height:100%;overflow:hidden;background:#000;${je}`,pt(i),s.appendChild(i),_e(i);{const{markGameCssScope:h}=await N(async()=>{const{markGameCssScope:$}=await import("./index-ClgrFOcX.js").then(j=>j.u2);return{markGameCssScope:$}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]));h(i);const m=Ae();if(m){const{ensureScopedGameStyles:$}=await N(async()=>{const{ensureScopedGameStyles:j}=await import("./index-ClgrFOcX.js").then(pe=>pe.u3);return{ensureScopedGameStyles:j}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]));await $(m.rootPath)}}window.__volterMountCold=!0;const c=await Ve();let d;try{const h=await xt(c,e,{...e.captureTimeoutMs!==void 0?{captureTimeoutMs:e.captureTimeoutMs}:{},acceptCapture:({renderer:m})=>Gt(m,i),onWait:m=>nt(e.id,m),preferStructuralRuntime:async()=>{const m=T();return await m.__volterBabylon?.ready,L(n,m)!==null}});if(h===null){const m=L(n,T());if(m){U(n,e,t,i,m);return}throw new Error(`canvas ingest: game "${e.id}" reported a structural runtime, but it disappeared before dispatch`)}d=h}catch(h){const m=L(n,T());if(m){U(n,e,t,i,m);return}throw O(),i.remove(),_({rootId:e.id,mechanism:o,source:a,state:"failed",failure:r.ready===null?"no-readiness-declaration":"declared-ready-never-resolved"}),new Error(Tt(e.id,h))}const u=d.stage;for(let h=0;h<90&&(u.children?.length??0)===0;h++)await ke();const p=d.capture.captured?.app,f=p?.canvas;f&&(Ye(f),f.parentElement!==i&&i.appendChild(f));const x=He(p?[p]:[]),y=le(),S=tt(Qe()),l=y?et([y,S]):S,v=Te(R(),{onSwitchAccepted:h=>It(h,{isHeld:()=>!Le(),currentScene:()=>v?.active("")??null,render:()=>p?.render(),schedule:m=>requestAnimationFrame(m)})}),b=new Fe(u,n,{pixi:c,journal:Be(t),target:wt({physics:l,history:n.shell.projectHistory}),...v?{stories:v}:{},surface:()=>p?.canvas??null,capturePreview:(h,m)=>Ue(h,{...m,pixi:c})}),E=b.refresh(),A=ie({primary:b,worldId:t,hostEl:i,store:n});let D=null,B=()=>{};const F=se(),W=q({setPaused:h=>{d.setPaused(h),h?F?.hold():F?.release()}});Z({kind:"canvas",session:{store:n,adapter:b,hostEl:i,lifecycle:W,dispose:()=>{B(),D?.uninstall(),D?.wiring?.dispose(),x(),d.dispose(),O(),i.remove()}},siblings:[],worldId:t}),B=ce(n),Q(()=>n.shell.playState==="playing"&&n.shell.activeViewportTab==="play"),J(A),D=de(e.name,d.capture.captured?.renderer,y?l:null),ae(),n.shell.notifyIngestEdit(),K();let M="measured";if(r.ready)try{await r.ready(),M="declared"}catch(h){g.error(`Ingest game "${e.id}" declared \`window.volterGame.ready\` and it REJECTED (${String(h)}) — the frame was already captured, so the host fell back to the measured settle wait. This root now reports readiness as measured.`,"ingest")}_({rootId:e.id,mechanism:M==="declared"?"contract-ready":"measured-wait",source:M,state:"ready"}),ee({reach:P({authoring:A}),reachMechanism:_t,loop:()=>({loop:null,reason:"the host stops and starts the captured PixiJS Application ticker directly, but no probe has measured whether that holds everything this game schedules"})}),g.log(`pixi ingest: captured "${e.name}" (${E.count} nodes, ${E.sprites} sprites)`,"ingest"),te("__volterIngest2D",{gameId:t,...ne(A),drawCount:()=>d.capture.getDrawCount(),get reflected(){return b.refresh()},setPaused:W.setPaused,reach:P({authoring:A}),adapter:A,store:n})}function ue(n,e,t){return De(()=>Lt(n,e,t))}async function Yn(n,e,t){const s=Dt(e,t);return ue(n,s,e.id)}async function qn(n,e){const t=jt(e);if(!t){g.error(`Unknown pixi ingest game: ${e}`,"ingest");return}return ue(n,t,e)}export{ue as mountCanvasIngestRoot,qn as mountCanvasIngestRootById,Yn as mountCanvasIngestRootFromManifest};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/create-runtime-BKAyWS74.js","assets/adapter-surface-Y37Nzcyw.js","assets/binding-Bmxqznjk.js","assets/root-stacking-BEd9ZvxC.js","assets/assets-BcrMQHRv.js","assets/loader-BTUKnX5Q.js","assets/KTX2Loader-CaqVE6nY.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/GLTFLoader-KeoruJgS.js","assets/BufferGeometryUtils-B22h7jo4.js","assets/setup-renderer-Cdx_0C3T.js","assets/index-DHhMOs_s.js","assets/defaults-DKiBJCPN.js","assets/render-settings-DeBS5HzD.js","assets/render-features-BYgh328X.js","assets/index-Cjv2Ynte.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/seeded-random-BVi4_fs4.js","assets/debug-registry-CcTdmLf3.js","assets/loop-gate-report-N52EWFGD.js","assets/system-slot-E2mEdiih.js","assets/user-data-CODoGZqA.js","assets/object-marks-BnvSuCTt.js","assets/performance-profiler-CMbwGBuk.js"])))=>i.map(i=>d[i]);
2
- import{bZ as y,Z as s,_ as R,b$ as E,c0 as v,c1 as I,c2 as w}from"./index-Cjv2Ynte.js";import{m as S}from"./capability-coverage-BMuTFU_9.js";import{r as O}from"./binding-resolver-4nTdtOpk.js";import{s as j,j as G,k as T,l as P,p as A,m as H,c as D,r as N,n as b,o as C}from"./active-ingest-CmyN258P.js";import{a as L}from"./json-history-resource-C1pGwXuI.js";import{D as M}from"./dom-authoring-adapter-DBtypFqH.js";import{landIngestBootInEdit as V}from"./ingest-boot-viewport-Dynh3g5V.js";import{b as x}from"./registry-DPYQgPRv.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"./game-contract-seams-CzlxJGC2.js";import"./native-debug-module-BUPFKtBc.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-CcTdmLf3.js";import"./contract-system-adapters-D8SzcuZo.js";import"./adapter-surface-Y37Nzcyw.js";import"./index-DzuOGwVB.js";import"./structural-signature-Dc7skRiy.js";import"./three.core-3arARmh6.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./events-156d8d12.esm-DmeaOP4r.js";import"./three.module-BLhyNg0e.js";import"./realm-services-CbgTofeT.js";import"./canvas-entry-runtime-CgJkCzp_.js";import"./three-ingest-runtime-BPTa3ryG.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"./ingest-source-persistence-BNek6mSi.js";import"./react-world-authoring-adapter-CTCp7U6C.js";import"./board-guides-Cnfvv0uu.js";import"./relative-import-specifier-CPSPKQKY.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-xUKvX80V.js";import"./inference-diagnostics-DE1P5w14.js";import"./writer-tw6EcuVO.js";function F({folderId:t,manifest:e,root:o}){if(!o.entry)throw new Error(`dom ingest discovery: "${t}" has no \`entry\` — a dom ingest root's \`entry\` must point at the host-shim module in the same folder (D-N2).`);return{folderId:t,manifest:e,worldId:o.id}}let f=null;function W(){return f||(f=x("dom").map(F).sort((t,e)=>t.folderId.localeCompare(e.folderId))),f}function Z(t){return W().find(e=>e.folderId===t)}function q(t){return typeof __VOLTER_ENGINE_ROOT__!="string"||!__VOLTER_ENGINE_ROOT__?void 0:`${__VOLTER_ENGINE_ROOT__.endsWith("/")?__VOLTER_ENGINE_ROOT__.slice(0,-1):__VOLTER_ENGINE_ROOT__}/packages/editor/src/ingest/games/${t}`}const z="this world mounts in the host's native React runtime, so the editor is limited only by what its authoring adapter provides";function $(t){return{reach:S({authoring:t}),reachMechanism:z,loop:H}}async function B(t,e){const o=Z(e);if(!o){s.error(`Unknown react ingest game: ${e}`,"ingest");return}const l=q(e);if(!l){s.error(`React ingest "${e}": no __VOLTER_ENGINE_ROOT__ available to resolve its entry`,"ingest");return}await y();const i=w();if(!i){s.error("Game container not mounted — cannot ingest (react)","ingest");return}D(),t.shell.setPlayState("playing"),s.log(`Ingesting unmodified native-React game: ${o.manifest.name}`,"ingest"),window.__volterMountCold=!0;const{createGameRuntime:u}=await R(async()=>{const{createGameRuntime:a}=await import("./create-runtime-BKAyWS74.js").then(h=>h.e);return{createGameRuntime:a}},__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])),g=await O(o.manifest,l),d=i.clientWidth,_=i.clientHeight,r=await u({container:i,roots:g,width:d,height:_}),m=r.game.roots[0].reactRoot(),n=new M(m,t,{journal:L(e)}),c=G({setPaused:a=>a?r.game.play.pause():r.game.play.resume()});T({kind:"dom",session:{store:t,lifecycle:c,stop:()=>r.stop(),adapter:n},siblings:[],worldId:e}),P(()=>t.shell.playState==="playing"&&t.shell.activeViewportTab==="play"),E(n),v({}),V(),t.shell.notifyIngestEdit(),I();const p=$(n);N(p),A("__volterIngestReact",{gameId:e,worldId:o.worldId,...C(n),noAuthoring:!1,reach:p.reach,domEvidence:()=>b(m,n),setPausedPresent:typeof c.setPaused=="function"})}async function Ht(t,e,o,l){await y();const i=w();if(!i){s.error("Game container not mounted — cannot ingest (react)","ingest");return}D(),t.shell.setPlayState("playing"),s.log(`Ingesting unmodified native-React game (external folder): ${o.id}`,"ingest"),window.__volterMountCold=!0;const{createGameRuntime:u}=await R(async()=>{const{createGameRuntime:a}=await import("./create-runtime-BKAyWS74.js").then(h=>h.e);return{createGameRuntime:a}},__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])),g=await O({...e,roots:[o]},l),d=i.clientWidth,_=i.clientHeight,r=await u({container:i,roots:g,width:d,height:_}),m=r.game.roots[0].reactRoot(),n=new M(m,t,{journal:L(o.id)}),c=G({setPaused:a=>a?r.game.play.pause():r.game.play.resume()});T({kind:"dom",session:{store:t,lifecycle:c,stop:()=>r.stop(),adapter:n},siblings:[],worldId:o.id}),P(()=>t.shell.playState==="playing"&&t.shell.activeViewportTab==="play"),E(n),v({}),V(),t.shell.notifyIngestEdit(),I();const p=$(n);N(p),A("__volterIngestReact",{worldId:o.id,...C(n),noAuthoring:!1,reach:p.reach,domEvidence:()=>b(m,n),setPausedPresent:typeof c.setPaused=="function"})}function xt(t,e){return j(()=>B(t,e))}export{xt as mountDomIngestRoot,Ht as mountDomIngestRootFromManifest};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/create-runtime-Bucz0XVU.js","assets/adapter-surface-Y37Nzcyw.js","assets/binding-Bmxqznjk.js","assets/root-stacking-BEd9ZvxC.js","assets/assets-BcrMQHRv.js","assets/loader-BTUKnX5Q.js","assets/KTX2Loader-CaqVE6nY.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/GLTFLoader-KeoruJgS.js","assets/BufferGeometryUtils-B22h7jo4.js","assets/setup-renderer-efjIBSGF.js","assets/index-DHhMOs_s.js","assets/defaults-DKiBJCPN.js","assets/render-settings-CUbo4Sw5.js","assets/render-features-sSb1-c5x.js","assets/index-ClgrFOcX.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/seeded-random-B6zqGkWP.js","assets/debug-registry-B2THKz1v.js","assets/loop-gate-report-N52EWFGD.js","assets/system-slot-E2mEdiih.js","assets/user-data-CODoGZqA.js","assets/object-marks-BnvSuCTt.js","assets/performance-profiler-CMbwGBuk.js"])))=>i.map(i=>d[i]);
2
+ import{bZ as y,Z as s,_ as R,b$ as E,c0 as v,c1 as I,c2 as w}from"./index-ClgrFOcX.js";import{m as S}from"./capability-coverage-EnZ99FoT.js";import{r as O}from"./binding-resolver-DoOAFM2m.js";import{s as j,j as G,k as T,l as P,p as A,m as H,c as D,r as N,n as b,o as C}from"./active-ingest-CJ2U5L1O.js";import{a as L}from"./json-history-resource-CDEoQe1R.js";import{D as M}from"./dom-authoring-adapter-DsUgOtQy.js";import{landIngestBootInEdit as V}from"./ingest-boot-viewport-CipkFljr.js";import{b as x}from"./registry-D7lFIA8c.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"./game-contract-seams-C22a4B79.js";import"./native-debug-module-iX2-V5kg.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-B2THKz1v.js";import"./contract-system-adapters-BDUpDoKd.js";import"./adapter-surface-Y37Nzcyw.js";import"./index-DzuOGwVB.js";import"./structural-signature-Dc7skRiy.js";import"./three.core-3arARmh6.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./events-156d8d12.esm-DmeaOP4r.js";import"./three.module-BLhyNg0e.js";import"./realm-services-CqjVBanw.js";import"./canvas-entry-runtime-CLOuJcgT.js";import"./three-ingest-runtime-x9nLmUl-.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"./ingest-source-persistence-CVU1rTj0.js";import"./react-world-authoring-adapter-Dq8NqvWu.js";import"./board-guides-CCiyx8cT.js";import"./relative-import-specifier-CA9mSNXO.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-BunjdqX7.js";import"./inference-diagnostics-BmZ5ggEK.js";import"./writer-tw6EcuVO.js";function F({folderId:t,manifest:e,root:o}){if(!o.entry)throw new Error(`dom ingest discovery: "${t}" has no \`entry\` — a dom ingest root's \`entry\` must point at the host-shim module in the same folder (D-N2).`);return{folderId:t,manifest:e,worldId:o.id}}let f=null;function W(){return f||(f=x("dom").map(F).sort((t,e)=>t.folderId.localeCompare(e.folderId))),f}function Z(t){return W().find(e=>e.folderId===t)}function q(t){return typeof __VOLTER_ENGINE_ROOT__!="string"||!__VOLTER_ENGINE_ROOT__?void 0:`${__VOLTER_ENGINE_ROOT__.endsWith("/")?__VOLTER_ENGINE_ROOT__.slice(0,-1):__VOLTER_ENGINE_ROOT__}/packages/editor/src/ingest/games/${t}`}const z="this world mounts in the host's native React runtime, so the editor is limited only by what its authoring adapter provides";function $(t){return{reach:S({authoring:t}),reachMechanism:z,loop:H}}async function B(t,e){const o=Z(e);if(!o){s.error(`Unknown react ingest game: ${e}`,"ingest");return}const l=q(e);if(!l){s.error(`React ingest "${e}": no __VOLTER_ENGINE_ROOT__ available to resolve its entry`,"ingest");return}await y();const i=w();if(!i){s.error("Game container not mounted — cannot ingest (react)","ingest");return}D(),t.shell.setPlayState("playing"),s.log(`Ingesting unmodified native-React game: ${o.manifest.name}`,"ingest"),window.__volterMountCold=!0;const{createGameRuntime:u}=await R(async()=>{const{createGameRuntime:a}=await import("./create-runtime-Bucz0XVU.js").then(h=>h.e);return{createGameRuntime:a}},__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])),g=await O(o.manifest,l),d=i.clientWidth,_=i.clientHeight,r=await u({container:i,roots:g,width:d,height:_}),m=r.game.roots[0].reactRoot(),n=new M(m,t,{journal:L(e)}),c=G({setPaused:a=>a?r.game.play.pause():r.game.play.resume()});T({kind:"dom",session:{store:t,lifecycle:c,stop:()=>r.stop(),adapter:n},siblings:[],worldId:e}),P(()=>t.shell.playState==="playing"&&t.shell.activeViewportTab==="play"),E(n),v({}),V(),t.shell.notifyIngestEdit(),I();const p=$(n);N(p),A("__volterIngestReact",{gameId:e,worldId:o.worldId,...C(n),noAuthoring:!1,reach:p.reach,domEvidence:()=>b(m,n),setPausedPresent:typeof c.setPaused=="function"})}async function Ht(t,e,o,l){await y();const i=w();if(!i){s.error("Game container not mounted — cannot ingest (react)","ingest");return}D(),t.shell.setPlayState("playing"),s.log(`Ingesting unmodified native-React game (external folder): ${o.id}`,"ingest"),window.__volterMountCold=!0;const{createGameRuntime:u}=await R(async()=>{const{createGameRuntime:a}=await import("./create-runtime-Bucz0XVU.js").then(h=>h.e);return{createGameRuntime:a}},__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])),g=await O({...e,roots:[o]},l),d=i.clientWidth,_=i.clientHeight,r=await u({container:i,roots:g,width:d,height:_}),m=r.game.roots[0].reactRoot(),n=new M(m,t,{journal:L(o.id)}),c=G({setPaused:a=>a?r.game.play.pause():r.game.play.resume()});T({kind:"dom",session:{store:t,lifecycle:c,stop:()=>r.stop(),adapter:n},siblings:[],worldId:o.id}),P(()=>t.shell.playState==="playing"&&t.shell.activeViewportTab==="play"),E(n),v({}),V(),t.shell.notifyIngestEdit(),I();const p=$(n);N(p),A("__volterIngestReact",{worldId:o.id,...C(n),noAuthoring:!1,reach:p.reach,domEvidence:()=>b(m,n),setPausedPresent:typeof c.setPaused=="function"})}function xt(t,e){return j(()=>B(t,e))}export{xt as mountDomIngestRoot,Ht as mountDomIngestRootFromManifest};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mount-canvas-ingest-root-BFKVZ_nn.js","assets/index-Cjv2Ynte.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/capability-coverage-BMuTFU_9.js","assets/game-contract-seams-CzlxJGC2.js","assets/after-paint-CB4bz1-e.js","assets/babylon-authoring-adapter-rHojeSh-.js","assets/json-history-resource-C1pGwXuI.js","assets/source-persistence-backend-BMbXR_WB.js","assets/ingest-source-persistence-BNek6mSi.js","assets/active-ingest-CmyN258P.js","assets/contract-system-adapters-D8SzcuZo.js","assets/pixi-authoring-adapter-CAS5Elnh.js","assets/index-DUA0RF9E.js","assets/component-instance-root-Ctbx3vOO.js","assets/user-data-DxeJHxTz.js","assets/workspace-arrangement-Bq8u7HUK.js","assets/pixi-transform-channels-P4rvmusc.js","assets/pixi-live-write-target-BO-cO1Gl.js","assets/canvas-entry-runtime-CgJkCzp_.js","assets/debug-registry-CcTdmLf3.js","assets/canvas-preview-frames-DMZo3rqI.js","assets/resolve-three-BUKYgCMY.js","assets/dom-authoring-adapter-DBtypFqH.js","assets/react-world-authoring-adapter-CTCp7U6C.js","assets/board-guides-Cnfvv0uu.js","assets/relative-import-specifier-CPSPKQKY.js","assets/story-arg-descriptors-Ek86ExX7.js","assets/inspect-xUKvX80V.js","assets/inference-diagnostics-DE1P5w14.js","assets/writer-tw6EcuVO.js","assets/webgl-frame-capture-DdJkM2mi.js","assets/three.core-3arARmh6.js","assets/physics-registry-B2Jkp8e6.js","assets/system-adapters-rIC8FSGP.js","assets/ingest-boot-viewport-Dynh3g5V.js","assets/react-canvas-navigation-BWgmHmpc.js","assets/CanvasSceneViewport-CQfbmxpt.js","assets/RootSelectionOverlay-DRjJypx0.js","assets/eyedropper-session-bjPXnfeX.js","assets/layered-pick-ASc-_oGG.js","assets/root-stacking-BEd9ZvxC.js","assets/react-story-board-CGF1vFuk.js","assets/viewport-editor-controls-BYaAZ_Ku.js","assets/Toolbar-B9tUYMZc.js","assets/transform-mode-request-ROdyyd8M.js","assets/TransientHint-DXKNt-QA.js","assets/surface-state-C0NqVDj5.js","assets/registry-DPYQgPRv.js","assets/game-surface-defaults-D8S4cRxi.js","assets/three-state-_BZo8PPs.js","assets/editor-shell-store-B76wIXvV.js","assets/output-pass-HurwNl0G.js","assets/three.module-BLhyNg0e.js","assets/Pass-D1MRT672.js","assets/editor-layers-CYVQVJ5O.js","assets/entity-object-C6hm5vYx.js","assets/three-contract-Dkt6PmWY.js","assets/mount-dom-ingest-root-CUBVJcU_.js","assets/binding-resolver-4nTdtOpk.js","assets/native-debug-module-BUPFKtBc.js","assets/native-entry-surface-BE8LJNdu.js","assets/adapter-surface-Y37Nzcyw.js","assets/index-DzuOGwVB.js","assets/structural-signature-Dc7skRiy.js","assets/events-156d8d12.esm-DmeaOP4r.js","assets/realm-services-CbgTofeT.js","assets/three-ingest-runtime-BPTa3ryG.js","assets/EffectComposer-BEAt0PtQ.js","assets/CopyShader-BzTUYzf6.js","assets/ShaderPass-DTnDQXm0.js","assets/CSS3DRenderer-BsAqfavI.js","assets/relative-path-guard-GiM7Lsz8.js","assets/react-root-BHA-cdrW.js","assets/mount-three-ingest-root-BgBc58nU.js","assets/scene-framing-Dq-okRQ_.js","assets/mount-readiness-DyAd17pe.js","assets/loop-gate-report-N52EWFGD.js","assets/three-authoring-adapter-BDMrB8fC.js","assets/three-projection-core-BnoDtdZY.js","assets/three-CAVY58Dv.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/rapier-physics-adapter-CaZqWLu0.js","assets/r3f-physics-binding-BRcBDERW.js","assets/renderer-ownership-BovSEcLv.js","assets/scene-capture-CMwvLaW9.js","assets/ingest-siblings-BsIV1T53.js","assets/mounted-authoring-DQ0-LgR6.js","assets/crash-null-boundary-v3a0uEgw.js","assets/module-mode-CRBEidVP.js","assets/deferred-ingest-play-DsV_qXEP.js","assets/edit-mode-authoring-CIXoejcH.js"])))=>i.map(i=>d[i]);
2
- import{gV as C,aC as d,_ as s,I as k,gW as S,Z as u,gX as L,bY as c,c2 as g,J as T,bX as y,aG as m,gY as F,b$ as D,gA as O,c1 as V,gZ as j}from"./index-Cjv2Ynte.js";import{q as $,t as x,g as _,u as W,a as z,v as B,c as N,w as q,x as G,i as K,y as X}from"./active-ingest-CmyN258P.js";import{o as Y}from"./three-state-_BZo8PPs.js";let M=null;const Z=new Set;function H(){for(const t of Z)t()}function gt(t,n){M=n?{worldId:t,window:n}:null,H(),C()}function J(){const t=M;if(!t)return null;const n=t.window.isHidden(),o=t.window.isSuspended(),e=t.window.suspensionReason();return{worldId:t.worldId,budgetMs:t.window.budgetMs,elapsedVisibleMs:Math.round(t.window.elapsedVisibleMs()),hidden:n,suspended:o,suspensionReason:e,reason:e==="hidden"?"waiting for first visible frame — tab is hidden (a hidden tab cannot render, so the capture window is parked, not counting down; bring the tab to the foreground)":e==="unfocused"?"waiting for the browser to resume frame presentation — the editor window is unfocused (WebKit can suspend requestAnimationFrame in this state, so the capture window is parked; focus the editor window)":e==="page-suspended"?"waiting for the browser to restore the suspended editor page — the capture window is parked, not counting down":o?"waiting for the browser to resume frame presentation — the capture window is parked":"waiting for the game's first rendered frame"}}function R(){const t=z();if(!t)return null;const n=t.kind==="three"?t.session.mount:void 0,o=t.kind==="canvas"?t.session.loop?.():void 0,e=$(n?.realmLoopVerdict?.())??o?.loop??null,r=n?.realmLoopVerdict?.()?.reason??o?.reason??null;return{worldId:t.worldId,kind:t.kind,playing:W(),loop:e,loopReason:r,canStep:_()?.canStep??!1,coverage:x()}}const Q=()=>s(()=>import("./mount-canvas-ingest-root-BFKVZ_nn.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])),U=()=>s(()=>import("./mount-dom-ingest-root-CUBVJcU_.js"),__vite__mapDeps([66,1,2,3,4,5,6,7,8,9,10,11,12,67,68,69,28,19,70,71,72,40,39,73,61,74,27,75,76,77,78,62,79,80,81,18,17,15,31,32,33,34,35,36,37,38,43,56])),tt=()=>s(()=>import("./mount-three-ingest-root-BgBc58nU.js"),__vite__mapDeps([82,11,1,2,3,4,5,6,7,8,9,10,12,18,17,19,83,63,24,40,30,15,31,32,33,34,35,36,37,38,28,39,22,23,75,61,76,77,78,62,79,84,85,86,16,87,88,64,65,51,89,90,91,92,93,94,95,96,97,57,43,56,58,59,60]));function b(...t){return Q().then(n=>n.mountCanvasIngestRootFromManifest(...t))}function v(...t){return U().then(n=>n.mountDomIngestRootFromManifest(...t))}function A(...t){return tt().then(n=>n.mountThreeIngestRootFromManifest(...t))}Y(t=>{V()});j(()=>({ingest:R(),ingestCaptureWait:J()}));function l(t,n){u.error(`Ingest mount failed for "${n.worldId}" (${n.identity}): ${n.message}`,"ingest"),N(),B(),t.shell.setPlayState("stopped"),y(n),t.shell.notifyIngestEdit()}async function et(){try{return await k()}catch(t){return S(t)||u.error(`Ingest routing: this project's ${L} could not be read, so no root was mounted from it — ${c(t)}`,"ingest"),null}}function f(t){return T(t)}function p(t){const n=t.map(e=>`"${e.id}"`).join(", "),o=`a composite manifest declares exactly ONE ingest world in this slice — found ${t.length}: ${n}.`;u.error(`Manifest composite ingest route: ${o}`,"ingest");for(const e of t)y({worldId:e.id,kind:e.surface,identity:e.adapter.identity,message:o})}async function w(t,n,o,e,r){const{mountIngestSiblings:a}=await s(async()=>{const{mountIngestSiblings:E}=await import("./ingest-siblings-BsIV1T53.js");return{mountIngestSiblings:E}},__vite__mapDeps([98,1,2,3,4,5,6,7,8,9,10,99,64,23,24,65,20,21,16,17,22,15,25,26,27,28,100,74,75,61,40,76,77,78,62,79,81,31,32,33,34,35,36,37,38,41,42,86,87,63,88,51,89,90,91,92,93,94,95,101,11,12,67,68,69,19,70,71,72,39,73,80])),i=await a(t,n,o,e,r);return q(i),i}function I(t,n,o){if(o.length===0)return;const e=O();if(!e)return;const a=[...e instanceof m?e.childAdapters().map(i=>({worldId:i.worldId,kind:i.kind,adapter:i.adapter,role:i.role,zOrder:i.zOrder,...i.label!==void 0?{label:i.label}:{},...i.parentRootId!==void 0?{parentRootId:i.parentRootId}:{}})):[{worldId:n.id,kind:n.surface,adapter:e}],...o.map(i=>({worldId:i.worldId,kind:F(t,i.worldId)?.surface??"unknown",adapter:i.authoring}))];D(new m(a))}async function nt(t,n){if(!n)return!1;const o=f(n);if(o.length===0)return!1;if(o.length>1)return p(o),!0;const e=o[0];if(e.adapter.identity!=="ingest-three")return!1;const r=d();if(!r)return u.error("Manifest declares an ingest-three world but no project is open — cannot auto-ingest","ingest"),!0;try{await A(t,e,r.rootPath);const a=g();if(a){const i=await w(n,e.id,a,r.rootPath,t);I(n,e,i)}}catch(a){l(t,{worldId:e.id,kind:e.surface,identity:e.adapter.identity,message:c(a)})}return!0}async function ot(t,n){if(!n)return!1;const o=f(n);if(o.length===0)return!1;if(o.length>1)return p(o),!0;const e=o[0];if(e.adapter.identity!=="ingest-pixi")return!1;const r=d();if(!r)return u.error("Manifest declares an ingest-pixi world but no project is open — cannot auto-ingest","ingest"),!0;try{await b(t,e,r.rootPath);const a=g();if(a){const i=await w(n,e.id,a,r.rootPath,t);I(n,e,i)}}catch(a){l(t,{worldId:e.id,kind:e.surface,identity:e.adapter.identity,message:c(a)})}return!0}async function rt(t,n){if(!n)return!1;const o=f(n);if(o.length===0)return!1;if(o.length>1)return p(o),!0;const e=o[0];if(e.adapter.identity!=="ingest-react")return!1;const r=d();if(!r)return u.error("Manifest declares an ingest-react world but no project is open — cannot auto-ingest","ingest"),!0;try{await v(t,n,e,r.rootPath);const a=g();if(a){const i=await w(n,e.id,a,r.rootPath,t);I(n,e,i)}}catch(a){l(t,{worldId:e.id,kind:e.surface,identity:e.adapter.identity,message:c(a)})}return!0}function it(t){return at(t,()=>st(t))}const h=new WeakMap;function at(t,n){let o=h.get(t);o||(o=new Map,h.set(t,o));const e=d()?.rootPath??"",r=o.get(e);if(r)return r;const a=n();return o.set(e,a),a}async function P(t){const{tryManifestModuleRoute:n}=await s(async()=>{const{tryManifestModuleRoute:e}=await import("./module-mode-CRBEidVP.js");return{tryManifestModuleRoute:e}},__vite__mapDeps([101,1,2,3,4,5,6,7,8,9,10,11,12,67,68,69,28,19,70,71,72,40,39,73,61,74,27,75,76,77,78,62,79,80,81]));if(await n(t))return;const o=await et();await nt(t,o)||await ot(t,o)||await rt(t,o)}async function st(t){const{deferredIngestPlayActive:n,ingestMountIsDeferredToPlay:o}=await s(async()=>{const{deferredIngestPlayActive:e,ingestMountIsDeferredToPlay:r}=await import("./deferred-ingest-play-DsV_qXEP.js");return{deferredIngestPlayActive:e,ingestMountIsDeferredToPlay:r}},__vite__mapDeps([102,1,2,3,4,5,6,7,8,9,10,103,18,12,11,17,19]));if(await o()){if(n())return;const{landIngestBootInEdit:e}=await s(async()=>{const{landIngestBootInEdit:r}=await import("./ingest-boot-viewport-Dynh3g5V.js");return{landIngestBootInEdit:r}},__vite__mapDeps([43,1,2,3,4,5,6,7,8,9,10,18,12,11,17,19]));e();return}await P(t)}const lt=Object.freeze(Object.defineProperty({__proto__:null,activeIngestKind:G,autoLaunchIngest:it,getIngestPlayControl:_,ingestStatusFacet:R,isIngestActive:K,launchIngestRoutes:P,mountCanvasIngestRootFromManifest:b,mountDomIngestRootFromManifest:v,mountThreeIngestRootFromManifest:A,unmountThreeIngestRoot:X},Symbol.toStringTag,{value:"Module"}));export{it as a,lt as m,gt as s};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mount-canvas-ingest-root-JOkm2Ypj.js","assets/index-ClgrFOcX.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/capability-coverage-EnZ99FoT.js","assets/game-contract-seams-C22a4B79.js","assets/after-paint-CB4bz1-e.js","assets/babylon-authoring-adapter-C-EAsfMr.js","assets/json-history-resource-CDEoQe1R.js","assets/source-persistence-backend-Cwy93SmQ.js","assets/ingest-source-persistence-CVU1rTj0.js","assets/active-ingest-CJ2U5L1O.js","assets/contract-system-adapters-BDUpDoKd.js","assets/pixi-authoring-adapter-B1BBfTju.js","assets/index-CHOT9sYh.js","assets/component-instance-root-wO1p-rLr.js","assets/user-data-DL6HsBPf.js","assets/workspace-arrangement-86_8Kk5K.js","assets/pixi-transform-channels-P4rvmusc.js","assets/pixi-live-write-target-BcUhtqmJ.js","assets/canvas-entry-runtime-CLOuJcgT.js","assets/debug-registry-B2THKz1v.js","assets/canvas-preview-frames-CSCcu2sG.js","assets/resolve-three-TQ367RQD.js","assets/dom-authoring-adapter-DsUgOtQy.js","assets/react-world-authoring-adapter-Dq8NqvWu.js","assets/board-guides-CCiyx8cT.js","assets/relative-import-specifier-CA9mSNXO.js","assets/story-arg-descriptors-Ek86ExX7.js","assets/inspect-BunjdqX7.js","assets/inference-diagnostics-BmZ5ggEK.js","assets/writer-tw6EcuVO.js","assets/webgl-frame-capture-DdJkM2mi.js","assets/three.core-3arARmh6.js","assets/physics-registry-B2Jkp8e6.js","assets/system-adapters-rIC8FSGP.js","assets/ingest-boot-viewport-CipkFljr.js","assets/react-canvas-navigation-CxBm8iw8.js","assets/CanvasSceneViewport-ChG9oRS8.js","assets/RootSelectionOverlay-Dv_w1D9s.js","assets/eyedropper-session-bjPXnfeX.js","assets/layered-pick-guh6WlA7.js","assets/root-stacking-BEd9ZvxC.js","assets/react-story-board-CMvkLAkF.js","assets/viewport-editor-controls-BYaAZ_Ku.js","assets/Toolbar-yvFlRv8R.js","assets/transform-mode-request-BnV8FSnx.js","assets/TransientHint-Bslncm_l.js","assets/surface-state-b_H4iOCJ.js","assets/registry-D7lFIA8c.js","assets/game-surface-defaults-D8S4cRxi.js","assets/three-state-_ImCbP87.js","assets/editor-shell-store-aKHbAoCV.js","assets/output-pass-HurwNl0G.js","assets/three.module-BLhyNg0e.js","assets/Pass-D1MRT672.js","assets/editor-layers-DwaX5UFy.js","assets/entity-object-BLJ-I8XT.js","assets/three-contract-Dkt6PmWY.js","assets/mount-dom-ingest-root-CVXFnJZb.js","assets/binding-resolver-DoOAFM2m.js","assets/native-debug-module-iX2-V5kg.js","assets/native-entry-surface-BE8LJNdu.js","assets/adapter-surface-Y37Nzcyw.js","assets/index-DzuOGwVB.js","assets/structural-signature-Dc7skRiy.js","assets/events-156d8d12.esm-DmeaOP4r.js","assets/realm-services-CqjVBanw.js","assets/three-ingest-runtime-x9nLmUl-.js","assets/EffectComposer-BEAt0PtQ.js","assets/CopyShader-BzTUYzf6.js","assets/ShaderPass-DTnDQXm0.js","assets/CSS3DRenderer-BsAqfavI.js","assets/relative-path-guard-GiM7Lsz8.js","assets/react-root-BHA-cdrW.js","assets/mount-three-ingest-root-Dqd4XWP1.js","assets/scene-framing-B5JC4NeG.js","assets/mount-readiness-DyAd17pe.js","assets/loop-gate-report-N52EWFGD.js","assets/three-authoring-adapter-9LcUBPaU.js","assets/three-projection-core-IUovHgg_.js","assets/three-DWy0sZom.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/rapier-physics-adapter-CaZqWLu0.js","assets/r3f-physics-binding-DuG97FR9.js","assets/renderer-ownership-BovSEcLv.js","assets/scene-capture-KbdRgsD3.js","assets/ingest-siblings-CEwYp-xg.js","assets/mounted-authoring-B697dYuN.js","assets/crash-null-boundary-v3a0uEgw.js","assets/module-mode-D8en13PD.js","assets/deferred-ingest-play-To3ZratW.js","assets/edit-mode-authoring-BDgZD47j.js"])))=>i.map(i=>d[i]);
2
+ import{gV as C,aC as d,_ as s,I as k,gW as S,Z as u,gX as L,bY as c,c2 as g,J as T,bX as y,aG as m,gY as F,b$ as D,gA as O,c1 as V,gZ as j}from"./index-ClgrFOcX.js";import{q as $,t as x,g as _,u as W,a as z,v as B,c as N,w as q,x as G,i as K,y as X}from"./active-ingest-CJ2U5L1O.js";import{o as Y}from"./three-state-_ImCbP87.js";let M=null;const Z=new Set;function H(){for(const t of Z)t()}function gt(t,n){M=n?{worldId:t,window:n}:null,H(),C()}function J(){const t=M;if(!t)return null;const n=t.window.isHidden(),o=t.window.isSuspended(),e=t.window.suspensionReason();return{worldId:t.worldId,budgetMs:t.window.budgetMs,elapsedVisibleMs:Math.round(t.window.elapsedVisibleMs()),hidden:n,suspended:o,suspensionReason:e,reason:e==="hidden"?"waiting for first visible frame — tab is hidden (a hidden tab cannot render, so the capture window is parked, not counting down; bring the tab to the foreground)":e==="unfocused"?"waiting for the browser to resume frame presentation — the editor window is unfocused (WebKit can suspend requestAnimationFrame in this state, so the capture window is parked; focus the editor window)":e==="page-suspended"?"waiting for the browser to restore the suspended editor page — the capture window is parked, not counting down":o?"waiting for the browser to resume frame presentation — the capture window is parked":"waiting for the game's first rendered frame"}}function R(){const t=z();if(!t)return null;const n=t.kind==="three"?t.session.mount:void 0,o=t.kind==="canvas"?t.session.loop?.():void 0,e=$(n?.realmLoopVerdict?.())??o?.loop??null,r=n?.realmLoopVerdict?.()?.reason??o?.reason??null;return{worldId:t.worldId,kind:t.kind,playing:W(),loop:e,loopReason:r,canStep:_()?.canStep??!1,coverage:x()}}const Q=()=>s(()=>import("./mount-canvas-ingest-root-JOkm2Ypj.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])),U=()=>s(()=>import("./mount-dom-ingest-root-CVXFnJZb.js"),__vite__mapDeps([66,1,2,3,4,5,6,7,8,9,10,11,12,67,68,69,28,19,70,71,72,40,39,73,61,74,27,75,76,77,78,62,79,80,81,18,17,15,31,32,33,34,35,36,37,38,43,56])),tt=()=>s(()=>import("./mount-three-ingest-root-Dqd4XWP1.js"),__vite__mapDeps([82,11,1,2,3,4,5,6,7,8,9,10,12,18,17,19,83,63,24,40,30,15,31,32,33,34,35,36,37,38,28,39,22,23,75,61,76,77,78,62,79,84,85,86,16,87,88,64,65,51,89,90,91,92,93,94,95,96,97,57,43,56,58,59,60]));function b(...t){return Q().then(n=>n.mountCanvasIngestRootFromManifest(...t))}function v(...t){return U().then(n=>n.mountDomIngestRootFromManifest(...t))}function A(...t){return tt().then(n=>n.mountThreeIngestRootFromManifest(...t))}Y(t=>{V()});j(()=>({ingest:R(),ingestCaptureWait:J()}));function l(t,n){u.error(`Ingest mount failed for "${n.worldId}" (${n.identity}): ${n.message}`,"ingest"),N(),B(),t.shell.setPlayState("stopped"),y(n),t.shell.notifyIngestEdit()}async function et(){try{return await k()}catch(t){return S(t)||u.error(`Ingest routing: this project's ${L} could not be read, so no root was mounted from it — ${c(t)}`,"ingest"),null}}function f(t){return T(t)}function p(t){const n=t.map(e=>`"${e.id}"`).join(", "),o=`a composite manifest declares exactly ONE ingest world in this slice — found ${t.length}: ${n}.`;u.error(`Manifest composite ingest route: ${o}`,"ingest");for(const e of t)y({worldId:e.id,kind:e.surface,identity:e.adapter.identity,message:o})}async function w(t,n,o,e,r){const{mountIngestSiblings:a}=await s(async()=>{const{mountIngestSiblings:E}=await import("./ingest-siblings-CEwYp-xg.js");return{mountIngestSiblings:E}},__vite__mapDeps([98,1,2,3,4,5,6,7,8,9,10,99,64,23,24,65,20,21,16,17,22,15,25,26,27,28,100,74,75,61,40,76,77,78,62,79,81,31,32,33,34,35,36,37,38,41,42,86,87,63,88,51,89,90,91,92,93,94,95,101,11,12,67,68,69,19,70,71,72,39,73,80])),i=await a(t,n,o,e,r);return q(i),i}function I(t,n,o){if(o.length===0)return;const e=O();if(!e)return;const a=[...e instanceof m?e.childAdapters().map(i=>({worldId:i.worldId,kind:i.kind,adapter:i.adapter,role:i.role,zOrder:i.zOrder,...i.label!==void 0?{label:i.label}:{},...i.parentRootId!==void 0?{parentRootId:i.parentRootId}:{}})):[{worldId:n.id,kind:n.surface,adapter:e}],...o.map(i=>({worldId:i.worldId,kind:F(t,i.worldId)?.surface??"unknown",adapter:i.authoring}))];D(new m(a))}async function nt(t,n){if(!n)return!1;const o=f(n);if(o.length===0)return!1;if(o.length>1)return p(o),!0;const e=o[0];if(e.adapter.identity!=="ingest-three")return!1;const r=d();if(!r)return u.error("Manifest declares an ingest-three world but no project is open — cannot auto-ingest","ingest"),!0;try{await A(t,e,r.rootPath);const a=g();if(a){const i=await w(n,e.id,a,r.rootPath,t);I(n,e,i)}}catch(a){l(t,{worldId:e.id,kind:e.surface,identity:e.adapter.identity,message:c(a)})}return!0}async function ot(t,n){if(!n)return!1;const o=f(n);if(o.length===0)return!1;if(o.length>1)return p(o),!0;const e=o[0];if(e.adapter.identity!=="ingest-pixi")return!1;const r=d();if(!r)return u.error("Manifest declares an ingest-pixi world but no project is open — cannot auto-ingest","ingest"),!0;try{await b(t,e,r.rootPath);const a=g();if(a){const i=await w(n,e.id,a,r.rootPath,t);I(n,e,i)}}catch(a){l(t,{worldId:e.id,kind:e.surface,identity:e.adapter.identity,message:c(a)})}return!0}async function rt(t,n){if(!n)return!1;const o=f(n);if(o.length===0)return!1;if(o.length>1)return p(o),!0;const e=o[0];if(e.adapter.identity!=="ingest-react")return!1;const r=d();if(!r)return u.error("Manifest declares an ingest-react world but no project is open — cannot auto-ingest","ingest"),!0;try{await v(t,n,e,r.rootPath);const a=g();if(a){const i=await w(n,e.id,a,r.rootPath,t);I(n,e,i)}}catch(a){l(t,{worldId:e.id,kind:e.surface,identity:e.adapter.identity,message:c(a)})}return!0}function it(t){return at(t,()=>st(t))}const h=new WeakMap;function at(t,n){let o=h.get(t);o||(o=new Map,h.set(t,o));const e=d()?.rootPath??"",r=o.get(e);if(r)return r;const a=n();return o.set(e,a),a}async function P(t){const{tryManifestModuleRoute:n}=await s(async()=>{const{tryManifestModuleRoute:e}=await import("./module-mode-D8en13PD.js");return{tryManifestModuleRoute:e}},__vite__mapDeps([101,1,2,3,4,5,6,7,8,9,10,11,12,67,68,69,28,19,70,71,72,40,39,73,61,74,27,75,76,77,78,62,79,80,81]));if(await n(t))return;const o=await et();await nt(t,o)||await ot(t,o)||await rt(t,o)}async function st(t){const{deferredIngestPlayActive:n,ingestMountIsDeferredToPlay:o}=await s(async()=>{const{deferredIngestPlayActive:e,ingestMountIsDeferredToPlay:r}=await import("./deferred-ingest-play-To3ZratW.js");return{deferredIngestPlayActive:e,ingestMountIsDeferredToPlay:r}},__vite__mapDeps([102,1,2,3,4,5,6,7,8,9,10,103,18,12,11,17,19]));if(await o()){if(n())return;const{landIngestBootInEdit:e}=await s(async()=>{const{landIngestBootInEdit:r}=await import("./ingest-boot-viewport-CipkFljr.js");return{landIngestBootInEdit:r}},__vite__mapDeps([43,1,2,3,4,5,6,7,8,9,10,18,12,11,17,19]));e();return}await P(t)}const lt=Object.freeze(Object.defineProperty({__proto__:null,activeIngestKind:G,autoLaunchIngest:it,getIngestPlayControl:_,ingestStatusFacet:R,isIngestActive:K,launchIngestRoutes:P,mountCanvasIngestRootFromManifest:b,mountDomIngestRootFromManifest:v,mountThreeIngestRootFromManifest:A,unmountThreeIngestRoot:X},Symbol.toStringTag,{value:"Module"}));export{it as a,lt as m,gt as s};
@@ -1 +1 @@
1
- import{assertNever as u}from"./adapter-surface-Y37Nzcyw.js";import{ag as c,af as f}from"./index-Cjv2Ynte.js";import{c as l}from"./create-runtime-BKAyWS74.js";import{m as h}from"./debug-bridge-Cx3PFUcu.js";import{g}from"./debug-registry-CcTdmLf3.js";import{R as y}from"./seeded-random-BVi4_fs4.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"./binding-Bmxqznjk.js";import"./root-stacking-BEd9ZvxC.js";import"./assets-BcrMQHRv.js";import"./loader-BTUKnX5Q.js";import"./KTX2Loader-CaqVE6nY.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./setup-renderer-Cdx_0C3T.js";import"./index-DHhMOs_s.js";import"./defaults-DKiBJCPN.js";import"./render-settings-DeBS5HzD.js";import"./render-features-BYgh328X.js";import"./loop-gate-report-N52EWFGD.js";import"./system-slot-E2mEdiih.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./performance-profiler-CMbwGBuk.js";import"./game-network-Bof-cN2R.js";import"./index-OZVqp6xS.js";import"./index-Da9JhEvW.js";import"./native-debug-module-BUPFKtBc.js";import"./native-entry-surface-BE8LJNdu.js";import"./contract-system-adapters-D8SzcuZo.js";import"./game-contract-seams-CzlxJGC2.js";import"./game-audio-BeCyd0Ha.js";import"./rapier-physics-adapter-CaZqWLu0.js";import"./events-156d8d12.esm-DmeaOP4r.js";import"./index-DzuOGwVB.js";import"./live-project-verbs-D_8wWaCB.js";import"./capability-coverage-BMuTFU_9.js";import"./edit-mode-authoring-CIXoejcH.js";import"./json-history-resource-C1pGwXuI.js";import"./binding-resolver-4nTdtOpk.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./realm-services-CbgTofeT.js";import"./canvas-entry-runtime-CgJkCzp_.js";import"./three-ingest-runtime-BPTa3ryG.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-CmyN258P.js";import"./ingest-source-persistence-BNek6mSi.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-Co7zteuS.js";import"./mounted-authoring-DQ0-LgR6.js";import"./entity-object-C6hm5vYx.js";import"./user-data-DxeJHxTz.js";import"./workspace-arrangement-Bq8u7HUK.js";import"./three-contract-Dkt6PmWY.js";import"./three-CAVY58Dv.js";import"./editor-layers-CYVQVJ5O.js";import"./component-instance-root-Ctbx3vOO.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-authoring-adapter-BDMrB8fC.js";import"./source-persistence-backend-BMbXR_WB.js";import"./three-projection-core-BnoDtdZY.js";import"./body-marks-C1LxJtQb.js";import"./structural-ids-BOo2BRoY.js";import"./object3d-authoring-subject-XccsO0xG.js";import"./r3f-physics-binding-BRcBDERW.js";import"./deferred-ingest-play-DsV_qXEP.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-CTCp7U6C.js";import"./board-guides-Cnfvv0uu.js";import"./relative-import-specifier-CPSPKQKY.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-xUKvX80V.js";import"./inference-diagnostics-DE1P5w14.js";import"./writer-tw6EcuVO.js";import"./three-state-_BZo8PPs.js";import"./editor-shell-store-B76wIXvV.js";import"./output-pass-HurwNl0G.js";import"./viewport-door-CTspfOX-.js";import"./game-surface-defaults-D8S4cRxi.js";function R(e){if(e.determinism?.seededRandom!==!0)return;const t=e.url?v(e.url):void 0;return e.explicitSeed??t??e.determinism.defaultSeed}function v(e){const t=new URLSearchParams(e.search).get(y);if(t===null||t==="")return;const r=Number(t);return Number.isFinite(r)?r:void 0}function b(){return typeof window<"u"}function E(e){if(typeof e!="object"||e===null)return!1;if(Array.isArray(e.deferredConfigurationKinds))return!0;const t=e.roots;return!Array.isArray(t)||t.length===0?!1:t.every(r=>{if(typeof r!="object"||r===null)return!1;const i=r.adapter;if(typeof i!="object"||i===null)return!1;const o=i.type;return o==="builtin"||o==="module"||o==="ingest"})}function M(e){return E(e)?e:f(e,{configurationKinds:"defer"})}function $(e,t){if(t?.adapter)return t.adapter;throw e.adapter.type==="module"?new Error(`mountManifestRoots: world "${e.id}" (three) declares a { module } adapter ("${e.adapter.module}") — mountManifestRoots never imports an arbitrary module path itself (no \`/@fs/\`, no dev server). Import the module yourself and supply the constructed adapter via entries["${e.id}"] = { kind: 'three', adapter }.`):e.adapter.type==="ingest"?new Error(`mountManifestRoots: world "${e.id}" (three) declares an { ingest } adapter — captured ingest roots require the editor's dev-server-backed mount machinery (an EditorStore plus in-realm scene capture, see resolveIngestDescriptor + mountThreeIngestRootFromManifest) and are not supported by mountManifestRoots (no porting aids, no hosted ingest routes).`):e.entry!==void 0?new Error(`mountManifestRoots: world "${e.id}" (three) declares \`entry\` "${e.entry}" — supply entries["${e.id}"] = { kind: 'three', adapter } (for a default-exported world, the editor builds it from the entry module with \`resolveR3FEntryAdapterForEditor\`). Got ${t===void 0?"no entry at all":"an entry with no `adapter`"}.`):new Error(`mountManifestRoots: world "${e.id}" is default-three with no \`entry\` — this should have been rejected by manifest validation.`)}function w(e,t){if(t?.adapter)return t.adapter;throw new Error(`mountManifestRoots: world "${e.id}" (canvas) has no entries["${e.id}"] — a canvas world always needs a caller-supplied, already-constructed adapter (entries["${e.id}"] = { kind: 'canvas', adapter }, constructed from your own already-imported pixi module graph) — mountManifestRoots never value-imports pixi.js (mirrors create-runtime.ts's own pixi-free-core discipline).`)}function k(e,t){if(t?.adapter)return t.adapter;throw new Error(`mountManifestRoots: world "${e.id}" (react) has no entries["${e.id}"] — a react world always needs a caller-supplied, already-constructed \`RootAdapter<'dom'>\` (entries["${e.id}"] = { kind: 'dom', adapter }, mounting via your own already-imported react-dom \`createRoot\`) — mountManifestRoots never value-imports react/react-dom (mirrors create-runtime.ts's own react-free-core discipline).`)}function A(e,t){if(t!==void 0&&t.kind!==e.surface)throw new Error(`mountManifestRoots: entries["${e.id}"] declares kind "${t.kind}" but the manifest's root "${e.id}" uses surface "${e.surface}" — fix the entries key (or the manifest) so the two agree.`);const r={id:e.id,zOrder:e.zOrder,pausable:e.pausable,...t?.declaration===void 0?{}:{declaration:{root:e,...t.declaration}}};return e.surface==="three"?{...r,kind:"three",adapter:$(e,t)}:e.surface==="canvas"?{...r,kind:"canvas",adapter:w(e,t)}:e.surface==="dom"?{...r,kind:"dom",adapter:k(e,t)}:u(e.surface,"mountManifestRoots")}async function yt(e){const t=M(e.manifest),r=c(t);if(r.length===0)throw new Error("mountManifestRoots: manifest declares no roots — nothing to mount.");const i=e.entries??{},o=r.map(n=>A(n,i[n.id])),p=e.seedUrl??(b()?window.location:void 0),d=R({determinism:t.determinism,explicitSeed:e.seed,url:p}),a=await l({container:e.container,roots:o,width:e.width??t.resolution?.width,height:e.height??t.resolution?.height,headless:e.headless,...t.rendering===void 0?{}:{antialias:t.rendering.antialias},seed:d,playtest:e.playtest});t.determinism?.seededRandom;const s=g(a.game);if(s){t.configurations.some(m=>m.kind==="process")&&s.setRoomDeclared(!0);const n=h({registry:s,manifest:t,url:e.debugBridge?.url,window:e.debugBridge?.window});if(n){const m=a.stop;a.stop=()=>{n.uninstall(),m()}}}return a}export{yt as mountManifestRoots,R as resolveDeterminismSeed,M as resolveManifest};
1
+ import{assertNever as u}from"./adapter-surface-Y37Nzcyw.js";import{ag as c,af as f}from"./index-ClgrFOcX.js";import{c as l}from"./create-runtime-Bucz0XVU.js";import{m as h}from"./debug-bridge-EhDkhrLX.js";import{g}from"./debug-registry-B2THKz1v.js";import{R as y}from"./seeded-random-B6zqGkWP.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"./binding-Bmxqznjk.js";import"./root-stacking-BEd9ZvxC.js";import"./assets-BcrMQHRv.js";import"./loader-BTUKnX5Q.js";import"./KTX2Loader-CaqVE6nY.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./setup-renderer-efjIBSGF.js";import"./index-DHhMOs_s.js";import"./defaults-DKiBJCPN.js";import"./render-settings-CUbo4Sw5.js";import"./render-features-sSb1-c5x.js";import"./loop-gate-report-N52EWFGD.js";import"./system-slot-E2mEdiih.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./performance-profiler-CMbwGBuk.js";import"./game-network-Deo8lcPw.js";import"./index-OZVqp6xS.js";import"./index-Da9JhEvW.js";import"./native-debug-module-iX2-V5kg.js";import"./native-entry-surface-BE8LJNdu.js";import"./contract-system-adapters-BDUpDoKd.js";import"./game-contract-seams-C22a4B79.js";import"./game-audio-BeCyd0Ha.js";import"./rapier-physics-adapter-CaZqWLu0.js";import"./events-156d8d12.esm-DmeaOP4r.js";import"./index-DzuOGwVB.js";import"./live-project-verbs-Bqmxbr2o.js";import"./capability-coverage-EnZ99FoT.js";import"./edit-mode-authoring-BDgZD47j.js";import"./json-history-resource-CDEoQe1R.js";import"./binding-resolver-DoOAFM2m.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./realm-services-CqjVBanw.js";import"./canvas-entry-runtime-CLOuJcgT.js";import"./three-ingest-runtime-x9nLmUl-.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-CJ2U5L1O.js";import"./ingest-source-persistence-CVU1rTj0.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-CKqhX3mt.js";import"./mounted-authoring-B697dYuN.js";import"./entity-object-BLJ-I8XT.js";import"./user-data-DL6HsBPf.js";import"./workspace-arrangement-86_8Kk5K.js";import"./three-contract-Dkt6PmWY.js";import"./three-DWy0sZom.js";import"./editor-layers-DwaX5UFy.js";import"./component-instance-root-wO1p-rLr.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-authoring-adapter-9LcUBPaU.js";import"./source-persistence-backend-Cwy93SmQ.js";import"./three-projection-core-IUovHgg_.js";import"./body-marks-C1LxJtQb.js";import"./structural-ids-BOo2BRoY.js";import"./object3d-authoring-subject-XccsO0xG.js";import"./r3f-physics-binding-DuG97FR9.js";import"./deferred-ingest-play-To3ZratW.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-Dq8NqvWu.js";import"./board-guides-CCiyx8cT.js";import"./relative-import-specifier-CA9mSNXO.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-BunjdqX7.js";import"./inference-diagnostics-BmZ5ggEK.js";import"./writer-tw6EcuVO.js";import"./three-state-_ImCbP87.js";import"./editor-shell-store-aKHbAoCV.js";import"./output-pass-HurwNl0G.js";import"./viewport-door-BV_lf5uK.js";import"./game-surface-defaults-D8S4cRxi.js";function R(e){if(e.determinism?.seededRandom!==!0)return;const t=e.url?v(e.url):void 0;return e.explicitSeed??t??e.determinism.defaultSeed}function v(e){const t=new URLSearchParams(e.search).get(y);if(t===null||t==="")return;const r=Number(t);return Number.isFinite(r)?r:void 0}function b(){return typeof window<"u"}function E(e){if(typeof e!="object"||e===null)return!1;if(Array.isArray(e.deferredConfigurationKinds))return!0;const t=e.roots;return!Array.isArray(t)||t.length===0?!1:t.every(r=>{if(typeof r!="object"||r===null)return!1;const i=r.adapter;if(typeof i!="object"||i===null)return!1;const o=i.type;return o==="builtin"||o==="module"||o==="ingest"})}function M(e){return E(e)?e:f(e,{configurationKinds:"defer"})}function $(e,t){if(t?.adapter)return t.adapter;throw e.adapter.type==="module"?new Error(`mountManifestRoots: world "${e.id}" (three) declares a { module } adapter ("${e.adapter.module}") — mountManifestRoots never imports an arbitrary module path itself (no \`/@fs/\`, no dev server). Import the module yourself and supply the constructed adapter via entries["${e.id}"] = { kind: 'three', adapter }.`):e.adapter.type==="ingest"?new Error(`mountManifestRoots: world "${e.id}" (three) declares an { ingest } adapter — captured ingest roots require the editor's dev-server-backed mount machinery (an EditorStore plus in-realm scene capture, see resolveIngestDescriptor + mountThreeIngestRootFromManifest) and are not supported by mountManifestRoots (no porting aids, no hosted ingest routes).`):e.entry!==void 0?new Error(`mountManifestRoots: world "${e.id}" (three) declares \`entry\` "${e.entry}" — supply entries["${e.id}"] = { kind: 'three', adapter } (for a default-exported world, the editor builds it from the entry module with \`resolveR3FEntryAdapterForEditor\`). Got ${t===void 0?"no entry at all":"an entry with no `adapter`"}.`):new Error(`mountManifestRoots: world "${e.id}" is default-three with no \`entry\` — this should have been rejected by manifest validation.`)}function w(e,t){if(t?.adapter)return t.adapter;throw new Error(`mountManifestRoots: world "${e.id}" (canvas) has no entries["${e.id}"] — a canvas world always needs a caller-supplied, already-constructed adapter (entries["${e.id}"] = { kind: 'canvas', adapter }, constructed from your own already-imported pixi module graph) — mountManifestRoots never value-imports pixi.js (mirrors create-runtime.ts's own pixi-free-core discipline).`)}function k(e,t){if(t?.adapter)return t.adapter;throw new Error(`mountManifestRoots: world "${e.id}" (react) has no entries["${e.id}"] — a react world always needs a caller-supplied, already-constructed \`RootAdapter<'dom'>\` (entries["${e.id}"] = { kind: 'dom', adapter }, mounting via your own already-imported react-dom \`createRoot\`) — mountManifestRoots never value-imports react/react-dom (mirrors create-runtime.ts's own react-free-core discipline).`)}function A(e,t){if(t!==void 0&&t.kind!==e.surface)throw new Error(`mountManifestRoots: entries["${e.id}"] declares kind "${t.kind}" but the manifest's root "${e.id}" uses surface "${e.surface}" — fix the entries key (or the manifest) so the two agree.`);const r={id:e.id,zOrder:e.zOrder,pausable:e.pausable,...t?.declaration===void 0?{}:{declaration:{root:e,...t.declaration}}};return e.surface==="three"?{...r,kind:"three",adapter:$(e,t)}:e.surface==="canvas"?{...r,kind:"canvas",adapter:w(e,t)}:e.surface==="dom"?{...r,kind:"dom",adapter:k(e,t)}:u(e.surface,"mountManifestRoots")}async function yt(e){const t=M(e.manifest),r=c(t);if(r.length===0)throw new Error("mountManifestRoots: manifest declares no roots — nothing to mount.");const i=e.entries??{},o=r.map(n=>A(n,i[n.id])),p=e.seedUrl??(b()?window.location:void 0),d=R({determinism:t.determinism,explicitSeed:e.seed,url:p}),a=await l({container:e.container,roots:o,width:e.width??t.resolution?.width,height:e.height??t.resolution?.height,headless:e.headless,...t.rendering===void 0?{}:{antialias:t.rendering.antialias},seed:d,playtest:e.playtest});t.determinism?.seededRandom;const s=g(a.game);if(s){t.configurations.some(m=>m.kind==="process")&&s.setRoomDeclared(!0);const n=h({registry:s,manifest:t,url:e.debugBridge?.url,window:e.debugBridge?.window});if(n){const m=a.stop;a.stop=()=>{n.uninstall(),m()}}}return a}export{yt as mountManifestRoots,R as resolveDeterminismSeed,M as resolveManifest};