@volter/game-editor 0.5.91 → 0.5.93

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 (295) 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 +2182 -2182
  5. package/dist/assets/{AssetBudgetPanel-DoHols3L.js → AssetBudgetPanel-CqH8eFqI.js} +3 -3
  6. package/dist/assets/{AudioViewer-DJpWQMh1.js → AudioViewer-D9cLnL2x.js} +1 -1
  7. package/dist/assets/{CanvasBoardDocument-DUkSFZ3M.js → CanvasBoardDocument-VJp9kXIl.js} +1 -1
  8. package/dist/assets/{CanvasSceneViewport-lY7d92L2.js → CanvasSceneViewport-DdIbRDvz.js} +1 -1
  9. package/dist/assets/{ColorInput-7cF4Leq3.js → ColorInput-BTlGF3dp.js} +1 -1
  10. package/dist/assets/{ColorPicker-B2gSkOna.js → ColorPicker-DetzTdVS.js} +1 -1
  11. package/dist/assets/{EntityModelDocument-DFLHmO4x.js → EntityModelDocument-KBE9cE0B.js} +1 -1
  12. package/dist/assets/{EnvironmentAssetDocument-C_10a-a0.js → EnvironmentAssetDocument-CGphHTa4.js} +1 -1
  13. package/dist/assets/{GameplaySessionTimeline-BMz5GHq5.js → GameplaySessionTimeline-3O5-N0Mq.js} +1 -1
  14. package/dist/assets/{ImageViewer-CEtC82uC.js → ImageViewer-CPaNjp2K.js} +1 -1
  15. package/dist/assets/InspectorObjectPreview-CBddqApL.js +1 -0
  16. package/dist/assets/{JsonAssetDocument-BjmItF9c.js → JsonAssetDocument-DpuY20Xh.js} +1 -1
  17. package/dist/assets/{LiveModuleDocument-DxsfqWPz.js → LiveModuleDocument-DCUT8W_y.js} +1 -1
  18. package/dist/assets/{LutAssetDocument-BWgoofXc.js → LutAssetDocument-88jyvqQL.js} +1 -1
  19. package/dist/assets/{ModelAssetDocument-CCOUnfNZ.js → ModelAssetDocument-C6aKVWOk.js} +1 -1
  20. package/dist/assets/{NonThreeAuthoringBootstrap-U8pDO_5y.js → NonThreeAuthoringBootstrap-B68s1sia.js} +1 -1
  21. package/dist/assets/Object3DDocumentToolbar-D75tk2dW.js +1 -0
  22. package/dist/assets/Object3DDocumentViewport-Cd1mOnu4.js +2 -0
  23. package/dist/assets/{Object3DPreview-CbcdszHX.js → Object3DPreview-lFm8pGJR.js} +1 -1
  24. package/dist/assets/{OnlineAssetDetail-BaW-VQoM.js → OnlineAssetDetail-D-VEQl7S.js} +1 -1
  25. package/dist/assets/{PlayBar-Dt55-XQi.js → PlayBar-mfBxszI6.js} +1 -1
  26. package/dist/assets/{QuarksAssetDocument-B6NS06Qk.js → QuarksAssetDocument-DsDNaZXY.js} +1 -1
  27. package/dist/assets/{ReactCanvasControls-B3DU4o7S.js → ReactCanvasControls-BO6VQ4VE.js} +1 -1
  28. package/dist/assets/{RootSelectionOverlay-DGhqE3ru.js → RootSelectionOverlay-BDhYO7vB.js} +1 -1
  29. package/dist/assets/{ShaderAssetDocument-C6ew-WgT.js → ShaderAssetDocument-C-JfqCOP.js} +1 -1
  30. package/dist/assets/{ShadowEditor-BTWOn0NH.js → ShadowEditor-BDCAcPPT.js} +1 -1
  31. package/dist/assets/{SourceAssetViewer-BHIPNJyW.js → SourceAssetViewer-BMUvxLky.js} +1 -1
  32. package/dist/assets/{StageHost-CgQvlJ6q.js → StageHost-B6npzI_N.js} +2 -2
  33. package/dist/assets/{StoryPreviewMount-BODkiKx5.js → StoryPreviewMount-zuCAkhXk.js} +1 -1
  34. package/dist/assets/{ThreeBoardDocument-2Hape4Gq.js → ThreeBoardDocument-Cb5ShRia.js} +2 -2
  35. package/dist/assets/{ThreeIsolationSceneContent-DmeEOKni.js → ThreeIsolationSceneContent-DEXiCMdL.js} +1 -1
  36. package/dist/assets/{ToolObject3DPreview-BLUyNI0a.js → ToolObject3DPreview-DlXTrXSy.js} +1 -1
  37. package/dist/assets/{Toolbar-BaTvvAae.js → Toolbar-BcVhV4HO.js} +1 -1
  38. package/dist/assets/{TransientHint-Bf1GHsWL.js → TransientHint-8hS698wl.js} +1 -1
  39. package/dist/assets/{VideoViewer-D_aUwqjA.js → VideoViewer-C3zbvP1D.js} +1 -1
  40. package/dist/assets/{ViewportShadingMenu-C3thhpMD.js → ViewportShadingMenu-_NT1t1ki.js} +1 -1
  41. package/dist/assets/{active-ingest-CPY5d7Ae.js → active-ingest-DmggGh3n.js} +2 -2
  42. package/dist/assets/{animation-clock-BUG7-Hj6.js → animation-clock-BeIuDISw.js} +1 -1
  43. package/dist/assets/{animation-mixers.service-UqRHpBS5.js → animation-mixers.service-ClnMefdL.js} +1 -1
  44. package/dist/assets/{animation-timeline.utility-vjZNsvAC.js → animation-timeline.utility-wI1WPvyu.js} +1 -1
  45. package/dist/assets/{asset-budget-asset.menu-Btshx1dW.js → asset-budget-asset.menu-Dl9OG8Fh.js} +1 -1
  46. package/dist/assets/{asset-budget.action-Jb6hBA39.js → asset-budget.action-2KDAHN2u.js} +1 -1
  47. package/dist/assets/{asset-budget.document-BFWXwNI0.js → asset-budget.document-DoaC9QhG.js} +1 -1
  48. package/dist/assets/{asset-budget.menu-BTPSwcMa.js → asset-budget.menu-CEg_tRrU.js} +1 -1
  49. package/dist/assets/{asset-editor-persistence-CL-0YalT.js → asset-editor-persistence-B97D2j9V.js} +1 -1
  50. package/dist/assets/{asset-loaders-nDvCLina.js → asset-loaders-DZpoMJMz.js} +1 -1
  51. package/dist/assets/{asset-preview-BqLvTtnb.js → asset-preview-DV3GTIQp.js} +1 -1
  52. package/dist/assets/{audio-unlock.service-DnCb3tjQ.js → audio-unlock.service-DsLP5SwR.js} +1 -1
  53. package/dist/assets/{audio.utility-DlkiEBfp.js → audio.utility-BxXUdxvc.js} +1 -1
  54. package/dist/assets/autoplay.service-DIvQKM4s.js +1 -0
  55. package/dist/assets/{babylon-authoring-adapter-CnxkYjhp.js → babylon-authoring-adapter-DOzhuS5E.js} +1 -1
  56. package/dist/assets/{binding-resolver-cWcQuwXj.js → binding-resolver-BlBh8LwO.js} +2 -2
  57. package/dist/assets/{blender-node-editor.document-DIAjTz4F.js → blender-node-editor.document-DvHMzTBg.js} +1 -1
  58. package/dist/assets/{blender-properties-tab-DXuz6Cpg.js → blender-properties-tab-DRUdVFzY.js} +1 -1
  59. package/dist/assets/{blender-runtime-host-CJwNrADC.js → blender-runtime-host-BByeSIlt.js} +1 -1
  60. package/dist/assets/{blender-runtime-skin-6IzekhAd.js → blender-runtime-skin-BgzfURUq.js} +2 -2
  61. package/dist/assets/{blender-runtime.document-Rf7NwTan.js → blender-runtime.document-D87p65XR.js} +7 -7
  62. package/dist/assets/{blender-screenshot.menu-CZagx_wX.js → blender-screenshot.menu-DoZuxwnq.js} +1 -1
  63. package/dist/assets/{blender-timeline.document-DzhgQIDL.js → blender-timeline.document-WR5C1UGa.js} +1 -1
  64. package/dist/assets/{blender-uv-editor.document-ClearI2D.js → blender-uv-editor.document-fTHqxbQ0.js} +1 -1
  65. package/dist/assets/{blender-version.status-BkFPoDDf.js → blender-version.status-C2QHqECl.js} +1 -1
  66. package/dist/assets/{blender.command-BrtEn062.js → blender.command-DGS-5fDC.js} +1 -1
  67. package/dist/assets/{board-guides-D-k2cJcJ.js → board-guides-b_JfsCO5.js} +1 -1
  68. package/dist/assets/{bridge.command-CgLcpLfB.js → bridge.command-C8-Yd-JC.js} +3 -3
  69. package/dist/assets/{browserAll-CGgcubIt.js → browserAll-DM6xi90e.js} +1 -1
  70. package/dist/assets/{build-player.document-DhIDZKN-.js → build-player.document-BW6tw_fH.js} +1 -1
  71. package/dist/assets/{build-profiles.document-3r5ZhcB2.js → build-profiles.document-DSMeMXxo.js} +1 -1
  72. package/dist/assets/{build-progress.status-B1PXTSq7.js → build-progress.status-BeOlYvcH.js} +1 -1
  73. package/dist/assets/{build-session-ulklRzSk.js → build-session-jrsTLfm0.js} +1 -1
  74. package/dist/assets/{build.action-B5miC2Fi.js → build.action-TyqPgrOs.js} +1 -1
  75. package/dist/assets/{build.command-Cys5G5ZA.js → build.command-CSbsgzp4.js} +1 -1
  76. package/dist/assets/{build.header-BJLJN9mP.js → build.header-aN-vUtOe.js} +1 -1
  77. package/dist/assets/{build.menu-bi39YVfp.js → build.menu-CeIF200u.js} +1 -1
  78. package/dist/assets/{build.service-DC4h7GhW.js → build.service-CpvAEm48.js} +1 -1
  79. package/dist/assets/{camera-B9Y3RW7X.js → camera-DQk7Jyi0.js} +1 -1
  80. package/dist/assets/{camera-runtime.inspector-D22mhDzD.js → camera-runtime.inspector-ByloA_vO.js} +1 -1
  81. package/dist/assets/{canvas-design-mount-Bp3K3717.js → canvas-design-mount-DVWp3O_D.js} +3 -3
  82. package/dist/assets/{canvas-entry-runtime-BHOqndB_.js → canvas-entry-runtime-Ce7wP4vm.js} +2 -2
  83. package/dist/assets/{canvas-preview-frames-2tJZVdS2.js → canvas-preview-frames-CHeT2IAu.js} +1 -1
  84. package/dist/assets/{canvas-story-capture.service-DANEGQnC.js → canvas-story-capture.service-C8vmQA9c.js} +2 -2
  85. package/dist/assets/{capability-coverage-BOaPg0KC.js → capability-coverage-O6aDzS_g.js} +1 -1
  86. package/dist/assets/{collaboration-presence-CaATXsiz.js → collaboration-presence-crxzmNq2.js} +1 -1
  87. package/dist/assets/{collider-DZkp1rvK.js → collider-c4USWOsu.js} +1 -1
  88. package/dist/assets/{component-board.service-CwKm1aEc.js → component-board.service-B9lXv1G_.js} +2 -2
  89. package/dist/assets/{component-board.service-Bba7cD7r.js → component-board.service-BC-X4fpN.js} +2 -2
  90. package/dist/assets/{component-board.service-CDeqmtPt.js → component-board.service-CXaTAE3i.js} +2 -2
  91. package/dist/assets/{component-contracts.service-kh4-IF8j.js → component-contracts.service-B7TyW4yG.js} +1 -1
  92. package/dist/assets/{component-instance-root-JAQpC4Pi.js → component-instance-root-C1Xyh79V.js} +1 -1
  93. package/dist/assets/{component-verbs.command-DNG8KytX.js → component-verbs.command-_1qrRMBb.js} +1 -1
  94. package/dist/assets/{component-verbs.service-CQCmsdNk.js → component-verbs.service-DiGB6WpZ.js} +1 -1
  95. package/dist/assets/{config-D8XyIZPl.js → config-b-yIYDNm.js} +2 -2
  96. package/dist/assets/{configurations-Bzh9kmrk.js → configurations-Nuyn3MCc.js} +1 -1
  97. package/dist/assets/{connection.status-ChQR4f5Y.js → connection.status-DsqpfunN.js} +1 -1
  98. package/dist/assets/{constraints.inspector-Ddo1UQNJ.js → constraints.inspector-D97NPk_2.js} +1 -1
  99. package/dist/assets/{content-bounds-B_xPBrsP.js → content-bounds-DetzUl3q.js} +1 -1
  100. package/dist/assets/{contract-system-adapters-C1oaetXB.js → contract-system-adapters-BOybM-Sv.js} +1 -1
  101. package/dist/assets/{coverage.service-DIQXHW6Q.js → coverage.service-C8DuZbAJ.js} +1 -1
  102. package/dist/assets/{create-runtime-BQdKNIfc.js → create-runtime-C232YTVD.js} +1 -1
  103. package/dist/assets/{curve-BEKFgt87.js → curve-DVwdpVlr.js} +1 -1
  104. package/dist/assets/{data-asset-BZA163so.js → data-asset-DWShrZTd.js} +1 -1
  105. package/dist/assets/{data-ref-BUMaOgK6.js → data-ref-mlP7PknV.js} +1 -1
  106. package/dist/assets/{debug-bridge-B8Do4Q6K.js → debug-bridge-BgNHixNJ.js} +1 -1
  107. package/dist/assets/{debug-registry-CoiJ_gHM.js → debug-registry-CS3ZmHpb.js} +1 -1
  108. package/dist/assets/{deferred-ingest-play-DJeWQ-He.js → deferred-ingest-play-Br7lD74w.js} +2 -2
  109. package/dist/assets/{design-time-canvas-mount-B_5sxSjq.js → design-time-canvas-mount-BxG0btu3.js} +2 -2
  110. package/dist/assets/{design-time-layers-Bspf2qH5.js → design-time-layers-C2fW3RP2.js} +1 -1
  111. package/dist/assets/{design-time-mount.service-038G1MnB.js → design-time-mount.service-CZpbFfg4.js} +2 -2
  112. package/dist/assets/{design-time-mount.service-BE5vpW1Y.js → design-time-mount.service-RwUW68DY.js} +2 -2
  113. package/dist/assets/{design-time-react-mount--CifCE6t.js → design-time-react-mount-DsV5z0NJ.js} +1 -1
  114. package/dist/assets/{document-preview-three-D46Hv_l-.js → document-preview-three-Cw1dnqQJ.js} +1 -1
  115. package/dist/assets/{dom-authoring-adapter-CI_qQmaE.js → dom-authoring-adapter-CCGflNez.js} +1 -1
  116. package/dist/assets/{draco3d-FJXe8NCw.js → draco3d-MAZHlZsV.js} +1 -1
  117. package/dist/assets/{edit-mode-audio.service-qKdc6y7a.js → edit-mode-audio.service-ir8WvTus.js} +1 -1
  118. package/dist/assets/{edit-mode-authoring-C0sf0ewd.js → edit-mode-authoring-CFh9mf99.js} +1 -1
  119. package/dist/assets/{edit-mode-networking.service-D-eLZBVJ.js → edit-mode-networking.service-KUb9s9m1.js} +1 -1
  120. package/dist/assets/{editor-api-DeTJ2F2f.js → editor-api-Di5jF1jM.js} +1 -1
  121. package/dist/assets/{editor-layers-B43PZgUF.js → editor-layers-JmP4C0fP.js} +1 -1
  122. package/dist/assets/{editor-shell-store-CW9Fjab9.js → editor-shell-store-BRBXaK6_.js} +1 -1
  123. package/dist/assets/{entity-object-C40NpVSX.js → entity-object-FbYj5hy6.js} +1 -1
  124. package/dist/assets/{extend-CB1ggOZp.js → extend-B8RJQ5RF.js} +1 -1
  125. package/dist/assets/{fork-menu-ByAv7gfK.js → fork-menu-Djl0ZpaE.js} +1 -1
  126. package/dist/assets/{frame-debugger-store-BOL6rL6i.js → frame-debugger-store-CKHjhO2u.js} +1 -1
  127. package/dist/assets/{game-contract-seams-Dq1YiGya.js → game-contract-seams-BfTLgo42.js} +1 -1
  128. package/dist/assets/{game-css-scope-transform-zF8z1rZz.js → game-css-scope-transform-Cj0iqoul.js} +1 -1
  129. package/dist/assets/{game-document.service-DlSkuYvA.js → game-document.service-C240l1eg.js} +1 -1
  130. package/dist/assets/{game-eval.command-Cnr70bCU.js → game-eval.command-CE54gmgT.js} +1 -1
  131. package/dist/assets/{game-module-access-Pz5cgPiz.js → game-module-access-BvOoy6np.js} +1 -1
  132. package/dist/assets/{game-network-D8nKKSRC.js → game-network-C7J9j85F.js} +3 -3
  133. package/dist/assets/{gameplay-export-FFcX1OzU.js → gameplay-export-BPVDdtiT.js} +1 -1
  134. package/dist/assets/{gameplay-replay-CVwLaTax.js → gameplay-replay-CMWloPvb.js} +1 -1
  135. package/dist/assets/{gameplay.command-64STQYm4.js → gameplay.command-BGYQD9oQ.js} +1 -1
  136. package/dist/assets/{generation-jobs-BOOUx41p.js → generation-jobs-BQRS91CG.js} +1 -1
  137. package/dist/assets/{generation.service-BJn-hOAW.js → generation.service-DYDb6ud0.js} +1 -1
  138. package/dist/assets/{generations-BuBWfmYF.js → generations-J9oJcT7T.js} +1 -1
  139. package/dist/assets/{generations.status-Cw7FBmHO.js → generations.status-7KG9Txty.js} +1 -1
  140. package/dist/assets/{hierarchy-marks-r1SCnl92.js → hierarchy-marks-DWnBwmhe.js} +1 -1
  141. package/dist/assets/{hosted-asset-materialization-CCfM8rX8.js → hosted-asset-materialization-BRC2G7NT.js} +1 -1
  142. package/dist/assets/{index-C5X85WM3.js → index--o2s6am1.js} +1 -1
  143. package/dist/assets/{index-CiKYIRrk.js → index-BO3sy09K.js} +1 -1
  144. package/dist/assets/{index-EO6Vl92s.js → index-BT8W9a7k.js} +266 -266
  145. package/dist/assets/{index-CRFTAXpT.js → index-BXMdqkmO.js} +1 -1
  146. package/dist/assets/{index-DNuUwvUR.js → index-BnDSegwv.js} +1 -1
  147. package/dist/assets/{index-DnZE2Fb2.js → index-BvBIQ7OC.js} +1 -1
  148. package/dist/assets/{index-tsU_SOUL.js → index-CIdT41XG.js} +1 -1
  149. package/dist/assets/{index-BTlpcjdl.js → index-DL2Takj5.js} +2 -2
  150. package/dist/assets/{index-CDTbPbQM.js → index-EWucKHMo.js} +1 -1
  151. package/dist/assets/{inference-diagnostics-18bkEAju.js → inference-diagnostics-C2jsr-K4.js} +1 -1
  152. package/dist/assets/{ingest-boot-viewport-BuSUroou.js → ingest-boot-viewport-DhLjnn8m.js} +1 -1
  153. package/dist/assets/{ingest-siblings-B3ExLPmT.js → ingest-siblings-nIImQgug.js} +1 -1
  154. package/dist/assets/{ingest-source-persistence-C2eN6TUG.js → ingest-source-persistence-BSy_j1I6.js} +1 -1
  155. package/dist/assets/{ingest.service-DPCT2mkC.js → ingest.service-BRJsVkle.js} +1 -1
  156. package/dist/assets/{inspect-BqpAh85y.js → inspect-CewZ8N7e.js} +1 -1
  157. package/dist/assets/instances.command-CLmaRUbS.js +1 -0
  158. package/dist/assets/{json-history-resource-BjCvVkMa.js → json-history-resource-Kth9eAdl.js} +1 -1
  159. package/dist/assets/{layered-pick-Ciu7uLFh.js → layered-pick-Ba5bN3pV.js} +1 -1
  160. package/dist/assets/{light-CXcgEBDG.js → light-CELsbQVq.js} +1 -1
  161. package/dist/assets/{live-project-verbs-BBbF8usb.js → live-project-verbs-puMj_ac5.js} +1 -1
  162. package/dist/assets/{machine.document-Bdci5A4S.js → machine.document-PU1D7pGw.js} +1 -1
  163. package/dist/assets/{machines.finder-CvEKAnGk.js → machines.finder-DC3vmPmt.js} +1 -1
  164. package/dist/assets/{material-ClpgTT47.js → material-Dzm1eZh1.js} +1 -1
  165. package/dist/assets/{material-factory-Df67vZ1z.js → material-factory-BgBGneoy.js} +1 -1
  166. package/dist/assets/{mesh-DkaFE4sY.js → mesh-BlgI7C6P.js} +1 -1
  167. package/dist/assets/{model-asset-sections.service-CBOHxNFe.js → model-asset-sections.service-itY21Ju0.js} +1 -1
  168. package/dist/assets/{model-inspection-DcL5cH7Y.js → model-inspection-CNvWXEly.js} +1 -1
  169. package/dist/assets/{model-thumbnail-C6YzkBEi.js → model-thumbnail-BOFnggyX.js} +1 -1
  170. package/dist/assets/{models.finder-DfEs64WT.js → models.finder-t8DwGJSQ.js} +1 -1
  171. package/dist/assets/{module-mode-f-SD3z04.js → module-mode-DlvLWvyZ.js} +2 -2
  172. package/dist/assets/{mount-canvas-ingest-root-BnxcPl2U.js → mount-canvas-ingest-root-BQ7FEyTX.js} +2 -2
  173. package/dist/assets/{mount-dom-ingest-root-CfwImvJz.js → mount-dom-ingest-root-DRIY0mwS.js} +2 -2
  174. package/dist/assets/{mount-ingest-root-Dh6Z1uso.js → mount-ingest-root-BgFa-gMa.js} +2 -2
  175. package/dist/assets/{mount-manifest-CAxRLPYT.js → mount-manifest-CNy0ulXi.js} +1 -1
  176. package/dist/assets/{mount-three-ingest-root-CoqxTpZB.js → mount-three-ingest-root-02iAM15N.js} +1 -1
  177. package/dist/assets/{mounted-authoring-DfEm9qgt.js → mounted-authoring-B4MQTZte.js} +1 -1
  178. package/dist/assets/{mounted-story-viewport-source-WBFaoqod.js → mounted-story-viewport-source-D1uicpwC.js} +1 -1
  179. package/dist/assets/{native-debug-module-piwWLOP6.js → native-debug-module-zuPnGFn7.js} +1 -1
  180. package/dist/assets/{navigation-DYa_HSby.js → navigation-DiBo4eih.js} +1 -1
  181. package/dist/assets/{navmesh.menu-B0MJEIPE.js → navmesh.menu-BfZu5XcC.js} +1 -1
  182. package/dist/assets/{navmesh.service-BpsPIRLZ.js → navmesh.service-DqXGRph3.js} +1 -1
  183. package/dist/assets/network-observer.service-D25O4Z1u.js +1 -0
  184. package/dist/assets/{network.utility-DMr-AxKs.js → network.utility-B9bsTu3h.js} +1 -1
  185. package/dist/assets/{object3d-document-session-registry-3YUZT4RT.js → object3d-document-session-registry-DOBWYBmc.js} +2 -2
  186. package/dist/assets/{oid-transform-DsAJ1P8o.js → oid-transform-AhgVgFiI.js} +1 -1
  187. package/dist/assets/{particles-vZ9UmSDz.js → particles-CnyBA4U4.js} +1 -1
  188. package/dist/assets/{pixi-authoring-adapter-QT0kN-JP.js → pixi-authoring-adapter-HA__hq94.js} +1 -1
  189. package/dist/assets/{pixi-live-write-target-DM9cdS1_.js → pixi-live-write-target-Bs9OTI_x.js} +1 -1
  190. package/dist/assets/{play.command-DH2eNjdZ.js → play.command-SXE_KYU-.js} +2 -2
  191. package/dist/assets/{presentation-VcgXp-GO.js → presentation-CrrrfvP9.js} +1 -1
  192. package/dist/assets/{product-x_cfmfQ9.js → product-7prSWXZy.js} +1 -1
  193. package/dist/assets/{profiler.action-C3xlnyom.js → profiler.action-Dd1_MPEk.js} +1 -1
  194. package/dist/assets/{profiler.menu-DSUi8xT3.js → profiler.menu-CwZGsLvP.js} +1 -1
  195. package/dist/assets/{profiler.utility-BRSMJoGZ.js → profiler.utility-CXhlEiq8.js} +1 -1
  196. package/dist/assets/{project-authoring-session-CwEQV0bP.js → project-authoring-session-Dxi88QnW.js} +2 -2
  197. package/dist/assets/{properties-bone-constraints.inspector-Ct1jO5Ue.js → properties-bone-constraints.inspector-DuDWHYs-.js} +1 -1
  198. package/dist/assets/{properties-bone.inspector-DxGQlndA.js → properties-bone.inspector-BCpk3uPl.js} +1 -1
  199. package/dist/assets/{properties-collection.inspector-lK30X7Jh.js → properties-collection.inspector-z8O9BBRd.js} +1 -1
  200. package/dist/assets/{properties-constraints.inspector-Da8piE2V.js → properties-constraints.inspector-4saiH8Ro.js} +1 -1
  201. package/dist/assets/{properties-data.inspector-WI4fuv2D.js → properties-data.inspector-CVDOVZny.js} +1 -1
  202. package/dist/assets/{properties-material.inspector-CQwIjVw1.js → properties-material.inspector-DZtnbfCQ.js} +1 -1
  203. package/dist/assets/{properties-modifiers.inspector-BzQAh_u0.js → properties-modifiers.inspector-PRa6MD_F.js} +1 -1
  204. package/dist/assets/{properties-object.inspector-Du6jNcII.js → properties-object.inspector-DFFp41qh.js} +1 -1
  205. package/dist/assets/{properties-output.inspector-BQzIXPdl.js → properties-output.inspector-CYJmwpKr.js} +1 -1
  206. package/dist/assets/{properties-particles.inspector-C-lSFNSf.js → properties-particles.inspector-BTB6ISve.js} +1 -1
  207. package/dist/assets/{properties-physics.inspector-CwC0aupw.js → properties-physics.inspector-CwxYUTIE.js} +1 -1
  208. package/dist/assets/{properties-render.inspector-D0P3nYYJ.js → properties-render.inspector-DUDAxNw2.js} +1 -1
  209. package/dist/assets/{properties-scene.inspector-bM362PAU.js → properties-scene.inspector-DNNmsuNN.js} +1 -1
  210. package/dist/assets/{properties-texture.inspector-8ucuWCLj.js → properties-texture.inspector-DD6bWfQ4.js} +1 -1
  211. package/dist/assets/{properties-view-layer.inspector-DWOu3YE3.js → properties-view-layer.inspector-CA235i54.js} +1 -1
  212. package/dist/assets/{properties-world.inspector-BDTb__xL.js → properties-world.inspector-CdTyWS-3.js} +1 -1
  213. package/dist/assets/{r3f-design-session-gQuaJFCS.js → r3f-design-session-mIAk6fZ_.js} +2 -2
  214. package/dist/assets/{r3f-physics-binding-CFwn2dZ0.js → r3f-physics-binding-DivDhpIZ.js} +1 -1
  215. package/dist/assets/{r3f-source-authoring-adapter-DhFdCSs7.js → r3f-source-authoring-adapter-BU7HGqw5.js} +1 -1
  216. package/dist/assets/{react-canvas-navigation-VKHmF9L9.js → react-canvas-navigation-DqwQuzs1.js} +1 -1
  217. package/dist/assets/{react-inspector.service-DheFnb_w.js → react-inspector.service-BO6zvtnm.js} +1 -1
  218. package/dist/assets/{react-story-board-BdHhG7gL.js → react-story-board-BIV6SjrH.js} +1 -1
  219. package/dist/assets/{react-three-rapier.esm-W_y4UeT-.js → react-three-rapier.esm-cTqJ0Ab9.js} +1 -1
  220. package/dist/assets/{react-world-authoring-adapter-Cey0R-Ml.js → react-world-authoring-adapter-C1Pf_Ti4.js} +1 -1
  221. package/dist/assets/{realm-services-Bw73w74M.js → realm-services-CLLV-0p7.js} +1 -1
  222. package/dist/assets/{reflection-probe-capture.inspector-Dqj4TwMY.js → reflection-probe-capture.inspector-B_A9WjRQ.js} +1 -1
  223. package/dist/assets/{registry-DCdpQPdB.js → registry-hs8ynXgD.js} +1 -1
  224. package/dist/assets/{relative-import-specifier-DjG-Lv03.js → relative-import-specifier-D8ICYdXp.js} +1 -1
  225. package/dist/assets/{render-env-D12b4e03.js → render-env-CCwOJnKi.js} +1 -1
  226. package/dist/assets/{render-features-w9Z-Cv_p.js → render-features-PxgXd53t.js} +1 -1
  227. package/dist/assets/{render-settings-CGDwkhhL.js → render-settings-DoSjRl16.js} +1 -1
  228. package/dist/assets/{resolve-three-Bl4aEdGL.js → resolve-three-CJYxqrQD.js} +3 -3
  229. package/dist/assets/{root-seam-contract-Dx597Ute.js → root-seam-contract-Hpt_EoHH.js} +1 -1
  230. package/dist/assets/{run-selection-D-nxwjch.js → run-selection-B28D0dVZ.js} +1 -1
  231. package/dist/assets/{scene-capture-BYzNQlcZ.js → scene-capture-BdnKEkty.js} +1 -1
  232. package/dist/assets/{scene-document.service-DvdbtjUB.js → scene-document.service-DNoSvWoe.js} +2 -2
  233. package/dist/assets/{scene-framing-zyo6Dgey.js → scene-framing-B-Zvn5pm.js} +1 -1
  234. package/dist/assets/{seeded-random-BcjdE8-O.js → seeded-random-BscHstMm.js} +1 -1
  235. package/dist/assets/{setup-renderer-BoEjWIJ6.js → setup-renderer-D2Jvr2h9.js} +1 -1
  236. package/dist/assets/{source-object3d-authoring-adapter-D-mc1Hsq.js → source-object3d-authoring-adapter-Dk4cjzFm.js} +1 -1
  237. package/dist/assets/{source-persistence-backend-DPS956_W.js → source-persistence-backend-Bs_c6UA-.js} +1 -1
  238. package/dist/assets/{stage-keyboard-DD-47U0X.js → stage-keyboard-DmoIXoIV.js} +1 -1
  239. package/dist/assets/{stage-overlay-set-jLin7LCZ.js → stage-overlay-set-iu8AeZPy.js} +1 -1
  240. package/dist/assets/{stage-presence-markers-BzL60lxC.js → stage-presence-markers-B_QEEO-M.js} +1 -1
  241. package/dist/assets/{stage-transform-tools-CXEtn6e_.js → stage-transform-tools-B4_Vna3u.js} +1 -1
  242. package/dist/assets/{standard-viewport-dressing-DzgsLMqH.js → standard-viewport-dressing-Cqc3upSK.js} +1 -1
  243. package/dist/assets/{state-watch.action-C0r205X2.js → state-watch.action-DwbqOYJb.js} +1 -1
  244. package/dist/assets/{state-watch.menu-CIOq9XcQ.js → state-watch.menu-C9pu3XfU.js} +1 -1
  245. package/dist/assets/{state-watch.utility-B5Mps4k8.js → state-watch.utility-SzNyBG5Z.js} +1 -1
  246. package/dist/assets/{story-capture-BL_OEjAJ.js → story-capture-RxFtvptE.js} +1 -1
  247. package/dist/assets/{story-documents-uyxMmUzs.js → story-documents-RnpVbpMP.js} +1 -1
  248. package/dist/assets/{story-documents.service-Cu17YnfS.js → story-documents.service-C7UNDFG9.js} +1 -1
  249. package/dist/assets/{story-documents.service-L9mW5dVf.js → story-documents.service-DFbzVaKv.js} +1 -1
  250. package/dist/assets/{story-media-presence-CsYCXCgg.js → story-media-presence-D8aagE7-.js} +1 -1
  251. package/dist/assets/{story-pixi-preview-BaS3gW36.js → story-pixi-preview-DD5zQqGj.js} +1 -1
  252. package/dist/assets/{story-presentation-Inb0tF8V.js → story-presentation-DCpop4w8.js} +1 -1
  253. package/dist/assets/{story-three-preview-N78COIhD.js → story-three-preview-CHq5WHPd.js} +2 -2
  254. package/dist/assets/{studio-environment-BRMTYTp1.js → studio-environment-ChEwdjoc.js} +1 -1
  255. package/dist/assets/{surface-state-l4D0tVlT.js → surface-state-CFqL5gLs.js} +1 -1
  256. package/dist/assets/{syntactic-prop-specs-DOQMV1SJ.js → syntactic-prop-specs-MmHU8Snh.js} +1 -1
  257. package/dist/assets/{team-playtest.service-CHIX8ZaT.js → team-playtest.service-BMRamJM8.js} +1 -1
  258. package/dist/assets/{three-DItubEyv.js → three-HBDNjMxy.js} +1 -1
  259. package/dist/assets/{three-authoring-adapter-jGnbMYIc.js → three-authoring-adapter-OKrj_Yfz.js} +1 -1
  260. package/dist/assets/three-authoring.service-DOFfbQ1i.js +2 -0
  261. package/dist/assets/{three-ingest-runtime-DlApOywz.js → three-ingest-runtime-DhyHlcLT.js} +1 -1
  262. package/dist/assets/{three-integration-lFHyckTb.js → three-integration-B_X1dRN3.js} +2 -2
  263. package/dist/assets/three-integration.service-Ddy-s__9.js +1 -0
  264. package/dist/assets/{three-projection-core-Bsu421K7.js → three-projection-core-BQjGIfYP.js} +1 -1
  265. package/dist/assets/{three-state-15gXjQ51.js → three-state-BPIdxcKm.js} +1 -1
  266. package/dist/assets/{three-story-capture.service-B369fV1j.js → three-story-capture.service-qwUNAWlj.js} +2 -2
  267. package/dist/assets/{three-story-model-D8xXaW4_.js → three-story-model-B6RT2tEb.js} +1 -1
  268. package/dist/assets/{three-viewport-presentation-DlCyoe_E.js → three-viewport-presentation-jvn1ownx.js} +5 -5
  269. package/dist/assets/{transform-mode-request-BT4Zmx_G.js → transform-mode-request-DSr__Uu7.js} +1 -1
  270. package/dist/assets/{transport-strip-DHbAk_5x.js → transport-strip-B3s-LzLC.js} +1 -1
  271. package/dist/assets/transport.header-CrVGCDtt.js +1 -0
  272. package/dist/assets/{tuples-BcU64Mu6.js → tuples-C31jYZT7.js} +1 -1
  273. package/dist/assets/{ui-board-document-CptsO8E6.js → ui-board-document-Cfpw8u3U.js} +2 -2
  274. package/dist/assets/{user-data-DnahhlAD.js → user-data-CqubllMS.js} +1 -1
  275. package/dist/assets/{utility-view-state-GfzV3cfg.js → utility-view-state-3zmxNFCA.js} +1 -1
  276. package/dist/assets/{viewport-door-Dbl8EH3p.js → viewport-door-BQlwQEp5.js} +1 -1
  277. package/dist/assets/{viewport-root-presentation-CG43sAj5.js → viewport-root-presentation-ds37zRH-.js} +1 -1
  278. package/dist/assets/{viewport-surface-status-C9vuKKQB.js → viewport-surface-status-CVu88cZ8.js} +1 -1
  279. package/dist/assets/{webworkerAll-DE92JZIw.js → webworkerAll-DfTIWQX5.js} +1 -1
  280. package/dist/assets/{workspace-arrangement-COs530TA.js → workspace-arrangement-B1xtK850.js} +1 -1
  281. package/dist/assets/{world-documents-80AAIyS9.js → world-documents-RmUr_mpg.js} +1 -1
  282. package/dist/assets/{world-root-stage-binding-umHFwInD.js → world-root-stage-binding-BAbAZClT.js} +1 -1
  283. package/dist/assets/{xstate-animation-binding-_aMqz-nR.js → xstate-animation-binding-D46iVstj.js} +1 -1
  284. package/dist/assets/{xstate-animation-meta-CzxfXjaY.js → xstate-animation-meta-DoZp29qk.js} +1 -1
  285. package/dist-node/cli.js +16 -16
  286. package/package.json +16 -16
  287. package/dist/assets/InspectorObjectPreview-CO8cF8ht.js +0 -1
  288. package/dist/assets/Object3DDocumentToolbar-CJE4T3cC.js +0 -1
  289. package/dist/assets/Object3DDocumentViewport-CmgIuzQv.js +0 -2
  290. package/dist/assets/autoplay.service-CJv46a1s.js +0 -1
  291. package/dist/assets/instances.command-BTMfzHFj.js +0 -1
  292. package/dist/assets/network-observer.service-CBgzPOhw.js +0 -1
  293. package/dist/assets/three-authoring.service-UK1utJDS.js +0 -2
  294. package/dist/assets/three-integration.service-CvbLexeR.js +0 -1
  295. package/dist/assets/transport.header-D6MQXDZh.js +0 -1
@@ -1 +1 @@
1
- import{dr as c,ds as u,dt as l,du as f,dv as m}from"./index-EO6Vl92s.js";function g(t,r){if(t.setTransformMode(r),r==="select")return;const n=[...t.selectedEntityIds];if(n.length===0)return;const s=c(t),a=((s===null?null:u(s)?.adapter)??l(t).adapter).transforms?.editability;if(!a)return;let e;for(const i of n){const o=f(d=>a(i,d));if(!o.locked)return;e??=o.reason}e&&m(e)}export{g as r};
1
+ import{dr as c,ds as u,dt as l,du as f,dv as m}from"./index-BT8W9a7k.js";function g(t,r){if(t.setTransformMode(r),r==="select")return;const n=[...t.selectedEntityIds];if(n.length===0)return;const s=c(t),a=((s===null?null:u(s)?.adapter)??l(t).adapter).transforms?.editability;if(!a)return;let e;for(const i of n){const o=f(d=>a(i,d));if(!o.locked)return;e??=o.reason}e&&m(e)}export{g as r};
@@ -1 +1 @@
1
- import{a as l}from"./jsx-runtime-DPjLkJKQ.js";import{r as c}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{al as b,aM as v,a7 as x,a8 as r,aN as j,aL as i}from"./index-EO6Vl92s.js";const S=[.25,.5,1,2];function y(a,s){const t=Math.round(a*s);return`${a.toFixed(2)}s · f${t}`}function E({transport:a}){const s=c.useSyncExternalStore(c.useCallback(e=>a?a.subscribe(e):()=>{},[a]),c.useCallback(()=>a?.snapshot()??null,[a]));if(!a||!s||s.activeSubject===null)return null;const t=s.driver==="world",n=s.playbackState==="playing",{start:h,end:m,fps:o,loop:g}=s.range,d=s.subjects.find(e=>e.id===s.activeSubject),p=s.subjects.length>1?s.subjects:null,u=a.activeClips();return l.jsxs("section",{"aria-label":"Transport","data-testid":"stage-transport-strip",style:{display:"flex",alignItems:"center",gap:"var(--volter-space-2)",padding:"var(--volter-space-1) var(--volter-space-3)",borderTop:`var(--volter-stroke-resting) solid ${b.boundary.default}`,background:b.surface.raised},children:[l.jsx(v,{size:"compact","aria-label":n?"Pause":"Play",disabled:t,onClick:()=>n?a.pause():a.play(),children:l.jsx(x,{icon:n?r.transport.pause:r.transport.play})}),l.jsx(v,{size:"compact","aria-label":"Stop",disabled:t,onClick:()=>a.stop(),children:l.jsx(x,{icon:r.transport.stop})}),l.jsx(j,{"aria-label":"Playhead",type:"range",min:h,max:m,step:1/o,value:s.time,disabled:t,onChange:e=>a.seek(Number(e.target.value)),style:{flex:1}}),l.jsx(i,{as:"span",variant:"caption",children:y(s.time,o)}),p?l.jsx("select",{"aria-label":"Subject",value:s.activeSubject,disabled:t,onChange:e=>a.setActiveSubject(e.target.value),children:p.map(e=>l.jsx("option",{value:e.id,children:e.label},e.id))}):null,u?l.jsx("select",{"aria-label":"Clip",disabled:t,onChange:e=>a.setActiveClip(e.target.value),children:u.map(e=>l.jsx("option",{value:e.id,children:e.label},e.id))}):null,l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"var(--volter-space-1)"},children:[l.jsx("input",{type:"checkbox",checked:g,disabled:t,onChange:e=>a.setLoop(e.target.checked)}),l.jsx(i,{as:"span",variant:"caption",children:"Loop"})]}),l.jsx("select",{"aria-label":"Speed",value:String(s.timeScale),disabled:t,onChange:e=>a.setTimeScale(Number(e.target.value)),children:S.map(e=>l.jsxs("option",{value:String(e),children:[e,"×"]},e))}),t?l.jsx(i,{as:"span",variant:"caption",children:"The world is driving time (Play); pause the game to scrub"}):d?l.jsx(i,{as:"span",variant:"caption",children:d.label}):null]})}export{E as T};
1
+ import{a as l}from"./jsx-runtime-DPjLkJKQ.js";import{r as c}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{al as b,aM as v,a7 as x,a8 as r,aN as j,aL as i}from"./index-BT8W9a7k.js";const S=[.25,.5,1,2];function y(a,s){const t=Math.round(a*s);return`${a.toFixed(2)}s · f${t}`}function E({transport:a}){const s=c.useSyncExternalStore(c.useCallback(e=>a?a.subscribe(e):()=>{},[a]),c.useCallback(()=>a?.snapshot()??null,[a]));if(!a||!s||s.activeSubject===null)return null;const t=s.driver==="world",n=s.playbackState==="playing",{start:h,end:m,fps:o,loop:g}=s.range,d=s.subjects.find(e=>e.id===s.activeSubject),p=s.subjects.length>1?s.subjects:null,u=a.activeClips();return l.jsxs("section",{"aria-label":"Transport","data-testid":"stage-transport-strip",style:{display:"flex",alignItems:"center",gap:"var(--volter-space-2)",padding:"var(--volter-space-1) var(--volter-space-3)",borderTop:`var(--volter-stroke-resting) solid ${b.boundary.default}`,background:b.surface.raised},children:[l.jsx(v,{size:"compact","aria-label":n?"Pause":"Play",disabled:t,onClick:()=>n?a.pause():a.play(),children:l.jsx(x,{icon:n?r.transport.pause:r.transport.play})}),l.jsx(v,{size:"compact","aria-label":"Stop",disabled:t,onClick:()=>a.stop(),children:l.jsx(x,{icon:r.transport.stop})}),l.jsx(j,{"aria-label":"Playhead",type:"range",min:h,max:m,step:1/o,value:s.time,disabled:t,onChange:e=>a.seek(Number(e.target.value)),style:{flex:1}}),l.jsx(i,{as:"span",variant:"caption",children:y(s.time,o)}),p?l.jsx("select",{"aria-label":"Subject",value:s.activeSubject,disabled:t,onChange:e=>a.setActiveSubject(e.target.value),children:p.map(e=>l.jsx("option",{value:e.id,children:e.label},e.id))}):null,u?l.jsx("select",{"aria-label":"Clip",disabled:t,onChange:e=>a.setActiveClip(e.target.value),children:u.map(e=>l.jsx("option",{value:e.id,children:e.label},e.id))}):null,l.jsxs("label",{style:{display:"flex",alignItems:"center",gap:"var(--volter-space-1)"},children:[l.jsx("input",{type:"checkbox",checked:g,disabled:t,onChange:e=>a.setLoop(e.target.checked)}),l.jsx(i,{as:"span",variant:"caption",children:"Loop"})]}),l.jsx("select",{"aria-label":"Speed",value:String(s.timeScale),disabled:t,onChange:e=>a.setTimeScale(Number(e.target.value)),children:S.map(e=>l.jsxs("option",{value:String(e),children:[e,"×"]},e))}),t?l.jsx(i,{as:"span",variant:"caption",children:"The world is driving time (Play); pause the game to scrub"}):d?l.jsx(i,{as:"span",variant:"caption",children:d.label}):null]})}export{E as T};
@@ -0,0 +1 @@
1
+ import{a as o}from"./jsx-runtime-DPjLkJKQ.js";import{r as t}from"./index-BT8W9a7k.js";import{r as m}from"./index-nmcBqr7Y.js";import{P as p}from"./PlayBar-mfBxszI6.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-Nuyn3MCc.js";import"./run-selection-B28D0dVZ.js";import"./game-network-C7J9j85F.js";import"./index-OZVqp6xS.js";import"./index-Da9JhEvW.js";import"./native-debug-module-zuPnGFn7.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-CS3ZmHpb.js";import"./contract-system-adapters-BOybM-Sv.js";import"./game-contract-seams-BfTLgo42.js";import"./seeded-random-BscHstMm.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-puMj_ac5.js";import"./capability-coverage-O6aDzS_g.js";import"./edit-mode-authoring-CFh9mf99.js";import"./json-history-resource-Kth9eAdl.js";import"./binding-resolver-BlBh8LwO.js";import"./adapter-surface-Y37Nzcyw.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./realm-services-CLLV-0p7.js";import"./canvas-entry-runtime-Ce7wP4vm.js";import"./three-ingest-runtime-DhyHlcLT.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-DmggGh3n.js";import"./ingest-source-persistence-BSy_j1I6.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-ds37zRH-.js";import"./mounted-authoring-B4MQTZte.js";import"./entity-object-FbYj5hy6.js";import"./user-data-CqubllMS.js";import"./workspace-arrangement-B1xtK850.js";import"./three-contract-Dkt6PmWY.js";import"./three-HBDNjMxy.js";import"./editor-layers-JmP4C0fP.js";import"./component-instance-root-C1Xyh79V.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-authoring-adapter-OKrj_Yfz.js";import"./source-persistence-backend-Bs_c6UA-.js";import"./three-projection-core-BQjGIfYP.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-DivDhpIZ.js";import"./deferred-ingest-play-Br7lD74w.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-C1Pf_Ti4.js";import"./board-guides-b_JfsCO5.js";import"./relative-import-specifier-D8ICYdXp.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-CewZ8N7e.js";import"./inference-diagnostics-C2jsr-K4.js";import"./writer-tw6EcuVO.js";import"./three-state-BPIdxcKm.js";import"./editor-shell-store-BRBXaK6_.js";import"./output-pass-HurwNl0G.js";import"./viewport-door-BQlwQEp5.js";import"./game-surface-defaults-D8S4cRxi.js";const Dr="workspace.header",Fr=0;function Gr(){const{project:r}=t();return m.useSyncExternalStore(r.subscribe,r.mounts,r.mounts)?o.jsx(p,{}):null}export{Gr as default,Fr as order,Dr as point};
@@ -1 +1 @@
1
- import{e2 as e,c6 as o,u as r}from"./index-EO6Vl92s.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const t=e([o(),o(),o()]).describe("3D vector as [x, y, z]"),i=e([o(),o(),o(),o()]).describe("Quaternion as [x, y, z, w]"),u=r({position:t.optional().describe("World-space position [x, y, z]"),rotation:i.optional().describe("Rotation quaternion [x, y, z, w]"),scale:t.optional().describe("Scale factor per axis [x, y, z]. Defaults to [1, 1, 1]")}).describe("Local transform relative to parent entity");export{i as QuatSchema,u as TransformSchema,t as Vec3Schema};
1
+ import{e2 as e,c6 as o,u as r}from"./index-BT8W9a7k.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const t=e([o(),o(),o()]).describe("3D vector as [x, y, z]"),i=e([o(),o(),o(),o()]).describe("Quaternion as [x, y, z, w]"),u=r({position:t.optional().describe("World-space position [x, y, z]"),rotation:i.optional().describe("Rotation quaternion [x, y, z, w]"),scale:t.optional().describe("Scale factor per axis [x, y, z]. Defaults to [1, 1, 1]")}).describe("Local transform relative to parent entity");export{i as QuatSchema,u as TransformSchema,t as Vec3Schema};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/story-capture-BL_OEjAJ.js","assets/react-story-board-BdHhG7gL.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-EO6Vl92s.js","assets/index-FUuS4qwW.js","assets/client-DNXj_opT.js","assets/index-CPiRKiDC.css","assets/bitmap-label-Ct4k6ehY.js","assets/StoryPreviewMount-BODkiKx5.js","assets/story-presentation-Inb0tF8V.js"])))=>i.map(i=>d[i]);
2
- import{dK as s,as as m,dL as p,aC as n,_ as c,ba as d}from"./index-EO6Vl92s.js";import{a as u}from"./jsx-runtime-DPjLkJKQ.js";import{d as l,p as v,r as P}from"./design-time-layers-Bspf2qH5.js";import{RootDocumentContent as _}from"./world-documents-80AAIyS9.js";import{U as w}from"./component-board.service-CwKm1aEc.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-C0sf0ewd.js";import"./design-time-mount-registry-DUpXCg1U.js";import"./react-story-board-BdHhG7gL.js";import"./game-surface-defaults-D8S4cRxi.js";import"./react-canvas-navigation-VKHmF9L9.js";import"./component-board-registry-DrIa2csL.js";import"./surface-state-l4D0tVlT.js";import"./board-guides-D-k2cJcJ.js";import"./CanvasSceneViewport-lY7d92L2.js";import"./RootSelectionOverlay-DGhqE3ru.js";import"./eyedropper-session-bjPXnfeX.js";import"./layered-pick-Ciu7uLFh.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./inspect-BqpAh85y.js";import"./inference-diagnostics-18bkEAju.js";import"./Toolbar-BaTvvAae.js";import"./transform-mode-request-BT4Zmx_G.js";import"./TransientHint-Bf1GHsWL.js";import"./ReactCanvasControls-B3DU4o7S.js";import"./story-media-presence-CsYCXCgg.js";const y={revision:()=>JSON.stringify(d().map(({id:i,modulePath:t})=>[i,t])),subscribe:m,capture:async({width:i,height:t})=>{const{captureDomStoryBoardPreview:o}=await c(async()=>{const{captureDomStoryBoardPreview:e}=await import("./story-capture-BL_OEjAJ.js");return{captureDomStoryBoardPreview:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]));return o(i,t)}};function Z({store:i,composite:t}){const o=l(t).find(r=>r.kind==="dom")??v(),e=r=>u.jsx(_,{...r,composite:t,descriptor:o,store:i});s({id:p,title:w,kind:"world",workspaceRole:"authored-subject",provenance:{rootId:o.worldId,...o.path?{sourcePath:o.path}:{}},Content:e,preview:y,presentation:()=>{const r=n()?.rootPath,a=r?P(r,o.worldId):void 0;return{kind:"workspace",id:p,...a?{story:a}:{}}}},{category:"canvas",default:!t.childAdapters().some(r=>r.kind==="three"||r.kind==="canvas")})}export{Z as installUiBoard};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/story-capture-RxFtvptE.js","assets/react-story-board-BIV6SjrH.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-BT8W9a7k.js","assets/index-FUuS4qwW.js","assets/client-DNXj_opT.js","assets/index-CPiRKiDC.css","assets/bitmap-label-Ct4k6ehY.js","assets/StoryPreviewMount-zuCAkhXk.js","assets/story-presentation-DCpop4w8.js"])))=>i.map(i=>d[i]);
2
+ import{dK as s,as as m,dL as p,aC as n,_ as c,ba as d}from"./index-BT8W9a7k.js";import{a as u}from"./jsx-runtime-DPjLkJKQ.js";import{d as l,p as v,r as P}from"./design-time-layers-C2fW3RP2.js";import{RootDocumentContent as _}from"./world-documents-RmUr_mpg.js";import{U as w}from"./component-board.service-B9lXv1G_.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-CFh9mf99.js";import"./design-time-mount-registry-DUpXCg1U.js";import"./react-story-board-BIV6SjrH.js";import"./game-surface-defaults-D8S4cRxi.js";import"./react-canvas-navigation-DqwQuzs1.js";import"./component-board-registry-DrIa2csL.js";import"./surface-state-CFqL5gLs.js";import"./board-guides-b_JfsCO5.js";import"./CanvasSceneViewport-DdIbRDvz.js";import"./RootSelectionOverlay-BDhYO7vB.js";import"./eyedropper-session-bjPXnfeX.js";import"./layered-pick-Ba5bN3pV.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./inspect-CewZ8N7e.js";import"./inference-diagnostics-C2jsr-K4.js";import"./Toolbar-BcVhV4HO.js";import"./transform-mode-request-DSr__Uu7.js";import"./TransientHint-8hS698wl.js";import"./ReactCanvasControls-BO6VQ4VE.js";import"./story-media-presence-D8aagE7-.js";const y={revision:()=>JSON.stringify(d().map(({id:i,modulePath:t})=>[i,t])),subscribe:m,capture:async({width:i,height:t})=>{const{captureDomStoryBoardPreview:o}=await c(async()=>{const{captureDomStoryBoardPreview:e}=await import("./story-capture-RxFtvptE.js");return{captureDomStoryBoardPreview:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]));return o(i,t)}};function Z({store:i,composite:t}){const o=l(t).find(r=>r.kind==="dom")??v(),e=r=>u.jsx(_,{...r,composite:t,descriptor:o,store:i});s({id:p,title:w,kind:"world",workspaceRole:"authored-subject",provenance:{rootId:o.worldId,...o.path?{sourcePath:o.path}:{}},Content:e,preview:y,presentation:()=>{const r=n()?.rootPath,a=r?P(r,o.worldId):void 0;return{kind:"workspace",id:p,...a?{story:a}:{}}}},{category:"canvas",default:!t.childAdapters().some(r=>r.kind==="three"||r.kind==="canvas")})}export{Z as installUiBoard};
@@ -1 +1 @@
1
- import{O as n}from"./workspace-arrangement-COs530TA.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-B1xtK850.js";const r={...n,entityId:"entityId",forward:"forward",tags:"tags",attributes:"attributes",navRole:"navRole",pivot:"pivot",splineCurve:"splineCurve",splineControlPoint:"splineControlPoint",_camera:"_camera",_particleSystem:"_particleSystem",gaussianSplat:"gaussianSplat",__sharedGeometry:"__sharedGeometry",__shadeOrig:"__shadeOrig",__shadeUnlit:"__shadeUnlit",__ingest:"__ingest",__ingestNextId:"__ingestNextId",authoringRoot:"authoringRoot",authoringInstance:"authoringInstance",authoringLabel:"authoringLabel",authoringComponent:"authoringComponent",authoringDocument:"authoringDocument",authoringHierarchyId:"authoringHierarchyId",authoringHierarchyParentId:"authoringHierarchyParentId",authoringHierarchyOrder:"authoringHierarchyOrder",editorIcon:"editorIcon",envObject:"envObject",constraints:"constraints",authoringSubject:"authoringSubject",reflectionProbe:"reflectionProbe",triggerVolume:"triggerVolume",vcDirIdx:"vcDirIdx"};function o(t,e){return t?t.userData[r[e]]:void 0}function s(t,e,a){t.userData[r[e]]=a}function u(t,e){return t?t.userData[r[e]]!==void 0:!1}export{o as g,u as h,s};
@@ -1 +1 @@
1
- import{aa as l}from"./index-EO6Vl92s.js";function a(c,i){let t=i,s=0;const r=new Set,o=()=>{s++;for(const e of r)e()},n=e=>{t!==e&&(t=e,o())};return{subscribe(e){return r.add(e),()=>{r.delete(e)}},version:()=>s,active:()=>t,select:n,open(e){n(e),l(c)},notify:o,reset(){t=i,o()}}}const p=a("tool:profiler.utility","profiler");export{p};
1
+ import{aa as l}from"./index-BT8W9a7k.js";function a(c,i){let t=i,s=0;const r=new Set,o=()=>{s++;for(const e of r)e()},n=e=>{t!==e&&(t=e,o())};return{subscribe(e){return r.add(e),()=>{r.delete(e)}},version:()=>s,active:()=>t,select:n,open(e){n(e),l(c)},notify:o,reset(){t=i,o()}}}const p=a("tool:profiler.utility","profiler");export{p};
@@ -1 +1 @@
1
- import{y as w}from"./index-EO6Vl92s.js";const s=new Map,f=new Map;function g(e){let t=f.get(e);return t||(t={frameListeners:new Set,helpers:new Map},f.set(e,t)),t}const l=new Set,c=new Set;function i(){for(const t of s.values())if(t.presenting)return t;const e=w();if(e!==null){const t=s.get(e);if(t)return t}return s.values().next().value??null}let a=null;function p(){a=null;const e=v();for(const t of c)t(e)}function h(e,t){const n=g(e);return{documentId:e,rig:()=>s.get(e)?.rig??t,setHelper:(r,o)=>{n.helpers.set(r,o),s.get(e)?.setHelper(r,o)},onFrame:r=>(n.frameListeners.add(r),()=>{n.frameListeners.delete(r)})}}function S(e,t,n,r){const o=g(r.documentId),u={documentId:r.documentId,rig:e,present:t,setHelper:n,frameListeners:o.frameListeners,helpers:o.helpers,presenting:!1};s.set(r.documentId,u);for(const[d,m]of u.helpers)n(d,m);return p(),()=>{s.get(r.documentId)===u&&(s.delete(r.documentId),p())}}function I(e,t){const n=i();n&&(n.helpers.set(e,t),n.setHelper(e,t))}function V(){return i()?.rig??null}function y(e){const t=i();if(!t)return null;const n=t.present(e);if(!n)return null;t.presenting=!0;let r=!1;return{worldId:n.worldId,dispose:()=>{r||(r=!0,t.presenting=!1),n.dispose()}}}function F(e){return l.add(e),()=>{l.delete(e)}}function v(){return a||(a=[...s.values()].map(e=>h(e.documentId,e.rig))),a}function H(e){const t=f.get(e);return t?[...t.helpers].filter(([,n])=>n!==null).map(([n])=>n):[]}function b(e){return c.add(e),()=>{c.delete(e)}}function x(e,t){const n=s.get(e);if(n){for(const r of n.frameListeners)r(t);if(i()===n)for(const r of l)r(t)}}export{V as a,v as b,S as c,F as d,b as o,y as p,x as r,I as s,H as v};
1
+ import{y as w}from"./index-BT8W9a7k.js";const s=new Map,f=new Map;function g(e){let t=f.get(e);return t||(t={frameListeners:new Set,helpers:new Map},f.set(e,t)),t}const l=new Set,c=new Set;function i(){for(const t of s.values())if(t.presenting)return t;const e=w();if(e!==null){const t=s.get(e);if(t)return t}return s.values().next().value??null}let a=null;function p(){a=null;const e=v();for(const t of c)t(e)}function h(e,t){const n=g(e);return{documentId:e,rig:()=>s.get(e)?.rig??t,setHelper:(r,o)=>{n.helpers.set(r,o),s.get(e)?.setHelper(r,o)},onFrame:r=>(n.frameListeners.add(r),()=>{n.frameListeners.delete(r)})}}function S(e,t,n,r){const o=g(r.documentId),u={documentId:r.documentId,rig:e,present:t,setHelper:n,frameListeners:o.frameListeners,helpers:o.helpers,presenting:!1};s.set(r.documentId,u);for(const[d,m]of u.helpers)n(d,m);return p(),()=>{s.get(r.documentId)===u&&(s.delete(r.documentId),p())}}function I(e,t){const n=i();n&&(n.helpers.set(e,t),n.setHelper(e,t))}function V(){return i()?.rig??null}function y(e){const t=i();if(!t)return null;const n=t.present(e);if(!n)return null;t.presenting=!0;let r=!1;return{worldId:n.worldId,dispose:()=>{r||(r=!0,t.presenting=!1),n.dispose()}}}function F(e){return l.add(e),()=>{l.delete(e)}}function v(){return a||(a=[...s.values()].map(e=>h(e.documentId,e.rig))),a}function H(e){const t=f.get(e);return t?[...t.helpers].filter(([,n])=>n!==null).map(([n])=>n):[]}function b(e){return c.add(e),()=>{c.delete(e)}}function x(e,t){const n=s.get(e);if(n){for(const r of n.frameListeners)r(t);if(i()===n)for(const r of l)r(t)}}export{V as a,v as b,S as c,F as d,b as o,y as p,x as r,I as s,H as v};
@@ -1 +1 @@
1
- import{s}from"./mounted-authoring-DfEm9qgt.js";import{s as u}from"./three-DItubEyv.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-B4MQTZte.js";import{s as u}from"./three-HBDNjMxy.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{al as i}from"./index-EO6Vl92s.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{al as i}from"./index-BT8W9a7k.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-BTlpcjdl.js";import"./index-EO6Vl92s.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-DL2Takj5.js";import"./index-BT8W9a7k.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{ty as n,tz as l,tA as a,tB as _,tC as i,tD as s,tE as d,tF as u,tG as c,tH as b,tI as p}from"./index-EO6Vl92s.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"})),M=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),v=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"})),C=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,M as p,v as r,g as s,R as t,C as w};
1
+ import{ty as n,tz as l,tA as a,tB as _,tC as i,tD as s,tE as d,tF as u,tG as c,tH as b,tI as p}from"./index-BT8W9a7k.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"})),M=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),v=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"})),C=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,M as p,v as r,g as s,R as t,C as w};
@@ -1 +1 @@
1
- import{a as c}from"./jsx-runtime-DPjLkJKQ.js";import{dB as W,dC as K,e4 as j,fo as H,aK as E,f_ as $,f$ as Y,d3 as A,g0 as q,d4 as M,eF as N,dK as Q,y as J,g1 as Z,aQ as ee,g2 as te,g3 as oe,g4 as ne,g5 as re,g6 as se,g7 as ae,fX as ie,d6 as ce,g8 as le,aD as de,g9 as P,ga as ue,dI as pe}from"./index-EO6Vl92s.js";import{r as p}from"./index-nmcBqr7Y.js";import{d as fe,m as me}from"./design-time-layers-Bspf2qH5.js";import{I as be,B as xe}from"./edit-mode-authoring-C0sf0ewd.js";import{b as he,i as ge}from"./react-canvas-navigation-VKHmF9L9.js";import{R as z,i as ve}from"./react-story-board-BdHhG7gL.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 Ie}from"./surface-state-l4D0tVlT.js";import"./index-CtzuWnCS.js";import{c as Ce,d as Ee,r as F,e as G,f as Ae,m as O,b as De,a as je,s as Be}from"./board-guides-D-k2cJcJ.js";import{C as V,a as $e,b as Me}from"./CanvasSceneViewport-lY7d92L2.js";import{R as _e}from"./ReactCanvasControls-B3DU4o7S.js";import{R as ze}from"./RootSelectionOverlay-DGhqE3ru.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-BaTvvAae.js";import"./transform-mode-request-BT4Zmx_G.js";import"./TransientHint-Bf1GHsWL.js";import"./layered-pick-Ciu7uLFh.js";import"./eyedropper-session-bjPXnfeX.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./inspect-BqpAh85y.js";import"./inference-diagnostics-18bkEAju.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 L(s){return Math.abs(s)>=1e3?`${s/1e3}k`:String(s)}function Ne({docId:s,containerRef:l}){const n=p.useSyncExternalStore(W,K),x=p.useSyncExternalStore(Ce,()=>Ee(s)),[r,d]=p.useState(null),v=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))},I=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),g=Math.ceil(f(y,t)/i)*i,w=f(e,t),b=[];for(let C=g;C<=w&&b.length<200;C+=i)b.push(C);return b},h={position:"absolute",background:U,zIndex:61,userSelect:"none",touchAction:"none",overflow:"hidden"};return c.jsxs("div",{ref:v,"data-testid":"board-rulers",style:{position:"absolute",inset:0,pointerEvents:"none",zIndex:60},onPointerMove:R,onPointerUp:I,children:[x.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:I,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:L(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:L(t)})},t))}),c.jsx(Pe,{}),c.jsx("div",{style:{...h,top:0,left:0,width:y,height:y,borderRight:`1px solid ${j.border}`,borderBottom:`1px solid ${j.border}`}})]})}function Pe(){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:x,store:r}){const d=p.useRef(null),v=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,I]=p.useState(null),a=l.childAdapters().find(b=>b.worldId===n.worldId)?.adapter??R??void 0,h=u&&a?.provenance?.label==="babylon",t=a?.hierarchy.roots()??[],o=new Set(a?.rects?.emptyContainers?.().map(b=>b.id)??[]),e=t.some(b=>!o.has(b.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 xe?a.disclosure:null});p.useEffect(()=>{if(a)return ie(x,()=>({adapter:a,nodeId:[...r.selectedEntityIds].find(b=>a.hierarchy.node(b))??null}))},[l,a,x,r]),p.useEffect(()=>{const b=d.current;if(b&&!h)return u?he(b,m):ge(b,m)},[m,h,u]),p.useEffect(()=>{if(!s)return;if(!!!v.current&&d.current){v.current=me(d.current,l,r,[n],(Ve,X)=>I(X),u?{canvasSceneView:f}:void 0,x);return}let C=0,B=0;const T=()=>{if(C+=1,C<2){B=requestAnimationFrame(T);return}pe(x)};return B=requestAnimationFrame(T),()=>cancelAnimationFrame(B)},[s,f,l,n,x,u,r]),p.useEffect(()=>()=>{v.current?.(),v.current=null},[]);const g=le(de(r),r.selectedEntityIds),w=g?.worldId===n.worldId?g: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:x}):c.jsx(Oe,{}),c.jsx(ze,{...a?{adapter:a}:{},...u&&!h?{view:f,transformModeAware:!0,presentationId:x}:{}},`selection:${P(a)}`),c.jsx(Ie,{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:x},`controls:${P(a)}`):c.jsxs(c.Fragment,{children:[c.jsx(Ne,{docId:n.worldId,containerRef:d}),c.jsx(_e,{containerRef:d,context:w})]})]})}function Oe(){const s=p.useSyncExternalStore(W,K),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, ${ve} ${n}px, transparent ${n}px)`,backgroundPosition:`${s.x}px ${s.y}px`,backgroundSize:`${l}px ${l}px`}})}function vt(s,l){const n=J(),x=l.childAdapters().some(e=>e.role==="world"&&e.kind==="three"),r=l.childAdapters().some(e=>e.kind===be);!x&&!r&&H(E,{discardDirty:!0});const d=new Set,v=[];let f=!1;for(const e of l.childAdapters())e.role==="world"&&e.kind==="three"&&v.push($(e.worldId,E));const u=fe(l),m=u.find(e=>e.kind==="canvas");m&&v.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 g=$(e.worldId,i.documentId),w=Z(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(),g()})}}v.push(Y(e=>{const i=ee();if(i.some(w=>w.descriptor.id===e))return null;const g=ke(e);return g?g.presence()==="absent"?g.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 I(e){const i=g=>c.jsx(Ge,{...g,composite:l,descriptor:e,store:s});Q({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:!x,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 g=d.has(e.documentId);i==="present"!==g&&(i==="present"?a(e):(N(e.documentId),d.delete(e.documentId)))}}}m&&(I(m),d.add(A)),h();const t=ye(h),o=m?A:[...d][0];return te()||(!x&&o!==void 0&&(n===null||n===E||n===q)?M(o):n?M(n):x&&M(E)),()=>{f=!0,t();for(const e of v)e();for(const e of S.values())e();S.clear();for(const e of d)N(e)}}export{Ge as RootDocumentContent,vt as installRootDocuments};
1
+ import{a as c}from"./jsx-runtime-DPjLkJKQ.js";import{dB as W,dC as K,e4 as j,fo as H,aK as E,f_ as $,f$ as Y,d3 as A,g0 as q,d4 as M,eF as N,dK as Q,y as J,g1 as Z,aQ as ee,g2 as te,g3 as oe,g4 as ne,g5 as re,g6 as se,g7 as ae,fX as ie,d6 as ce,g8 as le,aD as de,g9 as P,ga as ue,dI as pe}from"./index-BT8W9a7k.js";import{r as p}from"./index-nmcBqr7Y.js";import{d as fe,m as me}from"./design-time-layers-C2fW3RP2.js";import{I as be,B as xe}from"./edit-mode-authoring-CFh9mf99.js";import{b as he,i as ge}from"./react-canvas-navigation-DqwQuzs1.js";import{R as z,i as ve}from"./react-story-board-BIV6SjrH.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 Ie}from"./surface-state-CFqL5gLs.js";import"./index-CtzuWnCS.js";import{c as Ce,d as Ee,r as F,e as G,f as Ae,m as O,b as De,a as je,s as Be}from"./board-guides-b_JfsCO5.js";import{C as V,a as $e,b as Me}from"./CanvasSceneViewport-DdIbRDvz.js";import{R as _e}from"./ReactCanvasControls-BO6VQ4VE.js";import{R as ze}from"./RootSelectionOverlay-BDhYO7vB.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-BcVhV4HO.js";import"./transform-mode-request-DSr__Uu7.js";import"./TransientHint-8hS698wl.js";import"./layered-pick-Ba5bN3pV.js";import"./eyedropper-session-bjPXnfeX.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./inspect-CewZ8N7e.js";import"./inference-diagnostics-C2jsr-K4.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 L(s){return Math.abs(s)>=1e3?`${s/1e3}k`:String(s)}function Ne({docId:s,containerRef:l}){const n=p.useSyncExternalStore(W,K),x=p.useSyncExternalStore(Ce,()=>Ee(s)),[r,d]=p.useState(null),v=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))},I=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),g=Math.ceil(f(y,t)/i)*i,w=f(e,t),b=[];for(let C=g;C<=w&&b.length<200;C+=i)b.push(C);return b},h={position:"absolute",background:U,zIndex:61,userSelect:"none",touchAction:"none",overflow:"hidden"};return c.jsxs("div",{ref:v,"data-testid":"board-rulers",style:{position:"absolute",inset:0,pointerEvents:"none",zIndex:60},onPointerMove:R,onPointerUp:I,children:[x.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:I,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:L(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:L(t)})},t))}),c.jsx(Pe,{}),c.jsx("div",{style:{...h,top:0,left:0,width:y,height:y,borderRight:`1px solid ${j.border}`,borderBottom:`1px solid ${j.border}`}})]})}function Pe(){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:x,store:r}){const d=p.useRef(null),v=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,I]=p.useState(null),a=l.childAdapters().find(b=>b.worldId===n.worldId)?.adapter??R??void 0,h=u&&a?.provenance?.label==="babylon",t=a?.hierarchy.roots()??[],o=new Set(a?.rects?.emptyContainers?.().map(b=>b.id)??[]),e=t.some(b=>!o.has(b.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 xe?a.disclosure:null});p.useEffect(()=>{if(a)return ie(x,()=>({adapter:a,nodeId:[...r.selectedEntityIds].find(b=>a.hierarchy.node(b))??null}))},[l,a,x,r]),p.useEffect(()=>{const b=d.current;if(b&&!h)return u?he(b,m):ge(b,m)},[m,h,u]),p.useEffect(()=>{if(!s)return;if(!!!v.current&&d.current){v.current=me(d.current,l,r,[n],(Ve,X)=>I(X),u?{canvasSceneView:f}:void 0,x);return}let C=0,B=0;const T=()=>{if(C+=1,C<2){B=requestAnimationFrame(T);return}pe(x)};return B=requestAnimationFrame(T),()=>cancelAnimationFrame(B)},[s,f,l,n,x,u,r]),p.useEffect(()=>()=>{v.current?.(),v.current=null},[]);const g=le(de(r),r.selectedEntityIds),w=g?.worldId===n.worldId?g: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:x}):c.jsx(Oe,{}),c.jsx(ze,{...a?{adapter:a}:{},...u&&!h?{view:f,transformModeAware:!0,presentationId:x}:{}},`selection:${P(a)}`),c.jsx(Ie,{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:x},`controls:${P(a)}`):c.jsxs(c.Fragment,{children:[c.jsx(Ne,{docId:n.worldId,containerRef:d}),c.jsx(_e,{containerRef:d,context:w})]})]})}function Oe(){const s=p.useSyncExternalStore(W,K),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, ${ve} ${n}px, transparent ${n}px)`,backgroundPosition:`${s.x}px ${s.y}px`,backgroundSize:`${l}px ${l}px`}})}function vt(s,l){const n=J(),x=l.childAdapters().some(e=>e.role==="world"&&e.kind==="three"),r=l.childAdapters().some(e=>e.kind===be);!x&&!r&&H(E,{discardDirty:!0});const d=new Set,v=[];let f=!1;for(const e of l.childAdapters())e.role==="world"&&e.kind==="three"&&v.push($(e.worldId,E));const u=fe(l),m=u.find(e=>e.kind==="canvas");m&&v.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 g=$(e.worldId,i.documentId),w=Z(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(),g()})}}v.push(Y(e=>{const i=ee();if(i.some(w=>w.descriptor.id===e))return null;const g=ke(e);return g?g.presence()==="absent"?g.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 I(e){const i=g=>c.jsx(Ge,{...g,composite:l,descriptor:e,store:s});Q({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:!x,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 g=d.has(e.documentId);i==="present"!==g&&(i==="present"?a(e):(N(e.documentId),d.delete(e.documentId)))}}}m&&(I(m),d.add(A)),h();const t=ye(h),o=m?A:[...d][0];return te()||(!x&&o!==void 0&&(n===null||n===E||n===q)?M(o):n?M(n):x&&M(E)),()=>{f=!0,t();for(const e of v)e();for(const e of S.values())e();S.clear();for(const e of d)N(e)}}export{Ge as RootDocumentContent,vt as installRootDocuments};
@@ -1 +1 @@
1
- import{a as i}from"./jsx-runtime-DPjLkJKQ.js";import{EDITOR_LAYER as Ke}from"./editor-layers-B43PZgUF.js";import{df as Oe,a7 as V,bN as Ye,aL as te,bw as $,aM as G,kJ as Je,bM as Ze,bP as et,a6 as Q,h1 as tt,hF as rt,j_ as nt,kK as ot,Z as j,K as st,ci as at,kL as Se,cx as it,kM as ct,kN as lt,kO as ut,kP as Ce,kQ as xe,aD as x,cU as dt,kR as mt,cq as pt,cv as ft,kS as Pe,kT as Ee,kU as je,kV as ht,al as gt,kW as bt,kX as ke,dI as vt,kY as wt,kZ as yt,j3 as St,iV as Ct,iW as xt,gM as Pt,gN as Et,j1 as jt,g4 as kt,g5 as Tt,g6 as At,g7 as Rt}from"./index-EO6Vl92s.js";import{s as Mt,o as Vt}from"./object3d-document-session-registry-3YUZT4RT.js";import{R as Ot}from"./RootSelectionOverlay-DGhqE3ru.js";import{e as Lt,S as Ft}from"./surface-state-l4D0tVlT.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 U,t as Wt,p as Le,v as Ae,b as Nt,e as _t,l as Dt,i as Qt}from"./camera-authoring-DYjhU5Zp.js";import{c as $t}from"./performance-profiler-CMbwGBuk.js";import{m as Gt}from"./renderer-ownership-BovSEcLv.js";import{applyWorldRendererConfig as Ut}from"./renderer-config-CaPR4dB_.js";import{getUserData as Fe}from"./user-data-CODoGZqA.js";import{detectKtx2Support as Bt}from"./loader-BTUKnX5Q.js";import{resolveRenderSettings as Ht}from"./render-settings-CGDwkhhL.js";import{createSoftParticleDepthPass as qt}from"./soft-particle-depth-DNGwWJ8c.js";import{ViewportShadingRenderer as Xt}from"./viewport-shading-D9BMDb1N.js";import{applyRendererSettings as Kt,applySceneRenderPipeline as Yt}from"./setup-renderer-BoEjWIJ6.js";import{EffectComposer as Jt,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-CwEQV0bP.js";import"./three-integration-lFHyckTb.js";import{registerPresentedCanvasFrame as ir}from"./canvas-preview-frames-2tJZVdS2.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-DlCyoe_E.js";import{a as Z}from"./entity-object-C40NpVSX.js";import{w as vr}from"./editor-shell-store-CW9Fjab9.js";import{p as wr}from"./viewport-root-presentation-CG43sAj5.js";import{d as yr}from"./asset-editor-persistence-CL-0YalT.js";import{bindStagePresenceMarkers as Sr}from"./stage-presence-markers-BzL60lxC.js";import{el as Cr,_ as ee,fo as D,d7 as xr,dp as Re}from"./three.core-3arARmh6.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./workspace-arrangement-COs530TA.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-Ciu7uLFh.js";import"./root-stacking-BEd9ZvxC.js";import"./react-story-board-BdHhG7gL.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./inspect-BqpAh85y.js";import"./inference-diagnostics-18bkEAju.js";import"./object-marks-BnvSuCTt.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./render-features-w9Z-Cv_p.js";import"./matcap-texture-Dm2c-VQa.js";import"./defaults-DKiBJCPN.js";import"./edit-mode-authoring-C0sf0ewd.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-DnahhlAD.js";import"./model-thumbnail-C6YzkBEi.js";import"./studio-environment-BRMTYTp1.js";import"./three-state-15gXjQ51.js";import"./hierarchy-marks-r1SCnl92.js";import"./component-instance-root-JAQpC4Pi.js";import"./three-contract-Dkt6PmWY.js";import"./viewport-door-Dbl8EH3p.js";import"./content-bounds-B_xPBrsP.js";import"./asset-preview-BqLvTtnb.js";import"./bitmap-label-Ct4k6ehY.js";import"./index-BTlpcjdl.js";import"./standard-viewport-dressing-DzgsLMqH.js";import"./clip-planes-CnAI6DZn.js";import"./three-DItubEyv.js";import"./model-inspection-DcL5cH7Y.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-zyo6Dgey.js";import"./live-mixers-B-bwLZ7c.js";import"./output-pass-HurwNl0G.js";import"./Pass-D1MRT672.js";import"./mounted-authoring-DfEm9qgt.js";import"./collaboration-presence-CaATXsiz.js";function Pr({previewRef:r}){const{preview:e,previewPinned:s}=U(),[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:Ye,size:"sm"}),i.jsx(te,{variant:"label",truncate:!0,className:"volter-camera-preview-title",title:`${e.name} · ${e.lens}`,children:e.name}),i.jsx($,{text:s?"Unpin camera preview":"Pin camera preview",children:i.jsx(G,{"aria-label":s?"Unpin camera preview":"Pin camera preview","aria-pressed":s,size:"compact",onClick:Wt,children:i.jsx(V,{icon:Je,size:"sm"})})}),i.jsxs("div",{ref:a,className:"volter-camera-preview-menu-anchor",children:[i.jsx($,{text:"Camera actions",children:i.jsx(G,{"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(Q,{variant:"ghost",size:"compact",disabled:!e.canAuthorPose,title:e.poseRefusal,onClick:()=>{c(!1),Le(e)},children:"Pilot Camera"}),i.jsx(Q,{variant:"ghost",size:"compact",onClick:()=>{c(!1),Ae(e)},children:"View Through Camera"}),i.jsx(Q,{variant:"ghost",size:"compact",disabled:!e.canAuthorPose,title:e.poseRefusal,onClick:()=>{c(!1),Nt(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}=U();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($,{text:e?"Hide composition guides":"Show composition guides",children:i.jsx(G,{"aria-label":e?"Hide composition guides":"Show composition guides","aria-pressed":e,size:"compact",onClick:_t,children:i.jsx(V,{icon:nt,size:"sm"})})}),s?null:i.jsx(Q,{size:"compact",variant:"primary",disabled:!r.subject.canAuthorPose,title:r.subject.poseRefusal,onClick:()=>Le(r.subject),children:"Pilot"}),i.jsx($,{text:"Exit camera view",children:i.jsx(G,{"aria-label":"Exit camera view",size:"compact",onClick:Dt,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=Gt(new nr({canvas:o,antialias:!!Ht(void 0).antialias,powerPreference:"high-performance"}));return Kt(u,void 0,m),u.setSize(c,a),u.shadowMap.type=xr,u.info.autoReset=!1,Bt(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 Nr(r){if(r.isCamera)return r;const e=Fe(r,"_camera");return e?.isCamera?e:null}function _r(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 Dr(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 Qr(r,e,s){const o=e.get(s)??null;if(!o)return null;const c=Nr(o);return c?{id:s,name:o.name||c.name||"Camera",camera:c,lens:_r(c),...Dr(r,s)}:null}function $r(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 Gr(r){const{store:e,documentId:s,container:o,canvas:c,renderer:a,stats:m}=r,u=new Jt(a),E=qt(),O=new Xt,g=$t(),L=Tr(a.getContext()),ze=t=>{g.enabled&&L.begin();try{t()}finally{L.end()}},We=()=>g.enabled?L.poll():null,Ne=ut({id:s,label:"Scene viewport",kind:"scene",profiler:g}),b=new Cr,re=11184810;let B=Ce(c).background??re;b.background=new ee(B);const _e=xe(c,()=>{const t=Ce(c).background??re,l=b.background;l instanceof ee&&l.getHex()===B&&(b.background=new ee(t)),B=t});e.bindScene(b,a);const n=new lr(c,b,e,o,{renderer:a,onlineAssetResolver:Wr,onProjectionChange:ur}),De=n.bindPresentation(s,"world");e.bindScene(b,a,n.batchedRenderer,n.camera),e.setOrbitTarget(n.orbitControls.target);const H=new D,F=new D,ne=new D,oe=()=>{const t=n.renderCamera;t.getWorldPosition(H),n.cameraViewMode==="pilot"?F.copy(n.orbitControls.target):n.cameraViewMode?(t.getWorldDirection(ne),F.copy(H).add(ne.multiplyScalar(10))):F.copy(n.orbitControls.target);const l=t.fov;return{position:H,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="",q=null,h=null,S=null,I=null;const ae=()=>{h&&fr(h,ke(a.domElement))},Qe=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),q?.(),q=null,h&&gr(a,h,S),h=null,S=null,I=null,Yt(u,a,e.scene??b,n.renderCamera,void 0,{basePixelRatio:Math.min(window.devicePixelRatio||1,2),objectMap:e.objectMap,entityTags:$r(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&&(q=Ut(or,a,t))}const ce=()=>{n.setProjection(mr().projection),e.setViewportCamera(n.freeCamera),T()},$e=dr(ce);ce();const X=t=>Qr(x(e.shell),e.objectMap,t);let v=null;const A=()=>{v&&(je(x(e.shell),v),v=null)},le=()=>{const t=U().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=X(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 Ge=Qt({active:()=>e.shell.playState==="stopped"&&e.shell.activeViewportTab==="edit",selected:()=>{const t=e.shell.selectedEntityId;return t?X(t):null},resolve:X,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 D),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 Ue=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 K=new Vr({seedFromGameCamera:()=>{const t=z?.()??null;return!!t&&n.seedFromGameCamera(t)},frameContent:()=>n.focusOnScene()}),fe=()=>{K.cancel(),z=null};n.orbitControls.addEventListener("start",fe);const he=()=>Ir(n.camera,n.orbitControls.target);n.orbitControls.addEventListener("end",he);const Be=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,K.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(),N=!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,U().preview?.camera??null,r.cameraPreview())})})}const He=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}),Y=()=>wt(e.shell)===e.shell;function qe(t,l){if(P)return;if(l&&(W=t),!o.checkVisibility({visibilityProperty:!0,checkVisibilityCSS:!0})){W=t,N=!0,n.resolvePresentation();return}g.beginFrame();const p=t-W,d=p/1e3;Y()&&(m.frameTime=p,m.fps=1e3/p),W=t,k.syncMarkers(d),K.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"),Y()&&(m.drawCalls=a.info.render.calls,m.triangles=a.info.render.triangles),N&&be&&(N=!1,vt(s)),g.endFrame();const w=oe(),C=w.position,y=w.target;Y()&&(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 J,_;async function Xe(t){if(P)return;r.onMountStatus("mounting"),_?.(),_=void 0,J=t,r.onRootIds(t.childAdapters().filter(d=>d.role==="world"&&d.kind==="three").map(d=>d.worldId));const l=sr("three");if(P||J!==t)return;const p=l?await l.mountWorldRootSession({store:e,composite:t,renderer:a}):()=>{};if(P||J!==t){p();return}_=p,P||r.onMountStatus("ready")}const we=ar(e.shell,Xe);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,N=!0}),{scene:b,viewport:n,frame:qe,present:t=>wr(e,t),setHelper:(t,l)=>n.setHelper(t,l),dispose:()=>{P=!0,Ne(),He(),ge.disconnect(),Ue(),Be(),Ge(),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(),_?.(),k.dispose(),O.dispose(),L.dispose(),$e(),Qe(),_e(),De(),h?.selection.clear(),E.dispose(),u.dispose()}}}function Ur({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:Ke})),[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 Br({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(Ur,{store:r,rootIds:c,mountStatus:o})]})}const ko={mountWorldRootSurface:zr,installWorldRootStage:Gr,Overlays:Br};export{ko as worldRootStageBinding};
1
+ import{a as i}from"./jsx-runtime-DPjLkJKQ.js";import{EDITOR_LAYER as Ke}from"./editor-layers-JmP4C0fP.js";import{df as Oe,a7 as V,bN as Ye,aL as te,bw as $,aM as G,kJ as Je,bM as Ze,bP as et,a6 as Q,h1 as tt,hF as rt,j_ as nt,kK as ot,Z as j,K as st,ci as at,kL as Se,cx as it,kM as ct,kN as lt,kO as ut,kP as Ce,kQ as xe,aD as x,cU as dt,kR as mt,cq as pt,cv as ft,kS as Pe,kT as Ee,kU as je,kV as ht,al as gt,kW as bt,kX as ke,dI as vt,kY as wt,kZ as yt,j3 as St,iV as Ct,iW as xt,gM as Pt,gN as Et,j1 as jt,g4 as kt,g5 as Tt,g6 as At,g7 as Rt}from"./index-BT8W9a7k.js";import{s as Mt,o as Vt}from"./object3d-document-session-registry-DOBWYBmc.js";import{R as Ot}from"./RootSelectionOverlay-BDhYO7vB.js";import{e as Lt,S as Ft}from"./surface-state-CFqL5gLs.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 U,t as Wt,p as Le,v as Ae,b as Nt,e as _t,l as Dt,i as Qt}from"./camera-authoring-DYjhU5Zp.js";import{c as $t}from"./performance-profiler-CMbwGBuk.js";import{m as Gt}from"./renderer-ownership-BovSEcLv.js";import{applyWorldRendererConfig as Ut}from"./renderer-config-CaPR4dB_.js";import{getUserData as Fe}from"./user-data-CODoGZqA.js";import{detectKtx2Support as Bt}from"./loader-BTUKnX5Q.js";import{resolveRenderSettings as Ht}from"./render-settings-DoSjRl16.js";import{createSoftParticleDepthPass as qt}from"./soft-particle-depth-DNGwWJ8c.js";import{ViewportShadingRenderer as Xt}from"./viewport-shading-D9BMDb1N.js";import{applyRendererSettings as Kt,applySceneRenderPipeline as Yt}from"./setup-renderer-D2Jvr2h9.js";import{EffectComposer as Jt,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-Dxi88QnW.js";import"./three-integration-B_X1dRN3.js";import{registerPresentedCanvasFrame as ir}from"./canvas-preview-frames-CHeT2IAu.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-jvn1ownx.js";import{a as Z}from"./entity-object-FbYj5hy6.js";import{w as vr}from"./editor-shell-store-BRBXaK6_.js";import{p as wr}from"./viewport-root-presentation-ds37zRH-.js";import{d as yr}from"./asset-editor-persistence-B97D2j9V.js";import{bindStagePresenceMarkers as Sr}from"./stage-presence-markers-B_QEEO-M.js";import{el as Cr,_ as ee,fo as D,d7 as xr,dp as Re}from"./three.core-3arARmh6.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./workspace-arrangement-B1xtK850.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-Ba5bN3pV.js";import"./root-stacking-BEd9ZvxC.js";import"./react-story-board-BIV6SjrH.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./inspect-CewZ8N7e.js";import"./inference-diagnostics-C2jsr-K4.js";import"./object-marks-BnvSuCTt.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./render-features-PxgXd53t.js";import"./matcap-texture-Dm2c-VQa.js";import"./defaults-DKiBJCPN.js";import"./edit-mode-authoring-CFh9mf99.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-CqubllMS.js";import"./model-thumbnail-BOFnggyX.js";import"./studio-environment-ChEwdjoc.js";import"./three-state-BPIdxcKm.js";import"./hierarchy-marks-DWnBwmhe.js";import"./component-instance-root-C1Xyh79V.js";import"./three-contract-Dkt6PmWY.js";import"./viewport-door-BQlwQEp5.js";import"./content-bounds-DetzUl3q.js";import"./asset-preview-DV3GTIQp.js";import"./bitmap-label-Ct4k6ehY.js";import"./index-DL2Takj5.js";import"./standard-viewport-dressing-Cqc3upSK.js";import"./clip-planes-CnAI6DZn.js";import"./three-HBDNjMxy.js";import"./model-inspection-CNvWXEly.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-B-Zvn5pm.js";import"./live-mixers-B-bwLZ7c.js";import"./output-pass-HurwNl0G.js";import"./Pass-D1MRT672.js";import"./mounted-authoring-B4MQTZte.js";import"./collaboration-presence-crxzmNq2.js";function Pr({previewRef:r}){const{preview:e,previewPinned:s}=U(),[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:Ye,size:"sm"}),i.jsx(te,{variant:"label",truncate:!0,className:"volter-camera-preview-title",title:`${e.name} · ${e.lens}`,children:e.name}),i.jsx($,{text:s?"Unpin camera preview":"Pin camera preview",children:i.jsx(G,{"aria-label":s?"Unpin camera preview":"Pin camera preview","aria-pressed":s,size:"compact",onClick:Wt,children:i.jsx(V,{icon:Je,size:"sm"})})}),i.jsxs("div",{ref:a,className:"volter-camera-preview-menu-anchor",children:[i.jsx($,{text:"Camera actions",children:i.jsx(G,{"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(Q,{variant:"ghost",size:"compact",disabled:!e.canAuthorPose,title:e.poseRefusal,onClick:()=>{c(!1),Le(e)},children:"Pilot Camera"}),i.jsx(Q,{variant:"ghost",size:"compact",onClick:()=>{c(!1),Ae(e)},children:"View Through Camera"}),i.jsx(Q,{variant:"ghost",size:"compact",disabled:!e.canAuthorPose,title:e.poseRefusal,onClick:()=>{c(!1),Nt(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}=U();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($,{text:e?"Hide composition guides":"Show composition guides",children:i.jsx(G,{"aria-label":e?"Hide composition guides":"Show composition guides","aria-pressed":e,size:"compact",onClick:_t,children:i.jsx(V,{icon:nt,size:"sm"})})}),s?null:i.jsx(Q,{size:"compact",variant:"primary",disabled:!r.subject.canAuthorPose,title:r.subject.poseRefusal,onClick:()=>Le(r.subject),children:"Pilot"}),i.jsx($,{text:"Exit camera view",children:i.jsx(G,{"aria-label":"Exit camera view",size:"compact",onClick:Dt,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=Gt(new nr({canvas:o,antialias:!!Ht(void 0).antialias,powerPreference:"high-performance"}));return Kt(u,void 0,m),u.setSize(c,a),u.shadowMap.type=xr,u.info.autoReset=!1,Bt(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 Nr(r){if(r.isCamera)return r;const e=Fe(r,"_camera");return e?.isCamera?e:null}function _r(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 Dr(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 Qr(r,e,s){const o=e.get(s)??null;if(!o)return null;const c=Nr(o);return c?{id:s,name:o.name||c.name||"Camera",camera:c,lens:_r(c),...Dr(r,s)}:null}function $r(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 Gr(r){const{store:e,documentId:s,container:o,canvas:c,renderer:a,stats:m}=r,u=new Jt(a),E=qt(),O=new Xt,g=$t(),L=Tr(a.getContext()),ze=t=>{g.enabled&&L.begin();try{t()}finally{L.end()}},We=()=>g.enabled?L.poll():null,Ne=ut({id:s,label:"Scene viewport",kind:"scene",profiler:g}),b=new Cr,re=11184810;let B=Ce(c).background??re;b.background=new ee(B);const _e=xe(c,()=>{const t=Ce(c).background??re,l=b.background;l instanceof ee&&l.getHex()===B&&(b.background=new ee(t)),B=t});e.bindScene(b,a);const n=new lr(c,b,e,o,{renderer:a,onlineAssetResolver:Wr,onProjectionChange:ur}),De=n.bindPresentation(s,"world");e.bindScene(b,a,n.batchedRenderer,n.camera),e.setOrbitTarget(n.orbitControls.target);const H=new D,F=new D,ne=new D,oe=()=>{const t=n.renderCamera;t.getWorldPosition(H),n.cameraViewMode==="pilot"?F.copy(n.orbitControls.target):n.cameraViewMode?(t.getWorldDirection(ne),F.copy(H).add(ne.multiplyScalar(10))):F.copy(n.orbitControls.target);const l=t.fov;return{position:H,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="",q=null,h=null,S=null,I=null;const ae=()=>{h&&fr(h,ke(a.domElement))},Qe=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),q?.(),q=null,h&&gr(a,h,S),h=null,S=null,I=null,Yt(u,a,e.scene??b,n.renderCamera,void 0,{basePixelRatio:Math.min(window.devicePixelRatio||1,2),objectMap:e.objectMap,entityTags:$r(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&&(q=Ut(or,a,t))}const ce=()=>{n.setProjection(mr().projection),e.setViewportCamera(n.freeCamera),T()},$e=dr(ce);ce();const X=t=>Qr(x(e.shell),e.objectMap,t);let v=null;const A=()=>{v&&(je(x(e.shell),v),v=null)},le=()=>{const t=U().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=X(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 Ge=Qt({active:()=>e.shell.playState==="stopped"&&e.shell.activeViewportTab==="edit",selected:()=>{const t=e.shell.selectedEntityId;return t?X(t):null},resolve:X,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 D),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 Ue=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 K=new Vr({seedFromGameCamera:()=>{const t=z?.()??null;return!!t&&n.seedFromGameCamera(t)},frameContent:()=>n.focusOnScene()}),fe=()=>{K.cancel(),z=null};n.orbitControls.addEventListener("start",fe);const he=()=>Ir(n.camera,n.orbitControls.target);n.orbitControls.addEventListener("end",he);const Be=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,K.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(),N=!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,U().preview?.camera??null,r.cameraPreview())})})}const He=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}),Y=()=>wt(e.shell)===e.shell;function qe(t,l){if(P)return;if(l&&(W=t),!o.checkVisibility({visibilityProperty:!0,checkVisibilityCSS:!0})){W=t,N=!0,n.resolvePresentation();return}g.beginFrame();const p=t-W,d=p/1e3;Y()&&(m.frameTime=p,m.fps=1e3/p),W=t,k.syncMarkers(d),K.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"),Y()&&(m.drawCalls=a.info.render.calls,m.triangles=a.info.render.triangles),N&&be&&(N=!1,vt(s)),g.endFrame();const w=oe(),C=w.position,y=w.target;Y()&&(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 J,_;async function Xe(t){if(P)return;r.onMountStatus("mounting"),_?.(),_=void 0,J=t,r.onRootIds(t.childAdapters().filter(d=>d.role==="world"&&d.kind==="three").map(d=>d.worldId));const l=sr("three");if(P||J!==t)return;const p=l?await l.mountWorldRootSession({store:e,composite:t,renderer:a}):()=>{};if(P||J!==t){p();return}_=p,P||r.onMountStatus("ready")}const we=ar(e.shell,Xe);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,N=!0}),{scene:b,viewport:n,frame:qe,present:t=>wr(e,t),setHelper:(t,l)=>n.setHelper(t,l),dispose:()=>{P=!0,Ne(),He(),ge.disconnect(),Ue(),Be(),Ge(),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(),_?.(),k.dispose(),O.dispose(),L.dispose(),$e(),Qe(),_e(),De(),h?.selection.clear(),E.dispose(),u.dispose()}}}function Ur({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:Ke})),[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 Br({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(Ur,{store:r,rootIds:c,mountStatus:o})]})}const ko={mountWorldRootSurface:zr,installWorldRootStage:Gr,Overlays:Br};export{ko as worldRootStageBinding};
@@ -1 +1 @@
1
- import{collectMachineAnimationMeta as V,clipNamesOf as L,isBlendTreeAnimationMeta as S,asBlendTreeDef as z}from"./xstate-animation-meta-CzxfXjaY.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-EO6Vl92s.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-DoZp29qk.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-BT8W9a7k.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{dZ as b,d_ as u,u as o,v as c,w as n,x as l,c6 as r,c5 as m,c4 as f}from"./index-EO6Vl92s.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:l("1D").describe("Interpolates linearly between sorted children by threshold"),parameter:n().min(1).describe("Context/selector value driving the blend"),children:c(d).min(2,"1D blend tree needs at least 2 children to interpolate between")}).strict(),v=o({type:l("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:c(d.extend({thresholdY:r()})).min(1,"2D blend tree needs at least 1 child")}).strict(),g=o({type:l("direct").describe("Each child has an explicit weight, normalized to sum to 1"),parameter:n().default(""),children:c(d.extend({weight:r().min(0)})).min(1,"direct blend tree needs at least 1 child")}).strict(),A=b("type",[y,v,g]);function Y(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:c(n().min(1)).min(1).optional().describe("Bone/object names whose complete descendant subtrees are retained"),exclude:c(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:A.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 H(e){return M(e)?[e.clip]:e.blendTree.children.map(a=>a.clip)}export{A as AnimationBlendTreeSchema,T as AnimationMetaValidationError,D as StateAnimationMetaSchema,Y as asBlendTreeDef,H as clipNamesOf,R as collectMachineAnimationMeta,$ as isBlendTreeAnimationMeta,M as isClipAnimationMeta,B as parseStateAnimationMeta};
1
+ import{dZ as b,d_ as u,u as o,v as c,w as n,x as l,c6 as r,c5 as m,c4 as f}from"./index-BT8W9a7k.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:l("1D").describe("Interpolates linearly between sorted children by threshold"),parameter:n().min(1).describe("Context/selector value driving the blend"),children:c(d).min(2,"1D blend tree needs at least 2 children to interpolate between")}).strict(),v=o({type:l("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:c(d.extend({thresholdY:r()})).min(1,"2D blend tree needs at least 1 child")}).strict(),g=o({type:l("direct").describe("Each child has an explicit weight, normalized to sum to 1"),parameter:n().default(""),children:c(d.extend({weight:r().min(0)})).min(1,"direct blend tree needs at least 1 child")}).strict(),A=b("type",[y,v,g]);function Y(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:c(n().min(1)).min(1).optional().describe("Bone/object names whose complete descendant subtrees are retained"),exclude:c(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:A.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 H(e){return M(e)?[e.clip]:e.blendTree.children.map(a=>a.clip)}export{A as AnimationBlendTreeSchema,T as AnimationMetaValidationError,D as StateAnimationMetaSchema,Y as asBlendTreeDef,H as clipNamesOf,R as collectMachineAnimationMeta,$ as isBlendTreeAnimationMeta,M as isClipAnimationMeta,B as parseStateAnimationMeta};
package/dist-node/cli.js CHANGED
@@ -2313,7 +2313,7 @@ import { fileURLToPath as fileURLToPath2 } from "node:url";
2313
2313
  var package_default = {
2314
2314
  name: "@volter/game-editor",
2315
2315
  author: "Volter AI, Inc.",
2316
- version: "0.5.91",
2316
+ version: "0.5.93",
2317
2317
  publishConfig: {
2318
2318
  access: "public"
2319
2319
  },
@@ -2362,22 +2362,22 @@ var package_default = {
2362
2362
  }
2363
2363
  },
2364
2364
  dependencies: {
2365
- "@volter/editor-core": "0.5.91",
2366
- "@volter/editor-game": "0.5.91",
2367
- "@volter/editor-react": "0.5.91",
2368
- "@volter/editor-threejs": "0.5.91",
2369
- "@volter/editor-xstate": "0.5.91",
2370
- "@volter/editor-blender": "0.1.31",
2371
- "@volter/dawproject": "0.5.91",
2372
- "@volter/editor-dawproject": "0.5.91",
2373
- "@volter/blender-engine": "0.1.29",
2374
- "@volter/editor-project": "0.5.91",
2375
- "@volter/editor-sdk": "0.5.91",
2376
- "@volter/editor-live": "0.5.91",
2377
- "@volter/game-live": "0.5.91",
2365
+ "@volter/editor-core": "0.5.93",
2366
+ "@volter/editor-game": "0.5.93",
2367
+ "@volter/editor-react": "0.5.93",
2368
+ "@volter/editor-threejs": "0.5.93",
2369
+ "@volter/editor-xstate": "0.5.93",
2370
+ "@volter/editor-blender": "0.1.33",
2371
+ "@volter/dawproject": "0.5.93",
2372
+ "@volter/editor-dawproject": "0.5.93",
2373
+ "@volter/blender-engine": "0.1.31",
2374
+ "@volter/editor-project": "0.5.93",
2375
+ "@volter/editor-sdk": "0.5.93",
2376
+ "@volter/editor-live": "0.5.93",
2377
+ "@volter/game-live": "0.5.93",
2378
2378
  "@modelcontextprotocol/sdk": "1.30.0",
2379
- "@volter/game-runtime": "0.5.91",
2380
- "@volter/threejs-runtime": "0.5.91",
2379
+ "@volter/game-runtime": "0.5.93",
2380
+ "@volter/threejs-runtime": "0.5.93",
2381
2381
  undici: "7.29.1",
2382
2382
  typescript: "5.9.3",
2383
2383
  "@colyseus/schema": "^4.0.14",
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.91",
4
+ "version": "0.5.93",
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.91",
54
- "@volter/editor-game": "0.5.91",
55
- "@volter/editor-react": "0.5.91",
56
- "@volter/editor-threejs": "0.5.91",
57
- "@volter/editor-xstate": "0.5.91",
58
- "@volter/editor-blender": "0.1.31",
59
- "@volter/dawproject": "0.5.91",
60
- "@volter/editor-dawproject": "0.5.91",
61
- "@volter/blender-engine": "0.1.29",
62
- "@volter/editor-project": "0.5.91",
63
- "@volter/editor-sdk": "0.5.91",
64
- "@volter/editor-live": "0.5.91",
65
- "@volter/game-live": "0.5.91",
53
+ "@volter/editor-core": "0.5.93",
54
+ "@volter/editor-game": "0.5.93",
55
+ "@volter/editor-react": "0.5.93",
56
+ "@volter/editor-threejs": "0.5.93",
57
+ "@volter/editor-xstate": "0.5.93",
58
+ "@volter/editor-blender": "0.1.33",
59
+ "@volter/dawproject": "0.5.93",
60
+ "@volter/editor-dawproject": "0.5.93",
61
+ "@volter/blender-engine": "0.1.31",
62
+ "@volter/editor-project": "0.5.93",
63
+ "@volter/editor-sdk": "0.5.93",
64
+ "@volter/editor-live": "0.5.93",
65
+ "@volter/game-live": "0.5.93",
66
66
  "@modelcontextprotocol/sdk": "1.30.0",
67
- "@volter/game-runtime": "0.5.91",
68
- "@volter/threejs-runtime": "0.5.91",
67
+ "@volter/game-runtime": "0.5.93",
68
+ "@volter/threejs-runtime": "0.5.93",
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-DFLHmO4x.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./editor-shell-store-CW9Fjab9.js";import"./output-pass-HurwNl0G.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./Pass-D1MRT672.js";import"./editor-layers-B43PZgUF.js";import"./workspace-arrangement-COs530TA.js";import"./index-EO6Vl92s.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-DnahhlAD.js";import"./entity-object-C40NpVSX.js";import"./three-contract-Dkt6PmWY.js";import"./live-mixers-B-bwLZ7c.js";import"./asset-preview-BqLvTtnb.js";import"./renderer-ownership-BovSEcLv.js";import"./hierarchy-marks-r1SCnl92.js";import"./studio-environment-BRMTYTp1.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-CgQvlJ6q.js";import"./three-state-15gXjQ51.js";import"./standard-viewport-dressing-DzgsLMqH.js";import"./content-bounds-B_xPBrsP.js";import"./preview-renderer-BrYNFV1p.js";import"./live-gesture-lock-DJbrjOqf.js";import"./three-integration-lFHyckTb.js";import"./host-hierarchy-objects-BV3WqU2w.js";import"./layered-pick-Ciu7uLFh.js";import"./root-stacking-BEd9ZvxC.js";import"./model-thumbnail-C6YzkBEi.js";import"./object3d-document-session-registry-3YUZT4RT.js";import"./component-instance-root-JAQpC4Pi.js";import"./viewport-door-Dbl8EH3p.js";import"./model-inspection-DcL5cH7Y.js";import"./three-viewport-presentation-DlCyoe_E.js";import"./clip-planes-CnAI6DZn.js";import"./three-DItubEyv.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./OrbitControls-B13MKuwC.js";import"./LineSegments2-DN9pUfWA.js";import"./three.quarks.esm-C_HmSKXo.js";import"./scene-framing-zyo6Dgey.js";import"./source-object3d-authoring-adapter-D-mc1Hsq.js";import"./three-projection-core-Bsu421K7.js";import"./editor-presentation-activity-CqJH4G9t.js";import"./transport-strip-DHbAk_5x.js";import"./viewport-surface-status-C9vuKKQB.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 +0,0 @@
1
- import{a as s}from"./jsx-runtime-DPjLkJKQ.js";import{bl as ee,bm as N,bn as se,bo as L,bp as te,bq as ie,br as z,bs as B,E as re,F as oe,bt as f,bu as ae,bv as F,bw as g,aM as S,a7 as l,bx as ne,a6 as A,by as le,bz as ce,bA as H,bB as d,bC as W,bD as de,bE as pe,bF as me,bG as $,bH as G,bI as ue,bJ as be,bK as U,aN as he,aL as K,bL as ge,G as _,bM as ve,bN as xe,bO as je,bP as we,bQ as fe,bR as Se}from"./index-EO6Vl92s.js";import{r}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{c as ye,a as Ce}from"./asset-preview-BqLvTtnb.js";import{s as Ee}from"./model-inspection-DcL5cH7Y.js";import{s as Pe,o as q,a as ke}from"./object3d-document-session-registry-3YUZT4RT.js";import{v as Ve}from"./viewport-door-Dbl8EH3p.js";import{v as J,V as Me,a as De,p as Oe,b as Te,c as Re}from"./ViewportShadingMenu-C3thhpMD.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"./editor-layers-B43PZgUF.js";import"./workspace-arrangement-COs530TA.js";import"./renderer-ownership-BovSEcLv.js";import"./hierarchy-marks-r1SCnl92.js";import"./studio-environment-BRMTYTp1.js";import"./user-data-DnahhlAD.js";import"./KTX2Loader-CaqVE6nY.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.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";const Q=()=>()=>{},v=()=>0,Ne=[{key:"skeletons",label:"Bones"},{key:"weights",label:"Weights"},{key:"cursor",label:"3D Cursor"},{key:"cameras",label:"Cameras"},{key:"lights",label:"Lights"},{key:"empties",label:"Empties"}];function ps({documentId:i,assetPath:p}){r.useSyncExternalStore(Pe,q,q);const t=ke(i);r.useSyncExternalStore(ee,N,N),r.useSyncExternalStore(t?.subscribe??Q,t?.getSnapshot??v,t?.getSnapshot??v),r.useSyncExternalStore(se,L,L);const n=te(i);r.useSyncExternalStore(n?.subscribe??Q,n?.getSnapshot??v,n?.getSnapshot??v);const X=Ve(i),[y,C]=r.useState(null),[E,b]=r.useState(null),[P,h]=r.useState(!1),[k,c]=r.useState(!1),V=r.useRef(null),M=r.useRef(null);if(r.useSyncExternalStore(ie,z,z),!t)return null;const o=t.presentation(),{lighting:m}=B(i),u=re(i),D=u?oe(u.stageKind):null,Y=u?.documentLayer?.all?.lighting?.studioPreset===f.id||D?.all?.lighting?.studioPreset===f.id,x=u?ae(u.stageKind):!1,O=e=>x?{modes:{[B(i).drawMode]:{lighting:e}}}:{all:{lighting:e}},j=new Set(Object.entries(D?.modes??{}).filter(([,e])=>e?.lighting!==void 0).map(([e])=>e)),w=new Set(Ee(t.root).filter(e=>e.available).map(e=>e.mode)),Z=[...x?J.map(e=>e.mode==="solid"?{...e,label:"Solid",description:"Materials' colours under the studio lights"}:e.mode==="clay"?{...e,label:"Clay"}:e):J,...j.has("preview")?[{mode:"preview",label:"Material Preview",description:"Materials lit by a preview environment"}]:[],...j.has("rendered")?[{mode:"rendered",label:"Rendered",description:"Lit as a render is, by the scene's own lights"}]:[],...w.has("uv")?[{mode:"uv",label:"UV",description:"UV coordinates as surface color"}]:[],...w.has("vertex-colors")?[{mode:"vertex-colors",label:"Vertex colors",description:"Authored color attributes without textures"}]:[]],T=async e=>{if(p){b(null);try{await Se().saveThumbnailFraming(p,e?void 0:t.cameraPose())}catch(a){b(a instanceof Error?a.message:String(a))}}},I=async()=>{b(null);try{const e={background:o.background},a=p?.toLowerCase().endsWith(".spz")?await ye(p,e):Ce(t.root,e);C(`data:image/png;base64,${a.contactSheet.base64}`)}catch(e){b(e instanceof Error?e.message:String(e))}},R=t.selection().length>0?"Frame selection":"Frame all";return s.jsxs("div",{className:"volter-model-document-header",children:[s.jsxs(F,{compact:!0,label:"Viewport view controls",className:"volter-model-viewport-toolbar volter-model-viewport-toolbar--view",children:[s.jsx(g,{text:R,children:s.jsx(S,{"aria-label":R,onClick:()=>t.frame(),children:s.jsx(l,{icon:ne,size:"md"})})}),s.jsxs("div",{className:"volter-viewport-popover-anchor",children:[s.jsx(g,{text:"Camera orientation and projection",children:s.jsxs(A,{ref:V,type:"button",size:"compact",variant:"secondary","aria-label":`Camera view: ${o.projection}`,"aria-haspopup":"menu","aria-expanded":P,onClick:()=>h(e=>!e),className:"volter-model-toolbar-labelled-control",children:[s.jsx(l,{icon:le,size:"sm"}),s.jsx("span",{children:o.projection==="perspective"?"Perspective":"Orthographic"}),s.jsx(l,{icon:ce,size:"xs"})]})}),P&&s.jsxs(H,{anchorRef:V,align:"start",clamp:!0,"aria-label":"Camera view",onDismiss:()=>h(!1),style:{minWidth:210},children:[["front","right","top","isometric"].map(e=>s.jsx(d,{onSelect:()=>{t.setViewPreset(e,"view"),h(!1)},children:e==="isometric"?"Perspective 3/4":`${e[0]?.toUpperCase()}${e.slice(1)} view`},e)),s.jsx(W,{}),["perspective","orthographic"].map(e=>s.jsxs(d,{role:"menuitemradio","aria-checked":o.projection===e,onSelect:()=>{t.setProjection(e),h(!1)},children:[s.jsx("span",{className:"volter-menu-check",children:o.projection===e&&s.jsx(l,{icon:de,size:"xs"})}),e==="perspective"?"Perspective":"Orthographic"]},e))]})]}),w.has("skeleton")?s.jsx(g,{text:`Rig: ${o.skeleton?"Visible":"Hidden"}`,children:s.jsx(S,{"aria-label":"Toggle rig overlay","aria-pressed":o.skeleton,onClick:()=>t.setSkeleton(!o.skeleton),children:s.jsx(l,{icon:pe,size:"md"})})}):null,me("object3d-document").map(({id:e,Component:a})=>s.jsx(a,{documentId:i},e))]}),s.jsxs(F,{compact:!0,label:"Viewport preview controls",className:"volter-model-viewport-toolbar volter-model-viewport-toolbar--preview",children:[s.jsxs(Me,{mode:o.mode,onChange:e=>t.setMode(e),choices:Z,segments:x?Oe(j):De,children:[$().length>0?s.jsxs("label",{children:[s.jsx("span",{children:"View"}),s.jsxs(G,{"aria-label":"View preset",value:"",onChange:e=>{e.target.value&&ue(i,e.target.value)},children:[s.jsx("option",{value:"",children:"Choose…"}),$().map(e=>s.jsx("option",{value:e.id,children:e.title},e.id))]})]}):null,s.jsxs("label",{children:[s.jsx("span",{children:"Lighting"}),s.jsxs(G,{"aria-label":"Lighting",value:m.source==="studio"?`studio:${m.studioPreset}`:m.source,onChange:e=>{const a=e.target.value;U(i,O(a.startsWith("studio:")?{source:"studio",studioPreset:a.slice(7)}:{source:a}))},children:[be().filter(e=>e.id!==f.id||Y).map(e=>s.jsx("option",{value:`studio:${e.id}`,children:e.title},e.id)),s.jsx("option",{value:"scene",children:"Scene lights"})]})]}),s.jsxs("label",{children:[s.jsx("span",{children:"Exposure"}),s.jsx(he,{"aria-label":"Preview exposure",type:"range",min:"0.2",max:"2",step:"0.1",value:m.tone.exposure,onChange:e=>U(i,O({tone:{exposure:Number(e.target.value)}}))}),s.jsx(K,{as:"span",variant:"caption",children:m.tone.exposure.toFixed(1)})]})]}),s.jsx(Te,{glyph:s.jsx(Re,{}),...n===null?{}:{master:{enabled:n.showHelpers,onToggle:()=>n.toggleHelpers()}},choices:[{id:"grid",label:"Grid",enabled:_(i),onToggle:()=>ge(i,!_(i))},{id:"bounds",label:"Bounds",enabled:o.bounds,onToggle:()=>t.setBounds(!o.bounds)},...n===null?[]:Ne.filter(e=>X.includes(e.key)).map(e=>({id:e.key,label:e.label,enabled:n.helperVisibility[e.key],onToggle:()=>n.toggleHelperType(e.key)}))]}),s.jsxs("div",{className:"volter-viewport-popover-anchor",children:[s.jsx(g,{text:"Asset preview actions",children:s.jsx(S,{ref:M,"aria-label":"Asset preview actions","aria-haspopup":"menu","aria-expanded":k,onClick:()=>c(e=>!e),children:s.jsx(l,{icon:ve,size:"md"})})}),k&&s.jsxs(H,{anchorRef:M,clamp:!0,"aria-label":"Asset preview actions",onDismiss:()=>c(!1),style:{minWidth:210},children:[s.jsxs(d,{onSelect:()=>{c(!1),I()},children:[s.jsx(l,{icon:xe,size:"sm"}),"Capture preview"]}),p?s.jsxs(s.Fragment,{children:[s.jsx(d,{onSelect:()=>{c(!1),T(!1)},children:"Save thumbnail framing"}),s.jsx(d,{onSelect:()=>{c(!1),T(!0)},children:"Reset thumbnail framing"})]}):null,s.jsx(W,{}),s.jsxs(d,{onSelect:()=>{t.resetPresentation(),c(!1)},children:[s.jsx(l,{icon:je,size:"sm"}),"Reset viewport settings"]})]})]})]}),y?s.jsxs(we,{className:"volter-model-capture-preview",children:[s.jsxs("div",{children:[s.jsx(K,{as:"strong",variant:"label",children:"Deterministic views"}),s.jsx(A,{type:"button",variant:"ghost",onClick:()=>C(null),children:"Close"})]}),s.jsx("img",{src:y,alt:"Front, right, top, and three-quarter model preview"})]}):null,E?s.jsx(fe,{className:"volter-model-toolbar-error",tone:"error",children:E}):null]})}export{ps as Object3DDocumentToolbar};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/StageHost-CgQvlJ6q.js","assets/index-EO6Vl92s.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-15gXjQ51.js","assets/editor-shell-store-CW9Fjab9.js","assets/output-pass-HurwNl0G.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/Pass-D1MRT672.js","assets/editor-layers-B43PZgUF.js","assets/workspace-arrangement-COs530TA.js","assets/user-data-DnahhlAD.js","assets/entity-object-C40NpVSX.js","assets/three-contract-Dkt6PmWY.js","assets/standard-viewport-dressing-DzgsLMqH.js","assets/content-bounds-B_xPBrsP.js","assets/hierarchy-marks-r1SCnl92.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/three-integration-lFHyckTb.js","assets/host-hierarchy-objects-BV3WqU2w.js","assets/layered-pick-Ciu7uLFh.js","assets/root-stacking-BEd9ZvxC.js","assets/model-thumbnail-C6YzkBEi.js","assets/studio-environment-BRMTYTp1.js","assets/KTX2Loader-CaqVE6nY.js","assets/GLTFLoader-KeoruJgS.js","assets/BufferGeometryUtils-B22h7jo4.js","assets/object3d-document-session-registry-3YUZT4RT.js","assets/component-instance-root-JAQpC4Pi.js","assets/viewport-door-Dbl8EH3p.js","assets/asset-preview-BqLvTtnb.js","assets/bitmap-label-Ct4k6ehY.js","assets/model-inspection-DcL5cH7Y.js","assets/three-viewport-presentation-DlCyoe_E.js","assets/clip-planes-CnAI6DZn.js","assets/three-DItubEyv.js","assets/viewport-editor-controls-BYaAZ_Ku.js","assets/OrbitControls-B13MKuwC.js","assets/LineSegments2-DN9pUfWA.js","assets/three.quarks.esm-C_HmSKXo.js","assets/scene-framing-zyo6Dgey.js","assets/source-object3d-authoring-adapter-D-mc1Hsq.js","assets/three-projection-core-Bsu421K7.js","assets/editor-presentation-activity-CqJH4G9t.js","assets/transport-strip-DHbAk_5x.js","assets/viewport-surface-status-C9vuKKQB.js"])))=>i.map(i=>d[i]);
2
- import{ak as r,_ as a}from"./index-EO6Vl92s.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-C9vuKKQB.js";const s=n.lazy(async()=>({default:(await a(()=>import("./StageHost-CgQvlJ6q.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{T as i,r as m}from"./index-EO6Vl92s.js";import{e as p}from"./game-network-D8nKKSRC.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-piwWLOP6.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-CoiJ_gHM.js";import"./contract-system-adapters-C1oaetXB.js";import"./game-contract-seams-Dq1YiGya.js";import"./seeded-random-BcjdE8-O.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-BBbF8usb.js";import"./capability-coverage-BOaPg0KC.js";import"./edit-mode-authoring-C0sf0ewd.js";import"./json-history-resource-BjCvVkMa.js";import"./binding-resolver-cWcQuwXj.js";import"./adapter-surface-Y37Nzcyw.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./realm-services-Bw73w74M.js";import"./canvas-entry-runtime-BHOqndB_.js";import"./three-ingest-runtime-DlApOywz.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-CPY5d7Ae.js";import"./ingest-source-persistence-C2eN6TUG.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-CG43sAj5.js";import"./mounted-authoring-DfEm9qgt.js";import"./entity-object-C40NpVSX.js";import"./user-data-DnahhlAD.js";import"./workspace-arrangement-COs530TA.js";import"./three-contract-Dkt6PmWY.js";import"./three-DItubEyv.js";import"./editor-layers-B43PZgUF.js";import"./component-instance-root-JAQpC4Pi.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-authoring-adapter-jGnbMYIc.js";import"./source-persistence-backend-DPS956_W.js";import"./three-projection-core-Bsu421K7.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-CFwn2dZ0.js";import"./deferred-ingest-play-DJeWQ-He.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-Cey0R-Ml.js";import"./board-guides-D-k2cJcJ.js";import"./relative-import-specifier-DjG-Lv03.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-BqpAh85y.js";import"./inference-diagnostics-18bkEAju.js";import"./writer-tw6EcuVO.js";import"./three-state-15gXjQ51.js";import"./editor-shell-store-CW9Fjab9.js";import"./output-pass-HurwNl0G.js";import"./viewport-door-Dbl8EH3p.js";import"./game-surface-defaults-D8S4cRxi.js";const Ut="workspace.service";function e(o){p().catch(t=>{m().console.error(`${o}: ${t instanceof Error?t.message:String(t)}`,"play")})}function bt(){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{Ut as point,bt as start};
@@ -1 +0,0 @@
1
- import{ah as m}from"./index-EO6Vl92s.js";import{b as p,a as e,c as n,s}from"./game-network-D8nKKSRC.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-piwWLOP6.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-CoiJ_gHM.js";import"./contract-system-adapters-C1oaetXB.js";import"./game-contract-seams-Dq1YiGya.js";import"./seeded-random-BcjdE8-O.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-BBbF8usb.js";import"./capability-coverage-BOaPg0KC.js";import"./edit-mode-authoring-C0sf0ewd.js";import"./json-history-resource-BjCvVkMa.js";import"./binding-resolver-cWcQuwXj.js";import"./adapter-surface-Y37Nzcyw.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./realm-services-Bw73w74M.js";import"./canvas-entry-runtime-BHOqndB_.js";import"./three-ingest-runtime-DlApOywz.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-CPY5d7Ae.js";import"./ingest-source-persistence-C2eN6TUG.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-CG43sAj5.js";import"./mounted-authoring-DfEm9qgt.js";import"./entity-object-C40NpVSX.js";import"./user-data-DnahhlAD.js";import"./workspace-arrangement-COs530TA.js";import"./three-contract-Dkt6PmWY.js";import"./three-DItubEyv.js";import"./editor-layers-B43PZgUF.js";import"./component-instance-root-JAQpC4Pi.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-authoring-adapter-jGnbMYIc.js";import"./source-persistence-backend-DPS956_W.js";import"./three-projection-core-Bsu421K7.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-CFwn2dZ0.js";import"./deferred-ingest-play-DJeWQ-He.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-Cey0R-Ml.js";import"./board-guides-D-k2cJcJ.js";import"./relative-import-specifier-DjG-Lv03.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-BqpAh85y.js";import"./inference-diagnostics-18bkEAju.js";import"./writer-tw6EcuVO.js";import"./three-state-15gXjQ51.js";import"./editor-shell-store-CW9Fjab9.js";import"./output-pass-HurwNl0G.js";import"./viewport-door-Dbl8EH3p.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-D8nKKSRC.js";import"./index-OZVqp6xS.js";import"./index-Da9JhEvW.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-EO6Vl92s.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-piwWLOP6.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-CoiJ_gHM.js";import"./contract-system-adapters-C1oaetXB.js";import"./game-contract-seams-Dq1YiGya.js";import"./seeded-random-BcjdE8-O.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-BBbF8usb.js";import"./capability-coverage-BOaPg0KC.js";import"./edit-mode-authoring-C0sf0ewd.js";import"./json-history-resource-BjCvVkMa.js";import"./binding-resolver-cWcQuwXj.js";import"./adapter-surface-Y37Nzcyw.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./realm-services-Bw73w74M.js";import"./canvas-entry-runtime-BHOqndB_.js";import"./three-ingest-runtime-DlApOywz.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-CPY5d7Ae.js";import"./ingest-source-persistence-C2eN6TUG.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-CG43sAj5.js";import"./mounted-authoring-DfEm9qgt.js";import"./entity-object-C40NpVSX.js";import"./user-data-DnahhlAD.js";import"./workspace-arrangement-COs530TA.js";import"./three-contract-Dkt6PmWY.js";import"./three-DItubEyv.js";import"./editor-layers-B43PZgUF.js";import"./component-instance-root-JAQpC4Pi.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-authoring-adapter-jGnbMYIc.js";import"./source-persistence-backend-DPS956_W.js";import"./three-projection-core-Bsu421K7.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-CFwn2dZ0.js";import"./deferred-ingest-play-DJeWQ-He.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-Cey0R-Ml.js";import"./board-guides-D-k2cJcJ.js";import"./relative-import-specifier-DjG-Lv03.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-BqpAh85y.js";import"./inference-diagnostics-18bkEAju.js";import"./writer-tw6EcuVO.js";import"./three-state-15gXjQ51.js";import"./editor-shell-store-CW9Fjab9.js";import"./output-pass-HurwNl0G.js";import"./viewport-door-Dbl8EH3p.js";import"./game-surface-defaults-D8S4cRxi.js";const zt="workspace.service";function At(){t()}export{zt as point,At as start};