@volter/game-editor 0.5.73 → 0.5.75
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.
- package/BUNDLED_NOTICES +22 -22
- package/catalog/entries/blender.json +3 -3
- package/catalog/entries/music.json +2 -2
- package/dist/.vite/manifest.json +2110 -2110
- package/dist/assets/{AssetBudgetPanel-BXtwiILa.js → AssetBudgetPanel-CE18ck0x.js} +3 -3
- package/dist/assets/{AudioViewer-BdHDedtf.js → AudioViewer-CcL-aNBd.js} +1 -1
- package/dist/assets/{CanvasBoardDocument-DL6qWmRA.js → CanvasBoardDocument-uwU0bfJA.js} +1 -1
- package/dist/assets/{CanvasSceneViewport-DeyFl0d2.js → CanvasSceneViewport-DgzPJJkc.js} +1 -1
- package/dist/assets/{ColorInput-C6l8ApSJ.js → ColorInput-DwLu76ZD.js} +1 -1
- package/dist/assets/{EntityModelDocument-gRt9IlRz.js → EntityModelDocument-DrpizTG_.js} +1 -1
- package/dist/assets/{EnvironmentAssetDocument-C3NAYvzk.js → EnvironmentAssetDocument-BkDbRyDk.js} +1 -1
- package/dist/assets/{GameplaySessionTimeline-UxmwvBqV.js → GameplaySessionTimeline-lxx-w1ya.js} +1 -1
- package/dist/assets/{ImageViewer-BwXUGI-l.js → ImageViewer-280O0PlP.js} +1 -1
- package/dist/assets/InspectorObjectPreview-BCGUkGwH.js +1 -0
- package/dist/assets/{JsonAssetDocument-mNtLvo-z.js → JsonAssetDocument-Fen8_TJ3.js} +1 -1
- package/dist/assets/{LiveModuleDocument--aP5_-cc.js → LiveModuleDocument-DcAvzW88.js} +1 -1
- package/dist/assets/{LutAssetDocument-3i6uhgi4.js → LutAssetDocument-BLlhFO6d.js} +1 -1
- package/dist/assets/{ModelAssetDocument-C0BbrEd1.js → ModelAssetDocument-Bz24yrEK.js} +1 -1
- package/dist/assets/{NonThreeAuthoringBootstrap-Cz3T6v7H.js → NonThreeAuthoringBootstrap-Co881phq.js} +1 -1
- package/dist/assets/{Object3DDocumentToolbar-CKzCeJpG.js → Object3DDocumentToolbar-xXXySp6z.js} +1 -1
- package/dist/assets/Object3DDocumentViewport-ChZBISII.js +2 -0
- package/dist/assets/{Object3DPreview-DZpmPQJz.js → Object3DPreview-DNx1_6NB.js} +1 -1
- package/dist/assets/{OnlineAssetDetail-BrN01rGI.js → OnlineAssetDetail-BO_qsMXe.js} +1 -1
- package/dist/assets/{PlayBar-CTkb3NOO.js → PlayBar-CGjjGuF8.js} +1 -1
- package/dist/assets/{QuarksAssetDocument-BaPvQFd9.js → QuarksAssetDocument-DzGTZwpm.js} +1 -1
- package/dist/assets/{ReactCanvasControls-DKPi6NMs.js → ReactCanvasControls-Bmd55pBo.js} +1 -1
- package/dist/assets/{RootSelectionOverlay-CuEtXTkF.js → RootSelectionOverlay-BwwoR4b9.js} +1 -1
- package/dist/assets/{ShaderAssetDocument-Ce8Yo5AQ.js → ShaderAssetDocument-CNe1tl7L.js} +1 -1
- package/dist/assets/{ShadowEditor-DCy9obUm.js → ShadowEditor-D0QiV1M7.js} +1 -1
- package/dist/assets/{SourceAssetViewer-DZBQofxM.js → SourceAssetViewer-CPiZgKck.js} +1 -1
- package/dist/assets/{StageHost-B5hgNOWi.js → StageHost-Dbo3tKK3.js} +2 -2
- package/dist/assets/{StoryPreviewMount-5qAGiL3j.js → StoryPreviewMount-BHsmVp-C.js} +1 -1
- package/dist/assets/{ThreeBoardDocument-DyRw9ccC.js → ThreeBoardDocument-D7c4KS7l.js} +2 -2
- package/dist/assets/{ThreeIsolationSceneContent-B-FjV522.js → ThreeIsolationSceneContent-Cg0KkL73.js} +1 -1
- package/dist/assets/{ToolObject3DPreview-BL2W3Zw5.js → ToolObject3DPreview-_N8jhg02.js} +1 -1
- package/dist/assets/{Toolbar-D5Jw2AOx.js → Toolbar-DDYWRWnH.js} +1 -1
- package/dist/assets/{TransientHint-CYxpG2zv.js → TransientHint-BLksXwdR.js} +1 -1
- package/dist/assets/{VideoViewer-DuLmYsmZ.js → VideoViewer-BYLY0WdG.js} +1 -1
- package/dist/assets/{ViewportShadingMenu-BGJUOZoj.js → ViewportShadingMenu-DX7Xsut9.js} +1 -1
- package/dist/assets/{active-ingest-idj3AkAe.js → active-ingest-CEa53vF0.js} +2 -2
- package/dist/assets/{animation-clock-Dz9gpPK-.js → animation-clock-Bmz7JDnw.js} +1 -1
- package/dist/assets/{animation-mixers.service-DAgQ92hj.js → animation-mixers.service-DomnndP0.js} +1 -1
- package/dist/assets/{animation-timeline.utility-CcOYDeh2.js → animation-timeline.utility-BqoUox48.js} +1 -1
- package/dist/assets/{asset-budget-asset.menu-C4LAIKND.js → asset-budget-asset.menu-CETgSkxJ.js} +1 -1
- package/dist/assets/{asset-budget.action-BB48NVB4.js → asset-budget.action-DwzCiMG2.js} +1 -1
- package/dist/assets/{asset-budget.document-DV7MkSRt.js → asset-budget.document-CUuV3lCl.js} +1 -1
- package/dist/assets/{asset-budget.menu-BUnfRz-J.js → asset-budget.menu-Cc6MA-wa.js} +1 -1
- package/dist/assets/{asset-editor-persistence-BL83mGez.js → asset-editor-persistence-BT0v4tAq.js} +1 -1
- package/dist/assets/{asset-loaders-C-qNkW6n.js → asset-loaders-5kIo3uwb.js} +1 -1
- package/dist/assets/{asset-preview-CNnOER4v.js → asset-preview-DrnuNAvs.js} +1 -1
- package/dist/assets/{audio-unlock.service-gtOc-Pcu.js → audio-unlock.service-JqPgkpU5.js} +1 -1
- package/dist/assets/{audio.utility-Dbty2bpX.js → audio.utility-CG29gFjH.js} +1 -1
- package/dist/assets/autoplay.service-CsXisBg-.js +1 -0
- package/dist/assets/{babylon-authoring-adapter-BMdY19Bu.js → babylon-authoring-adapter-ClTj2MC3.js} +1 -1
- package/dist/assets/{binding-resolver-B2hX5bHW.js → binding-resolver-CTLBEZNC.js} +2 -2
- package/dist/assets/{blender-node-editor.document-04y_KbDu.js → blender-node-editor.document-Cf9QRXXV.js} +1 -1
- package/dist/assets/{blender-properties-tab-DgVYwtk7.js → blender-properties-tab-DkDEWTru.js} +1 -1
- package/dist/assets/{blender-runtime-host-C7PTMb6j.js → blender-runtime-host-BrSuddiJ.js} +1 -1
- package/dist/assets/{blender-runtime-skin-CglxS85F.js → blender-runtime-skin-BugpRcn0.js} +1 -1
- package/dist/assets/{blender-runtime.document-onVLx1Zi.js → blender-runtime.document-DLWi2-0I.js} +1 -1
- package/dist/assets/{blender-timeline.document-Dx53vWy4.js → blender-timeline.document-DjN0BpnX.js} +1 -1
- package/dist/assets/{blender-uv-editor.document-DtAEbNha.js → blender-uv-editor.document-D6WYt2QC.js} +1 -1
- package/dist/assets/{blender-version.status-gLcGDj2u.js → blender-version.status-CJF052X7.js} +1 -1
- package/dist/assets/{blender.command-CWL5ZVYP.js → blender.command-BKo8PfAE.js} +1 -1
- package/dist/assets/{board-guides-D3JHkcyj.js → board-guides-DvGa-v8v.js} +1 -1
- package/dist/assets/{bridge.command-BQowLB0e.js → bridge.command-BhkhHZGM.js} +3 -3
- package/dist/assets/{browserAll-DOXLDeD9.js → browserAll-CPJT6e1H.js} +1 -1
- package/dist/assets/{build-player.document-Cn2NNXat.js → build-player.document-DmpwrRTe.js} +1 -1
- package/dist/assets/{build-profiles.document-Cl2vIbHP.js → build-profiles.document-DJcpRRoj.js} +1 -1
- package/dist/assets/{build-progress.status-xwvlMiR9.js → build-progress.status-BOGJAonH.js} +1 -1
- package/dist/assets/{build-session-BnTVKU3n.js → build-session-DcZvicW6.js} +1 -1
- package/dist/assets/{build.action-BH2XwOoM.js → build.action-CKNJFKFa.js} +1 -1
- package/dist/assets/{build.command-D6PVJTAM.js → build.command--0UXYA7h.js} +1 -1
- package/dist/assets/{build.header-B1io6kD5.js → build.header-BUUIrt6i.js} +1 -1
- package/dist/assets/{build.menu-C7b7dJvX.js → build.menu-CamwcePv.js} +1 -1
- package/dist/assets/{build.service-Dk4wyHFA.js → build.service-otobfdtq.js} +1 -1
- package/dist/assets/{camera-By96P8jU.js → camera-CNDzfNdN.js} +1 -1
- package/dist/assets/{camera-runtime.inspector-Cz2fY7LF.js → camera-runtime.inspector-C3kGIZal.js} +1 -1
- package/dist/assets/{canvas-design-mount-B0wJS0me.js → canvas-design-mount-Dcz3UbWk.js} +3 -3
- package/dist/assets/{canvas-entry-runtime-BTSoOlwm.js → canvas-entry-runtime-CB0dWiqf.js} +2 -2
- package/dist/assets/{canvas-preview-frames-y7XiUt6e.js → canvas-preview-frames-C_AwHp0A.js} +1 -1
- package/dist/assets/{canvas-story-capture.service-Bbd7D-O_.js → canvas-story-capture.service-wxtp-uMy.js} +2 -2
- package/dist/assets/{capability-coverage-CL0GGeIg.js → capability-coverage-BW0jhUWf.js} +1 -1
- package/dist/assets/{collaboration-presence-C5pPCDza.js → collaboration-presence-CGBoCEYM.js} +1 -1
- package/dist/assets/{collider-DIijLNo8.js → collider-D3AE4y5o.js} +1 -1
- package/dist/assets/{component-board.service-4blRCtj5.js → component-board.service-BsaSzxqY.js} +2 -2
- package/dist/assets/{component-board.service-MGtzUUbw.js → component-board.service-aRqXx_hL.js} +2 -2
- package/dist/assets/{component-board.service-kHtuqeOh.js → component-board.service-e3DqXFbP.js} +2 -2
- package/dist/assets/{component-contracts.service-BMsY9m-_.js → component-contracts.service-uvgs1KbX.js} +1 -1
- package/dist/assets/{component-instance-root-CNFI0IRp.js → component-instance-root-CuhMBeTq.js} +1 -1
- package/dist/assets/{component-verbs.command-qfwrDoVp.js → component-verbs.command-CTjRTrvO.js} +1 -1
- package/dist/assets/{component-verbs.service-Dg0bftBH.js → component-verbs.service-DrMc8AK6.js} +1 -1
- package/dist/assets/{config-kiOBMvaG.js → config-CDinmkBz.js} +2 -2
- package/dist/assets/{configurations-Ci7u4w12.js → configurations-B45jigJP.js} +1 -1
- package/dist/assets/{connection.status-D23e5kRk.js → connection.status-WWrI2jAY.js} +1 -1
- package/dist/assets/{constraints.inspector-BbYPQXem.js → constraints.inspector-bup7b7MV.js} +1 -1
- package/dist/assets/{content-bounds-BRqBJnLW.js → content-bounds-MIXkclKI.js} +1 -1
- package/dist/assets/{contract-system-adapters-d3KwjPWC.js → contract-system-adapters-Cgl3IHIO.js} +1 -1
- package/dist/assets/{coverage.service-B91Nuj64.js → coverage.service-v4iKehOw.js} +1 -1
- package/dist/assets/{create-runtime-B-jGpKbY.js → create-runtime-CO8JmCX7.js} +1 -1
- package/dist/assets/{curve-BlOrMvLA.js → curve-D17Op6q4.js} +1 -1
- package/dist/assets/{data-asset-CZLDAqx1.js → data-asset-DDdEHQgH.js} +1 -1
- package/dist/assets/{data-ref-C0AV_bsU.js → data-ref-CUYCUCMM.js} +1 -1
- package/dist/assets/{debug-bridge-Jy6-OFJX.js → debug-bridge-Bcgo-vKv.js} +1 -1
- package/dist/assets/{debug-registry-CqfOIF8b.js → debug-registry-DWXKHjIJ.js} +1 -1
- package/dist/assets/{deferred-ingest-play-Dum7AFKz.js → deferred-ingest-play-Ck7KAYWK.js} +2 -2
- package/dist/assets/{design-time-canvas-mount-DUHPdiqg.js → design-time-canvas-mount-MsbDbVsh.js} +2 -2
- package/dist/assets/{design-time-layers-utHBa_7o.js → design-time-layers-Be9HqnEr.js} +1 -1
- package/dist/assets/{design-time-mount.service-mI18AWHZ.js → design-time-mount.service-C-jPEtUV.js} +2 -2
- package/dist/assets/{design-time-mount.service-vZHpReNB.js → design-time-mount.service-CYWk8whR.js} +2 -2
- package/dist/assets/{design-time-react-mount-Dra56frK.js → design-time-react-mount-DC_O5p5I.js} +1 -1
- package/dist/assets/{document-preview-three-D3MPI2pG.js → document-preview-three-BojNfjbb.js} +1 -1
- package/dist/assets/{dom-authoring-adapter-gBQqMc0c.js → dom-authoring-adapter-_VzZnXUh.js} +1 -1
- package/dist/assets/{draco3d-6mRWhAay.js → draco3d-BC6NIjGw.js} +1 -1
- package/dist/assets/{edit-mode-audio.service-CrKprPzN.js → edit-mode-audio.service-A9fphO_d.js} +1 -1
- package/dist/assets/{edit-mode-authoring-D-F1_iFO.js → edit-mode-authoring-DbOPyppg.js} +1 -1
- package/dist/assets/{edit-mode-networking.service-yiwk42bP.js → edit-mode-networking.service-D1-i4xGa.js} +1 -1
- package/dist/assets/{editor-api-pnHaXAK3.js → editor-api-DGGJOWUU.js} +1 -1
- package/dist/assets/{editor-layers-CR1IoRwo.js → editor-layers-C-4kqPi7.js} +1 -1
- package/dist/assets/{editor-shell-store-C8iDtpEA.js → editor-shell-store-BqJU8Lu8.js} +1 -1
- package/dist/assets/{entity-object-BXXBLcj9.js → entity-object-S9jvlW_s.js} +1 -1
- package/dist/assets/{extend-BBSJbo8a.js → extend-Cz3c0C9r.js} +1 -1
- package/dist/assets/{fork-menu-CUePY3Cx.js → fork-menu-BU6hKn6d.js} +1 -1
- package/dist/assets/{frame-debugger-store-CYjZTL1N.js → frame-debugger-store-B7Jbgb39.js} +1 -1
- package/dist/assets/{game-contract-seams-NNhdUxdV.js → game-contract-seams-6S6C0ztA.js} +1 -1
- package/dist/assets/{game-css-scope-transform-C4GDwAtB.js → game-css-scope-transform-BOzH2ruv.js} +1 -1
- package/dist/assets/{game-document.service-7TUP2Y1F.js → game-document.service-mNiqtEZ5.js} +1 -1
- package/dist/assets/{game-eval.command-2ueAm6i3.js → game-eval.command-GZ5edKXO.js} +1 -1
- package/dist/assets/{game-module-access-0sEdzOSl.js → game-module-access-CpqKQme4.js} +1 -1
- package/dist/assets/{game-network-BYaj_RWO.js → game-network-1JI7uhYb.js} +3 -3
- package/dist/assets/{gameplay-export-DGvqwMBU.js → gameplay-export-Bxd_nkX7.js} +1 -1
- package/dist/assets/{gameplay-replay-BSZJWvVV.js → gameplay-replay-DP8qTwre.js} +1 -1
- package/dist/assets/{gameplay.command-DLTq9aVC.js → gameplay.command-t7Wb_wt1.js} +1 -1
- package/dist/assets/{generation-jobs-BWv5uf0V.js → generation-jobs-BDqluDvk.js} +1 -1
- package/dist/assets/{generation.service-BwFmxC3T.js → generation.service-C5VhRZs7.js} +1 -1
- package/dist/assets/{generations-B69q5hMp.js → generations-Oeo95nlK.js} +1 -1
- package/dist/assets/{generations.status-BAWa4uit.js → generations.status-BBfdbcRX.js} +1 -1
- package/dist/assets/{hierarchy-marks-pP0yj7BM.js → hierarchy-marks-DolK8jzJ.js} +1 -1
- package/dist/assets/{hosted-asset-materialization-BjrXy9K1.js → hosted-asset-materialization-B8i0ftt_.js} +1 -1
- package/dist/assets/{index-DXA-aMiK.js → index-BhRaFrvZ.js} +1 -1
- package/dist/assets/{index-CnFX-pyl.js → index-BiOfwZ_V.js} +1 -1
- package/dist/assets/{index-Bj1guHnQ.js → index-BlaTbgwf.js} +1 -1
- package/dist/assets/{index-B7-niZh1.js → index-CBmGldaZ.js} +1 -1
- package/dist/assets/{index-BO_gxX2t.js → index-CjZtvEN7.js} +1 -1
- package/dist/assets/{index-Cpk7BVO4.js → index-DDurbNnD.js} +2 -2
- package/dist/assets/{index-DhfMfVJj.js → index-DMsonpRx.js} +7 -7
- package/dist/assets/{index-aVauRiHu.js → index-DRJx_jIw.js} +1 -1
- package/dist/assets/{index-DNwTLKih.js → index-DmMBT64l.js} +1 -1
- package/dist/assets/{inference-diagnostics-CZtWDiNC.js → inference-diagnostics-CUavJjuI.js} +1 -1
- package/dist/assets/{ingest-boot-viewport-1vZQ2kps.js → ingest-boot-viewport-I9xll7ou.js} +1 -1
- package/dist/assets/{ingest-siblings-DgXpesm_.js → ingest-siblings-D3iJi2A3.js} +1 -1
- package/dist/assets/{ingest-source-persistence-UZGBOJaQ.js → ingest-source-persistence-B0NaYeRY.js} +1 -1
- package/dist/assets/{ingest.service-DuBjKI3m.js → ingest.service-BfpZUDne.js} +1 -1
- package/dist/assets/{inspect-BooKKY95.js → inspect-D4blh5_a.js} +1 -1
- package/dist/assets/instances.command-BSFguDo-.js +1 -0
- package/dist/assets/{json-history-resource-Cmiy217h.js → json-history-resource-BF-O43PD.js} +1 -1
- package/dist/assets/{layered-pick-A5arowk9.js → layered-pick-Ch1BjtVF.js} +1 -1
- package/dist/assets/{light-CHs-Mja8.js → light-BISMkAGI.js} +1 -1
- package/dist/assets/{live-project-verbs-6jy3p7nY.js → live-project-verbs-DWfBuVx7.js} +1 -1
- package/dist/assets/{machine.document-DHloTfpl.js → machine.document-BVuE_ug9.js} +1 -1
- package/dist/assets/{machines.finder-WhUcFZjA.js → machines.finder-XiuiCI4a.js} +1 -1
- package/dist/assets/{material-DZcoVZqX.js → material-BWQT3b7E.js} +1 -1
- package/dist/assets/{material-factory-BvpY-cse.js → material-factory-CtwX6ST-.js} +1 -1
- package/dist/assets/{mesh-CGedZWa-.js → mesh-DqW2WH9I.js} +1 -1
- package/dist/assets/{model-asset-sections.service-5GlUiSqi.js → model-asset-sections.service-CQJHkahR.js} +1 -1
- package/dist/assets/{model-inspection-B9Vo9Uw9.js → model-inspection-3opJce7d.js} +1 -1
- package/dist/assets/{model-thumbnail-BQAcfzU4.js → model-thumbnail-DOixylZe.js} +1 -1
- package/dist/assets/{models.finder-CP9CSor6.js → models.finder-CxsWV9l2.js} +1 -1
- package/dist/assets/{module-mode-BoxiWWBb.js → module-mode-DSM_f5Yj.js} +2 -2
- package/dist/assets/{mount-canvas-ingest-root-Cn5qX3H8.js → mount-canvas-ingest-root-T_0LysL3.js} +2 -2
- package/dist/assets/{mount-dom-ingest-root-Cbvzll3R.js → mount-dom-ingest-root-BiUuiBav.js} +2 -2
- package/dist/assets/{mount-ingest-root-B7U8e9wn.js → mount-ingest-root-YqfeOphI.js} +2 -2
- package/dist/assets/{mount-manifest-C9z4OtK6.js → mount-manifest-2gQEO6hq.js} +1 -1
- package/dist/assets/{mount-three-ingest-root-2Msa3BcX.js → mount-three-ingest-root-C9DspkVR.js} +1 -1
- package/dist/assets/{mounted-authoring-CfwaN6te.js → mounted-authoring-D8pHcD_a.js} +1 -1
- package/dist/assets/{mounted-story-viewport-source-GqrlvBrz.js → mounted-story-viewport-source-8HwyvYy_.js} +1 -1
- package/dist/assets/{native-debug-module-Bz673XZT.js → native-debug-module-BAc7TBPq.js} +1 -1
- package/dist/assets/{navigation-DLKPHrCx.js → navigation-eQVmzrez.js} +1 -1
- package/dist/assets/{navmesh.menu-Cpan00VU.js → navmesh.menu-Dox4LQK_.js} +1 -1
- package/dist/assets/{navmesh.service-CasaqkMR.js → navmesh.service-DmjvxUHo.js} +1 -1
- package/dist/assets/network-observer.service-DRvBwR_w.js +1 -0
- package/dist/assets/{network.utility-Bb5NG9YK.js → network.utility-CP9zYWoP.js} +1 -1
- package/dist/assets/{object3d-document-session-registry-DBXxQ-e2.js → object3d-document-session-registry-DLF9rgwj.js} +2 -2
- package/dist/assets/{oid-transform-Cmh6I5h8.js → oid-transform-DAnbWV6K.js} +1 -1
- package/dist/assets/{particles-IwlClixo.js → particles-OkjoBjQp.js} +1 -1
- package/dist/assets/{pixi-authoring-adapter-DhNMdp1o.js → pixi-authoring-adapter-DMl8lJFO.js} +1 -1
- package/dist/assets/{pixi-live-write-target--GCeBR8B.js → pixi-live-write-target-BHVRq1GT.js} +1 -1
- package/dist/assets/{play.command-BTnWT9lg.js → play.command-B7RVwcUr.js} +2 -2
- package/dist/assets/{presentation-DCylXFZR.js → presentation-D4z-Nsdr.js} +1 -1
- package/dist/assets/{product-CYfm4sPK.js → product-CfXoCObK.js} +1 -1
- package/dist/assets/{profiler.action-TqZoMWSL.js → profiler.action-CNgUtOxQ.js} +1 -1
- package/dist/assets/{profiler.menu-BJhGaCic.js → profiler.menu-jrOIDPTc.js} +1 -1
- package/dist/assets/{profiler.utility-DDOjJDdo.js → profiler.utility-Cggg6w6h.js} +1 -1
- package/dist/assets/{project-authoring-session-B5Onxn-3.js → project-authoring-session-Nq3PmtK1.js} +2 -2
- package/dist/assets/{properties-bone-constraints.inspector-i3rAZ6bF.js → properties-bone-constraints.inspector-D8BkuaXW.js} +1 -1
- package/dist/assets/{properties-bone.inspector-BfdWQq9J.js → properties-bone.inspector-DTTNuOd1.js} +1 -1
- package/dist/assets/{properties-collection.inspector-D36vypzH.js → properties-collection.inspector-NOoFLq1f.js} +1 -1
- package/dist/assets/{properties-constraints.inspector-nN7DWtPi.js → properties-constraints.inspector-DYIiaZNb.js} +1 -1
- package/dist/assets/{properties-data.inspector-B-y1eggi.js → properties-data.inspector-TMysZKfR.js} +1 -1
- package/dist/assets/{properties-material.inspector-DvuapEMy.js → properties-material.inspector-Dtqbi5V4.js} +1 -1
- package/dist/assets/{properties-modifiers.inspector-BGaSxWdy.js → properties-modifiers.inspector-S-GctzLY.js} +1 -1
- package/dist/assets/{properties-object.inspector-C5muyQoR.js → properties-object.inspector-CQ3XCQuN.js} +1 -1
- package/dist/assets/{properties-output.inspector-CCZDPKIC.js → properties-output.inspector-Dn2MZbl3.js} +1 -1
- package/dist/assets/{properties-particles.inspector-SXDA6b8y.js → properties-particles.inspector-CSA-4Kfj.js} +1 -1
- package/dist/assets/{properties-physics.inspector-BCUjyVmc.js → properties-physics.inspector-D4vzWubU.js} +1 -1
- package/dist/assets/{properties-render.inspector-CMrqCbzp.js → properties-render.inspector-Copw_ptH.js} +1 -1
- package/dist/assets/{properties-scene.inspector-CjhjIfdu.js → properties-scene.inspector-oanShDZ2.js} +1 -1
- package/dist/assets/{properties-texture.inspector-DQC-MFuS.js → properties-texture.inspector-B7GcTM9I.js} +1 -1
- package/dist/assets/{properties-view-layer.inspector-DVeg3182.js → properties-view-layer.inspector-BeeSv6ln.js} +1 -1
- package/dist/assets/{properties-world.inspector-71cmcJUs.js → properties-world.inspector-DymYbQG6.js} +1 -1
- package/dist/assets/{r3f-design-session-CkUa52_c.js → r3f-design-session-CrRJO5C4.js} +2 -2
- package/dist/assets/{r3f-physics-binding-C1t2gzF1.js → r3f-physics-binding-DrjAxMEm.js} +1 -1
- package/dist/assets/{r3f-source-authoring-adapter-ZlkqGRxK.js → r3f-source-authoring-adapter-DbvQNrK7.js} +1 -1
- package/dist/assets/{react-canvas-navigation-C_uPW5TY.js → react-canvas-navigation-C5hLe1sH.js} +1 -1
- package/dist/assets/{react-inspector.service-C1bIeQey.js → react-inspector.service-o6-PRw8z.js} +1 -1
- package/dist/assets/{react-story-board-D3lzaa3o.js → react-story-board-COo6rUfn.js} +1 -1
- package/dist/assets/{react-three-rapier.esm-B1MQT9gP.js → react-three-rapier.esm-Q83AB366.js} +1 -1
- package/dist/assets/{react-world-authoring-adapter-DGSpriYX.js → react-world-authoring-adapter-CI1sk6F6.js} +1 -1
- package/dist/assets/{realm-services-DD3n0-gI.js → realm-services-CoCivh2s.js} +1 -1
- package/dist/assets/{reflection-probe-capture.inspector-D2yJbHex.js → reflection-probe-capture.inspector-DfCsQR94.js} +1 -1
- package/dist/assets/{registry-Cxk2e0qq.js → registry-BXZTLQHf.js} +1 -1
- package/dist/assets/{relative-import-specifier-BL93f22G.js → relative-import-specifier-C6rJbXKw.js} +1 -1
- package/dist/assets/{render-env-BwewwLtg.js → render-env-C7ytOPzW.js} +1 -1
- package/dist/assets/{render-features-Ci5Tbkqq.js → render-features-1RxcHk6L.js} +1 -1
- package/dist/assets/{render-settings-DHswoo3P.js → render-settings-Bi_X7ET1.js} +1 -1
- package/dist/assets/{resolve-three-B72nbYSo.js → resolve-three-fQS0EhsO.js} +3 -3
- package/dist/assets/{root-seam-contract-B9KwrQLd.js → root-seam-contract-T0Os3lMG.js} +1 -1
- package/dist/assets/{run-selection-ByCRIyGc.js → run-selection-BQzUtW8L.js} +1 -1
- package/dist/assets/{scene-capture-XqwkFufj.js → scene-capture-BYhV7vRB.js} +1 -1
- package/dist/assets/{scene-document.service-Cj0jJK3E.js → scene-document.service-BA4Ivx3I.js} +2 -2
- package/dist/assets/{scene-framing-B7gPuTMy.js → scene-framing-DmIN3HFq.js} +1 -1
- package/dist/assets/{seeded-random-C4K99T_S.js → seeded-random-MSFUDgJ4.js} +1 -1
- package/dist/assets/{setup-renderer-DzY3775p.js → setup-renderer-kDlv1zGC.js} +1 -1
- package/dist/assets/{source-object3d-authoring-adapter-BN-4Hovl.js → source-object3d-authoring-adapter-CX-1jWDi.js} +1 -1
- package/dist/assets/{source-persistence-backend-CPBtrjhX.js → source-persistence-backend-cM6_hFF1.js} +1 -1
- package/dist/assets/{stage-keyboard-C9QxzoF9.js → stage-keyboard-q5MkxENL.js} +1 -1
- package/dist/assets/{stage-overlay-set-8l-rdrfd.js → stage-overlay-set-Ctlg0HA-.js} +1 -1
- package/dist/assets/{stage-presence-markers-Dkqob3C4.js → stage-presence-markers-CeUZ108k.js} +1 -1
- package/dist/assets/{stage-transform-tools-Cs2JJ3LR.js → stage-transform-tools-Do0dhEK4.js} +1 -1
- package/dist/assets/{standard-viewport-dressing-Bg8NSxy2.js → standard-viewport-dressing-DaUVwoH4.js} +1 -1
- package/dist/assets/{state-watch.action-Do9Y5Aqr.js → state-watch.action-DnO9j_lB.js} +1 -1
- package/dist/assets/{state-watch.menu-oj02S65b.js → state-watch.menu-DBm7nAtn.js} +1 -1
- package/dist/assets/{state-watch.utility-DeZkHZN3.js → state-watch.utility-CtsdHhcg.js} +1 -1
- package/dist/assets/{story-capture-DFH1P952.js → story-capture-BTklfaD3.js} +1 -1
- package/dist/assets/{story-documents-uTjkaheZ.js → story-documents-BDGEJZ0g.js} +1 -1
- package/dist/assets/{story-documents.service-D8kXspBi.js → story-documents.service-0i_8h_3B.js} +1 -1
- package/dist/assets/{story-documents.service-DedwE2II.js → story-documents.service-IuCs9FoR.js} +1 -1
- package/dist/assets/{story-media-presence-BHMXFsmb.js → story-media-presence-BBD2w0nO.js} +1 -1
- package/dist/assets/{story-pixi-preview-CUYChqBy.js → story-pixi-preview-V3jj9e_j.js} +1 -1
- package/dist/assets/{story-presentation-BdJZjFNv.js → story-presentation-5ksxI-cK.js} +1 -1
- package/dist/assets/{story-three-preview-BVDXydup.js → story-three-preview-DLneHHqJ.js} +2 -2
- package/dist/assets/{studio-environment-CbAVP315.js → studio-environment-DzXPzh3M.js} +1 -1
- package/dist/assets/{surface-state-Dc9frHdS.js → surface-state-IkyRZBV7.js} +1 -1
- package/dist/assets/{syntactic-prop-specs-Bf7v7vkR.js → syntactic-prop-specs-Bko1JHCr.js} +1 -1
- package/dist/assets/{team-playtest.service-wRiJR1XU.js → team-playtest.service-CTiYMUn7.js} +1 -1
- package/dist/assets/{three-DtUftGH2.js → three-CKv5ucoa.js} +1 -1
- package/dist/assets/{three-authoring-adapter-BlTbaEmo.js → three-authoring-adapter-C7fn0FHE.js} +1 -1
- package/dist/assets/three-authoring.service-cV0zOT1n.js +2 -0
- package/dist/assets/{three-ingest-runtime-Cl0JuTP_.js → three-ingest-runtime-Cw0ElzJG.js} +1 -1
- package/dist/assets/{three-integration-CSP8i2RA.js → three-integration-Qc9a7zSz.js} +2 -2
- package/dist/assets/three-integration.service-DvBW98ZW.js +1 -0
- package/dist/assets/{three-projection-core-ftoGUmFi.js → three-projection-core-D26OWHpV.js} +1 -1
- package/dist/assets/{three-state-BrM9-A7V.js → three-state-TqrpCspu.js} +1 -1
- package/dist/assets/{three-story-capture.service-Cis8uMZw.js → three-story-capture.service-CMxC0Cuu.js} +2 -2
- package/dist/assets/{three-story-model-CTIreBN2.js → three-story-model-DJPp75up.js} +1 -1
- package/dist/assets/{three-viewport-presentation-51gae0ax.js → three-viewport-presentation-D3qj3E-Q.js} +1 -1
- package/dist/assets/{transform-mode-request-DJIOPPHR.js → transform-mode-request-CLLg1QQA.js} +1 -1
- package/dist/assets/{transport-strip-C0MCDVb9.js → transport-strip-Cdx4Ln5g.js} +1 -1
- package/dist/assets/transport.header-D4XVOwJA.js +1 -0
- package/dist/assets/{tuples-DDKi5e56.js → tuples-CZHjGrdQ.js} +1 -1
- package/dist/assets/{ui-board-document-B_3yvVV_.js → ui-board-document-B_g7xkDJ.js} +2 -2
- package/dist/assets/{user-data-CRiQHvNG.js → user-data-BsgiyhZb.js} +1 -1
- package/dist/assets/{utility-view-state-rnZf-khZ.js → utility-view-state-Aza1mypE.js} +1 -1
- package/dist/assets/{viewport-door-UgyLwfRY.js → viewport-door-D7E51csI.js} +1 -1
- package/dist/assets/{viewport-root-presentation-B-tKDgs5.js → viewport-root-presentation-DtrhPv-6.js} +1 -1
- package/dist/assets/{viewport-surface-status-44lBh_Rl.js → viewport-surface-status-Cieefesr.js} +1 -1
- package/dist/assets/{webworkerAll-CRPuSg96.js → webworkerAll-DJ5jfNlk.js} +1 -1
- package/dist/assets/{workspace-arrangement-BpSjUGOP.js → workspace-arrangement-CHzaISez.js} +1 -1
- package/dist/assets/{world-documents-C1zfwUJ8.js → world-documents-PDNNMgyx.js} +1 -1
- package/dist/assets/{world-root-stage-binding-Cdd_v5Bm.js → world-root-stage-binding-C9ukgtlZ.js} +1 -1
- package/dist/assets/{xstate-animation-binding-iAUM3Z0P.js → xstate-animation-binding-W5-Rb-KL.js} +1 -1
- package/dist/assets/{xstate-animation-meta-cSgHAo1p.js → xstate-animation-meta-C5PJ3icJ.js} +1 -1
- package/dist-node/cli.js +19 -17
- package/package.json +16 -16
- package/dist/assets/InspectorObjectPreview-Cm28kUvH.js +0 -1
- package/dist/assets/Object3DDocumentViewport-CCn6nDgt.js +0 -2
- package/dist/assets/autoplay.service-DtHu2ShZ.js +0 -1
- package/dist/assets/instances.command-DvPuReaq.js +0 -1
- package/dist/assets/network-observer.service-McTuLNCE.js +0 -1
- package/dist/assets/three-authoring.service-DHWovAI9.js +0 -2
- package/dist/assets/three-integration.service-jjppzS8N.js +0 -1
- package/dist/assets/transport.header-DqzzdRt2.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./jsx-runtime-DPjLkJKQ.js";import{a as y}from"./three-contract-Dkt6PmWY.js";import{i as x}from"./component-instance-root-
|
|
1
|
+
import{a as t}from"./jsx-runtime-DPjLkJKQ.js";import{a as y}from"./three-contract-Dkt6PmWY.js";import{i as x}from"./component-instance-root-CuhMBeTq.js";import{af as j,aK as i,dV as v,fb as k,fc as c,a0 as h,eU as S}from"./index-DMsonpRx.js";import{constraintsOf as C}from"./constraint-Bp1l8hY-.js";import"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{u as F}from"./three-state-TqrpCspu.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./user-data-BsgiyhZb.js";import"./workspace-arrangement-CHzaISez.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./user-data-CODoGZqA.js";import"./object-marks-BnvSuCTt.js";import"./editor-shell-store-BqJU8Lu8.js";import"./output-pass-HurwNl0G.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./Pass-D1MRT672.js";import"./editor-layers-C-4kqPi7.js";import"./entity-object-S9jvlW_s.js";function g(r,n){return n?y(r.hierarchy,n):null}function b(r){if(!r)return[];const n=x(r),u=new Set,m=a=>{const l=x(a);if(!(a!==r&&n!==void 0&&l!==void 0&&l!==n)){for(const o of C(a))u.add(o);for(const o of a.children)m(o)}};return m(r),[...u]}function w(r,n){return b(g(n,r?.id??null)).length>0}const O={ready:"Ready",disabled:"Disabled",unresolved:"Unresolved",error:"Error"};function D(r){return r==="two-bone-ik"?"Two Bone IK":r==="ccd-ik"?"CCD IK":r==="aim"?"Aim":r==="rotation"?"Rotation":r}function T({adapter:r,nodeId:n}){const u=F(),m=n?u.objectMap.get(n)??g(r,n)??null:null,a=b(m).sort((o,s)=>o.config.order-s.config.order),l=o=>{if(!o)return;const s=r.hierarchy.idForObject3D?.(o);s&&(S(r,[s],{intent:"exact"})||u.shell.select(s))};return t.jsx("div",{style:{display:"grid",gap:10},children:a.map((o,s)=>{const d=o.config,e=o.getSnapshot(),p=d.type==="two-bone-ik"||d.type==="ccd-ik";return t.jsxs("div",{style:{border:`1px solid ${j.boundary.default}`,borderRadius:6,overflow:"hidden"},children:[t.jsxs("div",{style:{alignItems:"center",background:j.surface.raised,display:"flex",gap:8,justifyContent:"space-between",padding:"6px 8px"},children:[t.jsx(i,{children:`${s+1}. ${d.label}`}),t.jsx(i,{tone:"muted",children:D(d.type)})]}),e.message&&(e.status==="error"||e.status==="unresolved")?t.jsx(v,{tone:"error",children:e.message}):null,t.jsxs(k,{children:[t.jsx(c,{label:"Status",children:t.jsx(i,{tone:e.status==="error"||e.status==="unresolved"?"danger":e.status==="ready"?"success":"muted",children:O[e.status]})}),t.jsx(c,{label:"Weight",children:t.jsx(i,{tone:"muted",children:`${Math.round(d.weight*100)}%`})}),p?t.jsx(c,{label:"Chain",children:t.jsx(i,{tone:"muted",children:e.chain.map(f=>f.name||f.type).join(" → ")||"Unresolved"})}):t.jsx(c,{label:"Constrained",children:e.constrained&&r.hierarchy.idForObject3D?.(e.constrained)?t.jsx(h,{size:"compact",onClick:()=>l(e.constrained),children:e.constrained.name||"Select object"}):t.jsx(i,{tone:"muted",children:e.constrained?.name||"Unresolved"})}),e.error!==null?t.jsx(c,{label:e.error.unit==="degrees"?"Angular error":"Solve error",children:t.jsx(i,{tone:"muted",children:e.error.unit==="degrees"?`${e.error.value.toFixed(2)}°`:`${e.error.value.toFixed(3)} m`})}):null,t.jsx(c,{label:"Target",children:e.target&&r.hierarchy.idForObject3D?.(e.target)?t.jsx(h,{size:"compact",onClick:()=>l(e.target),children:e.target.name||"Select target"}):t.jsx(i,{tone:"muted",children:e.target?.name||"Dynamic target"})}),p?t.jsx(c,{label:"Pole",children:e.pole&&r.hierarchy.idForObject3D?.(e.pole)?t.jsx(h,{size:"compact",onClick:()=>l(e.pole),children:e.pole.name||"Select pole"}):t.jsx(i,{tone:"muted",children:e.pole?.name||"None"})}):null]})]},d.id)})})}const ee="selection.inspector",re="Constraints",te="link",ne=450;function oe(r,n){return w(r,n)}function ie({adapter:r,nodeId:n}){return t.jsx(T,{adapter:r,nodeId:n})}export{ie as default,te as icon,oe as match,ne as order,ee as point,re as title};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as B}from"./hierarchy-marks-
|
|
1
|
+
import{i as B}from"./hierarchy-marks-DolK8jzJ.js";import{I as o,J as y,cm as p,B as b}from"./three.core-3arARmh6.js";function c(t,n){n(t);for(const e of t.children)B(e)||c(e,n)}const s=new o,f=new p;function d(t){return Number.isFinite(t.min.x)&&Number.isFinite(t.min.y)&&Number.isFinite(t.min.z)&&Number.isFinite(t.max.x)&&Number.isFinite(t.max.y)&&Number.isFinite(t.max.z)}const u=new p,l=new o;function M(t,n,e,i){for(let r=0;r<n.count;r++)n.getMatrixAt(r,u),u.premultiply(n.matrixWorld),i&&u.premultiply(i),l.copy(e).applyMatrix4(u),d(l)&&t.union(l)}function x(t,n,e=null){const i=n.geometry;if(!i)return;const r=h(n,i);if(r){if(n.isInstancedMesh){M(t,n,r,e);return}e?(f.multiplyMatrices(e,n.matrixWorld),s.copy(r).applyMatrix4(f)):s.copy(r).applyMatrix4(n.matrixWorld),d(s)&&t.union(s)}}function h(t,n){const e=t;return t.isSkinnedMesh?(n.boundingBox===null&&n.computeBoundingBox(),n.boundingBox):e.boundingBox!==void 0&&!t.isInstancedMesh?(e.boundingBox===null&&e.computeBoundingBox?.(),e.boundingBox??null):(n.boundingBox===null&&n.computeBoundingBox(),n.boundingBox)}function N(t,n){return c(n,e=>{e.updateWorldMatrix(!1,!1),x(t,e)}),t}const a=new o;function m(t){const n=t.material;return n?Array.isArray(n)?n:[n]:[]}function w(t){const n=m(t);return n.length>0&&n.every(e=>e.depthWrite===!1)}function F(t){const n=m(t);return n.length>0&&n.every(e=>e.side===b)}function I(t,n=[]){return c(t,e=>{e.updateWorldMatrix(!1,!1),a.makeEmpty(),x(a,e),!a.isEmpty()&&n.push({box:a.clone(),overlay:w(e),enclosure:F(e)})}),n}function k(t,n=[]){for(const e of I(t))n.push(e.box);return n}function W(t,n=new o){return n.makeEmpty(),N(n,t)}function v(t,n,e=new o){return e.makeEmpty(),c(t,i=>{i.updateWorldMatrix(!1,!1),x(e,i,n)}),e}class E extends y{entityObject;constructor(n,e){super(new o,e),this.entityObject=n,this.update()}update(){W(this.entityObject,this.box)}}export{E as C,W as a,v as b,I as c,k as d,N as e};
|
package/dist/assets/{contract-system-adapters-d3KwjPWC.js → contract-system-adapters-Cgl3IHIO.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{GAME_SYSTEM_ADAPTERS_SHAPE as a}from"./game-contract-seams-
|
|
1
|
+
import{GAME_SYSTEM_ADAPTERS_SHAPE as a}from"./game-contract-seams-6S6C0ztA.js";import{R as c,C as m,A as f,N as l,d as p,e as u}from"./index-DMsonpRx.js";const A={physics:u,networking:p,navigation:l,audio:f,camera:m,renderDebug:c},E={three:"node-id",canvas:"display",dom:null},y=Object.keys(a),S={bound:{},empty:[],malformed:[]};function _(r){return r.present===!1}function h(r,e){const n=[];for(const[t,s]of Object.entries(A[r]))s.optional||typeof e[t]!="function"&&n.push(t);return n}function P(r,e){const n=e?E[e]:null;if(n===null)return null;const t=r.keyedBy==="display"?"display":"node-id";return t===n?null:`declared a ${t}-keyed physics carrier on the ${e} surface, whose gizmo path addresses bodies by ${n} — the four members are all present but nothing on this lane can call them with values they accept (a ${e}-surface carrier declares \`keyedBy: '${n}'\`)`}function b(r,e,n){if(e==null)return{kind:"skip"};if(typeof e!="object")return{kind:"malformed",reason:`declared as ${typeof e}; expected an adapter object or { present: false, evidence }`};if(_(e)){const i=e.evidence;return typeof i!="string"||i.trim()===""?{kind:"malformed",reason:"declared `present: false` with no `evidence` string to back the absence"}:{kind:"empty",evidence:i}}const t=h(r,e);if(t.length>0)return{kind:"malformed",reason:`declared an adapter missing required member(s): ${t.join(", ")}`};const s=r==="physics"?P(e,n):null;return s!==null?{kind:"malformed",reason:s}:{kind:"bound"}}function R(r,e){const n=r?.systemAdapters;if(!n)return S;const t={},s=[],i=[];for(const o of y){const d=b(o,n[o],e);d.kind==="bound"?t[o]=n[o]:d.kind==="empty"?s.push({slot:o,evidence:d.evidence}):d.kind==="malformed"&&i.push({slot:o,reason:d.reason})}return{bound:t,empty:s,malformed:i}}export{y as C,R as p};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{E as C,eH as E,jD as k,aO as I,aP as A,aw as p,jE as R,jF as L,jG as f,a5 as N,jp as F,jH as x,O as M,r as P}from"./index-
|
|
1
|
+
import{E as C,eH as E,jD as k,aO as I,aP as A,aw as p,jE as R,jF as L,jG as f,a5 as N,jp as F,jH as x,O as M,r as P}from"./index-DMsonpRx.js";import{d as w,S as D,a as _,f as O,u as B}from"./capability-coverage-BW0jhUWf.js";import{p as T,a as S,i as W}from"./live-project-verbs-DWfBuVx7.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./game-contract-seams-6S6C0ztA.js";function j(){const t=C();return!t||!E()?null:w({worldId:p()?.config.name??"project",authoringSurface:k(t.scenes,A().map(e=>e.descriptor.id),I().map(e=>e.descriptor.id))})}const G={physics:["@react-three/rapier","@dimforge/rapier3d-compat","@dimforge/rapier2d-compat"],networking:["@colyseus/sdk","colyseus.js"],navigation:["recast-navigation","@recast-navigation/core"],audio:["tone","howler"]};function V(t,e){if(e.dependencies===null)return[];const s=G[t];return s?s.filter(r=>e.dependencies?.includes(r)):[]}function H(t,e){return`this project depends on ${e.join(" + ")}, so "nothing built a ${t} world" is not a settled answer. Reach a terminal state either way: BIND it — declare the game's own ${t} adapter in the root entry's \`systems\` table — or DECLARE the absence with \`absent(reason)\` in that same table. The reason must NAME the dependency and say why it is there while the subsystem is not (a transitive pull, a leftover, a build-only use); a declared absence blind to the shipped dependency grades malformed, not terminal.`}function K(t,e){const s=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(/^[a-z0-9]+$/i.test(e)){if(new RegExp(`\\b${s}\\b`,"i").test(t))return!0}else if(t.toLowerCase().includes(e.toLowerCase()))return!0;const r=new Set(["compat","core","client","server","node","react","three","libs","api","sdk","util","utils","plugin","plugins","tools","types","browser"]),o=c=>c.toLowerCase().split(/[.\-_/]+/).filter(v=>v.length>=4&&!r.has(v)),[a,d]=e.toLowerCase().startsWith("@")?[e.slice(1,e.indexOf("/")),e.slice(e.indexOf("/")+1)]:["",e];let n=o(d);n.length===0&&(n=o(a));const i=n.map(c=>c.replace(/\d+d?$/,"")).filter(c=>c.length>=4);return[...new Set([...n,...i])].some(c=>new RegExp(`\\b${c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"i").test(t))}const Y="this project's volter.project.json declares no `server` block, so there is no room for a NetworkingAdapter to describe",z={physics:"no mounted root built a physics world — the engine seeds this slot from the root that creates one (a `setup` root, or an R3F tree using the Rapier bridge), so nothing in this game simulates bodies",navigation:"no mounted root registered a navigation adapter — the engine seeds this slot from a world's own NavMeshManager registration, so this game has no navmesh",audio:"no mounted root built an audio context — the engine seeds this slot from the root that creates one, so there is no audio graph for the host to mute, meter or graph",camera:"no mounted root registered a camera-ownership system — the engine ships `createCameraOwnershipSystem` for a game that takes camera control (a cutscene rig), so this game's camera is gameplay-owned throughout",renderDebug:"no mounted root captured a real WebGL2 render context to derive one from — the engine seeds this slot only where the root owns the capture wiring (`adapter/setup-three-root-adapter.ts`), so the Frame debugger and the render-memory view have nothing to show for this game"};function b(t,e){return t==="networking"?"register a NetworkingAdapter from the game's own code (`ctx.registerSystemAdapter('networking', …)`) — this project declares a `server` block, so the editor's Network panel is dark for a game that IS networked":`register a ${t} adapter from the game's own code (\`ctx.registerSystemAdapter('${t}', …)\`), or build the subsystem the engine seeds it from`}function U(t,e){const s=new Map(e.declaredAbsences.map(r=>[r.slot,r]));return D.map(r=>{const o=s.get(r);if(t[r]!=null)return o?{slot:r,state:"malformed",evidence:`root "${o.rootId}" declares this slot absent — "${o.reason}" — but a ${r} adapter is bound on the live mount. One of the two is wrong: either the declaration is stale (delete the \`absent()\` marker) or something registers an adapter the game does not mean to have.`}:{slot:r,state:"bound",proof:R({slot:r,adapter:t[r],subject:"game"})};const a=V(r,e);if(o){const n=a.filter(c=>!K(o.reason,c));if(n.length>0)return{slot:r,state:"malformed",evidence:`root "${o.rootId}" declares this slot absent — "${o.reason}" — but this project depends on ${n.join(" + ")} and the reason does not mention it. Either the absence is stale, or it holds and the reason should say why that dependency is present without the subsystem (naming it).`};const i=e.absencesFromLastMount?" — the declaration read at this session’s last play mount; play to re-read it live":"";return{slot:r,state:"empty",attestedBy:"game",evidence:a.length>0?`declared absent by root "${o.rootId}": ${o.reason} (the project does depend on ${a.join(" + ")}; the reason engages with that)${i}`:`declared absent by root "${o.rootId}": ${o.reason}${i}`}}if(r==="networking"&&a.length>0)return{slot:r,state:"empty",attestedBy:"host",evidence:`this project ships ${a.join(" + ")}; the editor observes its room sockets from Play, and nothing is connected while editing`};if(a.length>0)return{slot:r,state:"unanswered",fix:H(r,a)};if(r==="networking")return e.declaresServer?{slot:r,state:"unanswered",fix:b(r)}:{slot:r,state:"empty",attestedBy:"host",evidence:Y};const d=z[r];return d?{slot:r,state:"empty",attestedBy:"host",evidence:d}:{slot:r,state:"unanswered",fix:b(r)}})}function q(){const t=F()?.game,e=p()?.rootPath??null;return t?(e!==null&&(l={projectPath:e,absences:t.declaredSystemAbsences??[]}),{absences:t.declaredSystemAbsences??[],fromLastMount:!1}):l!==null&&l.projectPath===e?{absences:l.absences,fromLastMount:!0}:{absences:[],fromLastMount:!1}}let l=null;function $(){if(L()!==null)return null;const t=p();if(!t)return null;const e=f();if(e.length===0||e.every(r=>r.adapter.provenance?.source==="foreign"))return null;const s=q();return w({worldId:t.config.name,systemAdapters:U(N(),{declaresServer:(t.config.configurations??[]).some(r=>r.kind==="process"&&typeof r.port=="number"),declaredAbsences:s.absences,absencesFromLastMount:s.fromLastMount,dependencies:T()})})}function J(t){const e=w({worldId:t.worldId,reach:_(t.adapter,t.worldId),surface:t.surface,reachMechanism:null});return{worldId:t.worldId,surface:t.surface,report:e}}function g(){return f().map(J)}function Q(t=g()){const e=t.map(a=>({label:a.worldId,report:a.report})),s=$();s&&e.push({label:null,report:s});const r=S();r&&e.push({label:null,report:r});const o=j();return o&&e.push({label:null,report:o}),e}function X(t){const e=Q(t??g());return e.length===0?null:B(p()?.config.name??"session",e)}const y=new Set;let h=null,m=0;function u(){h=null,m=0}function Z(){if(x()){u();return}const t=g(),e=X(t);if(!e||e.summary.gaps===0){u();return}const s=f();if(s.length===0){u();return}const r=C()?.regions??[];if(r.length>1){const n=new Set(s.map(i=>i.worldId));if(r.some(i=>!n.has(i.id))){u();return}}if(t.some(n=>n.report.rows.find(i=>i.seam==="editor.capture")?.status!=="ok")){u();return}const o=`session coverage "${e.summary.worldId}"`,a=O(e,o).filter(n=>n.level==="warn"),d=a.map(n=>n.message).join(`
|
|
2
2
|
---
|
|
3
3
|
`);if(h===d?m++:(h=d,m=1),!(m<2))for(const n of a)y.has(n.message)||(y.add(n.message),M.warn(n.message,"coverage"))}const ge="workspace.service",ee=["rootCoverage","systemCoverage","projectCoverage","authoringCoverage"];function te(t){if(t)return{rootCoverage:t.rootCoverage??[],systemCoverage:t.systemCoverage??null,projectCoverage:t.projectCoverage??null,authoringCoverage:t.authoringCoverage??null};const e=$(),s=S(),r=j();return{rootCoverage:g().map(o=>({worldId:o.worldId,surface:o.surface,summary:o.report.summary,rows:o.report.rows.map(a=>({...a}))})),systemCoverage:e?{summary:e.summary,rows:e.rows.map(o=>({...o}))}:null,projectCoverage:s?{summary:s.summary,rows:s.rows.map(o=>({...o}))}:null,authoringCoverage:r?{summary:r.summary,rows:r.rows.map(o=>({...o}))}:null}}function he(){const t=P().session,e=t.reportFacet(te,{reusableKeys:ee}),s=t.onSample(Z),r=t.onCommandDispatched(o=>{o==="restart"&&W()});return()=>{e(),s(),r()}}export{ge as point,he as start};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{assertNever as le}from"./adapter-surface-Y37Nzcyw.js";import{createRootBinding as ue}from"./binding-Bmxqznjk.js";import{stackOrder as B,resolveClaimingRoot as V}from"./root-stacking-BEd9ZvxC.js";import{createAssetCache as fe}from"./assets-BcrMQHRv.js";import{createHostRenderer as me}from"./setup-renderer-
|
|
1
|
+
import{assertNever as le}from"./adapter-surface-Y37Nzcyw.js";import{createRootBinding as ue}from"./binding-Bmxqznjk.js";import{stackOrder as B,resolveClaimingRoot as V}from"./root-stacking-BEd9ZvxC.js";import{createAssetCache as fe}from"./assets-BcrMQHRv.js";import{createHostRenderer as me}from"./setup-renderer-kDlv1zGC.js";import{T as pe}from"./three.module-BLhyNg0e.js";import{T as X,c as he,p as ge,r as we,a as ye,D as be,b as ve}from"./seeded-random-MSFUDgJ4.js";import{c as ee,a as Re,r as Ee,D as ke,g as Se}from"./debug-registry-DWXKHjIJ.js";import{formatLoopGateMessage as $e,formatAudioGateMessage as Pe}from"./loop-gate-report-N52EWFGD.js";import{bindScopedSystem as Ae}from"./system-slot-E2mEdiih.js";import{hasUserData as Oe}from"./user-data-CODoGZqA.js";import{dX as F,kz as _}from"./index-DMsonpRx.js";import{c as De}from"./performance-profiler-CMbwGBuk.js";const xe=1e3;function Fe(e){const t=e.fixedTimestep??.016666666666666666,n=e.maxSubSteps??8,s=e.externalDrive??!1;let l=0,d=0,f=!1,w=0,g=1,b=!1,r=!1;function o(){s||!r||typeof document>"u"||(document.hidden?f&&(f=!1,cancelAnimationFrame(w),b=!0):b&&(b=!1,f=!0,d=performance.now(),l=0,w=requestAnimationFrame(p)))}function i(){o()}function p(E){if(!f)return;w=requestAnimationFrame(p);const v=(E-d)/1e3;d=E;const $=ge(l,v,g,{fixedDt:t,maxSubSteps:n});l=$.accumulator;for(let A=0;A<$.steps;A++)e.update(t);e.render?.($.alpha,$.displayDt)}return{start(){if(!f&&(f=!0,b=!1,d=performance.now(),l=0,!s)){if(!r&&typeof document<"u"&&(document.addEventListener("visibilitychange",i),r=!0),typeof document<"u"&&document.hidden){f=!1,b=!0;return}w=requestAnimationFrame(p)}},stop(){f=!1,b=!1,cancelAnimationFrame(w),r&&typeof document<"u"&&(document.removeEventListener("visibilitychange",i),r=!1)},get isRunning(){return o(),f},get liveness(){return o(),b||f&&!s&&performance.now()-d>xe?"loop-starved":f?"running":"stopped"},set timeScale(E){const v=he(E);v!==E&&console.warn(`[game-loop] timeScale ${E} is out of range [${X.min}, ${X.max}]; clamped to ${v}.`),g=v},get timeScale(){return g},get fixedDt(){return t}}}const Te={cancel(){}};function j(e){return new DOMException(e,"AbortError")}function H(e,t){if(!Number.isFinite(t)||t<0)throw new RangeError(`SimClock.${e}: seconds must be a finite, non-negative number, got ${t}`)}function Ce(e){const t=e.dispose;let n=0,s=0,l=0,d=!1;const f=new Set,w=new Set;function g(r){r.cancelled||(r.cancelled=!0,f.delete(r),r.detachAbort?.(),r.detachAbort=null)}function b(r,o,i){H("after",r);const p=i?.signal;if(d||p?.aborted)return Te;const E={dueAt:n+r,seq:l++,fn:o,cancelled:!1,detachAbort:null};if(f.add(E),p){const v=()=>g(E);p.addEventListener("abort",v,{once:!0}),E.detachAbort=()=>p.removeEventListener("abort",v)}return{cancel(){g(E)}}}return{now:()=>n,tickNow:()=>s,after:b,delay(r,o){H("delay",r);const i=o?.signal;return i?.aborted?Promise.reject(j("SimClock.delay: aborted before it was scheduled")):d?Promise.reject(j("SimClock.delay: the sim clock is disposed")):new Promise((p,E)=>{let v=null,$=null,A=!1;const D=()=>{A=!0,w.delete(T),$?.(),$=null};function T(C){A||(D(),v?.cancel(),E(j(C)))}if(v=b(r,()=>{A||(D(),p())}),w.add(T),i){const C=()=>T("SimClock.delay: aborted");i.addEventListener("abort",C,{once:!0}),$=()=>i.removeEventListener("abort",C)}})},disposeAfter(r,o){return H("disposeAfter",o),b(o,()=>t(r))},flush(r){if(d||(n=r,s++,f.size===0))return;const o=[];for(const i of f)!i.cancelled&&i.dueAt<=n&&o.push(i);if(o.length!==0){o.sort((i,p)=>i.dueAt-p.dueAt||i.seq-p.seq);for(const i of o)if(!i.cancelled){g(i);try{i.fn()}catch(p){console.error("[sim-clock] timer callback threw:",p)}}}},dispose(){if(d)return;d=!0;for(const o of f)o.detachAbort?.(),o.detachAbort=null,o.cancelled=!0;f.clear();const r=[...w];w.clear();for(const o of r)o("SimClock: disposed while a delay was pending")}}}const Me=ee("sim-clock");function Le(e,t){Me.set(e,t)}function _e(e,t="world"){const n=new Map,s=[],l=new Map;let d=0;for(const r of F)n.set(r,[]);let f=!1;const w=new Map;for(const r of F)w.set(r,new Set);const g=new Set;function b(r,o,i){const p=l.get(r)??r.name??`anonymous-${++d}`;l.set(r,p),e?.beginSystem(t,o,p);try{r(i)}catch(E){const v=r.name?`"${r.name}"`:"(anonymous)";console.error(`[system-runner] system ${v} in phase "${o}" threw:`,E)}finally{e?.endSystem(t,o,p)}}return{add(r,o,i){const p=n.get(r);if(!p)throw new Error(`Unknown phase: ${r}. Valid phases: ${F.join(", ")}`);p.push(o),l.set(o,i?.name??o.name??`anonymous-${++d}`)},remove(r,o){const i=n.get(r);if(!i)return;const p=i.indexOf(o);p!==-1&&i.splice(p,1),w.get(r)?.delete(o)},register(r){const o=n.get(r.phase);if(!o)throw new Error(`Unknown phase: ${r.phase}. Valid phases: ${F.join(", ")}`);o.push(r.update),l.set(r.update,r.name??r.update.name??`anonymous-${++d}`),s.push(r)},unregister(r){const o=n.get(r.phase);if(o){const p=o.indexOf(r.update);p!==-1&&o.splice(p,1)}w.get(r.phase)?.delete(r.update);const i=s.indexOf(r);i!==-1&&s.splice(i,1),g.delete(r),r.dispose?.()},runInit(){const r=[...s].sort((o,i)=>F.indexOf(o.phase)-F.indexOf(i.phase));for(const o of r)o.init?.()},runDispose(){for(const r of s){const o=n.get(r.phase);if(o){const i=o.indexOf(r.update);i!==-1&&o.splice(i,1)}r.dispose?.()}s.length=0},runPhase(r,o){const i=n.get(r);if(!i)throw new Error(`Unknown phase: ${r}. Valid phases: ${F.join(", ")}`);const p=w.get(r),E=[];for(const v of i)f&&!p.has(v)?E.push(v):b(v,r,o);for(const v of E)b(v,r,o)},run(r){for(const o of F)this.runPhase(o,r)},markEngineBoundary(){for(const r of F){const o=w.get(r);for(const i of n.get(r))o.add(i)}for(const r of s)g.add(r);f=!0},removeAllNonEngine(){if(!f)return;const r=s.filter(i=>g.has(i)),o=s.filter(i=>!g.has(i));s.length=0,s.push(...r);for(const i of o)i.dispose?.();for(const i of F){const p=n.get(i),E=w.get(i),v=p.filter($=>E.has($));p.length=0,p.push(...v)}},count(r){if(r)return n.get(r)?.length??0;let o=0;for(const i of n.values())o+=i.length;return o}}}function Ie(e){if(!e)return"<unknown call site — no stack captured>";const t=e.split(`
|
|
2
2
|
`);return(t[2]??t[1]??t[0]??"<unknown call site>").trim()}function Ge(e=t=>{console.warn(t)}){const t=new Set;let n;function s(){const l=Ie(new Error().stack);return t.has(l)||(t.add(l),e(`[determinism] the global Math.random generator was drawn from during a gameplay frame while this project declares determinism.seededRandom — use ctx.random() / ctx.random.stream(name) instead. Call site:
|
|
3
3
|
${l}`)),n()}return{enable(){n=Math.random,Math.random=s},disable(){Math.random===s&&n&&(Math.random=n,n=void 0)}}}const te=ee("gameplay-rng-trap");function ze(e,t){te.set(e,t)}function At(e){return te.get(e)??null}const Ne=F.filter(e=>e===_.PRE_RENDER||e===_.RENDER);function U(e){const{id:t,kind:n,pausable:s=!0,adapter:l,mounted:d,scene:f,canvasRoot:w,container:g,physics:b,collisions:r,physics2d:o,camera:i,frame:p,binding:E=null}=e;if(n==="three"&&!f)throw new Error(`RootInstance "${t}" (kind: three): a three world requires a scene — pass \`scene\` in RootInstanceInit.`);if(n==="canvas"&&w==null)throw new Error(`RootInstance "${t}" (kind: canvas): a canvas world requires a native substrate root — pass \`canvasRoot\` in RootInstanceInit.`);if(n==="dom"&&!g)throw new Error(`RootInstance "${t}" (kind: react): a react world requires a container — pass \`container\` in RootInstanceInit.`);let v=!1;const $=d.dispose.bind(d);return d.dispose=()=>{v=!0,$()},{id:t,kind:n,pausable:s,adapter:l,mounted:d,physics:b,collisions:r,physics2d:o,camera:i,frame:p?{runPhase(D,T){v||p.runPhase(D,T)},endFrame(){v||p.endFrame?.()}}:void 0,binding:E,get disposed(){return v},threeScene(){if(n!=="three"||!f)throw new Error(`RootInstance "${t}" (kind: ${n}): threeScene() requested but this world is not a three world`);return f},canvasRoot(){if(n!=="canvas"||w===void 0||w===null)throw new Error(`RootInstance "${t}" (kind: ${n}): canvasRoot() requested but this world is not a canvas world`);return w},reactRoot(){if(n!=="dom"||!g)throw new Error(`RootInstance "${t}" (kind: ${n}): reactRoot() requested but this world is not a react world`);return g}}}function qe(e){const{physics:t,rapierWorld:n}=e;return!t||!n?null:{physics:t,rapierWorld:n}}function je(e,t){const n=[];e.traverse(s=>n.push(s));for(const s of t){const l=qe(s);if(l)for(const d of n){const f=l.physics.get(d);f&&(l.rapierWorld.removeRigidBody(f.body),l.physics.remove(d))}}e.removeFromParent();for(const s of n){const l=s;Oe(s,"__sharedGeometry")||l.geometry?.dispose();const d=l.material;if(Array.isArray(d))for(const f of d)f.dispose();else d?.dispose()}}function He(e){return[]}function Be(e){const t=[],n=De(),s=_e(n.systemObserver,"game"),l=ye(e.seed??be),d=Ge();let f=!1;const w={setEnabled(a){f=a},get enabled(){return f}};let g=0,b=0,r=0;const o=new Set,i=Ce({dispose:a=>je(a,t.flatMap(He))}),p=Re({getTick:()=>g,getSimT:()=>b,getFixedDt:()=>e.loop.fixedDt,getDefaultRootId:()=>t.length>0?v().id:null,getLoopLiveness:()=>e.loop.liveness});let E=!1;function v(){if(t.length===0)throw new Error("Game.defaultRoot: no roots registered yet");return t.find(a=>a.kind==="three")??t[0]}const $=new Set,A=new Set,D=new Map,T=new Map;function C(){const a={debug:p.adapter},h=new Map([["debug","(game)"]]),k=(y,c,R)=>{for(const u of Object.keys(c)){if(c[u]===void 0)continue;const m=h.get(u);if(m!==void 0){if(a[u]===c[u]||R?.has(u))continue;$.has(u)||($.add(u),console.warn(`[game] systemAdapters: "${u}" is registered by both ${m} and ${y} — the FIRST registration (${m}) wins; the later one is shadowed (game-scoped system adapters).`));continue}a[u]=c[u],h.set(u,y)}};for(const y of t){const c=D.get(y.id);c&&k(`world "${y.id}" (declared systems export)`,c);const R=y.mounted.systems;R&&k(`world "${y.id}"`,R,c?new Set(Object.keys(c)):void 0)}return a}let P=!1;const x=new Set;function I(a,h,k){const y=`${a}:${h}`;if(x.has(y))return;x.add(y);const c=a==="loop"?$e({worldId:h,reason:k}):Pe({worldId:h,reason:k});console.warn(c)}const L=new WeakMap;function N(a){for(const h of t){if(h.disposed||!h.pausable)continue;h.mounted.drivesOwnLoop&&(h.mounted.setPaused?h.mounted.setPaused(a):a&&I("loop",h.id,"self-driven world, adapter declares no setPaused capability"));const k=D.get(h.id)?.audio??h.mounted.systems?.audio;k?a?(L.has(k)||L.set(k,k.isMuted()),k.setMuted(!0)):L.has(k)&&(k.setMuted(L.get(k)),L.delete(k)):a&&!T.get(h.id)?.some(y=>y.slot==="audio")&&I("audio",h.id,"no SystemAdapters.audio on this world")}}function G(a,h){f&&d.enable(),n.beginFrame();const k=h?.skipRenderPhases??!1,y=h?.onlyFrozen??!1,c=t.length;E=!1;for(let u=0;u<c;u++){const m=t[u];if(!m.disposed){if(y){if(P&&m.pausable&&!m.mounted.drivesOwnLoop){E=!0;break}}else if(m.mounted.drivesOwnLoop?!P||!m.pausable||!m.mounted.setPaused:!P||!m.pausable){E=!0;break}}}let R=!1;if(!y)for(let u=0;u<c;u++){const m=t[u];if(!m.disposed&&m.mounted.drivesOwnLoop&&(!P||!m.pausable||!m.mounted.setPaused)){R=!0;break}}if(y){for(const u of F){n.beginPhase(),E&&s.runPhase(u,a);for(let m=0;m<c;m++){const S=t[m];if(!S.disposed&&!S.mounted.drivesOwnLoop&&P&&S.pausable)try{S.frame?.runPhase(u,a)}catch(O){console.error(`[game] world "${S.id}" (kind: ${S.kind}) runPhase("${u}") threw (step()):`,O)}}n.endPhase(u)}for(let u=0;u<c;u++){const m=t[u];if(!m.disposed&&!m.mounted.drivesOwnLoop&&P&&m.pausable)if(R=!0,m.frame)try{m.frame.endFrame?.()}catch(S){console.error(`[game] world "${m.id}" (kind: ${m.kind}) endFrame() threw (step()):`,S)}else try{m.mounted.update?.(a)}catch(S){console.error(`[game] world "${m.id}" (kind: ${m.kind}) update() threw (step()):`,S)}}}else{for(const u of F){if(n.beginPhase(),!(k&&(u===_.PRE_RENDER||u===_.RENDER))){s.runPhase(u,a);for(let S=0;S<c;S++){const O=t[S];if(O.disposed||O.mounted.drivesOwnLoop)continue;const W=P&&O.pausable;if(W&&u!==_.RENDER)continue;const de=W?0:a;try{O.frame?.runPhase(u,de)}catch(ce){console.error(`[game] world "${O.id}" (kind: ${O.kind}) runPhase("${u}") threw:`,ce)}}}n.endPhase(u)}for(let u=0;u<c;u++){const m=t[u];if(!(m.disposed||m.mounted.drivesOwnLoop||P&&m.pausable)){if(R=!0,m.frame)try{m.frame.endFrame?.()}catch(O){console.error(`[game] world "${m.id}" (kind: ${m.kind}) endFrame() threw:`,O)}else if(!(k&&m.mounted.updateCadence==="display"))try{m.mounted.update?.(a)}catch(O){console.error(`[game] world "${m.id}" (kind: ${m.kind}) update() threw:`,O)}}}}R&&(g++,b+=a,i.flush(b)),n.endFrame(),f&&d.disable()}function q(a,h){if(r=a,f&&d.enable(),n.beginFrame(),o.size>0)for(const y of[...o])try{y(a,h)}catch(c){console.error("[game] an onRenderStep callback threw:",c)}const k=t.length;for(const y of Ne){n.beginPhase(),s.runPhase(y,h);for(let c=0;c<k;c++){const R=t[c];if(R.disposed||R.mounted.drivesOwnLoop)continue;const u=P&&R.pausable;if(!(u&&y!==_.RENDER))try{R.frame?.runPhase(y,u?0:h)}catch(m){console.error(`[game] world "${R.id}" (kind: ${R.kind}) runPhase("${y}") threw (display frame):`,m)}}n.endPhase(y)}for(let y=0;y<k;y++){const c=t[y];if(c.disposed||c.mounted.drivesOwnLoop||c.frame||c.mounted.updateCadence!=="display")continue;const R=P&&c.pausable;try{c.mounted.update?.(R?0:h)}catch(u){console.error(`[game] world "${c.id}" (kind: ${c.kind}) update() threw (display frame):`,u)}}n.endFrame(),f&&d.disable()}const M={loop:e.loop,assets:e.assets,playtest:e.playtest??null,profiler:n,systems:s,get roots(){return t},world(a){return t.find(h=>h.id===a)??null},get defaultRoot(){return v()},get systemAdapters(){return C()},subscribeSystemAdapters(a){return A.add(a),()=>A.delete(a)},notifySystemAdaptersChanged(){for(const a of A)a()},get declaredSystemAbsences(){return[...T.values()].flat()},installDeclaredSystemAdapters(a,h,k=[]){const y=t.find(u=>u.id===a);if(!y)throw new Error(`installDeclaredSystemAdapters: no mounted root is named "${a}" (mounted: ${t.map(u=>`"${u.id}"`).join(", ")||"none"}).`);if(D.has(a))throw new Error(`installDeclaredSystemAdapters: root "${a}" already installed its declared systems — a declaration is static and installs exactly once per mount.`);const c=y.mounted.systemScope??y.mounted,R=Object.fromEntries(Object.entries(h).map(([u,m])=>[u,m===void 0?void 0:Ae(m,c)]));D.set(a,R),T.set(a,k),M.notifySystemAdaptersChanged()},play:{get paused(){return P},pause(){P||(P=!0,N(!0))},resume(){P&&(P=!1,N(!1))},step(a=1/60){if(P)for(const h of t)h.disposed||!h.pausable||!h.mounted.drivesOwnLoop||h.mounted.setPaused&&(h.mounted.step?h.mounted.step():I("loop",h.id,"self-driven world, adapter declares no step capability"));G(a,{onlyFrozen:!0})}},registerRoot(a){if(t.some(h=>h.id===a.id))throw new Error(`Game.registerRoot: duplicate world id "${a.id}"`);if(t.some(h=>h.mounted===a.mounted))throw new Error(`Game.registerRoot: world "${a.id}" shares its \`mounted\` object with an already-registered world ("${t.find(h=>h.mounted===a.mounted).id}") — the same mount cannot be registered twice.`);t.push(a),M.notifySystemAdaptersChanged(),a.mounted.drivesOwnLoop&&a.kind!=="dom"&&!a.mounted.observe&&console.warn(`[game] world "${a.id}" (kind: ${a.kind}, adapter: "${a.adapter.id}"): no state bridge — this mounted game has no \`observe\` (RootStateObserver); the editor's observations cannot subscribe to its state.`)},runFrame(a,h){G(a,h)},runRenderFrame(a,h){q(a,h)},get renderAlpha(){return r},onRenderStep(a,h){const k=h?.signal;if(k?.aborted)return()=>{};o.add(a);let y=null;const c=()=>{o.delete(a),y?.(),y=null};return k&&(k.addEventListener("abort",c,{once:!0}),y=()=>k.removeEventListener("abort",c)),c},runTicks(a,h){if(!Number.isInteger(a)||a<0)throw new RangeError(`Game.runTicks: n must be a non-negative integer, got ${a}`);if(P)throw new ke("RUN_TICKS_PAUSED","Game.runTicks: refused — Game.play.paused is true; stepping the frozen set is Game.play.step()'s contract, not runTicks'");const k=h?.render??"last",y=e.loop.fixedDt;for(let c=0;c<a;c++){const R=c===a-1;G(y,{skipRenderPhases:k==="all"?!1:k==="none"?!0:!R})}},dispose(){i.dispose(),p.strip()}};return Ee(M,p),p.setRunTicksTarget({runTicks:M.runTicks}),we(M,l),ze(M,w),Le(M,i),M}function Ue(e){B(e).forEach((n,s)=>{n.canvas.style.pointerEvents=s===0?"auto":"none"})}const K=["pointerdown","pointerup","pointermove","click","wheel"];function Ye(e){const t=e,n=["clientX","clientY","screenX","screenY","offsetX","offsetY","button","buttons","ctrlKey","altKey","shiftKey","metaKey","pointerId","pointerType","pressure","isPrimary","deltaX","deltaY","deltaZ","deltaMode"],s={bubbles:!0,cancelable:!0,composed:!0};for(const l of n)l in t&&(s[l]=t[l]);return s}const ne=new WeakSet;function We(e,t){const n=globalThis,s=t.type==="wheel"?n.WheelEvent:t.type.startsWith("pointer")?n.PointerEvent:n.MouseEvent??n.PointerEvent;if(!(!s||typeof e.dispatchEvent!="function"))try{const l=new s(t.type,Ye(t));ne.add(l),e.dispatchEvent(l)}catch{}}function Ve(e,t){Ue(t);const n=new Map(t.map(d=>[d.id,d])),s=B(t)[0]?.id,l=d=>{if(ne.has(d))return;const f=e.getBoundingClientRect?.()??{left:0,top:0},w=d.clientX??0,g=d.clientY??0,b=w-f.left,r=g-f.top,o=V(t,b,r);if(o&&o!==s){const i=n.get(o);i&&(d.stopPropagation(),We(i.canvas,d))}};for(const d of K)e.addEventListener?.(d,l,!0);return{resolveClaim:(d,f)=>V(t,d,f),dispose(){for(const d of K)e.removeEventListener?.(d,l,!0)}}}function re(e){return new URLSearchParams(e.search).get(ve)==="1"}const Xe=[_.PRE_RENDER,_.RENDER];async function Ke(e){const t=Qe(e);for(const n of Xe){e.systems.runPhase(n,0);for(const s of t)s.frame.runPhase(n,0)}await et()}function Qe(e){const t=[];for(const n of e.roots){if(n.mounted.drivesOwnLoop){Q(n.id,"drives its own loop — renderOnce() cannot frame-gate it");continue}if(!n.frame){Q(n.id,`(kind: ${n.kind}) has no phase hooks — renderOnce() cannot drive it (opaque/foreign mount with no frame-gated entry point)`);continue}t.push({id:n.id,frame:n.frame})}return t}function Q(e,t){console.warn(`[render-control] world "${e}" ${t}.`)}function Ze(e){const t=[];for(const n of e.roots){if(n.mounted.drivesOwnLoop){t.push(`world "${n.id}" drives its own loop — cannot be frame-gated for deterministic capture (the policy is to FAIL LOUDLY, or be excluded only by an explicit declared policy).`);continue}n.frame||t.push(`world "${n.id}" (kind: ${n.kind}) has no phase hooks — an opaque/foreign mount with no frame-gated entry point cannot participate in deterministic capture.`)}return t}function Z(e){let t=0,n=0;const s=[...e.children??[]];for(;s.length>0;){const l=s.pop();t++,l.userData?.entityId!==void 0&&n++,l.children&&s.push(...l.children)}return{nodes:t,entities:n}}function Je(e){const t=[];for(const n of e.roots)n.kind==="three"?t.push({id:n.id,kind:n.kind,...Z(n.threeScene())}):n.kind==="canvas"&&n.mounted.kind==="canvas"&&n.mounted.substrate.name==="pixi"&&t.push({id:n.id,kind:n.kind,...Z(n.canvasRoot())});return t}function J(){return new Promise(e=>{requestAnimationFrame(()=>e())})}async function et(){await J(),await J()}async function z(e){if(!e)return{status:"not-applicable"};try{return await e(),{status:"ready"}}catch(t){return{status:"error",detail:t instanceof Error?t.message:String(t)}}}async function tt(){if(typeof document>"u"||!document.fonts)return{status:"not-applicable"};try{return await document.fonts.ready,{status:"ready"}}catch(e){return{status:"error",detail:e instanceof Error?e.message:String(e)}}}async function nt(e){const[t,n,s,l,d,f]=await Promise.all([z(e.assets),z(e.shaders),tt(),z(e.sequences),z(e.tone),z(e.scene)]);return{assets:t,shaders:n,fonts:s,sequences:l,tone:d,scene:f}}function rt(e){const t=e.location??window.location;if(!re(t))return;const{game:n,clock:s,readiness:l={}}=e,d=e.target??window,f=e.frameAdvancers??[],w=e.simulateFixedDt??1/60,g=e.excludedFromDeterminism??[],b={seek(r){s.seek(r)},seekFrame(r,o){s.seekFrame(r,o)},advanceFrame(r){for(const o of f)o(r)},renderOnce(){return Ke(n)},ready(){return nt(l)},simulateSubsteps(r){for(let o=0;o<r;o++)n.runFrame(w)},excludedFromDeterminism(){return[...g,...Ze(n)]},simulateFixedDt(){return w},perfSample(r){const o=n.profiler,i=o.enabled;o.enabled=!0,o.clear();const p=[];try{for(let E=0;E<r;E++){n.runFrame(w);const v=o.getSnapshot(),$=v.frames.at(-1);p.push({cpuMs:$?.cpuMs??0,phases:Object.fromEntries(($?.phases??[]).map(A=>[A.name,A.ms])),render:{...v.render}})}}finally{o.enabled=i}return{frames:p,worlds:Je(n)}}};return d.__volterRender=b,b}function oe(e,t,n,s){const l=s?.pausable??!0,d=U({id:s?.id??"main",kind:"three",pausable:l,adapter:t,mounted:n,scene:n.scene,binding:Y(e,s?.declaration,{surface:"three",adapter:t},n,l)});return e.registerRoot(d),d}function Y(e,t,n,s,l){return t?ue({...t,adapter:n,mounted:s,pausable:l,debugRegistry:Se(e)}):null}function se(e,t,n,s){const l=s?.id??"main",d=s?.pausable??!0,f=U({id:l,kind:"canvas",pausable:d,adapter:t,mounted:n,canvasRoot:n.substrate.root,binding:Y(e,s?.declaration,{surface:"canvas",adapter:t},n,d)});return e.registerRoot(f),f}function ie(e,t,n,s,l){const d=l?.pausable??!0,f=U({id:l?.id??"main",kind:"dom",pausable:d,adapter:t,mounted:n,container:s,binding:Y(e,l?.declaration,{surface:"dom",adapter:t},n,d)});return e.registerRoot(f),f}async function ot(e){return mt(e)}function st(e){return{domElement:e,render(){},setPixelRatio(){},setClearColor(){},setSize(){},dispose(){},forceContextLoss(){}}}function ae(e,t){try{e.mounted.dispose()}finally{e.renderer?.dispose(),e.renderer?.forceContextLoss();try{(e.element.parentNode??t).removeChild(e.element)}catch{}}}async function it(e,t){const{game:n,canvas:s,w:l,h:d,dpr:f,isBottom:w,headless:g,assets:b,antialias:r}=t,o=g?st(s):me(s,l,d,r===void 0?void 0:{antialias:r},{alpha:!w,preserveDrawingBuffer:!0});o.setSize(l,d,!1),s.style.width="100%",s.style.height="100%",o.setPixelRatio(f),w||o.setClearColor(0,0);const i={three:pe,surface:{canvas:s,width:l,height:d},renderer:o,assets:b,headless:g,game:n},p=await e.adapter.mount(i);return oe(n,e.adapter,p,{id:e.id,pausable:e.pausable,declaration:e.declaration}),{mountedEntry:{id:e.id,kind:"three",element:s,mounted:p,renderer:o},routerEntry:{id:e.id,zOrder:e.zOrder??0,canvas:s,hitTest:e.hitTest}}}async function at(e,t){const{game:n,canvas:s,w:l,h:d,dpr:f,headless:w,isBottom:g}=t,b={canvas:s,width:l,height:d,game:n,headless:w,dpr:f,transparent:!g,preserveDrawingBuffer:!0},r=await e.adapter.mount(b);return se(n,e.adapter,r,{id:e.id,pausable:e.pausable,declaration:e.declaration}),{mountedEntry:{id:e.id,kind:"canvas",element:s,mounted:r,renderer:void 0},routerEntry:{id:e.id,zOrder:e.zOrder??0,canvas:s,hitTest:e.hitTest??(r.hitTest?(o,i)=>r.hitTest(o,i):void 0)}}}async function dt(e,t,n){n.style.pointerEvents="none",n.style.width="100%",n.style.height="100%";const s={container:n,game:t},l=await e.adapter.mount(s);return ie(t,e.adapter,l,n,{id:e.id,pausable:e.pausable,declaration:e.declaration}),{mountedEntry:{id:e.id,kind:"dom",element:n,mounted:l,renderer:void 0}}}function ct(e){return()=>{}}async function lt(e,t,n){const{surfacesById:s,container:l,...d}=n,f=[],w=[];try{for(const g of e){const b=g.id===t;if(g.kind==="dom"){const E=s.get(g.id),{mountedEntry:v}=await dt(g,d.game,E);f.push(v);continue}const r=s.get(g.id),o={...d,canvas:r,isBottom:b};let i,p;g.kind==="three"?{mountedEntry:i,routerEntry:p}=await it(g,o):g.kind==="canvas"?{mountedEntry:i,routerEntry:p}=await at(g,o):le(g,"create-runtime mount loop"),f.push(i),w.push(p)}}catch(g){for(let b=f.length-1;b>=0;b--){const r=f[b];try{ae(r,l)}catch(o){console.error(`createGameRuntime: rolling back root "${r.id}" after a mount failure threw:`,o)}}throw g}return{mountedEntries:f,routerEntries:w}}function ut(e,t,n){const s=n??(typeof window<"u"?window:void 0);if(s!==void 0)return rt({game:e,clock:{seek(){},seekFrame(){}},readiness:{scene(){}},location:t,target:s}),()=>{delete s.__volterRender}}function ft(e,t,n){try{e.dispose()}catch(s){console.error("createGameRuntime: disposing the game after a mount failure threw:",s)}for(const s of t)try{(s.parentNode??n).removeChild(s)}catch{}}async function mt(e){const{container:t,roots:n,width:s,height:l,headless:d=!1,seed:f,playtest:w}=e;if(n.length===0)throw new Error("createGameRuntime: `roots` must contain at least one root.");const g=n,b=Math.max(1,s??t.clientWidth??0),r=Math.max(1,l??t.clientHeight??0),o=d?1:Math.min(typeof window<"u"&&window.devicePixelRatio||1,2);t.style.position||(t.style.position="relative");const i=g.map(c=>({id:c.id,zOrder:c.zOrder??0,hitTest:c.hitTest})),p=B(i),E=p[0]?.id,v=new Map(g.map(c=>[c.id,c.kind])),$=new Map;p.forEach((c,R)=>{const u=v.get(c.id)==="dom",m=document.createElement(u?"div":"canvas");if(m.dataset.volterRootSurface="true",m.dataset.volterRootId=c.id,!u){const S=m;S.width=b,S.height=r}m.style.cssText=`position:absolute;top:0;left:0;width:100%;height:100%;z-index:${R+1};contain:layout paint;`,t.appendChild(m),$.set(c.id,m)});const A=fe(),D=e.renderControl?.location??(typeof window<"u"?window.location:void 0),T=D!==void 0&&re(D);let C=!1;const P=Fe({fixedTimestep:1/60,maxSubSteps:8,externalDrive:T,update:c=>{C&&x.runFrame(c,{skipRenderPhases:!0})},render:(c,R)=>{C&&x.runRenderFrame(c,R)}}),x=Be({loop:P,assets:A,seed:f,playtest:w});let I;try{I=await lt(g,E,{game:x,surfacesById:$,container:t,w:b,h:r,dpr:o,headless:d,assets:A,antialias:e.antialias})}catch(c){throw ft(x,$.values(),t),c}const{mountedEntries:L,routerEntries:N}=I,G=Ve(t,N);C=!0,P.start();const q=ct(),M=T&&D!==void 0?ut(x,D,e.renderControl?.target):void 0;let a;const h=new Promise(c=>{a=c});let k=!1;function y(){if(k)return;k=!0;const c=[],R=(u,m)=>{try{m()}catch(S){c.push({step:u,error:S})}};try{R("loop.stop",()=>P.stop()),R("router.dispose",()=>G.dispose());for(const u of L)R(`root "${u.id}"`,()=>ae(u,t));R("game.dispose",()=>x.dispose()),R("dev globals",()=>q()),R("render harness",()=>M?.())}finally{Promise.allSettled(L.map(u=>u.mounted.disposeComplete??Promise.resolve())).then(()=>a())}if(c.length>0)throw new AggregateError(c.map(u=>u.error),`Game session teardown failed in ${c.length} step(s): ${c.map(u=>u.step).join(", ")}. Every other step still ran.`)}return{stop:y,stopComplete:h,pause(){x.play.pause()},resume(){x.play.resume()},step(){x.play.step()},resize(c,R,u){const m=Math.max(1,c),S=Math.max(1,R);for(const O of L)u!==void 0&&O.renderer?.setPixelRatio(u),O.renderer?.setSize(m,S,!1),O.mounted.resize?.(m,S)},game:x}}const Ot=Object.freeze(Object.defineProperty({__proto__:null,createGameRuntime:ot,registerCanvasRoot:se,registerReactRoot:ie,registerThreeRoot:oe},Symbol.toStringTag,{value:"Module"}));export{Be as a,Fe as b,ot as c,oe as d,Ot as e,At as g,se as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d_ as f,bA as d,u as x,by as y}from"./index-
|
|
1
|
+
import{d_ as f,bA as d,u as x,by as y}from"./index-DMsonpRx.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 g="x-volter-curve";function p(r,n){return r[n].label??n}function v(r,n,e){const s=r.points;for(let t=0;t<s.length;t++){const o=s[t];for(const a of["x","y"]){const{min:u,max:c}=n[a];(o[a]<u||o[a]>c)&&e.addIssue({code:"custom",path:["points",t,a],message:`${o[a]} is outside this curve's ${p(n,a)} domain [${u}, ${c}] — move the point inside the domain, or widen the axis in the schema (curve({ ${a}: { min, max } })).`})}if(t===0)continue;const i=s[t-1];o.x<=i.x&&e.addIssue({code:"custom",path:["points",t,"x"],message:`${o.x} must be strictly greater than the previous point's x (${i.x}) — curve points run left to right along x, with no duplicate x. Sort the points, or nudge this one.`})}}function K(r){const n=f({x:d().describe(`Position along ${p(r,"x")}.`),y:d().describe(`Value at that position, along ${p(r,"y")}.`)});return f({interpolation:y(["linear","smooth"]).describe('How the value moves between points: "linear" for straight segments, "smooth" for a monotone cubic that never overshoots them.'),points:x(n).min(2,{message:'a curve needs at least two points — add another { "x": …, "y": … } so the value has somewhere to travel between.'}).describe("Keys in increasing x order; the value is clamped outside the first/last x.")}).superRefine((e,s)=>v(e,r,s)).meta({[g]:r})}function M(r){let n=r;for(let e=0;e<5&&n;e++){const t=n.meta?.()?.[g];if(t&&typeof t=="object"&&"x"in t&&"y"in t)return t;n=n.def?.innerType}}function b(r){const n=r.length,e=[];for(let t=0;t<n-1;t++){const o=r[t],i=r[t+1];e.push((i.y-o.y)/(i.x-o.x))}const s=[e[0]];for(let t=1;t<n-1;t++)s.push((e[t-1]+e[t])/2);s.push(e[n-2]);for(let t=0;t<n-1;t++){const o=e[t];if(o===0){s[t]=0,s[t+1]=0;continue}let i=s[t]/o,a=s[t+1]/o;i<0&&(s[t]=0,i=0),a<0&&(s[t+1]=0,a=0);const u=i*i+a*a;if(u>9){const c=3/Math.sqrt(u);s[t]=c*i*o,s[t+1]=c*a*o}}return s}function O(r,n){const e=r.points;if(e.length===0)return 0;const s=e[0],t=e[e.length-1];if(e.length===1||n<=s.x)return s.y;if(n>=t.x)return t.y;let o=0;for(;o<e.length-2&&n>=e[o+1].x;)o++;const i=e[o],a=e[o+1],u=a.x-i.x;if(u<=0)return i.y;const c=(n-i.x)/u;if(r.interpolation==="linear")return i.y+(a.y-i.y)*c;const m=b(e),h=c*c,l=h*c;return(2*l-3*h+1)*i.y+(l-2*h+c)*u*m[o]+(-2*l+3*h)*a.y+(l-h)*u*m[o+1]}export{K as curve,M as curveAxesOf,O as sampleCurve};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d$ as p}from"./index-
|
|
1
|
+
import{d$ as p}from"./index-DMsonpRx.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";function y(o,e,t){let i=c(o,e,t);const s=new Set;return{get:()=>i,sourcePath:t,subscribe(r){return s.add(r),()=>s.delete(r)},hotSwap(r){let n;try{n=c(o,r,t)}catch(a){console.error(`[data] hot edit rejected, keeping previous values.
|
|
2
2
|
${String(a)}`);return}i=n;for(const a of s)a(i)}}}function S(o){const e=p(o,{io:"input"});if(e.type==="object"){const t=e.properties??{};t.$schema??={type:"string"},e.properties=t}return e}function c(o,e,t){const i=e!==null&&typeof e=="object"&&!Array.isArray(e)&&"$schema"in e?Object.fromEntries(Object.entries(e).filter(([r])=>r!=="$schema")):e,s=o.safeParse(i);if(!s.success){const r=s.error.issues.map(n=>` - ${n.path.join(".")||"(root)"}: ${n.message}`).join(`
|
|
3
3
|
`);throw new Error(`Data asset "${t}" failed its schema:
|
|
4
4
|
${r}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DATA_REF_PATTERN as p}from"./data-check-core-CHqar_E8.js";import{v as l}from"./index-
|
|
1
|
+
import{DATA_REF_PATTERN as p}from"./data-check-core-CHqar_E8.js";import{v as l}from"./index-DMsonpRx.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";function g(e){return new RegExp(`^${e}#[A-Za-z0-9_-]+(?:\\.[A-Za-z0-9_-]+)*$`)}function E(e){return l().regex(g(e),{message:`must be a "${e}#<key>" reference — expected the target asset stem "${e}", e.g. "${e}#some-key".`}).meta({"x-volter-ref":e})}function u(e,o){let t=e;for(const r of o){if(t===null||typeof t!="object"||Array.isArray(t)||!(r in t))return r;t=t[r]}return null}function j(e,o){const t=p.exec(o);if(!t)throw new Error(`getRef: "${o}" is not a "file#key" reference — expected a string shaped like "some-file#some-key".`);const r=t[1],m=t[2],n=e.sourcePath?.split("\\").join("/").split("/").pop()?.replace(/\.data\.json$/,"");if(n!==void 0&&n!==r)throw new Error(`getRef: ref "${o}" names target asset "${r}", but the handle passed in is "${n}" (${e.sourcePath}). Pass the handle "${r}#..." actually names — getRef(${r}, ...), not getRef(${n}, ...).`);const i=m.split("."),a=e.get(),f=u(a,i);if(f!==null)throw new Error(`getRef: dangling ref "${o}" — "${f}" does not exist`+(n?` in ${n}.data.json`:"")+'. Fix the key or remove the ref (refs are "file#key" strings).');let s=a;for(const c of i)s=s[c];return s}export{E as dataRef,j as getRef};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{D as v}from"./debug-registry-
|
|
1
|
+
import{D as v}from"./debug-registry-DWXKHjIJ.js";import{r as _}from"./game-network-1JI7uhYb.js";const D="volter-debug",T=100,E=50,k=100,P=60,b=2e3,V="the host loop reported liveness 'loop-starved' and this session has no way to drive ticks — no recent rAF progress was observed. Check `volter-game-editor status` for the separate visibility readings; foreground/reload the editor, or start play to wire the run-ticks target, then retry.";async function L(n,s,d){const i=()=>n.state("time"),c=i();let l=c.tick,u=0,g=0;for(;;){const r=i();if(r.simSeconds-c.simSeconds>=s)return{stalled:!1};if(r.loopLiveness==="loop-starved"){if(!d)return{stalled:!0,starvedWithoutDriver:!0};if(g>=b)return{stalled:!0};g+=1;const e=s-(r.simSeconds-c.simSeconds),t=r.fixedDt,o=t!==void 0&&Number.isFinite(t)&&t>0?Math.max(1,Math.ceil(e/t-1e-9)):1;d(Math.min(P,o));const a=i();if(a.tick===r.tick&&a.simSeconds===r.simSeconds)return{stalled:!0};l=a.tick,u=0,await Promise.resolve();continue}if(u=r.tick===l?u+1:0,l=r.tick,u>=k)return{stalled:!0};await new Promise(e=>setTimeout(e,E))}}function h(){return typeof window<"u"}function S(n){return new URLSearchParams(n.search).get(D)==="1"}function A(n){return n.debug?.allowInProduction===!0}function I(n){const{registry:s,manifest:d}=n,i=s.adapter,c=[];function l(e){c.push(e),c.length>T&&c.shift()}const u=e=>{l(e.message||String(e.error))},g=e=>{l(`Unhandled promise rejection: ${String(e.reason)}`)};n.window.addEventListener?.("error",u),n.window.addEventListener?.("unhandledrejection",g);function r(e,t){const o=s.getVirtualInputTarget(t);if(!o)throw new v("DEBUG_INPUT_UNAVAILABLE",`debug bridge: ${e}() has no virtual-input target wired — no root entry exports \`debug.input\` (the game's own input door), or none has mounted yet`);return o}return{version:1,providers:i.providers,state:i.state,stateAll:i.stateAll,commands:i.commands,events:i.events,async invoke(e,t){if(!A(d))throw new v("DEBUG_COMMANDS_UNSUPPORTED",`debug: command "${e}" invocation refused — production build without debug.allowInProduction (D18)`,{name:e});return i.invoke(e,t)},input:{setVirtualAction:(e,t,o)=>r("setVirtualAction",o).setVirtualAction(e,t),tapVirtualAction:(e,t)=>r("tapVirtualAction",t).tapVirtualAction(e),clearVirtualActions:e=>r("clearVirtualActions",e).clearVirtualActions(),scheduleActionAtTick:(e,t,o,a)=>r("scheduleActionAtTick",a).scheduleActionAtTick(e,t,o),startRecording:e=>r("startRecording",e).startInputRecording(),stopRecording:e=>r("stopRecording",e).stopInputRecording(),isRecording:e=>r("isRecording",e).isInputRecording(),injectPointerDelta:(e,t,o)=>r("injectPointerDelta",o).injectPointerDelta(e,t),injectPointerPosition:(e,t,o)=>r("injectPointerPosition",o).injectPointerPosition(e,t)},snapshot(e){return{time:i.state("time"),state:i.stateAll(),events:i.events(e),pageErrors:c.slice()}},runTicks(e,t){const o=s.getRunTicksTarget();if(!o)throw new v("DEBUG_RUN_TICKS_UNAVAILABLE","debug bridge: runTicks() has no run-ticks target wired — no Game has mounted yet");o.runTicks(e,t)},runTicksSettled(e,t){return _(s,e,t)},async holdFor(e,t,o){const a=r("holdFor",o),w=a.setVirtualAction(e,!0);if(!w.delivered)return a.clearVirtualActions(),w.reason!==void 0?{delivered:!1,reason:w.reason}:{delivered:!1};const f=s.getRunTicksTarget(),{stalled:m,starvedWithoutDriver:p}=await L(i,t,f?R=>f.runTicks(R,{render:"last"}):void 0);return a.clearVirtualActions(),m?{delivered:!1,reason:p?V:"play stopped during hold"}:{delivered:!0}},uninstall(){n.window.removeEventListener?.("error",u),n.window.removeEventListener?.("unhandledrejection",g),delete n.window.__volter}}}function U(n){const s=n.url??(h()?window.location:void 0);if(!s||!S(s))return;const d=n.window??(h()?window:void 0);if(!d)return;if(!A(n.manifest)){console.warn("[debug] ?volter-debug=1 ignored: production build without debug.allowInProduction (D18)");return}const i=I({registry:n.registry,manifest:n.manifest,window:d});return d.__volter=i,i}export{V as H,U as m,L as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d$ as L}from"./index-
|
|
1
|
+
import{d$ as L}from"./index-DMsonpRx.js";function B(o){const s=Symbol.for(`@volter/game-runtime/game-scoped/${o}`);return{set(u,d){Object.defineProperty(u,s,{configurable:!0,enumerable:!1,value:d})},get(u){return u[s]??null}}}class c extends Error{code;data;constructor(s,u,d){super(u),this.name="DebugError",this.code=s,this.data=d}}const T="ctx.debug.registerStateProvider(name, fn) — see the template example component";function P(o){if(o instanceof Error){const s={causeName:o.name,causeMessage:o.message};return o.stack===void 0?s:{...s,causeStack:o.stack}}return{causeName:typeof o,causeMessage:String(o)}}const q=1e4;function y(o,s,u,d){o.has(s)||(o.add(s),console.warn(`[debug] ${u} "${s}" re-registered (world "${d}")`))}function V(o){const s=new Map,u=new Map,d=new Set,S=new Set,m=[],R=500;let p=0,I=!1;const _=new Map,w=new Map,l=new Map;let E=null;const D=new Set;let b=null;const g=new Map;let N=0;function C(e){if(e!==void 0){if(!l.has(e))throw new c("DEBUG_INPUT_WORLD_NOT_FOUND",`debug: no input door wired for world "${e}" — registered: `+(l.size?[...l.keys()].join(", "):"(none)"),{worldId:e,registered:[...l.keys()]});return e}return h(l.keys())}function h(e){const t=[...e];if(t.length===0)return null;const r=o.getDefaultRootId?.()??null;return r!==null&&t.includes(r)?r:t[0]}s.set("time",{fn:()=>({simSeconds:o.getSimT(),tick:o.getTick(),loopLiveness:o.getLoopLiveness?.()??null,...o.getFixedDt===void 0?{}:{fixedDt:o.getFixedDt()}}),tier:"observable",worldId:"__engine__",builtin:!0}),s.set("input.actions",{fn:()=>{const e=h(_.keys());return(e?_.get(e):void 0)?.()??[]},tier:"observable",worldId:"__engine__",builtin:!0}),s.set("input.trace",{fn:()=>{const e=h(w.keys());return(e?w.get(e):void 0)?.()??{version:1,seed:null,fixedDt:null,ticks:[]}},tier:"observable",worldId:"__engine__",builtin:!0});function O(e,t,r,i){const n=s.get(t);if(n?.builtin)throw new c("DEBUG_BUILTIN_RESERVED",`debug: "${t}" is a built-in state provider (registered by "${n.worldId}") — built-in names cannot be registered over from a world`,{name:t,registered:n.worldId});if(n){if(n.worldId!==e)throw new c("DEBUG_NAME_COLLISION",`debug: state provider "${t}" is registered by both world "${n.worldId}" and world "${e}" — each provider name must be unique across live roots`,{name:t,roots:[n.worldId,e]});y(d,t,"provider",e)}s.set(t,{fn:r,tier:i,worldId:e,builtin:!1})}function A(e,t,r,i){if(r.locus===void 0&&I)throw new c("DEBUG_COMMAND_LOCUS_REQUIRED","this project declares a Colyseus room — declare locus: 'client' | 'server' so fixtures mutate authoritative state, not client prediction",{name:t,worldId:e});const n=u.get(t);if(n){if(n.worldId!==e)throw new c("DEBUG_NAME_COLLISION",`debug: command "${t}" is registered by both world "${n.worldId}" and world "${e}" — each command name must be unique across live roots`,{name:t,roots:[n.worldId,e]});y(S,t,"command",e)}u.set(t,{description:r.description,argsSchema:r.args,locus:r.locus,fn:i,worldId:e})}function $(e,t){p+=1,m.push({tick:o.getTick(),simT:o.getSimT(),event:e,detail:t,seq:p}),m.length>R&&m.shift()}function k(e){return e===void 0?m.slice():m.filter(t=>t.seq>e)}function G(e,t){if(!b)throw new c("DEBUG_COMMAND_FAILED",`debug: command "${e}" is locus:'server' but no Colyseus room is attached (call ctx.debug.attachRoom(room) once your game joins its room)`,{reason:"no room connection"});const r=`dbg-${++N}`,i=b;return new Promise((n,a)=>{const f=setTimeout(()=>{g.delete(r),a(new c("DEBUG_COMMAND_FAILED",`debug: command "${e}" (requestId "${r}") timed out waiting for the server`,{reason:"server timeout"}))},q);g.set(r,{resolve:n,reject:a,timer:f}),i.send("__volter:debugCommand",{name:e,args:t,requestId:r})})}let v=null;function U(e){v?.(),b=e;const t=e.onMessage("__volter:debugCommandResult",i=>{const n=i,a=n?.requestId;if(a===void 0)return;const f=g.get(a);f&&(g.delete(a),clearTimeout(f.timer),n?.ok?f.resolve(n.result):f.reject(new c("DEBUG_COMMAND_FAILED",`debug: server command failed: ${String(n?.error)}`,{cause:n?.error})))}),r=()=>{if(v===r){v=null,b===e&&(b=null),typeof t=="function"&&t();for(const[i,n]of g)clearTimeout(n.timer),n.reject(new c("DEBUG_COMMAND_FAILED",`debug: command (requestId "${i}") failed — its room was detached before a reply arrived`,{reason:"no room connection"}));g.clear()}};return v=r,r}return{adapter:{providers(){return[...s.entries()].map(([e,t])=>({name:e,tier:t.tier}))},state(e){const t=s.get(e);if(!t)throw new c("STATE_PROVIDER_NOT_FOUND",`debug: no state provider registered under "${e}"`,{registered:[...s.keys()],registrationHint:T});return t.fn()},stateAll(){const e={};for(const[t,r]of s)try{e[t]=r.fn()}catch(i){e[t]={__error:String(i)}}return e},commands(){return[...u.entries()].map(([e,t])=>({name:e,description:t.description,argsJsonSchema:t.argsSchema?L(t.argsSchema,{unrepresentable:"any"}):void 0,locus:t.locus??"client"}))},async invoke(e,t){const r=u.get(e);if(!r)throw new c("DEBUG_COMMAND_NOT_REGISTERED",`debug: no command registered under "${e}"`,{registered:[...u.keys()],registrationHint:T});let i=t;if(r.argsSchema){const n=r.argsSchema.safeParse(t);if(!n.success)throw new c("DEBUG_COMMAND_ARGS_INVALID",`debug: command "${e}" received invalid args`,{issues:n.error.issues});i=n.data}if((r.locus??"client")==="server")return G(e,i);try{return await r.fn(...i)}catch(n){const a=P(n);throw new c("DEBUG_COMMAND_FAILED",`debug: command "${e}" threw: ${a.causeMessage}`,{cause:n,...a})}},events(e){return k(e)}},forRoot(e){return{registerStateProvider(t,r,i){O(e,t,r,i?.tier??"observable")},registerCommand(t,r,i){A(e,t,r,i)},emit(t,r){$(t,r)},attachRoom(t){return U(t)}}},strip(e){for(const[t,r]of s)r.builtin||e!==void 0&&r.worldId!==e||(s.delete(t),d.delete(t));for(const[t,r]of u)e!==void 0&&r.worldId!==e||(u.delete(t),S.delete(t))},setRoomDeclared(e){I=e},setInputActionsSource(e,t){_.set(e,t)},setInputTraceSource(e,t){w.set(e,t)},setVirtualInputTarget(e,t){l.set(e,t)},getVirtualInputTarget(e){const t=C(e);return t!==null?l.get(t)??null:null},setRunTicksTarget(e){E=e},getRunTicksTarget(){return E},registerWorldSettledProbe(e){return D.add(e),()=>{D.delete(e)}},worldSettled(){for(const e of D)try{if(!e())return!1}catch{return!1}return!0},getGameTick(){return o.getTick()}}}const M=B("debug-registry");function j(o,s){M.set(o,s)}function H(o){return M.get(o)??null}export{c as D,V as a,B as c,H as g,j as r};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/canvas-entry-runtime-
|
|
2
|
-
import{y as u,z as f,_ as i,B as d,E as n,F as m,G as p,I as g}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/canvas-entry-runtime-CB0dWiqf.js","assets/index-DMsonpRx.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/debug-registry-DWXKHjIJ.js","assets/mount-ingest-root-YqfeOphI.js","assets/active-ingest-CEa53vF0.js","assets/game-contract-seams-6S6C0ztA.js","assets/capability-coverage-BW0jhUWf.js","assets/ingest-source-persistence-B0NaYeRY.js","assets/contract-system-adapters-Cgl3IHIO.js","assets/three-state-TqrpCspu.js","assets/editor-shell-store-BqJU8Lu8.js","assets/output-pass-HurwNl0G.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/Pass-D1MRT672.js","assets/editor-layers-C-4kqPi7.js","assets/workspace-arrangement-CHzaISez.js","assets/user-data-BsgiyhZb.js","assets/entity-object-S9jvlW_s.js","assets/three-contract-Dkt6PmWY.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{y as u,z as f,_ as i,B as d,E as n,F as m,G as p,I as g}from"./index-DMsonpRx.js";import{q as v}from"./edit-mode-authoring-DbOPyppg.js";import{d as P,a as c,b as y,g as w,e as I,c as _}from"./active-ingest-CEa53vF0.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./game-contract-seams-6S6C0ztA.js";import"./capability-coverage-BW0jhUWf.js";import"./ingest-source-persistence-B0NaYeRY.js";import"./contract-system-adapters-Cgl3IHIO.js";async function h(){const e=await u().catch(()=>null);if(!e)return!1;const t=f(e);if(t.length!==1)return!1;if(t[0].world!==void 0)return!0;const a=await E();return R(a)}const D=4e3;function E(){const e=n();return e?Promise.resolve(e):new Promise(t=>{const a=setTimeout(()=>{s(),t(n())},D),s=m(()=>{const r=n();r&&(clearTimeout(a),s(),t(r))})})}function R(e){return e?p(e.scenes).some(t=>t.plan.kind==="isolation-document"):!1}async function k(e){if(!await h())return!1;const t=await u().catch(()=>null);if((t?f(t).some(r=>r.adapter.surface==="canvas"):!1)&&!c()){const{resolveCanvasPixiForEditor:r}=await i(async()=>{const{resolveCanvasPixiForEditor:l}=await import("./canvas-entry-runtime-CB0dWiqf.js");return{resolveCanvasPixiForEditor:l}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]));(await r()).Assets.reset()}const{launchIngestRoutes:s}=await i(async()=>{const{launchIngestRoutes:r}=await import("./mount-ingest-root-YqfeOphI.js").then(o=>o.m);return{launchIngestRoutes:r}},__vite__mapDeps([12,1,2,3,4,5,6,7,8,9,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28]));if(await s(e),!c())throw new Error(`Play could not start: this project's ingest root failed to mount — see the mount failure reported above (and in ${d("status")}).`);return y(),g(),w()?.play(),!0}function z(e){return P()?(I(),_(),e.shell.setPlayState("stopped"),v(),!0):!1}export{P as deferredIngestPlayActive,z as exitDeferredIngestPlay,h as ingestMountIsDeferredToPlay,k as mountDeferredIngestForPlay};
|
package/dist/assets/{design-time-canvas-mount-DUHPdiqg.js → design-time-canvas-mount-MsbDbVsh.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/canvas-design-mount-
|
|
2
|
-
import{_ as u,dk as c,dl as l}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/canvas-design-mount-Dcz3UbWk.js","assets/index-DMsonpRx.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/babylon-authoring-adapter-ClTj2MC3.js","assets/json-history-resource-BF-O43PD.js","assets/source-persistence-backend-cM6_hFF1.js","assets/ingest-source-persistence-B0NaYeRY.js","assets/pixi-authoring-adapter-DMl8lJFO.js","assets/index-DDurbNnD.js","assets/component-instance-root-CuhMBeTq.js","assets/user-data-BsgiyhZb.js","assets/workspace-arrangement-CHzaISez.js","assets/pixi-transform-channels-P4rvmusc.js","assets/relative-import-specifier-C6rJbXKw.js","assets/oid-transform-DAnbWV6K.js","assets/writer-tw6EcuVO.js","assets/r3f-physics-binding-DrjAxMEm.js","assets/canvas-preview-frames-C_AwHp0A.js","assets/canvas-entry-runtime-CB0dWiqf.js","assets/debug-registry-DWXKHjIJ.js","assets/realm-services-CoCivh2s.js","assets/three-ingest-runtime-Cw0ElzJG.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/EffectComposer-BEAt0PtQ.js","assets/CopyShader-BzTUYzf6.js","assets/ShaderPass-DTnDQXm0.js","assets/Pass-D1MRT672.js","assets/CSS3DRenderer-BsAqfavI.js","assets/native-debug-module-BAc7TBPq.js","assets/native-entry-surface-BE8LJNdu.js","assets/contract-system-adapters-Cgl3IHIO.js","assets/game-contract-seams-6S6C0ztA.js","assets/assets-BcrMQHRv.js","assets/loader-BTUKnX5Q.js","assets/KTX2Loader-CaqVE6nY.js","assets/GLTFLoader-KeoruJgS.js","assets/BufferGeometryUtils-B22h7jo4.js","assets/create-runtime-CO8JmCX7.js","assets/adapter-surface-Y37Nzcyw.js","assets/binding-Bmxqznjk.js","assets/root-stacking-BEd9ZvxC.js","assets/setup-renderer-kDlv1zGC.js","assets/index-DHhMOs_s.js","assets/defaults-DKiBJCPN.js","assets/render-settings-Bi_X7ET1.js","assets/render-features-1RxcHk6L.js","assets/seeded-random-MSFUDgJ4.js","assets/loop-gate-report-N52EWFGD.js","assets/system-slot-E2mEdiih.js","assets/user-data-CODoGZqA.js","assets/object-marks-BnvSuCTt.js","assets/performance-profiler-CMbwGBuk.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as u,dk as c,dl as l}from"./index-DMsonpRx.js";import{t as d}from"./three-state-TqrpCspu.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"./editor-shell-store-BqJU8Lu8.js";import"./output-pass-HurwNl0G.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./Pass-D1MRT672.js";import"./editor-layers-C-4kqPi7.js";import"./workspace-arrangement-CHzaISez.js";import"./user-data-BsgiyhZb.js";import"./entity-object-S9jvlW_s.js";import"./three-contract-Dkt6PmWY.js";async function W(o,t,e){const{mountCanvasDesignLayer:r}=await u(async()=>{const{mountCanvasDesignLayer:p}=await import("./canvas-design-mount-Dcz3UbWk.js");return{mountCanvasDesignLayer:p}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,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])),{projectRootPath:s,view:a,activationDocumentId:i}=e,n=d();if(!n)throw new Error(`canvas root "${o.worldId}": the editor store is not bound yet.`);const m=await r(o.worldId,o.path,t,s,n,a,i?()=>c(i):void 0);return{adapter:m.adapter,dispose:()=>m.dispose()}}function $(o){let t=null;const e=l(r=>{r!==""&&!/^src\/.+\.(?:[cm]?tsx?|jsx?)$/.test(r)||(t!==null&&clearTimeout(t),t=setTimeout(()=>{t=null,o()},150))});return()=>{t!==null&&clearTimeout(t),t=null,e()}}export{W as mountCanvasDesignTimeLayer,$ as remountWhenSourceIsWritten};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{stackOrder as se}from"./root-stacking-BEd9ZvxC.js";import{dp as ie,dq as de,dr as le,da as ae,aw as ue,ds as L,bq as fe,O as P,bp as pe,aB as ce,dt as we,dd as he,db as ye}from"./index-
|
|
1
|
+
import{stackOrder as se}from"./root-stacking-BEd9ZvxC.js";import{dp as ie,dq as de,dr as le,da as ae,aw as ue,ds as L,bq as fe,O as P,bp as pe,aB as ce,dt as we,dd as he,db as ye}from"./index-DMsonpRx.js";import{B as S,q as N}from"./edit-mode-authoring-DbOPyppg.js";import{s as me,d as I,a as ge}from"./design-time-mount-registry-DUpXCg1U.js";import{d as Ie,s as be,g as ve,e as Se}from"./react-story-board-COo6rUfn.js";import{m as ke}from"./game-surface-defaults-D8S4cRxi.js";const H=new Map;function G(n,r){return`${n}\0${r}`}function De(n,r){return H.get(G(n,r))}function Ve(n,r,t){H.set(G(n,r),t)}const Ce=1;function J(n){const r=[];for(const{worldId:t,adapter:d}of n.childAdapters()){if(!(d instanceof S))continue;const a=d.inspector.get(t,"kind");if(a!=="dom"&&a!=="canvas"||d.inspector.get(t,"reason")!==void 0)continue;const b=d.inspector.get(t,"adapter");b?.startsWith("ingest")||b?.startsWith("module")||r.push({worldId:t,kind:a,path:d.inspector.get(t,"path"),zOrder:Number(d.inspector.get(t,"zOrder")??0),pausable:d.inspector.get(t,"pausable")!==!1})}return r}function xe(n){return J(n)}const Oe="ui-components-board";function j(n,r){return n.childAdapters().some(t=>t.worldId===r)}function We(){return{worldId:Oe,kind:"dom",path:void 0,zOrder:0,pausable:!0}}function K(n,r,t="dom"){const d=ce(r)?"none":"block";n.style.display=d,n.style.pointerEvents=I(t)?.alwaysInteractive||we(r)?"auto":"none";for(const a of Array.from(n.parentElement?.children??[]))a instanceof HTMLElement&&a.dataset.volterStoryBoardChromeFor===r&&(a.style.display=d)}function Re(n,r,t,d){const{worldId:a}=r,s=document.createElement("div");return s.dataset.worldId=a,s.dataset.volterRootSurface="true",d&&(s.dataset.volterCanvasScene="true"),s.style.position="absolute",s.style.top="0",s.style.left="0",s.style.width="100%",s.style.height="100%",s.style.zIndex=String(t),s.style.contain="layout paint",ke(s),K(s,a,r.kind),D(s),n.appendChild(s),s}function D(n){if(n.dataset.volterCanvasScene==="true"){n.style.transform="",n.style.width="100%",n.style.height="100%";return}if(n.style.transform=he(ye())??"",n.style.transformOrigin="0 0",n.dataset.volterReactStoryBoard==="true")return;const r=ve();n.style.width=r.width===null?"100%":`${r.width}px`,n.style.height=r.height===null?"100%":`${r.height}px`}const E=new Map;function qe(n,r,t,d,a,s,b){s?s.canvasSceneView.reset():ie(),Se();const k=ue();if(!s&&k?.config.resolution&&Ie(k.config.resolution.width,k.config.resolution.height),t.playState!=="stopped"){let e=!1,o=!1;const i=t.subscribe(()=>{e||o||t.playState!=="stopped"||(o=!0,e||N())});return()=>{e=!0,i()}}const V=k?.rootPath,z=d?[...d]:J(r);if(z.length===0||!V)return()=>{};const U=V,y=se(z.map(e=>({id:e.worldId,zOrder:e.zOrder}))).map(e=>z.find(o=>o.worldId===e.id)),x=new Map(y.map(e=>[e.worldId,e])),u=new Map,m=new Map,C=new Map,O=new Set,R=new Set,T=new Set;let h=!1,p=!1,W=!1;function q(){for(const e of m.values())try{e()}catch(o){P.error(`[design-time-layers] dispose failed: ${o}`,"authoring")}m.clear();for(const e of u.values())e.remove();u.clear();for(const e of y)a?.(e.worldId,null)}function X(){q();for(const e of O){const o=x.get(e);if(!o)continue;const i={id:o.worldId,kind:o.kind,entryOrScenePath:o.path,zOrder:o.zOrder,pausable:o.pausable};r.replaceChild(e,new S(t,i,"Design-time layer suspended by play mode — Stop restores it."))}O.clear(),t.notifyIngestEdit()}function M(e,o,i){const l=I(e.kind);if(!l){R.add(e.worldId);return}R.delete(e.worldId);const f=(C.get(e.worldId)??0)+1;C.set(e.worldId,f);const c=Re(n,e,Ce+o,!!s);u.set(e.worldId,c);const B={projectRootPath:U,store:t,...s?{view:s.canvasSceneView}:{},...b?{activationDocumentId:b}:{}},_=E.get(e.worldId),$=(async()=>(_&&await _,l.mount(e,c,B)))().then(w=>{if(h||p||C.get(e.worldId)!==f){w.dispose();return}if(w.adapter)j(r,e.worldId)&&(r.replaceChild(e.worldId,w.adapter),O.add(e.worldId)),a?.(e.worldId,w.adapter);else if(w.pick){const v={id:e.worldId,kind:e.kind,entryOrScenePath:e.path,zOrder:e.zOrder,pausable:e.pausable};r.replaceChild(e.worldId,new S(t,v,void 0,w.pick)),O.add(e.worldId)}m.set(e.worldId,w.dispose),L(e.worldId),t.notifyIngestEdit(),i?.()}).catch(w=>{if(C.get(e.worldId)!==f||(i?.(),c.remove(),u.get(e.worldId)===c&&u.delete(e.worldId),h||p))return;const v=fe(w);P.error(`[design-time-layers] world "${e.worldId}" (${e.kind}) failed to mount: ${v}`,"authoring");const ne={id:e.worldId,kind:e.kind,entryOrScenePath:e.path,zOrder:e.zOrder,pausable:e.pausable};a?.(e.worldId,null),j(r,e.worldId)&&r.replaceChild(e.worldId,new S(t,ne,v)),pe({worldId:e.worldId,kind:e.kind,identity:l.identity,message:v}),t.notifyIngestEdit()});E.set(e.worldId,$),$.then(()=>{E.get(e.worldId)===$&&E.delete(e.worldId)})}y.forEach((e,o)=>{M(e,o)});function Y(e,o){const i=m.get(e.worldId);m.delete(e.worldId);const l=u.get(e.worldId);u.delete(e.worldId),M(e,o,()=>{const c=u.get(e.worldId);if(c&&(c.style.visibility=""),i)try{i()}catch(B){P.error(`[design-time-layers] re-projection dispose failed: ${B}`,"authoring")}l?.remove()});const f=u.get(e.worldId);f&&f!==l&&(f.style.visibility="hidden")}function Z(e,o){const i=m.get(e.worldId);if(m.delete(e.worldId),i)try{i()}catch(f){P.error(`[design-time-layers] remount dispose failed: ${f}`,"authoring")}const l=u.get(e.worldId);l&&(l.remove(),u.delete(e.worldId)),M(e,o)}const g=new Map;function A(){for(const[e,o]of g)I(e.kind)!==e&&(o(),g.delete(e));for(const e of ge()){if(g.has(e)||I(e.kind)!==e||!y.some(l=>l.kind===e.kind))continue;const o=[],i=l=>()=>{h||p||t.playState!=="stopped"||y.forEach((f,c)=>{f.kind===e.kind&&l(f,c)})};e.remountWhen&&o.push(e.remountWhen(i(Z))),e.reprojectWhen&&o.push(e.reprojectWhen(i(Y))),g.set(e,()=>{for(const l of o)l()})}}A();const Q=me(()=>{h||p||t.playState!=="stopped"||(y.forEach((e,o)=>{R.has(e.worldId)&&I(e.kind)&&(T.delete(e.worldId),L(e.worldId),M(e,o))}),A())}),F=()=>{if(h||p)return;let e=!1;for(const o of y){if(!R.has(o.worldId)||T.has(o.worldId)||I(o.kind)||(T.add(o.worldId),!j(r,o.worldId)))continue;const i={id:o.worldId,kind:o.kind,entryOrScenePath:o.path,zOrder:o.zOrder,pausable:o.pausable};r.replaceChild(o.worldId,new S(t,i,`No package in this editor registered a design-time mount for a "${o.kind}" world, so there is nothing here to author it with.`)),e=!0}e&&t.notifyIngestEdit()},ee=de(F);le()&&F();const oe=ae(()=>{for(const e of u.values())D(e)}),te=be(()=>{for(const e of u.values())D(e)}),re=t.subscribe(()=>{if(!p&&t.playState!=="stopped"){p=!0,X();return}if(p&&!W&&t.playState==="stopped"&&!h){W=!0,h||N();return}if(!p)for(const[e,o]of u)K(o,e,x.get(e)?.kind??"dom")});return()=>{h=!0;for(const e of g.values())e();g.clear(),Q(),ee(),re(),oe(),te(),q()}}export{Ve as a,xe as d,qe as m,We as p,De as r};
|
package/dist/assets/{design-time-mount.service-mI18AWHZ.js → design-time-mount.service-C-jPEtUV.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/design-time-react-mount-
|
|
2
|
-
import{_ as i}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/design-time-react-mount-DC_O5p5I.js","assets/design-time-layers-Be9HqnEr.js","assets/root-stacking-BEd9ZvxC.js","assets/index-DMsonpRx.js","assets/index-nmcBqr7Y.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-D_NuPfjr.js","assets/jsx-runtime-DPjLkJKQ.js","assets/index-CtzuWnCS.js","assets/index-CinJrH5C.js","assets/index-FUuS4qwW.js","assets/client-DNXj_opT.js","assets/index-CPiRKiDC.css","assets/edit-mode-authoring-DbOPyppg.js","assets/design-time-mount-registry-DUpXCg1U.js","assets/react-story-board-COo6rUfn.js","assets/game-surface-defaults-D8S4cRxi.js","assets/crash-null-boundary-v3a0uEgw.js","assets/realm-services-CoCivh2s.js","assets/canvas-entry-runtime-CB0dWiqf.js","assets/debug-registry-DWXKHjIJ.js","assets/three-ingest-runtime-Cw0ElzJG.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/EffectComposer-BEAt0PtQ.js","assets/CopyShader-BzTUYzf6.js","assets/ShaderPass-DTnDQXm0.js","assets/Pass-D1MRT672.js","assets/CSS3DRenderer-BsAqfavI.js","assets/react-root-BHA-cdrW.js","assets/StoryPreviewMount-BHsmVp-C.js","assets/story-presentation-5ksxI-cK.js","assets/three-story-model-DJPp75up.js","assets/inspect-D4blh5_a.js","assets/inference-diagnostics-CUavJjuI.js","assets/react-world-authoring-adapter-CI1sk6F6.js","assets/board-guides-DvGa-v8v.js","assets/relative-import-specifier-C6rJbXKw.js","assets/story-arg-descriptors-Ek86ExX7.js","assets/writer-tw6EcuVO.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as i}from"./index-DMsonpRx.js";import{r as m}from"./design-time-mount-registry-DUpXCg1U.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 v="workspace.service";function y(){return m({kind:"dom",owner:"@volter/editor-game/react/design-time-mount",identity:"default-react",mount:async(r,e,t)=>{const{mountReactDesignLayer:o}=await i(async()=>{const{mountReactDesignLayer:n}=await import("./design-time-react-mount-DC_O5p5I.js");return{mountReactDesignLayer:n}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39]));return o(r,e,t)},reprojectWhen:r=>{let e=!1,t=null;return i(()=>import("./design-time-react-mount-DC_O5p5I.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39])).then(o=>{e||(t=o.reprojectWhenStoriesRepublish(r))}),()=>{e=!0,t?.(),t=null}}})}export{v as point,y as start};
|
package/dist/assets/{design-time-mount.service-vZHpReNB.js → design-time-mount.service-CYWk8whR.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/design-time-canvas-mount-
|
|
2
|
-
import{_ as n}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/design-time-canvas-mount-MsbDbVsh.js","assets/index-DMsonpRx.js","assets/index-nmcBqr7Y.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-D_NuPfjr.js","assets/jsx-runtime-DPjLkJKQ.js","assets/index-CtzuWnCS.js","assets/index-CinJrH5C.js","assets/index-FUuS4qwW.js","assets/client-DNXj_opT.js","assets/index-CPiRKiDC.css","assets/three-state-TqrpCspu.js","assets/editor-shell-store-BqJU8Lu8.js","assets/output-pass-HurwNl0G.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/Pass-D1MRT672.js","assets/editor-layers-C-4kqPi7.js","assets/workspace-arrangement-CHzaISez.js","assets/user-data-BsgiyhZb.js","assets/entity-object-S9jvlW_s.js","assets/three-contract-Dkt6PmWY.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as n}from"./index-DMsonpRx.js";import{r as a}from"./design-time-mount-registry-DUpXCg1U.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 g="workspace.service";function y(){return a({kind:"canvas",owner:"@volter/editor-game/canvas/design-time-mount",identity:"default-pixi",alwaysInteractive:!0,mount:async(r,e,t)=>{const{mountCanvasDesignTimeLayer:i}=await n(async()=>{const{mountCanvasDesignTimeLayer:o}=await import("./design-time-canvas-mount-MsbDbVsh.js");return{mountCanvasDesignTimeLayer:o}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]));return i(r,e,t)},remountWhen:r=>{let e=!1,t=null;return n(()=>import("./design-time-canvas-mount-MsbDbVsh.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])).then(i=>{e||(t=i.remountWhenSourceIsWritten(r))}),()=>{e=!0,t?.(),t=null}}})}export{g as point,y as start};
|
package/dist/assets/{design-time-react-mount-Dra56frK.js → design-time-react-mount-DC_O5p5I.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as it,a as at}from"./design-time-layers-
|
|
1
|
+
import{r as it,a as at}from"./design-time-layers-Be9HqnEr.js";import{f8 as st,b9 as lt,g5 as ut,g6 as dt,O as E,g7 as mt,g8 as L,bq as Y,dk as H,am as ct,eH as U,an as $,d5 as pt,ch as ht,g9 as z}from"./index-DMsonpRx.js";import{h as ft,d as gt,g as bt}from"./react-story-board-COo6rUfn.js";import{C as wt}from"./crash-null-boundary-v3a0uEgw.js";import{r as yt,a as St}from"./realm-services-CoCivh2s.js";import{r as It}from"./react-root-BHA-cdrW.js";import{m as Rt}from"./StoryPreviewMount-BHsmVp-C.js";import{c as vt,s as Pt}from"./story-presentation-5ksxI-cK.js";import{d as Mt}from"./three-story-model-DJPp75up.js";import{c as Ct}from"./inspect-D4blh5_a.js";import{R as J}from"./react-world-authoring-adapter-CI1sk6F6.js";import"./root-stacking-BEd9ZvxC.js";import"./edit-mode-authoring-DbOPyppg.js";import"./design-time-mount-registry-DUpXCg1U.js";import"./game-surface-defaults-D8S4cRxi.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"./canvas-entry-runtime-CB0dWiqf.js";import"./debug-registry-DWXKHjIJ.js";import"./three-ingest-runtime-Cw0ElzJG.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./EffectComposer-BEAt0PtQ.js";import"./CopyShader-BzTUYzf6.js";import"./ShaderPass-DTnDQXm0.js";import"./Pass-D1MRT672.js";import"./CSS3DRenderer-BsAqfavI.js";import"./inference-diagnostics-CUavJjuI.js";import"./board-guides-DvGa-v8v.js";import"./relative-import-specifier-C6rJbXKw.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./writer-tw6EcuVO.js";function Et(e){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="svg"||o==="SVG"||o==="PICTURE")return!0;const r=getComputedStyle(e);if(r.visibility==="hidden"||r.display==="none")return!1;if(xt(r.backgroundColor)||r.backgroundImage&&r.backgroundImage!=="none"||r.boxShadow&&r.boxShadow!=="none"||r.borderStyle!=="none"&&r.borderStyle!==""&&(parseFloat(r.borderTopWidth)>0||parseFloat(r.borderRightWidth)>0||parseFloat(r.borderBottomWidth)>0||parseFloat(r.borderLeftWidth)>0))return!0;for(const n of e.childNodes)if(n.nodeType===Node.TEXT_NODE&&(n.textContent??"").trim()!=="")return!0;return!1}function xt(e){if(!e||e==="transparent")return!1;const o=/^rgba\(\s*[\d.]+\s*,\s*[\d.]+\s*,\s*[\d.]+\s*,\s*([\d.]+)\s*\)$/.exec(e);return o?parseFloat(o[1])>0:!0}function Nt(e,o=r=>r.getBoundingClientRect()){const r=o(e),n=e.offsetWidth;if(r.width<=0||n<=0)return null;const s=r.width/n;let d=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,y=Number.NEGATIVE_INFINITY;for(const p of e.querySelectorAll("*")){if(!Et(p))continue;const m=o(p);m.width<=0||m.height<=0||(d=Math.min(d,(m.left-r.left)/s),c=Math.min(c,(m.top-r.top)/s),i=Math.max(i,(m.right-r.left)/s),y=Math.max(y,(m.bottom-r.top)/s))}return i<=d||y<=c?null:{x:d,y:c,width:i-d,height:y-c}}let x=!1;function kt(e,o){if(!e)return;z({adapter:e,seam:"editor.stories.apply",stage:"effect",detail:`the design board applied portable story ${o}`,run:()=>e.stories.apply(o,o)});const r=e.selection;r&&z({adapter:e,seam:"editor.selection.set",stage:"effect",detail:`the design board selected portable story ${o}`,run:()=>r.set([o])})}let X=!1;async function Ft(){if(X)return;X=!0;const e=bt();if(!(e.width!==null||e.height!==null))try{const o=await ht("volter.project.json");if(!o)return;const r=JSON.parse(o),n=r.resolution?.width,s=r.resolution?.height;if(typeof n!="number"||typeof s!="number"||n<64||s<64||n>4096||s>4096)return;gt(n,s)}catch{}}function Tt(e,o){return{id:e,surface:"dom",description:void 0,adapter:{type:"builtin",identity:"dom",surface:"dom"},entry:o,zOrder:0,pausable:!0,loop:"gated"}}async function At(e,o){try{const r=await St(o,pt());return{ok:!0,Entry:await It(e,r)}}catch(r){return{ok:!1,error:r}}}async function we(e,o,r){const{projectRootPath:n,store:s,activationDocumentId:d}=r;x?x=!1:await st({rootPath:n});const c=lt(),i=Mt(c),y=e.path,p=y?await At(Tt(e.worldId,y),n):{ok:!1,error:new Error(`design-time react layer "${e.worldId}": no \`entry\` declared — nothing to mount.`)},m=p.ok?ut(p.Entry):void 0,Q=m?dt(m,e.path):null,j=i.find(g=>g.id===Q?.id)??null;if(i.length>0){const g=it(n,e.worldId),R=i.find(t=>t.id===g)??j??i[0];e.path&&!j&&E.warn(`[design-time-layers] React root "${e.worldId}" has no story naming its entry component${m?` "${m}"`:""} — the board opens on "${R.label}". Give a *.stories.tsx a \`meta.component\` of this root's entry component to choose its default preview.`,"authoring");let k=!1,M=null,F=null;const T=new Map,D=vt(i);await Ft();const l=ft(o,i.map(t=>({id:t.id,label:t.label,modulePath:t.modulePath,...t.title?{title:t.title}:{},parameters:t.parameters,...t.globals?{globals:t.globals}:{},...t.viewportLocked!==void 0?{viewportLocked:t.viewportLocked}:{}})),R.id,(t,u)=>{F=u,kt(M,t)},Pt(i,D)),_=t=>{if(k)return;const u=l.frames.get(t.id);if(!u)return;if(t.parameters?.layout==="fullscreen"){l.setMeasuredFrame(t.id,null);return}const a={width:u.content.offsetWidth,height:u.content.offsetHeight},f=a.width>0?Nt(u.content):null;if(!f){l.setMeasuredFrame(t.id,null);return}const C=8,S=48;let b=Math.max(0,f.x-C),w=Math.max(0,f.y-C),v=Math.min(a.width,f.x+f.width+C),P=Math.min(a.height,f.y+f.height+C);if(v-b<S){const A=(S-(v-b))/2;b=Math.max(0,b-A),v=Math.min(a.width,b+S)}if(P-w<S){const A=(S-(P-w))/2;w=Math.max(0,w-A),P=Math.min(a.height,w+S)}if(v-b>=a.width*.9&&P-w>=a.height*.9){l.setMeasuredFrame(t.id,null);return}l.setMeasuredFrame(t.id,{frame:{width:Math.round(v-b),height:Math.round(P-w)},mount:a,offset:{x:Math.round(b),y:Math.round(w)}})},rt=t=>{setTimeout(()=>_(t),0),setTimeout(()=>_(t),1e3)},G=async(t,u=t.args)=>{const h=l.frames.get(t.id)?.content;if(h){try{const a=await Rt(h,t.modulePath,t.name,t.Component,u);if(!a)return;if(k){a.unmount();return}T.set(t.id,a),l.clearError(t.id),rt(t)}catch(a){const f=Y(a);l.setError(t.id,f),E.error(`[design-time-layers] React root "${e.worldId}" failed mounting portable story "${t.name}": ${f}`,"authoring")}s.notifyIngestEdit()}};await Promise.all(i.map(t=>G(t))),l.setNote(mt().note),g&&l.activate(R.id,!0);const O=new Map(i.map(t=>[t.id,t])),nt={tagName:"DIV",get children(){return l.activeContent().children},getAttribute:t=>o.getAttribute(t),getBoundingClientRect:()=>o.getBoundingClientRect(),get style(){return o.style},get textContent(){return l.activeContent().textContent}},q=await L();return M=new J(nt,s,{...q?{writeBackend:q}:{},designTokens:()=>{const t=l.activeContent(),u=t.closest?.("[data-volter-game-styles]")??t.querySelector?.("[data-volter-game-styles]")??t;return Ct(getComputedStyle(u))},assetRoot:o,portableStories:i.map(t=>({id:t.id,label:t.label,args:t.args,name:t.name,modulePath:t.modulePath})),portableHierarchy:D,activePortableStoryId:R.id,onPortableStoryApplied:t=>{const u=(t?O.get(t):null)??R;at(n,e.worldId,u.id);const h=F;F=null,l.activate(u.id,h===null||h==="zoom")},onPortableStoryArgsChanged:(t,u)=>{const h=O.get(t);h&&G(h,u).catch(a=>{E.error(`[design-time-layers] React root "${e.worldId}" failed updating portable story "${h.name}" args: ${Y(a)}`,"authoring")})}}),d&&requestAnimationFrame(()=>H(d)),{adapter:M,dispose:()=>{k=!0,M.disposeReactRootAdapter();for(const t of T.values())t.unmount();T.clear(),l.dispose()}}}if(!p.ok)throw p.error instanceof Error?p.error:new Error(String(p.error));E.warn(`[design-time-layers] React root "${e.worldId}" has no portable CSF preview — the project declares no UI stories. Add a *.stories.tsx; give it a \`meta.component\` of this root's entry component${m?` (${m}, ${e.path})`:""} to make it this root’s default preview. Falling back to rendering the entry bare.`,"authoring");const Z=p.Entry,{createElement:B,createRoot:tt,flushSync:et}=await yt(),N=tt(o),ot=g=>{N.render(B(wt,{key:"__entry__",onCaught:g,children:B(Z)}))};let I=null;if(et(()=>{ot(g=>{I=g})}),I!==null)throw N.unmount(),I instanceof Error?I:new Error(String(I));const V=await L(),W=new J(o,s,{...V?{writeBackend:V}:{}});return d&&requestAnimationFrame(()=>H(d)),{adapter:W,dispose:()=>{W.disposeReactRootAdapter(),N.unmount()}}}function K(){return $().map(e=>e.ok?e.stories.map(o=>o.id).join(","):`!${e.modulePath}`).join("|")}function ye(e){let o=U()?$():null,r=o===null?null:K(),n=null;const s=ct(()=>{if(!U())return;const d=$(),c=K();if(o===null){o=d,r=c;return}const i=c!==r;o=d,r=c,i&&(n!==null&&clearTimeout(n),n=setTimeout(()=>{n=null,x=!0,e(),setTimeout(()=>{x=!1},0)},250))});return()=>{n!==null&&clearTimeout(n),n=null,s()}}export{we as mountReactDesignLayer,ye as reprojectWhenStoriesRepublish};
|
package/dist/assets/{document-preview-three-D3MPI2pG.js → document-preview-three-BojNfjbb.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as g}from"./content-bounds-
|
|
1
|
+
import{c as g}from"./content-bounds-MIXkclKI.js";import{isEditorOwnedObject as u}from"./editor-layers-C-4kqPi7.js";import{m as x}from"./renderer-ownership-BovSEcLv.js";import{W as w}from"./three.module-BLhyNg0e.js";import{f as C}from"./scene-framing-DmIN3HFq.js";import{ej as y,A as M,d9 as d,fo as s,ex as v,cj as S}from"./three.core-3arARmh6.js";import"./hierarchy-marks-DolK8jzJ.js";import"./workspace-arrangement-CHzaISez.js";import"./index-DMsonpRx.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";function W(n){const e=[];return n.traverse(a=>{!u(a)&&a.isCamera&&e.push(a)}),e}function R(n,e){const a=[];n.traverse(r=>{r.parent&&u(r)&&a.push({object:r,parent:r.parent})});for(const{object:r}of a)r.removeFromParent();let t;try{t=g(n)}finally{for(const{object:r,parent:h}of a)h.add(r)}const o=t.filter(r=>!r.overlay&&!r.enclosure),c=C(o.map(r=>r.box)),i=new d(42,e,.01,1e5),f=c.isEmpty()?new s:c.getCenter(new s),m=c.isEmpty()?1:Math.max(.01,c.getBoundingSphere(new v).radius),p=m/Math.sin(S.degToRad(i.fov/2));return i.position.copy(f).addScaledVector(new s(1,.75,1).normalize(),p*1.15),i.lookAt(f),i.near=Math.max(.001,p-m*2.5),i.far=p+m*3,i.updateProjectionMatrix(),i.updateMatrixWorld(!0),i}function P(n,e){if(e.camera){const t=new d(e.camera.fov??42,e.width/e.height,.01,1e5);return t.position.set(e.camera.position.x,e.camera.position.y,e.camera.position.z),t.lookAt(e.camera.target.x,e.camera.target.y,e.camera.target.z),t.updateMatrixWorld(!0),t}const a=W(n);if(a.length===1){const t=a[0].clone();return t.matrixWorld.copy(a[0].matrixWorld),t.matrixWorld.decompose(t.position,t.quaternion,t.scale),t instanceof d&&(t.aspect=e.width/e.height,t.updateProjectionMatrix()),t}return R(n,e.width/e.height)}function I(n,e,a,t){e.updateMatrixWorld(!0);const l=P(n,a),o=x(new w({antialias:!0,alpha:!0,preserveDrawingBuffer:!0}));let c;try{return c=t?.(o),o.setPixelRatio(1),o.setSize(a.width,a.height,!1),o.outputColorSpace=y,o.toneMapping=M,o.setClearColor(2106411,e.background===null?0:1),o.render(e,l),o.domElement.toDataURL("image/png")}finally{c?.(),o.dispose(),o.forceContextLoss()}}export{I as captureAuthoredThreeScenePreview};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ar as y,as as v}from"./index-
|
|
1
|
+
import{ar as y,as as v}from"./index-DMsonpRx.js";import{J as R,c as x}from"./json-history-resource-BF-O43PD.js";import{D as C,s as w,a as b,c as k,m as T}from"./react-world-authoring-adapter-CI1sk6F6.js";import{g as p,b as u}from"./inspect-D4blh5_a.js";function H(a){const e=(typeof a=="string"?a:a?.baseVal)?.trim()??"";if(e)return e.split(/\s+/)[0]}function S(a,t){if(a.id)return`${t}#${a.id}`;const e=H(a.className??"");return e?`${t}.${e}`:t}function j(a){const t=new Map;for(const[e,s]of a.nodes)t.set(e,{id:e,tag:s.object.tagName.toLowerCase(),el:s.object,parentId:s.parentId,childIds:[...s.childIds]});return{nodes:t,rootIds:[...a.rootIds]}}const g=[{prop:"color",label:"Color",type:"color"},{prop:"backgroundColor",label:"Background",type:"color"},{prop:"borderColor",label:"Border Color",type:"color"},{prop:"fontSize",label:"Font Size",type:"number"},{prop:"width",label:"Width",type:"number"},{prop:"height",label:"Height",type:"number"},{prop:"padding",label:"Padding",type:"number"},{prop:"margin",label:"Margin",type:"number"},{prop:"borderRadius",label:"Border Radius",type:"number"},{prop:"gap",label:"Gap",type:"number"},{prop:"display",label:"Display",type:"enum",options:["flex","block","none","grid"]},{prop:"textAlign",label:"Text Align",type:"enum",options:["left","center","right"]},{prop:"flexDirection",label:"Flex Direction",type:"enum",options:["row","column"]}],f="style.",M=new Map(g.map(({prop:a,type:t})=>[a,t]));class D{constructor(t,e,s){this.root=t,this.store=e;const o=e.shell.projectHistory;this.historyResource=o?new R({history:o,kind:"session-state",scope:"session",subject:{...s.journal,id:`${s.journal.id}/react-dom-edits`},displayName:"React DOM edits",capture:()=>this.captureHistoryState(),restore:async i=>{this.restoreHistoryState(i)}}):null}capabilities={transform:!1,inspectorFields:!0,persist:!1};provenance={source:"foreign",label:"live-only",detail:"Unmodified ingested React game — style edits apply for this session only and are never saved."};doc={};historyResource;projector=new C(w());snapCache=null;snapInvalidationScheduled=!1;boxEditSession=null;lockedIds=new Set;snapshot(){if(this.snapCache)return this.snapCache;this.projector.project(this.root);const t=j(this.projector);return this.snapCache=t,this.snapInvalidationScheduled||(this.snapInvalidationScheduled=!0,queueMicrotask(()=>{this.snapCache=null,this.snapInvalidationScheduled=!1})),t}nodeCount(){return this.snapshot().nodes.size}toEditorNode(t){return{id:t.id,label:S(t.el,t.tag),role:"element",kind:t.tag,parentId:t.parentId,childIds:t.childIds}}applyStyleToElement(t,e,s){t.style&&(t.style[e]=s)}recordStyleEdit(t,e,s){const o=this.doc[t]??{};o[e]=s,this.doc[t]=o}hierarchy={roots:()=>{const{nodes:t,rootIds:e}=this.snapshot();return e.map(s=>this.toEditorNode(t.get(s)))},node:t=>{const e=this.snapshot().nodes.get(t);return e?this.toEditorNode(e):null}};selection={get:()=>[...this.store.shell.selectedEntityIds],set:t=>this.store.shell.selectMultiple(t)};pickable={pick:(t,e)=>{const{nodes:s}=this.snapshot();let o=null,i=Number.POSITIVE_INFINITY,r=-1,l=-1;for(const c of s.values()){if(l++,this.lockedIds.has(c.id)||c.el.style?.pointerEvents==="none")continue;const n=c.el.getBoundingClientRect?.();if(!n||t<n.left||t>n.right||e<n.top||e>n.bottom)continue;const h=n.width*n.height;(h<i||h===i&&l>r)&&(o=c.id,i=h,r=l)}return o}};hostRect(){const t=this.root.getBoundingClientRect?.();return{left:t?.left??0,top:t?.top??0}}toHostRelative(t){const e=this.hostRect();return{x:t.left-e.left,y:t.top-e.top,width:t.width,height:t.height}}rects={rect:t=>{const s=this.snapshot().nodes.get(t)?.el.getBoundingClientRect?.();return s?this.toHostRelative(s):null},contextRects:t=>{const{nodes:e}=this.snapshot(),s=e.get(t);if(!s)return{};const o=s.parentId?e.get(s.parentId):void 0,i=o?.el.getBoundingClientRect?.(),l=(o?o.childIds:this.snapshot().rootIds).filter(d=>d!==t).map(d=>e.get(d)?.el.getBoundingClientRect?.()).filter(d=>d!=null).map(d=>this.toHostRelative(d)),c=s.el,n=c.getBoundingClientRect?.();let h;if(n){const d=y(p(c,"borderTopWidth",u))??0,I=y(p(c,"borderRightWidth",u))??0,E=y(p(c,"borderBottomWidth",u))??0,m=y(p(c,"borderLeftWidth",u))??0;h=this.toHostRelative({left:n.left+m,top:n.top+d,width:Math.max(0,n.width-m-I),height:Math.max(0,n.height-d-E)})}return{...i?{parent:this.toHostRelative(i)}:{},...l.length?{siblings:l}:{},...h?{paddingBox:h}:{}}}};colorSample={backgroundChainAt:(t,e)=>{const s=this.pickable.pick(t,e);if(!s)return null;const{nodes:o}=this.snapshot(),i=[];let r=o.get(s);for(;r;)i.push(p(r.el,"backgroundColor",u)),r=r.parentId?o.get(r.parentId):void 0;return i}};boxEdit={begin:t=>{this.historyResource?.assertCanMutate(),this.boxEditSession={id:t,touched:new Map,priorInline:new Map}},apply:(t,e)=>{this.historyResource?.assertCanMutate();const s=this.boxEditSession;if(!s||s.id!==t)return;const o=this.snapshot().nodes.get(t);if(!o)return;const i=p(o.el,"position",u),r=i==="absolute"||i==="fixed";for(const[l,c]of Object.entries(e)){const n=T(l,r);if(!n){console.warn(`[DomAuthoringAdapter] boxEdit: dropping patch key "${l}" for "${t}" — `+(l==="x"||l==="y"?`node is not absolutely/fixed positioned (computed position: "${i}"), no left/top to move`:"unrecognized box-edit patch key"));continue}if(!s.priorInline.has(n.prop)){const d=b(o.el.style,n.prop);s.priorInline.set(n.prop,d==null?"":String(d))}const h=n.cssValue(c);this.applyStyleToElement(o.el,n.prop,h),s.touched.set(n.prop,h)}},end:t=>{const e=this.boxEditSession;this.boxEditSession=null,!(!e||e.id!==t||e.touched.size===0)&&this.commitBoxEdit(t,e.touched,e.priorInline)}};commitBoxEdit(t,e,s){this.historyResource?.assertCanMutate();const o=this.captureHistoryState(),i=o.styles[t]??{};o.styles[t]=i;for(const[l,c]of s)i[l]=c;let r=!1;for(const[l,c]of e)r=this.writeStyleEntry(t,l,c)||r;r&&this.historyResource&&this.historyResource.record(`Edit ${e.size} Styles`,o,this.captureHistoryState()).catch(()=>{})}inspector={properties:()=>g.map(({prop:t,label:e,type:s,options:o})=>({path:`${f}${t}`,label:e,type:s,...o?{options:o}:{}})),get:(t,e)=>{if(e==="locked")return this.lockedIds.has(t);if(e==="visible"){const l=this.snapshot().nodes.get(t);return l?b(l.el.style,"visibility")!=="hidden":void 0}if(!e.startsWith(f))return;const s=e.slice(f.length),o=this.snapshot().nodes.get(t);if(!o)return;const i=b(o.el.style,s),r=M.get(s);return r==="number"?y(i):r==="color"?k(i):i},set:(t,e,s)=>{if(e==="locked"){s?this.lockedIds.add(t):this.lockedIds.delete(t),this.store.shell.notifyIngestEdit();return}if(e==="visible"){this.writeStyle(t,"visibility",s?"visible":"hidden");return}if(!e.startsWith(f))return;const o=e.slice(f.length);this.writeStyle(t,o,String(s))}};assetSubject={get:t=>this.assetSubjectForNode(this.snapshot(),t),entries:()=>{const t=this.snapshot();return[...t.nodes.keys()].flatMap(e=>{const s=this.assetSubjectForNode(t,e);return s?[{id:e,subject:s}]:[]})}};assetSubjectForNode(t,e){const s=t.nodes.get(e);return!s||s.tag!=="svg"||!s.el.outerHTML?null:{kind:"image",name:S(s.el,s.tag),mediaType:"image/svg+xml",text:s.el.outerHTML}}writeStyleEntry(t,e,s){const o=this.snapshot().nodes.get(t);return o?(this.applyStyleToElement(o.el,e,s),this.recordStyleEdit(t,e,s),this.store.shell.notifyIngestEdit(),!0):!1}writeStyle(t,e,s){this.historyResource?.assertCanMutate();const o=this.captureHistoryState();this.writeStyleEntry(t,e,s)&&this.historyResource&&this.historyResource.record(`Set ${e}`,o,this.captureHistoryState()).catch(()=>{})}dispose(){this.historyResource?.dispose()}captureHistoryState(){const t={};for(const[e,s]of this.snapshot().nodes){const o={};for(const{prop:i}of g){const r=b(s.el.style,i);r!==""&&(o[i]=String(r))}t[e]=o}return{edits:structuredClone(this.doc),styles:t}}restoreHistoryState(t){for(const s of Object.keys(this.doc))delete this.doc[s];Object.assign(this.doc,structuredClone(t.edits));const{nodes:e}=this.snapshot();for(const[s,o]of e){const i=t.styles[s]??{};for(const{prop:r}of g)this.applyStyleToElement(o.el,r,i[r]??"")}this.store.shell.notifyIngestEdit()}subscribe(t){return this.store.shell.subscribe(t)}get persistence(){return{...x(),destination:v}}}export{D};
|