@volter/game-editor 0.5.65 → 0.5.66
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 +1962 -363
- package/catalog/entries/bake.json +0 -1
- package/catalog/entries/blender.json +2 -2
- package/catalog/entries/reflections.json +2 -4
- package/catalog/project-source/src/lib/bake/asset-seed.ts +1 -2
- package/catalog/project-source/src/lib/bake/clip-layering.ts +3 -4
- package/catalog/project-source/src/lib/bake/gltf-bake.ts +1 -1
- package/catalog/project-source/src/lib/bake/params.ts +3 -5
- package/catalog/project-source/src/lib/bake/rest-relative-animation.ts +2 -3
- package/dist/.vite/manifest.json +2406 -2182
- package/dist/assets/{AssetBudgetPanel-J9--TZPU.js → AssetBudgetPanel-csYWK2H4.js} +8 -8
- package/dist/assets/{AudioViewer-CR7333fe.js → AudioViewer-BH_LUYs5.js} +1 -1
- package/dist/assets/{BVHLoader-6bQIXhMX.js → BVHLoader-Jkzh8hMf.js} +1 -1
- package/dist/assets/BufferGeometryUtils-CAbuTPOA.js +1 -0
- package/dist/assets/{CCDIKSolver-CD7vLpsK.js → CCDIKSolver-D4NvkJ8d.js} +1 -1
- package/dist/assets/{CSS3DRenderer-CL7ABLVK.js → CSS3DRenderer-CAS2WZZy.js} +1 -1
- package/dist/assets/CanvasSceneViewport-BlsRTk-X.js +1 -0
- package/dist/assets/ColladaLoader-DxYB89DA.js +3 -0
- package/dist/assets/{ColorInput-DQBNrW-K.js → ColorInput-CPQNsDf1.js} +1 -1
- package/dist/assets/{ConvexGeometry-CAzXlPVG.js → ConvexGeometry-Dinf-sev.js} +1 -1
- package/dist/assets/{ConvexHull-BINCESFp.js → ConvexHull-CrJ8FY-w.js} +1 -1
- package/dist/assets/{DecalGeometry-160KRdfg.js → DecalGeometry-owkbefLa.js} +1 -1
- package/dist/assets/EffectComposer-BHDH-NLz.js +1 -0
- package/dist/assets/EntityModelDocument-DuQivdvc.js +1 -0
- package/dist/assets/EnvironmentAssetDocument-CnTEMn3A.js +1 -0
- package/dist/assets/FBXLoader-BMUbIhtE.js +1 -0
- package/dist/assets/Fbo-DrK7CWlB.js +1 -0
- package/dist/assets/{FontLoader-CvGoVI5a.js → FontLoader-BR_K6Baw.js} +2 -2
- package/dist/assets/GLTFExporter-BZqAQJbw.js +1 -0
- package/dist/assets/{GameplaySessionTimeline-B52W3FVZ.js → GameplaySessionTimeline-Crqwv2fP.js} +1 -1
- package/dist/assets/Gltf-7cVbZUzT.js +2 -0
- package/dist/assets/ImageViewer-BkFie7Hm.js +1 -0
- package/dist/assets/InspectorObjectPreview-Dl3tyJBn.js +1 -0
- package/dist/assets/JsonAssetDocument-BUFzubHM.js +2 -0
- package/dist/assets/{LineSegments2-CsOpKSiM.js → LineSegments2-Cicm_Hu1.js} +2 -2
- package/dist/assets/LiveModuleDocument-C3OQxiba.js +1 -0
- package/dist/assets/LutAssetDocument-DVzd1RZ9.js +1 -0
- package/dist/assets/{MTLLoader-_Xzd4_0p.js → MTLLoader-Bg_grNiT.js} +2 -2
- package/dist/assets/{MarchingCubes-Bsp4wrzd.js → MarchingCubes-a78AL3HB.js} +1 -1
- package/dist/assets/MeshBVH-BCSLNEeP.js +1 -0
- package/dist/assets/ModelAssetDocument-pN84goRT.js +1 -0
- package/dist/assets/{NonThreeAuthoringBootstrap-C3woOMxX.js → NonThreeAuthoringBootstrap-BKNejRiW.js} +1 -1
- package/dist/assets/{OBJLoader-BhIC6Hwo.js → OBJLoader-BiwzVj5b.js} +2 -2
- package/dist/assets/Object3DDocumentToolbar-D5Bg5FEf.js +1 -0
- package/dist/assets/Object3DDocumentViewport-DFHqru3a.js +2 -0
- package/dist/assets/Object3DPreview-BTtZ-41z.js +2 -0
- package/dist/assets/OnlineAssetDetail-BAqozdAp.js +1 -0
- package/dist/assets/{OrbitControls-DLpayAaK.js → OrbitControls-CzKVCORl.js} +1 -1
- package/dist/assets/{OrbitControls-CM3bPray.js → OrbitControls-CzTRRI7x.js} +1 -1
- package/dist/assets/{OrthographicCamera-bQozawrh.js → OrthographicCamera-CSDDsvu7.js} +1 -1
- package/dist/assets/{PLYLoader-DYQqs5Ik.js → PLYLoader-QxrxxMpE.js} +2 -2
- package/dist/assets/{PerspectiveCamera-CQ2lh01o.js → PerspectiveCamera-DzD_NfVh.js} +1 -1
- package/dist/assets/PlayBar-qVJpgwJt.js +2 -0
- package/dist/assets/QuarksAssetDocument-B4vBlUsS.js +2 -0
- package/dist/assets/RGBELoader-WQ7xZofE.js +1 -0
- package/dist/assets/RectAreaLightUniformsLib-CwcuoVqt.js +1 -0
- package/dist/assets/{RenderPass-DPrn-Uky.js → RenderPass-C_CeQNdh.js} +1 -1
- package/dist/assets/{ResolutionPicker-C67vs1F3.js → ResolutionPicker-DpHVJxn5.js} +1 -1
- package/dist/assets/RootSelectionOverlay-BxvsunO4.js +1 -0
- package/dist/assets/{RoundedBox-BDGBg6QZ.js → RoundedBox-B_cZ0NFy.js} +1 -1
- package/dist/assets/{RoundedBoxGeometry-CyUuYPfW.js → RoundedBoxGeometry-Y4rcSIvX.js} +1 -1
- package/dist/assets/STLLoader-Bej_Nkpr.js +1 -0
- package/dist/assets/{SelectionBox-D_75KrNW.js → SelectionBox-Cn9vm7f9.js} +1 -1
- package/dist/assets/ShaderAssetDocument-Dx2x8CLr.js +12 -0
- package/dist/assets/{ShaderPass-QYRpPuFJ.js → ShaderPass-qtkA7CQ8.js} +1 -1
- package/dist/assets/{ShadowEditor-DkImwu1Y.js → ShadowEditor-BEIUkrHL.js} +1 -1
- package/dist/assets/SimplifyModifier-D2EesGr2.js +1 -0
- package/dist/assets/{SkeletonUtils-Cps8GOC6.js → SkeletonUtils-C8ayciDc.js} +1 -1
- package/dist/assets/{Sky-CQKCgYDs.js → Sky-BBpnAJZV.js} +1 -1
- package/dist/assets/SourceAssetViewer-BpMbbuy6.js +1 -0
- package/dist/assets/StageHost-lB8f---y.js +2 -0
- package/dist/assets/{StoryPreviewMount-DjyxRCXu.js → StoryPreviewMount-BIfxmkYh.js} +1 -1
- package/dist/assets/{TDSLoader-D_T8XJ81.js → TDSLoader-rHl5Uwc0.js} +1 -1
- package/dist/assets/{TextGeometry-DOWAEUV0.js → TextGeometry-BRHSufuM.js} +1 -1
- package/dist/assets/ThreeBoardDocument-BHV92Ia3.js +2 -0
- package/dist/assets/{ThreeIsolationSceneContent-C8C8whSF.js → ThreeIsolationSceneContent-BqtgDHBK.js} +1 -1
- package/dist/assets/{ToolObject3DPreview-BRoDWe4Q.js → ToolObject3DPreview-CcaPJTyH.js} +1 -1
- package/dist/assets/Toolbar-keHcSvDD.js +1 -0
- package/dist/assets/{TrackballControls-DfznuQTh.js → TrackballControls-Cce-6Ff5.js} +1 -1
- package/dist/assets/{TransientHint-BB1fwrvK.js → TransientHint-Dlslh3oX.js} +1 -1
- package/dist/assets/{UnrealBloomPass-CR-cS_K5.js → UnrealBloomPass-DiseEiFK.js} +2 -2
- package/dist/assets/{VideoViewer-C6kocgIU.js → VideoViewer-naGSXHd6.js} +1 -1
- package/dist/assets/ViewportShadingMenu-C7Hdhtca.js +1 -0
- package/dist/assets/{active-ingest-CT6jSGhr.js → active-ingest-DEgq9JiA.js} +3 -3
- package/dist/assets/{animation-clock-CnjZqfJp.js → animation-clock-lTIb6nk3.js} +1 -1
- package/dist/assets/animation-mixers.service-2O2rVwQf.js +1 -0
- package/dist/assets/asset-budget-asset.menu-9NhdHAC9.js +1 -0
- package/dist/assets/asset-budget.action-yg6-luUJ.js +1 -0
- package/dist/assets/asset-budget.document-B46_VFqa.js +1 -0
- package/dist/assets/asset-budget.menu-DuH07N-e.js +1 -0
- package/dist/assets/{asset-editor-persistence-BBaONOJt.js → asset-editor-persistence-BVtzjadu.js} +1 -1
- package/dist/assets/{asset-loaders-BOy5Ss8k.js → asset-loaders-BxG1LykH.js} +2 -2
- package/dist/assets/{assets-BuSoGjBX.js → assets-Do88ZdV_.js} +1 -1
- package/dist/assets/{audio-unlock.service-CfUgUQVy.js → audio-unlock.service-BJH0mWvX.js} +1 -1
- package/dist/assets/{audio.utility-C6K6jem8.js → audio.utility-Cp4aVYFU.js} +1 -1
- package/dist/assets/autoplay.service-FxpRy7Ev.js +1 -0
- package/dist/assets/{babylon-authoring-adapter-CL02gWDn.js → babylon-authoring-adapter-B_8iE8fK.js} +1 -1
- package/dist/assets/{binding-resolver-Dsh-6Vor.js → binding-resolver-BWwG10zJ.js} +2 -2
- package/dist/assets/blender-emscripten-engine-CEsWgnR7.js +2 -0
- package/dist/assets/{blender-node-editor.document-iIDkB9sI.js → blender-node-editor.document-DTgwy8KC.js} +1 -1
- package/dist/assets/blender-properties-tab-DWSJpkxq.js +3 -0
- package/dist/assets/blender-runtime-host-OGjPjTrG.js +4 -0
- package/dist/assets/{blender-runtime-skin-DyQ9B6CR.js → blender-runtime-skin-DymtXlpt.js} +37 -39
- package/dist/assets/blender-runtime.document-CzH2ohHR.js +8 -0
- package/dist/assets/{blender-timeline.document-77fx96N7.js → blender-timeline.document-BRy_QPHt.js} +1 -1
- package/dist/assets/{blender-uv-editor.document-fsT7B4gV.js → blender-uv-editor.document-D-AbUCqz.js} +1 -1
- package/dist/assets/{blender-version.status-o6dBm3n6.js → blender-version.status-B7flzX_7.js} +1 -1
- package/dist/assets/{blender-wali-engine-wTOcrOMC.js → blender-wali-engine-D3iKpzn9.js} +1 -1
- package/dist/assets/blender.command-BVHtgTQy.js +1 -0
- package/dist/assets/blender.environment-CG-pC7sk.js +1 -0
- package/dist/assets/{blender.style-Dcem5f_T.js → blender.style-CxfbTFcE.js} +1 -1
- package/dist/assets/{board-guides-DziKSTss.js → board-guides-C3usUZZk.js} +1 -1
- package/dist/assets/body-marks-D8iaje6y.js +1 -0
- package/dist/assets/bridge.command-BF9u6r0A.js +3 -0
- package/dist/assets/browserAll-38aBu-cf.js +1 -0
- package/dist/assets/{build-profiles.document-kW8iw8Xj.js → build-profiles.document-DO7oNRuo.js} +2 -2
- package/dist/assets/{build-progress.status-BNRLytg2.js → build-progress.status-COeNVhYd.js} +1 -1
- package/dist/assets/{build-session-C_sg3CEn.js → build-session-IWIriS5P.js} +1 -1
- package/dist/assets/{build.action-lYjTLb7K.js → build.action-DlkFvZf6.js} +1 -1
- package/dist/assets/{build.command-DIGgUPU_.js → build.command-DPqQIYj_.js} +1 -1
- package/dist/assets/{build.header-CKajx5U3.js → build.header-CNLG-pV8.js} +1 -1
- package/dist/assets/{build.menu-BdU0QXny.js → build.menu-hUlH6loi.js} +1 -1
- package/dist/assets/{build.service-CbBAyeu3.js → build.service-C86Td3_9.js} +1 -1
- package/dist/assets/{camera-KEsKvOL7.js → camera-CKbyBXMe.js} +1 -1
- package/dist/assets/camera-authoring-Ci3KnE-W.js +1 -0
- package/dist/assets/{camera-runtime.inspector-B7unX4g1.js → camera-runtime.inspector-DdR3P2BF.js} +1 -1
- package/dist/assets/canvas-entry-runtime-E5YjSgre.js +2 -0
- package/dist/assets/canvas-preview-frames-CiAx7dpV.js +1 -0
- package/dist/assets/{capability-coverage-Czas4C18.js → capability-coverage-CfUeULDN.js} +5 -5
- package/dist/assets/city-EkhAOo5s.exr +0 -0
- package/dist/assets/{collaboration-presence-DLoZ7EA3.js → collaboration-presence-CSLFNT7m.js} +1 -1
- package/dist/assets/{collider-Bw0mXlsW.js → collider-DRSaLRM9.js} +1 -1
- package/dist/assets/{component-board.service-DCwcUssB.js → component-board.service-B7Sv8b7m.js} +2 -2
- package/dist/assets/component-board.service-B8UHw8dn.js +2 -0
- package/dist/assets/component-contracts.service-LFGekycZ.js +1 -0
- package/dist/assets/{component-verbs.command-7xzfjGMZ.js → component-verbs.command-D4SvFjfG.js} +1 -1
- package/dist/assets/component-verbs.service-TGvWxf2b.js +1 -0
- package/dist/assets/{config-CEZk921y.js → config-DB_RH-hO.js} +3 -3
- package/dist/assets/{configurations-DTBMdaTL.js → configurations-C2qgJNnW.js} +1 -1
- package/dist/assets/{connection.status-BifnQdOs.js → connection.status-CG7X2brL.js} +1 -1
- package/dist/assets/{console-bridge-CHcb-xk5.js → console-bridge-B5Ltae37.js} +1 -1
- package/dist/assets/{constraint-De8f1Uiq.js → constraint-C_Jj7dXy.js} +1 -1
- package/dist/assets/constraints.inspector-D6QZJS4b.js +1 -0
- package/dist/assets/courtyard-DqlebbpC.exr +0 -0
- package/dist/assets/coverage.service-Clo86874.js +3 -0
- package/dist/assets/{create-runtime-CVCc1BDx.js → create-runtime-lmA910XT.js} +1 -1
- package/dist/assets/{curve-7Q79VgU4.js → curve-6-TR6dNb.js} +1 -1
- package/dist/assets/{data-asset-4hjS642k.js → data-asset-BNbd309U.js} +1 -1
- package/dist/assets/{data-ref-CQI28C0D.js → data-ref-Dvmd7eb1.js} +1 -1
- package/dist/assets/{debug-bridge-CCohG-d-.js → debug-bridge-BUNhgyY6.js} +1 -1
- package/dist/assets/{debug-registry-Dgvitx8M.js → debug-registry-B3Cnne3x.js} +1 -1
- package/dist/assets/deferred-ingest-play-7V8OrW3e.js +2 -0
- package/dist/assets/design-time-layers-g9VS6amb.js +1 -0
- package/dist/assets/design-time-mount.service-HtMr_vBd.js +2 -0
- package/dist/assets/design-time-react-mount-Dx6fJ-Hg.js +1 -0
- package/dist/assets/{directional-shadow-fit-BVkOKAv2.js → directional-shadow-fit-Cjz_Eg2b.js} +1 -1
- package/dist/assets/{document-preview-three-Kbg2GCLm.js → document-preview-three-C3y0syYQ.js} +1 -1
- package/dist/assets/{dom-authoring-adapter-CY8C7f4T.js → dom-authoring-adapter-CEeFyatF.js} +1 -1
- package/dist/assets/{draco3d-BBUTcNkz.js → draco3d-FKy0apkb.js} +1 -1
- package/dist/assets/drei-asset-caches-jJoHXbTj.js +2 -0
- package/dist/assets/{edit-mode-audio.service-Bzetwd5B.js → edit-mode-audio.service-DZTnrW6t.js} +1 -1
- package/dist/assets/edit-mode-authoring-D_BiHCQj.js +1 -0
- package/dist/assets/{edit-mode-networking.service-YCX6RRb_.js → edit-mode-networking.service-BzMI2VxO.js} +1 -1
- package/dist/assets/editor-api-Bzmo0o8_.js +1 -0
- package/dist/assets/{entry-adjudication-Cq8Yeb74.js → entry-adjudication-BYy7TXOB.js} +1 -1
- package/dist/assets/{events-156d8d12.esm-ErOhDXXB.js → events-156d8d12.esm-C734MYnx.js} +7 -7
- package/dist/assets/{extend-B-eOccUm.js → extend-CLG0ymiX.js} +1 -1
- package/dist/assets/forest-P_CQY3b_.exr +0 -0
- package/dist/assets/fork-menu-De7HU6_H.js +1 -0
- package/dist/assets/{frame-debugger-store-D1Mf_5up.js → frame-debugger-store-BZgIOlU6.js} +1 -1
- package/dist/assets/{game-DHOZVb-7.js → game-D5EJoILQ.js} +1 -1
- package/dist/assets/{game-contract-seams-a5YXejOu.js → game-contract-seams-TCpIMmHP.js} +1 -1
- package/dist/assets/{game-css-scope-transform-Eng4wS8E.js → game-css-scope-transform-NbpajQr-.js} +1 -1
- package/dist/assets/game-document.service-6eRlrI-d.js +1 -0
- package/dist/assets/game-eval.command-hKnSMlX0.js +2 -0
- package/dist/assets/{game-input-seams-CIQdetRw.js → game-input-seams-BC6xhZy3.js} +1 -1
- package/dist/assets/{game-module-access-B2mFxv-i.js → game-module-access-ry3xb1Ix.js} +1 -1
- package/dist/assets/{gameplay-export-BoKXm51x.js → gameplay-export-DiLQuPpn.js} +1 -1
- package/dist/assets/gameplay-replay-Bsre-1K8.js +1 -0
- package/dist/assets/{gameplay-rng-trap-CTNhm-UW.js → gameplay-rng-trap-BhRx_CtU.js} +1 -1
- package/dist/assets/gameplay.command-BqiyGn-I.js +1 -0
- package/dist/assets/{generation-jobs-BQrXbGp_.js → generation-jobs-BYcpgeGk.js} +1 -1
- package/dist/assets/generation.service-O81IqA-6.js +1 -0
- package/dist/assets/{generations-DzUogZsM.js → generations-CsGQ3twi.js} +1 -1
- package/dist/assets/{generations.status-CgOUBCum.js → generations.status-C3YU0_ml.js} +1 -1
- package/dist/assets/godot.style-DxJaFWOP.js +1 -0
- package/dist/assets/godot.view-BFsHk8b2.js +1 -0
- package/dist/assets/{hosted-asset-materialization-CiIvWkGU.js → hosted-asset-materialization-Bk-plQF6.js} +2 -2
- package/dist/assets/{ibl-override-material-BlmCxFKq.js → ibl-override-material-BhbGwgS1.js} +1 -1
- package/dist/assets/{index-mjWQmGhM.js → index-0n9eSzwT.js} +1 -1
- package/dist/assets/index-B4bmKkgY.css +1 -0
- package/dist/assets/index-BLo2LE8C.js +3404 -0
- package/dist/assets/index-BWW4-DBH.js +1 -0
- package/dist/assets/index-CLcsjKUs.js +1 -0
- package/dist/assets/index-CU5YUq-x.js +134 -0
- package/dist/assets/{index-DUpHH6JR.js → index-Cb6o_Td_.js} +1 -1
- package/dist/assets/index-Ckxb31Yz.js +1500 -0
- package/dist/assets/index-CnpsJMao.js +1 -0
- package/dist/assets/index-Cr23XhNm.js +1 -0
- package/dist/assets/index-DO1rWQ_r.js +487 -0
- package/dist/assets/{index-BcCBqgM_.js → index-DUh02lTr.js} +1 -1
- package/dist/assets/index-DXEHfb0b.js +1 -0
- package/dist/assets/{index-V1R-e5Bd.js → index-wRCvCebM.js} +1 -1
- package/dist/assets/{inference-diagnostics-Dhmtfbq_.js → inference-diagnostics-YW0yJkKx.js} +1 -1
- package/dist/assets/{ingest-BbYMC2vQ.js → ingest-BlQnR7s3.js} +1 -1
- package/dist/assets/ingest-boot-viewport-uG9jQ1zm.js +1 -0
- package/dist/assets/ingest-siblings-DRQXSWax.js +1 -0
- package/dist/assets/{ingest-source-persistence-C_6Hiyra.js → ingest-source-persistence-DH6ioCOu.js} +1 -1
- package/dist/assets/{ingest.service-BTDnQfM1.js → ingest.service-GeaWMaZX.js} +1 -1
- package/dist/assets/{input-manager-DH_hGW6d.js → input-manager-Cxx3RJgG.js} +1 -1
- package/dist/assets/{input-router-BNQvtIqw.js → input-router-FzxO5ld6.js} +1 -1
- package/dist/assets/{inspect-BZfi3mmo.js → inspect-BRgDdtVk.js} +1 -1
- package/dist/assets/instances.command-CFOMPSj3.js +1 -0
- package/dist/assets/{instruments-CKR02Y8I.js → instruments-IKn-vvNb.js} +1 -1
- package/dist/assets/interior-Bo_lba15.exr +0 -0
- package/dist/assets/{json-history-resource-BbxllWfV.js → json-history-resource-r-9q_hxP.js} +1 -1
- package/dist/assets/{light-D-_wsKTq.js → light-CFAor97k.js} +1 -1
- package/dist/assets/light-camera-factory-D1sgz3YB.js +1 -0
- package/dist/assets/live-mixers-BRkRHd6g.js +1 -0
- package/dist/assets/{loader-CaF_I7Yt.js → loader-BbMsvIxP.js} +1 -1
- package/dist/assets/machine.document-CgmsOh-s.js +24 -0
- package/dist/assets/machines.finder-nxiCgQc2.js +1 -0
- package/dist/assets/matcap-texture-Dh65bX5V.js +1 -0
- package/dist/assets/{material-CpAdjDxn.js → material-D5kXEZWQ.js} +1 -1
- package/dist/assets/{material-factory-Bz6h__6g.js → material-factory-0Qb0VuZ5.js} +1 -1
- package/dist/assets/material-preview.view-DqNcpd_b.js +1 -0
- package/dist/assets/{mesh-B3WPtNKO.js → mesh-BKPgNTwh.js} +1 -1
- package/dist/assets/{mesh-shadow-CZnXrw_l.js → mesh-shadow-BDQP4mHs.js} +1 -1
- package/dist/assets/model-asset-sections.service-DWPLmkqa.js +1 -0
- package/dist/assets/model-inspection-Cxfg_Fei.js +1 -0
- package/dist/assets/model.layout-BpZE1W9V.js +1 -0
- package/dist/assets/{models.finder-G2jQgIRu.js → models.finder-DHW17ZEa.js} +1 -1
- package/dist/assets/module-mode-CRfHyIMS.js +2 -0
- package/dist/assets/mount-canvas-ingest-root-BZZ8M3Lu.js +2 -0
- package/dist/assets/mount-dom-ingest-root-D1GV6Jjt.js +2 -0
- package/dist/assets/{mount-game-6t9cKNo4.js → mount-game-F9e76auh.js} +1 -1
- package/dist/assets/mount-ingest-root-B5D-Lmmk.js +2 -0
- package/dist/assets/{mount-manifest-CGVxhmAw.js → mount-manifest-cYRhgHfo.js} +1 -1
- package/dist/assets/mount-three-ingest-root-BNnouaBn.js +1 -0
- package/dist/assets/{mounted-authoring-Dmg5xmhP.js → mounted-authoring-TIN5EnCb.js} +1 -1
- package/dist/assets/{mounted-story-viewport-source-DjP6RA9U.js → mounted-story-viewport-source-CAlEmE0_.js} +1 -1
- package/dist/assets/{native-debug-module-CWicoSGD.js → native-debug-module-j-MekcLS.js} +1 -1
- package/dist/assets/{navigation-CIiCx-SM.js → navigation-DmR1BDVo.js} +1 -1
- package/dist/assets/{navmesh.menu-CAKiH8PW.js → navmesh.menu-FhL1pGx1.js} +1 -1
- package/dist/assets/{navmesh.service-jgDWlgj1.js → navmesh.service-usyDeJlm.js} +1 -1
- package/dist/assets/{network.utility-CEu5nHf7.js → network.utility-BPh4hTmh.js} +1 -1
- package/dist/assets/night-CvV4Gybt.exr +0 -0
- package/dist/assets/{object3d-authoring-subject-CH5sI2oP.js → object3d-authoring-subject-CyE4rQ2A.js} +1 -1
- package/dist/assets/oid-transform-BOqL6YH6.js +2 -0
- package/dist/assets/{particles-Y626p22p.js → particles-C47L-dda.js} +1 -1
- package/dist/assets/particles-factory-CRqPLdS7.js +1 -0
- package/dist/assets/pixi-authoring-adapter-C5Ikqj5-.js +1 -0
- package/dist/assets/{pixi-live-write-target-DuWydlWb.js → pixi-live-write-target-OWBk79dp.js} +1 -1
- package/dist/assets/pixi-primitive-D5igywJ_.js +1 -0
- package/dist/assets/pixi-react-root-factory-9lZ0Yz-n.js +1 -0
- package/dist/assets/play-mode-DomOvQie.js +22 -0
- package/dist/assets/play.command-DoqjH-Pp.js +2 -0
- package/dist/assets/{playtest-BXIL1JEF.js → playtest-BnFenMBW.js} +1 -1
- package/dist/assets/{pose-guard-6Osb2cFu.js → pose-guard-Bb3gZOzk.js} +1 -1
- package/dist/assets/{product-DFhyARJj.js → product-CTDJoVo5.js} +1 -1
- package/dist/assets/{profiler.action-CaXJDp3t.js → profiler.action-C_OFGkDw.js} +1 -1
- package/dist/assets/{profiler.menu-BIMF6Bi4.js → profiler.menu-BJbnVoo4.js} +1 -1
- package/dist/assets/{profiler.utility-BExw9wBO.js → profiler.utility-qpfhuwRw.js} +1 -1
- package/dist/assets/project-authoring-session-BV-MM8Fl.js +2 -0
- package/dist/assets/{project-provenance-BoP3nrle.js → project-provenance-4ldz-EOG.js} +1 -1
- package/dist/assets/{properties-bone-constraints.inspector-ByT6p7S-.js → properties-bone-constraints.inspector-C-ByIdg1.js} +1 -1
- package/dist/assets/{properties-bone.inspector-z4qJwKO5.js → properties-bone.inspector-CXY0xCQB.js} +1 -1
- package/dist/assets/{properties-collection.inspector-D0_3ijWU.js → properties-collection.inspector-DIfkZAel.js} +1 -1
- package/dist/assets/{properties-constraints.inspector-CESzjuls.js → properties-constraints.inspector-BaunL5nT.js} +1 -1
- package/dist/assets/{properties-data.inspector-hG8Wgyzb.js → properties-data.inspector-DQD-jfO2.js} +1 -1
- package/dist/assets/{properties-material.inspector-CzY0JCQ6.js → properties-material.inspector-A0HZ4SX6.js} +1 -1
- package/dist/assets/{properties-modifiers.inspector-3dDhwf7g.js → properties-modifiers.inspector-GUnVhVwZ.js} +1 -1
- package/dist/assets/{properties-object.inspector-CiarfxkT.js → properties-object.inspector-Chsfa4Xa.js} +1 -1
- package/dist/assets/{properties-output.inspector-DKJxmKSD.js → properties-output.inspector-U7ZmD0Me.js} +1 -1
- package/dist/assets/{properties-particles.inspector-CCEdYWGm.js → properties-particles.inspector-umkW-OlI.js} +1 -1
- package/dist/assets/{properties-physics.inspector-B2c0KUyA.js → properties-physics.inspector-CLVBlWwL.js} +1 -1
- package/dist/assets/{properties-render.inspector-Bcm0HLRW.js → properties-render.inspector-D0u9taKy.js} +1 -1
- package/dist/assets/{properties-scene.inspector-PIM_eTb_.js → properties-scene.inspector-JwGCZQAx.js} +1 -1
- package/dist/assets/{properties-texture.inspector-CgFlnyr8.js → properties-texture.inspector-B1vC28pw.js} +1 -1
- package/dist/assets/{properties-view-layer.inspector-DGjF_Aqo.js → properties-view-layer.inspector-BuUKyBFp.js} +1 -1
- package/dist/assets/{properties-world.inspector-CrMvaRvB.js → properties-world.inspector-VXUj4dT4.js} +1 -1
- package/dist/assets/r3f-design-session-qJ2v5SrB.js +2 -0
- package/dist/assets/r3f-physics-binding-C8OqNRG2.js +1 -0
- package/dist/assets/{r3f-root-factory-z9llD1OU.js → r3f-root-factory-DjGnbU4n.js} +1 -1
- package/dist/assets/r3f-source-authoring-adapter-CG9heazM.js +12 -0
- package/dist/assets/{rapier-physics-bridge-CMoeVo3Y.js → rapier-physics-bridge-B-EK7KYV.js} +1 -1
- package/dist/assets/react-inspector.service-DWeXDHJq.js +1 -0
- package/dist/assets/{react-root-CEz5NTck.js → react-root-DGLRLr-F.js} +1 -1
- package/dist/assets/react-story-board-CSqHY0Cg.js +1 -0
- package/dist/assets/{react-three-fiber.esm-CycrbDlA.js → react-three-fiber.esm-BxIoqVh1.js} +1 -1
- package/dist/assets/{react-three-rapier.esm-CEfKpvxT.js → react-three-rapier.esm-BYzLhdSV.js} +1 -1
- package/dist/assets/react-world-authoring-adapter-BMT9kLWU.js +1 -0
- package/dist/assets/{realm-services-CobQsq_X.js → realm-services-D25JHoqD.js} +1 -1
- package/dist/assets/{reflection-probe-Don-M3Fj.js → reflection-probe-CqXWlicu.js} +1 -1
- package/dist/assets/{reflection-probe-capture.inspector-CmFUoJCx.js → reflection-probe-capture.inspector-B7Qa30vB.js} +1 -1
- package/dist/assets/regions-DWeEBnE2.js +1 -0
- package/dist/assets/{register-render-vitals-BiZk29b2.js → register-render-vitals-BO7x64kR.js} +1 -1
- package/dist/assets/{registry-02YZjMNp.js → registry-DlTluc4x.js} +1 -1
- package/dist/assets/{render-audio-control-vMRlePWb.js → render-audio-control-DCa_bOBI.js} +1 -1
- package/dist/assets/{render-batch-system-0vq7p0VC.js → render-batch-system-CzCp9YKM.js} +1 -1
- package/dist/assets/{render-control-Df3yTiyr.js → render-control-BNQr1eNO.js} +1 -1
- package/dist/assets/{render-env-D2IV2x5k.js → render-env-emvlfeTG.js} +1 -1
- package/dist/assets/{render-features-CPQ_e568.js → render-features-COF7MSQ9.js} +1 -1
- package/dist/assets/{render-settings-Bw4W9SYF.js → render-settings-C_kIMq8Y.js} +1 -1
- package/dist/assets/{resolve-three-SZE_WWUM.js → resolve-three-C-nx-QdA.js} +13 -13
- package/dist/assets/{root-seam-contract-Z0VWX3Bk.js → root-seam-contract-C7GOxf5x.js} +1 -1
- package/dist/assets/{run-ticks-settled-C4ksViyA.js → run-ticks-settled-B0cTtmhQ.js} +1 -1
- package/dist/assets/{scene-capture-CGYF-Viw.js → scene-capture-CLOc7GXc.js} +1 -1
- package/dist/assets/{scene-capture-BQKzU0NT.js → scene-capture-D10Nxkvp.js} +1 -1
- package/dist/assets/scene-document.service-B7kAVTko.js +2 -0
- package/dist/assets/{scene-framing-Cat0GtyJ.js → scene-framing-50N7SKuX.js} +1 -1
- package/dist/assets/{scene-index-B6BZOHMk.js → scene-index-Bce459yu.js} +1 -1
- package/dist/assets/{scene-query-C7_N-TpI.js → scene-query-IUZhw6pA.js} +1 -1
- package/dist/assets/{schema-kl9-2B_J.js → schema-Iy-mbzll.js} +1 -1
- package/dist/assets/sculpt.layout-D-K5cLw6.js +1 -0
- package/dist/assets/{seeded-random-i3mtgBKZ.js → seeded-random-CN0scLZj.js} +1 -1
- package/dist/assets/{session-CZ5JPg-z.js → session-CsR0lApe.js} +24 -15
- package/dist/assets/{setup-audio-S8GQF91f.js → setup-audio-BJ18gvXZ.js} +1 -1
- package/dist/assets/setup-particles-B6H-GbAA.js +1 -0
- package/dist/assets/{setup-physics-BeZ7-LKD.js → setup-physics-GugbTT0J.js} +1 -1
- package/dist/assets/{setup-renderer-DVXaSGin.js → setup-renderer-wt_a-p8r.js} +20 -20
- package/dist/assets/shading.layout-CZZHKBer.js +1 -0
- package/dist/assets/{sim-clock-CLflx7kg.js → sim-clock-DEfbb_-P.js} +1 -1
- package/dist/assets/{soft-particle-depth-DGvfQDi1.js → soft-particle-depth-CKUS1j0Y.js} +1 -1
- package/dist/assets/source-object3d-authoring-adapter-CfHQLFAL.js +1 -0
- package/dist/assets/{source-persistence-backend-C-aR-B_Y.js → source-persistence-backend-_-JMEXxE.js} +1 -1
- package/dist/assets/{spark-renderer-lifecycle-ynWESJcv.js → spark-renderer-lifecycle-9mnMW3Z4.js} +1 -1
- package/dist/assets/{spark.module-4pXQoz5d.js → spark.module-CXth-y_a.js} +1 -1
- package/dist/assets/stage-keyboard-C0FdDLOQ.js +1 -0
- package/dist/assets/stage-overlay-set-CwhCzbOy.js +1 -0
- package/dist/assets/stage-presence-markers-DVMDKiB-.js +1 -0
- package/dist/assets/stage-transform-tools-B09Z7v0o.js +1 -0
- package/dist/assets/standard-viewport-dressing-GUUr6GuK.js +20 -0
- package/dist/assets/{state-watch.action-BOvQR2qt.js → state-watch.action-CgF8qoFC.js} +1 -1
- package/dist/assets/{state-watch.menu-CNLvDeeY.js → state-watch.menu-CIMncESW.js} +1 -1
- package/dist/assets/{state-watch.utility-Bg1tTTQU.js → state-watch.utility-zTHkUALC.js} +1 -1
- package/dist/assets/static-batch-advisor-DqfXWRUq.js +1 -0
- package/dist/assets/story-capture-COQgezzl.js +1 -0
- package/dist/assets/story-documents-DQ0KORmd.js +3 -0
- package/dist/assets/story-documents.service-DOSaqPqv.js +1 -0
- package/dist/assets/story-documents.service-Gb7oUkbg.js +1 -0
- package/dist/assets/{story-media-presence-BHzk2IV5.js → story-media-presence-nW3zJqKv.js} +1 -1
- package/dist/assets/story-pixi-preview-COPTEsHo.js +1 -0
- package/dist/assets/story-presentation-CxADj5oz.js +1 -0
- package/dist/assets/{story-three-preview-BHEDZzcl.js → story-three-preview-C9W__8Or.js} +2 -2
- package/dist/assets/{structural-ids-Dc-7rEwi.js → structural-ids-CblajJQK.js} +1 -1
- package/dist/assets/studio-CysTBGIb.exr +0 -0
- package/dist/assets/sunrise-Dj0psFrf.exr +0 -0
- package/dist/assets/sunset-Bw3x2Bot.exr +0 -0
- package/dist/assets/{surface-state-DaxyruCj.js → surface-state-BAUJu6GY.js} +1 -1
- package/dist/assets/{system-runner-DkOjxEBt.js → system-runner-D_DtVrer.js} +1 -1
- package/dist/assets/team-playtest.service--79O6xkx.js +1 -0
- package/dist/assets/{three-CDSueJyJ.js → three-DSsr_Lvp.js} +1 -1
- package/dist/assets/{three-authoring-adapter-CmSQ3Vui.js → three-authoring-adapter-Yqsank46.js} +1 -1
- package/dist/assets/three-authoring.service-BDos-bRt.js +2 -0
- package/dist/assets/{three-ingest-runtime-QzDYk6tU.js → three-ingest-runtime-DWijtqQ8.js} +1 -1
- package/dist/assets/{three-projection-core-BmKMZ-nf.js → three-projection-core-kubBTx0s.js} +1 -1
- package/dist/assets/three-story-model-BraQFA9h.js +1 -0
- package/dist/assets/three-viewport-presentation-BL7Uc2i6.js +1 -0
- package/dist/assets/{three.module-D396a9Mn.js → three.module-IFn-4i31.js} +1 -1
- package/dist/assets/three.quarks.esm-CRKGjKAH.js +1039 -0
- package/dist/assets/transform-mode-request-Cu7ewbtr.js +1 -0
- package/dist/assets/{transform-writer-BhBBTx33.js → transform-writer-DXxrI4t7.js} +1 -1
- package/dist/assets/transport.header-CeND8Vzh.js +1 -0
- package/dist/assets/{trigger-volume-BNK2XzPL.js → trigger-volume-BCVRS3NM.js} +1 -1
- package/dist/assets/{tuples-CIQ4Bn1U.js → tuples-DKDGrN1t.js} +1 -1
- package/dist/assets/ui-board-document-DD2CAEAo.js +2 -0
- package/dist/assets/unity.style-vCmLw4gI.js +1 -0
- package/dist/assets/unity.view-DIn2S6Do.js +1 -0
- package/dist/assets/unreal.style-BQn-HhOX.js +1 -0
- package/dist/assets/unreal.view-adNBETZK.js +1 -0
- package/dist/assets/user-data-CZqsJDk-.js +1 -0
- package/dist/assets/{utility-view-state-BHypxA33.js → utility-view-state-DYJY8V8O.js} +1 -1
- package/dist/assets/uv-editing.layout-A8RA-cbM.js +1 -0
- package/dist/assets/{vgai-shared-three-Bc5PvpLM.js → vgai-shared-three-D_RAEumG.js} +1 -1
- package/dist/assets/{viewport-root-presentation-CWsE56K6.js → viewport-root-presentation-C9M98VNM.js} +1 -1
- package/dist/assets/{viewport-shading-BuA88e_A.js → viewport-shading-BzcvgJhK.js} +1 -1
- package/dist/assets/viewport-shading-boundary-CBvvzS-p.js +84 -0
- package/dist/assets/{viewport-surface-status-B3om4Kcf.js → viewport-surface-status-BFmnWp7z.js} +1 -1
- package/dist/assets/voxel-surface-ROWYug7H.js +1 -0
- package/dist/assets/webgl-frame-capture-CRKX73E9.js +1 -0
- package/dist/assets/webworkerAll-CehoCtFb.js +1 -0
- package/dist/assets/{worker-UrMcrc5_.js → worker-B7zhIsFh.js} +2 -2
- package/dist/assets/world-documents-DErHq15h.js +1 -0
- package/dist/assets/world-root-stage-binding-BIymcQ4K.js +1 -0
- package/dist/assets/{world-state-BWG-IcOd.js → world-state-ZGDGY_Xl.js} +1 -1
- package/dist/assets/{writer-B-KovzkA.js → writer-BPbm4_my.js} +5 -5
- package/dist/assets/xstate-animation-binding-Cvd4JbEY.js +1 -0
- package/dist/assets/{xstate-animation-meta-Q3u9zh_m.js → xstate-animation-meta-B3OZR8Q2.js} +1 -1
- package/dist/vgai-shared-three.json +1 -1
- package/dist-node/cli.js +317 -73
- package/dist-node/create.js +59 -19
- package/package.json +16 -13
- package/src/index.ts +6 -0
- package/template/.agents/skills/vgai-3d-models/SKILL.md +3 -3
- package/template/.agents/skills/vgai-threejs-authoring/SKILL.md +4 -9
- package/template/.claude/skills/vgai-3d-models/SKILL.md +3 -3
- package/template/.claude/skills/vgai-threejs-authoring/SKILL.md +4 -9
- package/template/.github/skills/vgai-3d-models/SKILL.md +3 -3
- package/template/.github/skills/vgai-threejs-authoring/SKILL.md +4 -9
- package/template/AGENTS.md +1 -1
- package/template/check-idioms.ts +4 -5
- package/template/package.json +9 -9
- package/template/tsconfig.json +1 -0
- package/template/vgai.adapter.ts +1 -0
- package/template-dotfiles/gitignore +2 -0
- package/workbench/src/media/game-cover.css +1 -1
- package/catalog/project-source/src/lib/bake/mesh-slice.ts +0 -157
- package/dist/assets/BufferGeometryUtils-Nz37EVXf.js +0 -1
- package/dist/assets/CanvasSceneViewport-Bpi6gVTC.js +0 -1
- package/dist/assets/ColladaLoader-aVOPIsCh.js +0 -3
- package/dist/assets/EXRLoader-Cdans_oJ.js +0 -1
- package/dist/assets/EffectComposer-DQxfsXBZ.js +0 -1
- package/dist/assets/EntityModelDocument-Ccvw66N9.js +0 -1
- package/dist/assets/EnvironmentAssetDocument-Dg-Qq6O6.js +0 -1
- package/dist/assets/FBXLoader-B4MoUtAn.js +0 -1
- package/dist/assets/Fbo-Dz-Soul3.js +0 -1
- package/dist/assets/GLTFExporter-HgrCle4L.js +0 -1
- package/dist/assets/Gltf-UHVWKz65.js +0 -2
- package/dist/assets/HDRLoader-THU88oVD.js +0 -5
- package/dist/assets/ImageViewer-Tn7s_MnW.js +0 -1
- package/dist/assets/InspectorObjectPreview-CVejvLRg.js +0 -1
- package/dist/assets/JsonAssetDocument-C7VGcLhu.js +0 -3
- package/dist/assets/MeshBVH-BiDHDcu-.js +0 -1
- package/dist/assets/ModelAssetDocument-F5GACirk.js +0 -1
- package/dist/assets/Object3DDocumentViewport-DB7T0NTl.js +0 -2
- package/dist/assets/Object3DPreview-DL8oi7Xs.js +0 -2
- package/dist/assets/OnlineAssetDetail-C6z9RvYK.js +0 -2
- package/dist/assets/PlayBar-BR-Vg3Jb.js +0 -2
- package/dist/assets/RGBELoader-BgBcQv8j.js +0 -1
- package/dist/assets/RectAreaLightUniformsLib-CMMoWfll.js +0 -1
- package/dist/assets/RootSelectionOverlay-BZPlxmXU.js +0 -1
- package/dist/assets/STLLoader-Dyv3lsxY.js +0 -1
- package/dist/assets/SimplifyModifier-C8ayvRzd.js +0 -1
- package/dist/assets/SourceAssetViewer-2SWQoUut.js +0 -12
- package/dist/assets/StageHost-BN-IoTef.js +0 -2
- package/dist/assets/ThreeBoardDocument-CVncZyIq.js +0 -2
- package/dist/assets/asset-budget-asset.menu-Di3KiQCd.js +0 -1
- package/dist/assets/asset-budget.action-DCzzcuTh.js +0 -1
- package/dist/assets/asset-budget.document-BWU8wnVW.js +0 -1
- package/dist/assets/asset-budget.menu-BGZpT_31.js +0 -1
- package/dist/assets/autoplay.service-BZBGNSvt.js +0 -1
- package/dist/assets/blender-emscripten-engine-9ZIRYNhe.js +0 -2
- package/dist/assets/blender-properties-tab-C5CyPydi.js +0 -3
- package/dist/assets/blender-runtime-host-BpBwGv7r.js +0 -4
- package/dist/assets/blender-runtime.document-lIYhhPtv.js +0 -8
- package/dist/assets/blender.command-BtJeWk-A.js +0 -1
- package/dist/assets/body-marks-h_xDxiDE.js +0 -1
- package/dist/assets/bridge.command-o5gDNEwa.js +0 -3
- package/dist/assets/browserAll-DeWblVez.js +0 -1
- package/dist/assets/canvas-entry-runtime-SfBxaR9M.js +0 -2
- package/dist/assets/component-board.service-DidCyM4O.js +0 -2
- package/dist/assets/component-verbs.service-Bv9jId3q.js +0 -1
- package/dist/assets/constraints.inspector-B9U9Yj-u.js +0 -1
- package/dist/assets/coverage.service-VTX5Mcsx.js +0 -3
- package/dist/assets/deferred-ingest-play-DCJi_Pgu.js +0 -2
- package/dist/assets/design-time-layers-wYgOTgni.js +0 -1
- package/dist/assets/design-time-mount.service-BzY21e1F.js +0 -2
- package/dist/assets/design-time-react-mount-DM9WLrF2.js +0 -1
- package/dist/assets/edit-mode-authoring-B47TfLqu.js +0 -1
- package/dist/assets/editor-api-BoJIcyZG.js +0 -1
- package/dist/assets/fflate.module-DPuTF8aG.js +0 -6
- package/dist/assets/fork-menu-BoVyw2Wu.js +0 -1
- package/dist/assets/game-document.service-DbRfx2V0.js +0 -1
- package/dist/assets/game-eval.command-D-7Dxbj_.js +0 -2
- package/dist/assets/gameplay-replay-e5umMlXv.js +0 -1
- package/dist/assets/gameplay.command-DxcVYX6F.js +0 -1
- package/dist/assets/generation.service-CDIgObuw.js +0 -1
- package/dist/assets/index-96FBF1Oj.js +0 -1
- package/dist/assets/index-BAWkB0dv.js +0 -1
- package/dist/assets/index-BDnS2b6S.js +0 -1
- package/dist/assets/index-BjTCPEQ7.js +0 -134
- package/dist/assets/index-CVCb_ImQ.js +0 -1
- package/dist/assets/index-CZd9o7Lu.js +0 -1
- package/dist/assets/index-D2fNXpHa.css +0 -1
- package/dist/assets/index-GIL7oGEO.js +0 -4894
- package/dist/assets/index-OrYXPk3Z.js +0 -487
- package/dist/assets/ingest-boot-viewport-D5rI_Kk_.js +0 -1
- package/dist/assets/ingest-siblings-Bop2kqVl.js +0 -1
- package/dist/assets/instances.command-D6UkZNO8.js +0 -1
- package/dist/assets/light-camera-factory-CWbbe9gI.js +0 -1
- package/dist/assets/live-behaviors-Bxq49Maz.js +0 -1
- package/dist/assets/matcap-texture-CVfalpWT.js +0 -1
- package/dist/assets/model-asset-sections.service-CHhFS3ZX.js +0 -1
- package/dist/assets/model.layout-BJUEQYUI.js +0 -1
- package/dist/assets/module-mode-DVBLT9d-.js +0 -2
- package/dist/assets/mount-canvas-ingest-root-DDuAWf_C.js +0 -2
- package/dist/assets/mount-dom-ingest-root-D_EiBgpn.js +0 -2
- package/dist/assets/mount-ingest-root-glv2SSWf.js +0 -2
- package/dist/assets/mount-three-ingest-root-hrUt9VVU.js +0 -1
- package/dist/assets/particles-factory-DnLOHXT8.js +0 -1
- package/dist/assets/pasteboard-materialize-BqSS4QzV.js +0 -20
- package/dist/assets/pasteboard.action-DU3UHtJG.js +0 -2
- package/dist/assets/pixi-authoring-adapter-CjibysC3.js +0 -1
- package/dist/assets/pixi-primitive-DlWbUPN9.js +0 -1
- package/dist/assets/pixi-react-root-factory-DYsznYRQ.js +0 -1
- package/dist/assets/play-mode-BFU2PCkG.js +0 -22
- package/dist/assets/play.command-BpqqLqkq.js +0 -2
- package/dist/assets/project-authoring-session-Bnt6icLr.js +0 -2
- package/dist/assets/r3f-design-session-D-4yyDO9.js +0 -2
- package/dist/assets/r3f-physics-binding-BBo8oma9.js +0 -1
- package/dist/assets/r3f-source-authoring-adapter-w6Bc60K-.js +0 -13
- package/dist/assets/react-inspector.service-B_neRnSK.js +0 -1
- package/dist/assets/react-story-board-BDDwiE2H.js +0 -1
- package/dist/assets/react-world-authoring-adapter-DmrwM3py.js +0 -1
- package/dist/assets/runtime-inspection-l2iFQSsg.js +0 -1
- package/dist/assets/scene-document.service-qkDjUrlP.js +0 -2
- package/dist/assets/sculpt.layout-zJF55yCR.js +0 -1
- package/dist/assets/setup-particles-GCXlnkj_.js +0 -1
- package/dist/assets/shading.layout-DULYZV6M.js +0 -1
- package/dist/assets/source-object3d-authoring-adapter-B-L6Ha6f.js +0 -1
- package/dist/assets/stage-invalidation-DBg3C3Ta.js +0 -1
- package/dist/assets/stage-keyboard-n-5kKH-m.js +0 -1
- package/dist/assets/stage-overlay-set-B9zp2sLB.js +0 -1
- package/dist/assets/stage-presence-markers-DiGI6A45.js +0 -1
- package/dist/assets/standard-viewport-dressing-CzjAe_0A.js +0 -7
- package/dist/assets/static-batch-advisor-B13QEH7d.js +0 -1
- package/dist/assets/story-capture-_gC8dXV-.js +0 -1
- package/dist/assets/story-documents--TDLaPeL.js +0 -3
- package/dist/assets/story-documents.service-BiS_YbNQ.js +0 -1
- package/dist/assets/story-documents.service-CxOPYJ2j.js +0 -1
- package/dist/assets/story-pixi-preview-BUrOJZXS.js +0 -1
- package/dist/assets/story-presentation-j2AVN-mK.js +0 -1
- package/dist/assets/team-playtest.service-DqOinFVA.js +0 -1
- package/dist/assets/three-authoring.service-iuHLwtf1.js +0 -2
- package/dist/assets/three-viewport-presentation-QBQpSdMh.js +0 -1
- package/dist/assets/three.quarks.esm-B1C61jGo.js +0 -1039
- package/dist/assets/transport.header-B-6HQlU2.js +0 -1
- package/dist/assets/ui-board-document-Bwtt--xp.js +0 -2
- package/dist/assets/use-live-actor-state-DErbWQWF.js +0 -1
- package/dist/assets/user-data-BB2Of6Ht.js +0 -1
- package/dist/assets/uv-editing.layout-BEKHxmHw.js +0 -1
- package/dist/assets/viewport-shading-boundary-B_-_gABg.js +0 -82
- package/dist/assets/voxel-surface-DtcsSWRL.js +0 -1
- package/dist/assets/webgl-frame-capture-FlF9zQmW.js +0 -1
- package/dist/assets/webworkerAll-CM2o_dnz.js +0 -1
- package/dist/assets/world-documents-147tiFZe.js +0 -1
- package/dist/assets/world-root-stage-binding-vwTrtBz6.js +0 -1
- package/dist/assets/xstate-animation-binding-Brd0NST6.js +0 -1
- package/dist/assets/xstate-behavior.action-B8UluFBK.js +0 -1
- package/dist/assets/xstate-behavior.document-CKAsE45I.js +0 -1
- package/dist/assets/xstate-behavior.inspector-vJJyuifc.js +0 -1
- package/dist/assets/xstate-behavior.menu-BXbPICIh.js +0 -1
- package/dist/assets/xstate-inspection-BsZv8LS9.js +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/game-css-scope-transform-
|
|
2
|
-
import{_ as oe,
|
|
3
|
-
`,sn=rt(),ot=new Set(["href","protocol","host","hostname","port","pathname","search"]),at=new Set(["assign","replace","reload"]),it=new Set(["play","project","hub","scene","ingest","create-from","checkout_id"]);function ct(e){return it.has(e)||e.startsWith("vgai")}function _e(e){const t=e.startsWith("?")?e.slice(1):e;if(!t)return"";const n=new URLSearchParams;for(const[a,u]of new URLSearchParams(t))ct(a)||n.append(a,u);const s=n.toString();return s.length>0?`?${s}`:""}function lt(e){try{const t=new URL(e);return t.search=_e(t.search),t.href}catch{return e}}function ut(e,t,n){const s=Object.create(null);return new Proxy(s,{get(a,u){if(typeof u=="string"&&at.has(u))return(...g)=>{u==="reload"&&n?.reloadGame?.()||t(`location.${u}(${g.map(h=>String(h)).join(", ")})`)};if(u==="search")return _e(String(Reflect.get(e,"search")??""));if(u==="href")return lt(String(Reflect.get(e,"href")??""));const i=Reflect.get(e,u);return typeof i=="function"?i.bind(e):i},set(a,u,i){return typeof u=="string"&&ot.has(u)?(t(`location.${u} = ${String(i)}`),!0):Reflect.set(e,u,i)},has(a,u){return Reflect.has(e,u)}})}function dt(e){return`Ingested game attempted to navigate the editor away (${e}) — refused. A game running in-realm shares the editor's document, so leaving it would take the whole session with it; game code sees a scoped \`location\` facade whose reads pass through and whose navigating writes do not (packages/editor/src/game-location-guard.ts).`}function ft(e){let t=0,n=0;const s=Object.create(Object.getPrototypeOf(e)),a=w=>(t+=1,e.getItem(String(w))),u=(w,d)=>{n+=1,e.setItem(String(w),String(d))},i=w=>{n+=1,e.removeItem(String(w))},g=()=>{n+=1,e.clear()},h=w=>(t+=1,e.key(Number(w)));return{storage:new Proxy(s,{get(w,d){return d==="length"?(t+=1,e.length):d==="getItem"?a:d==="setItem"?u:d==="removeItem"?i:d==="clear"?g:d==="key"?h:d===Symbol.toStringTag?"Storage":typeof d=="string"?a(d)??void 0:Reflect.get(s,d,s)},set(w,d,p){return typeof d!="string"?Reflect.set(s,d,p,s):(u(d,String(p)),!0)},deleteProperty(w,d){return typeof d!="string"?Reflect.deleteProperty(s,d):(i(d),!0)},defineProperty(w,d,p){return typeof d!="string"||!("value"in p)?!1:(u(d,String(p.value)),!0)},has(w,d){return typeof d!="string"?Reflect.has(s,d):d in s?!0:a(d)!==null},ownKeys(){const w=[];for(let d=0;d<e.length;d+=1){const p=e.key(d);p!==null&&w.push(p)}return w},getOwnPropertyDescriptor(w,d){if(typeof d!="string")return;const p=e.getItem(d);return p===null?void 0:{configurable:!0,enumerable:!0,value:p,writable:!0}}}),stats:()=>({reads:t,writes:n})}}function mt(e){return!e||e.loop!=="gated"&&e.loop!=="self-driven"?null:{verdict:e.loop,evidence:e.evidence}}function gt(e){let t="open",n=0,s=0,a=0,u=0,i=0,g=0,h=0,y=0,w=!1;const d=[],p=new Set,I=new Set,T=new Set,S=new Map,L=()=>(t==="held"?h:e.now())-y,l=m=>{a++,t==="held"&&u++;try{m.run()}catch(_){e.setTimeout(()=>{throw _},0)}},f=()=>{const m=d.splice(0,d.length);S.clear();for(const _ of m)l(_)},o=m=>{d.push(m)},r=m=>()=>{if(t==="held"){o(m);return}l(m)},c=()=>{t!=="held"&&(h=e.now(),t="held")},v=()=>{t==="held"&&(y+=e.now()-h)};return{schedulers:{setTimeout(m,_,...E){if(s++,w)return-1;const R={run:()=>m(...E)};let A=-1;const C=r(R);return A=e.setTimeout(()=>{p.delete(A),C()},_),p.add(A),R.timerId=A,A},clearTimeout(m){e.clearTimeout(m),p.delete(m);const _=d.findIndex(E=>E.timerId===m);_!==-1&&d.splice(_,1)},setInterval(m,_,...E){if(s++,w)return-1;let R=-1;const A=()=>{const C={run:()=>m(...E)};if(t==="held"){const re=S.get(R);if(re){const se=d.indexOf(re);se!==-1&&d.splice(se,1)}S.set(R,C),o(C);return}l(C)};return R=e.setInterval(A,_),I.add(R),R},clearInterval(m){e.clearInterval(m),I.delete(m);const _=S.get(m);if(_){S.delete(m);const E=d.indexOf(_);E!==-1&&d.splice(E,1)}},requestAnimationFrame(m){if(s++,w)return-1;const _={run:()=>m(L())};let E=-1;const R=r(_);return E=e.requestAnimationFrame(()=>{T.delete(E),R()}),T.add(E),_.frameId=E,E},cancelAnimationFrame(m){e.cancelAnimationFrame(m),T.delete(m);const _=d.findIndex(E=>E.frameId===m);_!==-1&&d.splice(_,1)}},hold:c,release(){w||(v(),t="open",f())},step(m=1){if(!w){for(v(),n=m>0?m:1,t="step";n>0&&d.length>0;)n--,f();t="held",h=e.now()}},stats(){return{mode:t,pending:d.length,requests:s,fired:a,firedWhileHeld:u,activeTimeouts:p.size,activeIntervals:I.size,activeAnimationFrames:T.size,input:i,inputBlocked:g}},recordInput(m){i++,m&&g++},dispose(){if(w)return{timeouts:0,intervals:0,animationFrames:0,parkedCallbacks:0};w=!0;const m={timeouts:p.size,intervals:I.size,animationFrames:T.size,parkedCallbacks:d.length};for(const _ of p)e.clearTimeout(_);for(const _ of I)e.clearInterval(_);for(const _ of T)e.cancelAnimationFrame(_);return p.clear(),I.clear(),T.clear(),d.length=0,S.clear(),n=0,t="held",h=e.now(),m}}}async function on(e){const t=e.windowMs??1500,n=Math.max(1,Math.min(e.sampleMs??50,t)),s=e.sleep??(I=>new Promise(T=>setTimeout(T,I))),a=e.gate;if(!a)return{loop:"self-driven",reason:"no same-realm loop gate is installed, so nothing here controls this game’s scheduling",evidence:{pendingWhileHeld:0,firedWhileHeld:0,progressBefore:0,progressAfter:0,windowMs:t}};const u=a.stats(),i=e.progress();let g=u,h=i,y=u.pending,w=u.mode==="held";for(let I=0;I<t;I+=n)if(await s(Math.min(n,t-I)),g=a.stats(),h=e.progress(),y=Math.max(y,g.pending),g.mode!=="held"){w=!1;break}const d=g.firedWhileHeld-u.firedWhileHeld,p={pendingWhileHeld:y,firedWhileHeld:d,progressBefore:i,progressAfter:h,windowMs:t};return!w||g.mode!=="held"?{loop:"unmeasured",reason:"the gate was not held for the whole probe window — something else released it, so control was not measured",evidence:p}:d>0?{loop:"self-driven",reason:`${d} gated callback(s) ran while the gate was held — the gate leaked, so it cannot claim control`,evidence:p}:h>i?{loop:"self-driven",reason:`the game kept rendering while its scheduling was withheld (frame ${i} → ${h} in ${t}ms) — something outside this gate drives its loop`,evidence:p}:y===0?{loop:"unmeasured",reason:"nothing was due while the gate was held, so it withheld nothing and the probe learned nothing about this loop — note a hidden or backgrounded tab schedules no frames at all, which is a fact about the TAB, never about the game",evidence:p}:{loop:"gated",reason:`verified: ${y} scheduled callback(s) withheld, none ran, and no frame advanced in ${t}ms of held time`,evidence:p}}let V=null;function ht(){return V}const j=new Set(["keydown","keyup","keypress","mousedown","mouseup","mousemove","click","dblclick","contextmenu","wheel","pointerdown","pointerup","pointermove","pointercancel","touchstart","touchmove","touchend","touchcancel"]);function Se(e){const t=new Set,n=new WeakSet,s=((a,u)=>{const i=vt(a,u),g=yt(a,u);if(e()){for(const y of i)t.add(y);for(const y of g)t.delete(y);return!1}if(n.has(u))return!1;let h=!1;for(const y of g)t.delete(y)&&(h=!0);return h&&n.add(u),!h});return s.outstandingReleases=()=>{const a=[];for(const u of t){const i=u.indexOf(":"),g=u.slice(0,i),h=u.slice(i+1);g==="key"?a.push(new KeyboardEvent("keyup",{code:h,key:wt(h),bubbles:!0})):g==="mouse"?a.push(new MouseEvent("mouseup",{button:Number(h),bubbles:!0})):g==="pointer"&&typeof PointerEvent=="function"&&a.push(new PointerEvent("pointerup",{pointerId:Number(h),bubbles:!0}))}return a},s}function wt(e){const t=/^Key([A-Z])$/.exec(e);if(t)return t[1].toLowerCase();const n=/^Digit(\d)$/.exec(e);return n?n[1]:e==="Space"?" ":e}function be(e){const t=e.changedTouches;return t?Array.from(t,n=>`touch:${n.identifier}`):["touch"]}function vt(e,t){switch(e){case"keydown":return[`key:${t.code}`];case"mousedown":return[`mouse:${t.button}`];case"pointerdown":return[`pointer:${t.pointerId}`];case"touchstart":return be(t);default:return[]}}function yt(e,t){switch(e){case"keyup":return[`key:${t.code}`];case"mouseup":return[`mouse:${t.button}`];case"pointerup":case"pointercancel":return[`pointer:${t.pointerId}`];case"touchend":case"touchcancel":return be(t);default:return[]}}const Ee=new Set(["setTimeout","clearTimeout","setInterval","clearInterval","requestAnimationFrame","cancelAnimationFrame"]);function Re(e,t){return typeof e!="function"||Object.hasOwn(e,"prototype")?e:e.bind(t)}const k="",F=new Map,U=new Map,H=new Map,le=new WeakMap;function K(e){let t=H.get(e);return t||(t=new nt,H.set(e,t)),t}function an(e,t=k){const n=K(t);return n.surface=e,n}function cn(e=k){H.get(e)?.reset()}function ln(e=k){return K(e)}function un(){const e=[];for(const[t,n]of H)n.surface&&e.push({surface:n.surface,gate:Ie(t)});return e}function Ie(e){return()=>Fe()&&(U.get(e)??(()=>!0))()}function pt(e,t){const n=Ie(e);return()=>t.alive&&n()}const M=[];function _t(){return M[M.length-1]??null}De(_t);function $(e,t){M.push(e);try{return t()}finally{M.pop()}}function St(e,t){return{setTimeout(n,s,...a){return t.setTimeout((...u)=>$(e,()=>n(...u)),s,...a)},clearTimeout:n=>t.clearTimeout(n),setInterval(n,s,...a){return t.setInterval((...u)=>$(e,()=>n(...u)),s,...a)},clearInterval:n=>t.clearInterval(n),requestAnimationFrame(n){return t.requestAnimationFrame(s=>$(e,()=>n(s)))},cancelAnimationFrame:n=>t.cancelAnimationFrame(n)}}function bt(e){const t=new Map;return new Proxy(console,{get(n,s){const a=Reflect.get(n,s,n);if(typeof a!="function")return a;let u=t.get(s);return u||(u=(...i)=>$(e,()=>a.apply(n,i)),t.set(s,u)),u}})}function ue(e){let t=!1,n=null;return()=>{if(t)return n;t=!0;try{n=ft(window[e])}catch{n=null}return n}}let Te=null;function Et(e){Te=e}let Pe=null;function Rt(e){const t={alive:!0},n=new Map,s=pt(e,t),a=gt({setTimeout:(S,L)=>window.setTimeout(S,L),clearTimeout:S=>window.clearTimeout(S),setInterval:(S,L)=>window.setInterval(S,L),clearInterval:S=>window.clearInterval(S),requestAnimationFrame:S=>window.requestAnimationFrame(S),cancelAnimationFrame:S=>window.cancelAnimationFrame(S),now:()=>performance.now()}),u=new WeakSet,i=(S,L)=>{u.has(S)||(u.add(S),a.recordInput?.(L))};e===k&&(Pe=a);const g=K(e),h=St(e,a.schedulers),y=ue("localStorage"),w=ue("sessionStorage");let d,p;const I=me(de(window,()=>!0,{page:g,role:"window"}),s,{execute:S=>$(e,S),realmId:e,recordInput:i,role:"window",schedulers:h,self:()=>d,document:()=>p,localStorage:y,sessionStorage:w,isolateExpandos:!0});d=I.proxy;const T=me(de(document,()=>!0,{page:g,role:"document"}),s,{execute:S=>$(e,S),realmId:e,recordInput:i,role:"document",self:()=>d});return p=T.proxy,{moduleUrls:n,live:t,loop:a,document:T,localStorage:y,sessionStorage:w,window:I,public:{recordModuleUrl(S){t.alive&&n.set(new URL(S).pathname,S)},console:bt(e),document:p,globalThis:d,timers:h,window:d}}}function Y(e=k){let t=F.get(e);return t||(t=Rt(e),F.set(e,t)),t.public}function It(e){return[...F.get(e)?.moduleUrls.values()??[]]}function dn(e){const t=F.get(e);if(!t)return null;const n={reads:0,writes:0};return{globals:t.window.expandoCount(),mountId:e,loop:t.loop.stats(),listeners:{document:t.document.count(),window:t.window.count()},storage:{local:t.localStorage()?.stats()??n,session:t.sessionStorage()?.stats()??n}}}function Tt(e=k){U.delete(e),H.get(e)?.reset(),e!==k&&H.delete(e);const n=F.get(e);if(!n)return{mountId:e,listeners:0,timers:{timeouts:0,intervals:0,animationFrames:0,parkedCallbacks:0}};F.delete(e),n.moduleUrls.clear(),n.live.alive=!1;const s=n.document.dispose()+n.window.dispose(),a=n.loop.dispose?.()??{timeouts:0,intervals:0,animationFrames:0,parkedCallbacks:0};return e===k&&Ce(),{mountId:e,listeners:s,timers:a}}function fn(e,t=k){U.set(t,e)}function de(e,t,n){const s=new Map,a=Se(t),u=()=>n?.page.surface??null,i=()=>n?.role==="window"&&n.page.surface?n.page:null,g=(l,f,o)=>{const r=i();if(r&&l==="resize"&&f!==null){r.addResizeListener(f,o);return}if((l==="load"||l==="DOMContentLoaded"||l==="pageshow")&&f!==null&&document.readyState==="complete"){window.setTimeout(()=>{const c=new Event(l);typeof f=="function"?f.call(p,c):f.handleEvent(c)},0);return}if(j.has(l)&&f!==null){let c=s.get(l);c||(c=new Map,s.set(l,c));const v=f;let b=c.get(v);b||(b=function(m){if(!a(l,m))return typeof v=="function"?v.call(this,m):v.handleEvent(m)},c.set(v,b)),e.addEventListener(l,b,o);return}e.addEventListener(l,f,o)},h=(l,f,o)=>{const r=i();if(r&&l==="resize"&&f!==null){r.removeResizeListener(f,o);return}if(j.has(l)&&f!==null){const c=s.get(l),v=c?.get(f);if(v){c?.delete(f),e.removeEventListener(l,v,o);return}}e.removeEventListener(l,f,o)},y=new WeakMap,w=l=>{if(typeof l!="string"||!l.startsWith("on"))return null;const f=l.slice(2);return j.has(f)?f:null},d=l=>{console.error(dt(l))};let p;const I=()=>{const l=Reflect.get(e,"location",e);if(!l||!n)return null;const f=le.get(n.page);if(f?.source===l)return{value:f.view};const o=ut(l,d,{reloadGame:()=>{const r=Te;return r?(r(),!0):!1}});return le.set(n.page,{source:l,view:o}),{value:o}},T=l=>{const f=i();if(!f)return null;if(l==="window"||l==="self"||l==="top"||l==="parent")return{value:p};if(l!=="innerWidth"&&l!=="outerWidth"&&l!=="innerHeight"&&l!=="outerHeight")return null;const o=f.viewport();return o?l==="innerWidth"||l==="outerWidth"?{value:o.width}:l==="innerHeight"||l==="outerHeight"?{value:o.height}:null:null},S=l=>{if(!n)return null;if(l==="location")return I();if(n.role==="document"){const f=u();if(f&&(l==="body"||l==="documentElement"))return{value:f};if(f&&l==="head")return{value:n.page.head()};if(f&&l==="title")return{value:n.page.title};if(f&&l==="currentScript")return{value:n.page.currentScript};if(f&&l==="activeElement"){const o=Reflect.get(e,"activeElement",e);return{value:o&&f.contains(o)?o:f}}}return T(l)},L=l=>{if(n?.role!=="document"||typeof l!="string")return;const f=u();if(!f)return;const o=e;if(l==="querySelector")return r=>r.trim().toLowerCase()==="head"?n.page.head():f.matches(r)?f:f.querySelector(r);if(l==="querySelectorAll")return f.querySelectorAll.bind(f);if(l==="getElementById")return r=>{const c=o.getElementById(r);return c&&f.contains(c)?c:null};if(l==="getElementsByClassName")return f.getElementsByClassName.bind(f);if(l==="getElementsByTagName")return r=>{if(r.toLowerCase()!=="head")return f.getElementsByTagName(r);const c=n.page.head();return c?Object.assign([c],{item:v=>v===0?c:null,namedItem:v=>c.id===v?c:null}):[]};if(l==="elementFromPoint"||l==="elementsFromPoint")return(r,c)=>{const v=f.getBoundingClientRect(),m=o[l].bind(o)(r+v.left,c+v.top);return Array.isArray(m)?m.filter(_=>f.contains(_)):m&&f.contains(m)?m:null}};return p=new Proxy(e,{get(l,f){if(f==="addEventListener")return g;if(f==="removeEventListener")return h;const o=S(f);if(o)return o.value;const r=L(f);if(r)return r;if(typeof f=="string"&&Ee.has(f)){const v=V;if(v)return v.schedulers[f]}const c=Reflect.get(l,f,l);return typeof c!="function"?c:y.get(c)??Re(c,l)},set(l,f,o){if(f==="location"&&n)return d(`${n.role}.location = ${String(o)}`),!0;if(n?.role==="document"&&f==="title"&&n.page.surface)return n.page.title=String(o),!0;if(w(f)!==null&&typeof o=="function"){const c=o,v=function(b){if(t())return c.call(this,b)};return y.set(v,c),Reflect.set(l,f,v,l)}if(f==="onload"&&typeof o=="function"&&document.readyState==="complete"){const c=o;return window.setTimeout(()=>c.call(p,new Event("load")),0),!0}return Reflect.set(l,f,o,l)}}),p}function fe(e){return typeof e=="boolean"?e:e?.capture??!1}function me(e,t,n){const s=n.execute??(o=>o()),a=[],u=Se(t);let i=!1,g=!1;const h=o=>{if(g)return;g=!0;const r=n.realmId?`"${n.realmId}"`:"the default realm";console.warn(`vgai: a stopped game tried to register ${o} on its ${n.role} after its realm (${r}) was reclaimed; refused. Later refusals in this generation are silent.`)},y=new Map,w=new Map,d=new WeakMap;let p;const I=o=>n.role==="window"&&n.self&&(o===e||typeof window<"u"&&o===window)?n.self():n.document&&(o===n.document()||typeof document<"u"&&o===document)?n.document():o,T=o=>{const r=d.get(o);if(r)return r;const c=new Proxy(o,{get(v,b){if(b==="currentTarget")return p;if(b==="target"||b==="srcElement"){const _=Reflect.get(v,b,v);return _===v.currentTarget?p:I(_)}if(b==="view")return I(Reflect.get(v,b,v));if(b==="composedPath")return()=>v.composedPath().map(I);const m=Reflect.get(v,b,v);return typeof m=="function"?m.bind(v):m}});return d.set(o,c),c},S=o=>{const r=a.indexOf(o);r!==-1&&a.splice(r,1),e.removeEventListener(o.type,o.actual,o.capture),o.abort?.signal.removeEventListener("abort",o.abort.handler)},L=(o,r,c)=>{if(r===null)return;if(i){h(`a "${o}" listener`);return}const v=fe(c),b=c&&typeof c!="boolean"?c.signal:void 0;if(b?.aborted||a.some(R=>R.type===o&&R.original===r&&R.capture===v))return;let m;const _=function(R){if(c&&typeof c!="boolean"&&c.once){const C=a.indexOf(m);C!==-1&&a.splice(C,1),m.abort?.signal.removeEventListener("abort",m.abort.handler)}if(j.has(o)){const C=u(o,R);if(n.recordInput?.(R,C),C)return}const A=T(R);return s(()=>typeof r=="function"?r.call(p,A):r.handleEvent(A))},E=()=>S(m);m={type:o,original:r,actual:_,capture:v,...b?{abort:{signal:b,handler:E}}:{}},a.push(m),e.addEventListener(o,_,c),b?.addEventListener("abort",E,{once:!0}),(o==="load"||o==="DOMContentLoaded"||o==="pageshow")&&document.readyState==="complete"&&window.setTimeout(()=>{!i&&a.includes(m)&&_.call(e,new Event(o))},0)},l=(o,r,c)=>{if(r===null)return;const v=fe(c),b=a.find(m=>m.type===o&&m.original===r&&m.capture===v);b?S(b):e.removeEventListener(o,r,c)},f=o=>typeof o=="string"&&o.startsWith("on")&&o.length>2?o.slice(2):null;return p=new Proxy(e,{get(o,r){if(r==="addEventListener")return L;if(r==="removeEventListener")return l;const c=w.get(r);if(c)return c.original;if(n.self&&(n.role==="window"&&(r==="window"||r==="self"||r==="frames"||r==="top"||r==="parent")||n.role==="document"&&r==="defaultView"))return n.self();if(n.role==="window"&&r==="document"&&n.document)return n.document();if(n.role==="window"&&r==="globalThis"&&n.self)return n.self();if(n.role==="window"&&r==="localStorage"&&n.localStorage)return n.localStorage()?.storage;if(n.role==="window"&&r==="sessionStorage"&&n.sessionStorage)return n.sessionStorage()?.storage;if(typeof r=="string"&&Ee.has(r)&&n.schedulers)return n.schedulers[r];const v=y.get(r);if(v)return v.get?v.get.call(p):v.value;const b=Reflect.get(o,r,o);return typeof b!="function"?b:Re(b,o)},set(o,r,c){if(r==="location")return Reflect.set(o,r,c,o);if(n.role==="window"&&(r==="document"||r==="globalThis"||r==="localStorage"||r==="sessionStorage"))return!0;const v=f(r);if(v){if(i)return h(`an "${String(r)}" handler`),!0;const b=w.get(r);if(b&&(e.removeEventListener(b.type,b.actual),w.delete(r)),typeof c!="function")return!0;const m=c,_=(v==="load"||v==="DOMContentLoaded"||v==="pageshow")&&document.readyState==="complete",E=function(R){if(j.has(v)){const C=u(v,R);if(n.recordInput?.(R,C),C)return}const A=s(()=>m.call(p,T(R)));return A===!1&&R.preventDefault(),A};return w.set(r,{type:v,original:m,actual:E}),e.addEventListener(v,E),_&&window.setTimeout(()=>{!i&&w.get(r)?.actual===E&&E.call(e,new Event(v))},0),!0}return n.isolateExpandos?(y.set(r,{configurable:!0,enumerable:!0,value:c,writable:!0}),!0):Reflect.set(o,r,c,o)},defineProperty(o,r,c){return n.isolateExpandos?Reflect.getOwnPropertyDescriptor(o,r)?.configurable===!1?!1:(y.set(r,{...c,configurable:!0,enumerable:c.enumerable??!0}),!0):Reflect.defineProperty(o,r,c)},deleteProperty(o,r){return y.delete(r)?!0:n.isolateExpandos?Reflect.getOwnPropertyDescriptor(o,r)?.configurable!==!1:Reflect.deleteProperty(o,r)},has(o,r){return y.has(r)||Reflect.has(o,r)},ownKeys(o){const r=new Set(Reflect.ownKeys(o));for(const c of y.keys())typeof c!="number"&&r.add(c);return[...r]},getOwnPropertyDescriptor(o,r){const c=Reflect.getOwnPropertyDescriptor(o,r);return c?.configurable===!1?c:y.get(r)??c}}),{proxy:p,count:()=>a.length+w.size,expandoCount:()=>y.size,dispose(){for(const r of u.outstandingReleases()){for(const c of[...a])c.type===r.type&&c.actual.call(p,r);for(const c of w.values())c.type===r.type&&c.actual.call(p,r)}i=!0;const o=a.length+w.size;for(const r of[...a])S(r);for(const r of w.values())e.removeEventListener(r.type,r.actual);return w.clear(),y.clear(),o}}}let W=!1;function Ce(){if(!W)return;const e=globalThis,t=Y();V=Pe,e.__vgaiGameTimers=t.timers,e.__vgaiGameWindow=t.window,e.__vgaiGameDocument=t.document,e.__vgaiGameConsole=t.console}function mn(){if(W||typeof window>"u"||typeof document>"u")return;W=!0;const e=globalThis;He(),e.__vgaiGameModuleUrls=It,e.__vgaiGameRealm=t=>(M.push(t),queueMicrotask(()=>{const n=M.lastIndexOf(t);n>=0&&M.splice(n,1)}),Y(t)),Ce()}function Q(e,t){const n=Tt(e),s=n.timers.timeouts+n.timers.intervals+n.timers.animationFrames+n.timers.parkedCallbacks;if(n.listeners===0&&s===0)return;const a=[];n.listeners>0&&a.push(`${n.listeners} window/document listener${n.listeners===1?"":"s"}`),s>0&&a.push(`${s} timer/frame callback${s===1?"":"s"}`),P.logStructured("warn",`${t} stopped without releasing ${a.join(" and ")}; the editor reclaimed them.`,"environment",void 0,{instanceId:e,instanceName:t})}function Ae(e=typeof window>"u"?null:window){const t=e?.vgaiGame;return!t||t.contractVersion!==1?null:t}const Pt=Object.entries(Oe).filter(([,e])=>!e.optional).map(([e])=>e);function Le(e){const t=e?.scenes;if(t==null)return{scenes:null,malformed:null};if(typeof t!="object")return{scenes:null,malformed:`declared as ${typeof t}; expected an object with list(), current() and goTo()`};const n=Pt.filter(s=>typeof t[s]!="function");return n.length>0?{scenes:null,malformed:`declared a scenes surface missing required member(s): ${n.join(", ")}`}:{scenes:t,malformed:null}}function Ct(e){const t=e?.ready;if(t==null)return{ready:null,malformed:null};if(typeof t=="function"){const n=t;return{ready:()=>Promise.resolve(n()),malformed:null}}if(typeof t.then=="function"){const n=t;return{ready:()=>Promise.resolve(n),malformed:null}}return{ready:null,malformed:`declared \`ready\` as ${typeof t}; expected a promise or a function returning one`}}function At(e){const t=e?.world;return t==null?{world:null,malformed:null}:typeof t!="object"||t.isScene!==!0?{world:null,malformed:`declared \`world\` as ${typeof t}; expected the game's own THREE.Scene`}:{world:t,malformed:null}}function Lt(e){const t=e?.presentation;if(t==null)return{canvas:null,malformed:null};const n=t;return typeof n!="object"||n.tagName!=="CANVAS"||typeof n.getContext!="function"?{canvas:null,malformed:`declared \`presentation\` as ${typeof t=="object"?String(n.tagName??"object"):typeof t}; expected the game's own <canvas> element`}:{canvas:t,malformed:null}}const gn=Object.freeze(Object.defineProperty({__proto__:null,readGameContract:Ae,readGamePresentation:Lt,readGameReady:Ct,readGameScenes:Le,readGameWorld:At},Symbol.toStringTag,{value:"Module"}));function kt(e){if(!Array.isArray(e))throw new Error("scenes.list() did not return an array");const t=new Set;for(const n of e){if(typeof n!="object"||n===null||typeof n.id!="string"||n.id.trim().length===0||typeof n.label!="string"||n.label.trim().length===0)throw new Error("scenes.list() returned an invalid { id, label } scene");if(t.has(n.id))throw new Error(`scenes.list() returned duplicate id "${n.id}"`);t.add(n.id)}return e}function xt(e){return typeof e?.goToScene=="function"}function hn(e,t={}){const{scenes:n,malformed:s}=Le(e);if(s!==null&&P.warn(`Ignored the game contract's \`scenes\` surface: ${s}`,"ingest"),!n)return null;let a=!1;const u=()=>{try{return kt(n.list())}catch(g){return a||(a=!0,P.warn(`Ignored invalid game-contract scenes: ${g instanceof Error?g.message:String(g)}`,"ingest")),[]}},i=g=>{const h=u().map(w=>w.id);return h.includes(g)?(t.onSwitchAccepted?.(g),{ok:!0,settled:(async()=>{try{return await n.goTo(g),{requested:g,current:n.current()}}catch(w){return{requested:g,current:n.current(),error:w instanceof Error?w.message:String(w)}}})()}):{ok:!1,error:`scenes.goTo: "${g}" is not one of this game's scenes (${h.length>0?h.join(", "):"it lists none"}).`,known:h}};return{title:"Scenes",storiesFor:g=>u().map(({id:h,label:y})=>({id:h,label:y})),active:g=>n.current(),goToScene:i,apply:(g,h)=>{if(h===null){P.warn("This game’s scenes cannot be cleared: it is always in one of its own scenes. Pick the scene to switch to instead.","ingest");return}const y=i(h);if(!y.ok){P.warn(`${y.error} — ignoring.`,"ingest");return}y.settled.then(w=>{w.error!==void 0&&P.error(`scenes.goTo("${h}") failed: ${w.error}`,"ingest")})}}}function Gt(){const e=G();if(!e)return null;const n=(()=>{switch(e.kind){case"canvas":return e.session.adapter;case"dom":return e.session.adapter;case"three":return e.session.mount?.authoring}})()?.stories;return xt(n)?n:null}let J=!1;function ge(){return J}function wn(){J=!0}function vn(){J=!1}let D=null,x=null;function yn(e){D=e,e||X()}function pn(){D=null,X()}function X(){const e=x;x=null,e&&(clearTimeout(e.timer),e.settle(null))}function ke(){const e=D?.renderer.domElement;return typeof e=="object"&&e!==null?e:null}function _n(){const e=x;if(!(!e||!D))try{const t=D.renderer;if(typeof t.getRenderTarget=="function"&&t.getRenderTarget()!==null)return;const n=ke();if(!n||n.width===0||n.height===0)return;const s=e.image??n.ownerDocument.createElement("canvas");s.width=n.width,s.height=n.height;const a=s.getContext("2d");if(!a||(a.drawImage(n,0,0),e.image=s,e.delivering))return;e.delivering=!0,setTimeout(()=>{x===e&&(x=null,clearTimeout(e.timer),e.settle(e.image))},0)}catch{}}function Mt(e=2e3){return D?(X(),new Promise(t=>{const n=setTimeout(()=>{x?.timer===n&&(x=null),t(null)},e);x={settle:t,timer:n,image:null,delivering:!1}})):Promise.resolve(null)}const $t={play:e=>(e.play(),"driven"),resume:e=>(e.resume(),"driven"),stop:(e,t)=>t?.stopEndsRun?"declined":(e.pause(),"driven"),pause:e=>(e.pause(),"driven"),step:e=>e.canStep?(e.step(),"driven"):{ok:!1,error:"this ingested game cannot be stepped — no serve-time loop gate measured control over its frames, so a single-frame step would be a button that lies (see ingest/same-realm-loop-gate.ts)"}};function Ft(e,t,n){if(!ze(t))return null;const s=$t[t](e,n);return s==="declined"?null:s!=="driven"?s:{ok:!0,data:{ingest:!0,playing:e.playing}}}function Ht(){return Y().window}function Z(){return typeof window>"u"?null:Ae(Ht())}let ee=!1;function Dt(){return ee}function N(e){ee=e}function zt(){N(!1);const e=window;delete e.__vgaiMountCold,delete e.__vgaiIngestPlayed}function he(e,t,n){const s=(a,u)=>je({seam:`contract.lifecycle.${t}`,subject:"game",epoch:qe(e),stage:"effect",outcome:a,source:"consumer",detail:u});try{n(),s("pass",`the mounted ingest lifecycle consumed lifecycle.${t}`)}catch(a){throw s("fail",`lifecycle.${t} failed: ${a instanceof Error?a.message:String(a)}`),a}}function Sn(e={}){const t=Z(),n=t?.lifecycle,s=()=>{if(t&&n?.start){he(t,"start",()=>n.start?.());return}window.dispatchEvent(new CustomEvent("vgai:ingest-play"))},a=typeof n?.pause=="function",u=typeof n?.resume=="function";return t&&a!==u?{start:s,pauseGap:a?"the game contract declares lifecycle.pause without lifecycle.resume":"the game contract declares lifecycle.resume without lifecycle.pause"}:t&&a&&u?{start:s,setPaused:i=>he(t,i?"pause":"resume",()=>{i?n?.pause?.():n?.resume?.()})}:e.setPaused?{start:s,setPaused:e.setPaused,...e.step?{step:e.step}:{},...e.canStep?{canStep:e.canStep}:{}}:{start:s,pauseGap:e.pauseGap??"the game declares no lifecycle.pause/resume pair and its mounted adapter exposes no setPaused capability"}}function bn(){const e=G();return e?e.session.lifecycle.pauseGap??null:null}function we(e){const t=G();if(t)for(const n of t.siblings)try{n.setPaused?.(e)}catch(s){P.error(`Composite sibling setPaused(${e}) failed: ${s}`,"ingest")}}function jt(){return Z()}function xe(){const e=G()?.session.lifecycle;if(!e?.setPaused)return null;const t=()=>{e.setPaused?.(!0),we(!0),N(!1)},n=()=>{e.setPaused?.(!1),we(!1),N(!0)};return{get playing(){return ee},play(){Ne();const s=window;if(s.__vgaiIngestPlayed)return n();s.__vgaiIngestPlayed=!0,e.start(),n()},pause:t,resume:n,canStep:!!e.step&&(e.canStep?.()??!0),step(){e.canStep?.()!==!1&&(e.step?.(),N(!1))}}}function En(e){const t=xe();return t?(t.pause(),!0):!1}const Nt=Ve(e=>{e.level==="warn"?P.warn(e.message,"ingest"):P.log(e.message,"ingest")});let Wt=0,Ge="";function Rn(e){Ge=`${e}#${++Wt}`}function In(e){const t=mt(e.realmLoopVerdict?.()),n=e.realmLoopVerdict?.()?.reason??null;return t!==null||n!==null?{loop:t,reason:n}:e.realmLoopVerdict?{loop:null,reason:null}:{loop:null,reason:Bt}}function Tn(){return{loop:null,reason:"⏸ calls the host runtime's own play pause on this route, but no probe has measured whether that reaches this game's frames — an unmodified React game that schedules its own timers is not held by the host loop"}}const Bt="this mount installs no loop gate, so no verdict will ever be measured here — nothing in the editor holds this game's frames";function Ot(e,t,n){const s=Ze(t?.systems,n),a=new Map(s.empty.map(i=>[i.slot,i.evidence])),u=new Map(s.malformed.map(i=>[i.slot,i.reason]));return Ye.map(i=>{if(e[i]!=null)return{slot:i,state:"bound",proof:We({slot:i,adapter:e[i],subject:"game"})};const g=a.get(i);if(g!==void 0)return{slot:i,state:"empty",evidence:g};const h=u.get(i);return h!==void 0?{slot:i,state:"malformed",evidence:h}:{slot:i,state:"unanswered"}})}function qt(){const e=Je();switch(e.state){case"absent":return null;case"loading":return{state:"loading"};case"ready":return{state:"ready",dataFile:e.writer.dataFile};default:return{state:"failed",reason:e.reason}}}function te(){const e=G(),t=e?.coverage;if(!e||!t)return null;const n=Qe(),s=t.loop(),a=jt();return Ue({worldId:e.worldId,reach:t.reach,surface:e.kind,reachMechanism:t.reachMechanism,loop:s.loop,loopReason:s.reason,contract:Ke(a),systemAdapters:Ot(pe(),a,e.kind),ownership:n?{writable:n.writable,reason:n.reason??null,recorder:n.recorder??null}:null,dataWriter:qt(),projectVerbs:[],writeReach:t.writeReach?.()??null})}function Pn(e){const t=G();if(!t)return;t.coverage=e;const n=te();n&&Nt.report(Ge,n)}function Cn(e,t){if(!t)return;const n=`Ingest "${e}" loop: ${t.loop} — ${t.reason}`;t.loop==="gated"?P.log(n,"ingest"):P.warn(n,"adapter")}const Vt=["hierarchy","selection","transforms","inspector","assetSubject","structure","persistence","pickable","rects","boxEdit","text","colorSample","stories","truth","assetDrop"];function Ut(e){return Vt.filter(t=>e[t]!==void 0)}function An(e){return{coverage:()=>te(),prepareCoverage:()=>Xe(),authoringProviders:()=>Ut(e),engineSystems:()=>Object.keys(pe())}}function Ln(e,t){Object.defineProperties(e,{loop:{enumerable:!0,get:()=>t.realmLoopVerdict?.()?.loop??null},loopReason:{enumerable:!0,get:()=>t.realmLoopVerdict?.()?.reason??null}}),e.realmLoopStats=()=>ht()?.stats()??null}function kn(e,t){const n=e,s=typeof n.querySelectorAll=="function"?n.querySelectorAll("*").length:t.nodeCount(),a=Object.keys(e).some(u=>u.startsWith("__reactContainer"));return{elementCount:s,hierarchyNodeCount:t.nodeCount(),reactRootPresent:a}}function xn(e,t){window[e]=t}function ne(e){delete window[e]}function Me(){Et(null);const e=G();if(e){Jt(null),zt();try{Z()?.lifecycle?.dispose?.()}catch(t){P.error(`The game's own lifecycle.dispose threw at teardown: ${t}`,"ingest")}for(let t=e.siblings.length-1;t>=0;t--)try{e.siblings[t].dispose()}catch(n){P.error(`Composite sibling dispose failed: ${n}`,"ingest")}switch(e.kind){case"three":Kt(e.session);return;case"canvas":Yt(e.session);return;case"dom":Qt(e.session);return}}}function Kt(e){if(e.mount?.authoring&&e.mount.authoring.dispose?.(),B(null),O(null),q(),e.resizeObserver?.disconnect(),e.inputGateUnsubscribe?.(),e.mount)try{e.store.exitPlayScene()}catch{}e.store.setPlayState("stopped");try{e.mount?.game.dispose()}catch{}Q("","The ingested game"),ne("__vgaiIngest"),P.log("Ingest root unmounted","ingest")}function Yt(e){e.adapter&&e.adapter.dispose(),B(null),O(null),q(),e.store.setPlayState("stopped");try{e.dispose()}catch{}Q("","The ingested canvas game"),ne("__vgaiIngest2D"),P.log("canvas ingest root unmounted","ingest")}function Qt(e){e.adapter.dispose(),B(null),O(null),q(),e.store.setPlayState("stopped");try{e.stop()}catch{}Q("","The ingested DOM game"),ne("__vgaiIngestReact"),P.log("DOM ingest root unmounted","ingest")}function Gn(){G()?.kind==="three"&&Me()}let z=null;function G(){return z}function Jt(e){z=e}function $e(){return z?.kind??null}function ve(){return $e()!==null}function Mn(e){z&&(z.siblings=[...e])}let ye=Promise.resolve();function $n(e){const t=ye.then(e);return ye=t.then(()=>{},()=>{}),t}Be({id:"ingest",priority:1,mounted:ve,playing:()=>Dt()||ge(),stop:Me,instanceContainer:()=>null,frameCanvas:ke,snapshotFrame:()=>Mt(),command:e=>{const t=ve()?xe():null;return t?Ft(t,e.type,{stopEndsRun:ge()}):null},scenes:Gt,surface:$e,coverage:te,authoringRefusal:()=>z?.kind==="dom"?"This is an ingested native-React game: its components render directly as a DOM layer under the host React — there is no scene graph or renderer to introspect, and authoring is deliberately off for react ingests (the editor never writes JSX back into an unmodified game). The game is hosted, sized, and disposed; play it in the Game tab.":null});export{ln as $,un as A,an as B,Ct as C,Z as D,cn as E,Lt as F,rn as G,Ht as H,on as I,pn as J,ht as K,At as L,Rn as M,N,Cn as O,In as P,Ln as Q,Gt as R,hn as S,Bt as T,Q as U,mn as V,_t as W,dn as X,yn as Y,_n as Z,sn as _,G as a,et as a0,ie as a1,gn as a2,wn as b,Me as c,ge as d,vn as e,bn as f,xe as g,En as h,ve as i,Sn as j,Jt as k,fn as l,Tn as m,kn as n,An as o,xn as p,mt as q,Pn as r,$n as s,te as t,Dt as u,zt as v,Mn as w,$e as x,Gn as y,jt as z};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/game-css-scope-transform-NbpajQr-.js","assets/_commonjsHelpers-D6-XlEtG.js","assets/index-Ckxb31Yz.js","assets/index-nmcBqr7Y.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/three.module-IFn-4i31.js","assets/index-B4bmKkgY.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as oe,ly as Fe,mv as He,mw as De,X as P,mx as ze,jM as je,J as Ne,ae as pe,kX as Be,co as W,cp as O,cq as q,ct as We}from"./index-Ckxb31Yz.js";import{GAME_SCENES_SHAPE as Oe}from"./game-contract-seams-TCpIMmHP.js";import{g as qe,c as Ve,d as Ue,e as Ke,S as Ye}from"./capability-coverage-CfUeULDN.js";import{i as Je,b as Qe,l as Xe}from"./ingest-source-persistence-DH6ioCOu.js";import{p as Ze}from"./playtest-BnFenMBW.js";const rn="contain: layout; font: initial; color: initial; letter-spacing: normal; word-spacing: normal; text-align: start; text-indent: 0; text-transform: none; white-space: normal; direction: ltr; cursor: auto; visibility: visible;";function ae(e){return typeof e=="boolean"?e:e?.capture??!1}const ie="vgaiScopedCss";let le=null;function et(){return le??=Promise.all([oe(()=>import("./game-css-scope-transform-NbpajQr-.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),oe(()=>import("./index-Ckxb31Yz.js").then(e=>e.u5),__vite__mapDeps([2,3,1,4,5,6,7,8,9,10,11]))]).then(([{scopeGameCss:e},{GAME_CSS_SCOPE_SELECTOR:t}])=>n=>e({css:n,scopeSelector:t,styleSheetPath:"/"})),le}function tt(e){let t=null;const n=()=>et().then(i=>{t=i}),s=i=>{const g=i.textContent??"";if(g.length===0||i.dataset[ie]===g)return;if(!t){const y=g;i.textContent="",n().then(()=>{i.isConnected&&(i.textContent??"")===""&&(i.textContent=y,s(i))});return}let h;try{h=t(g)}catch{i.textContent="";return}i.dataset[ie]=h,i.textContent=h},a=i=>{if(i instanceof HTMLStyleElement)return i;const g=i.parentElement;return g instanceof HTMLStyleElement?g:null},u=new MutationObserver(i=>{const g=new Set;for(const h of i)if(h.type==="childList")for(const y of h.addedNodes){const w=a(y);if(w)g.add(w);else if(y instanceof Element)for(const d of y.querySelectorAll("style"))g.add(d)}else if(h.type==="characterData"){const y=a(h.target);y&&g.add(y)}for(const h of g)h.isConnected&&s(h)});u.observe(e,{childList:!0,subtree:!0,characterData:!0});for(const i of e.querySelectorAll("style"))s(i);return u}class nt{surfaceElement=null;injectedStyles=null;get surface(){return this.surfaceElement}set surface(t){this.injectedStyles?.disconnect(),this.injectedStyles=null,this.surfaceElement=t,t&&(this.injectedStyles=tt(t))}pageTitle="";executingClassicScript=null;headElement=null;resizeBus=new EventTarget;resizeListeners=new Map;addResizeListener(t,n){let s=this.resizeListeners.get(t);s||(s=new Set,this.resizeListeners.set(t,s)),s.add(ae(n)),this.resizeBus.addEventListener("resize",t,n)}removeResizeListener(t,n){const s=this.resizeListeners.get(t);s&&(s.delete(ae(n)),s.size===0&&this.resizeListeners.delete(t)),this.resizeBus.removeEventListener("resize",t,n)}get gameResizesItself(){return this.resizeListeners.size>0}reset(){this.headElement?.remove(),this.headElement=null,this.pageTitle="",this.executingClassicScript=null,this.surface=null,this.resizeListeners.clear(),this.resizeBus=new EventTarget}dispatchResize(){this.resizeBus.dispatchEvent(new Event("resize"))}viewport(){const t=this.surface;return t?{width:t.clientWidth,height:t.clientHeight}:null}get title(){return this.pageTitle}set title(t){this.pageTitle=String(t)}get currentScript(){return this.executingClassicScript}withCurrentScript(t,n){const s=this.executingClassicScript,a=document.createElement("script");a.src=t,this.executingClassicScript=a;try{return n()}finally{this.executingClassicScript=s}}head(){const t=this.surface;if(!t)return null;if(!this.headElement||this.headElement.parentElement!==t){const n=document.createElement("div");n.dataset.vgaiGameHead="",n.hidden=!0,t.prepend(n),this.headElement=n}return this.headElement}}function rt(e){const t=`(__vgaiHost.__vgaiGameRealm?__vgaiHost.__vgaiGameRealm(${JSON.stringify("")}):null)`;return st.replace("__VGAI_REALM__",t)}const st=`const __vgaiHost=({}).constructor.constructor('return globalThis')(),__vgaiR=__VGAI_REALM__,__vgaiGlobal=((__vgaiR&&__vgaiR.globalThis)||__vgaiHost.__vgaiGameWindow||__vgaiHost),globalThis=__vgaiGlobal,__vgaiSched=((__vgaiR&&__vgaiR.timers)||__vgaiHost.__vgaiGameTimers||__vgaiHost),__vgaiBind=function(n){var f=__vgaiSched[n];return typeof f==='function'?f.bind(__vgaiSched):f;},console=((__vgaiR&&__vgaiR.console)||__vgaiHost.__vgaiGameConsole||__vgaiHost.console),window=((__vgaiR&&__vgaiR.window)||__vgaiHost.__vgaiGameWindow||__vgaiGlobal.window),document=((__vgaiR&&__vgaiR.document)||__vgaiHost.__vgaiGameDocument||__vgaiGlobal.document),__vgaiWindowBind=function(n){var f=window&&window[n];return typeof f==='function'?f.bind(window):f;},localStorage=(window&&window.localStorage),sessionStorage=(window&&window.sessionStorage),location=(window&&window.location),addEventListener=__vgaiWindowBind('addEventListener'),removeEventListener=__vgaiWindowBind('removeEventListener'),dispatchEvent=__vgaiWindowBind('dispatchEvent'),fetch=function(){var f=__vgaiHost.__vgaiProjectFetch;return f?f.apply(null,arguments):__vgaiHost.fetch.apply(__vgaiHost,arguments)},setTimeout=__vgaiBind('setTimeout'),clearTimeout=__vgaiBind('clearTimeout'),setInterval=__vgaiBind('setInterval'),clearInterval=__vgaiBind('clearInterval'),requestAnimationFrame=__vgaiBind('requestAnimationFrame'),cancelAnimationFrame=__vgaiBind('cancelAnimationFrame');
|
|
3
|
+
`,sn=rt(),ot=new Set(["href","protocol","host","hostname","port","pathname","search"]),at=new Set(["assign","replace","reload"]),it=new Set(["play","project","hub","scene","ingest","create-from","checkout_id"]);function lt(e){return it.has(e)||e.startsWith("vgai")}function _e(e){const t=e.startsWith("?")?e.slice(1):e;if(!t)return"";const n=new URLSearchParams;for(const[a,u]of new URLSearchParams(t))lt(a)||n.append(a,u);const s=n.toString();return s.length>0?`?${s}`:""}function ct(e){try{const t=new URL(e);return t.search=_e(t.search),t.href}catch{return e}}function ut(e,t,n){const s=Object.create(null);return new Proxy(s,{get(a,u){if(typeof u=="string"&&at.has(u))return(...g)=>{u==="reload"&&n?.reloadGame?.()||t(`location.${u}(${g.map(h=>String(h)).join(", ")})`)};if(u==="search")return _e(String(Reflect.get(e,"search")??""));if(u==="href")return ct(String(Reflect.get(e,"href")??""));const i=Reflect.get(e,u);return typeof i=="function"?i.bind(e):i},set(a,u,i){return typeof u=="string"&&ot.has(u)?(t(`location.${u} = ${String(i)}`),!0):Reflect.set(e,u,i)},has(a,u){return Reflect.has(e,u)}})}function dt(e){return`Ingested game attempted to navigate the editor away (${e}) — refused. A game running in-realm shares the editor's document, so leaving it would take the whole session with it; game code sees a scoped \`location\` facade whose reads pass through and whose navigating writes do not (packages/editor/src/game-location-guard.ts).`}function ft(e){let t=0,n=0;const s=Object.create(Object.getPrototypeOf(e)),a=w=>(t+=1,e.getItem(String(w))),u=(w,d)=>{n+=1,e.setItem(String(w),String(d))},i=w=>{n+=1,e.removeItem(String(w))},g=()=>{n+=1,e.clear()},h=w=>(t+=1,e.key(Number(w)));return{storage:new Proxy(s,{get(w,d){return d==="length"?(t+=1,e.length):d==="getItem"?a:d==="setItem"?u:d==="removeItem"?i:d==="clear"?g:d==="key"?h:d===Symbol.toStringTag?"Storage":typeof d=="string"?a(d)??void 0:Reflect.get(s,d,s)},set(w,d,p){return typeof d!="string"?Reflect.set(s,d,p,s):(u(d,String(p)),!0)},deleteProperty(w,d){return typeof d!="string"?Reflect.deleteProperty(s,d):(i(d),!0)},defineProperty(w,d,p){return typeof d!="string"||!("value"in p)?!1:(u(d,String(p.value)),!0)},has(w,d){return typeof d!="string"?Reflect.has(s,d):d in s?!0:a(d)!==null},ownKeys(){const w=[];for(let d=0;d<e.length;d+=1){const p=e.key(d);p!==null&&w.push(p)}return w},getOwnPropertyDescriptor(w,d){if(typeof d!="string")return;const p=e.getItem(d);return p===null?void 0:{configurable:!0,enumerable:!0,value:p,writable:!0}}}),stats:()=>({reads:t,writes:n})}}function mt(e){return!e||e.loop!=="gated"&&e.loop!=="self-driven"?null:{verdict:e.loop,evidence:e.evidence}}function gt(e){let t="open",n=0,s=0,a=0,u=0,i=0,g=0,h=0,y=0,w=!1;const d=[],p=new Set,I=new Set,T=new Set,S=new Map,L=()=>(t==="held"?h:e.now())-y,c=m=>{a++,t==="held"&&u++;try{m.run()}catch(_){e.setTimeout(()=>{throw _},0)}},f=()=>{const m=d.splice(0,d.length);S.clear();for(const _ of m)c(_)},o=m=>{d.push(m)},r=m=>()=>{if(t==="held"){o(m);return}c(m)},l=()=>{t!=="held"&&(h=e.now(),t="held")},v=()=>{t==="held"&&(y+=e.now()-h)};return{schedulers:{setTimeout(m,_,...E){if(s++,w)return-1;const R={run:()=>m(...E)};let A=-1;const C=r(R);return A=e.setTimeout(()=>{p.delete(A),C()},_),p.add(A),R.timerId=A,A},clearTimeout(m){e.clearTimeout(m),p.delete(m);const _=d.findIndex(E=>E.timerId===m);_!==-1&&d.splice(_,1)},setInterval(m,_,...E){if(s++,w)return-1;let R=-1;const A=()=>{const C={run:()=>m(...E)};if(t==="held"){const re=S.get(R);if(re){const se=d.indexOf(re);se!==-1&&d.splice(se,1)}S.set(R,C),o(C);return}c(C)};return R=e.setInterval(A,_),I.add(R),R},clearInterval(m){e.clearInterval(m),I.delete(m);const _=S.get(m);if(_){S.delete(m);const E=d.indexOf(_);E!==-1&&d.splice(E,1)}},requestAnimationFrame(m){if(s++,w)return-1;const _={run:()=>m(L())};let E=-1;const R=r(_);return E=e.requestAnimationFrame(()=>{T.delete(E),R()}),T.add(E),_.frameId=E,E},cancelAnimationFrame(m){e.cancelAnimationFrame(m),T.delete(m);const _=d.findIndex(E=>E.frameId===m);_!==-1&&d.splice(_,1)}},hold:l,release(){w||(v(),t="open",f())},step(m=1){if(!w){for(v(),n=m>0?m:1,t="step";n>0&&d.length>0;)n--,f();t="held",h=e.now()}},stats(){return{mode:t,pending:d.length,requests:s,fired:a,firedWhileHeld:u,activeTimeouts:p.size,activeIntervals:I.size,activeAnimationFrames:T.size,input:i,inputBlocked:g}},recordInput(m){i++,m&&g++},dispose(){if(w)return{timeouts:0,intervals:0,animationFrames:0,parkedCallbacks:0};w=!0;const m={timeouts:p.size,intervals:I.size,animationFrames:T.size,parkedCallbacks:d.length};for(const _ of p)e.clearTimeout(_);for(const _ of I)e.clearInterval(_);for(const _ of T)e.cancelAnimationFrame(_);return p.clear(),I.clear(),T.clear(),d.length=0,S.clear(),n=0,t="held",h=e.now(),m}}}async function on(e){const t=e.windowMs??1500,n=Math.max(1,Math.min(e.sampleMs??50,t)),s=e.sleep??(I=>new Promise(T=>setTimeout(T,I))),a=e.gate;if(!a)return{loop:"self-driven",reason:"no same-realm loop gate is installed, so nothing here controls this game’s scheduling",evidence:{pendingWhileHeld:0,firedWhileHeld:0,progressBefore:0,progressAfter:0,windowMs:t}};const u=a.stats(),i=e.progress();let g=u,h=i,y=u.pending,w=u.mode==="held";for(let I=0;I<t;I+=n)if(await s(Math.min(n,t-I)),g=a.stats(),h=e.progress(),y=Math.max(y,g.pending),g.mode!=="held"){w=!1;break}const d=g.firedWhileHeld-u.firedWhileHeld,p={pendingWhileHeld:y,firedWhileHeld:d,progressBefore:i,progressAfter:h,windowMs:t};return!w||g.mode!=="held"?{loop:"unmeasured",reason:"the gate was not held for the whole probe window — something else released it, so control was not measured",evidence:p}:d>0?{loop:"self-driven",reason:`${d} gated callback(s) ran while the gate was held — the gate leaked, so it cannot claim control`,evidence:p}:h>i?{loop:"self-driven",reason:`the game kept rendering while its scheduling was withheld (frame ${i} → ${h} in ${t}ms) — something outside this gate drives its loop`,evidence:p}:y===0?{loop:"unmeasured",reason:"nothing was due while the gate was held, so it withheld nothing and the probe learned nothing about this loop — note a hidden or backgrounded tab schedules no frames at all, which is a fact about the TAB, never about the game",evidence:p}:{loop:"gated",reason:`verified: ${y} scheduled callback(s) withheld, none ran, and no frame advanced in ${t}ms of held time`,evidence:p}}let V=null;function ht(){return V}const j=new Set(["keydown","keyup","keypress","mousedown","mouseup","mousemove","click","dblclick","contextmenu","wheel","pointerdown","pointerup","pointermove","pointercancel","touchstart","touchmove","touchend","touchcancel"]);function Se(e){const t=new Set,n=new WeakSet,s=((a,u)=>{const i=vt(a,u),g=yt(a,u);if(e()){for(const y of i)t.add(y);for(const y of g)t.delete(y);return!1}if(n.has(u))return!1;let h=!1;for(const y of g)t.delete(y)&&(h=!0);return h&&n.add(u),!h});return s.outstandingReleases=()=>{const a=[];for(const u of t){const i=u.indexOf(":"),g=u.slice(0,i),h=u.slice(i+1);g==="key"?a.push(new KeyboardEvent("keyup",{code:h,key:wt(h),bubbles:!0})):g==="mouse"?a.push(new MouseEvent("mouseup",{button:Number(h),bubbles:!0})):g==="pointer"&&typeof PointerEvent=="function"&&a.push(new PointerEvent("pointerup",{pointerId:Number(h),bubbles:!0}))}return a},s}function wt(e){const t=/^Key([A-Z])$/.exec(e);if(t)return t[1].toLowerCase();const n=/^Digit(\d)$/.exec(e);return n?n[1]:e==="Space"?" ":e}function be(e){const t=e.changedTouches;return t?Array.from(t,n=>`touch:${n.identifier}`):["touch"]}function vt(e,t){switch(e){case"keydown":return[`key:${t.code}`];case"mousedown":return[`mouse:${t.button}`];case"pointerdown":return[`pointer:${t.pointerId}`];case"touchstart":return be(t);default:return[]}}function yt(e,t){switch(e){case"keyup":return[`key:${t.code}`];case"mouseup":return[`mouse:${t.button}`];case"pointerup":case"pointercancel":return[`pointer:${t.pointerId}`];case"touchend":case"touchcancel":return be(t);default:return[]}}const Ee=new Set(["setTimeout","clearTimeout","setInterval","clearInterval","requestAnimationFrame","cancelAnimationFrame"]);function Re(e,t){return typeof e!="function"||Object.hasOwn(e,"prototype")?e:e.bind(t)}const k="",F=new Map,U=new Map,H=new Map,ce=new WeakMap;function K(e){let t=H.get(e);return t||(t=new nt,H.set(e,t)),t}function an(e,t=k){const n=K(t);return n.surface=e,n}function ln(e=k){H.get(e)?.reset()}function cn(e=k){return K(e)}function un(){const e=[];for(const[t,n]of H)n.surface&&e.push({surface:n.surface,gate:Ie(t)});return e}function Ie(e){return()=>Fe()&&(U.get(e)??(()=>!0))()}function pt(e,t){const n=Ie(e);return()=>t.alive&&n()}const M=[];function _t(){return M[M.length-1]??null}De(_t);function $(e,t){M.push(e);try{return t()}finally{M.pop()}}function St(e,t){return{setTimeout(n,s,...a){return t.setTimeout((...u)=>$(e,()=>n(...u)),s,...a)},clearTimeout:n=>t.clearTimeout(n),setInterval(n,s,...a){return t.setInterval((...u)=>$(e,()=>n(...u)),s,...a)},clearInterval:n=>t.clearInterval(n),requestAnimationFrame(n){return t.requestAnimationFrame(s=>$(e,()=>n(s)))},cancelAnimationFrame:n=>t.cancelAnimationFrame(n)}}function bt(e){const t=new Map;return new Proxy(console,{get(n,s){const a=Reflect.get(n,s,n);if(typeof a!="function")return a;let u=t.get(s);return u||(u=(...i)=>$(e,()=>a.apply(n,i)),t.set(s,u)),u}})}function ue(e){let t=!1,n=null;return()=>{if(t)return n;t=!0;try{n=ft(window[e])}catch{n=null}return n}}let Te=null;function Et(e){Te=e}let Pe=null;function Rt(e){const t={alive:!0},n=new Map,s=pt(e,t),a=gt({setTimeout:(S,L)=>window.setTimeout(S,L),clearTimeout:S=>window.clearTimeout(S),setInterval:(S,L)=>window.setInterval(S,L),clearInterval:S=>window.clearInterval(S),requestAnimationFrame:S=>window.requestAnimationFrame(S),cancelAnimationFrame:S=>window.cancelAnimationFrame(S),now:()=>performance.now()}),u=new WeakSet,i=(S,L)=>{u.has(S)||(u.add(S),a.recordInput?.(L))};e===k&&(Pe=a);const g=K(e),h=St(e,a.schedulers),y=ue("localStorage"),w=ue("sessionStorage");let d,p;const I=me(de(window,()=>!0,{page:g,role:"window"}),s,{execute:S=>$(e,S),realmId:e,recordInput:i,role:"window",schedulers:h,self:()=>d,document:()=>p,localStorage:y,sessionStorage:w,isolateExpandos:!0});d=I.proxy;const T=me(de(document,()=>!0,{page:g,role:"document"}),s,{execute:S=>$(e,S),realmId:e,recordInput:i,role:"document",self:()=>d});return p=T.proxy,{moduleUrls:n,live:t,loop:a,document:T,localStorage:y,sessionStorage:w,window:I,public:{recordModuleUrl(S){t.alive&&n.set(new URL(S).pathname,S)},console:bt(e),document:p,globalThis:d,timers:h,window:d}}}function Y(e=k){let t=F.get(e);return t||(t=Rt(e),F.set(e,t)),t.public}function It(e){return[...F.get(e)?.moduleUrls.values()??[]]}function dn(e){const t=F.get(e);if(!t)return null;const n={reads:0,writes:0};return{globals:t.window.expandoCount(),mountId:e,loop:t.loop.stats(),listeners:{document:t.document.count(),window:t.window.count()},storage:{local:t.localStorage()?.stats()??n,session:t.sessionStorage()?.stats()??n}}}function Tt(e=k){U.delete(e),H.get(e)?.reset(),e!==k&&H.delete(e);const n=F.get(e);if(!n)return{mountId:e,listeners:0,timers:{timeouts:0,intervals:0,animationFrames:0,parkedCallbacks:0}};F.delete(e),n.moduleUrls.clear(),n.live.alive=!1;const s=n.document.dispose()+n.window.dispose(),a=n.loop.dispose?.()??{timeouts:0,intervals:0,animationFrames:0,parkedCallbacks:0};return e===k&&Ce(),{mountId:e,listeners:s,timers:a}}function fn(e,t=k){U.set(t,e)}function de(e,t,n){const s=new Map,a=Se(t),u=()=>n?.page.surface??null,i=()=>n?.role==="window"&&n.page.surface?n.page:null,g=(c,f,o)=>{const r=i();if(r&&c==="resize"&&f!==null){r.addResizeListener(f,o);return}if((c==="load"||c==="DOMContentLoaded"||c==="pageshow")&&f!==null&&document.readyState==="complete"){window.setTimeout(()=>{const l=new Event(c);typeof f=="function"?f.call(p,l):f.handleEvent(l)},0);return}if(j.has(c)&&f!==null){let l=s.get(c);l||(l=new Map,s.set(c,l));const v=f;let b=l.get(v);b||(b=function(m){if(!a(c,m))return typeof v=="function"?v.call(this,m):v.handleEvent(m)},l.set(v,b)),e.addEventListener(c,b,o);return}e.addEventListener(c,f,o)},h=(c,f,o)=>{const r=i();if(r&&c==="resize"&&f!==null){r.removeResizeListener(f,o);return}if(j.has(c)&&f!==null){const l=s.get(c),v=l?.get(f);if(v){l?.delete(f),e.removeEventListener(c,v,o);return}}e.removeEventListener(c,f,o)},y=new WeakMap,w=c=>{if(typeof c!="string"||!c.startsWith("on"))return null;const f=c.slice(2);return j.has(f)?f:null},d=c=>{console.error(dt(c))};let p;const I=()=>{const c=Reflect.get(e,"location",e);if(!c||!n)return null;const f=ce.get(n.page);if(f?.source===c)return{value:f.view};const o=ut(c,d,{reloadGame:()=>{const r=Te;return r?(r(),!0):!1}});return ce.set(n.page,{source:c,view:o}),{value:o}},T=c=>{const f=i();if(!f)return null;if(c==="window"||c==="self"||c==="top"||c==="parent")return{value:p};if(c!=="innerWidth"&&c!=="outerWidth"&&c!=="innerHeight"&&c!=="outerHeight")return null;const o=f.viewport();return o?c==="innerWidth"||c==="outerWidth"?{value:o.width}:c==="innerHeight"||c==="outerHeight"?{value:o.height}:null:null},S=c=>{if(!n)return null;if(c==="location")return I();if(n.role==="document"){const f=u();if(f&&(c==="body"||c==="documentElement"))return{value:f};if(f&&c==="head")return{value:n.page.head()};if(f&&c==="title")return{value:n.page.title};if(f&&c==="currentScript")return{value:n.page.currentScript};if(f&&c==="activeElement"){const o=Reflect.get(e,"activeElement",e);return{value:o&&f.contains(o)?o:f}}}return T(c)},L=c=>{if(n?.role!=="document"||typeof c!="string")return;const f=u();if(!f)return;const o=e;if(c==="querySelector")return r=>r.trim().toLowerCase()==="head"?n.page.head():f.matches(r)?f:f.querySelector(r);if(c==="querySelectorAll")return f.querySelectorAll.bind(f);if(c==="getElementById")return r=>{const l=o.getElementById(r);return l&&f.contains(l)?l:null};if(c==="getElementsByClassName")return f.getElementsByClassName.bind(f);if(c==="getElementsByTagName")return r=>{if(r.toLowerCase()!=="head")return f.getElementsByTagName(r);const l=n.page.head();return l?Object.assign([l],{item:v=>v===0?l:null,namedItem:v=>l.id===v?l:null}):[]};if(c==="elementFromPoint"||c==="elementsFromPoint")return(r,l)=>{const v=f.getBoundingClientRect(),m=o[c].bind(o)(r+v.left,l+v.top);return Array.isArray(m)?m.filter(_=>f.contains(_)):m&&f.contains(m)?m:null}};return p=new Proxy(e,{get(c,f){if(f==="addEventListener")return g;if(f==="removeEventListener")return h;const o=S(f);if(o)return o.value;const r=L(f);if(r)return r;if(typeof f=="string"&&Ee.has(f)){const v=V;if(v)return v.schedulers[f]}const l=Reflect.get(c,f,c);return typeof l!="function"?l:y.get(l)??Re(l,c)},set(c,f,o){if(f==="location"&&n)return d(`${n.role}.location = ${String(o)}`),!0;if(n?.role==="document"&&f==="title"&&n.page.surface)return n.page.title=String(o),!0;if(w(f)!==null&&typeof o=="function"){const l=o,v=function(b){if(t())return l.call(this,b)};return y.set(v,l),Reflect.set(c,f,v,c)}if(f==="onload"&&typeof o=="function"&&document.readyState==="complete"){const l=o;return window.setTimeout(()=>l.call(p,new Event("load")),0),!0}return Reflect.set(c,f,o,c)}}),p}function fe(e){return typeof e=="boolean"?e:e?.capture??!1}function me(e,t,n){const s=n.execute??(o=>o()),a=[],u=Se(t);let i=!1,g=!1;const h=o=>{if(g)return;g=!0;const r=n.realmId?`"${n.realmId}"`:"the default realm";console.warn(`vgai: a stopped game tried to register ${o} on its ${n.role} after its realm (${r}) was reclaimed; refused. Later refusals in this generation are silent.`)},y=new Map,w=new Map,d=new WeakMap;let p;const I=o=>n.role==="window"&&n.self&&(o===e||typeof window<"u"&&o===window)?n.self():n.document&&(o===n.document()||typeof document<"u"&&o===document)?n.document():o,T=o=>{const r=d.get(o);if(r)return r;const l=new Proxy(o,{get(v,b){if(b==="currentTarget")return p;if(b==="target"||b==="srcElement"){const _=Reflect.get(v,b,v);return _===v.currentTarget?p:I(_)}if(b==="view")return I(Reflect.get(v,b,v));if(b==="composedPath")return()=>v.composedPath().map(I);const m=Reflect.get(v,b,v);return typeof m=="function"?m.bind(v):m}});return d.set(o,l),l},S=o=>{const r=a.indexOf(o);r!==-1&&a.splice(r,1),e.removeEventListener(o.type,o.actual,o.capture),o.abort?.signal.removeEventListener("abort",o.abort.handler)},L=(o,r,l)=>{if(r===null)return;if(i){h(`a "${o}" listener`);return}const v=fe(l),b=l&&typeof l!="boolean"?l.signal:void 0;if(b?.aborted||a.some(R=>R.type===o&&R.original===r&&R.capture===v))return;let m;const _=function(R){if(l&&typeof l!="boolean"&&l.once){const C=a.indexOf(m);C!==-1&&a.splice(C,1),m.abort?.signal.removeEventListener("abort",m.abort.handler)}if(j.has(o)){const C=u(o,R);if(n.recordInput?.(R,C),C)return}const A=T(R);return s(()=>typeof r=="function"?r.call(p,A):r.handleEvent(A))},E=()=>S(m);m={type:o,original:r,actual:_,capture:v,...b?{abort:{signal:b,handler:E}}:{}},a.push(m),e.addEventListener(o,_,l),b?.addEventListener("abort",E,{once:!0}),(o==="load"||o==="DOMContentLoaded"||o==="pageshow")&&document.readyState==="complete"&&window.setTimeout(()=>{!i&&a.includes(m)&&_.call(e,new Event(o))},0)},c=(o,r,l)=>{if(r===null)return;const v=fe(l),b=a.find(m=>m.type===o&&m.original===r&&m.capture===v);b?S(b):e.removeEventListener(o,r,l)},f=o=>typeof o=="string"&&o.startsWith("on")&&o.length>2?o.slice(2):null;return p=new Proxy(e,{get(o,r){if(r==="addEventListener")return L;if(r==="removeEventListener")return c;const l=w.get(r);if(l)return l.original;if(n.self&&(n.role==="window"&&(r==="window"||r==="self"||r==="frames"||r==="top"||r==="parent")||n.role==="document"&&r==="defaultView"))return n.self();if(n.role==="window"&&r==="document"&&n.document)return n.document();if(n.role==="window"&&r==="globalThis"&&n.self)return n.self();if(n.role==="window"&&r==="localStorage"&&n.localStorage)return n.localStorage()?.storage;if(n.role==="window"&&r==="sessionStorage"&&n.sessionStorage)return n.sessionStorage()?.storage;if(typeof r=="string"&&Ee.has(r)&&n.schedulers)return n.schedulers[r];const v=y.get(r);if(v)return v.get?v.get.call(p):v.value;const b=Reflect.get(o,r,o);return typeof b!="function"?b:Re(b,o)},set(o,r,l){if(r==="location")return Reflect.set(o,r,l,o);if(n.role==="window"&&(r==="document"||r==="globalThis"||r==="localStorage"||r==="sessionStorage"))return!0;const v=f(r);if(v){if(i)return h(`an "${String(r)}" handler`),!0;const b=w.get(r);if(b&&(e.removeEventListener(b.type,b.actual),w.delete(r)),typeof l!="function")return!0;const m=l,_=(v==="load"||v==="DOMContentLoaded"||v==="pageshow")&&document.readyState==="complete",E=function(R){if(j.has(v)){const C=u(v,R);if(n.recordInput?.(R,C),C)return}const A=s(()=>m.call(p,T(R)));return A===!1&&R.preventDefault(),A};return w.set(r,{type:v,original:m,actual:E}),e.addEventListener(v,E),_&&window.setTimeout(()=>{!i&&w.get(r)?.actual===E&&E.call(e,new Event(v))},0),!0}return n.isolateExpandos?(y.set(r,{configurable:!0,enumerable:!0,value:l,writable:!0}),!0):Reflect.set(o,r,l,o)},defineProperty(o,r,l){return n.isolateExpandos?Reflect.getOwnPropertyDescriptor(o,r)?.configurable===!1?!1:(y.set(r,{...l,configurable:!0,enumerable:l.enumerable??!0}),!0):Reflect.defineProperty(o,r,l)},deleteProperty(o,r){return y.delete(r)?!0:n.isolateExpandos?Reflect.getOwnPropertyDescriptor(o,r)?.configurable!==!1:Reflect.deleteProperty(o,r)},has(o,r){return y.has(r)||Reflect.has(o,r)},ownKeys(o){const r=new Set(Reflect.ownKeys(o));for(const l of y.keys())typeof l!="number"&&r.add(l);return[...r]},getOwnPropertyDescriptor(o,r){const l=Reflect.getOwnPropertyDescriptor(o,r);return l?.configurable===!1?l:y.get(r)??l}}),{proxy:p,count:()=>a.length+w.size,expandoCount:()=>y.size,dispose(){for(const r of u.outstandingReleases()){for(const l of[...a])l.type===r.type&&l.actual.call(p,r);for(const l of w.values())l.type===r.type&&l.actual.call(p,r)}i=!0;const o=a.length+w.size;for(const r of[...a])S(r);for(const r of w.values())e.removeEventListener(r.type,r.actual);return w.clear(),y.clear(),o}}}let B=!1;function Ce(){if(!B)return;const e=globalThis,t=Y();V=Pe,e.__vgaiGameTimers=t.timers,e.__vgaiGameWindow=t.window,e.__vgaiGameDocument=t.document,e.__vgaiGameConsole=t.console}function mn(){if(B||typeof window>"u"||typeof document>"u")return;B=!0;const e=globalThis;He(),e.__vgaiGameModuleUrls=It,e.__vgaiGameRealm=t=>(M.push(t),queueMicrotask(()=>{const n=M.lastIndexOf(t);n>=0&&M.splice(n,1)}),Y(t)),Ce()}function J(e,t){const n=Tt(e),s=n.timers.timeouts+n.timers.intervals+n.timers.animationFrames+n.timers.parkedCallbacks;if(n.listeners===0&&s===0)return;const a=[];n.listeners>0&&a.push(`${n.listeners} window/document listener${n.listeners===1?"":"s"}`),s>0&&a.push(`${s} timer/frame callback${s===1?"":"s"}`),P.logStructured("warn",`${t} stopped without releasing ${a.join(" and ")}; the editor reclaimed them.`,"environment",void 0,{instanceId:e,instanceName:t})}function Ae(e=typeof window>"u"?null:window){const t=e?.vgaiGame;return!t||t.contractVersion!==1?null:t}const Pt=Object.entries(Oe).filter(([,e])=>!e.optional).map(([e])=>e);function Le(e){const t=e?.scenes;if(t==null)return{scenes:null,malformed:null};if(typeof t!="object")return{scenes:null,malformed:`declared as ${typeof t}; expected an object with list(), current() and goTo()`};const n=Pt.filter(s=>typeof t[s]!="function");return n.length>0?{scenes:null,malformed:`declared a scenes surface missing required member(s): ${n.join(", ")}`}:{scenes:t,malformed:null}}function Ct(e){const t=e?.ready;if(t==null)return{ready:null,malformed:null};if(typeof t=="function"){const n=t;return{ready:()=>Promise.resolve(n()),malformed:null}}if(typeof t.then=="function"){const n=t;return{ready:()=>Promise.resolve(n),malformed:null}}return{ready:null,malformed:`declared \`ready\` as ${typeof t}; expected a promise or a function returning one`}}function At(e){const t=e?.world;return t==null?{world:null,malformed:null}:typeof t!="object"||t.isScene!==!0?{world:null,malformed:`declared \`world\` as ${typeof t}; expected the game's own THREE.Scene`}:{world:t,malformed:null}}function Lt(e){const t=e?.presentation;if(t==null)return{canvas:null,malformed:null};const n=t;return typeof n!="object"||n.tagName!=="CANVAS"||typeof n.getContext!="function"?{canvas:null,malformed:`declared \`presentation\` as ${typeof t=="object"?String(n.tagName??"object"):typeof t}; expected the game's own <canvas> element`}:{canvas:t,malformed:null}}const gn=Object.freeze(Object.defineProperty({__proto__:null,readGameContract:Ae,readGamePresentation:Lt,readGameReady:Ct,readGameScenes:Le,readGameWorld:At},Symbol.toStringTag,{value:"Module"}));function kt(e){if(!Array.isArray(e))throw new Error("scenes.list() did not return an array");const t=new Set;for(const n of e){if(typeof n!="object"||n===null||typeof n.id!="string"||n.id.trim().length===0||typeof n.label!="string"||n.label.trim().length===0)throw new Error("scenes.list() returned an invalid { id, label } scene");if(t.has(n.id))throw new Error(`scenes.list() returned duplicate id "${n.id}"`);t.add(n.id)}return e}function xt(e){return typeof e?.goToScene=="function"}function hn(e,t={}){const{scenes:n,malformed:s}=Le(e);if(s!==null&&P.warn(`Ignored the game contract's \`scenes\` surface: ${s}`,"ingest"),!n)return null;let a=!1;const u=()=>{try{return kt(n.list())}catch(g){return a||(a=!0,P.warn(`Ignored invalid game-contract scenes: ${g instanceof Error?g.message:String(g)}`,"ingest")),[]}},i=g=>{const h=u().map(w=>w.id);return h.includes(g)?(t.onSwitchAccepted?.(g),{ok:!0,settled:(async()=>{try{return await n.goTo(g),{requested:g,current:n.current()}}catch(w){return{requested:g,current:n.current(),error:w instanceof Error?w.message:String(w)}}})()}):{ok:!1,error:`scenes.goTo: "${g}" is not one of this game's scenes (${h.length>0?h.join(", "):"it lists none"}).`,known:h}};return{title:"Scenes",storiesFor:g=>u().map(({id:h,label:y})=>({id:h,label:y})),active:g=>n.current(),goToScene:i,apply:(g,h)=>{if(h===null){P.warn("This game’s scenes cannot be cleared: it is always in one of its own scenes. Pick the scene to switch to instead.","ingest");return}const y=i(h);if(!y.ok){P.warn(`${y.error} — ignoring.`,"ingest");return}y.settled.then(w=>{w.error!==void 0&&P.error(`scenes.goTo("${h}") failed: ${w.error}`,"ingest")})}}}function Gt(){const e=G();if(!e)return null;const n=(()=>{switch(e.kind){case"canvas":return e.session.adapter;case"dom":return e.session.adapter;case"three":return e.session.mount?.authoring}})()?.stories;return xt(n)?n:null}let Q=!1;function ge(){return Q}function wn(){Q=!0}function vn(){Q=!1}let D=null,x=null;function yn(e){D=e,e||X()}function pn(){D=null,X()}function X(){const e=x;x=null,e&&(clearTimeout(e.timer),e.settle(null))}function ke(){const e=D?.renderer.domElement;return typeof e=="object"&&e!==null?e:null}function _n(){const e=x;if(!(!e||!D))try{const t=D.renderer;if(typeof t.getRenderTarget=="function"&&t.getRenderTarget()!==null)return;const n=ke();if(!n||n.width===0||n.height===0)return;const s=e.image??n.ownerDocument.createElement("canvas");s.width=n.width,s.height=n.height;const a=s.getContext("2d");if(!a||(a.drawImage(n,0,0),e.image=s,e.delivering))return;e.delivering=!0,setTimeout(()=>{x===e&&(x=null,clearTimeout(e.timer),e.settle(e.image))},0)}catch{}}function Mt(e=2e3){return D?(X(),new Promise(t=>{const n=setTimeout(()=>{x?.timer===n&&(x=null),t(null)},e);x={settle:t,timer:n,image:null,delivering:!1}})):Promise.resolve(null)}const $t={play:e=>(e.play(),"driven"),resume:e=>(e.resume(),"driven"),stop:(e,t)=>t?.stopEndsRun?"declined":(e.pause(),"driven"),pause:e=>(e.pause(),"driven"),step:e=>e.canStep?(e.step(),"driven"):{ok:!1,error:"this ingested game cannot be stepped — no serve-time loop gate measured control over its frames, so a single-frame step would be a button that lies (see ingest/same-realm-loop-gate.ts)"}};function Ft(e,t,n){if(!ze(t))return null;const s=$t[t](e,n);return s==="declined"?null:s!=="driven"?s:{ok:!0,data:{ingest:!0,playing:e.playing}}}function Ht(){return Y().window}function Z(){return typeof window>"u"?null:Ae(Ht())}let ee=!1;function Dt(){return ee}function N(e){ee=e}function zt(){N(!1);const e=window;delete e.__vgaiMountCold,delete e.__vgaiIngestPlayed}function he(e,t,n){const s=(a,u)=>je({seam:`contract.lifecycle.${t}`,subject:"game",epoch:qe(e),stage:"effect",outcome:a,source:"consumer",detail:u});try{n(),s("pass",`the mounted ingest lifecycle consumed lifecycle.${t}`)}catch(a){throw s("fail",`lifecycle.${t} failed: ${a instanceof Error?a.message:String(a)}`),a}}function Sn(e={}){const t=Z(),n=t?.lifecycle,s=()=>{if(t&&n?.start){he(t,"start",()=>n.start?.());return}window.dispatchEvent(new CustomEvent("vgai:ingest-play"))},a=typeof n?.pause=="function",u=typeof n?.resume=="function";return t&&a!==u?{start:s,pauseGap:a?"the game contract declares lifecycle.pause without lifecycle.resume":"the game contract declares lifecycle.resume without lifecycle.pause"}:t&&a&&u?{start:s,setPaused:i=>he(t,i?"pause":"resume",()=>{i?n?.pause?.():n?.resume?.()})}:e.setPaused?{start:s,setPaused:e.setPaused,...e.step?{step:e.step}:{},...e.canStep?{canStep:e.canStep}:{}}:{start:s,pauseGap:e.pauseGap??"the game declares no lifecycle.pause/resume pair and its mounted adapter exposes no setPaused capability"}}function bn(){const e=G();return e?e.session.lifecycle.pauseGap??null:null}function we(e){const t=G();if(t)for(const n of t.siblings)try{n.setPaused?.(e)}catch(s){P.error(`Composite sibling setPaused(${e}) failed: ${s}`,"ingest")}}function jt(){return Z()}function xe(){const e=G()?.session.lifecycle;if(!e?.setPaused)return null;const t=()=>{e.setPaused?.(!0),we(!0),N(!1)},n=()=>{e.setPaused?.(!1),we(!1),N(!0)};return{get playing(){return ee},play(){Ne();const s=window;if(s.__vgaiIngestPlayed)return n();s.__vgaiIngestPlayed=!0,e.start(),n()},pause:t,resume:n,canStep:!!e.step&&(e.canStep?.()??!0),step(){e.canStep?.()!==!1&&(e.step?.(),N(!1))}}}function En(e){const t=xe();return t?(t.pause(),!0):!1}const Nt=Ve(e=>{e.level==="warn"?P.warn(e.message,"ingest"):P.log(e.message,"ingest")});let Bt=0,Ge="";function Rn(e){Ge=`${e}#${++Bt}`}function In(e){const t=mt(e.realmLoopVerdict?.()),n=e.realmLoopVerdict?.()?.reason??null;return t!==null||n!==null?{loop:t,reason:n}:e.realmLoopVerdict?{loop:null,reason:null}:{loop:null,reason:Wt}}function Tn(){return{loop:null,reason:"⏸ calls the host runtime's own play pause on this route, but no probe has measured whether that reaches this game's frames — an unmodified React game that schedules its own timers is not held by the host loop"}}const Wt="this mount installs no loop gate, so no verdict will ever be measured here — nothing in the editor holds this game's frames";function Ot(e,t,n){const s=Ze(t?.systems,n),a=new Map(s.empty.map(i=>[i.slot,i.evidence])),u=new Map(s.malformed.map(i=>[i.slot,i.reason]));return Ye.map(i=>{if(e[i]!=null)return{slot:i,state:"bound",proof:Be({slot:i,adapter:e[i],subject:"game"})};const g=a.get(i);if(g!==void 0)return{slot:i,state:"empty",evidence:g};const h=u.get(i);return h!==void 0?{slot:i,state:"malformed",evidence:h}:{slot:i,state:"unanswered"}})}function qt(){const e=Qe();switch(e.state){case"absent":return null;case"loading":return{state:"loading"};case"ready":return{state:"ready",dataFile:e.writer.dataFile};default:return{state:"failed",reason:e.reason}}}function te(){const e=G(),t=e?.coverage;if(!e||!t)return null;const n=Je(),s=t.loop(),a=jt();return Ue({worldId:e.worldId,reach:t.reach,surface:e.kind,reachMechanism:t.reachMechanism,loop:s.loop,loopReason:s.reason,contract:Ke(a),systemAdapters:Ot(pe(),a,e.kind),ownership:n?{writable:n.writable,reason:n.reason??null,recorder:n.recorder??null}:null,dataWriter:qt(),projectVerbs:[],writeReach:t.writeReach?.()??null})}function Pn(e){const t=G();if(!t)return;t.coverage=e;const n=te();n&&Nt.report(Ge,n)}function Cn(e,t){if(!t)return;const n=`Ingest "${e}" loop: ${t.loop} — ${t.reason}`;t.loop==="gated"?P.log(n,"ingest"):P.warn(n,"adapter")}const Vt=["hierarchy","selection","transforms","inspector","assetSubject","structure","persistence","pickable","rects","boxEdit","text","colorSample","stories","truth","assetDrop"];function Ut(e){return Vt.filter(t=>e[t]!==void 0)}function An(e){return{coverage:()=>te(),prepareCoverage:()=>Xe(),authoringProviders:()=>Ut(e),engineSystems:()=>Object.keys(pe())}}function Ln(e,t){Object.defineProperties(e,{loop:{enumerable:!0,get:()=>t.realmLoopVerdict?.()?.loop??null},loopReason:{enumerable:!0,get:()=>t.realmLoopVerdict?.()?.reason??null}}),e.realmLoopStats=()=>ht()?.stats()??null}function kn(e,t){const n=e,s=typeof n.querySelectorAll=="function"?n.querySelectorAll("*").length:t.nodeCount(),a=Object.keys(e).some(u=>u.startsWith("__reactContainer"));return{elementCount:s,hierarchyNodeCount:t.nodeCount(),reactRootPresent:a}}function xn(e,t){window[e]=t}function ne(e){delete window[e]}function Me(){Et(null);const e=G();if(e){Qt(null),zt();try{Z()?.lifecycle?.dispose?.()}catch(t){P.error(`The game's own lifecycle.dispose threw at teardown: ${t}`,"ingest")}for(let t=e.siblings.length-1;t>=0;t--)try{e.siblings[t].dispose()}catch(n){P.error(`Composite sibling dispose failed: ${n}`,"ingest")}switch(e.kind){case"three":Kt(e.session);return;case"canvas":Yt(e.session);return;case"dom":Jt(e.session);return}}}function Kt(e){if(e.mount?.authoring&&e.mount.authoring.dispose?.(),W(null),O(null),q(),e.resizeObserver?.disconnect(),e.inputGateUnsubscribe?.(),e.mount)try{e.store.exitPlayScene()}catch{}e.store.setPlayState("stopped");try{e.mount?.game.dispose()}catch{}J("","The ingested game"),ne("__vgaiIngest"),P.log("Ingest root unmounted","ingest")}function Yt(e){e.adapter&&e.adapter.dispose(),W(null),O(null),q(),e.store.setPlayState("stopped");try{e.dispose()}catch{}J("","The ingested canvas game"),ne("__vgaiIngest2D"),P.log("canvas ingest root unmounted","ingest")}function Jt(e){e.adapter.dispose(),W(null),O(null),q(),e.store.setPlayState("stopped");try{e.stop()}catch{}J("","The ingested DOM game"),ne("__vgaiIngestReact"),P.log("DOM ingest root unmounted","ingest")}function Gn(){G()?.kind==="three"&&Me()}let z=null;function G(){return z}function Qt(e){z=e}function $e(){return z?.kind??null}function ve(){return $e()!==null}function Mn(e){z&&(z.siblings=[...e])}let ye=Promise.resolve();function $n(e){const t=ye.then(e);return ye=t.then(()=>{},()=>{}),t}We({id:"ingest",priority:1,mounted:ve,playing:()=>Dt()||ge(),stop:Me,instanceContainer:()=>null,frameCanvas:ke,snapshotFrame:()=>Mt(),command:e=>{const t=ve()?xe():null;return t?Ft(t,e.type,{stopEndsRun:ge()}):null},scenes:Gt,surface:$e,coverage:te,authoringRefusal:()=>z?.kind==="dom"?"This is an ingested native-React game: its components render directly as a DOM layer under the host React — there is no scene graph or renderer to introspect, and authoring is deliberately off for react ingests (the editor never writes JSX back into an unmodified game). The game is hosted, sized, and disposed; play it in the Game tab.":null});export{cn as $,un as A,an as B,Ct as C,Z as D,ln as E,Lt as F,rn as G,Ht as H,on as I,pn as J,ht as K,At as L,Rn as M,N,Cn as O,In as P,Ln as Q,Gt as R,hn as S,Wt as T,J as U,mn as V,_t as W,dn as X,yn as Y,_n as Z,sn as _,G as a,et as a0,ie as a1,gn as a2,wn as b,Me as c,ge as d,vn as e,bn as f,xe as g,En as h,ve as i,Sn as j,Qt as k,fn as l,Tn as m,kn as n,An as o,xn as p,mt as q,Pn as r,$n as s,te as t,Dt as u,zt as v,Mn as w,$e as x,Gn as y,jt as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{cv as p}from"./index-Ckxb31Yz.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"./three.module-IFn-4i31.js";const u=1e-9,d=1e5;function f(m,e,t){const r=t.end-t.start,i=t.loop&&r>u,o=[];let s=m,a=e,c=!1,l=0;for(;;){const h=t.end-s;if(!i||a<=h+u){const n=Math.min(s+a,t.end);o.push({from:s,to:n,direction:"forward"}),s=n;break}if(o.push({from:s,to:t.end,direction:"forward"}),a-=h,s=t.start,c=!0,l++,l>d){const n=t.start+a%r;o.push({from:s,to:n,direction:"forward"}),s=n;break}}return{pos:s,intervals:o,looped:c}}function g(m,e,t){const r=t.end-t.start,i=t.loop&&r>u,o=[];let s=m,a=e,c=!1,l=0;for(;;){const h=s-t.start;if(!i||a<=h+u){const n=Math.max(s-a,t.start);o.push({from:s,to:n,direction:"reverse"}),s=n;break}if(o.push({from:s,to:t.start,direction:"reverse"}),a-=h,s=t.end,c=!0,l++,l>d){const n=t.end-a%r;o.push({from:s,to:n,direction:"reverse"}),s=n;break}}return{pos:s,intervals:o,looped:c}}function _(m,e){return m<e.start?e.start:m>e.end?e.end:m}class E{_previousTime;_currentTime;_range;_timeScale;_playDirection="forward";_lastCrossingDirection="forward";_playbackState="stopped";_evaluators=[];_registrationCounter=0;constructor(e={}){const t=e.start??0,r=e.end??Math.max(t,1);if(r<t)throw new Error(`[AnimationClock] range end (${r}) must be >= start (${t})`);const i=e.timeScale??1;if(!Number.isFinite(i)||i<0)throw new Error(`[AnimationClock] timeScale must be a finite number >= 0, got ${i}`);this._range={start:t,end:r,loop:e.loop??!1},this._timeScale=i,this._previousTime=t,this._currentTime=t}get time(){return this._currentTime}get previousTime(){return this._previousTime}get direction(){return this._playbackState==="playing"?this._playDirection:"paused"}get playbackState(){return this._playbackState}get timeScale(){return this._timeScale}set timeScale(e){if(!Number.isFinite(e)||e<0)throw new Error(`[AnimationClock] timeScale must be a finite number >= 0, got ${e}`);this._timeScale=e}get range(){return this._range}setRange(e){const t=e.start??this._range.start,r=e.end??this._range.end,i=e.loop??this._range.loop;if(r<t)throw new Error(`[AnimationClock] range end (${r}) must be >= start (${t})`);this._range={start:t,end:r,loop:i};const o=_(this._currentTime,this._range);o!==this._currentTime&&this.seek(o)}play(e){e&&(this._playDirection=e),this._playbackState="playing"}pause(){this._playbackState="paused"}stop(){this._playbackState="stopped"}seek(e){const t=_(e,this._range);if(t===this._currentTime)return this.emit(this._currentTime,this._currentTime,[{from:t,to:t,direction:this._lastCrossingDirection}],!1,this._lastCrossingDirection);const r=t>this._currentTime?"forward":"reverse",i=this._currentTime;return this._previousTime=i,this._currentTime=t,this._lastCrossingDirection=r,this.emit(i,t,[{from:i,to:t,direction:r}],!1,r)}seekFrame(e,t){if(!Number.isFinite(t)||t<=0)throw new Error(`[AnimationClock] seekFrame fps must be a finite number > 0, got ${t}`);return this.seek(this._range.start+e/t)}advance(e){if(this._playbackState!=="playing")return null;if(!Number.isFinite(e))throw new Error(`[AnimationClock] advance(dt) requires a finite dt, got ${e}`);const t=Math.abs(e)*this._timeScale,r=this._currentTime;if(t===0)return this.emit(r,r,[],!1,this._playDirection);const i=this._playDirection==="forward"?f(r,t,this._range):g(r,t,this._range);return this._previousTime=r,this._currentTime=i.pos,this._lastCrossingDirection=this._playDirection,this.emit(r,i.pos,i.intervals,i.looped,this._playDirection)}subscribe(e,t){if(!p.includes(e))throw new Error(`[AnimationClock] unknown phase "${e}". Valid: ${p.join(", ")}`);const r={phase:e,order:this._registrationCounter++,fn:t};return this._evaluators.push(r),{dispose:()=>{const i=this._evaluators.indexOf(r);i!==-1&&this._evaluators.splice(i,1)}}}emit(e,t,r,i,o){const s={previousTime:e,currentTime:t,direction:o,timeScale:this._timeScale,looped:i,intervals:r};if(this._evaluators.length>0){const a=[...this._evaluators].sort((c,l)=>{const h=p.indexOf(c.phase),n=p.indexOf(l.phase);return h!==n?h-n:c.order-l.order});for(const c of a)try{c.fn(s)}catch(l){console.error(`[AnimationClock] evaluator in phase "${c.phase}" threw:`,l)}}return s}}export{E as AnimationClock};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{q as r}from"./index-Ckxb31Yz.js";import{l as t}from"./live-mixers-BRkRHd6g.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"./three.module-IFn-4i31.js";const v="workspace.service";function x(){return r().session.reportFacet(()=>({liveMixers:t().map(i=>({site:i.key,clips:[...i.clips.keys()],animates:[...i.roots].map(o=>o.name||"(unnamed)")}))}))}export{v as point,x as start};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o}from"./AssetBudgetPanel-csYWK2H4.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-Ckxb31Yz.js";import"./index-nmcBqr7Y.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./three.module-IFn-4i31.js";import"./asset-loaders-BxG1LykH.js";import"./SkeletonUtils-C8ayciDc.js";import"./asset-parse-error-BHMwBRU3.js";import"./user-data-CZqsJDk-.js";import"./object-marks-DwvIEBOK.js";import"./loader-BbMsvIxP.js";const B="workspace.menu",k={menu:"asset",items:[{id:"open-budget",label:"Open in Asset Budget",testId:"asset-context-open-budget",execute:({assetPath:t})=>{t!==void 0&&o(t)}}]};export{k as menu,B as point};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as t}from"./AssetBudgetPanel-csYWK2H4.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-Ckxb31Yz.js";import"./index-nmcBqr7Y.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./three.module-IFn-4i31.js";import"./asset-loaders-BxG1LykH.js";import"./SkeletonUtils-C8ayciDc.js";import"./asset-parse-error-BHMwBRU3.js";import"./user-data-CZqsJDk-.js";import"./object-marks-DwvIEBOK.js";import"./loader-BbMsvIxP.js";const B="workspace.action",f=[{id:"asset-budget",label:"Open Asset Budget",execute:()=>{t()}}];export{f as actions,B as point};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t}from"./jsx-runtime-DPjLkJKQ.js";import{A as o}from"./AssetBudgetPanel-csYWK2H4.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-Ckxb31Yz.js";import"./index-nmcBqr7Y.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./three.module-IFn-4i31.js";import"./asset-loaders-BxG1LykH.js";import"./SkeletonUtils-C8ayciDc.js";import"./asset-parse-error-BHMwBRU3.js";import"./user-data-CZqsJDk-.js";import"./object-marks-DwvIEBOK.js";import"./loader-BbMsvIxP.js";const k="workspace.document",w="Asset Budget";function D(r){return t.jsx(o,{})}export{D as default,k as point,w as title};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as t}from"./AssetBudgetPanel-csYWK2H4.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-Ckxb31Yz.js";import"./index-nmcBqr7Y.js";import"./index-D_NuPfjr.js";import"./index-CtzuWnCS.js";import"./index-CinJrH5C.js";import"./index-FUuS4qwW.js";import"./client-DNXj_opT.js";import"./three.module-IFn-4i31.js";import"./asset-loaders-BxG1LykH.js";import"./SkeletonUtils-C8ayciDc.js";import"./asset-parse-error-BHMwBRU3.js";import"./user-data-CZqsJDk-.js";import"./object-marks-DwvIEBOK.js";import"./loader-BbMsvIxP.js";const A="workspace.menu",B={menu:"window",items:[{id:"asset-budget",label:"Asset Budget",testId:"menu-asset-budget",execute:()=>{t()}}]};export{B as menu,A as point};
|
package/dist/assets/{asset-editor-persistence-BBaONOJt.js → asset-editor-persistence-BVtzjadu.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{a_ as v,a$ as l,b0 as g,b1 as h,b2 as m,b3 as b}from"./index-Ckxb31Yz.js";const p=new WeakMap;function w(e){typeof window>"u"||(window.dispatchEvent(new CustomEvent("editor:assets-changed",{detail:{paths:[u(e)]}})),window.dispatchEvent(new CustomEvent("editor:asset-mutation",{detail:{type:"change",paths:[u(e)]}})))}function k(e,a){const s=u(a);let n=p.get(e);n||(n=new Map,p.set(e,n));const t=n.get(s);if(t)return t;const d=e.registry.registerProject("project-file",`.vgai/history/imported-assets/${s}`,s.split("/").pop()),o={revision:0,driver:void 0},r=async()=>{const i=await m(s),c=new TextEncoder().encode(i);return{revision:o.revision,contentType:"application/vnd.vgai.asset-history-token",bytes:c,sha256:await b(c)}};return o.driver={descriptor:d,capture:r,preflight:async i=>{const c=await r();return c.sha256===i.sha256?{ok:!0}:{ok:!1,reason:"content-conflict",actualRevision:o.revision,actualSha256:c.sha256}},restore:async i=>{const c=new TextDecoder().decode(e.snapshots.read(i).bytes);await l(s,c),o.revision++,w(s)},estimateBytes:i=>i.byteLength},e.registerDriver(o.driver),n.set(s,o),o}function f(e){return new TextEncoder().encode(e)}async function A(e,a){if(e.length===0)return;const s=h();if(!s)return;const n=e.map(t=>({entry:t,resource:k(s,t.assetPath)}));try{await s.recordAppliedTransaction({label:a,detail:e.map(t=>u(t.assetPath)).join(", "),resources:n.map(({resource:t})=>t.driver.descriptor.key),scope:"project"},n.map(({entry:t,resource:d})=>({resource:d.driver.descriptor.key,beforeBytes:f(t.beforeToken),afterBytes:f(t.afterToken),contentType:"application/vnd.vgai.asset-history-token"})))}catch(t){const d=await Promise.allSettled(e.map(r=>l(r.assetPath,r.beforeToken)));for(const r of e)w(r.assetPath);const o=d.find(r=>r.status==="rejected");throw o?.status==="rejected"?new Error(`Project history could not record undo/redo and rollback failed: ${o.reason instanceof Error?o.reason.message:String(o.reason)}`):new Error(`Assets were rolled back because project history could not record undo/redo: ${t instanceof Error?t.message:String(t)}`)}}async function E(e,a=`Import ${e.name}`){const s=await v(e);return s.ok&&s.history&&await A([s.history],a),s}function u(e){const a=e.split(/[?#]/,1)[0].replace(/^\/+/,"");if(!a)throw new Error("Project asset path cannot be empty.");return a}function P(e,a){const s=h(),n=u(e);let t=!1;const d=()=>{t||(t=!0,queueMicrotask(()=>{t=!1,a()}))},o=s?g(s).subscribeAll(i=>{i===n&&d()}):()=>{},r=i=>{const c=i.detail?.paths;(!c||c.some(y=>u(y)===n))&&d()};return typeof window<"u"&&window.addEventListener("editor:assets-changed",r),()=>{o(),typeof window<"u"&&window.removeEventListener("editor:assets-changed",r)}}export{E as d,P as s};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/spark.module-
|
|
2
|
-
import{_ as g}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/spark.module-CXth-y_a.js","assets/three.module-IFn-4i31.js","assets/index-Ckxb31Yz.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-B4bmKkgY.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as g}from"./index-Ckxb31Yz.js";import{clone as y}from"./SkeletonUtils-C8ayciDc.js";import{AssetParseError as p}from"./asset-parse-error-BHMwBRU3.js";import{setUserData as d}from"./user-data-CZqsJDk-.js";import{gltfLoader as _,resolveUrl as x,textureLoader as S}from"./loader-BbMsvIxP.js";import{M as h,V as u,B as b}from"./three.module-IFn-4i31.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"./object-marks-DwvIEBOK.js";const m=new Map,l=new Map,c=new Map;function U(e){const o=m.get(e);if(o)return o;const t=S.load(e);return m.set(e,t),t}function V(e){let o=l.get(e);return o||(o=new Promise((t,a)=>{_.load(e,n=>t({scene:n.scene,animations:n.animations}),void 0,n=>a(n))}),l.set(e,o)),o.then(t=>{const a=y(t.scene);return a.traverse(n=>{n instanceof h&&(n.material=Array.isArray(n.material)?n.material.map(s=>s.clone()):n.material.clone(),d(n,"__sharedGeometry",!0))}),{scene:a,animations:t.animations}})}async function j(e,o){let t=c.get(e);!t&&o&&(t=Promise.resolve(o),c.set(e,t)),t||(t=fetch(x(e)).then(async a=>{if(!a.ok)throw new Error(`Failed to load Gaussian splat: ${e} (${a.status} ${a.statusText})`);return new Uint8Array(await a.arrayBuffer())}),c.set(e,t));try{const[{SplatMesh:a},n]=await Promise.all([g(()=>import("./spark.module-CXth-y_a.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),t]),s=new a({fileBytes:n,fileName:e,raycastable:!0});await s.initialized,d(s,"gaussianSplat",{src:e,numSplats:s.numSplats});const i=s.getBoundingBox();if(!i.isEmpty()){const f=i.getSize(new u).multiplyScalar(1.5),w=i.getCenter(new u),r=new h(new b(f.x,f.y,f.z));r.name="__vgai_splat_bounds",r.position.copy(w),r.visible=!1,r.raycast=()=>{},d(r,"engineInternal",!0),s.add(r)}return s}catch(a){throw c.delete(e),a}}function D(e,o,t){const a=e.getObjectByName(o);if(!a)throw new p([{code:"custom",path:["mesh","node"],message:`glTF "${t}" has no node named "${o}" (getObjectByName found nothing)`}],t);const n=i=>i.isSkinnedMesh;let s=n(a);if(s||a.traverse(i=>{n(i)&&(s=!0)}),s)throw new p([{code:"custom",path:["mesh","node"],message:`glTF "${t}" node "${o}" is (or contains) a SkinnedMesh — a skinned mesh cannot be lifted out of its armature (atomic-subtree rule). Reference the whole file instead of a \`node\`, or bake/export a non-skinned sub-asset.`}],t);return a}function I(){m.clear(),l.clear(),c.clear()}function N(e){m.delete(e),l.delete(e)}function R(){return{textures:m.size,gltf:l.size,splat:c.size}}export{R as assetCacheSizes,I as clearAssetCaches,N as invalidateCachedAsset,V as loadGLTF,j as loadSplat,U as loadTexture,D as resolveGltfNode};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{gltfLoader as d,resolveUrl as f}from"./loader-
|
|
1
|
+
import{gltfLoader as d,resolveUrl as f}from"./loader-BbMsvIxP.js";import"./index-Ckxb31Yz.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"./three.module-IFn-4i31.js";function v(){const i=new Map,o=new Map;function c(t){const r=i.get(t);if(r)return r;let n;if(t.endsWith(".glb")||t.endsWith(".gltf"))n=new Promise((e,m)=>{d.load(t,a=>e({scene:a.scene,animations:a.animations}),void 0,m)});else if(t.endsWith(".json"))n=fetch(f(t)).then(e=>{if(!e.ok)throw new Error(`Failed to fetch ${t}: ${e.status}`);return e.json()});else throw new Error(`AssetCache: unsupported file type for "${t}"`);const s=n.then(e=>(o.set(t,e),e));return i.set(t,s),s}function p(t){if(!o.has(t))throw new Error(`AssetCache: "${t}" not loaded. Call load() first and await it.`);return o.get(t)}return{load:c,get:p}}export{v as createAssetCache};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as d}from"./index-
|
|
1
|
+
import{q as d}from"./index-Ckxb31Yz.js";import{installAudioPoseGuard as s}from"./pose-guard-Bb3gZOzk.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"./three.module-IFn-4i31.js";let n=!1;function u(){s(o=>{n||(n=!0,d().console.log(`[audio-pose-guard] dropped a Web Audio pose update for a ${o} whose world matrix is not finite — the scene graph is unchanged and the node keeps its last good pose. Reported once; see audioPoseUpdatesDropped() for the running count.`,"authoring"))})}const t=new Set;function i(){for(const o of t){const e=o.deref();if(!e||e.state==="closed"){t.delete(o);continue}e.state==="suspended"&&e.resume()}}function a(){const o=window;if(o.__vgaiAudioUnlock)return;o.__vgaiAudioUnlock=!0;const e=window.AudioContext;typeof e=="function"&&(window.AudioContext=class extends e{constructor(...r){super(...r),t.add(new WeakRef(this))}},window.addEventListener("pointerdown",i,{capture:!0}),window.addEventListener("keydown",i,{capture:!0}))}const x="workspace.service";function G(){a(),u()}export{x as point,G as start};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./jsx-runtime-DPjLkJKQ.js";import{q as v,
|
|
1
|
+
import{a as t}from"./jsx-runtime-DPjLkJKQ.js";import{q as v,eH as h,ap as n,eF as i,a5 as y}from"./index-Ckxb31Yz.js";import{r as u}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{meterPercent as S}from"./audio-meter-CyiToeUW.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"./three.module-IFn-4i31.js";function R(e){return e?{graph:typeof e.graphSnapshot=="function",transport:typeof e.transportState=="function",meters:typeof e.acquireMeters=="function",events:typeof e.audioEvents=="function"}:null}class b{constructor(s=500){this.capacity=s}entries=[];lastSeq=0;paused=!1;pull(s){if(this.paused||!s?.audioEvents)return 0;const a=s.audioEvents(this.lastSeq);if(a.length===0)return 0;for(const r of a)this.entries.push(r),r.seq>this.lastSeq&&(this.lastSeq=r.seq);return this.entries.length>this.capacity&&this.entries.splice(0,this.entries.length-this.capacity),a.length}get all(){return this.entries}clear(){this.entries=[]}}function A(e){const s=Math.max(0,e),a=Math.floor(s/60),r=s-a*60;return`${a}:${r<10?"0":""}${r.toFixed(1)}`}const f={fontFamily:n.typography.mono,fontSize:h.base};function p({children:e,testId:s}){return t.jsx("div",{"data-testid":s,style:{padding:i[4],color:n.content.muted,fontSize:h.base,fontStyle:"italic"},children:e})}function I({adapter:e,onResumed:s}){return e.resume?t.jsx(y,{type:"button",variant:"secondary","data-testid":"audio-resume",onClick:()=>{e.resume?.(),s()},children:"Enable Audio"}):null}const $={started:n.semantic.success,paused:n.semantic.warning,stopped:n.content.muted};function M({adapter:e}){const s=e.transportState?.()??null;return s?t.jsxs("div",{"data-testid":"audio-transport","data-state":s.state,style:{display:"flex",gap:i[6],alignItems:"center",padding:`${i[2]} ${i[4]}`},children:[t.jsxs("span",{style:{color:$[s.state]??n.content.primary},children:["● ",s.state]}),t.jsx("span",{"data-testid":"audio-transport-seconds",style:{...f,color:n.content.primary},children:A(s.seconds)}),s.position!==void 0&&t.jsx("span",{style:{...f,color:n.content.muted},children:s.position}),t.jsxs("span",{style:{fontSize:h.sm,color:n.content.muted},children:["bpm"," ",t.jsx("span",{style:{...f,color:n.content.primary},children:s.bpm.toFixed(0)})]})]}):t.jsx(p,{testId:"audio-transport-none",children:"No musical transport in this world (the game has not bridged Tone onto its audio context)."})}function E({adapter:e}){const[s,a]=u.useState(void 0),r=u.useRef(new Map);return u.useEffect(()=>{const d=e.acquireMeters?.()??null;if(!d){a(null);return}a(d.read());const o=setInterval(()=>{for(const c of d.read()){const m=r.current.get(c.id);m&&(m.style.width=`${S(c.level)}%`,m.dataset.level=c.level.toFixed(4))}},100);return()=>{clearInterval(o),d.dispose()}},[e]),s===void 0?null:s===null?t.jsx(p,{testId:"audio-meters-unavailable",children:"Metering unavailable in this environment (no real audio context)."}):t.jsx("div",{"data-testid":"audio-meters",style:{display:"flex",gap:14,alignItems:"center",padding:`${i[2]} ${i[4]}`},children:s.map(d=>t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:i[2]},children:[t.jsx("span",{style:{fontSize:h.sm,color:n.content.muted},children:d.label}),t.jsx("div",{style:{width:96,height:8,background:n.surface.inset,borderRadius:n.shape.small,overflow:"hidden"},children:t.jsx("div",{"data-testid":"audio-meter-fill","data-meter-id":d.id,"data-level":"0.0000",ref:o=>{o?r.current.set(d.id,o):r.current.delete(d.id)},style:{width:"0%",height:"100%",background:n.semantic.success,transition:"width 80ms linear"}})})]},d.id))})}function q({node:e}){return t.jsxs("div",{"data-testid":"audio-node-row","data-node-id":e.id,style:{...f,lineHeight:"18px",padding:`0 ${i[4]}`,whiteSpace:"nowrap"},children:[t.jsx("span",{style:{color:n.content.primary},children:e.label??e.id}),t.jsxs("span",{style:{color:n.content.dim},children:[" ",e.type]}),e.state!==void 0&&t.jsxs("span",{style:{color:n.semantic.warning},children:[" [",e.state,"]"]}),e.outputs.length>0&&t.jsxs("span",{style:{color:n.content.muted},children:[" → ",e.outputs.join(", ")]})]})}function k(e){return e==="error"?n.semantic.danger:e==="mute"||e==="unmute"?n.semantic.warning:n.accent.default}function z({event:e}){return t.jsxs("div",{"data-testid":"audio-log-row","data-kind":e.kind,style:{...f,display:"grid",gridTemplateColumns:"64px 1fr",gap:i[2],lineHeight:"17px",padding:`0 ${i[4]}`},children:[t.jsxs("span",{style:{color:n.content.dim},children:[(e.time/1e3).toFixed(2),"s"]}),t.jsxs("span",{style:{color:k(e.kind)},children:[e.kind,e.detail!==void 0?t.jsxs("span",{style:{color:n.content.muted},children:[" ",e.detail]}):null]})]})}function C(){const[,e]=u.useReducer(l=>l+1,0),s=u.useRef(new b),a=u.useRef(null),[r,d]=u.useState(!1);u.useEffect(()=>{const l=()=>{const g=v().systems.inspectedAudio()??null;return g!==a.current&&(a.current=g,s.current=new b,s.current.paused=r),g},j=()=>{s.current.pull(l()),e()};j();const w=setInterval(j,250);return()=>clearInterval(w)},[r]);const o=a.current??v().systems.inspectedAudio()??null,c=R(o);if(!o||!c)return t.jsxs("div",{"data-testid":"audio-debugger-empty",style:{padding:i[8],color:n.content.muted,fontSize:h.md,lineHeight:"18px"},children:[t.jsx("div",{style:{color:n.content.primary,marginBottom:i[2]},children:"Audio is still initializing."}),"The editor registers a first-party ",t.jsx("code",{style:f,children:"AudioAdapter"})," in edit mode; Play temporarily replaces it with the running game's adapter."]});const m=c.graph?o.graphSnapshot?.()??[]:null,x=s.current.all;return t.jsxs("div",{"data-testid":"audio-debugger",style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",fontSize:h.md},children:[t.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:i[4],alignItems:"center",borderBottom:`1px solid ${n.boundary.default}`},children:[t.jsx(I,{adapter:o,onResumed:e}),t.jsx("span",{"data-testid":"audio-mute-state",style:{padding:`${i[2]} ${i[4]}`,color:o.isMuted()?n.semantic.warning:n.semantic.success},children:o.isMuted()?"muted":"audible"}),c.transport?t.jsx(M,{adapter:o}):t.jsx(p,{testId:"audio-transport-absent",children:"Transport not provided by this adapter."}),c.meters?t.jsx(E,{adapter:o}):t.jsx(p,{testId:"audio-meters-absent",children:"Meters not provided by this adapter."})]}),t.jsxs("div",{style:{flex:1,minHeight:0,display:"flex"},children:[t.jsx("div",{"data-testid":"audio-graph",style:{flex:1,minWidth:0,overflow:"auto",borderRight:`1px solid ${n.boundary.default}`,padding:`${i[2]} 0`},children:m?m.map(l=>t.jsx(q,{node:l},l.id)):t.jsx(p,{testId:"audio-graph-absent",children:"Audio graph not provided by this adapter."})}),t.jsx("div",{"data-testid":"audio-event-log",style:{flex:1,minWidth:0,display:"flex",flexDirection:"column"},children:c.events?t.jsxs(t.Fragment,{children:[t.jsxs("div",{style:{display:"flex",gap:i[3],alignItems:"center",padding:i[2]},children:[t.jsx(y,{type:"button",variant:"ghost","data-testid":"audio-log-pause",onClick:()=>{const l=!r;s.current.paused=l,d(l)},children:r?"Resume":"Pause"}),t.jsx(y,{type:"button",variant:"ghost","data-testid":"audio-log-clear",onClick:()=>{s.current.clear(),e()},children:"Clear"}),t.jsxs("span",{style:{fontSize:h.sm,color:n.content.muted},children:[x.length," events"]})]}),t.jsx("div",{style:{flex:1,minHeight:0,overflow:"auto"},children:x.length===0?t.jsx(p,{children:"No audio events yet."}):x.map(l=>t.jsx(z,{event:l},l.seq))})]}):t.jsx(p,{testId:"audio-log-absent",children:"Event log not provided by this adapter."})})]})]})}const U="workspace.utility",_="Audio",G=26;function J(){return t.jsx(C,{})}export{J as default,G as order,U as point,_ as title};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{x as i,q as m}from"./index-Ckxb31Yz.js";import{e as p}from"./play-mode-DomOvQie.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"./three.module-IFn-4i31.js";import"./drei-asset-caches-jJoHXbTj.js";import"./native-debug-module-j-MekcLS.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-B3Cnne3x.js";import"./playtest-BnFenMBW.js";import"./game-contract-seams-TCpIMmHP.js";import"./instruments-IKn-vvNb.js";import"./frame-pacing-D5acoOzO.js";import"./edit-mode-authoring-D_BiHCQj.js";import"./json-history-resource-r-9q_hxP.js";import"./binding-resolver-BWwG10zJ.js";import"./adapter-surface-Y37Nzcyw.js";import"./entry-adjudication-BYy7TXOB.js";import"./r3f-root-factory-DjGnbU4n.js";import"./register-render-vitals-BO7x64kR.js";import"./render-census-BrQX_CXv.js";import"./structural-signature-0w-i_ats.js";import"./render-vitals-BZ5HtvMi.js";import"./static-batch-advisor-DqfXWRUq.js";import"./webgl-frame-capture-CRKX73E9.js";import"./world-state-ZGDGY_Xl.js";import"./frame-selector-cache-cCeUbcjG.js";import"./dev-build-gDYrq68M.js";import"./game-input-seams-BC6xhZy3.js";import"./seeded-random-CN0scLZj.js";import"./render-seed-DF4JHy7P.js";import"./frame-delta-D2nsw_Ht.js";import"./events-156d8d12.esm-C734MYnx.js";import"./index-bQE2NA0D.js";import"./realm-services-D25JHoqD.js";import"./canvas-entry-runtime-E5YjSgre.js";import"./three-ingest-runtime-DWijtqQ8.js";import"./EffectComposer-BHDH-NLz.js";import"./CopyShader-BzTUYzf6.js";import"./ShaderPass-qtkA7CQ8.js";import"./CSS3DRenderer-CAS2WZZy.js";import"./relative-path-guard-GiM7Lsz8.js";import"./capability-coverage-CfUeULDN.js";import"./react-root-DGLRLr-F.js";import"./editor-presentation-activity-C7SNSmTd.js";import"./active-ingest-DEgq9JiA.js";import"./ingest-source-persistence-DH6ioCOu.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-C9M98VNM.js";import"./mounted-authoring-TIN5EnCb.js";import"./three-DSsr_Lvp.js";import"./viewport-pick-context-DkawXbEi.js";import"./logger-Dqis-7W1.js";import"./run-ticks-settled-B0cTtmhQ.js";import"./three-authoring-adapter-Yqsank46.js";import"./source-persistence-backend-_-JMEXxE.js";import"./three-projection-core-kubBTx0s.js";import"./body-marks-D8iaje6y.js";import"./user-data-CZqsJDk-.js";import"./object-marks-DwvIEBOK.js";import"./structural-ids-CblajJQK.js";import"./object3d-authoring-subject-CyE4rQ2A.js";import"./rapier-physics-adapter-CaZqWLu0.js";import"./r3f-physics-binding-C8OqNRG2.js";import"./deferred-ingest-play-7V8OrW3e.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-BMT9kLWU.js";import"./board-guides-C3usUZZk.js";import"./writer-BPbm4_my.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-BRgDdtVk.js";import"./inference-diagnostics-YW0yJkKx.js";const Rt="workspace.service";function e(o){p().catch(t=>{m().console.error(`${o}: ${t instanceof Error?t.message:String(t)}`,"play")})}function Ut(){let o,t=!1;const r=i(()=>{t||new URLSearchParams(window.location.search).get("play")==="1"&&(t=!0,o=window.setTimeout(()=>e("Could not enter requested Play mode"),0))});return()=>{o!==void 0&&window.clearTimeout(o),r()}}export{Rt as point,Ut as start};
|
package/dist/assets/{babylon-authoring-adapter-CL02gWDn.js → babylon-authoring-adapter-B_8iE8fK.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{V as g,bR as v,bS as x}from"./index-GIL7oGEO.js";import{J as k,c as j}from"./json-history-resource-BbxllWfV.js";import{p as y}from"./source-persistence-backend-C-aR-B_Y.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"./three.module-D396a9Mn.js";import"./ingest-source-persistence-C_6Hiyra.js";function C(r){return encodeURIComponent(r||"unnamed")}function u(r){try{return r.getClassName?.()||"Node"}catch{return"Node"}}function z(r){try{const e=r.getChildren?.();return Array.isArray(e)?e:[]}catch{return[]}}function m(r){const e=r?.x??0,t=r?.y??0,n=r?.z??0,s=Math.cos(e/2),i=Math.sin(e/2),a=Math.cos(t/2),o=Math.sin(t/2),c=Math.cos(n/2),l=Math.sin(n/2);return{x:i*a*c+s*o*l,y:s*o*c-i*a*l,z:s*a*l+i*o*c,w:s*a*c-i*o*l}}function p([r,e,t,n]){const s=2*(n*r+e*t),i=1-2*(r*r+e*e),a=2*(n*e-t*r),o=2*(n*t+r*e),c=1-2*(e*e+t*t);return{x:Math.atan2(s,i),y:Math.abs(a)>=1?Math.sign(a)*(Math.PI/2):Math.asin(a),z:Math.atan2(o,c)}}function d(r,e){r&&(r.x=e[0]??r.x,r.y=e[1]??r.y,r.z=e[2]??r.z)}function B(r,e){if(!r.rotationQuaternion){d(r.rotation,e);return}const t=m({x:e[0]??0,y:e[1]??0,z:e[2]??0});d(r.rotationQuaternion,[t.x,t.y,t.z]),r.rotationQuaternion.w=t.w}class V{constructor(e,t,n={}){this.engine=e,this.store=t,this.options=n,this.persistenceBackend=n.persistence??null,this.provenance=n.provenance??{source:"foreign",label:"live-only",detail:"Babylon.js scenes and Nodes projected directly — edits apply to native game objects for this session only."};const s=j(),i=this.persistenceBackend;this.persistence=i?{isDirty:()=>!1,save:async()=>{},get destination(){return i.destination()}}:s,i&&i.attach({read:(o,c)=>this.readChannel(o,c),apply:(o,c,l)=>this.applyChannel(o,c,l)});const a=t.projectHistory;if(this.historyResource=i&&a&&n.journal?new k({history:a,kind:"session-state",scope:"session",subject:{...n.journal,id:`${n.journal.id}/live-babylon-edits`},displayName:"Live edits",capture:()=>this.captureHistoryState(),conflictIdentity:o=>o.edits,restore:async o=>{this.restoreHistoryState(o)}}):null,n.canvas&&(this.pickable={pick:(o,c)=>{const l=n.canvas.getBoundingClientRect();for(const h of this.scenes()){const f=h.pick?.(o-l.left,c-l.top),b=f?.hit?f.pickedMesh:null;if(b)return this.reindex(),this.idsByObject.get(b)??null}return null}}),this.truth={resolve:(o,c)=>{const l=this.subjectFor(o,c);return{site:l.anchor,writeAnchorKind:l.anchorKind}}},this.installNativeTools(),n.canvas){const o=()=>{for(const l of this.selection.get())this.transforms.beginEdit(l)},c=()=>{for(const l of this.selection.get())this.transforms.endEdit(l)};n.canvas.addEventListener("pointerdown",o),n.canvas.addEventListener("pointerup",c),this.removeCanvasListeners=()=>{n.canvas.removeEventListener("pointerdown",o),n.canvas.removeEventListener("pointerup",c)}}else this.removeCanvasListeners=null}capabilities={transform:!0,inspectorFields:!0,persist:!1};provenance;persistence;pickable;truth;indexed=new Map;idsByObject=new Map;listeners=new Set;persistenceBackend;baselines=new Map;historyBefore=new Map;historyResource=null;edits=0;gizmos=[];pointerTokens=[];removeCanvasListeners;scenes(){return(this.engine.scenes??[]).filter(e=>{try{return!e.isDisposed?.()}catch{return!0}})}refresh(){this.reindex();let e=0,t=0;for(const n of this.indexed.values())n.kind==="scene"?e++:t++;return{scenes:e,objects:t}}reindex(){this.indexed.clear(),this.idsByObject.clear();const e=new Set;for(const[t,n]of this.scenes().entries()){const s=n.name||`Scene ${t+1}`,i=`babylon:scene:${t}:${C(n.uid||s)}`,a=Array.isArray(n.rootNodes)?n.rootNodes:[],o={id:i,label:s,role:"root",kind:"babylon-scene",typeLabel:"BABYLON.Scene",parentId:null,childIds:[]};this.indexed.set(i,{kind:"scene",scene:n,node:o}),o.childIds=a.map((c,l)=>this.indexNode(c,i,`${t}/${l}`,e))}}indexNode(e,t,n,s){const i=u(e),o=`babylon:node:${typeof e.uniqueId=="number"?String(e.uniqueId):`path:${n}`}`,c={id:o,label:e.name||i,role:"entity",kind:`babylon-${i.toLowerCase()}`,typeLabel:i,parentId:t,childIds:[]};return this.indexed.set(o,{kind:"node",object:e,node:c}),this.idsByObject.set(e,o),s.has(e)||(s.add(e),c.childIds=z(e).map((l,h)=>this.indexNode(l,o,`${n}/${h}`,s))),o}hierarchy={roots:()=>(this.reindex(),[...this.indexed.values()].filter(e=>e.kind==="scene").map(e=>e.node)),node:e=>(this.reindex(),this.indexed.get(e)?.node??null)};selection={get:()=>[...this.store.selectedEntityIds],set:e=>{this.store.selectMultiple(e),this.attachGizmos(e[0]??null),this.notify()}};transforms={dimensions:e=>(this.reindex(),this.indexed.get(e)?.kind==="node"?"3d":null),get:e=>{this.reindex();const t=this.indexed.get(e);if(!t||t.kind!=="node")return{position:[0,0,0],rotation:[0,0,0,1],scale:[1,1,1]};const n=t.object,s=n.rotationQuaternion??m(n.rotation);return{position:[n.position?.x??0,n.position?.y??0,n.position?.z??0],rotation:[s.x,s.y,s.z,s.w],scale:[n.scaling?.x??1,n.scaling?.y??1,n.scaling?.z??1]}},beginEdit:e=>{const t=this.captureChannels(e);t&&this.baselines.set(e,t),this.historyResource&&this.historyBefore.set(e,this.captureHistoryState())},apply:(e,t)=>{this.reindex();const n=this.indexed.get(e);if(!n||n.kind!=="node")return;const s=n.object;if(d(s.position,t.position),d(s.scaling,t.scale),s.rotationQuaternion)d(s.rotationQuaternion,t.rotation),s.rotationQuaternion.w=t.rotation[3];else{const i=p(t.rotation);d(s.rotation,[i.x,i.y,i.z])}this.notify()},endEdit:async e=>{const t=this.baselines.get(e);this.baselines.delete(e);const n=this.historyBefore.get(e);if(this.historyBefore.delete(e),!t||!this.persistenceBackend)return;const s=this.captureChannels(e);if(!s)return;const i=["position","rotation","scale"].filter(o=>JSON.stringify(t[o])!==JSON.stringify(s[o]));if(i.length===0)return;if(i.length>1){const o=`this Babylon gesture changed ${i.length} properties at once (${i.join(", ")})`;return this.persistenceBackend.report(`Transform ${this.labelOf(e)}`,o),{destination:"live-only (not saved)",persisted:!1}}const a=i[0];return y({backend:this.persistenceBackend,subject:()=>this.subjectFor(e,a),baseline:t[a],next:s[a],label:`Transform ${this.labelOf(e)}`,journal:()=>this.recordHistory(`Transform ${this.labelOf(e)}`,n)})}};inspector={properties:e=>{this.reindex();const t=this.indexed.get(e);if(!t)return[];if(t.kind==="scene")return[{path:"name",label:"Scene",type:"string",readonly:!0},{path:"uid",label:"UID",type:"string",readonly:!0}];const n=[{path:"className",label:"Type",type:"string",readonly:!0},{path:"name",label:"Name",type:"string"},{path:"id",label:"ID",type:"string",readonly:!0},{path:"enabled",label:"Enabled",type:"boolean"}];return typeof t.object.isVisible=="boolean"&&n.push({path:"isVisible",label:"Visible",type:"boolean"}),typeof t.object.visibility=="number"&&n.push({path:"visibility",label:"Visibility",type:"number"}),n},get:(e,t)=>{this.reindex();const n=this.indexed.get(e);if(n)return n.kind==="scene"?t==="name"?n.scene.name:t==="uid"?n.scene.uid:void 0:t==="className"?u(n.object):t==="enabled"?n.object.isEnabled?.(!1):n.object[t]},set:async(e,t,n)=>{this.reindex();const s=this.indexed.get(e);if(!s||s.kind!=="node")return;const i=this.readChannel(e,t),a=this.historyResource?this.captureHistoryState():void 0;if(t==="enabled")s.object.setEnabled?.(!!n);else if(t==="name"||t==="isVisible"||t==="visibility")s.object[t]=n;else return;this.notify();const o=this.readChannel(e,t);if(!(!this.persistenceBackend||i===void 0||o===void 0||JSON.stringify(i)===JSON.stringify(o)))return y({backend:this.persistenceBackend,subject:()=>this.subjectFor(e,t==="isVisible"?"visible":t),baseline:i,next:o,label:`Set ${this.labelOf(e)} ${t}`,journal:()=>this.recordHistory(`Set ${this.labelOf(e)} ${t}`,a)})}};subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}dispose(){this.removeCanvasListeners?.();for(const{scene:e,token:t}of this.pointerTokens)e.onPointerObservable?.remove(t);for(const e of this.gizmos)e.dispose();this.persistenceBackend?.dispose(),this.listeners.clear(),this.indexed.clear(),this.idsByObject.clear()}labelOf(e){return this.hierarchy.node(e)?.label??"Babylon node"}objectOf(e){this.reindex();const t=this.indexed.get(e);return t?.kind==="node"?t.object:null}readChannel(e,t){const n=this.objectOf(e);if(n){if(t==="position")return[n.position?.x??0,n.position?.y??0,n.position?.z??0];if(t==="rotation"){const s=n.rotationQuaternion,i=s?p([s.x,s.y,s.z,s.w]):n.rotation??{x:0,y:0,z:0};return[i.x,i.y,i.z]}return t==="scale"?[n.scaling?.x??1,n.scaling?.y??1,n.scaling?.z??1]:t==="visible"?n.isVisible:this.inspector.get(e,t)}}applyChannel(e,t,n){const s=this.objectOf(e);s&&(t==="position"&&Array.isArray(n)?d(s.position,n):t==="rotation"&&Array.isArray(n)?B(s,n):t==="scale"&&Array.isArray(n)?d(s.scaling,n):t==="visible"?s.isVisible=!!n:(t==="name"||t==="visibility")&&(s[t]=n),this.notify())}recordHistory(e,t){!this.historyResource||!t||(this.edits+=1,this.historyResource.record(e,t,this.captureHistoryState()).catch(n=>{g.error(`[babylon] failed to journal "${e}" into project history — the edit is applied but has no history entry (it cannot be undone): ${n instanceof Error?n.message:String(n)}`)}))}captureHistoryState(){this.reindex();const e={};for(const[t,n]of this.indexed){if(n.kind!=="node")continue;const s={};for(const i of["position","rotation","scale","visible","name","visibility"]){const a=this.readChannel(t,i);a!=null&&(s[i]=a)}e[t]=s}return{edits:this.edits,nodes:e}}restoreHistoryState(e){this.edits=e.edits;for(const[t,n]of Object.entries(e.nodes))for(const[s,i]of Object.entries(n))this.applyChannel(t,s,i);this.notify()}captureChannels(e){const t=this.readChannel(e,"position"),n=this.readChannel(e,"rotation"),s=this.readChannel(e,"scale");return t&&n&&s?{position:t,rotation:n,scale:s}:null}subjectFor(e,t){const n=this.objectOf(e),s=v(n);return{entityId:e,property:t,surface:"babylon",anchor:s,anchorKind:s.anchored?"construction-literal":"live-only",instances:s.anchored&&s.kind==="source"?x(s):0}}installNativeTools(){const e=this.options.api?.GizmoManager;for(const t of this.scenes()){if(e){const s=new e(t);s.positionGizmoEnabled=!0,s.rotationGizmoEnabled=!0,s.scaleGizmoEnabled=!0,s.usePointerToAttachGizmos=!1,this.gizmos.push(s)}const n=t.onPointerObservable;if(n){const s=n.add(i=>{const a=i.pickInfo?.pickedMesh;if(!a)return;this.reindex();const o=this.idsByObject.get(a);o&&this.selection.set([o])});this.pointerTokens.push({scene:t,token:s})}}}attachGizmos(e){const t=e?this.objectOf(e):null;for(const n of this.gizmos){if(!t){n.attachToMesh(null);continue}try{u(t).includes("Mesh")?n.attachToMesh(t):n.attachToNode?n.attachToNode(t):n.attachToMesh(null)}catch{n.attachToMesh(null)}}}notify(){for(const e of this.listeners)e();this.store.notifyIngestEdit()}}export{V as BabylonAuthoringAdapter};
|
|
1
|
+
import{X as g,cg as v,ch as x}from"./index-Ckxb31Yz.js";import{J as k,c as j}from"./json-history-resource-r-9q_hxP.js";import{p as y}from"./source-persistence-backend-_-JMEXxE.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"./three.module-IFn-4i31.js";import"./ingest-source-persistence-DH6ioCOu.js";function C(r){return encodeURIComponent(r||"unnamed")}function u(r){try{return r.getClassName?.()||"Node"}catch{return"Node"}}function z(r){try{const e=r.getChildren?.();return Array.isArray(e)?e:[]}catch{return[]}}function m(r){const e=r?.x??0,t=r?.y??0,n=r?.z??0,s=Math.cos(e/2),i=Math.sin(e/2),a=Math.cos(t/2),o=Math.sin(t/2),c=Math.cos(n/2),l=Math.sin(n/2);return{x:i*a*c+s*o*l,y:s*o*c-i*a*l,z:s*a*l+i*o*c,w:s*a*c-i*o*l}}function p([r,e,t,n]){const s=2*(n*r+e*t),i=1-2*(r*r+e*e),a=2*(n*e-t*r),o=2*(n*t+r*e),c=1-2*(e*e+t*t);return{x:Math.atan2(s,i),y:Math.abs(a)>=1?Math.sign(a)*(Math.PI/2):Math.asin(a),z:Math.atan2(o,c)}}function d(r,e){r&&(r.x=e[0]??r.x,r.y=e[1]??r.y,r.z=e[2]??r.z)}function B(r,e){if(!r.rotationQuaternion){d(r.rotation,e);return}const t=m({x:e[0]??0,y:e[1]??0,z:e[2]??0});d(r.rotationQuaternion,[t.x,t.y,t.z]),r.rotationQuaternion.w=t.w}class Q{constructor(e,t,n={}){this.engine=e,this.store=t,this.options=n,this.persistenceBackend=n.persistence??null,this.provenance=n.provenance??{source:"foreign",label:"live-only",detail:"Babylon.js scenes and Nodes projected directly — edits apply to native game objects for this session only."};const s=j(),i=this.persistenceBackend;this.persistence=i?{isDirty:()=>!1,save:async()=>{},get destination(){return i.destination()}}:s,i&&i.attach({read:(o,c)=>this.readChannel(o,c),apply:(o,c,l)=>this.applyChannel(o,c,l)});const a=t.projectHistory;if(this.historyResource=i&&a&&n.journal?new k({history:a,kind:"session-state",scope:"session",subject:{...n.journal,id:`${n.journal.id}/live-babylon-edits`},displayName:"Live edits",capture:()=>this.captureHistoryState(),conflictIdentity:o=>o.edits,restore:async o=>{this.restoreHistoryState(o)}}):null,n.canvas&&(this.pickable={pick:(o,c)=>{const l=n.canvas.getBoundingClientRect();for(const h of this.scenes()){const f=h.pick?.(o-l.left,c-l.top),b=f?.hit?f.pickedMesh:null;if(b)return this.reindex(),this.idsByObject.get(b)??null}return null}}),this.truth={resolve:(o,c)=>{const l=this.subjectFor(o,c);return{site:l.anchor,writeAnchorKind:l.anchorKind}}},this.installNativeTools(),n.canvas){const o=()=>{for(const l of this.selection.get())this.transforms.beginEdit(l)},c=()=>{for(const l of this.selection.get())this.transforms.endEdit(l)};n.canvas.addEventListener("pointerdown",o),n.canvas.addEventListener("pointerup",c),this.removeCanvasListeners=()=>{n.canvas.removeEventListener("pointerdown",o),n.canvas.removeEventListener("pointerup",c)}}else this.removeCanvasListeners=null}capabilities={transform:!0,inspectorFields:!0,persist:!1};provenance;persistence;pickable;truth;indexed=new Map;idsByObject=new Map;listeners=new Set;persistenceBackend;baselines=new Map;historyBefore=new Map;historyResource=null;edits=0;gizmos=[];pointerTokens=[];removeCanvasListeners;scenes(){return(this.engine.scenes??[]).filter(e=>{try{return!e.isDisposed?.()}catch{return!0}})}refresh(){this.reindex();let e=0,t=0;for(const n of this.indexed.values())n.kind==="scene"?e++:t++;return{scenes:e,objects:t}}reindex(){this.indexed.clear(),this.idsByObject.clear();const e=new Set;for(const[t,n]of this.scenes().entries()){const s=n.name||`Scene ${t+1}`,i=`babylon:scene:${t}:${C(n.uid||s)}`,a=Array.isArray(n.rootNodes)?n.rootNodes:[],o={id:i,label:s,role:"root",kind:"babylon-scene",typeLabel:"BABYLON.Scene",parentId:null,childIds:[]};this.indexed.set(i,{kind:"scene",scene:n,node:o}),o.childIds=a.map((c,l)=>this.indexNode(c,i,`${t}/${l}`,e))}}indexNode(e,t,n,s){const i=u(e),o=`babylon:node:${typeof e.uniqueId=="number"?String(e.uniqueId):`path:${n}`}`,c={id:o,label:e.name||i,role:"entity",kind:`babylon-${i.toLowerCase()}`,typeLabel:i,parentId:t,childIds:[]};return this.indexed.set(o,{kind:"node",object:e,node:c}),this.idsByObject.set(e,o),s.has(e)||(s.add(e),c.childIds=z(e).map((l,h)=>this.indexNode(l,o,`${n}/${h}`,s))),o}hierarchy={roots:()=>(this.reindex(),[...this.indexed.values()].filter(e=>e.kind==="scene").map(e=>e.node)),node:e=>(this.reindex(),this.indexed.get(e)?.node??null)};selection={get:()=>[...this.store.selectedEntityIds],set:e=>{this.store.selectMultiple(e),this.attachGizmos(e[0]??null),this.notify()}};transforms={dimensions:e=>(this.reindex(),this.indexed.get(e)?.kind==="node"?"3d":null),get:e=>{this.reindex();const t=this.indexed.get(e);if(!t||t.kind!=="node")return{position:[0,0,0],rotation:[0,0,0,1],scale:[1,1,1]};const n=t.object,s=n.rotationQuaternion??m(n.rotation);return{position:[n.position?.x??0,n.position?.y??0,n.position?.z??0],rotation:[s.x,s.y,s.z,s.w],scale:[n.scaling?.x??1,n.scaling?.y??1,n.scaling?.z??1]}},beginEdit:e=>{const t=this.captureChannels(e);t&&this.baselines.set(e,t),this.historyResource&&this.historyBefore.set(e,this.captureHistoryState())},apply:(e,t)=>{this.reindex();const n=this.indexed.get(e);if(!n||n.kind!=="node")return;const s=n.object;if(d(s.position,t.position),d(s.scaling,t.scale),s.rotationQuaternion)d(s.rotationQuaternion,t.rotation),s.rotationQuaternion.w=t.rotation[3];else{const i=p(t.rotation);d(s.rotation,[i.x,i.y,i.z])}this.notify()},endEdit:async e=>{const t=this.baselines.get(e);this.baselines.delete(e);const n=this.historyBefore.get(e);if(this.historyBefore.delete(e),!t||!this.persistenceBackend)return;const s=this.captureChannels(e);if(!s)return;const i=["position","rotation","scale"].filter(o=>JSON.stringify(t[o])!==JSON.stringify(s[o]));if(i.length===0)return;if(i.length>1){const o=`this Babylon gesture changed ${i.length} properties at once (${i.join(", ")})`;return this.persistenceBackend.report(`Transform ${this.labelOf(e)}`,o),{destination:"live-only (not saved)",persisted:!1}}const a=i[0];return y({backend:this.persistenceBackend,subject:()=>this.subjectFor(e,a),baseline:t[a],next:s[a],label:`Transform ${this.labelOf(e)}`,journal:()=>this.recordHistory(`Transform ${this.labelOf(e)}`,n)})}};inspector={properties:e=>{this.reindex();const t=this.indexed.get(e);if(!t)return[];if(t.kind==="scene")return[{path:"name",label:"Scene",type:"string",readonly:!0},{path:"uid",label:"UID",type:"string",readonly:!0}];const n=[{path:"className",label:"Type",type:"string",readonly:!0},{path:"name",label:"Name",type:"string"},{path:"id",label:"ID",type:"string",readonly:!0},{path:"enabled",label:"Enabled",type:"boolean"}];return typeof t.object.isVisible=="boolean"&&n.push({path:"isVisible",label:"Visible",type:"boolean"}),typeof t.object.visibility=="number"&&n.push({path:"visibility",label:"Visibility",type:"number"}),n},get:(e,t)=>{this.reindex();const n=this.indexed.get(e);if(n)return n.kind==="scene"?t==="name"?n.scene.name:t==="uid"?n.scene.uid:void 0:t==="className"?u(n.object):t==="enabled"?n.object.isEnabled?.(!1):n.object[t]},set:async(e,t,n)=>{this.reindex();const s=this.indexed.get(e);if(!s||s.kind!=="node")return;const i=this.readChannel(e,t),a=this.historyResource?this.captureHistoryState():void 0;if(t==="enabled")s.object.setEnabled?.(!!n);else if(t==="name"||t==="isVisible"||t==="visibility")s.object[t]=n;else return;this.notify();const o=this.readChannel(e,t);if(!(!this.persistenceBackend||i===void 0||o===void 0||JSON.stringify(i)===JSON.stringify(o)))return y({backend:this.persistenceBackend,subject:()=>this.subjectFor(e,t==="isVisible"?"visible":t),baseline:i,next:o,label:`Set ${this.labelOf(e)} ${t}`,journal:()=>this.recordHistory(`Set ${this.labelOf(e)} ${t}`,a)})}};subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}dispose(){this.removeCanvasListeners?.();for(const{scene:e,token:t}of this.pointerTokens)e.onPointerObservable?.remove(t);for(const e of this.gizmos)e.dispose();this.persistenceBackend?.dispose(),this.listeners.clear(),this.indexed.clear(),this.idsByObject.clear()}labelOf(e){return this.hierarchy.node(e)?.label??"Babylon node"}objectOf(e){this.reindex();const t=this.indexed.get(e);return t?.kind==="node"?t.object:null}readChannel(e,t){const n=this.objectOf(e);if(n){if(t==="position")return[n.position?.x??0,n.position?.y??0,n.position?.z??0];if(t==="rotation"){const s=n.rotationQuaternion,i=s?p([s.x,s.y,s.z,s.w]):n.rotation??{x:0,y:0,z:0};return[i.x,i.y,i.z]}return t==="scale"?[n.scaling?.x??1,n.scaling?.y??1,n.scaling?.z??1]:t==="visible"?n.isVisible:this.inspector.get(e,t)}}applyChannel(e,t,n){const s=this.objectOf(e);s&&(t==="position"&&Array.isArray(n)?d(s.position,n):t==="rotation"&&Array.isArray(n)?B(s,n):t==="scale"&&Array.isArray(n)?d(s.scaling,n):t==="visible"?s.isVisible=!!n:(t==="name"||t==="visibility")&&(s[t]=n),this.notify())}recordHistory(e,t){!this.historyResource||!t||(this.edits+=1,this.historyResource.record(e,t,this.captureHistoryState()).catch(n=>{g.error(`[babylon] failed to journal "${e}" into project history — the edit is applied but has no history entry (it cannot be undone): ${n instanceof Error?n.message:String(n)}`)}))}captureHistoryState(){this.reindex();const e={};for(const[t,n]of this.indexed){if(n.kind!=="node")continue;const s={};for(const i of["position","rotation","scale","visible","name","visibility"]){const a=this.readChannel(t,i);a!=null&&(s[i]=a)}e[t]=s}return{edits:this.edits,nodes:e}}restoreHistoryState(e){this.edits=e.edits;for(const[t,n]of Object.entries(e.nodes))for(const[s,i]of Object.entries(n))this.applyChannel(t,s,i);this.notify()}captureChannels(e){const t=this.readChannel(e,"position"),n=this.readChannel(e,"rotation"),s=this.readChannel(e,"scale");return t&&n&&s?{position:t,rotation:n,scale:s}:null}subjectFor(e,t){const n=this.objectOf(e),s=v(n);return{entityId:e,property:t,surface:"babylon",anchor:s,anchorKind:s.anchored?"construction-literal":"live-only",instances:s.anchored&&s.kind==="source"?x(s):0}}installNativeTools(){const e=this.options.api?.GizmoManager;for(const t of this.scenes()){if(e){const s=new e(t);s.positionGizmoEnabled=!0,s.rotationGizmoEnabled=!0,s.scaleGizmoEnabled=!0,s.usePointerToAttachGizmos=!1,this.gizmos.push(s)}const n=t.onPointerObservable;if(n){const s=n.add(i=>{const a=i.pickInfo?.pickedMesh;if(!a)return;this.reindex();const o=this.idsByObject.get(a);o&&this.selection.set([o])});this.pointerTokens.push({scene:t,token:s})}}}attachGizmos(e){const t=e?this.objectOf(e):null;for(const n of this.gizmos){if(!t){n.attachToMesh(null);continue}try{u(t).includes("Mesh")?n.attachToMesh(t):n.attachToNode?n.attachToNode(t):n.attachToMesh(null)}catch{n.attachToMesh(null)}}}notify(){for(const e of this.listeners)e();this.store.notifyIngestEdit()}}export{Q as BabylonAuthoringAdapter};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-
|
|
2
|
-
import{
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Ckxb31Yz.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/three.module-IFn-4i31.js","assets/index-B4bmKkgY.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{el as h,_ as v,dX as y,em as w,ak as g}from"./index-Ckxb31Yz.js";import{nativeDebugBindingFromEntryModule as b,nativeSystemsBindingFromEntryModule as R}from"./native-debug-module-j-MekcLS.js";import{assertNever as m}from"./adapter-surface-Y37Nzcyw.js";import{a as E}from"./entry-adjudication-BYy7TXOB.js";import{a as A}from"./realm-services-D25JHoqD.js";import{r as j}from"./relative-path-guard-GiM7Lsz8.js";import{f as k,m as x}from"./capability-coverage-CfUeULDN.js";import{a as M,b as $}from"./react-root-DGLRLr-F.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-Ckxb31Yz.js").then(s=>s.tO);return{editorConsole:i}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]));n.warn(a,"adapter")}return t}}}async function O(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 m(e.surface,"resolveModuleAdapter")}}async function S(e,o,r,t){const{adapter:a,module:n}=await I(e,o,t);return{adapter:a,declaration:_(e,r,n)}}function _(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 I(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 O(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 f(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(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 f(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:m(s,"resolveAllRoots")}}return t}async function V(e,o,r){const{roots:t,mountId:a}=await f(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:m(l,"resolveAllRootEntries")}}return{entries:n,mountId:a}}export{V as a,J as r};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as y,a as k,S as p,P as _,s as P,o as O}from"./worker-B7zhIsFh.js";import{s as B}from"./session-CsR0lApe.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};
|