@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,487 +0,0 @@
|
|
|
1
|
-
import{G as Pt,P as ue,N as T,I as F,B as Be,S as Ht,E as Ae,M as ht,a as pt,i as _e,b as Me,T as Te,g as Se,c as De,d as Rt,e as Pe,C as Ee,O as Ne,f as Fe,h as Ve,L as He}from"./MeshBVH-BiDHDcu-.js";import{A as Xn,j as Yn,k as $n,l as jn,m as Zn,n as Kn,o as Jn}from"./MeshBVH-BiDHDcu-.js";import{a as D,p as yt,V as b,u as O,bi as Re,M as et,aB as k,s as de,aq as ze,ao as Ce,bj as X,g as tt,a9 as Et,aX as ke,aZ as Oe,z as We,O as Le,aC as G,b0 as fe,bP as he,bh as pe,b1 as me,bR as qe,Z as J,c8 as ft,ai as Q,i as Mt,a5 as U,a7 as zt,aS as Ue,ca as Ct,c9 as Ge,R as mt,aG as Tt,aO as ye,c6 as Xe,N as Ye,Y as $e,aF as je,a0 as Nt}from"./three.module-D396a9Mn.js";const kt=new D,W=new yt,Ot=new ue(()=>new Re),xt=new b,Wt=new b,it=new O,vt=new b,Lt=["getX","getY","getZ"];class Ze extends Pt{get primitiveStride(){return 2}writePrimitiveBounds(e,t,n){const i=this._indirectBuffer,{geometry:r,primitiveStride:c}=this,u=r.attributes.position,l=r.index,o=l?l.count:u.count;let s=(i?i[e]:e)*c,f=(s+1)%o;l&&(s=l.getX(s),f=l.getX(f));for(let h=0;h<3;h++){const p=u[Lt[h]](s),m=u[Lt[h]](f),y=p<m?p:m,x=p>m?p:m;t[n+h]=y,t[n+h+3]=x}return t}shapecast(e){const t=Ot.getPrimitive(),n=super.shapecast({...e,intersectsPrimitive:e.intersectsLine,scratchPrimitive:t,iterate:Je});return Ot.releasePrimitive(t),n}raycastObject3D(e,t,n=[]){const{matrixWorld:i}=e,{firstHitOnly:r}=t;kt.copy(i).invert(),W.copy(t.ray).applyMatrix4(kt);const u=t.params.Line.threshold/((e.scale.x+e.scale.y+e.scale.z)/3),l=u*u;let o=null,d=1/0;return this.shapecast({boundsTraverseOrder:s=>s.distanceToPoint(W.origin),intersectsBounds:s=>{if(it.copy(s).expandByScalar(u),r){if(!W.intersectBox(it,vt))return T;let f;return it.containsPoint(W.origin)?f=0:(vt.applyMatrix4(i),f=t.ray.origin.distanceTo(vt)),f<d?F:T}else return W.intersectsBox(it)?F:T},intersectsLine:(s,f)=>{if(W.distanceSqToSegment(s.start,s.end,xt,Wt)>l)return;xt.applyMatrix4(e.matrixWorld);const p=t.ray.origin.distanceTo(xt);p<t.near||p>t.far||r&&p>=d||(d=p,f=this.resolvePrimitiveIndex(f),o={distance:p,point:Wt.clone().applyMatrix4(i),index:f*this.primitiveStride,face:null,faceIndex:null,barycoord:null,object:e},r||n.push(o))}}),r&&o&&n.push(o),n}}class Ke extends Ze{get primitiveStride(){return 1}constructor(e,t={}){t={...t,indirect:!0},super(e,t)}}class Bn extends Ke{getRootRanges(...e){const t=super.getRootRanges(...e);return t.forEach(n=>n.count--),t}}function Je(a,e,t,n,i,r,c){const{geometry:u,primitiveStride:l}=t,{index:o}=u,d=u.attributes.position,s=o?o.count:d.count;for(let f=a,h=e+a;f<h;f++){let m=t.resolvePrimitiveIndex(f)*l,y=(m+1)%s;if(o&&(m=o.getX(m),y=o.getX(y)),c.start.fromBufferAttribute(d,m),c.end.fromBufferAttribute(d,y),n(c,f,i,r))return!0}return!1}const qt=new D,V=new yt,Ut=new ue(()=>new b),st=new O,gt=new b;class An extends Pt{get primitiveStride(){return 1}writePrimitiveBounds(e,t,n){const i=this._indirectBuffer,{geometry:r}=this,c=r.attributes.position,u=r.index;let l=i?i[e]:e;u&&(l=u.getX(l));const o=c.getX(l),d=c.getY(l),s=c.getZ(l);return t[n+0]=o,t[n+1]=d,t[n+2]=s,t[n+3]=o,t[n+4]=d,t[n+5]=s,t}shapecast(e){const t=Ut.getPrimitive(),n=super.shapecast({...e,intersectsPrimitive:e.intersectsPoint,scratchPrimitive:t,iterate:Qe});return Ut.releasePrimitive(t),n}raycastObject3D(e,t,n=[]){const{geometry:i}=this,{matrixWorld:r}=e,{firstHitOnly:c}=t;qt.copy(r).invert(),V.copy(t.ray).applyMatrix4(qt);const l=t.params.Points.threshold/((e.scale.x+e.scale.y+e.scale.z)/3),o=l*l;let d=null,s=1/0;return this.shapecast({boundsTraverseOrder:f=>f.distanceToPoint(V.origin),intersectsBounds:f=>{if(st.copy(f).expandByScalar(l),c){if(!V.intersectBox(st,gt))return T;let h;return st.containsPoint(V.origin)?h=0:(gt.applyMatrix4(r),h=t.ray.origin.distanceTo(gt)),h<s?F:T}else return V.intersectsBox(st)?F:T},intersectsPoint:(f,h)=>{const p=V.distanceSqToPoint(f);if(p<o){const m=new b;V.closestPointToPoint(f,m),m.applyMatrix4(r);const y=t.ray.origin.distanceTo(m);if(y<t.near||y>t.far||c&&y>=s)return;s=y,h=this.resolvePrimitiveIndex(h),d={distance:y,distanceToRay:Math.sqrt(p),point:m,index:i.index?i.index.getX(h):h,face:null,faceIndex:null,barycoord:null,object:e},c||n.push(d)}}}),c&&d&&n.push(d),n}}function Qe(a,e,t,n,i,r,c){const{geometry:u}=t,{index:l}=u,o=u.attributes.position;for(let d=a,s=e+a;d<s;d++){const f=t.resolvePrimitiveIndex(d),h=l?l.array[f]:f;if(c.fromBufferAttribute(o,h),n(c,d,i,r))return!0}return!1}const _=new k,w=new D,Y=new D,Gt=new O,L=new de,E=new b,$=new yt,M=new et,Xt={};class _n extends Be{constructor(e,t={}){t={precise:!1,includeInstances:!0,matrixWorld:Array.isArray(e)?new D:e.matrixWorld,targetLeafSize:1,...t},super();const n=new Set;xe(e,n);const i=Array.from(n),r=Math.ceil(Math.log2(i.length)),c=(1<<r)-1;this.objects=i,this.idBits=r,this.idMask=c,this.primitiveBuffer=null,this.primitiveBufferStride=1,this.precise=t.precise,this.includeInstances=t.includeInstances,this.matrixWorld=t.matrixWorld,this.init(t)}getObjectFromId(e){const{idMask:t,objects:n}=this,i=St(e,t);return n[i]}getInstanceFromId(e){const{idMask:t,idBits:n}=this;return Dt(e,n,t)}init(e){const{objects:t,idBits:n,matrixWorld:i}=this;Y.copy(i).invert(),this.primitiveBuffer=new Uint32Array(this._countPrimitives(t)),this._fillPrimitiveBuffer(t,n,this.primitiveBuffer),super.init(e)}refit(...e){Y.copy(this.matrixWorld).invert(),super.refit(...e)}writePrimitiveBounds(e,t,n){const{primitiveBuffer:i}=this;this._getPrimitiveBoundingBox(i[e],Y,Gt);const{min:r,max:c}=Gt;t[n+0]=r.x,t[n+1]=r.y,t[n+2]=r.z,t[n+3]=c.x,t[n+4]=c.y,t[n+5]=c.z}getRootRanges(){return[{offset:0,count:this.primitiveBuffer.length}]}shapecast(e){return super.shapecast({...e,intersectsPrimitive:e.intersectsObject,scratchPrimitive:null,iterate:tn})}raycast(e,t=[]){const{matrixWorld:n,includeInstances:i}=this,{firstHitOnly:r}=e,c=[];Y.copy(n).invert(),$.copy(e.ray).applyMatrix4(Y);let u=1/0,l=null;return this.shapecast({boundsTraverseOrder:o=>o.distanceToPoint($.origin),intersectsBounds:o=>{if(r){if(!$.intersectBox(o,E))return T;let d;return o.containsPoint($.origin)?d=0:(E.applyMatrix4(n),d=e.ray.origin.distanceTo(E)),d<u?F:T}else return $.intersectsBox(o)?F:T},intersectsObject(o,d){if(o.visible){if(c.length=0,o.isInstancedMesh&&i)M.geometry=o.geometry,M.material=o.material,o.getMatrixAt(d,M.matrixWorld),M.matrixWorld.premultiply(o.matrixWorld),M.raycast(e,c),c.forEach(s=>{s.object=o,s.instanceId=d}),M.material=null;else if(o.isBatchedMesh&&i){if(!o.getVisibleAt(d))return;const s=o.getGeometryIdAt(d),f=o.getGeometryRangeAt(s,Xt);_.index=o.geometry.index,_.attributes=o.geometry.attributes,_.setDrawRange(f.start,f.count),M.geometry=_,M.material=o.material,o.getMatrixAt(d,M.matrixWorld),M.matrixWorld.premultiply(o.matrixWorld),M.raycast(e,c),c.forEach(h=>{h.object=o,h.batchId=d}),M.material=null,_.index=null,_.attributes=null,_.setDrawRange(0,1/0)}else o.raycast(e,c);r?c.forEach(s=>{s.distance<u&&(u=s.distance,l=s)}):t.push(...c)}}}),r&&l&&t.push(l),t}_getPrimitiveBoundingBox(e,t,n){const{objects:i,idMask:r,idBits:c,precise:u,includeInstances:l}=this,o=St(e,r),d=Dt(e,c,r),s=i[o];if(!l&&(s.isInstancedMesh||s.isBatchedMesh))s.boundingBox||s.computeBoundingBox(),s.boundingSphere||s.computeBoundingSphere(),w.copy(s.matrixWorld).premultiply(t),L.copy(s.boundingSphere).applyMatrix4(w),n.copy(s.boundingBox).applyMatrix4(w),bt(n,L);else if(u)if(s.isInstancedMesh)s.getMatrixAt(d,w),w.premultiply(s.matrixWorld).premultiply(t),Yt(s.geometry,w,n);else if(s.isBatchedMesh){const f=s.getGeometryIdAt(d),h=s.getGeometryRangeAt(f,Xt);_.index=s.geometry.index,_.attributes=s.geometry.attributes,_.setDrawRange(h.start,h.count),s.getMatrixAt(d,w),w.premultiply(s.matrixWorld).premultiply(t),Yt(_,w,n),_.attributes=null}else w.copy(s.matrixWorld).premultiply(t),n.setFromObject(s,!0).applyMatrix4(t);else if(s.isInstancedMesh)s.geometry.boundingBox||s.geometry.computeBoundingBox(),s.geometry.boundingSphere||s.geometry.computeBoundingSphere(),s.getMatrixAt(d,w),w.premultiply(s.matrixWorld).premultiply(t),L.copy(s.geometry.boundingSphere).applyMatrix4(w),n.copy(s.geometry.boundingBox).applyMatrix4(w),bt(n,L);else if(s.isBatchedMesh){const f=s.getGeometryIdAt(d);s.getMatrixAt(d,w),w.premultiply(s.matrixWorld).premultiply(t),s.getBoundingSphereAt(f,L).applyMatrix4(w),s.getBoundingBoxAt(f,n).applyMatrix4(w),bt(n,L)}else n.setFromObject(s,!1).applyMatrix4(t)}_countPrimitives(e){const{includeInstances:t}=this;let n=0;return e.forEach(i=>{if(i.isInstancedMesh&&t)n+=i.count;else if(i.isBatchedMesh&&t){if(!("instanceCount"in i))throw new Error("ObjectBVH: Three.js revision >= r169 is required to use BatchedMesh.");n+=i.instanceCount}else n++}),n}_fillPrimitiveBuffer(e,t,n){const{includeInstances:i}=this;let r=0;e.forEach((c,u)=>{if(c.isInstancedMesh&&i){const l=c.count;for(let o=0;o<l;o++)n[r]=o<<t|u,r++}else if(c.isBatchedMesh&&i){const{instanceCount:l,maxInstanceCount:o}=c;let d=0,s=0;for(;d<l&&s<o;){try{c.getVisibleAt(s),n[r]=s<<t|u,d++,r++}catch{}s++}}else n[r]=u,r++})}}function St(a,e){return a&e}function Dt(a,e,t){return(a&~t)>>>e}function xe(a,e=new Set){Array.isArray(a)?a.forEach(t=>xe(t,e)):a.traverse(t=>{(t.isMesh||t.isLine||t.isPoints)&&e.add(t)})}function Yt(a,e,t){t.makeEmpty();const n=a.drawRange,i=a.index,r=a.attributes.position,c=n.start,u=i?i.count:r.count,l=Math.min(u-c,n.count);for(let o=c,d=c+l;o<d;o++){let s=o;i&&(s=i.getX(s)),E.fromBufferAttribute(r,s).applyMatrix4(e),t.expandByPoint(E)}return t}function tn(a,e,t,n,i,r){const{primitiveBuffer:c,objects:u,idMask:l,idBits:o}=t;for(let d=a,s=e+a;d<s;d++){const f=c[d],h=St(f,l),p=Dt(f,o,l),m=u[h];if(n(m,p,i,r))return!0}return!1}function bt(a,e){E.copy(e.center).addScalar(-e.radius),a.min.max(E),E.copy(e.center).addScalar(e.radius),a.max.min(E)}const $t=new b,jt=new b,Zt=new b,P=new yt,Kt=new D,H=new b,It=new b,en=["x","y","z"],ot=parseInt(Et)>=169,nn=parseInt(Et)<=161,rt=new tt,at=new tt,ct=new tt,Jt=new b,Qt=new b,te=new b;class Mn extends Pt{get primitiveStride(){return 3}constructor(e,t={}){if(!e.isMesh)throw new Error("SkinnedMeshBVH: First argument must be a Mesh.");super(e.geometry,{...t,[Ht]:!0}),this.mesh=e,t[Ht]||this.init(t)}writePrimitiveBounds(e,t,n){const{mesh:i,geometry:r}=this,c=this._indirectBuffer,u=r.index?r.index.array:null,o=(c?c[e]:e)*3;let d=o+0,s=o+1,f=o+2;u&&(d=u[d],s=u[s],f=u[f]),i.getVertexPosition(d,$t),i.getVertexPosition(s,jt),i.getVertexPosition(f,Zt);for(let h=0;h<3;h++){const p=en[h],m=$t[p],y=jt[p],x=Zt[p];let g=m;y<g&&(g=y),x<g&&(g=x);let v=m;y>v&&(v=y),x>v&&(v=x),t[n+h]=g,t[n+h+3]=v}return t}shapecast(e){const t=new Ae;return super.shapecast({...e,intersectsPrimitive:e.intersectsTriangle,scratchPrimitive:t,iterate:sn})}raycastObject3D(e,t,n=[]){const{material:i}=e;if(i===void 0)return;const{matrixWorld:r}=e,{firstHitOnly:c}=t;Kt.copy(r).invert(),P.copy(t.ray).applyMatrix4(Kt);let u=null,l=1/0;return this.shapecast({boundsTraverseOrder:o=>o.distanceToPoint(P.origin),intersectsBounds:o=>{if(c){if(!P.intersectBox(o,It))return T;let d;return o.containsPoint(P.origin)?d=0:(It.applyMatrix4(r),d=t.ray.origin.distanceTo(It)),d<l?F:T}else return P.intersectsBox(o)?F:T},intersectsTriangle:(o,d)=>{let s=null;if(i.side===ze?s=P.intersectTriangle(o.a,o.b,o.c,!0,H):i.side===Ce?s=P.intersectTriangle(o.c,o.b,o.a,!0,H):s=P.intersectTriangle(o.a,o.b,o.c,!1,H),!s)return;s=s.clone().applyMatrix4(r);const f=t.ray.origin.distanceTo(s);if(f>=t.near&&f<=t.far){if(c&&f>=l)return;const{geometry:h}=this,{index:p}=h,m=this.resolvePrimitiveIndex(d),y=m*3;let x=y+0,g=y+1,v=y+2;p&&(x=p.array[x],g=p.array[g],v=p.array[v]);const I={distance:f,point:s.clone(),object:e,uv:null,uv1:null,normal:null,face:{a:x,b:g,c:v,normal:X.getNormal(o.a,o.b,o.c,new b),materialIndex:0},faceIndex:m};if(ot){const N=new b;X.getBarycoord(H,o.a,o.b,o.c,N),I.barycoord=N}const A=h.attributes.uv,S=h.attributes.uv1,nt=h.attributes.normal;if(A){rt.fromBufferAttribute(A,x),at.fromBufferAttribute(A,g),ct.fromBufferAttribute(A,v),I.uv=new tt;const N=X.getInterpolation(H,o.a,o.b,o.c,rt,at,ct,I.uv);ot||(I.uv=N)}if(S){rt.fromBufferAttribute(S,x),at.fromBufferAttribute(S,g),ct.fromBufferAttribute(S,v),I.uv1=new tt;const N=X.getInterpolation(H,o.a,o.b,o.c,rt,at,ct,I.uv1);ot||(I.uv1=N),nn&&(I.uv2=I.uv1)}if(nt){Jt.fromBufferAttribute(nt,x),Qt.fromBufferAttribute(nt,g),te.fromBufferAttribute(nt,v),I.normal=new b;const N=X.getInterpolation(H,o.a,o.b,o.c,Jt,Qt,te,I.normal);I.normal.dot(P.direction)>0&&I.normal.multiplyScalar(-1),ot||(I.normal=N)}l=I.distance,u=I,c||n.push(I)}}}),c&&u&&n.push(u),n}}function sn(a,e,t,n,i,r,c){const{mesh:u,geometry:l}=t,o=l.index?l.index.array:null;for(let d=a,s=e+a;d<s;d++){const f=t.resolvePrimitiveIndex(d);let h=3*f+0,p=3*f+1,m=3*f+2;if(o&&(h=o[h],p=o[p],m=o[m]),u.getVertexPosition(h,c.a),u.getVertexPosition(p,c.b),u.getVertexPosition(m,c.c),c.needsUpdate=!0,n(c,d,i,r))return!0}return!1}const ee=new O,ne=new D,wt=new b;class on extends Le{get isMesh(){return!this.displayEdges}get isLineSegments(){return this.displayEdges}get isLine(){return this.displayEdges}getVertexPosition(...e){return et.prototype.getVertexPosition.call(this,...e)}constructor(e,t,n=10,i=0){super(),this.material=t,this.geometry=new k,this.name="BVHRootHelper",this.depth=n,this.displayParents=!1,this.bvh=e,this.displayEdges=!0,this._group=i}raycast(){}update(){const e=this.bvh;this.geometry.dispose(),this.visible=!1,e&&(this.geometry=this.getGeometry(e),this.visible=!0)}getGeometry(e){const t=this._group;let n=null;if(t!==-1)n=this.getBVHBoundPositions(e,t);else{const c=e._roots.map((o,d)=>this.getBVHBoundPositions(e,d)),u=c.reduce((o,d)=>o+d.length,0);n=new Float32Array(u);let l=0;c.forEach(o=>{n.set(o,l),l+=o.length})}const i=this.getBVHBoundIndices(n),r=new k;return r.setIndex(new G(i,1,!1)),r.setAttribute("position",new G(n,3,!1)),r}getBVHBoundIndices(e){const t=e.length/24;let n,i;this.displayEdges?i=new Uint8Array([0,4,1,5,2,6,3,7,0,2,1,3,4,6,5,7,0,1,2,3,4,5,6,7]):i=new Uint8Array([0,1,2,2,1,3,4,6,5,6,7,5,1,4,5,0,4,1,2,3,6,3,7,6,0,2,4,2,6,4,1,5,3,3,5,7]),e.length>65535?n=new Uint32Array(i.length*t):n=new Uint16Array(i.length*t);const r=i.length;for(let c=0;c<t;c++){const u=c*8,l=c*r;for(let o=0;o<r;o++)n[l+o]=u+i[o]}return n}getBVHBoundPositions(e,t=0,n=null){const i=this.depth-1,r=this.displayParents;let c=0;e.traverse((o,d)=>{if(o>=i||d)return c++,!0;r&&c++},t);let u=0;const l=new Float32Array(24*c);return e.traverse((o,d,s)=>{const f=o>=i||d;if(f||r){pt(0,s,ee);const{min:h,max:p}=ee;for(let m=-1;m<=1;m+=2){const y=m<0?h.x:p.x;for(let x=-1;x<=1;x+=2){const g=x<0?h.y:p.y;for(let v=-1;v<=1;v+=2){const I=v<0?h.z:p.z;wt.set(y,g,I),n&&wt.applyMatrix4(n),wt.toArray(l,u),u+=3}}}return f}},t),l}}class Ft extends ke{get color(){return this.edgeMaterial.color}get opacity(){return this.edgeMaterial.opacity}set opacity(e){this.edgeMaterial.opacity=e,this.meshMaterial.opacity=e}get objectIndex(){return console.warn('BVHHelper: "objectIndex" has been renamed "instanceId".'),this.instanceId}set objectIndex(e){console.warn('BVHHelper: "objectIndex" has been renamed "instanceId".'),this.instanceId=e}constructor(e=null,t=null,n=10){e instanceof ht&&(n=t||10,t=e,e=null),typeof t=="number"&&(n=t,t=null),super(),this.name="BVHHelper",this.depth=n,this.mesh=e,this.bvh=t,this.displayParents=!1,this.displayEdges=!0,this.instanceId=0,this._roots=[];const i=new Oe({color:65416,transparent:!0,opacity:.3,depthWrite:!1}),r=new We({color:65416,transparent:!0,opacity:.3,depthWrite:!1});r.color=i.color,this.edgeMaterial=i,this.meshMaterial=r,this.update()}update(){const e=this.mesh,t=this.instanceId;let n=this.bvh||e.boundsTree||e.geometry&&e.geometry.boundsTree||null;if(e&&e.isBatchedMesh&&e.boundsTrees&&!n&&t>=0){const r=e._drawInfo[t];r&&(n=e.boundsTrees[r.geometryIndex]||n)}const i=n?n._roots.length:0;for(;this._roots.length>i;){const r=this._roots.pop();r.geometry.dispose(),this.remove(r)}for(let r=0;r<i;r++){const{depth:c,edgeMaterial:u,meshMaterial:l,displayParents:o,displayEdges:d}=this;if(r>=this._roots.length){const f=new on(n,u,c,r);this.add(f),this._roots.push(f)}const s=this._roots[r];s.bvh=n,s.depth=c,s.displayParents=o,s.displayEdges=d,s.material=d?u:l,s.update()}}updateMatrixWorld(...e){const t=this.mesh,n=this.parent,i=this.instanceId;t!==null&&(t.updateWorldMatrix(!0,!1),n?this.matrix.copy(n.matrixWorld).invert().multiply(t.matrixWorld):this.matrix.copy(t.matrixWorld),(t.isInstancedMesh||t.isBatchedMesh)&&i>=0&&(t.getMatrixAt(i,ne),this.matrix.multiply(ne)),this.matrix.decompose(this.position,this.quaternion,this.scale)),super.updateMatrixWorld(...e)}copy(e){this.depth=e.depth,this.mesh=e.mesh,this.bvh=e.bvh,this.opacity=e.opacity,this.color.copy(e.color)}clone(){return new Ft().copy(this)}dispose(){this.edgeMaterial.dispose(),this.meshMaterial.dispose();const e=this.children;for(let t=0,n=e.length;t<n;t++)e[t].geometry.dispose()}}class Tn extends Ft{constructor(...e){console.warn("MeshBVHHelper: Class has been deprecated. Use BVHHelper instead."),super(...e)}}const Bt=new O,j=new O;function ie(a){switch(typeof a){case"number":return 8;case"string":return a.length*2;case"boolean":return 4;default:return 0}}function rn(a){return/(Uint|Int|Float)(8|16|32)Array/.test(a.constructor.name)}function an(a,e){const t={nodeCount:0,leafNodeCount:0,depth:{min:1/0,max:-1/0},primitives:{min:1/0,max:-1/0},splits:[0,0,0],surfaceAreaScore:0};return a.traverse((n,i,r,c,u)=>{const l=r[3]-r[0],o=r[4]-r[1],d=r[5]-r[2],s=2*(l*o+o*d+d*l);t.nodeCount++,i?(t.leafNodeCount++,t.depth.min=Math.min(n,t.depth.min),t.depth.max=Math.max(n,t.depth.max),t.primitives.min=Math.min(u,t.primitives.min),t.primitives.max=Math.max(u,t.primitives.max),t.surfaceAreaScore+=s*Me*u):(t.splits[c]++,t.surfaceAreaScore+=s*Te)},e),t.primitives.min===1/0&&(t.primitives.min=0,t.primitives.max=0),t.depth.min===1/0&&(t.depth.min=0,t.depth.max=0),t}function Sn(a){return a._roots.map((e,t)=>an(a,t))}function Dn(a){const e=new Set,t=[a];let n=0;for(;t.length;){const i=t.pop();if(!e.has(i)){e.add(i);for(let r in i){if(!Object.hasOwn(i,r))continue;n+=ie(r);const c=i[r];c&&(typeof c=="object"||typeof c=="function")?rn(c)||_e()&&c instanceof SharedArrayBuffer||c instanceof ArrayBuffer?n+=c.byteLength:t.push(c):n+=ie(c)}}}return n}function Pn(a){const e=[],t=new Float32Array(6);let n=!0;return a.traverse((i,r,c,u,l)=>{const o={depth:i,isLeaf:r,boundingData:c,offset:u,count:l};e[i]=o,pt(0,c,Bt);const d=e[i-1];if(r){a.writePrimitiveRangeBounds(u,l,t,0),j.min.set(t[0],t[1],t[2]),j.max.set(t[3],t[4],t[5]);const s=Bt.containsBox(j);console.assert(s,"Leaf bounds does not fully contain primitives."),n=n&&s}if(d){pt(0,d.boundingData,j);const s=j.containsBox(Bt);console.assert(s,"Parent bounds does not fully contain child."),n=n&&s}}),n}function En(a){const e=[];return a.traverse((t,n,i,r,c)=>{const u={bounds:pt(0,i,new O)};n?(u.count=c,u.offset=r):(u.left=null,u.right=null),e[t]=u;const l=e[t-1];l&&(l.left===null?l.left=u:l.right=u)}),e[0]}const cn=parseInt(Et)>=166,q={Mesh:et.prototype.raycast,Line:pe.prototype.raycast,LineSegments:fe.prototype.raycast,LineLoop:he.prototype.raycast,Points:me.prototype.raycast,BatchedMesh:qe.prototype.raycast},B=new et,lt=[];function Nn(a,e){if(this.isBatchedMesh)ln.call(this,a,e);else{const{geometry:t}=this;if(t.boundsTree)t.boundsTree.raycastObject3D(this,a,e);else{let n;if(this instanceof et)n=q.Mesh;else if(this instanceof fe)n=q.LineSegments;else if(this instanceof he)n=q.LineLoop;else if(this instanceof pe)n=q.Line;else if(this instanceof me)n=q.Points;else throw new Error("BVH: Fallback raycast function not found.");n.call(this,a,e)}}}function ln(a,e){if(this.boundsTrees){const t=this.boundsTrees,n=this._drawInfo||this._instanceInfo,i=this._drawRanges||this._geometryInfo,r=this.matrixWorld;B.material=this.material,B.geometry=this.geometry;const c=B.geometry.boundsTree,u=B.geometry.drawRange;B.geometry.boundingSphere===null&&(B.geometry.boundingSphere=new de);for(let l=0,o=n.length;l<o;l++){if(!this.getVisibleAt(l))continue;const d=n[l].geometryIndex;if(B.geometry.boundsTree=t[d],this.getMatrixAt(l,B.matrixWorld).premultiply(r),!B.geometry.boundsTree){this.getBoundingBoxAt(d,B.geometry.boundingBox),this.getBoundingSphereAt(d,B.geometry.boundingSphere);const s=i[d];B.geometry.setDrawRange(s.start,s.count)}B.raycast(a,lt);for(let s=0,f=lt.length;s<f;s++){const h=lt[s];h.object=this,h.batchId=l,e.push(h)}lt.length=0}B.geometry.boundsTree=c,B.geometry.drawRange=u,B.material=null,B.geometry=null}else q.BatchedMesh.call(this,a,e)}function Fn(a={}){const{type:e=ht}=a;return this.boundsTree=new e(this,a),this.boundsTree}function Vn(){this.boundsTree=null}function Hn(a=-1,e={}){if(!cn)throw new Error("BatchedMesh: Three r166+ is required to compute bounds trees.");e={...e,range:null};const t=this._drawRanges||this._geometryInfo,n=this._geometryCount;this.boundsTrees||(this.boundsTrees=new Array(n).fill(null));const i=this.boundsTrees;for(;i.length<n;)i.push(null);if(a<0){for(let r=0;r<n;r++)e.range=t[r],i[r]=new ht(this.geometry,e);return i}else return a<t.length&&(e.range=t[a],i[a]=new ht(this.geometry,e)),i[a]||null}function Rn(a=-1){a<0?this.boundsTrees.fill(null):a<this.boundsTrees.length&&(this.boundsTrees[a]=null)}function un(a){switch(a){case 1:return"R";case 2:return"RG";case 3:return"RGBA";case 4:return"RGBA"}throw new Error}function dn(a){switch(a){case 1:return $e;case 2:return Ye;case 3:return mt;case 4:return mt}}function se(a){switch(a){case 1:return Xe;case 2:return ye;case 3:return Tt;case 4:return Tt}}class Vt extends Mt{constructor(){super(),this.minFilter=U,this.magFilter=U,this.generateMipmaps=!1,this.overrideItemSize=null,this._forcedType=null}updateFrom(e){const t=this.overrideItemSize,n=e.itemSize,i=e.count;if(t!==null){if(n*i%t!==0)throw new Error("VertexAttributeTexture: overrideItemSize must divide evenly into buffer length.");e.itemSize=t,e.count=i*n/t}const r=e.itemSize,c=e.count,u=e.normalized,l=e.array.constructor,o=l.BYTES_PER_ELEMENT;let d=this._forcedType,s=r;if(d===null)switch(l){case Float32Array:d=J;break;case Uint8Array:case Uint16Array:case Uint32Array:d=Q;break;case Int8Array:case Int16Array:case Int32Array:d=ft;break}let f,h,p,m,y=un(r);switch(d){case J:p=1,h=dn(r),u&&o===1?(m=l,y+="8",l===Uint8Array?f=zt:(f=Ct,y+="_SNORM")):(m=Float32Array,y+="32F",f=J);break;case ft:y+=o*8+"I",p=u?Math.pow(2,l.BYTES_PER_ELEMENT*8-1):1,h=se(r),o===1?(m=Int8Array,f=Ct):o===2?(m=Int16Array,f=Ge):(m=Int32Array,f=ft);break;case Q:y+=o*8+"UI",p=u?Math.pow(2,l.BYTES_PER_ELEMENT*8-1):1,h=se(r),o===1?(m=Uint8Array,f=zt):o===2?(m=Uint16Array,f=Ue):(m=Uint32Array,f=Q);break}s===3&&(h===mt||h===Tt)&&(s=4);const x=Math.ceil(Math.sqrt(c))||1,g=s*x*x,v=new m(g),I=e.normalized;e.normalized=!1;for(let A=0;A<c;A++){const S=s*A;v[S]=e.getX(A)/p,r>=2&&(v[S+1]=e.getY(A)/p),r>=3&&(v[S+2]=e.getZ(A)/p,s===4&&(v[S+3]=1)),r>=4&&(v[S+3]=e.getW(A)/p)}e.normalized=I,this.internalFormat=y,this.format=h,this.type=f,this.image.width=x,this.image.height=x,this.image.data=v,this.needsUpdate=!0,this.dispose(),e.itemSize=n,e.count=i}}class fn extends Vt{constructor(){super(),this._forcedType=Q}}class zn extends Vt{constructor(){super(),this._forcedType=ft}}class hn extends Vt{constructor(){super(),this._forcedType=J}}class Cn{constructor(){this.index=new fn,this.position=new hn,this.bvhBounds=new Mt,this.bvhContents=new Mt,this._cachedIndexAttr=null,this.index.overrideItemSize=3}updateFrom(e){const{geometry:t}=e;if(mn(e,this.bvhBounds,this.bvhContents),this.position.updateFrom(t.attributes.position),e.indirect){const n=e._indirectBuffer;if(this._cachedIndexAttr===null||this._cachedIndexAttr.count!==n.length)if(t.index)this._cachedIndexAttr=t.index.clone();else{const i=Se(De(t));this._cachedIndexAttr=new G(i,1,!1)}pn(t,n,this._cachedIndexAttr),this.index.updateFrom(this._cachedIndexAttr)}else this.index.updateFrom(t.index)}dispose(){const{index:e,position:t,bvhBounds:n,bvhContents:i}=this;e&&e.dispose(),t&&t.dispose(),n&&n.dispose(),i&&i.dispose()}}function pn(a,e,t){const n=t.array,i=a.index?a.index.array:null;for(let r=0,c=e.length;r<c;r++){const u=3*r,l=3*e[r];for(let o=0;o<3;o++)n[u+o]=i?i[l+o]:l+o}}function mn(a,e,t){const n=a._roots;if(n.length!==1)throw new Error("MeshBVHUniformStruct: Multi-root BVHs not supported.");const i=n[0],r=new Uint16Array(i),c=new Uint32Array(i),u=new Float32Array(i),l=i.byteLength/Rt,o=2*Math.ceil(Math.sqrt(l/2)),d=new Float32Array(4*o*o),s=Math.ceil(Math.sqrt(l)),f=new Uint32Array(2*s*s);for(let h=0;h<l;h++){const p=h*Rt/4,m=p*2,y=Ve(p);for(let x=0;x<3;x++)d[8*h+0+x]=u[y+0+x],d[8*h+4+x]=u[y+3+x];if(Pe(m,r)){const x=Ee(m,r),g=Ne(p,c),v=He|x;f[h*2+0]=v,f[h*2+1]=g}else{const x=c[p+6],g=Fe(p,c);f[h*2+0]=g,f[h*2+1]=x}}e.image.data=d,e.image.width=o,e.image.height=o,e.format=mt,e.type=J,e.internalFormat="RGBA32F",e.minFilter=U,e.magFilter=U,e.generateMipmaps=!1,e.needsUpdate=!0,e.dispose(),t.image.data=f,t.image.width=s,t.image.height=s,t.format=ye,t.type=Q,t.internalFormat="RG32UI",t.minFilter=U,t.magFilter=U,t.generateMipmaps=!1,t.needsUpdate=!0,t.dispose()}const R=new b,z=new b,C=new b,oe=new Nt,ut=new b,At=new b,re=new Nt,ae=new Nt,dt=new D,ce=new D;function Z(a,e){if(!a&&!e)return;const t=a.count===e.count,n=a.normalized===e.normalized,i=a.array.constructor===e.array.constructor,r=a.itemSize===e.itemSize;if(!t||!n||!i||!r)throw new Error}function K(a,e=null){const t=a.array.constructor,n=a.normalized,i=a.itemSize,r=e===null?a.count:e;return new G(new t(i*r),i,n)}function ve(a,e,t=0){if(a.isInterleavedBufferAttribute){const n=a.itemSize;for(let i=0,r=a.count;i<r;i++){const c=i+t;e.setX(c,a.getX(i)),n>=2&&e.setY(c,a.getY(i)),n>=3&&e.setZ(c,a.getZ(i)),n>=4&&e.setW(c,a.getW(i))}}else{const n=e.array,i=n.constructor,r=n.BYTES_PER_ELEMENT*a.itemSize*t;new i(n.buffer,r,a.array.length).set(a.array)}}function yn(a,e,t){const n=a.elements,i=e.elements;for(let r=0,c=i.length;r<c;r++)n[r]+=i[r]*t}function le(a,e,t){const n=a.skeleton,i=a.geometry,r=n.bones,c=n.boneInverses;re.fromBufferAttribute(i.attributes.skinIndex,e),ae.fromBufferAttribute(i.attributes.skinWeight,e),dt.elements.fill(0);for(let u=0;u<4;u++){const l=ae.getComponent(u);if(l!==0){const o=re.getComponent(u);ce.multiplyMatrices(r[o].matrixWorld,c[o]),yn(dt,ce,l)}}return dt.multiply(a.bindMatrix).premultiply(a.bindMatrixInverse),t.transformDirection(dt),t}function _t(a,e,t,n,i){ut.set(0,0,0);for(let r=0,c=a.length;r<c;r++){const u=e[r],l=a[r];u!==0&&(At.fromBufferAttribute(l,n),t?ut.addScaledVector(At,u):ut.addScaledVector(At.sub(i),u))}i.add(ut)}function xn(a,e={useGroups:!1,updateIndex:!1,skipAttributes:[]},t=new k){const n=a[0].index!==null,{useGroups:i=!1,updateIndex:r=!1,skipAttributes:c=[]}=e,u=new Set(Object.keys(a[0].attributes)),l={};let o=0;t.clearGroups();for(let d=0;d<a.length;++d){const s=a[d];let f=0;if(n!==(s.index!==null))throw new Error("StaticGeometryGenerator: All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them.");for(const h in s.attributes){if(!u.has(h))throw new Error('StaticGeometryGenerator: All geometries must have compatible attributes; make sure "'+h+'" attribute exists among all geometries, or in none of them.');l[h]===void 0&&(l[h]=[]),l[h].push(s.attributes[h]),f++}if(f!==u.size)throw new Error("StaticGeometryGenerator: Make sure all geometries have the same number of attributes.");if(i){let h;if(n)h=s.index.count;else if(s.attributes.position!==void 0)h=s.attributes.position.count;else throw new Error("StaticGeometryGenerator: The geometry must have either an index or a position attribute");t.addGroup(o,h,d),o+=h}}if(n){let d=!1;if(!t.index){let s=0;for(let f=0;f<a.length;++f)s+=a[f].index.count;t.setIndex(new G(new Uint32Array(s),1,!1)),d=!0}if(r||d){const s=t.index;let f=0,h=0;for(let p=0;p<a.length;++p){const m=a[p],y=m.index;if(c[p]!==!0)for(let x=0;x<y.count;++x)s.setX(f,y.getX(x)+h),f++;h+=m.attributes.position.count}}}for(const d in l){const s=l[d];if(!(d in t.attributes)){let p=0;for(const m in s)p+=s[m].count;t.setAttribute(d,K(l[d][0],p))}const f=t.attributes[d];let h=0;for(let p=0,m=s.length;p<m;p++){const y=s[p];c[p]!==!0&&ve(y,f,h),h+=y.count}}return t}function vn(a,e){if(a===null||e===null)return a===e;if(a.length!==e.length)return!1;for(let t=0,n=a.length;t<n;t++)if(a[t]!==e[t])return!1;return!0}function gn(a){const{index:e,attributes:t}=a;if(e)for(let n=0,i=e.count;n<i;n+=3){const r=e.getX(n),c=e.getX(n+2);e.setX(n,c),e.setX(n+2,r)}else for(const n in t){const i=t[n],r=i.itemSize;for(let c=0,u=i.count;c<u;c+=3)for(let l=0;l<r;l++){const o=i.getComponent(c,l),d=i.getComponent(c+2,l);i.setComponent(c,l,d),i.setComponent(c+2,l,o)}}return a}class bn{constructor(e){this.matrixWorld=new D,this.geometryHash=null,this.boneMatrices=null,this.primitiveCount=-1,this.mesh=e,this.update()}update(){const e=this.mesh,t=e.geometry,n=e.skeleton,i=(t.index?t.index.count:t.attributes.position.count)/3;if(this.matrixWorld.copy(e.matrixWorld),this.geometryHash=t.attributes.position.version,this.primitiveCount=i,n){n.boneTexture||n.computeBoneTexture(),n.update();const r=n.boneMatrices;!this.boneMatrices||this.boneMatrices.length!==r.length?this.boneMatrices=r.slice():this.boneMatrices.set(r)}else this.boneMatrices=null}didChange(){const e=this.mesh,t=e.geometry,n=(t.index?t.index.count:t.attributes.position.count)/3;return!(this.matrixWorld.equals(e.matrixWorld)&&this.geometryHash===t.attributes.position.version&&vn(e.skeleton&&e.skeleton.boneMatrices||null,this.boneMatrices)&&this.primitiveCount===n)}}class kn{constructor(e){Array.isArray(e)||(e=[e]);const t=[];e.forEach(n=>{n.traverseVisible(i=>{i.isMesh&&t.push(i)})}),this.meshes=t,this.useGroups=!0,this.applyWorldTransforms=!0,this.attributes=["position","normal","color","tangent","uv","uv2"],this._intermediateGeometry=new Array(t.length).fill().map(()=>new k),this._diffMap=new WeakMap}getMaterials(){const e=[];return this.meshes.forEach(t=>{Array.isArray(t.material)?e.push(...t.material):e.push(t.material)}),e}generate(e=new k){let t=[];const{meshes:n,useGroups:i,_intermediateGeometry:r,_diffMap:c}=this;for(let u=0,l=n.length;u<l;u++){const o=n[u],d=r[u],s=c.get(o);!s||s.didChange(o)?(this._convertToStaticGeometry(o,d),t.push(!1),s?s.update():c.set(o,new bn(o))):t.push(!0)}if(r.length===0){e.setIndex(null);const u=e.attributes;for(const l in u)e.deleteAttribute(l);for(const l in this.attributes)e.setAttribute(this.attributes[l],new G(new Float32Array(0),4,!1))}else xn(r,{useGroups:i,skipAttributes:t},e);for(const u in e.attributes)e.attributes[u].needsUpdate=!0;return e}_convertToStaticGeometry(e,t=new k){const n=e.geometry,i=this.applyWorldTransforms,r=this.attributes.includes("normal"),c=this.attributes.includes("tangent"),u=n.attributes,l=t.attributes;!t.index&&n.index&&(t.index=n.index.clone()),l.position||t.setAttribute("position",K(u.position)),r&&!l.normal&&u.normal&&t.setAttribute("normal",K(u.normal)),c&&!l.tangent&&u.tangent&&t.setAttribute("tangent",K(u.tangent)),Z(n.index,t.index),Z(u.position,l.position),r&&Z(u.normal,l.normal),c&&Z(u.tangent,l.tangent);const o=u.position,d=r?u.normal:null,s=c?u.tangent:null,f=n.morphAttributes.position,h=n.morphAttributes.normal,p=n.morphAttributes.tangent,m=n.morphTargetsRelative,y=e.morphTargetInfluences,x=new je;x.getNormalMatrix(e.matrixWorld),n.index&&t.index.array.set(n.index.array);for(let g=0,v=u.position.count;g<v;g++)R.fromBufferAttribute(o,g),d&&z.fromBufferAttribute(d,g),s&&(oe.fromBufferAttribute(s,g),C.fromBufferAttribute(s,g)),y&&(f&&_t(f,y,m,g,R),h&&_t(h,y,m,g,z),p&&_t(p,y,m,g,C)),e.isSkinnedMesh&&(e.applyBoneTransform(g,R),d&&le(e,g,z),s&&le(e,g,C)),i&&R.applyMatrix4(e.matrixWorld),l.position.setXYZ(g,R.x,R.y,R.z),d&&(i&&z.applyNormalMatrix(x),l.normal.setXYZ(g,z.x,z.y,z.z)),s&&(i&&C.transformDirection(e.matrixWorld),l.tangent.setXYZW(g,C.x,C.y,C.z,oe.w));for(const g in this.attributes){const v=this.attributes[g];v==="position"||v==="tangent"||v==="normal"||!(v in u)||(l[v]||t.setAttribute(v,K(u[v])),Z(u[v],l[v]),ve(u[v],l[v]))}return e.matrixWorld.determinant()<0&&gn(t),t}}const ge=`
|
|
2
|
-
|
|
3
|
-
// A stack of uint32 indices can can store the indices for
|
|
4
|
-
// a perfectly balanced tree with a depth up to 31. Lower stack
|
|
5
|
-
// depth gets higher performance.
|
|
6
|
-
//
|
|
7
|
-
// However not all trees are balanced. Best value to set this to
|
|
8
|
-
// is the trees max depth.
|
|
9
|
-
#ifndef BVH_STACK_DEPTH
|
|
10
|
-
#define BVH_STACK_DEPTH 60
|
|
11
|
-
#endif
|
|
12
|
-
|
|
13
|
-
#ifndef INFINITY
|
|
14
|
-
#define INFINITY 1e20
|
|
15
|
-
#endif
|
|
16
|
-
|
|
17
|
-
// Utilities
|
|
18
|
-
uvec4 uTexelFetch1D( usampler2D tex, uint index ) {
|
|
19
|
-
|
|
20
|
-
uint width = uint( textureSize( tex, 0 ).x );
|
|
21
|
-
uvec2 uv;
|
|
22
|
-
uv.x = index % width;
|
|
23
|
-
uv.y = index / width;
|
|
24
|
-
|
|
25
|
-
return texelFetch( tex, ivec2( uv ), 0 );
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
ivec4 iTexelFetch1D( isampler2D tex, uint index ) {
|
|
30
|
-
|
|
31
|
-
uint width = uint( textureSize( tex, 0 ).x );
|
|
32
|
-
uvec2 uv;
|
|
33
|
-
uv.x = index % width;
|
|
34
|
-
uv.y = index / width;
|
|
35
|
-
|
|
36
|
-
return texelFetch( tex, ivec2( uv ), 0 );
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
vec4 texelFetch1D( sampler2D tex, uint index ) {
|
|
41
|
-
|
|
42
|
-
uint width = uint( textureSize( tex, 0 ).x );
|
|
43
|
-
uvec2 uv;
|
|
44
|
-
uv.x = index % width;
|
|
45
|
-
uv.y = index / width;
|
|
46
|
-
|
|
47
|
-
return texelFetch( tex, ivec2( uv ), 0 );
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
vec4 textureSampleBarycoord( sampler2D tex, vec3 barycoord, uvec3 faceIndices ) {
|
|
52
|
-
|
|
53
|
-
return
|
|
54
|
-
barycoord.x * texelFetch1D( tex, faceIndices.x ) +
|
|
55
|
-
barycoord.y * texelFetch1D( tex, faceIndices.y ) +
|
|
56
|
-
barycoord.z * texelFetch1D( tex, faceIndices.z );
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
void ndcToCameraRay(
|
|
61
|
-
vec2 coord, mat4 cameraWorld, mat4 invProjectionMatrix,
|
|
62
|
-
out vec3 rayOrigin, out vec3 rayDirection
|
|
63
|
-
) {
|
|
64
|
-
|
|
65
|
-
// get camera look direction and near plane for camera clipping
|
|
66
|
-
vec4 lookDirection = cameraWorld * vec4( 0.0, 0.0, - 1.0, 0.0 );
|
|
67
|
-
vec4 nearVector = invProjectionMatrix * vec4( 0.0, 0.0, - 1.0, 1.0 );
|
|
68
|
-
float near = abs( nearVector.z / nearVector.w );
|
|
69
|
-
|
|
70
|
-
// get the camera direction and position from camera matrices
|
|
71
|
-
vec4 origin = cameraWorld * vec4( 0.0, 0.0, 0.0, 1.0 );
|
|
72
|
-
vec4 direction = invProjectionMatrix * vec4( coord, 0.5, 1.0 );
|
|
73
|
-
direction /= direction.w;
|
|
74
|
-
direction = cameraWorld * direction - origin;
|
|
75
|
-
|
|
76
|
-
// slide the origin along the ray until it sits at the near clip plane position
|
|
77
|
-
origin.xyz += direction.xyz * near / dot( direction, lookDirection );
|
|
78
|
-
|
|
79
|
-
rayOrigin = origin.xyz;
|
|
80
|
-
rayDirection = direction.xyz;
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
`,be=`
|
|
84
|
-
|
|
85
|
-
float dot2( vec3 v ) {
|
|
86
|
-
|
|
87
|
-
return dot( v, v );
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// implementation from https://www.shadertoy.com/view/ttfGWl, though method 2 has been removed
|
|
92
|
-
// and is now available at this fork: https://www.shadertoy.com/view/WlB3zW
|
|
93
|
-
vec3 closestPointToTriangle( vec3 p, vec3 v0, vec3 v1, vec3 v2, out vec3 barycoord ) {
|
|
94
|
-
|
|
95
|
-
vec3 v10 = v1 - v0;
|
|
96
|
-
vec3 v21 = v2 - v1;
|
|
97
|
-
vec3 v02 = v0 - v2;
|
|
98
|
-
|
|
99
|
-
vec3 p0 = p - v0;
|
|
100
|
-
vec3 p1 = p - v1;
|
|
101
|
-
vec3 p2 = p - v2;
|
|
102
|
-
|
|
103
|
-
vec3 nor = cross( v10, v02 );
|
|
104
|
-
|
|
105
|
-
// method 2, in barycentric space
|
|
106
|
-
vec3 q = cross( nor, p0 );
|
|
107
|
-
float d = 1.0 / dot2( nor );
|
|
108
|
-
float u = d * dot( q, v02 );
|
|
109
|
-
float v = d * dot( q, v10 );
|
|
110
|
-
float w = 1.0 - u - v;
|
|
111
|
-
|
|
112
|
-
if( u < 0.0 ) {
|
|
113
|
-
|
|
114
|
-
w = clamp( dot( p2, v02 ) / dot2( v02 ), 0.0, 1.0 );
|
|
115
|
-
u = 0.0;
|
|
116
|
-
v = 1.0 - w;
|
|
117
|
-
|
|
118
|
-
} else if( v < 0.0 ) {
|
|
119
|
-
|
|
120
|
-
u = clamp( dot( p0, v10 ) / dot2( v10 ), 0.0, 1.0 );
|
|
121
|
-
v = 0.0;
|
|
122
|
-
w = 1.0 - u;
|
|
123
|
-
|
|
124
|
-
} else if( w < 0.0 ) {
|
|
125
|
-
|
|
126
|
-
v = clamp( dot( p1, v21 ) / dot2( v21 ), 0.0, 1.0 );
|
|
127
|
-
w = 0.0;
|
|
128
|
-
u = 1.0 - v;
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
// output the barycoord in v0, v1, v2 weight order
|
|
133
|
-
barycoord = vec3( w, u, v );
|
|
134
|
-
return u * v1 + v * v2 + w * v0;
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
float distanceToTriangles(
|
|
139
|
-
// geometry info and triangle range
|
|
140
|
-
sampler2D positionAttr, usampler2D indexAttr, uint offset, uint count,
|
|
141
|
-
|
|
142
|
-
// point and cut off range
|
|
143
|
-
vec3 point, float closestDistanceSquared,
|
|
144
|
-
|
|
145
|
-
// outputs
|
|
146
|
-
inout uvec4 faceIndices, inout vec3 faceNormal, inout vec3 barycoord, inout float side, inout vec3 outPoint
|
|
147
|
-
) {
|
|
148
|
-
|
|
149
|
-
bool found = false;
|
|
150
|
-
vec3 localBarycoord;
|
|
151
|
-
for ( uint i = offset, l = offset + count; i < l; i ++ ) {
|
|
152
|
-
|
|
153
|
-
uvec3 indices = uTexelFetch1D( indexAttr, i ).xyz;
|
|
154
|
-
vec3 a = texelFetch1D( positionAttr, indices.x ).rgb;
|
|
155
|
-
vec3 b = texelFetch1D( positionAttr, indices.y ).rgb;
|
|
156
|
-
vec3 c = texelFetch1D( positionAttr, indices.z ).rgb;
|
|
157
|
-
|
|
158
|
-
// get the closest point and barycoord
|
|
159
|
-
vec3 closestPoint = closestPointToTriangle( point, a, b, c, localBarycoord );
|
|
160
|
-
vec3 delta = point - closestPoint;
|
|
161
|
-
float sqDist = dot2( delta );
|
|
162
|
-
if ( sqDist < closestDistanceSquared ) {
|
|
163
|
-
|
|
164
|
-
// set the output results
|
|
165
|
-
closestDistanceSquared = sqDist;
|
|
166
|
-
faceIndices = uvec4( indices.xyz, i );
|
|
167
|
-
faceNormal = normalize( cross( a - b, b - c ) );
|
|
168
|
-
barycoord = localBarycoord;
|
|
169
|
-
outPoint = closestPoint;
|
|
170
|
-
side = sign( dot( faceNormal, delta ) );
|
|
171
|
-
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
return closestDistanceSquared;
|
|
177
|
-
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
float distanceSqToBounds( vec3 point, vec3 boundsMin, vec3 boundsMax ) {
|
|
181
|
-
|
|
182
|
-
vec3 clampedPoint = clamp( point, boundsMin, boundsMax );
|
|
183
|
-
vec3 delta = point - clampedPoint;
|
|
184
|
-
return dot( delta, delta );
|
|
185
|
-
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
float distanceSqToBVHNodeBoundsPoint( vec3 point, sampler2D bvhBounds, uint currNodeIndex ) {
|
|
189
|
-
|
|
190
|
-
uint cni2 = currNodeIndex * 2u;
|
|
191
|
-
vec3 boundsMin = texelFetch1D( bvhBounds, cni2 ).xyz;
|
|
192
|
-
vec3 boundsMax = texelFetch1D( bvhBounds, cni2 + 1u ).xyz;
|
|
193
|
-
return distanceSqToBounds( point, boundsMin, boundsMax );
|
|
194
|
-
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
// use a macro to hide the fact that we need to expand the struct into separate fields
|
|
198
|
-
#define bvhClosestPointToPoint( bvh, point, maxDistance, faceIndices, faceNormal, barycoord, side, outPoint ) _bvhClosestPointToPoint( bvh.position, bvh.index, bvh.bvhBounds, bvh.bvhContents, point, maxDistance, faceIndices, faceNormal, barycoord, side, outPoint )
|
|
199
|
-
|
|
200
|
-
float _bvhClosestPointToPoint(
|
|
201
|
-
// bvh info
|
|
202
|
-
sampler2D bvh_position, usampler2D bvh_index, sampler2D bvh_bvhBounds, usampler2D bvh_bvhContents,
|
|
203
|
-
|
|
204
|
-
// point to check
|
|
205
|
-
vec3 point, float maxDistance,
|
|
206
|
-
|
|
207
|
-
// output variables
|
|
208
|
-
inout uvec4 faceIndices, inout vec3 faceNormal, inout vec3 barycoord,
|
|
209
|
-
inout float side, inout vec3 outPoint
|
|
210
|
-
) {
|
|
211
|
-
|
|
212
|
-
// stack needs to be twice as long as the deepest tree we expect because
|
|
213
|
-
// we push both the left and right child onto the stack every traversal
|
|
214
|
-
int pointer = 0;
|
|
215
|
-
uint stack[ BVH_STACK_DEPTH ];
|
|
216
|
-
stack[ 0 ] = 0u;
|
|
217
|
-
|
|
218
|
-
float closestDistanceSquared = maxDistance * maxDistance;
|
|
219
|
-
bool found = false;
|
|
220
|
-
while ( pointer > - 1 && pointer < BVH_STACK_DEPTH ) {
|
|
221
|
-
|
|
222
|
-
uint currNodeIndex = stack[ pointer ];
|
|
223
|
-
pointer --;
|
|
224
|
-
|
|
225
|
-
// check if we intersect the current bounds
|
|
226
|
-
float boundsHitDistance = distanceSqToBVHNodeBoundsPoint( point, bvh_bvhBounds, currNodeIndex );
|
|
227
|
-
if ( boundsHitDistance > closestDistanceSquared ) {
|
|
228
|
-
|
|
229
|
-
continue;
|
|
230
|
-
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
uvec2 boundsInfo = uTexelFetch1D( bvh_bvhContents, currNodeIndex ).xy;
|
|
234
|
-
bool isLeaf = bool( boundsInfo.x & 0xffff0000u );
|
|
235
|
-
if ( isLeaf ) {
|
|
236
|
-
|
|
237
|
-
uint count = boundsInfo.x & 0x0000ffffu;
|
|
238
|
-
uint offset = boundsInfo.y;
|
|
239
|
-
closestDistanceSquared = distanceToTriangles(
|
|
240
|
-
bvh_position, bvh_index, offset, count, point, closestDistanceSquared,
|
|
241
|
-
|
|
242
|
-
// outputs
|
|
243
|
-
faceIndices, faceNormal, barycoord, side, outPoint
|
|
244
|
-
);
|
|
245
|
-
|
|
246
|
-
} else {
|
|
247
|
-
|
|
248
|
-
uint leftIndex = currNodeIndex + 1u;
|
|
249
|
-
uint splitAxis = boundsInfo.x & 0x0000ffffu;
|
|
250
|
-
uint rightIndex = currNodeIndex + boundsInfo.y;
|
|
251
|
-
bool leftToRight = distanceSqToBVHNodeBoundsPoint( point, bvh_bvhBounds, leftIndex ) < distanceSqToBVHNodeBoundsPoint( point, bvh_bvhBounds, rightIndex );//rayDirection[ splitAxis ] >= 0.0;
|
|
252
|
-
uint c1 = leftToRight ? leftIndex : rightIndex;
|
|
253
|
-
uint c2 = leftToRight ? rightIndex : leftIndex;
|
|
254
|
-
|
|
255
|
-
// set c2 in the stack so we traverse it later. We need to keep track of a pointer in
|
|
256
|
-
// the stack while we traverse. The second pointer added is the one that will be
|
|
257
|
-
// traversed first
|
|
258
|
-
pointer ++;
|
|
259
|
-
stack[ pointer ] = c2;
|
|
260
|
-
pointer ++;
|
|
261
|
-
stack[ pointer ] = c1;
|
|
262
|
-
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
return sqrt( closestDistanceSquared );
|
|
268
|
-
|
|
269
|
-
}
|
|
270
|
-
`,Ie=`
|
|
271
|
-
|
|
272
|
-
#ifndef TRI_INTERSECT_EPSILON
|
|
273
|
-
#define TRI_INTERSECT_EPSILON 1e-5
|
|
274
|
-
#endif
|
|
275
|
-
|
|
276
|
-
// Raycasting
|
|
277
|
-
bool intersectsBounds( vec3 rayOrigin, vec3 rayDirection, vec3 boundsMin, vec3 boundsMax, out float dist ) {
|
|
278
|
-
|
|
279
|
-
// https://www.reddit.com/r/opengl/comments/8ntzz5/fast_glsl_ray_box_intersection/
|
|
280
|
-
// https://tavianator.com/2011/ray_box.html
|
|
281
|
-
vec3 invDir = 1.0 / rayDirection;
|
|
282
|
-
|
|
283
|
-
// find intersection distances for each plane
|
|
284
|
-
vec3 tMinPlane = invDir * ( boundsMin - rayOrigin );
|
|
285
|
-
vec3 tMaxPlane = invDir * ( boundsMax - rayOrigin );
|
|
286
|
-
|
|
287
|
-
// get the min and max distances from each intersection
|
|
288
|
-
vec3 tMinHit = min( tMaxPlane, tMinPlane );
|
|
289
|
-
vec3 tMaxHit = max( tMaxPlane, tMinPlane );
|
|
290
|
-
|
|
291
|
-
// get the furthest hit distance
|
|
292
|
-
vec2 t = max( tMinHit.xx, tMinHit.yz );
|
|
293
|
-
float t0 = max( t.x, t.y );
|
|
294
|
-
|
|
295
|
-
// get the minimum hit distance
|
|
296
|
-
t = min( tMaxHit.xx, tMaxHit.yz );
|
|
297
|
-
float t1 = min( t.x, t.y );
|
|
298
|
-
|
|
299
|
-
// set distance to 0.0 if the ray starts inside the box
|
|
300
|
-
dist = max( t0, 0.0 );
|
|
301
|
-
|
|
302
|
-
return t1 >= dist;
|
|
303
|
-
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
bool intersectsTriangle(
|
|
307
|
-
vec3 rayOrigin, vec3 rayDirection, vec3 a, vec3 b, vec3 c,
|
|
308
|
-
out vec3 barycoord, out vec3 norm, out float dist, out float side
|
|
309
|
-
) {
|
|
310
|
-
|
|
311
|
-
// https://stackoverflow.com/questions/42740765/intersection-between-line-and-triangle-in-3d
|
|
312
|
-
vec3 edge1 = b - a;
|
|
313
|
-
vec3 edge2 = c - a;
|
|
314
|
-
norm = cross( edge1, edge2 );
|
|
315
|
-
|
|
316
|
-
float det = - dot( rayDirection, norm );
|
|
317
|
-
float invdet = 1.0 / det;
|
|
318
|
-
|
|
319
|
-
vec3 AO = rayOrigin - a;
|
|
320
|
-
vec3 DAO = cross( AO, rayDirection );
|
|
321
|
-
|
|
322
|
-
vec4 uvt;
|
|
323
|
-
uvt.x = dot( edge2, DAO ) * invdet;
|
|
324
|
-
uvt.y = - dot( edge1, DAO ) * invdet;
|
|
325
|
-
uvt.z = dot( AO, norm ) * invdet;
|
|
326
|
-
uvt.w = 1.0 - uvt.x - uvt.y;
|
|
327
|
-
|
|
328
|
-
// set the hit information
|
|
329
|
-
barycoord = uvt.wxy; // arranged in A, B, C order
|
|
330
|
-
dist = uvt.z;
|
|
331
|
-
side = sign( det );
|
|
332
|
-
norm = side * normalize( norm );
|
|
333
|
-
|
|
334
|
-
// add an epsilon to avoid misses between triangles
|
|
335
|
-
uvt += vec4( TRI_INTERSECT_EPSILON );
|
|
336
|
-
|
|
337
|
-
return all( greaterThanEqual( uvt, vec4( 0.0 ) ) );
|
|
338
|
-
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
bool intersectTriangles(
|
|
342
|
-
// geometry info and triangle range
|
|
343
|
-
sampler2D positionAttr, usampler2D indexAttr, uint offset, uint count,
|
|
344
|
-
|
|
345
|
-
// ray
|
|
346
|
-
vec3 rayOrigin, vec3 rayDirection,
|
|
347
|
-
|
|
348
|
-
// outputs
|
|
349
|
-
inout float minDistance, inout uvec4 faceIndices, inout vec3 faceNormal, inout vec3 barycoord,
|
|
350
|
-
inout float side, inout float dist
|
|
351
|
-
) {
|
|
352
|
-
|
|
353
|
-
bool found = false;
|
|
354
|
-
vec3 localBarycoord, localNormal;
|
|
355
|
-
float localDist, localSide;
|
|
356
|
-
for ( uint i = offset, l = offset + count; i < l; i ++ ) {
|
|
357
|
-
|
|
358
|
-
uvec3 indices = uTexelFetch1D( indexAttr, i ).xyz;
|
|
359
|
-
vec3 a = texelFetch1D( positionAttr, indices.x ).rgb;
|
|
360
|
-
vec3 b = texelFetch1D( positionAttr, indices.y ).rgb;
|
|
361
|
-
vec3 c = texelFetch1D( positionAttr, indices.z ).rgb;
|
|
362
|
-
|
|
363
|
-
if (
|
|
364
|
-
intersectsTriangle( rayOrigin, rayDirection, a, b, c, localBarycoord, localNormal, localDist, localSide )
|
|
365
|
-
&& localDist < minDistance
|
|
366
|
-
) {
|
|
367
|
-
|
|
368
|
-
found = true;
|
|
369
|
-
minDistance = localDist;
|
|
370
|
-
|
|
371
|
-
faceIndices = uvec4( indices.xyz, i );
|
|
372
|
-
faceNormal = localNormal;
|
|
373
|
-
|
|
374
|
-
side = localSide;
|
|
375
|
-
barycoord = localBarycoord;
|
|
376
|
-
dist = localDist;
|
|
377
|
-
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
return found;
|
|
383
|
-
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
bool intersectsBVHNodeBounds( vec3 rayOrigin, vec3 rayDirection, sampler2D bvhBounds, uint currNodeIndex, out float dist ) {
|
|
387
|
-
|
|
388
|
-
uint cni2 = currNodeIndex * 2u;
|
|
389
|
-
vec3 boundsMin = texelFetch1D( bvhBounds, cni2 ).xyz;
|
|
390
|
-
vec3 boundsMax = texelFetch1D( bvhBounds, cni2 + 1u ).xyz;
|
|
391
|
-
return intersectsBounds( rayOrigin, rayDirection, boundsMin, boundsMax, dist );
|
|
392
|
-
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
// use a macro to hide the fact that we need to expand the struct into separate fields
|
|
396
|
-
#define bvhIntersectFirstHit( bvh, rayOrigin, rayDirection, faceIndices, faceNormal, barycoord, side, dist ) _bvhIntersectFirstHit( bvh.position, bvh.index, bvh.bvhBounds, bvh.bvhContents, rayOrigin, rayDirection, faceIndices, faceNormal, barycoord, side, dist )
|
|
397
|
-
|
|
398
|
-
bool _bvhIntersectFirstHit(
|
|
399
|
-
// bvh info
|
|
400
|
-
sampler2D bvh_position, usampler2D bvh_index, sampler2D bvh_bvhBounds, usampler2D bvh_bvhContents,
|
|
401
|
-
|
|
402
|
-
// ray
|
|
403
|
-
vec3 rayOrigin, vec3 rayDirection,
|
|
404
|
-
|
|
405
|
-
// output variables split into separate variables due to output precision
|
|
406
|
-
inout uvec4 faceIndices, inout vec3 faceNormal, inout vec3 barycoord,
|
|
407
|
-
inout float side, inout float dist
|
|
408
|
-
) {
|
|
409
|
-
|
|
410
|
-
// stack needs to be twice as long as the deepest tree we expect because
|
|
411
|
-
// we push both the left and right child onto the stack every traversal
|
|
412
|
-
int pointer = 0;
|
|
413
|
-
uint stack[ BVH_STACK_DEPTH ];
|
|
414
|
-
stack[ 0 ] = 0u;
|
|
415
|
-
|
|
416
|
-
float triangleDistance = INFINITY;
|
|
417
|
-
bool found = false;
|
|
418
|
-
while ( pointer > - 1 && pointer < BVH_STACK_DEPTH ) {
|
|
419
|
-
|
|
420
|
-
uint currNodeIndex = stack[ pointer ];
|
|
421
|
-
pointer --;
|
|
422
|
-
|
|
423
|
-
// check if we intersect the current bounds
|
|
424
|
-
float boundsHitDistance;
|
|
425
|
-
if (
|
|
426
|
-
! intersectsBVHNodeBounds( rayOrigin, rayDirection, bvh_bvhBounds, currNodeIndex, boundsHitDistance )
|
|
427
|
-
|| boundsHitDistance > triangleDistance
|
|
428
|
-
) {
|
|
429
|
-
|
|
430
|
-
continue;
|
|
431
|
-
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
uvec2 boundsInfo = uTexelFetch1D( bvh_bvhContents, currNodeIndex ).xy;
|
|
435
|
-
bool isLeaf = bool( boundsInfo.x & 0xffff0000u );
|
|
436
|
-
|
|
437
|
-
if ( isLeaf ) {
|
|
438
|
-
|
|
439
|
-
uint count = boundsInfo.x & 0x0000ffffu;
|
|
440
|
-
uint offset = boundsInfo.y;
|
|
441
|
-
|
|
442
|
-
found = intersectTriangles(
|
|
443
|
-
bvh_position, bvh_index, offset, count,
|
|
444
|
-
rayOrigin, rayDirection, triangleDistance,
|
|
445
|
-
faceIndices, faceNormal, barycoord, side, dist
|
|
446
|
-
) || found;
|
|
447
|
-
|
|
448
|
-
} else {
|
|
449
|
-
|
|
450
|
-
uint leftIndex = currNodeIndex + 1u;
|
|
451
|
-
uint splitAxis = boundsInfo.x & 0x0000ffffu;
|
|
452
|
-
uint rightIndex = currNodeIndex + boundsInfo.y;
|
|
453
|
-
|
|
454
|
-
bool leftToRight = rayDirection[ splitAxis ] >= 0.0;
|
|
455
|
-
uint c1 = leftToRight ? leftIndex : rightIndex;
|
|
456
|
-
uint c2 = leftToRight ? rightIndex : leftIndex;
|
|
457
|
-
|
|
458
|
-
// set c2 in the stack so we traverse it later. We need to keep track of a pointer in
|
|
459
|
-
// the stack while we traverse. The second pointer added is the one that will be
|
|
460
|
-
// traversed first
|
|
461
|
-
pointer ++;
|
|
462
|
-
stack[ pointer ] = c2;
|
|
463
|
-
|
|
464
|
-
pointer ++;
|
|
465
|
-
stack[ pointer ] = c1;
|
|
466
|
-
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
return found;
|
|
472
|
-
|
|
473
|
-
}
|
|
474
|
-
`,we=`
|
|
475
|
-
struct BVH {
|
|
476
|
-
|
|
477
|
-
usampler2D index;
|
|
478
|
-
sampler2D position;
|
|
479
|
-
|
|
480
|
-
sampler2D bvhBounds;
|
|
481
|
-
usampler2D bvhContents;
|
|
482
|
-
|
|
483
|
-
};
|
|
484
|
-
`,On=Object.freeze(Object.defineProperty({__proto__:null,bvh_distance_functions:be,bvh_ray_functions:Ie,bvh_struct_definitions:we,common_functions:ge},Symbol.toStringTag,{value:"Module"})),Wn=we,Ln=be,qn=`
|
|
485
|
-
${ge}
|
|
486
|
-
${Ie}
|
|
487
|
-
`;export{Xn as AVERAGE,Be as BVH,Ft as BVHHelper,On as BVHShaderGLSL,Yn as CENTER,$n as CONTAINED,Ae as ExtendedTriangle,hn as FloatVertexAttributeTexture,Pt as GeometryBVH,F as INTERSECTED,zn as IntVertexAttributeTexture,Bn as LineBVH,Ke as LineLoopBVH,Ze as LineSegmentsBVH,ht as MeshBVH,Tn as MeshBVHHelper,Cn as MeshBVHUniformStruct,T as NOT_INTERSECTED,_n as ObjectBVH,jn as OrientedBox,An as PointsBVH,Zn as SAH,Ht as SKIP_GENERATION,Mn as SkinnedMeshBVH,kn as StaticGeometryGenerator,fn as UIntVertexAttributeTexture,Vt as VertexAttributeTexture,Nn as acceleratedRaycast,Hn as computeBatchedBoundsTree,Fn as computeBoundsTree,Rn as disposeBatchedBoundsTree,Vn as disposeBoundsTree,Dn as estimateMemoryInBytes,Kn as generateIndirectBuffer,Sn as getBVHExtremes,En as getJSONStructure,Jn as getTriangleHitPointInfo,Ln as shaderDistanceFunction,qn as shaderIntersectFunction,Wn as shaderStructs,Pn as validateBounds};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{V as d,E as a,d7 as c,d8 as p,d9 as m,da as l,aS as u}from"./index-GIL7oGEO.js";import{h as f,f as I,a as E}from"./active-ingest-CT6jSGhr.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"./game-contract-seams-a5YXejOu.js";import"./capability-coverage-Czas4C18.js";import"./ingest-source-persistence-C_6Hiyra.js";import"./playtest-BXIL1JEF.js";function k(s){const o=E();if(o){if(!f())throw new Error(`Ingest "${o.worldId}" mounted without the required pause capability; refusing to expose a running game in Edit — ${I()??"no lifecycle control was bound"}.`);d.log(`Ingest "${o.worldId}" is HELD — content time does not advance in Edit until ▶`,"ingest")}s.setActiveViewportTab("edit");const e=u(),i=a()?.scenes.default,n=i?l(i):void 0,r=(n?e.find(t=>t.descriptor.id===n):void 0)??e.find(t=>t.descriptor.id===c)??e.find(t=>t.descriptor.id===p);r&&m(r.descriptor.id)}export{k as landIngestBootInEdit};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{aj as v,V as g,bw as b,bv as R,db as S,dc as E,b$ as f}from"./index-GIL7oGEO.js";import{w}from"./mounted-authoring-Dmg5xmhP.js";import{PixiAuthoringAdapter as k}from"./pixi-authoring-adapter-CjibysC3.js";import{createLiveCanvasWriteTarget as A}from"./pixi-live-write-target-DuWydlWb.js";import{resolveCanvasPixiForEditor as $}from"./canvas-entry-runtime-SfBxaR9M.js";import{C as x}from"./crash-null-boundary-v3a0uEgw.js";import{a as l}from"./json-history-resource-BbxllWfV.js";import{a as C}from"./realm-services-CobQsq_X.js";import{r as I}from"./react-root-CEz5NTck.js";import{D as P}from"./dom-authoring-adapter-CY8C7f4T.js";import{w as D,R as M}from"./react-world-authoring-adapter-DmrwM3py.js";import{createPhysics2DRegistry as j}from"./physics-registry-B2Jkp8e6.js";import{createPhysicsAdapter2D as W}from"./system-adapters-rIC8FSGP.js";import{s as z}from"./three-authoring-adapter-CmSQ3Vui.js";import{r as h}from"./index-nmcBqr7Y.js";import{r as B}from"./index-CtzuWnCS.js";import{a as F}from"./client-DNXj_opT.js";import{mountModuleRootRuntime as O}from"./module-mode-DVBLT9d-.js";import"./jsx-runtime-DPjLkJKQ.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./index-FUuS4qwW.js";import"./three.module-D396a9Mn.js";import"./authoring-CgcOFhGS.js";import"./source-persistence-backend-C-aR-B_Y.js";import"./ingest-source-persistence-C_6Hiyra.js";import"./pixi-transform-channels-VjdohT11.js";import"./index-D_NuPfjr.js";import"./index-CinJrH5C.js";import"./world-state-BWG-IcOd.js";import"./debug-registry-Dgvitx8M.js";import"./frame-selector-cache-cCeUbcjG.js";import"./three-ingest-runtime-QzDYk6tU.js";import"./EffectComposer-DQxfsXBZ.js";import"./CopyShader-BzTUYzf6.js";import"./ShaderPass-QYRpPuFJ.js";import"./CSS3DRenderer-CL7ABLVK.js";import"./inspect-BZfi3mmo.js";import"./inference-diagnostics-Dhmtfbq_.js";import"./board-guides-DziKSTss.js";import"./writer-B-KovzkA.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./three-projection-core-BmKMZ-nf.js";import"./three-CDSueJyJ.js";import"./viewport-pick-context-DkawXbEi.js";import"./body-marks-h_xDxiDE.js";import"./user-data-BB2Of6Ht.js";import"./object-marks-DwvIEBOK.js";import"./structural-ids-Dc-7rEwi.js";import"./object3d-authoring-subject-CH5sI2oP.js";import"./rapier-physics-adapter-CaZqWLu0.js";import"./r3f-physics-binding-BBo8oma9.js";import"./capability-coverage-Czas4C18.js";import"./game-contract-seams-a5YXejOu.js";import"./binding-resolver-Dsh-6Vor.js";import"./native-debug-module-CWicoSGD.js";import"./native-entry-surface-BE8LJNdu.js";import"./playtest-BXIL1JEF.js";import"./adapter-surface-Y37Nzcyw.js";import"./entry-adjudication-Cq8Yeb74.js";import"./r3f-root-factory-z9llD1OU.js";import"./register-render-vitals-BiZk29b2.js";import"./render-census-BrQX_CXv.js";import"./structural-signature-0w-i_ats.js";import"./render-vitals-BZ5HtvMi.js";import"./static-batch-advisor-B13QEH7d.js";import"./webgl-frame-capture-FlF9zQmW.js";import"./dev-build-gDYrq68M.js";import"./game-input-seams-CIQdetRw.js";import"./seeded-random-i3mtgBKZ.js";import"./render-seed-DF4JHy7P.js";import"./frame-delta-D2nsw_Ht.js";import"./events-156d8d12.esm-ErOhDXXB.js";import"./index-bQE2NA0D.js";import"./relative-path-guard-GiM7Lsz8.js";function y(t,i,n){t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%",t.style.zIndex=String(i.zOrder??0),t.style.pointerEvents=n}async function T(t,i,n,m){const r=await C(n,S()),a=await I(t,r),e=document.createElement("div");e.dataset.vgaiRootSurface="true",y(e,t,"none"),i.appendChild(e),g.log(`react sibling "${t.id}": no native Game beside an ingest world — useWorldState unavailable`,"ingest");const u=F.createRoot(e);let s=null;if(B.flushSync(()=>{u.render(h.createElement(x,{onCaught:c=>{s=c}},h.createElement(a)))}),s!==null)throw u.unmount(),e.remove(),s instanceof Error?s:new Error(String(s));let o;if(m)if(D(e).nodes.size>0){const p=E("An ingest sibling’s react layer");o=new M(e,m,{...p?{writeBackend:p}:{}})}else o=new P(e,m,{journal:l(t.id)});return{worldId:t.id,...o?{authoring:o}:{},dispose(){u.unmount(),e.remove()}}}async function L(t,i,n,m,r){const a=document.createElement("div");y(a,i,"auto"),n.appendChild(a);try{const e=n.clientWidth||800,u=n.clientHeight||600,{session:s}=await O(t,i,m,a,e,u),o=s.game.roots[0],c=o.mounted.authoring;let p;if(r)if(c)p=w(c,r);else if(o.kind==="three")p=z(r,o.threeScene(),{frameControl:"host",journal:l(i.id)});else if(o.kind==="canvas")if(o.mounted.kind!=="canvas"||o.mounted.substrate.name!=="pixi")p=o.mounted.authoring??f(r,`${i.id} (${o.mounted.kind==="canvas"?o.mounted.substrate.name:"unknown"} authoring unavailable)`);else{const d=W(o.physics2d??j());p=new k(o.canvasRoot(),r,{pixi:await $(),target:A({physics:d}),journal:l(i.id),surface:()=>a})}else p=f(r,`${i.id} (no authoring surface)`);return{worldId:i.id,...p?{authoring:p}:{},setPaused(d){d?s.pause():s.resume()},dispose(){s.stop(),a.remove()}}}catch(e){throw a.remove(),e}}function N(t){throw new Error(`sibling world "${t.id}" (kind: ${t.surface}, adapter identity: "${t.adapter.identity}") has no known composite-sibling mount path — every currently-resolvable identity (three/canvas/dom/module) is routed above; this is reached only for a genuinely unroutable shape.`)}function G(t){return t.adapter.type==="module"||t.adapter.identity==="three"||t.adapter.identity==="canvas"?"scoped-runtime":t.adapter.identity==="dom"?"react-layer":null}async function H(t,i,n,m,r){switch(G(i)){case"scoped-runtime":return L(t,i,n,m,r);case"react-layer":return T(i,n,m,r);default:N(i)}}async function ue(t,i,n,m,r){const a=[];for(const e of v(t))if(e.id!==i)try{a.push(await H(t,e,n,m,r))}catch(u){g.error(`Composite sibling "${e.id}" failed to mount: ${u}`,"ingest"),b({worldId:e.id,kind:e.surface,identity:e.adapter.identity,message:R(u)})}return a}export{ue as mountIngestSiblings,G as siblingMountRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ak as m}from"./index-GIL7oGEO.js";import{a as p,i as e,s as n,b as s}from"./play-mode-BFU2PCkG.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"./native-debug-module-CWicoSGD.js";import"./native-entry-surface-BE8LJNdu.js";import"./debug-registry-Dgvitx8M.js";import"./playtest-BXIL1JEF.js";import"./game-contract-seams-a5YXejOu.js";import"./instruments-CKR02Y8I.js";import"./frame-pacing-D5acoOzO.js";import"./edit-mode-authoring-B47TfLqu.js";import"./json-history-resource-BbxllWfV.js";import"./binding-resolver-Dsh-6Vor.js";import"./adapter-surface-Y37Nzcyw.js";import"./entry-adjudication-Cq8Yeb74.js";import"./r3f-root-factory-z9llD1OU.js";import"./register-render-vitals-BiZk29b2.js";import"./render-census-BrQX_CXv.js";import"./structural-signature-0w-i_ats.js";import"./render-vitals-BZ5HtvMi.js";import"./static-batch-advisor-B13QEH7d.js";import"./webgl-frame-capture-FlF9zQmW.js";import"./world-state-BWG-IcOd.js";import"./frame-selector-cache-cCeUbcjG.js";import"./dev-build-gDYrq68M.js";import"./game-input-seams-CIQdetRw.js";import"./seeded-random-i3mtgBKZ.js";import"./render-seed-DF4JHy7P.js";import"./frame-delta-D2nsw_Ht.js";import"./events-156d8d12.esm-ErOhDXXB.js";import"./index-bQE2NA0D.js";import"./realm-services-CobQsq_X.js";import"./canvas-entry-runtime-SfBxaR9M.js";import"./three-ingest-runtime-QzDYk6tU.js";import"./EffectComposer-DQxfsXBZ.js";import"./CopyShader-BzTUYzf6.js";import"./ShaderPass-QYRpPuFJ.js";import"./CSS3DRenderer-CL7ABLVK.js";import"./relative-path-guard-GiM7Lsz8.js";import"./capability-coverage-Czas4C18.js";import"./react-root-CEz5NTck.js";import"./editor-presentation-activity-C7SNSmTd.js";import"./active-ingest-CT6jSGhr.js";import"./ingest-source-persistence-C_6Hiyra.js";import"./pixi-story-model-DNkfnWUV.js";import"./surface-content-Dg9Kkazf.js";import"./viewport-root-presentation-CWsE56K6.js";import"./mounted-authoring-Dmg5xmhP.js";import"./three-CDSueJyJ.js";import"./viewport-pick-context-DkawXbEi.js";import"./logger-Dqis-7W1.js";import"./run-ticks-settled-C4ksViyA.js";import"./three-authoring-adapter-CmSQ3Vui.js";import"./source-persistence-backend-C-aR-B_Y.js";import"./three-projection-core-BmKMZ-nf.js";import"./body-marks-h_xDxiDE.js";import"./user-data-BB2Of6Ht.js";import"./object-marks-DwvIEBOK.js";import"./structural-ids-Dc-7rEwi.js";import"./object3d-authoring-subject-CH5sI2oP.js";import"./rapier-physics-adapter-CaZqWLu0.js";import"./r3f-physics-binding-BBo8oma9.js";import"./deferred-ingest-play-DCJi_Pgu.js";import"./rrweb-Cd2ifIRP.js";import"./react-world-authoring-adapter-DmrwM3py.js";import"./board-guides-DziKSTss.js";import"./writer-B-KovzkA.js";import"./story-arg-descriptors-Ek86ExX7.js";import"./inspect-BZfi3mmo.js";import"./inference-diagnostics-Dhmtfbq_.js";const $t="workspace.command",a=()=>({ok:!1,error:"not in play mode — start play before using the debug seam"}),jt={"set-instance-count":{derivedRefresh:"always",handle:o=>{if(!e())return a();const r=o.names;if(Array.isArray(r)&&r.every(i=>typeof i=="string"))return r.length<1?{ok:!1,error:'set-instance-count "names" must have at least one entry.'}:(n(r),{ok:!0});const t=o.count;return typeof t!="number"||!Number.isFinite(t)||t<1?{ok:!1,error:`set-instance-count requires a whole "count" >= 1 (or a "names" array), got ${String(t)}.`}:(s(Math.floor(t)-1),{ok:!0})}},"list-instances":{derivedRefresh:"if-content-changed",handle:()=>({ok:!0,data:{instances:m(),named:p()}})}};export{jt as commands,$t as point};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{RectAreaLightUniformsLib as s}from"./RectAreaLightUniformsLib-CMMoWfll.js";import{DEFAULTS as c}from"./defaults-DKiBJCPN.js";import{ar as h,x as g,D as n,bE as p,bF as m,bG as u,bH as l}from"./three.module-D396a9Mn.js";let o=!1;function b(t){const r=c.light,i=t.color??r.color,e=t.intensity??r.intensity;switch(t.type){case"directional":return new n(i,e);case"point":return new l(i,e,t.distance??r.distance,t.decay??r.decay);case"spot":{const a=new u(i,e,t.distance??r.distance,t.angle??r.angle,t.penumbra??r.penumbra);return a.decay=t.decay??r.decay,a}case"hemisphere":return new m(i,t.groundColor??r.groundColor,e);case"area":return o||(s.init(),o=!0),new p(i,e,t.width??r.width,t.height??r.height);default:return new n(i,e)}}function C(t){const r=c.camera,i=(t.width??r.width)/(t.height??r.height);if(t.type==="orthographic"){const e=t.orthoSize??r.orthoSize;return new h(-e*i,e*i,e,-e,t.near??r.near,t.far??r.far)}return new g(t.fov??r.fov,i,t.near??r.near,t.far??r.far)}export{C as createCamera,b as createLight};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{q as s}from"./index-GIL7oGEO.js";import{getUserData as a}from"./user-data-BB2Of6Ht.js";const b="xstate-behavior.document";function f(e){const t=s().hierarchy.object(e);return t?a(t,"_xstateBehavior"):void 0}function h(){const e=new Set,t=[];for(const[i,c]of s().hierarchy.objects()){const o=a(c,"_xstateBehavior");!o||e.has(o)||(e.add(o),t.push({nodeId:i,machineId:o.machine.id,label:c.name||i}))}return t}let n=null,u=0;const r=new Set;function m(e){return r.add(e),()=>{r.delete(e)}}function j(){return u}function p(){return n}function d(e){if(!f(e))return!1;if(n!==e){n=e,u++;for(const t of r)t()}return s().workspace.openContributedDocument(b)}function B(){const e=h()[0];return e?d(e.nodeId):!1}export{d as a,f as b,j as c,p as d,h as l,B as o,m as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a1 as E,j as N,k as y}from"./three.module-D396a9Mn.js";const S=256;function b(a){const t=Math.min(1,Math.max(0,a));return t<=.0031308?t*12.92:1.055*t**(1/2.4)-.055}function M(a,t,e){const n=Math.hypot(a,t,e)||1;return[a/n,t/n,e/n]}function j(a=S){const t=document.createElement("canvas");t.width=a,t.height=a;const e=t.getContext("2d");if(!e)return t;const n=e.createImageData(a,a),o=M(-.45,.62,.64),m=M(.65,-.35,.5),u=M(o[0],o[1],o[2]+1),v=[.7,.69,.68],w=[.34,.4,.52],F=[.85,.88,1];for(let r=0;r<a;r++)for(let s=0;s<a;s++){const f=(s+.5)/a/.5-1,h=1-(r+.5)/a/.5,i=f*f+h*h,d=i>1,g=d?1/Math.sqrt(i):1,p=f*g,x=h*g,l=d?0:Math.sqrt(Math.max(0,1-i)),I=Math.max(0,p*o[0]+x*o[1]+l*o[2]),T=Math.max(0,p*m[0]+x*m[1]+l*m[2]),k=Math.max(0,p*u[0]+x*u[1]+l*u[2])**42*.5,q=(1-l)**3.2*.4,C=(r*a+s)*4;for(let c=0;c<3;c++){const D=v[c]*(.16+.8*I)+w[c]*.3*T+F[c]*q+k;n.data[C+c]=Math.round(b(D)*255)}n.data[C+3]=255}return e.putImageData(n,0,0),t}function G(a=S){const t=new E(j(a));return t.colorSpace=N,t.minFilter=y,t.magFilter=y,t.generateMipmaps=!1,t.needsUpdate=!0,t}export{G as createNeutralMatcapTexture,j as drawNeutralMatcap};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./jsx-runtime-DPjLkJKQ.js";import{e7 as y,e9 as I,g7 as N,e8 as p,g8 as B,ed as F,g9 as $,ga as A,gb as E,aJ as w,b2 as m,d_ as M,eE as v,a5 as O,a6 as R,eF as j,eG as t,a9 as x,aK as P,bo as V,fe as L,a4 as T,gc as G,gd as z,ek as U,aY as _,bs as q,ge as W,gf as Z,gg as J,gh as K}from"./index-GIL7oGEO.js";import{S as D}from"./source-object3d-authoring-adapter-B-L6Ha6f.js";import{p as Y}from"./project-provenance-BoP3nrle.js";import{object3DAuthoringSubjectOf as H}from"./object3d-authoring-subject-CH5sI2oP.js";import{getUserData as S}from"./user-data-BB2Of6Ht.js";import{r as b}from"./index-nmcBqr7Y.js";import"./index-CtzuWnCS.js";import{V as Q}from"./three.module-D396a9Mn.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-CDSueJyJ.js";import"./viewport-pick-context-DkawXbEi.js";import"./three-projection-core-BmKMZ-nf.js";import"./object-marks-DwvIEBOK.js";function X(n,s){return s instanceof D&&n?.id===s.documentId}function ee(n,s){return s instanceof D&&n!==null&&n.id!==s.documentId}function r({children:n,code:s=!1}){return e.jsx(x,{variant:s?"code":"body",selectable:!0,truncate:!0,title:typeof n=="string"?n:void 0,children:n})}function C(n){let s=null;return n?.traverse(i=>{!s&&S(i,"gaussianSplat")&&(s=i)}),s}function ne({splat:n}){const s=S(n,"gaussianSplat"),i=n.getBoundingBox().getSize(new Q);return e.jsxs(j,{children:[e.jsx(t,{label:"Gaussians",children:e.jsx(r,{children:s.numSplats.toLocaleString()})}),e.jsx(t,{label:"Format",children:e.jsx(r,{children:"SPZ"})}),e.jsx(t,{label:"Bounds",children:e.jsx(r,{children:`${i.x.toFixed(2)} × ${i.y.toFixed(2)} × ${i.z.toFixed(2)}`})}),e.jsx(t,{label:"Level of detail",children:e.jsx(r,{children:"Full source"})}),e.jsx(t,{label:"Picking",children:e.jsx(r,{children:"Gaussian raycast"})}),e.jsx(t,{label:"Collision",hint:"Gaussian splats are visual environment data; use a separate mesh collider.",children:e.jsx(r,{children:"Separate collider required"})})]})}function te({inspection:n,rig:s}){if(!n)return e.jsx(M,{compact:!0,tone:"error",title:"Model unavailable",description:"The native Object3D graph could not be inspected."});const i=[...n.meshes===0?["The asset has no renderable geometry."]:[],...n.geometry.nonFiniteAttributeValues>0?[`${n.geometry.nonFiniteAttributeValues.toLocaleString()} non-finite geometry values can break bounds and selection.`]:[],...s&&!s.valid?["Rig or animation bindings require attention."]:[]];return e.jsxs(e.Fragment,{children:[i.length>0&&e.jsx(v,{tone:"warning",icon:e.jsx(O,{icon:R.status.warning}),children:e.jsx("div",{children:i.map(o=>e.jsx("div",{children:o},o))})}),e.jsxs(j,{children:[e.jsx(t,{label:"Meshes",children:e.jsx(r,{children:n.meshes.toLocaleString()})}),e.jsx(t,{label:"Primitives",children:e.jsx(r,{children:n.primitives.toLocaleString()})}),e.jsx(t,{label:"Vertices",children:e.jsx(r,{children:n.vertices.toLocaleString()})}),e.jsx(t,{label:"Triangles",children:e.jsx(r,{children:n.triangles.toLocaleString()})}),e.jsx(t,{label:"Indexing",children:e.jsxs(r,{children:[n.geometry.indexedMeshes," indexed · ",n.geometry.nonIndexedMeshes," ","non-indexed"]})}),e.jsx(t,{label:"Attributes",children:e.jsx(r,{children:n.geometry.attributes.map(o=>o.name).join(", ")||"None"})}),e.jsx(t,{label:"UV channels",children:e.jsx(r,{children:n.geometry.uvChannels.join(", ")||"None"})}),e.jsx(t,{label:"Morph targets",children:e.jsx(r,{children:n.morphTargets})}),e.jsx(t,{label:"Bounds",children:e.jsx(r,{children:n.bounds?`${n.bounds.x.toFixed(2)} × ${n.bounds.y.toFixed(2)} × ${n.bounds.z.toFixed(2)}`:"None"})}),e.jsx(t,{label:"GPU estimate",children:e.jsxs(r,{children:[(n.memoryBytes/1048576).toFixed(2)," MiB"]})}),e.jsx(t,{label:"Invalid values",children:e.jsx(x,{tone:n.geometry.nonFiniteAttributeValues?"warning":"muted",children:n.geometry.nonFiniteAttributeValues.toLocaleString()})}),e.jsx(t,{label:"LODs",children:e.jsx(r,{children:n.geometry.lodGroups?`${n.geometry.lodLevels} levels`:"Not authored"})}),e.jsx(t,{label:"Collision",hint:"Collision remains a source/import operation when no model metadata exists.",children:e.jsx(r,{children:"Not authored"})})]})]})}function se({rig:n}){const s=[["Non-normalized weights",n.nonNormalizedVertices],["Zero-weight vertices",n.zeroWeightVertices],["Invalid joint indices",n.invalidJointIndices],["Inverse-bind mismatches",n.inverseBindMismatches],["External bones",n.externalBones],["Non-finite animation values",n.nonFiniteAnimationValues],["Unresolved track targets",n.unresolvedTrackTargets.length]];return e.jsxs(e.Fragment,{children:[!n.valid&&e.jsx(v,{tone:"warning",icon:e.jsx(O,{icon:R.status.warning}),children:"Review the non-zero integrity checks below."}),e.jsxs(j,{children:[e.jsx(t,{label:"Deformation",children:e.jsx(r,{children:n.kind==="skinned"?"Skinned mesh":"Rigid attachments"})}),e.jsx(t,{label:"Bones",children:e.jsx(r,{children:n.uniqueBones})}),e.jsx(t,{label:"Root bones",children:e.jsx(r,{children:n.rootBones.join(", ")||"None"})}),n.kind==="skinned"?e.jsxs(e.Fragment,{children:[e.jsx(t,{label:"Skeletons",children:e.jsx(r,{children:n.skeletons})}),e.jsx(t,{label:"Bind mode",children:e.jsx(r,{children:n.bindModes.join(", ")||"None"})}),e.jsx(t,{label:"Weighted vertices",children:e.jsx(r,{children:n.weightedVertices.toLocaleString()})})]}):null,s.filter(([,i])=>i>0).map(([i,o])=>e.jsx(t,{label:i,children:e.jsx(x,{tone:"warning",children:o.toLocaleString()})},i)),n.unresolvedTrackTargets.length?e.jsx(t,{label:"Missing targets",children:e.jsx(r,{children:n.unresolvedTrackTargets.join(", ")})}):null]})]})}function re({adapter:n,inspection:s}){const[i,o]=b.useState(""),a=n.documentRootObject,d=(s?.materialSlots??[]).map((l,u)=>({material:l,rowKey:`${l.id}:${u}`})).filter(({material:l})=>`${l.name} ${l.type} ${l.textureSlots.join(" ")}`.toLowerCase().includes(i.trim().toLowerCase())),c=l=>{if(!a)return;const u=z(a,{id:l})[0],g=u?n.hierarchy.idForObject3D?.(u):null;g&&U(n,[g])};return e.jsxs(e.Fragment,{children:[e.jsx(j,{children:e.jsx(t,{label:"Filter",htmlFor:"model-material-filter",children:e.jsx(V,{id:"model-material-filter",type:"search",value:i,placeholder:"Name, type, or map",onChange:l=>o(l.target.value)})})}),e.jsxs("div",{className:"vgai-model-inspector-list",children:[d.map(({material:l,rowKey:u})=>e.jsxs(L,{variant:"raised",border:!0,className:"vgai-model-inspector-row",children:[e.jsx("span",{className:"vgai-model-material-swatch",style:{background:l.color??void 0},"aria-hidden":"true"}),e.jsxs("div",{children:[e.jsx(x,{as:"strong",variant:"label",truncate:!0,children:l.name}),e.jsxs(x,{variant:"caption",tone:"muted",truncate:!0,children:[l.type," · ",l.usageCount," object",l.usageCount===1?"":"s"," ","· ",l.textureSlots.join(", ")||"no maps",l.transparent?" · transparent":""]})]}),e.jsx(T,{type:"button",variant:"ghost",size:"compact",onClick:()=>c(l.id),children:"Inspect"})]},u)),d.length===0?e.jsx(M,{compact:!0,title:"No matching materials"}):null]})]})}function ie({adapter:n,provenance:s,provenanceLoaded:i}){const o=_();b.useSyncExternalStore(q,W);const a=s?Z().find(d=>d.tool?.name===s.operationName):void 0;return e.jsxs(e.Fragment,{children:[a?e.jsx("div",{className:"vgai-model-inspector-actions",children:e.jsx(T,{type:"button",variant:"ghost",size:"compact",onClick:()=>J(o,a.id),children:"Open Source"})}):null,e.jsxs(j,{children:[e.jsx(t,{label:"Path",children:e.jsx(r,{code:!0,children:n.options.sourcePath})}),e.jsx(t,{label:"Truth",children:e.jsx(r,{children:n.provenance.label})}),e.jsx(t,{label:"Ownership",hint:n.provenance.detail,children:e.jsx(r,{children:n.provenance.source})}),i?null:e.jsx(t,{label:"Provenance",children:e.jsx(r,{children:"Loading…"})}),s?e.jsxs(e.Fragment,{children:[e.jsx(t,{label:"Generated by",children:e.jsx(r,{children:s.operationName})}),e.jsx(t,{label:"Tool",children:e.jsx(r,{code:!0,children:s.operationSource??"Not recorded"})}),e.jsx(t,{label:"Generated",children:e.jsx(r,{children:new Date(s.createdAt).toLocaleString()})}),e.jsx(t,{label:"Output hash",children:e.jsx(r,{code:!0,children:s.output.sha256})})]}):i?e.jsx(t,{label:"Provenance",children:e.jsx(r,{children:"Not recorded"})}):null]})]})}const k=new WeakMap;function oe(n){const s=n.documentRootObject??null;if(!s)return;const i=k.get(s);if(i!==void 0)return i??void 0;const o=C(s)?null:w(s),a=o?`${o.meshes} meshes · ${o.triangles.toLocaleString()} triangles`:null;return k.set(s,a),a??void 0}function le({adapter:n}){const s=n,[i,o]=b.useState(null),[a,d]=b.useState(!1),c=s.options.modelSource,l=c?.kind==="project-file"?c.path:null;return b.useEffect(()=>{let u=!1;if(d(!1),!l){o(null),d(!0);return}return Y(l).then(g=>{u||(o(g),d(!0))},()=>{u||(o(null),d(!0))}),()=>{u=!0}},[l]),e.jsx("div",{"data-testid":"model-asset-inspector",children:e.jsx(ie,{adapter:s,provenance:i,provenanceLoaded:a})})}function ae({inspection:n}){return e.jsxs(j,{children:[e.jsx(t,{label:"Native type",children:e.jsx(r,{children:n.type})}),e.jsx(t,{label:"Visible",children:e.jsx(r,{children:n.visible?"Yes":"No"})}),e.jsx(t,{label:"Children",children:e.jsx(r,{children:n.children})}),e.jsx(t,{label:"Descendants",children:e.jsx(r,{children:n.descendants})}),e.jsx(t,{label:"Render order",children:e.jsx(r,{children:n.renderOrder})}),e.jsx(t,{label:"Layer mask",children:e.jsxs(r,{code:!0,children:["0x",n.layers.toString(16)]})})]})}function de({geometry:n}){return e.jsxs(e.Fragment,{children:[n.nonFiniteAttributeValues?e.jsxs(v,{tone:"warning",children:[n.nonFiniteAttributeValues.toLocaleString()," non-finite buffer values can break bounds, picking, and selection outlines."]}):null,e.jsxs(j,{children:[e.jsx(t,{label:"Vertices",children:e.jsx(r,{children:n.vertices.toLocaleString()})}),e.jsx(t,{label:"Triangles",children:e.jsx(r,{children:n.triangles.toLocaleString()})}),e.jsx(t,{label:"Index buffer",children:e.jsx(r,{children:n.indexed?"Indexed":"Non-indexed"})}),e.jsx(t,{label:"Attributes",children:e.jsx(r,{children:n.attributes.join(", ")})}),e.jsx(t,{label:"UV channels",children:e.jsx(r,{children:n.uvChannels.join(", ")||"None"})}),e.jsx(t,{label:"Morph targets",children:e.jsx(r,{children:n.morphTargets})}),e.jsx(t,{label:"Invalid values",children:e.jsx(x,{tone:n.nonFiniteAttributeValues?"warning":"muted",children:n.nonFiniteAttributeValues.toLocaleString()})})]})]})}function ce({materials:n}){return e.jsx("div",{className:"vgai-model-inspector-list",children:n.map(s=>e.jsxs(L,{variant:"raised",border:!0,className:"vgai-model-inspector-row",children:[e.jsx("span",{className:"vgai-model-material-swatch",style:{background:s.color??void 0},"aria-hidden":"true"}),e.jsxs("div",{children:[e.jsx(x,{as:"strong",variant:"label",truncate:!0,children:s.name}),e.jsxs(x,{variant:"caption",tone:"muted",truncate:!0,children:[s.type," · ",s.textureSlots.join(", ")||"no maps"]})]})]},s.id))})}function ue({skin:n}){return e.jsxs(j,{children:[e.jsx(t,{label:"Bones",children:e.jsx(r,{children:n.bones})}),e.jsx(t,{label:"Root bones",children:e.jsx(r,{children:n.rootBones.join(", ")||"None"})}),e.jsx(t,{label:"Bind mode",children:e.jsx(r,{children:n.bindMode})})]})}function he({bone:n}){return e.jsxs(j,{children:[e.jsx(t,{label:"Parent",children:e.jsx(r,{children:n.parent??"Skeleton root"})}),e.jsx(t,{label:"Children",children:e.jsx(r,{children:n.children.join(", ")||"None"})})]})}const h={splat:m,geometry:m+10,rig:m+20,materials:m+40,source:m+50},je=new WeakMap,xe=new WeakMap,me=new WeakMap;function f(n,s,i){const o=n.get(s);if(o!==void 0)return o;const a=i();return n.set(s,a),a}function be(n){const s=n,i=s.documentRootObject,o=[],a=C(i);if(i&&a){const d=S(a,"gaussianSplat");o.push({id:"splat",title:"Gaussian Splat",icon:K,order:h.splat,description:`${d.numSplats.toLocaleString()} Gaussians · native SPZ`,body:{kind:"custom",render:()=>e.jsx(ne,{splat:a})}})}else if(i){const d=f(je,i,()=>w(i)),c=f(xe,i,()=>P(i)),l=oe(n);o.push({id:p,title:"Geometry",icon:N,order:h.geometry,...l?{description:l}:{},body:{kind:"custom",render:()=>e.jsx(te,{inspection:d,rig:c})}}),(c.skinnedMeshes>0||c.uniqueBones>0)&&o.push({id:"rig",title:"Rig",icon:B,order:h.rig,description:c.kind==="skinned"?`${c.uniqueBones} bones · ${c.skinnedMeshes} skinned meshes`:`${c.uniqueBones} bones · rigid hierarchy`,body:{kind:"custom",render:()=>e.jsx(se,{rig:c})}}),o.push({id:"materials",title:"Materials",icon:F,order:h.materials,description:`${d.materials} materials`,body:{kind:"custom",render:()=>e.jsx(re,{adapter:s,inspection:d})}})}return o.push({id:"source",title:"Source",icon:$,order:h.source,description:s.provenance.label,defaultOpen:!1,body:{kind:"custom",render:()=>e.jsx(le,{adapter:n})}}),s.options.audit===!1?o.filter(d=>d.id!==p&&d.id!=="source"):o}function ge(n,s){const i=n?s.hierarchy.object3D?.(n.id):null;if(!i)return[];if(H(i))return[];const o=f(me,i,()=>G(i)),a=[{id:p,title:"Object",icon:A,order:h.geometry,description:o.type,body:{kind:"custom",render:()=>e.jsx(ae,{inspection:o})}}],d=o.geometry;d&&a.push({id:"geometry",title:"Geometry",icon:N,order:h.geometry+1,description:`${d.triangles.toLocaleString()} triangles`,body:{kind:"custom",render:()=>e.jsx(de,{geometry:d})}}),o.materials.length>0&&a.push({id:"materials",title:"Materials",icon:F,order:h.materials,description:`${o.materials.length} slots`,body:{kind:"custom",render:()=>e.jsx(ce,{materials:o.materials})}});const c=o.skin;c&&a.push({id:"skin",title:"Skin",icon:B,order:h.rig,description:`${c.bones} bones`,body:{kind:"custom",render:()=>e.jsx(ue,{skin:c})}});const l=o.bone;return l&&a.push({id:"bone",title:"Bone",icon:E,order:h.rig+1,description:l.parent??"Skeleton root",body:{kind:"custom",render:()=>e.jsx(he,{bone:l})}}),a}const pe=I();function fe(){pe.ensure(n=>{n(y({match:X,sections:(s,i)=>be(i)})),n(y({match:ee,sections:ge}))})}const Ee="workspace.service";function Pe(){return fe(),()=>{}}export{Ee as point,Pe as start};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e="workspace.layout",o={id:"model",title:"Model",description:"Blender-shaped modeling: a dominant document, outliner above properties.",regions:{header:"shown",shelf:"shown",inspector:"properties",drawer:"hidden"},areas:[{id:"timeline",document:"blender-timeline.document",place:"below",ratio:.0719}]};export{o as layout,e as point};
|