@volter/game-editor 0.5.111 → 0.5.113

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 (300) 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 +2177 -2177
  5. package/dist/assets/{AssetBudgetPanel-bAupz88s.js → AssetBudgetPanel-YOmIrgrb.js} +3 -3
  6. package/dist/assets/{AudioViewer-CQ5i0sqh.js → AudioViewer-bTwqa-Sq.js} +1 -1
  7. package/dist/assets/{CanvasBoardDocument-DYOf1iuv.js → CanvasBoardDocument-DH0GumqR.js} +1 -1
  8. package/dist/assets/{CanvasSceneViewport-DdW-6-P6.js → CanvasSceneViewport-GSbXiEc2.js} +1 -1
  9. package/dist/assets/{ColorInput-BbZePcoW.js → ColorInput-CM13COOy.js} +1 -1
  10. package/dist/assets/{ColorPicker-ZCQfoKnw.js → ColorPicker-EVo4ngxp.js} +1 -1
  11. package/dist/assets/{EntityModelDocument-DVK0IVd_.js → EntityModelDocument-BTYbMslU.js} +1 -1
  12. package/dist/assets/{EnvironmentAssetDocument-CwIXIrF0.js → EnvironmentAssetDocument-CxncdHY1.js} +1 -1
  13. package/dist/assets/{GameplaySessionTimeline-D_qya3Ig.js → GameplaySessionTimeline-PDuA7cCk.js} +1 -1
  14. package/dist/assets/{ImageViewer-Cfs_40NV.js → ImageViewer-Dr9tOsGR.js} +1 -1
  15. package/dist/assets/InspectorObjectPreview-CmjfAk0I.js +1 -0
  16. package/dist/assets/{JsonAssetDocument-99jBhhmk.js → JsonAssetDocument-95S-d0FJ.js} +1 -1
  17. package/dist/assets/{LiveModuleDocument-Dl5VGMB4.js → LiveModuleDocument-tqAYWVCZ.js} +1 -1
  18. package/dist/assets/{LutAssetDocument-5ouR-h-W.js → LutAssetDocument-DOpqQnUe.js} +1 -1
  19. package/dist/assets/{ModelAssetDocument-0YP8CLjF.js → ModelAssetDocument-DrWymVJX.js} +1 -1
  20. package/dist/assets/{NonThreeAuthoringBootstrap-B6EVY_ZH.js → NonThreeAuthoringBootstrap-Gnetb5kf.js} +1 -1
  21. package/dist/assets/{Object3DDocumentToolbar-B5IxZycD.js → Object3DDocumentToolbar-LEaER56N.js} +1 -1
  22. package/dist/assets/Object3DDocumentViewport-CgifoYVE.js +2 -0
  23. package/dist/assets/{Object3DPreview-E81OnLKY.js → Object3DPreview-CI9SLEn2.js} +1 -1
  24. package/dist/assets/{OnlineAssetDetail-CrgCBa3x.js → OnlineAssetDetail-C1_UGp0X.js} +1 -1
  25. package/dist/assets/{PlayBar-B60kaU1V.js → PlayBar-BqFW5mT2.js} +1 -1
  26. package/dist/assets/{QuarksAssetDocument-MSQtJ_Z3.js → QuarksAssetDocument-B1-XXOIo.js} +1 -1
  27. package/dist/assets/{ReactCanvasControls-Dc5zCUT9.js → ReactCanvasControls-BF1bVCnc.js} +1 -1
  28. package/dist/assets/{RootSelectionOverlay-B077HGww.js → RootSelectionOverlay-BF32ngZd.js} +1 -1
  29. package/dist/assets/{ShaderAssetDocument-TpRIHvr1.js → ShaderAssetDocument-Dp1QXqID.js} +1 -1
  30. package/dist/assets/{ShadowEditor-DV3nK6mc.js → ShadowEditor-4Db4i5w5.js} +1 -1
  31. package/dist/assets/{SourceAssetViewer-Dawor1Iu.js → SourceAssetViewer-BmlLDth6.js} +1 -1
  32. package/dist/assets/{StageHost-DHOA7Fjl.js → StageHost-BQL5IEe5.js} +2 -2
  33. package/dist/assets/{StoryPreviewMount-CI_-6GSI.js → StoryPreviewMount-wz2HTXNK.js} +1 -1
  34. package/dist/assets/{ThreeBoardDocument-DFc5NTeM.js → ThreeBoardDocument-DEAY51YS.js} +2 -2
  35. package/dist/assets/{ThreeIsolationSceneContent-B9n7e1ah.js → ThreeIsolationSceneContent-BTsDcsEk.js} +1 -1
  36. package/dist/assets/{ToolObject3DPreview-D9yRYXUH.js → ToolObject3DPreview-DwuMA8jQ.js} +1 -1
  37. package/dist/assets/{Toolbar-C2oWqmoE.js → Toolbar-D1TipTFF.js} +1 -1
  38. package/dist/assets/{TransientHint-Sxme-xvC.js → TransientHint-DzC7ZR7m.js} +1 -1
  39. package/dist/assets/{VideoViewer-Dkfz15uC.js → VideoViewer-Dh6AS4So.js} +1 -1
  40. package/dist/assets/{ViewportShadingMenu-4R5nlQgL.js → ViewportShadingMenu-B3YlrMIP.js} +1 -1
  41. package/dist/assets/{active-ingest-CqL5EgXV.js → active-ingest-DyPN4pXx.js} +2 -2
  42. package/dist/assets/{animation-clock-Cmfj6SD6.js → animation-clock-Cgc__YFh.js} +1 -1
  43. package/dist/assets/{animation-mixers.service-BOsyfXwP.js → animation-mixers.service-gxCtRrOy.js} +1 -1
  44. package/dist/assets/{animation-timeline.utility-CJEflb93.js → animation-timeline.utility-DB9Ux44B.js} +1 -1
  45. package/dist/assets/{asset-budget-asset.menu-Cq8duqsp.js → asset-budget-asset.menu-B00KTyex.js} +1 -1
  46. package/dist/assets/{asset-budget.action-5nHAtvW2.js → asset-budget.action-DBNBL_EX.js} +1 -1
  47. package/dist/assets/{asset-budget.document-CX5FvczQ.js → asset-budget.document-BdNi2KSS.js} +1 -1
  48. package/dist/assets/{asset-budget.menu-BdGhNV4r.js → asset-budget.menu-B5ac_4XU.js} +1 -1
  49. package/dist/assets/{asset-editor-persistence-DaYfW31_.js → asset-editor-persistence-BB9WAcxO.js} +1 -1
  50. package/dist/assets/{asset-loaders-C399YlHO.js → asset-loaders-BIr1M5-7.js} +1 -1
  51. package/dist/assets/{asset-preview-j90MweIO.js → asset-preview-SYBnd0Vm.js} +1 -1
  52. package/dist/assets/{audio-unlock.service-Dp9He34b.js → audio-unlock.service-DzxNWnKh.js} +1 -1
  53. package/dist/assets/{audio.utility-CyqJbM1O.js → audio.utility-B-NT_pSF.js} +1 -1
  54. package/dist/assets/autoplay.service-BOi_pnfg.js +1 -0
  55. package/dist/assets/{babylon-authoring-adapter-CnWPdC1Q.js → babylon-authoring-adapter-ClEvING-.js} +1 -1
  56. package/dist/assets/{binding-resolver-BXphDCM5.js → binding-resolver-DrkSEcWH.js} +2 -2
  57. package/dist/assets/blender-emscripten-engine-CRz1C2s0.js +2 -0
  58. package/dist/assets/{blender-node-editor.document-CXx2qHR3.js → blender-node-editor.document-BLudqWaR.js} +1 -1
  59. package/dist/assets/{blender-properties-tab-D9Q053TO.js → blender-properties-tab-CgQrdCmF.js} +1 -1
  60. package/dist/assets/{blender-runtime-host-D_QBYZ7F.js → blender-runtime-host-DzGwnLBS.js} +1 -1
  61. package/dist/assets/{blender-runtime-skin-C-MmFKPY.js → blender-runtime-skin-C2nxKTQ1.js} +1 -1
  62. package/dist/assets/{blender-runtime.document-Byj95WvX.js → blender-runtime.document-DF4Kd_X3.js} +1 -1
  63. package/dist/assets/{blender-screenshot.menu-D-pdEuVU.js → blender-screenshot.menu-CgmIjtZz.js} +1 -1
  64. package/dist/assets/{blender-timeline.document-DcXWTjQl.js → blender-timeline.document-C4mTn6aP.js} +1 -1
  65. package/dist/assets/{blender-uv-editor.document-B901oH9E.js → blender-uv-editor.document-CJAzjOUQ.js} +1 -1
  66. package/dist/assets/{blender-version.status-DpBwE4R6.js → blender-version.status-D7gCX70i.js} +1 -1
  67. package/dist/assets/{blender-wali-engine-DRlkIoxZ.js → blender-wali-engine-BmVwcYs-.js} +1 -1
  68. package/dist/assets/{blender.command-ClcEtyho.js → blender.command-B6fKa6tA.js} +1 -1
  69. package/dist/assets/{board-guides-Bi0XcSub.js → board-guides-CxjOETvX.js} +1 -1
  70. package/dist/assets/{bridge.command-BtJkJBe1.js → bridge.command-a-jcQB8T.js} +3 -3
  71. package/dist/assets/{browserAll-Dp9DArp2.js → browserAll-BuXe7m07.js} +1 -1
  72. package/dist/assets/{build-player.document-C1VNd3YO.js → build-player.document-BD0PnuJ8.js} +1 -1
  73. package/dist/assets/{build-profiles.document-BC7F3qzN.js → build-profiles.document-CVkrs6H4.js} +1 -1
  74. package/dist/assets/{build-progress.status-CGFDtJ24.js → build-progress.status-FeI4UjwE.js} +1 -1
  75. package/dist/assets/{build-session-l8PbHJfy.js → build-session-DgvoUFRy.js} +1 -1
  76. package/dist/assets/{build.action-BHnM15O4.js → build.action-De0QZn5x.js} +1 -1
  77. package/dist/assets/{build.command-DTTVx3Wu.js → build.command-Etx4MsuF.js} +1 -1
  78. package/dist/assets/{build.header-C2S6ep41.js → build.header-CrYpkM9P.js} +1 -1
  79. package/dist/assets/{build.menu-e5l_Kb4b.js → build.menu-DblGKZpN.js} +1 -1
  80. package/dist/assets/{build.service-xT03i3nJ.js → build.service-CnNOfCLi.js} +1 -1
  81. package/dist/assets/{camera-D69U5X8F.js → camera-BfeEfKS0.js} +1 -1
  82. package/dist/assets/{camera-runtime.inspector-BdU6XbLE.js → camera-runtime.inspector-Cz9u-_ud.js} +1 -1
  83. package/dist/assets/{canvas-design-mount-CysxVENA.js → canvas-design-mount-Dw9d5RCT.js} +3 -3
  84. package/dist/assets/{canvas-entry-runtime-9fi2F1yV.js → canvas-entry-runtime-C2NiPlg5.js} +2 -2
  85. package/dist/assets/{canvas-preview-frames-Wb2Bog86.js → canvas-preview-frames-DgjyhrhI.js} +1 -1
  86. package/dist/assets/{canvas-story-capture.service-Btqzx6zj.js → canvas-story-capture.service-DJNBPJ5i.js} +2 -2
  87. package/dist/assets/{capability-coverage-D-0PxPrZ.js → capability-coverage-DR7JrSFb.js} +1 -1
  88. package/dist/assets/{collaboration-presence-CKyRGpSR.js → collaboration-presence-CANQ_L1j.js} +1 -1
  89. package/dist/assets/{collider-BZqWPfKu.js → collider-DfVDH8FN.js} +1 -1
  90. package/dist/assets/{component-board.service-HYyGjJmx.js → component-board.service-CeMs1Lk8.js} +2 -2
  91. package/dist/assets/{component-board.service-CJZjsXi4.js → component-board.service-DVoLrHrs.js} +2 -2
  92. package/dist/assets/{component-board.service-CvtkARCk.js → component-board.service-kbY79QZo.js} +2 -2
  93. package/dist/assets/{component-contracts.service-0C85dPhO.js → component-contracts.service-MNL4lwbm.js} +1 -1
  94. package/dist/assets/{component-instance-root-BKRR39Wd.js → component-instance-root-Cau6CbHE.js} +1 -1
  95. package/dist/assets/{component-verbs.command-BopukkQ4.js → component-verbs.command-qIVRD_Xw.js} +1 -1
  96. package/dist/assets/{component-verbs.service-B7WfghCI.js → component-verbs.service-B5JxoJav.js} +1 -1
  97. package/dist/assets/{config-DVIp_KbH.js → config-RCXzlzsa.js} +2 -2
  98. package/dist/assets/{configurations-BIy9skGW.js → configurations-IGbOtv8A.js} +1 -1
  99. package/dist/assets/{connection.status-kXEe2KXG.js → connection.status-ByfpCgpC.js} +1 -1
  100. package/dist/assets/{constraints.inspector-BjxPhIKb.js → constraints.inspector-uzln0fl-.js} +1 -1
  101. package/dist/assets/{content-bounds-DbuPrpc-.js → content-bounds-D-AXJalq.js} +1 -1
  102. package/dist/assets/{contract-system-adapters-ETU93T1B.js → contract-system-adapters-DFS6S5jR.js} +1 -1
  103. package/dist/assets/{coverage.service-BiNZeB5G.js → coverage.service-CVsV-Ujp.js} +1 -1
  104. package/dist/assets/{create-runtime-D1bZzRpc.js → create-runtime-SfhwBdX4.js} +1 -1
  105. package/dist/assets/{curve-Mw8uZ4II.js → curve-o1Gq54K5.js} +1 -1
  106. package/dist/assets/{data-asset-CNuXlcV3.js → data-asset-BHGaqife.js} +1 -1
  107. package/dist/assets/{data-ref-Dwai_Sjk.js → data-ref-BAsRympT.js} +1 -1
  108. package/dist/assets/{debug-bridge-BkGUUY7U.js → debug-bridge-CP_QGmkP.js} +1 -1
  109. package/dist/assets/{debug-registry-BnLWZePq.js → debug-registry-CKJW2aaQ.js} +1 -1
  110. package/dist/assets/{deferred-ingest-play-fhFUuU4a.js → deferred-ingest-play-NdjNkEVn.js} +2 -2
  111. package/dist/assets/{design-time-canvas-mount-Dvwz9h1v.js → design-time-canvas-mount-DkXsU3H1.js} +2 -2
  112. package/dist/assets/{design-time-layers-C13ZYvbJ.js → design-time-layers-BV3mP1Sf.js} +1 -1
  113. package/dist/assets/{design-time-mount.service-D36tnAbD.js → design-time-mount.service-BFusXbnS.js} +2 -2
  114. package/dist/assets/{design-time-mount.service-B1-e6BVR.js → design-time-mount.service-BrbX9-Z0.js} +2 -2
  115. package/dist/assets/{design-time-react-mount-BnS39JM3.js → design-time-react-mount-BYKVfWQS.js} +1 -1
  116. package/dist/assets/{document-preview-three-BOO6W0ea.js → document-preview-three-BOP4aWm7.js} +1 -1
  117. package/dist/assets/{dom-authoring-adapter-rcBbBeHf.js → dom-authoring-adapter-R0NT6Dgv.js} +1 -1
  118. package/dist/assets/{draco3d-D1lzBVDH.js → draco3d-B28c7B_w.js} +1 -1
  119. package/dist/assets/{edit-mode-audio.service-DlkY1-MJ.js → edit-mode-audio.service-D4hfjqDu.js} +1 -1
  120. package/dist/assets/{edit-mode-authoring-aQOcoK_S.js → edit-mode-authoring-FKyNiefy.js} +1 -1
  121. package/dist/assets/{edit-mode-networking.service-Augb6zRU.js → edit-mode-networking.service-BixjLG2r.js} +1 -1
  122. package/dist/assets/{editor-api-BZq-wfw9.js → editor-api-B8AYtjAH.js} +1 -1
  123. package/dist/assets/{editor-layers-cylPsVa_.js → editor-layers-L_zFs_uY.js} +1 -1
  124. package/dist/assets/{editor-shell-store-BbdX1Nk_.js → editor-shell-store-DOiPmqow.js} +1 -1
  125. package/dist/assets/{entity-object-6SA98e-d.js → entity-object-CvrkMcCz.js} +1 -1
  126. package/dist/assets/{extend-C7QwHAIX.js → extend-Kvra-g2p.js} +1 -1
  127. package/dist/assets/{fork-menu-IzUmklT-.js → fork-menu-BuRnpNg9.js} +1 -1
  128. package/dist/assets/{frame-debugger-store-DnnDRluY.js → frame-debugger-store-Bz-SsB7V.js} +1 -1
  129. package/dist/assets/{game-contract-seams-BNsMlazd.js → game-contract-seams-gtPhkpZH.js} +1 -1
  130. package/dist/assets/{game-css-scope-transform-88RxvxOt.js → game-css-scope-transform-BJ-6sqe3.js} +1 -1
  131. package/dist/assets/{game-document.service-DIr-ORkq.js → game-document.service-Dtsjp-QD.js} +1 -1
  132. package/dist/assets/{game-eval.command-CC7Uvoj2.js → game-eval.command-Bx_q6yCj.js} +1 -1
  133. package/dist/assets/{game-module-access-AhDZaDcg.js → game-module-access-C8FuQkAK.js} +1 -1
  134. package/dist/assets/{game-network-9it10cBz.js → game-network-BfrYV3Wu.js} +3 -3
  135. package/dist/assets/{gameplay-export-CUQR8Pfl.js → gameplay-export-CagiJo3l.js} +1 -1
  136. package/dist/assets/{gameplay-replay-CkkM7FGY.js → gameplay-replay-BGDvgIWD.js} +1 -1
  137. package/dist/assets/{gameplay.command-BDiztUu_.js → gameplay.command-C1gvtyuv.js} +1 -1
  138. package/dist/assets/{generation-jobs-0zZosJvW.js → generation-jobs-B3vV9DA5.js} +1 -1
  139. package/dist/assets/{generation.service-CiXYopxx.js → generation.service-CAQ3QEXE.js} +1 -1
  140. package/dist/assets/{generations-Bz4lh-Ex.js → generations-maNAZ6ie.js} +1 -1
  141. package/dist/assets/{generations.status-COcMSjup.js → generations.status-BHOoDM64.js} +1 -1
  142. package/dist/assets/{hierarchy-marks-Bu95zpZR.js → hierarchy-marks-BBOKHySh.js} +1 -1
  143. package/dist/assets/{hosted-asset-materialization-CPArQZDh.js → hosted-asset-materialization-1nbID23w.js} +1 -1
  144. package/dist/assets/{index-DoNxQyzZ.js → index-2-K3RgL5.js} +2 -2
  145. package/dist/assets/{index-DIXwqDKu.js → index-BNk1xsv9.js} +1 -1
  146. package/dist/assets/{index-D6AX1fN7.js → index-BUrCxsh5.js} +1 -1
  147. package/dist/assets/{index-10BuYjLq.js → index-CIQueasL.js} +1 -1
  148. package/dist/assets/{index-DUp7NK7m.js → index-CokH1Dgb.js} +1 -1
  149. package/dist/assets/{index-DWv69g4y.js → index-D7-TEN6k.js} +1 -1
  150. package/dist/assets/{index-f4TucW0A.js → index-DV2EMzou.js} +1 -1
  151. package/dist/assets/{index-C6arl-gg.js → index-DxZ4l0Lx.js} +7 -7
  152. package/dist/assets/{index-DrtlwuOm.js → index-y3CKXb3j.js} +1 -1
  153. package/dist/assets/{inference-diagnostics-KiAwx9GD.js → inference-diagnostics-5lf-ZIbs.js} +1 -1
  154. package/dist/assets/{ingest-boot-viewport-QyepDdQb.js → ingest-boot-viewport-D4jEOuoN.js} +1 -1
  155. package/dist/assets/{ingest-siblings-B8th8IFl.js → ingest-siblings-FkhDSlt8.js} +1 -1
  156. package/dist/assets/{ingest-source-persistence-6Y7txaZJ.js → ingest-source-persistence-Ci1cjdJ9.js} +1 -1
  157. package/dist/assets/{ingest.service-DwIN9437.js → ingest.service-DCcj8m5Y.js} +1 -1
  158. package/dist/assets/{inspect-BuzOAJBe.js → inspect-CR7QdMOn.js} +1 -1
  159. package/dist/assets/instances.command-BvUqb2mS.js +1 -0
  160. package/dist/assets/{json-history-resource-BYpHdKQG.js → json-history-resource-C5b3fL6s.js} +1 -1
  161. package/dist/assets/{layered-pick-DcR7BSdS.js → layered-pick-BxRnQHJy.js} +1 -1
  162. package/dist/assets/{light-BebXVC05.js → light-DCa8P1uY.js} +1 -1
  163. package/dist/assets/{live-project-verbs-ON5loZ1Q.js → live-project-verbs-De2cikPw.js} +1 -1
  164. package/dist/assets/{machine.document-aK8akRSr.js → machine.document-ZHRCTuWw.js} +1 -1
  165. package/dist/assets/{machines.finder--KUMe7ft.js → machines.finder-_EknWXAa.js} +1 -1
  166. package/dist/assets/{material-BsuLJWFa.js → material-CKTGcoVC.js} +1 -1
  167. package/dist/assets/{material-factory-DySAGpO5.js → material-factory-Dqmsa3qq.js} +1 -1
  168. package/dist/assets/{mesh-C584NDrF.js → mesh-D7E7Tpno.js} +1 -1
  169. package/dist/assets/{model-asset-sections.service-Ei80bTEx.js → model-asset-sections.service-BODa7-eZ.js} +1 -1
  170. package/dist/assets/{model-inspection-HHsUDRbr.js → model-inspection-C3HZSfTa.js} +1 -1
  171. package/dist/assets/{model-thumbnail-DyrMbiQX.js → model-thumbnail-DU5Hb25u.js} +1 -1
  172. package/dist/assets/{models.finder-CYRONBj0.js → models.finder-DGHllLJN.js} +1 -1
  173. package/dist/assets/{module-mode-DtokuzsC.js → module-mode-D94Fe5TK.js} +2 -2
  174. package/dist/assets/{mount-canvas-ingest-root-Dwq4QJe4.js → mount-canvas-ingest-root-C7z5voqs.js} +2 -2
  175. package/dist/assets/{mount-dom-ingest-root-DjZPHSeV.js → mount-dom-ingest-root-DQe5ADSt.js} +2 -2
  176. package/dist/assets/{mount-ingest-root-CmKiIL0n.js → mount-ingest-root-Cux7Vat0.js} +2 -2
  177. package/dist/assets/{mount-manifest-Cz2WbqCT.js → mount-manifest-DA9vvNwK.js} +1 -1
  178. package/dist/assets/{mount-three-ingest-root-BAhAR7Ue.js → mount-three-ingest-root-DdLSbSi_.js} +1 -1
  179. package/dist/assets/{mounted-authoring-BVEmt4Tv.js → mounted-authoring-CdPS27uW.js} +1 -1
  180. package/dist/assets/{mounted-story-viewport-source-BTYPhoe7.js → mounted-story-viewport-source-smY_3Xvs.js} +1 -1
  181. package/dist/assets/{native-debug-module-jcvJdzVp.js → native-debug-module-D3XVzf2G.js} +1 -1
  182. package/dist/assets/{navigation-Cct1xjoc.js → navigation-BL2K8g78.js} +1 -1
  183. package/dist/assets/{navmesh.menu-DtjJRJU5.js → navmesh.menu-yn3UhjtF.js} +1 -1
  184. package/dist/assets/{navmesh.service-CvnEsnqm.js → navmesh.service-Be0ucoLP.js} +1 -1
  185. package/dist/assets/network-observer.service-BS91UFhk.js +1 -0
  186. package/dist/assets/{network.utility-C5XP8XSy.js → network.utility-7WMTdKbC.js} +1 -1
  187. package/dist/assets/{object3d-document-session-registry-CTwGgyV5.js → object3d-document-session-registry-BOhbeWPh.js} +2 -2
  188. package/dist/assets/{oid-transform-DTEc887G.js → oid-transform-D1XfG014.js} +1 -1
  189. package/dist/assets/{particles-BLIrylrd.js → particles-Cry0sotq.js} +1 -1
  190. package/dist/assets/{pixi-authoring-adapter-BNCKxBIf.js → pixi-authoring-adapter-D4r0NNmF.js} +1 -1
  191. package/dist/assets/{pixi-live-write-target-lwYfIA9h.js → pixi-live-write-target-CBs8-AZJ.js} +1 -1
  192. package/dist/assets/{play.command-BPVhF7ll.js → play.command-Dr0f3V-I.js} +2 -2
  193. package/dist/assets/{presentation-12C2FWeB.js → presentation-DZPpkAZH.js} +1 -1
  194. package/dist/assets/{product-C8MuWNVK.js → product-Ds7m0MXl.js} +1 -1
  195. package/dist/assets/{profiler.action-BONmLa2c.js → profiler.action-hX-xAN1Q.js} +1 -1
  196. package/dist/assets/{profiler.menu-Bf0kLJgQ.js → profiler.menu-DII7IA6d.js} +1 -1
  197. package/dist/assets/{profiler.utility-B3cJtsqI.js → profiler.utility-BaEdm9wI.js} +1 -1
  198. package/dist/assets/{project-authoring-session-DYu6Vw61.js → project-authoring-session-0PLEfHVB.js} +2 -2
  199. package/dist/assets/{properties-bone-constraints.inspector-YyMKBmgV.js → properties-bone-constraints.inspector-bnTZA2Sx.js} +1 -1
  200. package/dist/assets/{properties-bone.inspector-BkReBT3S.js → properties-bone.inspector-Ba_BALxK.js} +1 -1
  201. package/dist/assets/{properties-collection.inspector-BovPD8v1.js → properties-collection.inspector-BB7SCk6k.js} +1 -1
  202. package/dist/assets/{properties-constraints.inspector-C1aJGigk.js → properties-constraints.inspector-QvPC5CKU.js} +1 -1
  203. package/dist/assets/{properties-data.inspector-uJwVw8dp.js → properties-data.inspector-C8DURz4h.js} +1 -1
  204. package/dist/assets/{properties-material.inspector-CKLvO3oB.js → properties-material.inspector-BevMJr27.js} +1 -1
  205. package/dist/assets/{properties-modifiers.inspector-w4pP0syM.js → properties-modifiers.inspector-Y5pMiksE.js} +1 -1
  206. package/dist/assets/{properties-object.inspector-BaDw-i8B.js → properties-object.inspector-CQ42THXn.js} +1 -1
  207. package/dist/assets/{properties-output.inspector-BkFTWPgm.js → properties-output.inspector-Bt_7itt6.js} +1 -1
  208. package/dist/assets/{properties-particles.inspector-CNGW6Syt.js → properties-particles.inspector-Bh8XwGWa.js} +1 -1
  209. package/dist/assets/{properties-physics.inspector-Dmj_2LXD.js → properties-physics.inspector-C9Kg9opR.js} +1 -1
  210. package/dist/assets/{properties-render.inspector-DXuF3hXo.js → properties-render.inspector-D0QyE0hB.js} +1 -1
  211. package/dist/assets/{properties-scene.inspector-zIOybkJm.js → properties-scene.inspector-1MvLgJS8.js} +1 -1
  212. package/dist/assets/{properties-texture.inspector-Cw7_kD_k.js → properties-texture.inspector-DEavbeV5.js} +1 -1
  213. package/dist/assets/{properties-view-layer.inspector-KTvg6jxp.js → properties-view-layer.inspector-CLgXfOvJ.js} +1 -1
  214. package/dist/assets/{properties-world.inspector-C2z6VkUL.js → properties-world.inspector-Czxm5_qb.js} +1 -1
  215. package/dist/assets/{r3f-design-session-H_re3CvL.js → r3f-design-session-Ds-Lh4CE.js} +2 -2
  216. package/dist/assets/{r3f-physics-binding-DscNNQbO.js → r3f-physics-binding-Ddy2AMqs.js} +1 -1
  217. package/dist/assets/{r3f-source-authoring-adapter-Szo1Cs_7.js → r3f-source-authoring-adapter-IyBCACL1.js} +1 -1
  218. package/dist/assets/{react-canvas-navigation-EwFdCgr9.js → react-canvas-navigation-DJjAqkef.js} +1 -1
  219. package/dist/assets/{react-inspector.service-DhSXnL44.js → react-inspector.service-CSk2kWPq.js} +1 -1
  220. package/dist/assets/{react-story-board-D5nEBzHW.js → react-story-board-Bcx-zIef.js} +1 -1
  221. package/dist/assets/{react-three-rapier.esm-BF6QF4Ai.js → react-three-rapier.esm-1NxU3dq9.js} +1 -1
  222. package/dist/assets/{react-world-authoring-adapter-CHxMN1Va.js → react-world-authoring-adapter-OePxORCc.js} +1 -1
  223. package/dist/assets/{realm-services-BLc5oNKC.js → realm-services-DpinxOxM.js} +1 -1
  224. package/dist/assets/{reflection-probe-capture.inspector-D6VniZvh.js → reflection-probe-capture.inspector-C_6oDrHo.js} +1 -1
  225. package/dist/assets/{registry-xhjJs815.js → registry-BS9FkzwE.js} +1 -1
  226. package/dist/assets/{relative-import-specifier-DrFdqAeb.js → relative-import-specifier-D6hnbTcT.js} +1 -1
  227. package/dist/assets/{render-env-BCPdsKA4.js → render-env-C1fESfcu.js} +1 -1
  228. package/dist/assets/{render-features--0TO8Kgf.js → render-features-DHKbJ7Fz.js} +1 -1
  229. package/dist/assets/{render-settings-DjQfSasM.js → render-settings-ClSYLEFT.js} +1 -1
  230. package/dist/assets/{resolve-three-Bcsgyhyp.js → resolve-three-Bbo0SWwc.js} +3 -3
  231. package/dist/assets/{root-seam-contract-RYd0OOes.js → root-seam-contract-XS-29MWj.js} +1 -1
  232. package/dist/assets/{run-selection-LhEBCVGi.js → run-selection-DLf4qvaj.js} +1 -1
  233. package/dist/assets/{scene-capture-BIRqPhuK.js → scene-capture-L3kI0vHP.js} +1 -1
  234. package/dist/assets/{scene-document.service-TfAugRy2.js → scene-document.service-BghK8Rt9.js} +2 -2
  235. package/dist/assets/{scene-framing-nKt2uw8d.js → scene-framing-BWych0aQ.js} +1 -1
  236. package/dist/assets/{seeded-random-DVNNXGgL.js → seeded-random-Ce4p3AkI.js} +1 -1
  237. package/dist/assets/{session-BfHWkUIf.js → session-CAnO1WpE.js} +16 -3
  238. package/dist/assets/{setup-renderer-EWFHz43d.js → setup-renderer-DxcHRzSg.js} +1 -1
  239. package/dist/assets/{source-object3d-authoring-adapter-BfZL6kIn.js → source-object3d-authoring-adapter-CUFQCDZj.js} +1 -1
  240. package/dist/assets/{source-persistence-backend-jPCITiRY.js → source-persistence-backend-BsZyLz63.js} +1 -1
  241. package/dist/assets/{stage-keyboard-CoHej2w7.js → stage-keyboard-Bfxkwdni.js} +1 -1
  242. package/dist/assets/{stage-overlay-set-Ca76l3Qx.js → stage-overlay-set-bbNN2SNO.js} +1 -1
  243. package/dist/assets/{stage-presence-markers-xPVn5wYi.js → stage-presence-markers-C8xYcF2L.js} +1 -1
  244. package/dist/assets/{stage-transform-tools-tv1GrWWx.js → stage-transform-tools-p5sisbub.js} +1 -1
  245. package/dist/assets/{standard-viewport-dressing-D3zf1lK5.js → standard-viewport-dressing-I7UKATya.js} +1 -1
  246. package/dist/assets/{state-watch.action-CcKlZ2UY.js → state-watch.action-CAqCjd3J.js} +1 -1
  247. package/dist/assets/{state-watch.menu-CfX0vVzK.js → state-watch.menu-DWN-p-a3.js} +1 -1
  248. package/dist/assets/{state-watch.utility-CAFS9E8i.js → state-watch.utility-CMGyVLnH.js} +1 -1
  249. package/dist/assets/{story-capture-CQDQ6ceq.js → story-capture-BGhtcQBF.js} +1 -1
  250. package/dist/assets/{story-documents-BsCz4cYg.js → story-documents-DaK12Qjv.js} +1 -1
  251. package/dist/assets/{story-documents.service-BiPDdw6-.js → story-documents.service-CMNLzj5f.js} +1 -1
  252. package/dist/assets/{story-documents.service-DNBQcU85.js → story-documents.service-fChFb24G.js} +1 -1
  253. package/dist/assets/{story-media-presence-D4r3ux6s.js → story-media-presence-2zp3uRLL.js} +1 -1
  254. package/dist/assets/{story-pixi-preview-BdrEc99w.js → story-pixi-preview-hxfq6ofD.js} +1 -1
  255. package/dist/assets/{story-presentation-R3d3k1LX.js → story-presentation-C_FXa1VN.js} +1 -1
  256. package/dist/assets/{story-three-preview-2eZhMyGq.js → story-three-preview-uQ3ADzPv.js} +2 -2
  257. package/dist/assets/{studio-environment-Bu8zJYfs.js → studio-environment-B1C4moYZ.js} +1 -1
  258. package/dist/assets/{surface-state-iqvzpdI3.js → surface-state-BZNvmNKu.js} +1 -1
  259. package/dist/assets/{syntactic-prop-specs-fghyi8Iv.js → syntactic-prop-specs-BA6l20Yy.js} +1 -1
  260. package/dist/assets/{team-playtest.service-jsLP6oYl.js → team-playtest.service-C5Vi2OJZ.js} +1 -1
  261. package/dist/assets/{three-authoring-adapter-DHzYD2um.js → three-authoring-adapter-BckRZAFC.js} +1 -1
  262. package/dist/assets/three-authoring.service-K1UPw3op.js +2 -0
  263. package/dist/assets/{three-ingest-runtime-DnLI0CbD.js → three-ingest-runtime-DZKrRIHE.js} +1 -1
  264. package/dist/assets/{three-integration-DllJ3ocV.js → three-integration-iaJQ46tu.js} +2 -2
  265. package/dist/assets/three-integration.service-DYpZ_rFP.js +1 -0
  266. package/dist/assets/{three-CUyDAz4o.js → three-oA8NOIIL.js} +1 -1
  267. package/dist/assets/{three-projection-core-Cr_G136G.js → three-projection-core-BDAHFfdE.js} +1 -1
  268. package/dist/assets/{three-state-Y0Lj3YRW.js → three-state-BV7x8kw3.js} +1 -1
  269. package/dist/assets/{three-story-capture.service-BwHJcDgw.js → three-story-capture.service-CaUSNiDk.js} +2 -2
  270. package/dist/assets/{three-story-model-BxXXVpjW.js → three-story-model-B6IgeeuY.js} +1 -1
  271. package/dist/assets/{three-viewport-presentation-C03geDOa.js → three-viewport-presentation-CKn-D0y1.js} +1 -1
  272. package/dist/assets/{transform-mode-request-CTyYhcR7.js → transform-mode-request-APlKqsfP.js} +1 -1
  273. package/dist/assets/{transport-strip-C5eYwwWc.js → transport-strip-C-sBBXum.js} +1 -1
  274. package/dist/assets/transport.header-CxVZN4ZW.js +1 -0
  275. package/dist/assets/{tuples-CWSKPWYu.js → tuples-vz7GNWYe.js} +1 -1
  276. package/dist/assets/{ui-board-document-DsPpTbRf.js → ui-board-document-C5xsL6QI.js} +2 -2
  277. package/dist/assets/{user-data-B0zGjFCx.js → user-data-BWhINAlG.js} +1 -1
  278. package/dist/assets/{utility-view-state--9kNEUqG.js → utility-view-state-DUssk2Y5.js} +1 -1
  279. package/dist/assets/{viewport-door-BYc5x1R6.js → viewport-door-D_nXAmUt.js} +1 -1
  280. package/dist/assets/{viewport-root-presentation-Do2ApQ2Z.js → viewport-root-presentation-DKZfgm-u.js} +1 -1
  281. package/dist/assets/{viewport-surface-status-7HsBeVul.js → viewport-surface-status-BK9OGt3f.js} +1 -1
  282. package/dist/assets/{webworkerAll-B4YS4ShL.js → webworkerAll-Du9ligfF.js} +1 -1
  283. package/dist/assets/worker-BXLmYZTK.js +2 -0
  284. package/dist/assets/{workspace-arrangement-fbEjJgLC.js → workspace-arrangement-BgwQc-qT.js} +1 -1
  285. package/dist/assets/{world-documents-Dfz5UHlQ.js → world-documents-DeHr136o.js} +1 -1
  286. package/dist/assets/{world-root-stage-binding-Yr9vCZgJ.js → world-root-stage-binding-BM10opvf.js} +1 -1
  287. package/dist/assets/{xstate-animation-binding-DVeg6K5M.js → xstate-animation-binding-B_oh3YqN.js} +1 -1
  288. package/dist/assets/{xstate-animation-meta-Ct8E8pwC.js → xstate-animation-meta-DJXYGNX1.js} +1 -1
  289. package/dist-node/cli.js +25 -27
  290. package/package.json +16 -16
  291. package/dist/assets/InspectorObjectPreview-CZGUVXl6.js +0 -1
  292. package/dist/assets/Object3DDocumentViewport-BCQBFvo8.js +0 -2
  293. package/dist/assets/autoplay.service-YRbIL-c1.js +0 -1
  294. package/dist/assets/blender-emscripten-engine-DrQ7iKAw.js +0 -2
  295. package/dist/assets/instances.command-CGjpGtsn.js +0 -1
  296. package/dist/assets/network-observer.service-QgI7uDnk.js +0 -1
  297. package/dist/assets/three-authoring.service-DGp-G2mb.js +0 -2
  298. package/dist/assets/three-integration.service-Cns0bkbp.js +0 -1
  299. package/dist/assets/transport.header-BdJfBfsH.js +0 -1
  300. package/dist/assets/worker-CIByxsbl.js +0 -2
@@ -1 +1 @@
1
- import{a as i}from"./jsx-runtime-DPjLkJKQ.js";import{EDITOR_LAYER as Ke}from"./editor-layers-cylPsVa_.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-C6arl-gg.js";import{s as Mt,o as Vt}from"./object3d-document-session-registry-CTwGgyV5.js";import{R as Ot}from"./RootSelectionOverlay-B077HGww.js";import{e as Lt,S as Ft}from"./surface-state-iqvzpdI3.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-DjQfSasM.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-EWFHz43d.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-DYu6Vw61.js";import"./three-integration-DllJ3ocV.js";import{registerPresentedCanvasFrame as ir}from"./canvas-preview-frames-Wb2Bog86.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-C03geDOa.js";import{a as Z}from"./entity-object-6SA98e-d.js";import{w as vr}from"./editor-shell-store-BbdX1Nk_.js";import{p as wr}from"./viewport-root-presentation-Do2ApQ2Z.js";import{d as yr}from"./asset-editor-persistence-DaYfW31_.js";import{bindStagePresenceMarkers as Sr}from"./stage-presence-markers-xPVn5wYi.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-fbEjJgLC.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-DcR7BSdS.js";import"./root-stacking-BEd9ZvxC.js";import"./react-story-board-D5nEBzHW.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./inspect-BuzOAJBe.js";import"./inference-diagnostics-KiAwx9GD.js";import"./object-marks-BnvSuCTt.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./render-features--0TO8Kgf.js";import"./matcap-texture-Dm2c-VQa.js";import"./defaults-DKiBJCPN.js";import"./edit-mode-authoring-aQOcoK_S.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-B0zGjFCx.js";import"./model-thumbnail-DyrMbiQX.js";import"./studio-environment-Bu8zJYfs.js";import"./three-state-Y0Lj3YRW.js";import"./hierarchy-marks-Bu95zpZR.js";import"./component-instance-root-BKRR39Wd.js";import"./three-contract-Dkt6PmWY.js";import"./viewport-door-BYc5x1R6.js";import"./content-bounds-DbuPrpc-.js";import"./asset-preview-j90MweIO.js";import"./bitmap-label-Ct4k6ehY.js";import"./index-DoNxQyzZ.js";import"./standard-viewport-dressing-D3zf1lK5.js";import"./clip-planes-CnAI6DZn.js";import"./three-CUyDAz4o.js";import"./model-inspection-HHsUDRbr.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-nKt2uw8d.js";import"./live-mixers-B-bwLZ7c.js";import"./output-pass-HurwNl0G.js";import"./Pass-D1MRT672.js";import"./mounted-authoring-BVEmt4Tv.js";import"./collaboration-presence-CKyRGpSR.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-L_zFs_uY.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-DxZ4l0Lx.js";import{s as Mt,o as Vt}from"./object3d-document-session-registry-BOhbeWPh.js";import{R as Ot}from"./RootSelectionOverlay-BF32ngZd.js";import{e as Lt,S as Ft}from"./surface-state-BZNvmNKu.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-ClSYLEFT.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-DxcHRzSg.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-0PLEfHVB.js";import"./three-integration-iaJQ46tu.js";import{registerPresentedCanvasFrame as ir}from"./canvas-preview-frames-DgjyhrhI.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-CKn-D0y1.js";import{a as Z}from"./entity-object-CvrkMcCz.js";import{w as vr}from"./editor-shell-store-DOiPmqow.js";import{p as wr}from"./viewport-root-presentation-DKZfgm-u.js";import{d as yr}from"./asset-editor-persistence-BB9WAcxO.js";import{bindStagePresenceMarkers as Sr}from"./stage-presence-markers-C8xYcF2L.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-BgwQc-qT.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-BxRnQHJy.js";import"./root-stacking-BEd9ZvxC.js";import"./react-story-board-Bcx-zIef.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./inspect-CR7QdMOn.js";import"./inference-diagnostics-5lf-ZIbs.js";import"./object-marks-BnvSuCTt.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./render-features-DHKbJ7Fz.js";import"./matcap-texture-Dm2c-VQa.js";import"./defaults-DKiBJCPN.js";import"./edit-mode-authoring-FKyNiefy.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-BWhINAlG.js";import"./model-thumbnail-DU5Hb25u.js";import"./studio-environment-B1C4moYZ.js";import"./three-state-BV7x8kw3.js";import"./hierarchy-marks-BBOKHySh.js";import"./component-instance-root-Cau6CbHE.js";import"./three-contract-Dkt6PmWY.js";import"./viewport-door-D_nXAmUt.js";import"./content-bounds-D-AXJalq.js";import"./asset-preview-SYBnd0Vm.js";import"./bitmap-label-Ct4k6ehY.js";import"./index-2-K3RgL5.js";import"./standard-viewport-dressing-I7UKATya.js";import"./clip-planes-CnAI6DZn.js";import"./three-oA8NOIIL.js";import"./model-inspection-C3HZSfTa.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-BWych0aQ.js";import"./live-mixers-B-bwLZ7c.js";import"./output-pass-HurwNl0G.js";import"./Pass-D1MRT672.js";import"./mounted-authoring-CdPS27uW.js";import"./collaboration-presence-CANQ_L1j.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-Ct8E8pwC.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-C6arl-gg.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-DJXYGNX1.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-DxZ4l0Lx.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-C6arl-gg.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-DxZ4l0Lx.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
@@ -1212,13 +1212,11 @@ var init_BUNDLE = __esm({
1212
1212
  "../blender-engine/wasm/BUNDLE.json"() {
1213
1213
  BUNDLE_default = {
1214
1214
  blender: "5.2.0 LTS",
1215
- source: "1b2547991d6841a6ea4c1394b8d648086b9af6c9",
1216
- reviewedSource: "1b2547991d6841a6ea4c1394b8d648086b9af6c9",
1215
+ source: "e5d7eec67572dfc7c73f8f4d3f601d03442546f9",
1216
+ reviewedSource: "e5d7eec67572dfc7c73f8f4d3f601d03442546f9",
1217
1217
  upstream: "fbe6228777e7d9afefcd61a413844e790ae75db7",
1218
1218
  sourceRepository: "https://github.com/volter-ai/blender",
1219
- sourceRecipe: "https://github.com/volter-ai/blender/blob/1b2547991d6841a6ea4c1394b8d648086b9af6c9/build_files/emscripten/RELEASE.md",
1220
- sourceRelease: "https://github.com/volter-ai/blender/releases/tag/blender-5.2.0-wasm.4",
1221
- verification: "https://github.com/volter-ai/blender/releases/download/blender-5.2.0-wasm.4/VERIFICATION.json",
1219
+ sourceRecipe: "https://github.com/volter-ai/blender/blob/e5d7eec67572dfc7c73f8f4d3f601d03442546f9/build_files/emscripten/RELEASE.md",
1222
1220
  factoryEngine: "BLENDER_EEVEE",
1223
1221
  files: {
1224
1222
  "blender_browser.js": "raw",
@@ -1231,8 +1229,8 @@ var init_BUNDLE = __esm({
1231
1229
  sha256: "0c63c29e7d4b1ba1fce4e94057778b0757767b25ea4f6f01d329e99351568f30"
1232
1230
  },
1233
1231
  "blender_browser.wasm": {
1234
- bytes: 86318165,
1235
- sha256: "722b181cec94f1bdf2f088e0ae92f04ffa5a79c267bf5b04af7260c16e34eb0f"
1232
+ bytes: 86317655,
1233
+ sha256: "0ba94ac8388de893bcec4da70516aea69128addaa490ef27f17ca06262ee6546"
1236
1234
  },
1237
1235
  "blender_browser.data": {
1238
1236
  bytes: 52698568,
@@ -1245,8 +1243,8 @@ var init_BUNDLE = __esm({
1245
1243
  sha256: "0c63c29e7d4b1ba1fce4e94057778b0757767b25ea4f6f01d329e99351568f30"
1246
1244
  },
1247
1245
  "blender_browser.wasm.br": {
1248
- bytes: 18597884,
1249
- sha256: "55ef6f9d63a4c8afa7e7aec4388d1f8c462f5294fcbba8bfbbabe5c41a13f8f9"
1246
+ bytes: 18596913,
1247
+ sha256: "64af23954e1911ffcb879f69a9e8c9bbd83b5531939b586228f44fcea8211e3b"
1250
1248
  },
1251
1249
  "blender_browser.data.br": {
1252
1250
  bytes: 8056563,
@@ -1257,10 +1255,10 @@ var init_BUNDLE = __esm({
1257
1255
  sha256: "4085e9336266cf66f061d4d5c962a5929cc96d5732c746b5c13ea05cd104a75b"
1258
1256
  }
1259
1257
  },
1260
- note: "Official Blender v5.2.0 plus our headless wasm changes and our existing export/session integration. Dependencies are rebuilt from pinned official sources. No third-party Blender port commits or build scripts are inputs. PROXY_TO_PTHREAD, WasmFS, 512 MiB initial / 4 GiB maximum memory, twelve-worker pool. Build information is disabled. The source release includes the exact source tree, materialized startup.blend, dependency archives, pure Python wheels, and notices.",
1258
+ note: "Unreleased Stoneguard candidate. Clean source build at the named commit; Release -O3 objects and -O2 link, Emscripten 6.0.5. Focused geometry regression matches shipped engine across original, vertex edit and subdivision-level edit. Full historical battery is absent from current editor checkout; no full-battery claim.",
1261
1259
  callTrampoline: "CPython 3.13.13 is compiled with PY_CALL_TRAMPOLINE for Blender CPython slot arity casts. This applies to CPython dispatch, not arbitrary indirect calls.",
1262
1260
  engineIds: "The existing session registers Python render engines under CYCLES, BLENDER_EEVEE and BLENDER_WORKBENCH; the headless build permits built-in IDs to be shadowed.",
1263
- exportDoor: "The source-owned bpy_web_export.cc exports Principled physical inputs, normal images, eight named UV layers and evaluated corner normals, and takes graph_materials/graph_images/graph_generated (a graph-drawn shader mix reduced to the one Principled BSDF it reaches, graph images at the door revisions with every UDIM tile, orco for deformed meshes whose graph reads Generated coordinates). A frame can defer its changed meshes and pictures (defer) for the caller to pull one at a time (export_mesh, export_image), each call freeing the previous one's columns and a picture it decoded; an undo step keeps the revisions when Blender kept the depsgraph (session_undo); Blender's CPU subdivision descriptor is released once a mesh is read; the memory door reports malloc in-use and free. Datablock revisions are keyed by session_uid. writefile.cc writes one copy of the document per save in the browser build.",
1261
+ exportDoor: "The source-owned bpy_web_export.cc exports Principled physical inputs, normal images, eight named UV layers and evaluated corner normals, and takes graph_materials/graph_images/graph_generated (a graph-drawn shader mix reduced to the one Principled BSDF it reaches, graph images at the door revisions with every UDIM tile, orco for deformed meshes whose graph reads Generated coordinates). A frame can defer its changed meshes and pictures (defer) for the caller to pull one at a time (export_mesh, export_image), each call freeing the previous one's columns and a picture it decoded; an undo step keeps the revisions when Blender kept the depsgraph (session_undo); Blender's CPU subdivision descriptor is released once a mesh is read; the memory door reports malloc in-use and free. Datablock revisions are keyed by session_uid. writefile.cc writes one copy of the document per save in the browser build. CPU evaluators adopt stencil tables without cloning; browser subdivision descriptors are released immediately after CPU tessellation/deformation.",
1264
1262
  preloadedPayload: "releasePreloadedFileData releases the JS preload buffer after session ready. The measured working payload exclusions are retained."
1265
1263
  };
1266
1264
  }
@@ -2317,7 +2315,7 @@ import { fileURLToPath as fileURLToPath2 } from "node:url";
2317
2315
  var package_default = {
2318
2316
  name: "@volter/game-editor",
2319
2317
  author: "Volter AI, Inc.",
2320
- version: "0.5.111",
2318
+ version: "0.5.113",
2321
2319
  publishConfig: {
2322
2320
  access: "public"
2323
2321
  },
@@ -2366,22 +2364,22 @@ var package_default = {
2366
2364
  }
2367
2365
  },
2368
2366
  dependencies: {
2369
- "@volter/editor-core": "0.5.111",
2370
- "@volter/editor-game": "0.5.111",
2371
- "@volter/editor-react": "0.5.111",
2372
- "@volter/editor-threejs": "0.5.111",
2373
- "@volter/editor-xstate": "0.5.111",
2374
- "@volter/editor-blender": "0.1.51",
2375
- "@volter/dawproject": "0.5.111",
2376
- "@volter/editor-dawproject": "0.5.111",
2377
- "@volter/blender-engine": "0.1.49",
2378
- "@volter/editor-project": "0.5.111",
2379
- "@volter/editor-sdk": "0.5.111",
2380
- "@volter/editor-live": "0.5.111",
2381
- "@volter/game-live": "0.5.111",
2367
+ "@volter/editor-core": "0.5.113",
2368
+ "@volter/editor-game": "0.5.113",
2369
+ "@volter/editor-react": "0.5.113",
2370
+ "@volter/editor-threejs": "0.5.113",
2371
+ "@volter/editor-xstate": "0.5.113",
2372
+ "@volter/editor-blender": "0.1.53",
2373
+ "@volter/dawproject": "0.5.113",
2374
+ "@volter/editor-dawproject": "0.5.113",
2375
+ "@volter/blender-engine": "0.1.51",
2376
+ "@volter/editor-project": "0.5.113",
2377
+ "@volter/editor-sdk": "0.5.113",
2378
+ "@volter/editor-live": "0.5.113",
2379
+ "@volter/game-live": "0.5.113",
2382
2380
  "@modelcontextprotocol/sdk": "1.30.0",
2383
- "@volter/game-runtime": "0.5.111",
2384
- "@volter/threejs-runtime": "0.5.111",
2381
+ "@volter/game-runtime": "0.5.113",
2382
+ "@volter/threejs-runtime": "0.5.113",
2385
2383
  undici: "7.29.1",
2386
2384
  typescript: "5.9.3",
2387
2385
  "@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.111",
4
+ "version": "0.5.113",
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.111",
54
- "@volter/editor-game": "0.5.111",
55
- "@volter/editor-react": "0.5.111",
56
- "@volter/editor-threejs": "0.5.111",
57
- "@volter/editor-xstate": "0.5.111",
58
- "@volter/editor-blender": "0.1.51",
59
- "@volter/dawproject": "0.5.111",
60
- "@volter/editor-dawproject": "0.5.111",
61
- "@volter/blender-engine": "0.1.49",
62
- "@volter/editor-project": "0.5.111",
63
- "@volter/editor-sdk": "0.5.111",
64
- "@volter/editor-live": "0.5.111",
65
- "@volter/game-live": "0.5.111",
53
+ "@volter/editor-core": "0.5.113",
54
+ "@volter/editor-game": "0.5.113",
55
+ "@volter/editor-react": "0.5.113",
56
+ "@volter/editor-threejs": "0.5.113",
57
+ "@volter/editor-xstate": "0.5.113",
58
+ "@volter/editor-blender": "0.1.53",
59
+ "@volter/dawproject": "0.5.113",
60
+ "@volter/editor-dawproject": "0.5.113",
61
+ "@volter/blender-engine": "0.1.51",
62
+ "@volter/editor-project": "0.5.113",
63
+ "@volter/editor-sdk": "0.5.113",
64
+ "@volter/editor-live": "0.5.113",
65
+ "@volter/game-live": "0.5.113",
66
66
  "@modelcontextprotocol/sdk": "1.30.0",
67
- "@volter/game-runtime": "0.5.111",
68
- "@volter/threejs-runtime": "0.5.111",
67
+ "@volter/game-runtime": "0.5.113",
68
+ "@volter/threejs-runtime": "0.5.113",
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-DVK0IVd_.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./editor-shell-store-BbdX1Nk_.js";import"./output-pass-HurwNl0G.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./Pass-D1MRT672.js";import"./editor-layers-cylPsVa_.js";import"./workspace-arrangement-fbEjJgLC.js";import"./index-C6arl-gg.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-B0zGjFCx.js";import"./entity-object-6SA98e-d.js";import"./three-contract-Dkt6PmWY.js";import"./live-mixers-B-bwLZ7c.js";import"./asset-preview-j90MweIO.js";import"./renderer-ownership-BovSEcLv.js";import"./hierarchy-marks-Bu95zpZR.js";import"./studio-environment-Bu8zJYfs.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-DHOA7Fjl.js";import"./three-state-Y0Lj3YRW.js";import"./standard-viewport-dressing-D3zf1lK5.js";import"./content-bounds-DbuPrpc-.js";import"./preview-renderer-BrYNFV1p.js";import"./live-gesture-lock-DJbrjOqf.js";import"./three-integration-DllJ3ocV.js";import"./host-hierarchy-objects-BV3WqU2w.js";import"./layered-pick-DcR7BSdS.js";import"./root-stacking-BEd9ZvxC.js";import"./model-thumbnail-DyrMbiQX.js";import"./object3d-document-session-registry-CTwGgyV5.js";import"./component-instance-root-BKRR39Wd.js";import"./viewport-door-BYc5x1R6.js";import"./model-inspection-HHsUDRbr.js";import"./three-viewport-presentation-C03geDOa.js";import"./clip-planes-CnAI6DZn.js";import"./three-CUyDAz4o.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-nKt2uw8d.js";import"./source-object3d-authoring-adapter-BfZL6kIn.js";import"./three-projection-core-Cr_G136G.js";import"./editor-presentation-activity-CqJH4G9t.js";import"./transport-strip-C5eYwwWc.js";import"./viewport-surface-status-7HsBeVul.js";function ut({previewKey:o,object:r,displayName:i,fill:p=!1}){return t.jsx("div",{"data-testid":"inspector-object-preview",style:p?{position:"absolute",inset:0,overflow:"hidden"}:{width:"100%",height:220,minHeight:220,borderBottom:"1px solid var(--volter-structural-divider)",overflow:"hidden",position:"relative"},children:t.jsx(m,{documentId:`inspector-preview:${o}`,source:r,displayName:i,active:!0,chromeless:!0})})}export{ut as InspectorObjectPreview};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/StageHost-DHOA7Fjl.js","assets/index-C6arl-gg.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-Y0Lj3YRW.js","assets/editor-shell-store-BbdX1Nk_.js","assets/output-pass-HurwNl0G.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/Pass-D1MRT672.js","assets/editor-layers-cylPsVa_.js","assets/workspace-arrangement-fbEjJgLC.js","assets/user-data-B0zGjFCx.js","assets/entity-object-6SA98e-d.js","assets/three-contract-Dkt6PmWY.js","assets/standard-viewport-dressing-D3zf1lK5.js","assets/content-bounds-DbuPrpc-.js","assets/hierarchy-marks-Bu95zpZR.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-DllJ3ocV.js","assets/host-hierarchy-objects-BV3WqU2w.js","assets/layered-pick-DcR7BSdS.js","assets/root-stacking-BEd9ZvxC.js","assets/model-thumbnail-DyrMbiQX.js","assets/studio-environment-Bu8zJYfs.js","assets/KTX2Loader-CaqVE6nY.js","assets/GLTFLoader-KeoruJgS.js","assets/BufferGeometryUtils-B22h7jo4.js","assets/object3d-document-session-registry-CTwGgyV5.js","assets/component-instance-root-BKRR39Wd.js","assets/viewport-door-BYc5x1R6.js","assets/asset-preview-j90MweIO.js","assets/bitmap-label-Ct4k6ehY.js","assets/model-inspection-HHsUDRbr.js","assets/three-viewport-presentation-C03geDOa.js","assets/clip-planes-CnAI6DZn.js","assets/three-CUyDAz4o.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-nKt2uw8d.js","assets/source-object3d-authoring-adapter-BfZL6kIn.js","assets/three-projection-core-Cr_G136G.js","assets/editor-presentation-activity-CqJH4G9t.js","assets/transport-strip-C5eYwwWc.js","assets/viewport-surface-status-7HsBeVul.js"])))=>i.map(i=>d[i]);
2
- import{ak as r,_ as a}from"./index-C6arl-gg.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-7HsBeVul.js";const s=n.lazy(async()=>({default:(await a(()=>import("./StageHost-DHOA7Fjl.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-C6arl-gg.js";import{e as p}from"./game-network-9it10cBz.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-jcvJdzVp.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-BnLWZePq.js";import"./contract-system-adapters-ETU93T1B.js";import"./game-contract-seams-BNsMlazd.js";import"./seeded-random-DVNNXGgL.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-ON5loZ1Q.js";import"./capability-coverage-D-0PxPrZ.js";import"./edit-mode-authoring-aQOcoK_S.js";import"./json-history-resource-BYpHdKQG.js";import"./binding-resolver-BXphDCM5.js";import"./adapter-surface-Y37Nzcyw.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./realm-services-BLc5oNKC.js";import"./canvas-entry-runtime-9fi2F1yV.js";import"./three-ingest-runtime-DnLI0CbD.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-CqL5EgXV.js";import"./ingest-source-persistence-6Y7txaZJ.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-Do2ApQ2Z.js";import"./mounted-authoring-BVEmt4Tv.js";import"./entity-object-6SA98e-d.js";import"./user-data-B0zGjFCx.js";import"./workspace-arrangement-fbEjJgLC.js";import"./three-contract-Dkt6PmWY.js";import"./three-CUyDAz4o.js";import"./editor-layers-cylPsVa_.js";import"./component-instance-root-BKRR39Wd.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-authoring-adapter-DHzYD2um.js";import"./source-persistence-backend-jPCITiRY.js";import"./three-projection-core-Cr_G136G.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-DscNNQbO.js";import"./deferred-ingest-play-fhFUuU4a.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-CHxMN1Va.js";import"./board-guides-Bi0XcSub.js";import"./relative-import-specifier-DrFdqAeb.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-BuzOAJBe.js";import"./inference-diagnostics-KiAwx9GD.js";import"./writer-tw6EcuVO.js";import"./three-state-Y0Lj3YRW.js";import"./editor-shell-store-BbdX1Nk_.js";import"./output-pass-HurwNl0G.js";import"./viewport-door-BYc5x1R6.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,2 +0,0 @@
1
- import{a as y,b as k,S as p,P as _,s as R,c as B,o as A}from"./worker-CIByxsbl.js";import{s as $}from"./session-BfHWkUIf.js";async function I(o){const a=await fetch(o);if(!a.ok)throw new Error(`${o}: HTTP ${a.status}`);const e=await a.text(),r={exports:{}},i=new Function("module","exports","define",`${e}
2
- return typeof createBlenderModule === 'function' ? createBlenderModule : module.exports;`)(r,r.exports,void 0);if(typeof i!="function")throw new Error("blender_browser.js did not produce a module factory");return i}const D=new TextEncoder;function N(o,a){let e="";for(const r of a.split("/").filter(Boolean))o.FS_createPath(e||"/",r,!0,!0),e+=`/${r}`}function x(o){const a=o.FS;return{readFile:async e=>a.readFile(e),writeFile:(e,r)=>(a.writeFile(e,r),Promise.resolve()),mkdirTree:async e=>a.mkdirTree(e),readdir:async e=>a.readdir(e),stat:async e=>{let r;try{r=a.stat(e)}catch{return null}const n=r.mtime;return{size:r.size,mode:r.mode??0,mtimeMs:typeof n=="number"?n:n?.getTime()??0}},unlink:async e=>a.unlink(e)}}const L="volter-blender-artifacts";async function m(o,a){const e=y(o);if(!a||typeof caches>"u")return fetch(e);const r=`${e}?sha256=${a}`,n=await caches.open(L),i=await n.match(r);if(i)return i;const l=await fetch(e);if(!l.ok)return l;for(const c of await n.keys())c.url.startsWith(`${e}?sha256=`)&&c.url!==r&&await n.delete(c);const s=new Response(await l.blob(),{headers:{"content-type":l.headers.get("content-type")??"application/octet-stream"}});return await n.put(r,s.clone()),s}async function C(o,a){if(!self.crossOriginIsolated)throw new Error("Headless Blender needs SharedArrayBuffer, so the editor page has to be cross-origin isolated (Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy on every response). This worker reports crossOriginIsolated=false.");const e=y("blender_browser.js"),r=a.digests??{},[n,i]=await Promise.all([I(e),m("blender_browser.data",r["blender_browser.data"]).then(async t=>{if(!t.ok)throw new Error(`blender_browser.data: HTTP ${t.status}`);return t.arrayBuffer()})]);let l=null;const s=performance.now();let c=null;const u=(t,f)=>{f.startsWith("@@VOLTER-READY ")&&(c=f.slice(15)),o.log(B(f),f)},d=await n({arguments:["--background","--factory-startup","--python",k],locateFile:t=>y(t),getPreloadedPackage:()=>i,instantiateWasm:(t,f)=>((async()=>{const w=await m("blender_browser.wasm",r["blender_browser.wasm"]);if(!w.ok)throw new Error(`blender_browser.wasm: HTTP ${w.status}`);const{instance:O,module:P}=await WebAssembly.instantiateStreaming(w,t);f(O,P)})().catch(w=>{l=w}),{}),mainScriptUrlOrBlob:e,print:t=>u("log",t),printErr:t=>u("error",t),preRun:[t=>{t.ENV??={},Object.assign(t.ENV,{BLENDER_SYSTEM_RESOURCES:"/bw",BLENDER_SYSTEM_PYTHON:"/bw/python",BLENDER_SYSTEM_SCRIPTS:"/bw/scripts",BLENDER_SYSTEM_DATAFILES:"/bw/datafiles",VOLTER_SESSION_ROOT:p,HOME:"/root",TMPDIR:"/tmp"});for(const f of["/tmp","/root","/work",p,..._,o.project])N(t,f);t.FS_createDataFile(p,"session.py",D.encode($),!0,!0,!0)}]});for(;c===null;){if(l)throw l instanceof Error?l:new Error(String(l));await R(5)}const g=performance.now()-s,T=JSON.parse(c);let E=null;if(typeof d.releasePreloadedFileData=="function"){const t=d.releasePreloadedFileData();E=t.bytes,o.log("log",`blender: released the preloaded ${(t.bytes/1048576).toFixed(0)} MB payload (${t.files} files); WasmFS already holds it`)}else o.log("error","blender: this bundle has no releasePreloadedFileData, so the ~55 MB packed .data payload stays resident beside the copy WasmFS made of it — relink with the recipe's --post-js (recipe/release-preloaded-file-data.js).");const b=d.FS;let S="";for(const t of`${o.project}`.split("/").filter(Boolean)){S+=`/${t}`;try{b.chmod(S,511)}catch{}}for(const t of["/work","/tmp","/root",p,..._])try{b.chmod(t,511)}catch{}const h=x(d);b.chmod("/bw/datafiles",493),await M(h,r["essentials.bin"]);const{request:F}=A(h,o);return{skew:"emscripten",banner:T,files:h,request:F,readArena:async()=>d.HEAPU8.subarray(d._blender_web_export_buffer(),d._blender_web_export_buffer()+d._blender_web_export_buffer_size()),bootMs:g,memoryBytes:()=>d.HEAPU8.length,releasedPayloadBytes:E}}async function M(o,a){const[e,r]=await Promise.all([fetch(y("essentials.json")),m("essentials.bin",a)]);if(!e.ok||!r.ok)throw new Error(`Blender Essentials assets are missing (${e.status}/${r.status})`);const n=await e.json(),i=await r.arrayBuffer(),l=Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256",i)),s=>s.toString(16).padStart(2,"0")).join("");if(i.byteLength!==n.bytes||l!==n.sha256)throw new Error("Blender Essentials payload does not match its source manifest");for(const s of n.files){if(!s.path||s.path.includes("\\")||s.path.split("/").some(u=>!u||u==="."||u==="..")||!Number.isInteger(s.offset)||!Number.isInteger(s.bytes)||s.offset<0||s.bytes<0||s.offset+s.bytes>i.byteLength)throw new Error(`Invalid Blender Essentials file: ${s.path}`);const c=`/bw/datafiles/assets/${s.path}`;await o.mkdirTree(c.slice(0,c.lastIndexOf("/"))),await o.writeFile(c,new Uint8Array(i,s.offset,s.bytes))}}export{C as startEmscriptenBlenderEngine};
@@ -1 +0,0 @@
1
- import{ah as m}from"./index-C6arl-gg.js";import{b as p,a as e,c as n,s}from"./game-network-9it10cBz.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-jcvJdzVp.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-BnLWZePq.js";import"./contract-system-adapters-ETU93T1B.js";import"./game-contract-seams-BNsMlazd.js";import"./seeded-random-DVNNXGgL.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-ON5loZ1Q.js";import"./capability-coverage-D-0PxPrZ.js";import"./edit-mode-authoring-aQOcoK_S.js";import"./json-history-resource-BYpHdKQG.js";import"./binding-resolver-BXphDCM5.js";import"./adapter-surface-Y37Nzcyw.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./realm-services-BLc5oNKC.js";import"./canvas-entry-runtime-9fi2F1yV.js";import"./three-ingest-runtime-DnLI0CbD.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-CqL5EgXV.js";import"./ingest-source-persistence-6Y7txaZJ.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-Do2ApQ2Z.js";import"./mounted-authoring-BVEmt4Tv.js";import"./entity-object-6SA98e-d.js";import"./user-data-B0zGjFCx.js";import"./workspace-arrangement-fbEjJgLC.js";import"./three-contract-Dkt6PmWY.js";import"./three-CUyDAz4o.js";import"./editor-layers-cylPsVa_.js";import"./component-instance-root-BKRR39Wd.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-authoring-adapter-DHzYD2um.js";import"./source-persistence-backend-jPCITiRY.js";import"./three-projection-core-Cr_G136G.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-DscNNQbO.js";import"./deferred-ingest-play-fhFUuU4a.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-CHxMN1Va.js";import"./board-guides-Bi0XcSub.js";import"./relative-import-specifier-DrFdqAeb.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-BuzOAJBe.js";import"./inference-diagnostics-KiAwx9GD.js";import"./writer-tw6EcuVO.js";import"./three-state-Y0Lj3YRW.js";import"./editor-shell-store-BbdX1Nk_.js";import"./output-pass-HurwNl0G.js";import"./viewport-door-BYc5x1R6.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-9it10cBz.js";import"./index-OZVqp6xS.js";import"./index-Da9JhEvW.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-C6arl-gg.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-jcvJdzVp.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-BnLWZePq.js";import"./contract-system-adapters-ETU93T1B.js";import"./game-contract-seams-BNsMlazd.js";import"./seeded-random-DVNNXGgL.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-ON5loZ1Q.js";import"./capability-coverage-D-0PxPrZ.js";import"./edit-mode-authoring-aQOcoK_S.js";import"./json-history-resource-BYpHdKQG.js";import"./binding-resolver-BXphDCM5.js";import"./adapter-surface-Y37Nzcyw.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./realm-services-BLc5oNKC.js";import"./canvas-entry-runtime-9fi2F1yV.js";import"./three-ingest-runtime-DnLI0CbD.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-CqL5EgXV.js";import"./ingest-source-persistence-6Y7txaZJ.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-Do2ApQ2Z.js";import"./mounted-authoring-BVEmt4Tv.js";import"./entity-object-6SA98e-d.js";import"./user-data-B0zGjFCx.js";import"./workspace-arrangement-fbEjJgLC.js";import"./three-contract-Dkt6PmWY.js";import"./three-CUyDAz4o.js";import"./editor-layers-cylPsVa_.js";import"./component-instance-root-BKRR39Wd.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-authoring-adapter-DHzYD2um.js";import"./source-persistence-backend-jPCITiRY.js";import"./three-projection-core-Cr_G136G.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-DscNNQbO.js";import"./deferred-ingest-play-fhFUuU4a.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-CHxMN1Va.js";import"./board-guides-Bi0XcSub.js";import"./relative-import-specifier-DrFdqAeb.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-BuzOAJBe.js";import"./inference-diagnostics-KiAwx9GD.js";import"./writer-tw6EcuVO.js";import"./three-state-Y0Lj3YRW.js";import"./editor-shell-store-BbdX1Nk_.js";import"./output-pass-HurwNl0G.js";import"./viewport-door-BYc5x1R6.js";import"./game-surface-defaults-D8S4cRxi.js";const zt="workspace.service";function At(){t()}export{zt as point,At as start};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/r3f-design-session-H_re3CvL.js","assets/index-C6arl-gg.js","assets/index-nmcBqr7Y.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-D_NuPfjr.js","assets/jsx-runtime-DPjLkJKQ.js","assets/index-CtzuWnCS.js","assets/index-CinJrH5C.js","assets/index-FUuS4qwW.js","assets/client-DNXj_opT.js","assets/index-CPiRKiDC.css","assets/edit-mode-authoring-aQOcoK_S.js","assets/game-network-9it10cBz.js","assets/index-OZVqp6xS.js","assets/index-Da9JhEvW.js","assets/native-debug-module-jcvJdzVp.js","assets/native-entry-surface-BE8LJNdu.js","assets/debug-registry-BnLWZePq.js","assets/contract-system-adapters-ETU93T1B.js","assets/game-contract-seams-BNsMlazd.js","assets/seeded-random-DVNNXGgL.js","assets/game-audio-BeCyd0Ha.js","assets/rapier-physics-adapter-CaZqWLu0.js","assets/events-156d8d12.esm-CYeuVCYr.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/index-bQE2NA0D.js","assets/live-project-verbs-ON5loZ1Q.js","assets/capability-coverage-D-0PxPrZ.js","assets/json-history-resource-BYpHdKQG.js","assets/binding-resolver-BXphDCM5.js","assets/adapter-surface-Y37Nzcyw.js","assets/structural-signature-Dc7skRiy.js","assets/webgl-frame-capture-DdJkM2mi.js","assets/realm-services-BLc5oNKC.js","assets/canvas-entry-runtime-9fi2F1yV.js","assets/three-ingest-runtime-DnLI0CbD.js","assets/EffectComposer-BEAt0PtQ.js","assets/CopyShader-BzTUYzf6.js","assets/ShaderPass-DTnDQXm0.js","assets/Pass-D1MRT672.js","assets/CSS3DRenderer-BsAqfavI.js","assets/relative-path-guard-GiM7Lsz8.js","assets/react-root-BHA-cdrW.js","assets/editor-presentation-activity-CqJH4G9t.js","assets/active-ingest-CqL5EgXV.js","assets/ingest-source-persistence-6Y7txaZJ.js","assets/pixi-story-model-DNkfnWUV.js","assets/surface-content-Dg9Kkazf.js","assets/viewport-root-presentation-Do2ApQ2Z.js","assets/mounted-authoring-BVEmt4Tv.js","assets/entity-object-6SA98e-d.js","assets/user-data-B0zGjFCx.js","assets/workspace-arrangement-fbEjJgLC.js","assets/three-contract-Dkt6PmWY.js","assets/three-CUyDAz4o.js","assets/editor-layers-cylPsVa_.js","assets/component-instance-root-BKRR39Wd.js","assets/viewport-editor-controls-BYaAZ_Ku.js","assets/three-authoring-adapter-DHzYD2um.js","assets/source-persistence-backend-jPCITiRY.js","assets/three-projection-core-Cr_G136G.js","assets/body-marks-C1LxJtQb.js","assets/user-data-CODoGZqA.js","assets/object-marks-BnvSuCTt.js","assets/structural-ids-BOo2BRoY.js","assets/object3d-authoring-subject-XccsO0xG.js","assets/r3f-physics-binding-DscNNQbO.js","assets/deferred-ingest-play-fhFUuU4a.js","assets/rrweb-Cd2ifIRP.js","assets/react-world-authoring-adapter-CHxMN1Va.js","assets/board-guides-Bi0XcSub.js","assets/relative-import-specifier-DrFdqAeb.js","assets/story-arg-descriptors-Ek86ExX7.js","assets/inspect-BuzOAJBe.js","assets/inference-diagnostics-KiAwx9GD.js","assets/writer-tw6EcuVO.js","assets/three-state-Y0Lj3YRW.js","assets/editor-shell-store-BbdX1Nk_.js","assets/output-pass-HurwNl0G.js","assets/viewport-door-BYc5x1R6.js","assets/game-surface-defaults-D8S4cRxi.js","assets/scene-framing-nKt2uw8d.js","assets/assets-BcrMQHRv.js","assets/loader-BTUKnX5Q.js","assets/KTX2Loader-CaqVE6nY.js","assets/GLTFLoader-KeoruJgS.js","assets/BufferGeometryUtils-B22h7jo4.js","assets/create-runtime-D1bZzRpc.js","assets/binding-Bmxqznjk.js","assets/root-stacking-BEd9ZvxC.js","assets/setup-renderer-EWFHz43d.js","assets/index-DHhMOs_s.js","assets/defaults-DKiBJCPN.js","assets/render-settings-DjQfSasM.js","assets/render-features--0TO8Kgf.js","assets/loop-gate-report-N52EWFGD.js","assets/system-slot-E2mEdiih.js","assets/performance-profiler-CMbwGBuk.js","assets/live-gesture-lock-DJbrjOqf.js"])))=>i.map(i=>d[i]);
2
- import{_ as s,aF as n}from"./index-C6arl-gg.js";import{r as a}from"./design-time-mount-registry-DUpXCg1U.js";import{q as c}from"./edit-mode-authoring-aQOcoK_S.js";import{a as u}from"./json-history-resource-BYpHdKQG.js";import{o as h}from"./three-authoring-adapter-DHzYD2um.js";import{t as i}from"./editor-shell-store-BbdX1Nk_.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./component-instance-root-BKRR39Wd.js";import"./user-data-B0zGjFCx.js";import"./workspace-arrangement-fbEjJgLC.js";import"./source-persistence-backend-jPCITiRY.js";import"./ingest-source-persistence-6Y7txaZJ.js";import"./three-projection-core-Cr_G136G.js";import"./editor-layers-cylPsVa_.js";import"./three-CUyDAz4o.js";import"./entity-object-6SA98e-d.js";import"./three-contract-Dkt6PmWY.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three.core-3arARmh6.js";import"./body-marks-C1LxJtQb.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./structural-ids-BOo2BRoY.js";import"./object3d-authoring-subject-XccsO0xG.js";import"./rapier-physics-adapter-CaZqWLu0.js";import"./r3f-physics-binding-DscNNQbO.js";import"./output-pass-HurwNl0G.js";import"./three.module-BLhyNg0e.js";import"./Pass-D1MRT672.js";const U="workspace.service";function X(){const r=s(()=>import("./r3f-design-session-H_re3CvL.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99]));r.catch(()=>{});const m=n("three",(t,o)=>h(i(t),()=>i(t).scene,o,u(o))),e=a({kind:"three",owner:"@volter/editor-game/three/three-authoring",async mountWorldRootSession(t){const o=t,{mountR3FDesignSession:p}=await r;return p(o.store,o.composite,o.renderer)}});return c(),()=>{e(),m()}}export{U as point,X as start};
@@ -1 +0,0 @@
1
- import{e as r}from"./three-integration-DllJ3ocV.js";import"./index-C6arl-gg.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./host-hierarchy-objects-BV3WqU2w.js";import"./renderer-ownership-BovSEcLv.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./preview-renderer-BrYNFV1p.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./layered-pick-DcR7BSdS.js";import"./root-stacking-BEd9ZvxC.js";import"./user-data-B0zGjFCx.js";import"./workspace-arrangement-fbEjJgLC.js";import"./model-thumbnail-DyrMbiQX.js";import"./studio-environment-Bu8zJYfs.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./object3d-document-session-registry-CTwGgyV5.js";import"./three-state-Y0Lj3YRW.js";import"./editor-shell-store-BbdX1Nk_.js";import"./output-pass-HurwNl0G.js";import"./Pass-D1MRT672.js";import"./editor-layers-cylPsVa_.js";import"./entity-object-6SA98e-d.js";import"./three-contract-Dkt6PmWY.js";import"./hierarchy-marks-Bu95zpZR.js";import"./component-instance-root-BKRR39Wd.js";import"./viewport-door-BYc5x1R6.js";import"./content-bounds-DbuPrpc-.js";import"./asset-preview-j90MweIO.js";import"./bitmap-label-Ct4k6ehY.js";const Q="workspace.service";function R(){return r()}export{Q as point,R as start};
@@ -1 +0,0 @@
1
- import{a as o}from"./jsx-runtime-DPjLkJKQ.js";import{r as t}from"./index-C6arl-gg.js";import{r as m}from"./index-nmcBqr7Y.js";import{P as p}from"./PlayBar-B60kaU1V.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-BIy9skGW.js";import"./run-selection-LhEBCVGi.js";import"./game-network-9it10cBz.js";import"./index-OZVqp6xS.js";import"./index-Da9JhEvW.js";import"./native-debug-module-jcvJdzVp.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-BnLWZePq.js";import"./contract-system-adapters-ETU93T1B.js";import"./game-contract-seams-BNsMlazd.js";import"./seeded-random-DVNNXGgL.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-ON5loZ1Q.js";import"./capability-coverage-D-0PxPrZ.js";import"./edit-mode-authoring-aQOcoK_S.js";import"./json-history-resource-BYpHdKQG.js";import"./binding-resolver-BXphDCM5.js";import"./adapter-surface-Y37Nzcyw.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./realm-services-BLc5oNKC.js";import"./canvas-entry-runtime-9fi2F1yV.js";import"./three-ingest-runtime-DnLI0CbD.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-CqL5EgXV.js";import"./ingest-source-persistence-6Y7txaZJ.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-Do2ApQ2Z.js";import"./mounted-authoring-BVEmt4Tv.js";import"./entity-object-6SA98e-d.js";import"./user-data-B0zGjFCx.js";import"./workspace-arrangement-fbEjJgLC.js";import"./three-contract-Dkt6PmWY.js";import"./three-CUyDAz4o.js";import"./editor-layers-cylPsVa_.js";import"./component-instance-root-BKRR39Wd.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-authoring-adapter-DHzYD2um.js";import"./source-persistence-backend-jPCITiRY.js";import"./three-projection-core-Cr_G136G.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-DscNNQbO.js";import"./deferred-ingest-play-fhFUuU4a.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-CHxMN1Va.js";import"./board-guides-Bi0XcSub.js";import"./relative-import-specifier-DrFdqAeb.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-BuzOAJBe.js";import"./inference-diagnostics-KiAwx9GD.js";import"./writer-tw6EcuVO.js";import"./three-state-Y0Lj3YRW.js";import"./editor-shell-store-BbdX1Nk_.js";import"./output-pass-HurwNl0G.js";import"./viewport-door-BYc5x1R6.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,2 +0,0 @@
1
- const w="/work/.volter-session",ke=`${w}/session.py`,Ae=[`${w}/in`,`${w}/reply`],D="/__editor/blender-wasm";function Oe(e){return e.startsWith("@@VOLTER-ERROR")?"error":e.startsWith("@@VOLTER-WARN")?"warn":"log"}function Q(e){return new URL(`${D}/${e}`,import.meta.url).href}async function Y(){const e=await fetch(Q("status"));return e.ok?await e.json():{available:!1,skew:null,dir:null,sizes:{},encoded:{},missing:[`${D}/status answered ${e.status}`]}}async function Z(e){const t=await Y();if(!t.available)throw new Error(`The headless Blender WebAssembly build is not served by this editor: ${t.missing.join("; ")}`);if(t.skew==="wali"){const{startWaliBlenderEngine:r}=await import("./blender-wali-engine-DRlkIoxZ.js");return r(e,t)}const{startEmscriptenBlenderEngine:n}=await import("./blender-emscripten-engine-DrQ7iKAw.js");return n(e,t)}function q(e){return e<200?1:e<5e3?5:25}const ee=e=>new Promise(t=>setTimeout(t,e)),M=new TextDecoder;function ve(e,t,n){let r=0,s=0;const o=new Set;async function a(d){for(const l of o)d.has(`${l}.done`)||(await e.unlink(`${w}/reply/${l}.json`),await e.unlink(`${w}/reply/${l}.done`),o.delete(l))}async function i(){let d;try{d=await e.readdir(`${w}/ask`)}catch{return}const l=new Set(d.filter(h=>h.endsWith(".done")));await a(l);for(const h of l){const f=h.slice(0,-5);if(Number(f)<=s)continue;s=Number(f);const p=JSON.parse(M.decode(await e.readFile(`${w}/ask/${f}.json`)));let u;try{u=await t.ask(p)}catch(y){u={error:y instanceof Error?y.message:String(y)}}await Promise.all([e.writeFile(`${w}/reply/${f}.json`,JSON.stringify(u??null)),e.writeFile(`${w}/reply/${f}.done`,"1")]),o.add(f)}}async function c(d){const l=String(++r);await Promise.all([e.writeFile(`${w}/in/${l}.json`,JSON.stringify(d)),e.writeFile(`${w}/in/${l}.done`,"1")]);const h=performance.now();for(;;){if(await i(),await e.stat(`${w}/out/${l}.done`)){const u=JSON.parse(M.decode(await e.readFile(`${w}/out/${l}.json`)));if(await e.unlink(`${w}/in/${l}.json`),await e.unlink(`${w}/in/${l}.done`),u.error)throw new Error(u.error);return u.result}const f=n?.();if(f)throw new Error(`Blender is gone, so this call will never be answered: ${f}. The session keeps its directory and its cached banner, so every later call would wait on the same missing answer; start a new program with \`blender-start {fresh: true}\` (\`VOLTER_BLENDER_FRESH_SESSION=1\` for the battery harness).`);const p=q(performance.now()-h);await(e.changed?e.changed(p):ee(p))}}return{request:c}}const te=256*1024,ne=4*1024*1024,re=(1<<20)-1,oe=(()=>{const e=new Uint32Array(256);let t=2654435769;for(let n=0;n<256;n+=1)t^=t<<13,t^=t>>>17,t^=t<<5,e[n]=t>>>0;return e})();function se(e){const t=[];let n=0;for(;n<e.length;){const r=Math.min(e.length,n+ne);let s=r,o=0;for(let a=n+Math.min(te,r-n);a<r;a+=1)if(o=(o<<1)+oe[e[a]]>>>0,(o&re)===0){s=a+1;break}t.push(s),n=s}return t}async function ae(e){const t=[];let n=0;for(const r of se(e)){const s=new Uint8Array(await crypto.subtle.digest("SHA-256",e.slice(n,r)));t.push({hash:Array.from(s,o=>o.toString(16).padStart(2,"0")).join(""),start:n,end:r}),n=r}return t}const O=e=>typeof e=="object"&&e!==null&&typeof e.offset=="number"&&typeof e.length=="number"&&typeof e.dtype=="string"&&typeof e.count=="number"&&typeof e.stride=="number",ie={f32:e=>new Float32Array(e.buffer,e.byteOffset,e.byteLength>>2),f64:e=>new Float64Array(e.buffer,e.byteOffset,e.byteLength>>3),u32:e=>new Uint32Array(e.buffer,e.byteOffset,e.byteLength>>2),i32:e=>new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),u16:e=>new Uint16Array(e.buffer,e.byteOffset,e.byteLength>>1),i16:e=>new Int16Array(e.buffer,e.byteOffset,e.byteLength>>1),u8:e=>e,i8:e=>new Int8Array(e.buffer,e.byteOffset,e.byteLength)};function ce(e,t,n){const r=ie[n.dtype];if(!r)throw new Error(`Blender frame column ${t}: unknown dtype ${n.dtype}`);const{offset:s,length:o}=n;if(s<0||o<0||s+o>e.byteLength)throw new Error(`Blender frame column ${t}: bytes ${s}..${s+o} lie outside the ${e.byteLength}-byte export arena`);const a=e.subarray(s,s+o).slice(),i=r(a),c=n.count*n.stride;if(i.length!==c)throw new Error(`Blender frame column ${t}: ${i.length} values, ${c} declared (${n.count} x ${n.stride})`);return i}function T(e,t){const n=(r,s)=>{if(O(r)){const o=ce(e,s,r);return s==="co"?Float64Array.from(o):o}if(Array.isArray(r))return r.map(o=>n(o,s));if(typeof r=="object"&&r!==null){const o={};for(const[a,i]of Object.entries(r))o[a]=n(i,a);return o}return r};return n(t,"")}async function B(e,t){const n=async(r,s)=>{if(O(r)){const{offset:o,length:a,dtype:i}=r;if(o<0||a<0||o+a>e.byteLength)throw new Error(`Blender frame column ${s}: bytes ${o}..${o+a} lie outside the ${e.byteLength}-byte export arena`);const c=e.subarray(o,o+a).slice(),d=await crypto.subtle.digest("SHA-256",c),l=[...new Uint8Array(d)].map(h=>h.toString(16).padStart(2,"0")).join("");return{dtype:i,length:a,sha256:l}}if(Array.isArray(r))return Promise.all(r.map(o=>n(o,s)));if(typeof r=="object"&&r!==null){const o={};for(const[a,i]of Object.entries(r))o[a]=await n(i,a);return o}return r};return n(t,"")}const E=e=>self.postMessage(e),N=(e,t)=>E({op:"log",level:e,text:t});let $=null,P=null,le=0;const x=new Map;function de(e,t,n){const r=++le,s=[],o=e;for(const a of[o?.meshes??{},o?.images??{}])for(const i of Object.values(a))for(const c of Object.values(i))ArrayBuffer.isView(c)&&c.buffer instanceof ArrayBuffer&&!s.includes(c.buffer)&&s.push(c.buffer);return new Promise((a,i)=>{x.set(r,{resolve:a,reject:i}),self.postMessage({op:"present",id:r,frame:e,description:t,...n?{capture:n}:{}},s)})}let m=null,A=null,_=!1,F=Promise.resolve();function fe(e){const t=F.then(e);return F=t.catch(()=>{}),t}let g=null;async function ue(e,t){const n=new Map,r=async(s,o)=>{if(O(s)){n.set(s.offset,{typed:T(e,{[o]:s})[o],description:await B(e,s)});return}if(Array.isArray(s))for(const a of s)await r(a,o);else if(typeof s=="object"&&s!==null)for(const[a,i]of Object.entries(s))await r(i,a)};return await r(t,""),n}function he(e,t){const n=r=>{const s=(o,a)=>{if(O(o)){const c=e.columns.get(o.offset);if(!c)throw new Error(`Blender frame column ${a.join(".")}: not in the held frame`);return c[r]}if(Array.isArray(o))return o.map(c=>s(c,a));if(typeof o!="object"||o===null)return o;if(o.deferred===!0){const[c,d]=a.slice(-2),l=(c==="meshes"?e.meshes:e.images).get(d);if(!l)throw new Error(`Blender frame ${c} ${d}: deferred and never pulled`);return l[r]}const i={};for(const[c,d]of Object.entries(o))i[c]=s(d,[...a,c]);return i};return s(t,[])};return{typed:n("typed"),description:n("description")}}function J(e){_=e,E({op:"document-dirty",dirty:e})}async function W(){if(!m||A===null)return;const e=A,t={};let n=performance.now();const r=i=>{const c=performance.now();t[i]=Math.round(c-n),n=c};let s;try{s=await m.request({op:"save-document"}),r("save")}catch(i){throw new Error(`The Blender document ${e} could not be saved: ${j(i)}`)}if(!s?.saved||typeof s.path!="string")throw new Error(`Blender did not save the document ${e}`);let o;try{o=await m.files.readFile(s.path),r("read")}catch(i){throw new Error(`The Blender document ${e} could not be read back out of the engine: ${j(i)}`)}b.delete(s.path);let a=0;try{const i=await ae(o);r("chunk");const c=`path=${encodeURIComponent(e)}`,d=JSON.stringify({chunks:i.map(({hash:l,start:h,end:f})=>[l,f-h])});for(let l=0;;l+=1){const h=await fetch(`/__editor/blender-document?${c}`,{method:"POST",headers:{"content-type":"application/json"},body:d}),f=await h.json().catch(()=>null);if(r(`manifest${l}`),!h.ok)throw new Error(`HTTP ${h.status} ${f?.error??""}`);if(f?.ok){for(const[u,y]of Object.entries(f.ms??{}))t[`server.${u}`]=y;break}if(l===2||!Array.isArray(f?.missing))throw new Error(`the server still lacks ${f?.missing?.length??"?"} chunks`);const p=new Set(f.missing);for(const u of i){if(!p.delete(u.hash))continue;const y=await fetch(`/__editor/blender-document-chunk?${c}&hash=${u.hash}`,{method:"POST",headers:{"content-type":"application/octet-stream"},body:new Blob([o.subarray(u.start,u.end)])});if(!y.ok)throw new Error(`HTTP ${y.status} ${await y.text().catch(()=>"")}`);a+=u.end-u.start}r(`send${l}`)}}catch(i){throw new Error(`The Blender document ${e} was not written to the project: ${j(i)}`)}J(!1),N("log",`@@VOLTER-DOCUMENT ${JSON.stringify({path:e,bytes:o.length,sent:a,ms:t})}`)}async function we(e,t){const n={engine:null},r=await Z({project:e,log:N,ask:async({frame:o,hold:a,mesh:i,image:c,piece:d,present:l,capture:h,saveDue:f})=>{if(!n.engine)throw new Error("The Blender session presented before it started");f&&A!==null&&J(!0);const p=await n.engine.readArena();if(a!==void 0)return g={columns:await ue(p,a),meshes:new Map,images:new Map},{};if(i!==void 0||c!==void 0){if(!g)throw new Error(`The Blender session sent ${i??c} before its frame`);const L=d?.encodedPath;let k;if(c!==void 0&&typeof L=="string"){const{encodedPath:je,...I}=d,v=(await n.engine.files.readFile(L)).slice(),K=new Uint8Array(await crypto.subtle.digest("SHA-256",v)),G=Array.from(K,X=>X.toString(16).padStart(2,"0")).join("");k={typed:{...I,encoded:v},description:{...I,encoded:{dtype:"u8",length:v.length,sha256:G}}}}else k={typed:T(p,d),description:await B(p,d)};return i!==void 0?g.meshes.set(i,k):g.images.set(c,k),{}}let u,y;if(l){if(!g)throw new Error("The Blender session presented a frame it never sent");({typed:u,description:y}=he(g,o)),g=null}else u=T(p,o),y=await B(p,o);const S=await de(u,y,h);return{...typeof S.capture=="object"&&S.capture!==null?S.capture:{},..."held"in S?{held:S.held}:{}}}});n.engine=r,m=r,t&&await H(r.files,e);const s=await r.request({op:"start",project:e,...t?{document:t}:{}});return t&&(A=t),$={start:async()=>s,execute:async o=>{const a=await r.request({op:"execute",code:o});return a.error?`Error executing code: ${a.error}`:`Code executed successfully: ${a.result}`},sceneInfo:async()=>JSON.stringify(await r.request({op:"scene-info"}),null,2),objectInfo:async o=>JSON.stringify(await r.request({op:"object-info",name:o}),null,2),screenshotView:async o=>(await r.request({op:"present",capture:{size:o}}),JSON.stringify({view:{size:o}}))},{...s,engine:"blender-wasm",skew:r.skew,bootMs:Math.round(r.bootMs),releasedPayloadMB:r.releasedPayloadBytes===null?null:Math.round(r.releasedPayloadBytes/1048576)}}async function ye(){try{const e=await fetch("/__editor/blender-wasm/status");return e.ok?await e.json():{available:!1,missing:[`status answered ${e.status}`]}}catch(e){return{available:!1,missing:[String(e)]}}}async function pe(e,t){if($)throw new Error("The Blender session is already started");if(!e.startsWith("/"))throw new Error("The Blender session needs the project's absolute path");if(t!==void 0&&!me(t))throw new Error(`The Blender document must be a project-relative .blend path with no traversal (models/model.blend); got ${JSON.stringify(t)}`);const n=await ye();if(!n.available)throw new Error(`Headless Blender is not served by this editor, so there is no modeling engine: ${n.missing.join("; ")}. The engine is Blender compiled to WebAssembly (packages/blender-engine/wasm, or the directory VOLTER_BLENDER_WASM_DIR names); nothing stands in for it.`);return P=e,we(e,t)}function me(e){return!e.endsWith(".blend")||e.startsWith("/")||e.includes("\\")?!1:e.split("/").every(n=>n!==""&&n!=="."&&n!=="..")}const U=new Set;function R(e){U.has(e)||(U.add(e),N("error",e))}async function be(e){const t=a=>(R(`The project's files are not readable from Python: ${a}`),null);let n;try{n=await fetch("/__editor/blender-project-index")}catch(a){return t(String(a))}if(!n.ok)return t(`/__editor/blender-project-index answered ${n.status}`);let r;try{if(r=await n.json(),typeof r?.root!="string"||!Array.isArray(r.files))return t("invalid project index")}catch(a){return t(String(a))}const{root:s,files:o}=r;return s!==e&&R(`The editor serving this tab has ${s} open, not ${e}; its files are mounted at ${e}, which is where Python is looking.`),o}const b=new Map;async function ge(e,t){const n=await e.stat(t);return n?`${n.size}:${n.mtimeMs}`:""}async function H(e,t){const n=await be(t);if(!n)return;const r=new Set(n.map(s=>`${t}/${s.path}`));for(const s of[...b.keys()])if(!r.has(s)){try{await e.unlink(s)}catch{}b.delete(s)}for(const s of n){const o=`${t}/${s.path}`,a=`${s.size}:${s.mtime}`;if(b.get(o)?.host===a||!b.has(o)&&await e.stat(o)!==null)continue;const i=await fetch(`/__editor/blender-project-file?path=${encodeURIComponent(s.path)}`);if(!i.ok){R(`${s.path}: HTTP ${i.status}`);continue}const c=o.slice(0,o.lastIndexOf("/"));c&&await e.mkdirTree(c),await e.writeFile(o,new Uint8Array(await i.arrayBuffer())),b.set(o,{host:a,engine:await ge(e,o)})}}async function $e(e,t){const n=[],r=async s=>{let o;try{o=await e.readdir(s)}catch{return}for(const a of o){if(a==="."||a==="..")continue;const i=`${s.replace(/\/$/,"")}/${a}`,c=await e.stat(i);if(c){if((c.mode&61440)===16384){await r(i);continue}b.get(i)?.engine!==`${c.size}:${c.mtimeMs}`&&n.push({path:i,size:c.size,mtime:c.mtimeMs})}}};return await r(t),n}async function z(e){switch(e.op){case"start":return pe(e.project,e.document);case"present-result":{const r=x.get(e.id);x.delete(e.id),r&&(e.error?r.reject(new Error(e.error)):r.resolve({...e.capture===void 0?{}:{capture:e.capture},..."held"in e?{held:e.held}:{}}));return}}if(!$||!P||!m)throw new Error("The Blender session has not started");const t=m.files,n=m.request.bind(m);switch(e.op){case"flush-document":return _?(await W(),{saved:!0}):{saved:!1};case"history-begin":case"history-end":return n({op:e.op});case"history-step":return n({op:"history-step",token:e.token,direction:e.direction});case"execute":await H(t,P);{const r=await n({op:"execute",code:e.code,history:e.history??!0,label:e.label??"Blender Python"});return r.error?`Error executing code: ${r.error}`:`Code executed successfully: ${r.result}`}case"present":return n({op:"present"});case"scene-info":return $.sceneInfo();case"object-info":return $.objectInfo(e.name);case"rna":return n({op:"rna",path:e.path,...e.names===void 0?{}:{names:e.names}});case"rna-context":return n({op:"rna-context",...e.object===void 0?{}:{object:e.object},...e.collection===void 0?{}:{collection:e.collection}});case"view-shading":return n({op:"view-shading",shading:e.shading});case"rna-set":return n({op:"rna-set",history:e.history!==!1,path:e.path,property:e.property,value:e.value,...e.index===void 0?{}:{index:e.index}});case"outliner":return n({op:"outliner",...e.selected===void 0?{}:{selected:[...e.selected]}});case"node-tree":return n({op:"node-tree",...e.path===void 0?{}:{path:e.path},...e.material===void 0?{}:{material:e.material}});case"uv-layout":return n({op:"uv-layout",...e.object===void 0?{}:{object:e.object},...e.uvLayer===void 0?{}:{uvLayer:e.uvLayer}});case"rig":return n({op:"rig",...e.object===void 0?{}:{object:e.object}});case"action-clip":return n({op:"action-clip",...e.object===void 0?{}:{object:e.object},...e.bake===void 0?{}:{bake:e.bake}});case"outliner-set":return n({op:"outliner-set",path:e.path,column:e.column,value:e.value});case"screenshot-view":return JSON.parse(await $.screenshotView(e.maxSize));case"read-file":return t.readFile(e.path);case"write-file":{const r=e.path.slice(0,e.path.lastIndexOf("/"));r&&await t.mkdirTree(r),await t.writeFile(e.path,e.bytes),b.delete(e.path);return}case"list-files":return $e(t,e.path)}throw new Error(`Unknown Blender worker request ${e.op}`)}function j(e){if(e instanceof Error)return e.stack??`${e.name}: ${e.message}`;if(typeof e=="object"&&e!==null){const t=e;if(typeof t.message=="string")return typeof t.name=="string"?`${t.name}: ${t.message}`:t.message;try{return JSON.stringify(e)??Object.prototype.toString.call(e)}catch{return Object.prototype.toString.call(e)}}return String(e)}function V(){if(!m)return;const e=m.memoryBytes();e!==null&&E({op:"memory",bytes:e})}self.addEventListener("error",V);self.onmessage=e=>{const t=e.data;if(t.op==="present-result"){z(t);return}fe(()=>Ee(t))};async function Ee(e){try{const t=await z(e);_&&await W(),await C(),E({id:e.id,result:t})}catch(t){let n=j(t);try{await C()}catch(r){n+=`
2
- Unable to deliver Blender history: ${j(r)}`}E({id:e.id,error:n})}V()}async function C(){if(!m||!$)return;const e=await m.request({op:"history-events"});e.length&&E({op:"history",entries:e})}export{D as A,Ae as P,w as S,Q as a,ke as b,Oe as c,ve as o,ee as s};