@volter/game-editor 0.5.74 → 0.5.76

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 (293) 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 +2125 -2125
  5. package/dist/assets/{AssetBudgetPanel-CsScls8k.js → AssetBudgetPanel-BjFkm62b.js} +3 -3
  6. package/dist/assets/{AudioViewer-C0KaLINZ.js → AudioViewer-Biiq4G_i.js} +1 -1
  7. package/dist/assets/{CanvasBoardDocument-BH0U2FK3.js → CanvasBoardDocument-8cse1rhp.js} +1 -1
  8. package/dist/assets/{CanvasSceneViewport-VALiHtss.js → CanvasSceneViewport-Dq6iUvIm.js} +1 -1
  9. package/dist/assets/{ColorInput-BSiPDtkN.js → ColorInput-Bp3RDfPM.js} +1 -1
  10. package/dist/assets/{EntityModelDocument-DBZeMkXS.js → EntityModelDocument-dwAxknxP.js} +1 -1
  11. package/dist/assets/{EnvironmentAssetDocument-D3gH_Q1o.js → EnvironmentAssetDocument-C0m_nD7y.js} +1 -1
  12. package/dist/assets/{GameplaySessionTimeline-BZENnCEM.js → GameplaySessionTimeline-i55Cf0Er.js} +1 -1
  13. package/dist/assets/{ImageViewer-Z077ZBuk.js → ImageViewer-D-hxhDh9.js} +1 -1
  14. package/dist/assets/InspectorObjectPreview-D7sPBP8Z.js +1 -0
  15. package/dist/assets/{JsonAssetDocument-DjtYdDni.js → JsonAssetDocument-Dp1d3BJo.js} +1 -1
  16. package/dist/assets/{LiveModuleDocument-BQmh8NEJ.js → LiveModuleDocument-BeXLUEGs.js} +1 -1
  17. package/dist/assets/{LutAssetDocument-B3e7mHdw.js → LutAssetDocument-PyDKly_a.js} +1 -1
  18. package/dist/assets/{ModelAssetDocument-BVIUx7AO.js → ModelAssetDocument-DnuWFSZG.js} +1 -1
  19. package/dist/assets/{NonThreeAuthoringBootstrap-DAjTxCUk.js → NonThreeAuthoringBootstrap-BNKBCS1x.js} +1 -1
  20. package/dist/assets/{Object3DDocumentToolbar-CMFUQpit.js → Object3DDocumentToolbar-nKqgkz_2.js} +1 -1
  21. package/dist/assets/Object3DDocumentViewport-CkpRseZm.js +2 -0
  22. package/dist/assets/{Object3DPreview-BeQ3dNgr.js → Object3DPreview-CJ3chhw7.js} +1 -1
  23. package/dist/assets/{OnlineAssetDetail-DouLFaxd.js → OnlineAssetDetail-BHQPuBUu.js} +1 -1
  24. package/dist/assets/{PlayBar-DlSAPez7.js → PlayBar-B5de5J5O.js} +1 -1
  25. package/dist/assets/{QuarksAssetDocument-Ci_5RdOh.js → QuarksAssetDocument-BF4Hv9rw.js} +1 -1
  26. package/dist/assets/{ReactCanvasControls-pLDTjk7f.js → ReactCanvasControls-RN0LHjKr.js} +1 -1
  27. package/dist/assets/{RootSelectionOverlay-C2jDNhWx.js → RootSelectionOverlay-C5bcCIxc.js} +1 -1
  28. package/dist/assets/{ShaderAssetDocument-D6DXBZAt.js → ShaderAssetDocument-CcKYQmv3.js} +1 -1
  29. package/dist/assets/{ShadowEditor-BUdib-46.js → ShadowEditor-Ce6Kl6kF.js} +1 -1
  30. package/dist/assets/{SourceAssetViewer-FrL5IQpU.js → SourceAssetViewer-Bs8cdFyl.js} +1 -1
  31. package/dist/assets/{StageHost-DiXV3rVP.js → StageHost-CV5bxQKM.js} +2 -2
  32. package/dist/assets/{StoryPreviewMount-uYhyt63h.js → StoryPreviewMount-DDa8sXQF.js} +1 -1
  33. package/dist/assets/{ThreeBoardDocument-BvnPu_Kt.js → ThreeBoardDocument-t_tDS-j-.js} +2 -2
  34. package/dist/assets/{ThreeIsolationSceneContent-C53huaHh.js → ThreeIsolationSceneContent-BVDqkEYw.js} +1 -1
  35. package/dist/assets/{ToolObject3DPreview-wGS0d8hq.js → ToolObject3DPreview-BssDJtC2.js} +1 -1
  36. package/dist/assets/{Toolbar-wCXICaZA.js → Toolbar-D9hmQICZ.js} +1 -1
  37. package/dist/assets/{TransientHint-BRrfIPg5.js → TransientHint-DQ2Gxaf4.js} +1 -1
  38. package/dist/assets/{VideoViewer-CtoaUhoP.js → VideoViewer-DrfwGQxe.js} +1 -1
  39. package/dist/assets/{ViewportShadingMenu-DPFcOOlk.js → ViewportShadingMenu-C4OjRF1K.js} +1 -1
  40. package/dist/assets/{active-ingest-DCi6B_Mk.js → active-ingest-mDJkad7M.js} +2 -2
  41. package/dist/assets/{animation-clock-DnR5BQwQ.js → animation-clock-DwsrmSMb.js} +1 -1
  42. package/dist/assets/{animation-mixers.service-Bjfda5Bu.js → animation-mixers.service-D21IugKS.js} +1 -1
  43. package/dist/assets/{animation-timeline.utility-9mLK9gMs.js → animation-timeline.utility-gdrRRmQH.js} +1 -1
  44. package/dist/assets/{asset-budget-asset.menu-cZSz-LwL.js → asset-budget-asset.menu-DIkyrxiU.js} +1 -1
  45. package/dist/assets/{asset-budget.action-CGVMjOi0.js → asset-budget.action-B6VSstet.js} +1 -1
  46. package/dist/assets/{asset-budget.document-D9L-2haO.js → asset-budget.document-DK6jg3Xw.js} +1 -1
  47. package/dist/assets/{asset-budget.menu-CUpLs9iu.js → asset-budget.menu-W4DmiUOF.js} +1 -1
  48. package/dist/assets/{asset-editor-persistence-BVmO7_Y0.js → asset-editor-persistence-0u6_ZcxG.js} +1 -1
  49. package/dist/assets/{asset-loaders-PVkGGJJI.js → asset-loaders-BV19C60O.js} +1 -1
  50. package/dist/assets/{asset-preview-D9R6R903.js → asset-preview-C0yI3iVN.js} +1 -1
  51. package/dist/assets/{audio-unlock.service-D-GbYty7.js → audio-unlock.service-D5vphmzG.js} +1 -1
  52. package/dist/assets/{audio.utility-E-qzBR6D.js → audio.utility-xFa5jESm.js} +1 -1
  53. package/dist/assets/autoplay.service-7kddHqyX.js +1 -0
  54. package/dist/assets/{babylon-authoring-adapter-C3VOiksD.js → babylon-authoring-adapter-BR-XIVWA.js} +1 -1
  55. package/dist/assets/{binding-resolver-CqJs8FS9.js → binding-resolver-DYyowJkn.js} +2 -2
  56. package/dist/assets/{blender-node-editor.document-CPNUVCnn.js → blender-node-editor.document-CHrcqrAP.js} +1 -1
  57. package/dist/assets/{blender-properties-tab-CiHoYK6t.js → blender-properties-tab-HcIWs40_.js} +1 -1
  58. package/dist/assets/{blender-runtime-host-CoT0G0_R.js → blender-runtime-host-D-b3myuC.js} +1 -1
  59. package/dist/assets/{blender-runtime-skin-CGNNV3xn.js → blender-runtime-skin-3ceIx59C.js} +1 -1
  60. package/dist/assets/{blender-runtime.document-CJEk-94B.js → blender-runtime.document-hEe-HzEh.js} +1 -1
  61. package/dist/assets/{blender-timeline.document-DP_MuhM4.js → blender-timeline.document-BYW3OSne.js} +1 -1
  62. package/dist/assets/{blender-uv-editor.document-Cggq1dTC.js → blender-uv-editor.document-BoY-LnsG.js} +1 -1
  63. package/dist/assets/{blender-version.status-C_G5uv7j.js → blender-version.status-mhySAeON.js} +1 -1
  64. package/dist/assets/{blender.command-CzTbMFTm.js → blender.command-F4H2z-9A.js} +1 -1
  65. package/dist/assets/{board-guides-CFM0Dzzw.js → board-guides-DbRT0CEe.js} +1 -1
  66. package/dist/assets/{bridge.command-DWZKDU4z.js → bridge.command-DN82OxFy.js} +3 -3
  67. package/dist/assets/{browserAll-Bt1yuPoY.js → browserAll-Cqos0jz8.js} +1 -1
  68. package/dist/assets/{build-player.document-CSLA4B-I.js → build-player.document-Dw0pIiG7.js} +1 -1
  69. package/dist/assets/{build-profiles.document-vZR8N8Zc.js → build-profiles.document-BCHdqkro.js} +1 -1
  70. package/dist/assets/{build-progress.status-mGqJ9OWi.js → build-progress.status-C2MxELWF.js} +1 -1
  71. package/dist/assets/{build-session-BEJL-4uT.js → build-session-Dz6L1yYX.js} +1 -1
  72. package/dist/assets/{build.action-Co8P_po0.js → build.action-BeAwlnc4.js} +1 -1
  73. package/dist/assets/{build.command-Cqtmjck3.js → build.command-Ber5hdxC.js} +1 -1
  74. package/dist/assets/{build.header-PNcqwkk1.js → build.header-Db3MkFbi.js} +1 -1
  75. package/dist/assets/{build.menu-BNxEplbC.js → build.menu-gmrap1c5.js} +1 -1
  76. package/dist/assets/{build.service-CkuUEkU3.js → build.service-yMR_xJue.js} +1 -1
  77. package/dist/assets/{camera-KZ9xGSi8.js → camera-D8mpcjZ8.js} +1 -1
  78. package/dist/assets/{camera-runtime.inspector-_IdxJC2q.js → camera-runtime.inspector-9VUNHoi7.js} +1 -1
  79. package/dist/assets/{canvas-design-mount-BQJAuFty.js → canvas-design-mount-D87Wp0ZF.js} +3 -3
  80. package/dist/assets/{canvas-entry-runtime-C4V45HMi.js → canvas-entry-runtime-CagodwVN.js} +2 -2
  81. package/dist/assets/{canvas-preview-frames-BwQjAyYt.js → canvas-preview-frames-BcRr18uI.js} +1 -1
  82. package/dist/assets/{canvas-story-capture.service-Dj4pAbC9.js → canvas-story-capture.service-1_rOvKS7.js} +2 -2
  83. package/dist/assets/{capability-coverage-4xMPa566.js → capability-coverage-DgC2RhRJ.js} +1 -1
  84. package/dist/assets/{collaboration-presence-CiEcKLpo.js → collaboration-presence-DBHNcl_z.js} +1 -1
  85. package/dist/assets/{collider-DVAc7Hmk.js → collider-DZiCBf-9.js} +1 -1
  86. package/dist/assets/{component-board.service-CJDzogke.js → component-board.service-Bgh7n9K7.js} +2 -2
  87. package/dist/assets/{component-board.service-DK6MwEZa.js → component-board.service-BhoXZiYw.js} +2 -2
  88. package/dist/assets/{component-board.service-DLoxCk73.js → component-board.service-DjeaGp6q.js} +2 -2
  89. package/dist/assets/{component-contracts.service-BOe_0crY.js → component-contracts.service-gR_E-0BI.js} +1 -1
  90. package/dist/assets/{component-instance-root-CgmR0Q36.js → component-instance-root-UahhIVd1.js} +1 -1
  91. package/dist/assets/{component-verbs.command-BOAaWue3.js → component-verbs.command-DKhuFU9T.js} +1 -1
  92. package/dist/assets/{component-verbs.service-DAwiNhNc.js → component-verbs.service-dX5b-jB0.js} +1 -1
  93. package/dist/assets/{config-B64a1eb5.js → config-BJ-W1piM.js} +2 -2
  94. package/dist/assets/{configurations-BQSxxjbY.js → configurations-vOazo-km.js} +1 -1
  95. package/dist/assets/{connection.status-C4CA3tnt.js → connection.status-OSyv5xrS.js} +1 -1
  96. package/dist/assets/{constraints.inspector-CWxVm4K9.js → constraints.inspector-BFv1pf4i.js} +1 -1
  97. package/dist/assets/{content-bounds-DUlT_Bs_.js → content-bounds-CMk1llDT.js} +1 -1
  98. package/dist/assets/{contract-system-adapters-CEuzOynM.js → contract-system-adapters-DQkiwEeo.js} +1 -1
  99. package/dist/assets/{coverage.service-HqZrm5L7.js → coverage.service-BlQSjwvW.js} +1 -1
  100. package/dist/assets/{create-runtime-Cr_aiT6l.js → create-runtime-DginHEVG.js} +1 -1
  101. package/dist/assets/{curve-KeLD-yBc.js → curve-BRqZ3pkT.js} +1 -1
  102. package/dist/assets/{data-asset-CACLoAiF.js → data-asset-BHl-WMH5.js} +1 -1
  103. package/dist/assets/{data-ref-DHnlpkfW.js → data-ref-Deg6U-uB.js} +1 -1
  104. package/dist/assets/{debug-bridge-DAVwvCKX.js → debug-bridge-B-RNnYQh.js} +1 -1
  105. package/dist/assets/{debug-registry-B6pk-yrQ.js → debug-registry-Bt57rVDa.js} +1 -1
  106. package/dist/assets/{deferred-ingest-play-GNKwMor5.js → deferred-ingest-play-BTXd4idB.js} +2 -2
  107. package/dist/assets/{design-time-canvas-mount-BDyTbqGy.js → design-time-canvas-mount-B8zgbaxT.js} +2 -2
  108. package/dist/assets/{design-time-layers-DWdxyEke.js → design-time-layers-CS6QlGFz.js} +1 -1
  109. package/dist/assets/{design-time-mount.service-DH5WMBig.js → design-time-mount.service-BQnYPfl5.js} +2 -2
  110. package/dist/assets/{design-time-mount.service-CwYVzkTW.js → design-time-mount.service-atwTQBje.js} +2 -2
  111. package/dist/assets/{design-time-react-mount-D_Njd_-Z.js → design-time-react-mount-Cx9MByrM.js} +1 -1
  112. package/dist/assets/{document-preview-three-l_JD_wOQ.js → document-preview-three-C7iFOvGJ.js} +1 -1
  113. package/dist/assets/{dom-authoring-adapter-NjpTX82H.js → dom-authoring-adapter-Bd-tH6WO.js} +1 -1
  114. package/dist/assets/{draco3d-uD30kmRz.js → draco3d-DOXqkx8U.js} +1 -1
  115. package/dist/assets/{edit-mode-audio.service-Bc1dJyur.js → edit-mode-audio.service-Cbzqj9Jy.js} +1 -1
  116. package/dist/assets/{edit-mode-authoring-D4gF7ToY.js → edit-mode-authoring-DgXUzfvm.js} +1 -1
  117. package/dist/assets/{edit-mode-networking.service-CSJCwcxW.js → edit-mode-networking.service-BSPRDhil.js} +1 -1
  118. package/dist/assets/{editor-api-oWEXcLGi.js → editor-api-CqotsaJD.js} +1 -1
  119. package/dist/assets/{editor-layers-BGId-Uru.js → editor-layers-hAcvLPMn.js} +1 -1
  120. package/dist/assets/{editor-shell-store-DhM6KcjO.js → editor-shell-store-DkNOWUFp.js} +1 -1
  121. package/dist/assets/{entity-object-B77fPnTJ.js → entity-object-DR7d2cxz.js} +1 -1
  122. package/dist/assets/{extend-12Z0hbsT.js → extend-D86gXz81.js} +1 -1
  123. package/dist/assets/{fork-menu-BKv-e4vf.js → fork-menu-C3I645ug.js} +1 -1
  124. package/dist/assets/{frame-debugger-store-QZzA9Bp6.js → frame-debugger-store-VMdNVIQ5.js} +1 -1
  125. package/dist/assets/{game-contract-seams-Bk8NMwX4.js → game-contract-seams-DiQ1tlKC.js} +1 -1
  126. package/dist/assets/{game-css-scope-transform-Qi5A4od1.js → game-css-scope-transform-CG13_2aB.js} +1 -1
  127. package/dist/assets/{game-document.service-DwyngEP1.js → game-document.service-BRVDb71D.js} +1 -1
  128. package/dist/assets/{game-eval.command-D3GcSNpZ.js → game-eval.command-C2MbVIbA.js} +1 -1
  129. package/dist/assets/{game-module-access-DcIMKmZ-.js → game-module-access-DtJAG_Jd.js} +1 -1
  130. package/dist/assets/{game-network-BRvp9Eya.js → game-network-BkkoOr_U.js} +3 -3
  131. package/dist/assets/{gameplay-export-DjEgXlLD.js → gameplay-export-B1J_8CZs.js} +1 -1
  132. package/dist/assets/{gameplay-replay-DIU5Uql2.js → gameplay-replay-C7eBHV93.js} +1 -1
  133. package/dist/assets/{gameplay.command-Ckhbu_et.js → gameplay.command-tD6AQg5i.js} +1 -1
  134. package/dist/assets/{generation-jobs-BDAepEao.js → generation-jobs-Cuwdi3KY.js} +1 -1
  135. package/dist/assets/{generation.service-BZIxaVg0.js → generation.service-MiJpkT-M.js} +1 -1
  136. package/dist/assets/{generations-fYwLNwQr.js → generations-BO6t7knA.js} +1 -1
  137. package/dist/assets/{generations.status-DpWkrjr7.js → generations.status-Bz5FxF5L.js} +1 -1
  138. package/dist/assets/{hierarchy-marks-BCrDKK5y.js → hierarchy-marks--TolmVW5.js} +1 -1
  139. package/dist/assets/{hosted-asset-materialization-D_yDzOYA.js → hosted-asset-materialization-BlIle4kF.js} +1 -1
  140. package/dist/assets/{index-B0ciEDFT.js → index-B778_TTn.js} +2 -2
  141. package/dist/assets/{index-D7q9yQaD.js → index-BFKwWsNe.js} +1 -1
  142. package/dist/assets/{index-CaD5TSVW.js → index-BjdG8RNO.js} +1 -1
  143. package/dist/assets/{index-GlGBb8bs.js → index-C1ihMnWo.js} +1 -1
  144. package/dist/assets/{index-TYz8swQz.js → index-CQ6JiiuQ.js} +1 -1
  145. package/dist/assets/{index-Bwl4ql-8.js → index-CRHTCgov.js} +1 -1
  146. package/dist/assets/{index-Bn8WGRJh.js → index-CWR8N1pt.js} +7 -7
  147. package/dist/assets/{index-CLC0lyS8.js → index-vCEuerlf.js} +1 -1
  148. package/dist/assets/{index-DjHJiUGa.js → index-wmo5yZwB.js} +1 -1
  149. package/dist/assets/{inference-diagnostics-BPtSODNJ.js → inference-diagnostics-GP--Nnde.js} +1 -1
  150. package/dist/assets/{ingest-boot-viewport-CYTzGsEC.js → ingest-boot-viewport-DaCKZ5dN.js} +1 -1
  151. package/dist/assets/{ingest-siblings-0jNvfYjJ.js → ingest-siblings-ZeIgNmQW.js} +1 -1
  152. package/dist/assets/{ingest-source-persistence-C-gTDfvH.js → ingest-source-persistence-DOhZMV-e.js} +1 -1
  153. package/dist/assets/{ingest.service-PL_jFRLE.js → ingest.service-DsHy_aP9.js} +1 -1
  154. package/dist/assets/{inspect-C1HaQduW.js → inspect-DYloFXZZ.js} +1 -1
  155. package/dist/assets/instances.command-NnpPzefK.js +1 -0
  156. package/dist/assets/{json-history-resource-DiN_PLbn.js → json-history-resource-DwQA9nJ3.js} +1 -1
  157. package/dist/assets/{layered-pick-Bkf0E_UR.js → layered-pick-Dntz2X63.js} +1 -1
  158. package/dist/assets/{light-nmEsK8JV.js → light-B6jvsaum.js} +1 -1
  159. package/dist/assets/{live-project-verbs-H6S9jMp9.js → live-project-verbs-CS-RzAOM.js} +1 -1
  160. package/dist/assets/{machine.document-DbzwF7ct.js → machine.document-Cd2TMllI.js} +1 -1
  161. package/dist/assets/{machines.finder-CLK23edR.js → machines.finder-CpruCp4e.js} +1 -1
  162. package/dist/assets/{material-BX0tqR9K.js → material-CgxQuNN9.js} +1 -1
  163. package/dist/assets/{material-factory-KdJxeWsR.js → material-factory-M3dPwynz.js} +1 -1
  164. package/dist/assets/{mesh-Dtrk7lEY.js → mesh-CWr_mbES.js} +1 -1
  165. package/dist/assets/{model-asset-sections.service-B6kG8uli.js → model-asset-sections.service-Ca9mHoId.js} +1 -1
  166. package/dist/assets/{model-inspection-Cus72-UK.js → model-inspection-tw_q6BVp.js} +1 -1
  167. package/dist/assets/{model-thumbnail-Dm3TXja5.js → model-thumbnail-iK5a9are.js} +1 -1
  168. package/dist/assets/{models.finder-BoFyTirM.js → models.finder-mQOSiUkv.js} +1 -1
  169. package/dist/assets/{module-mode-Dm9xepU7.js → module-mode-Dn2A9vZ8.js} +2 -2
  170. package/dist/assets/{mount-canvas-ingest-root-Erg3xO7k.js → mount-canvas-ingest-root-Bz8WtGxO.js} +2 -2
  171. package/dist/assets/{mount-dom-ingest-root-CBfy8dZF.js → mount-dom-ingest-root-BxHQUCK7.js} +2 -2
  172. package/dist/assets/{mount-ingest-root-COum-c-U.js → mount-ingest-root-B5RoLjsS.js} +2 -2
  173. package/dist/assets/{mount-manifest-DvUJ-fD8.js → mount-manifest-Br9sXxSh.js} +1 -1
  174. package/dist/assets/{mount-three-ingest-root-C1auHtuC.js → mount-three-ingest-root-BlesdWgf.js} +1 -1
  175. package/dist/assets/{mounted-authoring-Cjmi_MYm.js → mounted-authoring-DxwkC5eG.js} +1 -1
  176. package/dist/assets/{mounted-story-viewport-source-pTjqNWJx.js → mounted-story-viewport-source-DWO5iGCA.js} +1 -1
  177. package/dist/assets/{native-debug-module-C_1Fna30.js → native-debug-module-BzGNl0wd.js} +1 -1
  178. package/dist/assets/{navigation-Um6Fjogv.js → navigation-CVaWWV0F.js} +1 -1
  179. package/dist/assets/{navmesh.menu-Bx1y_DLx.js → navmesh.menu-BI3X9HFW.js} +1 -1
  180. package/dist/assets/{navmesh.service-B1EYycZ8.js → navmesh.service-BLjwRhos.js} +1 -1
  181. package/dist/assets/network-observer.service-b0aoJomO.js +1 -0
  182. package/dist/assets/{network.utility-DHcZnsaE.js → network.utility-CwTm122D.js} +1 -1
  183. package/dist/assets/{object3d-document-session-registry-DsJV3XhY.js → object3d-document-session-registry-B8HFpoFw.js} +2 -2
  184. package/dist/assets/{oid-transform-DEzhk73d.js → oid-transform-CdVaNpRJ.js} +1 -1
  185. package/dist/assets/{particles-BnGOaZUs.js → particles-DuhhAOtp.js} +1 -1
  186. package/dist/assets/{pixi-authoring-adapter-qsxp_Kpv.js → pixi-authoring-adapter-CV6L9eNi.js} +1 -1
  187. package/dist/assets/{pixi-live-write-target-Br2X6vrk.js → pixi-live-write-target-C4I8dXDl.js} +1 -1
  188. package/dist/assets/{play.command-Cak08ygG.js → play.command-ClzQRct1.js} +2 -2
  189. package/dist/assets/{presentation-Dr2MWsec.js → presentation-DlVtoHMl.js} +1 -1
  190. package/dist/assets/{product-DunxREWh.js → product-CraiIl1J.js} +1 -1
  191. package/dist/assets/{profiler.action-BIaSMoN-.js → profiler.action-CwP9qESg.js} +1 -1
  192. package/dist/assets/{profiler.menu-CHe06CnG.js → profiler.menu-CQlk1lY6.js} +1 -1
  193. package/dist/assets/{profiler.utility-CSNVq8T0.js → profiler.utility-JyGxwO9P.js} +1 -1
  194. package/dist/assets/{project-authoring-session-Ck0Fj3Y4.js → project-authoring-session-dtUdDaEF.js} +2 -2
  195. package/dist/assets/{properties-bone-constraints.inspector-kiKXCgM2.js → properties-bone-constraints.inspector-BQTx6zCz.js} +1 -1
  196. package/dist/assets/{properties-bone.inspector-DRJ4OpS_.js → properties-bone.inspector-OHB1Ftql.js} +1 -1
  197. package/dist/assets/{properties-collection.inspector-quSRs0rk.js → properties-collection.inspector-Cxa7JWnP.js} +1 -1
  198. package/dist/assets/{properties-constraints.inspector-Cv0-5ePa.js → properties-constraints.inspector-han-PJPy.js} +1 -1
  199. package/dist/assets/{properties-data.inspector-CKX81zhT.js → properties-data.inspector-BxoOhIg0.js} +1 -1
  200. package/dist/assets/{properties-material.inspector-BRSPtk7G.js → properties-material.inspector-Cv96LV30.js} +1 -1
  201. package/dist/assets/{properties-modifiers.inspector-oiF88g6g.js → properties-modifiers.inspector-C0epFMUS.js} +1 -1
  202. package/dist/assets/{properties-object.inspector-DemtGtHR.js → properties-object.inspector-BUXSTujy.js} +1 -1
  203. package/dist/assets/{properties-output.inspector-qXRflac7.js → properties-output.inspector-GxdQIydV.js} +1 -1
  204. package/dist/assets/{properties-particles.inspector-DMTFYXtX.js → properties-particles.inspector-BM6WWqWy.js} +1 -1
  205. package/dist/assets/{properties-physics.inspector-Cbnh5FYf.js → properties-physics.inspector-2x9sbFhN.js} +1 -1
  206. package/dist/assets/{properties-render.inspector-Cf4fmFmw.js → properties-render.inspector-BcS8R6AN.js} +1 -1
  207. package/dist/assets/{properties-scene.inspector-Dlhwx1Jk.js → properties-scene.inspector-B1NjeWaL.js} +1 -1
  208. package/dist/assets/{properties-texture.inspector-CFPpgdvS.js → properties-texture.inspector-C22vj7XZ.js} +1 -1
  209. package/dist/assets/{properties-view-layer.inspector-D-3cHcyN.js → properties-view-layer.inspector-BpSr6tW3.js} +1 -1
  210. package/dist/assets/{properties-world.inspector-CGV5u2vS.js → properties-world.inspector-qGFtcwE6.js} +1 -1
  211. package/dist/assets/{r3f-design-session-BITr59zE.js → r3f-design-session-sj0vggGh.js} +2 -2
  212. package/dist/assets/{r3f-physics-binding-BATEkxoi.js → r3f-physics-binding-BYb1UWMK.js} +1 -1
  213. package/dist/assets/{r3f-source-authoring-adapter-eyquaeRl.js → r3f-source-authoring-adapter-C9WYtPIa.js} +1 -1
  214. package/dist/assets/{react-canvas-navigation-DjaqyL9B.js → react-canvas-navigation-CuDrmDyL.js} +1 -1
  215. package/dist/assets/{react-inspector.service-Bpta2-vk.js → react-inspector.service-BgV68KJk.js} +1 -1
  216. package/dist/assets/{react-story-board-C_L09deC.js → react-story-board-ClnkbDTi.js} +1 -1
  217. package/dist/assets/{react-three-rapier.esm-qv3CPTWM.js → react-three-rapier.esm-C-ciX4k0.js} +1 -1
  218. package/dist/assets/{react-world-authoring-adapter-BUU8rhRd.js → react-world-authoring-adapter-BDaxJTc0.js} +1 -1
  219. package/dist/assets/{realm-services-ugwrIrZB.js → realm-services-Cw3sONfz.js} +1 -1
  220. package/dist/assets/{reflection-probe-capture.inspector-B5kTVv5X.js → reflection-probe-capture.inspector-CNoJsSEi.js} +1 -1
  221. package/dist/assets/{registry-DLJHmJyM.js → registry-a1gjDpWd.js} +1 -1
  222. package/dist/assets/{relative-import-specifier-CbIyU_9J.js → relative-import-specifier-BndRUUAb.js} +1 -1
  223. package/dist/assets/{render-env-D0fWD_Cg.js → render-env-qYy53OAK.js} +1 -1
  224. package/dist/assets/{render-features-C1XRxw0r.js → render-features-B492w-Yf.js} +1 -1
  225. package/dist/assets/{render-settings-TEF5i9i9.js → render-settings-BjcdKCfd.js} +1 -1
  226. package/dist/assets/{resolve-three-BB2QWODF.js → resolve-three-CszFCyl-.js} +3 -3
  227. package/dist/assets/{root-seam-contract-AH-4qn4f.js → root-seam-contract-Bd-XAGBB.js} +1 -1
  228. package/dist/assets/{run-selection-D1vl12vH.js → run-selection-BpGDhn70.js} +1 -1
  229. package/dist/assets/{scene-capture-C29siFao.js → scene-capture-CAFYvzhb.js} +1 -1
  230. package/dist/assets/{scene-document.service-BWVnNGp-.js → scene-document.service-DMgXwzwD.js} +2 -2
  231. package/dist/assets/{scene-framing-C7Dmipw4.js → scene-framing-Cc0t4Ghk.js} +1 -1
  232. package/dist/assets/{seeded-random-BMbOsD5m.js → seeded-random-CaqCbq6t.js} +1 -1
  233. package/dist/assets/{setup-renderer-CCCYtTqV.js → setup-renderer-CJwc7fKC.js} +1 -1
  234. package/dist/assets/{source-object3d-authoring-adapter-Cbbs0YjZ.js → source-object3d-authoring-adapter-JfFg_SXG.js} +1 -1
  235. package/dist/assets/{source-persistence-backend-B2YaNBbK.js → source-persistence-backend-lDOQZAuY.js} +1 -1
  236. package/dist/assets/{stage-keyboard-DKyfSZqk.js → stage-keyboard-Cn3D4l1C.js} +1 -1
  237. package/dist/assets/{stage-overlay-set-BuEpVdEB.js → stage-overlay-set--uhDjwES.js} +1 -1
  238. package/dist/assets/{stage-presence-markers-BW_-0aHa.js → stage-presence-markers-pGfG8Ga3.js} +1 -1
  239. package/dist/assets/{stage-transform-tools-CUIBDpNf.js → stage-transform-tools-C0s5SeLW.js} +1 -1
  240. package/dist/assets/standard-viewport-dressing-XRUmVcY2.js +24 -0
  241. package/dist/assets/{state-watch.action-CPr8pgP6.js → state-watch.action-Df9RonGq.js} +1 -1
  242. package/dist/assets/{state-watch.menu-B6E9vQpQ.js → state-watch.menu-CPUcUe-D.js} +1 -1
  243. package/dist/assets/{state-watch.utility-ClzOeKvw.js → state-watch.utility-B8cagqBb.js} +1 -1
  244. package/dist/assets/{story-capture-CKMQHZc4.js → story-capture-B2BjHSLc.js} +1 -1
  245. package/dist/assets/{story-documents-QD7pHb4e.js → story-documents-SnoNBd2D.js} +1 -1
  246. package/dist/assets/{story-documents.service-3jggyYD4.js → story-documents.service-DBmRjRB0.js} +1 -1
  247. package/dist/assets/{story-documents.service-0heuocG2.js → story-documents.service-b-luEx4m.js} +1 -1
  248. package/dist/assets/{story-media-presence-BSzcVOx8.js → story-media-presence-BycZ_Z6D.js} +1 -1
  249. package/dist/assets/{story-pixi-preview-Bwbu5lsq.js → story-pixi-preview-B388EEvg.js} +1 -1
  250. package/dist/assets/{story-presentation-C3wR7htg.js → story-presentation-HlppZ46F.js} +1 -1
  251. package/dist/assets/{story-three-preview-BiiW5BTL.js → story-three-preview-B-jMiM2k.js} +2 -2
  252. package/dist/assets/{studio-environment-7oYW17Ie.js → studio-environment-C79giSrc.js} +1 -1
  253. package/dist/assets/{surface-state-_ZZJugmc.js → surface-state-DKi9MDjb.js} +1 -1
  254. package/dist/assets/{syntactic-prop-specs-AHbdK98K.js → syntactic-prop-specs-C3mL8uum.js} +1 -1
  255. package/dist/assets/{team-playtest.service-BfGMrLe2.js → team-playtest.service-oLwYS-Hr.js} +1 -1
  256. package/dist/assets/{three-authoring-adapter-DlqC-T90.js → three-authoring-adapter-CRLQO6sr.js} +1 -1
  257. package/dist/assets/three-authoring.service-ZppuT2yH.js +2 -0
  258. package/dist/assets/{three-BiLYjlR0.js → three-fHebWwy_.js} +1 -1
  259. package/dist/assets/{three-ingest-runtime-BsCSoTG8.js → three-ingest-runtime-s9ENzn3K.js} +1 -1
  260. package/dist/assets/{three-integration-DxXySCHZ.js → three-integration-Cn9aysL2.js} +2 -2
  261. package/dist/assets/three-integration.service-BIdzYsdo.js +1 -0
  262. package/dist/assets/{three-projection-core-C0R8NXF5.js → three-projection-core-DfVT5WpU.js} +1 -1
  263. package/dist/assets/{three-state-28vYMAez.js → three-state-BlAc2cU5.js} +1 -1
  264. package/dist/assets/{three-story-capture.service-VJ7oB7Ak.js → three-story-capture.service-CTQwjZMC.js} +2 -2
  265. package/dist/assets/{three-story-model-yxM6xIDL.js → three-story-model-CHbWQcAh.js} +1 -1
  266. package/dist/assets/{three-viewport-presentation-PqEhvDqp.js → three-viewport-presentation-25xuss6W.js} +2 -2
  267. package/dist/assets/{transform-mode-request-gml8dpK4.js → transform-mode-request-CissAw5x.js} +1 -1
  268. package/dist/assets/{transport-strip-DgeWfqo0.js → transport-strip-DFf-U2y-.js} +1 -1
  269. package/dist/assets/transport.header-DYRNEz0o.js +1 -0
  270. package/dist/assets/{tuples-BbhqWWKC.js → tuples-D29lpxvy.js} +1 -1
  271. package/dist/assets/{ui-board-document-DcZ0WHEL.js → ui-board-document-Byhp9wy1.js} +2 -2
  272. package/dist/assets/{user-data-DX18I5LS.js → user-data-DjFdlyHN.js} +1 -1
  273. package/dist/assets/{utility-view-state-CV4sNyaf.js → utility-view-state-BfTEKwyx.js} +1 -1
  274. package/dist/assets/{viewport-door-C_XkG4b1.js → viewport-door-Dh7IGceC.js} +1 -1
  275. package/dist/assets/{viewport-root-presentation-h3E0Xsra.js → viewport-root-presentation-CQ7jhPEd.js} +1 -1
  276. package/dist/assets/{viewport-surface-status-OxaV9weN.js → viewport-surface-status-OCXNZYo7.js} +1 -1
  277. package/dist/assets/{webworkerAll-DtOnnkrI.js → webworkerAll-C7fvfaXh.js} +1 -1
  278. package/dist/assets/{workspace-arrangement-Dg7zIkwR.js → workspace-arrangement-Dyq55Dxr.js} +1 -1
  279. package/dist/assets/{world-documents-DAcA8wNx.js → world-documents-VeT5j_jT.js} +1 -1
  280. package/dist/assets/{world-root-stage-binding-CHamVnwM.js → world-root-stage-binding-CfA3fpQN.js} +1 -1
  281. package/dist/assets/{xstate-animation-binding-DQkf6q6S.js → xstate-animation-binding-D3afNlpg.js} +1 -1
  282. package/dist/assets/{xstate-animation-meta-DFSFf8d4.js → xstate-animation-meta-Bvk0pGex.js} +1 -1
  283. package/dist-node/cli.js +19 -17
  284. package/package.json +16 -16
  285. package/dist/assets/InspectorObjectPreview-uhttAefh.js +0 -1
  286. package/dist/assets/Object3DDocumentViewport-9yg2UH4I.js +0 -2
  287. package/dist/assets/autoplay.service-DFqlxmS0.js +0 -1
  288. package/dist/assets/instances.command-CNhLn9a9.js +0 -1
  289. package/dist/assets/network-observer.service-CnOV9u6I.js +0 -1
  290. package/dist/assets/standard-viewport-dressing-oljtBXBW.js +0 -24
  291. package/dist/assets/three-authoring.service-DZWsZPqx.js +0 -2
  292. package/dist/assets/three-integration.service-BgzJ-hPW.js +0 -1
  293. package/dist/assets/transport.header-eMf7tt0a.js +0 -1
@@ -1 +1 @@
1
- import{d0 as c,d1 as l,d2 as u,d3 as f,d4 as m}from"./index-Bn8WGRJh.js";function g(t,n){if(t.setTransformMode(n),n==="select")return;const r=[...t.selectedEntityIds];if(r.length===0)return;const a=c(t),s=((a===null?null:l(a)?.adapter)??u(t).adapter).transforms?.editability;if(!s)return;let e;for(const i of r){const o=f(d=>s(i,d));if(!o.locked)return;e??=o.reason}e&&m(e)}export{g as r};
1
+ import{d0 as c,d1 as l,d2 as u,d3 as f,d4 as m}from"./index-CWR8N1pt.js";function g(t,n){if(t.setTransformMode(n),n==="select")return;const r=[...t.selectedEntityIds];if(r.length===0)return;const a=c(t),s=((a===null?null:l(a)?.adapter)??u(t).adapter).transforms?.editability;if(!s)return;let e;for(const i of r){const o=f(d=>s(i,d));if(!o.locked)return;e??=o.reason}e&&m(e)}export{g as r};
@@ -1 +1 @@
1
- import{a as l}from"./jsx-runtime-DPjLkJKQ.js";import{r as c}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{af as b,aL as v,a1 as x,a2 as r,aM as j,aK as i}from"./index-Bn8WGRJh.js";const S=[.25,.5,1,2];function f(a,s){const t=Math.round(a*s);return`${a.toFixed(2)}s · f${t}`}function E({transport:a}){const s=c.useSyncExternalStore(c.useCallback(e=>a?a.subscribe(e):()=>{},[a]),c.useCallback(()=>a?.snapshot()??null,[a]));if(!a||!s||s.activeSubject===null)return null;const t=s.driver==="world",n=s.playbackState==="playing",{start:h,end:m,fps:o,loop:g}=s.range,d=s.subjects.find(e=>e.id===s.activeSubject),p=s.subjects.length>1?s.subjects:null,u=a.activeClips();return l.jsxs("section",{"aria-label":"Transport","data-testid":"stage-transport-strip",style:{display:"flex",alignItems:"center",gap:"var(--volter-space-2)",padding:"var(--volter-space-1) var(--volter-space-3)",borderTop:`var(--volter-stroke-resting) solid ${b.boundary.default}`,background:b.surface.raised},children:[l.jsx(v,{size:"compact","aria-label":n?"Pause":"Play",disabled:t,onClick:()=>n?a.pause():a.play(),children:l.jsx(x,{icon:n?r.transport.pause:r.transport.play})}),l.jsx(v,{size:"compact","aria-label":"Stop",disabled:t,onClick:()=>a.stop(),children:l.jsx(x,{icon:r.transport.stop})}),l.jsx(j,{"aria-label":"Playhead",type:"range",min:h,max:m,step:1/o,value:s.time,disabled:t,onChange:e=>a.seek(Number(e.target.value)),style:{flex:1}}),l.jsx(i,{as:"span",variant:"caption",children:f(s.time,o)}),p?l.jsx("select",{"aria-label":"Subject",value:s.activeSubject,disabled:t,onChange:e=>a.setActiveSubject(e.target.value),children:p.map(e=>l.jsx("option",{value:e.id,children:e.label},e.id))}):null,u?l.jsx("select",{"aria-label":"Clip",disabled:t,onChange:e=>a.setActiveClip(e.target.value),children:u.map(e=>l.jsx("option",{value:e.id,children:e.label},e.id))}):null,l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"var(--volter-space-1)"},children:[l.jsx("input",{type:"checkbox",checked:g,disabled:t,onChange:e=>a.setLoop(e.target.checked)}),l.jsx(i,{as:"span",variant:"caption",children:"Loop"})]}),l.jsx("select",{"aria-label":"Speed",value:String(s.timeScale),disabled:t,onChange:e=>a.setTimeScale(Number(e.target.value)),children:S.map(e=>l.jsxs("option",{value:String(e),children:[e,"×"]},e))}),t?l.jsx(i,{as:"span",variant:"caption",children:"The world is driving time (Play); pause the game to scrub"}):d?l.jsx(i,{as:"span",variant:"caption",children:d.label}):null]})}export{E as T};
1
+ import{a as l}from"./jsx-runtime-DPjLkJKQ.js";import{r as c}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{af as b,aL as v,a1 as x,a2 as r,aM as j,aK as i}from"./index-CWR8N1pt.js";const S=[.25,.5,1,2];function f(a,s){const t=Math.round(a*s);return`${a.toFixed(2)}s · f${t}`}function E({transport:a}){const s=c.useSyncExternalStore(c.useCallback(e=>a?a.subscribe(e):()=>{},[a]),c.useCallback(()=>a?.snapshot()??null,[a]));if(!a||!s||s.activeSubject===null)return null;const t=s.driver==="world",n=s.playbackState==="playing",{start:h,end:m,fps:o,loop:g}=s.range,d=s.subjects.find(e=>e.id===s.activeSubject),p=s.subjects.length>1?s.subjects:null,u=a.activeClips();return l.jsxs("section",{"aria-label":"Transport","data-testid":"stage-transport-strip",style:{display:"flex",alignItems:"center",gap:"var(--volter-space-2)",padding:"var(--volter-space-1) var(--volter-space-3)",borderTop:`var(--volter-stroke-resting) solid ${b.boundary.default}`,background:b.surface.raised},children:[l.jsx(v,{size:"compact","aria-label":n?"Pause":"Play",disabled:t,onClick:()=>n?a.pause():a.play(),children:l.jsx(x,{icon:n?r.transport.pause:r.transport.play})}),l.jsx(v,{size:"compact","aria-label":"Stop",disabled:t,onClick:()=>a.stop(),children:l.jsx(x,{icon:r.transport.stop})}),l.jsx(j,{"aria-label":"Playhead",type:"range",min:h,max:m,step:1/o,value:s.time,disabled:t,onChange:e=>a.seek(Number(e.target.value)),style:{flex:1}}),l.jsx(i,{as:"span",variant:"caption",children:f(s.time,o)}),p?l.jsx("select",{"aria-label":"Subject",value:s.activeSubject,disabled:t,onChange:e=>a.setActiveSubject(e.target.value),children:p.map(e=>l.jsx("option",{value:e.id,children:e.label},e.id))}):null,u?l.jsx("select",{"aria-label":"Clip",disabled:t,onChange:e=>a.setActiveClip(e.target.value),children:u.map(e=>l.jsx("option",{value:e.id,children:e.label},e.id))}):null,l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"var(--volter-space-1)"},children:[l.jsx("input",{type:"checkbox",checked:g,disabled:t,onChange:e=>a.setLoop(e.target.checked)}),l.jsx(i,{as:"span",variant:"caption",children:"Loop"})]}),l.jsx("select",{"aria-label":"Speed",value:String(s.timeScale),disabled:t,onChange:e=>a.setTimeScale(Number(e.target.value)),children:S.map(e=>l.jsxs("option",{value:String(e),children:[e,"×"]},e))}),t?l.jsx(i,{as:"span",variant:"caption",children:"The world is driving time (Play); pause the game to scrub"}):d?l.jsx(i,{as:"span",variant:"caption",children:d.label}):null]})}export{E as T};
@@ -0,0 +1 @@
1
+ import{a as o}from"./jsx-runtime-DPjLkJKQ.js";import{r as t}from"./index-CWR8N1pt.js";import{r as m}from"./index-nmcBqr7Y.js";import{P as p}from"./PlayBar-B5de5J5O.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-D_NuPfjr.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./configurations-vOazo-km.js";import"./run-selection-BpGDhn70.js";import"./game-network-BkkoOr_U.js";import"./index-OZVqp6xS.js";import"./index-Da9JhEvW.js";import"./native-debug-module-BzGNl0wd.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-Bt57rVDa.js";import"./contract-system-adapters-DQkiwEeo.js";import"./game-contract-seams-DiQ1tlKC.js";import"./seeded-random-CaqCbq6t.js";import"./game-audio-BeCyd0Ha.js";import"./rapier-physics-adapter-CaZqWLu0.js";import"./events-156d8d12.esm-CYeuVCYr.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./index-bQE2NA0D.js";import"./live-project-verbs-CS-RzAOM.js";import"./capability-coverage-DgC2RhRJ.js";import"./edit-mode-authoring-DgXUzfvm.js";import"./json-history-resource-DwQA9nJ3.js";import"./binding-resolver-DYyowJkn.js";import"./adapter-surface-Y37Nzcyw.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./realm-services-Cw3sONfz.js";import"./canvas-entry-runtime-CagodwVN.js";import"./three-ingest-runtime-s9ENzn3K.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-mDJkad7M.js";import"./ingest-source-persistence-DOhZMV-e.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-CQ7jhPEd.js";import"./mounted-authoring-DxwkC5eG.js";import"./entity-object-DR7d2cxz.js";import"./user-data-DjFdlyHN.js";import"./workspace-arrangement-Dyq55Dxr.js";import"./three-contract-Dkt6PmWY.js";import"./three-fHebWwy_.js";import"./editor-layers-hAcvLPMn.js";import"./component-instance-root-UahhIVd1.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-authoring-adapter-CRLQO6sr.js";import"./source-persistence-backend-lDOQZAuY.js";import"./three-projection-core-DfVT5WpU.js";import"./body-marks-C1LxJtQb.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./structural-ids-BOo2BRoY.js";import"./object3d-authoring-subject-XccsO0xG.js";import"./r3f-physics-binding-BYb1UWMK.js";import"./deferred-ingest-play-BTXd4idB.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-BDaxJTc0.js";import"./board-guides-DbRT0CEe.js";import"./relative-import-specifier-BndRUUAb.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-DYloFXZZ.js";import"./inference-diagnostics-GP--Nnde.js";import"./writer-tw6EcuVO.js";import"./three-state-BlAc2cU5.js";import"./editor-shell-store-DkNOWUFp.js";import"./output-pass-HurwNl0G.js";import"./viewport-door-Dh7IGceC.js";import"./game-surface-defaults-D8S4cRxi.js";const Dr="workspace.header",Fr=0;function Gr(){const{project:r}=t();return m.useSyncExternalStore(r.subscribe,r.mounts,r.mounts)?o.jsx(p,{}):null}export{Gr as default,Fr as order,Dr as point};
@@ -1 +1 @@
1
- import{e1 as e,bA as o,t as r}from"./index-Bn8WGRJh.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const t=e([o(),o(),o()]).describe("3D vector as [x, y, z]"),i=e([o(),o(),o(),o()]).describe("Quaternion as [x, y, z, w]"),x=r({position:t.optional().describe("World-space position [x, y, z]"),rotation:i.optional().describe("Rotation quaternion [x, y, z, w]"),scale:t.optional().describe("Scale factor per axis [x, y, z]. Defaults to [1, 1, 1]")}).describe("Local transform relative to parent entity");export{i as QuatSchema,x as TransformSchema,t as Vec3Schema};
1
+ import{e1 as e,bA as o,t as r}from"./index-CWR8N1pt.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const t=e([o(),o(),o()]).describe("3D vector as [x, y, z]"),i=e([o(),o(),o(),o()]).describe("Quaternion as [x, y, z, w]"),x=r({position:t.optional().describe("World-space position [x, y, z]"),rotation:i.optional().describe("Rotation quaternion [x, y, z, w]"),scale:t.optional().describe("Scale factor per axis [x, y, z]. Defaults to [1, 1, 1]")}).describe("Local transform relative to parent entity");export{i as QuatSchema,x as TransformSchema,t as Vec3Schema};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/story-capture-CKMQHZc4.js","assets/react-story-board-C_L09deC.js","assets/jsx-runtime-DPjLkJKQ.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-nmcBqr7Y.js","assets/index-D_NuPfjr.js","assets/index-CtzuWnCS.js","assets/index-CinJrH5C.js","assets/index-Bn8WGRJh.js","assets/index-FUuS4qwW.js","assets/client-DNXj_opT.js","assets/index-CPiRKiDC.css","assets/bitmap-label-Ct4k6ehY.js","assets/StoryPreviewMount-uYhyt63h.js","assets/story-presentation-C3wR7htg.js"])))=>i.map(i=>d[i]);
2
- import{dm as m,am as s,dn as a,aw as n,_ as c,b9 as d}from"./index-Bn8WGRJh.js";import{a as u}from"./jsx-runtime-DPjLkJKQ.js";import{d as l,p as v,r as P}from"./design-time-layers-DWdxyEke.js";import{RootDocumentContent as w}from"./world-documents-DAcA8wNx.js";import{U as _}from"./component-board.service-CJDzogke.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./root-stacking-BEd9ZvxC.js";import"./edit-mode-authoring-D4gF7ToY.js";import"./design-time-mount-registry-DUpXCg1U.js";import"./react-story-board-C_L09deC.js";import"./game-surface-defaults-D8S4cRxi.js";import"./react-canvas-navigation-DjaqyL9B.js";import"./component-board-registry-DrIa2csL.js";import"./surface-state-_ZZJugmc.js";import"./board-guides-CFM0Dzzw.js";import"./CanvasSceneViewport-VALiHtss.js";import"./RootSelectionOverlay-C2jDNhWx.js";import"./eyedropper-session-bjPXnfeX.js";import"./layered-pick-Bkf0E_UR.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./inspect-C1HaQduW.js";import"./inference-diagnostics-BPtSODNJ.js";import"./Toolbar-wCXICaZA.js";import"./transform-mode-request-gml8dpK4.js";import"./TransientHint-BRrfIPg5.js";import"./ReactCanvasControls-pLDTjk7f.js";import"./story-media-presence-BSzcVOx8.js";const y={revision:()=>JSON.stringify(d().map(({id:i,modulePath:t})=>[i,t])),subscribe:s,capture:async({width:i,height:t})=>{const{captureDomStoryBoardPreview:o}=await c(async()=>{const{captureDomStoryBoardPreview:e}=await import("./story-capture-CKMQHZc4.js");return{captureDomStoryBoardPreview:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]));return o(i,t)}};function Z({store:i,composite:t}){const o=l(t).find(r=>r.kind==="dom")??v(),e=r=>u.jsx(w,{...r,composite:t,descriptor:o,store:i});m({id:a,title:_,kind:"world",workspaceRole:"authored-subject",provenance:{rootId:o.worldId,...o.path?{sourcePath:o.path}:{}},Content:e,preview:y,presentation:()=>{const r=n()?.rootPath,p=r?P(r,o.worldId):void 0;return{kind:"workspace",id:a,...p?{story:p}:{}}}},{category:"canvas",default:!t.childAdapters().some(r=>r.kind==="three"||r.kind==="canvas")})}export{Z as installUiBoard};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/story-capture-B2BjHSLc.js","assets/react-story-board-ClnkbDTi.js","assets/jsx-runtime-DPjLkJKQ.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-nmcBqr7Y.js","assets/index-D_NuPfjr.js","assets/index-CtzuWnCS.js","assets/index-CinJrH5C.js","assets/index-CWR8N1pt.js","assets/index-FUuS4qwW.js","assets/client-DNXj_opT.js","assets/index-CPiRKiDC.css","assets/bitmap-label-Ct4k6ehY.js","assets/StoryPreviewMount-DDa8sXQF.js","assets/story-presentation-HlppZ46F.js"])))=>i.map(i=>d[i]);
2
+ import{dm as m,am as s,dn as a,aw as n,_ as c,b9 as d}from"./index-CWR8N1pt.js";import{a as u}from"./jsx-runtime-DPjLkJKQ.js";import{d as l,p as v,r as P}from"./design-time-layers-CS6QlGFz.js";import{RootDocumentContent as w}from"./world-documents-VeT5j_jT.js";import{U as _}from"./component-board.service-Bgh7n9K7.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./root-stacking-BEd9ZvxC.js";import"./edit-mode-authoring-DgXUzfvm.js";import"./design-time-mount-registry-DUpXCg1U.js";import"./react-story-board-ClnkbDTi.js";import"./game-surface-defaults-D8S4cRxi.js";import"./react-canvas-navigation-CuDrmDyL.js";import"./component-board-registry-DrIa2csL.js";import"./surface-state-DKi9MDjb.js";import"./board-guides-DbRT0CEe.js";import"./CanvasSceneViewport-Dq6iUvIm.js";import"./RootSelectionOverlay-C5bcCIxc.js";import"./eyedropper-session-bjPXnfeX.js";import"./layered-pick-Dntz2X63.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./inspect-DYloFXZZ.js";import"./inference-diagnostics-GP--Nnde.js";import"./Toolbar-D9hmQICZ.js";import"./transform-mode-request-CissAw5x.js";import"./TransientHint-DQ2Gxaf4.js";import"./ReactCanvasControls-RN0LHjKr.js";import"./story-media-presence-BycZ_Z6D.js";const y={revision:()=>JSON.stringify(d().map(({id:i,modulePath:t})=>[i,t])),subscribe:s,capture:async({width:i,height:t})=>{const{captureDomStoryBoardPreview:o}=await c(async()=>{const{captureDomStoryBoardPreview:e}=await import("./story-capture-B2BjHSLc.js");return{captureDomStoryBoardPreview:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]));return o(i,t)}};function Z({store:i,composite:t}){const o=l(t).find(r=>r.kind==="dom")??v(),e=r=>u.jsx(w,{...r,composite:t,descriptor:o,store:i});m({id:a,title:_,kind:"world",workspaceRole:"authored-subject",provenance:{rootId:o.worldId,...o.path?{sourcePath:o.path}:{}},Content:e,preview:y,presentation:()=>{const r=n()?.rootPath,p=r?P(r,o.worldId):void 0;return{kind:"workspace",id:a,...p?{story:p}:{}}}},{category:"canvas",default:!t.childAdapters().some(r=>r.kind==="three"||r.kind==="canvas")})}export{Z as installUiBoard};
@@ -1 +1 @@
1
- import{O as n}from"./workspace-arrangement-Dg7zIkwR.js";const r={...n,entityId:"entityId",forward:"forward",tags:"tags",attributes:"attributes",navRole:"navRole",pivot:"pivot",splineCurve:"splineCurve",splineControlPoint:"splineControlPoint",_camera:"_camera",_particleSystem:"_particleSystem",gaussianSplat:"gaussianSplat",__sharedGeometry:"__sharedGeometry",__shadeOrig:"__shadeOrig",__shadeUnlit:"__shadeUnlit",__ingest:"__ingest",__ingestNextId:"__ingestNextId",authoringRoot:"authoringRoot",authoringInstance:"authoringInstance",authoringLabel:"authoringLabel",authoringComponent:"authoringComponent",authoringDocument:"authoringDocument",authoringHierarchyId:"authoringHierarchyId",authoringHierarchyParentId:"authoringHierarchyParentId",authoringHierarchyOrder:"authoringHierarchyOrder",editorIcon:"editorIcon",envObject:"envObject",constraints:"constraints",authoringSubject:"authoringSubject",reflectionProbe:"reflectionProbe",triggerVolume:"triggerVolume",vcDirIdx:"vcDirIdx"};function o(t,e){return t?t.userData[r[e]]:void 0}function s(t,e,a){t.userData[r[e]]=a}function u(t,e){return t?t.userData[r[e]]!==void 0:!1}export{o as g,u as h,s};
1
+ import{O as n}from"./workspace-arrangement-Dyq55Dxr.js";const r={...n,entityId:"entityId",forward:"forward",tags:"tags",attributes:"attributes",navRole:"navRole",pivot:"pivot",splineCurve:"splineCurve",splineControlPoint:"splineControlPoint",_camera:"_camera",_particleSystem:"_particleSystem",gaussianSplat:"gaussianSplat",__sharedGeometry:"__sharedGeometry",__shadeOrig:"__shadeOrig",__shadeUnlit:"__shadeUnlit",__ingest:"__ingest",__ingestNextId:"__ingestNextId",authoringRoot:"authoringRoot",authoringInstance:"authoringInstance",authoringLabel:"authoringLabel",authoringComponent:"authoringComponent",authoringDocument:"authoringDocument",authoringHierarchyId:"authoringHierarchyId",authoringHierarchyParentId:"authoringHierarchyParentId",authoringHierarchyOrder:"authoringHierarchyOrder",editorIcon:"editorIcon",envObject:"envObject",constraints:"constraints",authoringSubject:"authoringSubject",reflectionProbe:"reflectionProbe",triggerVolume:"triggerVolume",vcDirIdx:"vcDirIdx"};function o(t,e){return t?t.userData[r[e]]:void 0}function s(t,e,a){t.userData[r[e]]=a}function u(t,e){return t?t.userData[r[e]]!==void 0:!1}export{o as g,u as h,s};
@@ -1 +1 @@
1
- import{a4 as l}from"./index-Bn8WGRJh.js";function f(c,i){let t=i,s=0;const r=new Set,o=()=>{s++;for(const e of r)e()},n=e=>{t!==e&&(t=e,o())};return{subscribe(e){return r.add(e),()=>{r.delete(e)}},version:()=>s,active:()=>t,select:n,open(e){n(e),l(c)},notify:o,reset(){t=i,o()}}}const p=f("tool:profiler.utility","profiler");export{p};
1
+ import{a4 as l}from"./index-CWR8N1pt.js";function f(c,i){let t=i,s=0;const r=new Set,o=()=>{s++;for(const e of r)e()},n=e=>{t!==e&&(t=e,o())};return{subscribe(e){return r.add(e),()=>{r.delete(e)}},version:()=>s,active:()=>t,select:n,open(e){n(e),l(c)},notify:o,reset(){t=i,o()}}}const p=f("tool:profiler.utility","profiler");export{p};
@@ -1 +1 @@
1
- import{x as w}from"./index-Bn8WGRJh.js";const s=new Map,f=new Map;function g(e){let t=f.get(e);return t||(t={frameListeners:new Set,helpers:new Map},f.set(e,t)),t}const l=new Set,c=new Set;function i(){for(const t of s.values())if(t.presenting)return t;const e=w();if(e!==null){const t=s.get(e);if(t)return t}return s.values().next().value??null}let a=null;function p(){a=null;const e=v();for(const t of c)t(e)}function h(e,t){const n=g(e);return{documentId:e,rig:()=>s.get(e)?.rig??t,setHelper:(r,o)=>{n.helpers.set(r,o),s.get(e)?.setHelper(r,o)},onFrame:r=>(n.frameListeners.add(r),()=>{n.frameListeners.delete(r)})}}function S(e,t,n,r){const o=g(r.documentId),u={documentId:r.documentId,rig:e,present:t,setHelper:n,frameListeners:o.frameListeners,helpers:o.helpers,presenting:!1};s.set(r.documentId,u);for(const[d,m]of u.helpers)n(d,m);return p(),()=>{s.get(r.documentId)===u&&(s.delete(r.documentId),p())}}function I(e,t){const n=i();n&&(n.helpers.set(e,t),n.setHelper(e,t))}function V(){return i()?.rig??null}function F(e){const t=i();if(!t)return null;const n=t.present(e);if(!n)return null;t.presenting=!0;let r=!1;return{worldId:n.worldId,dispose:()=>{r||(r=!0,t.presenting=!1),n.dispose()}}}function x(e){return l.add(e),()=>{l.delete(e)}}function v(){return a||(a=[...s.values()].map(e=>h(e.documentId,e.rig))),a}function y(e){const t=f.get(e);return t?[...t.helpers].filter(([,n])=>n!==null).map(([n])=>n):[]}function H(e){return c.add(e),()=>{c.delete(e)}}function b(e,t){const n=s.get(e);if(n){for(const r of n.frameListeners)r(t);if(i()===n)for(const r of l)r(t)}}export{V as a,v as b,x as c,S as d,H as o,F as p,b as r,I as s,y as v};
1
+ import{x as w}from"./index-CWR8N1pt.js";const s=new Map,f=new Map;function g(e){let t=f.get(e);return t||(t={frameListeners:new Set,helpers:new Map},f.set(e,t)),t}const l=new Set,c=new Set;function i(){for(const t of s.values())if(t.presenting)return t;const e=w();if(e!==null){const t=s.get(e);if(t)return t}return s.values().next().value??null}let a=null;function p(){a=null;const e=v();for(const t of c)t(e)}function h(e,t){const n=g(e);return{documentId:e,rig:()=>s.get(e)?.rig??t,setHelper:(r,o)=>{n.helpers.set(r,o),s.get(e)?.setHelper(r,o)},onFrame:r=>(n.frameListeners.add(r),()=>{n.frameListeners.delete(r)})}}function S(e,t,n,r){const o=g(r.documentId),u={documentId:r.documentId,rig:e,present:t,setHelper:n,frameListeners:o.frameListeners,helpers:o.helpers,presenting:!1};s.set(r.documentId,u);for(const[d,m]of u.helpers)n(d,m);return p(),()=>{s.get(r.documentId)===u&&(s.delete(r.documentId),p())}}function I(e,t){const n=i();n&&(n.helpers.set(e,t),n.setHelper(e,t))}function V(){return i()?.rig??null}function F(e){const t=i();if(!t)return null;const n=t.present(e);if(!n)return null;t.presenting=!0;let r=!1;return{worldId:n.worldId,dispose:()=>{r||(r=!0,t.presenting=!1),n.dispose()}}}function x(e){return l.add(e),()=>{l.delete(e)}}function v(){return a||(a=[...s.values()].map(e=>h(e.documentId,e.rig))),a}function y(e){const t=f.get(e);return t?[...t.helpers].filter(([,n])=>n!==null).map(([n])=>n):[]}function H(e){return c.add(e),()=>{c.delete(e)}}function b(e,t){const n=s.get(e);if(n){for(const r of n.frameListeners)r(t);if(i()===n)for(const r of l)r(t)}}export{V as a,v as b,x as c,S as d,H as o,F as p,b as r,I as s,y as v};
@@ -1 +1 @@
1
- import{s}from"./mounted-authoring-Cjmi_MYm.js";import{s as u}from"./three-BiLYjlR0.js";import{t as m}from"./three-contract-Dkt6PmWY.js";function c(t,d){const e=d.find(i=>i.mounted.kind==="three");if(!e||e.mounted.kind!=="three")return null;const n=m(e.mounted).scene,o=e.mounted.authoring;o&&s(n,o),u(n,a(e.id)),t.enterPlayScene(n,e.mounted.rendererConfig);let r=!1;return{worldId:e.id,dispose(){r||(r=!0,t.releaseAdoptedScene(n))}}}function a(t){return t??"main"}export{a as l,c as p};
1
+ import{s}from"./mounted-authoring-DxwkC5eG.js";import{s as u}from"./three-fHebWwy_.js";import{t as m}from"./three-contract-Dkt6PmWY.js";function c(t,d){const e=d.find(i=>i.mounted.kind==="three");if(!e||e.mounted.kind!=="three")return null;const n=m(e.mounted).scene,o=e.mounted.authoring;o&&s(n,o),u(n,a(e.id)),t.enterPlayScene(n,e.mounted.rendererConfig);let r=!1;return{worldId:e.id,dispose(){r||(r=!0,t.releaseAdoptedScene(n))}}}function a(t){return t??"main"}export{a as l,c as p};
@@ -1 +1 @@
1
- import{a as r}from"./jsx-runtime-DPjLkJKQ.js";import"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{af as i}from"./index-Bn8WGRJh.js";const m="Preparing the viewport…",n="Preparing 3D component previews…";function c(e){return!Number.isFinite(e)||e<1?n:e===1?"Preparing 1 component preview…":`Preparing ${e} component previews…`}function u({testId:e,children:t}){return r.jsx("div",{"data-testid":e,style:{position:"absolute",inset:0,padding:16,fontSize:12,color:i.content.muted,pointerEvents:"none"},children:t})}export{m as O,u as V,c as t};
1
+ import{a as r}from"./jsx-runtime-DPjLkJKQ.js";import"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{af as i}from"./index-CWR8N1pt.js";const m="Preparing the viewport…",n="Preparing 3D component previews…";function c(e){return!Number.isFinite(e)||e<1?n:e===1?"Preparing 1 component preview…":`Preparing ${e} component previews…`}function u({testId:e,children:t}){return r.jsx("div",{"data-testid":e,style:{position:"absolute",inset:0,padding:16,fontSize:12,color:i.content.muted,pointerEvents:"none"},children:t})}export{m as O,u as V,c as t};
@@ -1 +1 @@
1
- import{e as t,d as i,f as r,g as m}from"./index-B0ciEDFT.js";import"./index-Bn8WGRJh.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";t.add(i,r);t.add(m);
1
+ import{e as t,d as i,f as r,g as m}from"./index-B778_TTn.js";import"./index-CWR8N1pt.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";t.add(i,r);t.add(m);
@@ -1 +1 @@
1
- import{tr as n,ts as l,tt as a,tu as _,tv as i,tw as s,tx as d,ty as u,tz as c,tA as b,tB as p}from"./index-Bn8WGRJh.js";const f=Object.freeze(Object.defineProperty({__proto__:null,EDITOR_VIEW_BUILT_IN_UTILITY_IDS:n,EDITOR_VIEW_DOCUMENT_KINDS:l,EDITOR_VIEW_KEYS:a,EDITOR_VIEW_TOOL_UTILITY_PREFIX:_,EDITOR_VIEW_WORKSPACE_DOCUMENT_IDS:i,EditorClient:s,EditorCommandError:d,editorViewFromUrl:u,editorViewUrl:c,isEditorViewDocumentKind:b,isEditorViewUtility:p},Symbol.toStringTag,{value:"Module"})),o={editorHelperType:"editorHelperType",skeletonVisible:"skeletonVisible",skeletonEnabled:"skeletonEnabled",engineInternal:"engineInternal",editorHelper:"editorHelper",volterComponentRoot:"volterComponentRoot",volterBuiltInternal:"volterBuiltInternal"};function y(e,t){return e?e.userData[o[t]]:void 0}function g(e,t,r){e.userData[o[t]]=r}const S=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),j=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),T=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),m=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),I=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),E=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),v=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),M=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),P=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),z=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),D=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),R=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),V=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));export{o as O,m as a,P as b,E as c,S as d,j as e,T as f,y as g,I as h,f as i,z as j,D as k,v as p,M as r,g as s,R as t,V as w};
1
+ import{tr as n,ts as l,tt as a,tu as _,tv as i,tw as s,tx as d,ty as u,tz as c,tA as b,tB as p}from"./index-CWR8N1pt.js";const f=Object.freeze(Object.defineProperty({__proto__:null,EDITOR_VIEW_BUILT_IN_UTILITY_IDS:n,EDITOR_VIEW_DOCUMENT_KINDS:l,EDITOR_VIEW_KEYS:a,EDITOR_VIEW_TOOL_UTILITY_PREFIX:_,EDITOR_VIEW_WORKSPACE_DOCUMENT_IDS:i,EditorClient:s,EditorCommandError:d,editorViewFromUrl:u,editorViewUrl:c,isEditorViewDocumentKind:b,isEditorViewUtility:p},Symbol.toStringTag,{value:"Module"})),o={editorHelperType:"editorHelperType",skeletonVisible:"skeletonVisible",skeletonEnabled:"skeletonEnabled",engineInternal:"engineInternal",editorHelper:"editorHelper",volterComponentRoot:"volterComponentRoot",volterBuiltInternal:"volterBuiltInternal"};function y(e,t){return e?e.userData[o[t]]:void 0}function g(e,t,r){e.userData[o[t]]=r}const S=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),j=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),T=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),m=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),I=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),E=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),v=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),M=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),P=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),z=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),D=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),R=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),V=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));export{o as O,m as a,P as b,E as c,S as d,j as e,T as f,y as g,I as h,f as i,z as j,D as k,v as p,M as r,g as s,R as t,V as w};
@@ -1 +1 @@
1
- import{a as c}from"./jsx-runtime-DPjLkJKQ.js";import{da as L,db as X,eS as j,fl as H,aE as C,fU as $,fV as K,cx as A,fW as q,cy as M,eB as P,dm as Z,x as J,fX as Q,aP as ee,fY as te,fZ as oe,f_ as ne,f$ as re,g0 as se,g1 as ae,fR as ie,cA as ce,g2 as le,ax as de,g3 as N,g4 as ue,dk as pe}from"./index-Bn8WGRJh.js";import{r as p}from"./index-nmcBqr7Y.js";import{d as fe,m as me}from"./design-time-layers-DWdxyEke.js";import{I as xe,B as be}from"./edit-mode-authoring-D4gF7ToY.js";import{b as he,i as ve}from"./react-canvas-navigation-DjaqyL9B.js";import{R as z,i as ge}from"./react-story-board-C_L09deC.js";import{s as ye,c as we,a as Se,b as ke}from"./component-board-registry-DrIa2csL.js";import{e as Re,S as Ee}from"./surface-state-_ZZJugmc.js";import"./index-CtzuWnCS.js";import{c as Ie,d as Ce,r as F,e as G,f as Ae,m as O,b as De,a as je,s as Be}from"./board-guides-CFM0Dzzw.js";import{C as V,a as $e,b as Me}from"./CanvasSceneViewport-VALiHtss.js";import{R as _e}from"./ReactCanvasControls-pLDTjk7f.js";import{R as ze}from"./RootSelectionOverlay-C2jDNhWx.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./root-stacking-BEd9ZvxC.js";import"./design-time-mount-registry-DUpXCg1U.js";import"./game-surface-defaults-D8S4cRxi.js";import"./Toolbar-wCXICaZA.js";import"./transform-mode-request-gml8dpK4.js";import"./TransientHint-BRrfIPg5.js";import"./layered-pick-Bkf0E_UR.js";import"./eyedropper-session-bjPXnfeX.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./inspect-C1HaQduW.js";import"./inference-diagnostics-BPtSODNJ.js";const y=16,_="rgba(255, 82, 82, 0.9)",U="rgba(18, 22, 26, 0.92)",D="rgba(255, 255, 255, 0.28)";function Te(s){return[10,25,50,100,250,500,1e3,2500,5e3].find(n=>n*s>=60)??1e4}function W(s){return Math.abs(s)>=1e3?`${s/1e3}k`:String(s)}function Pe({docId:s,containerRef:l}){const n=p.useSyncExternalStore(L,X),b=p.useSyncExternalStore(Ie,()=>Ce(s)),[r,d]=p.useState(null),g=p.useRef(null);p.useEffect(()=>{const t=l.current;if(!t)return;const o=t.getBoundingClientRect();return F(s,{originX:o.left,originY:o.top,panX:n.x,panY:n.y,zoom:n.zoom}),()=>F(s,null)},[s,l,n.x,n.y,n.zoom]);const f=(t,o)=>Math.round((t-(o==="x"?n.x:n.y))/n.zoom),u=(t,o)=>(o==="x"?n.x:n.y)+t*n.zoom,m=t=>{const o=l.current?.getBoundingClientRect();return o?{x:t.clientX-o.left,y:t.clientY-o.top}:{x:0,y:0}},k=t=>o=>{o.preventDefault(),o.currentTarget.setPointerCapture(o.pointerId);const e=m(o);d({kind:"place",axis:t,id:null,at:t==="x"?e.x:e.y})},S=t=>o=>{o.preventDefault(),o.stopPropagation(),o.currentTarget.setPointerCapture(o.pointerId);const e=m(o);d({kind:"move",axis:t.axis,id:t.id,at:t.axis==="x"?e.x:e.y})},R=t=>{if(!r)return;const o=m(t),e=r.axis==="x"?o.x:o.y;d({...r,at:e}),r.kind==="move"&&r.id&&O(s,r.id,f(e,r.axis))},E=t=>{if(!r)return;const o=m(t),e=r.axis==="x"?o.x:o.y,i=e<=y;r.kind==="place"?i||Ae(s,r.axis,f(e,r.axis)):r.id&&(i?G(s,r.id):O(s,r.id,f(e,r.axis))),d(null)},a=t=>{const o=l.current,e=o?t==="x"?o.clientWidth:o.clientHeight:0,i=Te(n.zoom),v=Math.ceil(f(y,t)/i)*i,w=f(e,t),x=[];for(let I=v;I<=w&&x.length<200;I+=i)x.push(I);return x},h={position:"absolute",background:U,zIndex:61,userSelect:"none",touchAction:"none",overflow:"hidden"};return c.jsxs("div",{ref:g,"data-testid":"board-rulers",style:{position:"absolute",inset:0,pointerEvents:"none",zIndex:60},onPointerMove:R,onPointerUp:E,children:[b.map(t=>{const o=u(t.value,t.axis),e=t.axis==="x";return c.jsx("div",{"data-testid":`board-guide-${t.axis}-${t.value}`,title:`${t.axis} = ${t.value} — drag to move, drop on the ruler or double-click to remove`,onPointerDown:S(t),onPointerMove:R,onPointerUp:E,onDoubleClick:()=>G(s,t.id),style:{position:"absolute",pointerEvents:"auto",cursor:e?"col-resize":"row-resize",zIndex:60,...e?{left:o-2,top:0,bottom:0,width:5}:{top:o-2,left:0,right:0,height:5}},children:c.jsx("div",{style:{position:"absolute",background:_,...e?{left:2,top:0,bottom:0,width:1}:{top:2,left:0,right:0,height:1}}})},t.id)}),r&&c.jsx("div",{style:{position:"absolute",background:_,zIndex:62,...r.axis==="x"?{left:r.at,top:0,bottom:0,width:1}:{top:r.at,left:0,right:0,height:1}},children:c.jsx("span",{style:{position:"absolute",...r.axis==="x"?{top:y+4,left:4}:{left:y+4,top:4},fontSize:9,fontFamily:"ui-monospace, monospace",color:_,background:U,padding:"1px 3px",borderRadius:3,whiteSpace:"nowrap"},children:f(r.at,r.axis)})}),c.jsx("div",{"data-testid":"board-ruler-top",onPointerDown:k("y"),style:{...h,top:0,left:y,right:0,height:y,cursor:"row-resize",pointerEvents:"auto"},children:a("x").map(t=>c.jsx("span",{style:{position:"absolute",left:u(t,"x"),bottom:0,borderLeft:`1px solid ${D}`,height:5},children:c.jsx("span",{style:{position:"absolute",left:2,bottom:3,fontSize:8,color:D,fontFamily:"ui-monospace, monospace"},children:W(t)})},t))}),c.jsx("div",{"data-testid":"board-ruler-left",onPointerDown:k("x"),style:{...h,top:y,left:0,bottom:0,width:y,cursor:"col-resize",pointerEvents:"auto"},children:a("y").map(t=>c.jsx("span",{style:{position:"absolute",top:u(t,"y"),right:0,borderTop:`1px solid ${D}`,width:5},children:c.jsx("span",{style:{position:"absolute",top:1,right:3,fontSize:8,color:D,fontFamily:"ui-monospace, monospace",writingMode:"vertical-rl"},children:W(t)})},t))}),c.jsx(Ne,{}),c.jsx("div",{style:{...h,top:0,left:0,width:y,height:y,borderRight:`1px solid ${j.border}`,borderBottom:`1px solid ${j.border}`}})]})}function Ne(){const s=p.useSyncExternalStore(De,je);return s?c.jsxs("button",{type:"button","data-testid":"board-breakpoint-pill",title:"Style edits are scoped to this breakpoint — click to return to Base",onClick:()=>Be(null),style:{position:"absolute",top:y+8,right:12,zIndex:62,pointerEvents:"auto",background:"rgba(18, 22, 26, 0.92)",color:j.accent,border:`1px solid ${j.accent}`,borderRadius:999,fontSize:10,padding:"3px 10px",cursor:"pointer"},children:["@ ",s," · editing this breakpoint — click to clear"]}):null}const Fe="Scene";function Ge({active:s,composite:l,descriptor:n,documentId:b,store:r}){const d=p.useRef(null),g=p.useRef(null),[f]=p.useState(oe),u=n.kind==="canvas",m=u?f:ce;p.useSyncExternalStore(r.subscribe,r.getSnapshot);const k=p.useSyncExternalStore(ne,re),S=p.useSyncExternalStore(se,ae),[R,E]=p.useState(null),a=l.childAdapters().find(x=>x.worldId===n.worldId)?.adapter??R??void 0,h=u&&a?.provenance?.label==="babylon",t=a?.hierarchy.roots()??[],o=new Set(a?.rects?.emptyContainers?.().map(x=>x.id)??[]),e=t.some(x=>!o.has(x.id)),i=Re({surface:u?"Scene":n.kind==="dom"?"UI":"World",rootIds:[n.worldId],playSuspended:r.playState!=="stopped"&&(!a||a.provenance?.source==="boundary"),phase:!a||a.provenance?.source==="boundary"?"loading":"ready",content:!a||a.provenance?.source==="boundary"?"unknown":e?"present":"empty",readiness:k,failures:S,disclosure:a instanceof be?a.disclosure:null});p.useEffect(()=>{if(a)return ie(b,()=>({adapter:a,nodeId:[...r.selectedEntityIds].find(x=>a.hierarchy.node(x))??null}))},[l,a,b,r]),p.useEffect(()=>{const x=d.current;if(x&&!h)return u?he(x,m):ve(x,m)},[m,h,u]),p.useEffect(()=>{if(!s)return;if(!!!g.current&&d.current){g.current=me(d.current,l,r,[n],(Ve,Y)=>E(Y),u?{canvasSceneView:f}:void 0,b);return}let I=0,B=0;const T=()=>{if(I+=1,I<2){B=requestAnimationFrame(T);return}pe(b)};return B=requestAnimationFrame(T),()=>cancelAnimationFrame(B)},[s,f,l,n,b,u,r]),p.useEffect(()=>()=>{g.current?.(),g.current=null},[]);const v=le(de(r),r.selectedEntityIds),w=v?.worldId===n.worldId?v:a?.rects?{worldId:n.worldId,kind:"dom",adapter:a}:null;return c.jsxs("div",{ref:d,"data-testid":`world-document:${n.worldId}`,"data-volter-backdrop-color":s?h?"#111827":u?V:z:void 0,"data-volter-backdrop-policy":s?"dark-frost":void 0,onPointerDown:()=>ue("viewport"),style:{position:"absolute",inset:0,overflow:"hidden",pointerEvents:"auto",backgroundColor:h?"#111827":u?V:z,touchAction:"none"},children:[h?null:u?c.jsx($e,{view:f,documentId:b}):c.jsx(Oe,{}),c.jsx(ze,{...a?{adapter:a}:{},...u&&!h?{view:f,transformModeAware:!0,presentationId:b}:{}},`selection:${N(a)}`),c.jsx(Ee,{explanation:i,testId:`world-surface-status:${n.worldId}`,style:{zIndex:20}}),h?null:u?c.jsx(Me,{active:s,...a?{adapter:a}:{},containerRef:d,view:f,documentId:b},`controls:${N(a)}`):c.jsxs(c.Fragment,{children:[c.jsx(Pe,{docId:n.worldId,containerRef:d}),c.jsx(_e,{containerRef:d,context:w})]})]})}function Oe(){const s=p.useSyncExternalStore(L,X),l=Math.max(8,24*s.zoom),n=Math.max(.7,Math.min(1.4,s.zoom));return c.jsx("div",{"data-testid":"react-design-canvas-backdrop","aria-hidden":"true",style:{position:"absolute",inset:0,pointerEvents:"none",backgroundColor:z,backgroundImage:`radial-gradient(circle, ${ge} ${n}px, transparent ${n}px)`,backgroundPosition:`${s.x}px ${s.y}px`,backgroundSize:`${l}px ${l}px`}})}function gt(s,l){const n=J(),b=l.childAdapters().some(e=>e.role==="world"&&e.kind==="three"),r=l.childAdapters().some(e=>e.kind===xe);!b&&!r&&H(C,{discardDirty:!0});const d=new Set,g=[];let f=!1;for(const e of l.childAdapters())e.role==="world"&&e.kind==="three"&&g.push($(e.worldId,C));const u=fe(l),m=u.find(e=>e.kind==="canvas");m&&g.push($(m.worldId,A));const k=new Set([...l.childAdapters().filter(e=>e.role==="world"&&e.kind==="three"),...m?[m]:[]].map(e=>e.worldId)),S=new Map;function R(){for(const e of u){if(k.has(e.worldId)||S.has(e.worldId))continue;const i=Se(e.kind);if(!i)continue;const v=$(e.worldId,i.documentId),w=Q(e.worldId,()=>i.presence()==="absent"?`Root "${e.worldId}" has no document of its own: its design surface is the project's ${i.title} board (${i.documentId}). ${i.absentReason()}`:null);S.set(e.worldId,()=>{w(),v()})}}g.push(K(e=>{const i=ee();if(i.some(w=>w.descriptor.id===e))return null;const v=ke(e);return v?v.presence()==="absent"?v.absentReason():null:`No workspace document is named "${e}". Open in this session: ${i.map(w=>w.descriptor.id).join(", ")||"(none)"}. A component board is present only when the package that owns its medium says this project has one, so a board id can be absent for this project and present for another.`}));function E(e){const i=v=>c.jsx(Ge,{...v,composite:l,descriptor:e,store:s});Z({id:A,title:Fe,kind:"world",workspaceRole:"authored-subject",provenance:{rootId:e.worldId,...e.path?{sourcePath:e.path}:{}},Content:i,presentation:()=>({kind:"world",id:e.worldId})},{category:"scene",default:!b,rootId:e.worldId})}function a(e){d.add(e.documentId);const i=()=>{d.delete(e.documentId)};try{Promise.resolve(e.install({store:s,composite:l})).catch(i)}catch{i()}}function h(){if(!f){R();for(const e of we()){const i=e.presence();if(i===null)continue;const v=d.has(e.documentId);i==="present"!==v&&(i==="present"?a(e):(P(e.documentId),d.delete(e.documentId)))}}}m&&(E(m),d.add(A)),h();const t=ye(h),o=m?A:[...d][0];return te()||(!b&&o!==void 0&&(n===null||n===C||n===q)?M(o):n?M(n):b&&M(C)),()=>{f=!0,t();for(const e of g)e();for(const e of S.values())e();S.clear();for(const e of d)P(e)}}export{Ge as RootDocumentContent,gt as installRootDocuments};
1
+ import{a as c}from"./jsx-runtime-DPjLkJKQ.js";import{da as L,db as X,eS as j,fl as H,aE as C,fU as $,fV as K,cx as A,fW as q,cy as M,eB as P,dm as Z,x as J,fX as Q,aP as ee,fY as te,fZ as oe,f_ as ne,f$ as re,g0 as se,g1 as ae,fR as ie,cA as ce,g2 as le,ax as de,g3 as N,g4 as ue,dk as pe}from"./index-CWR8N1pt.js";import{r as p}from"./index-nmcBqr7Y.js";import{d as fe,m as me}from"./design-time-layers-CS6QlGFz.js";import{I as xe,B as be}from"./edit-mode-authoring-DgXUzfvm.js";import{b as he,i as ve}from"./react-canvas-navigation-CuDrmDyL.js";import{R as z,i as ge}from"./react-story-board-ClnkbDTi.js";import{s as ye,c as we,a as Se,b as ke}from"./component-board-registry-DrIa2csL.js";import{e as Re,S as Ee}from"./surface-state-DKi9MDjb.js";import"./index-CtzuWnCS.js";import{c as Ie,d as Ce,r as F,e as G,f as Ae,m as O,b as De,a as je,s as Be}from"./board-guides-DbRT0CEe.js";import{C as V,a as $e,b as Me}from"./CanvasSceneViewport-Dq6iUvIm.js";import{R as _e}from"./ReactCanvasControls-RN0LHjKr.js";import{R as ze}from"./RootSelectionOverlay-C5bcCIxc.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./root-stacking-BEd9ZvxC.js";import"./design-time-mount-registry-DUpXCg1U.js";import"./game-surface-defaults-D8S4cRxi.js";import"./Toolbar-D9hmQICZ.js";import"./transform-mode-request-CissAw5x.js";import"./TransientHint-DQ2Gxaf4.js";import"./layered-pick-Dntz2X63.js";import"./eyedropper-session-bjPXnfeX.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./inspect-DYloFXZZ.js";import"./inference-diagnostics-GP--Nnde.js";const y=16,_="rgba(255, 82, 82, 0.9)",U="rgba(18, 22, 26, 0.92)",D="rgba(255, 255, 255, 0.28)";function Te(s){return[10,25,50,100,250,500,1e3,2500,5e3].find(n=>n*s>=60)??1e4}function W(s){return Math.abs(s)>=1e3?`${s/1e3}k`:String(s)}function Pe({docId:s,containerRef:l}){const n=p.useSyncExternalStore(L,X),b=p.useSyncExternalStore(Ie,()=>Ce(s)),[r,d]=p.useState(null),g=p.useRef(null);p.useEffect(()=>{const t=l.current;if(!t)return;const o=t.getBoundingClientRect();return F(s,{originX:o.left,originY:o.top,panX:n.x,panY:n.y,zoom:n.zoom}),()=>F(s,null)},[s,l,n.x,n.y,n.zoom]);const f=(t,o)=>Math.round((t-(o==="x"?n.x:n.y))/n.zoom),u=(t,o)=>(o==="x"?n.x:n.y)+t*n.zoom,m=t=>{const o=l.current?.getBoundingClientRect();return o?{x:t.clientX-o.left,y:t.clientY-o.top}:{x:0,y:0}},k=t=>o=>{o.preventDefault(),o.currentTarget.setPointerCapture(o.pointerId);const e=m(o);d({kind:"place",axis:t,id:null,at:t==="x"?e.x:e.y})},S=t=>o=>{o.preventDefault(),o.stopPropagation(),o.currentTarget.setPointerCapture(o.pointerId);const e=m(o);d({kind:"move",axis:t.axis,id:t.id,at:t.axis==="x"?e.x:e.y})},R=t=>{if(!r)return;const o=m(t),e=r.axis==="x"?o.x:o.y;d({...r,at:e}),r.kind==="move"&&r.id&&O(s,r.id,f(e,r.axis))},E=t=>{if(!r)return;const o=m(t),e=r.axis==="x"?o.x:o.y,i=e<=y;r.kind==="place"?i||Ae(s,r.axis,f(e,r.axis)):r.id&&(i?G(s,r.id):O(s,r.id,f(e,r.axis))),d(null)},a=t=>{const o=l.current,e=o?t==="x"?o.clientWidth:o.clientHeight:0,i=Te(n.zoom),v=Math.ceil(f(y,t)/i)*i,w=f(e,t),x=[];for(let I=v;I<=w&&x.length<200;I+=i)x.push(I);return x},h={position:"absolute",background:U,zIndex:61,userSelect:"none",touchAction:"none",overflow:"hidden"};return c.jsxs("div",{ref:g,"data-testid":"board-rulers",style:{position:"absolute",inset:0,pointerEvents:"none",zIndex:60},onPointerMove:R,onPointerUp:E,children:[b.map(t=>{const o=u(t.value,t.axis),e=t.axis==="x";return c.jsx("div",{"data-testid":`board-guide-${t.axis}-${t.value}`,title:`${t.axis} = ${t.value} — drag to move, drop on the ruler or double-click to remove`,onPointerDown:S(t),onPointerMove:R,onPointerUp:E,onDoubleClick:()=>G(s,t.id),style:{position:"absolute",pointerEvents:"auto",cursor:e?"col-resize":"row-resize",zIndex:60,...e?{left:o-2,top:0,bottom:0,width:5}:{top:o-2,left:0,right:0,height:5}},children:c.jsx("div",{style:{position:"absolute",background:_,...e?{left:2,top:0,bottom:0,width:1}:{top:2,left:0,right:0,height:1}}})},t.id)}),r&&c.jsx("div",{style:{position:"absolute",background:_,zIndex:62,...r.axis==="x"?{left:r.at,top:0,bottom:0,width:1}:{top:r.at,left:0,right:0,height:1}},children:c.jsx("span",{style:{position:"absolute",...r.axis==="x"?{top:y+4,left:4}:{left:y+4,top:4},fontSize:9,fontFamily:"ui-monospace, monospace",color:_,background:U,padding:"1px 3px",borderRadius:3,whiteSpace:"nowrap"},children:f(r.at,r.axis)})}),c.jsx("div",{"data-testid":"board-ruler-top",onPointerDown:k("y"),style:{...h,top:0,left:y,right:0,height:y,cursor:"row-resize",pointerEvents:"auto"},children:a("x").map(t=>c.jsx("span",{style:{position:"absolute",left:u(t,"x"),bottom:0,borderLeft:`1px solid ${D}`,height:5},children:c.jsx("span",{style:{position:"absolute",left:2,bottom:3,fontSize:8,color:D,fontFamily:"ui-monospace, monospace"},children:W(t)})},t))}),c.jsx("div",{"data-testid":"board-ruler-left",onPointerDown:k("x"),style:{...h,top:y,left:0,bottom:0,width:y,cursor:"col-resize",pointerEvents:"auto"},children:a("y").map(t=>c.jsx("span",{style:{position:"absolute",top:u(t,"y"),right:0,borderTop:`1px solid ${D}`,width:5},children:c.jsx("span",{style:{position:"absolute",top:1,right:3,fontSize:8,color:D,fontFamily:"ui-monospace, monospace",writingMode:"vertical-rl"},children:W(t)})},t))}),c.jsx(Ne,{}),c.jsx("div",{style:{...h,top:0,left:0,width:y,height:y,borderRight:`1px solid ${j.border}`,borderBottom:`1px solid ${j.border}`}})]})}function Ne(){const s=p.useSyncExternalStore(De,je);return s?c.jsxs("button",{type:"button","data-testid":"board-breakpoint-pill",title:"Style edits are scoped to this breakpoint — click to return to Base",onClick:()=>Be(null),style:{position:"absolute",top:y+8,right:12,zIndex:62,pointerEvents:"auto",background:"rgba(18, 22, 26, 0.92)",color:j.accent,border:`1px solid ${j.accent}`,borderRadius:999,fontSize:10,padding:"3px 10px",cursor:"pointer"},children:["@ ",s," · editing this breakpoint — click to clear"]}):null}const Fe="Scene";function Ge({active:s,composite:l,descriptor:n,documentId:b,store:r}){const d=p.useRef(null),g=p.useRef(null),[f]=p.useState(oe),u=n.kind==="canvas",m=u?f:ce;p.useSyncExternalStore(r.subscribe,r.getSnapshot);const k=p.useSyncExternalStore(ne,re),S=p.useSyncExternalStore(se,ae),[R,E]=p.useState(null),a=l.childAdapters().find(x=>x.worldId===n.worldId)?.adapter??R??void 0,h=u&&a?.provenance?.label==="babylon",t=a?.hierarchy.roots()??[],o=new Set(a?.rects?.emptyContainers?.().map(x=>x.id)??[]),e=t.some(x=>!o.has(x.id)),i=Re({surface:u?"Scene":n.kind==="dom"?"UI":"World",rootIds:[n.worldId],playSuspended:r.playState!=="stopped"&&(!a||a.provenance?.source==="boundary"),phase:!a||a.provenance?.source==="boundary"?"loading":"ready",content:!a||a.provenance?.source==="boundary"?"unknown":e?"present":"empty",readiness:k,failures:S,disclosure:a instanceof be?a.disclosure:null});p.useEffect(()=>{if(a)return ie(b,()=>({adapter:a,nodeId:[...r.selectedEntityIds].find(x=>a.hierarchy.node(x))??null}))},[l,a,b,r]),p.useEffect(()=>{const x=d.current;if(x&&!h)return u?he(x,m):ve(x,m)},[m,h,u]),p.useEffect(()=>{if(!s)return;if(!!!g.current&&d.current){g.current=me(d.current,l,r,[n],(Ve,Y)=>E(Y),u?{canvasSceneView:f}:void 0,b);return}let I=0,B=0;const T=()=>{if(I+=1,I<2){B=requestAnimationFrame(T);return}pe(b)};return B=requestAnimationFrame(T),()=>cancelAnimationFrame(B)},[s,f,l,n,b,u,r]),p.useEffect(()=>()=>{g.current?.(),g.current=null},[]);const v=le(de(r),r.selectedEntityIds),w=v?.worldId===n.worldId?v:a?.rects?{worldId:n.worldId,kind:"dom",adapter:a}:null;return c.jsxs("div",{ref:d,"data-testid":`world-document:${n.worldId}`,"data-volter-backdrop-color":s?h?"#111827":u?V:z:void 0,"data-volter-backdrop-policy":s?"dark-frost":void 0,onPointerDown:()=>ue("viewport"),style:{position:"absolute",inset:0,overflow:"hidden",pointerEvents:"auto",backgroundColor:h?"#111827":u?V:z,touchAction:"none"},children:[h?null:u?c.jsx($e,{view:f,documentId:b}):c.jsx(Oe,{}),c.jsx(ze,{...a?{adapter:a}:{},...u&&!h?{view:f,transformModeAware:!0,presentationId:b}:{}},`selection:${N(a)}`),c.jsx(Ee,{explanation:i,testId:`world-surface-status:${n.worldId}`,style:{zIndex:20}}),h?null:u?c.jsx(Me,{active:s,...a?{adapter:a}:{},containerRef:d,view:f,documentId:b},`controls:${N(a)}`):c.jsxs(c.Fragment,{children:[c.jsx(Pe,{docId:n.worldId,containerRef:d}),c.jsx(_e,{containerRef:d,context:w})]})]})}function Oe(){const s=p.useSyncExternalStore(L,X),l=Math.max(8,24*s.zoom),n=Math.max(.7,Math.min(1.4,s.zoom));return c.jsx("div",{"data-testid":"react-design-canvas-backdrop","aria-hidden":"true",style:{position:"absolute",inset:0,pointerEvents:"none",backgroundColor:z,backgroundImage:`radial-gradient(circle, ${ge} ${n}px, transparent ${n}px)`,backgroundPosition:`${s.x}px ${s.y}px`,backgroundSize:`${l}px ${l}px`}})}function gt(s,l){const n=J(),b=l.childAdapters().some(e=>e.role==="world"&&e.kind==="three"),r=l.childAdapters().some(e=>e.kind===xe);!b&&!r&&H(C,{discardDirty:!0});const d=new Set,g=[];let f=!1;for(const e of l.childAdapters())e.role==="world"&&e.kind==="three"&&g.push($(e.worldId,C));const u=fe(l),m=u.find(e=>e.kind==="canvas");m&&g.push($(m.worldId,A));const k=new Set([...l.childAdapters().filter(e=>e.role==="world"&&e.kind==="three"),...m?[m]:[]].map(e=>e.worldId)),S=new Map;function R(){for(const e of u){if(k.has(e.worldId)||S.has(e.worldId))continue;const i=Se(e.kind);if(!i)continue;const v=$(e.worldId,i.documentId),w=Q(e.worldId,()=>i.presence()==="absent"?`Root "${e.worldId}" has no document of its own: its design surface is the project's ${i.title} board (${i.documentId}). ${i.absentReason()}`:null);S.set(e.worldId,()=>{w(),v()})}}g.push(K(e=>{const i=ee();if(i.some(w=>w.descriptor.id===e))return null;const v=ke(e);return v?v.presence()==="absent"?v.absentReason():null:`No workspace document is named "${e}". Open in this session: ${i.map(w=>w.descriptor.id).join(", ")||"(none)"}. A component board is present only when the package that owns its medium says this project has one, so a board id can be absent for this project and present for another.`}));function E(e){const i=v=>c.jsx(Ge,{...v,composite:l,descriptor:e,store:s});Z({id:A,title:Fe,kind:"world",workspaceRole:"authored-subject",provenance:{rootId:e.worldId,...e.path?{sourcePath:e.path}:{}},Content:i,presentation:()=>({kind:"world",id:e.worldId})},{category:"scene",default:!b,rootId:e.worldId})}function a(e){d.add(e.documentId);const i=()=>{d.delete(e.documentId)};try{Promise.resolve(e.install({store:s,composite:l})).catch(i)}catch{i()}}function h(){if(!f){R();for(const e of we()){const i=e.presence();if(i===null)continue;const v=d.has(e.documentId);i==="present"!==v&&(i==="present"?a(e):(P(e.documentId),d.delete(e.documentId)))}}}m&&(E(m),d.add(A)),h();const t=ye(h),o=m?A:[...d][0];return te()||(!b&&o!==void 0&&(n===null||n===C||n===q)?M(o):n?M(n):b&&M(C)),()=>{f=!0,t();for(const e of g)e();for(const e of S.values())e();S.clear();for(const e of d)P(e)}}export{Ge as RootDocumentContent,gt as installRootDocuments};
@@ -1 +1 @@
1
- import{a as i}from"./jsx-runtime-DPjLkJKQ.js";import{EDITOR_LAYER as Xe}from"./editor-layers-BGId-Uru.js";import{cM as Oe,a1 as V,dT as Je,aK as te,cE as G,aL as Q,kA as Ye,dS as Ze,cK as et,a0 as $,g_ as tt,hG as rt,jS as nt,kB as ot,O as j,B as st,bM as at,kC as Se,b$ as it,kD as ct,kE as lt,kF as ut,kG as Ce,kH as xe,ax as x,cm as dt,kI as mt,bU as pt,bZ as ft,kJ as Pe,kK as Ee,kL as je,kM as ht,af as gt,kN as bt,kO as ke,dk as vt,kP as wt,kQ as yt,hd as St,iV as Ct,iW as xt,gJ as Pt,gK as Et,j1 as jt,f_ as kt,f$ as Tt,g0 as At,g1 as Rt}from"./index-Bn8WGRJh.js";import{s as Mt,o as Vt}from"./object3d-document-session-registry-DsJV3XhY.js";import{R as Ot}from"./RootSelectionOverlay-C2jDNhWx.js";import{e as Lt,S as Ft}from"./surface-state-_ZZJugmc.js";import{r as f}from"./index-nmcBqr7Y.js";import{t as It}from"./surface-content-Dg9Kkazf.js";import"./index-CtzuWnCS.js";import{s as zt,d as Te,c as B,t as Wt,p as Le,v as Ae,b as _t,e as Dt,l as Nt,i as $t}from"./camera-authoring-DYjhU5Zp.js";import{c as Gt}from"./performance-profiler-CMbwGBuk.js";import{m as Qt}from"./renderer-ownership-BovSEcLv.js";import{applyWorldRendererConfig as Bt}from"./renderer-config-CaPR4dB_.js";import{getUserData as Fe}from"./user-data-CODoGZqA.js";import{detectKtx2Support as Ht}from"./loader-BTUKnX5Q.js";import{resolveRenderSettings as Ut}from"./render-settings-TEF5i9i9.js";import{createSoftParticleDepthPass as Kt}from"./soft-particle-depth-DNGwWJ8c.js";import{ViewportShadingRenderer as qt}from"./viewport-shading-D9BMDb1N.js";import{applyRendererSettings as Xt,applySceneRenderPipeline as Jt}from"./setup-renderer-CCCYtTqV.js";import{EffectComposer as Yt,EffectPass as Zt,BlendFunction as er,KernelSize as tr,OutlineEffect as rr}from"./index-DHhMOs_s.js";import{W as nr,T as or}from"./three.module-BLhyNg0e.js";import{d as sr}from"./design-time-mount-registry-DUpXCg1U.js";import{a as ar}from"./project-authoring-session-Ck0Fj3Y4.js";import"./three-integration-DxXySCHZ.js";import{registerPresentedCanvasFrame as ir}from"./canvas-preview-frames-BwQjAyYt.js";import{i as cr}from"./editor-presentation-activity-CqJH4G9t.js";import{E as lr,s as ur,a as dr,t as mr,b as pr,c as fr,d as hr,r as gr,i as br}from"./three-viewport-presentation-PqEhvDqp.js";import{a as Z}from"./entity-object-B77fPnTJ.js";import{w as vr}from"./editor-shell-store-DhM6KcjO.js";import{p as wr}from"./viewport-root-presentation-h3E0Xsra.js";import{d as yr}from"./asset-editor-persistence-BVmO7_Y0.js";import{bindStagePresenceMarkers as Sr}from"./stage-presence-markers-BW_-0aHa.js";import{el as Cr,_ as ee,fo as N,d7 as xr,dp as Re}from"./three.core-3arARmh6.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./workspace-arrangement-Dg7zIkwR.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./eyedropper-session-bjPXnfeX.js";import"./layered-pick-Bkf0E_UR.js";import"./root-stacking-BEd9ZvxC.js";import"./react-story-board-C_L09deC.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./inspect-C1HaQduW.js";import"./inference-diagnostics-BPtSODNJ.js";import"./object-marks-BnvSuCTt.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./render-features-C1XRxw0r.js";import"./matcap-texture-Dm2c-VQa.js";import"./defaults-DKiBJCPN.js";import"./edit-mode-authoring-D4gF7ToY.js";import"./host-hierarchy-objects-BV3WqU2w.js";import"./preview-renderer-BrYNFV1p.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./user-data-DX18I5LS.js";import"./model-thumbnail-Dm3TXja5.js";import"./studio-environment-7oYW17Ie.js";import"./three-state-28vYMAez.js";import"./hierarchy-marks-BCrDKK5y.js";import"./component-instance-root-CgmR0Q36.js";import"./three-contract-Dkt6PmWY.js";import"./viewport-door-C_XkG4b1.js";import"./content-bounds-DUlT_Bs_.js";import"./asset-preview-D9R6R903.js";import"./bitmap-label-Ct4k6ehY.js";import"./index-B0ciEDFT.js";import"./standard-viewport-dressing-oljtBXBW.js";import"./clip-planes-CnAI6DZn.js";import"./three-BiLYjlR0.js";import"./model-inspection-Cus72-UK.js";import"./OrbitControls-B13MKuwC.js";import"./LineSegments2-DN9pUfWA.js";import"./three.quarks.esm-C_HmSKXo.js";import"./live-gesture-lock-DJbrjOqf.js";import"./scene-framing-C7Dmipw4.js";import"./live-mixers-B-bwLZ7c.js";import"./output-pass-HurwNl0G.js";import"./Pass-D1MRT672.js";import"./mounted-authoring-Cjmi_MYm.js";import"./collaboration-presence-CiEcKLpo.js";function Pr({previewRef:r}){const{preview:e,previewPinned:s}=B(),[o,c]=f.useState(!1),a=f.useRef(null);if(f.useEffect(()=>{if(!o)return;const u=E=>{a.current?.contains(E.target)||c(!1)};return document.addEventListener("pointerdown",u),()=>document.removeEventListener("pointerdown",u)},[o]),!e)return null;const m=e.camera.isPerspectiveCamera&&Number.isFinite(e.camera.aspect)?e.camera.aspect:16/9;return i.jsxs("div",{className:"volter-camera-preview","data-testid":"camera-preview",children:[i.jsxs(Oe,{className:"volter-camera-preview-header",gap:4,align:"center",children:[i.jsx(V,{icon:Je,size:"sm"}),i.jsx(te,{variant:"label",truncate:!0,className:"volter-camera-preview-title",title:`${e.name} · ${e.lens}`,children:e.name}),i.jsx(G,{text:s?"Unpin camera preview":"Pin camera preview",children:i.jsx(Q,{"aria-label":s?"Unpin camera preview":"Pin camera preview","aria-pressed":s,size:"compact",onClick:Wt,children:i.jsx(V,{icon:Ye,size:"sm"})})}),i.jsxs("div",{ref:a,className:"volter-camera-preview-menu-anchor",children:[i.jsx(G,{text:"Camera actions",children:i.jsx(Q,{"aria-label":"Camera actions","aria-expanded":o,size:"compact",onClick:()=>c(u=>!u),children:i.jsx(V,{icon:Ze,size:"sm"})})}),o?i.jsxs(et,{className:"volter-camera-preview-menu",children:[i.jsx($,{variant:"ghost",size:"compact",disabled:!e.canAuthorPose,title:e.poseRefusal,onClick:()=>{c(!1),Le(e)},children:"Pilot Camera"}),i.jsx($,{variant:"ghost",size:"compact",onClick:()=>{c(!1),Ae(e)},children:"View Through Camera"}),i.jsx($,{variant:"ghost",size:"compact",disabled:!e.canAuthorPose,title:e.poseRefusal,onClick:()=>{c(!1),_t(e)},children:"Align Camera to Current View"})]}):null]})]}),i.jsx("div",{ref:r,className:"volter-camera-preview-image",style:{aspectRatio:String(Math.max(.5,Math.min(3,m)))},role:"img","aria-label":`Live view through ${e.name}`,onDoubleClick:()=>Ae(e)})]})}function Er(){return i.jsxs("div",{className:"volter-camera-guides","aria-hidden":"true",children:[i.jsx("div",{className:"volter-camera-guide volter-camera-guide-v1"}),i.jsx("div",{className:"volter-camera-guide volter-camera-guide-v2"}),i.jsx("div",{className:"volter-camera-guide volter-camera-guide-h1"}),i.jsx("div",{className:"volter-camera-guide volter-camera-guide-h2"}),i.jsx("div",{className:"volter-camera-safe-frame"}),i.jsx("div",{className:"volter-camera-center-mark"})]})}function jr(){const{view:r,guidesVisible:e}=B();if(!r)return null;const s=r.mode==="pilot";return i.jsxs(i.Fragment,{children:[e?i.jsx(Er,{}):null,i.jsx(tt,{variant:"overlay",border:!0,className:"volter-camera-view-banner volter-chrome-island volter-glass-island","data-testid":"camera-view-banner",children:i.jsxs(Oe,{gap:6,align:"center",children:[i.jsx(rt,{children:s?"PILOTING":"CAMERA VIEW"}),i.jsx(te,{variant:"label",children:r.subject.name}),i.jsx(te,{variant:"caption",tone:"muted",children:"Exact camera view"}),i.jsx(G,{text:e?"Hide composition guides":"Show composition guides",children:i.jsx(Q,{"aria-label":e?"Hide composition guides":"Show composition guides","aria-pressed":e,size:"compact",onClick:Dt,children:i.jsx(V,{icon:nt,size:"sm"})})}),s?null:i.jsx($,{size:"compact",variant:"primary",disabled:!r.subject.canAuthorPose,title:r.subject.poseRefusal,onClick:()=>Le(r.subject),children:"Pilot"}),i.jsx(G,{text:"Exit camera view",children:i.jsx(Q,{"aria-label":"Exit camera view",size:"compact",onClick:Nt,children:i.jsx(V,{icon:ot,size:"sm"})})})]})})]})}function kr({previewRef:r}){return f.useSyncExternalStore(zt,Te,Te),i.jsxs(i.Fragment,{children:[i.jsx(Pr,{previewRef:r}),i.jsx(jr,{})]})}function Tr(r){const e=r,s=e.getExtension("EXT_disjoint_timer_query_webgl2"),o=s!==null&&typeof e.createQuery=="function",c=[];let a=null,m=null;return{begin(){!o||a||(a=e.createQuery(),a&&e.beginQuery(s.TIME_ELAPSED_EXT,a))},end(){!o||!a||(e.endQuery(s.TIME_ELAPSED_EXT),c.push(a),a=null)},poll(){if(!o)return null;if(e.getParameter(s.GPU_DISJOINT_EXT)){for(const u of c.splice(0))e.deleteQuery(u);return null}for(;c.length>0;){const u=c[0];if(!e.getQueryParameter(u,e.QUERY_RESULT_AVAILABLE))break;c.shift(),m=e.getQueryParameter(u,e.QUERY_RESULT)/1e6,e.deleteQuery(u)}return m},dispose(){a&&(e.endQuery(s.TIME_ELAPSED_EXT),e.deleteQuery(a),a=null);for(const u of c.splice(0))e.deleteQuery(u)}}}const Ar=2e4,Rr=250,Mr=5e3;class Vr{#e=0;#t=0;#r=0;#n;constructor(e){this.#n=e}get pending(){return this.#e>0||this.#t>0}begin(e,s){this.#e=e+Ar,this.#t=s?e+Mr:0,this.#r=0,this.tick(e)}tick(e){if(!(!this.pending||e<this.#r)){if(this.#r=e+Rr,this.#t>0&&this.#n.seedFromGameCamera()){this.cancel();return}this.#e>0&&this.#n.frameContent()&&(this.#e=0),e>=this.#e&&(this.#e=0),e>=this.#t&&(this.#t=0)}}cancel(){this.#e=0,this.#t=0}}const Me=new WeakMap;function Or(r,e){if(!r)return e(),!0;if(Me.has(r))return!1;try{return e(),!0}catch(s){const o=s instanceof Error?s.message:String(s);return Me.set(r,o),j.warn(`The Scene view cannot draw this world with the editor's own renderer, and has stopped trying: ${o}. This world was built by a copy of three the editor did not make (a vendored bundle pins its own revision), and the editor draws it with ITS three — across a wide enough revision gap the two disagree about the renderer/material contract. The game itself is unaffected and still drawing: its own canvas is what the Game tab and ${st("screenshot")} show, and hierarchy, selection and inspection all still read the live world. It closes when the game resolves \`three\` to the host's instance — a bare, un-rewritten \`import 'three'\` in its own source.`,"ingest"),!1}}function Lr(){const r=at();r.addEventListener("server-log",s=>{try{Se(JSON.parse(s.data))}catch{}});let e=!1;return(async()=>{try{const s=await it();if(e)return;for(const o of s)Se(o)}catch{}})(),()=>{e=!0,r.close()}}const Ie="viewportPose";function Fr(){const r=ct(Ie);return r&&Array.isArray(r.position)&&r.position.length===3&&r.position.every(Number.isFinite)&&Array.isArray(r.target)&&r.target.length===3&&r.target.every(Number.isFinite)?r:null}function Ir(r,e){lt(Ie,{position:[r.position.x,r.position.y,r.position.z],target:[e.x,e.y,e.z]})}const Ve={id:"world",title:"World",lights:[{color:"#ffffff",intensity:1,direction:[-10,-20,-10],space:"world"}],ambient:{color:"#ffffff",intensity:.5},environmentIntensity:0};yt(Ve),St("world",{all:{lighting:{source:"studio",studioPreset:Ve.id,auto:{takeover:["light"],overridable:!0}}}});function zr(r,e,s){const o=document.createElement("canvas");o.setAttribute("aria-label",`${s} authoring viewport`),o.setAttribute("data-testid","editor-canvas"),o.setAttribute("aria-hidden","true"),o.tabIndex=-1,o.style.width="100%",o.style.height="100%",o.style.display="block",o.style.pointerEvents="auto",r.appendChild(o);const c=Math.max(1,e.clientWidth),a=Math.max(1,e.clientHeight),m=Math.min(window.devicePixelRatio||1,2);o.width=Math.ceil(c*m),o.height=Math.ceil(a*m);const u=Qt(new nr({canvas:o,antialias:!!Ut(void 0).antialias,powerPreference:"high-performance"}));return Xt(u,void 0,m),u.setSize(c,a),u.shadowMap.type=xr,u.info.autoReset=!1,Ht(u),{canvas:o,renderer:u,lease:null}}async function Wr(r){const e=pt(r.source,r.id);if(e)return e;let s=r.url,o=r.format??"gltf",c=r.includes;if(!s){const u=(await ft(r.source,r.id))[0];if(!u)return j.error(`No downloadable files for ${r.name}.`,"asset"),null;s=u.url,o=u.format,c=u.includes}const a={source:r.source,id:r.id,name:r.name,url:s,format:o};c&&(a.includes=c);const m=await yr(a);return m.ok&&m.path?`/${m.path}`:(j.error(`Could not download ${r.name}.`,"asset"),null)}function _r(r){if(r.isCamera)return r;const e=Fe(r,"_camera");return e?.isCamera?e:null}function Dr(r){const e=r;if(e.isPerspectiveCamera)return`${e.fov.toFixed(0)}° perspective`;const s=r;return s.isOrthographicCamera?`Orthographic · ${s.zoom.toFixed(2)}×`:r.type}function Nr(r,e){const s=r.transforms;if(!s)return{canAuthorPose:!1,poseRefusal:"This camera has no transform authoring path."};const o=s.editability?.(e,"position")??{writable:!0},c=s.editability?.(e,"rotation")??{writable:!0};return o.writable&&c.writable?{canAuthorPose:!0}:{canAuthorPose:!1,poseRefusal:o.reason??c.reason??"This camera pose is read-only."}}function $r(r,e,s){const o=e.get(s)??null;if(!o)return null;const c=_r(o);return c?{id:s,name:o.name||c.name||"Camera",camera:c,lens:Dr(c),...Nr(r,s)}:null}function Gr(r){const e=new Map;for(const[s,o]of r.objectMap){const c=Fe(o,"tags");Array.isArray(c)&&c.length>0&&e.set(s,c)}return e}function Qr(r){const{store:e,documentId:s,container:o,canvas:c,renderer:a,stats:m}=r,u=new Yt(a),E=Kt(),O=new qt,g=Gt(),L=Tr(a.getContext()),ze=t=>{g.enabled&&L.begin();try{t()}finally{L.end()}},We=()=>g.enabled?L.poll():null,_e=ut({id:s,label:"Scene viewport",kind:"scene",profiler:g}),b=new Cr,re=11184810;let H=Ce(c).background??re;b.background=new ee(H);const De=xe(c,()=>{const t=Ce(c).background??re,l=b.background;l instanceof ee&&l.getHex()===H&&(b.background=new ee(t)),H=t});e.bindScene(b,a);const n=new lr(c,b,e,o,{renderer:a,onlineAssetResolver:Wr,onProjectionChange:ur}),Ne=n.bindPresentation(s,"world");e.bindScene(b,a,n.batchedRenderer,n.camera),e.setOrbitTarget(n.orbitControls.target);const U=new N,F=new N,ne=new N,oe=()=>{const t=n.renderCamera;t.getWorldPosition(U),n.cameraViewMode==="pilot"?F.copy(n.orbitControls.target):n.cameraViewMode?(t.getWorldDirection(ne),F.copy(U).add(ne.multiplyScalar(10))):F.copy(n.orbitControls.target);const l=t.fov;return{position:U,target:F,fov:typeof l=="number"?l:0}},k=Sr({scene:b,store:e,documentId:s,container:o,canvas:c,viewport:n,readVisibleCameraPose:oe});let se="",K=null,h=null,S=null,I=null;const ae=()=>{h&&fr(h,ke(a.domElement))},$e=xe(a.domElement,ae),ie=()=>{if(!h)return;const t=x(e.shell),l=[...e.shell.selectedEntityIds].filter(d=>t.hierarchy.node(d)!==null).map(d=>Z(t,e.objectMap,d)).filter(d=>d!==null);hr(h,l);const p=h.selection.size>0;S&&(S.enabled=p,S.renderToScreen=p),I&&(I.renderToScreen=!p)};function T(){bt(e.shell),K?.(),K=null,h&&gr(a,h,S),h=null,S=null,I=null,Jt(u,a,e.scene??b,n.renderCamera,void 0,{basePixelRatio:Math.min(window.devicePixelRatio||1,2),objectMap:e.objectMap,entityTags:Gr(e)}),h=pr({BlendFunction:er,KernelSize:tr,OutlineEffect:rr},a,e.scene??b,n.renderCamera,ke(a.domElement)),ae(),I=u.passes.at(-1)??null,S=new Zt(n.renderCamera,h),S.enabled=!1,u.addPass(S),ie();const t=e.adoptedImageConfig;t&&(K=Bt(or,a,t))}const ce=()=>{n.setProjection(mr().projection),e.setViewportCamera(n.freeCamera),T()},Ge=dr(ce);ce();const q=t=>$r(x(e.shell),e.objectMap,t);let v=null;const A=()=>{v&&(je(x(e.shell),v),v=null)},le=()=>{const t=B().view;t?.mode!=="pilot"||!t.subject.canAuthorPose||(v=t.subject.id,Pe(x(e.shell),v))},ue=()=>{if(!v||n.cameraViewMode!=="pilot")return;const t=q(v),l=x(e.shell),p=l.transforms;if(!t||!p)return;let d;try{d=p.get(v)}catch(w){j.error(w instanceof Error?w.message:String(w),"camera-authoring"),A();return}Ee(l,v,{position:t.camera.position.toArray(),rotation:t.camera.quaternion.toArray(),scale:d.scale}),e.shell.notifyIngestEdit()};n.orbitControls.addEventListener("start",le),n.orbitControls.addEventListener("change",ue),n.orbitControls.addEventListener("end",A);const Qe=$t({active:()=>e.shell.playState==="stopped"&&e.shell.activeViewportTab==="edit",selected:()=>{const t=e.shell.selectedEntityId;return t?q(t):null},resolve:q,showView:(t,l)=>{A(),n.setCameraView(t.camera,l),T(),k.reportCamera()},leaveView:()=>{A(),n.clearCameraView(),T(),k.reportCamera()},alignToViewport:t=>{const l=x(e.shell),p=l.transforms;if(!p||!t.canAuthorPose)return;const d=e.objectMap.get(t.id)??null;if(!d)return;const w=n.camera.getWorldPosition(new N),C=n.camera.getWorldQuaternion(new Re),y=w.clone(),R=C.clone();if(d.parent){d.parent.updateWorldMatrix(!0,!1),d.parent.worldToLocal(y);const M=d.parent.getWorldQuaternion(new Re);R.premultiply(M.invert())}let ye;try{ye=p.get(t.id)}catch(M){j.error(M instanceof Error?M.message:String(M),"camera-authoring");return}Pe(l,t.id),Ee(l,t.id,{position:y.toArray(),rotation:R.toArray(),scale:ye.scale}),e.shell.notifyIngestEdit(),je(l,t.id)},subscribe:e.shell.subscribe});let de=null;const me=()=>{const t=ht(e.shell);t!==de&&(de=t,c.style.opacity=t?"1":"0",o.style.backgroundColor=t?"":gt.surface.raised,o.style.backgroundImage=t?"":"linear-gradient(45deg, #444649 25%, transparent 25%, transparent 75%, #444649 75%), linear-gradient(45deg, #444649 25%, transparent 25%, transparent 75%, #444649 75%)",o.style.backgroundPosition=t?"":"0 0, 8px 8px",o.style.backgroundSize=t?"":"16px 16px")};me();let pe=e.composerVersion;const Be=e.shell.subscribe(()=>{me();const t=e.scene;t&&t!==n.currentScene&&n.setScene(t),n.objectMap=e.objectMap,n.syncFromStore(),e.composerVersion!==pe?(pe=e.composerVersion,T()):ie()});let z=null;const X=new Vr({seedFromGameCamera:()=>{const t=z?.()??null;return!!t&&n.seedFromGameCamera(t)},frameContent:()=>n.focusOnScene()}),fe=()=>{X.cancel(),z=null};n.orbitControls.addEventListener("start",fe);const he=()=>Ir(n.camera,n.orbitControls.target);n.orbitControls.addEventListener("end",he);const He=e.shell.onViewportAction(t=>{switch(t.type){case"focus-entity":{const l=Z(x(e.shell),e.objectMap,t.id);l&&n.focusOn(l);break}case"focus-scene":{{const l=Fr();if(l){n.camera.position.set(...l.position),n.orbitControls.target.set(...l.target),n.orbitControls.update();break}}z=e.sceneCameraLookup,X.begin(performance.now(),z!==null);break}case"focus-selection":{const l=x(e.shell),p=[...e.shell.selectedEntityIds].map(d=>Z(l,e.objectMap,d)).filter(d=>d!==null);n.focusOnMultiple(p);break}case"snap-selection-to-floor":n.snapSelectionToFloor();break;case"set-view-preset":n.setViewPreset(t.preset);break;case"step-view":n.stepView(t.step);break;case"frame-all":n.focusOnScene();break;case"zoom-view":n.zoomStep(t.direction);break;case"set-camera-pose":n.setPose(t.position,t.target,t.fov);break}});Lr();const ge=new ResizeObserver(()=>{const t=Math.max(1,o.clientWidth),l=Math.max(1,o.clientHeight);a.setSize(t,l),u.setSize(t,l),n.resize(t,l)});ge.observe(o);let W=performance.now(),_=!0,P=!1,be=!1;function ve(t){return Or(n.currentScene,()=>{E.render(a,n.currentScene,n.renderCamera),n.renderWithInfrastructure(()=>{vr(n.currentScene,()=>O.render(n.currentScene,e.shadingMode,()=>u.render(t),br)),n.renderViewCube(a),n.renderCameraPreview(a,B().preview?.camera??null,r.cameraPreview())})})}const Ue=ir(c,async()=>{if(P||!cr()||!o.checkVisibility({visibilityProperty:!0,checkVisibilityCSS:!0})||!ve(0))return null;const t=document.createElement("canvas");return t.width=c.width,t.height=c.height,t.getContext("2d").drawImage(c,0,0),t}),J=()=>wt(e.shell)===e.shell;function Ke(t,l){if(P)return;if(l&&(W=t),!o.checkVisibility({visibilityProperty:!0,checkVisibilityCSS:!0})){W=t,_=!0;return}g.beginFrame();const p=t-W,d=p/1e3;J()&&(m.frameTime=p,m.fps=1e3/p),W=t,k.syncMarkers(d),X.tick(t),g.beginPhase(),n.update(d),r.runFrame(d),n.batchedRenderer.update(d),g.endPhase("editor"),g.beginPhase(),a.info.reset(),ze(()=>{ve(d)}),g.reportRender({gpuMs:We(),drawCalls:a.info.render.calls,triangles:a.info.render.triangles,geometries:a.info.memory.geometries,textures:a.info.memory.textures}),g.endPhase("render"),J()&&(m.drawCalls=a.info.render.calls,m.triangles=a.info.render.triangles),_&&be&&(_=!1,vt(s)),g.endFrame();const w=oe(),C=w.position,y=w.target;J()&&(m.cameraPosition.x=C.x,m.cameraPosition.y=C.y,m.cameraPosition.z=C.z,m.cameraTarget.x=y.x,m.cameraTarget.y=y.y,m.cameraTarget.z=y.z);const R=`${C.x},${C.y},${C.z},${y.x},${y.y},${y.z},${w.fov}`;R!==se&&(se=R,k.reportCamera())}n.objectMap=e.objectMap,n.syncFromStore(),T();let Y,D;async function qe(t){if(P)return;r.onMountStatus("mounting"),D?.(),D=void 0,Y=t,r.onRootIds(t.childAdapters().filter(d=>d.role==="world"&&d.kind==="three").map(d=>d.worldId));const l=sr("three");if(P||Y!==t)return;const p=l?await l.mountWorldRootSession({store:e,composite:t,renderer:a}):()=>{};if(P||Y!==t){p();return}D=p,P||r.onMountStatus("ready")}const we=ar(e.shell,qe);return we.ready.then(()=>dt(mt(e.shell))).catch(t=>{j.error(`Editor boot failed: ${t instanceof Error?t.message:String(t)}`,"scene"),r.onMountStatus("ready")}).finally(()=>{be=!0,_=!0}),{scene:b,viewport:n,frame:Ke,present:t=>wr(e,t),setHelper:(t,l)=>n.setHelper(t,l),dispose:()=>{P=!0,_e(),Ue(),ge.disconnect(),Be(),He(),Qe(),n.orbitControls.removeEventListener("start",le),n.orbitControls.removeEventListener("change",ue),n.orbitControls.removeEventListener("end",A),n.orbitControls.removeEventListener("start",fe),n.orbitControls.removeEventListener("end",he),we.dispose(),D?.(),k.dispose(),O.dispose(),L.dispose(),Ge(),$e(),De(),Ne(),h?.selection.clear(),E.dispose(),u.dispose()}}}function Br({store:r,rootIds:e,mountStatus:s}){f.useSyncExternalStore(r.shell.subscribe,r.shell.getSnapshot);const o=f.useSyncExternalStore(kt,Tt),c=f.useSyncExternalStore(At,Rt),a=r.scene?.background,m=a!==null&&!(a?.isColor===!0&&a.getHex()===11184810),u=f.useMemo(()=>!!(r.scene&&It(r.scene,{includeBackground:!1,ignoredLayer:Xe})),[r.scene,r.shell.contentVersion]),E=!!(r.scene&&(m||u)),O=Lt({surface:"Scene",rootIds:e,phase:s==="mounting"?"loading":"ready",content:E?"present":s==="mounting"?"unknown":"empty",readiness:o,failures:c});return i.jsx(Ft,{explanation:O,testId:"scene-viewport-status"})}function Hr({store:r,documentId:e,cameraPreviewRef:s,mountStatus:o,rootIds:c}){f.useSyncExternalStore(r.shell.subscribe,r.shell.getShellSnapshot??r.shell.getSnapshot),f.useSyncExternalStore(Ct,xt),f.useSyncExternalStore(Mt,Vt),f.useSyncExternalStore(Pt,Et);const a=jt(r.shell,e,"document");return i.jsxs(i.Fragment,{children:[a.surface!==null?i.jsx(Ot,{}):null,a.surface==="three"?i.jsx(kr,{previewRef:s}):null,i.jsx(Br,{store:r,rootIds:c,mountStatus:o})]})}const ko={mountWorldRootSurface:zr,installWorldRootStage:Qr,Overlays:Hr};export{ko as worldRootStageBinding};
1
+ import{a as i}from"./jsx-runtime-DPjLkJKQ.js";import{EDITOR_LAYER as Xe}from"./editor-layers-hAcvLPMn.js";import{cM as Oe,a1 as V,dT as Je,aK as te,cE as G,aL as Q,kA as Ye,dS as Ze,cK as et,a0 as $,g_ as tt,hG as rt,jS as nt,kB as ot,O as j,B as st,bM as at,kC as Se,b$ as it,kD as ct,kE as lt,kF as ut,kG as Ce,kH as xe,ax as x,cm as dt,kI as mt,bU as pt,bZ as ft,kJ as Pe,kK as Ee,kL as je,kM as ht,af as gt,kN as bt,kO as ke,dk as vt,kP as wt,kQ as yt,hd as St,iV as Ct,iW as xt,gJ as Pt,gK as Et,j1 as jt,f_ as kt,f$ as Tt,g0 as At,g1 as Rt}from"./index-CWR8N1pt.js";import{s as Mt,o as Vt}from"./object3d-document-session-registry-B8HFpoFw.js";import{R as Ot}from"./RootSelectionOverlay-C5bcCIxc.js";import{e as Lt,S as Ft}from"./surface-state-DKi9MDjb.js";import{r as f}from"./index-nmcBqr7Y.js";import{t as It}from"./surface-content-Dg9Kkazf.js";import"./index-CtzuWnCS.js";import{s as zt,d as Te,c as B,t as Wt,p as Le,v as Ae,b as _t,e as Dt,l as Nt,i as $t}from"./camera-authoring-DYjhU5Zp.js";import{c as Gt}from"./performance-profiler-CMbwGBuk.js";import{m as Qt}from"./renderer-ownership-BovSEcLv.js";import{applyWorldRendererConfig as Bt}from"./renderer-config-CaPR4dB_.js";import{getUserData as Fe}from"./user-data-CODoGZqA.js";import{detectKtx2Support as Ht}from"./loader-BTUKnX5Q.js";import{resolveRenderSettings as Ut}from"./render-settings-BjcdKCfd.js";import{createSoftParticleDepthPass as Kt}from"./soft-particle-depth-DNGwWJ8c.js";import{ViewportShadingRenderer as qt}from"./viewport-shading-D9BMDb1N.js";import{applyRendererSettings as Xt,applySceneRenderPipeline as Jt}from"./setup-renderer-CJwc7fKC.js";import{EffectComposer as Yt,EffectPass as Zt,BlendFunction as er,KernelSize as tr,OutlineEffect as rr}from"./index-DHhMOs_s.js";import{W as nr,T as or}from"./three.module-BLhyNg0e.js";import{d as sr}from"./design-time-mount-registry-DUpXCg1U.js";import{a as ar}from"./project-authoring-session-dtUdDaEF.js";import"./three-integration-Cn9aysL2.js";import{registerPresentedCanvasFrame as ir}from"./canvas-preview-frames-BcRr18uI.js";import{i as cr}from"./editor-presentation-activity-CqJH4G9t.js";import{E as lr,s as ur,a as dr,t as mr,b as pr,c as fr,d as hr,r as gr,i as br}from"./three-viewport-presentation-25xuss6W.js";import{a as Z}from"./entity-object-DR7d2cxz.js";import{w as vr}from"./editor-shell-store-DkNOWUFp.js";import{p as wr}from"./viewport-root-presentation-CQ7jhPEd.js";import{d as yr}from"./asset-editor-persistence-0u6_ZcxG.js";import{bindStagePresenceMarkers as Sr}from"./stage-presence-markers-pGfG8Ga3.js";import{el as Cr,_ as ee,fo as N,d7 as xr,dp as Re}from"./three.core-3arARmh6.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./workspace-arrangement-Dyq55Dxr.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./eyedropper-session-bjPXnfeX.js";import"./layered-pick-Dntz2X63.js";import"./root-stacking-BEd9ZvxC.js";import"./react-story-board-ClnkbDTi.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./inspect-DYloFXZZ.js";import"./inference-diagnostics-GP--Nnde.js";import"./object-marks-BnvSuCTt.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./render-features-B492w-Yf.js";import"./matcap-texture-Dm2c-VQa.js";import"./defaults-DKiBJCPN.js";import"./edit-mode-authoring-DgXUzfvm.js";import"./host-hierarchy-objects-BV3WqU2w.js";import"./preview-renderer-BrYNFV1p.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./user-data-DjFdlyHN.js";import"./model-thumbnail-iK5a9are.js";import"./studio-environment-C79giSrc.js";import"./three-state-BlAc2cU5.js";import"./hierarchy-marks--TolmVW5.js";import"./component-instance-root-UahhIVd1.js";import"./three-contract-Dkt6PmWY.js";import"./viewport-door-Dh7IGceC.js";import"./content-bounds-CMk1llDT.js";import"./asset-preview-C0yI3iVN.js";import"./bitmap-label-Ct4k6ehY.js";import"./index-B778_TTn.js";import"./standard-viewport-dressing-XRUmVcY2.js";import"./clip-planes-CnAI6DZn.js";import"./three-fHebWwy_.js";import"./model-inspection-tw_q6BVp.js";import"./OrbitControls-B13MKuwC.js";import"./LineSegments2-DN9pUfWA.js";import"./three.quarks.esm-C_HmSKXo.js";import"./live-gesture-lock-DJbrjOqf.js";import"./scene-framing-Cc0t4Ghk.js";import"./live-mixers-B-bwLZ7c.js";import"./output-pass-HurwNl0G.js";import"./Pass-D1MRT672.js";import"./mounted-authoring-DxwkC5eG.js";import"./collaboration-presence-DBHNcl_z.js";function Pr({previewRef:r}){const{preview:e,previewPinned:s}=B(),[o,c]=f.useState(!1),a=f.useRef(null);if(f.useEffect(()=>{if(!o)return;const u=E=>{a.current?.contains(E.target)||c(!1)};return document.addEventListener("pointerdown",u),()=>document.removeEventListener("pointerdown",u)},[o]),!e)return null;const m=e.camera.isPerspectiveCamera&&Number.isFinite(e.camera.aspect)?e.camera.aspect:16/9;return i.jsxs("div",{className:"volter-camera-preview","data-testid":"camera-preview",children:[i.jsxs(Oe,{className:"volter-camera-preview-header",gap:4,align:"center",children:[i.jsx(V,{icon:Je,size:"sm"}),i.jsx(te,{variant:"label",truncate:!0,className:"volter-camera-preview-title",title:`${e.name} · ${e.lens}`,children:e.name}),i.jsx(G,{text:s?"Unpin camera preview":"Pin camera preview",children:i.jsx(Q,{"aria-label":s?"Unpin camera preview":"Pin camera preview","aria-pressed":s,size:"compact",onClick:Wt,children:i.jsx(V,{icon:Ye,size:"sm"})})}),i.jsxs("div",{ref:a,className:"volter-camera-preview-menu-anchor",children:[i.jsx(G,{text:"Camera actions",children:i.jsx(Q,{"aria-label":"Camera actions","aria-expanded":o,size:"compact",onClick:()=>c(u=>!u),children:i.jsx(V,{icon:Ze,size:"sm"})})}),o?i.jsxs(et,{className:"volter-camera-preview-menu",children:[i.jsx($,{variant:"ghost",size:"compact",disabled:!e.canAuthorPose,title:e.poseRefusal,onClick:()=>{c(!1),Le(e)},children:"Pilot Camera"}),i.jsx($,{variant:"ghost",size:"compact",onClick:()=>{c(!1),Ae(e)},children:"View Through Camera"}),i.jsx($,{variant:"ghost",size:"compact",disabled:!e.canAuthorPose,title:e.poseRefusal,onClick:()=>{c(!1),_t(e)},children:"Align Camera to Current View"})]}):null]})]}),i.jsx("div",{ref:r,className:"volter-camera-preview-image",style:{aspectRatio:String(Math.max(.5,Math.min(3,m)))},role:"img","aria-label":`Live view through ${e.name}`,onDoubleClick:()=>Ae(e)})]})}function Er(){return i.jsxs("div",{className:"volter-camera-guides","aria-hidden":"true",children:[i.jsx("div",{className:"volter-camera-guide volter-camera-guide-v1"}),i.jsx("div",{className:"volter-camera-guide volter-camera-guide-v2"}),i.jsx("div",{className:"volter-camera-guide volter-camera-guide-h1"}),i.jsx("div",{className:"volter-camera-guide volter-camera-guide-h2"}),i.jsx("div",{className:"volter-camera-safe-frame"}),i.jsx("div",{className:"volter-camera-center-mark"})]})}function jr(){const{view:r,guidesVisible:e}=B();if(!r)return null;const s=r.mode==="pilot";return i.jsxs(i.Fragment,{children:[e?i.jsx(Er,{}):null,i.jsx(tt,{variant:"overlay",border:!0,className:"volter-camera-view-banner volter-chrome-island volter-glass-island","data-testid":"camera-view-banner",children:i.jsxs(Oe,{gap:6,align:"center",children:[i.jsx(rt,{children:s?"PILOTING":"CAMERA VIEW"}),i.jsx(te,{variant:"label",children:r.subject.name}),i.jsx(te,{variant:"caption",tone:"muted",children:"Exact camera view"}),i.jsx(G,{text:e?"Hide composition guides":"Show composition guides",children:i.jsx(Q,{"aria-label":e?"Hide composition guides":"Show composition guides","aria-pressed":e,size:"compact",onClick:Dt,children:i.jsx(V,{icon:nt,size:"sm"})})}),s?null:i.jsx($,{size:"compact",variant:"primary",disabled:!r.subject.canAuthorPose,title:r.subject.poseRefusal,onClick:()=>Le(r.subject),children:"Pilot"}),i.jsx(G,{text:"Exit camera view",children:i.jsx(Q,{"aria-label":"Exit camera view",size:"compact",onClick:Nt,children:i.jsx(V,{icon:ot,size:"sm"})})})]})})]})}function kr({previewRef:r}){return f.useSyncExternalStore(zt,Te,Te),i.jsxs(i.Fragment,{children:[i.jsx(Pr,{previewRef:r}),i.jsx(jr,{})]})}function Tr(r){const e=r,s=e.getExtension("EXT_disjoint_timer_query_webgl2"),o=s!==null&&typeof e.createQuery=="function",c=[];let a=null,m=null;return{begin(){!o||a||(a=e.createQuery(),a&&e.beginQuery(s.TIME_ELAPSED_EXT,a))},end(){!o||!a||(e.endQuery(s.TIME_ELAPSED_EXT),c.push(a),a=null)},poll(){if(!o)return null;if(e.getParameter(s.GPU_DISJOINT_EXT)){for(const u of c.splice(0))e.deleteQuery(u);return null}for(;c.length>0;){const u=c[0];if(!e.getQueryParameter(u,e.QUERY_RESULT_AVAILABLE))break;c.shift(),m=e.getQueryParameter(u,e.QUERY_RESULT)/1e6,e.deleteQuery(u)}return m},dispose(){a&&(e.endQuery(s.TIME_ELAPSED_EXT),e.deleteQuery(a),a=null);for(const u of c.splice(0))e.deleteQuery(u)}}}const Ar=2e4,Rr=250,Mr=5e3;class Vr{#e=0;#t=0;#r=0;#n;constructor(e){this.#n=e}get pending(){return this.#e>0||this.#t>0}begin(e,s){this.#e=e+Ar,this.#t=s?e+Mr:0,this.#r=0,this.tick(e)}tick(e){if(!(!this.pending||e<this.#r)){if(this.#r=e+Rr,this.#t>0&&this.#n.seedFromGameCamera()){this.cancel();return}this.#e>0&&this.#n.frameContent()&&(this.#e=0),e>=this.#e&&(this.#e=0),e>=this.#t&&(this.#t=0)}}cancel(){this.#e=0,this.#t=0}}const Me=new WeakMap;function Or(r,e){if(!r)return e(),!0;if(Me.has(r))return!1;try{return e(),!0}catch(s){const o=s instanceof Error?s.message:String(s);return Me.set(r,o),j.warn(`The Scene view cannot draw this world with the editor's own renderer, and has stopped trying: ${o}. This world was built by a copy of three the editor did not make (a vendored bundle pins its own revision), and the editor draws it with ITS three — across a wide enough revision gap the two disagree about the renderer/material contract. The game itself is unaffected and still drawing: its own canvas is what the Game tab and ${st("screenshot")} show, and hierarchy, selection and inspection all still read the live world. It closes when the game resolves \`three\` to the host's instance — a bare, un-rewritten \`import 'three'\` in its own source.`,"ingest"),!1}}function Lr(){const r=at();r.addEventListener("server-log",s=>{try{Se(JSON.parse(s.data))}catch{}});let e=!1;return(async()=>{try{const s=await it();if(e)return;for(const o of s)Se(o)}catch{}})(),()=>{e=!0,r.close()}}const Ie="viewportPose";function Fr(){const r=ct(Ie);return r&&Array.isArray(r.position)&&r.position.length===3&&r.position.every(Number.isFinite)&&Array.isArray(r.target)&&r.target.length===3&&r.target.every(Number.isFinite)?r:null}function Ir(r,e){lt(Ie,{position:[r.position.x,r.position.y,r.position.z],target:[e.x,e.y,e.z]})}const Ve={id:"world",title:"World",lights:[{color:"#ffffff",intensity:1,direction:[-10,-20,-10],space:"world"}],ambient:{color:"#ffffff",intensity:.5},environmentIntensity:0};yt(Ve),St("world",{all:{lighting:{source:"studio",studioPreset:Ve.id,auto:{takeover:["light"],overridable:!0}}}});function zr(r,e,s){const o=document.createElement("canvas");o.setAttribute("aria-label",`${s} authoring viewport`),o.setAttribute("data-testid","editor-canvas"),o.setAttribute("aria-hidden","true"),o.tabIndex=-1,o.style.width="100%",o.style.height="100%",o.style.display="block",o.style.pointerEvents="auto",r.appendChild(o);const c=Math.max(1,e.clientWidth),a=Math.max(1,e.clientHeight),m=Math.min(window.devicePixelRatio||1,2);o.width=Math.ceil(c*m),o.height=Math.ceil(a*m);const u=Qt(new nr({canvas:o,antialias:!!Ut(void 0).antialias,powerPreference:"high-performance"}));return Xt(u,void 0,m),u.setSize(c,a),u.shadowMap.type=xr,u.info.autoReset=!1,Ht(u),{canvas:o,renderer:u,lease:null}}async function Wr(r){const e=pt(r.source,r.id);if(e)return e;let s=r.url,o=r.format??"gltf",c=r.includes;if(!s){const u=(await ft(r.source,r.id))[0];if(!u)return j.error(`No downloadable files for ${r.name}.`,"asset"),null;s=u.url,o=u.format,c=u.includes}const a={source:r.source,id:r.id,name:r.name,url:s,format:o};c&&(a.includes=c);const m=await yr(a);return m.ok&&m.path?`/${m.path}`:(j.error(`Could not download ${r.name}.`,"asset"),null)}function _r(r){if(r.isCamera)return r;const e=Fe(r,"_camera");return e?.isCamera?e:null}function Dr(r){const e=r;if(e.isPerspectiveCamera)return`${e.fov.toFixed(0)}° perspective`;const s=r;return s.isOrthographicCamera?`Orthographic · ${s.zoom.toFixed(2)}×`:r.type}function Nr(r,e){const s=r.transforms;if(!s)return{canAuthorPose:!1,poseRefusal:"This camera has no transform authoring path."};const o=s.editability?.(e,"position")??{writable:!0},c=s.editability?.(e,"rotation")??{writable:!0};return o.writable&&c.writable?{canAuthorPose:!0}:{canAuthorPose:!1,poseRefusal:o.reason??c.reason??"This camera pose is read-only."}}function $r(r,e,s){const o=e.get(s)??null;if(!o)return null;const c=_r(o);return c?{id:s,name:o.name||c.name||"Camera",camera:c,lens:Dr(c),...Nr(r,s)}:null}function Gr(r){const e=new Map;for(const[s,o]of r.objectMap){const c=Fe(o,"tags");Array.isArray(c)&&c.length>0&&e.set(s,c)}return e}function Qr(r){const{store:e,documentId:s,container:o,canvas:c,renderer:a,stats:m}=r,u=new Yt(a),E=Kt(),O=new qt,g=Gt(),L=Tr(a.getContext()),ze=t=>{g.enabled&&L.begin();try{t()}finally{L.end()}},We=()=>g.enabled?L.poll():null,_e=ut({id:s,label:"Scene viewport",kind:"scene",profiler:g}),b=new Cr,re=11184810;let H=Ce(c).background??re;b.background=new ee(H);const De=xe(c,()=>{const t=Ce(c).background??re,l=b.background;l instanceof ee&&l.getHex()===H&&(b.background=new ee(t)),H=t});e.bindScene(b,a);const n=new lr(c,b,e,o,{renderer:a,onlineAssetResolver:Wr,onProjectionChange:ur}),Ne=n.bindPresentation(s,"world");e.bindScene(b,a,n.batchedRenderer,n.camera),e.setOrbitTarget(n.orbitControls.target);const U=new N,F=new N,ne=new N,oe=()=>{const t=n.renderCamera;t.getWorldPosition(U),n.cameraViewMode==="pilot"?F.copy(n.orbitControls.target):n.cameraViewMode?(t.getWorldDirection(ne),F.copy(U).add(ne.multiplyScalar(10))):F.copy(n.orbitControls.target);const l=t.fov;return{position:U,target:F,fov:typeof l=="number"?l:0}},k=Sr({scene:b,store:e,documentId:s,container:o,canvas:c,viewport:n,readVisibleCameraPose:oe});let se="",K=null,h=null,S=null,I=null;const ae=()=>{h&&fr(h,ke(a.domElement))},$e=xe(a.domElement,ae),ie=()=>{if(!h)return;const t=x(e.shell),l=[...e.shell.selectedEntityIds].filter(d=>t.hierarchy.node(d)!==null).map(d=>Z(t,e.objectMap,d)).filter(d=>d!==null);hr(h,l);const p=h.selection.size>0;S&&(S.enabled=p,S.renderToScreen=p),I&&(I.renderToScreen=!p)};function T(){bt(e.shell),K?.(),K=null,h&&gr(a,h,S),h=null,S=null,I=null,Jt(u,a,e.scene??b,n.renderCamera,void 0,{basePixelRatio:Math.min(window.devicePixelRatio||1,2),objectMap:e.objectMap,entityTags:Gr(e)}),h=pr({BlendFunction:er,KernelSize:tr,OutlineEffect:rr},a,e.scene??b,n.renderCamera,ke(a.domElement)),ae(),I=u.passes.at(-1)??null,S=new Zt(n.renderCamera,h),S.enabled=!1,u.addPass(S),ie();const t=e.adoptedImageConfig;t&&(K=Bt(or,a,t))}const ce=()=>{n.setProjection(mr().projection),e.setViewportCamera(n.freeCamera),T()},Ge=dr(ce);ce();const q=t=>$r(x(e.shell),e.objectMap,t);let v=null;const A=()=>{v&&(je(x(e.shell),v),v=null)},le=()=>{const t=B().view;t?.mode!=="pilot"||!t.subject.canAuthorPose||(v=t.subject.id,Pe(x(e.shell),v))},ue=()=>{if(!v||n.cameraViewMode!=="pilot")return;const t=q(v),l=x(e.shell),p=l.transforms;if(!t||!p)return;let d;try{d=p.get(v)}catch(w){j.error(w instanceof Error?w.message:String(w),"camera-authoring"),A();return}Ee(l,v,{position:t.camera.position.toArray(),rotation:t.camera.quaternion.toArray(),scale:d.scale}),e.shell.notifyIngestEdit()};n.orbitControls.addEventListener("start",le),n.orbitControls.addEventListener("change",ue),n.orbitControls.addEventListener("end",A);const Qe=$t({active:()=>e.shell.playState==="stopped"&&e.shell.activeViewportTab==="edit",selected:()=>{const t=e.shell.selectedEntityId;return t?q(t):null},resolve:q,showView:(t,l)=>{A(),n.setCameraView(t.camera,l),T(),k.reportCamera()},leaveView:()=>{A(),n.clearCameraView(),T(),k.reportCamera()},alignToViewport:t=>{const l=x(e.shell),p=l.transforms;if(!p||!t.canAuthorPose)return;const d=e.objectMap.get(t.id)??null;if(!d)return;const w=n.camera.getWorldPosition(new N),C=n.camera.getWorldQuaternion(new Re),y=w.clone(),R=C.clone();if(d.parent){d.parent.updateWorldMatrix(!0,!1),d.parent.worldToLocal(y);const M=d.parent.getWorldQuaternion(new Re);R.premultiply(M.invert())}let ye;try{ye=p.get(t.id)}catch(M){j.error(M instanceof Error?M.message:String(M),"camera-authoring");return}Pe(l,t.id),Ee(l,t.id,{position:y.toArray(),rotation:R.toArray(),scale:ye.scale}),e.shell.notifyIngestEdit(),je(l,t.id)},subscribe:e.shell.subscribe});let de=null;const me=()=>{const t=ht(e.shell);t!==de&&(de=t,c.style.opacity=t?"1":"0",o.style.backgroundColor=t?"":gt.surface.raised,o.style.backgroundImage=t?"":"linear-gradient(45deg, #444649 25%, transparent 25%, transparent 75%, #444649 75%), linear-gradient(45deg, #444649 25%, transparent 25%, transparent 75%, #444649 75%)",o.style.backgroundPosition=t?"":"0 0, 8px 8px",o.style.backgroundSize=t?"":"16px 16px")};me();let pe=e.composerVersion;const Be=e.shell.subscribe(()=>{me();const t=e.scene;t&&t!==n.currentScene&&n.setScene(t),n.objectMap=e.objectMap,n.syncFromStore(),e.composerVersion!==pe?(pe=e.composerVersion,T()):ie()});let z=null;const X=new Vr({seedFromGameCamera:()=>{const t=z?.()??null;return!!t&&n.seedFromGameCamera(t)},frameContent:()=>n.focusOnScene()}),fe=()=>{X.cancel(),z=null};n.orbitControls.addEventListener("start",fe);const he=()=>Ir(n.camera,n.orbitControls.target);n.orbitControls.addEventListener("end",he);const He=e.shell.onViewportAction(t=>{switch(t.type){case"focus-entity":{const l=Z(x(e.shell),e.objectMap,t.id);l&&n.focusOn(l);break}case"focus-scene":{{const l=Fr();if(l){n.camera.position.set(...l.position),n.orbitControls.target.set(...l.target),n.orbitControls.update();break}}z=e.sceneCameraLookup,X.begin(performance.now(),z!==null);break}case"focus-selection":{const l=x(e.shell),p=[...e.shell.selectedEntityIds].map(d=>Z(l,e.objectMap,d)).filter(d=>d!==null);n.focusOnMultiple(p);break}case"snap-selection-to-floor":n.snapSelectionToFloor();break;case"set-view-preset":n.setViewPreset(t.preset);break;case"step-view":n.stepView(t.step);break;case"frame-all":n.focusOnScene();break;case"zoom-view":n.zoomStep(t.direction);break;case"set-camera-pose":n.setPose(t.position,t.target,t.fov);break}});Lr();const ge=new ResizeObserver(()=>{const t=Math.max(1,o.clientWidth),l=Math.max(1,o.clientHeight);a.setSize(t,l),u.setSize(t,l),n.resize(t,l)});ge.observe(o);let W=performance.now(),_=!0,P=!1,be=!1;function ve(t){return Or(n.currentScene,()=>{E.render(a,n.currentScene,n.renderCamera),n.renderWithInfrastructure(()=>{vr(n.currentScene,()=>O.render(n.currentScene,e.shadingMode,()=>u.render(t),br)),n.renderViewCube(a),n.renderCameraPreview(a,B().preview?.camera??null,r.cameraPreview())})})}const Ue=ir(c,async()=>{if(P||!cr()||!o.checkVisibility({visibilityProperty:!0,checkVisibilityCSS:!0})||!ve(0))return null;const t=document.createElement("canvas");return t.width=c.width,t.height=c.height,t.getContext("2d").drawImage(c,0,0),t}),J=()=>wt(e.shell)===e.shell;function Ke(t,l){if(P)return;if(l&&(W=t),!o.checkVisibility({visibilityProperty:!0,checkVisibilityCSS:!0})){W=t,_=!0,n.resolvePresentation();return}g.beginFrame();const p=t-W,d=p/1e3;J()&&(m.frameTime=p,m.fps=1e3/p),W=t,k.syncMarkers(d),X.tick(t),g.beginPhase(),n.update(d),r.runFrame(d),n.batchedRenderer.update(d),g.endPhase("editor"),g.beginPhase(),a.info.reset(),ze(()=>{ve(d)}),g.reportRender({gpuMs:We(),drawCalls:a.info.render.calls,triangles:a.info.render.triangles,geometries:a.info.memory.geometries,textures:a.info.memory.textures}),g.endPhase("render"),J()&&(m.drawCalls=a.info.render.calls,m.triangles=a.info.render.triangles),_&&be&&(_=!1,vt(s)),g.endFrame();const w=oe(),C=w.position,y=w.target;J()&&(m.cameraPosition.x=C.x,m.cameraPosition.y=C.y,m.cameraPosition.z=C.z,m.cameraTarget.x=y.x,m.cameraTarget.y=y.y,m.cameraTarget.z=y.z);const R=`${C.x},${C.y},${C.z},${y.x},${y.y},${y.z},${w.fov}`;R!==se&&(se=R,k.reportCamera())}n.objectMap=e.objectMap,n.syncFromStore(),T();let Y,D;async function qe(t){if(P)return;r.onMountStatus("mounting"),D?.(),D=void 0,Y=t,r.onRootIds(t.childAdapters().filter(d=>d.role==="world"&&d.kind==="three").map(d=>d.worldId));const l=sr("three");if(P||Y!==t)return;const p=l?await l.mountWorldRootSession({store:e,composite:t,renderer:a}):()=>{};if(P||Y!==t){p();return}D=p,P||r.onMountStatus("ready")}const we=ar(e.shell,qe);return we.ready.then(()=>dt(mt(e.shell))).catch(t=>{j.error(`Editor boot failed: ${t instanceof Error?t.message:String(t)}`,"scene"),r.onMountStatus("ready")}).finally(()=>{be=!0,_=!0}),{scene:b,viewport:n,frame:Ke,present:t=>wr(e,t),setHelper:(t,l)=>n.setHelper(t,l),dispose:()=>{P=!0,_e(),Ue(),ge.disconnect(),Be(),He(),Qe(),n.orbitControls.removeEventListener("start",le),n.orbitControls.removeEventListener("change",ue),n.orbitControls.removeEventListener("end",A),n.orbitControls.removeEventListener("start",fe),n.orbitControls.removeEventListener("end",he),we.dispose(),D?.(),k.dispose(),O.dispose(),L.dispose(),Ge(),$e(),De(),Ne(),h?.selection.clear(),E.dispose(),u.dispose()}}}function Br({store:r,rootIds:e,mountStatus:s}){f.useSyncExternalStore(r.shell.subscribe,r.shell.getSnapshot);const o=f.useSyncExternalStore(kt,Tt),c=f.useSyncExternalStore(At,Rt),a=r.scene?.background,m=a!==null&&!(a?.isColor===!0&&a.getHex()===11184810),u=f.useMemo(()=>!!(r.scene&&It(r.scene,{includeBackground:!1,ignoredLayer:Xe})),[r.scene,r.shell.contentVersion]),E=!!(r.scene&&(m||u)),O=Lt({surface:"Scene",rootIds:e,phase:s==="mounting"?"loading":"ready",content:E?"present":s==="mounting"?"unknown":"empty",readiness:o,failures:c});return i.jsx(Ft,{explanation:O,testId:"scene-viewport-status"})}function Hr({store:r,documentId:e,cameraPreviewRef:s,mountStatus:o,rootIds:c}){f.useSyncExternalStore(r.shell.subscribe,r.shell.getShellSnapshot??r.shell.getSnapshot),f.useSyncExternalStore(Ct,xt),f.useSyncExternalStore(Mt,Vt),f.useSyncExternalStore(Pt,Et);const a=jt(r.shell,e,"document");return i.jsxs(i.Fragment,{children:[a.surface!==null?i.jsx(Ot,{}):null,a.surface==="three"?i.jsx(kr,{previewRef:s}):null,i.jsx(Br,{store:r,rootIds:c,mountStatus:o})]})}const ko={mountWorldRootSurface:zr,installWorldRootStage:Qr,Overlays:Hr};export{ko as worldRootStageBinding};
@@ -1 +1 @@
1
- import{collectMachineAnimationMeta as V,clipNamesOf as L,isBlendTreeAnimationMeta as S,asBlendTreeDef as z}from"./xstate-animation-meta-DFSFf8d4.js";import{cW as J,p as Z,c as _,cQ as ee,l as te,dk as ne,cf as ie,cd as oe}from"./three.core-3arARmh6.js";import"./index-Bn8WGRJh.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";class M extends Error{constructor(i,c){super(i),this.stateId=c,this.name="AnimationBindingError"}}function ae(n){const i=n.logic;if(i?.root)return i;const c=n.getSnapshot();if(c?.machine?.root)return c.machine;throw new M("[bindXStateAnimation] the actor exposes no state machine — only a state-machine actor carries the `meta.animation` this binder reads")}const W=n=>n.layer??"base",B=n=>n.weight??1,I=n=>n.blendMode??"override";function T(n){try{return ne.parseTrackName(n.name).nodeName??""}catch{const i=n.name.indexOf(".");return i<0?n.name:n.name.slice(0,i)}}function C(n,i,c){const o=new Set,l=[];for(const f of i){let u=!1;n.traverse(m=>{m.name===f&&(u=!0,m.traverse(d=>{d.name&&o.add(d.name)}))}),c.has(f)&&(u=!0,o.add(f)),u||l.push(f)}return{names:o,missing:l}}function se(n,i,c,o){const l=new Set(n.tracks.map(T)),f=i.include?C(c,i.include,l):void 0,u=i.exclude?C(c,i.exclude,l):void 0,m=[...f?.missing??[],...u?.missing??[]];if(m.length)throw new M(`[bindXStateAnimation] state "${o}" boneMask names unknown bones/objects: ${m.join(", ")}`,o);const d=n.tracks.filter(p=>{const w=T(p);return(!f||f.names.has(w))&&!u?.names.has(w)});if(d.length===0)throw new M(`[bindXStateAnimation] state "${o}" boneMask removes every track from clip "${n.name}"`,o);return new te(n.name,n.duration,d.map(p=>p.clone()))}function re(n){return n.reduce((i,c)=>c.weight>i.weight?c:i,n[0])}function Se(n,i,c,o={}){const l=i.getRoot(),f=o.root??(l instanceof J?l:void 0);if(!f)throw new M("[bindXStateAnimation] a THREE.Object3D `root` option is required when the mixer uses AnimationObjectGroup");const u=ae(n).root,m=V(u),d=new Map(m.map(t=>[t.stateId,t.meta]));for(const t of m)for(const e of L(t.meta))if(!c.has(e))throw new M(`[bindXStateAnimation] state "${t.stateId}" references clip "${e}", which is not present in the supplied clips map. Known clips: ${[...c.keys()].join(", ")||"(none)"}`,t.stateId);const p=new Map;function w(t,e,s){return W(e)!=="base"||!!e.boneMask||I(e)==="additive"?`${t}\0${s}`:s}for(const{stateId:t,meta:e}of m)for(const s of L(e)){const a=w(t,e,s);if(p.has(a))continue;const r=c.get(s);let h=e.boneMask?se(r,e.boneMask,f,t):r;(h!==r||a!==s)&&(h===r&&(h=r.clone()),h.name=`${r.name}@${W(e)}:${t}`),I(e)==="additive"?(Z.makeClipAdditive(h),h.blendMode=_):h.blendMode=ee,p.set(a,h)}const g=new Map;function K(t,e,s,a){let r=g.get(t);if(!r){const h=p.get(t);if(!h)throw new M(`[bindXStateAnimation] prepared clip "${t}" not found`);const v=i.clipAction(h);v.setEffectiveWeight(0),v.play(),r={action:v,clip:h},g.set(t,r)}return r.action.setLoop(e?ie:oe,1/0),r.action.clampWhenFinished=!e,r.action.timeScale=s,r.action.weight=a,r.action}function N(t){const e=o.selectParameters?o.selectParameters(t):t;return new Map(Object.entries(e??{}))}function D(t,e,s){return(S(e)?ce(z(e.blendTree),N(s)):[{clip:e.clip,weight:1}]).map(({clip:r,weight:h})=>({clip:r,weight:h,actionKey:w(t,e,r)}))}const y=new Map;let O=!1;function R(t,e,s){for(const a of t){if(a.actionKey===e)continue;const r=g.get(a.actionKey)?.action;r&&(s>0?r.fadeOut(s):r.setEffectiveWeight(0))}}function k(t,e){if(!S(t.meta))return;t.natural=D(t.stateId,t.meta,e);const s=B(t.meta);for(const a of t.natural)g.get(a.actionKey)?.action.setEffectiveWeight(a.weight*s)}function P(t,e,s){const a=W(e),r=y.get(a)??null,h=D(t,e,s),v=re(h),H=S(e)?!0:e.loop,Q=S(e)?1:e.speed,x=B(e);for(const b of h)K(b.actionKey,H,Q,x);const $=g.get(v.actionKey).action;$.reset().setEffectiveWeight(x);for(const b of h)b.actionKey!==v.actionKey&&g.get(b.actionKey).action.reset().setEffectiveWeight(0);const A=e.crossfade?.duration??0,U=e.crossfade?.warp??!1;if(!r)A>0&&$.fadeIn(A);else{R(r.natural,r.dominantActionKey,A);const b=g.get(r.dominantActionKey)?.action;b&&A>0?b.crossFadeTo($,A,U):(b?.setEffectiveWeight(0),$.setEffectiveWeight(x))}const j={layer:a,stateId:t,meta:e,natural:h,dominantActionKey:v.actionKey,crossfadeRemaining:A};y.set(a,j),S(e)&&A<=0&&k(j,s)}function q(t){return Object.keys(t.getMeta()).filter(e=>d.has(e))}function X(t){const e=new Map;for(const s of q(t)){const a=d.get(s),r=W(a),h=e.get(r);if(h)throw new M(`[bindXStateAnimation] animated states "${h}" and "${s}" are both active on layer "${r}". Give parallel regions distinct meta.animation.layer names.`,s);e.set(r,s)}for(const[s,a]of y)e.has(s)||(R(a.natural,void 0,0),y.delete(s));for(const[s,a]of e)y.get(s)?.stateId!==a&&P(a,d.get(a),t.context)}const F=n.getSnapshot();X(F);const G=n.subscribe(t=>{O||X(t)});function E(t){if(O)return;const e=t,s=n.getSnapshot().context;for(const a of y.values())a.crossfadeRemaining>0?(a.crossfadeRemaining=Math.max(0,a.crossfadeRemaining-e),a.crossfadeRemaining<=0&&k(a,s)):k(a,s);i.update(e)}const Y={tick:E,actor:n,getParameters:()=>N(n.getSnapshot().context),getActiveLayers:()=>[...y.values()].map(t=>({layer:t.layer,stateId:t.stateId,clips:t.natural.map(e=>e.clip),clipWeights:t.natural.map(e=>({clip:e.clip,weight:g.get(e.actionKey)?.action.getEffectiveWeight()??0})),weight:B(t.meta),blendMode:I(t.meta),...t.meta.boneMask?{boneMask:t.meta.boneMask}:{}})),dispose(){if(!O){O=!0,o.systems?.remove("animation",E),G.unsubscribe();for(const{action:t,clip:e}of g.values())t.stop(),i.uncacheAction(e,t.getRoot());g.clear(),y.clear()}}};return o.systems?.add("animation",E),Y}function ce(n,i){switch(n.type){case"1D":return le(n,i);case"2D":return fe(n,i);case"direct":return de(n);default:return n.children.map(c=>({clip:c.clip,weight:1/n.children.length}))}}function le(n,i){const c=Number(i.get(n.parameter)??0),o=[...n.children].sort((f,u)=>f.threshold-u.threshold),l=o.map(f=>({clip:f.clip,weight:0}));if(o.length===0)return l;if(o.length===1||c<=o[0].threshold)return l[0].weight=1,l;if(c>=o[o.length-1].threshold)return l[l.length-1].weight=1,l;for(let f=0;f<o.length-1;f++){const u=o[f],m=o[f+1];if(c>=u.threshold&&c<=m.threshold){const d=m.threshold-u.threshold,p=d>0?(c-u.threshold)/d:0;return l[f].weight=1-p,l[f+1].weight=p,l}}return l}function fe(n,i){const c=Number(i.get(n.parameter)??0),o=Number(i.get(n.parameterY??"")??0),l=n.children,f=l.map(d=>({clip:d.clip,weight:0}));let u=0;const m=[];for(const d of l){const p=c-d.threshold,w=o-(d.thresholdY??0),g=Math.sqrt(p*p+w*w),K=g<.001?1e3:1/g;m.push(K),u+=K}if(u>0)for(let d=0;d<f.length;d++)f[d].weight=m[d]/u;return f}function de(n){const i=n.children.map(o=>({clip:o.clip,weight:o.weight??0})),c=i.reduce((o,l)=>o+l.weight,0);if(c>0)for(const o of i)o.weight/=c;return i}export{M as AnimationBindingError,Se as bindXStateAnimation,ce as evaluateBlendTree,ae as machineOfXStateActor};
1
+ import{collectMachineAnimationMeta as V,clipNamesOf as L,isBlendTreeAnimationMeta as S,asBlendTreeDef as z}from"./xstate-animation-meta-Bvk0pGex.js";import{cW as J,p as Z,c as _,cQ as ee,l as te,dk as ne,cf as ie,cd as oe}from"./three.core-3arARmh6.js";import"./index-CWR8N1pt.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";class M extends Error{constructor(i,c){super(i),this.stateId=c,this.name="AnimationBindingError"}}function ae(n){const i=n.logic;if(i?.root)return i;const c=n.getSnapshot();if(c?.machine?.root)return c.machine;throw new M("[bindXStateAnimation] the actor exposes no state machine — only a state-machine actor carries the `meta.animation` this binder reads")}const W=n=>n.layer??"base",B=n=>n.weight??1,I=n=>n.blendMode??"override";function T(n){try{return ne.parseTrackName(n.name).nodeName??""}catch{const i=n.name.indexOf(".");return i<0?n.name:n.name.slice(0,i)}}function C(n,i,c){const o=new Set,l=[];for(const f of i){let u=!1;n.traverse(m=>{m.name===f&&(u=!0,m.traverse(d=>{d.name&&o.add(d.name)}))}),c.has(f)&&(u=!0,o.add(f)),u||l.push(f)}return{names:o,missing:l}}function se(n,i,c,o){const l=new Set(n.tracks.map(T)),f=i.include?C(c,i.include,l):void 0,u=i.exclude?C(c,i.exclude,l):void 0,m=[...f?.missing??[],...u?.missing??[]];if(m.length)throw new M(`[bindXStateAnimation] state "${o}" boneMask names unknown bones/objects: ${m.join(", ")}`,o);const d=n.tracks.filter(p=>{const w=T(p);return(!f||f.names.has(w))&&!u?.names.has(w)});if(d.length===0)throw new M(`[bindXStateAnimation] state "${o}" boneMask removes every track from clip "${n.name}"`,o);return new te(n.name,n.duration,d.map(p=>p.clone()))}function re(n){return n.reduce((i,c)=>c.weight>i.weight?c:i,n[0])}function Se(n,i,c,o={}){const l=i.getRoot(),f=o.root??(l instanceof J?l:void 0);if(!f)throw new M("[bindXStateAnimation] a THREE.Object3D `root` option is required when the mixer uses AnimationObjectGroup");const u=ae(n).root,m=V(u),d=new Map(m.map(t=>[t.stateId,t.meta]));for(const t of m)for(const e of L(t.meta))if(!c.has(e))throw new M(`[bindXStateAnimation] state "${t.stateId}" references clip "${e}", which is not present in the supplied clips map. Known clips: ${[...c.keys()].join(", ")||"(none)"}`,t.stateId);const p=new Map;function w(t,e,s){return W(e)!=="base"||!!e.boneMask||I(e)==="additive"?`${t}\0${s}`:s}for(const{stateId:t,meta:e}of m)for(const s of L(e)){const a=w(t,e,s);if(p.has(a))continue;const r=c.get(s);let h=e.boneMask?se(r,e.boneMask,f,t):r;(h!==r||a!==s)&&(h===r&&(h=r.clone()),h.name=`${r.name}@${W(e)}:${t}`),I(e)==="additive"?(Z.makeClipAdditive(h),h.blendMode=_):h.blendMode=ee,p.set(a,h)}const g=new Map;function K(t,e,s,a){let r=g.get(t);if(!r){const h=p.get(t);if(!h)throw new M(`[bindXStateAnimation] prepared clip "${t}" not found`);const v=i.clipAction(h);v.setEffectiveWeight(0),v.play(),r={action:v,clip:h},g.set(t,r)}return r.action.setLoop(e?ie:oe,1/0),r.action.clampWhenFinished=!e,r.action.timeScale=s,r.action.weight=a,r.action}function N(t){const e=o.selectParameters?o.selectParameters(t):t;return new Map(Object.entries(e??{}))}function D(t,e,s){return(S(e)?ce(z(e.blendTree),N(s)):[{clip:e.clip,weight:1}]).map(({clip:r,weight:h})=>({clip:r,weight:h,actionKey:w(t,e,r)}))}const y=new Map;let O=!1;function R(t,e,s){for(const a of t){if(a.actionKey===e)continue;const r=g.get(a.actionKey)?.action;r&&(s>0?r.fadeOut(s):r.setEffectiveWeight(0))}}function k(t,e){if(!S(t.meta))return;t.natural=D(t.stateId,t.meta,e);const s=B(t.meta);for(const a of t.natural)g.get(a.actionKey)?.action.setEffectiveWeight(a.weight*s)}function P(t,e,s){const a=W(e),r=y.get(a)??null,h=D(t,e,s),v=re(h),H=S(e)?!0:e.loop,Q=S(e)?1:e.speed,x=B(e);for(const b of h)K(b.actionKey,H,Q,x);const $=g.get(v.actionKey).action;$.reset().setEffectiveWeight(x);for(const b of h)b.actionKey!==v.actionKey&&g.get(b.actionKey).action.reset().setEffectiveWeight(0);const A=e.crossfade?.duration??0,U=e.crossfade?.warp??!1;if(!r)A>0&&$.fadeIn(A);else{R(r.natural,r.dominantActionKey,A);const b=g.get(r.dominantActionKey)?.action;b&&A>0?b.crossFadeTo($,A,U):(b?.setEffectiveWeight(0),$.setEffectiveWeight(x))}const j={layer:a,stateId:t,meta:e,natural:h,dominantActionKey:v.actionKey,crossfadeRemaining:A};y.set(a,j),S(e)&&A<=0&&k(j,s)}function q(t){return Object.keys(t.getMeta()).filter(e=>d.has(e))}function X(t){const e=new Map;for(const s of q(t)){const a=d.get(s),r=W(a),h=e.get(r);if(h)throw new M(`[bindXStateAnimation] animated states "${h}" and "${s}" are both active on layer "${r}". Give parallel regions distinct meta.animation.layer names.`,s);e.set(r,s)}for(const[s,a]of y)e.has(s)||(R(a.natural,void 0,0),y.delete(s));for(const[s,a]of e)y.get(s)?.stateId!==a&&P(a,d.get(a),t.context)}const F=n.getSnapshot();X(F);const G=n.subscribe(t=>{O||X(t)});function E(t){if(O)return;const e=t,s=n.getSnapshot().context;for(const a of y.values())a.crossfadeRemaining>0?(a.crossfadeRemaining=Math.max(0,a.crossfadeRemaining-e),a.crossfadeRemaining<=0&&k(a,s)):k(a,s);i.update(e)}const Y={tick:E,actor:n,getParameters:()=>N(n.getSnapshot().context),getActiveLayers:()=>[...y.values()].map(t=>({layer:t.layer,stateId:t.stateId,clips:t.natural.map(e=>e.clip),clipWeights:t.natural.map(e=>({clip:e.clip,weight:g.get(e.actionKey)?.action.getEffectiveWeight()??0})),weight:B(t.meta),blendMode:I(t.meta),...t.meta.boneMask?{boneMask:t.meta.boneMask}:{}})),dispose(){if(!O){O=!0,o.systems?.remove("animation",E),G.unsubscribe();for(const{action:t,clip:e}of g.values())t.stop(),i.uncacheAction(e,t.getRoot());g.clear(),y.clear()}}};return o.systems?.add("animation",E),Y}function ce(n,i){switch(n.type){case"1D":return le(n,i);case"2D":return fe(n,i);case"direct":return de(n);default:return n.children.map(c=>({clip:c.clip,weight:1/n.children.length}))}}function le(n,i){const c=Number(i.get(n.parameter)??0),o=[...n.children].sort((f,u)=>f.threshold-u.threshold),l=o.map(f=>({clip:f.clip,weight:0}));if(o.length===0)return l;if(o.length===1||c<=o[0].threshold)return l[0].weight=1,l;if(c>=o[o.length-1].threshold)return l[l.length-1].weight=1,l;for(let f=0;f<o.length-1;f++){const u=o[f],m=o[f+1];if(c>=u.threshold&&c<=m.threshold){const d=m.threshold-u.threshold,p=d>0?(c-u.threshold)/d:0;return l[f].weight=1-p,l[f+1].weight=p,l}}return l}function fe(n,i){const c=Number(i.get(n.parameter)??0),o=Number(i.get(n.parameterY??"")??0),l=n.children,f=l.map(d=>({clip:d.clip,weight:0}));let u=0;const m=[];for(const d of l){const p=c-d.threshold,w=o-(d.thresholdY??0),g=Math.sqrt(p*p+w*w),K=g<.001?1e3:1/g;m.push(K),u+=K}if(u>0)for(let d=0;d<f.length;d++)f[d].weight=m[d]/u;return f}function de(n){const i=n.children.map(o=>({clip:o.clip,weight:o.weight??0})),c=i.reduce((o,l)=>o+l.weight,0);if(c>0)for(const o of i)o.weight/=c;return i}export{M as AnimationBindingError,Se as bindXStateAnimation,ce as evaluateBlendTree,ae as machineOfXStateActor};
@@ -1 +1 @@
1
- import{dY as b,dZ as u,t as o,u as l,v as n,w as c,bA as r,bz as m,by as f}from"./index-Bn8WGRJh.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 d=o({clip:n().min(1).describe("Animation clip name this child plays"),threshold:r().describe("1D/2D blend position on the primary parameter axis"),thresholdY:r().optional().describe("2D blend position on the secondary parameter axis (2D blend trees only)"),weight:r().min(0).optional().describe('Explicit weight for "direct" blend trees (ignored by 1D/2D)')}).strict(),y=o({type:c("1D").describe("Interpolates linearly between sorted children by threshold"),parameter:n().min(1).describe("Context/selector value driving the blend"),children:l(d).min(2,"1D blend tree needs at least 2 children to interpolate between")}).strict(),v=o({type:c("2D").describe("Inverse-distance-weights children by (parameter, parameterY) position"),parameter:n().min(1).describe("Primary axis context/selector value"),parameterY:n().min(1).describe("Secondary axis context/selector value"),children:l(d.extend({thresholdY:r()})).min(1,"2D blend tree needs at least 1 child")}).strict(),A=o({type:c("direct").describe("Each child has an explicit weight, normalized to sum to 1"),parameter:n().default(""),children:l(d.extend({weight:r().min(0)})).min(1,"direct blend tree needs at least 1 child")}).strict(),g=b("type",[y,v,A]);function P(e){return e}const p=o({duration:r().min(0).default(0).describe("Seconds to blend from the previously active clip into this state on entry, applied via native `AnimationAction.crossFadeTo`/`fadeIn` (E2). 0 = instant activation, no fade."),warp:m().default(!1).describe("Passed through to AnimationAction.crossFadeTo's `warp` param — linearly warps timeScale across the two clips during the blend so differing clip lengths line up. Default false.")}).strict().describe("Blend-in/out/crossfade timing for entering this state"),x=o({include:l(n().min(1)).min(1).optional().describe("Bone/object names whose complete descendant subtrees are retained"),exclude:l(n().min(1)).min(1).optional().describe("Bone/object names whose complete descendant subtrees are removed")}).strict().refine(e=>!!(e.include?.length||e.exclude?.length),{message:"boneMask needs at least one include or exclude bone name"}).describe("Filters animation tracks by named Object3D/Bone subtrees"),h={layer:n().min(1).optional().describe("Composition layer name; omitted means the single base layer"),weight:r().min(0).max(1).optional().describe("Layer weight multiplier from 0 to 1; defaults to 1"),blendMode:f(["override","additive"]).optional().describe("Native Three normal/override or additive action blending; defaults to override"),boneMask:x.optional().describe("Optional include/exclude filter applied to every clip track in this state")},w=o({clip:n().min(1).describe("Single clip to play while this XState state is active"),loop:m().default(!0).describe("Loop the clip (THREE.LoopRepeat) vs play once (THREE.LoopOnce, clamped on last frame)"),speed:r().positive().default(1).describe("Playback speed multiplier (AnimationAction.timeScale)"),crossfade:p.optional(),...h}).strict(),S=o({blendTree:g.describe("Multiple clips blended by a live context/selector-driven parameter"),crossfade:p.optional(),...h}).strict(),D=u([w,S]);function M(e){return"clip"in e}function $(e){return"blendTree"in e}class T extends Error{constructor(a,i,t){super(a),this.stateId=i,this.issues=t,this.name="AnimationMetaValidationError"}}function B(e,a){const i=D.safeParse(a);if(!i.success){const t=i.error.issues.map(s=>`${s.path.length?s.path.join("."):"(root)"}: ${s.message}`).join("; ");throw new T(`[xstate-animation] invalid meta.animation for state "${e}": ${t}`,e,i.error.issues)}return i.data}function R(e){const a=[],i=t=>{t.meta&&"animation"in t.meta&&t.meta.animation!==void 0&&a.push({stateId:t.id,meta:B(t.id,t.meta.animation)});for(const s of Object.values(t.states??{}))i(s)};return i(e),a}function z(e){return M(e)?[e.clip]:e.blendTree.children.map(a=>a.clip)}export{g as AnimationBlendTreeSchema,T as AnimationMetaValidationError,D as StateAnimationMetaSchema,P as asBlendTreeDef,z as clipNamesOf,R as collectMachineAnimationMeta,$ as isBlendTreeAnimationMeta,M as isClipAnimationMeta,B as parseStateAnimationMeta};
1
+ import{dY as b,dZ as u,t as o,u as l,v as n,w as c,bA as r,bz as m,by as f}from"./index-CWR8N1pt.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 d=o({clip:n().min(1).describe("Animation clip name this child plays"),threshold:r().describe("1D/2D blend position on the primary parameter axis"),thresholdY:r().optional().describe("2D blend position on the secondary parameter axis (2D blend trees only)"),weight:r().min(0).optional().describe('Explicit weight for "direct" blend trees (ignored by 1D/2D)')}).strict(),y=o({type:c("1D").describe("Interpolates linearly between sorted children by threshold"),parameter:n().min(1).describe("Context/selector value driving the blend"),children:l(d).min(2,"1D blend tree needs at least 2 children to interpolate between")}).strict(),v=o({type:c("2D").describe("Inverse-distance-weights children by (parameter, parameterY) position"),parameter:n().min(1).describe("Primary axis context/selector value"),parameterY:n().min(1).describe("Secondary axis context/selector value"),children:l(d.extend({thresholdY:r()})).min(1,"2D blend tree needs at least 1 child")}).strict(),A=o({type:c("direct").describe("Each child has an explicit weight, normalized to sum to 1"),parameter:n().default(""),children:l(d.extend({weight:r().min(0)})).min(1,"direct blend tree needs at least 1 child")}).strict(),g=b("type",[y,v,A]);function P(e){return e}const p=o({duration:r().min(0).default(0).describe("Seconds to blend from the previously active clip into this state on entry, applied via native `AnimationAction.crossFadeTo`/`fadeIn` (E2). 0 = instant activation, no fade."),warp:m().default(!1).describe("Passed through to AnimationAction.crossFadeTo's `warp` param — linearly warps timeScale across the two clips during the blend so differing clip lengths line up. Default false.")}).strict().describe("Blend-in/out/crossfade timing for entering this state"),x=o({include:l(n().min(1)).min(1).optional().describe("Bone/object names whose complete descendant subtrees are retained"),exclude:l(n().min(1)).min(1).optional().describe("Bone/object names whose complete descendant subtrees are removed")}).strict().refine(e=>!!(e.include?.length||e.exclude?.length),{message:"boneMask needs at least one include or exclude bone name"}).describe("Filters animation tracks by named Object3D/Bone subtrees"),h={layer:n().min(1).optional().describe("Composition layer name; omitted means the single base layer"),weight:r().min(0).max(1).optional().describe("Layer weight multiplier from 0 to 1; defaults to 1"),blendMode:f(["override","additive"]).optional().describe("Native Three normal/override or additive action blending; defaults to override"),boneMask:x.optional().describe("Optional include/exclude filter applied to every clip track in this state")},w=o({clip:n().min(1).describe("Single clip to play while this XState state is active"),loop:m().default(!0).describe("Loop the clip (THREE.LoopRepeat) vs play once (THREE.LoopOnce, clamped on last frame)"),speed:r().positive().default(1).describe("Playback speed multiplier (AnimationAction.timeScale)"),crossfade:p.optional(),...h}).strict(),S=o({blendTree:g.describe("Multiple clips blended by a live context/selector-driven parameter"),crossfade:p.optional(),...h}).strict(),D=u([w,S]);function M(e){return"clip"in e}function $(e){return"blendTree"in e}class T extends Error{constructor(a,i,t){super(a),this.stateId=i,this.issues=t,this.name="AnimationMetaValidationError"}}function B(e,a){const i=D.safeParse(a);if(!i.success){const t=i.error.issues.map(s=>`${s.path.length?s.path.join("."):"(root)"}: ${s.message}`).join("; ");throw new T(`[xstate-animation] invalid meta.animation for state "${e}": ${t}`,e,i.error.issues)}return i.data}function R(e){const a=[],i=t=>{t.meta&&"animation"in t.meta&&t.meta.animation!==void 0&&a.push({stateId:t.id,meta:B(t.id,t.meta.animation)});for(const s of Object.values(t.states??{}))i(s)};return i(e),a}function z(e){return M(e)?[e.clip]:e.blendTree.children.map(a=>a.clip)}export{g as AnimationBlendTreeSchema,T as AnimationMetaValidationError,D as StateAnimationMetaSchema,P as asBlendTreeDef,z as clipNamesOf,R as collectMachineAnimationMeta,$ as isBlendTreeAnimationMeta,M as isClipAnimationMeta,B as parseStateAnimationMeta};
package/dist-node/cli.js CHANGED
@@ -2310,7 +2310,7 @@ import { fileURLToPath as fileURLToPath2 } from "node:url";
2310
2310
  var package_default = {
2311
2311
  name: "@volter/game-editor",
2312
2312
  author: "Volter AI, Inc.",
2313
- version: "0.5.74",
2313
+ version: "0.5.76",
2314
2314
  publishConfig: {
2315
2315
  access: "public"
2316
2316
  },
@@ -2359,22 +2359,22 @@ var package_default = {
2359
2359
  }
2360
2360
  },
2361
2361
  dependencies: {
2362
- "@volter/editor-core": "0.5.74",
2363
- "@volter/editor-game": "0.5.74",
2364
- "@volter/editor-react": "0.5.74",
2365
- "@volter/editor-threejs": "0.5.74",
2366
- "@volter/editor-xstate": "0.5.74",
2367
- "@volter/editor-blender": "0.1.14",
2368
- "@volter/dawproject": "0.5.74",
2369
- "@volter/editor-dawproject": "0.5.74",
2370
- "@volter/blender-engine": "0.1.12",
2371
- "@volter/editor-project": "0.5.74",
2372
- "@volter/editor-sdk": "0.5.74",
2373
- "@volter/editor-live": "0.5.74",
2374
- "@volter/game-live": "0.5.74",
2362
+ "@volter/editor-core": "0.5.76",
2363
+ "@volter/editor-game": "0.5.76",
2364
+ "@volter/editor-react": "0.5.76",
2365
+ "@volter/editor-threejs": "0.5.76",
2366
+ "@volter/editor-xstate": "0.5.76",
2367
+ "@volter/editor-blender": "0.1.16",
2368
+ "@volter/dawproject": "0.5.76",
2369
+ "@volter/editor-dawproject": "0.5.76",
2370
+ "@volter/blender-engine": "0.1.14",
2371
+ "@volter/editor-project": "0.5.76",
2372
+ "@volter/editor-sdk": "0.5.76",
2373
+ "@volter/editor-live": "0.5.76",
2374
+ "@volter/game-live": "0.5.76",
2375
2375
  "@modelcontextprotocol/sdk": "1.30.0",
2376
- "@volter/game-runtime": "0.5.74",
2377
- "@volter/threejs-runtime": "0.5.74",
2376
+ "@volter/game-runtime": "0.5.76",
2377
+ "@volter/threejs-runtime": "0.5.76",
2378
2378
  undici: "7.29.1",
2379
2379
  typescript: "5.9.3",
2380
2380
  "@colyseus/schema": "^4.0.14",
@@ -8840,7 +8840,9 @@ async function control(command, verb, argument, reason, scope) {
8840
8840
  const session = (await verifiedSessions(live.session.port)).find((s) => s.port === live.session.port && s.project === live.session.projectRoot && s.registered);
8841
8841
  if (!session?.pid) throw new Error("Cannot close a session without verified process ownership.");
8842
8842
  const state = await client.getState();
8843
- if (state.connected || (state.tabs?.length ?? 0) > 0) {
8843
+ const tabs = state.tabs ?? [];
8844
+ const flushable = tabs.length > 0 ? tabs.some((tab) => tab.commandListener !== "not attached") : state.connected === true;
8845
+ if (flushable) {
8844
8846
  try {
8845
8847
  await client.prepareClose();
8846
8848
  } catch (error) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@volter/game-editor",
3
3
  "author": "Volter AI, Inc.",
4
- "version": "0.5.74",
4
+ "version": "0.5.76",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -50,22 +50,22 @@
50
50
  }
51
51
  },
52
52
  "dependencies": {
53
- "@volter/editor-core": "0.5.74",
54
- "@volter/editor-game": "0.5.74",
55
- "@volter/editor-react": "0.5.74",
56
- "@volter/editor-threejs": "0.5.74",
57
- "@volter/editor-xstate": "0.5.74",
58
- "@volter/editor-blender": "0.1.14",
59
- "@volter/dawproject": "0.5.74",
60
- "@volter/editor-dawproject": "0.5.74",
61
- "@volter/blender-engine": "0.1.12",
62
- "@volter/editor-project": "0.5.74",
63
- "@volter/editor-sdk": "0.5.74",
64
- "@volter/editor-live": "0.5.74",
65
- "@volter/game-live": "0.5.74",
53
+ "@volter/editor-core": "0.5.76",
54
+ "@volter/editor-game": "0.5.76",
55
+ "@volter/editor-react": "0.5.76",
56
+ "@volter/editor-threejs": "0.5.76",
57
+ "@volter/editor-xstate": "0.5.76",
58
+ "@volter/editor-blender": "0.1.16",
59
+ "@volter/dawproject": "0.5.76",
60
+ "@volter/editor-dawproject": "0.5.76",
61
+ "@volter/blender-engine": "0.1.14",
62
+ "@volter/editor-project": "0.5.76",
63
+ "@volter/editor-sdk": "0.5.76",
64
+ "@volter/editor-live": "0.5.76",
65
+ "@volter/game-live": "0.5.76",
66
66
  "@modelcontextprotocol/sdk": "1.30.0",
67
- "@volter/game-runtime": "0.5.74",
68
- "@volter/threejs-runtime": "0.5.74",
67
+ "@volter/game-runtime": "0.5.76",
68
+ "@volter/threejs-runtime": "0.5.76",
69
69
  "undici": "7.29.1",
70
70
  "typescript": "5.9.3",
71
71
  "@colyseus/schema": "^4.0.14",
@@ -1 +0,0 @@
1
- import{a as t}from"./jsx-runtime-DPjLkJKQ.js";import{Object3DSnapshotDocument as m}from"./EntityModelDocument-DBZeMkXS.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./editor-shell-store-DhM6KcjO.js";import"./output-pass-HurwNl0G.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./Pass-D1MRT672.js";import"./editor-layers-BGId-Uru.js";import"./workspace-arrangement-Dg7zIkwR.js";import"./index-Bn8WGRJh.js";import"./index-nmcBqr7Y.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./user-data-DX18I5LS.js";import"./entity-object-B77fPnTJ.js";import"./three-contract-Dkt6PmWY.js";import"./live-mixers-B-bwLZ7c.js";import"./asset-preview-D9R6R903.js";import"./renderer-ownership-BovSEcLv.js";import"./hierarchy-marks-BCrDKK5y.js";import"./studio-environment-7oYW17Ie.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./bitmap-label-Ct4k6ehY.js";import"./StageHost-DiXV3rVP.js";import"./three-state-28vYMAez.js";import"./standard-viewport-dressing-oljtBXBW.js";import"./content-bounds-DUlT_Bs_.js";import"./preview-renderer-BrYNFV1p.js";import"./live-gesture-lock-DJbrjOqf.js";import"./model-inspection-Cus72-UK.js";import"./three-viewport-presentation-PqEhvDqp.js";import"./clip-planes-CnAI6DZn.js";import"./three-BiLYjlR0.js";import"./component-instance-root-CgmR0Q36.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./model-thumbnail-Dm3TXja5.js";import"./OrbitControls-B13MKuwC.js";import"./LineSegments2-DN9pUfWA.js";import"./three.quarks.esm-C_HmSKXo.js";import"./three-integration-DxXySCHZ.js";import"./host-hierarchy-objects-BV3WqU2w.js";import"./layered-pick-Bkf0E_UR.js";import"./root-stacking-BEd9ZvxC.js";import"./object3d-document-session-registry-DsJV3XhY.js";import"./viewport-door-C_XkG4b1.js";import"./scene-framing-C7Dmipw4.js";import"./source-object3d-authoring-adapter-Cbbs0YjZ.js";import"./three-projection-core-C0R8NXF5.js";import"./editor-presentation-activity-CqJH4G9t.js";import"./transport-strip-DgeWfqo0.js";import"./viewport-surface-status-OxaV9weN.js";function ut({previewKey:o,object:r,displayName:i,fill:p=!1}){return t.jsx("div",{"data-testid":"inspector-object-preview",style:p?{position:"absolute",inset:0,overflow:"hidden"}:{width:"100%",height:220,minHeight:220,borderBottom:"1px solid var(--volter-structural-divider)",overflow:"hidden",position:"relative"},children:t.jsx(m,{documentId:`inspector-preview:${o}`,source:r,displayName:i,active:!0,chromeless:!0})})}export{ut as InspectorObjectPreview};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/StageHost-DiXV3rVP.js","assets/index-Bn8WGRJh.js","assets/index-nmcBqr7Y.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-D_NuPfjr.js","assets/jsx-runtime-DPjLkJKQ.js","assets/index-CtzuWnCS.js","assets/index-CinJrH5C.js","assets/index-FUuS4qwW.js","assets/client-DNXj_opT.js","assets/index-CPiRKiDC.css","assets/three-state-28vYMAez.js","assets/editor-shell-store-DhM6KcjO.js","assets/output-pass-HurwNl0G.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/Pass-D1MRT672.js","assets/editor-layers-BGId-Uru.js","assets/workspace-arrangement-Dg7zIkwR.js","assets/user-data-DX18I5LS.js","assets/entity-object-B77fPnTJ.js","assets/three-contract-Dkt6PmWY.js","assets/standard-viewport-dressing-oljtBXBW.js","assets/content-bounds-DUlT_Bs_.js","assets/hierarchy-marks-BCrDKK5y.js","assets/environment-Dg-YaLsA.js","assets/RoomEnvironment-BkknvS_I.js","assets/EXRLoader-CITMBvGd.js","assets/HDRLoader-BTGuGhVo.js","assets/preview-renderer-BrYNFV1p.js","assets/renderer-ownership-BovSEcLv.js","assets/live-mixers-B-bwLZ7c.js","assets/live-gesture-lock-DJbrjOqf.js","assets/model-inspection-Cus72-UK.js","assets/three-viewport-presentation-PqEhvDqp.js","assets/clip-planes-CnAI6DZn.js","assets/three-BiLYjlR0.js","assets/component-instance-root-CgmR0Q36.js","assets/viewport-editor-controls-BYaAZ_Ku.js","assets/model-thumbnail-Dm3TXja5.js","assets/studio-environment-7oYW17Ie.js","assets/KTX2Loader-CaqVE6nY.js","assets/GLTFLoader-KeoruJgS.js","assets/BufferGeometryUtils-B22h7jo4.js","assets/OrbitControls-B13MKuwC.js","assets/LineSegments2-DN9pUfWA.js","assets/three.quarks.esm-C_HmSKXo.js","assets/three-integration-DxXySCHZ.js","assets/host-hierarchy-objects-BV3WqU2w.js","assets/layered-pick-Bkf0E_UR.js","assets/root-stacking-BEd9ZvxC.js","assets/object3d-document-session-registry-DsJV3XhY.js","assets/viewport-door-C_XkG4b1.js","assets/asset-preview-D9R6R903.js","assets/bitmap-label-Ct4k6ehY.js","assets/scene-framing-C7Dmipw4.js","assets/source-object3d-authoring-adapter-Cbbs0YjZ.js","assets/three-projection-core-C0R8NXF5.js","assets/editor-presentation-activity-CqJH4G9t.js","assets/transport-strip-DgeWfqo0.js","assets/viewport-surface-status-OxaV9weN.js"])))=>i.map(i=>d[i]);
2
- import{ae as r,_ as a}from"./index-Bn8WGRJh.js";import{a as o}from"./jsx-runtime-DPjLkJKQ.js";import{r as n}from"./index-nmcBqr7Y.js";import{V as c,O as u}from"./viewport-surface-status-OxaV9weN.js";const s=n.lazy(async()=>({default:(await a(()=>import("./StageHost-DiXV3rVP.js").then(e=>e.S),__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]))).Object3DDocumentViewport}));function l(t){return i(t.documentId,t.chromeless),o.jsx(n.Suspense,{fallback:o.jsx(c,{testId:"object3d-document-loading",children:u}),children:o.jsx(s,{...t})})}function i(t,e=!1){n.useEffect(()=>{if(!e)return r(t)},[t,e])}export{l as O};
@@ -1 +0,0 @@
1
- import{J as i,r as m}from"./index-Bn8WGRJh.js";import{e as p}from"./game-network-BRvp9Eya.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-OZVqp6xS.js";import"./index-Da9JhEvW.js";import"./native-debug-module-C_1Fna30.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-B6pk-yrQ.js";import"./contract-system-adapters-CEuzOynM.js";import"./game-contract-seams-Bk8NMwX4.js";import"./seeded-random-BMbOsD5m.js";import"./game-audio-BeCyd0Ha.js";import"./rapier-physics-adapter-CaZqWLu0.js";import"./events-156d8d12.esm-CYeuVCYr.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./index-bQE2NA0D.js";import"./live-project-verbs-H6S9jMp9.js";import"./capability-coverage-4xMPa566.js";import"./edit-mode-authoring-D4gF7ToY.js";import"./json-history-resource-DiN_PLbn.js";import"./binding-resolver-CqJs8FS9.js";import"./adapter-surface-Y37Nzcyw.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./realm-services-ugwrIrZB.js";import"./canvas-entry-runtime-C4V45HMi.js";import"./three-ingest-runtime-BsCSoTG8.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-DCi6B_Mk.js";import"./ingest-source-persistence-C-gTDfvH.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-h3E0Xsra.js";import"./mounted-authoring-Cjmi_MYm.js";import"./entity-object-B77fPnTJ.js";import"./user-data-DX18I5LS.js";import"./workspace-arrangement-Dg7zIkwR.js";import"./three-contract-Dkt6PmWY.js";import"./three-BiLYjlR0.js";import"./editor-layers-BGId-Uru.js";import"./component-instance-root-CgmR0Q36.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-authoring-adapter-DlqC-T90.js";import"./source-persistence-backend-B2YaNBbK.js";import"./three-projection-core-C0R8NXF5.js";import"./body-marks-C1LxJtQb.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./structural-ids-BOo2BRoY.js";import"./object3d-authoring-subject-XccsO0xG.js";import"./r3f-physics-binding-BATEkxoi.js";import"./deferred-ingest-play-GNKwMor5.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-BUU8rhRd.js";import"./board-guides-CFM0Dzzw.js";import"./relative-import-specifier-CbIyU_9J.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-C1HaQduW.js";import"./inference-diagnostics-BPtSODNJ.js";import"./writer-tw6EcuVO.js";import"./three-state-28vYMAez.js";import"./editor-shell-store-DhM6KcjO.js";import"./output-pass-HurwNl0G.js";import"./viewport-door-C_XkG4b1.js";import"./game-surface-defaults-D8S4cRxi.js";const Rt="workspace.service";function e(o){p().catch(t=>{m().console.error(`${o}: ${t instanceof Error?t.message:String(t)}`,"play")})}function Ut(){let o,t=!1;const r=i(()=>{t||new URLSearchParams(window.location.search).get("play")==="1"&&(t=!0,o=window.setTimeout(()=>e("Could not enter requested Play mode"),0))});return()=>{o!==void 0&&window.clearTimeout(o),r()}}export{Rt as point,Ut as start};
@@ -1 +0,0 @@
1
- import{ab as m}from"./index-Bn8WGRJh.js";import{b as p,a as e,c as n,s}from"./game-network-BRvp9Eya.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-OZVqp6xS.js";import"./index-Da9JhEvW.js";import"./native-debug-module-C_1Fna30.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-B6pk-yrQ.js";import"./contract-system-adapters-CEuzOynM.js";import"./game-contract-seams-Bk8NMwX4.js";import"./seeded-random-BMbOsD5m.js";import"./game-audio-BeCyd0Ha.js";import"./rapier-physics-adapter-CaZqWLu0.js";import"./events-156d8d12.esm-CYeuVCYr.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./index-bQE2NA0D.js";import"./live-project-verbs-H6S9jMp9.js";import"./capability-coverage-4xMPa566.js";import"./edit-mode-authoring-D4gF7ToY.js";import"./json-history-resource-DiN_PLbn.js";import"./binding-resolver-CqJs8FS9.js";import"./adapter-surface-Y37Nzcyw.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./realm-services-ugwrIrZB.js";import"./canvas-entry-runtime-C4V45HMi.js";import"./three-ingest-runtime-BsCSoTG8.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-DCi6B_Mk.js";import"./ingest-source-persistence-C-gTDfvH.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-h3E0Xsra.js";import"./mounted-authoring-Cjmi_MYm.js";import"./entity-object-B77fPnTJ.js";import"./user-data-DX18I5LS.js";import"./workspace-arrangement-Dg7zIkwR.js";import"./three-contract-Dkt6PmWY.js";import"./three-BiLYjlR0.js";import"./editor-layers-BGId-Uru.js";import"./component-instance-root-CgmR0Q36.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-authoring-adapter-DlqC-T90.js";import"./source-persistence-backend-B2YaNBbK.js";import"./three-projection-core-C0R8NXF5.js";import"./body-marks-C1LxJtQb.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./structural-ids-BOo2BRoY.js";import"./object3d-authoring-subject-XccsO0xG.js";import"./r3f-physics-binding-BATEkxoi.js";import"./deferred-ingest-play-GNKwMor5.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-BUU8rhRd.js";import"./board-guides-CFM0Dzzw.js";import"./relative-import-specifier-CbIyU_9J.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-C1HaQduW.js";import"./inference-diagnostics-BPtSODNJ.js";import"./writer-tw6EcuVO.js";import"./three-state-28vYMAez.js";import"./editor-shell-store-DhM6KcjO.js";import"./output-pass-HurwNl0G.js";import"./viewport-door-C_XkG4b1.js";import"./game-surface-defaults-D8S4cRxi.js";const zt="workspace.command",a=()=>({ok:!1,error:"not in play mode — start play before using the debug seam"}),Bt={"set-instance-count":{derivedRefresh:"always",handle:o=>{if(!e())return a();const r=o.names;if(Array.isArray(r)&&r.every(i=>typeof i=="string"))return r.length<1?{ok:!1,error:'set-instance-count "names" must have at least one entry.'}:(n(r),{ok:!0});const t=o.count;return typeof t!="number"||!Number.isFinite(t)||t<1?{ok:!1,error:`set-instance-count requires a whole "count" >= 1 (or a "names" array), got ${String(t)}.`}:(s(Math.floor(t)-1),{ok:!0})}},"list-instances":{derivedRefresh:"if-content-changed",handle:()=>({ok:!0,data:{instances:m(),named:p()}})}};export{Bt as commands,zt as point};
@@ -1 +0,0 @@
1
- import{i as t}from"./game-network-BRvp9Eya.js";import"./index-OZVqp6xS.js";import"./index-Da9JhEvW.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-Bn8WGRJh.js";import"./index-nmcBqr7Y.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"./native-debug-module-C_1Fna30.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-B6pk-yrQ.js";import"./contract-system-adapters-CEuzOynM.js";import"./game-contract-seams-Bk8NMwX4.js";import"./seeded-random-BMbOsD5m.js";import"./game-audio-BeCyd0Ha.js";import"./rapier-physics-adapter-CaZqWLu0.js";import"./events-156d8d12.esm-CYeuVCYr.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./index-bQE2NA0D.js";import"./live-project-verbs-H6S9jMp9.js";import"./capability-coverage-4xMPa566.js";import"./edit-mode-authoring-D4gF7ToY.js";import"./json-history-resource-DiN_PLbn.js";import"./binding-resolver-CqJs8FS9.js";import"./adapter-surface-Y37Nzcyw.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./realm-services-ugwrIrZB.js";import"./canvas-entry-runtime-C4V45HMi.js";import"./three-ingest-runtime-BsCSoTG8.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-DCi6B_Mk.js";import"./ingest-source-persistence-C-gTDfvH.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-h3E0Xsra.js";import"./mounted-authoring-Cjmi_MYm.js";import"./entity-object-B77fPnTJ.js";import"./user-data-DX18I5LS.js";import"./workspace-arrangement-Dg7zIkwR.js";import"./three-contract-Dkt6PmWY.js";import"./three-BiLYjlR0.js";import"./editor-layers-BGId-Uru.js";import"./component-instance-root-CgmR0Q36.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-authoring-adapter-DlqC-T90.js";import"./source-persistence-backend-B2YaNBbK.js";import"./three-projection-core-C0R8NXF5.js";import"./body-marks-C1LxJtQb.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./structural-ids-BOo2BRoY.js";import"./object3d-authoring-subject-XccsO0xG.js";import"./r3f-physics-binding-BATEkxoi.js";import"./deferred-ingest-play-GNKwMor5.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-BUU8rhRd.js";import"./board-guides-CFM0Dzzw.js";import"./relative-import-specifier-CbIyU_9J.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-C1HaQduW.js";import"./inference-diagnostics-BPtSODNJ.js";import"./writer-tw6EcuVO.js";import"./three-state-28vYMAez.js";import"./editor-shell-store-DhM6KcjO.js";import"./output-pass-HurwNl0G.js";import"./viewport-door-C_XkG4b1.js";import"./game-surface-defaults-D8S4cRxi.js";const zt="workspace.service";function At(){t()}export{zt as point,At as start};