@volter/game-editor 0.5.71 → 0.5.73

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 (325) hide show
  1. package/BUNDLED_NOTICES +18 -18
  2. package/catalog/entries/music.json +2 -2
  3. package/dist/.vite/manifest.json +2159 -2134
  4. package/dist/assets/{AssetBudgetPanel-CbSEGrcI.js → AssetBudgetPanel-BXtwiILa.js} +3 -3
  5. package/dist/assets/{AudioViewer-DbO2vY3o.js → AudioViewer-BdHDedtf.js} +1 -1
  6. package/dist/assets/{CanvasBoardDocument-BWmMyiAX.js → CanvasBoardDocument-DL6qWmRA.js} +1 -1
  7. package/dist/assets/{CanvasSceneViewport-CrmQdonP.js → CanvasSceneViewport-DeyFl0d2.js} +1 -1
  8. package/dist/assets/{ColorInput-BOPGcPsk.js → ColorInput-C6l8ApSJ.js} +1 -1
  9. package/dist/assets/{EntityModelDocument-DUZaNI2v.js → EntityModelDocument-gRt9IlRz.js} +1 -1
  10. package/dist/assets/{EnvironmentAssetDocument-Bqsm2NLI.js → EnvironmentAssetDocument-C3NAYvzk.js} +1 -1
  11. package/dist/assets/{GameplaySessionTimeline-DmGEiHHD.js → GameplaySessionTimeline-UxmwvBqV.js} +1 -1
  12. package/dist/assets/{ImageViewer-BXQ1dXgz.js → ImageViewer-BwXUGI-l.js} +1 -1
  13. package/dist/assets/InspectorObjectPreview-Cm28kUvH.js +1 -0
  14. package/dist/assets/{JsonAssetDocument-BPQR7OXc.js → JsonAssetDocument-mNtLvo-z.js} +1 -1
  15. package/dist/assets/{LiveModuleDocument-DnlLSCZw.js → LiveModuleDocument--aP5_-cc.js} +1 -1
  16. package/dist/assets/{LutAssetDocument-CMDB77UF.js → LutAssetDocument-3i6uhgi4.js} +1 -1
  17. package/dist/assets/{ModelAssetDocument-C7Su96Mo.js → ModelAssetDocument-C0BbrEd1.js} +1 -1
  18. package/dist/assets/{NonThreeAuthoringBootstrap-BqY5ceef.js → NonThreeAuthoringBootstrap-Cz3T6v7H.js} +1 -1
  19. package/dist/assets/{Object3DDocumentToolbar-CDYwPpW6.js → Object3DDocumentToolbar-CKzCeJpG.js} +1 -1
  20. package/dist/assets/Object3DDocumentViewport-CCn6nDgt.js +2 -0
  21. package/dist/assets/{Object3DPreview-B_3FCd_-.js → Object3DPreview-DZpmPQJz.js} +1 -1
  22. package/dist/assets/{OnlineAssetDetail-BMAMYfaN.js → OnlineAssetDetail-BrN01rGI.js} +1 -1
  23. package/dist/assets/{PlayBar-DvpDIJXg.js → PlayBar-CTkb3NOO.js} +1 -1
  24. package/dist/assets/{QuarksAssetDocument-BbG3zMIR.js → QuarksAssetDocument-BaPvQFd9.js} +1 -1
  25. package/dist/assets/{ReactCanvasControls-CnIJItuA.js → ReactCanvasControls-DKPi6NMs.js} +1 -1
  26. package/dist/assets/{RootSelectionOverlay-47LRczuj.js → RootSelectionOverlay-CuEtXTkF.js} +1 -1
  27. package/dist/assets/{ShaderAssetDocument-KDN9ZgDF.js → ShaderAssetDocument-Ce8Yo5AQ.js} +1 -1
  28. package/dist/assets/{ShadowEditor-CBNfgpsF.js → ShadowEditor-DCy9obUm.js} +1 -1
  29. package/dist/assets/{SourceAssetViewer-LGC-eTLS.js → SourceAssetViewer-DZBQofxM.js} +1 -1
  30. package/dist/assets/{StageHost-BOin7YcY.js → StageHost-B5hgNOWi.js} +2 -2
  31. package/dist/assets/{StoryPreviewMount-CN-jnvnn.js → StoryPreviewMount-5qAGiL3j.js} +1 -1
  32. package/dist/assets/{ThreeBoardDocument-DgC6xWZu.js → ThreeBoardDocument-DyRw9ccC.js} +2 -2
  33. package/dist/assets/{ThreeIsolationSceneContent-ieFf0WbO.js → ThreeIsolationSceneContent-B-FjV522.js} +1 -1
  34. package/dist/assets/{ToolObject3DPreview-B15_D8MJ.js → ToolObject3DPreview-BL2W3Zw5.js} +1 -1
  35. package/dist/assets/{Toolbar-CAnrijz7.js → Toolbar-D5Jw2AOx.js} +1 -1
  36. package/dist/assets/{TransientHint-BiIz-7Hh.js → TransientHint-CYxpG2zv.js} +1 -1
  37. package/dist/assets/{VideoViewer-CrP78U5w.js → VideoViewer-DuLmYsmZ.js} +1 -1
  38. package/dist/assets/{ViewportShadingMenu-BfoDB2WO.js → ViewportShadingMenu-BGJUOZoj.js} +1 -1
  39. package/dist/assets/{active-ingest-CHE8woWv.js → active-ingest-idj3AkAe.js} +2 -2
  40. package/dist/assets/{animation-clock-DWhLTlyc.js → animation-clock-Dz9gpPK-.js} +1 -1
  41. package/dist/assets/{animation-mixers.service-xdiawk5y.js → animation-mixers.service-DAgQ92hj.js} +1 -1
  42. package/dist/assets/{animation-timeline.utility-Czb7Ax-Z.js → animation-timeline.utility-CcOYDeh2.js} +1 -1
  43. package/dist/assets/{asset-budget-asset.menu-CpHLTATf.js → asset-budget-asset.menu-C4LAIKND.js} +1 -1
  44. package/dist/assets/{asset-budget.action-C_ZI2rdN.js → asset-budget.action-BB48NVB4.js} +1 -1
  45. package/dist/assets/{asset-budget.document-hmCS7sH2.js → asset-budget.document-DV7MkSRt.js} +1 -1
  46. package/dist/assets/{asset-budget.menu-BZyzyVdk.js → asset-budget.menu-BUnfRz-J.js} +1 -1
  47. package/dist/assets/{asset-editor-persistence-BIFP2LgP.js → asset-editor-persistence-BL83mGez.js} +1 -1
  48. package/dist/assets/{asset-loaders-DqbPEavT.js → asset-loaders-C-qNkW6n.js} +1 -1
  49. package/dist/assets/{asset-preview-BzDHm81_.js → asset-preview-CNnOER4v.js} +1 -1
  50. package/dist/assets/{audio-unlock.service-C2a8hsP0.js → audio-unlock.service-gtOc-Pcu.js} +1 -1
  51. package/dist/assets/{audio.utility-VklURuQw.js → audio.utility-Dbty2bpX.js} +1 -1
  52. package/dist/assets/autoplay.service-DtHu2ShZ.js +1 -0
  53. package/dist/assets/{babylon-authoring-adapter-DBBX2Hem.js → babylon-authoring-adapter-BMdY19Bu.js} +1 -1
  54. package/dist/assets/{binding-resolver-aDFCbAcG.js → binding-resolver-B2hX5bHW.js} +2 -2
  55. package/dist/assets/{blender-node-editor.document-BdX0SCxH.js → blender-node-editor.document-04y_KbDu.js} +1 -1
  56. package/dist/assets/{blender-properties-tab-BVdvAiLS.js → blender-properties-tab-DgVYwtk7.js} +1 -1
  57. package/dist/assets/{blender-runtime-host-B1bjBV91.js → blender-runtime-host-C7PTMb6j.js} +1 -1
  58. package/dist/assets/{blender-runtime-skin-BEbT46i_.js → blender-runtime-skin-CglxS85F.js} +1 -1
  59. package/dist/assets/{blender-runtime.document-BAQTV4az.js → blender-runtime.document-onVLx1Zi.js} +1 -1
  60. package/dist/assets/{blender-timeline.document-BTwdMhSn.js → blender-timeline.document-Dx53vWy4.js} +1 -1
  61. package/dist/assets/{blender-uv-editor.document-CqxvqlSw.js → blender-uv-editor.document-DtAEbNha.js} +1 -1
  62. package/dist/assets/{blender-version.status-D-kPKENT.js → blender-version.status-gLcGDj2u.js} +1 -1
  63. package/dist/assets/{blender.command-BABpNHlJ.js → blender.command-CWL5ZVYP.js} +1 -1
  64. package/dist/assets/{board-guides-BVkDJqat.js → board-guides-D3JHkcyj.js} +1 -1
  65. package/dist/assets/bridge.command-BQowLB0e.js +3 -0
  66. package/dist/assets/{browserAll-DjSaXYpJ.js → browserAll-DOXLDeD9.js} +1 -1
  67. package/dist/assets/{build-player.document-viLZOb6A.js → build-player.document-Cn2NNXat.js} +1 -1
  68. package/dist/assets/{build-profiles.document-C9gM1NV6.js → build-profiles.document-Cl2vIbHP.js} +1 -1
  69. package/dist/assets/{build-progress.status-DKw0YdnU.js → build-progress.status-xwvlMiR9.js} +1 -1
  70. package/dist/assets/{build-session-CpAT9iQU.js → build-session-BnTVKU3n.js} +1 -1
  71. package/dist/assets/{build.action-BrSZc3kA.js → build.action-BH2XwOoM.js} +1 -1
  72. package/dist/assets/{build.command-CVB-50ii.js → build.command-D6PVJTAM.js} +1 -1
  73. package/dist/assets/{build.header-BhOtTPyg.js → build.header-B1io6kD5.js} +1 -1
  74. package/dist/assets/{build.menu-BHIVHysW.js → build.menu-C7b7dJvX.js} +1 -1
  75. package/dist/assets/{build.service-C5awmXgd.js → build.service-Dk4wyHFA.js} +1 -1
  76. package/dist/assets/{camera-B_ssMgXA.js → camera-By96P8jU.js} +1 -1
  77. package/dist/assets/{camera-runtime.inspector-BAc2xnsF.js → camera-runtime.inspector-Cz2fY7LF.js} +1 -1
  78. package/dist/assets/{canvas-design-mount-DW2RoIFP.js → canvas-design-mount-B0wJS0me.js} +3 -3
  79. package/dist/assets/{canvas-entry-runtime-BQdfSw1B.js → canvas-entry-runtime-BTSoOlwm.js} +2 -2
  80. package/dist/assets/{canvas-preview-frames-Bc44u87o.js → canvas-preview-frames-y7XiUt6e.js} +1 -1
  81. package/dist/assets/{canvas-story-capture.service-DTLE6FK3.js → canvas-story-capture.service-Bbd7D-O_.js} +2 -2
  82. package/dist/assets/{capability-coverage-6I_iG0kk.js → capability-coverage-CL0GGeIg.js} +1 -1
  83. package/dist/assets/{collaboration-presence-wD0oKl7P.js → collaboration-presence-C5pPCDza.js} +1 -1
  84. package/dist/assets/{collider-BQKrXUbD.js → collider-DIijLNo8.js} +1 -1
  85. package/dist/assets/{component-board.service-Cnxftkv8.js → component-board.service-4blRCtj5.js} +2 -2
  86. package/dist/assets/{component-board.service-BzZ2JQC8.js → component-board.service-MGtzUUbw.js} +2 -2
  87. package/dist/assets/component-board.service-kHtuqeOh.js +2 -0
  88. package/dist/assets/{component-contracts.service-BJ73JRuk.js → component-contracts.service-BMsY9m-_.js} +1 -1
  89. package/dist/assets/{component-instance-root-9MmHwMal.js → component-instance-root-CNFI0IRp.js} +1 -1
  90. package/dist/assets/{component-verbs.command-_nUoLZ1s.js → component-verbs.command-qfwrDoVp.js} +1 -1
  91. package/dist/assets/{component-verbs.service-D9qvuexk.js → component-verbs.service-Dg0bftBH.js} +1 -1
  92. package/dist/assets/{config-DabjxySF.js → config-kiOBMvaG.js} +2 -2
  93. package/dist/assets/{configurations-CACHqi7T.js → configurations-Ci7u4w12.js} +1 -1
  94. package/dist/assets/{connection.status-CfFK9wti.js → connection.status-D23e5kRk.js} +1 -1
  95. package/dist/assets/{constraints.inspector-DvTTgVxM.js → constraints.inspector-BbYPQXem.js} +1 -1
  96. package/dist/assets/{content-bounds-938XXJRy.js → content-bounds-BRqBJnLW.js} +1 -1
  97. package/dist/assets/{contract-system-adapters-D9Gcb7R7.js → contract-system-adapters-d3KwjPWC.js} +1 -1
  98. package/dist/assets/{coverage.service-CyWmmos8.js → coverage.service-B91Nuj64.js} +1 -1
  99. package/dist/assets/{create-runtime-D3CS8u84.js → create-runtime-B-jGpKbY.js} +1 -1
  100. package/dist/assets/{curve-CzIvpvWX.js → curve-BlOrMvLA.js} +1 -1
  101. package/dist/assets/{data-asset-Dt3MP-sl.js → data-asset-CZLDAqx1.js} +1 -1
  102. package/dist/assets/{data-ref-COkdIktX.js → data-ref-C0AV_bsU.js} +1 -1
  103. package/dist/assets/{debug-bridge-LaiaWRls.js → debug-bridge-Jy6-OFJX.js} +1 -1
  104. package/dist/assets/{debug-registry-BUPLu5EA.js → debug-registry-CqfOIF8b.js} +1 -1
  105. package/dist/assets/{deferred-ingest-play-DVLTxYCk.js → deferred-ingest-play-Dum7AFKz.js} +2 -2
  106. package/dist/assets/{design-time-canvas-mount-CkOQQvFW.js → design-time-canvas-mount-DUHPdiqg.js} +2 -2
  107. package/dist/assets/design-time-layers-utHBa_7o.js +1 -0
  108. package/dist/assets/design-time-mount.service-mI18AWHZ.js +2 -0
  109. package/dist/assets/{design-time-mount.service-C8VeEbCC.js → design-time-mount.service-vZHpReNB.js} +2 -2
  110. package/dist/assets/design-time-react-mount-Dra56frK.js +1 -0
  111. package/dist/assets/{document-preview-three-C8Pzyiai.js → document-preview-three-D3MPI2pG.js} +1 -1
  112. package/dist/assets/{dom-authoring-adapter-71D70rVP.js → dom-authoring-adapter-gBQqMc0c.js} +1 -1
  113. package/dist/assets/{draco3d-XOYD2Hke.js → draco3d-6mRWhAay.js} +1 -1
  114. package/dist/assets/{edit-mode-audio.service-OcRQ9Ozq.js → edit-mode-audio.service-CrKprPzN.js} +1 -1
  115. package/dist/assets/{edit-mode-authoring-Du1CaTkH.js → edit-mode-authoring-D-F1_iFO.js} +1 -1
  116. package/dist/assets/{edit-mode-networking.service-BWz-nxiL.js → edit-mode-networking.service-yiwk42bP.js} +1 -1
  117. package/dist/assets/editor-api-pnHaXAK3.js +1 -0
  118. package/dist/assets/{editor-layers-qlgroPbE.js → editor-layers-CR1IoRwo.js} +1 -1
  119. package/dist/assets/{editor-shell-store-Di0waLQj.js → editor-shell-store-C8iDtpEA.js} +1 -1
  120. package/dist/assets/{entity-object-BeRdaaqQ.js → entity-object-BXXBLcj9.js} +1 -1
  121. package/dist/assets/{extend-CFEzxGGP.js → extend-BBSJbo8a.js} +1 -1
  122. package/dist/assets/{fork-menu-Bujed-pM.js → fork-menu-CUePY3Cx.js} +1 -1
  123. package/dist/assets/{frame-debugger-store-CCm_jyhx.js → frame-debugger-store-CYjZTL1N.js} +1 -1
  124. package/dist/assets/{game-contract-seams-DOwrbA13.js → game-contract-seams-NNhdUxdV.js} +1 -1
  125. package/dist/assets/{game-css-scope-transform-DuP554oX.js → game-css-scope-transform-C4GDwAtB.js} +1 -1
  126. package/dist/assets/game-document.service-7TUP2Y1F.js +1 -0
  127. package/dist/assets/game-eval.command-2ueAm6i3.js +2 -0
  128. package/dist/assets/{game-module-access-gOlo85at.js → game-module-access-0sEdzOSl.js} +1 -1
  129. package/dist/assets/game-network-BYaj_RWO.js +22 -0
  130. package/dist/assets/game-surface-defaults-D8S4cRxi.js +1 -0
  131. package/dist/assets/{gameplay-export-Clmlm922.js → gameplay-export-DGvqwMBU.js} +1 -1
  132. package/dist/assets/{gameplay-replay-Dxz93B2M.js → gameplay-replay-BSZJWvVV.js} +1 -1
  133. package/dist/assets/gameplay.command-DLTq9aVC.js +1 -0
  134. package/dist/assets/{generation-jobs-_kzxAnbI.js → generation-jobs-BWv5uf0V.js} +1 -1
  135. package/dist/assets/{generation.service-B533Kbco.js → generation.service-BwFmxC3T.js} +1 -1
  136. package/dist/assets/{generations-D5GcYf91.js → generations-B69q5hMp.js} +1 -1
  137. package/dist/assets/{generations.status-CDZ_eHJZ.js → generations.status-BAWa4uit.js} +1 -1
  138. package/dist/assets/{hierarchy-marks-BrmGekuT.js → hierarchy-marks-pP0yj7BM.js} +1 -1
  139. package/dist/assets/{hosted-asset-materialization-DBLM2dtz.js → hosted-asset-materialization-BjrXy9K1.js} +1 -1
  140. package/dist/assets/{index-BU93FMYM.js → index-B7-niZh1.js} +1 -1
  141. package/dist/assets/{index-C8jugKW5.js → index-BO_gxX2t.js} +1 -1
  142. package/dist/assets/{index-sTPbmuS8.js → index-Bj1guHnQ.js} +1 -1
  143. package/dist/assets/{index-CiqSswEV.js → index-CnFX-pyl.js} +1 -1
  144. package/dist/assets/{index-BPUmREu0.js → index-Cpk7BVO4.js} +2 -2
  145. package/dist/assets/{index-Q98tByQ2.js → index-DNwTLKih.js} +1 -1
  146. package/dist/assets/{index-vjNaMgz6.js → index-DXA-aMiK.js} +1 -1
  147. package/dist/assets/{index-iW3HFEJB.js → index-DhfMfVJj.js} +314 -314
  148. package/dist/assets/{index-CP1Fd1fP.js → index-aVauRiHu.js} +1 -1
  149. package/dist/assets/{inference-diagnostics-PcfFN6SD.js → inference-diagnostics-CZtWDiNC.js} +1 -1
  150. package/dist/assets/{ingest-boot-viewport-CrnkiTcJ.js → ingest-boot-viewport-1vZQ2kps.js} +1 -1
  151. package/dist/assets/{ingest-siblings-CQ95u6JM.js → ingest-siblings-DgXpesm_.js} +1 -1
  152. package/dist/assets/{ingest-source-persistence-2MRBPgo0.js → ingest-source-persistence-UZGBOJaQ.js} +1 -1
  153. package/dist/assets/{ingest.service-DQqEvbsT.js → ingest.service-DuBjKI3m.js} +1 -1
  154. package/dist/assets/{inspect-CUNyIUii.js → inspect-BooKKY95.js} +1 -1
  155. package/dist/assets/instances.command-DvPuReaq.js +1 -0
  156. package/dist/assets/{json-history-resource-82d2z68R.js → json-history-resource-Cmiy217h.js} +1 -1
  157. package/dist/assets/{layered-pick-Db8YSlDp.js → layered-pick-A5arowk9.js} +1 -1
  158. package/dist/assets/{light-PK9RLNmD.js → light-CHs-Mja8.js} +1 -1
  159. package/dist/assets/{live-project-verbs-CayyA6Tc.js → live-project-verbs-6jy3p7nY.js} +1 -1
  160. package/dist/assets/{machine.document-CUO0RxDP.js → machine.document-DHloTfpl.js} +1 -1
  161. package/dist/assets/{machines.finder-B-DdPjby.js → machines.finder-WhUcFZjA.js} +1 -1
  162. package/dist/assets/{material-C_mvE2lW.js → material-DZcoVZqX.js} +1 -1
  163. package/dist/assets/{material-factory-kKKe4-DN.js → material-factory-BvpY-cse.js} +1 -1
  164. package/dist/assets/{mesh-fUiQLtsU.js → mesh-CGedZWa-.js} +1 -1
  165. package/dist/assets/{model-asset-sections.service-Dfkzhu6Q.js → model-asset-sections.service-5GlUiSqi.js} +1 -1
  166. package/dist/assets/{model-inspection-DgqjTy5z.js → model-inspection-B9Vo9Uw9.js} +1 -1
  167. package/dist/assets/{model-thumbnail-DORLbXyw.js → model-thumbnail-BQAcfzU4.js} +1 -1
  168. package/dist/assets/{models.finder-DzW1Sg26.js → models.finder-CP9CSor6.js} +1 -1
  169. package/dist/assets/{module-mode-BWoDD0oV.js → module-mode-BoxiWWBb.js} +2 -2
  170. package/dist/assets/mount-canvas-ingest-root-Cn5qX3H8.js +2 -0
  171. package/dist/assets/{mount-dom-ingest-root-BOEt11vp.js → mount-dom-ingest-root-Cbvzll3R.js} +2 -2
  172. package/dist/assets/mount-ingest-root-B7U8e9wn.js +2 -0
  173. package/dist/assets/mount-manifest-C9z4OtK6.js +1 -0
  174. package/dist/assets/mount-three-ingest-root-2Msa3BcX.js +1 -0
  175. package/dist/assets/{mounted-authoring-30zCcxeV.js → mounted-authoring-CfwaN6te.js} +1 -1
  176. package/dist/assets/{mounted-story-viewport-source-N0xrUdtm.js → mounted-story-viewport-source-GqrlvBrz.js} +1 -1
  177. package/dist/assets/{native-debug-module-Cofo9dCU.js → native-debug-module-Bz673XZT.js} +1 -1
  178. package/dist/assets/{navigation-B9kSIhNu.js → navigation-DLKPHrCx.js} +1 -1
  179. package/dist/assets/{navmesh.menu-DPNQ2RCH.js → navmesh.menu-Cpan00VU.js} +1 -1
  180. package/dist/assets/{navmesh.service-pffKX_Ht.js → navmesh.service-CasaqkMR.js} +1 -1
  181. package/dist/assets/network-observer.service-McTuLNCE.js +1 -0
  182. package/dist/assets/network.utility-Bb5NG9YK.js +1 -0
  183. package/dist/assets/{object3d-document-session-registry-DMhhDWnQ.js → object3d-document-session-registry-DBXxQ-e2.js} +2 -2
  184. package/dist/assets/{oid-transform-AHICFvQG.js → oid-transform-Cmh6I5h8.js} +1 -1
  185. package/dist/assets/{particles-DIMSkSIe.js → particles-IwlClixo.js} +1 -1
  186. package/dist/assets/{pixi-authoring-adapter-DR6NNYrL.js → pixi-authoring-adapter-DhNMdp1o.js} +1 -1
  187. package/dist/assets/{pixi-live-write-target-CXDKS1kQ.js → pixi-live-write-target--GCeBR8B.js} +1 -1
  188. package/dist/assets/play.command-BTnWT9lg.js +2 -0
  189. package/dist/assets/{presentation-DPddUHCg.js → presentation-DCylXFZR.js} +1 -1
  190. package/dist/assets/{product-CEH3MVYt.js → product-CYfm4sPK.js} +1 -1
  191. package/dist/assets/{profiler.action-qMarbw9x.js → profiler.action-TqZoMWSL.js} +1 -1
  192. package/dist/assets/{profiler.menu-C52_wfu8.js → profiler.menu-BJhGaCic.js} +1 -1
  193. package/dist/assets/{profiler.utility-DzfXG0cD.js → profiler.utility-DDOjJDdo.js} +1 -1
  194. package/dist/assets/project-authoring-session-B5Onxn-3.js +2 -0
  195. package/dist/assets/{properties-bone-constraints.inspector-DEOxhp1W.js → properties-bone-constraints.inspector-i3rAZ6bF.js} +1 -1
  196. package/dist/assets/{properties-bone.inspector-CY8EEYZl.js → properties-bone.inspector-BfdWQq9J.js} +1 -1
  197. package/dist/assets/{properties-collection.inspector-rGoZwmsY.js → properties-collection.inspector-D36vypzH.js} +1 -1
  198. package/dist/assets/{properties-constraints.inspector-DJITSHiL.js → properties-constraints.inspector-nN7DWtPi.js} +1 -1
  199. package/dist/assets/{properties-data.inspector-CNJ6cUzA.js → properties-data.inspector-B-y1eggi.js} +1 -1
  200. package/dist/assets/{properties-material.inspector-BkCUSFdM.js → properties-material.inspector-DvuapEMy.js} +1 -1
  201. package/dist/assets/{properties-modifiers.inspector-C9ij0UfE.js → properties-modifiers.inspector-BGaSxWdy.js} +1 -1
  202. package/dist/assets/{properties-object.inspector-IvVsyikt.js → properties-object.inspector-C5muyQoR.js} +1 -1
  203. package/dist/assets/{properties-output.inspector-Df-fx8vq.js → properties-output.inspector-CCZDPKIC.js} +1 -1
  204. package/dist/assets/{properties-particles.inspector-J3UOyWlz.js → properties-particles.inspector-SXDA6b8y.js} +1 -1
  205. package/dist/assets/{properties-physics.inspector-BmcTY5Q8.js → properties-physics.inspector-BCUjyVmc.js} +1 -1
  206. package/dist/assets/{properties-render.inspector-DUB5qwIR.js → properties-render.inspector-CMrqCbzp.js} +1 -1
  207. package/dist/assets/{properties-scene.inspector-DxBRs2ae.js → properties-scene.inspector-CjhjIfdu.js} +1 -1
  208. package/dist/assets/{properties-texture.inspector-BqzPv1aS.js → properties-texture.inspector-DQC-MFuS.js} +1 -1
  209. package/dist/assets/{properties-view-layer.inspector-D1a1Dc1r.js → properties-view-layer.inspector-DVeg3182.js} +1 -1
  210. package/dist/assets/{properties-world.inspector-CCwHv8ha.js → properties-world.inspector-71cmcJUs.js} +1 -1
  211. package/dist/assets/r3f-design-session-CkUa52_c.js +2 -0
  212. package/dist/assets/{r3f-physics-binding-mLmXPi7n.js → r3f-physics-binding-C1t2gzF1.js} +1 -1
  213. package/dist/assets/{r3f-source-authoring-adapter-W1zVFNuZ.js → r3f-source-authoring-adapter-ZlkqGRxK.js} +1 -1
  214. package/dist/assets/{react-canvas-navigation-IPhloKzi.js → react-canvas-navigation-C_uPW5TY.js} +1 -1
  215. package/dist/assets/{react-inspector.service-C7T_Pqud.js → react-inspector.service-C1bIeQey.js} +1 -1
  216. package/dist/assets/{react-story-board-CPTQdOIn.js → react-story-board-D3lzaa3o.js} +1 -1
  217. package/dist/assets/{react-three-rapier.esm-D43m0aj7.js → react-three-rapier.esm-B1MQT9gP.js} +1 -1
  218. package/dist/assets/{react-world-authoring-adapter-DgsCzOTj.js → react-world-authoring-adapter-DGSpriYX.js} +1 -1
  219. package/dist/assets/{realm-services-C8OlRuJ5.js → realm-services-DD3n0-gI.js} +1 -1
  220. package/dist/assets/{reflection-probe-capture.inspector-DT1jvM_q.js → reflection-probe-capture.inspector-D2yJbHex.js} +1 -1
  221. package/dist/assets/{registry-XvQ4sPew.js → registry-Cxk2e0qq.js} +1 -1
  222. package/dist/assets/{relative-import-specifier-CPCtuEhc.js → relative-import-specifier-BL93f22G.js} +1 -1
  223. package/dist/assets/{render-env-BYsqF2DQ.js → render-env-BwewwLtg.js} +1 -1
  224. package/dist/assets/{render-features-CL2D1X_X.js → render-features-Ci5Tbkqq.js} +1 -1
  225. package/dist/assets/{render-settings-CsCXKLaq.js → render-settings-DHswoo3P.js} +1 -1
  226. package/dist/assets/{resolve-three-DRDYxBE9.js → resolve-three-B72nbYSo.js} +3 -3
  227. package/dist/assets/{root-seam-contract-BNGi8m22.js → root-seam-contract-B9KwrQLd.js} +1 -1
  228. package/dist/assets/{run-selection-8wjzFzVg.js → run-selection-ByCRIyGc.js} +1 -1
  229. package/dist/assets/{scene-capture-aq3yUgox.js → scene-capture-XqwkFufj.js} +1 -1
  230. package/dist/assets/{scene-document.service-qnY16vPq.js → scene-document.service-Cj0jJK3E.js} +2 -2
  231. package/dist/assets/{scene-framing-BWGUKaVh.js → scene-framing-B7gPuTMy.js} +1 -1
  232. package/dist/assets/{seeded-random-BIdiJ8w9.js → seeded-random-C4K99T_S.js} +1 -1
  233. package/dist/assets/{setup-renderer-BI8Dltzx.js → setup-renderer-DzY3775p.js} +1 -1
  234. package/dist/assets/{source-object3d-authoring-adapter-Des84Gk3.js → source-object3d-authoring-adapter-BN-4Hovl.js} +1 -1
  235. package/dist/assets/{source-persistence-backend-I5wxqQgh.js → source-persistence-backend-CPBtrjhX.js} +1 -1
  236. package/dist/assets/{stage-keyboard-Ckod5Y4M.js → stage-keyboard-C9QxzoF9.js} +1 -1
  237. package/dist/assets/{stage-overlay-set-CLTmSTo9.js → stage-overlay-set-8l-rdrfd.js} +1 -1
  238. package/dist/assets/{stage-presence-markers-DOoDCC7Z.js → stage-presence-markers-Dkqob3C4.js} +1 -1
  239. package/dist/assets/{stage-transform-tools-DjYQ95b7.js → stage-transform-tools-Cs2JJ3LR.js} +1 -1
  240. package/dist/assets/{standard-viewport-dressing-DE9WE1Lv.js → standard-viewport-dressing-Bg8NSxy2.js} +1 -1
  241. package/dist/assets/{state-watch.action-D0rXmFVx.js → state-watch.action-Do9Y5Aqr.js} +1 -1
  242. package/dist/assets/{state-watch.menu-DJyVHqNM.js → state-watch.menu-oj02S65b.js} +1 -1
  243. package/dist/assets/{state-watch.utility-CHL55Pbn.js → state-watch.utility-DeZkHZN3.js} +1 -1
  244. package/dist/assets/{story-capture-BGeBen-R.js → story-capture-DFH1P952.js} +1 -1
  245. package/dist/assets/{story-documents-B8TSr_CN.js → story-documents-uTjkaheZ.js} +1 -1
  246. package/dist/assets/{story-documents.service-C_Q58qZs.js → story-documents.service-D8kXspBi.js} +1 -1
  247. package/dist/assets/{story-documents.service-B1hhvZad.js → story-documents.service-DedwE2II.js} +1 -1
  248. package/dist/assets/{story-media-presence-CEwzSadX.js → story-media-presence-BHMXFsmb.js} +1 -1
  249. package/dist/assets/{story-pixi-preview-rAub2W_H.js → story-pixi-preview-CUYChqBy.js} +1 -1
  250. package/dist/assets/{story-presentation-CdJ6Ncu6.js → story-presentation-BdJZjFNv.js} +1 -1
  251. package/dist/assets/{story-three-preview-Cp9kfSo0.js → story-three-preview-BVDXydup.js} +2 -2
  252. package/dist/assets/{studio-environment-BCf09Sox.js → studio-environment-CbAVP315.js} +1 -1
  253. package/dist/assets/{surface-state-BUmVXUJj.js → surface-state-Dc9frHdS.js} +1 -1
  254. package/dist/assets/{syntactic-prop-specs-BHoShoI2.js → syntactic-prop-specs-Bf7v7vkR.js} +1 -1
  255. package/dist/assets/team-playtest.service-wRiJR1XU.js +1 -0
  256. package/dist/assets/{three-wsMw8Ifj.js → three-DtUftGH2.js} +1 -1
  257. package/dist/assets/{three-authoring-adapter-DctJX96k.js → three-authoring-adapter-BlTbaEmo.js} +1 -1
  258. package/dist/assets/three-authoring.service-DHWovAI9.js +2 -0
  259. package/dist/assets/{three-ingest-runtime-Bqwv-JsZ.js → three-ingest-runtime-Cl0JuTP_.js} +1 -1
  260. package/dist/assets/{three-integration-C9bu5OXH.js → three-integration-CSP8i2RA.js} +2 -2
  261. package/dist/assets/three-integration.service-jjppzS8N.js +1 -0
  262. package/dist/assets/{three-projection-core-rOK39WmJ.js → three-projection-core-ftoGUmFi.js} +1 -1
  263. package/dist/assets/{three-state-Cu8xEils.js → three-state-BrM9-A7V.js} +1 -1
  264. package/dist/assets/{three-story-capture.service-DJaS21h9.js → three-story-capture.service-Cis8uMZw.js} +2 -2
  265. package/dist/assets/{three-story-model-CE0vGtKW.js → three-story-model-CTIreBN2.js} +1 -1
  266. package/dist/assets/{three-viewport-presentation-IVtG1zll.js → three-viewport-presentation-51gae0ax.js} +1 -1
  267. package/dist/assets/{transform-mode-request-C7qvcvEe.js → transform-mode-request-DJIOPPHR.js} +1 -1
  268. package/dist/assets/{transport-strip-B6Hauzjh.js → transport-strip-C0MCDVb9.js} +1 -1
  269. package/dist/assets/transport.header-DqzzdRt2.js +1 -0
  270. package/dist/assets/{tuples-CP56GoRo.js → tuples-DDKi5e56.js} +1 -1
  271. package/dist/assets/ui-board-document-B_3yvVV_.js +2 -0
  272. package/dist/assets/{user-data-BGLBYiFw.js → user-data-CRiQHvNG.js} +1 -1
  273. package/dist/assets/{utility-view-state-y2PTWZuT.js → utility-view-state-rnZf-khZ.js} +1 -1
  274. package/dist/assets/{viewport-door-B7DJhMPS.js → viewport-door-UgyLwfRY.js} +1 -1
  275. package/dist/assets/{viewport-root-presentation-DPtVohIT.js → viewport-root-presentation-B-tKDgs5.js} +1 -1
  276. package/dist/assets/{viewport-surface-status-CleQnKBz.js → viewport-surface-status-44lBh_Rl.js} +1 -1
  277. package/dist/assets/{webworkerAll-B8sqUYid.js → webworkerAll-CRPuSg96.js} +1 -1
  278. package/dist/assets/{workspace-arrangement-6V8ZwB2d.js → workspace-arrangement-BpSjUGOP.js} +1 -1
  279. package/dist/assets/world-documents-C1zfwUJ8.js +1 -0
  280. package/dist/assets/{world-root-stage-binding-OOLit0lW.js → world-root-stage-binding-Cdd_v5Bm.js} +1 -1
  281. package/dist/assets/{xstate-animation-binding-KbfYItEZ.js → xstate-animation-binding-iAUM3Z0P.js} +1 -1
  282. package/dist/assets/{xstate-animation-meta-DM_K9jo1.js → xstate-animation-meta-cSgHAo1p.js} +1 -1
  283. package/dist-node/cli.js +14 -14
  284. package/package.json +14 -14
  285. package/template/.agents/references/project-manual.md +1 -1
  286. package/template/.agents/skills/volter-ingest-existing-game/SKILL.md +1 -1
  287. package/template/.agents/skills/volter-threejs-authoring/SKILL.md +1 -1
  288. package/template/.claude/skills/volter-ingest-existing-game/SKILL.md +1 -1
  289. package/template/.claude/skills/volter-threejs-authoring/SKILL.md +1 -1
  290. package/template/.github/skills/volter-ingest-existing-game/SKILL.md +1 -1
  291. package/template/.github/skills/volter-threejs-authoring/SKILL.md +1 -1
  292. package/template/IDIOMS.md +1 -1
  293. package/template/package.json +10 -10
  294. package/template/src/bot/bot-station.ts +1 -1
  295. package/template/vite.config.ts +2 -2
  296. package/template-dotfiles/gitignore +1 -1
  297. package/dist/assets/InspectorObjectPreview-JE22P2KW.js +0 -1
  298. package/dist/assets/Object3DDocumentViewport-mDettU8s.js +0 -2
  299. package/dist/assets/autoplay.service-ap_sEfca.js +0 -1
  300. package/dist/assets/bridge.command-DNktKXNP.js +0 -3
  301. package/dist/assets/component-board.service-DTH3BKq_.js +0 -2
  302. package/dist/assets/design-time-layers-Cv3txX_V.js +0 -1
  303. package/dist/assets/design-time-mount.service-DupCKL6-.js +0 -2
  304. package/dist/assets/design-time-react-mount-CT8eihNN.js +0 -1
  305. package/dist/assets/editor-api-BqS9NdSX.js +0 -1
  306. package/dist/assets/game-document.service-CW928hrj.js +0 -1
  307. package/dist/assets/game-eval.command-D8ohGtA6.js +0 -2
  308. package/dist/assets/game-network-CU3Yp0oN.js +0 -22
  309. package/dist/assets/gameplay.command-b2D2rbZV.js +0 -1
  310. package/dist/assets/instances.command-wzs2BWwt.js +0 -1
  311. package/dist/assets/mount-canvas-ingest-root-nBqJPkbz.js +0 -2
  312. package/dist/assets/mount-ingest-root-9KaA9ETn.js +0 -2
  313. package/dist/assets/mount-manifest-BOiv1Hix.js +0 -1
  314. package/dist/assets/mount-three-ingest-root-C_0Slh91.js +0 -1
  315. package/dist/assets/network-observer.service-D61Whg6t.js +0 -1
  316. package/dist/assets/network.utility-Bw74dLIu.js +0 -1
  317. package/dist/assets/play.command-L6qPHLHh.js +0 -2
  318. package/dist/assets/project-authoring-session-sbmVUm3i.js +0 -2
  319. package/dist/assets/r3f-design-session-By5arVMz.js +0 -2
  320. package/dist/assets/team-playtest.service-DErOWVaA.js +0 -1
  321. package/dist/assets/three-authoring.service-B2LLPXyf.js +0 -2
  322. package/dist/assets/three-integration.service-BXQuaWQ-.js +0 -1
  323. package/dist/assets/transport.header-CDivn20X.js +0 -1
  324. package/dist/assets/ui-board-document-B69iTbe5.js +0 -2
  325. package/dist/assets/world-documents-CwxZ4xtW.js +0 -1
@@ -1 +1 @@
1
- import{s as G}from"./index-BPUmREu0.js";import{O as x,gz as X,bm as k,bn as j,r as _}from"./index-iW3HFEJB.js";import{c as Y}from"./source-persistence-backend-I5wxqQgh.js";import{c as V}from"./component-instance-root-9MmHwMal.js";import{J as Z}from"./json-history-resource-82d2z68R.js";import{a as Q,b as q}from"./pixi-transform-channels-P4rvmusc.js";function b(i){const t=i.constructor?.name?.toLowerCase()??"container";return t.includes("animatedsprite")?"animatedsprite":t.includes("nineslice")?"nineslicesprite":t.includes("tiling")?"tilingsprite":t.includes("sprite")?"sprite":t.includes("text")?"text":t.includes("graphics")?"graphics":"container"}function J(i){const t=tt(i);if(t)return t;const e=it(i);if(e)return e;const r=rt(i);if(r)return r;const n=g(i);if(n)return n;const o=b(i),s=i.children?.length??0;return s>0?`${o} (${s})`:o}function tt(i){const t=i.label?.trim();if(t){if(N(t)&&t!==i.constructor?.name)return t;if(!$(t))return t}}function N(i){return i.length<=2&&i===i.toLowerCase()}const et=new Set(["container","displayobject","sprite","animatedsprite","nineslicesprite","tilingsprite","text","bitmaptext","htmltext","graphics","mesh"]);function $(i){return N(i)||i==="Object"||i==="Function"?!0:et.has(i.replace(/^_+/,"").toLowerCase())}function rt(i){const e=i.texture?.label?.trim();return!e||/^(_?texture)?(empty|white)$/i.test(e)?void 0:(e.split("/").pop()??e).replace(/\.[a-z0-9]+$/i,"")||void 0}function g(i){const t=i.constructor?.name;if(!(!t||$(t)))return t.replace(/^_+/,"")||void 0}function v(i){const t=i.replace(/^_+/,"");return t.length>0?t:void 0}function F(i){return"addChild"in i&&typeof i.addChild=="function"&&"children"in i}function it(i){const t={seen:new WeakSet,budget:nt};let e=i.parent;for(let r=0;r<8&&e&&typeof e=="object";r++){if(t.budget<=0)return;const n=O(e,i,t)??R(e,i,2,t);if(n)return n;e=e.parent}}const nt=2e3;function S(i){return i.budget<=0?!1:(i.budget-=1,!0)}function I(i){return/^_?[A-Za-z][A-Za-zA-Z0-9]*$/.test(i)?!ot.has(i.replace(/^_+/,"")):!1}const ot=new Set(["parent","children","transform","position","origin","scale","pivot","skew","anchor","worldTransform","localTransform","groupTransform","relativeGroupTransform","renderGroup","parentRenderGroup","parentRenderGroupIndex","parentRenderLayer","relativeRenderGroupDepth","renderPipeId","instructionSet","childrenToUpdate","childrenRenderablesToUpdate","effects","filters","mask","bounds","boundsArea","visualBounds","gpuData","texture","events","eventsCount","updateFlags"]);function O(i,t,e){if(e.seen.has(i))return;e.seen.add(i);const r=E(i,t,void 0,e);if(r)return r;for(const[n,o]of Object.entries(i)){if(!S(e))return;if(!I(n))continue;const s=H(i,n,o,t);if(s)return s;const a=E(o,t,n,e);if(a)return a}}function E(i,t,e,r){const n=dt(i);if(n)for(const[o,s]of n){if(!S(r))return;const a=st(i,s,at(o)??e,t,r);if(a)return a}}function st(i,t,e,r,n){if(e){const o=H(t&&typeof t=="object"?t:i,e,t,r);if(o)return o}else if(t&&typeof t=="object"&&t.view===r){const o=g(t);if(o)return o}if(t&&typeof t=="object"&&!F(t))return O(t,r,n)}function at(i){if(!(!i||/^\d+$/.test(i)))return I(i)||i.includes("-")?v(i)??i:void 0}function*ct(i){for(let t=0;t<i.length;t++)yield[String(t),i[t]]}function*lt(i){for(const[t,e]of i.entries())yield[String(t),e]}function*ut(i){let t=0;for(const e of i)yield[String(t),e],t+=1}function dt(i){if(!(!i||typeof i!="object")){if(Array.isArray(i))return ct(i);if(i instanceof Map)return lt(i);if(i instanceof Set)return ut(i);if(Object.getPrototypeOf(i)===Object.prototype)return Object.entries(i)}}function H(i,t,e,r){if(e===r){const n=v(t);return n&&n.toLowerCase()!=="view"?g(e)??n:g(e)??g(i)??n}if(e&&typeof e=="object"&&e.view===r)return g(e)??v(t)}function R(i,t,e,r){const n=O(i,t,r);if(n)return n;if(!(e<=0))for(const[o,s]of Object.entries(i)){if(!S(r))return;if(!I(o)||!s||typeof s!="object"||F(s))continue;const a=R(s,t,e-1,r);if(a)return a}}const ht={idFor:(i,t)=>`w2d:${t.join("/")}:${b(i)}:${i.label??""}`};class ft{constructor(t,e={}){this.root=t,e.overlay&&(this.overlay=e.overlay),this.identity=e.identity??ht,this.refresh()}byId=new Map;overlay={};dirty=!1;identity;names=new WeakMap;reindex(){this.byId.clear(),this.identity.beginWalk?.();let t=0,e=0;const r=(n,o)=>{const s=this.identity.idFor(n,o);n.__authId=s,this.byId.set(s,n),t++,b(n).includes("sprite")&&e++,n.children.forEach((a,l)=>{r(a,[...o,l])})};return this.root.children.forEach((n,o)=>{r(n,[o])}),{count:t,sprites:e}}refresh(){const t=this.reindex();for(const[e,r]of Object.entries(this.overlay))this.applyOverride(e,r);return t}roots(){return this.root.children.map(t=>this.toNode(t))}node(t){const e=this.byId.get(t);return e?this.toNode(e):null}displayObject(t){return this.byId.get(t)??null}nameOf(t){const e=this.names.get(t),r=t.parent??null,n=t.constructor,o=t.label??null,s=t.texture??null,a=t.children?.length??0;if(e&&e.parent===r&&e.type===n&&e.own===o&&e.texture===s&&e.childCount===a)return e;const l={label:J(t),kind:b(t),parent:r,type:n,own:o,texture:s,childCount:a};return this.names.set(t,l),l}toNode(t){const e=t,{label:r,kind:n}=this.nameOf(t);return{id:e.__authId??"",label:r,kind:n,parentId:t.parent?.__authId??null,childIds:t.children.map(o=>o.__authId??"")}}getTransform(t){const e=this.byId.get(t);return!e||!e.position||!e.scale?null:{position:[e.position.x,e.position.y],rotation:e.rotation,scale:[e.scale.x,e.scale.y]}}setTransform(t,e){const r=this.byId.get(t);if(!r)return;e.position&&r.position.set(e.position[0],e.position[1]),e.rotation!==void 0&&(r.rotation=e.rotation),e.scale&&r.scale.set(e.scale[0],e.scale[1]),this.overlay[t]??={};const n=this.overlay[t];e.position&&(n.position=e.position),e.rotation!==void 0&&(n.rotation=e.rotation),e.scale&&(n.scale=e.scale),this.dirty=!0}properties(t){const e=this.byId.get(t);if(!e)return[];const r=[{path:"label",label:"Name",type:"string",value:e.label??""},{path:"visible",label:"Visible",type:"boolean",value:e.visible},{path:"alpha",label:"Alpha",type:"number",value:e.alpha}];return"tint"in e&&r.push({path:"tint",label:"Tint",type:"color",value:e.tint}),r}set(t,e,r){const n=this.byId.get(t);n&&(n[e]=r,this.overlay[t]??={},e==="label"&&(this.overlay[t].label=r),e==="alpha"&&(this.overlay[t].alpha=r),e==="tint"&&(this.overlay[t].tint=r),e==="visible"&&(this.overlay[t].visible=r),this.dirty=!0)}applyOverride(t,e){const r=this.byId.get(t);r&&(e.label!==void 0&&(r.label=e.label),e.alpha!==void 0&&(r.alpha=e.alpha),e.position&&r.position.set(e.position[0],e.position[1]),e.rotation!==void 0&&(r.rotation=e.rotation),e.scale&&r.scale.set(e.scale[0],e.scale[1]),e.tint!==void 0&&"tint"in r&&(r.tint=e.tint),e.visible!==void 0&&(r.visible=e.visible))}applyOverlay(t){let e=0,r=0;for(const[n,o]of Object.entries(t)){if(!this.byId.has(n)){r++;continue}this.applyOverride(n,o),this.overlay[n]={...this.overlay[n],...o},e++}return{applied:e,orphaned:r}}isDirty(){return this.dirty}serializeOverlay(){return this.overlay}replaceOverlay(t){this.overlay=structuredClone(t);for(const[e,r]of Object.entries(this.overlay))this.applyOverride(e,r);this.dirty=!0}markClean(){this.dirty=!1}}const pt={count:0,sprites:0};class yt{constructor(t,e,r,n=o=>queueMicrotask(o)){this.root=t,this.index=e,this.mapping=r,this.scheduleWindowClose=n,this.refresh()}current={nodes:new Map,rootIds:[],stats:pt};projectionFresh=!1;refresh(){const t=this.index.refresh();return this.current=this.readProjection(t),this.openProjectionWindow(),t}project(){return this.projectionFresh?this.current:this.reproject()}reproject(){const t=this.index.reindex();return this.current=this.readProjection(t),this.openProjectionWindow(),this.current}invalidate(){this.projectionFresh=!1}openProjectionWindow(){this.projectionFresh||(this.projectionFresh=!0,this.scheduleWindowClose(()=>{this.projectionFresh=!1}))}projection(){return this.current}object(t){const e=this.current.nodes.get(t)?.object??null;return e===null||e.destroyed?null:e}node(t){const e=this.current.nodes.get(t);if(!e)return null;const r=this.index.node(t);return r?{...r,parentId:e.parentId,childIds:[...e.childIds]}:null}roots(){return this.current.rootIds.map(t=>this.node(t)).filter(t=>t!==null)}pick(t,e,r){return this.candidates(t,e,r)[0]??null}candidates(t,e,r){const n=this.pointFromClient(t,e);return n?(this.project(),this.hitIds(n,r)):[]}pointFromClient(t,e){const r=this.mapping?.surface()??null;if(!r)return null;const n=r.getBoundingClientRect();if(n.width<=0||n.height<=0)return null;const o=this.mapping?.pointFromClient?.(t,e,n)??null;if(this.mapping?.pointFromClient)return o;const s=Number(r.dataset?.volterStageWidth??n.width),a=Number(r.dataset?.volterStageHeight??n.height);return!(s>0)||!(a>0)?null:{x:(t-n.left)*(s/n.width),y:(e-n.top)*(a/n.height)}}hitIds(t,e){const r=[],n=[];this.collectHits(this.root,t,"visual",r),this.collectHits(this.root,t,"hitArea",n);const o=[],s=new Set;for(const a of[...r,...n]){const l=a.__authId;l&&!e(l)&&!s.has(l)&&(s.add(l),o.push(l))}return o}rect(t){const e=this.object(t);if(!e||typeof e.getBounds!="function")return null;const r=e.getBounds();return!(r.width>0)||!(r.height>0)?null:{x:r.x,y:r.y,width:r.width,height:r.height}}frame(t){const e=this.object(t);if(!e||typeof e.getLocalBounds!="function")return null;const r=e.getLocalBounds();if(!(r.width>0)||!(r.height>0))return null;const n=(o,s)=>{const a=e.toGlobal({x:o,y:s});return{x:a.x,y:a.y}};return{tl:n(r.x,r.y),tr:n(r.x+r.width,r.y),br:n(r.x+r.width,r.y+r.height),bl:n(r.x,r.y+r.height)}}contextRects(t){const e=this.node(t);if(!e)return{siblings:[]};const r=e.parentId?this.node(e.parentId)?.childIds??[]:this.current.rootIds,n=e.parentId?this.rect(e.parentId):null;return{...n?{parent:n}:{},siblings:r.filter(o=>o!==t).map(o=>this.rect(o)).filter(o=>o!==null)}}readProjection(t){const e=new Map,r=[],n=o=>{const s=this.index.displayObject(o.id);if(!s)return;const a={object:s,id:o.id,parentId:o.parentId,childIds:[...o.childIds]};e.set(o.id,a);for(const l of o.childIds){const h=this.index.node(l);h&&n(h)}};for(const o of this.index.roots())r.push(o.id),n(o);return{nodes:e,rootIds:r,stats:t}}collectHits(t,e,r,n){const o=t.children??[];for(let s=o.length-1;s>=0;s--){const a=o[s];if(!a.visible||!a.renderable)continue;a.updateLocalTransform();const l={x:0,y:0};a.localTransform.applyInverse(e,l),this.collectHits(a,l,r,n),this.contains(a,l,r)&&n.push(a)}}contains(t,e,r){if(!t.__authId)return!1;const n=t;return r==="hitArea"?n.hitArea?n.hitArea.contains(e.x,e.y):!1:typeof n.containsPoint=="function"?n.containsPoint(e):!1}}const T="pixi",gt="data-oid",mt="data-authoring-instance",bt="data-authoring-label",xt="data-authoring-component";function vt(i){if(!i||typeof i!="object")return;const t=i[gt];return typeof t=="string"&&t.length>0?t:void 0}function C(i,t){if(!i||typeof i!="object")return;const e=i[t];return typeof e=="string"&&e.length>0?e:void 0}function w(i){return C(i,mt)}function wt(i){return C(i,bt)}function St(i){return C(i,xt)}function D(i){const t=w(i);return t?w(i.parent)!==t:!1}function It(i){return D(i)?w(i):vt(i)}function Ot(i,t,e=0){return V(`${T}:${i}:${t}`,e)}function Tt(i,t){return`${T}:${i}:@${t.join(".")}`}function Qt(i,t){const e=`${T}:${i}:`;if(!t.startsWith(e))return null;const r=t.slice(e.length);if(r.startsWith("@"))return null;const n=r.indexOf("#"),o=n<0?r:r.slice(0,n);return o.length>0?o:null}function qt(i){let t=new Map;return{beginWalk:()=>{t=new Map},idFor:(e,r)=>{const n=It(e);if(n===void 0)return Tt(i,r);const o=t.get(n)??0;return t.set(n,o+1),Ot(i,n,o)}}}const P="#root";function Ct(i){if(!(!i.position||!i.scale||!i.pivot||!i.skew))return{x:i.position.x,y:i.position.y,rotation:i.rotation,scaleX:i.scale.x,scaleY:i.scale.y,pivotX:i.pivot.x,pivotY:i.pivot.y,skewX:i.skew.x,skewY:i.skew.y}}function kt(i,t){!i.position||!i.scale||!i.pivot||!i.skew||(i.position.set(t.x,t.y),i.scale.set(t.scaleX,t.scaleY),i.pivot.set(t.pivotX,t.pivotY),i.skew.set(t.skewX,t.skewY),i.rotation=t.rotation)}class jt{constructor(t,e,r,n){this.root=t,this.onRestored=n;const o=e.shell.projectHistory;this.resource=o?new Z({history:o,kind:"session-state",scope:"session",subject:{...r,id:`${r.id}/world-2d-structure`},displayName:"World 2D structure",capture:()=>this.capture(),conflictIdentity:s=>Object.fromEntries(Object.entries(s.placements).map(([a,l])=>[a,l.parent])),restore:async s=>{this.restore(s)}}):null}byUid=new Map;resource;track(t){return this.uidOf(t)}run(t,e){this.resource?.assertCanMutate();const r=this.capture(),n=e();return this.resource&&this.resource.record(t,r,this.capture()).catch(o=>{x.error(`[canvas] failed to journal "${t}" into project history — the structural edit is applied but has no history entry (it cannot be undone): ${o instanceof Error?o.message:String(o)}`,"authoring")}),n}dispose(){this.resource?.dispose(),this.byUid.clear()}uidOf(t){if(t===this.root)return P;const e=t,r=e.__volterStructUid;if(r&&this.byUid.get(r)===t)return r;const n=r??`s${crypto.randomUUID()}`;return e.__volterStructUid=n,this.byUid.set(n,t),n}capture(){const t={};for(const[e,r]of this.byUid){const n=r.parent??null,o=Ct(r);t[e]={parent:n?this.uidOf(n):null,index:n?n.children?.indexOf(r)??-1:-1,...o?{pose:o}:{}}}return{placements:t}}restore(t){const e=Object.entries(t.placements);for(const[r,n]of e){if(n.parent!==null)continue;const o=this.byUid.get(r);o?.parent?.removeChild(o)}for(const[r,n]of e.filter(([,o])=>o.parent!==null).sort((o,s)=>o[1].index-s[1].index)){const o=this.byUid.get(r);if(!o)continue;const s=n.parent===P?this.root:this.byUid.get(n.parent);if(!s||typeof s.addChildAt!="function")continue;const a=s.children.length-(o.parent===s?1:0);s.addChildAt(o,Math.max(0,Math.min(n.index,a))),n.pose&&kt(o,n.pose)}this.onRestored()}}const Et=[{kind:"container",label:"Container",description:"A general-purpose display object that holds children, and transforms and draws them together."},{kind:"sprite",label:"Sprite",extends:"container",description:"Draws one texture: an image, or a frame of a spritesheet."},{kind:"animatedSprite",label:"AnimatedSprite",extends:"sprite",description:"Plays a list of textures as frames at an animation speed."},{kind:"tilingSprite",label:"TilingSprite",extends:"container",description:"Repeats one texture across its width and height, scrollable by its tile position."},{kind:"nineSliceSprite",label:"NineSliceSprite",extends:"container",description:"Stretches a texture without stretching its corners: the nine-slice panel of a UI."},{kind:"text",label:"Text",extends:"container",description:"Draws a string with a text style (font, size, fill, wrapping)."},{kind:"bitmapText",label:"BitmapText",extends:"container",description:"Draws a string from a bitmap font: fast to change every frame."},{kind:"htmlText",label:"HTMLText",extends:"container",description:"Draws a string of HTML and CSS markup."},{kind:"graphics",label:"Graphics",extends:"container",description:"Draws vector shapes (rectangles, circles, paths) from its draw callback."},{kind:"meshPlane",label:"MeshPlane",extends:"container",description:"A textured grid of vertices that can be bent and deformed."},{kind:"perspectiveMesh",label:"PerspectiveMesh",extends:"meshPlane",description:"A texture drawn in perspective between four corner points."},{kind:"particleContainer",label:"ParticleContainer",extends:"container",description:"Draws many lightweight particles in one batch, added from code with addParticle."}],W="canvasEditLocks";function B(){return _().projectLocalState.read(W)??{}}function Pt(i,t){_().projectLocalState.write(W,{...B(),[i]:t})}const K=Et,L=/\.(png|jpe?g|webp|gif|svg)(\?.*)?$/i,Lt="a canvas structural edit would have to add, delete or move a construction statement in the world's own source, and this lane plans property writes only — an editor-created node has no construction site there at all",M="origin",Mt="#ff2d92",At="this world's write target has no origin write, so the pivot/anchor can be seen here but not dragged";function z(i){const t=i,e=t.anchor,r=t.texture;return e&&r?.orig?{anchor:e,texture:r}:null}function _t(i){const t=z(i);if(!t)return null;const e=i.bounds;return typeof e?.width=="number"&&typeof e.height=="number"?{x:e.width,y:e.height}:{x:t.texture.orig.width,y:t.texture.orig.height}}function Nt(i){return K.find(e=>e.kind===i)?.label??i}function A(i){return!!i&&typeof i.addParticle=="function"}function $t(i,t){switch(t){case"container":return new i.Container;case"sprite":{const e=new i.Sprite(i.Texture.WHITE);return e.setSize(64,64),e}case"text":return new i.Text({text:"Text",style:{fill:16777215,fontSize:24}});case"graphics":return new i.Graphics().rect(0,0,100,100).fill(16777215);case"animatedSprite":{const e=new i.AnimatedSprite([i.Texture.WHITE]);return e.setSize(64,64),e}case"tilingSprite":return new i.TilingSprite({texture:i.Texture.WHITE,width:100,height:100});case"nineSliceSprite":return new i.NineSliceSprite({texture:i.Texture.WHITE,width:100,height:100});case"bitmapText":return new i.BitmapText({text:"BitmapText",style:{fill:16777215,fontSize:24}});case"htmlText":return new i.HTMLText({text:"HTMLText",style:{fill:16777215,fontSize:24}});case"meshPlane":{const e=new i.MeshPlane({texture:i.Texture.WHITE});return e.setSize(100,100),e}case"perspectiveMesh":{const e=new i.PerspectiveMesh({texture:i.Texture.WHITE});return e.setSize(100,100),e}case"particleContainer":return new i.ParticleContainer;default:return null}}function U(i,t){const e=Ft(i,t);Ht(t,e);for(const r of t.children??[])e.addChild(U(i,r));return e}function Ft(i,t){if(t.constructor===i.Container)return new i.Container;if(t.constructor===i.Sprite){const e=t,r=new i.Sprite(e.texture);return r.anchor.set(e.anchor.x,e.anchor.y),r}if(t.constructor===i.Text){const e=t,r=new i.Text({text:e.text,style:e.style.clone()});return r.anchor.set(e.anchor.x,e.anchor.y),r}if(t.constructor===i.Graphics)return t.clone(!0);throw new Error(`"${t.label??t.constructor?.name??"this node"}" cannot be duplicated: a ${t.constructor?.name??"custom"} is constructed by the game's own code, and copying only its display half would put a lookalike with no behaviour into the world.`)}function Ht(i,t){t.label=i.label,t.position.set(i.position.x,i.position.y),t.scale.set(i.scale.x,i.scale.y),t.pivot.set(i.pivot.x,i.pivot.y),t.skew.set(i.skew.x,i.skew.y),t.rotation=i.rotation,t.alpha=i.alpha,t.visible=i.visible,"tint"in i&&"tint"in t&&(t.tint=i.tint)}function Rt(i,t){const e=i.parentLinear;if(!e)return t;const r=e.a*e.d-e.b*e.c;if(Math.abs(r)<1e-9)return t;const[,,n,o]=i.transform.rotation,s=2*Math.atan2(n,o),a=e.a*Math.cos(s)+e.c*Math.sin(s),l=e.b*Math.cos(s)+e.d*Math.sin(s),h=t*Math.PI/180,f=a*Math.cos(h)-l*Math.sin(h),d=a*Math.sin(h)+l*Math.cos(h),c=(e.d*f-e.c*d)/r,u=(-e.b*f+e.a*d)/r,p=r<0?-h:h,y=Math.atan2(u,c)-s-p,m=Math.atan2(Math.sin(y),Math.cos(y));return(p+m)*180/Math.PI}function Dt(i){const t=new Set;return(i.x!==void 0||i.y!==void 0||i.originX!==void 0||i.originY!==void 0)&&t.add("position"),(i.width!==void 0||i.height!==void 0||i.scaleXFactor!==void 0||i.scaleYFactor!==void 0)&&(t.add("scale"),(i.width!==void 0||i.height!==void 0)&&t.add("position")),i.rotate!==void 0&&t.add("rotation"),[...t]}function Wt(i,t){const e=t*Math.PI/180/2,r=Math.sin(e),n=Math.cos(e),[o,s,a,l]=i.rotation;return[o*n+s*r,s*n-o*r,a*n+l*r,l*n-a*r]}function Bt(i,t){const e={position:[...i.transform.position],rotation:[...i.transform.rotation],scale:[...i.transform.scale]},r=t.rotate;if(r!==void 0){let d=Rt(i,r);const c=t.rotationStep;if(c!==void 0&&c>0){const[,,u,p]=i.transform.rotation,y=2*Math.atan2(u,p)*180/Math.PI,m=t.rotationOffset??0;d=Math.round((y+d-m)/c)*c+m-y}e.rotation=Wt(i.transform,d)}const n=t.width;n!==void 0&&i.rect.width>0&&(e.scale[0]=i.transform.scale[0]*Math.max(1e-4,n/i.rect.width));const o=t.height;o!==void 0&&i.rect.height>0&&(e.scale[1]=i.transform.scale[1]*Math.max(1e-4,o/i.rect.height));const s=t.scaleStep,a=d=>s!==void 0&&s>0?Math.round(d/s)*s:d,l=d=>Math.abs(d)>=1e-4?d:d<0?-1e-4:1e-4,h=t.scaleXFactor;h!==void 0&&(e.scale[0]=l(a(i.transform.scale[0]*h)));const f=t.scaleYFactor;return f!==void 0&&(e.scale[1]=l(a(i.transform.scale[1]*f))),e}function Kt(i,t,e,r){return r.originX!==void 0||r.originY!==void 0?{dx:r.originX!==void 0&&i?r.originX-i.x:0,dy:r.originY!==void 0&&i?r.originY-i.y:0}:{dx:t?(r.x??e.x)-t.x:0,dy:t?(r.y??e.y)-t.y:0}}class zt{constructor(t,e,r){this.root=t,this.store=e,this.target=r.target,this.pixi=r.pixi??G,this.transforms={dimensions:()=>"2d",get:c=>{const u=this.a2d.getTransform(c);return u?q(u):{position:[0,0,0],rotation:[0,0,0,1],scale:[1,1,1]}},editability:(c,u)=>this.target.transformEditability(c,u),beginEdit:c=>this.target.beginTransformEdit(c),apply:(c,u)=>{this.target.writeTransform(c,Q(u)),this.notify()},endEdit:c=>this.target.endTransformEdit(c),...this.target.removeTransform?{remove:(c,u)=>this.target.removeTransform?.(c,u)}:{}},this.loadTexture=r.loadTexture??(c=>this.pixi.Assets.load(c)),this.capturePreview=r.capturePreview,this.structureHistory=new jt(t,e,r.journal,()=>this.afterStructuralChange()),this.a2d=new ft(t,{...r.identity?{identity:r.identity}:{}}),this.projector=new yt(t,this.a2d,{surface:r.surface??(()=>null),...r.pointFromClient?{pointFromClient:r.pointFromClient}:{}}),this.provenance=this.target.provenance,r.surface&&(this.pickable={pick:(c,u)=>{const p=this.projector.pick(c,u,y=>this.isPickLocked(y));return p&&this.groupOf(p)},candidates:(c,u,p)=>this.projector.candidates(c,u,y=>p?.includeLocked?!1:this.isPickLocked(y))},this.rects={rect:c=>this.projector.rect(c),frame:c=>this.projector.frame(c),contextRects:c=>this.projector.contextRects(c)}),r.stories&&(this.stories=r.stories),this.watchStructure(t),this.capabilities={transform:!0,inspectorFields:!0,persist:this.target.provenance.source==="source-code"&&this.target.persistence!==void 0},this.target.bind({a2d:this.a2d,store:e,journal:r.journal,notify:()=>this.notify()}),this.editLockWorld=r.journal.id;const o=B()[this.editLockWorld];this.lockedPaths=new Set(o?.locked??[]),this.groupedPaths=new Set(o?.grouped??[]);const s=this.target.structure??this.liveStructure,a=c=>!!c&&A(this.projector.object(c)),l="a ParticleContainer holds particles added with addParticle, not display objects.";this.structure={...s,create:(c,u,p)=>a(u)?{id:"",ack:this.refuseStructure(l)}:s.create(c,u,p?this.pointInParent(u??null,p):void 0),...s.reparent?{reparent:(c,u)=>a(u)?this.refuseStructure(l):s.reparent(c,u)}:{},...s.paste?{paste:c=>a(c)?this.refuseStructure(l):s.paste(c)}:{},...s.canPaste?{canPaste:c=>!a(c)&&s.canPaste(c)}:{},...s.creatableKinds?{creatableKinds:c=>a(c)?[]:s.creatableKinds(c)}:{}},this.assetDrop=this.target.assetDrop??{accepts:(c,u)=>L.test(u)&&this.containerFor(c||null)!==null,drop:(c,u,p)=>this.dropAsset(c,u,p)};const h=this.target.persistence;h&&(this.persistence=h);const f=this.target.truth?.bind(this.target);f&&(this.truth={resolve:(c,u)=>f(c,u)},this.related=Y(c=>f(c,"position").site)),!r.stories&&this.target.componentIdentity&&(this.stories=X("canvas",e.shell,c=>this.target.componentIdentity?.(c)??null));const d=this.target.instances?.();d&&(this.instances={describe:c=>d.describe(c),...d.openComponent?{openComponent:c=>d.openComponent?.(c)}:{},revert:(c,u)=>d.revert(c,u),applyToComponent:(c,u)=>d.applyToComponent(c,u)})}capabilities;provenance;pickable;rects;persistence;truth;related;structure;stories;instances;transforms;a2d;projector;target;pixi;structureHistory;loadTexture;capturePreview;listeners=new Set;boxEditSessions=new Map;lockedPaths=new Set;groupedPaths=new Set;editLockWorld;pathKeys=new Map;refresh(){return this.projector.refresh()}previewImage(t,e,r){const n=this.projector.object(t);return n&&this.capturePreview?this.capturePreview(n,{width:e,height:r}):Promise.resolve(null)}notify(){for(const t of this.listeners)t()}watchedForStructure=[];structureNotifyQueued=!1;onStructureChanged=()=>{this.projector.invalidate(),!this.structureNotifyQueued&&(this.structureNotifyQueued=!0,queueMicrotask(()=>{this.structureNotifyQueued=!1,this.projector.reproject(),this.pathKeys.clear(),this.watchStructure(this.root),this.target.onReindex(),this.notify(),this.store.shell.notifyIngestEdit()}))};watchStructure(t){for(const r of this.watchedForStructure)r.off("childAdded",this.onStructureChanged),r.off("childRemoved",this.onStructureChanged);this.watchedForStructure=[];const e=r=>{typeof r.on=="function"&&typeof r.off=="function"&&(r.on("childAdded",this.onStructureChanged),r.on("childRemoved",this.onStructureChanged),this.watchedForStructure.push(r));for(const n of r.children??[])e(n)};e(t)}hierarchy={roots:()=>(this.projector.project(),this.projector.roots().map(t=>this.toEditorNode(t.id)).filter(t=>t!==null)),node:t=>this.toEditorNode(t)};toEditorNode(t){const e=this.projector.node(t);if(!e)return null;const r=this.projector.object(t),n=r?D(r):!1,o=n?St(r):void 0;return{id:e.id,label:(n&&r?wt(r):void 0)??e.label,role:n?"component":"entity",kind:e.kind,...o?{typeLabel:o}:{},parentId:e.parentId,childIds:e.childIds}}selection={get:()=>[...this.store.shell.selectedEntityIds],set:t=>{this.store.shell.selectMultiple(t),this.notify()}};liveStructure={create:(t,e,r)=>this.createStructuralNode(t,e??null,r),remove:t=>this.removeStructuralNodes([t]),removeMany:t=>this.removeStructuralNodes(t),duplicate:t=>this.duplicateStructuralNode(t),reparent:(t,e)=>this.reparentStructuralNode(t,e),reorder:(t,e)=>this.reorderStructuralNode(t,e),creatableKinds:()=>K.map(t=>({...t}))};containerFor(t){if(!t)return this.root;const e=this.projector.object(t);return!e||typeof e.addChild!="function"||A(e)?null:e}refuseStructure(t){return k({resolve:()=>j(t),record:()=>{},report:e=>x.warn(`[canvas] structural edit refused — ${e}`,"authoring")})}reportStructureLiveOnly(t){return k({resolve:()=>j(Lt),record:()=>{},report:e=>{if(this.target.reportStructureLiveOnly){this.target.reportStructureLiveOnly(t,e);return}x.log(`[canvas] ${t} is live-only — ${e}.`,"authoring")}})}afterStructuralChange(){this.projector.reproject(),this.pathKeys.clear(),this.watchStructure(this.root),this.target.onReindex(),this.notify(),this.store.shell.notifyIngestEdit()}idOf(t){return t.__authId??""}pointInParent(t,e){const r=this.containerFor(t);if(!r||typeof r.updateLocalTransform!="function")return;const n=this.localToRootMatrix(r).clone().invert().apply({x:e.x,y:e.y});return{x:n.x,y:n.y}}createStructuralNode(t,e,r){const n=this.containerFor(e);if(!n)return{id:"",ack:this.refuseStructure(`no node with id "${e}" can hold children.`)};const o=$t(this.pixi,t);if(!o)return{id:"",ack:this.refuseStructure(`"${t}" is not a kind this canvas surface can construct.`)};o.label=Nt(t),r&&o.position.set(r.x,r.y);const s=`Create ${o.label}`;return this.structureHistory.track(n),this.structureHistory.track(o),this.structureHistory.run(s,()=>{n.addChild(o)}),this.afterStructuralChange(),{id:this.idOf(o),ack:this.reportStructureLiveOnly(s)}}removeStructuralNodes(t){const e=[];let r=null;for(const o of t){const s=this.projector.object(o);if(!s?.parent){r=this.refuseStructure(`"${o}" is not a removable node in this tree.`);continue}e.push(s)}if(e.length===0)return r??this.refuseStructure("the selection held no removable node.");const n=e.length===1?`Delete ${e[0].label??"node"}`:`Delete ${e.length} nodes`;for(const o of e)this.structureHistory.track(o),o.parent&&this.structureHistory.track(o.parent);return this.structureHistory.run(n,()=>{for(const o of e)o.parent?.removeChild(o)}),this.afterStructuralChange(),this.reportStructureLiveOnly(n)}duplicateStructuralNode(t){const e=this.projector.object(t),r=e?.parent??null;if(!e||!r)throw new Error(`"${t}" is not a duplicable node in this tree.`);const n=U(this.pixi,e);n.label=`${e.label||"node"} copy`;const o=`Duplicate ${e.label??"node"}`,s=r.children.indexOf(e);return this.structureHistory.track(r),this.structureHistory.track(n),this.structureHistory.run(o,()=>{r.addChildAt(n,s+1)}),this.afterStructuralChange(),{id:this.idOf(n),ack:this.reportStructureLiveOnly(o)}}reparentStructuralNode(t,e){const r=this.projector.object(t);if(!r)return this.refuseStructure(`"${t}" is not a node in this tree.`);const n=this.containerFor(e);if(!n)return this.refuseStructure(`no node with id "${e}" can hold children.`);if(n===r||this.isAncestorOf(r,n))return this.refuseStructure("a node cannot be reparented into itself or its own descendant.");const o=this.localToRootMatrix(r),s=this.localToRootMatrix(n),a=`Move ${r.label??"node"}`;return this.structureHistory.track(r),r.parent&&this.structureHistory.track(r.parent),this.structureHistory.track(n),this.structureHistory.run(a,()=>{n.addChild(r),r.setFromMatrix(s.clone().invert().append(o))}),this.afterStructuralChange(),this.reportStructureLiveOnly(a)}reorderStructuralNode(t,e){const r=this.projector.object(t),n=r?.parent??null;if(!r||!n)return this.refuseStructure(`"${t}" is not a reorderable node in this tree.`);const o=e?this.projector.object(e):null;if(e&&(!o||o.parent!==n))return this.refuseStructure(`"${e}" is not a sibling of "${t}".`);const s=`Reorder ${r.label??"node"}`;return this.structureHistory.track(n),this.structureHistory.track(r),this.structureHistory.run(s,()=>{const a=n.children.indexOf(r),l=o?n.children.indexOf(o):n.children.length;n.addChildAt(r,Math.max(0,a<l?l-1:l))}),this.afterStructuralChange(),this.reportStructureLiveOnly(s)}isAncestorOf(t,e){let r=e.parent;for(;r;){if(r===t)return!0;r=r.parent}return!1}localToRootMatrix(t){const e=[];let r=t;for(;r&&r!==this.root;)e.push(r),r=r.parent;const n=new this.pixi.Matrix;for(let o=e.length-1;o>=0;o--){const s=e[o];s.updateLocalTransform(),n.append(s.localTransform)}return n}assetDrop;async dropAsset(t,e,r){if(!L.test(e))return this.refuseStructure(`${e} is not an image. A canvas world mounts an image as a Sprite; a model or an audio file has no display object to become here.`);const n=this.containerFor(t||null);if(!n)return this.refuseStructure(`no node with id "${t}" can hold a dropped asset.`);let o;try{o=await this.loadTexture(e)}catch(h){return this.refuseStructure(`${e} could not be loaded as a texture: ${h instanceof Error?h.message:String(h)}`)}const s=new this.pixi.Sprite(o);s.anchor.set(.5,.5),s.label=e.split("/").pop()??"Sprite";const a=r?.position;if(a){const h=this.localToRootMatrix(n).clone().invert().apply({x:a[0],y:a[1]});s.position.set(h.x,h.y)}const l=`Add ${s.label}`;return this.structureHistory.track(n),this.structureHistory.track(s),this.structureHistory.run(l,()=>{n.addChild(s)}),this.afterStructuralChange(),this.reportStructureLiveOnly(l)}boxEdit={begin:t=>{const e=this.projector.rect(t);if(!e){this.boxEditSessions.delete(t);return}const r=this.projector.object(t)?.parent?.worldTransform;this.boxEditSessions.set(t,{id:t,rect:e,transform:this.transforms.get(t),...r?{parentLinear:{a:r.a,b:r.b,c:r.c,d:r.d}}:{}}),this.transforms.beginEdit?.(t)},apply:(t,e)=>this.applyBoxEdit(t,e),end:t=>{const e=this.boxEditSessions.get(t);this.boxEditSessions.delete(t),e&&this.transforms.endEdit?.(t)},gizmoOrigin:t=>this.gizmoOriginOf(t)};gizmoOriginOf(t){const e=this.projector.object(t);if(!e||typeof e.getGlobalPosition!="function")return null;const r=e.getGlobalPosition();return{x:r.x,y:r.y}}applyBoxEdit(t,e){const r=this.boxEditSessions.get(t);if(!r||Dt(e).some(o=>this.transforms.editability?.(t,o).writable===!1))return;const n=Bt(r,e);this.transforms.apply(t,n),!(e.x===void 0&&e.y===void 0&&e.originX===void 0&&e.originY===void 0&&e.width===void 0&&e.height===void 0)&&this.repositionBoxEditBounds(t,r,e,n)}repositionBoxEditBounds(t,e,r,n){const o=this.projector.object(t);if(!o)return;const s=this.gizmoOriginOf(t),a=this.projector.rect(t),{dx:l,dy:h}=Kt(s,a,e.rect,r),f=o.parent;if(f&&typeof f.toLocal=="function"){const d=f.toLocal({x:0,y:0}),c=f.toLocal({x:l,y:h});n.position[0]+=c.x-d.x,n.position[1]+=c.y-d.y}else n.position[0]+=l,n.position[1]+=h;this.transforms.apply(t,n)}spatialHandles={layers:t=>{const e=this.originOf(t);if(!e)return[];const r=this.target.transformEditability(t,"position"),n=!!this.target.writeOrigin&&r.writable;return[{id:`origin:${t}`,category:"origin",guides:[],handles:[{id:M,label:e.kind==="anchor"?"Sprite anchor":"Pivot",position:[e.world.x,e.world.y,0],color:Mt,writable:n,...n?{}:{reason:this.target.writeOrigin&&r.reason?r.reason:At}}]}]},preview:(t,e,r)=>{this.moveOrigin(t,e,r,"preview")},commit:(t,e,r)=>this.moveOrigin(t,e,r,"commit")};originEditId=null;originOf(t){const e=this.projector.object(t);if(!e||typeof e.updateLocalTransform!="function")return null;const r=z(e),n=r?"anchor":"pivot",o=r?{x:r.anchor.x,y:r.anchor.y}:{x:e.pivot.x,y:e.pivot.y},s=r?{x:0,y:0}:o,a=this.localToRootMatrix(e).apply({x:s.x,y:s.y});return{kind:n,value:o,world:{x:a.x,y:a.y}}}moveOrigin(t,e,r,n){if(e!==M)return;const o=this.originOf(t),s=this.projector.object(t),a=this.target.writeOrigin;if(!o||!s||!a||!this.target.transformEditability(t,"position").writable)return;this.originEditId!==t&&(this.target.beginTransformEdit(t),this.originEditId=t),s.updateLocalTransform();const l=this.localToRootMatrix(s).clone().invert().apply({x:r[0],y:r[1]}),h=o.kind==="anchor"?{x:0,y:0}:o.value,f={x:l.x-h.x,y:l.y-h.y},d=o.kind==="anchor"?_t(s):null;if(o.kind==="anchor"&&(!d||d.x===0||d.y===0))return;const c=d?[o.value.x+f.x/d.x,o.value.y+f.y/d.y]:[l.x,l.y],u=s.localTransform,p=this.a2d.getTransform(t);if(a(t,o.kind,c),p&&this.target.writeTransform(t,{...p,position:[p.position[0]+u.a*f.x+u.c*f.y,p.position[1]+u.b*f.x+u.d*f.y]}),this.notify(),n==="commit"){const y=this.target.endTransformEdit(t);return this.originEditId=null,y}}inspector={properties:t=>[...this.target.properties(t),{path:"locked",label:"Locked",type:"boolean",group:"Visibility"},{path:"grouped",label:"Grouped",type:"boolean",group:"Visibility"}],get:(t,e)=>e==="locked"?this.lockedPaths.has(this.pathKeyOf(t)):e==="grouped"?this.groupedPaths.has(this.pathKeyOf(t)):this.target.get(t,e),set:(t,e,r)=>{if(e==="locked"||e==="grouped"){const n=e==="locked"?this.lockedPaths:this.groupedPaths;r===!0?n.add(this.pathKeyOf(t)):n.delete(this.pathKeyOf(t)),Pt(this.editLockWorld,{locked:[...this.lockedPaths],grouped:[...this.groupedPaths]}),this.notify();return}return this.target.set(t,e,r)},remove:(t,e)=>this.target.remove?.(t,e)};pathKeyOf(t){const e=this.pathKeys.get(t);if(e!==void 0)return e;const r=a=>this.projector.object(a)?.label??"",n=[];let o=t;for(;o;){const a=this.projector.node(o);if(!a)break;const l=a.parentId?this.projector.node(a.parentId)?.childIds??[]:this.projector.roots().map(d=>d.id),h=r(o),f=l.filter(d=>r(d)===h).indexOf(o);n.unshift(`${h}#${Math.max(0,f)}`),o=a.parentId??null}const s=n.join("/");return this.pathKeys.set(t,s),s}groupOf(t){let e=t,r=t;for(;r;)this.groupedPaths.has(this.pathKeyOf(r))&&(e=r),r=this.projector.node(r)?.parentId??null;return e}isPickLocked(t){let e=t;for(;e;){if(this.lockedPaths.has(this.pathKeyOf(e)))return!0;e=this.projector.node(e)?.parentId??null}return!1}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}dispose(){this.boxEditSessions.clear(),this.pathKeys.clear();for(const t of this.watchedForStructure)t.off("childAdded",this.onStructureChanged),t.off("childRemoved",this.onStructureChanged);this.watchedForStructure=[],this.structureHistory.dispose(),this.target.dispose(),this.listeners.clear()}}const Jt=Object.freeze(Object.defineProperty({__proto__:null,PixiAuthoringAdapter:zt},Symbol.toStringTag,{value:"Module"}));export{zt as P,Et as a,It as b,qt as c,D as i,Qt as o,Jt as p,vt as r};
1
+ import{s as G}from"./index-Cpk7BVO4.js";import{O as x,gz as X,bm as k,bn as j,r as _}from"./index-DhfMfVJj.js";import{c as Y}from"./source-persistence-backend-CPBtrjhX.js";import{c as V}from"./component-instance-root-CNFI0IRp.js";import{J as Z}from"./json-history-resource-Cmiy217h.js";import{a as Q,b as q}from"./pixi-transform-channels-P4rvmusc.js";function b(i){const t=i.constructor?.name?.toLowerCase()??"container";return t.includes("animatedsprite")?"animatedsprite":t.includes("nineslice")?"nineslicesprite":t.includes("tiling")?"tilingsprite":t.includes("sprite")?"sprite":t.includes("text")?"text":t.includes("graphics")?"graphics":"container"}function J(i){const t=tt(i);if(t)return t;const e=it(i);if(e)return e;const r=rt(i);if(r)return r;const n=g(i);if(n)return n;const o=b(i),s=i.children?.length??0;return s>0?`${o} (${s})`:o}function tt(i){const t=i.label?.trim();if(t){if(N(t)&&t!==i.constructor?.name)return t;if(!$(t))return t}}function N(i){return i.length<=2&&i===i.toLowerCase()}const et=new Set(["container","displayobject","sprite","animatedsprite","nineslicesprite","tilingsprite","text","bitmaptext","htmltext","graphics","mesh"]);function $(i){return N(i)||i==="Object"||i==="Function"?!0:et.has(i.replace(/^_+/,"").toLowerCase())}function rt(i){const e=i.texture?.label?.trim();return!e||/^(_?texture)?(empty|white)$/i.test(e)?void 0:(e.split("/").pop()??e).replace(/\.[a-z0-9]+$/i,"")||void 0}function g(i){const t=i.constructor?.name;if(!(!t||$(t)))return t.replace(/^_+/,"")||void 0}function v(i){const t=i.replace(/^_+/,"");return t.length>0?t:void 0}function F(i){return"addChild"in i&&typeof i.addChild=="function"&&"children"in i}function it(i){const t={seen:new WeakSet,budget:nt};let e=i.parent;for(let r=0;r<8&&e&&typeof e=="object";r++){if(t.budget<=0)return;const n=O(e,i,t)??R(e,i,2,t);if(n)return n;e=e.parent}}const nt=2e3;function S(i){return i.budget<=0?!1:(i.budget-=1,!0)}function I(i){return/^_?[A-Za-z][A-Za-zA-Z0-9]*$/.test(i)?!ot.has(i.replace(/^_+/,"")):!1}const ot=new Set(["parent","children","transform","position","origin","scale","pivot","skew","anchor","worldTransform","localTransform","groupTransform","relativeGroupTransform","renderGroup","parentRenderGroup","parentRenderGroupIndex","parentRenderLayer","relativeRenderGroupDepth","renderPipeId","instructionSet","childrenToUpdate","childrenRenderablesToUpdate","effects","filters","mask","bounds","boundsArea","visualBounds","gpuData","texture","events","eventsCount","updateFlags"]);function O(i,t,e){if(e.seen.has(i))return;e.seen.add(i);const r=E(i,t,void 0,e);if(r)return r;for(const[n,o]of Object.entries(i)){if(!S(e))return;if(!I(n))continue;const s=H(i,n,o,t);if(s)return s;const a=E(o,t,n,e);if(a)return a}}function E(i,t,e,r){const n=dt(i);if(n)for(const[o,s]of n){if(!S(r))return;const a=st(i,s,at(o)??e,t,r);if(a)return a}}function st(i,t,e,r,n){if(e){const o=H(t&&typeof t=="object"?t:i,e,t,r);if(o)return o}else if(t&&typeof t=="object"&&t.view===r){const o=g(t);if(o)return o}if(t&&typeof t=="object"&&!F(t))return O(t,r,n)}function at(i){if(!(!i||/^\d+$/.test(i)))return I(i)||i.includes("-")?v(i)??i:void 0}function*ct(i){for(let t=0;t<i.length;t++)yield[String(t),i[t]]}function*lt(i){for(const[t,e]of i.entries())yield[String(t),e]}function*ut(i){let t=0;for(const e of i)yield[String(t),e],t+=1}function dt(i){if(!(!i||typeof i!="object")){if(Array.isArray(i))return ct(i);if(i instanceof Map)return lt(i);if(i instanceof Set)return ut(i);if(Object.getPrototypeOf(i)===Object.prototype)return Object.entries(i)}}function H(i,t,e,r){if(e===r){const n=v(t);return n&&n.toLowerCase()!=="view"?g(e)??n:g(e)??g(i)??n}if(e&&typeof e=="object"&&e.view===r)return g(e)??v(t)}function R(i,t,e,r){const n=O(i,t,r);if(n)return n;if(!(e<=0))for(const[o,s]of Object.entries(i)){if(!S(r))return;if(!I(o)||!s||typeof s!="object"||F(s))continue;const a=R(s,t,e-1,r);if(a)return a}}const ht={idFor:(i,t)=>`w2d:${t.join("/")}:${b(i)}:${i.label??""}`};class ft{constructor(t,e={}){this.root=t,e.overlay&&(this.overlay=e.overlay),this.identity=e.identity??ht,this.refresh()}byId=new Map;overlay={};dirty=!1;identity;names=new WeakMap;reindex(){this.byId.clear(),this.identity.beginWalk?.();let t=0,e=0;const r=(n,o)=>{const s=this.identity.idFor(n,o);n.__authId=s,this.byId.set(s,n),t++,b(n).includes("sprite")&&e++,n.children.forEach((a,l)=>{r(a,[...o,l])})};return this.root.children.forEach((n,o)=>{r(n,[o])}),{count:t,sprites:e}}refresh(){const t=this.reindex();for(const[e,r]of Object.entries(this.overlay))this.applyOverride(e,r);return t}roots(){return this.root.children.map(t=>this.toNode(t))}node(t){const e=this.byId.get(t);return e?this.toNode(e):null}displayObject(t){return this.byId.get(t)??null}nameOf(t){const e=this.names.get(t),r=t.parent??null,n=t.constructor,o=t.label??null,s=t.texture??null,a=t.children?.length??0;if(e&&e.parent===r&&e.type===n&&e.own===o&&e.texture===s&&e.childCount===a)return e;const l={label:J(t),kind:b(t),parent:r,type:n,own:o,texture:s,childCount:a};return this.names.set(t,l),l}toNode(t){const e=t,{label:r,kind:n}=this.nameOf(t);return{id:e.__authId??"",label:r,kind:n,parentId:t.parent?.__authId??null,childIds:t.children.map(o=>o.__authId??"")}}getTransform(t){const e=this.byId.get(t);return!e||!e.position||!e.scale?null:{position:[e.position.x,e.position.y],rotation:e.rotation,scale:[e.scale.x,e.scale.y]}}setTransform(t,e){const r=this.byId.get(t);if(!r)return;e.position&&r.position.set(e.position[0],e.position[1]),e.rotation!==void 0&&(r.rotation=e.rotation),e.scale&&r.scale.set(e.scale[0],e.scale[1]),this.overlay[t]??={};const n=this.overlay[t];e.position&&(n.position=e.position),e.rotation!==void 0&&(n.rotation=e.rotation),e.scale&&(n.scale=e.scale),this.dirty=!0}properties(t){const e=this.byId.get(t);if(!e)return[];const r=[{path:"label",label:"Name",type:"string",value:e.label??""},{path:"visible",label:"Visible",type:"boolean",value:e.visible},{path:"alpha",label:"Alpha",type:"number",value:e.alpha}];return"tint"in e&&r.push({path:"tint",label:"Tint",type:"color",value:e.tint}),r}set(t,e,r){const n=this.byId.get(t);n&&(n[e]=r,this.overlay[t]??={},e==="label"&&(this.overlay[t].label=r),e==="alpha"&&(this.overlay[t].alpha=r),e==="tint"&&(this.overlay[t].tint=r),e==="visible"&&(this.overlay[t].visible=r),this.dirty=!0)}applyOverride(t,e){const r=this.byId.get(t);r&&(e.label!==void 0&&(r.label=e.label),e.alpha!==void 0&&(r.alpha=e.alpha),e.position&&r.position.set(e.position[0],e.position[1]),e.rotation!==void 0&&(r.rotation=e.rotation),e.scale&&r.scale.set(e.scale[0],e.scale[1]),e.tint!==void 0&&"tint"in r&&(r.tint=e.tint),e.visible!==void 0&&(r.visible=e.visible))}applyOverlay(t){let e=0,r=0;for(const[n,o]of Object.entries(t)){if(!this.byId.has(n)){r++;continue}this.applyOverride(n,o),this.overlay[n]={...this.overlay[n],...o},e++}return{applied:e,orphaned:r}}isDirty(){return this.dirty}serializeOverlay(){return this.overlay}replaceOverlay(t){this.overlay=structuredClone(t);for(const[e,r]of Object.entries(this.overlay))this.applyOverride(e,r);this.dirty=!0}markClean(){this.dirty=!1}}const pt={count:0,sprites:0};class yt{constructor(t,e,r,n=o=>queueMicrotask(o)){this.root=t,this.index=e,this.mapping=r,this.scheduleWindowClose=n,this.refresh()}current={nodes:new Map,rootIds:[],stats:pt};projectionFresh=!1;refresh(){const t=this.index.refresh();return this.current=this.readProjection(t),this.openProjectionWindow(),t}project(){return this.projectionFresh?this.current:this.reproject()}reproject(){const t=this.index.reindex();return this.current=this.readProjection(t),this.openProjectionWindow(),this.current}invalidate(){this.projectionFresh=!1}openProjectionWindow(){this.projectionFresh||(this.projectionFresh=!0,this.scheduleWindowClose(()=>{this.projectionFresh=!1}))}projection(){return this.current}object(t){const e=this.current.nodes.get(t)?.object??null;return e===null||e.destroyed?null:e}node(t){const e=this.current.nodes.get(t);if(!e)return null;const r=this.index.node(t);return r?{...r,parentId:e.parentId,childIds:[...e.childIds]}:null}roots(){return this.current.rootIds.map(t=>this.node(t)).filter(t=>t!==null)}pick(t,e,r){return this.candidates(t,e,r)[0]??null}candidates(t,e,r){const n=this.pointFromClient(t,e);return n?(this.project(),this.hitIds(n,r)):[]}pointFromClient(t,e){const r=this.mapping?.surface()??null;if(!r)return null;const n=r.getBoundingClientRect();if(n.width<=0||n.height<=0)return null;const o=this.mapping?.pointFromClient?.(t,e,n)??null;if(this.mapping?.pointFromClient)return o;const s=Number(r.dataset?.volterStageWidth??n.width),a=Number(r.dataset?.volterStageHeight??n.height);return!(s>0)||!(a>0)?null:{x:(t-n.left)*(s/n.width),y:(e-n.top)*(a/n.height)}}hitIds(t,e){const r=[],n=[];this.collectHits(this.root,t,"visual",r),this.collectHits(this.root,t,"hitArea",n);const o=[],s=new Set;for(const a of[...r,...n]){const l=a.__authId;l&&!e(l)&&!s.has(l)&&(s.add(l),o.push(l))}return o}rect(t){const e=this.object(t);if(!e||typeof e.getBounds!="function")return null;const r=e.getBounds();return!(r.width>0)||!(r.height>0)?null:{x:r.x,y:r.y,width:r.width,height:r.height}}frame(t){const e=this.object(t);if(!e||typeof e.getLocalBounds!="function")return null;const r=e.getLocalBounds();if(!(r.width>0)||!(r.height>0))return null;const n=(o,s)=>{const a=e.toGlobal({x:o,y:s});return{x:a.x,y:a.y}};return{tl:n(r.x,r.y),tr:n(r.x+r.width,r.y),br:n(r.x+r.width,r.y+r.height),bl:n(r.x,r.y+r.height)}}contextRects(t){const e=this.node(t);if(!e)return{siblings:[]};const r=e.parentId?this.node(e.parentId)?.childIds??[]:this.current.rootIds,n=e.parentId?this.rect(e.parentId):null;return{...n?{parent:n}:{},siblings:r.filter(o=>o!==t).map(o=>this.rect(o)).filter(o=>o!==null)}}readProjection(t){const e=new Map,r=[],n=o=>{const s=this.index.displayObject(o.id);if(!s)return;const a={object:s,id:o.id,parentId:o.parentId,childIds:[...o.childIds]};e.set(o.id,a);for(const l of o.childIds){const h=this.index.node(l);h&&n(h)}};for(const o of this.index.roots())r.push(o.id),n(o);return{nodes:e,rootIds:r,stats:t}}collectHits(t,e,r,n){const o=t.children??[];for(let s=o.length-1;s>=0;s--){const a=o[s];if(!a.visible||!a.renderable)continue;a.updateLocalTransform();const l={x:0,y:0};a.localTransform.applyInverse(e,l),this.collectHits(a,l,r,n),this.contains(a,l,r)&&n.push(a)}}contains(t,e,r){if(!t.__authId)return!1;const n=t;return r==="hitArea"?n.hitArea?n.hitArea.contains(e.x,e.y):!1:typeof n.containsPoint=="function"?n.containsPoint(e):!1}}const T="pixi",gt="data-oid",mt="data-authoring-instance",bt="data-authoring-label",xt="data-authoring-component";function vt(i){if(!i||typeof i!="object")return;const t=i[gt];return typeof t=="string"&&t.length>0?t:void 0}function C(i,t){if(!i||typeof i!="object")return;const e=i[t];return typeof e=="string"&&e.length>0?e:void 0}function w(i){return C(i,mt)}function wt(i){return C(i,bt)}function St(i){return C(i,xt)}function D(i){const t=w(i);return t?w(i.parent)!==t:!1}function It(i){return D(i)?w(i):vt(i)}function Ot(i,t,e=0){return V(`${T}:${i}:${t}`,e)}function Tt(i,t){return`${T}:${i}:@${t.join(".")}`}function Qt(i,t){const e=`${T}:${i}:`;if(!t.startsWith(e))return null;const r=t.slice(e.length);if(r.startsWith("@"))return null;const n=r.indexOf("#"),o=n<0?r:r.slice(0,n);return o.length>0?o:null}function qt(i){let t=new Map;return{beginWalk:()=>{t=new Map},idFor:(e,r)=>{const n=It(e);if(n===void 0)return Tt(i,r);const o=t.get(n)??0;return t.set(n,o+1),Ot(i,n,o)}}}const P="#root";function Ct(i){if(!(!i.position||!i.scale||!i.pivot||!i.skew))return{x:i.position.x,y:i.position.y,rotation:i.rotation,scaleX:i.scale.x,scaleY:i.scale.y,pivotX:i.pivot.x,pivotY:i.pivot.y,skewX:i.skew.x,skewY:i.skew.y}}function kt(i,t){!i.position||!i.scale||!i.pivot||!i.skew||(i.position.set(t.x,t.y),i.scale.set(t.scaleX,t.scaleY),i.pivot.set(t.pivotX,t.pivotY),i.skew.set(t.skewX,t.skewY),i.rotation=t.rotation)}class jt{constructor(t,e,r,n){this.root=t,this.onRestored=n;const o=e.shell.projectHistory;this.resource=o?new Z({history:o,kind:"session-state",scope:"session",subject:{...r,id:`${r.id}/world-2d-structure`},displayName:"World 2D structure",capture:()=>this.capture(),conflictIdentity:s=>Object.fromEntries(Object.entries(s.placements).map(([a,l])=>[a,l.parent])),restore:async s=>{this.restore(s)}}):null}byUid=new Map;resource;track(t){return this.uidOf(t)}run(t,e){this.resource?.assertCanMutate();const r=this.capture(),n=e();return this.resource&&this.resource.record(t,r,this.capture()).catch(o=>{x.error(`[canvas] failed to journal "${t}" into project history — the structural edit is applied but has no history entry (it cannot be undone): ${o instanceof Error?o.message:String(o)}`,"authoring")}),n}dispose(){this.resource?.dispose(),this.byUid.clear()}uidOf(t){if(t===this.root)return P;const e=t,r=e.__volterStructUid;if(r&&this.byUid.get(r)===t)return r;const n=r??`s${crypto.randomUUID()}`;return e.__volterStructUid=n,this.byUid.set(n,t),n}capture(){const t={};for(const[e,r]of this.byUid){const n=r.parent??null,o=Ct(r);t[e]={parent:n?this.uidOf(n):null,index:n?n.children?.indexOf(r)??-1:-1,...o?{pose:o}:{}}}return{placements:t}}restore(t){const e=Object.entries(t.placements);for(const[r,n]of e){if(n.parent!==null)continue;const o=this.byUid.get(r);o?.parent?.removeChild(o)}for(const[r,n]of e.filter(([,o])=>o.parent!==null).sort((o,s)=>o[1].index-s[1].index)){const o=this.byUid.get(r);if(!o)continue;const s=n.parent===P?this.root:this.byUid.get(n.parent);if(!s||typeof s.addChildAt!="function")continue;const a=s.children.length-(o.parent===s?1:0);s.addChildAt(o,Math.max(0,Math.min(n.index,a))),n.pose&&kt(o,n.pose)}this.onRestored()}}const Et=[{kind:"container",label:"Container",description:"A general-purpose display object that holds children, and transforms and draws them together."},{kind:"sprite",label:"Sprite",extends:"container",description:"Draws one texture: an image, or a frame of a spritesheet."},{kind:"animatedSprite",label:"AnimatedSprite",extends:"sprite",description:"Plays a list of textures as frames at an animation speed."},{kind:"tilingSprite",label:"TilingSprite",extends:"container",description:"Repeats one texture across its width and height, scrollable by its tile position."},{kind:"nineSliceSprite",label:"NineSliceSprite",extends:"container",description:"Stretches a texture without stretching its corners: the nine-slice panel of a UI."},{kind:"text",label:"Text",extends:"container",description:"Draws a string with a text style (font, size, fill, wrapping)."},{kind:"bitmapText",label:"BitmapText",extends:"container",description:"Draws a string from a bitmap font: fast to change every frame."},{kind:"htmlText",label:"HTMLText",extends:"container",description:"Draws a string of HTML and CSS markup."},{kind:"graphics",label:"Graphics",extends:"container",description:"Draws vector shapes (rectangles, circles, paths) from its draw callback."},{kind:"meshPlane",label:"MeshPlane",extends:"container",description:"A textured grid of vertices that can be bent and deformed."},{kind:"perspectiveMesh",label:"PerspectiveMesh",extends:"meshPlane",description:"A texture drawn in perspective between four corner points."},{kind:"particleContainer",label:"ParticleContainer",extends:"container",description:"Draws many lightweight particles in one batch, added from code with addParticle."}],W="canvasEditLocks";function B(){return _().projectLocalState.read(W)??{}}function Pt(i,t){_().projectLocalState.write(W,{...B(),[i]:t})}const K=Et,L=/\.(png|jpe?g|webp|gif|svg)(\?.*)?$/i,Lt="a canvas structural edit would have to add, delete or move a construction statement in the world's own source, and this lane plans property writes only — an editor-created node has no construction site there at all",M="origin",Mt="#ff2d92",At="this world's write target has no origin write, so the pivot/anchor can be seen here but not dragged";function z(i){const t=i,e=t.anchor,r=t.texture;return e&&r?.orig?{anchor:e,texture:r}:null}function _t(i){const t=z(i);if(!t)return null;const e=i.bounds;return typeof e?.width=="number"&&typeof e.height=="number"?{x:e.width,y:e.height}:{x:t.texture.orig.width,y:t.texture.orig.height}}function Nt(i){return K.find(e=>e.kind===i)?.label??i}function A(i){return!!i&&typeof i.addParticle=="function"}function $t(i,t){switch(t){case"container":return new i.Container;case"sprite":{const e=new i.Sprite(i.Texture.WHITE);return e.setSize(64,64),e}case"text":return new i.Text({text:"Text",style:{fill:16777215,fontSize:24}});case"graphics":return new i.Graphics().rect(0,0,100,100).fill(16777215);case"animatedSprite":{const e=new i.AnimatedSprite([i.Texture.WHITE]);return e.setSize(64,64),e}case"tilingSprite":return new i.TilingSprite({texture:i.Texture.WHITE,width:100,height:100});case"nineSliceSprite":return new i.NineSliceSprite({texture:i.Texture.WHITE,width:100,height:100});case"bitmapText":return new i.BitmapText({text:"BitmapText",style:{fill:16777215,fontSize:24}});case"htmlText":return new i.HTMLText({text:"HTMLText",style:{fill:16777215,fontSize:24}});case"meshPlane":{const e=new i.MeshPlane({texture:i.Texture.WHITE});return e.setSize(100,100),e}case"perspectiveMesh":{const e=new i.PerspectiveMesh({texture:i.Texture.WHITE});return e.setSize(100,100),e}case"particleContainer":return new i.ParticleContainer;default:return null}}function U(i,t){const e=Ft(i,t);Ht(t,e);for(const r of t.children??[])e.addChild(U(i,r));return e}function Ft(i,t){if(t.constructor===i.Container)return new i.Container;if(t.constructor===i.Sprite){const e=t,r=new i.Sprite(e.texture);return r.anchor.set(e.anchor.x,e.anchor.y),r}if(t.constructor===i.Text){const e=t,r=new i.Text({text:e.text,style:e.style.clone()});return r.anchor.set(e.anchor.x,e.anchor.y),r}if(t.constructor===i.Graphics)return t.clone(!0);throw new Error(`"${t.label??t.constructor?.name??"this node"}" cannot be duplicated: a ${t.constructor?.name??"custom"} is constructed by the game's own code, and copying only its display half would put a lookalike with no behaviour into the world.`)}function Ht(i,t){t.label=i.label,t.position.set(i.position.x,i.position.y),t.scale.set(i.scale.x,i.scale.y),t.pivot.set(i.pivot.x,i.pivot.y),t.skew.set(i.skew.x,i.skew.y),t.rotation=i.rotation,t.alpha=i.alpha,t.visible=i.visible,"tint"in i&&"tint"in t&&(t.tint=i.tint)}function Rt(i,t){const e=i.parentLinear;if(!e)return t;const r=e.a*e.d-e.b*e.c;if(Math.abs(r)<1e-9)return t;const[,,n,o]=i.transform.rotation,s=2*Math.atan2(n,o),a=e.a*Math.cos(s)+e.c*Math.sin(s),l=e.b*Math.cos(s)+e.d*Math.sin(s),h=t*Math.PI/180,f=a*Math.cos(h)-l*Math.sin(h),d=a*Math.sin(h)+l*Math.cos(h),c=(e.d*f-e.c*d)/r,u=(-e.b*f+e.a*d)/r,p=r<0?-h:h,y=Math.atan2(u,c)-s-p,m=Math.atan2(Math.sin(y),Math.cos(y));return(p+m)*180/Math.PI}function Dt(i){const t=new Set;return(i.x!==void 0||i.y!==void 0||i.originX!==void 0||i.originY!==void 0)&&t.add("position"),(i.width!==void 0||i.height!==void 0||i.scaleXFactor!==void 0||i.scaleYFactor!==void 0)&&(t.add("scale"),(i.width!==void 0||i.height!==void 0)&&t.add("position")),i.rotate!==void 0&&t.add("rotation"),[...t]}function Wt(i,t){const e=t*Math.PI/180/2,r=Math.sin(e),n=Math.cos(e),[o,s,a,l]=i.rotation;return[o*n+s*r,s*n-o*r,a*n+l*r,l*n-a*r]}function Bt(i,t){const e={position:[...i.transform.position],rotation:[...i.transform.rotation],scale:[...i.transform.scale]},r=t.rotate;if(r!==void 0){let d=Rt(i,r);const c=t.rotationStep;if(c!==void 0&&c>0){const[,,u,p]=i.transform.rotation,y=2*Math.atan2(u,p)*180/Math.PI,m=t.rotationOffset??0;d=Math.round((y+d-m)/c)*c+m-y}e.rotation=Wt(i.transform,d)}const n=t.width;n!==void 0&&i.rect.width>0&&(e.scale[0]=i.transform.scale[0]*Math.max(1e-4,n/i.rect.width));const o=t.height;o!==void 0&&i.rect.height>0&&(e.scale[1]=i.transform.scale[1]*Math.max(1e-4,o/i.rect.height));const s=t.scaleStep,a=d=>s!==void 0&&s>0?Math.round(d/s)*s:d,l=d=>Math.abs(d)>=1e-4?d:d<0?-1e-4:1e-4,h=t.scaleXFactor;h!==void 0&&(e.scale[0]=l(a(i.transform.scale[0]*h)));const f=t.scaleYFactor;return f!==void 0&&(e.scale[1]=l(a(i.transform.scale[1]*f))),e}function Kt(i,t,e,r){return r.originX!==void 0||r.originY!==void 0?{dx:r.originX!==void 0&&i?r.originX-i.x:0,dy:r.originY!==void 0&&i?r.originY-i.y:0}:{dx:t?(r.x??e.x)-t.x:0,dy:t?(r.y??e.y)-t.y:0}}class zt{constructor(t,e,r){this.root=t,this.store=e,this.target=r.target,this.pixi=r.pixi??G,this.transforms={dimensions:()=>"2d",get:c=>{const u=this.a2d.getTransform(c);return u?q(u):{position:[0,0,0],rotation:[0,0,0,1],scale:[1,1,1]}},editability:(c,u)=>this.target.transformEditability(c,u),beginEdit:c=>this.target.beginTransformEdit(c),apply:(c,u)=>{this.target.writeTransform(c,Q(u)),this.notify()},endEdit:c=>this.target.endTransformEdit(c),...this.target.removeTransform?{remove:(c,u)=>this.target.removeTransform?.(c,u)}:{}},this.loadTexture=r.loadTexture??(c=>this.pixi.Assets.load(c)),this.capturePreview=r.capturePreview,this.structureHistory=new jt(t,e,r.journal,()=>this.afterStructuralChange()),this.a2d=new ft(t,{...r.identity?{identity:r.identity}:{}}),this.projector=new yt(t,this.a2d,{surface:r.surface??(()=>null),...r.pointFromClient?{pointFromClient:r.pointFromClient}:{}}),this.provenance=this.target.provenance,r.surface&&(this.pickable={pick:(c,u)=>{const p=this.projector.pick(c,u,y=>this.isPickLocked(y));return p&&this.groupOf(p)},candidates:(c,u,p)=>this.projector.candidates(c,u,y=>p?.includeLocked?!1:this.isPickLocked(y))},this.rects={rect:c=>this.projector.rect(c),frame:c=>this.projector.frame(c),contextRects:c=>this.projector.contextRects(c)}),r.stories&&(this.stories=r.stories),this.watchStructure(t),this.capabilities={transform:!0,inspectorFields:!0,persist:this.target.provenance.source==="source-code"&&this.target.persistence!==void 0},this.target.bind({a2d:this.a2d,store:e,journal:r.journal,notify:()=>this.notify()}),this.editLockWorld=r.journal.id;const o=B()[this.editLockWorld];this.lockedPaths=new Set(o?.locked??[]),this.groupedPaths=new Set(o?.grouped??[]);const s=this.target.structure??this.liveStructure,a=c=>!!c&&A(this.projector.object(c)),l="a ParticleContainer holds particles added with addParticle, not display objects.";this.structure={...s,create:(c,u,p)=>a(u)?{id:"",ack:this.refuseStructure(l)}:s.create(c,u,p?this.pointInParent(u??null,p):void 0),...s.reparent?{reparent:(c,u)=>a(u)?this.refuseStructure(l):s.reparent(c,u)}:{},...s.paste?{paste:c=>a(c)?this.refuseStructure(l):s.paste(c)}:{},...s.canPaste?{canPaste:c=>!a(c)&&s.canPaste(c)}:{},...s.creatableKinds?{creatableKinds:c=>a(c)?[]:s.creatableKinds(c)}:{}},this.assetDrop=this.target.assetDrop??{accepts:(c,u)=>L.test(u)&&this.containerFor(c||null)!==null,drop:(c,u,p)=>this.dropAsset(c,u,p)};const h=this.target.persistence;h&&(this.persistence=h);const f=this.target.truth?.bind(this.target);f&&(this.truth={resolve:(c,u)=>f(c,u)},this.related=Y(c=>f(c,"position").site)),!r.stories&&this.target.componentIdentity&&(this.stories=X("canvas",e.shell,c=>this.target.componentIdentity?.(c)??null));const d=this.target.instances?.();d&&(this.instances={describe:c=>d.describe(c),...d.openComponent?{openComponent:c=>d.openComponent?.(c)}:{},revert:(c,u)=>d.revert(c,u),applyToComponent:(c,u)=>d.applyToComponent(c,u)})}capabilities;provenance;pickable;rects;persistence;truth;related;structure;stories;instances;transforms;a2d;projector;target;pixi;structureHistory;loadTexture;capturePreview;listeners=new Set;boxEditSessions=new Map;lockedPaths=new Set;groupedPaths=new Set;editLockWorld;pathKeys=new Map;refresh(){return this.projector.refresh()}previewImage(t,e,r){const n=this.projector.object(t);return n&&this.capturePreview?this.capturePreview(n,{width:e,height:r}):Promise.resolve(null)}notify(){for(const t of this.listeners)t()}watchedForStructure=[];structureNotifyQueued=!1;onStructureChanged=()=>{this.projector.invalidate(),!this.structureNotifyQueued&&(this.structureNotifyQueued=!0,queueMicrotask(()=>{this.structureNotifyQueued=!1,this.projector.reproject(),this.pathKeys.clear(),this.watchStructure(this.root),this.target.onReindex(),this.notify(),this.store.shell.notifyIngestEdit()}))};watchStructure(t){for(const r of this.watchedForStructure)r.off("childAdded",this.onStructureChanged),r.off("childRemoved",this.onStructureChanged);this.watchedForStructure=[];const e=r=>{typeof r.on=="function"&&typeof r.off=="function"&&(r.on("childAdded",this.onStructureChanged),r.on("childRemoved",this.onStructureChanged),this.watchedForStructure.push(r));for(const n of r.children??[])e(n)};e(t)}hierarchy={roots:()=>(this.projector.project(),this.projector.roots().map(t=>this.toEditorNode(t.id)).filter(t=>t!==null)),node:t=>this.toEditorNode(t)};toEditorNode(t){const e=this.projector.node(t);if(!e)return null;const r=this.projector.object(t),n=r?D(r):!1,o=n?St(r):void 0;return{id:e.id,label:(n&&r?wt(r):void 0)??e.label,role:n?"component":"entity",kind:e.kind,...o?{typeLabel:o}:{},parentId:e.parentId,childIds:e.childIds}}selection={get:()=>[...this.store.shell.selectedEntityIds],set:t=>{this.store.shell.selectMultiple(t),this.notify()}};liveStructure={create:(t,e,r)=>this.createStructuralNode(t,e??null,r),remove:t=>this.removeStructuralNodes([t]),removeMany:t=>this.removeStructuralNodes(t),duplicate:t=>this.duplicateStructuralNode(t),reparent:(t,e)=>this.reparentStructuralNode(t,e),reorder:(t,e)=>this.reorderStructuralNode(t,e),creatableKinds:()=>K.map(t=>({...t}))};containerFor(t){if(!t)return this.root;const e=this.projector.object(t);return!e||typeof e.addChild!="function"||A(e)?null:e}refuseStructure(t){return k({resolve:()=>j(t),record:()=>{},report:e=>x.warn(`[canvas] structural edit refused — ${e}`,"authoring")})}reportStructureLiveOnly(t){return k({resolve:()=>j(Lt),record:()=>{},report:e=>{if(this.target.reportStructureLiveOnly){this.target.reportStructureLiveOnly(t,e);return}x.log(`[canvas] ${t} is live-only — ${e}.`,"authoring")}})}afterStructuralChange(){this.projector.reproject(),this.pathKeys.clear(),this.watchStructure(this.root),this.target.onReindex(),this.notify(),this.store.shell.notifyIngestEdit()}idOf(t){return t.__authId??""}pointInParent(t,e){const r=this.containerFor(t);if(!r||typeof r.updateLocalTransform!="function")return;const n=this.localToRootMatrix(r).clone().invert().apply({x:e.x,y:e.y});return{x:n.x,y:n.y}}createStructuralNode(t,e,r){const n=this.containerFor(e);if(!n)return{id:"",ack:this.refuseStructure(`no node with id "${e}" can hold children.`)};const o=$t(this.pixi,t);if(!o)return{id:"",ack:this.refuseStructure(`"${t}" is not a kind this canvas surface can construct.`)};o.label=Nt(t),r&&o.position.set(r.x,r.y);const s=`Create ${o.label}`;return this.structureHistory.track(n),this.structureHistory.track(o),this.structureHistory.run(s,()=>{n.addChild(o)}),this.afterStructuralChange(),{id:this.idOf(o),ack:this.reportStructureLiveOnly(s)}}removeStructuralNodes(t){const e=[];let r=null;for(const o of t){const s=this.projector.object(o);if(!s?.parent){r=this.refuseStructure(`"${o}" is not a removable node in this tree.`);continue}e.push(s)}if(e.length===0)return r??this.refuseStructure("the selection held no removable node.");const n=e.length===1?`Delete ${e[0].label??"node"}`:`Delete ${e.length} nodes`;for(const o of e)this.structureHistory.track(o),o.parent&&this.structureHistory.track(o.parent);return this.structureHistory.run(n,()=>{for(const o of e)o.parent?.removeChild(o)}),this.afterStructuralChange(),this.reportStructureLiveOnly(n)}duplicateStructuralNode(t){const e=this.projector.object(t),r=e?.parent??null;if(!e||!r)throw new Error(`"${t}" is not a duplicable node in this tree.`);const n=U(this.pixi,e);n.label=`${e.label||"node"} copy`;const o=`Duplicate ${e.label??"node"}`,s=r.children.indexOf(e);return this.structureHistory.track(r),this.structureHistory.track(n),this.structureHistory.run(o,()=>{r.addChildAt(n,s+1)}),this.afterStructuralChange(),{id:this.idOf(n),ack:this.reportStructureLiveOnly(o)}}reparentStructuralNode(t,e){const r=this.projector.object(t);if(!r)return this.refuseStructure(`"${t}" is not a node in this tree.`);const n=this.containerFor(e);if(!n)return this.refuseStructure(`no node with id "${e}" can hold children.`);if(n===r||this.isAncestorOf(r,n))return this.refuseStructure("a node cannot be reparented into itself or its own descendant.");const o=this.localToRootMatrix(r),s=this.localToRootMatrix(n),a=`Move ${r.label??"node"}`;return this.structureHistory.track(r),r.parent&&this.structureHistory.track(r.parent),this.structureHistory.track(n),this.structureHistory.run(a,()=>{n.addChild(r),r.setFromMatrix(s.clone().invert().append(o))}),this.afterStructuralChange(),this.reportStructureLiveOnly(a)}reorderStructuralNode(t,e){const r=this.projector.object(t),n=r?.parent??null;if(!r||!n)return this.refuseStructure(`"${t}" is not a reorderable node in this tree.`);const o=e?this.projector.object(e):null;if(e&&(!o||o.parent!==n))return this.refuseStructure(`"${e}" is not a sibling of "${t}".`);const s=`Reorder ${r.label??"node"}`;return this.structureHistory.track(n),this.structureHistory.track(r),this.structureHistory.run(s,()=>{const a=n.children.indexOf(r),l=o?n.children.indexOf(o):n.children.length;n.addChildAt(r,Math.max(0,a<l?l-1:l))}),this.afterStructuralChange(),this.reportStructureLiveOnly(s)}isAncestorOf(t,e){let r=e.parent;for(;r;){if(r===t)return!0;r=r.parent}return!1}localToRootMatrix(t){const e=[];let r=t;for(;r&&r!==this.root;)e.push(r),r=r.parent;const n=new this.pixi.Matrix;for(let o=e.length-1;o>=0;o--){const s=e[o];s.updateLocalTransform(),n.append(s.localTransform)}return n}assetDrop;async dropAsset(t,e,r){if(!L.test(e))return this.refuseStructure(`${e} is not an image. A canvas world mounts an image as a Sprite; a model or an audio file has no display object to become here.`);const n=this.containerFor(t||null);if(!n)return this.refuseStructure(`no node with id "${t}" can hold a dropped asset.`);let o;try{o=await this.loadTexture(e)}catch(h){return this.refuseStructure(`${e} could not be loaded as a texture: ${h instanceof Error?h.message:String(h)}`)}const s=new this.pixi.Sprite(o);s.anchor.set(.5,.5),s.label=e.split("/").pop()??"Sprite";const a=r?.position;if(a){const h=this.localToRootMatrix(n).clone().invert().apply({x:a[0],y:a[1]});s.position.set(h.x,h.y)}const l=`Add ${s.label}`;return this.structureHistory.track(n),this.structureHistory.track(s),this.structureHistory.run(l,()=>{n.addChild(s)}),this.afterStructuralChange(),this.reportStructureLiveOnly(l)}boxEdit={begin:t=>{const e=this.projector.rect(t);if(!e){this.boxEditSessions.delete(t);return}const r=this.projector.object(t)?.parent?.worldTransform;this.boxEditSessions.set(t,{id:t,rect:e,transform:this.transforms.get(t),...r?{parentLinear:{a:r.a,b:r.b,c:r.c,d:r.d}}:{}}),this.transforms.beginEdit?.(t)},apply:(t,e)=>this.applyBoxEdit(t,e),end:t=>{const e=this.boxEditSessions.get(t);this.boxEditSessions.delete(t),e&&this.transforms.endEdit?.(t)},gizmoOrigin:t=>this.gizmoOriginOf(t)};gizmoOriginOf(t){const e=this.projector.object(t);if(!e||typeof e.getGlobalPosition!="function")return null;const r=e.getGlobalPosition();return{x:r.x,y:r.y}}applyBoxEdit(t,e){const r=this.boxEditSessions.get(t);if(!r||Dt(e).some(o=>this.transforms.editability?.(t,o).writable===!1))return;const n=Bt(r,e);this.transforms.apply(t,n),!(e.x===void 0&&e.y===void 0&&e.originX===void 0&&e.originY===void 0&&e.width===void 0&&e.height===void 0)&&this.repositionBoxEditBounds(t,r,e,n)}repositionBoxEditBounds(t,e,r,n){const o=this.projector.object(t);if(!o)return;const s=this.gizmoOriginOf(t),a=this.projector.rect(t),{dx:l,dy:h}=Kt(s,a,e.rect,r),f=o.parent;if(f&&typeof f.toLocal=="function"){const d=f.toLocal({x:0,y:0}),c=f.toLocal({x:l,y:h});n.position[0]+=c.x-d.x,n.position[1]+=c.y-d.y}else n.position[0]+=l,n.position[1]+=h;this.transforms.apply(t,n)}spatialHandles={layers:t=>{const e=this.originOf(t);if(!e)return[];const r=this.target.transformEditability(t,"position"),n=!!this.target.writeOrigin&&r.writable;return[{id:`origin:${t}`,category:"origin",guides:[],handles:[{id:M,label:e.kind==="anchor"?"Sprite anchor":"Pivot",position:[e.world.x,e.world.y,0],color:Mt,writable:n,...n?{}:{reason:this.target.writeOrigin&&r.reason?r.reason:At}}]}]},preview:(t,e,r)=>{this.moveOrigin(t,e,r,"preview")},commit:(t,e,r)=>this.moveOrigin(t,e,r,"commit")};originEditId=null;originOf(t){const e=this.projector.object(t);if(!e||typeof e.updateLocalTransform!="function")return null;const r=z(e),n=r?"anchor":"pivot",o=r?{x:r.anchor.x,y:r.anchor.y}:{x:e.pivot.x,y:e.pivot.y},s=r?{x:0,y:0}:o,a=this.localToRootMatrix(e).apply({x:s.x,y:s.y});return{kind:n,value:o,world:{x:a.x,y:a.y}}}moveOrigin(t,e,r,n){if(e!==M)return;const o=this.originOf(t),s=this.projector.object(t),a=this.target.writeOrigin;if(!o||!s||!a||!this.target.transformEditability(t,"position").writable)return;this.originEditId!==t&&(this.target.beginTransformEdit(t),this.originEditId=t),s.updateLocalTransform();const l=this.localToRootMatrix(s).clone().invert().apply({x:r[0],y:r[1]}),h=o.kind==="anchor"?{x:0,y:0}:o.value,f={x:l.x-h.x,y:l.y-h.y},d=o.kind==="anchor"?_t(s):null;if(o.kind==="anchor"&&(!d||d.x===0||d.y===0))return;const c=d?[o.value.x+f.x/d.x,o.value.y+f.y/d.y]:[l.x,l.y],u=s.localTransform,p=this.a2d.getTransform(t);if(a(t,o.kind,c),p&&this.target.writeTransform(t,{...p,position:[p.position[0]+u.a*f.x+u.c*f.y,p.position[1]+u.b*f.x+u.d*f.y]}),this.notify(),n==="commit"){const y=this.target.endTransformEdit(t);return this.originEditId=null,y}}inspector={properties:t=>[...this.target.properties(t),{path:"locked",label:"Locked",type:"boolean",group:"Visibility"},{path:"grouped",label:"Grouped",type:"boolean",group:"Visibility"}],get:(t,e)=>e==="locked"?this.lockedPaths.has(this.pathKeyOf(t)):e==="grouped"?this.groupedPaths.has(this.pathKeyOf(t)):this.target.get(t,e),set:(t,e,r)=>{if(e==="locked"||e==="grouped"){const n=e==="locked"?this.lockedPaths:this.groupedPaths;r===!0?n.add(this.pathKeyOf(t)):n.delete(this.pathKeyOf(t)),Pt(this.editLockWorld,{locked:[...this.lockedPaths],grouped:[...this.groupedPaths]}),this.notify();return}return this.target.set(t,e,r)},remove:(t,e)=>this.target.remove?.(t,e)};pathKeyOf(t){const e=this.pathKeys.get(t);if(e!==void 0)return e;const r=a=>this.projector.object(a)?.label??"",n=[];let o=t;for(;o;){const a=this.projector.node(o);if(!a)break;const l=a.parentId?this.projector.node(a.parentId)?.childIds??[]:this.projector.roots().map(d=>d.id),h=r(o),f=l.filter(d=>r(d)===h).indexOf(o);n.unshift(`${h}#${Math.max(0,f)}`),o=a.parentId??null}const s=n.join("/");return this.pathKeys.set(t,s),s}groupOf(t){let e=t,r=t;for(;r;)this.groupedPaths.has(this.pathKeyOf(r))&&(e=r),r=this.projector.node(r)?.parentId??null;return e}isPickLocked(t){let e=t;for(;e;){if(this.lockedPaths.has(this.pathKeyOf(e)))return!0;e=this.projector.node(e)?.parentId??null}return!1}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}dispose(){this.boxEditSessions.clear(),this.pathKeys.clear();for(const t of this.watchedForStructure)t.off("childAdded",this.onStructureChanged),t.off("childRemoved",this.onStructureChanged);this.watchedForStructure=[],this.structureHistory.dispose(),this.target.dispose(),this.listeners.clear()}}const Jt=Object.freeze(Object.defineProperty({__proto__:null,PixiAuthoringAdapter:zt},Symbol.toStringTag,{value:"Module"}));export{zt as P,Et as a,It as b,qt as c,D as i,Qt as o,Jt as p,vt as r};
@@ -1 +1 @@
1
- import{O as N,bm as Q,bn as X,q as L,as as Z,bo as ee,bk as te,bl as ne}from"./index-iW3HFEJB.js";import{J as re,c as _}from"./json-history-resource-82d2z68R.js";import{m as ie,p as se}from"./source-persistence-backend-I5wxqQgh.js";import{t as oe}from"./pixi-transform-channels-P4rvmusc.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"./ingest-source-persistence-2MRBPgo0.js";function $(u){if(!u||typeof u!="object")return;const c=u;return typeof c.x=="number"&&typeof c.y=="number"?[c.x,c.y]:void 0}function F(u,c,l){const o=u;!l||!$(o[c])||(o[c]={x:l[0],y:l[1]})}function ae(u){return`#${(u&16777215).toString(16).padStart(6,"0")}`}function le(u){return Number.parseInt(u.replace("#",""),16)}const ce=["position","rotation","scale"];function $e(u){const{physics:c}=u,l=u.persistence??null;let o,p=()=>{},h=null,S,T,w=!1,x=!1;const m=()=>{const t={},n=e=>{const r=o.node(e),i=o.displayObject(e);if(!r||!i)return;let s=null;try{s=o.getTransform(e)}catch{}const a=$(i.pivot),d=$(i.anchor);t[e]={label:i.label??"",alpha:i.alpha,visible:i.visible,..."tint"in i?{tint:i.tint}:{},...s?{transform:s}:{},...a?{pivot:a}:{},...d?{anchor:d}:{}};for(const f of r.childIds)n(f)};for(const e of o.roots())n(e.id);return{overlay:structuredClone(o.serializeOverlay()),nodes:t}},W=t=>{for(const[n,e]of Object.entries(t.nodes)){const r=o.displayObject(n);r&&(r.label=e.label,r.alpha=e.alpha,r.visible=e.visible,e.tint!==void 0&&"tint"in r&&(r.tint=e.tint),F(r,"pivot",e.pivot),F(r,"anchor",e.anchor),e.transform&&o.setTransform(n,e.transform))}o.replaceOverlay(t.overlay),p()},v=(t,n)=>{h&&n&&h.record(t,n,m()).catch(e=>{N.error(`[canvas] failed to journal "${t}" into project history — the edit is applied but has no history entry (it cannot be undone): ${e instanceof Error?e.message:String(e)}`,"authoring")})},A=(t,n,e)=>{const r=o.displayObject(t);r&&(n==="name"?o.set(t,"label",e):n==="tint"?o.set(t,"tint",le(e)):n==="visible"?o.set(t,"visible",e):n==="alpha"?o.set(t,"alpha",e):r[n]=e,p())},P=(t,n)=>{const e=o.displayObject(t);if(e)return n==="name"?e.label:n==="tint"?ae(e.tint??16777215):e[n]},b=(t,n)=>{const e=o.getTransform(t);return n==="position"?e?[...e.position]:void 0:n==="rotation"?e?e.rotation:void 0:n==="scale"?e?[...e.scale]:void 0:P(t,n)},I=(t,n,e)=>{if(n==="position"&&Array.isArray(e))o.setTransform(t,{position:[e[0]??0,e[1]??0]});else if(n==="rotation"&&typeof e=="number")o.setTransform(t,{rotation:e});else if(n==="scale"&&Array.isArray(e))o.setTransform(t,{scale:[e[0]??1,e[1]??1]});else{A(t,n,e);return}p()},y=(t,n)=>{const e=te(o.displayObject(t)??null);return{entityId:t,property:n,surface:"pixi",anchor:e,anchorKind:e.anchored?"construction-literal":"live-only",instances:e.anchored&&e.kind==="source"?ne(e):0}},g=t=>o.node(t)?.label??"2D Object",K=(t,n,e,r,i,s)=>{if(l){if(r===null||i===void 0||s===void 0){v(n,e);return}return se({backend:l,subject:()=>y(t,r),baseline:i,next:s,label:n,journal:()=>v(n,e)})}},R=t=>{const n=[{path:"name",label:"Name",type:"string"},{path:"visible",label:"Visible",type:"boolean"},{path:"alpha",label:"Alpha",type:"number"}],e=o.displayObject(t);return e&&"tint"in e&&n.push({path:"tint",label:"Tint",type:"color"}),n},O=new Map,E=new Map,j=t=>t.anchored&&t.kind==="source"?`${t.file}:${t.line}:${t.col}`:null,M=t=>[{path:"position",label:"Position"},{path:"rotation",label:"Rotation"},{path:"scale",label:"Scale"},...R(t).map(n=>({path:n.path,label:n.label}))],k=(t,n,e,r)=>{const i=E.get(n);if(i)return i;const s=l?.readSiteLiterals,a=M(t).map(f=>({property:f.path,live:b(t,f.path)})).filter(f=>f.live!==void 0);if(!s||a.length===0)return Promise.resolve({});const d=s({anchor:e,instances:r,writeScope:"creation-site",surface:"pixi",properties:a}).then(f=>(O.set(n,f),p(),f));return E.set(n,d),d},q=(t,n,e,r)=>{const i=O.get(n);return i||(k(t,n,e,r),null)},z=1e-6,H=(t,n)=>Array.isArray(t)&&Array.isArray(n)?t.length===n.length&&t.every((e,r)=>H(e,n[r])):typeof t=="number"&&typeof n=="number"?Math.abs(t-n)<=z:t===n,C=t=>o.displayObject(t)?.constructor?.name||(o.node(t)?.kind??"2D Object"),J=t=>`${t} ${t===1?"instance":"instances"}`,B=(t,n,e,r)=>{const i=b(t,n.path);if(!e||e.literal===null||i===void 0||H(e.literal,i))return null;const s=l?.gate({...r,property:n.path,writeScope:"creation-site"}),a=e.writable?s?.ok?void 0:s?.reason:e.reason;return{path:n.path,label:n.label,value:i,...e.text?{defaultText:e.text}:{},canApplyToComponent:a===void 0,...a===void 0?{}:{applyUnavailableReason:a},affectedInstanceCount:r.instances}},Y=(t,n,e,r)=>{if(!l||!e||e.literal===null||r===void 0)return{ok:!1,message:e?.reason??`The construction site names no ${n} for this object, so there is no default to change.`};if(!e.writable)return{ok:!1,message:e.reason??`The construction site's ${n} cannot be rewritten.`};const i=l.gate({...t,writeScope:"creation-site"});return i.ok?{ok:!0,backend:l,baseline:e.literal,next:r}:{ok:!1,message:i.reason}},D=async t=>{const n=y(t,"position"),e=j(n.anchor);return e?O.get(e)??await k(t,e,n.anchor,n.instances):null},U={describe:t=>{const n=y(t,"position"),e=j(n.anchor);if(!e||!o.displayObject(t))return null;const r=q(t,e,n.anchor,n.instances);if(!r||Object.keys(r).length===0)return null;const i=M(t).map(s=>B(t,s,r[s.path],n)).filter(s=>s!==null);return{componentName:C(t),...n.anchor.anchored?{sourcePath:n.anchor.display}:{},overrides:i}},revert:async(t,n)=>{const e=await D(t);if(!e)return;const r=m(),i=[];for(const s of n){const a=e[s]?.literal;a!=null&&(I(t,s,a),i.push(s))}if(i.length!==0)return v(i.length===1?`Revert ${g(t)} ${i[0]}`:`Revert ${i.length} ${g(t)} overrides`,r),p(),ee},applyToComponent:async(t,n)=>{const e={...y(t,n),writeScope:"creation-site"},r=j(e.anchor),i=(await D(t))?.[n],s=b(t,n),a=Y(e,n,i,s);if(!a.ok)return{changed:!1,message:a.message};const d=`Apply ${n} to ${C(t)} default (${J(e.instances)})`;return await a.backend.write({...e,baseline:a.baseline,next:a.next,label:d})?(r&&O.delete(r),p(),{changed:!0,message:`${n} now reads ${JSON.stringify(s)} for all ${J(e.instances)} at ${e.anchor.anchored?e.anchor.display:"its creation site"}.`,write:{destination:e.anchor.anchored?e.anchor.display:"creation site",persisted:!0}}):{changed:!1,message:`${d} did not land — the editor console names why.`}}};return{provenance:l?{source:"foreign",label:"creation-site",detail:"Live 2D (PixiJS) tree projected directly — an edit is written into the game’s own source at the line that constructed the object, and says why whenever it cannot be."}:{source:"foreign",label:"live-only",detail:"Live 2D (PixiJS) tree projected directly — edits apply for this session only and are never saved."},get persistence(){const t=l;return t?{..._(),get destination(){return t.destination()}}:{..._(),destination:Z}},truth:(t,n)=>{const e=y(t,n);if(e.anchorKind==="live-only")return{site:e.anchor,writeAnchorKind:"live-only"};const r=j(e.anchor);if(!r)return{site:e.anchor,writeAnchorKind:"live-only"};const i=O.get(r);if(!i)return k(t,r,e.anchor,e.instances),{site:e.anchor,writeAnchorKind:void 0};const s=i[n];return{site:e.anchor,writeAnchorKind:s?.writable?"construction-literal":"live-only"}},componentIdentity:t=>o.displayObject(t)?{name:C(t)}:null,...l?.readSiteLiterals?{instances:()=>U}:{},writeOrigin(t,n,e){h?.assertCanMutate();const r=o.displayObject(t);!r||!$(r[n])||(r[n]={x:e[0],y:e[1]},w=!0,p())},bind(t){o=t.a2d,p=t.notify;const n=t.store.shell.projectHistory;h=n?new re({history:n,kind:"session-state",scope:"session",subject:{...t.journal,id:`${t.journal.id}/world-2d-edits`},displayName:"World 2D edits",capture:m,conflictIdentity:e=>e.overlay,restore:async e=>{W(e)}}):null,l?.attach({read:b,apply:I})},onReindex(){},transformEditability(t,n){if(!l)return{writable:!0};const e=y(t,n),r=e.anchorKind!=="live-only"&&l.removal?.available(e)?{removable:!0}:{};return{writable:!0,reason:l.describe(e),...r}},beginTransformEdit(t){h?.assertCanMutate();const n=o.displayObject(t);n&&L(c,n)==="physics"&&c.freeze(n),S=m(),T=l?o.getTransform(t)??void 0:void 0,w=!1},writeTransform(t,n){h?.assertCanMutate();const e=o.displayObject(t);e&&L(c,e)==="physics"&&c.commit(e,n.position,n.rotation),o.setTransform(t,n),p()},endTransformEdit(t){const n=o.displayObject(t);n&&L(c,n)==="physics"&&c.unfreeze(n);const e=`Transform ${g(t)}`,r=S,i=T,s=w;if(S=void 0,T=void 0,w=!1,!l){v(e,r);return}const a=o.getTransform(t)??void 0,d=s?["origin"]:[];i&&a&&d.push(...ce.filter(G=>oe(G,i,a))),d.length>1&&l.report(e,ie(d));const f=d.length===1&&d[0]!=="origin"?d[0]:null;return K(t,e,r,f,f?V(i,f):void 0,f?V(a,f):void 0)},removeTransform(t,n){const e=l,r=e?.removal;if(!e||!r)return;const i=`Remove ${g(t)} ${n}`;return Q({resolve:()=>{const s=y(t,n);return s.anchorKind==="live-only"||!r.available(s)?X(e.describe(s)):{reaches:"writer",anchorKind:s.anchorKind,destination:e.destination(),write:()=>r.perform({...s,label:i})}},record:()=>{},report:s=>{e.armed()&&e.report(i,s)}})},reportStructureLiveOnly(t,n){if(l?.armed()){l.report(t,n);return}if(!x){x=!0,N.warn(`[canvas] structural edits in this world are live-only — ${n}. First one: ${t}.`,"authoring");return}N.log(`[canvas] ${t} is live-only — ${n}.`,"authoring")},properties:R,get(t,n){return P(t,n)},set(t,n,e){h?.assertCanMutate();const r=m(),i=`Set ${g(t)} ${n}`;if(!l){A(t,n,e),v(i,r);return}const s=b(t,n);A(t,n,e);const a=b(t,n),d=s!==void 0&&a!==void 0&&JSON.stringify(s)!==JSON.stringify(a);return K(t,i,r,d?n:null,s,a)},dispose(){h?.dispose(),h=null,l?.dispose()}}}function V(u,c){if(u){if(c==="position")return[...u.position];if(c==="rotation")return u.rotation;if(c==="scale")return[...u.scale]}}export{$e as createLiveCanvasWriteTarget};
1
+ import{O as N,bm as Q,bn as X,q as L,as as Z,bo as ee,bk as te,bl as ne}from"./index-DhfMfVJj.js";import{J as re,c as _}from"./json-history-resource-Cmiy217h.js";import{m as ie,p as se}from"./source-persistence-backend-CPBtrjhX.js";import{t as oe}from"./pixi-transform-channels-P4rvmusc.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"./ingest-source-persistence-UZGBOJaQ.js";function $(u){if(!u||typeof u!="object")return;const c=u;return typeof c.x=="number"&&typeof c.y=="number"?[c.x,c.y]:void 0}function F(u,c,l){const o=u;!l||!$(o[c])||(o[c]={x:l[0],y:l[1]})}function ae(u){return`#${(u&16777215).toString(16).padStart(6,"0")}`}function le(u){return Number.parseInt(u.replace("#",""),16)}const ce=["position","rotation","scale"];function $e(u){const{physics:c}=u,l=u.persistence??null;let o,p=()=>{},h=null,S,T,w=!1,x=!1;const m=()=>{const t={},n=e=>{const r=o.node(e),i=o.displayObject(e);if(!r||!i)return;let s=null;try{s=o.getTransform(e)}catch{}const a=$(i.pivot),d=$(i.anchor);t[e]={label:i.label??"",alpha:i.alpha,visible:i.visible,..."tint"in i?{tint:i.tint}:{},...s?{transform:s}:{},...a?{pivot:a}:{},...d?{anchor:d}:{}};for(const f of r.childIds)n(f)};for(const e of o.roots())n(e.id);return{overlay:structuredClone(o.serializeOverlay()),nodes:t}},W=t=>{for(const[n,e]of Object.entries(t.nodes)){const r=o.displayObject(n);r&&(r.label=e.label,r.alpha=e.alpha,r.visible=e.visible,e.tint!==void 0&&"tint"in r&&(r.tint=e.tint),F(r,"pivot",e.pivot),F(r,"anchor",e.anchor),e.transform&&o.setTransform(n,e.transform))}o.replaceOverlay(t.overlay),p()},v=(t,n)=>{h&&n&&h.record(t,n,m()).catch(e=>{N.error(`[canvas] failed to journal "${t}" into project history — the edit is applied but has no history entry (it cannot be undone): ${e instanceof Error?e.message:String(e)}`,"authoring")})},A=(t,n,e)=>{const r=o.displayObject(t);r&&(n==="name"?o.set(t,"label",e):n==="tint"?o.set(t,"tint",le(e)):n==="visible"?o.set(t,"visible",e):n==="alpha"?o.set(t,"alpha",e):r[n]=e,p())},P=(t,n)=>{const e=o.displayObject(t);if(e)return n==="name"?e.label:n==="tint"?ae(e.tint??16777215):e[n]},b=(t,n)=>{const e=o.getTransform(t);return n==="position"?e?[...e.position]:void 0:n==="rotation"?e?e.rotation:void 0:n==="scale"?e?[...e.scale]:void 0:P(t,n)},I=(t,n,e)=>{if(n==="position"&&Array.isArray(e))o.setTransform(t,{position:[e[0]??0,e[1]??0]});else if(n==="rotation"&&typeof e=="number")o.setTransform(t,{rotation:e});else if(n==="scale"&&Array.isArray(e))o.setTransform(t,{scale:[e[0]??1,e[1]??1]});else{A(t,n,e);return}p()},y=(t,n)=>{const e=te(o.displayObject(t)??null);return{entityId:t,property:n,surface:"pixi",anchor:e,anchorKind:e.anchored?"construction-literal":"live-only",instances:e.anchored&&e.kind==="source"?ne(e):0}},g=t=>o.node(t)?.label??"2D Object",K=(t,n,e,r,i,s)=>{if(l){if(r===null||i===void 0||s===void 0){v(n,e);return}return se({backend:l,subject:()=>y(t,r),baseline:i,next:s,label:n,journal:()=>v(n,e)})}},R=t=>{const n=[{path:"name",label:"Name",type:"string"},{path:"visible",label:"Visible",type:"boolean"},{path:"alpha",label:"Alpha",type:"number"}],e=o.displayObject(t);return e&&"tint"in e&&n.push({path:"tint",label:"Tint",type:"color"}),n},O=new Map,E=new Map,j=t=>t.anchored&&t.kind==="source"?`${t.file}:${t.line}:${t.col}`:null,M=t=>[{path:"position",label:"Position"},{path:"rotation",label:"Rotation"},{path:"scale",label:"Scale"},...R(t).map(n=>({path:n.path,label:n.label}))],k=(t,n,e,r)=>{const i=E.get(n);if(i)return i;const s=l?.readSiteLiterals,a=M(t).map(f=>({property:f.path,live:b(t,f.path)})).filter(f=>f.live!==void 0);if(!s||a.length===0)return Promise.resolve({});const d=s({anchor:e,instances:r,writeScope:"creation-site",surface:"pixi",properties:a}).then(f=>(O.set(n,f),p(),f));return E.set(n,d),d},q=(t,n,e,r)=>{const i=O.get(n);return i||(k(t,n,e,r),null)},z=1e-6,H=(t,n)=>Array.isArray(t)&&Array.isArray(n)?t.length===n.length&&t.every((e,r)=>H(e,n[r])):typeof t=="number"&&typeof n=="number"?Math.abs(t-n)<=z:t===n,C=t=>o.displayObject(t)?.constructor?.name||(o.node(t)?.kind??"2D Object"),J=t=>`${t} ${t===1?"instance":"instances"}`,B=(t,n,e,r)=>{const i=b(t,n.path);if(!e||e.literal===null||i===void 0||H(e.literal,i))return null;const s=l?.gate({...r,property:n.path,writeScope:"creation-site"}),a=e.writable?s?.ok?void 0:s?.reason:e.reason;return{path:n.path,label:n.label,value:i,...e.text?{defaultText:e.text}:{},canApplyToComponent:a===void 0,...a===void 0?{}:{applyUnavailableReason:a},affectedInstanceCount:r.instances}},Y=(t,n,e,r)=>{if(!l||!e||e.literal===null||r===void 0)return{ok:!1,message:e?.reason??`The construction site names no ${n} for this object, so there is no default to change.`};if(!e.writable)return{ok:!1,message:e.reason??`The construction site's ${n} cannot be rewritten.`};const i=l.gate({...t,writeScope:"creation-site"});return i.ok?{ok:!0,backend:l,baseline:e.literal,next:r}:{ok:!1,message:i.reason}},D=async t=>{const n=y(t,"position"),e=j(n.anchor);return e?O.get(e)??await k(t,e,n.anchor,n.instances):null},U={describe:t=>{const n=y(t,"position"),e=j(n.anchor);if(!e||!o.displayObject(t))return null;const r=q(t,e,n.anchor,n.instances);if(!r||Object.keys(r).length===0)return null;const i=M(t).map(s=>B(t,s,r[s.path],n)).filter(s=>s!==null);return{componentName:C(t),...n.anchor.anchored?{sourcePath:n.anchor.display}:{},overrides:i}},revert:async(t,n)=>{const e=await D(t);if(!e)return;const r=m(),i=[];for(const s of n){const a=e[s]?.literal;a!=null&&(I(t,s,a),i.push(s))}if(i.length!==0)return v(i.length===1?`Revert ${g(t)} ${i[0]}`:`Revert ${i.length} ${g(t)} overrides`,r),p(),ee},applyToComponent:async(t,n)=>{const e={...y(t,n),writeScope:"creation-site"},r=j(e.anchor),i=(await D(t))?.[n],s=b(t,n),a=Y(e,n,i,s);if(!a.ok)return{changed:!1,message:a.message};const d=`Apply ${n} to ${C(t)} default (${J(e.instances)})`;return await a.backend.write({...e,baseline:a.baseline,next:a.next,label:d})?(r&&O.delete(r),p(),{changed:!0,message:`${n} now reads ${JSON.stringify(s)} for all ${J(e.instances)} at ${e.anchor.anchored?e.anchor.display:"its creation site"}.`,write:{destination:e.anchor.anchored?e.anchor.display:"creation site",persisted:!0}}):{changed:!1,message:`${d} did not land — the editor console names why.`}}};return{provenance:l?{source:"foreign",label:"creation-site",detail:"Live 2D (PixiJS) tree projected directly — an edit is written into the game’s own source at the line that constructed the object, and says why whenever it cannot be."}:{source:"foreign",label:"live-only",detail:"Live 2D (PixiJS) tree projected directly — edits apply for this session only and are never saved."},get persistence(){const t=l;return t?{..._(),get destination(){return t.destination()}}:{..._(),destination:Z}},truth:(t,n)=>{const e=y(t,n);if(e.anchorKind==="live-only")return{site:e.anchor,writeAnchorKind:"live-only"};const r=j(e.anchor);if(!r)return{site:e.anchor,writeAnchorKind:"live-only"};const i=O.get(r);if(!i)return k(t,r,e.anchor,e.instances),{site:e.anchor,writeAnchorKind:void 0};const s=i[n];return{site:e.anchor,writeAnchorKind:s?.writable?"construction-literal":"live-only"}},componentIdentity:t=>o.displayObject(t)?{name:C(t)}:null,...l?.readSiteLiterals?{instances:()=>U}:{},writeOrigin(t,n,e){h?.assertCanMutate();const r=o.displayObject(t);!r||!$(r[n])||(r[n]={x:e[0],y:e[1]},w=!0,p())},bind(t){o=t.a2d,p=t.notify;const n=t.store.shell.projectHistory;h=n?new re({history:n,kind:"session-state",scope:"session",subject:{...t.journal,id:`${t.journal.id}/world-2d-edits`},displayName:"World 2D edits",capture:m,conflictIdentity:e=>e.overlay,restore:async e=>{W(e)}}):null,l?.attach({read:b,apply:I})},onReindex(){},transformEditability(t,n){if(!l)return{writable:!0};const e=y(t,n),r=e.anchorKind!=="live-only"&&l.removal?.available(e)?{removable:!0}:{};return{writable:!0,reason:l.describe(e),...r}},beginTransformEdit(t){h?.assertCanMutate();const n=o.displayObject(t);n&&L(c,n)==="physics"&&c.freeze(n),S=m(),T=l?o.getTransform(t)??void 0:void 0,w=!1},writeTransform(t,n){h?.assertCanMutate();const e=o.displayObject(t);e&&L(c,e)==="physics"&&c.commit(e,n.position,n.rotation),o.setTransform(t,n),p()},endTransformEdit(t){const n=o.displayObject(t);n&&L(c,n)==="physics"&&c.unfreeze(n);const e=`Transform ${g(t)}`,r=S,i=T,s=w;if(S=void 0,T=void 0,w=!1,!l){v(e,r);return}const a=o.getTransform(t)??void 0,d=s?["origin"]:[];i&&a&&d.push(...ce.filter(G=>oe(G,i,a))),d.length>1&&l.report(e,ie(d));const f=d.length===1&&d[0]!=="origin"?d[0]:null;return K(t,e,r,f,f?V(i,f):void 0,f?V(a,f):void 0)},removeTransform(t,n){const e=l,r=e?.removal;if(!e||!r)return;const i=`Remove ${g(t)} ${n}`;return Q({resolve:()=>{const s=y(t,n);return s.anchorKind==="live-only"||!r.available(s)?X(e.describe(s)):{reaches:"writer",anchorKind:s.anchorKind,destination:e.destination(),write:()=>r.perform({...s,label:i})}},record:()=>{},report:s=>{e.armed()&&e.report(i,s)}})},reportStructureLiveOnly(t,n){if(l?.armed()){l.report(t,n);return}if(!x){x=!0,N.warn(`[canvas] structural edits in this world are live-only — ${n}. First one: ${t}.`,"authoring");return}N.log(`[canvas] ${t} is live-only — ${n}.`,"authoring")},properties:R,get(t,n){return P(t,n)},set(t,n,e){h?.assertCanMutate();const r=m(),i=`Set ${g(t)} ${n}`;if(!l){A(t,n,e),v(i,r);return}const s=b(t,n);A(t,n,e);const a=b(t,n),d=s!==void 0&&a!==void 0&&JSON.stringify(s)!==JSON.stringify(a);return K(t,i,r,d?n:null,s,a)},dispose(){h?.dispose(),h=null,l?.dispose()}}}function V(u,c){if(u){if(c==="position")return[...u.position];if(c==="rotation")return u.rotation;if(c==="scale")return[...u.scale]}}export{$e as createLiveCanvasWriteTarget};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-DhfMfVJj.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/gameplay-export-DGvqwMBU.js","assets/output-DK8waum9.js","assets/game-network-BYaj_RWO.js","assets/index-OZVqp6xS.js","assets/index-Da9JhEvW.js","assets/native-debug-module-Bz673XZT.js","assets/native-entry-surface-BE8LJNdu.js","assets/debug-registry-CqfOIF8b.js","assets/contract-system-adapters-d3KwjPWC.js","assets/game-contract-seams-NNhdUxdV.js","assets/seeded-random-C4K99T_S.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-6jy3p7nY.js","assets/capability-coverage-CL0GGeIg.js","assets/edit-mode-authoring-D-F1_iFO.js","assets/json-history-resource-Cmiy217h.js","assets/binding-resolver-B2hX5bHW.js","assets/adapter-surface-Y37Nzcyw.js","assets/structural-signature-Dc7skRiy.js","assets/webgl-frame-capture-DdJkM2mi.js","assets/realm-services-DD3n0-gI.js","assets/canvas-entry-runtime-BTSoOlwm.js","assets/three-ingest-runtime-Cl0JuTP_.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-idj3AkAe.js","assets/ingest-source-persistence-UZGBOJaQ.js","assets/pixi-story-model-DNkfnWUV.js","assets/surface-content-Dg9Kkazf.js","assets/viewport-root-presentation-B-tKDgs5.js","assets/mounted-authoring-CfwaN6te.js","assets/entity-object-BXXBLcj9.js","assets/user-data-CRiQHvNG.js","assets/workspace-arrangement-BpSjUGOP.js","assets/three-contract-Dkt6PmWY.js","assets/three-DtUftGH2.js","assets/editor-layers-CR1IoRwo.js","assets/component-instance-root-CNFI0IRp.js","assets/viewport-editor-controls-BYaAZ_Ku.js","assets/three-authoring-adapter-BlTbaEmo.js","assets/source-persistence-backend-CPBtrjhX.js","assets/three-projection-core-ftoGUmFi.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-C1t2gzF1.js","assets/deferred-ingest-play-Dum7AFKz.js","assets/rrweb-Cd2ifIRP.js","assets/react-world-authoring-adapter-DGSpriYX.js","assets/board-guides-D3JHkcyj.js","assets/relative-import-specifier-BL93f22G.js","assets/story-arg-descriptors-Ek86ExX7.js","assets/inspect-BooKKY95.js","assets/inference-diagnostics-CZtWDiNC.js","assets/writer-tw6EcuVO.js","assets/three-state-BrM9-A7V.js","assets/editor-shell-store-C8iDtpEA.js","assets/output-pass-HurwNl0G.js","assets/viewport-door-UgyLwfRY.js","assets/game-surface-defaults-D8S4cRxi.js","assets/editor-api-pnHaXAK3.js"])))=>i.map(i=>d[i]);
2
+ import{r as y,ac as g,_ as f,ad as R,a5 as w}from"./index-DhfMfVJj.js";import{d as D,n as F,f as A,h as M,j as O,e as T,k as $,g as L,l as N,p as W}from"./game-network-BYaj_RWO.js";import{r as q}from"./index-CtzuWnCS.js";import{n as z,s as k}from"./command-results-CUQD49AB.js";import{s as H,a as j}from"./run-selection-ByCRIyGc.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-CinJrH5C.js";import"./index-OZVqp6xS.js";import"./index-Da9JhEvW.js";import"./native-debug-module-Bz673XZT.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-CqfOIF8b.js";import"./contract-system-adapters-d3KwjPWC.js";import"./game-contract-seams-NNhdUxdV.js";import"./seeded-random-C4K99T_S.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-6jy3p7nY.js";import"./capability-coverage-CL0GGeIg.js";import"./edit-mode-authoring-D-F1_iFO.js";import"./json-history-resource-Cmiy217h.js";import"./binding-resolver-B2hX5bHW.js";import"./adapter-surface-Y37Nzcyw.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./realm-services-DD3n0-gI.js";import"./canvas-entry-runtime-BTSoOlwm.js";import"./three-ingest-runtime-Cl0JuTP_.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-idj3AkAe.js";import"./ingest-source-persistence-UZGBOJaQ.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-B-tKDgs5.js";import"./mounted-authoring-CfwaN6te.js";import"./entity-object-BXXBLcj9.js";import"./user-data-CRiQHvNG.js";import"./workspace-arrangement-BpSjUGOP.js";import"./three-contract-Dkt6PmWY.js";import"./three-DtUftGH2.js";import"./editor-layers-CR1IoRwo.js";import"./component-instance-root-CNFI0IRp.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-authoring-adapter-BlTbaEmo.js";import"./source-persistence-backend-CPBtrjhX.js";import"./three-projection-core-ftoGUmFi.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-C1t2gzF1.js";import"./deferred-ingest-play-Dum7AFKz.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-DGSpriYX.js";import"./board-guides-D3JHkcyj.js";import"./relative-import-specifier-BL93f22G.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-BooKKY95.js";import"./inference-diagnostics-CZtWDiNC.js";import"./writer-tw6EcuVO.js";import"./three-state-BrM9-A7V.js";import"./editor-shell-store-C8iDtpEA.js";import"./output-pass-HurwNl0G.js";import"./viewport-door-UgyLwfRY.js";import"./game-surface-defaults-D8S4cRxi.js";import"./configurations-Ci7u4w12.js";const kt="workspace.command";async function x(e){const{liveCanvasFrame:t}=await f(async()=>{const{liveCanvasFrame:r}=await import("./index-DhfMfVJj.js").then(o=>o.tZ);return{liveCanvasFrame:r}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]));return t(e)}function Z(){const e=L();e?.loop.liveness==="loop-starved"&&e.runTicks?.(1,{render:"last"})}function B(){const e=w().audio,t=e?.renderOffline;if(!e||!t)return;let r=null;try{const o=w().debug?.state("time");typeof o?.simSeconds=="number"&&Number.isFinite(o.simSeconds)&&(r=o.simSeconds)}catch{r=null}if(r!==null)return{startSeconds:r,render:t.bind(e)}}let d=null;const xt={play:{timeoutMs:12e4,derivedRefresh:"always",handle:async e=>{try{const o=e.seed,l=e.name,m=await j();if(!m.ok)return{ok:!1,error:`${m.title}: ${m.detail}`};await T(typeof o=="number"?o:void 0,void 0,typeof l=="string"?l:null)}catch(o){return{ok:!1,error:o instanceof Error?o.message:String(o)}}if(!y().live.playing())return{ok:!1,error:"Play did not start: the run was superseded before it finished booting (a stop, or a newer play, landed during startup). Nothing is running."};const t=e.record,r=await $(g()??y().workspace.liveDocument.container(),{name:typeof t=="string"?t:null,audio:w().audio?.acquireRecordingStream?.()??null,canvasFrame:x,refreshFrame:Z});return{ok:!0,...r?{data:{recording:r}}:{}}}},stop:{timeoutMs:3e4,derivedRefresh:"always",handle:async()=>{d?.abort(new Error("Video export cancelled by Stop."));const e=await M("stop");return O(),await H(),{ok:!0,...e?{data:{recording:e}}:{}}}},pause:{derivedRefresh:"always",handle:()=>(W(),{ok:!0})},resume:{derivedRefresh:"always",handle:()=>(N(),{ok:!0})},step:{derivedRefresh:"always",handle:()=>(A(),{ok:!0})},"bridge-recording-export":{timeoutMs:6e5,derivedRefresh:"none",handle:async e=>{const t=y();if(t.session.playState()!=="paused")return{ok:!1,error:"Pause the game before exporting video."};const r=g();if(!r)return z();if(d)return{ok:!1,error:"A video export is already active."};const{exportGameplayVideo:o,validateGameplayExport:l,assertGameplayVideoSupport:m}=await f(async()=>{const{exportGameplayVideo:n,validateGameplayExport:u,assertGameplayVideoSupport:s}=await import("./gameplay-export-DGvqwMBU.js");return{exportGameplayVideo:n,validateGameplayExport:u,assertGameplayVideoSupport:s}},__vite__mapDeps([10,0,1,2,3,4,5,6,7,8,9,11])),h={frames:Number(e.frames),fps:e.fps===void 0?30:Number(e.fps)};try{l(h)}catch(n){return k(n)}if(d)return{ok:!1,error:"A video export is already active."};const i=new AbortController;d=i,R(!0);const S=setTimeout(()=>i.abort(new Error("Video export exceeded its ten-minute deadline.")),59e4),v=t.live.runWindow()?.startedAt??null,_=t.session.subscribe(()=>{(t.session.playState()!=="paused"||(t.live.runWindow()?.startedAt??null)!==v)&&i.abort(new Error("Video export cancelled: the Play session changed."))}),b=B();try{await m(r),i.signal.throwIfAborted();const{gameplayRecordingActive:n}=await f(async()=>{const{gameplayRecordingActive:a}=await import("./game-network-BYaj_RWO.js").then(p=>p.a3);return{gameplayRecordingActive:a}},__vite__mapDeps([12,13,14,2,0,1,3,4,5,6,7,8,9,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]));n()&&await D();const{blob:u,...s}=await o(r,h,{step:()=>q.flushSync(()=>A()),assertActive:()=>{if(F(),t.session.playState()!=="paused"||g()!==r||(t.live.runWindow()?.startedAt??null)!==v)throw new Error("Video export interrupted: its game must remain paused and mounted.")},canvasFrame:x,signal:i.signal,...b?{audio:b}:{}}),{beginGameplayRecordingSink:E,appendGameplayRecordingChunk:P,finishGameplayRecordingSink:G,abortGameplayRecordingSink:V}=await f(async()=>{const{beginGameplayRecordingSink:a,appendGameplayRecordingChunk:p,finishGameplayRecordingSink:I,abortGameplayRecordingSink:C}=await import("./editor-api-pnHaXAK3.js");return{beginGameplayRecordingSink:a,appendGameplayRecordingChunk:p,finishGameplayRecordingSink:I,abortGameplayRecordingSink:C}},__vite__mapDeps([83,0,1,2,3,4,5,6,7,8,9,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]));i.signal.throwIfAborted();const c=await E({startedAt:new Date().toISOString(),mimeType:"video/webm",purpose:"export",name:typeof e.name=="string"?e.name:`export-${Date.now()}`},i.signal);try{for(let a=0,p=0;a<u.size;a+=4*1024*1024,p++)i.signal.throwIfAborted(),await P(c,p,u.slice(a,a+4*1024*1024),i.signal);i.signal.throwIfAborted(),await G(c,s.audio?`fixed-step export with audio (${s.audio.codec}, ${s.audio.channels}ch @ ${s.audio.sampleRate} Hz)`:"fixed-step export, video only: this world has no AudioAdapter.renderOffline",i.signal),i.signal.throwIfAborted()}catch(a){throw await V(c),a}return{ok:!0,data:{...s,path:c.path}}}catch(n){return k(n)}finally{_(),clearTimeout(S),d=null,R(!1)}}}};export{xt as commands,kt as point};
@@ -1 +1 @@
1
- import{a as h}from"./jsx-runtime-DPjLkJKQ.js";import{a0 as p,a1 as m,ew as g,aK as d,cR as b,cS as x}from"./index-iW3HFEJB.js";import{r as w}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";const v=[{label:"Fill",width:null,height:null},{label:"iPhone SE — 375×667",width:375,height:667},{label:"iPhone 14 — 390×844",width:390,height:844},{label:"iPhone 14 Pro Max — 430×932",width:430,height:932},{label:"iPad Mini — 768×1024",width:768,height:1024},{label:"iPad Pro 11″ — 834×1194",width:834,height:1194},{label:"Laptop — 1366×768",width:1366,height:768},{label:"Desktop — 1920×1080",width:1920,height:1080}];function E({resolution:e,onResolutionChange:t,scale:u,title:a="Change preview resolution",options:r=v}){const[o,n]=w.useState(!1),c=w.useRef(null),l=e.width===null,f=l?"Fill":`${e.width}×${e.height}`;return h.jsxs("div",{className:"volter-playbar-popover-anchor",children:[h.jsxs(p,{ref:c,variant:"ghost",size:"comfortable","aria-haspopup":"menu","aria-expanded":o,"aria-controls":o?"volter-resolution-picker-menu":void 0,onClick:()=>n(i=>!i),title:a,children:[h.jsx(m,{icon:g,size:"md"}),h.jsx(d,{variant:"code",children:f}),!l&&u<1&&h.jsxs(d,{variant:"caption",tone:"dim",children:[Math.round(u*100),"%"]})]}),o&&h.jsx(b,{id:"volter-resolution-picker-menu",anchorRef:c,className:"volter-resolution-menu",gap:4,onDismiss:()=>n(!1),children:r.map(i=>h.jsx(x,{role:"menuitemradio","aria-checked":i.label===e.label,onSelect:()=>{t(i),n(!1)},children:i.label},i.label))})]})}function s(e){return Number.isFinite(e)&&e>0?e:0}function M(e,t,u={}){const a=s(e.width),r=s(e.height),o=s(t.width),n=s(t.height);if(a===0||r===0||o===0||n===0)return{scale:1,width:o,height:n,offsetX:0,offsetY:0};const c=Math.min(a/o,r/n),l=u.allowUpscale===!0?c:Math.min(c,1),f=o*l,i=n*l;return{scale:l,width:f,height:i,offsetX:(a-f)/2,offsetY:(r-i)/2}}const P={kind:"fill"};function N(e,t){return e.width!==null&&e.height!==null?{kind:"logical",width:e.width,height:e.height,source:"device",allowUpscale:!1}:t!==void 0&&s(t.width)>0&&s(t.height)>0?{kind:"logical",width:t.width,height:t.height,source:"manifest",allowUpscale:!0}:P}export{E as R,v as a,M as f,N as r};
1
+ import{a as h}from"./jsx-runtime-DPjLkJKQ.js";import{a0 as p,a1 as m,ew as g,aK as d,cR as b,cS as x}from"./index-DhfMfVJj.js";import{r as w}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";const v=[{label:"Fill",width:null,height:null},{label:"iPhone SE — 375×667",width:375,height:667},{label:"iPhone 14 — 390×844",width:390,height:844},{label:"iPhone 14 Pro Max — 430×932",width:430,height:932},{label:"iPad Mini — 768×1024",width:768,height:1024},{label:"iPad Pro 11″ — 834×1194",width:834,height:1194},{label:"Laptop — 1366×768",width:1366,height:768},{label:"Desktop — 1920×1080",width:1920,height:1080}];function E({resolution:e,onResolutionChange:t,scale:u,title:a="Change preview resolution",options:r=v}){const[o,n]=w.useState(!1),c=w.useRef(null),l=e.width===null,f=l?"Fill":`${e.width}×${e.height}`;return h.jsxs("div",{className:"volter-playbar-popover-anchor",children:[h.jsxs(p,{ref:c,variant:"ghost",size:"comfortable","aria-haspopup":"menu","aria-expanded":o,"aria-controls":o?"volter-resolution-picker-menu":void 0,onClick:()=>n(i=>!i),title:a,children:[h.jsx(m,{icon:g,size:"md"}),h.jsx(d,{variant:"code",children:f}),!l&&u<1&&h.jsxs(d,{variant:"caption",tone:"dim",children:[Math.round(u*100),"%"]})]}),o&&h.jsx(b,{id:"volter-resolution-picker-menu",anchorRef:c,className:"volter-resolution-menu",gap:4,onDismiss:()=>n(!1),children:r.map(i=>h.jsx(x,{role:"menuitemradio","aria-checked":i.label===e.label,onSelect:()=>{t(i),n(!1)},children:i.label},i.label))})]})}function s(e){return Number.isFinite(e)&&e>0?e:0}function M(e,t,u={}){const a=s(e.width),r=s(e.height),o=s(t.width),n=s(t.height);if(a===0||r===0||o===0||n===0)return{scale:1,width:o,height:n,offsetX:0,offsetY:0};const c=Math.min(a/o,r/n),l=u.allowUpscale===!0?c:Math.min(c,1),f=o*l,i=n*l;return{scale:l,width:f,height:i,offsetX:(a-f)/2,offsetY:(r-i)/2}}const P={kind:"fill"};function N(e,t){return e.width!==null&&e.height!==null?{kind:"logical",width:e.width,height:e.height,source:"device",allowUpscale:!1}:t!==void 0&&s(t.width)>0&&s(t.height)>0?{kind:"logical",width:t.width,height:t.height,source:"manifest",allowUpscale:!0}:P}export{E as R,v as a,M as f,N as r};
@@ -1 +1 @@
1
- import{tC as n}from"./index-iW3HFEJB.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";export{n as mountVolter};
1
+ import{tC as n}from"./index-DhfMfVJj.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";export{n as mountVolter};
@@ -1 +1 @@
1
- import{p as o}from"./utility-view-state-y2PTWZuT.js";import"./index-iW3HFEJB.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const f="workspace.action",s=[{id:"profiler",label:"Open Profiler",execute:()=>o.open("profiler")}];export{s as actions,f as point};
1
+ import{p as o}from"./utility-view-state-rnZf-khZ.js";import"./index-DhfMfVJj.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const f="workspace.action",s=[{id:"profiler",label:"Open Profiler",execute:()=>o.open("profiler")}];export{s as actions,f as point};
@@ -1 +1 @@
1
- import{p as r}from"./utility-view-state-y2PTWZuT.js";import"./index-iW3HFEJB.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 u="workspace.menu",c={menu:"debug",items:[{id:"profiler",label:"Profiler",testId:"menu-profiler",execute:()=>r.open("profiler")}]};export{c as menu,u as point};
1
+ import{p as r}from"./utility-view-state-rnZf-khZ.js";import"./index-DhfMfVJj.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 u="workspace.menu",c={menu:"debug",items:[{id:"profiler",label:"Profiler",testId:"menu-profiler",execute:()=>r.open("profiler")}]};export{c as menu,u as point};
@@ -1 +1 @@
1
- import{a as e}from"./jsx-runtime-DPjLkJKQ.js";import{p as C}from"./utility-view-state-y2PTWZuT.js";import{r as h}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{a3 as N,r as D,af as s,a0 as x,ep as m,en as o,hG as Y,dV as q,hI as A,hH as U,jI as K,jJ as Q}from"./index-iW3HFEJB.js";import{s as Z,f as E,a as ee,d as H,c as te,b as ne,g as se,l as re,i as ae,e as oe,h as ie,j as le,u as de,t as ce,k as pe,m as me,n as T,o as k,p as ue}from"./frame-debugger-store-CCm_jyhx.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const j={fontFamily:s.typography.mono,fontSize:11};function fe({draw:t,selected:n,onSelect:r}){return e.jsxs(x,{type:"button",variant:"ghost","data-testid":"frame-draw-row","data-draw-index":t.index,"data-selected":n||void 0,className:"volter-frame-draw-row",onClick:r,children:[e.jsxs("span",{style:{...j,color:s.content.dim,width:34,display:"inline-block"},children:["#",t.index]}),e.jsx("span",{style:{...j,color:s.content.primary},children:t.mode}),e.jsxs("span",{style:{...j,color:s.content.muted},children:[" ",t.count]}),t.instanceCount!==null&&e.jsxs("span",{style:{...j,color:s.content.muted},children:[" ×",t.instanceCount]}),e.jsxs("span",{style:{...j,color:t.annotation?s.content.primary:s.content.dim,fontStyle:t.annotation?"normal":"italic"},children:[" ",t.annotation?t.annotation.object.name||t.annotation.object.type:"unattributed"]})]})}function b({label:t,value:n}){return e.jsxs("div",{style:{display:"flex",gap:8,padding:"1px 0"},children:[e.jsx("span",{style:{fontSize:10,color:s.content.muted,width:92,flexShrink:0},children:t}),e.jsx("span",{style:{...j,color:s.content.primary},children:n})]})}const M=t=>t?"on":"off";function he(t){if(t.kind==="canvas")return"canvas (default framebuffer)";const n=t.width!==null&&t.height!==null?`${t.width}×${t.height}`:"(size not queryable)";return`${t.label??"framebuffer"} ${n}`}function xe(t){return`blend ${M(t.blend)} · depth test ${M(t.depthTest)} · depth write ${M(t.depthWrite)} · cull ${t.cull} · scissor ${M(t.scissor)}`}function ge(t){const n=t.instanceCount!==null?` · ${t.instanceCount} instances`:" · not instanced";return`${t.mode} · ${t.count}${n}`}function ye({draw:t}){return e.jsxs("div",{"data-testid":"frame-draw-detail",style:{padding:8},children:[e.jsx(b,{label:"entry point",value:t.entryPoint}),e.jsx(b,{label:"mode / count",value:ge(t)}),e.jsx(b,{label:"program",value:t.programLabel??"none bound"}),e.jsx(b,{label:"target",value:he(t.target)}),e.jsx(b,{label:"viewport",value:`[${t.viewport.join(", ")}]`}),e.jsx(b,{label:"state",value:xe(t.state)}),t.annotation?e.jsxs(e.Fragment,{children:[e.jsx(b,{label:"object",value:`${t.annotation.object.name||"(unnamed)"} · ${t.annotation.object.type}`}),e.jsx(b,{label:"geometry",value:`${t.annotation.geometry.name||t.annotation.geometry.type}${t.annotation.geometry.indexed?" · indexed":""}`}),e.jsx(b,{label:"attributes",value:t.annotation.geometry.attributes.join(", ")||"—"}),e.jsx(b,{label:"material",value:`${t.annotation.material.name||"(unnamed)"} · ${t.annotation.material.type}`})]}):e.jsx("div",{"data-testid":"frame-draw-unattributed",style:{marginTop:6,fontSize:11,fontStyle:"italic",color:s.content.muted},children:"Not attributable (shadow / post-processing pass — the instrument attributes only main-pass draws through each object's onBeforeRender, and reports the gap honestly rather than guessing)."})]})}function be({capture:t,drawIndex:n,setDrawIndex:r}){const a=t.drawCalls.length,i=Math.min(n,Math.max(0,a-1)),l=t.drawCalls[i]??null,d=le(t);return e.jsxs("div",{style:{flex:1,minHeight:0,display:"flex"},children:[e.jsxs("div",{style:{flex:1,minWidth:0,overflow:"auto",borderRight:`1px solid ${s.boundary.default}`},children:[e.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center",padding:4,borderBottom:`1px solid ${s.boundary.default}`},children:[e.jsx(x,{type:"button",size:"compact",variant:"ghost","data-testid":"frame-draw-prev",disabled:i<=0,onClick:()=>r(Math.max(0,i-1)),children:"◀ Prev"}),e.jsx(x,{type:"button",size:"compact",variant:"ghost","data-testid":"frame-draw-next",disabled:i>=a-1,onClick:()=>r(Math.min(a-1,i+1)),children:"Next ▶"}),e.jsxs("span",{style:{fontSize:10,color:s.content.muted},children:[a===0?"0":i+1,"/",a]})]}),d.map(p=>e.jsxs("div",{"data-testid":"frame-target-group","data-target":p.target,children:[e.jsxs("div",{style:{...j,padding:"2px 8px",color:s.content.muted,borderTop:`1px solid ${s.boundary.default}`,borderBottom:`1px solid ${s.boundary.default}`},children:[p.target," · ",p.draws.length," draws"]}),p.draws.map(u=>e.jsx(fe,{draw:u,selected:u.index===i,onSelect:()=>r(u.index)},u.index))]},p.target))]}),e.jsxs("div",{style:{flex:1,minWidth:0,overflow:"auto"},children:[l?e.jsx(ye,{draw:l}):e.jsx("div",{style:{padding:12,color:s.content.muted,fontSize:12},children:"This capture recorded no draws."}),t.notes.length>0&&e.jsx("div",{style:{padding:"4px 8px",fontSize:10,color:s.content.dim},"data-testid":"frame-capture-notes",children:t.notes.join(" ")})]})]})}function je({captures:t,selectedId:n}){return e.jsx("div",{"data-testid":"frame-capture-history",style:{display:"flex",gap:6,flexWrap:"wrap",padding:"4px 8px",borderBottom:`1px solid ${s.boundary.default}`},children:t.map(r=>{const a=oe(r);return e.jsxs(x,{type:"button",size:"compact",variant:"ghost","data-testid":"frame-capture-item","data-capture-id":r.id,"data-selected":r.id===n||void 0,onClick:()=>ie(r.id),children:["#",r.id," · ",a.drawCalls," draws",a.unattributed>0?` · ${a.unattributed} unattr`:"",a.truncated>0?` · +${a.truncated} capped`:""]},r.id)})})}function ve(){h.useSyncExternalStore(Z,E,E);const[t,n]=h.useState(0),r=N(()=>D().systems.inspected().renderDebug??null);h.useEffect(()=>{ee(r)},[r]);const a=H(r),i=se(),l=i.selected;if(h.useEffect(()=>{n(0)},[l?.id]),!r||!a)return e.jsxs("div",{"data-testid":"frame-debugger-empty",style:{padding:16,color:s.content.muted,fontSize:12,lineHeight:"18px"},children:[e.jsx("div",{style:{color:s.content.primary,marginBottom:4},children:"No render-debug adapter — no game session is running."}),"Frame capture exists only while a game session runs. Press Play: first-party worlds register a ",e.jsx("code",{style:j,children:"RenderDebugAdapter"})," automatically when they hold a real WebGL2 context; a custom world exposes its own via"," ",e.jsx("code",{style:j,children:"ctx.registerSystemAdapter?.('renderDebug', adapter)"}),". A headless mount registers none — there is nothing to capture."]});const d=re(),p=ae();return e.jsxs("div",{"data-testid":"frame-debugger",className:"volter-content-frost",style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",fontSize:12},children:[e.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:10,alignItems:"center",padding:"4px 8px",borderBottom:`1px solid ${s.boundary.default}`},children:[e.jsx(x,{type:"button",size:"compact","data-testid":"frame-capture-button",disabled:p,onClick:()=>void te(r),children:p?"Capturing…":"Capture frame"}),e.jsx("span",{style:{fontSize:10,color:s.content.dim},children:"Single-frame draw-call list with per-draw state — not a GPU replayer."}),i.all.length>0&&e.jsx(x,{type:"button",size:"compact",variant:"ghost","data-testid":"frame-capture-clear",onClick:()=>ne(),children:"Clear"})]}),d&&e.jsxs("div",{"data-testid":"frame-capture-error",style:{padding:"4px 8px",fontSize:11,color:s.semantic.danger,borderBottom:`1px solid ${s.boundary.default}`},children:["Capture failed: ",d]}),i.all.length>0&&e.jsx(je,{captures:i.all,selectedId:l?.id??null}),l?e.jsx(be,{capture:l,drawIndex:t,setDrawIndex:n},l.id):e.jsxs("div",{"data-testid":"frame-debugger-no-capture",style:{padding:12,color:s.content.muted,fontSize:12},children:["No frame captured yet. Press ",e.jsx("strong",{children:"Capture frame"})," while the game renders."]})]})}const S=1,w=1,Se=1e3;function $(t){return Math.round(t*Se)}function we(t,n){const r=[];r.push({name:"process_name",cat:"__metadata",ph:"M",ts:0,dur:0,pid:S,tid:w,args:{name:n.processName}}),r.push({name:"thread_name",cat:"__metadata",ph:"M",ts:0,dur:0,pid:S,tid:w,args:{name:n.threadName}});for(const a of t){const i=a.timestamp-a.cpuMs,l=$(i);r.push({name:`frame ${a.id}`,cat:"frame",ph:"X",ts:l,dur:$(a.cpuMs),pid:S,tid:w,args:{id:a.id,drawCalls:a.render.drawCalls,triangles:a.render.triangles}});for(const d of a.phases)r.push({name:d.name,cat:"phase",ph:"X",ts:$(i+(d.startMs??0)),dur:$(d.ms),pid:S,tid:w});for(const d of a.systems)r.push({name:d.name,cat:"system",ph:"X",ts:$(i+d.startMs),dur:$(d.ms),pid:S,tid:w,args:{phase:d.phase}});r.push({name:"render",cat:"counter",ph:"C",ts:l,dur:0,pid:S,tid:w,args:{drawCalls:a.render.drawCalls,triangles:a.render.triangles}})}return{traceEvents:r,displayTimeUnit:"ms",otherData:{version:2,processName:n.processName,threadName:n.threadName,frameCount:t.length}}}function $e(t){if(t.length<4)return 0;let n=Number.POSITIVE_INFINITY;for(const a of t)n=Math.min(n,a);let r=0;for(const a of t)r+=Math.max(0,a-n);return r}const R=1200;function Ce(){const t=[];let n=null,r=0;const a=()=>{const i=performance.now();t.push({t:i,gapMs:i-r}),t.length>R&&t.splice(0,t.length-R),r=i,n=setTimeout(a,0)};return{start(){n===null&&(t.length=0,r=performance.now(),n=setTimeout(a,0))},stop(){n!==null&&(clearTimeout(n),n=null)},busySince(i){const l=[];for(const d of t)d.t>=i&&l.push(d.gapMs);return{busyMs:$e(l),sampleCount:l.length}}}}const B={enabled:!1,recording:!1,fps:0,cpuMs:0,p95Ms:0,p99Ms:0,frames:[],phases:[],systems:[],components:[],render:{gpuMs:null,drawCalls:0,triangles:0,geometries:0,textures:0,renderPasses:null}},Te=500;function Me(t){const n=URL.createObjectURL(new Blob([t.exportJSON()],{type:"application/json"})),r=document.createElement("a");r.href=n,r.download=`volter-performance-${new Date().toISOString().replaceAll(":","-")}.json`,r.click(),URL.revokeObjectURL(n)}function ze(t,n){const r=we(t.getSnapshot().frames,{processName:n,threadName:"main"}),a=URL.createObjectURL(new Blob([JSON.stringify(r)],{type:"application/json"})),i=document.createElement("a");i.href=a,i.download=`volter-trace-${new Date().toISOString().replaceAll(":","-")}.json`,i.click(),URL.revokeObjectURL(a)}const z=720,P=18,I=40,L=[s.accent.default,s.semantic.success,s.semantic.warning,s.content.muted];function Pe({snapshot:t}){const n=t.frames,[r,a]=h.useState(null),i=r!==null&&r<n.length?r:n.length-1,l=n[i],d=pe(n,z,I),p=l?me(l,z):[],u=p.reduce((c,g)=>Math.max(c,g.depth),0);return n.length===0?e.jsxs("div",{"data-testid":"flamegraph-empty",style:{padding:o[6],color:s.content.muted},children:["No frames recorded yet. Frames accumulate while the profiler is enabled; use"," ",e.jsx("strong",{children:"Record capture"})," to also collect per-component spans."]}):e.jsxs("div",{"data-testid":"flamegraph-view",style:{padding:o[4]},children:[e.jsxs("div",{style:{marginBottom:o[4],color:s.content.muted},children:["Frame ",e.jsx("span",{style:{color:s.content.primary},children:l?l.id:"—"})," ·"," ",l?`${l.cpuMs.toFixed(2)} ms CPU`:""," · GPU"," ",e.jsx("span",{style:{color:s.content.primary},children:l&&l.render.gpuMs!==null?`${l.render.gpuMs.toFixed(2)} ms`:"n/a"})]}),e.jsx("div",{"data-testid":"flame-frame-strip",style:{position:"relative",width:z,height:I,boxShadow:`inset 0 0 0 1px ${s.boundary.default}`,marginBottom:o[5]},children:d.map(c=>e.jsx("div",{role:"button",tabIndex:0,"data-testid":"flame-frame-bar","data-frame-index":c.index,"data-selected":c.index===i||void 0,title:`frame ${c.frameId} · ${c.cpuMs.toFixed(2)} ms`,onClick:()=>a(c.index),onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&a(c.index)},style:{position:"absolute",left:c.x,bottom:0,width:Math.max(1,c.w-1),height:Math.max(1,c.h),cursor:"pointer",background:c.index===i?s.semantic.warning:s.accent.default}},c.frameId))}),e.jsx("div",{"data-testid":"flamegraph-rows",style:{position:"relative",width:z,height:(u+1)*P},children:p.map((c,g)=>e.jsx("div",{"data-testid":"flame-rect","data-depth":c.depth,"data-name":c.label,title:`${c.label} · ${c.ms.toFixed(3)} ms`,style:{position:"absolute",left:c.x,top:c.depth*P,width:Math.max(1,c.w),height:P-1,overflow:"hidden",whiteSpace:"nowrap",fontSize:m.sm,lineHeight:`${P-1}px`,paddingLeft:3,color:s.content.onAccent,background:L[Math.min(c.depth,L.length-1)],borderRight:`1px solid ${s.surface.inset}`},children:c.label},`${c.depth}-${g}-${c.label}`))}),e.jsxs("div",{style:{marginTop:o[3],fontSize:m.sm,color:s.content.dim},children:["Rows: frame · phase · system",t.recording?" · component (recording)":"",". Only measured CPU spans are drawn — GPU time is a whole-frame aggregate, never a fabricated lane."]})]})}function O({title:t,entries:n,estimated:r,testId:a}){return e.jsxs("div",{"data-testid":a,style:{marginTop:o[5],border:`1px solid ${s.boundary.default}`},children:[e.jsxs("div",{style:{padding:`${o[3]} ${o[5]}`,borderBottom:`1px solid ${s.boundary.default}`,color:s.content.muted},children:[t,r&&e.jsx("span",{style:{marginLeft:o[3],fontSize:m.xs,color:s.content.dim},children:"ESTIMATED"})]}),n.length===0?e.jsx("div",{style:{padding:`${o[2]} ${o[5]}`,color:s.content.dim,fontSize:m.base},children:"none"}):n.map(i=>e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:o[8],padding:"3px 10px"},children:[e.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i.name}),e.jsx("span",{style:{fontVariantNumeric:"tabular-nums"},children:T(i.bytes)})]},i.name))]})}function Fe(){const t=N(()=>D().systems.inspected().renderDebug??null),n=H(t),[r,a]=h.useState(null);h.useEffect(()=>{if(!t?.memorySnapshot){a(null);return}const l=()=>a(t.memorySnapshot?.()??null);l();const d=setInterval(l,1e3);return()=>clearInterval(d)},[t]);const i=K();return e.jsxs("div",{style:{padding:o[4]},children:[e.jsxs("div",{"data-testid":"memory-heap",style:{border:`1px solid ${s.boundary.default}`,padding:o[5],marginBottom:o[5]},children:[e.jsx("div",{style:{color:s.content.dim,textTransform:"uppercase",fontSize:m.sm},children:"JS heap (performance.memory)"}),Q(i)?e.jsxs("div",{style:{fontSize:m.xl,color:s.content.primary,marginTop:3},children:[T(i.usedBytes)," ",e.jsxs("span",{style:{fontSize:m.base,color:s.content.muted},children:["used / ",T(i.totalBytes)," total"]})]}):e.jsx("div",{"data-testid":"memory-heap-unavailable",style:{fontSize:m.base,color:s.content.muted,marginTop:3,fontStyle:"italic"},children:i.unavailable})]}),n?.memory?r===null?e.jsx("div",{style:{padding:o[4],color:s.content.muted,fontSize:m.base},children:"Waiting for the first render-memory sample…"}):e.jsxs("div",{"data-testid":"memory-section",children:[e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, minmax(80px, 1fr))",gap:o[4]},children:[["Geometries",String(r.counts.geometries)],["Textures",String(r.counts.textures)],["Programs",r.counts.programs===null?"n/a until first render":String(r.counts.programs)]].map(([l,d])=>e.jsxs("div",{style:{border:`1px solid ${s.boundary.default}`,padding:o[5]},children:[e.jsx("div",{style:{color:s.content.dim,textTransform:"uppercase",fontSize:m.sm},children:l}),e.jsx("div",{style:{fontSize:m["2xl"],color:s.content.primary,marginTop:3},children:d})]},l))}),e.jsxs("div",{"data-testid":"memory-vram-totals",style:{display:"flex",gap:18,marginTop:o[5],fontSize:m.base,color:s.content.muted},children:[e.jsxs("span",{children:["geometry buffers"," ",e.jsx("span",{style:{color:s.content.primary},children:T(r.estimatedGeometryBytes)})," ",e.jsx("span",{style:{fontSize:m.xs,color:s.content.dim},children:"EXACT"})]}),e.jsxs("span",{children:["texture VRAM"," ",e.jsx("span",{style:{color:s.content.primary},children:T(r.estimatedTextureBytes)})," ",e.jsx("span",{style:{fontSize:m.xs,color:s.content.dim},children:"ESTIMATED"})]})]}),e.jsx(O,{title:"Top geometries",entries:r.topGeometries,estimated:!1,testId:"memory-top-geometries"}),e.jsx(O,{title:"Top textures",entries:r.topTextures,estimated:!0,testId:"memory-top-textures"}),r.unestimated.length>0&&e.jsxs("div",{"data-testid":"memory-unestimated",style:{marginTop:o[5],border:`1px solid ${s.boundary.default}`},children:[e.jsxs("div",{style:{padding:`${o[3]} ${o[5]}`,borderBottom:`1px solid ${s.boundary.default}`,color:s.content.muted},children:["Unmeasured textures (",r.unestimated.length,") — excluded from the total, not zeroed"]}),r.unestimated.map(l=>e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:o[8],padding:"3px 10px",fontSize:m.base},children:[e.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l.name}),e.jsx("span",{style:{color:s.content.dim},children:l.reason})]},l.name))]})]}):e.jsxs("div",{"data-testid":"memory-absent",style:{padding:o[4],color:s.content.muted,fontSize:m.base,fontStyle:"italic"},children:["Render-memory introspection is not provided by this world's adapter — a headless mount has no ",e.jsx("code",{children:"renderer.info"}),", and a canvas (PixiJS) world's renderer publishes no managed geometry collection to measure at all. Enter Play with a first-party three world to inspect geometry/texture footprints."]})]})}function De(t){const n=h.useRef([]),r=typeof PerformanceObserver<"u"&&(PerformanceObserver.supportedEntryTypes??[]).includes("long-animation-frame");return h.useEffect(()=>{if(!t||!r)return;n.current=[];const a=new PerformanceObserver(i=>{const l=n.current;for(const d of i.getEntries())l.push(d);l.length>40&&l.splice(0,l.length-40)});return a.observe({type:"long-animation-frame"}),()=>a.disconnect()},[t,r]),{entries:n.current,supported:r}}function Ee(t,n,r){const a=h.useRef(null);a.current===null&&(a.current=Ce()),h.useEffect(()=>{const l=a.current;if(!(!t||!l))return l.start(),()=>l.stop()},[t]);const i=performance.now()-1e3;return ce(n.frames,i,a.current.busySince(i),r)}function ke({row:t,rootMs:n}){const r=t.ms!==null&&n>0?Math.min(1,t.ms/n):0,a=t.depth===0;return e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"260px 1fr 70px",gap:o[5],padding:`${o[2]} ${o[5]}`,paddingLeft:10+t.depth*16},children:[e.jsxs("span",{style:{color:a||t.depth===1?s.content.primary:s.content.muted,fontStyle:t.parallel?"italic":void 0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:t.note?`${t.label} — ${t.note}`:t.label,children:[t.label,t.note&&e.jsx("span",{style:{marginLeft:o[3],fontSize:m.sm,color:s.content.dim},children:t.note})]}),e.jsx("div",{style:{background:s.surface.raised,height:6,marginTop:5,opacity:t.parallel?.45:1},children:e.jsx("div",{style:{width:`${r*100}%`,height:"100%",background:!a&&t.ms!==null&&t.ms>8?s.semantic.warning:s.accent.default}})}),e.jsx("span",{style:{textAlign:"right",fontVariantNumeric:"tabular-nums",color:a?s.content.primary:void 0},children:t.ms===null?"—":`${t.ms.toFixed(1)} ms`})]})}function Re({snapshot:t,timeSpent:n,entries:r,loafSupported:a}){const i=n?.budget??null,l=i?k(i.frameMs,i.loopMs):k(t.p95Ms,t.cpuMs),d=1e4,p=ue(r.filter(u=>(u.startTime??0)>=performance.now()-d));return n===null&&!l.dominated&&p.longFrameCount===0?null:e.jsxs("div",{"data-testid":"time-spent-section",style:{marginTop:o[6],border:`1px solid ${s.boundary.default}`},children:[e.jsx("div",{style:{padding:"7px 10px",borderBottom:`1px solid ${s.boundary.default}`,color:s.content.muted},children:"Where the frame goes"}),n!==null&&e.jsx("div",{"data-testid":"time-spent-tree",style:{paddingBottom:o[1]},children:n.rows.map(u=>e.jsx(ke,{row:u,rootMs:n.budget.frameMs},`${u.depth}:${u.label}`))}),l.dominated&&e.jsxs("div",{style:{padding:`${o[3]} ${o[5]}`,color:s.content.muted,borderTop:`1px solid ${s.boundary.default}`},children:["The measured loop explains less than half of the frame time — the bottleneck is"," ",p.scripts.length>0?"partly the main-thread work below, and the rest":"not on the main thread: look at the display pipeline"," ","(GPU/compositor: post-effects, glass chrome, pixel ratio) or browser throttling."]}),p.scripts.length>0&&e.jsx("div",{style:{padding:"5px 10px 2px",borderTop:`1px solid ${s.boundary.default}`,fontSize:m.sm,color:s.content.dim},children:"Named main-thread offenders — longer memory than the tree (last 10s of long frames)"}),p.scripts.map(u=>e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:o[8],padding:`${o[2]} ${o[5]}`},children:[e.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:u.key}),e.jsxs("span",{style:{fontVariantNumeric:"tabular-nums"},children:[u.totalMs," ms ×",u.count]})]},u.key)),p.longFrameCount>0&&e.jsxs("div",{style:{padding:`${o[2]} ${o[5]}`,fontSize:m.sm,color:s.content.dim},children:[p.longFrameCount," long main-thread frame",p.longFrameCount===1?"":"s"," (",p.totalLongMs," ms total, ",p.unattributedMs," ms unattributed style/layout/GC) — browser long-animation-frame report, last 10s."]}),!a&&e.jsx("div",{style:{padding:`${o[2]} ${o[5]}`,fontSize:m.sm,color:s.content.dim},children:"Main-thread attribution unavailable — this browser does not support long-animation-frame timing."})]})}function Be(){const t=de(),n=t?.profiler??null,[r,a]=h.useState(B),[i,l]=h.useState(!1),[d,p]=h.useState(!1),[u,c]=h.useState("overview"),g=h.useRef(!1),F=De(n),V=Ee(n,r,F.entries),_=()=>{const f=!g.current;g.current=f,l(f),!f&&n&&a(n.getSnapshot())},W=()=>{if(!n)return;const f=!n.enabled;f&&p(!1),n.enabled=f,a(n.getSnapshot())};return h.useEffect(()=>{if(!n){a(B);return}g.current=!1,l(!1),p(!1);const f=n.enabled;n.enabled=!0,a(n.getSnapshot());let y=null,v=performance.now();const G=()=>{y=null,!g.current&&(v=performance.now(),a(n.getSnapshot()))},J=n.subscribe(()=>{if(g.current||y!==null)return;const X=Math.max(0,Te-(performance.now()-v));y=setTimeout(G,X)});return()=>{J(),y!==null&&clearTimeout(y),!f&&!n.recording&&(n.enabled=!1)}},[n]),n?e.jsxs("div",{className:"volter-content-frost",style:{height:"100%",overflow:"auto",padding:o[6],color:s.content.primary,fontSize:m.md},children:[e.jsxs("div",{style:{marginBottom:o[5],color:s.content.muted},children:["Profiling ",e.jsx("span",{style:{color:s.content.primary},children:t?.label}),r.enabled&&d&&e.jsx(Y,{style:{marginLeft:o[4]},children:"Profiling active"})]}),r.enabled&&!d&&e.jsxs(q,{tone:"warning",style:{marginBottom:o[5]},actions:e.jsx(x,{size:"compact",variant:"ghost",onClick:()=>p(!0),children:"Dismiss"}),children:["Live profiling is active and adds measurement overhead. Displayed timings include that cost",r.recording?"; capture recording adds detailed timing marks":"","."]}),e.jsxs("div",{style:{display:"flex",gap:o[4],alignItems:"center",marginBottom:o[6]},children:[e.jsx(x,{size:"compact",onClick:_,children:i?"Resume view":"Freeze view"}),e.jsxs(x,{size:"compact",onClick:W,children:[r.enabled?"Disable":"Enable"," profiler"]}),e.jsx(x,{size:"compact",onClick:()=>r.recording?n.stopRecording():n.startRecording(),children:r.recording?"Stop capture":"Record capture"}),e.jsx(x,{size:"compact",onClick:()=>n.clear(),children:"Clear"}),e.jsx(x,{size:"compact",onClick:()=>Me(n),children:"Export JSON"}),e.jsx(x,{size:"compact","data-testid":"profiler-export-trace",onClick:()=>ze(n,t?.label??"volter"),children:"Export Chrome trace"})]}),e.jsx(A,{"aria-label":"Profiler views",style:{marginBottom:o[6]},children:[["overview","Overview"],["flamegraph","Flamegraph"],["memory","Memory"]].map(([f,y])=>e.jsx(U,{selected:u===f,"data-testid":`profiler-view-${f}`,onClick:()=>c(f),children:y},f))}),u==="flamegraph"&&e.jsx(Pe,{snapshot:r}),u==="memory"&&e.jsx(Fe,{}),u==="overview"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(80px, 1fr))",gap:o[4]},children:[["FPS",r.fps.toFixed(0)],["CPU",`${r.cpuMs.toFixed(2)} ms`],["p95 frame",`${r.p95Ms.toFixed(2)} ms`],["p99 frame",`${r.p99Ms.toFixed(2)} ms`],["GPU",r.render.gpuMs===null?"n/a":`${r.render.gpuMs.toFixed(2)} ms`],["Draw calls",String(r.render.drawCalls)],["Triangles",r.render.triangles.toLocaleString()]].map(([f,y])=>e.jsxs("div",{style:{border:`1px solid ${s.boundary.default}`,padding:o[5]},children:[e.jsx("div",{style:{color:s.content.dim,textTransform:"uppercase",fontSize:m.sm},children:f}),e.jsx("div",{style:{fontSize:18,color:s.content.primary,marginTop:3},children:y})]},f))}),e.jsx(Re,{snapshot:r,timeSpent:V,entries:F.entries,loafSupported:F.supported}),[["Components (recording)",r.components]].map(([f,y])=>e.jsxs("div",{style:{marginTop:o[6],border:`1px solid ${s.boundary.default}`},children:[e.jsx("div",{style:{padding:"7px 10px",borderBottom:`1px solid ${s.boundary.default}`,color:s.content.muted},children:f}),y.slice(0,12).map(v=>e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:o[8],padding:`${o[2]} ${o[5]}`},children:[e.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:v.name}),e.jsxs("span",{style:{fontVariantNumeric:"tabular-nums"},children:[v.ms.toFixed(2)," ms"]})]},v.name))]},f))]})]}):e.jsx("div",{style:{padding:o[6],fontSize:m.md,color:s.content.muted,maxWidth:480},children:e.jsx("p",{style:{margin:0},children:D().documents.active()?"The active document has no live render loop to profile.":"Open a rendered document to profile it."})})}const Ie=[{id:"profiler",label:"Profiler"},{id:"frame",label:"Frame"}];function Le(){h.useSyncExternalStore(C.subscribe,C.version,C.version);const t=C.active();return e.jsxs("div",{"data-testid":"profiler-panel",style:{flex:1,minHeight:0,display:"flex",flexDirection:"column"},children:[e.jsx(A,{"aria-label":"Profiler views",children:Ie.map(n=>e.jsx(U,{selected:t===n.id,"data-testid":`profiler-tab-${n.id}`,onClick:()=>C.select(n.id),children:n.label},n.id))}),e.jsxs("div",{role:"tabpanel",style:{flex:1,minHeight:0,display:"flex"},children:[t==="profiler"&&e.jsx(Be,{}),t==="frame"&&e.jsx(ve,{})]})]})}const Ye="workspace.utility",qe="Profiler",Ke=20;function Qe(){return e.jsx(Le,{})}export{Qe as default,Ke as order,Ye as point,qe as title};
1
+ import{a as e}from"./jsx-runtime-DPjLkJKQ.js";import{p as C}from"./utility-view-state-rnZf-khZ.js";import{r as h}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{a3 as N,r as D,af as s,a0 as x,ep as m,en as o,hG as Y,dV as q,hI as A,hH as U,jI as K,jJ as Q}from"./index-DhfMfVJj.js";import{s as Z,f as E,a as ee,d as H,c as te,b as ne,g as se,l as re,i as ae,e as oe,h as ie,j as le,u as de,t as ce,k as pe,m as me,n as T,o as k,p as ue}from"./frame-debugger-store-CYjZTL1N.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const j={fontFamily:s.typography.mono,fontSize:11};function fe({draw:t,selected:n,onSelect:r}){return e.jsxs(x,{type:"button",variant:"ghost","data-testid":"frame-draw-row","data-draw-index":t.index,"data-selected":n||void 0,className:"volter-frame-draw-row",onClick:r,children:[e.jsxs("span",{style:{...j,color:s.content.dim,width:34,display:"inline-block"},children:["#",t.index]}),e.jsx("span",{style:{...j,color:s.content.primary},children:t.mode}),e.jsxs("span",{style:{...j,color:s.content.muted},children:[" ",t.count]}),t.instanceCount!==null&&e.jsxs("span",{style:{...j,color:s.content.muted},children:[" ×",t.instanceCount]}),e.jsxs("span",{style:{...j,color:t.annotation?s.content.primary:s.content.dim,fontStyle:t.annotation?"normal":"italic"},children:[" ",t.annotation?t.annotation.object.name||t.annotation.object.type:"unattributed"]})]})}function b({label:t,value:n}){return e.jsxs("div",{style:{display:"flex",gap:8,padding:"1px 0"},children:[e.jsx("span",{style:{fontSize:10,color:s.content.muted,width:92,flexShrink:0},children:t}),e.jsx("span",{style:{...j,color:s.content.primary},children:n})]})}const M=t=>t?"on":"off";function he(t){if(t.kind==="canvas")return"canvas (default framebuffer)";const n=t.width!==null&&t.height!==null?`${t.width}×${t.height}`:"(size not queryable)";return`${t.label??"framebuffer"} ${n}`}function xe(t){return`blend ${M(t.blend)} · depth test ${M(t.depthTest)} · depth write ${M(t.depthWrite)} · cull ${t.cull} · scissor ${M(t.scissor)}`}function ge(t){const n=t.instanceCount!==null?` · ${t.instanceCount} instances`:" · not instanced";return`${t.mode} · ${t.count}${n}`}function ye({draw:t}){return e.jsxs("div",{"data-testid":"frame-draw-detail",style:{padding:8},children:[e.jsx(b,{label:"entry point",value:t.entryPoint}),e.jsx(b,{label:"mode / count",value:ge(t)}),e.jsx(b,{label:"program",value:t.programLabel??"none bound"}),e.jsx(b,{label:"target",value:he(t.target)}),e.jsx(b,{label:"viewport",value:`[${t.viewport.join(", ")}]`}),e.jsx(b,{label:"state",value:xe(t.state)}),t.annotation?e.jsxs(e.Fragment,{children:[e.jsx(b,{label:"object",value:`${t.annotation.object.name||"(unnamed)"} · ${t.annotation.object.type}`}),e.jsx(b,{label:"geometry",value:`${t.annotation.geometry.name||t.annotation.geometry.type}${t.annotation.geometry.indexed?" · indexed":""}`}),e.jsx(b,{label:"attributes",value:t.annotation.geometry.attributes.join(", ")||"—"}),e.jsx(b,{label:"material",value:`${t.annotation.material.name||"(unnamed)"} · ${t.annotation.material.type}`})]}):e.jsx("div",{"data-testid":"frame-draw-unattributed",style:{marginTop:6,fontSize:11,fontStyle:"italic",color:s.content.muted},children:"Not attributable (shadow / post-processing pass — the instrument attributes only main-pass draws through each object's onBeforeRender, and reports the gap honestly rather than guessing)."})]})}function be({capture:t,drawIndex:n,setDrawIndex:r}){const a=t.drawCalls.length,i=Math.min(n,Math.max(0,a-1)),l=t.drawCalls[i]??null,d=le(t);return e.jsxs("div",{style:{flex:1,minHeight:0,display:"flex"},children:[e.jsxs("div",{style:{flex:1,minWidth:0,overflow:"auto",borderRight:`1px solid ${s.boundary.default}`},children:[e.jsxs("div",{style:{display:"flex",gap:6,alignItems:"center",padding:4,borderBottom:`1px solid ${s.boundary.default}`},children:[e.jsx(x,{type:"button",size:"compact",variant:"ghost","data-testid":"frame-draw-prev",disabled:i<=0,onClick:()=>r(Math.max(0,i-1)),children:"◀ Prev"}),e.jsx(x,{type:"button",size:"compact",variant:"ghost","data-testid":"frame-draw-next",disabled:i>=a-1,onClick:()=>r(Math.min(a-1,i+1)),children:"Next ▶"}),e.jsxs("span",{style:{fontSize:10,color:s.content.muted},children:[a===0?"0":i+1,"/",a]})]}),d.map(p=>e.jsxs("div",{"data-testid":"frame-target-group","data-target":p.target,children:[e.jsxs("div",{style:{...j,padding:"2px 8px",color:s.content.muted,borderTop:`1px solid ${s.boundary.default}`,borderBottom:`1px solid ${s.boundary.default}`},children:[p.target," · ",p.draws.length," draws"]}),p.draws.map(u=>e.jsx(fe,{draw:u,selected:u.index===i,onSelect:()=>r(u.index)},u.index))]},p.target))]}),e.jsxs("div",{style:{flex:1,minWidth:0,overflow:"auto"},children:[l?e.jsx(ye,{draw:l}):e.jsx("div",{style:{padding:12,color:s.content.muted,fontSize:12},children:"This capture recorded no draws."}),t.notes.length>0&&e.jsx("div",{style:{padding:"4px 8px",fontSize:10,color:s.content.dim},"data-testid":"frame-capture-notes",children:t.notes.join(" ")})]})]})}function je({captures:t,selectedId:n}){return e.jsx("div",{"data-testid":"frame-capture-history",style:{display:"flex",gap:6,flexWrap:"wrap",padding:"4px 8px",borderBottom:`1px solid ${s.boundary.default}`},children:t.map(r=>{const a=oe(r);return e.jsxs(x,{type:"button",size:"compact",variant:"ghost","data-testid":"frame-capture-item","data-capture-id":r.id,"data-selected":r.id===n||void 0,onClick:()=>ie(r.id),children:["#",r.id," · ",a.drawCalls," draws",a.unattributed>0?` · ${a.unattributed} unattr`:"",a.truncated>0?` · +${a.truncated} capped`:""]},r.id)})})}function ve(){h.useSyncExternalStore(Z,E,E);const[t,n]=h.useState(0),r=N(()=>D().systems.inspected().renderDebug??null);h.useEffect(()=>{ee(r)},[r]);const a=H(r),i=se(),l=i.selected;if(h.useEffect(()=>{n(0)},[l?.id]),!r||!a)return e.jsxs("div",{"data-testid":"frame-debugger-empty",style:{padding:16,color:s.content.muted,fontSize:12,lineHeight:"18px"},children:[e.jsx("div",{style:{color:s.content.primary,marginBottom:4},children:"No render-debug adapter — no game session is running."}),"Frame capture exists only while a game session runs. Press Play: first-party worlds register a ",e.jsx("code",{style:j,children:"RenderDebugAdapter"})," automatically when they hold a real WebGL2 context; a custom world exposes its own via"," ",e.jsx("code",{style:j,children:"ctx.registerSystemAdapter?.('renderDebug', adapter)"}),". A headless mount registers none — there is nothing to capture."]});const d=re(),p=ae();return e.jsxs("div",{"data-testid":"frame-debugger",className:"volter-content-frost",style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",fontSize:12},children:[e.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:10,alignItems:"center",padding:"4px 8px",borderBottom:`1px solid ${s.boundary.default}`},children:[e.jsx(x,{type:"button",size:"compact","data-testid":"frame-capture-button",disabled:p,onClick:()=>void te(r),children:p?"Capturing…":"Capture frame"}),e.jsx("span",{style:{fontSize:10,color:s.content.dim},children:"Single-frame draw-call list with per-draw state — not a GPU replayer."}),i.all.length>0&&e.jsx(x,{type:"button",size:"compact",variant:"ghost","data-testid":"frame-capture-clear",onClick:()=>ne(),children:"Clear"})]}),d&&e.jsxs("div",{"data-testid":"frame-capture-error",style:{padding:"4px 8px",fontSize:11,color:s.semantic.danger,borderBottom:`1px solid ${s.boundary.default}`},children:["Capture failed: ",d]}),i.all.length>0&&e.jsx(je,{captures:i.all,selectedId:l?.id??null}),l?e.jsx(be,{capture:l,drawIndex:t,setDrawIndex:n},l.id):e.jsxs("div",{"data-testid":"frame-debugger-no-capture",style:{padding:12,color:s.content.muted,fontSize:12},children:["No frame captured yet. Press ",e.jsx("strong",{children:"Capture frame"})," while the game renders."]})]})}const S=1,w=1,Se=1e3;function $(t){return Math.round(t*Se)}function we(t,n){const r=[];r.push({name:"process_name",cat:"__metadata",ph:"M",ts:0,dur:0,pid:S,tid:w,args:{name:n.processName}}),r.push({name:"thread_name",cat:"__metadata",ph:"M",ts:0,dur:0,pid:S,tid:w,args:{name:n.threadName}});for(const a of t){const i=a.timestamp-a.cpuMs,l=$(i);r.push({name:`frame ${a.id}`,cat:"frame",ph:"X",ts:l,dur:$(a.cpuMs),pid:S,tid:w,args:{id:a.id,drawCalls:a.render.drawCalls,triangles:a.render.triangles}});for(const d of a.phases)r.push({name:d.name,cat:"phase",ph:"X",ts:$(i+(d.startMs??0)),dur:$(d.ms),pid:S,tid:w});for(const d of a.systems)r.push({name:d.name,cat:"system",ph:"X",ts:$(i+d.startMs),dur:$(d.ms),pid:S,tid:w,args:{phase:d.phase}});r.push({name:"render",cat:"counter",ph:"C",ts:l,dur:0,pid:S,tid:w,args:{drawCalls:a.render.drawCalls,triangles:a.render.triangles}})}return{traceEvents:r,displayTimeUnit:"ms",otherData:{version:2,processName:n.processName,threadName:n.threadName,frameCount:t.length}}}function $e(t){if(t.length<4)return 0;let n=Number.POSITIVE_INFINITY;for(const a of t)n=Math.min(n,a);let r=0;for(const a of t)r+=Math.max(0,a-n);return r}const R=1200;function Ce(){const t=[];let n=null,r=0;const a=()=>{const i=performance.now();t.push({t:i,gapMs:i-r}),t.length>R&&t.splice(0,t.length-R),r=i,n=setTimeout(a,0)};return{start(){n===null&&(t.length=0,r=performance.now(),n=setTimeout(a,0))},stop(){n!==null&&(clearTimeout(n),n=null)},busySince(i){const l=[];for(const d of t)d.t>=i&&l.push(d.gapMs);return{busyMs:$e(l),sampleCount:l.length}}}}const B={enabled:!1,recording:!1,fps:0,cpuMs:0,p95Ms:0,p99Ms:0,frames:[],phases:[],systems:[],components:[],render:{gpuMs:null,drawCalls:0,triangles:0,geometries:0,textures:0,renderPasses:null}},Te=500;function Me(t){const n=URL.createObjectURL(new Blob([t.exportJSON()],{type:"application/json"})),r=document.createElement("a");r.href=n,r.download=`volter-performance-${new Date().toISOString().replaceAll(":","-")}.json`,r.click(),URL.revokeObjectURL(n)}function ze(t,n){const r=we(t.getSnapshot().frames,{processName:n,threadName:"main"}),a=URL.createObjectURL(new Blob([JSON.stringify(r)],{type:"application/json"})),i=document.createElement("a");i.href=a,i.download=`volter-trace-${new Date().toISOString().replaceAll(":","-")}.json`,i.click(),URL.revokeObjectURL(a)}const z=720,P=18,I=40,L=[s.accent.default,s.semantic.success,s.semantic.warning,s.content.muted];function Pe({snapshot:t}){const n=t.frames,[r,a]=h.useState(null),i=r!==null&&r<n.length?r:n.length-1,l=n[i],d=pe(n,z,I),p=l?me(l,z):[],u=p.reduce((c,g)=>Math.max(c,g.depth),0);return n.length===0?e.jsxs("div",{"data-testid":"flamegraph-empty",style:{padding:o[6],color:s.content.muted},children:["No frames recorded yet. Frames accumulate while the profiler is enabled; use"," ",e.jsx("strong",{children:"Record capture"})," to also collect per-component spans."]}):e.jsxs("div",{"data-testid":"flamegraph-view",style:{padding:o[4]},children:[e.jsxs("div",{style:{marginBottom:o[4],color:s.content.muted},children:["Frame ",e.jsx("span",{style:{color:s.content.primary},children:l?l.id:"—"})," ·"," ",l?`${l.cpuMs.toFixed(2)} ms CPU`:""," · GPU"," ",e.jsx("span",{style:{color:s.content.primary},children:l&&l.render.gpuMs!==null?`${l.render.gpuMs.toFixed(2)} ms`:"n/a"})]}),e.jsx("div",{"data-testid":"flame-frame-strip",style:{position:"relative",width:z,height:I,boxShadow:`inset 0 0 0 1px ${s.boundary.default}`,marginBottom:o[5]},children:d.map(c=>e.jsx("div",{role:"button",tabIndex:0,"data-testid":"flame-frame-bar","data-frame-index":c.index,"data-selected":c.index===i||void 0,title:`frame ${c.frameId} · ${c.cpuMs.toFixed(2)} ms`,onClick:()=>a(c.index),onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&a(c.index)},style:{position:"absolute",left:c.x,bottom:0,width:Math.max(1,c.w-1),height:Math.max(1,c.h),cursor:"pointer",background:c.index===i?s.semantic.warning:s.accent.default}},c.frameId))}),e.jsx("div",{"data-testid":"flamegraph-rows",style:{position:"relative",width:z,height:(u+1)*P},children:p.map((c,g)=>e.jsx("div",{"data-testid":"flame-rect","data-depth":c.depth,"data-name":c.label,title:`${c.label} · ${c.ms.toFixed(3)} ms`,style:{position:"absolute",left:c.x,top:c.depth*P,width:Math.max(1,c.w),height:P-1,overflow:"hidden",whiteSpace:"nowrap",fontSize:m.sm,lineHeight:`${P-1}px`,paddingLeft:3,color:s.content.onAccent,background:L[Math.min(c.depth,L.length-1)],borderRight:`1px solid ${s.surface.inset}`},children:c.label},`${c.depth}-${g}-${c.label}`))}),e.jsxs("div",{style:{marginTop:o[3],fontSize:m.sm,color:s.content.dim},children:["Rows: frame · phase · system",t.recording?" · component (recording)":"",". Only measured CPU spans are drawn — GPU time is a whole-frame aggregate, never a fabricated lane."]})]})}function O({title:t,entries:n,estimated:r,testId:a}){return e.jsxs("div",{"data-testid":a,style:{marginTop:o[5],border:`1px solid ${s.boundary.default}`},children:[e.jsxs("div",{style:{padding:`${o[3]} ${o[5]}`,borderBottom:`1px solid ${s.boundary.default}`,color:s.content.muted},children:[t,r&&e.jsx("span",{style:{marginLeft:o[3],fontSize:m.xs,color:s.content.dim},children:"ESTIMATED"})]}),n.length===0?e.jsx("div",{style:{padding:`${o[2]} ${o[5]}`,color:s.content.dim,fontSize:m.base},children:"none"}):n.map(i=>e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:o[8],padding:"3px 10px"},children:[e.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i.name}),e.jsx("span",{style:{fontVariantNumeric:"tabular-nums"},children:T(i.bytes)})]},i.name))]})}function Fe(){const t=N(()=>D().systems.inspected().renderDebug??null),n=H(t),[r,a]=h.useState(null);h.useEffect(()=>{if(!t?.memorySnapshot){a(null);return}const l=()=>a(t.memorySnapshot?.()??null);l();const d=setInterval(l,1e3);return()=>clearInterval(d)},[t]);const i=K();return e.jsxs("div",{style:{padding:o[4]},children:[e.jsxs("div",{"data-testid":"memory-heap",style:{border:`1px solid ${s.boundary.default}`,padding:o[5],marginBottom:o[5]},children:[e.jsx("div",{style:{color:s.content.dim,textTransform:"uppercase",fontSize:m.sm},children:"JS heap (performance.memory)"}),Q(i)?e.jsxs("div",{style:{fontSize:m.xl,color:s.content.primary,marginTop:3},children:[T(i.usedBytes)," ",e.jsxs("span",{style:{fontSize:m.base,color:s.content.muted},children:["used / ",T(i.totalBytes)," total"]})]}):e.jsx("div",{"data-testid":"memory-heap-unavailable",style:{fontSize:m.base,color:s.content.muted,marginTop:3,fontStyle:"italic"},children:i.unavailable})]}),n?.memory?r===null?e.jsx("div",{style:{padding:o[4],color:s.content.muted,fontSize:m.base},children:"Waiting for the first render-memory sample…"}):e.jsxs("div",{"data-testid":"memory-section",children:[e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, minmax(80px, 1fr))",gap:o[4]},children:[["Geometries",String(r.counts.geometries)],["Textures",String(r.counts.textures)],["Programs",r.counts.programs===null?"n/a until first render":String(r.counts.programs)]].map(([l,d])=>e.jsxs("div",{style:{border:`1px solid ${s.boundary.default}`,padding:o[5]},children:[e.jsx("div",{style:{color:s.content.dim,textTransform:"uppercase",fontSize:m.sm},children:l}),e.jsx("div",{style:{fontSize:m["2xl"],color:s.content.primary,marginTop:3},children:d})]},l))}),e.jsxs("div",{"data-testid":"memory-vram-totals",style:{display:"flex",gap:18,marginTop:o[5],fontSize:m.base,color:s.content.muted},children:[e.jsxs("span",{children:["geometry buffers"," ",e.jsx("span",{style:{color:s.content.primary},children:T(r.estimatedGeometryBytes)})," ",e.jsx("span",{style:{fontSize:m.xs,color:s.content.dim},children:"EXACT"})]}),e.jsxs("span",{children:["texture VRAM"," ",e.jsx("span",{style:{color:s.content.primary},children:T(r.estimatedTextureBytes)})," ",e.jsx("span",{style:{fontSize:m.xs,color:s.content.dim},children:"ESTIMATED"})]})]}),e.jsx(O,{title:"Top geometries",entries:r.topGeometries,estimated:!1,testId:"memory-top-geometries"}),e.jsx(O,{title:"Top textures",entries:r.topTextures,estimated:!0,testId:"memory-top-textures"}),r.unestimated.length>0&&e.jsxs("div",{"data-testid":"memory-unestimated",style:{marginTop:o[5],border:`1px solid ${s.boundary.default}`},children:[e.jsxs("div",{style:{padding:`${o[3]} ${o[5]}`,borderBottom:`1px solid ${s.boundary.default}`,color:s.content.muted},children:["Unmeasured textures (",r.unestimated.length,") — excluded from the total, not zeroed"]}),r.unestimated.map(l=>e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:o[8],padding:"3px 10px",fontSize:m.base},children:[e.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:l.name}),e.jsx("span",{style:{color:s.content.dim},children:l.reason})]},l.name))]})]}):e.jsxs("div",{"data-testid":"memory-absent",style:{padding:o[4],color:s.content.muted,fontSize:m.base,fontStyle:"italic"},children:["Render-memory introspection is not provided by this world's adapter — a headless mount has no ",e.jsx("code",{children:"renderer.info"}),", and a canvas (PixiJS) world's renderer publishes no managed geometry collection to measure at all. Enter Play with a first-party three world to inspect geometry/texture footprints."]})]})}function De(t){const n=h.useRef([]),r=typeof PerformanceObserver<"u"&&(PerformanceObserver.supportedEntryTypes??[]).includes("long-animation-frame");return h.useEffect(()=>{if(!t||!r)return;n.current=[];const a=new PerformanceObserver(i=>{const l=n.current;for(const d of i.getEntries())l.push(d);l.length>40&&l.splice(0,l.length-40)});return a.observe({type:"long-animation-frame"}),()=>a.disconnect()},[t,r]),{entries:n.current,supported:r}}function Ee(t,n,r){const a=h.useRef(null);a.current===null&&(a.current=Ce()),h.useEffect(()=>{const l=a.current;if(!(!t||!l))return l.start(),()=>l.stop()},[t]);const i=performance.now()-1e3;return ce(n.frames,i,a.current.busySince(i),r)}function ke({row:t,rootMs:n}){const r=t.ms!==null&&n>0?Math.min(1,t.ms/n):0,a=t.depth===0;return e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"260px 1fr 70px",gap:o[5],padding:`${o[2]} ${o[5]}`,paddingLeft:10+t.depth*16},children:[e.jsxs("span",{style:{color:a||t.depth===1?s.content.primary:s.content.muted,fontStyle:t.parallel?"italic":void 0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:t.note?`${t.label} — ${t.note}`:t.label,children:[t.label,t.note&&e.jsx("span",{style:{marginLeft:o[3],fontSize:m.sm,color:s.content.dim},children:t.note})]}),e.jsx("div",{style:{background:s.surface.raised,height:6,marginTop:5,opacity:t.parallel?.45:1},children:e.jsx("div",{style:{width:`${r*100}%`,height:"100%",background:!a&&t.ms!==null&&t.ms>8?s.semantic.warning:s.accent.default}})}),e.jsx("span",{style:{textAlign:"right",fontVariantNumeric:"tabular-nums",color:a?s.content.primary:void 0},children:t.ms===null?"—":`${t.ms.toFixed(1)} ms`})]})}function Re({snapshot:t,timeSpent:n,entries:r,loafSupported:a}){const i=n?.budget??null,l=i?k(i.frameMs,i.loopMs):k(t.p95Ms,t.cpuMs),d=1e4,p=ue(r.filter(u=>(u.startTime??0)>=performance.now()-d));return n===null&&!l.dominated&&p.longFrameCount===0?null:e.jsxs("div",{"data-testid":"time-spent-section",style:{marginTop:o[6],border:`1px solid ${s.boundary.default}`},children:[e.jsx("div",{style:{padding:"7px 10px",borderBottom:`1px solid ${s.boundary.default}`,color:s.content.muted},children:"Where the frame goes"}),n!==null&&e.jsx("div",{"data-testid":"time-spent-tree",style:{paddingBottom:o[1]},children:n.rows.map(u=>e.jsx(ke,{row:u,rootMs:n.budget.frameMs},`${u.depth}:${u.label}`))}),l.dominated&&e.jsxs("div",{style:{padding:`${o[3]} ${o[5]}`,color:s.content.muted,borderTop:`1px solid ${s.boundary.default}`},children:["The measured loop explains less than half of the frame time — the bottleneck is"," ",p.scripts.length>0?"partly the main-thread work below, and the rest":"not on the main thread: look at the display pipeline"," ","(GPU/compositor: post-effects, glass chrome, pixel ratio) or browser throttling."]}),p.scripts.length>0&&e.jsx("div",{style:{padding:"5px 10px 2px",borderTop:`1px solid ${s.boundary.default}`,fontSize:m.sm,color:s.content.dim},children:"Named main-thread offenders — longer memory than the tree (last 10s of long frames)"}),p.scripts.map(u=>e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:o[8],padding:`${o[2]} ${o[5]}`},children:[e.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:u.key}),e.jsxs("span",{style:{fontVariantNumeric:"tabular-nums"},children:[u.totalMs," ms ×",u.count]})]},u.key)),p.longFrameCount>0&&e.jsxs("div",{style:{padding:`${o[2]} ${o[5]}`,fontSize:m.sm,color:s.content.dim},children:[p.longFrameCount," long main-thread frame",p.longFrameCount===1?"":"s"," (",p.totalLongMs," ms total, ",p.unattributedMs," ms unattributed style/layout/GC) — browser long-animation-frame report, last 10s."]}),!a&&e.jsx("div",{style:{padding:`${o[2]} ${o[5]}`,fontSize:m.sm,color:s.content.dim},children:"Main-thread attribution unavailable — this browser does not support long-animation-frame timing."})]})}function Be(){const t=de(),n=t?.profiler??null,[r,a]=h.useState(B),[i,l]=h.useState(!1),[d,p]=h.useState(!1),[u,c]=h.useState("overview"),g=h.useRef(!1),F=De(n),V=Ee(n,r,F.entries),_=()=>{const f=!g.current;g.current=f,l(f),!f&&n&&a(n.getSnapshot())},W=()=>{if(!n)return;const f=!n.enabled;f&&p(!1),n.enabled=f,a(n.getSnapshot())};return h.useEffect(()=>{if(!n){a(B);return}g.current=!1,l(!1),p(!1);const f=n.enabled;n.enabled=!0,a(n.getSnapshot());let y=null,v=performance.now();const G=()=>{y=null,!g.current&&(v=performance.now(),a(n.getSnapshot()))},J=n.subscribe(()=>{if(g.current||y!==null)return;const X=Math.max(0,Te-(performance.now()-v));y=setTimeout(G,X)});return()=>{J(),y!==null&&clearTimeout(y),!f&&!n.recording&&(n.enabled=!1)}},[n]),n?e.jsxs("div",{className:"volter-content-frost",style:{height:"100%",overflow:"auto",padding:o[6],color:s.content.primary,fontSize:m.md},children:[e.jsxs("div",{style:{marginBottom:o[5],color:s.content.muted},children:["Profiling ",e.jsx("span",{style:{color:s.content.primary},children:t?.label}),r.enabled&&d&&e.jsx(Y,{style:{marginLeft:o[4]},children:"Profiling active"})]}),r.enabled&&!d&&e.jsxs(q,{tone:"warning",style:{marginBottom:o[5]},actions:e.jsx(x,{size:"compact",variant:"ghost",onClick:()=>p(!0),children:"Dismiss"}),children:["Live profiling is active and adds measurement overhead. Displayed timings include that cost",r.recording?"; capture recording adds detailed timing marks":"","."]}),e.jsxs("div",{style:{display:"flex",gap:o[4],alignItems:"center",marginBottom:o[6]},children:[e.jsx(x,{size:"compact",onClick:_,children:i?"Resume view":"Freeze view"}),e.jsxs(x,{size:"compact",onClick:W,children:[r.enabled?"Disable":"Enable"," profiler"]}),e.jsx(x,{size:"compact",onClick:()=>r.recording?n.stopRecording():n.startRecording(),children:r.recording?"Stop capture":"Record capture"}),e.jsx(x,{size:"compact",onClick:()=>n.clear(),children:"Clear"}),e.jsx(x,{size:"compact",onClick:()=>Me(n),children:"Export JSON"}),e.jsx(x,{size:"compact","data-testid":"profiler-export-trace",onClick:()=>ze(n,t?.label??"volter"),children:"Export Chrome trace"})]}),e.jsx(A,{"aria-label":"Profiler views",style:{marginBottom:o[6]},children:[["overview","Overview"],["flamegraph","Flamegraph"],["memory","Memory"]].map(([f,y])=>e.jsx(U,{selected:u===f,"data-testid":`profiler-view-${f}`,onClick:()=>c(f),children:y},f))}),u==="flamegraph"&&e.jsx(Pe,{snapshot:r}),u==="memory"&&e.jsx(Fe,{}),u==="overview"&&e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(80px, 1fr))",gap:o[4]},children:[["FPS",r.fps.toFixed(0)],["CPU",`${r.cpuMs.toFixed(2)} ms`],["p95 frame",`${r.p95Ms.toFixed(2)} ms`],["p99 frame",`${r.p99Ms.toFixed(2)} ms`],["GPU",r.render.gpuMs===null?"n/a":`${r.render.gpuMs.toFixed(2)} ms`],["Draw calls",String(r.render.drawCalls)],["Triangles",r.render.triangles.toLocaleString()]].map(([f,y])=>e.jsxs("div",{style:{border:`1px solid ${s.boundary.default}`,padding:o[5]},children:[e.jsx("div",{style:{color:s.content.dim,textTransform:"uppercase",fontSize:m.sm},children:f}),e.jsx("div",{style:{fontSize:18,color:s.content.primary,marginTop:3},children:y})]},f))}),e.jsx(Re,{snapshot:r,timeSpent:V,entries:F.entries,loafSupported:F.supported}),[["Components (recording)",r.components]].map(([f,y])=>e.jsxs("div",{style:{marginTop:o[6],border:`1px solid ${s.boundary.default}`},children:[e.jsx("div",{style:{padding:"7px 10px",borderBottom:`1px solid ${s.boundary.default}`,color:s.content.muted},children:f}),y.slice(0,12).map(v=>e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:o[8],padding:`${o[2]} ${o[5]}`},children:[e.jsx("span",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:v.name}),e.jsxs("span",{style:{fontVariantNumeric:"tabular-nums"},children:[v.ms.toFixed(2)," ms"]})]},v.name))]},f))]})]}):e.jsx("div",{style:{padding:o[6],fontSize:m.md,color:s.content.muted,maxWidth:480},children:e.jsx("p",{style:{margin:0},children:D().documents.active()?"The active document has no live render loop to profile.":"Open a rendered document to profile it."})})}const Ie=[{id:"profiler",label:"Profiler"},{id:"frame",label:"Frame"}];function Le(){h.useSyncExternalStore(C.subscribe,C.version,C.version);const t=C.active();return e.jsxs("div",{"data-testid":"profiler-panel",style:{flex:1,minHeight:0,display:"flex",flexDirection:"column"},children:[e.jsx(A,{"aria-label":"Profiler views",children:Ie.map(n=>e.jsx(U,{selected:t===n.id,"data-testid":`profiler-tab-${n.id}`,onClick:()=>C.select(n.id),children:n.label},n.id))}),e.jsxs("div",{role:"tabpanel",style:{flex:1,minHeight:0,display:"flex"},children:[t==="profiler"&&e.jsx(Be,{}),t==="frame"&&e.jsx(ve,{})]})]})}const Ye="workspace.utility",qe="Profiler",Ke=20;function Qe(){return e.jsx(Le,{})}export{Qe as default,Ke as order,Ye as point,qe as title};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/world-documents-C1zfwUJ8.js","assets/jsx-runtime-DPjLkJKQ.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-DhfMfVJj.js","assets/index-nmcBqr7Y.js","assets/index-D_NuPfjr.js","assets/index-CtzuWnCS.js","assets/index-CinJrH5C.js","assets/index-FUuS4qwW.js","assets/client-DNXj_opT.js","assets/index-CPiRKiDC.css","assets/design-time-layers-utHBa_7o.js","assets/root-stacking-BEd9ZvxC.js","assets/edit-mode-authoring-D-F1_iFO.js","assets/design-time-mount-registry-DUpXCg1U.js","assets/react-story-board-D3lzaa3o.js","assets/game-surface-defaults-D8S4cRxi.js","assets/react-canvas-navigation-C_uPW5TY.js","assets/component-board-registry-DrIa2csL.js","assets/surface-state-Dc9frHdS.js","assets/board-guides-D3JHkcyj.js","assets/CanvasSceneViewport-DeyFl0d2.js","assets/RootSelectionOverlay-CuEtXTkF.js","assets/eyedropper-session-bjPXnfeX.js","assets/layered-pick-A5arowk9.js","assets/viewport-editor-controls-BYaAZ_Ku.js","assets/inspect-BooKKY95.js","assets/inference-diagnostics-CZtWDiNC.js","assets/Toolbar-D5Jw2AOx.js","assets/transform-mode-request-DJIOPPHR.js","assets/TransientHint-CYxpG2zv.js","assets/ReactCanvasControls-DKPi6NMs.js"])))=>i.map(i=>d[i]);
2
+ import{aN as u,aO as p,aP as l,_ as m,aQ as f,x as b}from"./index-DhfMfVJj.js";import{b as D,e as o,i as v}from"./edit-mode-authoring-D-F1_iFO.js";class P{constructor(s){this.store=s,this.unbind=D(()=>this.rebuild()),this.ready=this.rebuild()}references=0;disposed=!1;composite;disposeDocuments;stages=new Set;tail=Promise.resolve();unbind;ready;retain(){return this.references++,()=>{--this.references>0||(this.disposed=!0,this.unbind(),this.disposeDocuments?.(),o(this.composite),n.delete(this.store))}}attach(s){const r=this.retain();return this.stages.add(s),{ready:this.composite?s(this.composite):this.tail,dispose:()=>{this.stages.delete(s),r()}}}rebuild(){const s=this.tail.then(async()=>{if(this.disposed)return;const r=b(),a=new Set(p().map(t=>t.descriptor.id)),d=this.composite?l().map(t=>t.descriptor.id).filter(t=>a.has(t)):[];this.disposeDocuments?.(),this.disposeDocuments=void 0,o(this.composite),this.composite=void 0;const i=await v(this.store);if(this.disposed){o(i);return}const{installRootDocuments:h}=await m(async()=>{const{installRootDocuments:t}=await import("./world-documents-C1zfwUJ8.js");return{installRootDocuments:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]));if(this.disposed){o(i);return}this.composite=i,this.disposeDocuments=h(this.store,i);for(const t of d)f(t,t===r);await Promise.all([...this.stages].map(t=>t(i)))});return this.tail=s.catch(()=>{}),s}}const n=new Map;function c(e){let s=n.get(e);return s||(s=new P(e),n.set(e,s)),s}function y(e){const s=c(e);return{ready:s.ready.then(()=>u()),dispose:s.retain()}}function _(e,s){return c(e).attach(s)}export{_ as a,y as r};
@@ -1 +1 @@
1
- import{b as o,a as r}from"./blender-properties-tab-BVdvAiLS.js";import{CONSTRAINT_HEADER as i}from"./properties-constraints.inspector-DJITSHiL.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-iW3HFEJB.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"./blender-runtime-host-B1bjBV91.js";import"./preview-renderer-BrYNFV1p.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./renderer-ownership-BovSEcLv.js";import"./output-pass-HurwNl0G.js";import"./Pass-D1MRT672.js";import"./clip-planes-CnAI6DZn.js";import"./content-bounds-938XXJRy.js";import"./hierarchy-marks-BrmGekuT.js";import"./workspace-arrangement-6V8ZwB2d.js";const p=[{title:"Bone Constraints",from:"Constraints",collection:!0,properties:i,andDeclared:!0}],t={id:"bone_constraint",curated:p},H="selection.inspector",I="Bone Constraints",M="properties-bone-constraints",O=140,U="object",g=r(t),k=o(t);export{k as default,M as icon,g as match,O as order,H as point,U as railGroup,I as title};
1
+ import{b as o,a as r}from"./blender-properties-tab-DgVYwtk7.js";import{CONSTRAINT_HEADER as i}from"./properties-constraints.inspector-nN7DWtPi.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-DhfMfVJj.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"./blender-runtime-host-C7PTMb6j.js";import"./preview-renderer-BrYNFV1p.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./renderer-ownership-BovSEcLv.js";import"./output-pass-HurwNl0G.js";import"./Pass-D1MRT672.js";import"./clip-planes-CnAI6DZn.js";import"./content-bounds-BRqBJnLW.js";import"./hierarchy-marks-pP0yj7BM.js";import"./workspace-arrangement-BpSjUGOP.js";const p=[{title:"Bone Constraints",from:"Constraints",collection:!0,properties:i,andDeclared:!0}],t={id:"bone_constraint",curated:p},H="selection.inspector",I="Bone Constraints",M="properties-bone-constraints",O=140,U="object",g=r(t),k=o(t);export{k as default,M as icon,g as match,O as order,H as point,U as railGroup,I as title};
@@ -1 +1 @@
1
- import{b as o,a as t}from"./blender-properties-tab-BVdvAiLS.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-iW3HFEJB.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"./blender-runtime-host-B1bjBV91.js";import"./preview-renderer-BrYNFV1p.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./renderer-ownership-BovSEcLv.js";import"./output-pass-HurwNl0G.js";import"./Pass-D1MRT672.js";import"./clip-planes-CnAI6DZn.js";import"./content-bounds-938XXJRy.js";import"./hierarchy-marks-BrmGekuT.js";import"./workspace-arrangement-6V8ZwB2d.js";const i=[{title:"Transform (Pose)",from:"Pose Bone",properties:["location","lock_location","rotation_quaternion","rotation_axis_angle","rotation_euler","lock_rotation_w","lock_rotation","rotation_mode","scale","lock_scale"]},{title:"Transform",from:"Bone",properties:["head","tail","roll","length","lock"]},{title:"Bendy Bones",closed:!0,from:"Bone",properties:["bbone_segments","bbone_x","bbone_z","bbone_mapping_mode","use_endroll_as_inroll","use_scale_easing","bbone_handle_type_start","bbone_handle_use_scale_start","bbone_handle_use_ease_start","bbone_handle_type_end","bbone_handle_use_scale_end","bbone_handle_use_ease_end"]},{title:"Relations",from:"Bone",properties:["parent","children","use_relative_parent","use_connect","use_local_location","use_inherit_rotation","inherit_scale"]},{title:"Bone Collections",closed:!0,from:"Bone",properties:["collections"]},{title:"Inverse Kinematics",closed:!0,from:"Pose Bone",properties:["ik_stretch","lock_ik_x","lock_ik_y","lock_ik_z","ik_stiffness_x","ik_stiffness_y","ik_stiffness_z","use_ik_limit_x","ik_min_x","ik_max_x","use_ik_limit_y","ik_min_y","ik_max_y","use_ik_limit_z","ik_min_z","ik_max_z","use_ik_rotation_control"]},{title:"Deform",closed:!0,from:"Bone",properties:["use_deform","envelope_distance","envelope_weight","use_envelope_multiply","head_radius","tail_radius"]},{title:"Viewport Display",closed:!0,from:"Bone",properties:["hide","hide_select","display_type","color","show_wire"],sub:[{title:"Custom Shape",closed:!0,from:"Pose Bone",properties:["custom_shape","custom_shape_translation","custom_shape_rotation_euler","custom_shape_scale_xyz","use_custom_shape_bone_size","custom_shape_transform"]}]}],e={id:"bone",curated:i},D="selection.inspector",A="Bone",R="properties-bone",S=130,j="object",q=t(e),E=o(e);export{E as default,R as icon,q as match,S as order,D as point,j as railGroup,A as title};
1
+ import{b as o,a as t}from"./blender-properties-tab-DgVYwtk7.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-DhfMfVJj.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"./blender-runtime-host-C7PTMb6j.js";import"./preview-renderer-BrYNFV1p.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./renderer-ownership-BovSEcLv.js";import"./output-pass-HurwNl0G.js";import"./Pass-D1MRT672.js";import"./clip-planes-CnAI6DZn.js";import"./content-bounds-BRqBJnLW.js";import"./hierarchy-marks-pP0yj7BM.js";import"./workspace-arrangement-BpSjUGOP.js";const i=[{title:"Transform (Pose)",from:"Pose Bone",properties:["location","lock_location","rotation_quaternion","rotation_axis_angle","rotation_euler","lock_rotation_w","lock_rotation","rotation_mode","scale","lock_scale"]},{title:"Transform",from:"Bone",properties:["head","tail","roll","length","lock"]},{title:"Bendy Bones",closed:!0,from:"Bone",properties:["bbone_segments","bbone_x","bbone_z","bbone_mapping_mode","use_endroll_as_inroll","use_scale_easing","bbone_handle_type_start","bbone_handle_use_scale_start","bbone_handle_use_ease_start","bbone_handle_type_end","bbone_handle_use_scale_end","bbone_handle_use_ease_end"]},{title:"Relations",from:"Bone",properties:["parent","children","use_relative_parent","use_connect","use_local_location","use_inherit_rotation","inherit_scale"]},{title:"Bone Collections",closed:!0,from:"Bone",properties:["collections"]},{title:"Inverse Kinematics",closed:!0,from:"Pose Bone",properties:["ik_stretch","lock_ik_x","lock_ik_y","lock_ik_z","ik_stiffness_x","ik_stiffness_y","ik_stiffness_z","use_ik_limit_x","ik_min_x","ik_max_x","use_ik_limit_y","ik_min_y","ik_max_y","use_ik_limit_z","ik_min_z","ik_max_z","use_ik_rotation_control"]},{title:"Deform",closed:!0,from:"Bone",properties:["use_deform","envelope_distance","envelope_weight","use_envelope_multiply","head_radius","tail_radius"]},{title:"Viewport Display",closed:!0,from:"Bone",properties:["hide","hide_select","display_type","color","show_wire"],sub:[{title:"Custom Shape",closed:!0,from:"Pose Bone",properties:["custom_shape","custom_shape_translation","custom_shape_rotation_euler","custom_shape_scale_xyz","use_custom_shape_bone_size","custom_shape_transform"]}]}],e={id:"bone",curated:i},D="selection.inspector",A="Bone",R="properties-bone",S=130,j="object",q=t(e),E=o(e);export{E as default,R as icon,q as match,S as order,D as point,j as railGroup,A as title};
@@ -1 +1 @@
1
- import{b as i,a as e}from"./blender-properties-tab-BVdvAiLS.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-iW3HFEJB.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"./blender-runtime-host-B1bjBV91.js";import"./preview-renderer-BrYNFV1p.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./renderer-ownership-BovSEcLv.js";import"./output-pass-HurwNl0G.js";import"./Pass-D1MRT672.js";import"./clip-planes-CnAI6DZn.js";import"./content-bounds-938XXJRy.js";import"./hierarchy-marks-BrmGekuT.js";import"./workspace-arrangement-6V8ZwB2d.js";const o=[{title:"Visibility",properties:["hide_select","hide_render"],sub:[{title:"View Layer",from:"View Layer Collection",properties:["exclude","holdout","indirect_only"]}]},{title:"Instancing",properties:["instance_offset"]},{title:"Line Art",properties:["lineart_usage","lineart_use_intersection_mask","lineart_intersection_mask","use_lineart_intersection_priority","lineart_intersection_priority"]},{title:"Exporters",properties:["exporters"]}],t={id:"collection",curated:o},P="selection.inspector",B="Collection",D="properties-collection",G=60,I="collection",M=e(t),R=i(t);export{R as default,D as icon,M as match,G as order,P as point,I as railGroup,B as title};
1
+ import{b as i,a as e}from"./blender-properties-tab-DgVYwtk7.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-DhfMfVJj.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"./blender-runtime-host-C7PTMb6j.js";import"./preview-renderer-BrYNFV1p.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./renderer-ownership-BovSEcLv.js";import"./output-pass-HurwNl0G.js";import"./Pass-D1MRT672.js";import"./clip-planes-CnAI6DZn.js";import"./content-bounds-BRqBJnLW.js";import"./hierarchy-marks-pP0yj7BM.js";import"./workspace-arrangement-BpSjUGOP.js";const o=[{title:"Visibility",properties:["hide_select","hide_render"],sub:[{title:"View Layer",from:"View Layer Collection",properties:["exclude","holdout","indirect_only"]}]},{title:"Instancing",properties:["instance_offset"]},{title:"Line Art",properties:["lineart_usage","lineart_use_intersection_mask","lineart_intersection_mask","use_lineart_intersection_priority","lineart_intersection_priority"]},{title:"Exporters",properties:["exporters"]}],t={id:"collection",curated:o},P="selection.inspector",B="Collection",D="properties-collection",G=60,I="collection",M=e(t),R=i(t);export{R as default,D as icon,M as match,G as order,P as point,I as railGroup,B as title};
@@ -1 +1 @@
1
- import{b as o,a as r}from"./blender-properties-tab-BVdvAiLS.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-iW3HFEJB.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"./blender-runtime-host-B1bjBV91.js";import"./preview-renderer-BrYNFV1p.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./renderer-ownership-BovSEcLv.js";import"./output-pass-HurwNl0G.js";import"./Pass-D1MRT672.js";import"./clip-planes-CnAI6DZn.js";import"./content-bounds-938XXJRy.js";import"./hierarchy-marks-BrmGekuT.js";import"./workspace-arrangement-6V8ZwB2d.js";const i=["name","type","enabled","mute","influence","error_location","error_rotation","is_valid","is_override_data"],e=[{title:"Constraints",from:"Constraints",collection:!0,active:"activeConstraint",properties:i,andDeclared:!0}],t={id:"constraint",curated:e},x="selection.inspector",y="Object Constraints",B="properties-constraints",G=110,H="object",I=r(t),M=o(t);export{i as CONSTRAINT_HEADER,M as default,B as icon,I as match,G as order,x as point,H as railGroup,y as title};
1
+ import{b as o,a as r}from"./blender-properties-tab-DgVYwtk7.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-DhfMfVJj.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"./blender-runtime-host-C7PTMb6j.js";import"./preview-renderer-BrYNFV1p.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./renderer-ownership-BovSEcLv.js";import"./output-pass-HurwNl0G.js";import"./Pass-D1MRT672.js";import"./clip-planes-CnAI6DZn.js";import"./content-bounds-BRqBJnLW.js";import"./hierarchy-marks-pP0yj7BM.js";import"./workspace-arrangement-BpSjUGOP.js";const i=["name","type","enabled","mute","influence","error_location","error_rotation","is_valid","is_override_data"],e=[{title:"Constraints",from:"Constraints",collection:!0,active:"activeConstraint",properties:i,andDeclared:!0}],t={id:"constraint",curated:e},x="selection.inspector",y="Object Constraints",B="properties-constraints",G=110,H="object",I=r(t),M=o(t);export{i as CONSTRAINT_HEADER,M as default,B as icon,I as match,G as order,x as point,H as railGroup,y as title};
@@ -1 +1 @@
1
- import{b as p,r as a,a as l,c}from"./blender-properties-tab-BVdvAiLS.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-iW3HFEJB.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"./blender-runtime-host-B1bjBV91.js";import"./preview-renderer-BrYNFV1p.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./renderer-ownership-BovSEcLv.js";import"./output-pass-HurwNl0G.js";import"./Pass-D1MRT672.js";import"./clip-planes-CnAI6DZn.js";import"./content-bounds-938XXJRy.js";import"./hierarchy-marks-BrmGekuT.js";import"./workspace-arrangement-6V8ZwB2d.js";const n=[{title:"Vertex Groups",from:"Vertex Groups",collection:!0,active:"activeVertexGroup",properties:["name","index","lock_weight"]},{title:"Shape Keys",from:"Shape Keys",properties:["key_blocks","use_relative","eval_time","reference_key"]},{title:"UV Maps",properties:["uv_layers"]},{title:"Color Attributes",properties:["color_attributes"]},{title:"Attributes",properties:["attributes"]},{title:"Texture Space",closed:!0,properties:["texture_mesh","use_auto_texspace","texspace_location","texspace_size"]},{title:"Remesh",closed:!0,properties:["remesh_mode","remesh_voxel_size","remesh_voxel_adaptivity","use_remesh_fix_poles","use_remesh_preserve_volume","use_remesh_preserve_attributes"]},{title:"Geometry Data",closed:!0,properties:["has_custom_normals","total_vert_sel","total_edge_sel","total_face_sel"]},{title:"Animation",closed:!0,properties:["animation_data"]},{title:"Pose",properties:["pose_position"]},{title:"Bone Collections",closed:!0,properties:["collections_all","collections"]},{title:"Bones",from:"Bones",collection:!0,active:"activeBone",properties:["name","parent","use_connect","use_deform","head","tail","length"]},{title:"Viewport Display",closed:!0,properties:["display_type","show_names","show_bone_custom_shapes","show_bone_colors","show_axes","axes_position","relation_line_position"]},{title:"Inverse Kinematics",closed:!0,properties:["pose"]}],o={id:"data",curated:n},z="selection.inspector",R="Object Data",m={Mesh:"properties-data-mesh",Armature:"properties-data-armature",Curve:"properties-data-curve",SurfaceCurve:"properties-data-surface",MetaBall:"properties-data-meta",TextCurve:"properties-data-font",Lattice:"properties-data-lattice",Camera:"properties-data-camera",Light:"properties-data-light",Speaker:"properties-data-speaker",PointCloud:"properties-data-pointcloud",Volume:"properties-data-volume"},U=(i,s)=>{const e=a(i,s);if(e===null||e.kind!=="object")return"properties-data";const r=c();if(r.object!==e.name)return"properties-data";const t=r.context?.active?.dataType;return t==null?"properties-data-empty":m[t]??"properties-data"},E=120,H="object",I=l(o),O=p(o);export{O as default,U as icon,I as match,E as order,z as point,H as railGroup,R as title};
1
+ import{b as p,r as a,a as l,c}from"./blender-properties-tab-DgVYwtk7.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-DhfMfVJj.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"./blender-runtime-host-C7PTMb6j.js";import"./preview-renderer-BrYNFV1p.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./renderer-ownership-BovSEcLv.js";import"./output-pass-HurwNl0G.js";import"./Pass-D1MRT672.js";import"./clip-planes-CnAI6DZn.js";import"./content-bounds-BRqBJnLW.js";import"./hierarchy-marks-pP0yj7BM.js";import"./workspace-arrangement-BpSjUGOP.js";const n=[{title:"Vertex Groups",from:"Vertex Groups",collection:!0,active:"activeVertexGroup",properties:["name","index","lock_weight"]},{title:"Shape Keys",from:"Shape Keys",properties:["key_blocks","use_relative","eval_time","reference_key"]},{title:"UV Maps",properties:["uv_layers"]},{title:"Color Attributes",properties:["color_attributes"]},{title:"Attributes",properties:["attributes"]},{title:"Texture Space",closed:!0,properties:["texture_mesh","use_auto_texspace","texspace_location","texspace_size"]},{title:"Remesh",closed:!0,properties:["remesh_mode","remesh_voxel_size","remesh_voxel_adaptivity","use_remesh_fix_poles","use_remesh_preserve_volume","use_remesh_preserve_attributes"]},{title:"Geometry Data",closed:!0,properties:["has_custom_normals","total_vert_sel","total_edge_sel","total_face_sel"]},{title:"Animation",closed:!0,properties:["animation_data"]},{title:"Pose",properties:["pose_position"]},{title:"Bone Collections",closed:!0,properties:["collections_all","collections"]},{title:"Bones",from:"Bones",collection:!0,active:"activeBone",properties:["name","parent","use_connect","use_deform","head","tail","length"]},{title:"Viewport Display",closed:!0,properties:["display_type","show_names","show_bone_custom_shapes","show_bone_colors","show_axes","axes_position","relation_line_position"]},{title:"Inverse Kinematics",closed:!0,properties:["pose"]}],o={id:"data",curated:n},z="selection.inspector",R="Object Data",m={Mesh:"properties-data-mesh",Armature:"properties-data-armature",Curve:"properties-data-curve",SurfaceCurve:"properties-data-surface",MetaBall:"properties-data-meta",TextCurve:"properties-data-font",Lattice:"properties-data-lattice",Camera:"properties-data-camera",Light:"properties-data-light",Speaker:"properties-data-speaker",PointCloud:"properties-data-pointcloud",Volume:"properties-data-volume"},U=(i,s)=>{const e=a(i,s);if(e===null||e.kind!=="object")return"properties-data";const r=c();if(r.object!==e.name)return"properties-data";const t=r.context?.active?.dataType;return t==null?"properties-data-empty":m[t]??"properties-data"},E=120,H="object",I=l(o),O=p(o);export{O as default,U as icon,I as match,E as order,z as point,H as railGroup,R as title};
@@ -1 +1 @@
1
- import{b as e,a as r}from"./blender-properties-tab-BVdvAiLS.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-iW3HFEJB.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"./blender-runtime-host-B1bjBV91.js";import"./preview-renderer-BrYNFV1p.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./renderer-ownership-BovSEcLv.js";import"./output-pass-HurwNl0G.js";import"./Pass-D1MRT672.js";import"./clip-planes-CnAI6DZn.js";import"./content-bounds-938XXJRy.js";import"./hierarchy-marks-BrmGekuT.js";import"./workspace-arrangement-6V8ZwB2d.js";const o=[{title:"Material Slots",from:"Material Slots",collection:!0,active:"activeMaterial",properties:["name","material","link","slot_index"]},{title:"Surface",from:"Material",properties:["use_nodes","node_tree","surface_render_method","use_backface_culling"]},{title:"Volume",closed:!0,from:"Material",properties:["volume_intersection_method","displacement_method","max_vertex_displacement"]},{title:"Settings",closed:!0,from:"Material",properties:["pass_index","use_backface_culling_shadow","use_backface_culling_lightprobe_volume","use_transparent_shadow","use_transparency_overlap","use_raytrace_refraction","thickness_mode","use_thickness_from_shadow"]},{title:"Line Art",closed:!0,from:"Material",properties:["lineart"]},{title:"Viewport Display",from:"Material",properties:["diffuse_color","metallic","roughness"]},{title:"Animation",closed:!0,from:"Material",properties:["animation_data"]}],t={id:"material",curated:o},P="selection.inspector",V="Material",j="properties-material",B=160,C="object",E=r(t),G=e(t);export{G as default,j as icon,E as match,B as order,P as point,C as railGroup,V as title};
1
+ import{b as e,a as r}from"./blender-properties-tab-DgVYwtk7.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-DhfMfVJj.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"./blender-runtime-host-C7PTMb6j.js";import"./preview-renderer-BrYNFV1p.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./renderer-ownership-BovSEcLv.js";import"./output-pass-HurwNl0G.js";import"./Pass-D1MRT672.js";import"./clip-planes-CnAI6DZn.js";import"./content-bounds-BRqBJnLW.js";import"./hierarchy-marks-pP0yj7BM.js";import"./workspace-arrangement-BpSjUGOP.js";const o=[{title:"Material Slots",from:"Material Slots",collection:!0,active:"activeMaterial",properties:["name","material","link","slot_index"]},{title:"Surface",from:"Material",properties:["use_nodes","node_tree","surface_render_method","use_backface_culling"]},{title:"Volume",closed:!0,from:"Material",properties:["volume_intersection_method","displacement_method","max_vertex_displacement"]},{title:"Settings",closed:!0,from:"Material",properties:["pass_index","use_backface_culling_shadow","use_backface_culling_lightprobe_volume","use_transparent_shadow","use_transparency_overlap","use_raytrace_refraction","thickness_mode","use_thickness_from_shadow"]},{title:"Line Art",closed:!0,from:"Material",properties:["lineart"]},{title:"Viewport Display",from:"Material",properties:["diffuse_color","metallic","roughness"]},{title:"Animation",closed:!0,from:"Material",properties:["animation_data"]}],t={id:"material",curated:o},P="selection.inspector",V="Material",j="properties-material",B=160,C="object",E=r(t),G=e(t);export{G as default,j as icon,E as match,B as order,P as point,C as railGroup,V as title};
@@ -1 +1 @@
1
- import{b as t,a as i}from"./blender-properties-tab-BVdvAiLS.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-iW3HFEJB.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"./blender-runtime-host-B1bjBV91.js";import"./preview-renderer-BrYNFV1p.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./renderer-ownership-BovSEcLv.js";import"./output-pass-HurwNl0G.js";import"./Pass-D1MRT672.js";import"./clip-planes-CnAI6DZn.js";import"./content-bounds-938XXJRy.js";import"./hierarchy-marks-BrmGekuT.js";import"./workspace-arrangement-6V8ZwB2d.js";const r=[{title:"Modifiers",from:"Modifiers",collection:!0,active:"activeModifier",properties:["name","type","show_viewport","show_render","show_in_editmode","show_on_cage","use_pin_to_last","is_active"],andDeclared:!0}],o={id:"modifier",curated:r},B="selection.inspector",C="Modifiers",E="properties-modifiers",G=80,R="object",S=i(o),U=t(o);export{U as default,E as icon,S as match,G as order,B as point,R as railGroup,C as title};
1
+ import{b as t,a as i}from"./blender-properties-tab-DgVYwtk7.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-DhfMfVJj.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"./blender-runtime-host-C7PTMb6j.js";import"./preview-renderer-BrYNFV1p.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./environment-Dg-YaLsA.js";import"./RoomEnvironment-BkknvS_I.js";import"./EXRLoader-CITMBvGd.js";import"./HDRLoader-BTGuGhVo.js";import"./renderer-ownership-BovSEcLv.js";import"./output-pass-HurwNl0G.js";import"./Pass-D1MRT672.js";import"./clip-planes-CnAI6DZn.js";import"./content-bounds-BRqBJnLW.js";import"./hierarchy-marks-pP0yj7BM.js";import"./workspace-arrangement-BpSjUGOP.js";const r=[{title:"Modifiers",from:"Modifiers",collection:!0,active:"activeModifier",properties:["name","type","show_viewport","show_render","show_in_editmode","show_on_cage","use_pin_to_last","is_active"],andDeclared:!0}],o={id:"modifier",curated:r},B="selection.inspector",C="Modifiers",E="properties-modifiers",G=80,R="object",S=i(o),U=t(o);export{U as default,E as icon,S as match,G as order,B as point,R as railGroup,C as title};