@volter/game-editor 0.5.67 → 0.5.69
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 +10954 -5077
- package/LICENSE +1 -1
- package/LICENSE-BLENDER +2 -2
- package/NOTICE +2 -2
- package/additions/canvas/package.json +8 -0
- package/additions/canvas/src/canvas-mount.ts +46 -0
- package/additions/canvas/src/scene2d.tsx +18 -0
- package/catalog/entries/bake.json +1 -1
- package/catalog/entries/blender.json +3 -3
- package/catalog/entries/music.json +6 -6
- package/catalog/project-source/LICENSE +1 -1
- package/catalog/project-source/src/contributions/bake.kind.ts +2 -2
- package/catalog/project-source/src/contributions/builder-document.tsx +1 -1
- package/catalog/project-source/src/contributions/builder-ui.tsx +3 -3
- package/catalog/project-source/src/contributions/module-source.ts +4 -4
- package/catalog/project-source/src/lib/music/music-player.ts +18 -12
- package/catalog/project-source/src/lib/reflections/volume-reflection-material.ts +59 -59
- package/catalog/project-source/src/lib/static-batch/Frozen.tsx +1 -1
- package/catalog/project-source/src/lib/static-batch/mutation-watch.ts +1 -1
- package/catalog/project-source/src/tools/bake-preview.tool.ts +9 -9
- package/dist/.vite/manifest.json +4106 -3965
- package/dist/assets/{AssetBudgetPanel-x_FNJbfZ.js → AssetBudgetPanel-BMR3AQhc.js} +10 -10
- package/dist/assets/AudioViewer-DESxi7pU.js +1 -0
- package/dist/assets/CanvasBoardDocument-Q_nrYFlB.js +1 -0
- package/dist/assets/CanvasSceneViewport-WZMoKy_F.js +1 -0
- package/dist/assets/ColorInput-C2EK-OnD.js +1 -0
- package/dist/assets/{EntityModelDocument-CzUHsH9E.js → EntityModelDocument-B_4ENTCq.js} +1 -1
- package/dist/assets/{EnvironmentAssetDocument-ByEB7_4A.js → EnvironmentAssetDocument-BZBp6OFJ.js} +1 -1
- package/dist/assets/{GameplaySessionTimeline-dhG-oiqd.js → GameplaySessionTimeline-1ivaucpv.js} +1 -1
- package/dist/assets/ImageViewer-D16OExYu.js +1 -0
- package/dist/assets/{InspectorCanvasPreview-CEr_Kxna.js → InspectorCanvasPreview-BrFjhoiD.js} +1 -1
- package/dist/assets/InspectorObjectPreview-CY5xVsPR.js +1 -0
- package/dist/assets/JsonAssetDocument-CvjTlcdr.js +2 -0
- package/dist/assets/{LiveModuleDocument-DL8QHSlk.js → LiveModuleDocument-ne1o9giX.js} +1 -1
- package/dist/assets/{LutAssetDocument-BImiug2M.js → LutAssetDocument-Cp0v-O7q.js} +1 -1
- package/dist/assets/ModelAssetDocument-Ceu7OIN9.js +1 -0
- package/dist/assets/{NonThreeAuthoringBootstrap-B40qmGGS.js → NonThreeAuthoringBootstrap-DiElZf-e.js} +1 -1
- package/dist/assets/Object3DDocumentToolbar-BLNamqii.js +1 -0
- package/dist/assets/Object3DDocumentViewport-D6QoHfa_.js +2 -0
- package/dist/assets/{Object3DPreview-ClYDoH2L.js → Object3DPreview-ZVokr044.js} +1 -1
- package/dist/assets/OnlineAssetDetail-Dnckd7zB.js +1 -0
- package/dist/assets/PlayBar-DsMitSgy.js +1 -0
- package/dist/assets/{QuarksAssetDocument-B-VOj-n4.js → QuarksAssetDocument-B5J8uHFM.js} +1 -1
- package/dist/assets/ReactCanvasControls-CmfvxJYY.js +1 -0
- package/dist/assets/RootSelectionOverlay-BWsNiSuM.js +1 -0
- package/dist/assets/{ShaderAssetDocument-Kn8IvRGV.js → ShaderAssetDocument-CT7XzsZq.js} +5 -5
- package/dist/assets/ShadowEditor-YO5KEfnz.js +1 -0
- package/dist/assets/{SourceAssetViewer-CLQ95VSD.js → SourceAssetViewer-FSLup2km.js} +1 -1
- package/dist/assets/StageHost-DYfGYwvq.js +2 -0
- package/dist/assets/{StoryPreviewMount-D2lg37et.js → StoryPreviewMount-BhvT5QlB.js} +1 -1
- package/dist/assets/ThreeBoardDocument-B-z2nwnH.js +2 -0
- package/dist/assets/{ThreeIsolationSceneContent-DbYIylZQ.js → ThreeIsolationSceneContent-B5pU4Y6k.js} +1 -1
- package/dist/assets/{ToolObject3DPreview-WEi6C9uU.js → ToolObject3DPreview-VtraiQ4Q.js} +1 -1
- package/dist/assets/Toolbar-M62Gob9T.js +1 -0
- package/dist/assets/{TransientHint-BpDLhRLd.js → TransientHint-Cc40mHWE.js} +1 -1
- package/dist/assets/VideoViewer-BxcUwXQm.js +1 -0
- package/dist/assets/ViewportShadingMenu-BoMPnTVh.js +1 -0
- package/dist/assets/active-ingest-0QjJWb7i.js +3 -0
- package/dist/assets/{animation-clock-Bm80XdqP.js → animation-clock-BXEwUJtz.js} +1 -1
- package/dist/assets/animation-mixers.service-C-Ko4KzM.js +1 -0
- package/dist/assets/animation-timeline.utility-Bl15-rYb.js +1 -0
- package/dist/assets/{asset-budget-asset.menu-CEgP0Kiw.js → asset-budget-asset.menu-BUa3g0Wy.js} +1 -1
- package/dist/assets/{asset-budget.action-D4R1c3wi.js → asset-budget.action-Dl5eVPIo.js} +1 -1
- package/dist/assets/{asset-budget.document-Syzjn1U1.js → asset-budget.document-DJylQ-0h.js} +1 -1
- package/dist/assets/{asset-budget.menu-BbRiqXeM.js → asset-budget.menu-BJtvNMLj.js} +1 -1
- package/dist/assets/asset-editor-persistence-BIbf5u0Q.js +1 -0
- package/dist/assets/asset-loaders-DoNflsHL.js +2 -0
- package/dist/assets/{asset-preview-B1tDziF1.js → asset-preview-DxlSdRZn.js} +1 -1
- package/dist/assets/{audio-unlock.service-ucMfCVBw.js → audio-unlock.service-CTaiyXF9.js} +1 -1
- package/dist/assets/audio.utility-CEmNc68t.js +1 -0
- package/dist/assets/autoplay.service-BZLSUyL8.js +1 -0
- package/dist/assets/{babylon-authoring-adapter-C8mFMXSr.js → babylon-authoring-adapter-BZvV2bz_.js} +1 -1
- package/dist/assets/binding-resolver-DGbk9_XR.js +2 -0
- package/dist/assets/blender-emscripten-engine-B7lfg-RX.js +2 -0
- package/dist/assets/{blender-node-editor.document-C1YmwWls.js → blender-node-editor.document-wXJobGNH.js} +1 -1
- package/dist/assets/{blender-properties-tab-B8lyjgj3.js → blender-properties-tab-7GFf80ev.js} +1 -1
- package/dist/assets/{blender-runtime-host-CyQlImSR.js → blender-runtime-host-CILxrx5T.js} +2 -2
- package/dist/assets/{blender-runtime-skin-BK7ShZ6z.js → blender-runtime-skin-Cd5lQYsC.js} +7 -7
- package/dist/assets/{blender-runtime.document-B0nVQs0P.js → blender-runtime.document-C0r_R49S.js} +7 -7
- package/dist/assets/{blender-timeline.document-CMcdE2CK.js → blender-timeline.document-BaISZMBc.js} +1 -1
- package/dist/assets/{blender-uv-editor.document-CjqNo4sZ.js → blender-uv-editor.document-CT_fsyyA.js} +1 -1
- package/dist/assets/blender-version.status-DzEx7u7k.js +1 -0
- package/dist/assets/blender-wali-engine-DOiQCBXH.js +2 -0
- package/dist/assets/{blender.command-C6NmRBo5.js → blender.command-DdiKd8mZ.js} +1 -1
- package/dist/assets/blender.keymap-BmOBRY7p.js +1 -0
- package/dist/assets/blender.status-BMETIbb2.js +1 -0
- package/dist/assets/board-guides-CjHQ9Ynm.js +1 -0
- package/dist/assets/body-marks-C1LxJtQb.js +1 -0
- package/dist/assets/bridge.command-DXUeavn5.js +3 -0
- package/dist/assets/{browserAll-lF_dLQVz.js → browserAll-Dg46xT22.js} +1 -1
- package/dist/assets/build-player.document-BHwVV3K0.js +1 -0
- package/dist/assets/build-profiles.document-HkpS-Kxa.js +2 -0
- package/dist/assets/build-progress.status-u1J0Rm1D.js +1 -0
- package/dist/assets/build-session-BLboUUbw.js +9 -0
- package/dist/assets/{build.action-DRX2IcYt.js → build.action-C00DL83N.js} +1 -1
- package/dist/assets/{build.command-BGvLaLG0.js → build.command-Cjk_NY75.js} +1 -1
- package/dist/assets/build.header-BWNmNWFT.js +1 -0
- package/dist/assets/{build.menu-UenrjPWS.js → build.menu-BBYtqCIq.js} +1 -1
- package/dist/assets/{build.service-BIUoTY6l.js → build.service-DOU15tKN.js} +1 -1
- package/dist/assets/{camera-DrvaM47S.js → camera-7DGyYW7Y.js} +1 -1
- package/dist/assets/{camera-runtime.inspector-CjJALNO8.js → camera-runtime.inspector-n-jiOR-3.js} +1 -1
- package/dist/assets/canvas-design-mount-CSRHU-ag.js +6 -0
- package/dist/assets/canvas-entry-runtime-BST8yRuK.js +2 -0
- package/dist/assets/{canvas-preview-frames-C0QTagA3.js → canvas-preview-frames-Cja32aW2.js} +1 -1
- package/dist/assets/{canvas-story-capture.service-Dgjr-rT1.js → canvas-story-capture.service-D5R5HJ8n.js} +2 -2
- package/dist/assets/capability-coverage-ByWftxk4.js +7 -0
- package/dist/assets/{collaboration-presence-BVIQuN1l.js → collaboration-presence-D6MC9xJN.js} +1 -1
- package/dist/assets/{collider-C7SbIYKY.js → collider-B78EcUc9.js} +1 -1
- package/dist/assets/{component-board.service-BEsFAw4_.js → component-board.service-BaQI5Oas.js} +2 -2
- package/dist/assets/component-board.service-CkjrsD8x.js +2 -0
- package/dist/assets/{component-board.service-CWFaGMCO.js → component-board.service-Dvjz_g-x.js} +2 -2
- package/dist/assets/component-contracts.service-C3-AXQp7.js +1 -0
- package/dist/assets/component-instance-root-DLI40MiB.js +1 -0
- package/dist/assets/{component-verbs.command-oNtGgzQL.js → component-verbs.command-Brr_WcaR.js} +1 -1
- package/dist/assets/component-verbs.service-DC2sC3j3.js +1 -0
- package/dist/assets/{config-_wCzzlM_.js → config-BI_7osdR.js} +3 -3
- package/dist/assets/{configurations-BXU4GGbV.js → configurations-XP9YLkrt.js} +1 -1
- package/dist/assets/connection.status-BhRwcFx0.js +1 -0
- package/dist/assets/{constraint-5KLYpGm7.js → constraint-Bp1l8hY-.js} +1 -1
- package/dist/assets/constraints.inspector-Dm1cycK3.js +1 -0
- package/dist/assets/{content-bounds-BeuIXKYu.js → content-bounds-DROIchTa.js} +1 -1
- package/dist/assets/{contract-system-adapters-Bic_7sev.js → contract-system-adapters-Cn7OW_ay.js} +1 -1
- package/dist/assets/coverage.service-l42ty7lr.js +3 -0
- package/dist/assets/create-runtime-B_uTwsmi.js +3 -0
- package/dist/assets/curve-THOUsg-j.js +1 -0
- package/dist/assets/{data-asset-DfQ2Pjse.js → data-asset-DAANayR6.js} +1 -1
- package/dist/assets/data-check-core-CHqar_E8.js +1 -0
- package/dist/assets/data-ref-CN34UeVw.js +1 -0
- package/dist/assets/debug-bridge-BD1XVAIB.js +1 -0
- package/dist/assets/debug-registry-ggQWxtu-.js +1 -0
- package/dist/assets/{deferred-ingest-play-BdR4qGk6.js → deferred-ingest-play-B2JUlwlT.js} +2 -2
- package/dist/assets/{design-time-canvas-mount-DPQeHSN2.js → design-time-canvas-mount-as9cN9I6.js} +2 -2
- package/dist/assets/design-time-layers-BRseeSmV.js +1 -0
- package/dist/assets/{design-time-mount.service-Ks-5Wkcs.js → design-time-mount.service-BTVu3yKo.js} +2 -2
- package/dist/assets/{design-time-mount.service-Ca-DZGFV.js → design-time-mount.service-DKvc7lVK.js} +2 -2
- package/dist/assets/design-time-react-mount-C7rB56QD.js +1 -0
- package/dist/assets/{document-preview-three-DThkjI1S.js → document-preview-three-CxmRhCcV.js} +1 -1
- package/dist/assets/{dom-authoring-adapter-BrLU8IJ_.js → dom-authoring-adapter-L8OzXfmE.js} +1 -1
- package/dist/assets/{draco3d-B2cwv46o.js → draco3d-BjNuXv66.js} +1 -1
- package/dist/assets/{edit-mode-audio.service-D4ITNbsm.js → edit-mode-audio.service-BwI5u845.js} +1 -1
- package/dist/assets/edit-mode-authoring-D5f7aHHl.js +1 -0
- package/dist/assets/{edit-mode-networking.service-BNv-FTRh.js → edit-mode-networking.service-DqP_4lbI.js} +1 -1
- package/dist/assets/editor-api-BM7H_F4G.js +1 -0
- package/dist/assets/{editor-layers-BDJnAAzj.js → editor-layers-D-CTUqco.js} +1 -1
- package/dist/assets/editor-presentation-activity-CqJH4G9t.js +1 -0
- package/dist/assets/{editor-shell-store-ChLcVeNB.js → editor-shell-store-DHVWS8cE.js} +1 -1
- package/dist/assets/{entity-object-JmYMfLsx.js → entity-object-MKYemTFM.js} +1 -1
- package/dist/assets/{extend-Cc-nEa_A.js → extend-BrgqZiMY.js} +1 -1
- package/dist/assets/fork-menu-DE2MK3Nq.js +1 -0
- package/dist/assets/{frame-debugger-store-DaCbAYSW.js → frame-debugger-store-BXoLKTdZ.js} +1 -1
- package/dist/assets/game-audio-BeCyd0Ha.js +1 -0
- package/dist/assets/{game-contract-seams-BnPFGLll.js → game-contract-seams-tyKDsfaP.js} +1 -1
- package/dist/assets/{game-css-scope-transform-D_p7cVgW.js → game-css-scope-transform-DcjrwtVc.js} +2 -2
- package/dist/assets/game-document.service-CTb2itHQ.js +1 -0
- package/dist/assets/game-eval.command-CpDKXOQU.js +2 -0
- package/dist/assets/game-module-access-BTInp2NG.js +1 -0
- package/dist/assets/game-network-DW5ARz4R.js +22 -0
- package/dist/assets/{gameplay-export-BzYzLZPi.js → gameplay-export-cHk3v9y-.js} +1 -1
- package/dist/assets/gameplay-replay-HRenPTtU.js +1 -0
- package/dist/assets/gameplay.command-DcY2lKKX.js +1 -0
- package/dist/assets/generation-CdOATubd.css +1 -0
- package/dist/assets/{generation-jobs-BZhOMrp-.js → generation-jobs-CJBehuUp.js} +1 -1
- package/dist/assets/generation.service-BMOc-C9i.js +1 -0
- package/dist/assets/{generations-DVDht_31.js → generations-ssgVOe_6.js} +1 -1
- package/dist/assets/generations.status-B_SmPReI.js +1 -0
- package/dist/assets/hierarchy-marks-BuCO8Ke-.js +1 -0
- package/dist/assets/hierarchy-marks-CsTaTkc7.js +1 -0
- package/dist/assets/hosted-asset-materialization-CiXZI85V.js +2 -0
- package/dist/assets/{ibl-override-material-CiKkaOTW.js → ibl-override-material-CMo_a49U.js} +1 -1
- package/dist/assets/index-B0S4fQQV.js +1 -0
- package/dist/assets/{index-C3Pw-9So.js → index-B9bd4k-t.js} +1 -1
- package/dist/assets/index-BMxv2MNV.js +1 -0
- package/dist/assets/{index-DUZeuA7g.js → index-Bm4_DmRO.js} +1 -1
- package/dist/assets/{index-cNc-iFbq.js → index-BvBlIRwM.js} +1 -1
- package/dist/assets/{index-Ck3JFh48.js → index-BweKDdi_.js} +1 -1
- package/dist/assets/{index-BRJMIUK0.js → index-C5ZAyrKq.js} +346 -345
- package/dist/assets/index-CPiRKiDC.css +1 -0
- package/dist/assets/index-CfpGZrbC.js +1 -0
- package/dist/assets/index-Czvj6whv.js +1 -0
- package/dist/assets/{index-SS9EugVg.js → index-DgPDGGSV.js} +2 -2
- package/dist/assets/{inference-diagnostics-xecGdohW.js → inference-diagnostics-DLt9ql9I.js} +1 -1
- package/dist/assets/{ingest-boot-viewport-DAt8WFSy.js → ingest-boot-viewport-BXVXjYpG.js} +1 -1
- package/dist/assets/ingest-siblings-DWJ7OGB_.js +1 -0
- package/dist/assets/ingest-source-persistence-6ShMoSCa.js +1 -0
- package/dist/assets/ingest.service-BBbX8ibg.js +1 -0
- package/dist/assets/{inspect-Dr4qvDpJ.js → inspect-Cz3Zyx_1.js} +1 -1
- package/dist/assets/inspection-D8fZOHCM.js +1 -0
- package/dist/assets/instances.command-BrdlngrL.js +1 -0
- package/dist/assets/{json-history-resource-DwS10tqD.js → json-history-resource-Uqrihfc8.js} +1 -1
- package/dist/assets/layered-pick-CAVQMPI7.js +1 -0
- package/dist/assets/{light-DcFqVCmv.js → light-CqzsCWeJ.js} +1 -1
- package/dist/assets/{live-project-verbs-C3LzprCe.js → live-project-verbs-CdFmLYOo.js} +1 -1
- package/dist/assets/{machine.document-BzZxubYQ.js → machine.document-DRIFOVaa.js} +1 -1
- package/dist/assets/{machines.finder-BR02bfVG.js → machines.finder-DPCT6few.js} +1 -1
- package/dist/assets/material-BVApn1V_.js +1 -0
- package/dist/assets/{material-factory-COz7qZhC.js → material-factory-B_75xxFD.js} +1 -1
- package/dist/assets/{mesh-DcmO-mWI.js → mesh-DdA3mExo.js} +1 -1
- package/dist/assets/model-asset-sections-D1uxOu2v.css +1 -0
- package/dist/assets/model-asset-sections.service-CJnSIckZ.js +1 -0
- package/dist/assets/{model-inspection-CXHxrafK.js → model-inspection-DvspbmJl.js} +1 -1
- package/dist/assets/{model-thumbnail-BEKPWg4l.js → model-thumbnail-BmQs-h6t.js} +1 -1
- package/dist/assets/{models.finder-c1I0tp2M.js → models.finder-Qv_Hsccy.js} +1 -1
- package/dist/assets/module-mode-MJ4Gbsry.js +2 -0
- package/dist/assets/mount-canvas-ingest-root-BxtM8OaB.js +2 -0
- package/dist/assets/mount-dom-ingest-root-pGatqO46.js +2 -0
- package/dist/assets/mount-ingest-root-C7jb-mCl.js +2 -0
- package/dist/assets/mount-manifest-BfoHBuzn.js +1 -0
- package/dist/assets/mount-readiness-DyAd17pe.js +4 -0
- package/dist/assets/mount-three-ingest-root-Boa5mcaF.js +1 -0
- package/dist/assets/{mounted-authoring-Clftxx0x.js → mounted-authoring-DxMISwvR.js} +1 -1
- package/dist/assets/{mounted-story-viewport-source-B4-eAYGI.js → mounted-story-viewport-source-DfnLxI1f.js} +1 -1
- package/dist/assets/{native-debug-module-2_HVupdg.js → native-debug-module-BlrALjM3.js} +1 -1
- package/dist/assets/{navigation-CH3-zr1n.js → navigation-CqG5o5AR.js} +1 -1
- package/dist/assets/{navmesh.menu-Dfi-Pk-8.js → navmesh.menu-D4TdVDhe.js} +1 -1
- package/dist/assets/{navmesh.service-Cz7QFY-M.js → navmesh.service-DWKT5ruQ.js} +1 -1
- package/dist/assets/network-observer.service-ZRAquNq4.js +1 -0
- package/dist/assets/network.utility-DjeOEvAY.js +1 -0
- package/dist/assets/object-marks-BnvSuCTt.js +1 -0
- package/dist/assets/{object3d-authoring-subject-BDrxd1GA.js → object3d-authoring-subject-XccsO0xG.js} +1 -1
- package/dist/assets/{object3d-document-session-registry-DJDEDM0p.js → object3d-document-session-registry-CMRJdFp6.js} +2 -2
- package/dist/assets/{oid-transform-D5Kxt6ij.js → oid-transform-DaA6yW6o.js} +1 -1
- package/dist/assets/{particles-vRp0Lf3o.js → particles-DsQRcDBY.js} +1 -1
- package/dist/assets/{performance-profiler-OwnXQX0M.js → performance-profiler-CMbwGBuk.js} +1 -1
- package/dist/assets/pixi-authoring-adapter-BoBt8bB5.js +1 -0
- package/dist/assets/pixi-live-write-target-CYZgvC6U.js +1 -0
- package/dist/assets/play.command-D9JGJP-e.js +2 -0
- package/dist/assets/pose-guard-CLabLSzf.js +1 -0
- package/dist/assets/presentation-COhHQdmR.js +1 -0
- package/dist/assets/{product-CxmUIxmr.js → product-CaRGoiIH.js} +1 -1
- package/dist/assets/{profiler.action-Dzy9DuAc.js → profiler.action-Cz7HYWjh.js} +1 -1
- package/dist/assets/{profiler.menu-jLDO3U6N.js → profiler.menu-D5aR_FBy.js} +1 -1
- package/dist/assets/profiler.utility-KwxlIPKb.js +1 -0
- package/dist/assets/{project-authoring-session-C3eusefK.js → project-authoring-session-DKXHVwxO.js} +2 -2
- package/dist/assets/project-provenance-BGnJXJwa.js +1 -0
- package/dist/assets/{properties-bone-constraints.inspector-B_PbSMV7.js → properties-bone-constraints.inspector-Bo-sU8eR.js} +1 -1
- package/dist/assets/{properties-bone.inspector-CMDEQuBd.js → properties-bone.inspector-BQiWplQv.js} +1 -1
- package/dist/assets/{properties-collection.inspector-D7Ay8yRj.js → properties-collection.inspector-C5BnR-GE.js} +1 -1
- package/dist/assets/{properties-constraints.inspector-DS1fZgXK.js → properties-constraints.inspector-CyheU12R.js} +1 -1
- package/dist/assets/{properties-data.inspector-k2pGN2Mp.js → properties-data.inspector-CkycARja.js} +1 -1
- package/dist/assets/{properties-material.inspector-Bb3yAGUx.js → properties-material.inspector-Bl_PUmY-.js} +1 -1
- package/dist/assets/{properties-modifiers.inspector-BcJfe-Wy.js → properties-modifiers.inspector-j7SnOxQq.js} +1 -1
- package/dist/assets/{properties-object.inspector-CUSfXJuq.js → properties-object.inspector-DcR3MGLK.js} +1 -1
- package/dist/assets/{properties-output.inspector-BTVW2kn1.js → properties-output.inspector-BLjw6K4b.js} +1 -1
- package/dist/assets/{properties-particles.inspector-Cw0fxx3B.js → properties-particles.inspector-BUIm2-Jf.js} +1 -1
- package/dist/assets/{properties-physics.inspector-C-0bD2bu.js → properties-physics.inspector-DNvRcxb6.js} +1 -1
- package/dist/assets/{properties-render.inspector-C8D5UpjX.js → properties-render.inspector-8FMZ-qoZ.js} +1 -1
- package/dist/assets/{properties-scene.inspector-HjK6QHGg.js → properties-scene.inspector-Dx7_z75k.js} +1 -1
- package/dist/assets/{properties-texture.inspector-CckZgUaI.js → properties-texture.inspector-WT15951-.js} +1 -1
- package/dist/assets/{properties-view-layer.inspector-C1ajtVSk.js → properties-view-layer.inspector-P7VNTdqr.js} +1 -1
- package/dist/assets/{properties-world.inspector-BiT_EdT-.js → properties-world.inspector-B3t1q8TF.js} +1 -1
- package/dist/assets/r3f-design-session-lsbFnoWH.js +2 -0
- package/dist/assets/{r3f-physics-binding-DzrbpqjM.js → r3f-physics-binding-Cx8yhuwt.js} +1 -1
- package/dist/assets/{r3f-source-authoring-adapter-DbbeRcvt.js → r3f-source-authoring-adapter-jH3G0TeH.js} +2 -2
- package/dist/assets/react-canvas-navigation-B_gOe3CI.js +1 -0
- package/dist/assets/react-inspector.service-CZf1vfdX.js +1 -0
- package/dist/assets/react-story-board-CCm2Opwn.js +1 -0
- package/dist/assets/{react-three-rapier.esm-U8J7g6tH.js → react-three-rapier.esm-CHXGG51p.js} +1 -1
- package/dist/assets/react-world-authoring-adapter-CnzxMtYz.js +1 -0
- package/dist/assets/{realm-services-CnY105XU.js → realm-services-Do9J6nsb.js} +1 -1
- package/dist/assets/reflection-probe-capture.inspector-BAjjIybz.js +1 -0
- package/dist/assets/{reflection-probe-BHNGwVyz.js → reflection-probe-sIto9mh0.js} +1 -1
- package/dist/assets/registry-Xnduk02T.js +1 -0
- package/dist/assets/{relative-import-specifier-BFKIWEWs.js → relative-import-specifier-CPFTrxi4.js} +1 -1
- package/dist/assets/{render-env-BkKZ4uMA.js → render-env-YJlI8K0i.js} +1 -1
- package/dist/assets/{render-features-rxbawsRb.js → render-features-DMSV2qKJ.js} +1 -1
- package/dist/assets/{render-settings-DS5leCed.js → render-settings-CRyDhHyz.js} +1 -1
- package/dist/assets/{resolve-three-CVnMRHxw.js → resolve-three-D27rMc37.js} +19 -19
- package/dist/assets/root-seam-contract-gjWUd5uu.js +1 -0
- package/dist/assets/run-selection-B0jOdyYt.js +2 -0
- package/dist/assets/scene-capture-Di9cM1p4.js +1 -0
- package/dist/assets/scene-document.service-XxGs4HHE.js +2 -0
- package/dist/assets/{scene-framing-BQt72ZCw.js → scene-framing-DkZKDwH3.js} +1 -1
- package/dist/assets/{scene-index--lRWLEmW.js → scene-index-DHeKmalD.js} +1 -1
- package/dist/assets/{scene-query-s1y04OVB.js → scene-query-ByZtXA2m.js} +1 -1
- package/dist/assets/seeded-random-BJthDRMu.js +1 -0
- package/dist/assets/{session-CTXsU1lK.js → session-x8E_NJk2.js} +34 -34
- package/dist/assets/{setup-renderer-Cwkl1Ar6.js → setup-renderer-F9mG7t6r.js} +1 -1
- package/dist/assets/{source-object3d-authoring-adapter-DF679Ncb.js → source-object3d-authoring-adapter-CvmFpSUj.js} +1 -1
- package/dist/assets/{source-persistence-backend-CwLYVPXj.js → source-persistence-backend-au3WtEn6.js} +1 -1
- package/dist/assets/{spark-renderer-lifecycle-DfYpvEJa.js → spark-renderer-lifecycle-B6Axb6jm.js} +1 -1
- package/dist/assets/{stage-keyboard-B8BEW592.js → stage-keyboard-BQkndG_D.js} +1 -1
- package/dist/assets/stage-overlay-set-g6eWhuRv.js +1 -0
- package/dist/assets/stage-presence-markers-0CDfO5f4.js +1 -0
- package/dist/assets/stage-transform-tools-BzPl7OIo.js +1 -0
- package/dist/assets/standard-viewport-dressing-BW-dM_1h.js +24 -0
- package/dist/assets/{state-watch.action-DnR5Zjr-.js → state-watch.action-Z1nQ5awu.js} +1 -1
- package/dist/assets/{state-watch.menu-wYLCLsAw.js → state-watch.menu-CQHGUF3W.js} +1 -1
- package/dist/assets/state-watch.utility-DCIg2i79.js +1 -0
- package/dist/assets/{story-capture-BmnwHGDV.js → story-capture-BIrjDKeY.js} +1 -1
- package/dist/assets/story-documents-BvG2xeaR.js +3 -0
- package/dist/assets/{story-documents.service-B6v7Z-WE.js → story-documents.service-DOSEa3ja.js} +1 -1
- package/dist/assets/{story-documents.service-yagl1wGp.js → story-documents.service-y1m7XGMJ.js} +1 -1
- package/dist/assets/{story-media-presence-BqRMu572.js → story-media-presence-HLV-KaMj.js} +1 -1
- package/dist/assets/{story-pixi-preview-Da6afqLg.js → story-pixi-preview-CMhho2gG.js} +1 -1
- package/dist/assets/{story-presentation-DMSYRWaz.js → story-presentation-CYhVv8Ku.js} +1 -1
- package/dist/assets/story-three-preview-CgcLF5lE.js +2 -0
- package/dist/assets/{structural-ids-Br2zjINh.js → structural-ids-BOo2BRoY.js} +1 -1
- package/dist/assets/studio-environment-R9qXUUcC.js +2 -0
- package/dist/assets/{surface-state-1lTOi8FD.js → surface-state-D8Qnowo6.js} +1 -1
- package/dist/assets/{syntactic-prop-specs-eiQXwMIc.js → syntactic-prop-specs-8gkBuc5j.js} +1 -1
- package/dist/assets/team-playtest.service-BBMZ2iyk.js +1 -0
- package/dist/assets/{three-TCuY32m_.js → three-DiL6vMXq.js} +1 -1
- package/dist/assets/three-authoring-adapter-CkLR2zGf.js +1 -0
- package/dist/assets/three-authoring.service-CovhlCGx.js +2 -0
- package/dist/assets/{three-ingest-runtime-B7rtg3QE.js → three-ingest-runtime-CwTqAHgX.js} +1 -1
- package/dist/assets/{three-integration-BdN5Nhsg.js → three-integration-DXOFI88n.js} +2 -2
- package/dist/assets/three-integration.service-rCAqpqSp.js +1 -0
- package/dist/assets/three-projection-core-B7Lf8tOp.js +1 -0
- package/dist/assets/{three-state-DwFE3ay2.js → three-state-BCACvUtm.js} +1 -1
- package/dist/assets/{three-story-capture.service-CvpV3v5a.js → three-story-capture.service-rTFKNtHA.js} +2 -2
- package/dist/assets/{three-story-model-C2r2BuiA.js → three-story-model-BjKr7OMn.js} +1 -1
- package/dist/assets/three-viewport-presentation-CBzvc2v2.js +141 -0
- package/dist/assets/tools-DfctM216.js +1 -0
- package/dist/assets/transform-mode-request-DlEApNrA.js +1 -0
- package/dist/assets/transport-strip-xCg94CuI.js +1 -0
- package/dist/assets/transport.header-BRtdky0x.js +1 -0
- package/dist/assets/{trigger-volume-DP0G1VBe.js → trigger-volume-BLkHmfm9.js} +1 -1
- package/dist/assets/tuples-BDz3wbQL.js +1 -0
- package/dist/assets/ui-board-document-DvbK_HVN.js +2 -0
- package/dist/assets/{user-data-Bpj7diUS.js → user-data-C84W0V47.js} +1 -1
- package/dist/assets/user-data-CODoGZqA.js +1 -0
- package/dist/assets/{utility-view-state-CAfbFbKQ.js → utility-view-state-CDRxZSo-.js} +1 -1
- package/dist/assets/viewport-door-BARIpMu-.js +1 -0
- package/dist/assets/{viewport-root-presentation-vgxsTyj4.js → viewport-root-presentation-hRLF0BeO.js} +1 -1
- package/dist/assets/{viewport-surface-status-cwCiBGa7.js → viewport-surface-status-TUfhXKR9.js} +1 -1
- package/dist/assets/{webworkerAll-Cm3gTjWi.js → webworkerAll-PJtcQ1FD.js} +1 -1
- package/dist/assets/worker-BtXrsgFy.js +2 -0
- package/dist/assets/workspace-arrangement-DqG5sUns.js +1 -0
- package/dist/assets/world-documents-D69XaqUX.js +1 -0
- package/dist/assets/world-root-stage-binding-BgZWZEuD.js +1 -0
- package/dist/assets/{xstate-animation-binding-BGLxcZT_.js → xstate-animation-binding-CIyLzGHs.js} +1 -1
- package/dist/assets/{xstate-animation-meta-D_T441Ru.js → xstate-animation-meta-CbYWup3R.js} +1 -1
- package/dist/volter-shared-react.json +10 -0
- package/dist/volter-shared-three.json +3 -0
- package/dist-node/cli.js +253 -210
- package/dist-node/create.js +103 -82
- package/package.json +23 -20
- package/src/contributions.d.ts +1 -1
- package/src/index.ts +10 -10
- package/starter/cube.py +1 -1
- package/template/.agents/references/project-manual.md +17 -17
- package/template/.agents/skills/editor/SKILL.md +6 -6
- package/template/.agents/skills/editor/agents/openai.yaml +3 -3
- package/template/.agents/skills/editor/references/editor-control.md +62 -62
- package/template/{.claude/skills/vgai-3d-models → .agents/skills/volter-3d-models}/SKILL.md +3 -3
- package/template/{.github/skills/vgai-ingest-existing-game → .agents/skills/volter-ingest-existing-game}/SKILL.md +2 -2
- package/template/.agents/skills/{vgai-music → volter-music}/SKILL.md +35 -11
- package/template/{.claude/skills/vgai-threejs-authoring → .agents/skills/volter-threejs-authoring}/SKILL.md +9 -9
- package/template/.agents/skills/volter-threejs-authoring/agents/openai.yaml +4 -0
- package/template/{.github/skills/vgai-threejs-authoring → .agents/skills/volter-threejs-authoring}/references/helper-catalog.md +1 -1
- package/template/.claude/skills/editor/SKILL.md +6 -6
- package/template/.claude/skills/editor/agents/openai.yaml +3 -3
- package/template/.claude/skills/editor/references/editor-control.md +62 -62
- package/template/{.agents/skills/vgai-3d-models → .claude/skills/volter-3d-models}/SKILL.md +3 -3
- package/template/{.agents/skills/vgai-ingest-existing-game → .claude/skills/volter-ingest-existing-game}/SKILL.md +2 -2
- package/template/{.github/skills/vgai-threejs-authoring → .claude/skills/volter-threejs-authoring}/SKILL.md +9 -9
- package/template/.claude/skills/volter-threejs-authoring/agents/openai.yaml +4 -0
- package/template/.claude/skills/{vgai-threejs-authoring → volter-threejs-authoring}/references/helper-catalog.md +1 -1
- package/template/.github/copilot-instructions.md +1 -1
- package/template/.github/skills/editor/SKILL.md +6 -6
- package/template/.github/skills/editor/agents/openai.yaml +3 -3
- package/template/.github/skills/editor/references/editor-control.md +62 -62
- package/template/.github/skills/{vgai-3d-models → volter-3d-models}/SKILL.md +3 -3
- package/template/{.claude/skills/vgai-ingest-existing-game → .github/skills/volter-ingest-existing-game}/SKILL.md +2 -2
- package/template/{.agents/skills/vgai-threejs-authoring → .github/skills/volter-threejs-authoring}/SKILL.md +9 -9
- package/template/.github/skills/volter-threejs-authoring/agents/openai.yaml +4 -0
- package/template/{.agents/skills/vgai-threejs-authoring → .github/skills/volter-threejs-authoring}/references/helper-catalog.md +1 -1
- package/template/.mcp.json +3 -3
- package/template/AGENTS.md +24 -23
- package/template/DEVLOG.md +1 -1
- package/template/IDIOMS.md +3 -3
- package/template/LICENSE +3 -3
- package/template/README.md +12 -12
- package/template/check-idioms.ts +51 -51
- package/template/manifest-entry-modules-plugin.ts +17 -4
- package/template/package.json +12 -12
- package/template/server/loopback.ts +1 -1
- package/template/server/main.ts +4 -4
- package/template/server/rooms/arena-room.ts +8 -8
- package/template/server/rooms/game-room.ts +8 -8
- package/template/server/rooms.ts +2 -2
- package/template/src/bot/QaTester.tsx +1 -1
- package/template/src/bot/bot-station.ts +2 -2
- package/template/src/bot/tester-station.ts +1 -1
- package/template/src/contributions/README.md +1 -1
- package/template/src/contributions/analytics.analytics.tsx +1 -1
- package/template/src/contributions/data.document.tsx +2 -2
- package/template/src/contributions/pages.finder.ts +1 -1
- package/template/src/contributions/tester.inspector.tsx +2 -2
- package/template/src/contributions/use-game-modules.ts +1 -1
- package/template/src/input.ts +2 -2
- package/template/src/lib/reflections/volume-reflection-material.ts +59 -59
- package/template/src/lib/static-batch/Frozen.tsx +1 -1
- package/template/src/lib/static-batch/mutation-watch.ts +1 -1
- package/template/src/main.ts +58 -6
- package/template/src/manifest-entry-modules.d.ts +12 -1
- package/template/src/prefabs/HeroBox.stories.tsx +1 -1
- package/template/src/world.tsx +1 -1
- package/template/tsconfig.json +1 -1
- package/template/validate-manifest.ts +3 -3
- package/template/vite.config.ts +11 -11
- package/template/{vgai.adapter.ts → volter.adapter.ts} +1 -1
- package/template/{vgai.project.json → volter.project.json} +2 -2
- package/template-dotfiles/gitignore +27 -27
- package/workbench/src/media/game-cover.css +11 -11
- package/workbench/src/product.contribution.ts +28 -28
- package/workbench/src/{vgaiGameSkew.ts → volterGameSkew.ts} +16 -16
- package/dist/assets/AudioViewer-BDPqHDfU.js +0 -1
- package/dist/assets/CanvasBoardDocument-mxL0oJ3N.js +0 -1
- package/dist/assets/CanvasSceneViewport-C_mapCwC.js +0 -1
- package/dist/assets/ColorInput-QUPS1pEB.js +0 -1
- package/dist/assets/ImageViewer-tlVvkdM4.js +0 -1
- package/dist/assets/InspectorObjectPreview-W-y079DS.js +0 -1
- package/dist/assets/JsonAssetDocument-CPmcWFPW.js +0 -2
- package/dist/assets/ModelAssetDocument-De1HKuxG.js +0 -1
- package/dist/assets/Object3DDocumentToolbar-Cks81kCS.js +0 -1
- package/dist/assets/Object3DDocumentViewport-DCwiSY3O.js +0 -2
- package/dist/assets/OnlineAssetDetail-CNuwSQRQ.js +0 -1
- package/dist/assets/PlayBar-bT8Xdrap.js +0 -1
- package/dist/assets/ReactCanvasControls-CnJrPj-B.js +0 -1
- package/dist/assets/RootSelectionOverlay-CpaGluQu.js +0 -1
- package/dist/assets/ShadowEditor-CVtMlALn.js +0 -1
- package/dist/assets/StageHost-B89HKcvd.js +0 -2
- package/dist/assets/ThreeBoardDocument-BAgHrbtu.js +0 -2
- package/dist/assets/Toolbar-DkTHnQto.js +0 -1
- package/dist/assets/VideoViewer-DMV8lf4P.js +0 -1
- package/dist/assets/ViewportShadingMenu-CXPi6fl8.js +0 -1
- package/dist/assets/active-ingest-DA426a81.js +0 -3
- package/dist/assets/adapter-runtime-bindings-4cmsRvRh.js +0 -2
- package/dist/assets/animation-mixers.service-DK64IuYq.js +0 -1
- package/dist/assets/animation-timeline.utility-D-g0zrOl.js +0 -1
- package/dist/assets/asset-editor-persistence-BGWIqZdk.js +0 -1
- package/dist/assets/asset-loaders-C0KQI5eY.js +0 -2
- package/dist/assets/audio.utility-BmE9WMUg.js +0 -1
- package/dist/assets/autoplay.service-CjPnv3QW.js +0 -1
- package/dist/assets/binding-resolver-dE0GnZT5.js +0 -2
- package/dist/assets/blender-emscripten-engine-BeWFjMn-.js +0 -2
- package/dist/assets/blender-version.status-OsFoc9SA.js +0 -1
- package/dist/assets/blender-wali-engine-da698rDf.js +0 -2
- package/dist/assets/blender.keymap-_rF_vRX8.js +0 -1
- package/dist/assets/blender.status-ujwGU6dU.js +0 -1
- package/dist/assets/board-guides-BEKPgD9M.js +0 -1
- package/dist/assets/body-marks-RKb_LTwL.js +0 -1
- package/dist/assets/bridge.command-BF00Iefm.js +0 -3
- package/dist/assets/build-profiles.document-CqNrDdh9.js +0 -2
- package/dist/assets/build-progress.status-Bo1ZgJcb.js +0 -1
- package/dist/assets/build-session-GZcSAfPN.js +0 -9
- package/dist/assets/build.header-Bt1kwHWl.js +0 -1
- package/dist/assets/canvas-design-mount-BbLW_Nci.js +0 -6
- package/dist/assets/canvas-entry-runtime-UNYuSfG0.js +0 -2
- package/dist/assets/capability-coverage-DZ-onC5j.js +0 -7
- package/dist/assets/component-board.service-q_TM9BCw.js +0 -2
- package/dist/assets/component-contracts.service-CPbfXE1h.js +0 -1
- package/dist/assets/component-instance-root-B0C5oNEm.js +0 -1
- package/dist/assets/component-verbs.service-CnA11bJq.js +0 -1
- package/dist/assets/connection.status-Yvt0bX0r.js +0 -1
- package/dist/assets/constraints.inspector-4r8jWq5a.js +0 -1
- package/dist/assets/coverage.service-DcpEoBuf.js +0 -3
- package/dist/assets/create-runtime-DBfUy0SO.js +0 -3
- package/dist/assets/curve-DVd18iAX.js +0 -1
- package/dist/assets/data-check-core-CQEjuFyt.js +0 -1
- package/dist/assets/data-ref-CWnkj-HX.js +0 -1
- package/dist/assets/debug-bridge-D3_-EgRE.js +0 -1
- package/dist/assets/debug-registry-P0_YQGWd.js +0 -1
- package/dist/assets/design-time-layers-ChswRUJt.js +0 -1
- package/dist/assets/design-time-react-mount-C85KfXOd.js +0 -1
- package/dist/assets/edit-mode-authoring-DeCxPcHM.js +0 -1
- package/dist/assets/editor-api-BFTIRlWa.js +0 -1
- package/dist/assets/editor-presentation-activity-C7SNSmTd.js +0 -1
- package/dist/assets/entry-adjudication-Dc18TIqT.js +0 -1
- package/dist/assets/fork-menu-DpKqRhF5.js +0 -1
- package/dist/assets/game-audio-CaGKzia4.js +0 -1
- package/dist/assets/game-document.service-Chmt4065.js +0 -1
- package/dist/assets/game-eval.command-DRSvOJ_1.js +0 -2
- package/dist/assets/game-module-access-o3iXZpCA.js +0 -1
- package/dist/assets/game-network-Ct2FQYmu.js +0 -1
- package/dist/assets/gameplay-replay-BwdxV4oF.js +0 -1
- package/dist/assets/gameplay.command-Boqv1hnc.js +0 -1
- package/dist/assets/generation-DhwCUHPf.css +0 -1
- package/dist/assets/generation.service-o9aXlsx4.js +0 -1
- package/dist/assets/generations.status-BvzgHlyk.js +0 -1
- package/dist/assets/hierarchy-marks-BLPfSIym.js +0 -1
- package/dist/assets/hierarchy-marks-Cc_3lxw6.js +0 -1
- package/dist/assets/hosted-asset-materialization-BpbnhJac.js +0 -2
- package/dist/assets/index-0Lm0Nf1M.css +0 -1
- package/dist/assets/index-BHoAKyAC.js +0 -1
- package/dist/assets/index-BeK4RPgj.js +0 -1
- package/dist/assets/index-C1c3eOmm.js +0 -1
- package/dist/assets/index.module-Ycad3DJq.js +0 -1
- package/dist/assets/ingest-siblings-BtiEXLnh.js +0 -1
- package/dist/assets/ingest-source-persistence-Dmdo-UBp.js +0 -1
- package/dist/assets/ingest.service-vbCucMz7.js +0 -1
- package/dist/assets/inspection-CObLhnrs.js +0 -1
- package/dist/assets/instances.command-BwayrqNm.js +0 -1
- package/dist/assets/layered-pick-kiQf53t5.js +0 -1
- package/dist/assets/material-B_V78pTt.js +0 -1
- package/dist/assets/model-asset-sections-CFvvihfx.css +0 -1
- package/dist/assets/model-asset-sections.service-CqSclZGY.js +0 -1
- package/dist/assets/module-mode-BH2R93XP.js +0 -2
- package/dist/assets/mount-canvas-ingest-root-D1z9i5B3.js +0 -2
- package/dist/assets/mount-dom-ingest-root-BAmmNxlm.js +0 -2
- package/dist/assets/mount-ingest-root-DYR0TMIt.js +0 -2
- package/dist/assets/mount-manifest-DdkFYdVA.js +0 -1
- package/dist/assets/mount-readiness-Ds0HvvLH.js +0 -4
- package/dist/assets/mount-three-ingest-root-DVbACDUy.js +0 -1
- package/dist/assets/network-observer.service-Ce83TdsU.js +0 -1
- package/dist/assets/network.utility-DFDul2Xb.js +0 -1
- package/dist/assets/object-marks-DwvIEBOK.js +0 -1
- package/dist/assets/pixi-authoring-adapter-BChknIdC.js +0 -1
- package/dist/assets/pixi-live-write-target-BjDsBQbp.js +0 -1
- package/dist/assets/play-mode-DICV4cKP.js +0 -22
- package/dist/assets/play.command-NHyi5rzF.js +0 -2
- package/dist/assets/pose-guard-DILO6gGq.js +0 -1
- package/dist/assets/presentation-BeNFBfKg.js +0 -1
- package/dist/assets/profiler.utility-Do2Bw7MY.js +0 -1
- package/dist/assets/project-provenance-4ldz-EOG.js +0 -1
- package/dist/assets/r3f-design-session-B5GsZI5M.js +0 -2
- package/dist/assets/react-canvas-navigation-Cp3cOHJa.js +0 -1
- package/dist/assets/react-inspector.service-Bm0OnanU.js +0 -1
- package/dist/assets/react-story-board-GaXqr03H.js +0 -1
- package/dist/assets/react-world-authoring-adapter-DOjv2pYm.js +0 -1
- package/dist/assets/reflection-probe-capture.inspector-DqSW9p1v.js +0 -1
- package/dist/assets/registry-CaCdF63N.js +0 -1
- package/dist/assets/root-seam-contract-CxLZaRio.js +0 -1
- package/dist/assets/run-selection-DzEkGesJ.js +0 -2
- package/dist/assets/scene-capture-0a-bTjT8.js +0 -1
- package/dist/assets/scene-document.service-CeDwVA7t.js +0 -2
- package/dist/assets/seeded-random-BgCwIAAU.js +0 -1
- package/dist/assets/stage-overlay-set-BGE03mqb.js +0 -1
- package/dist/assets/stage-presence-markers-DIP7YMcO.js +0 -1
- package/dist/assets/stage-transform-tools-BQB7EY4l.js +0 -1
- package/dist/assets/standard-viewport-dressing-BCA51Tum.js +0 -24
- package/dist/assets/state-watch.utility-CFG1Tu1m.js +0 -1
- package/dist/assets/story-documents-BTo90DiA.js +0 -3
- package/dist/assets/story-three-preview-R1JvrggS.js +0 -2
- package/dist/assets/studio-environment-DRxxq_QX.js +0 -2
- package/dist/assets/team-playtest.service-hLfjgScx.js +0 -1
- package/dist/assets/three-authoring-adapter-htbnVej2.js +0 -1
- package/dist/assets/three-authoring.service-BIQAtVdX.js +0 -2
- package/dist/assets/three-integration.service-CS8Nvbd2.js +0 -1
- package/dist/assets/three-projection-core-CG01r5Ta.js +0 -1
- package/dist/assets/three-viewport-presentation-B0z_cECu.js +0 -141
- package/dist/assets/tools-B_NJsk05.js +0 -1
- package/dist/assets/transform-mode-request-DzD9aUNA.js +0 -1
- package/dist/assets/transport-strip-CUjNltnb.js +0 -1
- package/dist/assets/transport.header-Bb4FpQ8J.js +0 -1
- package/dist/assets/tuples-DfWSY2tr.js +0 -1
- package/dist/assets/ui-board-document-CCiiXjX9.js +0 -2
- package/dist/assets/user-data-dHvLdpwM.js +0 -1
- package/dist/assets/viewport-door-Bj_ZIP85.js +0 -1
- package/dist/assets/worker-CC9Ug5Ei.js +0 -2
- package/dist/assets/workspace-arrangement-BdAlBwvd.js +0 -1
- package/dist/assets/world-documents-DBybpBq8.js +0 -1
- package/dist/assets/world-root-stage-binding-ZVYIgr74.js +0 -1
- package/dist/vgai-shared-react.json +0 -10
- package/dist/vgai-shared-three.json +0 -3
- package/template/.agents/skills/vgai-threejs-authoring/agents/openai.yaml +0 -4
- package/template/.claude/skills/vgai-threejs-authoring/agents/openai.yaml +0 -4
- package/template/.github/skills/vgai-threejs-authoring/agents/openai.yaml +0 -4
- /package/dist/assets/{vgai-shared-fontawesome-CU65D4Ij.js → volter-shared-fontawesome-CU65D4Ij.js} +0 -0
- /package/dist/assets/{vgai-shared-jsx-dev-runtime-DFDKL7fx.js → volter-shared-jsx-dev-runtime-DFDKL7fx.js} +0 -0
- /package/dist/assets/{vgai-shared-jsx-runtime-DIqBpTut.js → volter-shared-jsx-runtime-DIqBpTut.js} +0 -0
- /package/dist/assets/{vgai-shared-react-BT7rMc2H.js → volter-shared-react-BT7rMc2H.js} +0 -0
- /package/dist/assets/{vgai-shared-react-dom-DFajMqMT.js → volter-shared-react-dom-DFajMqMT.js} +0 -0
- /package/dist/assets/{vgai-shared-react-dom-client-S0ozfl6_.js → volter-shared-react-dom-client-S0ozfl6_.js} +0 -0
- /package/dist/assets/{vgai-shared-three-DH4yxKwt.js → volter-shared-three-DH4yxKwt.js} +0 -0
- /package/template/{.vgai → .volter}/assets.json +0 -0
- /package/template/{.vgai → .volter}/provenance.json +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{M as m,eg as f,eh as g,b0 as S,ei as b,ej as w}from"./index-BRJMIUK0.js";const $="vgaiRecordIndex";function R(i){const e=i?.userData;if(e===null||typeof e!="object")return null;const t=e[$];return typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}let d={state:"absent"},h=0;function j(i,e){const t=i;if(t===null||typeof t!="object")throw new Error(`the data writer "${e}" did not export a module object`);if(typeof t.dataFile!="string"||t.dataFile.length===0)throw new Error(`the data writer "${e}" exports no \`dataFile\` string — a writer must name the one project-relative file it edits`);if(typeof t.planDataEdit!="function")throw new Error(`the data writer "${e}" exports no \`planDataEdit\` function — that is the whole contract: (bytes, request) => {changed, bytes} | {changed, reason}`);return{dataFile:t.dataFile,...typeof t.canPlace=="function"?{canPlace:t.canPlace.bind(t)}:{},planDataEdit:t.planDataEdit.bind(t)}}function x(i){const e=++h;if(i===null){d={state:"absent"};return}d={state:"loading"},i.load().then(t=>{h===e&&(d={state:"ready",writer:j(t,i.specifier)})}).catch(t=>{h===e&&(d={state:"failed",reason:`this game's declared data writer (${i.specifier}) could not be loaded: ${t instanceof Error?t.message:String(t)}`})})}function k(){return d}function I(i){const e=d;if(e.state!=="ready"||!e.writer.canPlace)return null;const t=e.writer.canPlace(i);return t===!0?null:t}function _(i){const e=d;switch(e.state){case"ready":return{anchored:!0,kind:"data",file:e.writer.dataFile,record:i,display:`${e.writer.dataFile} record ${i}`};case"loading":return{anchored:!1,reason:`this object is record ${i} of its game's own level data; the game's data writer is still loading`};case"failed":return{anchored:!1,reason:`this object is record ${i}, but ${e.reason}`};default:return{anchored:!1,reason:`this object is record ${i} of its game's own level data, and this game declares no data writer (\`ingest.dataWriter\`) that could write that record back`}}}const u=new TextEncoder,E=new TextDecoder;let l=null,p=null;function D(){return l}async function y(i=fetch){return l||p||(p=(async()=>{try{const e=await i("/__ingest-source/ownership");if(!e.ok)throw new Error(`HTTP ${e.status}`);l=await e.json()}catch(e){l={writable:!1,reason:`the editor could not reach its dev server to check who owns this game's source (${e instanceof Error?e.message:String(e)})`,projectRoot:null}}return l})(),p)}function T(i){const e=async(r,s)=>{const n=await i(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),o=await n.json();if(!n.ok&&r.endsWith("/read"))throw new Error(`Reading ingested game source failed with HTTP ${n.status}: ${JSON.stringify(o)}`);return o},t=new Map,a=r=>{throw new Error(`The creation-site source backend has no "${r}" — an ingested game has no JSX oids; ingest edits are anchored by creation site.`)};return{historyIdentity:P,readSource:async r=>{const s=await e("/__ingest-source/read",{file:r}),n=s.encoding==="base64";return t.set(r,n?"base64":"utf8"),n?{...s,bytes:w(s.source)}:s},applySource:(r,s,n)=>e("/__ingest-source/apply",{file:r,source:typeof s=="string"?s:b(s),ifMatchSha:n,encoding:typeof s=="string"?t.get(r)??"utf8":"base64"}),writeStyle:()=>a("writeStyle"),removeStyle:()=>a("removeStyle"),writeStruct:()=>a("writeStruct")}}const P={};class N{backend;fetchImpl;history;live;liveResourceKey=null;unregisterLive=null;constructor(e){this.history=e.history,this.live=e.live,this.fetchImpl=e.fetchImpl??fetch.bind(globalThis),this.backend=T(this.fetchImpl),y(this.fetchImpl)}dispose(){this.unregisterLive?.(),this.unregisterLive=null}gate(e,t,a,r="instance"){if(!e.anchored)return{ok:!1,reason:e.reason};const s=e.kind==="data"?`held at ${e.display}`:`created at ${e.display}`;if(e.kind==="data"){const o=I(a);if(o)return{ok:!1,reason:`${s}, but ${o}`}}const n=l;return n?n.writable?e.kind==="source"&&t!==1&&r!=="creation-site"?{ok:!1,reason:t===0?`${s}, but nothing was recorded as constructed there — the editor cannot tell whether that line builds this object alone`:`${s}, but that creation site constructs ${t} objects; a per-object edit cannot be written there`}:f()?{ok:!0}:{ok:!1,reason:`${s}, but this game is playing — hold it to author, or the edit stays live-only`}:{ok:!1,reason:`${s}; ${n.reason??"this game’s source is not writable"}`}:{ok:!1,reason:`${s}; still checking who owns this game's source`}}canAttempt(e,t,a){return this.gate(e,t,a).ok}describe(e,t,a,r="instance"){const s=this.gate(e,t,a,r);return s.ok?`Persisting to ${e.display}.`:`Live-only edit — ${s.reason}.`}async inspect(e){const t=e.anchor;if(!t.anchored||t.kind!=="source")return{};if(e.properties.length===0)return{};try{return(await this.post("/__ingest-source/inspect",{site:{file:t.file,line:t.line,col:t.col},instances:e.instances,...e.writeScope?{writeScope:e.writeScope}:{},...e.surface?{surface:e.surface}:{},properties:e.properties})).properties??{}}catch{return{}}}async persist(e){if(!f())return{persisted:!1,reason:"this game is playing — a play-time edit lives on the running object only"};const t=e.anchor;if(!t.anchored)return{persisted:!1,reason:t.reason};const a=await y(this.fetchImpl);if(!a.writable)return{persisted:!1,reason:a.reason??"this game’s source is not writable"};if(!this.history)return{persisted:!1,reason:"this session has no project history to record into"};if(t.kind==="data")return this.persistData(e,t);const r=await this.post("/__ingest-source/prepare",{site:{file:t.file,line:t.line,col:t.col},instances:e.instances,...e.writeScope?{writeScope:e.writeScope}:{},property:e.property,...e.surface?{surface:e.surface}:{},baseline:e.baseline,next:e.next});if(!r.changed||!r.file||!r.resourcePath||r.prevSource===void 0||r.newSource===void 0||!r.prevSha)return{persisted:!1,reason:r.reason??"the edit was refused"};const s=await this.post("/__ingest-source/apply",{file:r.file,source:r.newSource,ifMatchSha:r.prevSha,note:`${e.property} at ${t.display}`});return s.applied?(await this.recordEdit(e,{file:r.file,resourcePath:r.resourcePath,before:r.prevSource,after:r.newSource}),{persisted:!0,file:r.file,detail:`${e.property} → ${r.file}:${t.line}`}):{persisted:!1,reason:s.error??"the write was refused"}}async remove(e){if(!f())return{persisted:!1,reason:"this game is playing — a play-time edit lives on the running object only"};const t=e.anchor;if(!t.anchored)return{persisted:!1,reason:t.reason};const a=await y(this.fetchImpl);if(!a.writable)return{persisted:!1,reason:a.reason??"this game’s source is not writable"};if(!this.history)return{persisted:!1,reason:"this session has no project history to record into"};if(t.kind==="data")return{persisted:!1,reason:"a level-data record has no removable source statement — its property is the record's own field, not an authored override"};const r=await this.post("/__ingest-source/prepare",{site:{file:t.file,line:t.line,col:t.col},instances:e.instances,...e.writeScope?{writeScope:e.writeScope}:{},property:e.property,...e.surface?{surface:e.surface}:{},remove:!0});if(!r.changed||!r.file||!r.resourcePath||r.prevSource===void 0||r.newSource===void 0||!r.prevSha)return{persisted:!1,reason:r.reason??"the removal was refused"};const s=await this.post("/__ingest-source/apply",{file:r.file,source:r.newSource,ifMatchSha:r.prevSha,note:`${e.property} removed at ${t.display}`});if(!s.applied)return{persisted:!1,reason:s.error??"the removal was refused"};const n=g(this.backend,this.history,{file:r.file,resourcePath:r.resourcePath,before:r.prevSource,after:r.newSource});return await this.history.recordAppliedTransaction({label:e.label,resources:[n.resource],scope:"project"},[n]),{persisted:!0,file:r.file,detail:`${e.property} dropped from ${r.file}:${t.line}`}}async persistData(e,t){const a=k();if(a.state!=="ready"){const c=_(t.record);return{persisted:!1,reason:c.anchored?"this game's data writer changed mid-gesture":c.reason}}const r=await this.post("/__ingest-source/read",{file:t.file});if(typeof r.source!="string"||!r.sha||!r.resourcePath)return{persisted:!1,reason:r.error??`this game's data file ${t.file} could not be read`};if(r.encoding!=="base64")return{persisted:!1,reason:`${t.file} came back as ${r.encoding??"utf8"} text, not bytes — a data writer edits binary game data, and writing text back through it would change the file`};let s;try{s=await a.writer.planDataEdit(w(r.source),{record:t.record,property:e.property,baseline:e.baseline,next:e.next})}catch(c){return{persisted:!1,reason:`this game's data writer refused: ${c instanceof Error?c.message:String(c)}`}}if(!s.changed)return{persisted:!1,reason:s.reason};const n=b(s.bytes),o=await this.post("/__ingest-source/apply",{file:t.file,source:n,encoding:"base64",ifMatchSha:r.sha,note:`${e.property} at ${t.display}`});return o.applied?(await this.recordEdit(e,{file:t.file,resourcePath:r.resourcePath,before:w(r.source),after:s.bytes}),{persisted:!0,file:t.file,detail:`${e.property} → ${t.display}`}):{persisted:!1,reason:o.error??"the write was refused"}}async recordEdit(e,t){const a=this.history,r=this.ensureLiveResource(),s=g(this.backend,a,t),n={objects:{[e.entityId]:{[e.property]:e.baseline}}},o={objects:{[e.entityId]:{[e.property]:e.next}}};await a.recordAppliedTransaction({label:e.label,resources:[s.resource,r],scope:"project"},[s,{resource:r,beforeBytes:u.encode(JSON.stringify(n)),afterBytes:u.encode(JSON.stringify(o)),contentType:"application/json"}])}async post(e,t){return await(await this.fetchImpl(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})).json()}ensureLiveResource(){if(this.liveResourceKey)return this.liveResourceKey;const e=this.history,t=e.registry.registerProject("overlay",".vgai/ingest-live-objects","Ingested game objects"),a={descriptor:t,capture:async()=>{const r=u.encode(JSON.stringify({objects:{}}));return{revision:0,contentType:"application/json",bytes:r,sha256:await S(r)}},preflight:async()=>({ok:!0}),restore:async r=>{const s=JSON.parse(E.decode(e.snapshots.read(r).bytes));for(const[n,o]of Object.entries(s.objects))for(const[c,v]of Object.entries(o))this.live.apply(n,c,v)},estimateBytes:r=>r.byteLength};return this.unregisterLive=e.registerDriver(a),this.liveResourceKey=t.key,t.key}}function A(i,e){m.warn(`[ingest] ${i} stayed live-only — ${e}.`)}export{N as I,_ as a,k as b,R as d,D as i,y as l,A as r,x as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a6 as i,q as e,M as p}from"./index-BRJMIUK0.js";import{i as s,a as m}from"./registry-CaCdF63N.js";import{a}from"./mount-ingest-root-DYR0TMIt.js";import{t as n}from"./three-state-DwFE3ay2.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"./active-ingest-DA426a81.js";import"./game-contract-seams-BnPFGLll.js";import"./capability-coverage-DZ-onC5j.js";import"./ingest-source-persistence-Dmdo-UBp.js";import"./contract-system-adapters-Bic_7sev.js";import"./editor-shell-store-ChLcVeNB.js";import"./output-pass-HurwNl0G.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./Pass-D1MRT672.js";import"./editor-layers-BDJnAAzj.js";import"./workspace-arrangement-BdAlBwvd.js";import"./user-data-Bpj7diUS.js";import"./entity-object-JmYMfLsx.js";import"./three-contract-Dkt6PmWY.js";const B="workspace.service";function E(){const o=i({id:"in-tree-ingest-registry",owner:"@volter/editor-game/contributions/ingest.service.ts",modulePathFor:t=>m(t),importModule:async t=>await s(t)}),r=e().project.onReady(async()=>{const t=n();if(!t){p.error("Ingest auto-launch skipped: the editor shell store had not arrived at project ready.","ingest");return}await a(t)});return()=>{r(),o()}}export{B as point,E as start};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const h=new Set([".git",".vgai","build","coverage","dist","node_modules","out"]),l=new Set([".js",".jsx",".mjs",".ts",".tsx"]),p=500,f=4;function u(t){const s=t.lastIndexOf(".");return s<0?"":t.slice(s).toLowerCase()}function m(t){if(!t||typeof t!="object")return new Set;const s=t,a=new Set;for(const n of["dependencies","devDependencies","peerDependencies"]){const e=s[n];if(!(!e||typeof e!="object"))for(const r of Object.keys(e))a.add(r)}return a}async function g(t){if(!await t.exists("package.json"))return new Set;try{return m(JSON.parse(await t.read("package.json")))}catch{return new Set}}async function y(t){const s=[],a=[{path:"",depth:0}];for(;a.length>0&&s.length<p;){const n=a.shift();if(!n)break;let e;try{e=await t.list(n.path)}catch{continue}for(const r of e)if(r.type==="dir")n.depth<f&&!h.has(r.name)&&a.push({path:r.path,depth:n.depth+1});else if((l.has(u(r.path))||r.path==="index.html")&&(s.push(r.path),s.length>=p))break}return s}function w(t){const s=["src/vgai-entry.tsx","src/vgai-entry.ts","src/vgai-host.tsx","src/vgai-host.ts","src/adapter.tsx","src/adapter.ts","src/main.tsx","src/main.ts","src/index.tsx","src/index.ts","src/main.jsx","src/main.js","src/index.jsx","src/index.js","index.html"],a=new Set(t),n=s.filter(e=>a.has(e));return[...n,...t.filter(e=>!n.includes(e))].slice(0,8)}async function x(t){if(await t.exists("vgai.project.json"))return{workspaceState:"vgai-project",detectedTechnologies:["Volter Editor"],suggestedSurface:null,entryCandidates:[],adaptationBlockers:[],hasManifest:!0,writesPerformed:!1,summary:"This folder is already a Volter Editor project.",nextAction:"Open it in the editor."};if((await t.list("")).length===0)return{workspaceState:"empty-folder",detectedTechnologies:[],suggestedSurface:null,entryCandidates:[],adaptationBlockers:[],hasManifest:!1,writesPerformed:!1,summary:"This folder is empty.",nextAction:"Create a new Volter Editor project here."};const a=await g(t),n=await y(t),e=[];a.has("@react-three/fiber")&&e.push("React Three Fiber"),a.has("three")&&e.push("three.js"),(a.has("pixi.js")||[...a].some(i=>i.startsWith("@pixi/")))&&e.push("PixiJS"),a.has("react")&&e.push("React"),a.has("vite")&&e.push("Vite");const r=e.some(i=>i==="three.js"||i==="React Three Fiber")?"three":e.includes("PixiJS")?"canvas":e.includes("React")?"dom":null,o=w(n),c=[];if(r&&o.length===0&&c.push("No JavaScript or TypeScript entry candidate was found."),r==="dom"&&o[0]){let i="";try{i=await t.read(o[0])}catch{c.push(`The suggested React entry ${o[0]} could not be read.`)}/\b(?:ReactDOM\s*\.\s*render|createRoot|hydrateRoot)\s*\(/.test(i)?c.push(`The React app mounts itself in ${o[0]}; Volter Editor ingest requires a host-shim module that default-exports the mounted component and preserves the app's providers.`):/\bexport\s+default\b/.test(i)||c.push(`The React entry ${o[0]} does not default-export a component; create a host-shim module that does before adding Volter Editor metadata.`)}const d=r!==null&&c.length===0;return{workspaceState:d?"adaptable-project":"unknown-project",detectedTechnologies:e,suggestedSurface:r,entryCandidates:o,adaptationBlockers:c,hasManifest:!1,writesPerformed:!1,summary:d?`This looks like an existing ${e.join(" + ")||"web"} project.`:r?`This ${e.join(" + ")||"web"} project needs an adapter step before Volter Editor metadata can be added safely.`:"This folder is not empty, but its game framework could not be identified.",nextAction:d?"Review the detected entry and adapter, then add Volter Editor metadata without rewriting the game source.":c[0]??"Choose the entry point and adapter explicitly before adding Volter Editor metadata."}}function j(t,s){const a=s.surface??t.suggestedSurface,n=s.entry??t.entryCandidates[0],e=n?.replace(/\\/g,"/"),r=e!==void 0&&(e.startsWith("/")||e.startsWith("//")||/^[A-Za-z]:\//.test(e)||e.split("/").includes("..")),o=t.workspaceState==="unknown-project"&&s.surface!==void 0&&s.entry!==void 0;if(t.workspaceState!=="adaptable-project"&&!o||!a||!n||r)throw new Error(r?"Adapter entry must be a project-relative path that stays inside the selected folder.":t.adaptationBlockers[0]??"Choose a supported adapter surface and source entry before adapting this folder.");return{manifestVersion:2,name:s.name,version:"0.1.0",engine:{version:s.engineVersion},roots:[{id:"game",adapter:{surface:a,ingest:{}},entry:n}]}}export{j as createIngestManifest,x as inspectProject};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a9 as m}from"./index-BRJMIUK0.js";import{a as p,i as e,b as n,s}from"./play-mode-DICV4cKP.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"./adapter-runtime-bindings-4cmsRvRh.js";import"./native-debug-module-2_HVupdg.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-P0_YQGWd.js";import"./contract-system-adapters-Bic_7sev.js";import"./game-contract-seams-BnPFGLll.js";import"./seeded-random-BgCwIAAU.js";import"./game-audio-CaGKzia4.js";import"./game-network-Ct2FQYmu.js";import"./index-OZVqp6xS.js";import"./index-Da9JhEvW.js";import"./rapier-physics-adapter-CaZqWLu0.js";import"./events-156d8d12.esm-CYeuVCYr.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./index-bQE2NA0D.js";import"./live-project-verbs-C3LzprCe.js";import"./capability-coverage-DZ-onC5j.js";import"./edit-mode-authoring-DeCxPcHM.js";import"./json-history-resource-DwS10tqD.js";import"./binding-resolver-dE0GnZT5.js";import"./adapter-surface-Y37Nzcyw.js";import"./entry-adjudication-Dc18TIqT.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./realm-services-CnY105XU.js";import"./canvas-entry-runtime-UNYuSfG0.js";import"./three-ingest-runtime-B7rtg3QE.js";import"./EffectComposer-BEAt0PtQ.js";import"./CopyShader-BzTUYzf6.js";import"./ShaderPass-DTnDQXm0.js";import"./Pass-D1MRT672.js";import"./CSS3DRenderer-BsAqfavI.js";import"./relative-path-guard-GiM7Lsz8.js";import"./react-root-BHA-cdrW.js";import"./editor-presentation-activity-C7SNSmTd.js";import"./active-ingest-DA426a81.js";import"./ingest-source-persistence-Dmdo-UBp.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-vgxsTyj4.js";import"./mounted-authoring-Clftxx0x.js";import"./entity-object-JmYMfLsx.js";import"./user-data-Bpj7diUS.js";import"./workspace-arrangement-BdAlBwvd.js";import"./three-contract-Dkt6PmWY.js";import"./three-TCuY32m_.js";import"./editor-layers-BDJnAAzj.js";import"./component-instance-root-B0C5oNEm.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-authoring-adapter-htbnVej2.js";import"./source-persistence-backend-CwLYVPXj.js";import"./three-projection-core-CG01r5Ta.js";import"./body-marks-RKb_LTwL.js";import"./user-data-dHvLdpwM.js";import"./object-marks-DwvIEBOK.js";import"./structural-ids-Br2zjINh.js";import"./object3d-authoring-subject-BDrxd1GA.js";import"./r3f-physics-binding-DzrbpqjM.js";import"./deferred-ingest-play-BdR4qGk6.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-DOjv2pYm.js";import"./board-guides-BEKPgD9M.js";import"./relative-import-specifier-BFKIWEWs.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-Dr4qvDpJ.js";import"./inference-diagnostics-xecGdohW.js";import"./writer-tw6EcuVO.js";import"./three-state-DwFE3ay2.js";import"./editor-shell-store-ChLcVeNB.js";import"./output-pass-HurwNl0G.js";import"./viewport-door-Bj_ZIP85.js";const Ct="workspace.command",a=()=>({ok:!1,error:"not in play mode — start play before using the debug seam"}),Gt={"set-instance-count":{derivedRefresh:"always",handle:o=>{if(!e())return a();const r=o.names;if(Array.isArray(r)&&r.every(i=>typeof i=="string"))return r.length<1?{ok:!1,error:'set-instance-count "names" must have at least one entry.'}:(n(r),{ok:!0});const t=o.count;return typeof t!="number"||!Number.isFinite(t)||t<1?{ok:!1,error:`set-instance-count requires a whole "count" >= 1 (or a "names" array), got ${String(t)}.`}:(s(Math.floor(t)-1),{ok:!0})}},"list-instances":{derivedRefresh:"if-content-changed",handle:()=>({ok:!0,data:{instances:m(),named:p()}})}};export{Gt as commands,Ct as point};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{stackOrder as C}from"./root-stacking-BEd9ZvxC.js";import{av as D,ay as O,az as g,aA as y,aB as z,w as S,aC as b}from"./index-BRJMIUK0.js";function p(a,o,r,d){const n=a.pickable?.pick(o,r)??null;return n?a.selection?.resolve?.(n,{intent:d,scopeId:z()})?.id??n:null}function I(a,o,r,d){const n=a.pickable?.candidates?.(o,r)??[],s=[],c=new Set;for(const f of n){const i=a.selection?.resolve?.(f,{intent:d,scopeId:z()})?.id??f;c.has(i)||(c.add(i),s.push(i))}return s}function P(a,o,r,d={}){const n=d.intent??"normal",s=D(a);if(!(s instanceof O))return p(s,o,r,n);const c=s.childAdapters(),i=S()===b?[]:c.filter(t=>t.kind!=="three"),m=c.filter(t=>t.kind==="three"),h=i.map(t=>({id:t.worldId,zOrder:t.zOrder,worldId:t.worldId,adapter:t.adapter})),k=[...C(h).reverse(),...m];for(const{worldId:t,adapter:u}of k){if(g(t)||y(t))continue;const e=p(u,o,r,n);if(e)return e}return null}function R(a,o,r,d={}){const n=d.intent??"normal",s=d.adapter??D(a);if(!(s instanceof O)){const e=I(s,o,r,n),l=p(s,o,r,n);return e.length>0?e:l?[l]:[]}const c=s.childAdapters(),i=S()===b?[]:c.filter(e=>e.kind!=="three"),m=c.filter(e=>e.kind==="three"),h=i.map(e=>({id:e.worldId,zOrder:e.zOrder,worldId:e.worldId,adapter:e.adapter})),k=[...C(h).reverse(),...m],t=[],u=new Set;for(const{worldId:e,adapter:l}of k){if(g(e)||y(e))continue;const w=I(l,o,r,n),A=p(l,o,r,n);for(const v of w.length>0?w:A?[A]:[])u.has(v)||(u.add(v),t.push(v))}return t}export{R as a,P as p};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,by as e,u as i,e9 as o,bx as a,bw as s}from"./index-BRJMIUK0.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 n=t({type:s(["standard","physical","basic","toon"]).describe("Material shading model"),color:i().optional().describe('Base color as CSS hex string (e.g. "#ff0000")'),metalness:e().optional().describe("Metalness factor 0–1 (standard/physical only)"),roughness:e().optional().describe("Roughness factor 0–1 (standard/physical only)"),map:i().optional().describe("Path to albedo/diffuse texture image"),normalMap:i().optional().describe("Path to normal map texture image"),emissive:i().optional().describe("Emissive color as CSS hex string"),emissiveIntensity:e().optional().describe("Emissive light intensity multiplier"),emissiveMap:i().optional().describe("Path to emissive map texture image"),aoMap:i().optional().describe("Path to ambient occlusion map texture image"),lightMap:i().optional().describe("Path to a baked lightmap texture (uses the mesh's second UV set). Applies the pre-baked GI/shadow result on top of the material."),lightMapIntensity:e().optional().describe("Lightmap intensity multiplier (default 1)."),roughnessMap:i().optional().describe("Path to roughness map texture image"),metalnessMap:i().optional().describe("Path to metalness map texture image"),opacity:e().optional().describe("Opacity 0–1. Set transparent: true to enable"),transparent:a().optional().describe("Enable alpha blending for this material"),side:s(["front","back","double"]).optional().describe("Which face sides to render"),flatShading:a().optional().describe("Use flat (faceted) shading instead of smooth"),clearcoat:t({clearcoat:e().describe("Clearcoat layer intensity 0–1"),clearcoatRoughness:e().optional().describe("Clearcoat roughness 0–1"),clearcoatMap:i().optional().describe("Path to clearcoat intensity map"),clearcoatRoughnessMap:i().optional().describe("Path to clearcoat roughness map")}).optional().describe("Clearcoat layer (physical only)"),transmission:t({transmission:e().describe("Transmission intensity 0–1 (glass, liquid)"),ior:e().optional().describe("Index of refraction (default 1.5)"),thickness:e().optional().describe("Volume thickness for refraction"),attenuationColor:i().optional().describe("Color absorbed over distance"),attenuationDistance:e().optional().describe("Distance at which attenuation color takes full effect"),transmissionMap:i().optional().describe("Path to transmission map")}).optional().describe("Light transmission (physical only)"),sheen:t({sheen:e().describe("Sheen intensity 0–1 (fabric, velvet)"),sheenColor:i().optional().describe("Sheen tint color"),sheenRoughness:e().optional().describe("Sheen roughness 0–1"),sheenColorMap:i().optional().describe("Path to sheen color map"),sheenRoughnessMap:i().optional().describe("Path to sheen roughness map")}).optional().describe("Sheen layer (physical only)"),iridescence:t({iridescence:e().describe("Iridescence intensity 0–1 (soap bubbles, oil slick)"),iridescenceIOR:e().optional().describe("Thin-film IOR (default 1.3)"),iridescenceThicknessRange:o([e(),e()]).optional().describe("Min/max thin-film thickness in nm"),iridescenceMap:i().optional().describe("Path to iridescence intensity map"),iridescenceThicknessMap:i().optional().describe("Path to iridescence thickness map")}).optional().describe("Iridescence thin-film (physical only)"),displacementMap:i().optional().describe("Path to displacement/height map"),displacementScale:e().optional().describe("Displacement height multiplier"),displacementBias:e().optional().describe("Displacement offset")}).strict(),g=n.describe("Material appearance properties");export{g as MaterialDescriptorSchema};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.vgai-model-inspector-actions{display:flex;justify-content:flex-end;padding:var(--vgai-space-2) var(--vgai-space-3) 0}.vgai-model-inspector-row>div{display:grid;min-width:0}.vgai-model-inspector-list{display:grid;max-height:360px;gap:var(--vgai-space-2);overflow:auto}.vgai-model-inspector-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:var(--vgai-space-3);padding:var(--vgai-space-3)}.vgai-model-inspector-row:has(.vgai-model-material-swatch){grid-template-columns:auto minmax(0,1fr) auto}.vgai-model-material-swatch{width:var(--vgai-control-default-height);height:var(--vgai-control-default-height);border:var(--vgai-stroke-resting) solid var(--vgai-boundary-strong);border-radius:var(--vgai-radius-sm);background-color:var(--vgai-surface-inset)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./jsx-runtime-DPjLkJKQ.js";import{a as I}from"./three-contract-Dkt6PmWY.js";import{i as N,a as $,b as A,m as P}from"./model-inspection-CXHxrafK.js";import{eR as y,eT as V,d6 as B,eS as p,gO as F,eX as w,gP as G,gQ as E,dU as U,dH as m,eG as O,e1 as v,$ as R,a0 as M,fk as j,fl as t,aI as x,aK as z,gR as T,Z as L,f1 as q,dB as _,gS as W,gT as Z,gU as H,gV as K}from"./index-BRJMIUK0.js";import{S as C}from"./source-object3d-authoring-adapter-DF679Ncb.js";import{a as Q}from"./project-provenance-4ldz-EOG.js";import{object3DAuthoringSubjectOf as J}from"./object3d-authoring-subject-BDrxd1GA.js";import{getUserData as S}from"./user-data-dHvLdpwM.js";import{r as b}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{fo as X}from"./three.core-3arARmh6.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./user-data-Bpj7diUS.js";import"./workspace-arrangement-BdAlBwvd.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./editor-layers-BDJnAAzj.js";import"./three-TCuY32m_.js";import"./component-instance-root-B0C5oNEm.js";import"./entity-object-JmYMfLsx.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-projection-core-CG01r5Ta.js";import"./object-marks-DwvIEBOK.js";function Y(n,s){return s instanceof C&&n?.id===s.documentId}function ee(n,s){return s instanceof C&&n!==null&&n.id!==s.documentId}function r({children:n,code:s=!1}){return e.jsx(x,{variant:s?"code":"body",selectable:!0,truncate:!0,title:typeof n=="string"?n:void 0,children:n})}function D(n){let s=null;return n?.traverse(i=>{!s&&S(i,"gaussianSplat")&&(s=i)}),s}function ne({splat:n}){const s=S(n,"gaussianSplat"),i=n.getBoundingBox().getSize(new X);return e.jsxs(j,{children:[e.jsx(t,{label:"Gaussians",children:e.jsx(r,{children:s.numSplats.toLocaleString()})}),e.jsx(t,{label:"Format",children:e.jsx(r,{children:"SPZ"})}),e.jsx(t,{label:"Bounds",children:e.jsx(r,{children:`${i.x.toFixed(2)} × ${i.y.toFixed(2)} × ${i.z.toFixed(2)}`})}),e.jsx(t,{label:"Level of detail",children:e.jsx(r,{children:"Full source"})}),e.jsx(t,{label:"Picking",children:e.jsx(r,{children:"Gaussian raycast"})}),e.jsx(t,{label:"Collision",hint:"Gaussian splats are visual environment data; use a separate mesh collider.",children:e.jsx(r,{children:"Separate collider required"})})]})}function te({inspection:n,rig:s}){if(!n)return e.jsx(O,{compact:!0,tone:"error",title:"Model unavailable",description:"The native Object3D graph could not be inspected."});const i=[...n.meshes===0?["The asset has no renderable geometry."]:[],...n.geometry.nonFiniteAttributeValues>0?[`${n.geometry.nonFiniteAttributeValues.toLocaleString()} non-finite geometry values can break bounds and selection.`]:[],...s&&!s.valid?["Rig or animation bindings require attention."]:[]];return e.jsxs(e.Fragment,{children:[i.length>0&&e.jsx(v,{tone:"warning",icon:e.jsx(R,{icon:M.status.warning}),children:e.jsx("div",{children:i.map(o=>e.jsx("div",{children:o},o))})}),e.jsxs(j,{children:[e.jsx(t,{label:"Meshes",children:e.jsx(r,{children:n.meshes.toLocaleString()})}),e.jsx(t,{label:"Primitives",children:e.jsx(r,{children:n.primitives.toLocaleString()})}),e.jsx(t,{label:"Vertices",children:e.jsx(r,{children:n.vertices.toLocaleString()})}),e.jsx(t,{label:"Triangles",children:e.jsx(r,{children:n.triangles.toLocaleString()})}),e.jsx(t,{label:"Indexing",children:e.jsxs(r,{children:[n.geometry.indexedMeshes," indexed · ",n.geometry.nonIndexedMeshes," ","non-indexed"]})}),e.jsx(t,{label:"Attributes",children:e.jsx(r,{children:n.geometry.attributes.map(o=>o.name).join(", ")||"None"})}),e.jsx(t,{label:"UV channels",children:e.jsx(r,{children:n.geometry.uvChannels.join(", ")||"None"})}),e.jsx(t,{label:"Morph targets",children:e.jsx(r,{children:n.morphTargets})}),e.jsx(t,{label:"Bounds",children:e.jsx(r,{children:n.bounds?`${n.bounds.x.toFixed(2)} × ${n.bounds.y.toFixed(2)} × ${n.bounds.z.toFixed(2)}`:"None"})}),e.jsx(t,{label:"GPU estimate",children:e.jsxs(r,{children:[(n.memoryBytes/1048576).toFixed(2)," MiB"]})}),e.jsx(t,{label:"Invalid values",children:e.jsx(x,{tone:n.geometry.nonFiniteAttributeValues?"warning":"muted",children:n.geometry.nonFiniteAttributeValues.toLocaleString()})}),e.jsx(t,{label:"LODs",children:e.jsx(r,{children:n.geometry.lodGroups?`${n.geometry.lodLevels} levels`:"Not authored"})}),e.jsx(t,{label:"Collision",hint:"Collision remains a source/import operation when no model metadata exists.",children:e.jsx(r,{children:"Not authored"})})]})]})}function se({rig:n}){const s=[["Non-normalized weights",n.nonNormalizedVertices],["Zero-weight vertices",n.zeroWeightVertices],["Invalid joint indices",n.invalidJointIndices],["Inverse-bind mismatches",n.inverseBindMismatches],["External bones",n.externalBones],["Non-finite animation values",n.nonFiniteAnimationValues],["Unresolved track targets",n.unresolvedTrackTargets.length]];return e.jsxs(e.Fragment,{children:[!n.valid&&e.jsx(v,{tone:"warning",icon:e.jsx(R,{icon:M.status.warning}),children:"Review the non-zero integrity checks below."}),e.jsxs(j,{children:[e.jsx(t,{label:"Deformation",children:e.jsx(r,{children:n.kind==="skinned"?"Skinned mesh":"Rigid attachments"})}),e.jsx(t,{label:"Bones",children:e.jsx(r,{children:n.uniqueBones})}),e.jsx(t,{label:"Root bones",children:e.jsx(r,{children:n.rootBones.join(", ")||"None"})}),n.kind==="skinned"?e.jsxs(e.Fragment,{children:[e.jsx(t,{label:"Skeletons",children:e.jsx(r,{children:n.skeletons})}),e.jsx(t,{label:"Bind mode",children:e.jsx(r,{children:n.bindModes.join(", ")||"None"})}),e.jsx(t,{label:"Weighted vertices",children:e.jsx(r,{children:n.weightedVertices.toLocaleString()})})]}):null,s.filter(([,i])=>i>0).map(([i,o])=>e.jsx(t,{label:i,children:e.jsx(x,{tone:"warning",children:o.toLocaleString()})},i)),n.unresolvedTrackTargets.length?e.jsx(t,{label:"Missing targets",children:e.jsx(r,{children:n.unresolvedTrackTargets.join(", ")})}):null]})]})}function re({adapter:n,inspection:s}){const[i,o]=b.useState(""),a=n.documentRootObject,d=(s?.materialSlots??[]).map((l,u)=>({material:l,rowKey:`${l.id}:${u}`})).filter(({material:l})=>`${l.name} ${l.type} ${l.textureSlots.join(" ")}`.toLowerCase().includes(i.trim().toLowerCase())),c=l=>{if(!a)return;const u=P(a,{id:l})[0],g=u?n.hierarchy.idForObject3D?.(u):null;g&&q(n,[g])};return e.jsxs(e.Fragment,{children:[e.jsx(j,{children:e.jsx(t,{label:"Filter",htmlFor:"model-material-filter",children:e.jsx(z,{id:"model-material-filter",type:"search",value:i,placeholder:"Name, type, or map",onChange:l=>o(l.target.value)})})}),e.jsxs("div",{className:"vgai-model-inspector-list",children:[d.map(({material:l,rowKey:u})=>e.jsxs(T,{variant:"raised",border:!0,className:"vgai-model-inspector-row",children:[e.jsx("span",{className:"vgai-model-material-swatch",style:{background:l.color??void 0},"aria-hidden":"true"}),e.jsxs("div",{children:[e.jsx(x,{as:"strong",variant:"label",truncate:!0,children:l.name}),e.jsxs(x,{variant:"caption",tone:"muted",truncate:!0,children:[l.type," · ",l.usageCount," object",l.usageCount===1?"":"s"," ","· ",l.textureSlots.join(", ")||"no maps",l.transparent?" · transparent":""]})]}),e.jsx(L,{type:"button",variant:"ghost",size:"compact",onClick:()=>c(l.id),children:"Inspect"})]},u)),d.length===0?e.jsx(O,{compact:!0,title:"No matching materials"}):null]})]})}function ie({adapter:n,provenance:s,provenanceLoaded:i}){b.useSyncExternalStore(_,W);const o=s?Z().find(a=>a.tool?.name===s.operationName):void 0;return e.jsxs(e.Fragment,{children:[o?e.jsx("div",{className:"vgai-model-inspector-actions",children:e.jsx(L,{type:"button",variant:"ghost",size:"compact",onClick:()=>H(o.id),children:"Open Source"})}):null,e.jsxs(j,{children:[e.jsx(t,{label:"Path",children:e.jsx(r,{code:!0,children:n.options.sourcePath})}),e.jsx(t,{label:"Truth",children:e.jsx(r,{children:n.provenance.label})}),e.jsx(t,{label:"Ownership",hint:n.provenance.detail,children:e.jsx(r,{children:n.provenance.source})}),i?null:e.jsx(t,{label:"Provenance",children:e.jsx(r,{children:"Loading…"})}),s?e.jsxs(e.Fragment,{children:[e.jsx(t,{label:"Generated by",children:e.jsx(r,{children:s.operationName})}),e.jsx(t,{label:"Tool",children:e.jsx(r,{code:!0,children:s.operationSource??"Not recorded"})}),e.jsx(t,{label:"Generated",children:e.jsx(r,{children:new Date(s.createdAt).toLocaleString()})}),e.jsx(t,{label:"Output hash",children:e.jsx(r,{code:!0,children:s.output.sha256})})]}):i?e.jsx(t,{label:"Provenance",children:e.jsx(r,{children:"Not recorded"})}):null]})]})}const k=new WeakMap;function oe(n){const s=n.documentRootObject??null;if(!s)return;const i=k.get(s);if(i!==void 0)return i??void 0;const o=D(s)?null:N(s),a=o?`${o.meshes} meshes · ${o.triangles.toLocaleString()} triangles`:null;return k.set(s,a),a??void 0}function le({adapter:n}){const s=n,[i,o]=b.useState(null),[a,d]=b.useState(!1),c=s.options.modelSource,l=c?.kind==="project-file"?c.path:null;return b.useEffect(()=>{let u=!1;if(d(!1),!l){o(null),d(!0);return}return Q(l).then(g=>{u||(o(g),d(!0))},()=>{u||(o(null),d(!0))}),()=>{u=!0}},[l]),e.jsx("div",{"data-testid":"model-asset-inspector",children:e.jsx(ie,{adapter:s,provenance:i,provenanceLoaded:a})})}function ae({inspection:n}){return e.jsxs(j,{children:[e.jsx(t,{label:"Native type",children:e.jsx(r,{children:n.type})}),e.jsx(t,{label:"Visible",children:e.jsx(r,{children:n.visible?"Yes":"No"})}),e.jsx(t,{label:"Children",children:e.jsx(r,{children:n.children})}),e.jsx(t,{label:"Descendants",children:e.jsx(r,{children:n.descendants})}),e.jsx(t,{label:"Render order",children:e.jsx(r,{children:n.renderOrder})}),e.jsx(t,{label:"Layer mask",children:e.jsxs(r,{code:!0,children:["0x",n.layers.toString(16)]})})]})}function de({geometry:n}){return e.jsxs(e.Fragment,{children:[n.nonFiniteAttributeValues?e.jsxs(v,{tone:"warning",children:[n.nonFiniteAttributeValues.toLocaleString()," non-finite buffer values can break bounds, picking, and selection outlines."]}):null,e.jsxs(j,{children:[e.jsx(t,{label:"Vertices",children:e.jsx(r,{children:n.vertices.toLocaleString()})}),e.jsx(t,{label:"Triangles",children:e.jsx(r,{children:n.triangles.toLocaleString()})}),e.jsx(t,{label:"Index buffer",children:e.jsx(r,{children:n.indexed?"Indexed":"Non-indexed"})}),e.jsx(t,{label:"Attributes",children:e.jsx(r,{children:n.attributes.join(", ")})}),e.jsx(t,{label:"UV channels",children:e.jsx(r,{children:n.uvChannels.join(", ")||"None"})}),e.jsx(t,{label:"Morph targets",children:e.jsx(r,{children:n.morphTargets})}),e.jsx(t,{label:"Invalid values",children:e.jsx(x,{tone:n.nonFiniteAttributeValues?"warning":"muted",children:n.nonFiniteAttributeValues.toLocaleString()})})]})]})}function ce({materials:n}){return e.jsx("div",{className:"vgai-model-inspector-list",children:n.map(s=>e.jsxs(T,{variant:"raised",border:!0,className:"vgai-model-inspector-row",children:[e.jsx("span",{className:"vgai-model-material-swatch",style:{background:s.color??void 0},"aria-hidden":"true"}),e.jsxs("div",{children:[e.jsx(x,{as:"strong",variant:"label",truncate:!0,children:s.name}),e.jsxs(x,{variant:"caption",tone:"muted",truncate:!0,children:[s.type," · ",s.textureSlots.join(", ")||"no maps"]})]})]},s.id))})}function ue({skin:n}){return e.jsxs(j,{children:[e.jsx(t,{label:"Bones",children:e.jsx(r,{children:n.bones})}),e.jsx(t,{label:"Root bones",children:e.jsx(r,{children:n.rootBones.join(", ")||"None"})}),e.jsx(t,{label:"Bind mode",children:e.jsx(r,{children:n.bindMode})})]})}function he({bone:n}){return e.jsxs(j,{children:[e.jsx(t,{label:"Parent",children:e.jsx(r,{children:n.parent??"Skeleton root"})}),e.jsx(t,{label:"Children",children:e.jsx(r,{children:n.children.join(", ")||"None"})})]})}const h={splat:m,geometry:m+10,rig:m+20,materials:m+40,source:m+50},je=new WeakMap,xe=new WeakMap,me=new WeakMap;function f(n,s,i){const o=n.get(s);if(o!==void 0)return o;const a=i();return n.set(s,a),a}function be(n){const s=n,i=s.documentRootObject,o=[],a=D(i);if(i&&a){const d=S(a,"gaussianSplat");o.push({id:"splat",title:"Gaussian Splat",icon:K,order:h.splat,description:`${d.numSplats.toLocaleString()} Gaussians · native SPZ`,body:{kind:"custom",render:()=>e.jsx(ne,{splat:a})}})}else if(i){const d=f(je,i,()=>N(i)),c=f(xe,i,()=>$(i)),l=oe(n);o.push({id:p,title:"Geometry",icon:B,order:h.geometry,...l?{description:l}:{},body:{kind:"custom",render:()=>e.jsx(te,{inspection:d,rig:c})}}),(c.skinnedMeshes>0||c.uniqueBones>0)&&o.push({id:"rig",title:"Rig",icon:F,order:h.rig,description:c.kind==="skinned"?`${c.uniqueBones} bones · ${c.skinnedMeshes} skinned meshes`:`${c.uniqueBones} bones · rigid hierarchy`,body:{kind:"custom",render:()=>e.jsx(se,{rig:c})}}),o.push({id:"materials",title:"Materials",icon:w,order:h.materials,description:`${d.materials} materials`,body:{kind:"custom",render:()=>e.jsx(re,{adapter:s,inspection:d})}})}return o.push({id:"source",title:"Source",icon:G,order:h.source,description:s.provenance.label,defaultOpen:!1,body:{kind:"custom",render:()=>e.jsx(le,{adapter:n})}}),s.options.audit===!1?o.filter(d=>d.id!==p&&d.id!=="source"):o}function ge(n,s){const i=n?I(s.hierarchy,n.id):null;if(!i)return[];if(J(i))return[];const o=f(me,i,()=>A(i)),a=[{id:p,title:"Object",icon:E,order:h.geometry,description:o.type,body:{kind:"custom",render:()=>e.jsx(ae,{inspection:o})}}],d=o.geometry;d&&a.push({id:"geometry",title:"Geometry",icon:B,order:h.geometry+1,description:`${d.triangles.toLocaleString()} triangles`,body:{kind:"custom",render:()=>e.jsx(de,{geometry:d})}}),o.materials.length>0&&a.push({id:"materials",title:"Materials",icon:w,order:h.materials,description:`${o.materials.length} slots`,body:{kind:"custom",render:()=>e.jsx(ce,{materials:o.materials})}});const c=o.skin;c&&a.push({id:"skin",title:"Skin",icon:F,order:h.rig,description:`${c.bones} bones`,body:{kind:"custom",render:()=>e.jsx(ue,{skin:c})}});const l=o.bone;return l&&a.push({id:"bone",title:"Bone",icon:U,order:h.rig+1,description:l.parent??"Skeleton root",body:{kind:"custom",render:()=>e.jsx(he,{bone:l})}}),a}const pe=V();function fe(){pe.ensure(n=>{n(y({match:Y,sections:(s,i)=>be(i)})),n(y({match:ee,sections:ge}))})}const _e="workspace.service";function We(){return fe(),()=>{}}export{_e as point,We as start};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/create-runtime-DBfUy0SO.js","assets/adapter-surface-Y37Nzcyw.js","assets/binding-Bmxqznjk.js","assets/root-stacking-BEd9ZvxC.js","assets/assets-BcrMQHRv.js","assets/loader-BTUKnX5Q.js","assets/KTX2Loader-CaqVE6nY.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/GLTFLoader-KeoruJgS.js","assets/BufferGeometryUtils-B22h7jo4.js","assets/setup-renderer-Cwkl1Ar6.js","assets/index-DHhMOs_s.js","assets/defaults-DKiBJCPN.js","assets/render-settings-DS5leCed.js","assets/render-features-rxbawsRb.js","assets/index-BRJMIUK0.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-0Lm0Nf1M.css","assets/seeded-random-BgCwIAAU.js","assets/debug-registry-P0_YQGWd.js","assets/loop-gate-report-N52EWFGD.js","assets/system-slot-E2mEdiih.js","assets/user-data-dHvLdpwM.js","assets/object-marks-DwvIEBOK.js","assets/performance-profiler-OwnXQX0M.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{y as v,z as R,a8 as _,M as s,bn as b,bo as A,au as I,bp as P,bq as S,br as M,bs as g,bt as y,bu as C,_ as E,bv as F}from"./index-BRJMIUK0.js";import{m as G}from"./capability-coverage-DZ-onC5j.js";import{r as $}from"./binding-resolver-dE0GnZT5.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-BnPFGLll.js";import"./native-debug-module-2_HVupdg.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-P0_YQGWd.js";import"./contract-system-adapters-Bic_7sev.js";import"./adapter-surface-Y37Nzcyw.js";import"./entry-adjudication-Dc18TIqT.js";import"./structural-signature-Dc7skRiy.js";import"./three.core-3arARmh6.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./events-156d8d12.esm-CYeuVCYr.js";import"./three.module-BLhyNg0e.js";import"./index-bQE2NA0D.js";import"./realm-services-CnY105XU.js";import"./canvas-entry-runtime-UNYuSfG0.js";import"./three-ingest-runtime-B7rtg3QE.js";import"./EffectComposer-BEAt0PtQ.js";import"./CopyShader-BzTUYzf6.js";import"./ShaderPass-DTnDQXm0.js";import"./Pass-D1MRT672.js";import"./CSS3DRenderer-BsAqfavI.js";import"./relative-path-guard-GiM7Lsz8.js";import"./react-root-BHA-cdrW.js";let u=null;function h(){return u!==null}function j(t,o){return t.selection?t:{...t,selection:{get:()=>[...o.shell.selectedEntityIds],set:e=>o.shell.selectMultiple(e)}}}function k(){const t=u;if(t){u=null,M(null),g(null),y(),t.store.shell.setPlayState("stopped");try{t.stop()}catch{}delete window.__vgaiModule,s.log("Module adapter mode stopped","adapter")}}async function D(t,o,e,i,r,l){const{createGameRuntime:m}=await E(async()=>{const{createGameRuntime:c}=await import("./create-runtime-DBfUy0SO.js").then(a=>a.e);return{createGameRuntime:c}},__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])),n=await $({...t,roots:[o]},e);return{session:await m({container:i,roots:n,width:r,height:l}),specs:n}}async function L(t,o,e,i){await P();const r=C();if(!r){s.error("Game container not mounted — cannot auto-mount module adapter","adapter");return}t.shell.setPlayState("playing"),s.log(`Mounting custom adapter module for world "${e.id}" (kind: ${e.surface})`,"adapter");const l=r.clientWidth||800,m=r.clientHeight||600,{session:n,specs:p}=await D(o,e,i,r,l,m),a=n.game.roots[0].mounted,f=p[0].adapter.id;u={store:t,stop:()=>n.stop()};let d;a.authoring?d=j(a.authoring,t):d=S(t.shell,`${f} (no authoring surface)`),M(d),g(a.systems??{}),t.shell.notifyIngestEdit(),y();const w=G(a);window.__vgaiModule={worldId:e.id,adapterId:f,reach:w}}async function gt(t){const o=await v().catch(()=>null);if(o&&R(o).length>0)return!1;const e=o?_(o)[0]:void 0;if(e===void 0||e.adapter.type!=="module")return!1;const i=I();if(!i)return s.error("Manifest declares a { module } world but no project is open — cannot auto-mount","adapter"),!0;try{await L(t,o,e,i.rootPath)}catch(r){s.error(`Manifest { module } auto-mount failed: ${r}`,"adapter"),b({worldId:e.id,kind:e.surface,identity:e.adapter.identity,message:A(r)})}return!0}F({id:"module",priority:2,mounted:h,playing:h,stop:k,instanceContainer:()=>null});export{L as enterModuleModeFromManifestRoot,k as exitModuleMode,h as isModuleModeActive,D as mountModuleRootRuntime,gt as tryManifestModuleRoute,j as withStoreSelection};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BRJMIUK0.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-0Lm0Nf1M.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{E as z,eI as me,fi as he,cv as A,cw as fe,fL as ge,fu as ye,fQ as ve,fR as be,fS as we,fT as Se,fU as Ce,fI as xe,bu as J,M as g,bp as Ee,km as _,_ as N,br as K,bt as X,au as Ie,j as Ae,bs as Pe}from"./index-BRJMIUK0.js";import{m as P}from"./capability-coverage-DZ-onC5j.js";import{n as ke}from"./after-paint-CB4bz1-e.js";import{BabylonAuthoringAdapter as Re}from"./babylon-authoring-adapter-C8mFMXSr.js";import{a as k,S as Y,s as Me,c as De,C as je,D as R,G as $e,B as _e,H as T,E as O,T as Te,j as q,k as Q,l as Z,r as ee,p as te,o as ne,U as Ge,K as se,u as Le}from"./active-ingest-DA426a81.js";import{c as Oe,a as Be}from"./json-history-resource-DwS10tqD.js";import{P as Fe}from"./pixi-authoring-adapter-BChknIdC.js";import{createLiveCanvasWriteTarget as We}from"./pixi-live-write-target-BjDsBQbp.js";import{a as Ne}from"./source-persistence-backend-CwLYVPXj.js";import{resolveCanvasPixiForEditor as He}from"./canvas-entry-runtime-UNYuSfG0.js";import{registerPresentedPixiApps as Ue,capturePixiDisplayObjectThumbnail as Ve}from"./canvas-preview-frames-C0QTagA3.js";import{p as ze}from"./contract-system-adapters-Bic_7sev.js";import{s as Je,d as Ke,f as Xe,b as re,g as Ye,e as ie,w as qe,j as Qe}from"./resolve-three-CVnMRHxw.js";import{createPhysics2DRegistry as Ze}from"./physics-registry-B2Jkp8e6.js";import{composePhysicsAdapters2D as et,createPhysicsAdapter2D as tt}from"./system-adapters-rIC8FSGP.js";import{s as nt}from"./mount-ingest-root-DYR0TMIt.js";import{landIngestBootInEdit as ae}from"./ingest-boot-viewport-DAt8WFSy.js";import{a as C}from"./jsx-runtime-DPjLkJKQ.js";import{b as st}from"./react-canvas-navigation-Cp3cOHJa.js";import{C as H,a as rt,b as it}from"./CanvasSceneViewport-C_mapCwC.js";import{R as at}from"./RootSelectionOverlay-CpaGluQu.js";import{e as ot,S as ct}from"./surface-state-1lTOi8FD.js";import{r as w}from"./index-nmcBqr7Y.js";import{b as dt,e as lt,g as ut}from"./registry-CaCdF63N.js";import"./index-CtzuWnCS.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CinJrH5C.js";import"./index-D_NuPfjr.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./game-contract-seams-BnPFGLll.js";import"./ingest-source-persistence-Dmdo-UBp.js";import"./index-SS9EugVg.js";import"./component-instance-root-B0C5oNEm.js";import"./user-data-Bpj7diUS.js";import"./workspace-arrangement-BdAlBwvd.js";import"./pixi-transform-channels-P4rvmusc.js";import"./debug-registry-P0_YQGWd.js";import"./dom-authoring-adapter-BrLU8IJ_.js";import"./react-world-authoring-adapter-DOjv2pYm.js";import"./board-guides-BEKPgD9M.js";import"./relative-import-specifier-BFKIWEWs.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-Dr4qvDpJ.js";import"./inference-diagnostics-xecGdohW.js";import"./writer-tw6EcuVO.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./three.core-3arARmh6.js";import"./three-state-DwFE3ay2.js";import"./editor-shell-store-ChLcVeNB.js";import"./output-pass-HurwNl0G.js";import"./three.module-BLhyNg0e.js";import"./Pass-D1MRT672.js";import"./editor-layers-BDJnAAzj.js";import"./entity-object-JmYMfLsx.js";import"./three-contract-Dkt6PmWY.js";import"./Toolbar-DkTHnQto.js";import"./transform-mode-request-DzD9aUNA.js";import"./TransientHint-BpDLhRLd.js";import"./eyedropper-session-bjPXnfeX.js";import"./layered-pick-kiQf53t5.js";import"./root-stacking-BEd9ZvxC.js";import"./react-story-board-GaXqr03H.js";import"./viewport-editor-controls-BYaAZ_Ku.js";function pt(t){if(typeof t?.game?.scene?.getScenes=="function")return t.game;const e=t?.Phaser?.GAMES;return Array.isArray(e)?e.find(n=>typeof n?.scene?.getScenes=="function")??null:null}function mt(t){const e=t?.__vgaiBabylon?.engines,n=Array.isArray(e)?e:t?.BABYLON?.Engine?.Instances;return Array.isArray(n)?[...n].reverse().find(s=>Array.isArray(s?.scenes)&&s.scenes.length>0)??null:null}function ht(t){return[0,0,Math.sin(t/2),Math.cos(t/2)]}function ft(t){return 2*Math.atan2(t[2],t[3])}function gt(t){return encodeURIComponent(t||"unnamed")}function yt(t){return Array.isArray(t.list)?t.list:[]}class vt{constructor(e,n){this.game=e,this.store=n}capabilities={transform:!0,inspectorFields:!0,persist:!1};provenance={source:"foreign",label:"live-only",detail:"Live Phaser scene/display lists projected directly — edits apply to native game objects for this session only."};persistence={...Oe(),destination:"live-only (not saved)"};indexed=new Map;listeners=new Set;refresh(){this.reindex();let e=0,n=0;for(const s of this.indexed.values())s.kind==="scene"?e++:n++;return{scenes:e,objects:n}}scenes(){const e=this.game.scene?.getScenes;if(typeof e!="function")return[];const n=e.call(this.game.scene,!0);return Array.isArray(n)?n:[]}reindex(){this.indexed.clear();for(const[e,n]of this.scenes().entries()){const s=n.sys?.settings?.key||`Scene ${e+1}`,r=`phaser:scene:${e}:${gt(s)}`,o=Array.isArray(n.children?.list)?n.children.list:[],a={id:r,label:s,role:"root",kind:"phaser-scene",typeLabel:"Phaser.Scene",parentId:null,childIds:[]};this.indexed.set(r,{kind:"scene",scene:n,node:a}),a.childIds=o.map((i,c)=>this.indexObject(i,r,`${e}/${c}`))}}indexObject(e,n,s){const r=e.type||e.constructor?.name||"GameObject",o=e.name||r,a=`phaser:object:${s}`,i={id:a,label:o,role:"entity",kind:`phaser-${r.toLowerCase()}`,typeLabel:r,parentId:n,childIds:[]};return this.indexed.set(a,{kind:"object",object:e,node:i}),i.childIds=yt(e).map((c,d)=>this.indexObject(c,a,`${s}/${d}`)),a}hierarchy={roots:()=>(this.reindex(),[...this.indexed.values()].filter(e=>e.kind==="scene").map(e=>e.node)),node:e=>(this.reindex(),this.indexed.get(e)?.node??null)};selection={get:()=>[...this.store.shell.selectedEntityIds],set:e=>{this.store.shell.selectMultiple(e),this.notify()}};transforms={dimensions:e=>(this.reindex(),this.indexed.get(e)?.kind==="object"?"2d":null),get:e=>{this.reindex();const n=this.indexed.get(e);if(!n||n.kind!=="object")return{position:[0,0,0],rotation:[0,0,0,1],scale:[1,1,1]};const s=n.object;return{position:[s.x??0,s.y??0,s.depth??0],rotation:ht(s.rotation??0),scale:[s.scaleX??1,s.scaleY??1,1]}},beginEdit:e=>{},apply:(e,n)=>{this.reindex();const s=this.indexed.get(e);!s||s.kind!=="object"||(s.object.x=n.position[0],s.object.y=n.position[1],s.object.depth=n.position[2],s.object.rotation=ft(n.rotation),s.object.scaleX=n.scale[0],s.object.scaleY=n.scale[1],this.notify())},endEdit:e=>{}};inspector={properties:e=>{this.reindex();const n=this.indexed.get(e);return n?n.kind==="scene"?[{path:"key",label:"Scene key",type:"string",readonly:!0}]:[{path:"type",label:"Type",type:"string",readonly:!0},{path:"name",label:"Name",type:"string"},{path:"active",label:"Active",type:"boolean"},{path:"visible",label:"Visible",type:"boolean"},{path:"alpha",label:"Alpha",type:"number"},{path:"depth",label:"Depth",type:"number"}]:[]},get:(e,n)=>{this.reindex();const s=this.indexed.get(e);if(s)return s.kind==="scene"?n==="key"?s.scene.sys?.settings?.key:void 0:n==="type"?s.object.type||s.object.constructor?.name:s.object[n]},set:(e,n,s)=>{this.reindex();const r=this.indexed.get(e);!r||r.kind!=="object"||n==="type"||(r.object[n]=s,this.notify())}};subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}dispose(){this.listeners.clear(),this.indexed.clear()}notify(){for(const e of this.listeners)e();this.store.shell.notifyIngestEdit()}}function bt(t){return We({physics:t.physics,persistence:Ne({history:t.history,writer:t.writer})})}function wt(t,e={}){const s=t.Application.prototype;let r=null,o=0;const a=[],i=Object.getOwnPropertyDescriptor(s,"render"),c=s.render;return Object.defineProperty(s,"render",{configurable:!0,writable:!0,value:function(...d){o++;const u=this.stage;if(!r&&u){const p={stage:u,renderer:this.renderer,app:this};if(e.accept?.(p)??!0){r=p;for(const f of a.splice(0))f(r)}}return c?.apply(this,d)}}),{get captured(){return r},getDrawCount(){return o},setPaused(d){const u=r?.app;u?.ticker&&(d?u.ticker.stop():u.ticker.start())},waitForCapture(d){const u=typeof d=="number"?{timeoutMs:d}:d??{},p=u.timeoutMs??1e4;return r?Promise.resolve(r):new Promise((f,x)=>{const y=Je({budgetMs:p,clock:u.visibility??Ke(),onExpire:()=>{const l=a.indexOf(S);l>=0&&a.splice(l,1),u.onWait?.(null),x(new Error(`pixi scene capture timed out after ${p}ms of VISIBLE time (${Math.round(y.elapsedHiddenMs())}ms browser-suspended, which is not counted because no frame can be presented) — the game never rendered, or it bundles its own (un-shared) copy of pixi.js.`))}}),S=l=>{y.cancel(),u.onWait?.(null),f(l)};a.push(S),u.onWait?.(y)})},uninstall(){i?Object.defineProperty(s,"render",i):c&&Object.defineProperty(s,"render",{configurable:!0,writable:!0,value:c})}}}const oe="IngestGame2DLoadError";class St extends Error{constructor(e,n){super(`pixi ingest: game "${e}" failed to load: ${n}`,{cause:n}),this.name=oe}}async function Ct(t,e,n={}){const s=wt(t,{...n.acceptCapture?{accept:n.acceptCapture}:{}});try{if(await e.load(),await n.preferStructuralRuntime?.())return s.uninstall(),null}catch(o){throw s.uninstall(),new St(e.id,o)}const r=n.captureTimeoutMs??e.captureTimeoutMs??8e3;try{return{stage:(await s.waitForCapture({timeoutMs:r,...n.onWait?{onWait:n.onWait}:{}})).stage,capture:s,setPaused:a=>s.setPaused(a),dispose:()=>s.uninstall()}}catch(o){throw s.uninstall(),new Error(`pixi ingest: game "${e.id}" rendered no capturable frame within ${r}ms: ${o}`)}}const xt=1500,Et=1e4;function It(t,e){const n=e.settleGraceMs??xt,s=e.deadlineMs??Et;let r=null,o=null;const a=i=>{e.isHeld()&&(r??=i,o===null&&e.currentScene()===t&&(o=i),e.render(),!(o!==null&&i-o>=n)&&(o===null&&i-r>=s||e.schedule(a)))};e.schedule(a)}function At(t){const e=k();if(e?.kind!=="canvas"||!e.session.adapter)return()=>{};const n=z()?.scenes;if(n&&me(n))return()=>{};const s=e.worldId;he({id:A,title:"Scene",kind:"world",workspaceRole:"authored-subject",provenance:{rootId:s},Content:t,closeable:!1,presentation:()=>({kind:"world",id:s})}),fe(A);const r=ge(s,A);return()=>{r(),ye(A,{discardDirty:!0})}}function Pt(){const t=z()?.scenes;if(!t?.default)return;const e=t.entries.find(r=>r.id===t.default),n=e?.source?.export??e?.id;return n?(Y()?.storiesFor("")??[]).find(r=>r.label===n||r.id===n)?.id:void 0}function kt({active:t,adapter:e,documentId:n,store:s,worldId:r,contractSceneId:o}){const a=w.useRef(null),c=w.useRef(ve()).current;w.useSyncExternalStore(s.shell.subscribe,s.shell.getSnapshot);const d=w.useSyncExternalStore(be,we),u=w.useSyncExternalStore(Se,Ce),p=k(),f=e.hierarchy.roots(),x=new Set(e.rects?.emptyContainers?.().map(l=>l.id)??[]),y=f.some(l=>!x.has(l.id)),S=ot({surface:"Ingest scene",rootIds:[r],phase:p?.kind==="canvas"&&p.worldId===r&&p.session.hostEl?"ready":"loading",content:p?.kind!=="canvas"||p.worldId!==r||!p.session.hostEl?"unknown":y?"present":"empty",readiness:d,failures:u});return w.useEffect(()=>xe(n,()=>({adapter:e,nodeId:[...s.shell.selectedEntityIds].find(l=>e.hierarchy.node(l))??null})),[e,n,s]),w.useEffect(()=>{const l=a.current;if(l)return st(l,c)},[c]),w.useEffect(()=>{if(!t)return;const l=a.current,v=k(),b=v?.kind==="canvas"?v.session.hostEl:void 0;if(!(!l||!b))return l.appendChild(b),()=>{const E=J();E&&b.parentElement===l&&E.appendChild(b)}},[t]),w.useEffect(()=>{if(!t)return;const l=o??Pt();if(!l)return;const v=Y();v&&v.goToScene(l)},[t,o]),C.jsxs("div",{ref:a,"data-testid":"world-document:ingest-canvas-scene","data-vgai-backdrop-color":t?H:void 0,"data-vgai-backdrop-policy":t?"dark-frost":void 0,style:{position:"absolute",inset:0,overflow:"hidden",pointerEvents:"auto",backgroundColor:H,touchAction:"none"},children:[C.jsx(rt,{view:c,documentId:n}),C.jsx(at,{adapter:e,view:c,transformModeAware:!0}),C.jsx(ct,{explanation:S,testId:"ingest-canvas-surface-status",style:{zIndex:20}}),C.jsx(it,{active:t,adapter:e,containerRef:a,view:c,documentId:n})]})}function ce(t){const e=k();if(e?.kind!=="canvas"||!e.session.adapter)return()=>{};const n=e.session.adapter,s=e.worldId;return At(o=>C.jsx(kt,{...o,adapter:n,store:t,worldId:s}))}function Rt(t,e){const{adapter:n}=t;if(n.type!=="ingest")throw new Error(`resolveIngest2DDescriptor: world "${t.id}" is not an { ingest } world.`);if(!t.entry)throw new Error(`resolveIngest2DDescriptor: world "${t.id}" has no \`entry\` — an ingest root mounts the game's own entry module.`);const s=Xe(e);return{id:t.id,name:t.id,description:t.description??"",...n.captureTimeoutMs!==void 0?{captureTimeoutMs:n.captureTimeoutMs}:{},load:re(s.entry(t.entry),n.contractShim===void 0?void 0:s.module(n.contractShim))}}function U(t,e){const n=ut(t,e),s=lt[n];if(!s)throw new Error(`canvas ingest discovery: "${t}"'s module "${e}" did not match any game module (looked for glob key "${n}").`);return s}function Mt({folderId:t,manifest:e,root:n}){const{adapter:s}=n;if(!n.entry)throw new Error(`canvas ingest discovery: "${t}" has no \`entry\` — an ingest root mounts the game's own entry module.`);return{...{id:n.id,name:e.name,description:n.description??"",...s.captureTimeoutMs!==void 0?{captureTimeoutMs:s.captureTimeoutMs}:{}},load:re(U(t,n.entry),s.contractShim===void 0?void 0:U(t,s.contractShim))}}let G=null;function Dt(){return G||(G=dt("canvas").map(Mt).sort((t,e)=>t.id.localeCompare(e.id))),G}function jt(t){return Dt().find(e=>e.id===t)}const $t="this game imports the host's pixi directly, in the editor's own realm";function de(t,e,n){const s=R()?.systems;let r=null;const{systems:o,renderDebug:a,debugCollisions:i}=qe({contractSystems:s,surface:"canvas",...n?{physics:n}:{},...e?{canvasRuntime:{renderer:e}}:{},setRenderPassHooks:c=>{r?.(),r=c?Qe(e,c):null}});Pe(o),g.log(s?`canvas ingest: "${t}" declares the vgai game contract — ${s.commands?.length??0} commands, ${s.state?.length??0} state providers`:`canvas ingest: "${t}" declares no vgai game contract — game.commands()/game.state() have nothing to answer and will refuse by naming that`,"ingest");for(const c of i)g.error(`canvas ingest: "${t}" — ${c}; it will refuse`,"ingest");return e&&g.log(a?`canvas ingest: "${t}" render debugging is live — the Frame debugger captures through the game's own Pixi renderer (draws are unattributed: Pixi's batcher merges display objects, so no display object is the author of a draw)`:`canvas ingest: "${t}" has no render-debug capability — its renderer exposes no real WebGL2 context, or no prerender/postrender runners to bracket`,"ingest"),{wiring:a,uninstall:()=>r?.()}}function _t(t,e){return e instanceof Error&&e.name===oe?`canvas ingest: game "${t}" never ran — its own modules failed to load, so nothing could render and there is no canvas runtime in the realm to recognize (${e})`:`canvas ingest: game "${t}" mounted no recognized canvas runtime — the host's pixi captured no frame, and the realm holds no Phaser game or Babylon.js engine on their own public registries either (${e})`}function Tt(t,e){const n=t?.canvas;return n instanceof Node&&e.contains(n)}function le(){return Ae(ze(R()?.systems,"canvas").bound.physics)}function L(t,e){const n=pt(e);if(n)return{runtime:"phaser",adapter:new vt(n,t),mechanism:"this game runs its own Phaser instance in the editor's own realm; the host reads that live game’s active scenes and display lists"};const s=mt(e);return s?{runtime:"babylon",adapter:new Re(s,t),mechanism:"this game runs its own Babylon.js engine in the editor's own realm; the host reads that live engine’s scenes and root nodes"}:null}function V(t,e,n,s,r){const o=r.adapter;o.refresh();const a=ie({primary:o,worldId:n,hostEl:s,store:t}),i=se(),c=()=>i?{loop:null,reason:"the same-realm loop gate holds this game’s scheduling, but no probe has measured that control on this route"}:{loop:null,reason:Ge},d=q(i?{setPaused:p=>{p?i.hold():i.release()}}:{pauseGap:`${r.runtime} exposes no host-controlled loop gate`});let u=()=>{};Q({kind:"canvas",session:{store:t,adapter:o,hostEl:s,lifecycle:d,loop:c,dispose:()=>{u(),o.dispose(),O(),s.remove()}},siblings:[],worldId:n}),u=ce(t),Z(()=>t.shell.playState==="playing"&&t.shell.activeViewportTab==="play"),K(a),de(e.name,void 0,le()),ae(),t.shell.notifyIngestEdit(),X(),ee({reach:P({authoring:a}),reachMechanism:r.mechanism,loop:c}),g.log(`canvas ingest: recognized ${r.runtime} in the realm and captured "${e.name}"`,"ingest"),te("__vgaiIngest2D",{gameId:n,...ne(a),runtime:r.runtime,get reflected(){return o.refresh()},...d.setPaused?{setPaused:d.setPaused}:{},reach:P({authoring:a}),adapter:a,store:t})}async function Gt(t,e,n){De(),await Ee();const s=J();if(!s){g.error("Game container not mounted — cannot ingest (canvas)","ingest");return}t.shell.setPlayState("playing"),g.log(`Ingesting unmodified PixiJS game: ${e.name}`,"ingest");const r=je(R());r.malformed!==null&&g.error(`Ingest game "${e.id}" ${r.malformed} — the host is measuring readiness instead.`,"ingest");const o=r.ready===null?"measured-wait":"contract-ready",a=r.ready===null?"measured":"declared";_({rootId:e.id,mechanism:o,source:a,state:"waiting"});const i=document.createElement("div");i.id="container",i.style.cssText=`position:absolute;inset:0;width:100%;height:100%;overflow:hidden;background:#000;${$e}`,s.appendChild(i),_e(i);{const{markGameCssScope:h}=await N(async()=>{const{markGameCssScope:j}=await import("./index-BRJMIUK0.js").then($=>$.tR);return{markGameCssScope:j}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]));h(i);const m=Ie();if(m){const{ensureScopedGameStyles:j}=await N(async()=>{const{ensureScopedGameStyles:$}=await import("./index-BRJMIUK0.js").then(pe=>pe.tS);return{ensureScopedGameStyles:$}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]));await j(m.rootPath)}}window.__vgaiMountCold=!0;const c=await He();let d;try{const h=await Ct(c,e,{...e.captureTimeoutMs!==void 0?{captureTimeoutMs:e.captureTimeoutMs}:{},acceptCapture:({renderer:m})=>Tt(m,i),onWait:m=>nt(e.id,m),preferStructuralRuntime:async()=>{const m=T();return await m.__vgaiBabylon?.ready,L(t,m)!==null}});if(h===null){const m=L(t,T());if(m){V(t,e,n,i,m);return}throw new Error(`canvas ingest: game "${e.id}" reported a structural runtime, but it disappeared before dispatch`)}d=h}catch(h){const m=L(t,T());if(m){V(t,e,n,i,m);return}throw O(),i.remove(),_({rootId:e.id,mechanism:o,source:a,state:"failed",failure:r.ready===null?"no-readiness-declaration":"declared-ready-never-resolved"}),new Error(_t(e.id,h))}const u=d.stage;for(let h=0;h<90&&(u.children?.length??0)===0;h++)await ke();const p=d.capture.captured?.app,f=p?.canvas;f&&(Ye(f),f.parentElement!==i&&i.appendChild(f));const x=Ue(p?[p]:[]),y=le(),S=tt(Ze()),l=y?et([y,S]):S,v=Te(R(),{onSwitchAccepted:h=>It(h,{isHeld:()=>!Le(),currentScene:()=>v?.active("")??null,render:()=>p?.render(),schedule:m=>requestAnimationFrame(m)})}),b=new Fe(u,t,{pixi:c,journal:Be(n),target:bt({physics:l,history:t.shell.projectHistory}),...v?{stories:v}:{},surface:()=>p?.canvas??null,capturePreview:(h,m)=>Ve(h,{...m,pixi:c})}),E=b.refresh(),I=ie({primary:b,worldId:n,hostEl:i,store:t});let M=null,B=()=>{};const F=se(),W=q({setPaused:h=>{d.setPaused(h),h?F?.hold():F?.release()}});Q({kind:"canvas",session:{store:t,adapter:b,hostEl:i,lifecycle:W,dispose:()=>{B(),M?.uninstall(),M?.wiring?.dispose(),x(),d.dispose(),O(),i.remove()}},siblings:[],worldId:n}),B=ce(t),Z(()=>t.shell.playState==="playing"&&t.shell.activeViewportTab==="play"),K(I),M=de(e.name,d.capture.captured?.renderer,y?l:null),ae(),t.shell.notifyIngestEdit(),X();let D="measured";if(r.ready)try{await r.ready(),D="declared"}catch(h){g.error(`Ingest game "${e.id}" declared \`window.vgaiGame.ready\` and it REJECTED (${String(h)}) — the frame was already captured, so the host fell back to the measured settle wait. This root now reports readiness as measured.`,"ingest")}_({rootId:e.id,mechanism:D==="declared"?"contract-ready":"measured-wait",source:D,state:"ready"}),ee({reach:P({authoring:I}),reachMechanism:$t,loop:()=>({loop:null,reason:"the host stops and starts the captured PixiJS Application ticker directly, but no probe has measured whether that holds everything this game schedules"})}),g.log(`pixi ingest: captured "${e.name}" (${E.count} nodes, ${E.sprites} sprites)`,"ingest"),te("__vgaiIngest2D",{gameId:n,...ne(I),drawCount:()=>d.capture.getDrawCount(),get reflected(){return b.refresh()},setPaused:W.setPaused,reach:P({authoring:I}),adapter:I,store:t})}function ue(t,e,n){return Me(()=>Gt(t,e,n))}async function Kn(t,e,n){const s=Rt(e,n);return ue(t,s,e.id)}async function Xn(t,e){const n=jt(e);if(!n){g.error(`Unknown pixi ingest game: ${e}`,"ingest");return}return ue(t,n,e)}export{ue as mountCanvasIngestRoot,Xn as mountCanvasIngestRootById,Kn as mountCanvasIngestRootFromManifest};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/create-runtime-DBfUy0SO.js","assets/adapter-surface-Y37Nzcyw.js","assets/binding-Bmxqznjk.js","assets/root-stacking-BEd9ZvxC.js","assets/assets-BcrMQHRv.js","assets/loader-BTUKnX5Q.js","assets/KTX2Loader-CaqVE6nY.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/GLTFLoader-KeoruJgS.js","assets/BufferGeometryUtils-B22h7jo4.js","assets/setup-renderer-Cwkl1Ar6.js","assets/index-DHhMOs_s.js","assets/defaults-DKiBJCPN.js","assets/render-settings-DS5leCed.js","assets/render-features-rxbawsRb.js","assets/index-BRJMIUK0.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-0Lm0Nf1M.css","assets/seeded-random-BgCwIAAU.js","assets/debug-registry-P0_YQGWd.js","assets/loop-gate-report-N52EWFGD.js","assets/system-slot-E2mEdiih.js","assets/user-data-dHvLdpwM.js","assets/object-marks-DwvIEBOK.js","assets/performance-profiler-OwnXQX0M.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{bp as I,M as s,_ as y,br as v,bs as w,bt as R,bu as E}from"./index-BRJMIUK0.js";import{m as j}from"./capability-coverage-DZ-onC5j.js";import{r as G}from"./binding-resolver-dE0GnZT5.js";import{s as H,j as A,k as P,l as b,p as D,m as L,c as O,r as N,n as C,o as M}from"./active-ingest-DA426a81.js";import{a as T}from"./json-history-resource-DwS10tqD.js";import{D as V}from"./dom-authoring-adapter-BrLU8IJ_.js";import{landIngestBootInEdit as k}from"./ingest-boot-viewport-DAt8WFSy.js";import{b as x}from"./registry-CaCdF63N.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-BnPFGLll.js";import"./native-debug-module-2_HVupdg.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-P0_YQGWd.js";import"./contract-system-adapters-Bic_7sev.js";import"./adapter-surface-Y37Nzcyw.js";import"./entry-adjudication-Dc18TIqT.js";import"./structural-signature-Dc7skRiy.js";import"./three.core-3arARmh6.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./events-156d8d12.esm-CYeuVCYr.js";import"./three.module-BLhyNg0e.js";import"./index-bQE2NA0D.js";import"./realm-services-CnY105XU.js";import"./canvas-entry-runtime-UNYuSfG0.js";import"./three-ingest-runtime-B7rtg3QE.js";import"./EffectComposer-BEAt0PtQ.js";import"./CopyShader-BzTUYzf6.js";import"./ShaderPass-DTnDQXm0.js";import"./Pass-D1MRT672.js";import"./CSS3DRenderer-BsAqfavI.js";import"./relative-path-guard-GiM7Lsz8.js";import"./react-root-BHA-cdrW.js";import"./ingest-source-persistence-Dmdo-UBp.js";import"./react-world-authoring-adapter-DOjv2pYm.js";import"./board-guides-BEKPgD9M.js";import"./relative-import-specifier-BFKIWEWs.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-Dr4qvDpJ.js";import"./inference-diagnostics-xecGdohW.js";import"./writer-tw6EcuVO.js";function F({folderId:t,manifest:e,root:o}){if(!o.entry)throw new Error(`dom ingest discovery: "${t}" has no \`entry\` — a dom ingest root's \`entry\` must point at the host-shim module in the same folder (D-N2).`);return{folderId:t,manifest:e,worldId:o.id}}let f=null;function W(){return f||(f=x("dom").map(F).sort((t,e)=>t.folderId.localeCompare(e.folderId))),f}function q(t){return W().find(e=>e.folderId===t)}function z(t){return typeof __VGAI_ENGINE_ROOT__!="string"||!__VGAI_ENGINE_ROOT__?void 0:`${__VGAI_ENGINE_ROOT__.endsWith("/")?__VGAI_ENGINE_ROOT__.slice(0,-1):__VGAI_ENGINE_ROOT__}/packages/editor/src/ingest/games/${t}`}const B="this world mounts in the host's native React runtime, so the editor is limited only by what its authoring adapter provides";function S(t){return{reach:j({authoring:t}),reachMechanism:B,loop:L}}async function J(t,e){const o=q(e);if(!o){s.error(`Unknown react ingest game: ${e}`,"ingest");return}const u=z(e);if(!u){s.error(`React ingest "${e}": no __VGAI_ENGINE_ROOT__ available to resolve its entry`,"ingest");return}await I();const i=E();if(!i){s.error("Game container not mounted — cannot ingest (react)","ingest");return}O(),t.shell.setPlayState("playing"),s.log(`Ingesting unmodified native-React game: ${o.manifest.name}`,"ingest"),window.__vgaiMountCold=!0;const{createGameRuntime:g}=await y(async()=>{const{createGameRuntime:r}=await import("./create-runtime-DBfUy0SO.js").then(h=>h.e);return{createGameRuntime:r}},__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])),l=await G(o.manifest,u),d=i.clientWidth,_=i.clientHeight,a=await g({container:i,roots:l,width:d,height:_}),m=a.game.roots[0].reactRoot(),n=new V(m,t,{journal:T(e)}),c=A({setPaused:r=>r?a.game.play.pause():a.game.play.resume()});P({kind:"dom",session:{store:t,lifecycle:c,stop:()=>a.stop(),adapter:n},siblings:[],worldId:e}),b(()=>t.shell.playState==="playing"&&t.shell.activeViewportTab==="play"),v(n),w({}),k(),t.shell.notifyIngestEdit(),R();const p=S(n);N(p),D("__vgaiIngestReact",{gameId:e,worldId:o.worldId,...M(n),noAuthoring:!1,reach:p.reach,domEvidence:()=>C(m,n),setPausedPresent:typeof c.setPaused=="function"})}async function xt(t,e,o,u){await I();const i=E();if(!i){s.error("Game container not mounted — cannot ingest (react)","ingest");return}O(),t.shell.setPlayState("playing"),s.log(`Ingesting unmodified native-React game (external folder): ${o.id}`,"ingest"),window.__vgaiMountCold=!0;const{createGameRuntime:g}=await y(async()=>{const{createGameRuntime:r}=await import("./create-runtime-DBfUy0SO.js").then(h=>h.e);return{createGameRuntime:r}},__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])),l=await G({...e,roots:[o]},u),d=i.clientWidth,_=i.clientHeight,a=await g({container:i,roots:l,width:d,height:_}),m=a.game.roots[0].reactRoot(),n=new V(m,t,{journal:T(o.id)}),c=A({setPaused:r=>r?a.game.play.pause():a.game.play.resume()});P({kind:"dom",session:{store:t,lifecycle:c,stop:()=>a.stop(),adapter:n},siblings:[],worldId:o.id}),b(()=>t.shell.playState==="playing"&&t.shell.activeViewportTab==="play"),v(n),w({}),k(),t.shell.notifyIngestEdit(),R();const p=S(n);N(p),D("__vgaiIngestReact",{worldId:o.id,...M(n),noAuthoring:!1,reach:p.reach,domEvidence:()=>C(m,n),setPausedPresent:typeof c.setPaused=="function"})}function Ft(t,e){return H(()=>J(t,e))}export{Ft as mountDomIngestRoot,xt as mountDomIngestRootFromManifest};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mount-canvas-ingest-root-D1z9i5B3.js","assets/index-BRJMIUK0.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-0Lm0Nf1M.css","assets/capability-coverage-DZ-onC5j.js","assets/game-contract-seams-BnPFGLll.js","assets/after-paint-CB4bz1-e.js","assets/babylon-authoring-adapter-C8mFMXSr.js","assets/json-history-resource-DwS10tqD.js","assets/source-persistence-backend-CwLYVPXj.js","assets/ingest-source-persistence-Dmdo-UBp.js","assets/active-ingest-DA426a81.js","assets/contract-system-adapters-Bic_7sev.js","assets/pixi-authoring-adapter-BChknIdC.js","assets/index-SS9EugVg.js","assets/component-instance-root-B0C5oNEm.js","assets/user-data-Bpj7diUS.js","assets/workspace-arrangement-BdAlBwvd.js","assets/pixi-transform-channels-P4rvmusc.js","assets/pixi-live-write-target-BjDsBQbp.js","assets/canvas-entry-runtime-UNYuSfG0.js","assets/debug-registry-P0_YQGWd.js","assets/canvas-preview-frames-C0QTagA3.js","assets/resolve-three-CVnMRHxw.js","assets/dom-authoring-adapter-BrLU8IJ_.js","assets/react-world-authoring-adapter-DOjv2pYm.js","assets/board-guides-BEKPgD9M.js","assets/relative-import-specifier-BFKIWEWs.js","assets/story-arg-descriptors-Ek86ExX7.js","assets/inspect-Dr4qvDpJ.js","assets/inference-diagnostics-xecGdohW.js","assets/writer-tw6EcuVO.js","assets/webgl-frame-capture-DdJkM2mi.js","assets/three.core-3arARmh6.js","assets/physics-registry-B2Jkp8e6.js","assets/system-adapters-rIC8FSGP.js","assets/ingest-boot-viewport-DAt8WFSy.js","assets/react-canvas-navigation-Cp3cOHJa.js","assets/CanvasSceneViewport-C_mapCwC.js","assets/RootSelectionOverlay-CpaGluQu.js","assets/eyedropper-session-bjPXnfeX.js","assets/layered-pick-kiQf53t5.js","assets/root-stacking-BEd9ZvxC.js","assets/react-story-board-GaXqr03H.js","assets/viewport-editor-controls-BYaAZ_Ku.js","assets/Toolbar-DkTHnQto.js","assets/transform-mode-request-DzD9aUNA.js","assets/TransientHint-BpDLhRLd.js","assets/surface-state-1lTOi8FD.js","assets/registry-CaCdF63N.js","assets/three-state-DwFE3ay2.js","assets/editor-shell-store-ChLcVeNB.js","assets/output-pass-HurwNl0G.js","assets/three.module-BLhyNg0e.js","assets/Pass-D1MRT672.js","assets/editor-layers-BDJnAAzj.js","assets/entity-object-JmYMfLsx.js","assets/three-contract-Dkt6PmWY.js","assets/mount-dom-ingest-root-BAmmNxlm.js","assets/binding-resolver-dE0GnZT5.js","assets/native-debug-module-2_HVupdg.js","assets/native-entry-surface-BE8LJNdu.js","assets/adapter-surface-Y37Nzcyw.js","assets/entry-adjudication-Dc18TIqT.js","assets/structural-signature-Dc7skRiy.js","assets/events-156d8d12.esm-CYeuVCYr.js","assets/index-bQE2NA0D.js","assets/realm-services-CnY105XU.js","assets/three-ingest-runtime-B7rtg3QE.js","assets/EffectComposer-BEAt0PtQ.js","assets/CopyShader-BzTUYzf6.js","assets/ShaderPass-DTnDQXm0.js","assets/CSS3DRenderer-BsAqfavI.js","assets/relative-path-guard-GiM7Lsz8.js","assets/react-root-BHA-cdrW.js","assets/mount-three-ingest-root-DVbACDUy.js","assets/scene-framing-BQt72ZCw.js","assets/mount-readiness-Ds0HvvLH.js","assets/loop-gate-report-N52EWFGD.js","assets/three-authoring-adapter-htbnVej2.js","assets/three-projection-core-CG01r5Ta.js","assets/three-TCuY32m_.js","assets/body-marks-RKb_LTwL.js","assets/user-data-dHvLdpwM.js","assets/object-marks-DwvIEBOK.js","assets/structural-ids-Br2zjINh.js","assets/object3d-authoring-subject-BDrxd1GA.js","assets/rapier-physics-adapter-CaZqWLu0.js","assets/r3f-physics-binding-DzrbpqjM.js","assets/renderer-ownership-BovSEcLv.js","assets/scene-capture-0a-bTjT8.js","assets/ingest-siblings-BtiEXLnh.js","assets/mounted-authoring-Clftxx0x.js","assets/crash-null-boundary-v3a0uEgw.js","assets/module-mode-BH2R93XP.js","assets/deferred-ingest-play-BdR4qGk6.js","assets/edit-mode-authoring-DeCxPcHM.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{gJ as k,au as d,_ as s,y as C,gK as S,M as u,gL as L,bo as c,bu as g,z as T,bn as y,ay as I,gM as F,br as D,go as O,bt as j,gN as V}from"./index-BRJMIUK0.js";import{q as $,t as x,g as _,u as W,a as z,v as N,c as B,w as K,x as q,i as G,y as H}from"./active-ingest-DA426a81.js";import{o as J}from"./three-state-DwFE3ay2.js";let M=null;const Q=new Set;function U(){for(const t of Q)t()}function gt(t,n){M=n?{worldId:t,window:n}:null,U(),k()}function X(){const t=M;if(!t)return null;const n=t.window.isHidden(),o=t.window.isSuspended(),e=t.window.suspensionReason();return{worldId:t.worldId,budgetMs:t.window.budgetMs,elapsedVisibleMs:Math.round(t.window.elapsedVisibleMs()),hidden:n,suspended:o,suspensionReason:e,reason:e==="hidden"?"waiting for first visible frame — tab is hidden (a hidden tab cannot render, so the capture window is parked, not counting down; bring the tab to the foreground)":e==="unfocused"?"waiting for the browser to resume frame presentation — the editor window is unfocused (WebKit can suspend requestAnimationFrame in this state, so the capture window is parked; focus the editor window)":e==="page-suspended"?"waiting for the browser to restore the suspended editor page — the capture window is parked, not counting down":o?"waiting for the browser to resume frame presentation — the capture window is parked":"waiting for the game's first rendered frame"}}function R(){const t=z();if(!t)return null;const n=t.kind==="three"?t.session.mount:void 0,o=t.kind==="canvas"?t.session.loop?.():void 0,e=$(n?.realmLoopVerdict?.())??o?.loop??null,r=n?.realmLoopVerdict?.()?.reason??o?.reason??null;return{worldId:t.worldId,kind:t.kind,playing:W(),loop:e,loopReason:r,canStep:_()?.canStep??!1,coverage:x()}}const Y=()=>s(()=>import("./mount-canvas-ingest-root-D1z9i5B3.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64])),Z=()=>s(()=>import("./mount-dom-ingest-root-BAmmNxlm.js"),__vite__mapDeps([65,1,2,3,4,5,6,7,8,9,10,11,12,66,67,68,28,19,69,70,71,40,39,72,60,73,74,27,75,76,77,78,61,79,80,81,18,17,15,31,32,33,34,35,36,37,38,43,56])),tt=()=>s(()=>import("./mount-three-ingest-root-DVbACDUy.js"),__vite__mapDeps([82,11,1,2,3,4,5,6,7,8,9,10,12,18,17,19,83,62,24,40,30,15,31,32,33,34,35,36,37,38,28,39,22,23,75,60,76,77,78,61,79,84,85,86,16,87,88,63,64,51,89,90,91,92,93,94,95,96,97,43,56,57,58,59]));function b(...t){return Y().then(n=>n.mountCanvasIngestRootFromManifest(...t))}function v(...t){return Z().then(n=>n.mountDomIngestRootFromManifest(...t))}function P(...t){return tt().then(n=>n.mountThreeIngestRootFromManifest(...t))}J(t=>{j()});V(()=>({ingest:R(),ingestCaptureWait:X()}));function l(t,n){u.error(`Ingest mount failed for "${n.worldId}" (${n.identity}): ${n.message}`,"ingest"),B(),N(),t.shell.setPlayState("stopped"),y(n),t.shell.notifyIngestEdit()}async function et(){try{return await C()}catch(t){return S(t)||u.error(`Ingest routing: this project's ${L} could not be read, so no root was mounted from it — ${c(t)}`,"ingest"),null}}function f(t){return T(t)}function p(t){const n=t.map(e=>`"${e.id}"`).join(", "),o=`a composite manifest declares exactly ONE ingest world in this slice — found ${t.length}: ${n}.`;u.error(`Manifest composite ingest route: ${o}`,"ingest");for(const e of t)y({worldId:e.id,kind:e.surface,identity:e.adapter.identity,message:o})}async function w(t,n,o,e,r){const{mountIngestSiblings:a}=await s(async()=>{const{mountIngestSiblings:E}=await import("./ingest-siblings-BtiEXLnh.js");return{mountIngestSiblings:E}},__vite__mapDeps([98,1,2,3,4,5,6,7,8,9,10,99,63,23,24,64,20,21,16,17,22,15,25,26,27,28,100,74,75,60,40,76,77,78,61,79,81,31,32,33,34,35,36,37,38,41,42,86,87,62,88,51,89,90,91,92,93,94,95,101,11,12,66,67,68,19,69,70,71,39,72,73,80])),i=await a(t,n,o,e,r);return K(i),i}function m(t,n,o){if(o.length===0)return;const e=O();if(!e)return;const a=[...e instanceof I?e.childAdapters().map(i=>({worldId:i.worldId,kind:i.kind,adapter:i.adapter,role:i.role,zOrder:i.zOrder,...i.label!==void 0?{label:i.label}:{},...i.parentRootId!==void 0?{parentRootId:i.parentRootId}:{}})):[{worldId:n.id,kind:n.surface,adapter:e}],...o.map(i=>({worldId:i.worldId,kind:F(t,i.worldId)?.surface??"unknown",adapter:i.authoring}))];D(new I(a))}async function nt(t,n){if(!n)return!1;const o=f(n);if(o.length===0)return!1;if(o.length>1)return p(o),!0;const e=o[0];if(e.adapter.identity!=="ingest-three")return!1;const r=d();if(!r)return u.error("Manifest declares an ingest-three world but no project is open — cannot auto-ingest","ingest"),!0;try{await P(t,e,r.rootPath);const a=g();if(a){const i=await w(n,e.id,a,r.rootPath,t);m(n,e,i)}}catch(a){l(t,{worldId:e.id,kind:e.surface,identity:e.adapter.identity,message:c(a)})}return!0}async function ot(t,n){if(!n)return!1;const o=f(n);if(o.length===0)return!1;if(o.length>1)return p(o),!0;const e=o[0];if(e.adapter.identity!=="ingest-pixi")return!1;const r=d();if(!r)return u.error("Manifest declares an ingest-pixi world but no project is open — cannot auto-ingest","ingest"),!0;try{await b(t,e,r.rootPath);const a=g();if(a){const i=await w(n,e.id,a,r.rootPath,t);m(n,e,i)}}catch(a){l(t,{worldId:e.id,kind:e.surface,identity:e.adapter.identity,message:c(a)})}return!0}async function rt(t,n){if(!n)return!1;const o=f(n);if(o.length===0)return!1;if(o.length>1)return p(o),!0;const e=o[0];if(e.adapter.identity!=="ingest-react")return!1;const r=d();if(!r)return u.error("Manifest declares an ingest-react world but no project is open — cannot auto-ingest","ingest"),!0;try{await v(t,n,e,r.rootPath);const a=g();if(a){const i=await w(n,e.id,a,r.rootPath,t);m(n,e,i)}}catch(a){l(t,{worldId:e.id,kind:e.surface,identity:e.adapter.identity,message:c(a)})}return!0}function it(t){return at(t,()=>st(t))}const h=new WeakMap;function at(t,n){let o=h.get(t);o||(o=new Map,h.set(t,o));const e=d()?.rootPath??"",r=o.get(e);if(r)return r;const a=n();return o.set(e,a),a}async function A(t){const{tryManifestModuleRoute:n}=await s(async()=>{const{tryManifestModuleRoute:e}=await import("./module-mode-BH2R93XP.js");return{tryManifestModuleRoute:e}},__vite__mapDeps([101,1,2,3,4,5,6,7,8,9,10,11,12,66,67,68,28,19,69,70,71,40,39,72,60,73,74,27,75,76,77,78,61,79,80,81]));if(await n(t))return;const o=await et();await nt(t,o)||await ot(t,o)||await rt(t,o)}async function st(t){const{deferredIngestPlayActive:n,ingestMountIsDeferredToPlay:o}=await s(async()=>{const{deferredIngestPlayActive:e,ingestMountIsDeferredToPlay:r}=await import("./deferred-ingest-play-BdR4qGk6.js");return{deferredIngestPlayActive:e,ingestMountIsDeferredToPlay:r}},__vite__mapDeps([102,1,2,3,4,5,6,7,8,9,10,103,18,12,11,17,19]));if(await o()){if(n())return;const{landIngestBootInEdit:e}=await s(async()=>{const{landIngestBootInEdit:r}=await import("./ingest-boot-viewport-DAt8WFSy.js");return{landIngestBootInEdit:r}},__vite__mapDeps([43,1,2,3,4,5,6,7,8,9,10,18,12,11,17,19]));e();return}await A(t)}const lt=Object.freeze(Object.defineProperty({__proto__:null,activeIngestKind:q,autoLaunchIngest:it,getIngestPlayControl:_,ingestStatusFacet:R,isIngestActive:G,launchIngestRoutes:A,mountCanvasIngestRootFromManifest:b,mountDomIngestRootFromManifest:v,mountThreeIngestRootFromManifest:P,unmountThreeIngestRoot:H},Symbol.toStringTag,{value:"Module"}));export{it as a,lt as m,gt as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{assertNever as u}from"./adapter-surface-Y37Nzcyw.js";import{a8 as c,a7 as f}from"./index-BRJMIUK0.js";import{c as l}from"./create-runtime-DBfUy0SO.js";import{m as h}from"./debug-bridge-D3_-EgRE.js";import{g}from"./debug-registry-P0_YQGWd.js";import{R as y}from"./seeded-random-BgCwIAAU.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"./binding-Bmxqznjk.js";import"./root-stacking-BEd9ZvxC.js";import"./assets-BcrMQHRv.js";import"./loader-BTUKnX5Q.js";import"./KTX2Loader-CaqVE6nY.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./setup-renderer-Cwkl1Ar6.js";import"./index-DHhMOs_s.js";import"./defaults-DKiBJCPN.js";import"./render-settings-DS5leCed.js";import"./render-features-rxbawsRb.js";import"./loop-gate-report-N52EWFGD.js";import"./system-slot-E2mEdiih.js";import"./user-data-dHvLdpwM.js";import"./object-marks-DwvIEBOK.js";import"./performance-profiler-OwnXQX0M.js";import"./play-mode-DICV4cKP.js";import"./adapter-runtime-bindings-4cmsRvRh.js";import"./native-debug-module-2_HVupdg.js";import"./native-entry-surface-BE8LJNdu.js";import"./contract-system-adapters-Bic_7sev.js";import"./game-contract-seams-BnPFGLll.js";import"./game-audio-CaGKzia4.js";import"./game-network-Ct2FQYmu.js";import"./index-OZVqp6xS.js";import"./index-Da9JhEvW.js";import"./rapier-physics-adapter-CaZqWLu0.js";import"./events-156d8d12.esm-CYeuVCYr.js";import"./index-bQE2NA0D.js";import"./live-project-verbs-C3LzprCe.js";import"./capability-coverage-DZ-onC5j.js";import"./edit-mode-authoring-DeCxPcHM.js";import"./json-history-resource-DwS10tqD.js";import"./binding-resolver-dE0GnZT5.js";import"./entry-adjudication-Dc18TIqT.js";import"./structural-signature-Dc7skRiy.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./realm-services-CnY105XU.js";import"./canvas-entry-runtime-UNYuSfG0.js";import"./three-ingest-runtime-B7rtg3QE.js";import"./EffectComposer-BEAt0PtQ.js";import"./CopyShader-BzTUYzf6.js";import"./ShaderPass-DTnDQXm0.js";import"./Pass-D1MRT672.js";import"./CSS3DRenderer-BsAqfavI.js";import"./relative-path-guard-GiM7Lsz8.js";import"./react-root-BHA-cdrW.js";import"./editor-presentation-activity-C7SNSmTd.js";import"./active-ingest-DA426a81.js";import"./ingest-source-persistence-Dmdo-UBp.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-vgxsTyj4.js";import"./mounted-authoring-Clftxx0x.js";import"./entity-object-JmYMfLsx.js";import"./user-data-Bpj7diUS.js";import"./workspace-arrangement-BdAlBwvd.js";import"./three-contract-Dkt6PmWY.js";import"./three-TCuY32m_.js";import"./editor-layers-BDJnAAzj.js";import"./component-instance-root-B0C5oNEm.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./three-authoring-adapter-htbnVej2.js";import"./source-persistence-backend-CwLYVPXj.js";import"./three-projection-core-CG01r5Ta.js";import"./body-marks-RKb_LTwL.js";import"./structural-ids-Br2zjINh.js";import"./object3d-authoring-subject-BDrxd1GA.js";import"./r3f-physics-binding-DzrbpqjM.js";import"./deferred-ingest-play-BdR4qGk6.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-DOjv2pYm.js";import"./board-guides-BEKPgD9M.js";import"./relative-import-specifier-BFKIWEWs.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-Dr4qvDpJ.js";import"./inference-diagnostics-xecGdohW.js";import"./writer-tw6EcuVO.js";import"./three-state-DwFE3ay2.js";import"./editor-shell-store-ChLcVeNB.js";import"./output-pass-HurwNl0G.js";import"./viewport-door-Bj_ZIP85.js";function R(e){if(e.determinism?.seededRandom!==!0)return;const t=e.url?v(e.url):void 0;return e.explicitSeed??t??e.determinism.defaultSeed}function v(e){const t=new URLSearchParams(e.search).get(y);if(t===null||t==="")return;const r=Number(t);return Number.isFinite(r)?r:void 0}function b(){return typeof window<"u"}function E(e){if(typeof e!="object"||e===null)return!1;if(Array.isArray(e.deferredConfigurationKinds))return!0;const t=e.roots;return!Array.isArray(t)||t.length===0?!1:t.every(r=>{if(typeof r!="object"||r===null)return!1;const i=r.adapter;if(typeof i!="object"||i===null)return!1;const o=i.type;return o==="builtin"||o==="module"||o==="ingest"})}function M(e){return E(e)?e:f(e,{configurationKinds:"defer"})}function $(e,t){if(t?.adapter)return t.adapter;throw e.adapter.type==="module"?new Error(`mountManifestRoots: world "${e.id}" (three) declares a { module } adapter ("${e.adapter.module}") — mountManifestRoots never imports an arbitrary module path itself (no \`/@fs/\`, no dev server). Import the module yourself and supply the constructed adapter via entries["${e.id}"] = { kind: 'three', adapter }.`):e.adapter.type==="ingest"?new Error(`mountManifestRoots: world "${e.id}" (three) declares an { ingest } adapter — captured ingest roots require the editor's dev-server-backed mount machinery (an EditorStore plus in-realm scene capture, see resolveIngestDescriptor + mountThreeIngestRootFromManifest) and are not supported by mountManifestRoots (no porting aids, no hosted ingest routes).`):e.entry!==void 0?new Error(`mountManifestRoots: world "${e.id}" (three) declares \`entry\` "${e.entry}" — supply entries["${e.id}"] = { kind: 'three', adapter } (for a default-exported world, the editor builds it from the entry module with \`resolveR3FEntryAdapterForEditor\`). Got ${t===void 0?"no entry at all":"an entry with no `adapter`"}.`):new Error(`mountManifestRoots: world "${e.id}" is default-three with no \`entry\` — this should have been rejected by manifest validation.`)}function w(e,t){if(t?.adapter)return t.adapter;throw new Error(`mountManifestRoots: world "${e.id}" (canvas) has no entries["${e.id}"] — a canvas world always needs a caller-supplied, already-constructed adapter (entries["${e.id}"] = { kind: 'canvas', adapter }, constructed from your own already-imported pixi module graph) — mountManifestRoots never value-imports pixi.js (mirrors create-runtime.ts's own pixi-free-core discipline).`)}function k(e,t){if(t?.adapter)return t.adapter;throw new Error(`mountManifestRoots: world "${e.id}" (react) has no entries["${e.id}"] — a react world always needs a caller-supplied, already-constructed \`RootAdapter<'dom'>\` (entries["${e.id}"] = { kind: 'dom', adapter }, mounting via your own already-imported react-dom \`createRoot\`) — mountManifestRoots never value-imports react/react-dom (mirrors create-runtime.ts's own react-free-core discipline).`)}function A(e,t){if(t!==void 0&&t.kind!==e.surface)throw new Error(`mountManifestRoots: entries["${e.id}"] declares kind "${t.kind}" but the manifest's root "${e.id}" uses surface "${e.surface}" — fix the entries key (or the manifest) so the two agree.`);const r={id:e.id,zOrder:e.zOrder,pausable:e.pausable,...t?.declaration===void 0?{}:{declaration:{root:e,...t.declaration}}};return e.surface==="three"?{...r,kind:"three",adapter:$(e,t)}:e.surface==="canvas"?{...r,kind:"canvas",adapter:w(e,t)}:e.surface==="dom"?{...r,kind:"dom",adapter:k(e,t)}:u(e.surface,"mountManifestRoots")}async function vt(e){const t=M(e.manifest),r=c(t);if(r.length===0)throw new Error("mountManifestRoots: manifest declares no roots — nothing to mount.");const i=e.entries??{},o=r.map(n=>A(n,i[n.id])),p=e.seedUrl??(b()?window.location:void 0),d=R({determinism:t.determinism,explicitSeed:e.seed,url:p}),a=await l({container:e.container,roots:o,width:e.width??t.resolution?.width,height:e.height??t.resolution?.height,headless:e.headless,...t.rendering===void 0?{}:{antialias:t.rendering.antialias},seed:d,playtest:e.playtest});t.determinism?.seededRandom;const s=g(a.game);if(s){t.configurations.some(m=>m.kind==="process")&&s.setRoomDeclared(!0);const n=h({registry:s,manifest:t,url:e.debugBridge?.url,window:e.debugBridge?.window});if(n){const m=a.stop;a.stop=()=>{n.uninstall(),m()}}}return a}export{vt as mountManifestRoots,R as resolveDeterminismSeed,M as resolveManifest};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
const s="Time the tab spent hidden was NOT counted against it, so this is not a backgrounded-tab failure.";function g(n){const{gameId:t,timeoutMs:o,readinessSource:i,pageErrors:e,cause:r}=n,a=`${o}ms of VISIBLE time`;if(e.length>0){const d=e.map(h=>` · ${h}`).join(`
|
|
2
|
-
`);return{kind:"crashed-before-ready",pageErrors:[...e],message:`Ingest game "${t}" CRASHED BEFORE IT BECAME READY: ${e.length} error(s) were thrown while it was booting, and the capture window (${a}) then expired. The expiry is a CONSEQUENCE of the crash, not the blocker — fix these first:
|
|
3
|
-
${d}
|
|
4
|
-
${s} Underlying wait: ${r}`}}return i==="declared"?{kind:"declared-ready-never-resolved",pageErrors:[],message:`Ingest game "${t}" DECLARED A READINESS SIGNAL AND STILL PRODUCED NO CAPTURABLE RENDER: it stated \`window.vgaiGame.ready\`, but the capture window (${a}) expired before the editor's three saw a render, and nothing was thrown. (The host awaits \`ready\` only after the first captured render, so whether it resolved was not observed.) Nothing is wrong with the host's wait — the likely blocker is whatever the game's own boot is waiting on (an asset fetch, a socket, a user gesture the editor never makes), or a game that draws through a renderer the capture trap cannot see. ${s} Underlying wait: ${r}`}:{kind:"no-readiness-declaration",pageErrors:[],message:`Ingest game "${t}" DECLARED NO READINESS SIGNAL, and the MEASURED fallback wait expired: the editor's three saw no render within ${a} and nothing was thrown, so the host has no way to tell a slow boot from a stopped one. Recovery: declare \`window.vgaiGame.ready\` (a promise resolved when the game has built its world) so this question stops being measured — or, if the game genuinely needs longer on screen, raise "captureTimeoutMs" in the root's ingest block. ${s} Underlying wait: ${r}`}}export{g as describeMountFailure};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{m as X}from"./capability-coverage-DZ-onC5j.js";import{M as h,ar as Y,at as Z,kl as ee,km as E,kn as D,ko as te,au as O,kp as re,kq as oe,kr as ne,ks as se,bp as ie,bu as ae,br as ce,bs as de,bt as ue}from"./index-BRJMIUK0.js";import{A as le,G as me,B as pe,C as fe,D as v,E as W,F as he,H as ge,I as ye,J as we,K as M,L as be,s as ve,c as Se,M as Ie,j as Re,k as ke,l as Ee,N as $e,u as Ce,y as Me,z as Pe,O as Le,r as Ge,P as Ae,Q as Te,p as De,o as Oe}from"./active-ingest-DA426a81.js";import{p as We}from"./scene-framing-BQt72ZCw.js";import{w as je,c as H,h as _e,i as ze,a as Fe,b as He,r as Ue,e as xe}from"./resolve-three-CVnMRHxw.js";import{b as Ve}from"./component-instance-root-B0C5oNEm.js";import{s as Ne}from"./ingest-source-persistence-Dmdo-UBp.js";import{a as j}from"./json-history-resource-DwS10tqD.js";import{r as Be}from"./three-ingest-runtime-B7rtg3QE.js";import{describeMountFailure as qe}from"./mount-readiness-Ds0HvvLH.js";import{formatLoopGateMessage as Je}from"./loop-gate-report-N52EWFGD.js";import{a as Ke,s as Qe}from"./three-authoring-adapter-htbnVej2.js";import{i as Xe}from"./renderer-ownership-BovSEcLv.js";import{installSceneCapture as Ye}from"./scene-capture-0a-bTjT8.js";import{s as Ze}from"./mount-ingest-root-DYR0TMIt.js";import{landIngestBootInEdit as et}from"./ingest-boot-viewport-DAt8WFSy.js";import{b as tt,c as _,e as rt,g as U}from"./registry-CaCdF63N.js";import"./game-contract-seams-BnPFGLll.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"./contract-system-adapters-Bic_7sev.js";import"./editor-layers-BDJnAAzj.js";import"./workspace-arrangement-BdAlBwvd.js";import"./three.core-3arARmh6.js";import"./dom-authoring-adapter-BrLU8IJ_.js";import"./react-world-authoring-adapter-DOjv2pYm.js";import"./board-guides-BEKPgD9M.js";import"./relative-import-specifier-BFKIWEWs.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-Dr4qvDpJ.js";import"./inference-diagnostics-xecGdohW.js";import"./writer-tw6EcuVO.js";import"./debug-registry-P0_YQGWd.js";import"./webgl-frame-capture-DdJkM2mi.js";import"./user-data-Bpj7diUS.js";import"./three.module-BLhyNg0e.js";import"./EffectComposer-BEAt0PtQ.js";import"./CopyShader-BzTUYzf6.js";import"./ShaderPass-DTnDQXm0.js";import"./Pass-D1MRT672.js";import"./CSS3DRenderer-BsAqfavI.js";import"./source-persistence-backend-CwLYVPXj.js";import"./three-projection-core-CG01r5Ta.js";import"./three-TCuY32m_.js";import"./entity-object-JmYMfLsx.js";import"./three-contract-Dkt6PmWY.js";import"./viewport-editor-controls-BYaAZ_Ku.js";import"./body-marks-RKb_LTwL.js";import"./user-data-dHvLdpwM.js";import"./object-marks-DwvIEBOK.js";import"./structural-ids-Br2zjINh.js";import"./object3d-authoring-subject-BDrxd1GA.js";import"./rapier-physics-adapter-CaZqWLu0.js";import"./r3f-physics-binding-DzrbpqjM.js";import"./three-state-DwFE3ay2.js";import"./editor-shell-store-ChLcVeNB.js";import"./output-pass-HurwNl0G.js";const ot="contract-hierarchy:group:",I="contract-hierarchy:render-tree";function x(t){return`${ot}${encodeURIComponent(t)}`}function z(t){return{id:x(t.id),label:t.label,secondaryLabel:`${t.count} ${t.count===1?"item":"items"}`,role:"folder",kind:"group",parentId:null,childIds:[]}}function nt(t){if(!Array.isArray(t))throw new Error("hierarchy() did not return an array");const e=new Set;for(const r of t){if(typeof r!="object"||r===null||typeof r.id!="string"||r.id.trim().length===0||typeof r.label!="string"||r.label.trim().length===0||typeof r.count!="number"||!Number.isInteger(r.count)||r.count<0)throw new Error("hierarchy() returned an invalid { id, label, count } group");if(e.has(r.id))throw new Error(`hierarchy() returned duplicate id "${r.id}"`);e.add(r.id)}return t}function st(t,e){if(!e)return t;let r=!1;const n=()=>{try{return nt(e())}catch(i){return r||(r=!0,h.warn(`Ignored invalid game-contract hierarchy: ${i instanceof Error?i.message:String(i)}`,"ingest")),[]}},o=()=>{const i=n(),a=t.hierarchy.roots();return i.length===0?a:[...i.map(z),{id:I,label:"Rendered objects",secondaryLabel:"live tree",role:"folder",kind:"group",parentId:null,childIds:a.map(d=>d.id)}]},s=i=>{const a=n(),d=a.find(w=>x(w.id)===i);if(d)return z(d);if(a.length>0&&i===I){const w=t.hierarchy.roots();return{id:I,label:"Rendered objects",secondaryLabel:"live tree",role:"folder",kind:"group",parentId:null,childIds:w.map(g=>g.id)}}const f=t.hierarchy.node(i);return a.length>0&&f?.parentId===null?{...f,parentId:I}:f},l=new Proxy(t.hierarchy,{get(i,a){if(a==="roots")return o;if(a==="node")return s;const d=Reflect.get(i,a,i);return typeof d=="function"?d.bind(i):d}}),m=i=>{const a=t.subscribe?.(i),d=e.subscribe?.(i);return()=>{a?.(),d?.()}};return new Proxy(t,{get(i,a){if(a==="hierarchy")return l;if(a==="subscribe")return m;const d=Reflect.get(i,a,i);return typeof d=="function"?d.bind(i):d}})}const it="vgaiDomStub";let F=null;function V(t){for(const e of le())if(e.surface.contains(t))return e;return null}function at(){if(F!==null||typeof Element>"u")return;const t=Element.prototype,e=t.requestPointerLock;typeof e=="function"&&(F=e,t.requestPointerLock=function(r){const n=V(this);return n&&!n.gate()?(console.error("Ingested game requested pointer lock while its input gate is closed — refused. A game only captures the mouse while play is running AND the Game tab is active (the same predicate that gates its keyboard listeners); the editor viewport owns pointer lock otherwise. See packages/editor/src/ingest/game-pointer-lock.ts."),Promise.reject(new Error("pointer lock refused: game input gate is closed"))):e.call(this,r)})}function N(){if(typeof document>"u")return;const t=document.pointerLockElement;t&&V(t)&&document.exitPointerLock()}function ct(t,e,r,n,o={}){let s=null;return{setPaused(l){if(!l){n.resume(),o.realmGate?.release();return}n.pause(),o.realmGate?.hold(),ye({gate:o.realmGate??null,progress:()=>e.info?.render.frame??t.getDrawCount(),...o.verifyWindowMs!==void 0?{windowMs:o.verifyWindowMs}:{},...o.sleep!==void 0?{sleep:o.sleep}:{}}).then(m=>{s=m,o.onVerdict?.(m),m.loop!=="gated"&&console.warn(Je({worldId:r,reason:t.getAnimationLoop(e)?m.reason:`${m.reason} (this game also never called renderer.setAnimationLoop)`}))})},lastVerdict:()=>s}}function dt(t){let e=0;return t.traverse(r=>{Ve(r)!==void 0&&e++}),e}async function ut(t,e=2500,r=n=>new Promise(o=>setTimeout(o,n))){const n=performance.now();for(;;){const o=dt(t);if(o>0)return o;if(performance.now()-n>=e)return 0;await r(100)}}function lt(t,e){const r=e.replace(/\\/g,"/"),n=r.startsWith("/")?"":t.replace(/\\/g,"/"),o=[];for(const s of`${n}/${r}`.split("/"))s===""||s==="."||(s===".."?o.pop():o.push(s));return`/${o.join("/")}`}function mt(t,e){if(!t)return[];const r=t.replace(/\\/g,"/").replace(/\/+$/,""),n=new Set([r]);for(const o of e??[]){const s=lt(r,o),l=s.slice(0,s.lastIndexOf("/"));l&&n.add(l)}return[...n]}function pt(t,e){if(!t||e.length===0)return!1;for(const r of Object.values(t)){const n=r?.file;if(typeof n!="string")continue;const o=n.replace(/\\/g,"/");if(e.some(s=>o===s||o.startsWith(`${s}/`)))return!0}return!1}function ft(t){return t.servedStampedSource||t.graphStamps>0?"oid-source":"structural"}async function ht(){if(!await re())return null;try{return await oe().index?.()??null}catch{return null}}function gt(t){return h.getEntries().filter(e=>e.level==="error"&&e.source==="runtime"&&e.timestamp>=t).slice(-10).map(e=>e.count>1?`${e.message} (×${e.count})`:e.message)}async function yt(t,e,r){if(r)try{return await r(),"declared"}catch(n){h.error(`Ingest game "${t}" declared \`window.vgaiGame.ready\` and it REJECTED (${String(n)}) — the world was already captured, so the host fell back to the measured settle wait. This root now reports readiness as measured.`,"ingest")}return await wt(e),"measured"}async function wt(t,e=5e3){const r=performance.now();let n=-1,o=0;return new Promise(s=>{const l=()=>{const m=t.children.length;if(o=m===n?o+1:0,n=m,o>=3||performance.now()-r>e)return s();setTimeout(l,120)};l()})}function bt(t,e){const r=ge(),n=v()?.root??r.__vgaiGameRoot,o=n instanceof HTMLElement&&n.contains(e)?n:e;return o.contains(t)?t:(o.parentElement!==t&&t.contains(o)||(H(o),o.parentElement!==t&&t.appendChild(o)),o)}async function vt(t,e,r,n={}){const o=document.createElement("div");o.id="container",o.style.cssText=`position:absolute;inset:0;width:100%;height:100%;overflow:hidden;${me}`,r.appendChild(o);const s=pe(o);Y(o);const l=O();l&&await Z(l.rootPath);const m=[];for(const c of e.domStubs??[]){if(document.getElementById(c))continue;const p=document.createElement("div");p.id=c,p.style.display="none",p.dataset[it]="",o.appendChild(p),m.push(p)}const i=await Be(),a=i.three,d=Ye(a,i.EffectComposer,{isHostRenderer:Xe,additionalRendererCtors:[i.CSS3DRenderer],declaredScene:()=>{const c=be(v());return c.malformed!==null&&h.error(`Ingest game "${e.id}" ${c.malformed} — falling back to the MEASURED first-render adoption.`,"ingest"),c.world},onWorldAdoption:ee(e.id)});if(e.assets){const c=e.assets;a.DefaultLoadingManager.setURLModifier(p=>{for(const y of Object.keys(c))if(p.includes(y))return c[y];return p})}window.__vgaiMountCold=!0;const f=Date.now();await e.load();const w=n.captureTimeoutMs??1e4,g=fe(v());g.malformed!==null&&h.error(`Ingest game "${e.id}" ${g.malformed} — the host is measuring readiness instead.`,"ingest");const b=g.ready===null?"measured":"declared";E({rootId:e.id,mechanism:g.ready===null?"measured-wait":"contract-ready",source:b,state:"waiting"});let u;try{u=await d.waitForCapture({timeoutMs:w,onWait:c=>Ze(e.id,c)})}catch(c){d.uninstall(),a.DefaultLoadingManager.setURLModifier(y=>y);for(const y of m)y.remove();W(),o.remove(),D(e.id);const p=qe({gameId:e.id,timeoutMs:w,readinessSource:b,pageErrors:gt(f),cause:String(c)});throw E({rootId:e.id,mechanism:g.ready===null?"measured-wait":"contract-ready",source:b,state:"failed",failure:p.kind}),new Error(p.message)}const R=bt(o,u.renderer.domElement),S=he(v());S.malformed!==null&&h.error(`Ingest game "${e.id}" ${S.malformed} — the host is using the captured renderer’s canvas instead.`,"ingest"),te(e.id,S.canvas??u.renderer.domElement,S.canvas?"declared":"measured"),at();const P=await yt(e.id,u.scene,g.ready);E({rootId:e.id,mechanism:P==="declared"?"contract-ready":"measured-wait",source:P,state:"ready"});const k={pause:()=>u.renderer.setAnimationLoop?.(null),resume:()=>{const c=d.getAnimationLoop(u.renderer);c&&u.renderer.setAnimationLoop?.(c)}};Ne(e.dataWriter??null);const q=mt(O()?.rootPath,e.sourceModules),L=pt(await ht(),q),J=L?0:await ut(u.scene),G=ft({servedStampedSource:L,graphStamps:J})==="oid-source"?Ke(t,u.scene,{worldId:e.id,loop:k,camera:u.camera,journal:j(e.id)}):Qe(t,u.scene,{loop:k,camera:u.camera,journal:j(e.id)}),A=ct(d,u.renderer,e.id,k,{realmGate:M(),onVerdict:()=>t.shell.notifyIngestEdit()}),{systems:T,renderDebug:K,debugCollisions:Q}=je({contractSystems:v()?.systems,surface:"three",runtime:u,setRenderPassHooks:c=>d.setRenderPassHooks(c)});for(const c of Q)h.error(`Ingest game "${e.id}" — ${c}; it will refuse`,"ingest");return{game:{kind:"three",scene:u.scene,camera:u.camera,drivesOwnLoop:!0,...Object.keys(T).length>0?{systems:T}:{},setPaused:c=>A.setPaused(c),resize:(c,p)=>{if(s.gameResizesItself){s.dispatchResize();return}const y=_e(c,p);u.renderer.setSize(y.width,y.height,!1),d.resizeComposers(y.width,y.height),H(R)},dispose:()=>{d.setRenderPassHooks(null),we(),K?.dispose();try{u.renderer.setAnimationLoop?.(null),u.renderer.dispose?.()}catch{}d.uninstall(),a.DefaultLoadingManager.setURLModifier(c=>c);for(const c of m)c.remove();N(),W(),ne(e.id),se(e.id),D(e.id),o.remove()},authoring:G},authoring:G,hostEl:o,capture:d,scene:u.scene,realmLoopVerdict:()=>A.lastVerdict()}}function St(t,e){const r={};for(const[n,o]of Object.entries(e)){const s=U(t,o),l=_[s];if(!l)throw new Error(`ingest discovery: "${t}"'s asset "${o}" did not match any served asset (looked for glob key "${s}" — available: ${Object.keys(_).join(", ")})`);r[n]=l}return r}function $(t,e){const r=U(t,e),n=rt[r];if(!n)throw new Error(`ingest discovery: "${t}"'s module "${e}" did not match any game module (looked for glob key "${r}").`);return n}function It({folderId:t,manifest:e,root:r}){const{adapter:n}=r;if(!r.entry)throw new Error(`ingest discovery: "${t}" has no \`entry\` — an ingest root mounts the game's own entry module.`);return{...{id:r.id,name:e.name,description:r.description??"",gameVersion:e.version,sourceModules:Fe(r.entry,r.world?.entry),...ze(n.dataWriter,s=>$(t,s)),...n.assets!==void 0?{assets:St(t,n.assets)}:{},...n.domStubs!==void 0?{domStubs:n.domStubs}:{},...n.captureTimeoutMs!==void 0?{captureTimeoutMs:n.captureTimeoutMs}:{}},load:He($(t,r.entry),n.contractShim===void 0?void 0:$(t,n.contractShim))}}let C=null;function Rt(){return C||(C=tt("three").map(It).sort((t,e)=>t.id.localeCompare(e.id))),C}function kt(t){return Rt().find(e=>e.id===t)}function Et(t){return t==="devtools-observer"?"this game runs its OWN copy of three; the host reached its renderer through three's `__THREE_DEVTOOLS__` observation seam":"this game imports the host's three directly, in the editor's own realm"}function $t(t){const{store:e,session:r,sessionId:n}=t,o=r.mount;if(!o)return;const s=o.authoring,l=Pe(),m=st(s,l?.systems?.hierarchy),i=xe({primary:m,worldId:n,hostEl:o.hostEl,...l?.root?{declaredRoot:l.root}:{},store:e}),a=o.scene,d=new ResizeObserver(()=>{const u=t.gameContainer.getBoundingClientRect();u.width>0&&u.height>0&&o.game.resize?.(u.width,u.height)});d.observe(t.gameContainer),r.resizeObserver=d;const f=s.refresh(),w=s.measureWriteReach();h.log(`Captured live scene (${a.children.length} top-level children, ${o.capture.getDrawCount()} draws); ingested ${f.count} objects (${f.meshes} meshes, ${f.lights} lights`+(f.instancedMeshes>0?`, incl. ${f.instancedMeshes} InstancedMesh drawing ${f.instances} units`:"")+`); ${w.addressable} of ${w.total} have a source address — edits go to ${w.destination}`,"ingest"),Le(n,o.realmLoopVerdict?.()??void 0),ce(i),de(o.game.systems??{}),e.enterPlayScene(a,void 0,s.objectMapSnapshot()),e.focusOnScene(()=>We(o.capture.captured?.camera,a)),et(),e.shell.notifyIngestEdit(),ue();const g=X({authoring:i});Ge({reach:g,reachMechanism:Et(o.capture.capturedVia),loop:()=>Ae(o),writeReach:()=>s.measureWriteReach()});const b={gameId:n,...Oe(i),drawCount:()=>o.capture.getDrawCount(),get reflected(){return s.refresh()},get sceneChildren(){return a.children.length},reach:g,resize:(u,R)=>o.game.resize?.(u,R),...r.lifecycle.setPaused?{setPaused:r.lifecycle.setPaused}:{}};Te(b,o),De("__vgaiIngest",b)}async function Ct(t,e,r){Se(),Ie(r),await ie();const n=ae();if(!n){h.error("Game container not mounted — cannot ingest","ingest");return}t.shell.setPlayState("playing"),h.log(`Ingesting unmodified game: ${e.name}`,"ingest");const o=()=>t.shell.playState==="playing"&&t.shell.activeViewportTab==="play";try{const s={captureTimeoutMs:e.captureTimeoutMs},l=await vt(t,e,n,s),m=l.game.setPaused,i={store:t,mount:l,lifecycle:Re(m?{setPaused:a=>m(a),step:()=>M()?.step(1),canStep:()=>l.realmLoopVerdict?.()?.loop==="gated"&&M()!==null}:{pauseGap:"the captured Three root exposes no mounted setPaused capability"})};ke({kind:"three",session:i,siblings:[],worldId:r}),Ee(o),i.inputGateUnsubscribe=t.shell.subscribe(()=>{o()||N()}),$e(Ce()),$t({store:t,session:i,gameContainer:n,sessionId:r})}catch(s){throw h.error(`Ingest failed: ${s}`,"ingest"),Me(),s}}function B(t,e,r){return ve(()=>Ct(t,e,r))}async function _r(t,e){const r=kt(e);if(!r){h.error(`Unknown ingest game: ${e}`,"ingest");return}return B(t,r,e)}async function zr(t,e,r){const n=Ue(e,r);return B(t,n,e.id)}export{B as mountThreeIngestRoot,_r as mountThreeIngestRootById,zr as mountThreeIngestRootFromManifest};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as t}from"./game-network-Ct2FQYmu.js";import"./index-OZVqp6xS.js";import"./index-Da9JhEvW.js";import"./_commonjsHelpers-D6-XlEtG.js";const e="workspace.service";function m(){t()}export{e as point,m as start};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./jsx-runtime-DPjLkJKQ.js";import{q as P,ey as x,ad as i,ew as u,Z as R,aK as M,dJ as T,eO as q}from"./index-BRJMIUK0.js";import{r as m}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";function W(t){return t?{connectionState:t.getConnectionState?.(),roomInfo:t.getRoomInfo?.(),stats:t.getReplicationStats?.()}:null}function K(t){return t?{stateTree:typeof t.getStateSnapshot=="function",messageLog:typeof t.messageEvents=="function",rates:typeof t.getRates=="function",conditioning:typeof t.getConditioning=="function"&&typeof t.setConditioning=="function",connection:typeof t.getConnectionState=="function",room:typeof t.getRoomInfo=="function",stats:typeof t.getReplicationStats=="function",identity:typeof t.getPlayerIdentity=="function",identitySettable:typeof t.setPlayerIdentity=="function",traffic:typeof t.getTrafficByType=="function",send:typeof t.sendMessage=="function",ping:typeof t.ping=="function",server:typeof t.inspectServer=="function"}:null}class L{constructor(n=500){this.capacity=n}entries=[];lastSeq=0;paused=!1;pull(n){if(this.paused||!n?.messageEvents)return 0;const r=n.messageEvents(this.lastSeq);if(r.length===0)return 0;for(const o of r)this.entries.push(o),o.seq>this.lastSeq&&(this.lastSeq=o.seq);return this.entries.length>this.capacity&&this.entries.splice(0,this.entries.length-this.capacity),r.length}get all(){return this.entries}clear(){this.entries=[]}}function V(t,n){const r=n.trim().toLowerCase();return r?t.filter(o=>o.type.toLowerCase().includes(r)):[...t]}class N{constructor(n=60){this.capacity=n}values=[];push(n){this.values.push(n),this.values.length>this.capacity&&this.values.shift()}get data(){return this.values}get latest(){return this.values.length>0?this.values[this.values.length-1]:null}}class z{msgsIn=new N;msgsOut=new N;bytesIn=new N;bytesOut=new N;sample(n){this.msgsIn.push(n.msgsInPerSec),this.msgsOut.push(n.msgsOutPerSec),n.bytesInPerSec!==void 0&&this.bytesIn.push(n.bytesInPerSec),n.bytesOutPerSec!==void 0&&this.bytesOut.push(n.bytesOutPerSec)}}function _(t,n,r,o=1){if(t.length<2)return"";const a=Math.max(1,...t),d=r-o*2,f=n/(t.length-1);return t.map((j,b)=>{const g=b*f,l=o+d*(1-j/a);return`${g.toFixed(1)},${l.toFixed(1)}`}).join(" ")}const J={disconnected:i.content.muted,connecting:i.semantic.warning,connected:i.semantic.success,error:i.semantic.danger},k={fontFamily:i.typography.mono,fontSize:x.base};function I({children:t,testId:n}){return e.jsx("div",{"data-testid":n,style:{padding:u[4],color:i.content.muted,fontSize:x.base,fontStyle:"italic"},children:t})}function G(t){return t!==null&&typeof t=="object"}function U(t){return typeof t=="string"?`"${t}"`:typeof t=="number"?Number.isInteger(t)?String(t):t.toFixed(3):String(t)}function A({type:t}){return t?e.jsx("span",{"data-testid":"net-tree-type",style:{color:i.content.dim,marginLeft:6},children:t}):null}function B({name:t,value:n,depth:r,path:o=[],edit:a,remove:d,typeOf:f}){const[j,b]=m.useState(r===0),[g,l]=m.useState(null),[h,p]=m.useState(null),S={...k,paddingLeft:8+r*14,lineHeight:"18px",whiteSpace:"nowrap"};if(!G(n)){const s=a&&(typeof n=="number"||typeof n=="string"||typeof n=="boolean"),c=y=>{l(null),a?.(o,y).then(()=>p(null),C=>p(C instanceof Error?C.message:String(C)))},w=y=>{if(typeof n=="number"){const C=Number(y);return Number.isFinite(C)?C:n}return y};return e.jsxs("div",{style:S,"data-testid":"net-tree-leaf","data-path":o.join("."),children:[e.jsx("span",{style:{color:i.content.primary},children:t}),e.jsx("span",{style:{color:i.content.muted},children:": "}),g!==null?e.jsx(M,{"data-testid":"net-tree-edit",autoFocus:!0,value:g,onChange:y=>l(y.target.value),onKeyDown:y=>{y.key==="Enter"&&c(w(g)),y.key==="Escape"&&l(null)},onBlur:()=>l(null),style:{width:120}}):e.jsx("span",{"data-testid":s?"net-tree-value":void 0,title:s?typeof n=="boolean"?"Click to toggle on the server":"Click to edit on the server":void 0,style:{color:i.content.primary,cursor:s?"text":void 0},onClick:s?()=>typeof n=="boolean"?c(!n):l(String(n)):void 0,children:U(n)}),e.jsx(A,{type:o.length>0?f?.(o):null}),d&&o.length>0?e.jsx("button",{type:"button","data-testid":"net-tree-delete",title:"Delete this key on the server","aria-label":`Delete ${o.join(".")} on the server`,onClick:()=>d(o).then(()=>p(null),y=>p(y instanceof Error?y.message:String(y))),style:{marginLeft:8,border:0,background:"transparent",color:i.content.muted,cursor:"pointer"},children:"×"}):null,h?e.jsxs("span",{style:{color:i.semantic.danger},children:[" ",h]}):null]})}const v=Object.entries(n);return e.jsxs("div",{children:[e.jsxs("div",{style:{...S,cursor:"pointer",userSelect:"none"},"data-testid":"net-tree-branch","data-expanded":j||void 0,onClick:()=>b(s=>!s),children:[e.jsx("span",{style:{color:i.content.muted,display:"inline-block",width:12},children:e.jsx(q,{direction:j?"down":"right"})}),e.jsx("span",{style:{color:i.content.primary},children:t}),e.jsxs("span",{style:{color:i.content.dim},children:[" ",Array.isArray(n)?`[${v.length}]`:`{${v.length}}`]}),e.jsx(A,{type:o.length>0?f?.(o):null}),h?e.jsxs("span",{style:{color:i.semantic.danger},children:[" ",h]}):null,d&&o.length>0?e.jsx("button",{type:"button","data-testid":"net-tree-delete",title:"Delete this key on the server","aria-label":`Delete ${o.join(".")} on the server`,onClick:s=>{s.stopPropagation(),d(o).then(()=>p(null),c=>p(c instanceof Error?c.message:String(c)))},style:{marginLeft:8,border:0,background:"transparent",color:i.content.muted,cursor:"pointer"},children:"×"}):null]}),j&&v.map(([s,c])=>e.jsx(B,{name:s,value:c,depth:r+1,path:r===0?[s]:[...o,s],edit:a,remove:d,typeOf:f},s))]})}const D=96,H=22,X=m.memo(function({points:n,color:r}){return e.jsx("svg",{width:D,height:H,style:{display:"block",background:i.surface.inset,borderRadius:i.shape.small},role:"img","aria-label":"rate sparkline",children:n&&e.jsx("polyline",{points:n,fill:"none",stroke:r,strokeWidth:1.2})})});function O({label:t,series:n,unit:r,color:o,testId:a}){const d=n.latest;return e.jsxs("div",{"data-testid":a,style:{display:"flex",flexDirection:"column",gap:u[1]},children:[e.jsxs("div",{style:{fontSize:x.sm,color:i.content.muted},children:[t," ",e.jsx("span",{style:{color:i.content.primary,fontFamily:i.typography.mono},children:d===null?"n/a":`${d}${r}`})]}),e.jsx(X,{points:_(n.data,D,H),color:o})]})}function Z({event:t}){const n=t.direction==="in"?i.semantic.success:i.accent.default;return e.jsxs("div",{"data-testid":"net-log-row","data-direction":t.direction,style:{...k,display:"grid",gridTemplateColumns:"64px 24px 1fr 56px",gap:u[2],lineHeight:"17px",padding:`0 ${u[4]}`,opacity:t.dropped?.55:1},children:[e.jsxs("span",{style:{color:i.content.dim},children:[(t.time/1e3).toFixed(2),"s"]}),e.jsx("span",{style:{color:n},children:t.direction==="in"?"↓in":"↑out"}),e.jsxs("span",{style:{color:i.content.primary,textDecoration:t.dropped?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis"},children:[t.type,t.dropped?" (dropped)":""]}),e.jsx("span",{style:{color:i.content.muted,textAlign:"right"},children:t.size!==void 0?`${t.size} B`:"—"})]})}function Q({adapter:t}){const[n,r]=m.useState(()=>t.getConditioning?.()??{latencyMs:0,jitterMs:0,packetLoss:0}),o=t.getConditioningLimits?.()??{},a=d=>{r(d),t.setConditioning?.(d)};return e.jsxs("div",{"data-testid":"net-conditioner",style:{display:"flex",gap:u[4],alignItems:"center",padding:`${u[2]} ${u[4]}`},children:[e.jsx("span",{style:{fontSize:x.sm,color:i.content.muted},children:"Conditioner"}),e.jsx(T,{label:"latency ms",value:n.latencyMs,step:10,testId:"net-cond-latency",onChange:d=>a({...n,latencyMs:Math.max(0,d)})}),e.jsx(T,{label:"jitter ms",value:n.jitterMs,step:5,testId:"net-cond-jitter",onChange:d=>a({...n,jitterMs:Math.max(0,d)})}),o.packetLoss?e.jsx("span",{"data-testid":"net-cond-loss-absent",title:o.packetLoss,style:{fontSize:x.sm,color:i.content.muted},children:"loss: not simulated"}):e.jsx(T,{label:"loss %",value:n.packetLoss*100,step:5,testId:"net-cond-loss",onChange:d=>a({...n,packetLoss:Math.min(1,Math.max(0,d/100))})})]})}function Y({adapter:t,settable:n}){const[r,o]=m.useState(()=>t.getPlayerIdentity?.()?.name??""),a=()=>{const d=r.trim();d&&t.setPlayerIdentity?.({name:d})};return e.jsxs("div",{"data-testid":"net-identity",style:{display:"flex",gap:u[4],alignItems:"center",padding:`${u[2]} ${u[4]}`},children:[e.jsx("span",{style:{fontSize:x.sm,color:i.content.muted},children:"Player name"}),n?e.jsx(M,{"data-testid":"net-identity-name",value:r,onChange:d=>o(d.target.value),onBlur:a,onKeyDown:d=>{d.key==="Enter"&&d.currentTarget.blur()},style:{width:140}}):e.jsx("span",{"data-testid":"net-identity-name",style:{...k,color:i.content.primary},children:r||"—"})]})}function ee({view:t,caps:n,rates:r}){return e.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:u[6],alignItems:"center",padding:`${u[2]} ${u[4]}`,borderBottom:`1px solid ${i.boundary.default}`},children:[t.connectionState!==void 0?e.jsxs("span",{"data-testid":"net-connection-state",style:{color:J[t.connectionState]},children:["● ",t.connectionState]}):e.jsx(I,{testId:"net-connection-state-absent",children:"Connection state not provided by this adapter."}),t.roomInfo===void 0?e.jsx(I,{testId:"net-room-absent",children:"Room info not provided by this adapter."}):t.roomInfo?e.jsxs("span",{style:{...k,color:i.content.primary},children:[t.roomInfo.roomName," · ",t.roomInfo.roomId," · session ",t.roomInfo.sessionId]}):e.jsx("span",{style:{color:i.content.muted},children:"no room"}),t.stats?e.jsxs("span",{style:{color:i.content.muted},children:["entities ",e.jsx("span",{style:{color:i.content.primary},children:t.stats.entities})]}):e.jsx(I,{testId:"net-stats-absent",children:"Replication stats not provided by this adapter."}),n.rates?e.jsxs("div",{"data-testid":"net-sparklines",style:{display:"flex",gap:u[5]},children:[e.jsx(O,{label:"msgs in",unit:"/s",series:r.msgsIn,color:i.semantic.success,testId:"net-rate-msgs-in"}),e.jsx(O,{label:"msgs out",unit:"/s",series:r.msgsOut,color:i.accent.default,testId:"net-rate-msgs-out"}),e.jsx(O,{label:"bytes in",unit:" B/s",series:r.bytesIn,color:i.semantic.success,testId:"net-rate-bytes-in"}),e.jsx(O,{label:"bytes out",unit:" B/s",series:r.bytesOut,color:i.accent.default,testId:"net-rate-bytes-out"})]}):e.jsx(I,{testId:"net-rates-absent",children:"Rates not provided by this adapter."})]})}function te(){const[,t]=m.useReducer(s=>s+1,0),n=m.useRef(new L),r=m.useRef(new z),o=m.useRef(null),[a,d]=m.useState(!1),[f,j]=m.useState(""),[b,g]=m.useState({type:"",payload:""});m.useEffect(()=>{const s=()=>{const $=P().systems.inspectedNetworking()??null;return $!==o.current&&(o.current=$,n.current=new L,n.current.paused=a,r.current=new z),$},c=()=>{const $=s();n.current.pull($),t()};c();const w=setInterval(c,250),y=setInterval(()=>{const F=s()?.getRates?.();F&&r.current.sample(F)},1e3),C=P().systems.inspectedNetworking()?.subscribe(()=>t());return()=>{clearInterval(w),clearInterval(y),C?.()}},[a]);const l=o.current??P().systems.inspectedNetworking()??null,h=K(l);if(!l||!h)return e.jsxs("div",{"data-testid":"network-inspector-empty",style:{padding:u[8],color:i.content.muted,fontSize:x.md,lineHeight:"18px"},children:[e.jsx("div",{style:{color:i.content.primary,marginBottom:u[2]},children:"No networking adapter is registered."}),"Games expose replication state to this inspector by registering a"," ",e.jsx("code",{style:k,children:"NetworkingAdapter"})," during setup:"," ",e.jsx("code",{style:k,children:"ctx.registerSystemAdapter?.('networking', adapter)"})," — see the third-person-arena example. Single-player games register none; there is nothing to inspect."]});const p=W(l),S=h.stateTree?l.getStateSnapshot?.():void 0,v=V(n.current.all,f);return e.jsxs("div",{"data-testid":"network-inspector",className:"vgai-content-frost",style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",fontSize:x.md},children:[e.jsx(ee,{view:p,caps:h,rates:r.current}),h.identity?e.jsx(Y,{adapter:l,settable:h.identitySettable},l.getPlayerIdentity?.()?.name??""):null,h.conditioning?e.jsx(Q,{adapter:l}):e.jsx(I,{testId:"net-conditioner-absent",children:"Link conditioning not provided by this adapter."}),h.server?e.jsx(oe,{adapter:l,ownSession:p.roomInfo?.sessionId??null,ownRoom:p.roomInfo?.roomId??null,draft:b}):null,h.traffic?e.jsx(ne,{rows:l.getTrafficByType?.()??[]}):null,h.send?e.jsx(se,{adapter:l,ping:h.ping,draft:b,setDraft:g}):null,e.jsxs("div",{style:{flex:1,minHeight:0,display:"flex"},children:[e.jsx("div",{"data-testid":"net-state-tree",style:{flex:1,minWidth:0,overflow:"auto",borderRight:`1px solid ${i.boundary.default}`,padding:`${u[2]} 0`},children:h.stateTree?S!=null?e.jsx(B,{name:"state",value:S,depth:0,edit:l.editServerState?(s,c)=>l.editServerState(s,c):void 0,remove:l.deleteServerState?s=>l.deleteServerState(s):void 0,typeOf:l.stateFieldType?s=>l.stateFieldType(s):void 0}):e.jsx(I,{children:"Not connected — no replicated state to show."}):e.jsx(I,{testId:"net-tree-absent",children:"Replicated-state snapshot not provided by this adapter."})}),e.jsx("div",{"data-testid":"net-message-log",style:{flex:1,minWidth:0,display:"flex",flexDirection:"column"},children:h.messageLog?e.jsxs(e.Fragment,{children:[e.jsxs("div",{style:{display:"flex",gap:u[3],alignItems:"center",padding:u[2]},children:[e.jsx(R,{type:"button",variant:"ghost","data-testid":"net-log-pause",onClick:()=>{const s=!a;n.current.paused=s,d(s)},children:a?"Resume":"Pause"}),e.jsx(R,{type:"button",variant:"ghost","data-testid":"net-log-clear",onClick:()=>{n.current.clear(),l.clearTraffic?.(),t()},children:"Clear"}),e.jsx(M,{"data-testid":"net-log-filter",placeholder:"Filter by type",value:f,onChange:s=>j(s.target.value),style:{flex:1,minWidth:60}}),e.jsxs("span",{style:{fontSize:x.sm,color:i.content.muted},children:[v.length,"/",n.current.all.length]})]}),e.jsx("div",{style:{flex:1,minHeight:0,overflow:"auto"},children:v.length===0?e.jsx(I,{children:"No messages captured yet."}):v.map(s=>e.jsx(Z,{event:s},s.seq))})]}):e.jsx(I,{testId:"net-log-absent",children:"Message log not provided by this adapter."})})]})]})}function ne({rows:t}){const n={padding:`0 ${u[3]}`,textAlign:"right",whiteSpace:"nowrap"},r=o=>o>=1024?`${(o/1024).toFixed(1)} KiB`:`${o} B`;return e.jsx("div",{"data-testid":"net-traffic",style:{maxHeight:132,overflow:"auto",borderBottom:`1px solid ${i.boundary.default}`},children:t.length===0?e.jsx(I,{children:"No traffic yet."}):e.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:x.sm,...k},children:[e.jsx("thead",{children:e.jsxs("tr",{style:{color:i.content.muted},children:[e.jsx("th",{style:{...n,textAlign:"left"},children:"Type"}),e.jsx("th",{style:n,children:"In"}),e.jsx("th",{style:n,children:"Bytes in"}),e.jsx("th",{style:n,children:"Out"}),e.jsx("th",{style:n,children:"Bytes out"})]})}),e.jsx("tbody",{children:t.map(o=>e.jsxs("tr",{"data-testid":"net-traffic-row",children:[e.jsx("td",{style:{...n,textAlign:"left"},children:o.type}),e.jsx("td",{style:n,children:o.countIn||"-"}),e.jsx("td",{style:n,children:o.countIn?r(o.bytesIn):"-"}),e.jsx("td",{style:n,children:o.countOut||"-"}),e.jsx("td",{style:n,children:o.countOut?r(o.bytesOut):"-"})]},o.type))})]})})}function E(t){if(t.type.trim()==="")throw new Error("Name the message type first.");return{type:t.type,payload:t.payload.trim()===""?void 0:JSON.parse(t.payload)}}function se({adapter:t,ping:n,draft:r,setDraft:o}){const[a,d]=m.useState(null),f=()=>{d("…"),t.ping?.().then(l=>d(`${l} ms`),l=>d(l instanceof Error?l.message:String(l)))},[j,b]=m.useState(null),g=()=>{try{const l=E(r);t.sendMessage?.(l.type,l.payload),b(null)}catch(l){b(l instanceof Error?l.message:String(l))}};return e.jsxs("div",{"data-testid":"net-send",style:{display:"flex",gap:u[2],alignItems:"center",padding:u[2]},children:[e.jsx(M,{"data-testid":"net-send-type",placeholder:"Message type",value:r.type,onChange:l=>o({...r,type:l.target.value}),style:{width:140}}),e.jsx(M,{"data-testid":"net-send-payload",placeholder:'Payload (JSON), e.g. {"x": 1}',value:r.payload,onChange:l=>o({...r,payload:l.target.value}),style:{flex:1,minWidth:80}}),e.jsx(R,{type:"button",variant:"ghost","data-testid":"net-send-button",disabled:r.type.trim()==="",onClick:g,children:"Send as this client"}),n?e.jsxs(e.Fragment,{children:[e.jsx(R,{type:"button",variant:"ghost","data-testid":"net-ping",onClick:f,children:"Ping"}),a?e.jsx("span",{"data-testid":"net-rtt",style:{fontSize:x.sm,...k},children:a}):null]}):null,j?e.jsx("span",{"data-testid":"net-send-error",style:{color:i.semantic.danger,fontSize:x.sm},children:j}):null]})}function oe({adapter:t,ownSession:n,ownRoom:r,draft:o}){const[a,d]=m.useState(void 0),[f,j]=m.useState(void 0),[b,g]=m.useState(null);m.useEffect(()=>{let s=!0;const c=()=>{t.inspectServer?.(f).then(y=>{s&&d(y)},y=>{s&&g(y instanceof Error?y.message:String(y))})};c();const w=setInterval(c,2e3);return()=>{s=!1,clearInterval(w)}},[t,f]);const l=s=>{try{s()?.then(()=>g(null),c=>g(c instanceof Error?c.message:String(c)))}catch(c){g(c instanceof Error?c.message:String(c))}},h=s=>`${Math.round(s/1e3)} s`,p={padding:`0 ${u[3]}`,whiteSpace:"nowrap"};if(a===void 0)return null;if(a===null)return e.jsx(I,{testId:"net-server-absent",children:"The room server serves no Monitor view (its `server` configuration sets VGAI_ROOM_MONITOR=1)."});const S=a.room?.roomId,v=(s,c,w)=>e.jsx(R,{type:"button",variant:"ghost","data-testid":s,onClick:()=>l(w),children:c});return e.jsxs("div",{"data-testid":"net-server",style:{padding:`${u[2]} 0`,borderBottom:`1px solid ${i.boundary.default}`,fontSize:x.sm},children:[e.jsxs("div",{"data-testid":"net-server-summary",style:{padding:`0 ${u[3]}`,color:i.content.muted},children:["Server · ",a.rooms.length," room",a.rooms.length===1?"":"s"," · ",a.connections," ","connection",a.connections===1?"":"s",a.cpuPercent!==null?` · CPU ${a.cpuPercent.toFixed(0)}%`:"",a.memory?` · memory ${Math.round(a.memory.usedMb)} / ${Math.round(a.memory.totalMb)} MB`:"",a.room?` · state ${a.room.stateBytes} B`:""]}),e.jsx("table",{style:{borderCollapse:"collapse",...k},children:e.jsxs("tbody",{children:[a.rooms.map(s=>e.jsxs("tr",{"data-testid":"net-server-room","data-inspected":s.roomId===S||void 0,children:[e.jsx("td",{style:p,children:s.name}),e.jsx("td",{style:p,children:s.roomId}),e.jsxs("td",{style:p,children:[s.clients,s.maxClients!==null?` / ${s.maxClients}`:""," clients"]}),e.jsx("td",{style:p,children:s.locked?"locked":"open"}),e.jsx("td",{style:p,children:h(s.elapsedMs)}),e.jsx("td",{style:p,children:s.roomId===S?e.jsxs(e.Fragment,{children:[v("net-server-broadcast","Broadcast",()=>{const c=E(o);return t.broadcast?.(c.type,c.payload,s.roomId)}),v("net-server-dispose","Dispose",()=>t.disposeRoom?.(s.roomId))]}):e.jsx(R,{type:"button",variant:"ghost","data-testid":"net-server-inspect",onClick:()=>j(s.roomId),children:"Inspect"})})]},s.roomId)),a.room?.clients.map(s=>e.jsxs("tr",{"data-testid":"net-server-client",children:[e.jsx("td",{style:p,children:"client"}),e.jsxs("td",{style:p,children:[s.sessionId,s.sessionId===n?" (this client)":""]}),e.jsx("td",{style:p,children:h(s.elapsedMs)}),e.jsxs("td",{style:p,colSpan:3,children:[v("net-server-send","Send",()=>{const c=E(o);return t.sendToClient?.(s.sessionId,c.type,c.payload,S)}),v("net-server-disconnect","Disconnect",()=>t.disconnectClient?.(s.sessionId,S))]})]},s.sessionId))]})}),a.room&&a.room.roomId!==r&&a.room.state!==void 0?e.jsx("div",{"data-testid":"net-server-room-state",style:{padding:`${u[2]} 0`},children:e.jsx(B,{name:`room ${a.room.roomId}`,value:a.room.state,depth:0,edit:t.editServerState?(s,c)=>t.editServerState(s,c,S):void 0,remove:t.deleteServerState?s=>t.deleteServerState(s,S):void 0})}):null,b?e.jsx(I,{children:b}):null]})}const he="workspace.utility",me="Network",ge=25,fe=()=>P().systems.inspectedNetworking()!==null;function xe(){return e.jsx(te,{})}export{fe as available,xe as default,ge as order,he as point,me as title};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const n={editorHelperType:"editorHelperType",skeletonVisible:"skeletonVisible",skeletonEnabled:"skeletonEnabled",engineInternal:"engineInternal",editorHelper:"editorHelper",vgaiComponentRoot:"vgaiComponentRoot",vgaiBuiltInternal:"vgaiBuiltInternal"};function r(e,t){return e?e.userData[n[t]]:void 0}function i(e,t,o){e.userData[n[t]]=o}export{n as ObjectMarkKeys,r as getObjectMark,i as setObjectMark};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as B}from"./index-SS9EugVg.js";import{M as m,gq as U,bk as C,bl as j}from"./index-BRJMIUK0.js";import{c as W}from"./source-persistence-backend-CwLYVPXj.js";import{c as G}from"./component-instance-root-B0C5oNEm.js";import{J as X}from"./json-history-resource-DwS10tqD.js";import{a as Y,b as z}from"./pixi-transform-channels-P4rvmusc.js";function g(i){const t=i.constructor?.name?.toLowerCase()??"container";return t.includes("animatedsprite")?"animatedsprite":t.includes("nineslice")?"nineslicesprite":t.includes("tiling")?"tilingsprite":t.includes("sprite")?"sprite":t.includes("text")?"text":t.includes("graphics")?"graphics":"container"}function K(i){const t=V(i);if(t)return t;const e=Q(i);if(e)return e;const r=q(i);if(r)return r;const n=h(i);if(n)return n;const o=g(i),s=i.children?.length??0;return s>0?`${o} (${s})`:o}function V(i){const t=i.label?.trim();if(t){if(A(t)&&t!==i.constructor?.name)return t;if(!L(t))return t}}function A(i){return i.length<=2&&i===i.toLowerCase()}const Z=new Set(["container","displayobject","sprite","animatedsprite","nineslicesprite","tilingsprite","text","bitmaptext","htmltext","graphics","mesh"]);function L(i){return A(i)||i==="Object"||i==="Function"?!0:Z.has(i.replace(/^_+/,"").toLowerCase())}function q(i){const e=i.texture?.label?.trim();return!e||/^(_?texture)?(empty|white)$/i.test(e)?void 0:(e.split("/").pop()??e).replace(/\.[a-z0-9]+$/i,"")||void 0}function h(i){const t=i.constructor?.name;if(!(!t||L(t)))return t.replace(/^_+/,"")||void 0}function b(i){const t=i.replace(/^_+/,"");return t.length>0?t:void 0}function N(i){return"addChild"in i&&typeof i.addChild=="function"&&"children"in i}function Q(i){const t={seen:new WeakSet,budget:J};let e=i.parent;for(let r=0;r<8&&e&&typeof e=="object";r++){if(t.budget<=0)return;const n=S(e,i,t)??$(e,i,2,t);if(n)return n;e=e.parent}}const J=2e3;function x(i){return i.budget<=0?!1:(i.budget-=1,!0)}function w(i){return/^_?[A-Za-z][A-Za-zA-Z0-9]*$/.test(i)?!tt.has(i.replace(/^_+/,"")):!1}const tt=new Set(["parent","children","transform","position","origin","scale","pivot","skew","anchor","worldTransform","localTransform","groupTransform","relativeGroupTransform","renderGroup","parentRenderGroup","parentRenderGroupIndex","parentRenderLayer","relativeRenderGroupDepth","renderPipeId","instructionSet","childrenToUpdate","childrenRenderablesToUpdate","effects","filters","mask","bounds","boundsArea","visualBounds","gpuData","texture","events","eventsCount","updateFlags"]);function S(i,t,e){if(e.seen.has(i))return;e.seen.add(i);const r=k(i,t,void 0,e);if(r)return r;for(const[n,o]of Object.entries(i)){if(!x(e))return;if(!w(n))continue;const s=F(i,n,o,t);if(s)return s;const a=k(o,t,n,e);if(a)return a}}function k(i,t,e,r){const n=st(i);if(n)for(const[o,s]of n){if(!x(r))return;const a=et(i,s,rt(o)??e,t,r);if(a)return a}}function et(i,t,e,r,n){if(e){const o=F(t&&typeof t=="object"?t:i,e,t,r);if(o)return o}else if(t&&typeof t=="object"&&t.view===r){const o=h(t);if(o)return o}if(t&&typeof t=="object"&&!N(t))return S(t,r,n)}function rt(i){if(!(!i||/^\d+$/.test(i)))return w(i)||i.includes("-")?b(i)??i:void 0}function*it(i){for(let t=0;t<i.length;t++)yield[String(t),i[t]]}function*nt(i){for(const[t,e]of i.entries())yield[String(t),e]}function*ot(i){let t=0;for(const e of i)yield[String(t),e],t+=1}function st(i){if(!(!i||typeof i!="object")){if(Array.isArray(i))return it(i);if(i instanceof Map)return nt(i);if(i instanceof Set)return ot(i);if(Object.getPrototypeOf(i)===Object.prototype)return Object.entries(i)}}function F(i,t,e,r){if(e===r){const n=b(t);return n&&n.toLowerCase()!=="view"?h(e)??n:h(e)??h(i)??n}if(e&&typeof e=="object"&&e.view===r)return h(e)??b(t)}function $(i,t,e,r){const n=S(i,t,r);if(n)return n;if(!(e<=0))for(const[o,s]of Object.entries(i)){if(!x(r))return;if(!w(o)||!s||typeof s!="object"||N(s))continue;const a=$(s,t,e-1,r);if(a)return a}}const ct={idFor:(i,t)=>`w2d:${t.join("/")}:${g(i)}:${i.label??""}`};class at{constructor(t,e={}){this.root=t,e.overlay&&(this.overlay=e.overlay),this.identity=e.identity??ct,this.refresh()}byId=new Map;overlay={};dirty=!1;identity;names=new WeakMap;reindex(){this.byId.clear(),this.identity.beginWalk?.();let t=0,e=0;const r=(n,o)=>{const s=this.identity.idFor(n,o);n.__authId=s,this.byId.set(s,n),t++,g(n).includes("sprite")&&e++,n.children.forEach((a,c)=>{r(a,[...o,c])})};return this.root.children.forEach((n,o)=>{r(n,[o])}),{count:t,sprites:e}}refresh(){const t=this.reindex();for(const[e,r]of Object.entries(this.overlay))this.applyOverride(e,r);return t}roots(){return this.root.children.map(t=>this.toNode(t))}node(t){const e=this.byId.get(t);return e?this.toNode(e):null}displayObject(t){return this.byId.get(t)??null}nameOf(t){const e=this.names.get(t),r=t.parent??null,n=t.constructor,o=t.label??null,s=t.texture??null,a=t.children?.length??0;if(e&&e.parent===r&&e.type===n&&e.own===o&&e.texture===s&&e.childCount===a)return e;const c={label:K(t),kind:g(t),parent:r,type:n,own:o,texture:s,childCount:a};return this.names.set(t,c),c}toNode(t){const e=t,{label:r,kind:n}=this.nameOf(t);return{id:e.__authId??"",label:r,kind:n,parentId:t.parent?.__authId??null,childIds:t.children.map(o=>o.__authId??"")}}getTransform(t){const e=this.byId.get(t);return!e||!e.position||!e.scale?null:{position:[e.position.x,e.position.y],rotation:e.rotation,scale:[e.scale.x,e.scale.y]}}setTransform(t,e){const r=this.byId.get(t);if(!r)return;e.position&&r.position.set(e.position[0],e.position[1]),e.rotation!==void 0&&(r.rotation=e.rotation),e.scale&&r.scale.set(e.scale[0],e.scale[1]),this.overlay[t]??={};const n=this.overlay[t];e.position&&(n.position=e.position),e.rotation!==void 0&&(n.rotation=e.rotation),e.scale&&(n.scale=e.scale),this.dirty=!0}properties(t){const e=this.byId.get(t);if(!e)return[];const r=[{path:"label",label:"Name",type:"string",value:e.label??""},{path:"visible",label:"Visible",type:"boolean",value:e.visible},{path:"alpha",label:"Alpha",type:"number",value:e.alpha}];return"tint"in e&&r.push({path:"tint",label:"Tint",type:"color",value:e.tint}),r}set(t,e,r){const n=this.byId.get(t);n&&(n[e]=r,this.overlay[t]??={},e==="label"&&(this.overlay[t].label=r),e==="alpha"&&(this.overlay[t].alpha=r),e==="tint"&&(this.overlay[t].tint=r),e==="visible"&&(this.overlay[t].visible=r),this.dirty=!0)}applyOverride(t,e){const r=this.byId.get(t);r&&(e.label!==void 0&&(r.label=e.label),e.alpha!==void 0&&(r.alpha=e.alpha),e.position&&r.position.set(e.position[0],e.position[1]),e.rotation!==void 0&&(r.rotation=e.rotation),e.scale&&r.scale.set(e.scale[0],e.scale[1]),e.tint!==void 0&&"tint"in r&&(r.tint=e.tint),e.visible!==void 0&&(r.visible=e.visible))}applyOverlay(t){let e=0,r=0;for(const[n,o]of Object.entries(t)){if(!this.byId.has(n)){r++;continue}this.applyOverride(n,o),this.overlay[n]={...this.overlay[n],...o},e++}return{applied:e,orphaned:r}}isDirty(){return this.dirty}serializeOverlay(){return this.overlay}replaceOverlay(t){this.overlay=structuredClone(t);for(const[e,r]of Object.entries(this.overlay))this.applyOverride(e,r);this.dirty=!0}markClean(){this.dirty=!1}}const ut={count:0,sprites:0};class lt{constructor(t,e,r,n=o=>queueMicrotask(o)){this.root=t,this.index=e,this.mapping=r,this.scheduleWindowClose=n,this.refresh()}current={nodes:new Map,rootIds:[],stats:ut};projectionFresh=!1;refresh(){const t=this.index.refresh();return this.current=this.readProjection(t),this.openProjectionWindow(),t}project(){return this.projectionFresh?this.current:this.reproject()}reproject(){const t=this.index.reindex();return this.current=this.readProjection(t),this.openProjectionWindow(),this.current}invalidate(){this.projectionFresh=!1}openProjectionWindow(){this.projectionFresh||(this.projectionFresh=!0,this.scheduleWindowClose(()=>{this.projectionFresh=!1}))}projection(){return this.current}object(t){const e=this.current.nodes.get(t)?.object??null;return e===null||e.destroyed?null:e}node(t){const e=this.current.nodes.get(t);if(!e)return null;const r=this.index.node(t);return r?{...r,parentId:e.parentId,childIds:[...e.childIds]}:null}roots(){return this.current.rootIds.map(t=>this.node(t)).filter(t=>t!==null)}pick(t,e,r){return this.candidates(t,e,r)[0]??null}candidates(t,e,r){const n=this.pointFromClient(t,e);return n?(this.project(),this.hitIds(n,r)):[]}pointFromClient(t,e){const r=this.mapping?.surface()??null;if(!r)return null;const n=r.getBoundingClientRect();if(n.width<=0||n.height<=0)return null;const o=this.mapping?.pointFromClient?.(t,e,n)??null;if(this.mapping?.pointFromClient)return o;const s=Number(r.dataset?.vgaiStageWidth??n.width),a=Number(r.dataset?.vgaiStageHeight??n.height);return!(s>0)||!(a>0)?null:{x:(t-n.left)*(s/n.width),y:(e-n.top)*(a/n.height)}}hitIds(t,e){const r=[],n=[];this.collectHits(this.root,t,"visual",r),this.collectHits(this.root,t,"hitArea",n);const o=[],s=new Set;for(const a of[...r,...n]){const c=a.__authId;c&&!e(c)&&!s.has(c)&&(s.add(c),o.push(c))}return o}rect(t){const e=this.object(t);if(!e||typeof e.getBounds!="function")return null;const r=e.getBounds();return!(r.width>0)||!(r.height>0)?null:{x:r.x,y:r.y,width:r.width,height:r.height}}frame(t){const e=this.object(t);if(!e||typeof e.getLocalBounds!="function")return null;const r=e.getLocalBounds();if(!(r.width>0)||!(r.height>0))return null;const n=(o,s)=>{const a=e.toGlobal({x:o,y:s});return{x:a.x,y:a.y}};return{tl:n(r.x,r.y),tr:n(r.x+r.width,r.y),br:n(r.x+r.width,r.y+r.height),bl:n(r.x,r.y+r.height)}}contextRects(t){const e=this.node(t);if(!e)return{siblings:[]};const r=e.parentId?this.node(e.parentId)?.childIds??[]:this.current.rootIds,n=e.parentId?this.rect(e.parentId):null;return{...n?{parent:n}:{},siblings:r.filter(o=>o!==t).map(o=>this.rect(o)).filter(o=>o!==null)}}readProjection(t){const e=new Map,r=[],n=o=>{const s=this.index.displayObject(o.id);if(!s)return;const a={object:s,id:o.id,parentId:o.parentId,childIds:[...o.childIds]};e.set(o.id,a);for(const c of o.childIds){const u=this.index.node(c);u&&n(u)}};for(const o of this.index.roots())r.push(o.id),n(o);return{nodes:e,rootIds:r,stats:t}}collectHits(t,e,r,n){const o=t.children??[];for(let s=o.length-1;s>=0;s--){const a=o[s];if(!a.visible||!a.renderable)continue;a.updateLocalTransform();const c={x:0,y:0};a.localTransform.applyInverse(e,c),this.collectHits(a,c,r,n),this.contains(a,c,r)&&n.push(a)}}contains(t,e,r){if(!t.__authId)return!1;const n=t;return r==="hitArea"?n.hitArea?n.hitArea.contains(e.x,e.y):!1:typeof n.containsPoint=="function"?n.containsPoint(e):!1}}const I="pixi",dt="data-oid",ht="data-authoring-instance",ft="data-authoring-label",pt="data-authoring-component";function yt(i){if(!i||typeof i!="object")return;const t=i[dt];return typeof t=="string"&&t.length>0?t:void 0}function O(i,t){if(!i||typeof i!="object")return;const e=i[t];return typeof e=="string"&&e.length>0?e:void 0}function v(i){return O(i,ht)}function gt(i){return O(i,ft)}function mt(i){return O(i,pt)}function R(i){const t=v(i);return t?v(i.parent)!==t:!1}function bt(i){return R(i)?v(i):yt(i)}function vt(i,t,e=0){return G(`${I}:${i}:${t}`,e)}function xt(i,t){return`${I}:${i}:@${t.join(".")}`}function Wt(i,t){const e=`${I}:${i}:`;if(!t.startsWith(e))return null;const r=t.slice(e.length);if(r.startsWith("@"))return null;const n=r.indexOf("#"),o=n<0?r:r.slice(0,n);return o.length>0?o:null}function Gt(i){let t=new Map;return{beginWalk:()=>{t=new Map},idFor:(e,r)=>{const n=bt(e);if(n===void 0)return xt(i,r);const o=t.get(n)??0;return t.set(n,o+1),vt(i,n,o)}}}const E="#root";function wt(i){if(!(!i.position||!i.scale||!i.pivot||!i.skew))return{x:i.position.x,y:i.position.y,rotation:i.rotation,scaleX:i.scale.x,scaleY:i.scale.y,pivotX:i.pivot.x,pivotY:i.pivot.y,skewX:i.skew.x,skewY:i.skew.y}}function St(i,t){!i.position||!i.scale||!i.pivot||!i.skew||(i.position.set(t.x,t.y),i.scale.set(t.scaleX,t.scaleY),i.pivot.set(t.pivotX,t.pivotY),i.skew.set(t.skewX,t.skewY),i.rotation=t.rotation)}class It{constructor(t,e,r,n){this.root=t,this.onRestored=n;const o=e.shell.projectHistory;this.resource=o?new X({history:o,kind:"session-state",scope:"session",subject:{...r,id:`${r.id}/world-2d-structure`},displayName:"World 2D structure",capture:()=>this.capture(),conflictIdentity:s=>Object.fromEntries(Object.entries(s.placements).map(([a,c])=>[a,c.parent])),restore:async s=>{this.restore(s)}}):null}byUid=new Map;resource;track(t){return this.uidOf(t)}run(t,e){this.resource?.assertCanMutate();const r=this.capture(),n=e();return this.resource&&this.resource.record(t,r,this.capture()).catch(o=>{m.error(`[canvas] failed to journal "${t}" into project history — the structural edit is applied but has no history entry (it cannot be undone): ${o instanceof Error?o.message:String(o)}`,"authoring")}),n}dispose(){this.resource?.dispose(),this.byUid.clear()}uidOf(t){if(t===this.root)return E;const e=t,r=e.__vgaiStructUid;if(r&&this.byUid.get(r)===t)return r;const n=r??`s${crypto.randomUUID()}`;return e.__vgaiStructUid=n,this.byUid.set(n,t),n}capture(){const t={};for(const[e,r]of this.byUid){const n=r.parent??null,o=wt(r);t[e]={parent:n?this.uidOf(n):null,index:n?n.children?.indexOf(r)??-1:-1,...o?{pose:o}:{}}}return{placements:t}}restore(t){const e=Object.entries(t.placements);for(const[r,n]of e){if(n.parent!==null)continue;const o=this.byUid.get(r);o?.parent?.removeChild(o)}for(const[r,n]of e.filter(([,o])=>o.parent!==null).sort((o,s)=>o[1].index-s[1].index)){const o=this.byUid.get(r);if(!o)continue;const s=n.parent===E?this.root:this.byUid.get(n.parent);if(!s||typeof s.addChildAt!="function")continue;const a=s.children.length-(o.parent===s?1:0);s.addChildAt(o,Math.max(0,Math.min(n.index,a))),n.pose&&St(o,n.pose)}this.onRestored()}}const H=[{kind:"container",label:"Container"},{kind:"sprite",label:"Sprite"},{kind:"text",label:"Text"},{kind:"graphics",label:"Graphics"}],T=/\.(png|jpe?g|webp|gif|svg)(\?.*)?$/i,Ot="a canvas structural edit would have to add, delete or move a construction statement in the world's own source, and this lane plans property writes only — an editor-created node has no construction site there at all",_="origin",Ct="#ff2d92",jt="this world's write target has no origin write, so the pivot/anchor can be seen here but not dragged";function M(i){const t=i,e=t.anchor,r=t.texture;return e&&r?.orig?{anchor:e,texture:r}:null}function kt(i){const t=M(i);if(!t)return null;const e=i.bounds;return typeof e?.width=="number"&&typeof e.height=="number"?{x:e.width,y:e.height}:{x:t.texture.orig.width,y:t.texture.orig.height}}function Et(i){return H.find(e=>e.kind===i)?.label??i}function Tt(i,t){switch(t){case"container":return new i.Container;case"sprite":{const e=new i.Sprite(i.Texture.WHITE);return e.setSize(64,64),e}case"text":return new i.Text({text:"Text",style:{fill:16777215,fontSize:24}});case"graphics":return new i.Graphics().rect(0,0,100,100).fill(16777215);default:return null}}function P(i,t){const e=_t(i,t);At(t,e);for(const r of t.children??[])e.addChild(P(i,r));return e}function _t(i,t){if(t.constructor===i.Container)return new i.Container;if(t.constructor===i.Sprite){const e=t,r=new i.Sprite(e.texture);return r.anchor.set(e.anchor.x,e.anchor.y),r}if(t.constructor===i.Text){const e=t,r=new i.Text({text:e.text,style:e.style.clone()});return r.anchor.set(e.anchor.x,e.anchor.y),r}if(t.constructor===i.Graphics)return t.clone(!0);throw new Error(`"${t.label??t.constructor?.name??"this node"}" cannot be duplicated: a ${t.constructor?.name??"custom"} is constructed by the game's own code, and copying only its display half would put a lookalike with no behaviour into the world.`)}function At(i,t){t.label=i.label,t.position.set(i.position.x,i.position.y),t.scale.set(i.scale.x,i.scale.y),t.pivot.set(i.pivot.x,i.pivot.y),t.skew.set(i.skew.x,i.skew.y),t.rotation=i.rotation,t.alpha=i.alpha,t.visible=i.visible,"tint"in i&&"tint"in t&&(t.tint=i.tint)}function Lt(i){const t=new Set;return(i.x!==void 0||i.y!==void 0||i.originX!==void 0||i.originY!==void 0)&&t.add("position"),(i.width!==void 0||i.height!==void 0||i.scaleXFactor!==void 0||i.scaleYFactor!==void 0)&&(t.add("scale"),(i.width!==void 0||i.height!==void 0)&&t.add("position")),i.rotate!==void 0&&t.add("rotation"),[...t]}function Nt(i,t){const e=t*Math.PI/180/2,r=Math.sin(e),n=Math.cos(e),[o,s,a,c]=i.rotation;return[o*n+s*r,s*n-o*r,a*n+c*r,c*n-a*r]}function Ft(i,t){const e={position:[...i.transform.position],rotation:[...i.transform.rotation],scale:[...i.transform.scale]},r=t.rotate;r!==void 0&&(e.rotation=Nt(i.transform,r));const n=t.width;n!==void 0&&i.rect.width>0&&(e.scale[0]=i.transform.scale[0]*Math.max(1e-4,n/i.rect.width));const o=t.height;o!==void 0&&i.rect.height>0&&(e.scale[1]=i.transform.scale[1]*Math.max(1e-4,o/i.rect.height));const s=t.scaleStep,a=d=>s!==void 0&&s>0?Math.round(d/s)*s:d,c=d=>Math.abs(d)>=1e-4?d:d<0?-1e-4:1e-4,u=t.scaleXFactor;u!==void 0&&(e.scale[0]=c(a(i.transform.scale[0]*u)));const l=t.scaleYFactor;return l!==void 0&&(e.scale[1]=c(a(i.transform.scale[1]*l))),e}function $t(i,t,e,r){return r.originX!==void 0||r.originY!==void 0?{dx:r.originX!==void 0&&i?r.originX-i.x:0,dy:r.originY!==void 0&&i?r.originY-i.y:0}:{dx:t?(r.x??e.x)-t.x:0,dy:t?(r.y??e.y)-t.y:0}}class Rt{constructor(t,e,r){this.root=t,this.store=e,this.target=r.target,this.pixi=r.pixi??B,this.transforms={dimensions:()=>"2d",get:c=>{const u=this.a2d.getTransform(c);return u?z(u):{position:[0,0,0],rotation:[0,0,0,1],scale:[1,1,1]}},editability:(c,u)=>this.target.transformEditability(c,u),beginEdit:c=>this.target.beginTransformEdit(c),apply:(c,u)=>{this.target.writeTransform(c,Y(u)),this.notify()},endEdit:c=>this.target.endTransformEdit(c),...this.target.removeTransform?{remove:(c,u)=>this.target.removeTransform?.(c,u)}:{}},this.loadTexture=r.loadTexture??(c=>this.pixi.Assets.load(c)),this.capturePreview=r.capturePreview,this.structureHistory=new It(t,e,r.journal,()=>this.afterStructuralChange()),this.a2d=new at(t,{...r.identity?{identity:r.identity}:{}}),this.projector=new lt(t,this.a2d,{surface:r.surface??(()=>null),...r.pointFromClient?{pointFromClient:r.pointFromClient}:{}}),this.provenance=this.target.provenance,r.surface&&(this.pickable={pick:(c,u)=>{const l=this.projector.pick(c,u,d=>this.isPickLocked(d));return l&&this.groupOf(l)},candidates:(c,u)=>this.projector.candidates(c,u,l=>this.isPickLocked(l))},this.rects={rect:c=>this.projector.rect(c),frame:c=>this.projector.frame(c),contextRects:c=>this.projector.contextRects(c)}),r.stories&&(this.stories=r.stories),this.watchStructure(t),this.capabilities={transform:!0,inspectorFields:!0,persist:this.target.provenance.source==="source-code"&&this.target.persistence!==void 0},this.target.bind({a2d:this.a2d,store:e,journal:r.journal,notify:()=>this.notify()}),this.structure=this.target.structure??this.liveStructure,this.assetDrop=this.target.assetDrop??{accepts:(c,u)=>T.test(u)&&this.containerFor(c||null)!==null,drop:(c,u,l)=>this.dropAsset(c,u,l)};const o=this.target.persistence;o&&(this.persistence=o);const s=this.target.truth?.bind(this.target);s&&(this.truth={resolve:(c,u)=>s(c,u)},this.related=W(c=>s(c,"position").site)),!r.stories&&this.target.componentIdentity&&(this.stories=U("canvas",e.shell,c=>this.target.componentIdentity?.(c)??null));const a=this.target.instances?.();a&&(this.instances={describe:c=>a.describe(c),...a.openComponent?{openComponent:c=>a.openComponent?.(c)}:{},revert:(c,u)=>a.revert(c,u),applyToComponent:(c,u)=>a.applyToComponent(c,u)})}capabilities;provenance;pickable;rects;persistence;truth;related;structure;stories;instances;transforms;a2d;projector;target;pixi;structureHistory;loadTexture;capturePreview;listeners=new Set;boxEditSessions=new Map;lockedIds=new Set;groupedIds=new Set;refresh(){return this.projector.refresh()}previewImage(t,e,r){const n=this.projector.object(t);return n&&this.capturePreview?this.capturePreview(n,{width:e,height:r}):Promise.resolve(null)}notify(){for(const t of this.listeners)t()}watchedForStructure=[];structureNotifyQueued=!1;onStructureChanged=()=>{this.projector.invalidate(),!this.structureNotifyQueued&&(this.structureNotifyQueued=!0,queueMicrotask(()=>{this.structureNotifyQueued=!1,this.projector.reproject(),this.watchStructure(this.root),this.target.onReindex(),this.notify(),this.store.shell.notifyIngestEdit()}))};watchStructure(t){for(const r of this.watchedForStructure)r.off("childAdded",this.onStructureChanged),r.off("childRemoved",this.onStructureChanged);this.watchedForStructure=[];const e=r=>{typeof r.on=="function"&&typeof r.off=="function"&&(r.on("childAdded",this.onStructureChanged),r.on("childRemoved",this.onStructureChanged),this.watchedForStructure.push(r));for(const n of r.children??[])e(n)};e(t)}hierarchy={roots:()=>(this.projector.project(),this.projector.roots().map(t=>this.toEditorNode(t.id)).filter(t=>t!==null)),node:t=>this.toEditorNode(t)};toEditorNode(t){const e=this.projector.node(t);if(!e)return null;const r=this.projector.object(t),n=r?R(r):!1,o=n?mt(r):void 0;return{id:e.id,label:(n&&r?gt(r):void 0)??e.label,role:n?"component":"entity",kind:e.kind,...o?{typeLabel:o}:{},parentId:e.parentId,childIds:e.childIds}}selection={get:()=>[...this.store.shell.selectedEntityIds],set:t=>{this.store.shell.selectMultiple(t),this.notify()}};liveStructure={create:(t,e)=>this.createStructuralNode(t,e??null),remove:t=>this.removeStructuralNodes([t]),removeMany:t=>this.removeStructuralNodes(t),duplicate:t=>this.duplicateStructuralNode(t),reparent:(t,e)=>this.reparentStructuralNode(t,e),reorder:(t,e)=>this.reorderStructuralNode(t,e),creatableKinds:()=>H.map(t=>({...t}))};containerFor(t){if(!t)return this.root;const e=this.projector.object(t);return!e||typeof e.addChild!="function"?null:e}refuseStructure(t){return C({resolve:()=>j(t),record:()=>{},report:e=>m.warn(`[canvas] structural edit refused — ${e}`,"authoring")})}reportStructureLiveOnly(t){return C({resolve:()=>j(Ot),record:()=>{},report:e=>{if(this.target.reportStructureLiveOnly){this.target.reportStructureLiveOnly(t,e);return}m.log(`[canvas] ${t} is live-only — ${e}.`,"authoring")}})}afterStructuralChange(){this.projector.reproject(),this.watchStructure(this.root),this.target.onReindex(),this.notify(),this.store.shell.notifyIngestEdit()}idOf(t){return t.__authId??""}createStructuralNode(t,e){const r=this.containerFor(e);if(!r)return{id:"",ack:this.refuseStructure(`no node with id "${e}" can hold children.`)};const n=Tt(this.pixi,t);if(!n)return{id:"",ack:this.refuseStructure(`"${t}" is not a kind this canvas surface can construct.`)};n.label=Et(t);const o=`Create ${n.label}`;return this.structureHistory.track(r),this.structureHistory.track(n),this.structureHistory.run(o,()=>{r.addChild(n)}),this.afterStructuralChange(),{id:this.idOf(n),ack:this.reportStructureLiveOnly(o)}}removeStructuralNodes(t){const e=[];let r=null;for(const o of t){const s=this.projector.object(o);if(!s?.parent){r=this.refuseStructure(`"${o}" is not a removable node in this tree.`);continue}e.push(s)}if(e.length===0)return r??this.refuseStructure("the selection held no removable node.");const n=e.length===1?`Delete ${e[0].label??"node"}`:`Delete ${e.length} nodes`;for(const o of e)this.structureHistory.track(o),o.parent&&this.structureHistory.track(o.parent);return this.structureHistory.run(n,()=>{for(const o of e)o.parent?.removeChild(o)}),this.afterStructuralChange(),this.reportStructureLiveOnly(n)}duplicateStructuralNode(t){const e=this.projector.object(t),r=e?.parent??null;if(!e||!r)throw new Error(`"${t}" is not a duplicable node in this tree.`);const n=P(this.pixi,e);n.label=`${e.label||"node"} copy`;const o=`Duplicate ${e.label??"node"}`,s=r.children.indexOf(e);return this.structureHistory.track(r),this.structureHistory.track(n),this.structureHistory.run(o,()=>{r.addChildAt(n,s+1)}),this.afterStructuralChange(),{id:this.idOf(n),ack:this.reportStructureLiveOnly(o)}}reparentStructuralNode(t,e){const r=this.projector.object(t);if(!r)return this.refuseStructure(`"${t}" is not a node in this tree.`);const n=this.containerFor(e);if(!n)return this.refuseStructure(`no node with id "${e}" can hold children.`);if(n===r||this.isAncestorOf(r,n))return this.refuseStructure("a node cannot be reparented into itself or its own descendant.");const o=this.localToRootMatrix(r),s=this.localToRootMatrix(n),a=`Move ${r.label??"node"}`;return this.structureHistory.track(r),r.parent&&this.structureHistory.track(r.parent),this.structureHistory.track(n),this.structureHistory.run(a,()=>{n.addChild(r),r.setFromMatrix(s.clone().invert().append(o))}),this.afterStructuralChange(),this.reportStructureLiveOnly(a)}reorderStructuralNode(t,e){const r=this.projector.object(t),n=r?.parent??null;if(!r||!n)return this.refuseStructure(`"${t}" is not a reorderable node in this tree.`);const o=e?this.projector.object(e):null;if(e&&(!o||o.parent!==n))return this.refuseStructure(`"${e}" is not a sibling of "${t}".`);const s=`Reorder ${r.label??"node"}`;return this.structureHistory.track(n),this.structureHistory.track(r),this.structureHistory.run(s,()=>{const a=n.children.indexOf(r),c=o?n.children.indexOf(o):n.children.length;n.addChildAt(r,Math.max(0,a<c?c-1:c))}),this.afterStructuralChange(),this.reportStructureLiveOnly(s)}isAncestorOf(t,e){let r=e.parent;for(;r;){if(r===t)return!0;r=r.parent}return!1}localToRootMatrix(t){const e=[];let r=t;for(;r&&r!==this.root;)e.push(r),r=r.parent;const n=new this.pixi.Matrix;for(let o=e.length-1;o>=0;o--){const s=e[o];s.updateLocalTransform(),n.append(s.localTransform)}return n}assetDrop;async dropAsset(t,e,r){if(!T.test(e))return this.refuseStructure(`${e} is not an image. A canvas world mounts an image as a Sprite; a model or an audio file has no display object to become here.`);const n=this.containerFor(t||null);if(!n)return this.refuseStructure(`no node with id "${t}" can hold a dropped asset.`);let o;try{o=await this.loadTexture(e)}catch(u){return this.refuseStructure(`${e} could not be loaded as a texture: ${u instanceof Error?u.message:String(u)}`)}const s=new this.pixi.Sprite(o);s.anchor.set(.5,.5),s.label=e.split("/").pop()??"Sprite";const a=r?.position;if(a){const u=this.localToRootMatrix(n).clone().invert().apply({x:a[0],y:a[1]});s.position.set(u.x,u.y)}const c=`Add ${s.label}`;return this.structureHistory.track(n),this.structureHistory.track(s),this.structureHistory.run(c,()=>{n.addChild(s)}),this.afterStructuralChange(),this.reportStructureLiveOnly(c)}boxEdit={begin:t=>{const e=this.projector.rect(t);if(!e){this.boxEditSessions.delete(t);return}this.boxEditSessions.set(t,{id:t,rect:e,transform:this.transforms.get(t)}),this.transforms.beginEdit?.(t)},apply:(t,e)=>this.applyBoxEdit(t,e),end:t=>{const e=this.boxEditSessions.get(t);this.boxEditSessions.delete(t),e&&this.transforms.endEdit?.(t)},gizmoOrigin:t=>this.gizmoOriginOf(t)};gizmoOriginOf(t){const e=this.projector.object(t);if(!e||typeof e.getGlobalPosition!="function")return null;const r=e.getGlobalPosition();return{x:r.x,y:r.y}}applyBoxEdit(t,e){const r=this.boxEditSessions.get(t);if(!r||Lt(e).some(o=>this.transforms.editability?.(t,o).writable===!1))return;const n=Ft(r,e);this.transforms.apply(t,n),!(e.x===void 0&&e.y===void 0&&e.originX===void 0&&e.originY===void 0&&e.width===void 0&&e.height===void 0)&&this.repositionBoxEditBounds(t,r,e,n)}repositionBoxEditBounds(t,e,r,n){const o=this.projector.object(t);if(!o)return;const s=this.gizmoOriginOf(t),a=this.projector.rect(t),{dx:c,dy:u}=$t(s,a,e.rect,r),l=o.parent;if(l&&typeof l.toLocal=="function"){const d=l.toLocal({x:0,y:0}),f=l.toLocal({x:c,y:u});n.position[0]+=f.x-d.x,n.position[1]+=f.y-d.y}else n.position[0]+=c,n.position[1]+=u;this.transforms.apply(t,n)}spatialHandles={layers:t=>{const e=this.originOf(t);if(!e)return[];const r=this.target.transformEditability(t,"position"),n=!!this.target.writeOrigin&&r.writable;return[{id:`origin:${t}`,category:"origin",guides:[],handles:[{id:_,label:e.kind==="anchor"?"Sprite anchor":"Pivot",position:[e.world.x,e.world.y,0],color:Ct,writable:n,...n?{}:{reason:this.target.writeOrigin&&r.reason?r.reason:jt}}]}]},preview:(t,e,r)=>{this.moveOrigin(t,e,r,"preview")},commit:(t,e,r)=>this.moveOrigin(t,e,r,"commit")};originEditId=null;originOf(t){const e=this.projector.object(t);if(!e||typeof e.updateLocalTransform!="function")return null;const r=M(e),n=r?"anchor":"pivot",o=r?{x:r.anchor.x,y:r.anchor.y}:{x:e.pivot.x,y:e.pivot.y},s=r?{x:0,y:0}:o,a=this.localToRootMatrix(e).apply({x:s.x,y:s.y});return{kind:n,value:o,world:{x:a.x,y:a.y}}}moveOrigin(t,e,r,n){if(e!==_)return;const o=this.originOf(t),s=this.projector.object(t),a=this.target.writeOrigin;if(!o||!s||!a||!this.target.transformEditability(t,"position").writable)return;this.originEditId!==t&&(this.target.beginTransformEdit(t),this.originEditId=t),s.updateLocalTransform();const c=this.localToRootMatrix(s).clone().invert().apply({x:r[0],y:r[1]}),u=o.kind==="anchor"?{x:0,y:0}:o.value,l={x:c.x-u.x,y:c.y-u.y},d=o.kind==="anchor"?kt(s):null;if(o.kind==="anchor"&&(!d||d.x===0||d.y===0))return;const f=d?[o.value.x+l.x/d.x,o.value.y+l.y/d.y]:[c.x,c.y],p=s.localTransform,y=this.a2d.getTransform(t);if(a(t,o.kind,f),y&&this.target.writeTransform(t,{...y,position:[y.position[0]+p.a*l.x+p.c*l.y,y.position[1]+p.b*l.x+p.d*l.y]}),this.notify(),n==="commit"){const D=this.target.endTransformEdit(t);return this.originEditId=null,D}}inspector={properties:t=>[...this.target.properties(t),{path:"locked",label:"Locked",type:"boolean",group:"Visibility"},{path:"grouped",label:"Grouped",type:"boolean",group:"Visibility"}],get:(t,e)=>e==="locked"?this.lockedIds.has(t):e==="grouped"?this.groupedIds.has(t):this.target.get(t,e),set:(t,e,r)=>{if(e==="locked"||e==="grouped"){const n=e==="locked"?this.lockedIds:this.groupedIds;r===!0?n.add(t):n.delete(t),this.notify();return}return this.target.set(t,e,r)},remove:(t,e)=>this.target.remove?.(t,e)};groupOf(t){let e=t,r=t;for(;r;)this.groupedIds.has(r)&&(e=r),r=this.projector.node(r)?.parentId??null;return e}isPickLocked(t){let e=t;for(;e;){if(this.lockedIds.has(e))return!0;e=this.projector.node(e)?.parentId??null}return!1}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}dispose(){this.boxEditSessions.clear(),this.lockedIds.clear(),this.groupedIds.clear();for(const t of this.watchedForStructure)t.off("childAdded",this.onStructureChanged),t.off("childRemoved",this.onStructureChanged);this.watchedForStructure=[],this.structureHistory.dispose(),this.target.dispose(),this.listeners.clear()}}const Xt=Object.freeze(Object.defineProperty({__proto__:null,PixiAuthoringAdapter:Rt},Symbol.toStringTag,{value:"Module"}));export{Rt as P,bt as a,Gt as c,R as i,Wt as o,Xt as p,yt as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{M as N,bk as G,bl as Q,aq as X,bm as Z,bi as ee,bj as te}from"./index-BRJMIUK0.js";import{J as ne,c as D}from"./json-history-resource-DwS10tqD.js";import{m as re,p as ie}from"./source-persistence-backend-CwLYVPXj.js";import{t as oe}from"./pixi-transform-channels-P4rvmusc.js";import"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./jsx-runtime-DPjLkJKQ.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./ingest-source-persistence-Dmdo-UBp.js";function $(u){if(!u||typeof u!="object")return;const c=u;return typeof c.x=="number"&&typeof c.y=="number"?[c.x,c.y]:void 0}function _(u,c,l){const s=u;!l||!$(s[c])||(s[c]={x:l[0],y:l[1]})}function se(u){return`#${(u&16777215).toString(16).padStart(6,"0")}`}function ae(u){return Number.parseInt(u.replace("#",""),16)}const le=["position","rotation","scale"];function je(u){const{physics:c}=u,l=u.persistence??null;let s,p=()=>{},h=null,S,T,w=!1,L=!1;const m=()=>{const t={},n=e=>{const r=s.node(e),i=s.displayObject(e);if(!r||!i)return;let o=null;try{o=s.getTransform(e)}catch{}const a=$(i.pivot),f=$(i.anchor);t[e]={label:i.label??"",alpha:i.alpha,visible:i.visible,..."tint"in i?{tint:i.tint}:{},...o?{transform:o}:{},...a?{pivot:a}:{},...f?{anchor:f}:{}};for(const d of r.childIds)n(d)};for(const e of s.roots())n(e.id);return{overlay:structuredClone(s.serializeOverlay()),nodes:t}},V=t=>{for(const[n,e]of Object.entries(t.nodes)){const r=s.displayObject(n);r&&(r.label=e.label,r.alpha=e.alpha,r.visible=e.visible,e.tint!==void 0&&"tint"in r&&(r.tint=e.tint),_(r,"pivot",e.pivot),_(r,"anchor",e.anchor),e.transform&&s.setTransform(n,e.transform))}s.replaceOverlay(t.overlay),p()},v=(t,n)=>{h&&n&&h.record(t,n,m()).catch(e=>{N.error(`[canvas] failed to journal "${t}" into project history — the edit is applied but has no history entry (it cannot be undone): ${e instanceof Error?e.message:String(e)}`,"authoring")})},A=(t,n,e)=>{const r=s.displayObject(t);r&&(n==="name"?s.set(t,"label",e):n==="tint"?s.set(t,"tint",ae(e)):n==="visible"?s.set(t,"visible",e):n==="alpha"?s.set(t,"alpha",e):r[n]=e,p())},x=(t,n)=>{const e=s.displayObject(t);if(e)return n==="name"?e.label:n==="tint"?se(e.tint??16777215):e[n]},b=(t,n)=>{const e=s.getTransform(t);return n==="position"?e?[...e.position]:void 0:n==="rotation"?e?e.rotation:void 0:n==="scale"?e?[...e.scale]:void 0:x(t,n)},P=(t,n,e)=>{if(n==="position"&&Array.isArray(e))s.setTransform(t,{position:[e[0]??0,e[1]??0]});else if(n==="rotation"&&typeof e=="number")s.setTransform(t,{rotation:e});else if(n==="scale"&&Array.isArray(e))s.setTransform(t,{scale:[e[0]??1,e[1]??1]});else{A(t,n,e);return}p()},y=(t,n)=>{const e=ee(s.displayObject(t)??null);return{entityId:t,property:n,surface:"pixi",anchor:e,anchorKind:e.anchored?"construction-literal":"live-only",instances:e.anchored&&e.kind==="source"?te(e):0}},g=t=>s.node(t)?.label??"2D Object",I=(t,n,e,r,i,o)=>{if(l){if(r===null||i===void 0||o===void 0){v(n,e);return}return ie({backend:l,subject:()=>y(t,r),baseline:i,next:o,label:n,journal:()=>v(n,e)})}},K=t=>{const n=[{path:"name",label:"Name",type:"string"},{path:"visible",label:"Visible",type:"boolean"},{path:"alpha",label:"Alpha",type:"number"}],e=s.displayObject(t);return e&&"tint"in e&&n.push({path:"tint",label:"Tint",type:"color"}),n},O=new Map,R=new Map,j=t=>t.anchored&&t.kind==="source"?`${t.file}:${t.line}:${t.col}`:null,E=t=>[{path:"position",label:"Position"},{path:"rotation",label:"Rotation"},{path:"scale",label:"Scale"},...K(t).map(n=>({path:n.path,label:n.label}))],k=(t,n,e,r)=>{const i=R.get(n);if(i)return i;const o=l?.readSiteLiterals,a=E(t).map(d=>({property:d.path,live:b(t,d.path)})).filter(d=>d.live!==void 0);if(!o||a.length===0)return Promise.resolve({});const f=o({anchor:e,instances:r,writeScope:"creation-site",surface:"pixi",properties:a}).then(d=>(O.set(n,d),p(),d));return R.set(n,f),f},W=(t,n,e,r)=>{const i=O.get(n);return i||(k(t,n,e,r),null)},q=1e-6,M=(t,n)=>Array.isArray(t)&&Array.isArray(n)?t.length===n.length&&t.every((e,r)=>M(e,n[r])):typeof t=="number"&&typeof n=="number"?Math.abs(t-n)<=q:t===n,C=t=>s.displayObject(t)?.constructor?.name||(s.node(t)?.kind??"2D Object"),H=t=>`${t} ${t===1?"instance":"instances"}`,z=(t,n,e,r)=>{const i=b(t,n.path);if(!e||e.literal===null||i===void 0||M(e.literal,i))return null;const o=l?.gate({...r,property:n.path,writeScope:"creation-site"}),a=e.writable?o?.ok?void 0:o?.reason:e.reason;return{path:n.path,label:n.label,value:i,...e.text?{defaultText:e.text}:{},canApplyToComponent:a===void 0,...a===void 0?{}:{applyUnavailableReason:a},affectedInstanceCount:r.instances}},B=(t,n,e,r)=>{if(!l||!e||e.literal===null||r===void 0)return{ok:!1,message:e?.reason??`The construction site names no ${n} for this object, so there is no default to change.`};if(!e.writable)return{ok:!1,message:e.reason??`The construction site's ${n} cannot be rewritten.`};const i=l.gate({...t,writeScope:"creation-site"});return i.ok?{ok:!0,backend:l,baseline:e.literal,next:r}:{ok:!1,message:i.reason}},J=async t=>{const n=y(t,"position"),e=j(n.anchor);return e?O.get(e)??await k(t,e,n.anchor,n.instances):null},Y={describe:t=>{const n=y(t,"position"),e=j(n.anchor);if(!e||!s.displayObject(t))return null;const r=W(t,e,n.anchor,n.instances);if(!r||Object.keys(r).length===0)return null;const i=E(t).map(o=>z(t,o,r[o.path],n)).filter(o=>o!==null);return{componentName:C(t),...n.anchor.anchored?{sourcePath:n.anchor.display}:{},overrides:i}},revert:async(t,n)=>{const e=await J(t);if(!e)return;const r=m(),i=[];for(const o of n){const a=e[o]?.literal;a!=null&&(P(t,o,a),i.push(o))}if(i.length!==0)return v(i.length===1?`Revert ${g(t)} ${i[0]}`:`Revert ${i.length} ${g(t)} overrides`,r),p(),Z},applyToComponent:async(t,n)=>{const e={...y(t,n),writeScope:"creation-site"},r=j(e.anchor),i=(await J(t))?.[n],o=b(t,n),a=B(e,n,i,o);if(!a.ok)return{changed:!1,message:a.message};const f=`Apply ${n} to ${C(t)} default (${H(e.instances)})`;return await a.backend.write({...e,baseline:a.baseline,next:a.next,label:f})?(r&&O.delete(r),p(),{changed:!0,message:`${n} now reads ${JSON.stringify(o)} for all ${H(e.instances)} at ${e.anchor.anchored?e.anchor.display:"its creation site"}.`,write:{destination:e.anchor.anchored?e.anchor.display:"creation site",persisted:!0}}):{changed:!1,message:`${f} did not land — the editor console names why.`}}};return{provenance:l?{source:"foreign",label:"creation-site",detail:"Live 2D (PixiJS) tree projected directly — an edit is written into the game’s own source at the line that constructed the object, and says why whenever it cannot be."}:{source:"foreign",label:"live-only",detail:"Live 2D (PixiJS) tree projected directly — edits apply for this session only and are never saved."},get persistence(){const t=l;return t?{...D(),get destination(){return t.destination()}}:{...D(),destination:X}},truth:(t,n)=>{const e=y(t,n);if(e.anchorKind==="live-only")return{site:e.anchor,writeAnchorKind:"live-only"};const r=j(e.anchor);if(!r)return{site:e.anchor,writeAnchorKind:"live-only"};const i=O.get(r);if(!i)return k(t,r,e.anchor,e.instances),{site:e.anchor,writeAnchorKind:void 0};const o=i[n];return{site:e.anchor,writeAnchorKind:o?.writable?"construction-literal":"live-only"}},componentIdentity:t=>s.displayObject(t)?{name:C(t)}:null,...l?.readSiteLiterals?{instances:()=>Y}:{},writeOrigin(t,n,e){h?.assertCanMutate();const r=s.displayObject(t);!r||!$(r[n])||(r[n]={x:e[0],y:e[1]},w=!0,p())},bind(t){s=t.a2d,p=t.notify;const n=t.store.shell.projectHistory;h=n?new ne({history:n,kind:"session-state",scope:"session",subject:{...t.journal,id:`${t.journal.id}/world-2d-edits`},displayName:"World 2D edits",capture:m,conflictIdentity:e=>e.overlay,restore:async e=>{V(e)}}):null,l?.attach({read:b,apply:P})},onReindex(){},transformEditability(t,n){if(!l)return{writable:!0};const e=y(t,n),r=e.anchorKind!=="live-only"&&l.removal?.available(e)?{removable:!0}:{};return{writable:!0,reason:l.describe(e),...r}},beginTransformEdit(t){h?.assertCanMutate();const n=s.displayObject(t);n&&c.ownerOf(n)==="physics"&&c.freeze(n),S=m(),T=l?s.getTransform(t)??void 0:void 0,w=!1},writeTransform(t,n){h?.assertCanMutate();const e=s.displayObject(t);e&&c.ownerOf(e)==="physics"&&c.commit(e,n.position,n.rotation),s.setTransform(t,n),p()},endTransformEdit(t){const n=s.displayObject(t);n&&c.ownerOf(n)==="physics"&&c.unfreeze(n);const e=`Transform ${g(t)}`,r=S,i=T,o=w;if(S=void 0,T=void 0,w=!1,!l){v(e,r);return}const a=s.getTransform(t)??void 0,f=o?["origin"]:[];i&&a&&f.push(...le.filter(U=>oe(U,i,a))),f.length>1&&l.report(e,re(f));const d=f.length===1&&f[0]!=="origin"?f[0]:null;return I(t,e,r,d,d?F(i,d):void 0,d?F(a,d):void 0)},removeTransform(t,n){const e=l,r=e?.removal;if(!e||!r)return;const i=`Remove ${g(t)} ${n}`;return G({resolve:()=>{const o=y(t,n);return o.anchorKind==="live-only"||!r.available(o)?Q(e.describe(o)):{reaches:"writer",anchorKind:o.anchorKind,destination:e.destination(),write:()=>r.perform({...o,label:i})}},record:()=>{},report:o=>{e.armed()&&e.report(i,o)}})},reportStructureLiveOnly(t,n){if(l?.armed()){l.report(t,n);return}if(!L){L=!0,N.warn(`[canvas] structural edits in this world are live-only — ${n}. First one: ${t}.`,"authoring");return}N.log(`[canvas] ${t} is live-only — ${n}.`,"authoring")},properties:K,get(t,n){return x(t,n)},set(t,n,e){h?.assertCanMutate();const r=m(),i=`Set ${g(t)} ${n}`;if(!l){A(t,n,e),v(i,r);return}const o=b(t,n);A(t,n,e);const a=b(t,n),f=o!==void 0&&a!==void 0&&JSON.stringify(o)!==JSON.stringify(a);return I(t,i,r,f?n:null,o,a)},dispose(){h?.dispose(),h=null,l?.dispose()}}}function F(u,c){if(u){if(c==="position")return[...u.position];if(c==="rotation")return u.rotation;if(c==="scale")return[...u.scale]}}export{je as createLiveCanvasWriteTarget};
|