@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,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{ed as h,_ as v,dj as y,ee as w,a8 as g}from"./index-BRJMIUK0.js";import{n as b,a as R}from"./native-debug-module-2_HVupdg.js";import{assertNever as f}from"./adapter-surface-Y37Nzcyw.js";import{a as E}from"./entry-adjudication-Dc18TIqT.js";import{a as A}from"./realm-services-CnY105XU.js";import{r as j}from"./relative-path-guard-GiM7Lsz8.js";import{f as k,m as x}from"./capability-coverage-DZ-onC5j.js";import{a as M,b as $}from"./react-root-BHA-cdrW.js";function P(e,o){const r=n=>{throw new Error(`resolveRootBinding: world "${e.id}" declares { module: "${o}" } — ${n} (the module path must be game-folder-relative, normalized, with no \`..\` escape).`)},t=j(o);t==="empty"&&r("the module path is empty"),t==="nul"&&r("the module path contains a NUL byte"),t==="absolute"&&r("the module path is absolute, not game-folder-relative"),t==="traversal"&&r("the module path contains a `..` segment and would escape the game folder"),o.includes("\\")&&r("the module path contains a backslash (not POSIX-relative)");const a=o.split("/").filter(n=>n.length>0&&n!==".").join("/");return a===""&&r("the module path resolves to nothing (empty after normalization)"),a}function u(e,o,r){const t=n=>{throw new Error(`resolveRootBinding: world "${e.id}"'s custom adapter module "${o}" ${n} — a { module } adapter must default-export an object shaped like \`RootAdapter\`: \`{ id: string, mount(host): Promise<MountedThreeRoot> }\`.`)};(r===null||typeof r!="object")&&t("has no default export (or it is not an object)");const a=r;(typeof a.id!="string"||a.id.length===0)&&t("default-exports an object with no non-empty string `id`"),typeof a.mount!="function"&&t("default-exports an object with no `mount` function")}const D="this world mounts through the project’s own adapter module, so every capability the editor has here is one that module hands it";function p(e,o){return{id:o.id,async mount(r){const t=await o.mount(r),a=k(e.id,x(t),D,t.kind);if(a){const{editorConsole:n}=await v(async()=>{const{editorConsole:i}=await import("./index-BRJMIUK0.js").then(s=>s.tD);return{editorConsole:i}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]));n.warn(a,"adapter")}return t}}}async function S(e,o,r){const{adapter:t}=e;if(t.type!=="module")throw new Error(`resolveModuleAdapter: world "${e.id}" is not a { module } world.`);const a=P(e,t.module),i=await import(h(o,a,r)),s=i.default;switch(e.surface){case"three":return u(e,t.module,s),{resolved:{surface:"three",adapter:p(e,s)},module:i};case"canvas":return u(e,t.module,s),{resolved:{surface:"canvas",adapter:p(e,s)},module:i};case"dom":return u(e,t.module,s),{resolved:{surface:"dom",adapter:p(e,s)},module:i};default:return f(e.surface,"resolveModuleAdapter")}}async function _(e,o,r,t){const{adapter:a,module:n}=await O(e,o,t);return{adapter:a,declaration:I(e,r,n)}}function I(e,o,r){const t=b(e.id,r),a=R(e.id,r,e.surface);return{root:e,definition:o,entry:{reach:"full",module:r},...t?{entryDebug:t}:{},...a?{entrySystems:a}:{}}}async function O(e,o,r){const{adapter:t}=e;switch(t.identity){case"three":return B(e,o,r);case"canvas":return C(e,o,r);case"dom":{let a={};return{adapter:{surface:"dom",adapter:await $(e,o,i=>{a=i})},module:a}}case"module":{const{resolved:a,module:n}=await S(e,o.projectRoot,o.epoch);return{adapter:a,module:n}}case"ingest-react":{const{adapter:a,module:n}=await M(e,o);return{adapter:{surface:"dom",adapter:a},module:n}}case"ingest-pixi":case"ingest-three":return T(e);default:{const a=t;throw new Error(`resolveRootBinding: unhandled adapter identity ${JSON.stringify(a)}`)}}}async function B(e,o,r){if(e.entry===void 0)throw new Error(`resolveRootBinding: world "${e.id}" is a three root with no \`entry\` — this should have been rejected by manifest validation. A three root is authored as a TSX/R3F world module.`);const t=await o.loadEntryModule(e.entry,e.id,"three",r?.selectionOverride),a=await E(t,e.id,{entryPath:e.entry});if(!a)throw new Error(`Project script at ${e.entry} neither exports \`adapter\` nor default-exports a React world component — every explicit first-party entry module satisfies one of the two (\`export default function World() { … }\`, or an \`adapter\` export for full control).`);return{adapter:{surface:"three",adapter:a},module:t}}async function C(e,o,r){if(e.entry===void 0)throw new Error(`resolveRootBinding: world "${e.id}" is a canvas root with no \`entry\` — this should have been rejected by manifest validation. A canvas root is authored as a TSX world module; point \`entry\` at it.`);const t=await o.loadEntryModule(e.entry,e.id,"canvas",r?.selectionOverride),a=await o.pixiRuntime(t,e.id);if(!a)throw new Error(`Project script at ${e.entry} (canvas root "${e.id}") must default-export a React component (\`export default function World() { … }\`) — or export an \`adapter\` for full control.`);return{adapter:{surface:"canvas",adapter:a},module:t}}function T(e){const o=e.adapter.identity==="ingest-pixi"?"resolveIngest2DDescriptor + mountCanvasIngestRootFromManifest":"resolveIngestDescriptor + mountThreeIngestRootFromManifest";throw new Error(`resolveRootBinding: world "${e.id}" (${e.adapter.identity}) is a captured foreign runtime, not a host-mounted RootAdapter; dispatch it through ${o}`)}async function m(e,o,r){const t=y(),a=await A(o,t),n=await w(),i=[];for(const s of g(e)){const d=r?.selectionOverride,c=await _(s,a,n,{...d&&s.id===d.regionId?{selectionOverride:{selection:d.selection,key:d.key}}:{}});i.push({world:s,resolved:c})}return{roots:i,mountId:String(t)}}async function J(e,o){const{roots:r}=await m(e,o),t=[];for(const{world:a,resolved:n}of r){const i={id:a.id,zOrder:a.zOrder,pausable:a.pausable,declaration:n.declaration},s=n.adapter;switch(s.surface){case"canvas":t.push({...i,kind:"canvas",adapter:s.adapter});break;case"dom":t.push({...i,kind:"dom",adapter:s.adapter});break;case"three":t.push({...i,kind:"three",adapter:s.adapter});break;default:f(s,"resolveAllRoots")}}return t}async function V(e,o,r){const{roots:t,mountId:a}=await m(e,o,r),n={};for(const{world:i,resolved:s}of t){const{root:d,...c}=s.declaration,l=s.adapter;switch(l.surface){case"canvas":n[i.id]={kind:"canvas",adapter:l.adapter,declaration:c};break;case"dom":n[i.id]={kind:"dom",adapter:l.adapter,declaration:c};break;case"three":n[i.id]={kind:"three",adapter:l.adapter,declaration:c};break;default:f(l,"resolveAllRootEntries")}}return{entries:n,mountId:a}}export{V as a,J as r};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as y,a as k,S as p,P as _,s as P,o as O}from"./worker-CC9Ug5Ei.js";import{s as B}from"./session-CTXsU1lK.js";async function I(o){const a=await fetch(o);if(!a.ok)throw new Error(`${o}: HTTP ${a.status}`);const e=await a.text(),r={exports:{}},i=new Function("module","exports","define",`${e}
|
|
2
|
-
return typeof createBlenderModule === 'function' ? createBlenderModule : module.exports;`)(r,r.exports,void 0);if(typeof i!="function")throw new Error("blender_browser.js did not produce a module factory");return i}const $=new TextEncoder;function N(o,a){let e="";for(const r of a.split("/").filter(Boolean))o.FS_createPath(e||"/",r,!0,!0),e+=`/${r}`}function D(o){const a=o.FS;return{readFile:async e=>a.readFile(e),writeFile:async(e,r)=>a.writeFile(e,r),mkdirTree:async e=>a.mkdirTree(e),readdir:async e=>a.readdir(e),stat:async e=>{let r;try{r=a.stat(e)}catch{return null}const n=r.mtime;return{size:r.size,mode:r.mode??0,mtimeMs:typeof n=="number"?n:n?.getTime()??0}},unlink:async e=>a.unlink(e)}}const M="volter-blender-artifacts";async function m(o,a){const e=y(o);if(!a||typeof caches>"u")return fetch(e);const r=`${e}?sha256=${a}`,n=await caches.open(M),i=await n.match(r);if(i)return i;const l=await fetch(e);if(!l.ok)return l;for(const c of await n.keys())c.url.startsWith(`${e}?sha256=`)&&c.url!==r&&await n.delete(c);const s=new Response(await l.blob(),{headers:{"content-type":l.headers.get("content-type")??"application/octet-stream"}});return await n.put(r,s.clone()),s}async function H(o,a){if(!self.crossOriginIsolated)throw new Error("Headless Blender needs SharedArrayBuffer, so the editor page has to be cross-origin isolated (Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy on every response). This worker reports crossOriginIsolated=false.");const e=y("blender_browser.js"),r=a.digests??{},[n,i]=await Promise.all([I(e),m("blender_browser.data",r["blender_browser.data"]).then(async t=>{if(!t.ok)throw new Error(`blender_browser.data: HTTP ${t.status}`);return t.arrayBuffer()})]);let l=null;const s=performance.now();let c=null;const u=(t,f)=>{f.startsWith("@@VGAI-READY ")&&(c=f.slice(13)),o.log(f.startsWith("@@VGAI-WARN")||f.startsWith("@@VGAI-ERROR")?"error":"log",f)},d=await n({arguments:["--background","--factory-startup","--python",k],locateFile:t=>y(t),getPreloadedPackage:()=>i,instantiateWasm:(t,f)=>((async()=>{const w=await m("blender_browser.wasm",r["blender_browser.wasm"]);if(!w.ok)throw new Error(`blender_browser.wasm: HTTP ${w.status}`);const{instance:F,module:R}=await WebAssembly.instantiateStreaming(w,t);f(F,R)})().catch(w=>{l=w}),{}),mainScriptUrlOrBlob:e,print:t=>u("log",t),printErr:t=>u("error",t),preRun:[t=>{t.ENV??={},Object.assign(t.ENV,{BLENDER_SYSTEM_RESOURCES:"/bw",BLENDER_SYSTEM_PYTHON:"/bw/python",BLENDER_SYSTEM_SCRIPTS:"/bw/scripts",BLENDER_SYSTEM_DATAFILES:"/bw/datafiles",VGAI_SESSION_ROOT:p,HOME:"/root",TMPDIR:"/tmp"});for(const f of["/tmp","/root","/work",p,..._,o.project])N(t,f);t.FS_createDataFile(p,"session.py",$.encode(B),!0,!0,!0)}]});for(;c===null;){if(l)throw l instanceof Error?l:new Error(String(l));await P(5)}const g=performance.now()-s,T=JSON.parse(c);let E=null;if(typeof d.releasePreloadedFileData=="function"){const t=d.releasePreloadedFileData();E=t.bytes,o.log("log",`blender: released the preloaded ${(t.bytes/1048576).toFixed(0)} MB payload (${t.files} files); WasmFS already holds it`)}else o.log("error","blender: this bundle has no releasePreloadedFileData, so the ~55 MB packed .data payload stays resident beside the copy WasmFS made of it — relink with the recipe's --post-js (recipe/release-preloaded-file-data.js).");const h=d.FS;let S="";for(const t of`${o.project}`.split("/").filter(Boolean)){S+=`/${t}`;try{h.chmod(S,511)}catch{}}for(const t of["/work","/tmp","/root",p,..._])try{h.chmod(t,511)}catch{}const b=D(d);h.chmod("/bw/datafiles",493),await x(b,r["essentials.bin"]);const{request:A}=O(b,o);return{skew:"emscripten",banner:T,files:b,request:A,readArena:async()=>d.HEAPU8.subarray(d._blender_web_export_buffer(),d._blender_web_export_buffer()+d._blender_web_export_buffer_size()),bootMs:g,memoryBytes:()=>d.HEAPU8.length,releasedPayloadBytes:E}}async function x(o,a){const[e,r]=await Promise.all([fetch(y("essentials.json")),m("essentials.bin",a)]);if(!e.ok||!r.ok)throw new Error(`Blender Essentials assets are missing (${e.status}/${r.status})`);const n=await e.json(),i=await r.arrayBuffer(),l=Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256",i)),s=>s.toString(16).padStart(2,"0")).join("");if(i.byteLength!==n.bytes||l!==n.sha256)throw new Error("Blender Essentials payload does not match its source manifest");for(const s of n.files){if(!s.path||s.path.includes("\\")||s.path.split("/").some(u=>!u||u==="."||u==="..")||!Number.isInteger(s.offset)||!Number.isInteger(s.bytes)||s.offset<0||s.bytes<0||s.offset+s.bytes>i.byteLength)throw new Error(`Invalid Blender Essentials file: ${s.path}`);const c=`/bw/datafiles/assets/${s.path}`;await o.mkdirTree(c.slice(0,c.lastIndexOf("/"))),await o.writeFile(c,new Uint8Array(i,s.offset,s.bytes))}}export{H as startEmscriptenBlenderEngine};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./jsx-runtime-DPjLkJKQ.js";import{q as i}from"./index-BRJMIUK0.js";import{r as s}from"./index-nmcBqr7Y.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-D_NuPfjr.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const d="workspace.status",v="Version",f="right",x=998;function h(){const{project:e}=i(),t=s.useSyncExternalStore(e.subscribe,e.engineVersion,e.engineVersion);return t===null?null:r.jsxs("span",{className:"vgai-status-copy","data-testid":"status-blender-version","data-engine-version":t,style:{display:"inline-flex",alignItems:"center",gap:"var(--vgai-space-2)",fontSize:"var(--vgai-font-md)"},title:`This project is built against engine ${t}`,children:[r.jsx("span",{"aria-hidden":"true",style:{width:"var(--vgai-stroke-resting)",height:"var(--vgai-icon-md)",background:"currentColor"}}),t]})}export{f as align,h as default,x as order,d as point,v as title};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{S,P as B,a as E,b as h,s as T,A as g,o as I}from"./worker-CC9Ug5Ei.js";import{s as O}from"./session-CTXsU1lK.js";const d="/bw",p=`${S}/frame.bin`;async function R(e){const r=h(`wali/${e}`);try{return await import(r)}catch(n){throw new Error(`The substrate skew needs ${e}, which this editor serves from the WALI pack directory beside blender.wasm (${r}): ${n instanceof Error?n.message:String(n)}`)}}async function P(e,r){const n=performance.now(),y=await fetch(h("runtime.idx"));if(!y.ok)throw new Error(`${g}/runtime.idx answered ${y.status}`);const m=await y.json(),w=await fetch(h("runtime.bin"));if(!w.ok)throw new Error(`${g}/runtime.bin answered ${w.status}`);const s=new Uint8Array(await w.arrayBuffer());let t=0;for(const i of m.files){if(t+i.size>s.byteLength)throw new Error(`Blender runtime ${i.path}: bytes ${t}..${t+i.size} lie outside the ${s.byteLength}-byte runtime blob`);const l=`${d}/${i.path}`;e.mkdirSync(l.slice(0,l.lastIndexOf("/")),{recursive:!0}),e.writeFileSync(l,s.subarray(t,t+i.size)),t+=i.size}if(t!==s.byteLength)throw new Error(`Blender runtime index accounts for ${t} of the ${s.byteLength} bytes served`);const a=Math.round(performance.now()-n);return r("log",`blender: staged Blender's ${m.files.length}-file runtime tree in ${a} ms`),{files:m.files.length,bytes:s.byteLength,ms:a}}function _(e){return{readFile:r=>e.readFile(r),writeFile:async(r,n)=>e.writeFileSync(r,n),mkdirTree:async r=>e.mkdirSync(r,{recursive:!0}),readdir:async r=>e.readdirSync(r),stat:async r=>{if(!e.existsSync(r))return null;const n=e.statSync(r);return{size:n.size,mode:n.mode&4095|(n.isDirectory()?16384:32768),mtimeMs:n.mtimeMs}},unlink:async r=>e.unlinkSync(r)}}async function N(e,r){const n=performance.now(),[y,m]=await Promise.all([R("browser-wali/worker-program.js"),R("browser-runtime/browser-memory-filesystem.js")]),w=y.BrowserWaliWorkerProgram,s=m.BrowserMemoryFileSystem;if(!w||!s)throw new Error("The substrate modules this editor served do not export BrowserWaliWorkerProgram and BrowserMemoryFileSystem; the WALI pack directory holds a browser-substrate this engine does not know.");const t=new s;for(const o of["/tmp","/root","/work",S,...B,e.project])t.mkdirSync(o,{recursive:!0});await P(t,e.log),t.writeFileSync(E,O);const a=r.workers??{pool:16,blender:4},i=new w(t,{url:h("blender.wasm"),...r.integrity?{integrity:r.integrity}:{},cwd:"/work",env:{HOME:"/root",TMPDIR:"/tmp",PATH:"/usr/bin:/bin",BLENDER_SYSTEM_RESOURCES:d,BLENDER_SYSTEM_SCRIPTS:`${d}/scripts`,BLENDER_SYSTEM_DATAFILES:`${d}/datafiles`,BLENDER_SYSTEM_PYTHON:`${d}/python`,PYTHONPATH:`${d}/python/lib/numpy313.zip:${d}/python/lib/wheels313.zip`,VGAI_SESSION_ROOT:S,VGAI_EXPORT_BUFFER_PATH:p},threadPoolSize:a.pool,network:{allowedHosts:[],maxConnections:0,maxBytes:0}});let l=null,c=null;const b=o=>{for(const u of o.split(`
|
|
2
|
-
`))u!==""&&(u.startsWith("@@VGAI-READY ")&&(l=u.slice(13)),e.log(u.startsWith("@@VGAI-WARN")||u.startsWith("@@VGAI-ERROR")?"error":"log",u))};for(i.run(["/blender","-b","--factory-startup","-noaudio","--python-use-system-env","-t",String(a.blender),"--python",E],{onStdout:b,onStderr:b,onDiagnostic:o=>e.log("error",`@@VGAI-ERROR ${o}`)}).then(o=>{c=`Blender exited ${o.exitCode}`},o=>{c=o instanceof Error?o.message:String(o)}).finally(()=>{c!==null&&e.log("error",`@@VGAI-ERROR the Blender program ended: ${c}`)});l===null;){if(c!==null)throw new Error(`Blender never reached its session: ${c}`);await T(5)}const A=performance.now()-n,$=JSON.parse(l);e.log("log",`blender: the substrate skew is up (${a.blender} Blender threads in a pool of ${a.pool}; Blender is SERIAL without -t N and says so)`);const f=_(t),{request:k}=I(f,e,()=>c);return{skew:"wali",banner:$,files:f,request:k,readArena:()=>t.readFile(p),bootMs:A,memoryBytes:()=>null,releasedPayloadBytes:null}}export{N as startWaliBlenderEngine};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e="workspace.keymap",t={id:"blender",title:"Blender",description:"Blender bindings: W select, G/R/S gizmo modes, X delete, Shift+D duplicate, A select all, Alt+A deselect, . frames.",bindings:{"transform.select":[{key:"w"}],"transform.translate":[{key:"g"}],"transform.rotate":[{key:"r"}],"transform.scale":[{key:"s"}],"edit.delete":[{key:"x"}],"edit.duplicate":[{key:"d",shift:!0}],"edit.selectAll":[{key:"a"},{key:"a",mod:!0}],"edit.deselectAll":[{key:"a",alt:!0}],"viewport.frameSelection":[{key:"."},{key:"",code:"NumpadDecimal"}],"viewport.cyclePivot":[{key:","}],"view.perspective":[],"view.projection":[{key:"",code:"Numpad5"}],"view.back":[{key:"",code:"Numpad1",ctrl:!0}],"view.left":[{key:"",code:"Numpad3",ctrl:!0}],"view.bottom":[{key:"",code:"Numpad7",ctrl:!0}],"view.orbitLeft":[{key:"",code:"Numpad4"}],"view.orbitRight":[{key:"",code:"Numpad6"}],"view.orbitUp":[{key:"",code:"Numpad8"}],"view.orbitDown":[{key:"",code:"Numpad2"}],"view.opposite":[{key:"",code:"Numpad9"}],"view.rollLeft":[{key:"",code:"Numpad4",shift:!0}],"view.rollRight":[{key:"",code:"Numpad6",shift:!0}],"view.all":[{key:"",code:"Home"}],"view.zoomIn":[{key:"",code:"NumpadAdd"},{key:"",code:"Equal",ctrl:!0}],"view.zoomOut":[{key:"",code:"NumpadSubtract"},{key:"",code:"Minus",ctrl:!0}]},navigation:{orbit:"middle",turntable:{degreesPerPixel:.4},autoPerspective:!0,zoom:{step:1.2,drag:"dolly"}}};export{t as keymap,e as point};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";const w="workspace.status",b="Mouse hints",j="left",y=0,u=[{button:"left",label:"Select"},{button:"middle",label:"Pan View"},{button:"right",label:"Orbit View"}],l=1,a=8,h=5,g=1,r=6.25,x=3.6,i={width:12,height:16};function p({button:t}){const s=`vgai-mouse-${t}`,c=i.width-h,d=t==="right"?c:0,o=l/2,n=x;return e.jsxs("svg",{viewBox:`0 0 ${i.width} ${i.height}`,role:"presentation","aria-hidden":"true",focusable:"false",style:{height:"var(--vgai-icon-lg)",width:"auto",display:"block",flex:"0 0 auto"},children:[e.jsxs("title",{children:[t," mouse button"]}),e.jsx("clipPath",{id:`${s}-outer`,children:e.jsx("rect",{x:"0",y:"0",width:i.width,height:i.height,rx:n})}),e.jsxs("mask",{id:`${s}-shell`,children:[e.jsx("rect",{x:"0",y:"0",width:i.width,height:i.height,fill:"white"}),t!=="middle"&&e.jsx("rect",{x:t==="right"?r:-1,y:-1,width:t==="right"?i.width-r+1:r+1,height:a+g+1,fill:"black"})]}),e.jsx("rect",{x:o,y:o,width:i.width-l,height:i.height-l,rx:n-o,fill:"none",stroke:"currentColor",strokeWidth:l,mask:`url(#${s}-shell)`}),t!=="middle"&&e.jsx("rect",{x:d,y:"0",width:h,height:a,fill:"currentColor",clipPath:`url(#${s}-outer)`}),t==="middle"&&e.jsx("rect",{x:"4",y:"2",width:"4",height:"7",rx:"1.25",fill:"currentColor"})]})}function v(){return e.jsx("span",{className:"vgai-status-copy","data-testid":"status-blender-mouse-hints",style:{display:"inline-flex",alignItems:"center",gap:"var(--vgai-space-5)"},children:u.map(t=>e.jsxs("span",{"data-mouse-button":t.button,style:{display:"inline-flex",alignItems:"center",gap:"var(--vgai-space-1)",fontSize:"var(--vgai-font-md)"},title:`${t.label} — the ${t.button} mouse button in the viewport`,children:[e.jsx(p,{button:t.button}),t.label]},t.button))})}export{j as align,v as default,y as order,w as point,b as title};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{au as _}from"./index-BRJMIUK0.js";const i=globalThis;function c(){return i.__vgaiBreakpointListeners??=new Set,i.__vgaiBreakpointListeners}function y(){return i.__vgaiActiveBreakpoint??null}function G(e){i.__vgaiActiveBreakpoint=e;for(const t of c())t()}function k(e){return c().add(e),()=>c().delete(e)}const g="vgai:board-guides:v1";function v(){return typeof window>"u"?null:window.localStorage}function m(){try{return _()?.rootPath??"(no-project)"}catch{return"(no-project)"}}function B(){try{return JSON.parse(v()?.getItem(g)??"{}")}catch{return{}}}function b(e){try{v()?.setItem(g,JSON.stringify(e))}catch{}}const f=new Set;let u=null,p=Date.now()%1e6;function o(){return u||(u=B()[m()]??{}),u}function l(){const e=B();e[m()]=o(),b(e);for(const t of f)t()}const h=[];function a(e){return o()[e]??h}function S(e){return f.add(e),()=>f.delete(e)}function x(e,t,r){p+=1;const n=`guide-${p}`;return o()[e]=[...a(e),{id:n,axis:t,value:r}],l(),n}function A(e,t,r){o()[e]=a(e).map(n=>n.id===t?{...n,value:r}:n),l()}function E(e,t){o()[e]=a(e).filter(r=>r.id!==t),l()}let d=null;function T(e,t){d=t?{docId:e,transform:t}:null}function j(){if(!d)return{x:[],y:[]};const{docId:e,transform:t}=d,r=[],n=[];for(const s of a(e))s.axis==="x"?r.push(t.originX+t.panX+s.value*t.zoom):n.push(t.originY+t.panY+s.value*t.zoom);return{x:r,y:n}}export{y as a,k as b,S as c,a as d,E as e,x as f,j as g,A as m,T as r,G as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{getUserData as n,setUserData as r}from"./user-data-dHvLdpwM.js";import"./object-marks-DwvIEBOK.js";function i(o,e){r(o,"vgaiBodyOwner",e)}function a(o){return n(o,"vgaiBodyOwner")??void 0}export{a as bodyOwningNode,i as markBodyOwnedNode};
|
|
@@ -1,3 +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","assets/editor-api-BFTIRlWa.js","assets/play-mode-DICV4cKP.js","assets/adapter-runtime-bindings-4cmsRvRh.js","assets/native-debug-module-2_HVupdg.js","assets/native-entry-surface-BE8LJNdu.js","assets/debug-registry-P0_YQGWd.js","assets/contract-system-adapters-Bic_7sev.js","assets/game-contract-seams-BnPFGLll.js","assets/seeded-random-BgCwIAAU.js","assets/game-audio-CaGKzia4.js","assets/game-network-Ct2FQYmu.js","assets/index-OZVqp6xS.js","assets/index-Da9JhEvW.js","assets/rapier-physics-adapter-CaZqWLu0.js","assets/events-156d8d12.esm-CYeuVCYr.js","assets/three.module-BLhyNg0e.js","assets/three.core-3arARmh6.js","assets/index-bQE2NA0D.js","assets/live-project-verbs-C3LzprCe.js","assets/capability-coverage-DZ-onC5j.js","assets/edit-mode-authoring-DeCxPcHM.js","assets/json-history-resource-DwS10tqD.js","assets/binding-resolver-dE0GnZT5.js","assets/adapter-surface-Y37Nzcyw.js","assets/entry-adjudication-Dc18TIqT.js","assets/structural-signature-Dc7skRiy.js","assets/webgl-frame-capture-DdJkM2mi.js","assets/realm-services-CnY105XU.js","assets/canvas-entry-runtime-UNYuSfG0.js","assets/three-ingest-runtime-B7rtg3QE.js","assets/EffectComposer-BEAt0PtQ.js","assets/CopyShader-BzTUYzf6.js","assets/ShaderPass-DTnDQXm0.js","assets/Pass-D1MRT672.js","assets/CSS3DRenderer-BsAqfavI.js","assets/relative-path-guard-GiM7Lsz8.js","assets/react-root-BHA-cdrW.js","assets/editor-presentation-activity-C7SNSmTd.js","assets/active-ingest-DA426a81.js","assets/ingest-source-persistence-Dmdo-UBp.js","assets/pixi-story-model-DNkfnWUV.js","assets/surface-content-Dg9Kkazf.js","assets/viewport-root-presentation-vgxsTyj4.js","assets/mounted-authoring-Clftxx0x.js","assets/entity-object-JmYMfLsx.js","assets/user-data-Bpj7diUS.js","assets/workspace-arrangement-BdAlBwvd.js","assets/three-contract-Dkt6PmWY.js","assets/three-TCuY32m_.js","assets/editor-layers-BDJnAAzj.js","assets/component-instance-root-B0C5oNEm.js","assets/viewport-editor-controls-BYaAZ_Ku.js","assets/three-authoring-adapter-htbnVej2.js","assets/source-persistence-backend-CwLYVPXj.js","assets/three-projection-core-CG01r5Ta.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/r3f-physics-binding-DzrbpqjM.js","assets/deferred-ingest-play-BdR4qGk6.js","assets/rrweb-Cd2ifIRP.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/three-state-DwFE3ay2.js","assets/editor-shell-store-ChLcVeNB.js","assets/output-pass-HurwNl0G.js","assets/viewport-door-Bj_ZIP85.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{a3 as _,jI as N,jJ as $,jK as f,jL as g,jM as M,_ as R,jN as V,Q as U,jO as B,M as C,jP as G,B as E}from"./index-BRJMIUK0.js";import{g as l,i as b,z as D,A as j,B as F,c as O,C as x,D as q}from"./play-mode-DICV4cKP.js";import{e as H,c as z}from"./gameplay-replay-BwdxV4oF.js";import{n as A,s as h}from"./command-results-CUQD49AB.js";import{z as K,i as y}from"./active-ingest-DA426a81.js";import{g as W}from"./capability-coverage-DZ-onC5j.js";import{w as J,H as Q}from"./debug-bridge-D3_-EgRE.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"./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"./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"./ingest-source-persistence-Dmdo-UBp.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";import"./output-DK8waum9.js";const k=()=>_().debug!=null;function d(e,t,s){const a=new Error(t);return a.code=e,s&&(a.data=s),a}function T(e){return Array.isArray(e)?new Set(e.filter(t=>!!(t&&typeof t=="object"&&typeof t.name=="string")).map(t=>t.name)):new Set}function X(e,t,s,a,i){if(e==="commands"){const c=T(t);return Array.isArray(t)&&[...a].every(o=>c.has(o))}if(e==="providers"){const c=T(t);return Array.isArray(t)&&[...i].every(o=>c.has(o))}return s?e==="state"?i.has(s):e==="invoke"?a.has(s):!1:!1}function S(e,t,s){const a=K(),i=a?.systems;if(!a||!i)return;const c=new Set((i.commands??[]).map(n=>n.name)),o=new Set((i.state??[]).map(n=>n.name));X(e,t,s,c,o)&&f({seam:"contract.systems",subject:"game",epoch:W(a),stage:"operation",outcome:"pass",source:"consumer",detail:`the session wire consumed contract systems through debug.${e}`})}async function Y(e,t,s){let a;try{a=N(s).debug}catch(o){throw o instanceof $?d("INSTANCE_UNRESOLVED",`session wire: "${e}" — ${o.message}`,{instances:o.instances}):o}const i=()=>{if(!a)throw d("DEBUG_ADAPTER_UNAVAILABLE",`session wire: "${e}" — this game exposes no debug adapter`);return a},c=(o,n,r)=>{const u=i(),m=g(u);try{const p=r();return f({seam:`system.debug.${o}`,subject:"game",epoch:m,stage:n,outcome:"pass",source:"consumer",detail:`the session wire called debug.${o} and received its result`}),f({seam:"system.debug",subject:"game",epoch:m,stage:"operation",outcome:"pass",source:"consumer",detail:"the session wire consumed the mounted debug adapter"}),S(o,p,t[0]),p}catch(p){throw f({seam:`system.debug.${o}`,subject:"game",epoch:m,stage:n,outcome:"fail",source:"consumer",detail:`the session wire called debug.${o} and it failed: ${p instanceof Error?p.message:String(p)}`}),p}};switch(e){case"state":return c("state","operation",()=>i().state(t[0]));case"stateAll":return c("stateAll","operation",()=>i().stateAll());case"providers":return c("providers","operation",()=>i().providers());case"commands":return c("commands","operation",()=>i().commands());case"events":return c("events","operation",()=>i().events(t[0]));case"snapshot":{const o=i();return{time:c("state","operation",()=>o.state("time")),state:c("stateAll","operation",()=>o.stateAll()),events:c("events","operation",()=>o.events(t[0])),pageErrors:M()}}case"invoke":{const o=t[0],n=t[1]??[];try{const r=await i().invoke(o,n),u=i();return f({seam:"system.debug.invoke",subject:"game",epoch:g(u),stage:"effect",outcome:"pass",source:"consumer",detail:`the session wire invoked debug command "${o}" and received its result`}),f({seam:"system.debug",subject:"game",epoch:g(u),stage:"operation",outcome:"pass",source:"consumer",detail:"the session wire consumed the mounted debug adapter"}),S("invoke",r,o),r}catch(r){const u=i();throw f({seam:"system.debug.invoke",subject:"game",epoch:g(u),stage:"effect",outcome:"fail",source:"consumer",detail:`the session wire invoked debug command "${o}" and it failed: ${r instanceof Error?r.message:String(r)}`}),r}}case"runTicks":{const o=l();if(!o?.runTicks)throw d("RUN_TICKS_UNAVAILABLE","this play session has no first-party Game to run ticks on");const n=t[0],r=t[1];o.runTicks(n,r);return}case"runTicksSettled":{const o=l();if(!o?.runTicksSettled)throw d("RUN_TICKS_UNAVAILABLE","this play session has no first-party Game to run ticks on");const n=t[0],r=t[1];await o.runTicksSettled(n,r);return}case"input.setVirtualAction":case"input.tapVirtualAction":case"input.clearVirtualActions":case"input.startRecording":case"input.stopRecording":case"input.isRecording":{const o=l(),n=e==="input.setVirtualAction"?t[2]:e==="input.tapVirtualAction"?t[1]:t[0],r=o?o.getInputTarget(n):null;if(!r)throw d("DEBUG_INPUT_UNAVAILABLE",`session wire: ${e}() has no virtual-input target wired — no root entry exports \`debug.input\` (the game's own input door), or none has mounted yet`);if(e==="input.setVirtualAction")return r.setVirtualAction(t[0],t[1]);if(e==="input.tapVirtualAction")return r.tapVirtualAction(t[0]);if(e==="input.clearVirtualActions"){r.clearVirtualActions();return}if(e==="input.startRecording"){r.startInputRecording();return}if(e==="input.stopRecording"){r.stopInputRecording();return}return r.isInputRecording()}case"input.scheduleActionAtTick":{const o=l(),n=t[0],r=t[1],u=t[2],m=t[3],p=o?o.getInputTarget(m):null;if(!p)throw d("DEBUG_INPUT_UNAVAILABLE","session wire: input.scheduleActionAtTick() has no virtual-input target wired — no root entry exports `debug.input` (the game's own input door), or none has mounted yet");return p.scheduleActionAtTick(n,r,u)}case"input.injectPointerDelta":case"input.injectPointerPosition":{const o=l(),n=t[0],r=t[1],u=t[2],m=o?o.getInputTarget(u):null;if(!m)throw d("DEBUG_INPUT_UNAVAILABLE",`session wire: ${e}() has no virtual-input target wired — no root entry exports \`debug.input\` (the game's own input door), or none has mounted yet`);e==="input.injectPointerDelta"?m.injectPointerDelta(n,r):m.injectPointerPosition(n,r);return}case"holdFor":{const o=l(),n=t[2],r=o?o.getInputTarget(n):null;if(!r)throw d("DEBUG_INPUT_UNAVAILABLE","session wire: holdFor() has no virtual-input target wired — no root entry exports `debug.input` (the game's own input door), or none has mounted yet");const u=t[0],m=t[1],p=r.setVirtualAction(u,!0);if(!p.delivered)return r.clearVirtualActions(),{delivered:!1,reason:p.reason};const{stalled:v,starvedWithoutDriver:w}=await J(i(),m,o?.runTicks?L=>o.runTicks?.(L,{render:"last"}):void 0);return r.clearVirtualActions(),v?{delivered:!1,reason:w?Q:"play stopped during hold"}:{delivered:!0}}default:throw d("UNKNOWN_BRIDGE_METHOD",`session wire: unknown bridge method "${e}"`)}}async function Z(e){if(!b()&&!k())return y()?{ok:!1,error:"this ingest mount is live, but it publishes no debug plane — the mount installs no SystemAdapters.debug, so there is nothing to enumerate, read or drive through the game seam. Starting play will not change that; the game itself must declare the vgai game contract (or carry a contract shim beside it) for these calls to have an answer."}:A();const t=e.method,s=e.callArgs??[];try{const a=e.instance;return{ok:!0,data:{result:await Y(t,s,a)}}}catch(a){return h(a)}}async function P(e){const{liveCanvasFrame:t}=await R(async()=>{const{liveCanvasFrame:s}=await import("./index-BRJMIUK0.js").then(a=>a.tT);return{liveCanvasFrame:s}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]));return t(e)}function ee(){const e=l();e?.loop.liveness==="loop-starved"&&e.runTicks?.(1,{render:"last"})}function I(e,t){const s=te();return{ok:!0,data:{base64:e,mimeType:"image/png",composite:t.composite,...t.layers?{layers:t.layers}:{},...t.flatness?{flatness:t.flatness}:{},...t.loopRecoveryFrame?{loopRecoveryFrame:!0}:{},...s?{recording:s}:{}}}}function te(){const e=F();return e?{path:e.path,startedAt:e.startedAt,notice:[`This run is being RECORDED — the still above is one frame of ${e.path}.`,"A still cannot answer a question about a moving game (did the jump land, did the shot","register). If that is the question, read the clip:","",` recording: ${e.path}${e.rotates?` (the next ${E("play")} replaces this file)`:" (named — never rotated)"}`,...e.format==="canvas-dom"?[` HUD replay: ${e.replayPath}`," The raw WebM contains the canvas only. Reconstruct HUD stills with"," editor.recording.captureReplay, or export a full video with editor.recording.exportReplay."]:[],` startedAt: ${e.startedAt} (clip offset 0)`,` play log: ${e.logFile===null?"(none — nothing is logging this run)":`logs/${e.logFile}`} (event timestamps → clip offsets)`,"","THE BAR for a temporal question: examine AT LEAST 10 frames spanning no more than 5","seconds around the moment. One frame, or ten frames spread across the run, is the same","guess a single screenshot was.","",`The clip is finalized and readable when play stops — ${E("stop")}, or the idle`,`auto-stop after ${Math.round(e.idleAutoStopMs/1e3)}s with no session command and no player input.`].join(`
|
|
3
|
-
`)}:null}async function re(e){if(!b()&&!k()&&!y())return A();const t=e.instance,s=D(t),a=j(t),i=V(s).medium,c=l();let o=!1,n=null;if(a&&c?.loop.liveness==="loop-starved")if(e.refreshStarvedFrame===!0&&c.runTicks)try{c.runTicks(1,{render:"last"}),o=!0}catch(r){return h(r)}else return{ok:!1,error:"cannot capture a fresh game frame while the host loop reports 'loop-starved' — inspect the separate visibility readings, let presentation resume, or request a deterministic loop-recovery frame",data:{code:"BRIDGE_SCREENSHOT_STALE"}};if(s&&typeof Image<"u"&&typeof XMLSerializer<"u"&&typeof s.getBoundingClientRect=="function")try{const r=await U(s,{canvasFrame:P,...i==="unknown"?{}:{presentsOnCanvas:i==="canvas"}});if(r.layers.canvases===0&&r.layers.domOverlays===0)throw new B(i==="dom"?"dom-overlay":"composite-output","no game layers were mounted");return I(r.base64,{composite:!0,layers:r.layers,flatness:r.flatness,loopRecoveryFrame:o})}catch(r){n=r,C.warn(`Full-stack screenshot failed; returning the canvas-only fallback — ${r instanceof Error?r.message:String(r)}`,"screenshot")}if(!a){const r=n instanceof Error?n.message:String(n);return{ok:!1,error:n!==null?`full game-stack capture failed — ${r}; no canvas layer is available as a fallback`:y()?"the ingest mount is live but no DOM overlay or canvas layer is mounted for capture":"no play-mode DOM overlay or canvas layer is mounted yet",data:{code:"BRIDGE_SCREENSHOT_UNAVAILABLE"}}}try{const r=await R(()=>import("./index-BRJMIUK0.js").then(w=>w.tT),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])),u=r.readablePngSource(await r.liveCanvasFrame(a))??a,m=u.toDataURL("image/png"),p=m.indexOf(","),v=p>=0?m.slice(p+1):m;return I(v,{composite:!1,flatness:G(u,a.ownerDocument),loopRecoveryFrame:o})}catch(r){return{ok:!1,error:`bridge-screenshot: canvas layer capture failed — ${r instanceof Error?r.message:String(r)}`+(n===null?"":`; full game-stack capture also failed — ${n instanceof Error?n.message:String(n)}`),data:{code:"BRIDGE_SCREENSHOT_UNAVAILABLE"}}}}const Vt="workspace.command",Ut={"bridge-call":{timeoutMs:6e4,derivedRefresh:"always",handle:Z},"bridge-screenshot":{timeoutMs:15e3,derivedRefresh:"if-content-changed",handle:re},"bridge-recording-start":{timeoutMs:15e3,derivedRefresh:"none",handle:async e=>{if(!b()&&!k()&&!y())return A();const t=D();if(!t)return{ok:!1,error:"no play-mode game surface is mounted yet"};const s=_().audio?.acquireRecordingStream?.()??null;try{return{ok:!0,data:{...await x(t,{fps:typeof e.fps=="number"?e.fps:void 0,format:e.format==="canvas-dom"||e.format==="composite-webm"?e.format:void 0,name:typeof e.name=="string"||e.name===null?e.name:void 0,canvasFrame:P,refreshFrame:ee,audio:s})}}}catch(a){return h(a)}}},"bridge-recording-stop":{timeoutMs:6e4,derivedRefresh:"none",handle:async()=>{try{return{ok:!0,data:{...await O()}}}catch(e){return h(e)}}},"bridge-recording-timeline":{derivedRefresh:"none",handle:()=>{const e=q();return e===null?{ok:!1,error:"no gameplay recording is active"}:{ok:!0,data:{...e}}}},"bridge-recording-replay-capture":{timeoutMs:6e4,derivedRefresh:"none",handle:async e=>{try{return typeof e.replayPath!="string"?{ok:!1,error:"replayPath is required"}:typeof e.positionMs!="number"||!Number.isFinite(e.positionMs)?{ok:!1,error:"finite positionMs is required"}:{ok:!0,data:{...await z(e.replayPath,e.positionMs)}}}catch(t){return h(t)}}},"bridge-recording-replay-export":{timeoutMs:6e5,derivedRefresh:"none",handle:async e=>{try{if(typeof e.replayPath!="string")return{ok:!1,error:"replayPath is required"};const{blob:t,...s}=await H({replayPath:e.replayPath,...typeof e.fps=="number"?{fps:e.fps}:{},...typeof e.startMs=="number"?{startMs:e.startMs}:{},...typeof e.endMs=="number"?{endMs:e.endMs}:{}}),{beginGameplayRecordingSink:a,appendGameplayRecordingChunk:i,finishGameplayRecordingSink:c,abortGameplayRecordingSink:o}=await R(async()=>{const{beginGameplayRecordingSink:r,appendGameplayRecordingChunk:u,finishGameplayRecordingSink:m,abortGameplayRecordingSink:p}=await import("./editor-api-BFTIRlWa.js");return{beginGameplayRecordingSink:r,appendGameplayRecordingChunk:u,finishGameplayRecordingSink:m,abortGameplayRecordingSink:p}},__vite__mapDeps([10,0,1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83])),n=await a({startedAt:new Date().toISOString(),mimeType:"video/webm",purpose:"export",name:typeof e.name=="string"?e.name:`replay-export-${Date.now()}`});try{for(let r=0,u=0;r<t.size;r+=4*1024*1024,u++)await i(n,u,t.slice(r,r+4*1024*1024));await c(n,"post-processed canvas and DOM recording")}catch(r){throw await o(n),r}return{ok:!0,data:{...s,path:n.path}}}catch(t){return h(t)}}}};export{Ut as commands,Vt as point};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./jsx-runtime-DPjLkJKQ.js";import{b1 as O,cf as E,cq as D,et as P,eu as z,ev as H,ew as i,$ as M,ex as F,aW as a,ey as n,d5 as L,aK as j,Z as R,a_ as G,ez as _,eA as J,bR as V,eB as U,eC as q}from"./index-BRJMIUK0.js";import{r}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{s as K,b as A,u as Y,c as Z,g as Q,d as X,r as ee,f as C}from"./build-session-GZcSAfPN.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./configurations-BXU4GGbV.js";const f="vgai.project.json",S={name:"My Game",resolution:{width:1280,height:720},appId:"com.example.mygame"};function te(){r.useSyncExternalStore(K,A,A);const s=Q(),p=G(),o=p?O(p):null,[y,T]=r.useState(S),m=Y(),[c,$]=r.useState("");r.useEffect(()=>{!c&&m.length>0&&$(m[0]?.id??"")},[m,c]);const g=r.useRef(null),x=r.useCallback(async()=>{const t=await E(f),l=t?JSON.parse(t):S;T({...S,...l,resolution:{...S.resolution,...l.resolution}})},[]);r.useEffect(()=>(x().catch(()=>{}),o?.subscribeAll(t=>{t===f&&x().catch(()=>{})})??(()=>{})),[o,x]),r.useEffect(()=>()=>{g.current&&clearTimeout(g.current)},[]);const v=r.useCallback(t=>{g.current&&clearTimeout(g.current),g.current=setTimeout(async()=>{const l=await E(f);if(!l)throw new Error(`Cannot edit build settings: ${f} is missing`);const u=JSON.parse(l),h=`${JSON.stringify({...u,name:t.name,resolution:t.resolution,appId:t.appId},null,2)}
|
|
2
|
-
`;if(!o){await D(f,h);return}await o.write(f,h,{label:"Edit Build Settings",kind:"settings",contentType:"application/json"}).catch(()=>void x().catch(()=>{}))},500)},[o,x]),I=r.useCallback(t=>{T(l=>{const u={...l,...t};return v(u),u})},[v]),N=r.useCallback((t,l)=>{T(u=>{const h={...u,resolution:{...u.resolution,[t]:Math.round(l)}};return v(h),h})},[v]),d=s.phase,b=s.result?.report?.artifact??null;return e.jsxs("div",{"data-testid":"build-profiles-document",style:{display:"flex",flex:1,minHeight:0,background:P[1],pointerEvents:"auto"},children:[e.jsx("div",{style:se,children:m.map(t=>e.jsx(H,{selected:c===t.id,disabled:d==="building",onClick:()=>{d!=="building"&&$(t.id)},style:{padding:`${i[4]} ${i[6]}`,opacity:d==="building"&&c!==t.id?.4:1},children:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:i[4]},children:[e.jsx(M,{icon:L,style:{fontSize:n.lg,color:c===t.id?F:a[2]}}),e.jsxs("div",{children:[e.jsx("div",{style:{fontSize:n.md,fontWeight:600,color:c===t.id?a[1]:a[2]},children:t.label}),e.jsx("div",{style:{fontSize:n.sm,color:a[3],marginTop:1},children:t.subtitle})]})]})},t.id))}),e.jsxs("div",{style:{flex:1,display:"flex",flexDirection:"column",minWidth:0,padding:`${i[5]} ${i[8]}`,maxWidth:560},children:[e.jsx("div",{style:W,children:"Project"}),e.jsxs("div",{style:w,children:[e.jsx("label",{style:B,children:"Name"}),e.jsx(j,{className:"vgai-input",style:{flex:1},value:y.name,onChange:t=>I({name:t.target.value})})]}),e.jsxs("div",{style:w,children:[e.jsx("label",{style:B,children:"Resolution"}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:i[2],flex:1},children:[e.jsx(j,{type:"number",className:"vgai-input",style:{width:0,flex:1},value:y.resolution.width,onChange:t=>{const l=Number.parseInt(t.target.value,10);Number.isFinite(l)&&l>0&&N("width",l)}}),e.jsx("span",{style:{fontSize:n.sm,color:a[3]},children:"×"}),e.jsx(j,{type:"number",className:"vgai-input",style:{width:0,flex:1},value:y.resolution.height,onChange:t=>{const l=Number.parseInt(t.target.value,10);Number.isFinite(l)&&l>0&&N("height",l)}})]})]}),e.jsxs("div",{style:w,children:[e.jsx("label",{style:B,children:"App ID"}),e.jsx(j,{className:"vgai-input",style:{flex:1},value:y.appId,onChange:t=>I({appId:t.target.value})})]}),e.jsxs("div",{style:{...w,marginTop:i[2]},children:[e.jsx("label",{style:B,children:"Output"}),e.jsx("span",{style:{fontSize:n.md,color:a[2]},children:b??"Artifact appears here after a build"})]}),e.jsx("div",{style:{marginTop:i[6],display:"flex",alignItems:"center",gap:i[4],paddingTop:i[4],borderTop:`1px solid ${z[1]}`},children:d==="building"?e.jsxs(e.Fragment,{children:[e.jsxs("span",{style:{fontSize:n.md,fontWeight:600,color:F},children:["Building for ",m.find(t=>t.id===s.target)?.label??s.target,"… (log in Build Output below)"]}),e.jsx(R,{size:"compact",onClick:X,children:"Cancel"})]}):e.jsxs(e.Fragment,{children:[d==="done"&&s.result&&e.jsx("span",{"data-testid":"build-profiles-result",style:{fontSize:n.md,fontWeight:600,color:s.result.ok?_:J},children:s.result.ok?"✓ Build complete":`✗ Build failed (exit ${s.result.code??"unknown"})`}),d==="done"&&s.result?.ok&&b&&e.jsx("a",{href:V(b),download:b,className:"vgai-btn","data-variant":"secondary","data-size":"default",style:{textDecoration:"none",display:"inline-flex"},children:"Download"}),e.jsx(R,{variant:"primary","data-testid":"build-profiles-build",onClick:()=>{c&&(d==="done"&&ee(),Z(c))},style:{marginLeft:"auto"},children:d==="done"?"Build Again":"Build"})]})}),d==="done"&&s.result?.report&&e.jsx(ie,{report:s.result.report})]})]})}function ie({report:s}){const p=s.largestFiles[0]?.bytes??1;return e.jsxs("section",{"data-testid":"build-report",style:{marginTop:i[6],paddingTop:i[5],borderTop:`1px solid ${z[1]}`},children:[e.jsx("div",{style:W,children:"Build report"}),e.jsxs("div",{style:{display:"flex",gap:i[4],marginBottom:i[5]},children:[e.jsx(k,{label:"Package",value:C(s.artifactBytes)}),e.jsx(k,{label:"Output",value:C(s.outputBytes)}),e.jsx(k,{label:"Files",value:String(s.fileCount)})]}),e.jsx("div",{style:{fontSize:n.sm,color:a[3],marginBottom:i[2]},children:"Largest output files"}),e.jsx("div",{style:{display:"grid",gap:3},children:s.largestFiles.slice(0,8).map(o=>e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"minmax(0, 1fr) max-content",gap:i[3]},children:[e.jsxs("div",{title:o.path,style:{position:"relative",minWidth:0,overflow:"hidden",borderRadius:2},children:[e.jsx("div",{"aria-hidden":"true",style:{position:"absolute",inset:0,width:`${Math.max(2,o.bytes/p*100)}%`,background:"color-mix(in srgb, var(--vgai-accent) 16%, transparent)"}}),e.jsx("div",{style:{position:"relative",padding:`${i[1]} ${i[2]}`,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontFamily:U,fontSize:n.sm,color:a[2]},children:o.path})]}),e.jsx("div",{style:{textAlign:"right",padding:`${i[1]} 0`,fontSize:n.sm,color:a[2]},children:C(o.bytes)})]},o.path))})]})}function k({label:s,value:p}){return e.jsxs("div",{style:{flex:1,padding:`${i[3]} ${i[4]}`,background:P[2],borderRadius:q.sm},children:[e.jsx("div",{style:{fontSize:n.sm,color:a[3]},children:s}),e.jsx("div",{style:{marginTop:i[1],fontSize:n.lg,fontWeight:650,color:a[1]},children:p})]})}const se={width:160,flexShrink:0,borderRight:`1px solid ${z[1]}`,overflowY:"auto"},W={fontSize:n.sm,fontWeight:700,textTransform:"uppercase",color:a[3],letterSpacing:"0.05em",marginBottom:i[3]},w={display:"flex",alignItems:"center",gap:i[3],marginBottom:i[2]},B={width:65,fontSize:n.base,color:a[2],flexShrink:0},ge="workspace.document",xe="Build Profiles";function he(s){return e.jsx(te,{})}export{he as default,ge as point,xe as title};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as t}from"./jsx-runtime-DPjLkJKQ.js";import{r as i}from"./index-nmcBqr7Y.js";import{s as a,b as e,g as r}from"./build-session-GZcSAfPN.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-D_NuPfjr.js";import"./configurations-BXU4GGbV.js";import"./index-BRJMIUK0.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const x="workspace.status",B="Build Progress",h="left",S=30;function k(){i.useSyncExternalStore(a,e,e);const s=r();return s.phase==="idle"?null:s.phase==="building"?t.jsxs("span",{className:"vgai-status-copy","data-testid":"status-build-progress","data-build-phase":"building","data-status-tone":"accent",children:["Building ",s.target,"…"]}):t.jsx("span",{className:"vgai-status-copy","data-testid":"status-build-progress","data-build-phase":s.result?.ok?"complete":"failed","data-status-tone":s.result?.ok?"success":"danger",children:s.result?.ok?"Build complete":"Build failed"})}export{h as align,k as default,S as order,x as point,B as title};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{l as D,b as _}from"./configurations-BXU4GGbV.js";import{q as p}from"./index-BRJMIUK0.js";import{r as m}from"./index-nmcBqr7Y.js";function b(e){if(e<1024)return`${e} B`;const s=["KB","MB","GB"];let t=e/1024,n=s[0];for(let o=1;o<s.length&&t>=1024;o++)t/=1024,n=s[o];return`${t>=10?t.toFixed(1):t.toFixed(2)} ${n}`}const B="build",v="build-profiles.document";function N(){return p().workspace.openContributedDocument(v)}function P(){const[e,s]=m.useState([]);return m.useEffect(()=>{let t=!1;return D().then(n=>{t||s(n.filter(o=>o.role==="build").map(o=>({id:o.id,label:o.id,subtitle:o.describe??o.kind})))}).catch(()=>{t||s([])}),()=>{t=!0}},[]),e}let i={phase:"idle",target:"",log:[],result:null},w=0;const f=new Set;let $=null;function u(e){i={...i,...e},w++,x();for(const s of f)s()}function U(e){return f.add(e),()=>{f.delete(e)}}function L(){return w}function y(){return i}function M(){i.phase!=="building"&&u({phase:"idle",log:[],result:null})}function W(){$?.abort(),u({phase:"idle"})}function E(){x(),p().output.show(B)}function x(){const e=y();let s=e.log.length?`${e.log.join(`
|
|
2
|
-
`)}
|
|
3
|
-
`:"";if(e.phase==="done"&&e.result&&(s+=`
|
|
4
|
-
${e.result.ok?"Build complete.":`Build failed (exit code: ${e.result.code??"unknown"}).`}
|
|
5
|
-
`,e.result.report)){const t=e.result.report;s+=`${b(t.artifactBytes)} package · ${b(t.outputBytes)} output · ${t.fileCount} files
|
|
6
|
-
`}p().output.write(B,"Build",s,O(s))}function O(e){const s=[],t=e.replace(/\u001b\[[0-9;]*m/g,"");for(const n of t.split(/\r?\n/)){const o=n.match(/^(.+?)\((\d+),(\d+)\):\s*(error|warning)\s+(.*)$/)??n.match(/^(.+?):(\d+):(\d+)\s*[-:]?\s*(error|warning)\s*:?[ ]*(.*)$/i);if(!o)continue;const l=o[1].trim();l.startsWith("/")||l.split(/[\\/]/).includes("..")||s.push({path:l,line:Math.max(1,Number(o[2])),column:Math.max(1,Number(o[3])),severity:o[4].toLowerCase()==="warning"?"warning":"error",message:o[5]})}return s}async function F(e){if(i.phase==="building")return;u({phase:"building",target:e,log:[],result:null}),E();const s=new AbortController;$=s;try{const t=await _(e,s.signal);if(!t.ok){const c=await t.json().catch(()=>({error:"Build request failed"}));u({phase:"done",log:[...i.log,`Error: ${c.error??t.statusText}`],result:{ok:!1,code:null}});return}const n=t.body.getReader(),o=new TextDecoder;let l="";for(;;){const{done:c,value:k}=await n.read();if(c)break;l+=o.decode(k,{stream:!0});const h=l.split(`
|
|
7
|
-
|
|
8
|
-
`);l=h.pop();for(const g of h){if(g.startsWith(":"))continue;const S=g.split(`
|
|
9
|
-
`);let d="",a="";for(const r of S)r.startsWith("event: ")?d=r.slice(7):r.startsWith("data: ")&&(a=r.slice(6));if(d==="log"){let r;try{r=JSON.parse(a)}catch{r=a}u({log:[...i.log,r]})}else if(d==="done"){let r;try{r=JSON.parse(a)}catch{r={ok:!1,code:null}}u({phase:"done",result:r})}}}}catch(t){t.name!=="AbortError"&&u({phase:"done",log:[...i.log,`Error: ${t.message}`],result:{ok:!1,code:null}})}}export{E as a,L as b,F as c,W as d,b as f,y as g,N as o,M as r,U as s,P as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./jsx-runtime-DPjLkJKQ.js";import{q as e,Z as a,$ as s,a0 as i}from"./index-BRJMIUK0.js";import{r as p}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{o as n}from"./build-session-GZcSAfPN.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./configurations-BXU4GGbV.js";const b="workspace.header",h=10;function v(){const{session:t}=e(),o=p.useSyncExternalStore(t.subscribe,t.playState,t.playState)!=="stopped";return r.jsxs(a,{variant:"ghost",size:"compact","data-testid":"project-export","aria-label":"Export project",disabled:o,title:o?"Stop Play mode before exporting the project":"Export project",className:"vgai-chrome-island vgai-glass-island",onClick:()=>{n()},children:[r.jsx(s,{icon:i.action.export}),"Export"]})}export{v as default,h as order,b as point};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/r3f-physics-binding-DzrbpqjM.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/syntactic-prop-specs-eiQXwMIc.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{el as Ue,h1 as He,cw as Ke,eP as Ze,di as se,h2 as $e,bk as Xe,bl as Qe,M as q,_ as xe,bm as Ye,dj as et,bs as de,h3 as ke,f$ as tt,cy as nt,au as rt}from"./index-BRJMIUK0.js";import{BabylonAuthoringAdapter as ot}from"./babylon-authoring-adapter-C8mFMXSr.js";import{i as Se,a as pe,o as st,r as fe,P as it,c as at}from"./pixi-authoring-adapter-BChknIdC.js";import{f as me,t as ct,p as he}from"./pixi-transform-channels-P4rvmusc.js";import{r as lt,c as ut}from"./relative-import-specifier-BFKIWEWs.js";import{l as Pe}from"./oid-transform-D5Kxt6ij.js";import{f as dt,a as pt,b as ft}from"./writer-tw6EcuVO.js";import{s as mt}from"./index-SS9EugVg.js";import{registerPresentedCanvasFrame as ht,withApplicationCollector as gt,capturePixiDisplayObjectThumbnail as wt}from"./canvas-preview-frames-C0QTagA3.js";import{a as vt}from"./source-persistence-backend-CwLYVPXj.js";import{resolveCanvasEntryAdapterForEditor as yt,resolveCanvasPixiForEditor as bt}from"./canvas-entry-runtime-UNYuSfG0.js";import{a as Me}from"./json-history-resource-DwS10tqD.js";import{a as $t}from"./realm-services-CnY105XU.js";import{n as xt,a as St,i as Pt,b as Ct}from"./native-debug-module-2_HVupdg.js";import{createAssetCache as Tt}from"./assets-BcrMQHRv.js";import{r as Ot,a as At,b as Et}from"./create-runtime-DBfUy0SO.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";import"./component-instance-root-B0C5oNEm.js";import"./user-data-Bpj7diUS.js";import"./workspace-arrangement-BdAlBwvd.js";import"./r3f-physics-binding-DzrbpqjM.js";import"./debug-registry-P0_YQGWd.js";import"./three-ingest-runtime-B7rtg3QE.js";import"./three.module-BLhyNg0e.js";import"./three.core-3arARmh6.js";import"./EffectComposer-BEAt0PtQ.js";import"./CopyShader-BzTUYzf6.js";import"./ShaderPass-DTnDQXm0.js";import"./Pass-D1MRT672.js";import"./CSS3DRenderer-BsAqfavI.js";import"./native-entry-surface-BE8LJNdu.js";import"./contract-system-adapters-Bic_7sev.js";import"./game-contract-seams-BnPFGLll.js";import"./loader-BTUKnX5Q.js";import"./KTX2Loader-CaqVE6nY.js";import"./GLTFLoader-KeoruJgS.js";import"./BufferGeometryUtils-B22h7jo4.js";import"./adapter-surface-Y37Nzcyw.js";import"./binding-Bmxqznjk.js";import"./root-stacking-BEd9ZvxC.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"./seeded-random-BgCwIAAU.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";const Ce="this session has no source-write backend",jt=new Set(["key","ref","data-oid","children","style","className"]),Te=new Set(["x","y","rotation","scale","scale-x","scale-y","label","visible"]),Rt=new Set(["x","y","name","children"]),Oe=/^-?\d+(\.\d+)?$/,Ae={container:'<pixiContainer label="Container" />',sprite:'<pixiSprite label="Sprite" />',text:'<pixiText label="Text" text="Text" />',graphics:'<pixiGraphics label="Graphics" />'},_t={container:"Container",sprite:"Sprite",text:"Text",graphics:"Graphics"};function Ee(u){return jt.has(u)||/^on[A-Z]/.test(u)||u.startsWith("__vgai")}function je(u){const m=u.replace(/[_-]+/g," ").replace(/([a-z0-9])([A-Z])/g,"$1 $2").trim();return m?m[0].toUpperCase()+m.slice(1):u}function kt(u,m,h){const P=u.slice(u.lastIndexOf(`
|
|
3
|
-
`,m-1)+1,m),c=u.slice(m,h);return/^\s*$/.test(P)?c.split(`
|
|
4
|
-
`).map((w,l)=>l>0&&w.startsWith(P)?w.slice(P.length):w).join(`
|
|
5
|
-
`):c}function Mt(u,m){const h=new Set(u);return[...h].filter(P=>{let c=m(P);for(;c;){if(h.has(c))return!1;c=m(c)}return!0})}function Dt(u){const{worldId:m,entryPath:h}=u,P=u.pixi??mt;let c,w=()=>{},l,J,M=null,x=new Map,I=new Map;const O=new Map,k=new Set,D=new Map;let L=Promise.resolve();const p=e=>{const t=c.displayObject(e);return(t?pe(t):void 0)??st(m,e)},A=()=>{const e=new Set,t=n=>{const r=c.displayObject(n),o=fe(r);o!==void 0&&e.add(o);const s=r?pe(r):void 0;s!==void 0&&e.add(s);for(const i of c.node(n)?.childIds??[])t(i)};for(const n of c.roots())t(n.id);return e},y=async()=>{if(!(!l?.index||!l.readSource))try{const e=await l.index();x=new Map(Object.entries(e));const t=new Set;for(const r of A()){const o=x.get(r);o&&t.add(o.file)}const n=new Map;await Promise.all([...t].map(async r=>{const o=await l.readSource(r);n.set(r,o.source)})),I=n,w()}catch{}},j=e=>{const t=p(e);if(!t)return null;const n=x.get(t);if(!n)return null;const r=I.get(n.file);if(r===void 0)return null;const o=Pe(r,n.line,n.col);if(r[o]!=="<")return null;const s=dt(r,o);return s<0?null:pt(r,o,s)},$=e=>{const t=e.replaceAll("\\","/"),n=h.replaceAll("\\","/").replace(/^\.?\//,"");if(!t.startsWith("/")&&!/^[A-Za-z]:\//.test(t))return t;for(const r of x.values()){const o=r.file.replaceAll("\\","/");if(o!==n&&!o.endsWith(`/${n}`))continue;const s=o.slice(0,-n.length);if(t.startsWith(s))return t.slice(s.length)}return n},F=e=>{const t=p(e);return(t?x.get(t)?.props:void 0)??[]},V=e=>{const t=c.displayObject(e);if(!t||!Se(t))return null;const n=fe(t),r=pe(t);return n&&n!==r?n:null},R=e=>{const t=c.displayObject(e);if(!t||!Se(t))return null;const n=V(e),r=n?x.get(n):void 0,o=p(e),s=o?x.get(o):void 0,i=r?.component??s?.tag;return i?{name:i,...r?.file?{sourcePath:$(r.file)}:{}}:null},Z=e=>{const t=p(e);if(!t)return{anchored:!1,reason:"This rendered Canvas object has no authored source identity."};const n=x.get(t);if(!n)return{anchored:!1,reason:"Source metadata is still loading or unavailable."};const r=$(n.file);return{anchored:!0,kind:"source",file:r,line:n.line,col:n.col,display:`${r}:${n.line}`}},ie=u.writeBackend?{isDirty:()=>!1,save:async()=>{},destination:h,lastError:()=>{const e=J?.shell.projectHistory?.getSnapshot().lastError;return e&&(e.code==="apply-failed"||e.code==="compensation-failed"||e.code==="history-limit")?e.message:null}}:void 0,X=e=>c.getTransform(e)??{position:[0,0],rotation:0,scale:[1,1]},Y=(e,t,n,r)=>{if(!R(e))return!1;const o=he(t,r,n);if(!o.writable)return!1;const s=F(e);return o.writes.some(i=>!n.some(a=>a.name===i.prop)&&!s.some(a=>a.name===i.prop))},ee=e=>{if(!e.isLiteral)return`{${e.rawValue}}`;const t=e.rawValue;return e.isExpression?t==="true"?!0:t==="false"?!1:Oe.test(t)?Number(t):t.replace(/^['"]|['"]$/g,""):t},ae=e=>e.isExpression?e.rawValue==="true"||e.rawValue==="false"?"boolean":Oe.test(e.rawValue)?"number":"string":"string",te=e=>typeof e=="number"?me(e):typeof e=="boolean"?e?"true":"false":String(e),ce=(e,t,n)=>{const r=e?.find(s=>s.name===n);if(r)return ee(r);const o=t.find(s=>s.name===n);return o?o.defaultValue??o.defaultText:void 0},W=(e,t,n)=>!!(t?.isLiteral&&n?.optional&&l?.removeProp&&!k.has(`${e}|jsx.${t.name}`)),ne=async(e,t)=>{const n=X(e),r=["position","rotation","scale"].filter(v=>ct(v,t,n));if(r.length===0)return!1;const o=v=>{v==="position"?c.setTransform(e,{position:t.position}):v==="rotation"?c.setTransform(e,{rotation:t.rotation}):c.setTransform(e,{scale:t.scale}),w()},s=p(e);if(!s||!l?.writeProp){console.warn(`[canvas-source ${h}] transform on "${e}" is not persistable (${s?"no source-write backend":"node has no source stamp"}) — reverting.`);for(const v of r)o(v);return!1}const i=j(e)??[],a=R(e),d=v=>Y(e,v,i,n),f=[];for(const v of r){if(d(v)){k.add(`${e}|${v}`),se(`${v} is owned by <${a?.name??"this component"}>'s own code — see Console`),q.warn(`${v} on <${a?.name??"this component"}> is not writable — the component declares no prop for it, so a written value would never reach the running game (the component's own code owns that channel). Edit ${a?.sourcePath??"the component definition"} instead. Reverting.`,"authoring"),o(v);continue}const B=he(v,n,i);if(!B.writable){k.add(`${e}|${v}`),console.warn(`[canvas-source ${h}] ${v} on "${e}" is not writable — ${B.reason} Reverting the live object.`),o(v);continue}for(const N of B.writes)f.push({channel:v,...N})}if(f.length===0)return!1;let S=!1;const C=async v=>{for(const B of f){const N=await v.writeProp(s,B.prop,B.value,{addIfMissing:!0,...B.prop==="scale"?{allowShapeUpgrade:!0}:{}});if(N.changed){S=!0;continue}!N.dynamic&&!N.error||(N.dynamic&&k.add(`${e}|${B.channel}`),console.warn(`[canvas-source ${h}] ${B.prop} write refused for oid "${s}": ${N.dynamic?"dynamic expression (guarded)":N.error??"no change"} — reverting.`),o(B.channel))}};return f.length>1&&l.runGesture?await l.runGesture("Transform",v=>C(v)):await C(l),await y(),w(),S},le=(e,t)=>{const n=c.displayObject(e);if(n)return t==="label"?n.label:t in n?n[t]:void 0},re=(e,t,n)=>{const r=c.displayObject(e);r&&(t==="label"?r.label=String(n):t in r&&(r[t]=n))},ue=async(e,t,n,r)=>{const o=p(e);if(!o||!l?.writeProp)return console.warn(`[canvas-source ${h}] cannot write "${n}" on "${e}": ${o?"no source-write backend in this session":"node has no source stamp"}.`),!1;const s=`${e}|${t}`,i=le(e,n);O.set(s,r),re(e,n,r),w();let a;try{a=await l.writeProp(o,n,te(r),{addIfMissing:!0})}catch(d){return O.delete(s),w(),console.warn(`[canvas-source ${h}] prop write failed for oid "${o}" prop "${n}": ${String(d)}`),!1}if(!a.changed){O.delete(s),a.dynamic&&k.add(s),i!==void 0&&re(e,n,i),w();const d=R(e)?.name??c.displayObject(e)?.label??e,f=a.dynamic?`it is bound to an expression in <${d}>'s own source, so a direct edit cannot land`:`the component declares no ${JSON.stringify(n)} prop to write${a.error?` (${a.error})`:""}`;return se(`${n} on <${d}> is not writable — see Console`),q.warn(`${JSON.stringify(n)} on <${d}> is not writable — ${f}. Edit the component definition (right-click the row → Open Component Source), or the prop that drives it. Reverting.`,"authoring"),!1}return await y(),!0},E=e=>{const t=Z(e);return t.anchored?t.file:h},G=(e,t=l?.writeProp!==void 0,n=h)=>Xe({resolve:()=>t?{reaches:"writer",anchorKind:"source-prop",destination:n,write:e}:Qe(Ce),record:()=>{},report:r=>{console.warn(`[canvas-source ${n}] this edit stays live-only — ${r}.`)}}),U=e=>{console.warn(`[canvas-source ${h}] ${e}`)},Q=ut({report:U,noWriterReason:Ce,backend:()=>l,onChanged:async()=>{await y(),w()}}),_=e=>Q.structRefusal(e),T=(e,t,n,r)=>Q.structOp(r??p(e),e,t,n,E(e)),oe=(e,t,n)=>{const r=[...new Set(e.map(p).filter(o=>!!o))];return r.length!==new Set(e).size?_(`${t} refused: every selected node must be source-addressable.`):Q.structMany(r,t,n,E(e[0]??""))},g=e=>{const t=Mt(e,i=>c.node(i)?.parentId??null),n=i=>{const a=p(i),d=a?x.get(a):void 0,f=d?I.get(d.file):void 0;if(!a||!d||f===void 0)return null;const S=Pe(f,d.line,d.col),C=ft(f,S);return f[S]==="<"&&C>S?{file:d.file,offset:S,text:kt(f,S,C)}:null},r=[],o=new Set;for(const i of t){const a=p(i);if(!a||o.has(a))continue;o.add(a);const d=n(i);if(!d)return null;r.push(d)}if(r.length===0)return null;const s=r[0].file;return r.some(i=>i.file!==s)?null:(r.sort((i,a)=>i.offset-a.offset),{sourceFile:s,text:r.map(i=>i.text).join(`
|
|
6
|
-
`),count:r.length})},b=e=>(U(e),se(e),!1),z=async e=>{M=null;const t=g(e);if(!t)return b("Copy needs source-addressable Canvas nodes from one source file.");const n=globalThis.navigator?.clipboard;if(!n?.writeText)return b("The system clipboard is unavailable.");try{await n.writeText(t.text)}catch{return b("The system clipboard refused the Canvas copy.")}return M=t,se(`Copied ${t.count} ${t.count===1?"node":"nodes"}.`),!0},H=async e=>{if(l?.writeStructMany)return oe(e,"delete");let t=Ye;for(const n of e)t=await T(n,"delete");return t},ge=e=>{const t=(o,s,i)=>{const a=V(o),d=a??p(o),f=d?x.get(d):void 0;return d&&f?{id:o,oid:d,file:f.file,op:s,definition:!!a}:null};if(e)return t(e,"create");const n=c.roots().at(-1);if(!n)return null;const r=t(n.id,"create-sibling");return r?{...r,op:r.definition?"create":"create-sibling"}:null},De=e=>{const t=ge(e);return!!M&&!!t&&t.file===M.sourceFile},Fe=async e=>{const t=M;if(!t)return b("Copy or cut a Canvas node before pasting.");const n=globalThis.navigator?.clipboard;if(!n?.readText)return b("The system clipboard is unavailable.");try{if(await n.readText()!==t.text)return b("The clipboard changed after the Canvas copy.")}catch{return b("The system clipboard refused the Canvas paste.")}const r=ge(e);return r?r.file!==t.sourceFile?b("Cross-file paste is refused because the destination may not import the copied dependencies."):$e(await T(r.id,r.op,{snippet:t.text},r.oid)):b("Paste needs a source-addressable Canvas parent.")},we=e=>{const t=[];let n=e;for(;n;)t.push(n),n=n.parent;const r=new P.Matrix;for(let o=t.length-1;o>=0;o--){const s=t[o];s.updateLocalTransform(),r.append(s.localTransform)}return r},Be=(e,t)=>{const n=c.displayObject(e),r=c.displayObject(t);if(!n||!r)return null;const o=we(r).clone().invert().append(we(n)),s=new P.Transform;o.decompose(s);const i=n.pivot??{x:0,y:0};return{position:[o.tx+i.x*o.a+i.y*o.c,o.ty+i.x*o.b+i.y*o.d],rotation:[s.rotation],scale:[s.scale.x,s.scale.y],scalarChannels:["rotation"]}},ve=e=>{let t=0;const n=r=>{fe(c.displayObject(r))===e&&t++;for(const o of c.node(r)?.childIds??[])n(o)};for(const r of c.roots())n(r.id);return t},Ne=(e,t)=>{const n=V(e);if(!n)return 0;let r=1;const o=s=>{s!==e&&V(s)===n&&!j(s)?.some(i=>i.name===t)&&(r+=1);for(const i of c.node(s)?.childIds??[])o(i)};for(const s of c.roots())o(s.id);return r},Ie=async(e,t)=>{const n=p(e),r=t.startsWith("jsx.")?t.slice(4):null;if(!n||!r||!l?.removeProp)return!1;const o=await l.removeProp(n,r);return o.changed?(O.delete(`${e}|${t}`),await y(),w(),!0):(U(`revert ${r} refused/no-op: ${o.error??"no change"}.`),!1)},ye=(e,t)=>(e==="position"?["x","y"]:e==="rotation"?["rotation"]:t.some(r=>r.name==="scale-x"||r.name==="scale-y")?["scale-x","scale-y"]:["scale"]).filter(r=>t.some(o=>o.name===r)),Ve=async(e,t)=>{const n=p(e),r=j(e);if(!n||!r||!l?.removeProp)return!1;const o=ye(t,r);if(o.length===0)return!1;let s=!1;const i=async a=>{for(const d of o){const f=await a.removeProp?.(n,d);f?.changed?s=!0:U(`revert ${d} refused/no-op: ${f?.error??"no change"}.`)}};return o.length>1&&l.runGesture?await l.runGesture(`Remove ${t}`,a=>i(a)):await i(l),s?(await y(),w(),!0):!1},ze={openComponent:()=>{Ke(Ze)},describe:e=>{const t=R(e);if(!t||He(t.name,t.sourcePath).length===0)return null;const n=j(e);if(!n)return null;const r=F(e),o=n.map(s=>{const i=`jsx.${s.name}`,a=r.find(f=>f.name===s.name);if(Ee(s.name)||Te.has(s.name)||!W(e,s,a))return null;const d=!!(a?.defaultValue!==void 0&&V(e)&&l?.runGesture&&l.writeComponentDefault&&l.removeProp);return{path:i,label:je(s.name),value:ee(s),...a?.defaultText===void 0?{}:{defaultText:a.defaultText},canApplyToComponent:d,affectedInstanceCount:Ne(e,s.name),...d?{}:{applyUnavailableReason:a?.defaultValue===void 0?"The component default is computed or absent, so source cannot be changed safely.":"This session cannot atomically update the component and its callsite."}}}).filter(s=>s!==null);return{componentName:t.name,...t.sourcePath?{sourcePath:t.sourcePath}:{},overrides:o}},revert:async(e,t)=>{let n=!1;const r=async o=>{const s=p(e);if(s)for(const i of t){const a=i.startsWith("jsx.")?i.slice(4):null;if(!a)continue;const d=await o.removeProp?.(s,a);n||=d?.changed===!0}};return t.length>1&&l?.runGesture?await l.runGesture(`Revert ${t.length} Overrides`,r):l&&await r(l),await y(),w(),n?{destination:E(e),persisted:!0}:void 0},applyToComponent:async(e,t)=>{const n=t.startsWith("jsx.")?t.slice(4):null,r=n?F(e).find(d=>d.name===n):void 0,o=V(e),s=p(e),i=R(e);if(!n||r?.defaultValue===void 0||!o||!s||!l?.runGesture||!l.writeComponentDefault||!l.removeProp)return{changed:!1,message:"Apply was refused because both literal source writes are not available."};const a=ce(j(e),F(e),n);return await l.runGesture(`Apply ${n} to ${i?.name??"Component"}`,async d=>{const f=await d.writeComponentDefault?.(o,n,te(a));if(!f?.changed)throw new Error(f?.error??"The component default did not change.");const S=await d.removeProp?.(s,n);if(!S?.changed)throw new Error(S?.error??"The callsite override was not removed.")}),await y(),w(),{changed:!0,message:`${n} now defaults to ${String(a)} in ${i?.name??"the component"}.`,write:{destination:i?.sourcePath??E(e),persisted:!0}}}},be={create:(e,t)=>{const n=Ae[e];if(!n||!l?.writeStruct)return{id:"",ack:void 0};if(t)return{id:"",ack:T(t,"create",{snippet:n})};const r=c.roots().at(-1);return r?{id:"",ack:T(r.id,"create-sibling",{snippet:n})}:{id:"",ack:_("create refused: the source needs one addressable root insertion point.")}},creatableKinds:e=>l?.writeStruct?e&&!p(e)?[]:!e&&c.roots().length===0?[]:Object.keys(Ae).map(t=>({kind:t,label:_t[t]??t})):[],remove:e=>T(e,"delete"),removeMany:e=>H(e),copy:e=>z(e),canCopy:e=>g(e)!==null,cut:async e=>await z(e)?$e(await H(e)):!1,paste:e=>Fe(e),canPaste:e=>De(e),duplicate:e=>({id:e,ack:T(e,"duplicate")}),wrap:(e,t)=>T(e,"wrap",{wrapperTag:t??"pixiContainer"}),unwrap:e=>T(e,"unwrap"),group:e=>{const t=[...new Set(e)];if(t.length<2)return{id:null,ack:void 0};const n=c.node(t[0])?.parentId??null;return t.some(r=>c.node(r)?.parentId!==n)?{id:null,ack:_("group refused: select two or more siblings.")}:{id:"",ack:oe(t,"group",{wrapperTag:"pixiContainer"})}},canUngroup:e=>{const t=p(e);return!!(t&&x.get(t)?.tag==="pixiContainer"&&(c.node(e)?.childIds.length??0)>0)},ungroup:e=>be.canUngroup?.(e)?{ids:[...c.node(e)?.childIds??[]],ack:T(e,"unwrap")}:{ids:[],ack:void 0},reparent:(e,t)=>{if(!t)return _("reparent refused: drop onto a source-addressable container.");const n=p(t),r=p(e),o=Be(e,t);return!n||!r||!o?_("reparent refused: the source or destination is not addressable."):T(e,"reparent",{parentOid:n,rebase:o,destinationInstances:ve(n),sourceInstances:ve(r)})},reorder:(e,t)=>{if(t){const o=p(t);return o?T(e,"reorder",{targetOid:o}):_("reorder refused: the target has no source identity.")}const n=c.node(e)?.parentId,r=n?p(n):null;return r?T(e,"reorder",{parentOid:r}):_("reorder-to-end refused: the parent has no source identity.")}},Le=(e,t)=>lt($(e),$(t)),We=async e=>{const t=e.sourcePath;if(!t||!l?.readSource)return null;try{const{source:n}=await l.readSource(t),{parseAuthoringTsx:r}=await xe(async()=>{const{parseAuthoringTsx:s}=await import("./r3f-physics-binding-DzrbpqjM.js").then(i=>i.t);return{parseAuthoringTsx:s}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10])),{localComponentPropSpecs:o}=await xe(async()=>{const{localComponentPropSpecs:s}=await import("./syntactic-prop-specs-eiQXwMIc.js");return{localComponentPropSpecs:s}},__vite__mapDeps([11,1,2,3,4,5,6,7,8,9,10]));return o(r(t,n),new Map).get(e.name)??null}catch{return null}},Ge=e=>e.filter(t=>!t.optional&&t.defaultText===void 0&&t.type!=="enum"&&!Rt.has(t.name)),qe=e=>e.filter(t=>!t.optional&&t.defaultText===void 0&&t.type==="enum"&&t.options?.[0]!==void 0).map(t=>{const n=t.options?.[0];return typeof n=="string"?` ${t.name}=${JSON.stringify(n)}`:` ${t.name}={${n}}`}).join("");return{provenance:{source:"source-code",label:"Pixi source",detail:"Live @pixi/react display tree; literal JSX props write back to the .tsx source (expression-bound props are read-only)."},...ie?{persistence:ie}:{},structure:be,assetDrop:{accepts:(e,t,n)=>{if(!l?.writeStruct||!(e?p(e):c.roots().at(-1)?.id))return!1;const o=n?.item;return o?.kind==="component"?o.surface==="canvas":/\.(?:png|jpe?g|webp|gif|avif|svg)$/i.test(t)},drop:async(e,t,n)=>{const r=e||c.roots().at(-1)?.id||"",o=p(r),s=o?x.get(o):void 0;if(!r||!s)return _("asset drop refused: there is no source-addressable insertion point.");const i=n?.item,a=n?.position,d=a?` x={${me(a[0])}} y={${me(a[1])}}`:"";let f,S;if(i?.kind==="component"){if(i.surface!=="canvas")return _(`${i.name} is a ${i.surface} component, not a Canvas prefab.`);const C=await We(i),v=C?Ge(C):[];if(v.length>0){const K=v.map(Je=>`\`${Je.name}\``).join(", ");return _(`${i.name} needs ${K} — required props with no default, which a drop cannot supply. Place it from a story that provides them, or give them defaults in ${i.sourcePath??"its component"}.`)}const N=(C?C.some(K=>K.name==="x"||K.name==="y"):null)===!1;if(N&&a){const K=`${i.name} places itself — its own code owns x/y, so the drop point was not written. Move it by editing that component, or give it x/y props.`;se(K),U(K)}f=`<${i.name}${N?"":d}${C?qe(C):""} />`,S={name:i.name,module:Le(s.file,i.sourcePath),kind:i.exportKind}}else{if(!/\.(?:png|jpe?g|webp|gif|avif|svg)$/i.test(t))return _(`${t} is not an image or Canvas prefab.`);f=`<pixiSprite label="${(t.split("/").pop()?.replace(/\.[^.]+$/,"")||"Sprite").replace(/["\\]/g,"")}" texture={Texture.from(${JSON.stringify(t)})}${d} />`,S={name:"Texture",module:"pixi.js"}}return T(r,e?"create":"create-sibling",{snippet:f,ensureImport:S})}},truth:e=>({site:Z(e),writeAnchorKind:l&&p(e)?"source-prop":"live-only"}),componentIdentity:R,instances:()=>ze,bind(e){c=e.a2d,w=e.notify,J=e.store,l=Ue(u.writeBackend,e.store.shell.projectHistory),y()},onReindex(){for(const e of A()){const t=x.get(e);if(t===void 0||!I.has(t.file)){y();return}}},transformEditability(e,t){if(!p(e))return{writable:!1,reason:"This rendered part has no authored source identity."};if(!l?.writeProp)return{writable:!1,reason:"This session has no source writer."};if(k.has(`${e}|${t}`))return{writable:!1,reason:`${t} is controlled by a JSX expression.`};const r=j(e);if(!r)return{writable:!1,reason:"Source metadata is still loading or unavailable."};if(Y(e,t,r,X(e))){const s=R(e)?.name??"this component";return{writable:!1,reason:`${t} is owned by <${s}>'s own code — it declares no prop for it.`}}const o=he(t,X(e),r);return o.writable?{writable:!0,...l.removeProp&&ye(t,r).length>0?{removable:!0}:{}}:{writable:!1,reason:o.reason}},beginTransformEdit(e){D.has(e)||D.set(e,X(e))},writeTransform(e,t){c.setTransform(e,t),w()},endTransformEdit(e){const t=D.get(e);if(!t)return;D.delete(e);const n=L.then(()=>G(()=>ne(e,t).catch(r=>(console.error(`[canvas-source ${E(e)}] transform commit failed`,r),!1)),l?.writeProp!==void 0,E(e)));return L=n.then(()=>{},r=>{console.error(`[canvas-source ${h}] transform commit failed`,r)}),n},removeTransform(e,t){return G(()=>Ve(e,t),l?.removeProp!==void 0,E(e))},reportStructureLiveOnly(e,t){console.warn(`[canvas-source ${h}] ${e} stayed live-only — ${t}.`)},properties(e){if(!c.displayObject(e))return[];const t=[{path:"name",label:"Name",type:"string"},{path:"visible",label:"Visible",type:"boolean",group:"Visibility"}],n=j(e)??[],r=F(e),o=new Map(n.map(a=>[a.name,a])),s=[...r.map(a=>a.name),...n.filter(a=>!r.some(d=>d.name===a.name)).map(a=>a.name)],i=R(e)?.name??"Properties";for(const a of s){if(Ee(a)||Te.has(a))continue;const d=o.get(a),f=r.find(v=>v.name===a),S=!d&&f?.defaultText!==void 0&&f.defaultValue===void 0,C=W(e,d,f);t.push({path:`jsx.${a}`,label:je(a),type:S?"string":f?.type??(d?ae(d):"string"),...f?.options?{options:[...f.options]}:{},readonly:S||(d?!d.isLiteral:!1),...d?{}:{defaulted:!0},...C?{resettable:!0}:{},...C&&f?.defaultText!==void 0?{revertsTo:f.defaultText}:{},group:i})}return t},get(e,t){const n=c.displayObject(e);if(!n)return;const r=O.get(`${e}|${t}`);if(r!==void 0)return r;if(t==="name")return n.label??"";if(t==="visible")return n.visible;if(t.startsWith("jsx."))return ce(j(e),F(e),t.slice(4))},set(e,t,n){const r=t==="name"?"label":t==="visible"?"visible":t.startsWith("jsx.")?t.slice(4):null;if(r)return G(()=>ue(e,t,r,n),void 0,E(e))},remove(e,t){return G(()=>Ie(e,t),l?.removeProp!==void 0,E(e))},dispose(){O.clear(),k.clear(),D.clear()}}}function Ft(u,m,h,P=.1){const c=u.getBoundingClientRect();if(c.width<2||c.height<2||!(m.width>0)||!(m.height>0))return!1;const w=Math.min(4,Math.max(P,Math.min((c.width-96)/m.width,(c.height-96)/m.height)));return h.setView(c.width/2-(m.x+m.width/2)*w,c.height/2-(m.y+m.height/2)*w,w),!0}function Bt(u,m){return ht(u,async()=>{for(let h=0;h<24;h++){if(m())return null;await new Promise(P=>setTimeout(P,0))}return null})}const Re={width:1280,height:720};function Nt(){return At({loop:Et({update:()=>{}}),assets:Tt()})}function It(){const u=document.createElement("canvas");return u.dataset.vgaiCanvasSceneSurface="true",u.style.position="absolute",u.style.inset="0",u.style.width="100%",u.style.height="100%",u.style.display="block",u}function Vt(u){const{worldId:m,entry:h,layer:P,canvas:c,game:w,mounted:l,store:J,onFirstFrame:M}=u,x=vt({history:J.shell.projectHistory}),I=new ot(l.substrate.root,J,{canvas:c,api:l.substrate.api,persistence:x,journal:Me(m),provenance:{source:"source-code",label:"babylon",detail:"Native Babylon.js scene graph; imperative edits write to the construction site in the game’s own source."}});let O=w.systemAdapters;de(O);const k=w.subscribeSystemAdapters?.(()=>{O=w.systemAdapters,ke(O),J.shell.notifyIngestEdit()}),D=()=>{const $=P.getBoundingClientRect();$.width>0&&$.height>0&&l.resize?.($.width,$.height)},L=new ResizeObserver(D);L.observe(P),D();let p=!1,A=!1,y=0;const j=()=>{if(y=requestAnimationFrame(j),!p)try{l.update?.(0),A||(A=!0,M?.())}catch($){cancelAnimationFrame(y),q.error(`[babylon-design] world "${m}" failed to render: ${String($)}`,"authoring")}};return y=requestAnimationFrame(j),q.log(`[babylon-design] world "${m}" mounted as a native Babylon Scene (${h})`,"authoring"),{adapter:I,dispose(){p=!0,cancelAnimationFrame(y),L.disconnect(),I.dispose(),k?.(),de(null),l.dispose(),c.remove(),w.dispose()}}}const _e=new WeakSet;async function Hn(u,m,h,P,c,w,l){if(!m)throw new Error(`canvas root "${u}": no \`entry\` declared — nothing to mount.`);const M=await(await $t(P,et())).loadEntryModule(m,u,"canvas"),x=xt(u,M),I=St(u,M,"canvas"),O=await yt(M,u);if(!O)throw new Error(`canvas root "${u}": entry module "${m}" must default-export a React component (\`export default function World() { … }\`) — or export an \`adapter\` for full control.`);const k=rt(),D=k?.config.resolution?.width??Re.width,L=k?.config.resolution?.height??Re.height,p=w??nt,A=It();h.appendChild(A);const y=Nt(),j={canvas:A,width:D,height:L,game:y,headless:!1,transparent:!0,preserveDrawingBuffer:!0};let $,F;try{$=await gt(async g=>{const b=await O.mount(j);return F=g[0],b})}catch(g){throw A.remove(),y.dispose(),g}if(Ot(y,O,$,{id:u}),Pt(y,x?[x]:[]),Ct(y,I?[I]:[]),$.substrate.name==="babylon")return Vt({worldId:u,entry:m,layer:h,canvas:A,game:y,mounted:$,store:c,onFirstFrame:l});if($.substrate.name!=="pixi")throw $.dispose(),A.remove(),y.dispose(),new Error(`canvas root "${u}" mounted undeclared editor substrate "${$.substrate.name}" — declare pixi or babylon and provide its authoring adapter.`);const V=$.substrate.root,R=await bt();F===void 0&&q.error(`[canvas-design] world "${u}" mounted, but its Pixi Application was never handed to the design view (Pixi's \`__PIXI_APP_INIT__\` hook did not report one) — this Scene will render no frames at all. The world itself is fine; the editor cannot draw it.`,"authoring");let Z=y.systemAdapters;de(Z);const ie=y.subscribeSystemAdapters?.(()=>{Z=y.systemAdapters,ke(Z),c.shell.notifyIngestEdit()}),X=await tt(),Y=new it(V,c,{pixi:R,identity:at(u),journal:Me(u),target:Dt({worldId:u,entryPath:m,pixi:R,writeBackend:X}),surface:()=>A,capturePreview:(g,b)=>wt(g,{...b,pixi:R}),pointFromClient:(g,b,z)=>{const H=p.get();return{x:(g-z.left-H.x)/H.zoom,y:(b-z.top-H.y)/H.zoom}}}),ee=()=>{const g=h.getBoundingClientRect(),b=F?.renderer;b&&g.width>0&&g.height>0&&b.resize(g.width,g.height)},ae=new ResizeObserver(ee);ae.observe(h),ee();const te=()=>{const g=F?.renderer;if(!g)return!1;const b=h.getBoundingClientRect();b.width>0&&b.height>0&&(g.screen.width!==b.width||g.screen.height!==b.height)&&g.resize(b.width,b.height);const z=p.get();return g.render({container:V,transform:new R.Matrix(z.zoom,0,0,z.zoom,z.x,z.y)}),!0},ce=Bt(A,te);let W=0,ne=!1,le=!1;const re=()=>{if(W=requestAnimationFrame(re),!ne)try{te()&&!le&&(le=!0,l?.())}catch(g){cancelAnimationFrame(W),W=0,q.error(`[canvas-design] world "${u}" failed to render — the design view is frozen: ${String(g)}`,"authoring")}};W=requestAnimationFrame(re);const ue=_e.has(p);_e.add(p);const E=h.getBoundingClientRect();!ue&&E.width>0&&E.height>0&&p.setView(E.width/2,E.height/2,1);let G=0,U=0,Q=ue;const _=p.subscribe(()=>{Q=!0}),T=()=>{const g=h.getBoundingClientRect();return g.width<2||g.height<2?1:Math.max(1,Math.min((g.width-96)/D,(g.height-96)/L))},oe=()=>{if(Q||ne||U++>180)return;const g=V.getBounds();Ft(h,g,p,T())||(G=requestAnimationFrame(oe))};return G=requestAnimationFrame(oe),q.log(`[canvas-design] world "${u}" mounted for design-time authoring (${m})`,"authoring"),{adapter:Y,dispose(){ne=!0,cancelAnimationFrame(W),cancelAnimationFrame(G),_(),ae.disconnect(),ce(),Y.dispose(),ie?.(),de(null);try{$.dispose()}catch(g){q.error(`[canvas-design] dispose failed: ${String(g)}`,"authoring")}A.remove(),y.dispose()}}}export{Hn as mountCanvasDesignLayer};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-C3Pw-9So.js","assets/extend-Cc-nEa_A.js","assets/jsx-runtime-DPjLkJKQ.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-bQE2NA0D.js","assets/index-nmcBqr7Y.js","assets/index-D_NuPfjr.js","assets/index-SS9EugVg.js","assets/index-BRJMIUK0.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{L as H,es as Y,_ as A}from"./index-BRJMIUK0.js";import{r as u}from"./index-nmcBqr7Y.js";import{g as q}from"./debug-registry-P0_YQGWd.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-D_NuPfjr.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";const _=1e4,T=new WeakSet;function G(e){if(e===null||typeof e!="object")return!1;const r=e;return typeof r.id=="string"&&r.id.length>0&&typeof r.mount=="function"}function J(e,r,n){const{createElement:o,Fragment:F,useEffect:O,useLayoutEffect:C,createRoot:b,extend:D}=n,M=o(r);return{id:e,async mount(i){const m=i.game?q(i.game):null,c=i.canvas;if(T.has(c))throw new Error(`canvas world "${e}": this lane has already mounted this canvas. @pixi/react keys its reconciler roots off the canvas element, so re-using one would resurrect a root whose Application is destroyed. Hand each mount a fresh canvas (every vgai host already does).`);T.add(c),D(n.pixi);let p;const S=new Promise(t=>{p=t});let E;const $=new Promise(t=>{E=t});let v;const I=new Promise(t=>{v=t});let y;const U=new Promise(t=>{y=t});function N(){return C(()=>(p(),v),[]),O(()=>(E(),y),[]),null}const V=o(F,null,M,o(N)),g=b(c),h={antialias:!0,width:i.width,height:i.height,resolution:i.dpr??globalThis.devicePixelRatio??1,autoDensity:!0,backgroundAlpha:i.transparent?0:1,preserveDrawingBuffer:i.preserveDrawingBuffer??!1,autoStart:!1,sharedTicker:!1};let w;const j=new Promise(t=>{w=t}),x=t=>{w(`the Pixi tree crashed before its first commit — ${t.message} (mount() fails loudly instead of hanging)`)};globalThis.addEventListener?.("error",x);let l,d;try{l=await g.render(V,h);const f=new Promise(B=>{d=setTimeout(()=>B(`no first commit within ${_/1e3}s (mount() fails loudly instead of hanging)`),_)}),P=await Promise.race([Promise.all([S,$]).then(()=>null),j,f]);if(P!==null)throw new Error(`canvas world "${e}": ${P}`)}catch(t){try{l?.destroy(!1,{children:!0})}catch{}throw t}finally{d!==void 0&&clearTimeout(d),globalThis.removeEventListener?.("error",x)}if(l===void 0)throw new Error(`canvas world "${e}": initialized without an Application`);const a=l;a.ticker.lastTime=0;let R=0,s=!1;const W=m?{debug:m.adapter}:{},z=Promise.all([I,U]).then(()=>{s=!0,a.destroy(!1,{children:!0})});return{kind:"canvas",canvas:c,substrate:{name:"pixi",root:a.stage},drivesOwnLoop:!1,systems:W,disposeComplete:z,update(t){s||(R+=t*1e3,a.ticker.update(R))},resize(t,f){s||a.renderer.resize(t,f)},dispose(){s||(s=!0,a.renderer.events.setTargetElement(null),g.render(null,h))}}}}}function K(e,r,n){const o=e;return G(o?.adapter)?o.adapter:typeof o?.default=="function"?J(r,o.default,n):null}let L=null;const Q=["createElement","Fragment","useEffect","useLayoutEffect","createPixiRoot","extendPixi","projectPixi"];async function X(){const e=await import(Y),r=Q.filter(n=>e[n]===void 0||e[n]===null);if(r.length>0)throw new Error(`The packaged runtime's synthetic canvas module did not export ${r.join(", ")} — see CANVAS_DOORWAY in vite-plugin-module-doorways.ts.`);return{createElement:e.createElement,Fragment:e.Fragment,useEffect:e.useEffect,useLayoutEffect:e.useLayoutEffect,createRoot:e.createPixiRoot,extend:e.extendPixi,pixi:e.projectPixi}}async function Z(){const[e,r]=await Promise.all([A(()=>import("./index-C3Pw-9So.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13])),A(()=>import("./index-SS9EugVg.js").then(n=>n.s),__vite__mapDeps([7,8,5,3,6,2,9,10,11,12,13]))]);return{createElement:u.createElement,Fragment:u.Fragment,useEffect:u.useEffect,useLayoutEffect:u.useLayoutEffect,createRoot:e.createRoot,extend:e.extend,pixi:r}}async function k(){return L??=(async()=>await H()?X():Z())(),L}async function ue(){return(await k()).pixi}async function de(e,r){return K(e,r,await k())}export{de as resolveCanvasEntryAdapterForEditor,ue as resolveCanvasPixiForEditor};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{jF as P,jG as F,o as M,b as w,n as $,jH as T,m as N,f as H,B as A,W as L}from"./index-BRJMIUK0.js";import{GAME_CONTRACT_SHAPE as V,GAME_LIFECYCLE_SHAPE as B,GAME_SYSTEMS_SHAPE as U}from"./game-contract-seams-BnPFGLll.js";function z(e,t){const o=[];let s=!0;for(const r of t.childIds){const i=e.hierarchy.node(r);!i||i.parentId!==t.id?s=!1:o.push(i)}return{valid:s,children:o}}function W(e){return typeof e=="object"&&e!==null&&e.isObject3D===!0}const Y=64;function K(e,t,o){const s=[];let r=null;for(const i of t){let a;try{a=e(i)}catch(n){r=`hierarchy.object3D threw on the walked node ${i}: ${n instanceof Error?n.message:String(n)}`;break}if(a!=null){if(!W(a)){r=`hierarchy.object3D answered the walked node ${i} with a ${typeof a} that is not an Object3D`;break}s.push({id:i,object:a})}}return o("editor.hierarchy.object3D",r?"fail":"pass",r??`hierarchy.object3D answered ${s.length} of ${t.length} walked node(s) with an Object3D and the rest with null`),{objects:r?[]:s}}function q(e,t,o,s){let r;try{r=e(o)}catch(i){return`hierarchy.idForObject3D threw on the object hierarchy.object3D returned for ${t}: ${i instanceof Error?i.message:String(i)}`}return r==null?null:typeof r!="string"||!s.has(r)?`hierarchy.idForObject3D answered ${JSON.stringify(r)} for the object hierarchy.object3D returned for ${t}, which is not a node this walk listed`:!0}function J(e,t,o,s){if(t.length===0){s("editor.hierarchy.idForObject3D","fail","hierarchy.idForObject3D could not be asked about anything: hierarchy.object3D handed back no Object3D for any walked node");return}let r=0,i=null;for(const{id:a,object:n}of t){const c=q(e,a,n,o);if(c===!0){r+=1;continue}if(c!==null){i=c;break}}!i&&r===0&&(i=`hierarchy.idForObject3D answered null for all ${t.length} object(s) hierarchy.object3D handed back, so nothing it returned could be checked against the walk`),s("editor.hierarchy.idForObject3D",i?"fail":"pass",i??`hierarchy.idForObject3D named ${r} of ${t.length} object(s) hierarchy.object3D returned with an id this walk listed`)}function X(e){const{adapter:t,subject:o,epoch:s,receipts:r,walked:i}=e,{object3D:a,idForObject3D:n}=t.hierarchy;if(!a)return;const c=(h,f,g)=>{r.push({seam:h,subject:o,epoch:s,stage:"operation",outcome:f,source:"conformance-probe",detail:g})},{objects:d}=K(a,i.slice(0,Y),c);n&&J(n,d,new Set(i),c)}function Q(e){const{adapter:t,subject:o,epoch:s,record:r,receipts:i}=e,a=r("editor.hierarchy.roots","operation",()=>t.hierarchy.roots(),l=>Array.isArray(l)&&l.length>0),n=Array.isArray(a)?a:[];let c=n.length>0;const d=new Set,h=[...n],f=1e4;for(;h.length>0&&d.size<f;){const l=h.shift();if(!l||d.has(l.id)){c=!1;continue}d.add(l.id);const b=r("editor.hierarchy.node","operation",()=>t.hierarchy.node(l.id),y=>y!==null&&typeof y=="object"&&y.id===l.id&&Array.isArray(y.childIds));if(!b){c=!1;continue}const j=z(t,b);c&&=j.valid,h.push(...j.children)}const g=h.length>0&&d.size>=f;return i.push({seam:"editor.hierarchy",subject:o,epoch:s,stage:"operation",outcome:c?"pass":"fail",source:"conformance-probe",detail:c?`hierarchy roots/node walked ${d.size} unique node(s) with reciprocal parent/child ids${g?` (walk budget reached with ${h.length} node(s) still pending — a larger tree, not a broken one)`:""}`:"hierarchy roots/node did not form a finite, non-empty, reciprocal tree"}),t.hierarchy.crossSurfaceStructureSignature&&r("editor.hierarchy.crossSurfaceStructureSignature","operation",()=>t.hierarchy.crossSurfaceStructureSignature?.(),l=>l===null||typeof l=="string"),X({adapter:t,subject:o,epoch:s,receipts:i,walked:[...d]}),n}function Z(e,t,o){if(e.selection&&(o("editor.selection.get","operation",()=>e.selection?.get(),Array.isArray),e.selection.resolve&&o("editor.selection.resolve","operation",()=>e.selection?.resolve?.(t),s=>s===null||typeof s=="object"&&typeof s.id=="string")),e.transforms){let s=!0;if(e.transforms.dimensions){const r=o("editor.transforms.dimensions","operation",()=>e.transforms?.dimensions?.(t),i=>i===null||i==="2d"||i==="3d");s=r==="2d"||r==="3d"}s&&(o("editor.transforms.get","operation",()=>e.transforms?.get(t),r=>{if(!r||typeof r!="object")return!1;const i=r;return["position","rotation","scale"].every(a=>{const n=i[a];return Array.isArray(n)&&n.every(Number.isFinite)})}),e.transforms.editability&&o("editor.transforms.editability","operation",()=>e.transforms?.editability?.(t,"position"),r=>r!==null&&typeof r=="object"&&typeof r.writable=="boolean"))}if(e.inspector){const s=o("editor.inspector.properties","operation",()=>e.inspector?.properties(t),Array.isArray);if(Array.isArray(s))for(const r of s)r&&typeof r=="object"&&typeof r.path=="string"&&(o("editor.inspector.get","operation",()=>e.inspector?.get(t,r.path)),e.inspector.editability&&o("editor.inspector.editability","operation",()=>e.inspector?.editability?.(t,r.path),i=>i!==null&&typeof i=="object"&&typeof i.writable=="boolean"))}}function ee(e,t,o,s){e.assetSubject&&(o("editor.assetSubject.get","operation",()=>e.assetSubject?.get(t)),e.assetSubject.entries&&o("editor.assetSubject.entries","operation",()=>e.assetSubject?.entries?.(),Array.isArray),s("editor.assetSubject")),e.related&&(o("editor.related.links","operation",()=>e.related?.links(t),Array.isArray),s("editor.related")),e.instances&&o("editor.instances.describe","operation",()=>e.instances?.describe(t)),e.truth&&(o("editor.truth.resolve","operation",()=>e.truth?.resolve(t,""),r=>r!==null&&typeof r=="object"),s("editor.truth"))}function te(e,t,o,s){e.pickable&&(o("editor.pickable.pick","operation",()=>e.pickable?.pick(0,0),r=>r===null||typeof r=="string"),e.pickable.candidates&&o("editor.pickable.candidates","operation",()=>e.pickable?.candidates?.(0,0),Array.isArray),s("editor.pickable")),e.rects&&(o("editor.rects.rect","operation",()=>e.rects?.rect(t),r=>{if(r===null)return!0;if(!r||typeof r!="object")return!1;const i=r;return["x","y","width","height"].every(a=>Number.isFinite(i[a]))}),e.rects.contextRects&&o("editor.rects.contextRects","operation",()=>e.rects?.contextRects?.(t)),e.rects.emptyContainers&&o("editor.rects.emptyContainers","operation",()=>e.rects?.emptyContainers?.(),Array.isArray),s("editor.rects")),e.colorSample&&(o("editor.colorSample.backgroundChainAt","operation",()=>e.colorSample?.backgroundChainAt(0,0),r=>r===null||Array.isArray(r)),s("editor.colorSample")),e.spatialHandles&&o("editor.spatialHandles.layers","operation",()=>e.spatialHandles?.layers(t),Array.isArray)}function oe(e,t,o){e.persistence&&(o("editor.persistence.isDirty","operation",()=>e.persistence?.isDirty(),s=>typeof s=="boolean"),e.persistence.lastError&&o("editor.persistence.lastError","operation",()=>e.persistence?.lastError?.(),s=>s===null||typeof s=="string")),e.text&&o("editor.text.get","operation",()=>e.text?.get(t)),e.stories&&(o("editor.stories.storiesFor","operation",()=>e.stories?.storiesFor(t),Array.isArray),o("editor.stories.active","operation",()=>e.stories?.active(t),s=>s===null||typeof s=="string")),e.assetDrop&&o("editor.assetDrop.accepts","operation",()=>e.assetDrop?.accepts(t,"__vgai_read_probe__"),s=>typeof s=="boolean")}function se(e){const{adapter:t,subject:o,epoch:s}=e,r=[],i=(d,h,f,g=()=>!0)=>{try{const l=f(),b=g(l);return r.push({seam:d,subject:o,epoch:s,stage:h,outcome:b?"pass":"fail",source:"conformance-probe",detail:b?`${d} returned a value accepted by its consumer-facing shape`:`${d} returned a value outside its consumer-facing shape`}),l}catch(l){r.push({seam:d,subject:o,epoch:s,stage:h,outcome:"fail",source:"conformance-probe",detail:`${d} threw while read: ${l instanceof Error?l.message:String(l)}`});return}},a=d=>{r.push({seam:d,subject:o,epoch:s,stage:"operation",outcome:"pass",source:"conformance-probe",detail:`${d} served a real read against the mounted projection`})},c=Q({adapter:t,subject:o,epoch:s,record:i,receipts:r})[0]?.id;return c&&(Z(t,c,i),ee(t,c,i,a),te(t,c,i,a),oe(t,c,i)),r}const v={missing:"the editor never reached this game’s scene, so hierarchy, inspector and gizmo have nothing to work on — not one object in it can be listed, selected, inspected or moved",fix:"make the game’s own runtime instance reachable to the host: a bare, un-rewritten `import 'three'` / `import 'pixi.js'` in the game's own source, so it resolves in the editor’s realm to the very instance the capture trap is installed on"},S={missing:"this root’s hierarchy does not agree with itself: the editor reached the world and can list it, but `hierarchy.node(id).parentId` and the parent’s own `childIds` name different nodes, so anything that walks UPWARD — reparent targets, paste anchors, ancestor selection — resolves against a tree the panel is not showing",fix:"make the adapter’s `hierarchy` reciprocal: for every id in a node’s `childIds`, `hierarchy.node(childId).parentId` must be that node’s own id. The report’s `detail` names which direction disagreed"},m={provenance:{missing:"the shell shows no provenance badge for this root, so nothing tells the author what the rows they are editing are backed by or how writable it is",fix:"the adapter must declare `provenance` (`AuthoringAdapter.provenance`)"},selection:{missing:"this root owns no selection, so a viewport hit cannot be resolved to the node the author actually means — a click lands on whatever raw id the substrate reports",fix:"the adapter must expose a `selection` provider (`AuthoringAdapter.selection`)"},transforms:{missing:"the gizmo cannot move, rotate or scale anything in this world",fix:"the adapter must expose a `transforms` provider (`AuthoringAdapter.transforms`) over the captured tree"},inspector:{missing:"the inspector shows no properties for a selected object in this world",fix:"the adapter must expose an `inspector` provider (`AuthoringAdapter.inspector`)"},assetSubject:{missing:"an authored node that IS an asset (inline SVG, an embedded image) cannot be opened in the Asset Editor from this root — it stays an opaque row",fix:"the adapter must expose an `assetSubject` provider (`AuthoringAdapter.assetSubject`)"},related:{missing:"the inspector offers no jump from a selected subject to the document that defines it (a component to its source, an instance to its story) — navigation stops at the row",fix:"the adapter must expose a `related` provider (`AuthoringAdapter.related`)"},instances:{missing:"the inspector cannot distinguish a prefab instance override from its component default, so authors cannot revert the instance or deliberately apply its value to the component",fix:"the adapter must expose an `instances` provider (`AuthoringAdapter.instances`) derived from native component source"},structure:{missing:"nothing in this world can be created, deleted, duplicated or reparented: the creation palette is empty and the hierarchy’s drag-drop and context-menu structure ops do nothing",fix:"the adapter must expose a `structure` provider (`AuthoringAdapter.structure`)"},persistence:{missing:"edits to this world are live-only — the mount carries no write-back route to the game’s own source, so nothing you change survives the session",fix:"the adapter must expose a `persistence` provider (`AuthoringAdapter.persistence`)"},pickable:{missing:"this root is not pickable in the viewport: clicking its content selects nothing, so it can only be reached from the hierarchy list",fix:"the adapter must expose a `pickable` provider (`AuthoringAdapter.pickable`)"},rects:{missing:"the editor has no screen geometry for this root’s nodes, so the selection overlay, the measure/snap guides and the empty-container hints cannot be drawn",fix:"the adapter must expose a `rects` provider (`AuthoringAdapter.rects`)"},boxEdit:{missing:"nothing in this root can be moved or resized by dragging it — its spatial values are reachable only by typing numbers into the inspector",fix:"the adapter must expose a `boxEdit` provider (`AuthoringAdapter.boxEdit`)"},text:{missing:"text in this root cannot be edited in place — double-click does nothing",fix:"the adapter must expose a `text` provider (`AuthoringAdapter.text`)"},colorSample:{missing:"the eyedropper has no fallback path on this root, so colour picking is dead wherever the browser has no native `EyeDropper`",fix:"the adapter must expose a `colorSample` provider (`AuthoringAdapter.colorSample`)"},stories:{missing:"no component of this root can be opened against a story: its prefabs never appear on the component board, and a designer cannot open, apply or isolate a design-time state",fix:"the adapter must expose a `stories` provider (`AuthoringAdapter.stories`) reading the root’s colocated portable CSF"},truth:{missing:"the editor cannot say where any object in this world came from, so an inspector edit has no source address to be written back to",fix:"the adapter must expose a `truth` provider (`AuthoringAdapter.truth`)"},spatialHandles:{missing:"component-owned spatial values in this world (an audio attenuation radius, a light cone, a collider extent) are invisible in the viewport and cannot be dragged",fix:"the adapter must expose a `spatialHandles` provider (`AuthoringAdapter.spatialHandles`)"},assetDrop:{missing:"nothing can be dropped into this world: a model, image or material dragged from the asset browser onto the viewport or the hierarchy is refused",fix:"the adapter must expose an `assetDrop` provider (`AuthoringAdapter.assetDrop`)"},subscribe:{missing:"this root never tells the editor its tree changed, so the hierarchy and inspector show a stale projection until something else happens to re-render them",fix:"the adapter must implement `subscribe` (`AuthoringAdapter.subscribe`)"}},re={three:{assetSubject:"the current asset-subject contract is an inline SVG embedded in a DOM source document; a Three scene-graph node has no such representation",rects:"screen rects are the DOM visual editor’s coordinate system; a three root is manipulated in world space through the gizmo",boxEdit:"the CSS box model has no three analogue — spatial editing here is the `transforms` provider plus the gizmo",text:"a three world has no editable element text body",colorSample:"the eyedropper’s CSS background-chain walk has no three analogue"},canvas:{assetSubject:"the current asset-subject contract is an inline SVG embedded in a DOM source document; a canvas display node has no such representation",text:"a canvas world has no editable element text body",colorSample:"the eyedropper’s CSS background-chain walk has no canvas analogue"},dom:{transforms:"a DOM root has no 3D transform; its spatial editing is the `boxEdit` provider, which is reported on its own row",spatialHandles:"world-space component guides have no DOM analogue — a DOM root’s geometry is its box, reported by `rects`/`boxEdit`"}},ie=Object.freeze(Object.fromEntries(w.map(e=>[e,!1]))),ae=Object.freeze({captured:!1,providers:ie});function Je(e,t="root"){const{authoring:o}=e;return o?ne(o,t):ae}function ne(e,t="root"){const o=P(e),s=F({adapter:e,subject:t,epoch:o,receipts:se({adapter:e,subject:t,epoch:o})}),r={...M(e)},i=e.childAdapters?.();return i&&(r.pickable||=i.some(a=>a.adapter.pickable!==void 0),r.provenance||=i.some(a=>a.adapter.provenance!==void 0)),{captured:!0,providers:r,providerEvidence:s.providers,captureEvidence:s.hierarchyWalk}}function C(e,t){return e===null?null:re[e]?.[t]??null}function ce(e,t=null){return w.filter(o=>!e.providers[o]&&C(t,o)===null)}const de="capability-gap";function Xe(e,t,o,s=null){const r=[];t.captured||r.push(` ✗ capture — ${v.missing}
|
|
2
|
-
fix: ${v.fix}`);for(const i of ce(t,s))r.push(` ✗ ${i} — ${m[i].missing}
|
|
3
|
-
fix: ${m[i].fix}`);return r.length===0?null:[`${de} world "${e}" — ${r.length} editor capabilit${r.length===1?"y is":"ies are"} missing (${o}). This world is not authorable the way a native one is:`,...r].join(`
|
|
4
|
-
`)}const k=new WeakMap;let le=1;function he(e){const t=k.get(e);if(t)return t;const o=`contract-${le++}`;return k.set(e,o),o}function ue(e){const t=e.subject??"game",o=e.epoch??he(e.contract),s=[...$({prefix:"contract",value:e.contract,shape:V,subject:t,epoch:o}),...$({prefix:"contract.lifecycle",value:e.contract.lifecycle,shape:B,subject:t,epoch:o}),...$({prefix:"contract.systems",value:e.contract.systems,shape:U,subject:t,epoch:o}),...T.receipts({subject:t,epoch:o}),...e.receipts??[]],r=(i,a)=>N({seam:i,subject:t,epoch:o,required:a,receipts:s});return{root:r("contract.root","effect"),start:r("contract.lifecycle.start","effect"),pause:r("contract.lifecycle.pause","effect"),resume:r("contract.lifecycle.resume","effect"),systems:r("contract.systems","operation")}}class p extends Error{constructor(t){super(`coverage-accounting: ${t}`),this.name="CoverageReconcileError"}}function pe(e){const t=e.indexOf(".");return t===-1?e:e.slice(0,t)}function fe(e){return e?/^\[([^\]]+)\] /.exec(e)?.[1]??null:null}function me(e){return e.subject!==void 0&&e.subject!==null&&e.subject!==""?e.subject:fe(e.detail)}function I(e,t){const o=e??{gap:!1,applicable:!1};return t==="na"?o:{gap:o.gap||t==="gap",applicable:!0}}function ge(e,t){const o=new Map;for(const i of t)o.set(i.seam,I(o.get(i.seam),i.status));let s=0,r=0;for(const i of o.values())i.applicable&&(s+=1,i.gap&&(r+=1));return{family:e,capabilities:s,capabilityGaps:r,rootInstances:t.length}}function O(e){const t=new Set,o=new Map;for(const n of e){const c=me(n);c!==null&&t.add(c);const d=pe(n.seam),h=o.get(d);h?h.push(n):o.set(d,[n])}const s=[...o].map(([n,c])=>ge(n,c)),r=new Map;for(const n of e)r.set(n.seam,I(r.get(n.seam),n.status));let i=0,a=0;for(const n of r.values())n.applicable&&(i+=1,n.gap&&(a+=1));return{capabilities:i,capabilityGaps:a,rootsGraded:t.size,rootInstances:e.length,families:s}}function be(e){return`${e.capabilityGaps} of ${e.capabilities} capabilities are MISSING`}function ye(e){return`${e.rootsGraded>0?`${e.rootsGraded} roots graded; `:""}${e.rootInstances} root-instances`}function we(e,t={}){const o=t.rootsGraded??0,s=e.rootInstances!==e.capabilities||o>1,r=`${e.family} ${e.capabilityGaps} of ${e.capabilities} capabilities`;if(!s)return r;const i=o>1?`${o} roots graded; `:"";return`${r} (${i}${e.rootInstances} root-instances)`}function ve(e,t){return e.family==="editor"?{rootsGraded:t.rootsGraded}:{}}function $e(e,t){const o=t.families.map(s=>we(s,ve(s,t))).join(", ");return`${e} — ${be(t)} (${ye(t)}: ${o}).`}function xe(e){const t=/(\d+) of (\d+) capabilities are MISSING/.exec(e);if(!t)throw new p('headline does not state the capabilities unit (missing "N of M capabilities are MISSING")');const o=/(\d+) roots graded/.exec(e),s=/(\d+) root-instances/.exec(e);if(!s)throw new p("headline does not state root-instances");return{capabilityGaps:Number(t[1]),capabilities:Number(t[2]),rootsGraded:o?Number(o[1]):0,rootInstances:Number(s[1])}}function Ae(e,t){const o=O(e),s=xe(t);if(s.capabilityGaps!==o.capabilityGaps)throw new p(`headline capability-gaps ${s.capabilityGaps} !== row-derived ${o.capabilityGaps}`);if(s.capabilities!==o.capabilities)throw new p(`headline capabilities ${s.capabilities} !== row-derived ${o.capabilities}`);if(s.rootInstances!==o.rootInstances)throw new p(`headline root-instances ${s.rootInstances} !== row-derived ${o.rootInstances}`);if(s.rootsGraded!==o.rootsGraded)throw new p(`headline roots-graded ${s.rootsGraded} !== row-derived ${o.rootsGraded}`);const r=o.families.reduce((a,n)=>a+n.rootInstances,0);if(r!==o.rootInstances)throw new p(`family root-instances ${r} !== ${o.rootInstances}`);const i=o.families.reduce((a,n)=>a+n.capabilities,0);if(i!==o.capabilities)throw new p(`family capabilities ${i} !== ${o.capabilities}`)}const je={export:!0},Qe=Object.keys(je),Ze=Object.keys(H);function et(e){const t=e?.systems;return{declared:e!==null,root:e?.root!==void 0,start:e?.lifecycle?.start!==void 0,pause:e?.lifecycle?.pause!==void 0,resume:e?.lifecycle?.resume!==void 0,systems:t?{commands:(t.commands??[]).map(o=>o.name),state:(t.state??[]).map(o=>o.name)}:null,proof:e?ue({contract:e}):null}}const Se="a game whose bytes must stay unmodified declares it from a host-side carrier instead — a contract shim beside the game (`ingest.contractShim` in its vgai.project.json, injected ahead of the game`s entry module; see public/ingest/simcity/vgai.shim.js) or a recorded patch",u=e=>`declare ${e} in the game's own entry; ${Se}`;function ke(e){const t=e.reachMechanism?` — ${e.reachMechanism}`:"";if(e.reach===null)return[{seam:"editor.capture",status:"info",detail:"no mount has measured what the editor reaches on this root yet"},...w.map(i=>({seam:`editor.${i}`,status:"info",detail:`no mount has measured whether this root exposes ${i} yet`}))];const o=e.reach,s=o.captured?o.captureEvidence?.state==="verified"?{seam:"editor.capture",status:"ok",detail:`the editor reached this root's own runtime and exercised its hierarchy — ${o.captureEvidence.detail}${t}`}:o.captureEvidence?.state==="failed"?{seam:"editor.capture",status:"gap",detail:`an authoring object was captured, but its hierarchy seam failed — ${o.captureEvidence.detail}${t}`,missing:S.missing,fix:S.fix}:{seam:"editor.capture",status:"info",detail:`an authoring object was captured, but no current-epoch hierarchy operation proves it projects this root's runtime${o.captureEvidence?` — ${o.captureEvidence.detail}`:""}${t}`}:{seam:"editor.capture",status:"gap",detail:`the editor never reached this root's runtime${t}`,missing:v.missing,fix:v.fix},r=w.map(i=>{const a=`editor.${i}`,n=o.providerEvidence?.[i],c=C(e.surface,i);return!o.providers[i]&&c!==null?{seam:a,status:"na",detail:`not applicable to a ${e.surface} root — ${c}`}:n?.state==="verified"?{seam:a,status:"ok",detail:n.detail}:n?.state==="failed"?{seam:a,status:"gap",detail:`${i} is exposed but malformed or failed — ${n.detail}${t}`,missing:m[i].missing,fix:m[i].fix}:o.providers[i]?{seam:a,status:"info",detail:n?.detail??`this root exposes ${i}, but no operational proof was recorded`}:{seam:a,status:"gap",detail:`this root exposes no ${i} provider${t}`,missing:m[i].missing,fix:m[i].fix}});return[s,...r]}function Ee(e){const t=e.loopReason?` — ${e.loopReason}`:"",{pause:o,resume:s}=e.contract;return o&&s&&e.contract.proof?.pause.state==="verified"&&e.contract.proof.resume.state==="verified"?{seam:"loop",status:"ok",detail:`the game's own declared lifecycle.pause + resume control its frames, and that is what ▶/⏸ call${e.loopReason?` (the host's fallback gate, unused here, reports: ${e.loopReason})`:""}`}:e.loop?.verdict==="gated"?{seam:"loop",status:"ok",detail:`gated${t}`}:e.loop?.verdict==="self-driven"?{seam:"loop",status:"gap",detail:`self-driven${t}`,missing:"nothing in this editor controls the game's frames: ▶/⏸ and Step do not stop it, and Edit mode cannot be quiet — it keeps simulating while you author",fix:u("window.vgaiGame.lifecycle.pause + resume")}:{seam:"loop",status:"info",detail:e.loopReason??"no loop verdict has been measured yet — the probe runs at the first pause"}}function Re(e){return e.contract.root?e.contract.proof?.root.state==="failed"?{seam:"contract.root",status:"gap",detail:`the game declares a root, but the seam failed — ${e.contract.proof.root.detail}`,missing:"the host cannot trust that the declared element owns the game DOM rather than an unrelated or detached subtree",fix:u("window.vgaiGame.root")}:{seam:"contract.root",status:e.contract.proof?.root.state==="verified"?"ok":"info",detail:e.contract.proof?.root.state==="verified"?e.contract.proof.root.detail:"the game declares a root element, but no consumer has proved it owns the mounted game DOM"}:{seam:"contract.root",status:"gap",detail:e.contract.declared?"a contract is declared, but it names no root element":"no game→host contract is declared at all",missing:"the host adopts the bare canvas, so any DOM this game owns beside it (HUD, overlays, portals) is stranded at page level over the editor chrome instead of living in the game pane",fix:u("window.vgaiGame.root")}}function De(e){return e.contract.start?e.contract.proof?.start.state==="failed"?{seam:"contract.lifecycle.start",status:"gap",detail:`lifecycle.start is declared but failed — ${e.contract.proof.start.detail}`,missing:"the mount cannot prove it starts cold and enters a session only when Play requests one",fix:u("window.vgaiGame.lifecycle.start")}:{seam:"contract.lifecycle.start",status:e.contract.proof?.start.state==="verified"?"ok":"info",detail:e.contract.proof?.start.state==="verified"?e.contract.proof.start.detail:"the game declares lifecycle.start, but no current-epoch effect proves that ▶ starts the session"}:{seam:"contract.lifecycle.start",status:"gap",detail:e.contract.declared?"a contract is declared, but it names no lifecycle.start":"no game→host contract is declared at all",missing:"the mount cannot be COLD: this game runs its session side-effects (backend connections, audio, narrative) as it loads, so opening it in the editor starts playing it, and ▶ is a wire event the game may ignore",fix:u("window.vgaiGame.lifecycle.start")}}function E(e){return e.loop?.verdict==="gated"?"pausing this game is the host's outside-in loop gate only. That gate is MEASURED to hold the work this game schedules, so ⏸ does stop it — but a host reaching in is not the game quieting itself: anything it drives from outside its own scheduling (a worker, a socket, a media callback) keeps running, and it gets no chance to stop its audio, drop its connections, or checkpoint before the pause":e.loop?.verdict==="self-driven"?"pausing this game is the host's outside-in loop gate only, and that gate is MEASURED not to control this loop — so ⏸ may freeze the picture while the game keeps running underneath it":"pausing this game is the host's outside-in loop gate only, and no probe has measured whether that gate reaches this loop yet — so ⏸ may freeze the picture while the game keeps running underneath it"}function Ce(e){const{pause:t,resume:o,declared:s}=e.contract;if(t&&o){const i=e.contract.proof?.pause.state==="verified",a=e.contract.proof?.resume.state==="verified",n=[e.contract.proof?.pause,e.contract.proof?.resume].find(c=>c?.state==="failed");return n?{seam:"contract.lifecycle.pause",status:"gap",detail:`pause/resume is declared but failed — ${n.detail}`,missing:E(e),fix:u("window.vgaiGame.lifecycle.pause + resume")}:{seam:"contract.lifecycle.pause",status:i&&a?"ok":"info",detail:i&&a?"the mounted lifecycle exercised both declared pause + resume effects":"the game declares pause + resume, but declaration alone does not prove either changes its frames"}}const r=Ie(t,o);return{seam:"contract.lifecycle.pause",status:"gap",detail:r?`the contract declares ${r} — the host needs both to hand control back`:s?"a contract is declared, but it names no lifecycle.pause/resume":"no game→host contract is declared at all",missing:E(e),fix:u("window.vgaiGame.lifecycle.pause + resume")}}function Ie(e,t){return e?"lifecycle.pause without a resume":t?"lifecycle.resume without a pause":null}function G(e){const t=e?.byKind;if(!t)return"";const o=L.filter(s=>(t[s]??0)>0).map(s=>`${s} ${t[s]}`);return o.length>0?` (by write lane: ${o.join(", ")})`:""}function Oe(e){return{seam:"persistence",status:"gap",detail:`this game's base is writable, but NONE of the ${e.total} object(s) the editor projects from the mounted world has a source address — every edit stays ${e.destination}`+G(e),missing:"nothing you change here survives the session: the base may be written, but no line of this game's own source is known to address any object in it",fix:"serve this game's own source through the editor's authoring transform so its elements carry source stamps (a JSX world), or give it construction sites the creation-site index can see (a `new` expression in the game's own served module)"}}function Ge(e,t,o,s){const r=e.recorder??"whatever records this folder",i=t?`; ${t.addressable} of ${t.total} projected object(s) resolve to one, and the rest are runtime or library parts with no source of their own${G(t)}`:"",a=o!==null&&o.state!=="ready",n=_e(o);return s?.state==="failed"?{seam:"persistence",status:"gap",detail:`the write path is addressable, but its round trip failed — ${s.detail}`,missing:"the editor can issue a write but cannot trust that the game source and a cold remount reflect it",fix:"fix the failing write receipt named above; provider presence and a write acknowledgement are not persistence"}:{seam:"persistence",status:a?"gap":s?.state==="verified"?"ok":"info",detail:`this game's base is writable, so an edit can be written back to the line of its own source that built the object${i}${n}; the diff is recorded in ${r}`+(s?.state==="verified"?`; ${s.detail}`:"; no current-epoch cold-remount round trip has verified that path"),...a?{missing:"every object this game places from its own level data — its whole placed cargo — is unwritable while that writer is unreachable",fix:`make \`ingest.dataWriter\` loadable: ${o.reason??"it has not resolved yet"}`}:{}}}function _e(e){if(e===null)return"";if(e.state==="ready")return`, and an object the game anchored to a record in ${e.dataFile} is written back into that file`;const t=e.reason?` (${e.reason})`:"";return`, but its declared data writer is ${e.state}${t}, so an object anchored to a level-data record stays live-only`}function Pe(e){const{ownership:t}=e;if(t===null)return{seam:"persistence",status:"info",detail:"the editor has not asked who owns this game's source yet — until it answers, edits stay live-only"};const o=e.writeReach;return t.writable&&o!==null&&o.addressable===0?Oe(o):t.writable?Ge(t,o,e.dataWriter,e.persistenceProof):{seam:"persistence",status:"gap",detail:`edits are live-only — ${t.reason??"this game's source is not writable"}`,missing:"nothing you change survives the session: no source write-back, and by doctrine no sidecar will ever be invented to fake one",fix:"open this game from a folder the editor can write — creation-site persistence needs a writable base (the server decides, not the editor)"}}function R(e,t){return`${t.length} ${e}(s)${t.length>0?`: ${t.join(", ")}`:""}`}function Fe(e){const{systems:t,declared:o}=e.contract,s=t?.commands??[],r=t?.state??[];return s.length>0||r.length>0?e.contract.proof?.systems.state==="failed"?{seam:"systems",status:"gap",detail:`the systems carrier is declared but failed — ${e.contract.proof.systems.detail}`,missing:"`game.commands()` / `game.providers()` cannot safely enumerate or invoke this carrier",fix:u("window.vgaiGame.systems (commands + state)")}:{seam:"systems",status:e.contract.proof?.systems.state==="verified"?"ok":"info",detail:e.contract.proof?.systems.state==="verified"?e.contract.proof.systems.detail:`the game declares ${R("command",s)}; ${R("state provider",r)}, but the agent door has not operationally enumerated/read them in this epoch`}:{seam:"systems",status:"gap",detail:t?"the contract declares a systems surface that names no commands and no state providers":o?"a contract is declared, but it names no systems":"no game→host contract is declared at all",missing:`this game exposes no verbs and no state to drive or read it with: \`game.commands()\` and \`game.providers()\` enumerate nothing, so there is no \`game.command(...)\` to play it from ${A("eval")} and no \`game.state(...)\` for ${A("status")} to see anything of what it is doing`,fix:u("window.vgaiGame.systems (commands + state)")}}const x={physics:"the editor cannot freeze a simulated body while the gizmo edits it, so a physics-driven object's pose is overwritten the next frame",networking:"the Network inspector shows nothing: no connection state, no room, no peers, and no authority answer to keep a server-owned object inspect-only",navigation:"the Navigation panel has no navmesh to report, query a path through, or draw",audio:"⏸ cannot silence this world's audio and the Audio debugger has no graph, transport, meters or events to show",camera:"the selected-camera Inspector cannot report which native camera/controller is active or whether a blend is in progress",get debug(){return`\`game.commands()\` and \`game.providers()\` enumerate nothing, so there is no verb to drive this game with and no state read for ${A("status")} to see`},renderDebug:"the Frame debugger cannot capture a frame and the Profiler has no render-memory snapshot"};function Me(e){return e==="renderDebug"?"nothing a game declares reaches this slot — the host derives it from the captured renderer's own WebGL2 context (`ingest/ingest-render-debug.ts`), so a mount whose renderer has no such context (a stub context) can never have it":u(e==="debug"?"window.vgaiGame.systems (commands + state)":`window.vgaiGame.systems.systemAdapters.${e}`)}function Te(e){const t=`system.${e.slot}`;return e.state==="bound"?e.proof?.state==="failed"?{seam:t,status:"gap",detail:`a ${e.slot} adapter is bound, but its contract failed — ${e.proof.detail}`,missing:x[e.slot],fix:`fix the bound ${e.slot} adapter; registration is not evidence that its operations work`}:e.proof?.state!=="verified"?{seam:t,status:"info",detail:e.proof?.detail??`a ${e.slot} adapter is installed, but no current-epoch operational proof was recorded`}:{seam:t,status:"ok",detail:`a ${e.slot} adapter is installed in the editor's live system registry`}:e.state==="empty"?e.attestedBy==="host"?{seam:t,status:"info",attestedBy:"host",detail:`derived-empty (the HOST's observation, not the game's answer) — nothing filled ${e.slot} on a live mount: ${e.evidence??""}. The game has not itself declared this absence; \`absent(reason)\` in its \`systems\` table is what turns the host's inference into the game's own statement.`}:{seam:t,status:"info",attestedBy:"game",detail:`declared-empty (an attestation, not a mechanically verified absence) — the game answers that it has no ${e.slot}: ${e.evidence??""}`}:e.state==="malformed"?{seam:t,status:"gap",detail:`the game declared a ${e.slot} slot that could not be honoured — ${e.evidence??""}`,missing:x[e.slot],fix:"fix the declaration to engage with the row's evidence — the detail above names the specific conflict (a declared absence must name a contradicting shipped dependency; a declared adapter must be a real adapter or a { present: false, evidence } record)"}:{seam:t,status:"gap",detail:`no ${e.slot} adapter is installed and the game declares no answer for the slot`,missing:x[e.slot],fix:e.fix??Me(e.slot)}}function Ne(e){const t=`project.${e.slot}`;return e.state==="present"?He(e,t):{seam:t,status:e.state==="absent"?"gap":"info",detail:e.evidence,...e.missing?{missing:e.missing}:{},...e.fix?{fix:e.fix}:{}}}function He(e,t){if(e.proof?.state==="failed")return{seam:t,status:"gap",detail:`${e.evidence}; the real verb failed — ${e.proof.detail}`,...e.missing?{missing:e.missing}:{},...e.fix?{fix:e.fix}:{}};const o=e.proof?.state==="verified";return{seam:t,status:o?"ok":"info",detail:o?`${e.evidence}; ${e.proof?.detail}`:`${e.evidence}; declaration is only a precondition — this verb has not completed successfully in the current evidence run`}}function Le(e){const t=e.authoringSurface;if(!t)return[];const o=t.sceneDocuments===0?{seam:"authoring.scenes",status:"gap",detail:"the adapter scene table names no authorable scene with a document to open",missing:"Edit has no scene tab — a captured runtime can still be healthy while the authoring surface is empty",fix:"declare authorable scene-table entries with a mountable source or root region so planSceneDocument produces a document"}:t.availableIsolationDocuments<t.isolationDocuments?{seam:"authoring.scenes",status:"gap",detail:`the table plans ${t.isolationDocuments} isolation document(s) but only ${t.availableIsolationDocuments} are available to open`,missing:"declared scenes are absent from the Content catalog",fix:"register every planned isolation document in the available-document catalog"}:{seam:"authoring.scenes",status:"ok",detail:`${t.sceneDocuments} scene document(s) planned`+(t.isolationDocuments>0?`, ${t.openIsolationDocuments} of ${t.isolationDocuments} isolation tab(s) open, ${t.availableIsolationDocuments} available from Content`:"")},s=t.pieces===0&&t.sceneEntries===0?{seam:"authoring.pieces",status:"na",detail:"the scene table declares no scenes, so there is no surface to place prefabs on (a models or website project)"}:(t.storyFailures??0)>0?{seam:"authoring.pieces",status:"gap",detail:`${t.storyFailures} project story module(s) failed to load, so their prefabs are missing from the scene table (${t.pieces} resolved)`,missing:"the prefabs those stories register are absent from Content and the component board",fix:"read `editor.status().storyFailures` for each module and its error, and the console line naming the module the load failed on"}:t.pieces===0?{seam:"authoring.pieces",status:"gap",detail:"the resolved scene table contains no prefab entries",missing:"Content has no project pieces and the component board has nothing to show",fix:"add portable CSF stories inside the adapter region include globs so prefabsFromStories resolves entries"}:{seam:"authoring.pieces",status:"ok",detail:`${t.pieces} prefab(s) resolved from the scene table`};return[o,s]}function Ve(e){return{worldId:e.worldId,reach:e.reach??null,surface:e.surface??null,reachMechanism:e.reachMechanism??null,loop:e.loop??null,loopReason:e.loopReason??null,contract:e.contract??{declared:!1,root:!1,start:!1,pause:!1,resume:!1,systems:null},ownership:e.ownership??null,writeReach:e.writeReach??null,dataWriter:e.dataWriter??null,persistenceProof:e.persistenceProof,systemAdapters:e.systemAdapters??[],projectVerbs:e.projectVerbs??[],authoringSurface:e.authoringSurface??null}}function Be(e,t){const o="reach"in e||"surface"in e||"reachMechanism"in e,s="loop"in e||"loopReason"in e||"contract"in e,r="contract"in e,i="ownership"in e||"writeReach"in e||"dataWriter"in e||"persistenceProof"in e;return[...o?ke(t):[],...s?[Ee(t)]:[],...r?[Re(t),De(t),Ce(t)]:[],...i?[Pe(t)]:[],...r?[Fe(t)]:[],...t.systemAdapters.map(Te),...t.projectVerbs.map(Ne),..."authoringSurface"in e?Le(t):[]]}function tt(e){const t=Be(e,Ve(e));return{rows:t,summary:{worldId:e.worldId,rows:t.length,gaps:t.filter(o=>o.status==="gap").length,ok:t.filter(o=>o.status==="ok").length,na:t.filter(o=>o.status==="na").length,info:t.filter(o=>o.status==="info").length}}}function _(e,t){if(e===t)return!0;for(let o=0;o<e.children.length;o++){const s=e.children[o];if(s&&_(s,t))return!0}return!1}function ot(e){const t=[],o=(i,a)=>{if(i.tagName.toLowerCase()==="canvas"){const n=i.getBoundingClientRect();t.push({element:i,depth:a,area:Math.max(0,n.right-n.left)*Math.max(0,n.bottom-n.top)})}for(let n=0;n<i.children.length;n++){const c=i.children[n];c&&o(c,a+1)}};o(e,0);const s=t.filter(i=>i.area>0),r=s.length>0?s:t;return r.sort((i,a)=>a.area-i.area||i.depth-a.depth),r[0]?.element??null}const Ue=new Set(["script","style","link","meta","base","title","noscript"]);function st(e,t){const o=[],s=r=>{for(let i=0;i<r.children.length;i++){const a=r.children[i];a&&(_(a,t)?s(a):Ue.has(a.tagName.toLowerCase())||o.push(a))}};return s(e),o}const ze={gap:"✗",ok:"✓",na:"–",info:"·"};function D(e){const t=[` ${ze[e.status]} ${e.seam} — ${e.detail}`];return e.missing&&t.push(` missing: ${e.missing}`),e.fix&&t.push(` fix: ${e.fix}`),t.join(`
|
|
5
|
-
`)}function We(e,t){const o=$e(e,O(t));return Ae(t,o),o}function rt(e,t){const o=t.flatMap(s=>s.report.rows.map(r=>s.label?{...r,detail:`[${s.label}] ${r.detail}`}:r));return{rows:o,summary:{worldId:e,rows:o.length,gaps:o.filter(s=>s.status==="gap").length,ok:o.filter(s=>s.status==="ok").length,na:o.filter(s=>s.status==="na").length,info:o.filter(s=>s.status==="info").length}}}function Ye(e,t){const{summary:o}=e,s=t??`root coverage "${o.worldId}"`,r=[],i=e.rows.filter(n=>n.status==="gap"),a=e.rows.filter(n=>n.status!=="gap");return i.length>0&&r.push({level:"warn",message:[`${We(s,e.rows)} This game mounts, but the editor cannot do the following with it:`,...i.map(D)].join(`
|
|
6
|
-
`)}),a.length>0&&r.push({level:"info",message:[`${s} — ${o.ok} seam(s) present, ${o.na} not applicable to this surface, ${o.info} measured-only:`,...a.map(D)].join(`
|
|
7
|
-
`)}),r}function it(e){let t=null;return{report(o,s){if(t===o)return!1;t=o;for(const r of Ye(s))e(r);return!0}}}export{Qe as P,Ze as S,ne as a,Ye as b,it as c,tt as d,et as e,Xe as f,he as g,ot as h,st as i,Je as m,rt as u};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ui-board-document-CCiiXjX9.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/design-time-layers-ChswRUJt.js","assets/root-stacking-BEd9ZvxC.js","assets/edit-mode-authoring-DeCxPcHM.js","assets/design-time-mount-registry-DUpXCg1U.js","assets/react-story-board-GaXqr03H.js","assets/world-documents-DBybpBq8.js","assets/react-canvas-navigation-Cp3cOHJa.js","assets/component-board-registry-DrIa2csL.js","assets/surface-state-1lTOi8FD.js","assets/board-guides-BEKPgD9M.js","assets/CanvasSceneViewport-C_mapCwC.js","assets/RootSelectionOverlay-CpaGluQu.js","assets/eyedropper-session-bjPXnfeX.js","assets/layered-pick-kiQf53t5.js","assets/viewport-editor-controls-BYaAZ_Ku.js","assets/inspect-Dr4qvDpJ.js","assets/inference-diagnostics-xecGdohW.js","assets/Toolbar-DkTHnQto.js","assets/transform-mode-request-DzD9aUNA.js","assets/TransientHint-BpDLhRLd.js","assets/ReactCanvasControls-CnJrPj-B.js","assets/story-media-presence-BqRMu572.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{r as a}from"./component-board-registry-DrIa2csL.js";import{dz as s,B as n,_ as i,M as c,ak as d,eQ as l}from"./index-BRJMIUK0.js";import{s as m,g as p}from"./story-media-presence-BqRMu572.js";const r="UI",u={medium:"dom",owner:"@volter/editor-game/react/ui-board",documentId:s,title:r,presence:()=>l()?p().dom?"present":"absent":null,subscribe:o=>{const e=m(o),t=d(o);return()=>{e(),t()}},install:async o=>{try{const{installUiBoard:e}=await i(async()=>{const{installUiBoard:t}=await import("./ui-board-document-CCiiXjX9.js");return{installUiBoard:t}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32]));e(o)}catch(e){throw c.error(`Failed to load the ${r} board: ${String(e)}`,"scene"),e}},absentReason:()=>`This project has no ${r} board (${s}): board presence keys on STORIES, not on roots, and none of this project's stories declares the "dom" medium. Declare it — a manifest root entry naming the story's module, or a \`vgai.adapter.ts\` regionInclude that covers it — and the board appears. ${n("console")} names every story it could not place.`},_="workspace.service";function b(){return a(u)}const h=Object.freeze(Object.defineProperty({__proto__:null,point:_,start:b},Symbol.toStringTag,{value:"Module"}));export{r as U,h as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as n,b as i}from"./oid-transform-D5Kxt6ij.js";import"./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";import"./writer-tw6EcuVO.js";import"./r3f-physics-binding-DzrbpqjM.js";const m=Symbol.for("vgai.editor.componentContractAnalyzer");function r(o){globalThis[m]=o}const g="workspace.service";function z(){return r((o,t)=>n(o,t,i(o,t))),()=>r(null)}export{g as point,z as start};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as i}from"./user-data-Bpj7diUS.js";function u(n){return o(n)!==void 0}function e(n){const t=i(n,"authoringInstance");return typeof t=="string"&&t?t:void 0}function r(n){const t=n?.userData?.oid;return typeof t=="string"&&t?t:void 0}function o(n){const t=e(n);if(t!==void 0)return i(n?.parent,"authoringInstance")===t?void 0:t}function a(n){const t=n?.__vgaiOid;return typeof t=="string"&&t?t:void 0}function c(n,t){return t===0?n:`${n}#${t}`}function d(n){return n.includes("#")}function f(n,t){return r(n)===r(t)}function g(n){return o(n)??a(n)??r(n)}export{u as a,g as b,c,d,e as i,r as o,f as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as o,b as a,u as l,c as u}from"./fork-menu-DpKqRhF5.js";import{fo as c,av as s,fp as p,fq as m,fr as g,fs as I}from"./index-BRJMIUK0.js";import"./instance-fork-actions-D3sRzS3K.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"./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"./user-data-Bpj7diUS.js";import"./entity-object-JmYMfLsx.js";import"./three-contract-Dkt6PmWY.js";const f="Reveal Internals",E="Hide Internals";function i(n,e){const t=n;return typeof t.hasInternals!="function"||!t.hasInternals(e)||p(t,m()).isInternal(e)?null:{label:I(e)?E:f,toggle:()=>{g(e)}}}let r=null;function R(){r||(r=c(({nodeId:n,store:e})=>i(s(e),n)!==null,({nodeId:n,store:e})=>{const t=i(s(e),n);return t?[{label:t.label,action:()=>{t.toggle(),e.notifyIngestEdit()}}]:[]}))}function v(){r?.(),r=null}const V="workspace.service";function z(){return o(),a(),R(),()=>{l(),u(),v()}}export{V as point,z as start};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as n}from"./jsx-runtime-DPjLkJKQ.js";import{a1 as s,Z as i,q as o}from"./index-BRJMIUK0.js";import"./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";const w="workspace.status",f="Connection",g="left",y=20,e="tool:network.utility";function N(){const t=s(()=>o().systems.inspectedNetworking()?.getConnectionState?.()??null);return t===null?null:n.jsxs(i,{type:"button",variant:"ghost",size:"compact",className:"vgai-status-action","data-testid":"status-connection","data-connection-state":t,onClick:()=>o().workspace.showUtility(e),title:"Network connection state — open Network diagnostics",children:["net: ",t]})}export{g as align,N as default,y as order,w as point,f as title};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as t}from"./jsx-runtime-DPjLkJKQ.js";import{a as y}from"./three-contract-Dkt6PmWY.js";import{i as x}from"./component-instance-root-B0C5oNEm.js";import{ad as j,aI as i,e1 as v,fk as k,fl as c,Z as h,f1 as S}from"./index-BRJMIUK0.js";import{constraintsOf as C}from"./constraint-5KLYpGm7.js";import"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{u as F}from"./three-state-DwFE3ay2.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"./user-data-dHvLdpwM.js";import"./object-marks-DwvIEBOK.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"./entity-object-JmYMfLsx.js";function g(r,n){return n?y(r.hierarchy,n):null}function b(r){if(!r)return[];const n=x(r),u=new Set,m=a=>{const l=x(a);if(!(a!==r&&n!==void 0&&l!==void 0&&l!==n)){for(const o of C(a))u.add(o);for(const o of a.children)m(o)}};return m(r),[...u]}function w(r,n){return b(g(n,r?.id??null)).length>0}const O={ready:"Ready",disabled:"Disabled",unresolved:"Unresolved",error:"Error"};function D(r){return r==="two-bone-ik"?"Two Bone IK":r==="ccd-ik"?"CCD IK":r==="aim"?"Aim":r==="rotation"?"Rotation":r}function T({adapter:r,nodeId:n}){const u=F(),m=n?u.objectMap.get(n)??g(r,n)??null:null,a=b(m).sort((o,s)=>o.config.order-s.config.order),l=o=>{if(!o)return;const s=r.hierarchy.idForObject3D?.(o);s&&(S(r,[s],{intent:"exact"})||u.shell.select(s))};return t.jsx("div",{style:{display:"grid",gap:10},children:a.map((o,s)=>{const d=o.config,e=o.getSnapshot(),p=d.type==="two-bone-ik"||d.type==="ccd-ik";return t.jsxs("div",{style:{border:`1px solid ${j.boundary.default}`,borderRadius:6,overflow:"hidden"},children:[t.jsxs("div",{style:{alignItems:"center",background:j.surface.raised,display:"flex",gap:8,justifyContent:"space-between",padding:"6px 8px"},children:[t.jsx(i,{children:`${s+1}. ${d.label}`}),t.jsx(i,{tone:"muted",children:D(d.type)})]}),e.message&&(e.status==="error"||e.status==="unresolved")?t.jsx(v,{tone:"error",children:e.message}):null,t.jsxs(k,{children:[t.jsx(c,{label:"Status",children:t.jsx(i,{tone:e.status==="error"||e.status==="unresolved"?"danger":e.status==="ready"?"success":"muted",children:O[e.status]})}),t.jsx(c,{label:"Weight",children:t.jsx(i,{tone:"muted",children:`${Math.round(d.weight*100)}%`})}),p?t.jsx(c,{label:"Chain",children:t.jsx(i,{tone:"muted",children:e.chain.map(f=>f.name||f.type).join(" → ")||"Unresolved"})}):t.jsx(c,{label:"Constrained",children:e.constrained&&r.hierarchy.idForObject3D?.(e.constrained)?t.jsx(h,{size:"compact",onClick:()=>l(e.constrained),children:e.constrained.name||"Select object"}):t.jsx(i,{tone:"muted",children:e.constrained?.name||"Unresolved"})}),e.error!==null?t.jsx(c,{label:e.error.unit==="degrees"?"Angular error":"Solve error",children:t.jsx(i,{tone:"muted",children:e.error.unit==="degrees"?`${e.error.value.toFixed(2)}°`:`${e.error.value.toFixed(3)} m`})}):null,t.jsx(c,{label:"Target",children:e.target&&r.hierarchy.idForObject3D?.(e.target)?t.jsx(h,{size:"compact",onClick:()=>l(e.target),children:e.target.name||"Select target"}):t.jsx(i,{tone:"muted",children:e.target?.name||"Dynamic target"})}),p?t.jsx(c,{label:"Pole",children:e.pole&&r.hierarchy.idForObject3D?.(e.pole)?t.jsx(h,{size:"compact",onClick:()=>l(e.pole),children:e.pole.name||"Select pole"}):t.jsx(i,{tone:"muted",children:e.pole?.name||"None"})}):null]})]},d.id)})})}const ee="selection.inspector",re="Constraints",te="link",ne=450;function oe(r,n){return w(r,n)}function ie({adapter:r,nodeId:n}){return t.jsx(T,{adapter:r,nodeId:n})}export{ie as default,te as icon,oe as match,ne as order,ee as point,re as title};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{E as C,eQ as j,kd as E,aM as I,aN as A,au as p,ke as R,kf as L,kg as f,a3 as N,j$ as M,kh as x,M as F,q as P}from"./index-BRJMIUK0.js";import{d as w,S as _,a as D,b as O,u as B}from"./capability-coverage-DZ-onC5j.js";import{a as T,b as S,i as W}from"./live-project-verbs-C3LzprCe.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";function k(){const t=C();return!t||!j()?null:w({worldId:p()?.config.name??"project",authoringSurface:E(t.scenes,A().map(e=>e.descriptor.id),I().map(e=>e.descriptor.id))})}const V={physics:["@react-three/rapier","@dimforge/rapier3d-compat","@dimforge/rapier2d-compat"],networking:["colyseus.js"],navigation:["recast-navigation","@recast-navigation/core"],audio:["tone","howler"]};function G(t,e){if(e.dependencies===null)return[];const s=V[t];return s?s.filter(r=>e.dependencies?.includes(r)):[]}function K(t,e){return`this project depends on ${e.join(" + ")}, so "nothing built a ${t} world" is not a settled answer. Reach a terminal state either way: BIND it — declare the game's own ${t} adapter in the root entry's \`systems\` table — or DECLARE the absence with \`absent(reason)\` in that same table. The reason must NAME the dependency and say why it is there while the subsystem is not (a transitive pull, a leftover, a build-only use); a declared absence blind to the shipped dependency grades malformed, not terminal.`}function Y(t,e){const s=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(/^[a-z0-9]+$/i.test(e)){if(new RegExp(`\\b${s}\\b`,"i").test(t))return!0}else if(t.toLowerCase().includes(e.toLowerCase()))return!0;const r=new Set(["compat","core","client","server","node","react","three","libs","api","sdk","util","utils","plugin","plugins","tools","types","browser"]),o=c=>c.toLowerCase().split(/[.\-_/]+/).filter(v=>v.length>=4&&!r.has(v)),[a,d]=e.toLowerCase().startsWith("@")?[e.slice(1,e.indexOf("/")),e.slice(e.indexOf("/")+1)]:["",e];let n=o(d);n.length===0&&(n=o(a));const i=n.map(c=>c.replace(/\d+d?$/,"")).filter(c=>c.length>=4);return[...new Set([...n,...i])].some(c=>new RegExp(`\\b${c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`,"i").test(t))}const q="this project's vgai.project.json declares no `server` block, so there is no room for a NetworkingAdapter to describe",z={physics:"no mounted root built a physics world — the engine seeds this slot from the root that creates one (a `setup` root, or an R3F tree using the Rapier bridge), so nothing in this game simulates bodies",navigation:"no mounted root registered a navigation adapter — the engine seeds this slot from a world's own NavMeshManager registration, so this game has no navmesh",audio:"no mounted root built an audio context — the engine seeds this slot from the root that creates one, so there is no audio graph for the host to mute, meter or graph",camera:"no mounted root registered a camera-ownership system — the engine ships `createCameraOwnershipSystem` for a game that takes camera control (a cutscene rig), so this game's camera is gameplay-owned throughout",renderDebug:"no mounted root captured a real WebGL2 render context to derive one from — the engine seeds this slot only where the root owns the capture wiring (`adapter/setup-three-root-adapter.ts`), so the Frame debugger and the render-memory view have nothing to show for this game"};function b(t,e){return t==="networking"?"register a NetworkingAdapter from the game's own code (`ctx.registerSystemAdapter('networking', …)`) — this project declares a `server` block, so the editor's Network panel is dark for a game that IS networked":`register a ${t} adapter from the game's own code (\`ctx.registerSystemAdapter('${t}', …)\`), or build the subsystem the engine seeds it from`}function H(t,e){const s=new Map(e.declaredAbsences.map(r=>[r.slot,r]));return _.map(r=>{const o=s.get(r);if(t[r]!=null)return o?{slot:r,state:"malformed",evidence:`root "${o.rootId}" declares this slot absent — "${o.reason}" — but a ${r} adapter is bound on the live mount. One of the two is wrong: either the declaration is stale (delete the \`absent()\` marker) or something registers an adapter the game does not mean to have.`}:{slot:r,state:"bound",proof:R({slot:r,adapter:t[r],subject:"game"})};const a=G(r,e);if(o){const n=a.filter(c=>!Y(o.reason,c));if(n.length>0)return{slot:r,state:"malformed",evidence:`root "${o.rootId}" declares this slot absent — "${o.reason}" — but this project depends on ${n.join(" + ")} and the reason does not mention it. Either the absence is stale, or it holds and the reason should say why that dependency is present without the subsystem (naming it).`};const i=e.absencesFromLastMount?" — the declaration read at this session’s last play mount; play to re-read it live":"";return{slot:r,state:"empty",attestedBy:"game",evidence:a.length>0?`declared absent by root "${o.rootId}": ${o.reason} (the project does depend on ${a.join(" + ")}; the reason engages with that)${i}`:`declared absent by root "${o.rootId}": ${o.reason}${i}`}}if(a.length>0)return{slot:r,state:"unanswered",fix:K(r,a)};if(r==="networking")return e.declaresServer?{slot:r,state:"unanswered",fix:b(r)}:{slot:r,state:"empty",attestedBy:"host",evidence:q};const d=z[r];return d?{slot:r,state:"empty",attestedBy:"host",evidence:d}:{slot:r,state:"unanswered",fix:b(r)}})}function Q(){const t=M()?.game,e=p()?.rootPath??null;return t?(e!==null&&(l={projectPath:e,absences:t.declaredSystemAbsences??[]}),{absences:t.declaredSystemAbsences??[],fromLastMount:!1}):l!==null&&l.projectPath===e?{absences:l.absences,fromLastMount:!0}:{absences:[],fromLastMount:!1}}let l=null;function $(){if(L()!==null)return null;const t=p();if(!t)return null;const e=f();if(e.length===0||e.every(r=>r.adapter.provenance?.source==="foreign"))return null;const s=Q();return w({worldId:t.config.name,systemAdapters:H(N(),{declaresServer:(t.config.configurations??[]).some(r=>r.kind==="process"&&typeof r.port=="number"),declaredAbsences:s.absences,absencesFromLastMount:s.fromLastMount,dependencies:T()})})}function U(t){const e=w({worldId:t.worldId,reach:D(t.adapter,t.worldId),surface:t.surface,reachMechanism:null});return{worldId:t.worldId,surface:t.surface,report:e}}function g(){return f().map(U)}function J(t=g()){const e=t.map(a=>({label:a.worldId,report:a.report})),s=$();s&&e.push({label:null,report:s});const r=S();r&&e.push({label:null,report:r});const o=k();return o&&e.push({label:null,report:o}),e}function X(t){const e=J(t??g());return e.length===0?null:B(p()?.config.name??"session",e)}const y=new Set;let h=null,m=0;function u(){h=null,m=0}function Z(){if(x()){u();return}const t=g(),e=X(t);if(!e||e.summary.gaps===0){u();return}const s=f();if(s.length===0){u();return}const r=C()?.regions??[];if(r.length>1){const n=new Set(s.map(i=>i.worldId));if(r.some(i=>!n.has(i.id))){u();return}}if(t.some(n=>n.report.rows.find(i=>i.seam==="editor.capture")?.status!=="ok")){u();return}const o=`session coverage "${e.summary.worldId}"`,a=O(e,o).filter(n=>n.level==="warn"),d=a.map(n=>n.message).join(`
|
|
2
|
-
---
|
|
3
|
-
`);if(h===d?m++:(h=d,m=1),!(m<2))for(const n of a)y.has(n.message)||(y.add(n.message),F.warn(n.message,"coverage"))}const ge="workspace.service",ee=["rootCoverage","systemCoverage","projectCoverage","authoringCoverage"];function te(t){if(t)return{rootCoverage:t.rootCoverage??[],systemCoverage:t.systemCoverage??null,projectCoverage:t.projectCoverage??null,authoringCoverage:t.authoringCoverage??null};const e=$(),s=S(),r=k();return{rootCoverage:g().map(o=>({worldId:o.worldId,surface:o.surface,summary:o.report.summary,rows:o.report.rows.map(a=>({...a}))})),systemCoverage:e?{summary:e.summary,rows:e.rows.map(o=>({...o}))}:null,projectCoverage:s?{summary:s.summary,rows:s.rows.map(o=>({...o}))}:null,authoringCoverage:r?{summary:r.summary,rows:r.rows.map(o=>({...o}))}:null}}function he(){const t=P().session,e=t.reportFacet(te,{reusableKeys:ee}),s=t.onSample(Z),r=t.onCommandDispatched(o=>{o==="restart"&&W()});return()=>{e(),s(),r()}}export{ge as point,he as start};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{assertNever as ce}from"./adapter-surface-Y37Nzcyw.js";import{createRootBinding as le}from"./binding-Bmxqznjk.js";import{stackOrder as B,resolveClaimingRoot as W}from"./root-stacking-BEd9ZvxC.js";import{createAssetCache as ue}from"./assets-BcrMQHRv.js";import{createHostRenderer as fe}from"./setup-renderer-Cwkl1Ar6.js";import{T as me}from"./three.module-BLhyNg0e.js";import{T as K,c as pe,p as he,r as ge,a as we,D as ye,b as be}from"./seeded-random-BgCwIAAU.js";import{c as ee,a as ve,r as Re,D as Ee,g as ke}from"./debug-registry-P0_YQGWd.js";import{formatLoopGateMessage as Se,formatAudioGateMessage as $e}from"./loop-gate-report-N52EWFGD.js";import{bindScopedSystem as Ae}from"./system-slot-E2mEdiih.js";import{hasUserData as Pe}from"./user-data-dHvLdpwM.js";import{e3 as F,kx as _}from"./index-BRJMIUK0.js";import{c as Oe}from"./performance-profiler-OwnXQX0M.js";const De=1e3;function xe(e){const t=e.fixedTimestep??.016666666666666666,n=e.maxSubSteps??8,o=e.externalDrive??!1;let u=0,d=0,f=!1,w=0,g=1,b=!1,r=!1;function s(){o||!r||typeof document>"u"||(document.hidden?f&&(f=!1,cancelAnimationFrame(w),b=!0):b&&(b=!1,f=!0,d=performance.now(),u=0,w=requestAnimationFrame(p)))}function a(){s()}function p(E){if(!f)return;w=requestAnimationFrame(p);const v=(E-d)/1e3;d=E;const $=he(u,v,g,{fixedDt:t,maxSubSteps:n});u=$.accumulator;for(let P=0;P<$.steps;P++)e.update(t);e.render?.($.alpha,$.displayDt)}return{start(){if(!f&&(f=!0,b=!1,d=performance.now(),u=0,!o)){if(!r&&typeof document<"u"&&(document.addEventListener("visibilitychange",a),r=!0),typeof document<"u"&&document.hidden){f=!1,b=!0;return}w=requestAnimationFrame(p)}},stop(){f=!1,b=!1,cancelAnimationFrame(w),r&&typeof document<"u"&&(document.removeEventListener("visibilitychange",a),r=!1)},get isRunning(){return s(),f},get liveness(){return s(),b||f&&!o&&performance.now()-d>De?"loop-starved":f?"running":"stopped"},set timeScale(E){const v=pe(E);v!==E&&console.warn(`[game-loop] timeScale ${E} is out of range [${K.min}, ${K.max}]; clamped to ${v}.`),g=v},get timeScale(){return g},get fixedDt(){return t}}}const Fe={cancel(){}};function j(e){return new DOMException(e,"AbortError")}function H(e,t){if(!Number.isFinite(t)||t<0)throw new RangeError(`SimClock.${e}: seconds must be a finite, non-negative number, got ${t}`)}function Te(e){const t=e.dispose;let n=0,o=0,u=0,d=!1;const f=new Set,w=new Set;function g(r){r.cancelled||(r.cancelled=!0,f.delete(r),r.detachAbort?.(),r.detachAbort=null)}function b(r,s,a){H("after",r);const p=a?.signal;if(d||p?.aborted)return Fe;const E={dueAt:n+r,seq:u++,fn:s,cancelled:!1,detachAbort:null};if(f.add(E),p){const v=()=>g(E);p.addEventListener("abort",v,{once:!0}),E.detachAbort=()=>p.removeEventListener("abort",v)}return{cancel(){g(E)}}}return{now:()=>n,tickNow:()=>o,after:b,delay(r,s){H("delay",r);const a=s?.signal;return a?.aborted?Promise.reject(j("SimClock.delay: aborted before it was scheduled")):d?Promise.reject(j("SimClock.delay: the sim clock is disposed")):new Promise((p,E)=>{let v=null,$=null,P=!1;const D=()=>{P=!0,w.delete(T),$?.(),$=null};function T(C){P||(D(),v?.cancel(),E(j(C)))}if(v=b(r,()=>{P||(D(),p())}),w.add(T),a){const C=()=>T("SimClock.delay: aborted");a.addEventListener("abort",C,{once:!0}),$=()=>a.removeEventListener("abort",C)}})},disposeAfter(r,s){return H("disposeAfter",s),b(s,()=>t(r))},flush(r){if(d||(n=r,o++,f.size===0))return;const s=[];for(const a of f)!a.cancelled&&a.dueAt<=n&&s.push(a);if(s.length!==0){s.sort((a,p)=>a.dueAt-p.dueAt||a.seq-p.seq);for(const a of s)if(!a.cancelled){g(a);try{a.fn()}catch(p){console.error("[sim-clock] timer callback threw:",p)}}}},dispose(){if(d)return;d=!0;for(const s of f)s.detachAbort?.(),s.detachAbort=null,s.cancelled=!0;f.clear();const r=[...w];w.clear();for(const s of r)s("SimClock: disposed while a delay was pending")}}}const Ce=ee("sim-clock");function Me(e,t){Ce.set(e,t)}function Le(e,t="world"){const n=new Map,o=[],u=new Map;let d=0;for(const r of F)n.set(r,[]);let f=!1;const w=new Map;for(const r of F)w.set(r,new Set);const g=new Set;function b(r,s,a){const p=u.get(r)??r.name??`anonymous-${++d}`;u.set(r,p),e?.beginSystem(t,s,p);try{r(a)}catch(E){const v=r.name?`"${r.name}"`:"(anonymous)";console.error(`[system-runner] system ${v} in phase "${s}" threw:`,E)}finally{e?.endSystem(t,s,p)}}return{add(r,s,a){const p=n.get(r);if(!p)throw new Error(`Unknown phase: ${r}. Valid phases: ${F.join(", ")}`);p.push(s),u.set(s,a?.name??s.name??`anonymous-${++d}`)},remove(r,s){const a=n.get(r);if(!a)return;const p=a.indexOf(s);p!==-1&&a.splice(p,1),w.get(r)?.delete(s)},register(r){const s=n.get(r.phase);if(!s)throw new Error(`Unknown phase: ${r.phase}. Valid phases: ${F.join(", ")}`);s.push(r.update),u.set(r.update,r.name??r.update.name??`anonymous-${++d}`),o.push(r)},unregister(r){const s=n.get(r.phase);if(s){const p=s.indexOf(r.update);p!==-1&&s.splice(p,1)}w.get(r.phase)?.delete(r.update);const a=o.indexOf(r);a!==-1&&o.splice(a,1),g.delete(r),r.dispose?.()},runInit(){const r=[...o].sort((s,a)=>F.indexOf(s.phase)-F.indexOf(a.phase));for(const s of r)s.init?.()},runDispose(){for(const r of o){const s=n.get(r.phase);if(s){const a=s.indexOf(r.update);a!==-1&&s.splice(a,1)}r.dispose?.()}o.length=0},runPhase(r,s){const a=n.get(r);if(!a)throw new Error(`Unknown phase: ${r}. Valid phases: ${F.join(", ")}`);const p=w.get(r),E=[];for(const v of a)f&&!p.has(v)?E.push(v):b(v,r,s);for(const v of E)b(v,r,s)},run(r){for(const s of F)this.runPhase(s,r)},markEngineBoundary(){for(const r of F){const s=w.get(r);for(const a of n.get(r))s.add(a)}for(const r of o)g.add(r);f=!0},removeAllNonEngine(){if(!f)return;const r=o.filter(a=>g.has(a)),s=o.filter(a=>!g.has(a));o.length=0,o.push(...r);for(const a of s)a.dispose?.();for(const a of F){const p=n.get(a),E=w.get(a),v=p.filter($=>E.has($));p.length=0,p.push(...v)}},count(r){if(r)return n.get(r)?.length??0;let s=0;for(const a of n.values())s+=a.length;return s}}}function _e(e){if(!e)return"<unknown call site — no stack captured>";const t=e.split(`
|
|
2
|
-
`);return(t[2]??t[1]??t[0]??"<unknown call site>").trim()}function Ie(e=t=>{console.warn(t)}){const t=new Set;let n;function o(){const u=_e(new Error().stack);return t.has(u)||(t.add(u),e(`[determinism] the global Math.random generator was drawn from during a gameplay frame while this project declares determinism.seededRandom — use ctx.random() / ctx.random.stream(name) instead. Call site:
|
|
3
|
-
${u}`)),n()}return{enable(){n=Math.random,Math.random=o},disable(){Math.random===o&&n&&(Math.random=n,n=void 0)}}}const te=ee("gameplay-rng-trap");function Ge(e,t){te.set(e,t)}function At(e){return te.get(e)??null}const Ne=F.filter(e=>e===_.PRE_RENDER||e===_.RENDER);function U(e){const{id:t,kind:n,pausable:o=!0,adapter:u,mounted:d,scene:f,canvasRoot:w,container:g,physics:b,collisions:r,physics2d:s,camera:a,frame:p,binding:E=null}=e;if(n==="three"&&!f)throw new Error(`RootInstance "${t}" (kind: three): a three world requires a scene — pass \`scene\` in RootInstanceInit.`);if(n==="canvas"&&w==null)throw new Error(`RootInstance "${t}" (kind: canvas): a canvas world requires a native substrate root — pass \`canvasRoot\` in RootInstanceInit.`);if(n==="dom"&&!g)throw new Error(`RootInstance "${t}" (kind: react): a react world requires a container — pass \`container\` in RootInstanceInit.`);let v=!1;const $=d.dispose.bind(d);return d.dispose=()=>{v=!0,$()},{id:t,kind:n,pausable:o,adapter:u,mounted:d,physics:b,collisions:r,physics2d:s,camera:a,frame:p?{runPhase(D,T){v||p.runPhase(D,T)},endFrame(){v||p.endFrame?.()}}:void 0,binding:E,get disposed(){return v},threeScene(){if(n!=="three"||!f)throw new Error(`RootInstance "${t}" (kind: ${n}): threeScene() requested but this world is not a three world`);return f},canvasRoot(){if(n!=="canvas"||w===void 0||w===null)throw new Error(`RootInstance "${t}" (kind: ${n}): canvasRoot() requested but this world is not a canvas world`);return w},reactRoot(){if(n!=="dom"||!g)throw new Error(`RootInstance "${t}" (kind: ${n}): reactRoot() requested but this world is not a react world`);return g}}}function ze(e){const{physics:t,rapierWorld:n}=e;return!t||!n?null:{physics:t,rapierWorld:n}}function qe(e,t){const n=[];e.traverse(o=>n.push(o));for(const o of t){const u=ze(o);if(u)for(const d of n){const f=u.physics.get(d);f&&(u.rapierWorld.removeRigidBody(f.body),u.physics.remove(d))}}e.removeFromParent();for(const o of n){const u=o;Pe(o,"__sharedGeometry")||u.geometry?.dispose();const d=u.material;if(Array.isArray(d))for(const f of d)f.dispose();else d?.dispose()}}function je(e){return[]}function He(e){const t=[],n=Oe(),o=Le(n.systemObserver,"game"),u=we(e.seed??ye),d=Ie();let f=!1;const w={setEnabled(i){f=i},get enabled(){return f}};let g=0,b=0,r=0;const s=new Set,a=Te({dispose:i=>qe(i,t.flatMap(je))}),p=ve({getTick:()=>g,getSimT:()=>b,getFixedDt:()=>e.loop.fixedDt,getDefaultRootId:()=>t.length>0?v().id:null,getLoopLiveness:()=>e.loop.liveness});let E=!1;function v(){if(t.length===0)throw new Error("Game.defaultRoot: no roots registered yet");return t.find(i=>i.kind==="three")??t[0]}const $=new Set,P=new Set,D=new Map,T=new Map;function C(){const i={debug:p.adapter},h=new Map([["debug","(game)"]]),k=(y,c,R)=>{for(const l of Object.keys(c)){if(c[l]===void 0)continue;const m=h.get(l);if(m!==void 0){if(i[l]===c[l]||R?.has(l))continue;$.has(l)||($.add(l),console.warn(`[game] systemAdapters: "${l}" is registered by both ${m} and ${y} — the FIRST registration (${m}) wins; the later one is shadowed (game-scoped system adapters).`));continue}i[l]=c[l],h.set(l,y)}};for(const y of t){const c=D.get(y.id);c&&k(`world "${y.id}" (declared systems export)`,c);const R=y.mounted.systems;R&&k(`world "${y.id}"`,R,c?new Set(Object.keys(c)):void 0)}return i}let A=!1;const x=new Set;function I(i,h,k){const y=`${i}:${h}`;if(x.has(y))return;x.add(y);const c=i==="loop"?Se({worldId:h,reason:k}):$e({worldId:h,reason:k});console.warn(c)}const L=new WeakMap;function z(i){for(const h of t){if(h.disposed||!h.pausable)continue;h.mounted.drivesOwnLoop&&(h.mounted.setPaused?h.mounted.setPaused(i):i&&I("loop",h.id,"self-driven world, adapter declares no setPaused capability"));const k=D.get(h.id)?.audio??h.mounted.systems?.audio;k?i?(L.has(k)||L.set(k,k.isMuted()),k.setMuted(!0)):L.has(k)&&(k.setMuted(L.get(k)),L.delete(k)):i&&!T.get(h.id)?.some(y=>y.slot==="audio")&&I("audio",h.id,"no SystemAdapters.audio on this world")}}function G(i,h){f&&d.enable(),n.beginFrame();const k=h?.skipRenderPhases??!1,y=h?.onlyFrozen??!1,c=t.length;E=!1;for(let l=0;l<c;l++){const m=t[l];if(!m.disposed){if(y){if(A&&m.pausable&&!m.mounted.drivesOwnLoop){E=!0;break}}else if(m.mounted.drivesOwnLoop?!A||!m.pausable||!m.mounted.setPaused:!A||!m.pausable){E=!0;break}}}let R=!1;if(!y)for(let l=0;l<c;l++){const m=t[l];if(!m.disposed&&m.mounted.drivesOwnLoop&&(!A||!m.pausable||!m.mounted.setPaused)){R=!0;break}}if(y){for(const l of F){n.beginPhase(),E&&o.runPhase(l,i);for(let m=0;m<c;m++){const S=t[m];if(!S.disposed&&!S.mounted.drivesOwnLoop&&A&&S.pausable)try{S.frame?.runPhase(l,i)}catch(O){console.error(`[game] world "${S.id}" (kind: ${S.kind}) runPhase("${l}") threw (step()):`,O)}}n.endPhase(l)}for(let l=0;l<c;l++){const m=t[l];if(!m.disposed&&!m.mounted.drivesOwnLoop&&A&&m.pausable)if(R=!0,m.frame)try{m.frame.endFrame?.()}catch(S){console.error(`[game] world "${m.id}" (kind: ${m.kind}) endFrame() threw (step()):`,S)}else try{m.mounted.update?.(i)}catch(S){console.error(`[game] world "${m.id}" (kind: ${m.kind}) update() threw (step()):`,S)}}}else{for(const l of F){if(n.beginPhase(),!(k&&(l===_.PRE_RENDER||l===_.RENDER))){o.runPhase(l,i);for(let S=0;S<c;S++){const O=t[S];if(O.disposed||O.mounted.drivesOwnLoop)continue;const V=A&&O.pausable;if(V&&l!==_.RENDER)continue;const ae=V?0:i;try{O.frame?.runPhase(l,ae)}catch(de){console.error(`[game] world "${O.id}" (kind: ${O.kind}) runPhase("${l}") threw:`,de)}}}n.endPhase(l)}for(let l=0;l<c;l++){const m=t[l];if(!(m.disposed||m.mounted.drivesOwnLoop||A&&m.pausable)){if(R=!0,m.frame)try{m.frame.endFrame?.()}catch(O){console.error(`[game] world "${m.id}" (kind: ${m.kind}) endFrame() threw:`,O)}else if(!(k&&m.mounted.updateCadence==="display"))try{m.mounted.update?.(i)}catch(O){console.error(`[game] world "${m.id}" (kind: ${m.kind}) update() threw:`,O)}}}}R&&(g++,b+=i,a.flush(b)),n.endFrame(),f&&d.disable()}function q(i,h){if(r=i,f&&d.enable(),n.beginFrame(),s.size>0)for(const y of[...s])try{y(i,h)}catch(c){console.error("[game] an onRenderStep callback threw:",c)}const k=t.length;for(const y of Ne){n.beginPhase(),o.runPhase(y,h);for(let c=0;c<k;c++){const R=t[c];if(R.disposed||R.mounted.drivesOwnLoop)continue;const l=A&&R.pausable;if(!(l&&y!==_.RENDER))try{R.frame?.runPhase(y,l?0:h)}catch(m){console.error(`[game] world "${R.id}" (kind: ${R.kind}) runPhase("${y}") threw (display frame):`,m)}}n.endPhase(y)}for(let y=0;y<k;y++){const c=t[y];if(c.disposed||c.mounted.drivesOwnLoop||c.frame||c.mounted.updateCadence!=="display")continue;const R=A&&c.pausable;try{c.mounted.update?.(R?0:h)}catch(l){console.error(`[game] world "${c.id}" (kind: ${c.kind}) update() threw (display frame):`,l)}}n.endFrame(),f&&d.disable()}const M={loop:e.loop,assets:e.assets,playtest:e.playtest??null,profiler:n,systems:o,get roots(){return t},world(i){return t.find(h=>h.id===i)??null},get defaultRoot(){return v()},get systemAdapters(){return C()},subscribeSystemAdapters(i){return P.add(i),()=>P.delete(i)},notifySystemAdaptersChanged(){for(const i of P)i()},get declaredSystemAbsences(){return[...T.values()].flat()},installDeclaredSystemAdapters(i,h,k=[]){const y=t.find(l=>l.id===i);if(!y)throw new Error(`installDeclaredSystemAdapters: no mounted root is named "${i}" (mounted: ${t.map(l=>`"${l.id}"`).join(", ")||"none"}).`);if(D.has(i))throw new Error(`installDeclaredSystemAdapters: root "${i}" already installed its declared systems — a declaration is static and installs exactly once per mount.`);const c=y.mounted.systemScope??y.mounted,R=Object.fromEntries(Object.entries(h).map(([l,m])=>[l,m===void 0?void 0:Ae(m,c)]));D.set(i,R),T.set(i,k),M.notifySystemAdaptersChanged()},play:{get paused(){return A},pause(){A||(A=!0,z(!0))},resume(){A&&(A=!1,z(!1))},step(i=1/60){if(A)for(const h of t)h.disposed||!h.pausable||!h.mounted.drivesOwnLoop||h.mounted.setPaused&&(h.mounted.step?h.mounted.step():I("loop",h.id,"self-driven world, adapter declares no step capability"));G(i,{onlyFrozen:!0})}},registerRoot(i){if(t.some(h=>h.id===i.id))throw new Error(`Game.registerRoot: duplicate world id "${i.id}"`);if(t.some(h=>h.mounted===i.mounted))throw new Error(`Game.registerRoot: world "${i.id}" shares its \`mounted\` object with an already-registered world ("${t.find(h=>h.mounted===i.mounted).id}") — the same mount cannot be registered twice.`);t.push(i),M.notifySystemAdaptersChanged(),i.mounted.drivesOwnLoop&&i.kind!=="dom"&&!i.mounted.observe&&console.warn(`[game] world "${i.id}" (kind: ${i.kind}, adapter: "${i.adapter.id}"): no state bridge — this mounted game has no \`observe\` (RootStateObserver); the editor's observations cannot subscribe to its state.`)},runFrame(i,h){G(i,h)},runRenderFrame(i,h){q(i,h)},get renderAlpha(){return r},onRenderStep(i,h){const k=h?.signal;if(k?.aborted)return()=>{};s.add(i);let y=null;const c=()=>{s.delete(i),y?.(),y=null};return k&&(k.addEventListener("abort",c,{once:!0}),y=()=>k.removeEventListener("abort",c)),c},runTicks(i,h){if(!Number.isInteger(i)||i<0)throw new RangeError(`Game.runTicks: n must be a non-negative integer, got ${i}`);if(A)throw new Ee("RUN_TICKS_PAUSED","Game.runTicks: refused — Game.play.paused is true; stepping the frozen set is Game.play.step()'s contract, not runTicks'");const k=h?.render??"last",y=e.loop.fixedDt;for(let c=0;c<i;c++){const R=c===i-1;G(y,{skipRenderPhases:k==="all"?!1:k==="none"?!0:!R})}},dispose(){a.dispose(),p.strip()}};return Re(M,p),p.setRunTicksTarget({runTicks:M.runTicks}),ge(M,u),Ge(M,w),Me(M,a),M}function Be(e){B(e).forEach((n,o)=>{n.canvas.style.pointerEvents=o===0?"auto":"none"})}const X=["pointerdown","pointerup","pointermove","click","wheel"];function Ue(e){const t=e,n=["clientX","clientY","screenX","screenY","offsetX","offsetY","button","buttons","ctrlKey","altKey","shiftKey","metaKey","pointerId","pointerType","pressure","isPrimary","deltaX","deltaY","deltaZ","deltaMode"],o={bubbles:!1,cancelable:!0,composed:!0};for(const u of n)u in t&&(o[u]=t[u]);return o}function Ye(e,t){const n=globalThis,o=t.type==="wheel"?n.WheelEvent:t.type.startsWith("pointer")?n.PointerEvent:n.MouseEvent??n.PointerEvent;if(!(!o||typeof e.dispatchEvent!="function"))try{e.dispatchEvent(new o(t.type,Ue(t)))}catch{}}function Ve(e,t){Be(t);const n=new Map(t.map(d=>[d.id,d])),o=B(t)[0]?.id,u=d=>{const f=e.getBoundingClientRect?.()??{left:0,top:0},w=d.clientX??0,g=d.clientY??0,b=w-f.left,r=g-f.top,s=W(t,b,r);if(s&&s!==o){const a=n.get(s);a&&Ye(a.canvas,d)}};for(const d of X)e.addEventListener?.(d,u,!0);return{resolveClaim:(d,f)=>W(t,d,f),dispose(){for(const d of X)e.removeEventListener?.(d,u,!0)}}}function ne(e){return new URLSearchParams(e.search).get(be)==="1"}const We=[_.PRE_RENDER,_.RENDER];async function Ke(e){const t=Xe(e);for(const n of We){e.systems.runPhase(n,0);for(const o of t)o.frame.runPhase(n,0)}await Je()}function Xe(e){const t=[];for(const n of e.roots){if(n.mounted.drivesOwnLoop){Q(n.id,"drives its own loop — renderOnce() cannot frame-gate it");continue}if(!n.frame){Q(n.id,`(kind: ${n.kind}) has no phase hooks — renderOnce() cannot drive it (opaque/foreign mount with no frame-gated entry point)`);continue}t.push({id:n.id,frame:n.frame})}return t}function Q(e,t){console.warn(`[render-control] world "${e}" ${t}.`)}function Qe(e){const t=[];for(const n of e.roots){if(n.mounted.drivesOwnLoop){t.push(`world "${n.id}" drives its own loop — cannot be frame-gated for deterministic capture (the policy is to FAIL LOUDLY, or be excluded only by an explicit declared policy).`);continue}n.frame||t.push(`world "${n.id}" (kind: ${n.kind}) has no phase hooks — an opaque/foreign mount with no frame-gated entry point cannot participate in deterministic capture.`)}return t}function Z(e){let t=0,n=0;const o=[...e.children??[]];for(;o.length>0;){const u=o.pop();t++,u.userData?.entityId!==void 0&&n++,u.children&&o.push(...u.children)}return{nodes:t,entities:n}}function Ze(e){const t=[];for(const n of e.roots)n.kind==="three"?t.push({id:n.id,kind:n.kind,...Z(n.threeScene())}):n.kind==="canvas"&&n.mounted.kind==="canvas"&&n.mounted.substrate.name==="pixi"&&t.push({id:n.id,kind:n.kind,...Z(n.canvasRoot())});return t}function J(){return new Promise(e=>{requestAnimationFrame(()=>e())})}async function Je(){await J(),await J()}async function N(e){if(!e)return{status:"not-applicable"};try{return await e(),{status:"ready"}}catch(t){return{status:"error",detail:t instanceof Error?t.message:String(t)}}}async function et(){if(typeof document>"u"||!document.fonts)return{status:"not-applicable"};try{return await document.fonts.ready,{status:"ready"}}catch(e){return{status:"error",detail:e instanceof Error?e.message:String(e)}}}async function tt(e){const[t,n,o,u,d,f]=await Promise.all([N(e.assets),N(e.shaders),et(),N(e.sequences),N(e.tone),N(e.scene)]);return{assets:t,shaders:n,fonts:o,sequences:u,tone:d,scene:f}}function nt(e){const t=e.location??window.location;if(!ne(t))return;const{game:n,clock:o,readiness:u={}}=e,d=e.target??window,f=e.frameAdvancers??[],w=e.simulateFixedDt??1/60,g=e.excludedFromDeterminism??[],b={seek(r){o.seek(r)},seekFrame(r,s){o.seekFrame(r,s)},advanceFrame(r){for(const s of f)s(r)},renderOnce(){return Ke(n)},ready(){return tt(u)},simulateSubsteps(r){for(let s=0;s<r;s++)n.runFrame(w)},excludedFromDeterminism(){return[...g,...Qe(n)]},simulateFixedDt(){return w},perfSample(r){const s=n.profiler,a=s.enabled;s.enabled=!0,s.clear();const p=[];try{for(let E=0;E<r;E++){n.runFrame(w);const v=s.getSnapshot(),$=v.frames.at(-1);p.push({cpuMs:$?.cpuMs??0,phases:Object.fromEntries(($?.phases??[]).map(P=>[P.name,P.ms])),render:{...v.render}})}}finally{s.enabled=a}return{frames:p,worlds:Ze(n)}}};return d.__vgaiRender=b,b}function re(e,t,n,o){const u=o?.pausable??!0,d=U({id:o?.id??"main",kind:"three",pausable:u,adapter:t,mounted:n,scene:n.scene,binding:Y(e,o?.declaration,{surface:"three",adapter:t},n,u)});return e.registerRoot(d),d}function Y(e,t,n,o,u){return t?le({...t,adapter:n,mounted:o,pausable:u,debugRegistry:ke(e)}):null}function oe(e,t,n,o){const u=o?.id??"main",d=o?.pausable??!0,f=U({id:u,kind:"canvas",pausable:d,adapter:t,mounted:n,canvasRoot:n.substrate.root,binding:Y(e,o?.declaration,{surface:"canvas",adapter:t},n,d)});return e.registerRoot(f),f}function se(e,t,n,o,u){const d=u?.pausable??!0,f=U({id:u?.id??"main",kind:"dom",pausable:d,adapter:t,mounted:n,container:o,binding:Y(e,u?.declaration,{surface:"dom",adapter:t},n,d)});return e.registerRoot(f),f}async function rt(e){return ft(e)}function ot(e){return{domElement:e,render(){},setPixelRatio(){},setClearColor(){},setSize(){},dispose(){},forceContextLoss(){}}}function ie(e,t){try{e.mounted.dispose()}finally{e.renderer?.dispose(),e.renderer?.forceContextLoss();try{(e.element.parentNode??t).removeChild(e.element)}catch{}}}async function st(e,t){const{game:n,canvas:o,w:u,h:d,dpr:f,isBottom:w,headless:g,assets:b,antialias:r}=t,s=g?ot(o):fe(o,u,d,r===void 0?void 0:{antialias:r},{alpha:!w,preserveDrawingBuffer:!0});s.setSize(u,d,!1),o.style.width="100%",o.style.height="100%",s.setPixelRatio(f),w||s.setClearColor(0,0);const a={three:me,surface:{canvas:o,width:u,height:d},renderer:s,assets:b,headless:g,game:n},p=await e.adapter.mount(a);return re(n,e.adapter,p,{id:e.id,pausable:e.pausable,declaration:e.declaration}),{mountedEntry:{id:e.id,kind:"three",element:o,mounted:p,renderer:s},routerEntry:{id:e.id,zOrder:e.zOrder??0,canvas:o,hitTest:e.hitTest}}}async function it(e,t){const{game:n,canvas:o,w:u,h:d,dpr:f,headless:w,isBottom:g}=t,b={canvas:o,width:u,height:d,game:n,headless:w,dpr:f,transparent:!g,preserveDrawingBuffer:!0},r=await e.adapter.mount(b);return oe(n,e.adapter,r,{id:e.id,pausable:e.pausable,declaration:e.declaration}),{mountedEntry:{id:e.id,kind:"canvas",element:o,mounted:r,renderer:void 0},routerEntry:{id:e.id,zOrder:e.zOrder??0,canvas:o,hitTest:e.hitTest}}}async function at(e,t,n){n.style.pointerEvents="none",n.style.width="100%",n.style.height="100%";const o={container:n,game:t},u=await e.adapter.mount(o);return se(t,e.adapter,u,n,{id:e.id,pausable:e.pausable,declaration:e.declaration}),{mountedEntry:{id:e.id,kind:"dom",element:n,mounted:u,renderer:void 0}}}function dt(e){return()=>{}}async function ct(e,t,n){const{surfacesById:o,container:u,...d}=n,f=[],w=[];try{for(const g of e){const b=g.id===t;if(g.kind==="dom"){const E=o.get(g.id),{mountedEntry:v}=await at(g,d.game,E);f.push(v);continue}const r=o.get(g.id),s={...d,canvas:r,isBottom:b};let a,p;g.kind==="three"?{mountedEntry:a,routerEntry:p}=await st(g,s):g.kind==="canvas"?{mountedEntry:a,routerEntry:p}=await it(g,s):ce(g,"create-runtime mount loop"),f.push(a),w.push(p)}}catch(g){for(let b=f.length-1;b>=0;b--){const r=f[b];try{ie(r,u)}catch(s){console.error(`createGameRuntime: rolling back root "${r.id}" after a mount failure threw:`,s)}}throw g}return{mountedEntries:f,routerEntries:w}}function lt(e,t,n){const o=n??(typeof window<"u"?window:void 0);if(o!==void 0)return nt({game:e,clock:{seek(){},seekFrame(){}},readiness:{scene(){}},location:t,target:o}),()=>{delete o.__vgaiRender}}function ut(e,t,n){try{e.dispose()}catch(o){console.error("createGameRuntime: disposing the game after a mount failure threw:",o)}for(const o of t)try{(o.parentNode??n).removeChild(o)}catch{}}async function ft(e){const{container:t,roots:n,width:o,height:u,headless:d=!1,seed:f,playtest:w}=e;if(n.length===0)throw new Error("createGameRuntime: `roots` must contain at least one root.");const g=n,b=Math.max(1,o??t.clientWidth??0),r=Math.max(1,u??t.clientHeight??0),s=d?1:Math.min(typeof window<"u"&&window.devicePixelRatio||1,2);t.style.position||(t.style.position="relative");const a=g.map(c=>({id:c.id,zOrder:c.zOrder??0,hitTest:c.hitTest})),p=B(a),E=p[0]?.id,v=new Map(g.map(c=>[c.id,c.kind])),$=new Map;p.forEach((c,R)=>{const l=v.get(c.id)==="dom",m=document.createElement(l?"div":"canvas");if(m.dataset.vgaiRootSurface="true",m.dataset.vgaiRootId=c.id,!l){const S=m;S.width=b,S.height=r}m.style.cssText=`position:absolute;top:0;left:0;width:100%;height:100%;z-index:${R+1};contain:layout paint;`,t.appendChild(m),$.set(c.id,m)});const P=ue(),D=e.renderControl?.location??(typeof window<"u"?window.location:void 0),T=D!==void 0&&ne(D);let C=!1;const A=xe({fixedTimestep:1/60,maxSubSteps:8,externalDrive:T,update:c=>{C&&x.runFrame(c,{skipRenderPhases:!0})},render:(c,R)=>{C&&x.runRenderFrame(c,R)}}),x=He({loop:A,assets:P,seed:f,playtest:w});let I;try{I=await ct(g,E,{game:x,surfacesById:$,container:t,w:b,h:r,dpr:s,headless:d,assets:P,antialias:e.antialias})}catch(c){throw ut(x,$.values(),t),c}const{mountedEntries:L,routerEntries:z}=I,G=Ve(t,z);C=!0,A.start();const q=dt(),M=T&&D!==void 0?lt(x,D,e.renderControl?.target):void 0;let i;const h=new Promise(c=>{i=c});let k=!1;function y(){if(k)return;k=!0;const c=[],R=(l,m)=>{try{m()}catch(S){c.push({step:l,error:S})}};try{R("loop.stop",()=>A.stop()),R("router.dispose",()=>G.dispose());for(const l of L)R(`root "${l.id}"`,()=>ie(l,t));R("game.dispose",()=>x.dispose()),R("dev globals",()=>q()),R("render harness",()=>M?.())}finally{Promise.allSettled(L.map(l=>l.mounted.disposeComplete??Promise.resolve())).then(()=>i())}if(c.length>0)throw new AggregateError(c.map(l=>l.error),`Game session teardown failed in ${c.length} step(s): ${c.map(l=>l.step).join(", ")}. Every other step still ran.`)}return{stop:y,stopComplete:h,pause(){x.play.pause()},resume(){x.play.resume()},step(){x.play.step()},resize(c,R,l){const m=Math.max(1,c),S=Math.max(1,R);for(const O of L)l!==void 0&&O.renderer?.setPixelRatio(l),O.renderer?.setSize(m,S,!1),O.mounted.resize?.(m,S)},game:x}}const Pt=Object.freeze(Object.defineProperty({__proto__:null,createGameRuntime:rt,registerCanvasRoot:oe,registerReactRoot:se,registerThreeRoot:re},Symbol.toStringTag,{value:"Module"}));export{He as a,xe as b,rt as c,re as d,Pt as e,At as g,oe as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e6 as f,by as d,t as x,bw as y}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 g="x-vgai-curve";function p(r,n){return r[n].label??n}function v(r,n,e){const s=r.points;for(let t=0;t<s.length;t++){const o=s[t];for(const a of["x","y"]){const{min:u,max:c}=n[a];(o[a]<u||o[a]>c)&&e.addIssue({code:"custom",path:["points",t,a],message:`${o[a]} is outside this curve's ${p(n,a)} domain [${u}, ${c}] — move the point inside the domain, or widen the axis in the schema (curve({ ${a}: { min, max } })).`})}if(t===0)continue;const i=s[t-1];o.x<=i.x&&e.addIssue({code:"custom",path:["points",t,"x"],message:`${o.x} must be strictly greater than the previous point's x (${i.x}) — curve points run left to right along x, with no duplicate x. Sort the points, or nudge this one.`})}}function K(r){const n=f({x:d().describe(`Position along ${p(r,"x")}.`),y:d().describe(`Value at that position, along ${p(r,"y")}.`)});return f({interpolation:y(["linear","smooth"]).describe('How the value moves between points: "linear" for straight segments, "smooth" for a monotone cubic that never overshoots them.'),points:x(n).min(2,{message:'a curve needs at least two points — add another { "x": …, "y": … } so the value has somewhere to travel between.'}).describe("Keys in increasing x order; the value is clamped outside the first/last x.")}).superRefine((e,s)=>v(e,r,s)).meta({[g]:r})}function M(r){let n=r;for(let e=0;e<5&&n;e++){const t=n.meta?.()?.[g];if(t&&typeof t=="object"&&"x"in t&&"y"in t)return t;n=n.def?.innerType}}function b(r){const n=r.length,e=[];for(let t=0;t<n-1;t++){const o=r[t],i=r[t+1];e.push((i.y-o.y)/(i.x-o.x))}const s=[e[0]];for(let t=1;t<n-1;t++)s.push((e[t-1]+e[t])/2);s.push(e[n-2]);for(let t=0;t<n-1;t++){const o=e[t];if(o===0){s[t]=0,s[t+1]=0;continue}let i=s[t]/o,a=s[t+1]/o;i<0&&(s[t]=0,i=0),a<0&&(s[t+1]=0,a=0);const u=i*i+a*a;if(u>9){const c=3/Math.sqrt(u);s[t]=c*i*o,s[t+1]=c*a*o}}return s}function O(r,n){const e=r.points;if(e.length===0)return 0;const s=e[0],t=e[e.length-1];if(e.length===1||n<=s.x)return s.y;if(n>=t.x)return t.y;let o=0;for(;o<e.length-2&&n>=e[o+1].x;)o++;const i=e[o],a=e[o+1],u=a.x-i.x;if(u<=0)return i.y;const c=(n-i.x)/u;if(r.interpolation==="linear")return i.y+(a.y-i.y)*c;const m=b(e),h=c*c,l=h*c;return(2*l-3*h+1)*i.y+(l-2*h+c)*u*m[o]+(-2*l+3*h)*a.y+(l-h)*u*m[o+1]}export{K as curve,M as curveAxesOf,O as sampleCurve};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const u=/^([A-Za-z0-9_-]+)#([A-Za-z0-9_-]+(?:\.[A-Za-z0-9_-]+)*)$/;function f(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function l(t,e,r){const n=[];return c(e,"",!0,(i,s)=>{const o=g(t,i,s,r);o&&n.push(o)}),n}function c(t,e,r,n){if(typeof t=="string"){n(t,e);return}if(Array.isArray(t)){t.forEach((i,s)=>{c(i,`${e}[${s}]`,!1,n)});return}if(f(t))for(const[i,s]of Object.entries(t))r&&i==="$schema"||c(s,e?`${e}.${i}`:i,!1,n)}function g(t,e,r,n){const i=u.exec(e);return!i||!n.has(i[1])?null:{inAsset:t,atPath:r||"(root)",ref:e,targetAsset:i[1],targetKeyPath:i[2].split(".")}}function A(t){const e=new Set(t.keys()),r=[];for(const[n,i]of t)for(const s of l(n,i,e)){const o=m(t.get(s.targetAsset),s);o!==null&&r.push({...s,missingSegment:o})}return r}function m(t,e){let r=t;for(const n of e.targetKeyPath){if(!f(r)||!(n in r))return n;r=r[n]}return null}function y(t){return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function d(t){const e=[];return a(t,"",e),e}function a(t,e,r){const n=y(t);if(n){if(typeof n["x-vgai-ref"]=="string"){r.push({fieldPath:e||"(root)",targetStem:n["x-vgai-ref"]});return}if(f(n.properties))for(const[i,s]of Object.entries(n.properties))i!=="$schema"&&a(s,e?`${e}.${i}`:i,r);f(n.additionalProperties)&&a(n.additionalProperties,e,r)}}function h(t,e){return t.filter(r=>!e.has(r.targetStem)).map(r=>({fieldPath:r.fieldPath,targetStem:r.targetStem}))}export{u as DATA_REF_PATTERN,l as collectDataRefs,d as collectDeclaredRefFields,A as findDanglingDataRefs,h as findMissingRefTargets};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{DATA_REF_PATTERN as p}from"./data-check-core-CQEjuFyt.js";import{u as l}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";function g(e){return new RegExp(`^${e}#[A-Za-z0-9_-]+(?:\\.[A-Za-z0-9_-]+)*$`)}function E(e){return l().regex(g(e),{message:`must be a "${e}#<key>" reference — expected the target asset stem "${e}", e.g. "${e}#some-key".`}).meta({"x-vgai-ref":e})}function u(e,o){let t=e;for(const r of o){if(t===null||typeof t!="object"||Array.isArray(t)||!(r in t))return r;t=t[r]}return null}function j(e,o){const t=p.exec(o);if(!t)throw new Error(`getRef: "${o}" is not a "file#key" reference — expected a string shaped like "some-file#some-key".`);const r=t[1],m=t[2],n=e.sourcePath?.split("\\").join("/").split("/").pop()?.replace(/\.data\.json$/,"");if(n!==void 0&&n!==r)throw new Error(`getRef: ref "${o}" names target asset "${r}", but the handle passed in is "${n}" (${e.sourcePath}). Pass the handle "${r}#..." actually names — getRef(${r}, ...), not getRef(${n}, ...).`);const i=m.split("."),a=e.get(),f=u(a,i);if(f!==null)throw new Error(`getRef: dangling ref "${o}" — "${f}" does not exist`+(n?` in ${n}.data.json`:"")+'. Fix the key or remove the ref (refs are "file#key" strings).');let s=a;for(const c of i)s=s[c];return s}export{E as dataRef,j as getRef};
|