@splinetool/runtime 1.12.97 → 2.0.1
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/README.md +195 -22
- package/build/boolean.js +406 -2
- package/build/boolean.js.br +0 -0
- package/build/boolean.js.gz +0 -0
- package/build/boolean.wasm +0 -0
- package/build/boolean.wasm.br +0 -0
- package/build/boolean.wasm.gz +0 -0
- package/build/gaussian-splat-compression.js.br +0 -0
- package/build/gaussian-splat-compression.js.gz +0 -0
- package/build/hana-ui.js +4299 -0
- package/build/hana-ui.js.br +0 -0
- package/build/hana-ui.js.gz +0 -0
- package/build/hana-ui.wasm +0 -0
- package/build/hana-ui.wasm.br +0 -0
- package/build/hana-ui.wasm.gz +0 -0
- package/build/howler.js.br +0 -0
- package/build/howler.js.gz +0 -0
- package/build/navmesh.js.br +0 -0
- package/build/navmesh.js.gz +0 -0
- package/build/navmesh.wasm +0 -0
- package/build/navmesh.wasm.br +0 -0
- package/build/navmesh.wasm.gz +0 -0
- package/build/opentype.js.br +0 -0
- package/build/opentype.js.gz +0 -0
- package/build/physics.js +1 -1
- package/build/physics.js.br +0 -0
- package/build/physics.js.gz +0 -0
- package/build/physics.wasm +0 -0
- package/build/physics.wasm.br +0 -0
- package/build/physics.wasm.gz +0 -0
- package/build/process.js +2 -2
- package/build/process.js.br +0 -0
- package/build/process.js.gz +0 -0
- package/build/process.wasm +0 -0
- package/build/process.wasm.br +0 -0
- package/build/process.wasm.gz +0 -0
- package/build/runtime-DRACOLoader-TQHJ6SJB.js +1 -0
- package/build/runtime-DRACOLoader-TQHJ6SJB.js.br +0 -0
- package/build/runtime-DRACOLoader-TQHJ6SJB.js.gz +0 -0
- package/build/runtime-Perfs-KMJFDYHU.js +1 -0
- package/build/runtime-Perfs-KMJFDYHU.js.br +0 -0
- package/build/runtime-Perfs-KMJFDYHU.js.gz +0 -0
- package/build/runtime-aiAssistant-XJVJ7TQB.js +1 -0
- package/build/runtime-aiAssistant-XJVJ7TQB.js.br +0 -0
- package/build/runtime-aiAssistant-XJVJ7TQB.js.gz +0 -0
- package/build/runtime-apiServices-KAO5SQJZ.js +1 -0
- package/build/runtime-apiServices-KAO5SQJZ.js.br +0 -0
- package/build/runtime-apiServices-KAO5SQJZ.js.gz +0 -0
- package/build/runtime-audio-Y3GYW4YQ.js +1 -0
- package/build/runtime-audio-Y3GYW4YQ.js.br +0 -0
- package/build/runtime-audio-Y3GYW4YQ.js.gz +0 -0
- package/build/runtime-bloom-XRHHZNNT.js +1 -0
- package/build/runtime-bloom-XRHHZNNT.js.br +0 -0
- package/build/runtime-bloom-XRHHZNNT.js.gz +0 -0
- package/build/runtime-brightnessContrast-RHV6X2Z4.js +1 -0
- package/build/runtime-brightnessContrast-RHV6X2Z4.js.br +0 -0
- package/build/runtime-brightnessContrast-RHV6X2Z4.js.gz +0 -0
- package/build/runtime-chromaticAberration-LSGAMQAK.js +1 -0
- package/build/runtime-chromaticAberration-LSGAMQAK.js.br +0 -0
- package/build/runtime-chromaticAberration-LSGAMQAK.js.gz +0 -0
- package/build/runtime-chunk-23QOKH2J.js +1 -0
- package/build/runtime-chunk-23QOKH2J.js.br +0 -0
- package/build/runtime-chunk-23QOKH2J.js.gz +0 -0
- package/build/runtime-chunk-2VFLTNIU.js +1 -0
- package/build/runtime-chunk-2VFLTNIU.js.br +0 -0
- package/build/runtime-chunk-2VFLTNIU.js.gz +0 -0
- package/build/runtime-chunk-44SAPZDZ.js +1 -0
- package/build/runtime-chunk-44SAPZDZ.js.br +0 -0
- package/build/runtime-chunk-44SAPZDZ.js.gz +0 -0
- package/build/runtime-chunk-4KZXQGUQ.js +1 -0
- package/build/runtime-chunk-4KZXQGUQ.js.br +0 -0
- package/build/runtime-chunk-4KZXQGUQ.js.gz +0 -0
- package/build/runtime-chunk-4YV3EXSU.js +1 -0
- package/build/runtime-chunk-4YV3EXSU.js.br +0 -0
- package/build/runtime-chunk-4YV3EXSU.js.gz +0 -0
- package/build/runtime-chunk-5CH7XRKY.js +1 -0
- package/build/runtime-chunk-5CH7XRKY.js.br +0 -0
- package/build/runtime-chunk-5CH7XRKY.js.gz +0 -0
- package/build/runtime-chunk-5VJGAC3M.js +1 -0
- package/build/runtime-chunk-5VJGAC3M.js.br +0 -0
- package/build/runtime-chunk-5VJGAC3M.js.gz +0 -0
- package/build/runtime-chunk-7NBWIU4W.js +1 -0
- package/build/runtime-chunk-7NBWIU4W.js.br +0 -0
- package/build/runtime-chunk-7NBWIU4W.js.gz +0 -0
- package/build/runtime-chunk-ARTGMJ7O.js +1 -0
- package/build/runtime-chunk-ARTGMJ7O.js.br +0 -0
- package/build/runtime-chunk-ARTGMJ7O.js.gz +0 -0
- package/build/runtime-chunk-BXPWRF47.js +1 -0
- package/build/runtime-chunk-BXPWRF47.js.br +0 -0
- package/build/runtime-chunk-BXPWRF47.js.gz +0 -0
- package/build/runtime-chunk-CRYQVRO6.js +1 -0
- package/build/runtime-chunk-CRYQVRO6.js.br +0 -0
- package/build/runtime-chunk-CRYQVRO6.js.gz +0 -0
- package/build/runtime-chunk-CVUJ3GMH.js +1 -0
- package/build/runtime-chunk-CVUJ3GMH.js.br +0 -0
- package/build/runtime-chunk-CVUJ3GMH.js.gz +0 -0
- package/build/runtime-chunk-DJJZN367.js +1 -0
- package/build/runtime-chunk-DJJZN367.js.br +0 -0
- package/build/runtime-chunk-DJJZN367.js.gz +0 -0
- package/build/runtime-chunk-DZNU62CT.js +1 -0
- package/build/runtime-chunk-DZNU62CT.js.br +0 -0
- package/build/runtime-chunk-DZNU62CT.js.gz +0 -0
- package/build/runtime-chunk-EAXCCTR5.js +1 -0
- package/build/runtime-chunk-EAXCCTR5.js.br +0 -0
- package/build/runtime-chunk-EAXCCTR5.js.gz +0 -0
- package/build/runtime-chunk-EOV2DL2V.js +1 -0
- package/build/runtime-chunk-EOV2DL2V.js.br +0 -0
- package/build/runtime-chunk-EOV2DL2V.js.gz +0 -0
- package/build/runtime-chunk-FDRTCOJ5.js +1 -0
- package/build/runtime-chunk-FDRTCOJ5.js.br +0 -0
- package/build/runtime-chunk-FDRTCOJ5.js.gz +0 -0
- package/build/runtime-chunk-FQNSP44B.js +1 -0
- package/build/runtime-chunk-FQNSP44B.js.br +0 -0
- package/build/runtime-chunk-FQNSP44B.js.gz +0 -0
- package/build/runtime-chunk-FTVQTRM7.js +1 -0
- package/build/runtime-chunk-FTVQTRM7.js.br +0 -0
- package/build/runtime-chunk-FTVQTRM7.js.gz +0 -0
- package/build/runtime-chunk-GFTBNL2W.js +1 -0
- package/build/runtime-chunk-GFTBNL2W.js.br +0 -0
- package/build/runtime-chunk-GFTBNL2W.js.gz +0 -0
- package/build/runtime-chunk-H6BPTR74.js +1 -0
- package/build/runtime-chunk-H6BPTR74.js.br +0 -0
- package/build/runtime-chunk-H6BPTR74.js.gz +0 -0
- package/build/runtime-chunk-H6T5LPRN.js +1 -0
- package/build/runtime-chunk-H6T5LPRN.js.br +0 -0
- package/build/runtime-chunk-H6T5LPRN.js.gz +0 -0
- package/build/runtime-chunk-HER7UVU3.js +1 -0
- package/build/runtime-chunk-HER7UVU3.js.br +0 -0
- package/build/runtime-chunk-HER7UVU3.js.gz +0 -0
- package/build/runtime-chunk-J2I4VBHR.js +1 -0
- package/build/runtime-chunk-J2I4VBHR.js.br +0 -0
- package/build/runtime-chunk-J2I4VBHR.js.gz +0 -0
- package/build/runtime-chunk-JFAQQYSH.js +1 -0
- package/build/runtime-chunk-JFAQQYSH.js.br +0 -0
- package/build/runtime-chunk-JFAQQYSH.js.gz +0 -0
- package/build/runtime-chunk-KGZNRID6.js +1 -0
- package/build/runtime-chunk-KGZNRID6.js.br +1 -0
- package/build/runtime-chunk-KGZNRID6.js.gz +0 -0
- package/build/runtime-chunk-LATYCOUS.js +1 -0
- package/build/runtime-chunk-LATYCOUS.js.br +0 -0
- package/build/runtime-chunk-LATYCOUS.js.gz +0 -0
- package/build/runtime-chunk-MBBODDV7.js +1 -0
- package/build/runtime-chunk-MBBODDV7.js.br +0 -0
- package/build/runtime-chunk-MBBODDV7.js.gz +0 -0
- package/build/runtime-chunk-ML3Z74BL.js +1 -0
- package/build/runtime-chunk-ML3Z74BL.js.br +0 -0
- package/build/runtime-chunk-ML3Z74BL.js.gz +0 -0
- package/build/runtime-chunk-MM75L5X4.js +1 -0
- package/build/runtime-chunk-MM75L5X4.js.br +0 -0
- package/build/runtime-chunk-MM75L5X4.js.gz +0 -0
- package/build/runtime-chunk-N2ZRGNPR.js +1 -0
- package/build/runtime-chunk-N2ZRGNPR.js.br +0 -0
- package/build/runtime-chunk-N2ZRGNPR.js.gz +0 -0
- package/build/runtime-chunk-NBYTQLIB.js +1 -0
- package/build/runtime-chunk-NBYTQLIB.js.br +0 -0
- package/build/runtime-chunk-NBYTQLIB.js.gz +0 -0
- package/build/runtime-chunk-NSD7DU3P.js +1 -0
- package/build/runtime-chunk-NSD7DU3P.js.br +0 -0
- package/build/runtime-chunk-NSD7DU3P.js.gz +0 -0
- package/build/runtime-chunk-NTUTXO7Q.js +1 -0
- package/build/runtime-chunk-NTUTXO7Q.js.br +0 -0
- package/build/runtime-chunk-NTUTXO7Q.js.gz +0 -0
- package/build/runtime-chunk-O5NBGIBR.js +1 -0
- package/build/runtime-chunk-O5NBGIBR.js.br +0 -0
- package/build/runtime-chunk-O5NBGIBR.js.gz +0 -0
- package/build/runtime-chunk-OFPUAZKY.js +1 -0
- package/build/runtime-chunk-OFPUAZKY.js.br +0 -0
- package/build/runtime-chunk-OFPUAZKY.js.gz +0 -0
- package/build/runtime-chunk-OW6T4XFV.js +1 -0
- package/build/runtime-chunk-OW6T4XFV.js.br +0 -0
- package/build/runtime-chunk-OW6T4XFV.js.gz +0 -0
- package/build/runtime-chunk-QZ35BPGB.js +1 -0
- package/build/runtime-chunk-QZ35BPGB.js.br +0 -0
- package/build/runtime-chunk-QZ35BPGB.js.gz +0 -0
- package/build/runtime-chunk-R43XZP65.js +1 -0
- package/build/runtime-chunk-R43XZP65.js.br +0 -0
- package/build/runtime-chunk-R43XZP65.js.gz +0 -0
- package/build/runtime-chunk-T53JMQSH.js +1 -0
- package/build/runtime-chunk-T53JMQSH.js.br +0 -0
- package/build/runtime-chunk-T53JMQSH.js.gz +0 -0
- package/build/runtime-chunk-T6CHRQ6N.js +1 -0
- package/build/runtime-chunk-T6CHRQ6N.js.br +0 -0
- package/build/runtime-chunk-T6CHRQ6N.js.gz +0 -0
- package/build/runtime-chunk-TU4KDRKR.js +1 -0
- package/build/runtime-chunk-TU4KDRKR.js.br +0 -0
- package/build/runtime-chunk-TU4KDRKR.js.gz +0 -0
- package/build/runtime-chunk-TZCHGFVF.js +1 -0
- package/build/runtime-chunk-TZCHGFVF.js.br +3 -0
- package/build/runtime-chunk-TZCHGFVF.js.gz +0 -0
- package/build/runtime-chunk-UK4GQHMO.js +1 -0
- package/build/runtime-chunk-UK4GQHMO.js.br +0 -0
- package/build/runtime-chunk-UK4GQHMO.js.gz +0 -0
- package/build/runtime-chunk-USXMESRF.js +1 -0
- package/build/runtime-chunk-USXMESRF.js.br +0 -0
- package/build/runtime-chunk-USXMESRF.js.gz +0 -0
- package/build/runtime-chunk-VAVYZ35B.js +1 -0
- package/build/runtime-chunk-VAVYZ35B.js.br +0 -0
- package/build/runtime-chunk-VAVYZ35B.js.gz +0 -0
- package/build/runtime-chunk-VGN7YHB7.js +1 -0
- package/build/runtime-chunk-VGN7YHB7.js.br +0 -0
- package/build/runtime-chunk-VGN7YHB7.js.gz +0 -0
- package/build/runtime-chunk-W7QPV37Y.js +1 -0
- package/build/runtime-chunk-W7QPV37Y.js.br +1 -0
- package/build/runtime-chunk-W7QPV37Y.js.gz +0 -0
- package/build/runtime-chunk-WQXDDUFV.js +1 -0
- package/build/runtime-chunk-WQXDDUFV.js.br +0 -0
- package/build/runtime-chunk-WQXDDUFV.js.gz +0 -0
- package/build/runtime-chunk-XLOQIQSS.js +1 -0
- package/build/runtime-chunk-XLOQIQSS.js.br +0 -0
- package/build/runtime-chunk-XLOQIQSS.js.gz +0 -0
- package/build/runtime-chunk-Y3BMDVJ7.js +1 -0
- package/build/runtime-chunk-Y3BMDVJ7.js.br +0 -0
- package/build/runtime-chunk-Y3BMDVJ7.js.gz +0 -0
- package/build/runtime-chunk-YUK55LCN.js +1 -0
- package/build/runtime-chunk-YUK55LCN.js.br +0 -0
- package/build/runtime-chunk-YUK55LCN.js.gz +0 -0
- package/build/runtime-chunk-YVNDW5TV.js +1 -0
- package/build/runtime-chunk-YVNDW5TV.js.br +0 -0
- package/build/runtime-chunk-YVNDW5TV.js.gz +0 -0
- package/build/runtime-chunk-YXATXASV.js +1 -0
- package/build/runtime-chunk-YXATXASV.js.br +1 -0
- package/build/runtime-chunk-YXATXASV.js.gz +0 -0
- package/build/runtime-chunk-Z5OH244S.js +1 -0
- package/build/runtime-chunk-Z5OH244S.js.br +0 -0
- package/build/runtime-chunk-Z5OH244S.js.gz +0 -0
- package/build/runtime-classicRuntime-F5CEZRNL.js +1 -0
- package/build/runtime-classicRuntime-F5CEZRNL.js.br +0 -0
- package/build/runtime-classicRuntime-F5CEZRNL.js.gz +0 -0
- package/build/runtime-cloners-BLAFVALM.js +1 -0
- package/build/runtime-cloners-BLAFVALM.js.br +0 -0
- package/build/runtime-cloners-BLAFVALM.js.gz +0 -0
- package/build/runtime-collisionBVH-KXZNWTEK.js +1 -0
- package/build/runtime-collisionBVH-KXZNWTEK.js.br +0 -0
- package/build/runtime-collisionBVH-KXZNWTEK.js.gz +0 -0
- package/build/runtime-components-DYNXEVOC.js +1 -0
- package/build/runtime-components-DYNXEVOC.js.br +0 -0
- package/build/runtime-components-DYNXEVOC.js.gz +0 -0
- package/build/runtime-conditional-3A423CXW.js +1 -0
- package/build/runtime-conditional-3A423CXW.js.br +0 -0
- package/build/runtime-conditional-3A423CXW.js.gz +0 -0
- package/build/runtime-createDestroy-FUUG7UAK.js +1 -0
- package/build/runtime-createDestroy-FUUG7UAK.js.br +0 -0
- package/build/runtime-createDestroy-FUUG7UAK.js.gz +0 -0
- package/build/runtime-depthOfField-BBWDHJYP.js +1 -0
- package/build/runtime-depthOfField-BBWDHJYP.js.br +0 -0
- package/build/runtime-depthOfField-BBWDHJYP.js.gz +0 -0
- package/build/runtime-dragDrop-GPFMU3ZB.js +1 -0
- package/build/runtime-dragDrop-GPFMU3ZB.js.br +0 -0
- package/build/runtime-dragDrop-GPFMU3ZB.js.gz +0 -0
- package/build/runtime-fxBloom-IGFV4KJD.js +1 -0
- package/build/runtime-fxBloom-IGFV4KJD.js.br +0 -0
- package/build/runtime-fxBloom-IGFV4KJD.js.gz +0 -0
- package/build/runtime-fxDepthOfField-WX7WD3K4.js +1 -0
- package/build/runtime-fxDepthOfField-WX7WD3K4.js.br +0 -0
- package/build/runtime-fxDepthOfField-WX7WD3K4.js.gz +0 -0
- package/build/runtime-gameControls-TGEINRCX.js +1 -0
- package/build/runtime-gameControls-TGEINRCX.js.br +0 -0
- package/build/runtime-gameControls-TGEINRCX.js.gz +0 -0
- package/build/runtime-hair-YOTI2EFL.js +1 -0
- package/build/runtime-hair-YOTI2EFL.js.br +0 -0
- package/build/runtime-hair-YOTI2EFL.js.gz +0 -0
- package/build/runtime-hueSaturation-X3HAZK2G.js +1 -0
- package/build/runtime-hueSaturation-X3HAZK2G.js.br +0 -0
- package/build/runtime-hueSaturation-X3HAZK2G.js.gz +0 -0
- package/build/runtime-mergeStaticGeometries-JI7YWYGH.js +1 -0
- package/build/runtime-mergeStaticGeometries-JI7YWYGH.js.br +3 -0
- package/build/runtime-mergeStaticGeometries-JI7YWYGH.js.gz +0 -0
- package/build/runtime-miscActions-INSZA2CP.js +1 -0
- package/build/runtime-miscActions-INSZA2CP.js.br +0 -0
- package/build/runtime-miscActions-INSZA2CP.js.gz +0 -0
- package/build/runtime-mouseHover-GZW7KW6H.js +1 -0
- package/build/runtime-mouseHover-GZW7KW6H.js.br +0 -0
- package/build/runtime-mouseHover-GZW7KW6H.js.gz +0 -0
- package/build/runtime-navmesh-UJTUAHXM.js +1 -0
- package/build/runtime-navmesh-UJTUAHXM.js.br +0 -0
- package/build/runtime-navmesh-UJTUAHXM.js.gz +0 -0
- package/build/runtime-noise-UF5CMIO3.js +1 -0
- package/build/runtime-noise-UF5CMIO3.js.br +0 -0
- package/build/runtime-noise-UF5CMIO3.js.gz +0 -0
- package/build/runtime-particles-T2CREK6M.js +1 -0
- package/build/runtime-particles-T2CREK6M.js.br +0 -0
- package/build/runtime-particles-T2CREK6M.js.gz +0 -0
- package/build/runtime-paths-PRHQFJ3X.js +1 -0
- package/build/runtime-paths-PRHQFJ3X.js.br +0 -0
- package/build/runtime-paths-PRHQFJ3X.js.gz +0 -0
- package/build/runtime-pixelation-QFSF4L6X.js +1 -0
- package/build/runtime-pixelation-QFSF4L6X.js.br +0 -0
- package/build/runtime-pixelation-QFSF4L6X.js.gz +0 -0
- package/build/runtime-resize-SM6PZWJY.js +1 -0
- package/build/runtime-resize-SM6PZWJY.js.br +0 -0
- package/build/runtime-resize-SM6PZWJY.js.gz +0 -0
- package/build/runtime-sceneTransition-JUZVB2S3.js +1 -0
- package/build/runtime-sceneTransition-JUZVB2S3.js.br +0 -0
- package/build/runtime-sceneTransition-JUZVB2S3.js.gz +0 -0
- package/build/runtime-scroll-Q6NRRL4F.js +1 -0
- package/build/runtime-scroll-Q6NRRL4F.js.br +0 -0
- package/build/runtime-scroll-Q6NRRL4F.js.gz +0 -0
- package/build/runtime-shapeBlends-CPHLT3XC.js +1 -0
- package/build/runtime-shapeBlends-CPHLT3XC.js.br +0 -0
- package/build/runtime-shapeBlends-CPHLT3XC.js.gz +0 -0
- package/build/runtime-text-TBHPCNPL.js +1 -0
- package/build/runtime-text-TBHPCNPL.js.br +0 -0
- package/build/runtime-text-TBHPCNPL.js.gz +0 -0
- package/build/runtime-textInputs-4HQER44D.js +1 -0
- package/build/runtime-textInputs-4HQER44D.js.br +0 -0
- package/build/runtime-textInputs-4HQER44D.js.gz +0 -0
- package/build/runtime-timeline-UKR4DEQS.js +1 -0
- package/build/runtime-timeline-UKR4DEQS.js.br +0 -0
- package/build/runtime-timeline-UKR4DEQS.js.gz +0 -0
- package/build/runtime-tracking-5HISHPEY.js +1 -0
- package/build/runtime-tracking-5HISHPEY.js.br +0 -0
- package/build/runtime-tracking-5HISHPEY.js.gz +0 -0
- package/build/runtime-transitions-FBNOSFXY.js +1 -0
- package/build/runtime-transitions-FBNOSFXY.js.br +0 -0
- package/build/runtime-transitions-FBNOSFXY.js.gz +0 -0
- package/build/runtime-ui2d-3AMS3CSG.js +1 -0
- package/build/runtime-ui2d-3AMS3CSG.js.br +0 -0
- package/build/runtime-ui2d-3AMS3CSG.js.gz +0 -0
- package/build/runtime-updater-3ELP7WMM.js +1 -0
- package/build/runtime-updater-3ELP7WMM.js.br +1 -0
- package/build/runtime-updater-3ELP7WMM.js.gz +0 -0
- package/build/runtime-variables-U36KPJ5V.js +1 -0
- package/build/runtime-variables-U36KPJ5V.js.br +0 -0
- package/build/runtime-variables-U36KPJ5V.js.gz +0 -0
- package/build/runtime-vectorShapes-GIS26ELU.js +1 -0
- package/build/runtime-vectorShapes-GIS26ELU.js.br +0 -0
- package/build/runtime-vectorShapes-GIS26ELU.js.gz +0 -0
- package/build/runtime-video-TZNR7MEM.js +1 -0
- package/build/runtime-video-TZNR7MEM.js.br +0 -0
- package/build/runtime-video-TZNR7MEM.js.gz +0 -0
- package/build/runtime-vignette-3KJD4P5D.js +1 -0
- package/build/runtime-vignette-3KJD4P5D.js.br +0 -0
- package/build/runtime-vignette-3KJD4P5D.js.gz +0 -0
- package/build/runtime-webgpu-LYDFJW3X.js +1 -0
- package/build/runtime-webgpu-LYDFJW3X.js.br +0 -0
- package/build/runtime-webgpu-LYDFJW3X.js.gz +0 -0
- package/build/runtime.cjs +6286 -4569
- package/build/runtime.js +1 -8175
- package/build/runtime.js.br +0 -0
- package/build/runtime.js.gz +0 -0
- package/build/runtime.standalone.js +1 -0
- package/build/runtime.standalone.js.br +0 -0
- package/build/runtime.standalone.js.gz +0 -0
- package/build/runtime.standalone.webgl.js +1 -0
- package/build/runtime.standalone.webgl.js.br +0 -0
- package/build/runtime.standalone.webgl.js.gz +0 -0
- package/build/runtime.standalone.webgpu.js +1 -0
- package/build/runtime.standalone.webgpu.js.br +0 -0
- package/build/runtime.standalone.webgpu.js.gz +0 -0
- package/build/runtime.standalone.webgpu.micro.js +1 -0
- package/build/runtime.standalone.webgpu.micro.js.br +0 -0
- package/build/runtime.standalone.webgpu.micro.js.gz +0 -0
- package/build/runtime.standalone.webgpu.min.js +1 -0
- package/build/runtime.standalone.webgpu.min.js.br +0 -0
- package/build/runtime.standalone.webgpu.min.js.gz +0 -0
- package/build/sky-alto.png +0 -0
- package/build/sky-cirrus.png +0 -0
- package/build/smaa-area.png +0 -0
- package/build/smaa-node-area.png +0 -0
- package/build/smaa-node-search.png +0 -0
- package/build/smaa-search.png +0 -0
- package/build/snippets/hana-82e9eb82a79dead4/js-imports.js +93 -0
- package/package.json +104 -89
- package/runtime.d.ts +301 -2
- package/build/ui.js +0 -3
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n=new Map;function t(t,a){n.set(t,a)}function a(t){return n.get(t)}function e(){return n}var r=new Map;function s(n,t){r.set(n,t)}function u(n){return r.get(n)}var c=new Set;function f(n,t){let a=`${t}:${n}`;c.has(a)||c.add(a)}export{t as a,a as b,e as c,s as d,u as e,f};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./runtime-chunk-DJJZN367.js";import{Ed as t,Fc as r,Oc as i,We as n,cd as a,jd as o}from"./runtime-chunk-VGN7YHB7.js";var s;(s||(s={})).is=e=>"objectHelper"in e;var l=(r,i)=>class extends(e(r)){constructor(){super(...arguments),this.objectHelper=new i(this),this.gizmos={}}get geometryHelper(){return i.geometryHelper}raycast(e,t){this.objectHelper.raycast(e,t)}showGizmos(){for(let e in this.gizmos){let t=this.gizmos[e];t instanceof n&&(t.visible=!0)}}updateEntityBoxSize(e,r){this.objectHelper.visible&&this.geometryHelper instanceof t?(e.setScalar(0),r.set(this.geometryHelper.parameters.width,this.geometryHelper.parameters.height,this.geometryHelper.parameters.height).multiplyScalar(.5)):super.updateEntityBoxSize(e,r)}hideGizmos(){for(let e in this.gizmos){let t=this.gizmos[e];t instanceof n&&(t.visible=!1)}}},c=e=>{var r;return(r=class extends e{}).geometryHelper=new t(30,30,30),r},p=new o,u=new a,m=new i,f=(e,t,i,n,a=!1,o=e)=>{let s=t,l=o.matrixWorld;if(null===s.boundingSphere&&s.computeBoundingSphere(),u.copy(s.boundingSphere),u.applyMatrix4(l),!1===i.ray.intersectsSphere(u)||(m.copy(l).invert(),p.copy(i.ray).applyMatrix4(m),null!==s.boundingBox&&!1===p.intersectsBox(s.boundingBox)))return;let c,f,h,d,g,y,x=s.index,b=s.attributes.position,w=s.drawRange;if(!1===a){for(g=Math.max(0,w.start),y=Math.min(x.count,w.start+w.count);g<y;g+=3)if(f=x.getX(g),h=x.getX(g+1),d=x.getX(g+2),c=B(e,i,p,b,f,h,d),c)return c.faceIndex=Math.floor(g/3),void n.push(c)}else{let t=s.attributes.position,a=new r,l=new r,c=new r,u=new r,m=2,f=1/((o.scale.x+o.scale.y+o.scale.z)/3),h=f*f;for(let r=Math.max(0,w.start),s=Math.min(t.count,w.start+w.count)-1;r<s;r+=m){if(a.fromBufferAttribute(t,r),l.fromBufferAttribute(t,r+1),p.distanceSqToSegment(a,l,u,c)>h)continue;u.applyMatrix4(o.matrixWorld);let s=i.ray.origin.distanceTo(u);s<i.near||s>i.far||n.push({distance:s,point:c.clone().applyMatrix4(o.matrixWorld),object:e})}}function B(e,t,i,n,a,o,s){let l=new r,c=new r,p=new r,u=new r,m=new r;if(l.fromBufferAttribute(n,a),c.fromBufferAttribute(n,o),p.fromBufferAttribute(n,s),null===i.intersectTriangle(l,c,p,!1,u))return null;m.copy(u),m.applyMatrix4(e.matrixWorld);let f=t.ray.origin.distanceTo(m);return f<t.near||f>t.far?null:{faceIndex:1,distance:f,point:m.clone(),object:e}}};export{c as a,f as b,s as c,l as d};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=!(typeof window>"u")&&window.navigator.userAgent.toLowerCase().includes(" electron/"),o=(e&&(()=>{if(typeof window>"u")return;let e=new URLSearchParams(window.location.search).get("desktop-app-version");e?window.localStorage.setItem("desktop-app-version",e):window.localStorage.getItem("desktop-app-version")})(),typeof window>"u"||window.spline,!(typeof window>"u")&&window.navigator.platform.toUpperCase().includes("MAC")),t=!(typeof window>"u")&&(/iPad|iPhone|iPod/.test(window.navigator.userAgent)||o&&"ontouchend"in document),n=!(typeof window>"u")&&window.navigator.userAgent.toLowerCase().indexOf("firefox")>-1,a=!(typeof window>"u")&&("ontouchstart"in window||navigator.maxTouchPoints>0),i=(()=>{if(typeof window>"u")return!1;let e=navigator.userAgent,o=navigator.vendor;return/Safari/i.test(e)&&/Apple Computer/.test(o)})(),r=Number((()=>{if(typeof window>"u")return null;let e=navigator.userAgent.match(/Version\/(\d+\.\d)/);return e&&e[1]})());export{e as a,o as b,t as c,n as d,a as e,i as f,r as g};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){let t=!1;return e.scene.objects.traverse((e,r)=>{("Mesh"===r.type&&"UIGeometry"===r.geometry.type||"Page"===r.type&&void 0!==r.uiFrame)&&(t=!0)}),t}export{e as a};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=null,n=null;function r(n){e=n}function t(){return e}function i(e){n=e}function l(){if(null===n)throw new Error('[spe] Classic (WebGL) particles are not available in this build — it was compiled WebGPU-only. Re-export the scene with renderer "Both" or "WebGL 2", or load the full runtime.');return n}function o(e){return!0===e?.isWebGPUSplineRenderer}export{r as a,t as b,i as c,l as d,o as e};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./runtime-chunk-TU4KDRKR.js";import{W as o}from"./runtime-chunk-YUK55LCN.js";import{Dc as n,Fc as t,Jc as r}from"./runtime-chunk-VGN7YHB7.js";var i={enabled:!1},s=new WeakMap;function a(e){if(!i.enabled)return e;let o=s.get(e);return o||(o={...e,bloom:{...e.bloom,kernelSize:0},depthOfField:{...e.depthOfField,enabled:!1}},s.set(e,o)),o}var c=new WeakSet;function l(e){if(!e.isPointLight&&!e.isSpotLight&&!e.isDirectionalLight)return!1;if(i.enabled){if(!0===e.castShadow)return e.castShadow=!1,c.add(e),!0}else if(c.has(e)&&(c.delete(e),!1===e.castShadow))return e.castShadow=!0,!0;return!1}function u(i,s){switch(i.type){case"cavity":return function(e,o){return{...h(e,o),ridge:e.ridge,valley:e.valley}}(i,s);case"dust":return function(n,t){return{...h(n,t),color:e(n.color,t),coverage:o(n.coverage,t)??.2,softness:o(n.softness,t)??.2,noiseStrength:o(n.noiseStrength,t)??.2,noiseScale:o(n.noiseScale,t)??1}}(i,s);case"fresnel":return function(o,n){let{bias:t,scale:r,intensity:i,factor:s,color:a}=o;return{...h(o,n),color:e(a,n),bias:t,scale:r,intensity:i,factor:s}}(i,s);case"gradient":return function(e,o){let{gradientType:t,smooth:i,colors:s,steps:a,angle:c,offset:l,morph:u}=e;return{...h(e,o),gradientType:t,smooth:i,colors:s.map(e=>new r(e[0],e[1],e[2],e[3])),num:s.length,steps:a,offset:new n(...l.map(e=>"number"==typeof e?e:0)),morph:new n(...u.map(e=>"number"==typeof e?e:0)),angle:c}}(i,s);case"depth":return function(e,o){let{gradientType:n,near:i,far:s,isVector:a,isWorldSpace:c,origin:l,direction:u,colors:f,steps:p,smooth:m}=e;return{...h(e,o),gradientType:n,near:i,far:s,isVector:a,isWorldSpace:c,origin:new t(...l),direction:u?new t(...u):new t(1,0,0),colors:f.map(e=>void 0!==e?new r(e[0],e[1],e[2],e[3]):new r(0,0,0,0)),steps:p.slice(0,f.length),smooth:m}}(i,s);case"normal":return function(e,o){let{cnormal:n}=e;return{...h(e,o),cnormal:new t(n[0],n[1],n[2])}}(i,s);case"noise":return function(o,r){return{...h(o,r),scale:o.scale,move:o.move,fA:new n(...o.fA.map(e=>"number"==typeof e?e:0)),fB:new n(...o.fB.map(e=>"number"==typeof e?e:0)),size:new t(...o.size),distortion:new n(...o.distortion.map(e=>"number"==typeof e?e:0)),colorA:e(o.colorA,r),colorB:e(o.colorB,r),colorC:e(o.colorC,r),colorD:e(o.colorD,r),noiseType:o.noiseType,voronoiStyle:o.voronoiStyle,highCut:o.highCut,lowCut:o.lowCut,smoothness:o.smoothness,seed:o.seed,quality:o.quality}}(i,s);case"rainbow":return function(e,o){return{...h(e,o),filmThickness:e.filmThickness,movement:e.movement,wavelengths:new t(...e.wavelengths),noiseStrength:e.noiseStrength,noiseScale:e.noiseScale,offset:new t(...e.offset)}}(i,s);case"toon":return function(o,n){return{...h(o,n),positioning:o.positioning,colors:o.colors.map(e=>new r(e[0],e[1],e[2],e[3])),num:o.colors.length,steps:o.steps,source:new t(...o.source),isWorldSpace:o.isWorldSpace,noiseStrength:o.noiseStrength,noiseScale:o.noiseScale,shadowColor:e(o.shadowColor,n),offset:new t(...o.offset)}}(i,s);case"outline":return function(o,n){return{...h(o,n),outlineColor:e(o.outlineColor,n),contourColor:e(o.contourColor,n),outlineWidth:o.outlineWidth,contourWidth:o.contourWidth,outlineThreshold:o.outlineThreshold,contourThreshold:o.contourThreshold,outlineSmoothing:o.outlineSmoothing,contourFrequency:o.contourFrequency,contourDirection:new t(...o.contourDirection),positionalLines:o.positionalLines,compensation:o.compensation}}(i,s);case"transmission":return function(o,n){return{...h(o,n),thickness:o.thickness,ior:o.ior,roughness:o.roughness,attenuationColor:void 0!==o.attenuationColor?e(o.attenuationColor,n):{r:1,g:1,b:1,a:1},attenuationDistance:o.attenuationDistance??0}}(i,s);case"reflection":return function(e,n){return{...h(e,n),blur:o(e.blur,n)??0,thickness:o(e.thickness,n)??.001,steps:o(e.steps,n)??60,stepSize:o(e.stepSize,n)??.005,tracingMode:e.tracingMode,mirror:e.mirror??0}}(i,s);case"pattern":return function(o,t){return{...h(o,t),style:o.style,projection:o.projection,axis:o.axis,blending:o.blending,offset:new n(...o.offset.map(e=>"number"==typeof e?e:0)),colorA:e(o.colorA,t),colorB:e(o.colorB,t),frequency:new n(...o.frequency.map(e=>"number"==typeof e?e:0)),size:o.size,variation:o.variation,smoothness:o.smoothness,zigzag:o.zigzag,rotation:o.rotation,vertical:new n(...o.vertical.map(e=>"number"==typeof e?e:0)),horizontal:new n(...o.horizontal.map(e=>"number"==typeof e?e:0)),sides:o.sides}}(i,s);case"vertexColor":return h(i,s);default:return function(o,n){return{...h(o,n),color:e(o.color,n)}}(i,s)}}function f(e){return{type:e.type}}function h(e,o){let{alpha:n,mode:t,isMask:r}=e,i="string"==typeof n?Number(o.getVariable(n)??100)/100:n;return{...f(e),alpha:i,mode:t,isMask:r}}export{i as a,a as b,l as c,u as d};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as n}from"./runtime-chunk-DJJZN367.js";function e(o){if(o.component){let t=o.component.instances.indexOf(o);t>=0&&o.component.instances.splice(t,1);for(let t of o.children)n.is(t)&&e(t)}}export{e as a};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t,b as e,d as r}from"./runtime-chunk-FDRTCOJ5.js";import{g as i}from"./runtime-chunk-4KZXQGUQ.js";import{L as a,za as o}from"./runtime-chunk-OW6T4XFV.js";import{Ae as s,Ec as n,Fc as p,Oc as h,Rc as c,Tc as m,bd as f,dd as u,ud as d,wd as l,we as g,xe as v}from"./runtime-chunk-VGN7YHB7.js";var C=new p,j=new g,T=class extends l{constructor(t){let e=new u,r=new d({color:16777215,vertexColors:!0,toneMapped:!1}),i=[],a=[],o={},s=new m(15711266),n=new m(15711266),p=new m(2857471);function h(t,e,r){c(t,r),c(e,r)}function c(t,e){i.push(0,0,0),a.push(e.r,e.g,e.b),void 0===o[t]&&(o[t]=[]),o[t].push(i.length/3-1)}h("n1","n2",s),h("n2","n4",s),h("n4","n3",s),h("n3","n1",s),h("f1","f2",s),h("f2","f4",s),h("f4","f3",s),h("f3","f1",s),h("n1","f1",s),h("n2","f2",s),h("n3","f3",s),h("n4","f4",s),h("p","n1",n),h("p","n2",n),h("p","n3",n),h("p","n4",n),h("u1","u2",p),h("u2","u3",p),h("u3","u1",p),e.setAttribute("position",new f(i,3)),e.setAttribute("color",new f(a,3)),super(e,r),this.type="CameraHelper",this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}update(){let t=this.geometry,e=this.pointMap;j.projectionMatrixInverse.elements=[.5112609807824982,-0,-0,-0,-0,.41421356237309503,-0,-0,-0,-0,-0,-.099999,-0,-0,-1.0000000000000002,.100001];let r=.8;y("n1",e,t,j,-1,-1,r),y("n2",e,t,j,1,-1,r),y("n3",e,t,j,-1,1,r),y("n4",e,t,j,1,1,r);let i=r;y("f1",e,t,j,-1,-1,i),y("f2",e,t,j,1,-1,i),y("f3",e,t,j,-1,1,i),y("f4",e,t,j,1,1,i);let a=i;y("u1",e,t,j,.35,1.1,a),y("u2",e,t,j,-.35,1.1,a),y("u3",e,t,j,0,1.55,a),t.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}};function y(t,e,r,i,a,o,s){C.set(a,o,s).unproject(i);let n=e[t];if(void 0!==n){let t=r.getAttribute("position");for(let e=0,r=n.length;e<r;e++)t.setXYZ(n[e],C.x,C.y,C.z)}}var w=class extends(t(T)){constructor(t){super(t),this.object=t,this.name=`CombinedCameraHelper: ${t.uuid}`}updateMatrixWorld(t){super.updateMatrixWorld(t),this.updateTarget()}updateTarget(){let t=this.object.getTarget();this.updateWorldMatrix(!0,!1),this.worldToLocal(t)}raycast(t,r){e(this.object,this.geometry,t,r,!0)}};function P(t){return 1-Math.pow(1-t,3)}var b=new p,x=new p,_=new n,M=new p,O=new p,F=new p,A=class extends(r(g,w)){constructor(t="",e={...o.defaultData,name:""}){super(),this._cameraType="OrthographicCamera",this.targetOffset=a.DefaultTargetOffset,this.isUpVectorFlipped=!1,this.angleOffsetFromUp=0,this.wasMovedByUser=!1,this.wasMovedBySwitchCameraAction=!1,this._createdAt=typeof performance<"u"?performance.now():0,this._tickProjectionTransition=()=>{let t=this._projectionTransition;if(void 0===t)return;if(this.disposed)return void this._endProjectionTransition();t.raf=requestAnimationFrame(this._tickProjectionTransition);let e=A.projectionTransitionRequestRender??t.requestRender;this.updateProjectionMatrix(),e?.()},this.super_Entity(t,e),this.previousProjectionMatrix=new h,this.matrixAutoUpdate=!0,this.width=window.innerWidth,this.height=window.innerHeight;let r=this.width,i=this.height;this.orthoCamera=new s(-.5*r,.5*r,.5*i,-.5*i,-5e4,1e4),this.perspCamera=new v(45,r/i,50,1e4),this.left=this.orthoCamera.left,this.right=this.orthoCamera.right,this.top=this.orthoCamera.top,this.bottom=this.orthoCamera.bottom,this.far=this.orthoCamera.far,this.view=this.orthoCamera.view,this.aspect=this.perspCamera.aspect,this.focus=this.perspCamera.focus,this.filmGauge=this.perspCamera.filmGauge,this.filmOffset=this.perspCamera.filmOffset,this.objectHelper.update()}static withoutProjectionTransition(t){let e=A.projectionTransitionsEnabled;A.projectionTransitionsEnabled=!1;try{return t()}finally{A.projectionTransitionsEnabled=e}}get isPerspectiveCamera(){return"PerspectiveCamera"===this.cameraType}get isOrthographicCamera(){return!this.isPerspectiveCamera}get cameraType(){return this._cameraType}set fov(t){this.perspCamera.fov=t}get fov(){return this.perspCamera.fov}setNear(t,e){"PerspectiveCamera"===t?this.perspCamera.near=e:this.orthoCamera.near=e}setZoom(t,e){e>=0&&("PerspectiveCamera"===t?this.perspCamera.zoom=e:this.orthoCamera.zoom=e)}set cameraType(t){"PerspectiveCamera"===t?this.toPerspective():"OrthographicCamera"===t&&this.toOrthographic()}get near(){return"PerspectiveCamera"===this._cameraType?this.perspCamera.near:this.orthoCamera.near}set near(t){"PerspectiveCamera"===this._cameraType?this.perspCamera.near=t:this.orthoCamera.near=t}get zoom(){return"PerspectiveCamera"===this._cameraType?this.perspCamera.zoom:this.orthoCamera.zoom}set zoom(t){t>=0&&("PerspectiveCamera"===this._cameraType?this.perspCamera.zoom=t:this.orthoCamera.zoom=t)}lookAt(t,e,r){"number"==typeof t&&(t=new p(t,e,r)),super.lookAt(t),this.getWorldPosition(b),this.targetOffset=b.distanceTo(t)}getTarget(t=new p){return this.getWorldDirection(x),this.getWorldPosition(b),x.multiplyScalar(this.targetOffset),t.copy(b).add(x),t}getDistanceToTarget(){let t=this.getTarget();return this.getWorldPosition(b),b.distanceTo(t)}updateUp(){this.getWorldQuaternion(_),M.set(0,0,1).applyQuaternion(_),O.copy(c.DEFAULT_UP),this.isUpVectorFlipped&&O.negate(),O.applyQuaternion(_),F.copy(c.DEFAULT_UP).projectOnPlane(M),this.angleOffsetFromUp=F.angleTo(O),this.angleOffsetFromUp*=F.cross(O).dot(M)>=0?1:-1}updateTransformState(t,e){let r=super.updateTransformState(t,e);return void 0!==t.isUpVectorFlipped&&(this.isUpVectorFlipped=t.isUpVectorFlipped),this.updateUp(),r}getViewFrontToObject(t){let e=t.getWorldPosition(new p),r=t.getWorldDirection(new p).multiplyScalar(this.targetOffset);return{position:e.clone().add(r),target:e}}getViewToTarget(t){let e=this.getWorldDirection(new p).multiplyScalar(this.targetOffset);return{position:t.clone().sub(e),target:t}}getViewToObject(t){let e=new p;return t.getWorldPosition(e),this.getViewToTarget(e)}setViewplaneSize(t,e,r=!1){if(this.aspect=t/e,r){let r=t>e?this.aspect:1,i=t>e?1:this.aspect;this.left=-395*r,this.right=395*r,this.top=1/i*395,this.bottom=1/i*-395}else this.left=.5*-t,this.right=.5*t,this.top=.5*e,this.bottom=.5*-e;this.updateProjectionMatrix()}copyViewPlaneSize(t){this.aspect=t.aspect,this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.updateProjectionMatrix()}toOrthographic(){this.orthoCamera.left=this.left,this.orthoCamera.right=this.right,this.orthoCamera.top=this.top,this.orthoCamera.bottom=this.bottom,this.orthoCamera.view=this.view,this.orthoCamera.far=this.far,this.orthoCamera.updateProjectionMatrix(),this.projectionMatrix=this.orthoCamera.projectionMatrix,this.projectionMatrixInverse=this.orthoCamera.projectionMatrixInverse,this._cameraType="OrthographicCamera",this._applyProjectionTransition(),this.objectHelper&&this.objectHelper.update()}toPerspective(){this.perspCamera.aspect=this.aspect,this.perspCamera.fov=this.fov,this.perspCamera.view=this.view,this.perspCamera.far=this.far,this.perspCamera.updateProjectionMatrix(),this.projectionMatrix=this.perspCamera.projectionMatrix,this.projectionMatrixInverse=this.perspCamera.projectionMatrixInverse,this._cameraType="PerspectiveCamera",this._applyProjectionTransition(),this.objectHelper&&this.objectHelper.update()}get isProjectionTransitioning(){return void 0!==this._projectionTransition}get projectionTransitionProgress(){let t=this._projectionTransition;if(void 0===t)return 1;let e=(performance.now()-t.start)/t.duration;return e>=1?1:e<=0?0:P(e)}get _activeSubCamera(){return"PerspectiveCamera"===this._cameraType?this.perspCamera:this.orthoCamera}_canAnimateProjection(){return A.projectionTransitionsEnabled&&"function"==typeof requestAnimationFrame&&typeof performance<"u"&&performance.now()-this._createdAt>=A.projectionTransitionMinAgeMs}_beginProjectionTransition(t){let e=this._projectionTransition;void 0===e&&(e={from:new h,blend:new h,blendInverse:new h,start:0,duration:A.projectionTransitionDuration,referenceDepth:1,raf:0,requestRender:t},this._projectionTransition=e),e.from.copy(this.projectionMatrix),e.start=performance.now(),e.duration=A.projectionTransitionDuration,e.referenceDepth=Number.isFinite(this.targetOffset)?Math.max(1,this.targetOffset):1,t&&(e.requestRender=t),0!==e.raf&&cancelAnimationFrame(e.raf),e.raf=requestAnimationFrame(this._tickProjectionTransition)}_applyProjectionTransition(){let t=this._projectionTransition;if(void 0===t)return;let e=(performance.now()-t.start)/t.duration;if(e>=1)return void this._endProjectionTransition();let r=P(e),i=t.from.elements,a=this._activeSubCamera.projectionMatrix.elements,o=t.blend.elements,s=t.referenceDepth,n=Math.max(1e-6,i[15]-i[11]*s),p=r*n/(r*n+(1-r)*Math.max(1e-6,a[15]-a[11]*s));for(let t=0;t<16;t++)o[t]=i[t]+(a[t]-i[t])*p;t.blendInverse.copy(t.blend).invert(),this.projectionMatrix=t.blend,this.projectionMatrixInverse=t.blendInverse}_endProjectionTransition(){let t=this._projectionTransition;if(void 0===t)return;0!==t.raf&&cancelAnimationFrame(t.raf),this._projectionTransition=void 0;let e=this._activeSubCamera;this.projectionMatrix=e.projectionMatrix,this.projectionMatrixInverse=e.projectionMatrixInverse}_syncProjectionTransition(t){let e=t._projectionTransition;if(void 0===e)return void(void 0!==this._projectionTransition&&this._endProjectionTransition());let r=this._projectionTransition;void 0===r?(r={from:new h,blend:new h,blendInverse:new h,start:0,duration:1,referenceDepth:1,raf:0,requestRender:void 0},this._projectionTransition=r):0!==r.raf&&(cancelAnimationFrame(r.raf),r.raf=0),r.requestRender=void 0,r.from.copy(e.from),r.start=e.start,r.duration=e.duration,r.referenceDepth=e.referenceDepth,this._applyProjectionTransition()}setFocalLength(t){this.perspCamera.setFocalLength(t),this.toPerspective()}getFocalLength(){return this.perspCamera.getFocalLength()}getEffectiveFOV(){return this.perspCamera.getEffectiveFOV()}getFilmWidth(){return this.perspCamera.getFilmWidth()}getFilmHeight(){return this.perspCamera.getFilmHeight()}setViewOffset(t,e,r,i,a,o){"PerspectiveCamera"===this._cameraType?this.perspCamera.setViewOffset(t,e,r,i,a,o):this.orthoCamera.setViewOffset(t,e,r,i,a,o),this._applyProjectionTransition()}clearViewOffset(){"PerspectiveCamera"===this._cameraType?(this.perspCamera.clearViewOffset(),this.toPerspective()):(this.orthoCamera.clearViewOffset(),this.toOrthographic())}copyHistory(){this.previousProjectionMatrix&&this.previousProjectionMatrix.copy(this.projectionMatrix)}updateProjectionMatrix(){"PerspectiveCamera"===this._cameraType?this.toPerspective():"OrthographicCamera"===this._cameraType&&this.toOrthographic()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}copy(t,e){return super.copy(t,e),this.parent=t.parent,this.orthoCamera.copy(t.orthoCamera),this.perspCamera.copy(t.perspCamera),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.far=t.far,this.view=null===t.view?null:Object.assign({},t.view),this._cameraType=t._cameraType,this.aspect=t.aspect,this.fov=t.fov,this.focus=t.focus,this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this.targetOffset=a.sanitizeTargetOffset(t.targetOffset),this.updateProjectionMatrix(),this._syncProjectionTransition(t),this}toCameraState(t=[]){let e={type:this.cameraType,far:this.far,orthographic:{near:this.orthoCamera.near,zoom:this.orthoCamera.zoom},perspective:{near:this.perspCamera.near,fov:this.perspCamera.fov,zoom:this.perspCamera.zoom},up:this.up.toArray(),targetOffset:this.targetOffset,isUpVectorFlipped:this.isUpVectorFlipped};return i(e,t)}updateCameraSubtype(t,e){let r="perspective"===t?"PerspectiveCamera":"OrthographicCamera";void 0!==e.zoom&&this.setZoom(r,e.zoom),void 0!==e.near&&this.setNear(r,e.near),void 0!==e.fov&&"PerspectiveCamera"===r&&(this.fov=e.fov)}updateState(t,e){this.updateCameraState(t,e)}updateCameraState(t,e){this.updateState_Entity(t,e),void 0!==t.far&&(this.far=t.far),void 0!==t.orthographic&&this.updateCameraSubtype("orthographic",t.orthographic),void 0!==t.perspective&&this.updateCameraSubtype("perspective",t.perspective),void 0!==t.type&&(t.type!==this._cameraType&&this._canAnimateProjection()&&this._beginProjectionTransition(e?.shared.requestRender),this.cameraType=t.type),void 0!==t.up&&this.up.fromArray(t.up.map(t=>"number"==typeof t?t:0)),void 0!==t.targetOffset&&(this.targetOffset=a.sanitizeTargetOffset(t.targetOffset)),void 0!==t.isUpVectorFlipped&&(this.isUpVectorFlipped=t.isUpVectorFlipped),this.updateProjectionMatrix()}updateByPatchedOp(t,e,r){super.updateByPatchedOp(t,e,r),1===t.path.length&&0===t.type&&this.updateCameraSubtype(t.path[0],t.props)}toState(t){return{...super.toState(t),...this.toCameraState(t),type:this.cameraType}}},V=A;V.projectionTransitionsEnabled=!1,V.projectionTransitionDuration=350,V.projectionTransitionMinAgeMs=1e3;export{V as a};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,b as i}from"./runtime-chunk-ARTGMJ7O.js";import{E as t,F as s,ea as o}from"./runtime-chunk-YUK55LCN.js";import{t as r}from"./runtime-chunk-DJJZN367.js";import{Fc as h,Oc as a,Xc as d,cd as n}from"./runtime-chunk-VGN7YHB7.js";var l=new d,u=new h;function m(e){let i=!1;return e.scene.objects.traverse((e,t)=>{"Mesh"===t.type&&"SubdivGeometry"===t.geometry.type&&(i=!0)}),i}var y=class extends o{constructor(e,i,t){super(e,i,t),this.data=i,this.hiddenMatrixOld=new a,this.smoothShading=!0,this.skipReactionUpdate=!1}chooseGeoemtryCache(e){return this.dataPatched.flatShading?e.geometryCache:e.geometryCache2}get subdivPointerNew(){return void 0!==this.localGeometry?this.subdivPointer:this.geometry.ensureSubdivPointer()}get originalGeometryNew(){return void 0!==this.localGeometry?this.originalGeometry:this.geometry.originalGeometry}get phongAngle(){return this.data.geometry.phongAngle??45}updateEntityBoxSize(e,i){let t=this.geometry.userData.parameters;e.copy(this.originalGeometryNew.boundingSphere.center),i.set(t.width,t.height,t.depth??0).multiplyScalar(.5)}createGeometryByControls(s){if(!0===this.skipReactionUpdate)return;let o=this.localGeometry?.uuid,{originalGeometry:r,subdividedGeometry:h,subdivPointer:a}=t.build(s,this.subdivPointer,this.smoothShading,this.hasNonUniformScale?this.shearScale:void 0);this.subdivPointer=a,void 0!==r&&(this.originalGeometry?.dispose(),this.originalGeometry=r),void 0!==h&&(this.subdividedGeometry?.dispose(),this.subdividedGeometry=h??void 0),this.localGeometry=this.subdividedGeometry??this.originalGeometry,e(this),i(this),this.calcBoundingBox(),o&&(this.localGeometry.uuid=o)}updateState(e,i){if(super.updateState(e,i),void 0!==e.flatShading){let t=this.material;this.material=Array.isArray(t)?t.map(e=>e.getFlavor(!1,e.side,e.wireframe)):t.getFlavor(!1,t.side,t.wireframe),this.smoothShading=!e.flatShading,this.createGeometryDelayed(i)}}updateMesh(e=!1,i=!1,s=!1){i&&this.subdividedGeometry||t.buildLevel(this.subdivPointer,!0,this.smoothShading?this.phongAngle:-1,this.originalGeometry,e&&this.hasNonUniformScale?this.shearScaleInv:void 0,s),this.subdividedGeometry&&t.buildLevel(this.subdivPointer,!1,this.smoothShading?this.phongAngle:-1,this.subdividedGeometry,e&&this.hasNonUniformScale?this.shearScaleInv:void 0)}updateTopology(){let s=this.localGeometry?.uuid;this.originalGeometry.dispose(),this.originalGeometry=t.buildLevel(this.subdivPointer,!0,this.smoothShading?this.phongAngle:-1),this.subdividedGeometry&&(this.subdividedGeometry.dispose(),this.subdividedGeometry=t.buildLevel(this.subdivPointer,!1,this.smoothShading?this.phongAngle:-1)),this.localGeometry=this.subdividedGeometry??this.originalGeometry,e(this),i(this),this.calcBoundingBox(),s&&(this.localGeometry.uuid=s)}raycast(e,i){let t=this.localGeometry;this.localGeometry=this.originalGeometryNew,r.prototype.raycast.call(this,e,i),this.localGeometry=t}activateShearCompensation(){!this.hasNonUniformScale||(this.matrix.copy(this.matrixWorldRigid),this.hiddenMatrixOld.copy(this.hiddenMatrix),this.hiddenMatrix.copy(this.parent.matrixWorld).invert())}deactivateShearCompensation(){!this.hasNonUniformScale||(this.updateMatrix(),this.hasNonUniformScale=void 0,this.hiddenMatrix.copy(this.hiddenMatrixOld))}calcBoundingBox(){let e=this.originalGeometry;null===e.boundingSphere&&(e.boundingSphere=new n,this.subdividedGeometry&&(this.subdividedGeometry.boundingSphere=e.boundingSphere));let i=e.attributes.position,t=e.boundingSphere.center;l.setFromBufferAttribute(i),l.getCenter(t),e.boundingSphere.radius=t.distanceTo(l.max),isNaN(e.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this),l.getSize(u),this.hasNonUniformScale&&u.divide(this.scale);let s={width:u.x,height:u.y,depth:u.z};return this.geometry.userData.parameters=s,s}updateBoundingSphere(e){let i=this.originalGeometry;l.min.set(e[0],e[2],e[4]),l.max.set(e[1],e[3],e[5]),this.hasNonUniformScale&&(l.min.applyMatrix4(this.shearScaleInv),l.max.applyMatrix4(this.shearScaleInv)),null===i.boundingSphere&&(i.boundingSphere=new n);let t=i.boundingSphere.center;l.getCenter(t),i.boundingSphere.radius=t.distanceTo(l.max)}freeSubdivPointer(){this.subdivPointer&&(t.freeSubdivPointer(this.subdivPointer),this.subdivPointer=0),this.localGeometry=void 0,this.originalGeometry?.dispose(),this.subdividedGeometry?.dispose()}dispose(){super.dispose(),this.freeSubdivPointer()}updateSubdivisionLevel(s){if(!0===this.skipReactionUpdate)return;let o=this.localGeometry,r=o?.uuid,h=o?.userData.parameters,a=s.subdivisions>0?t.buildRefined(this.subdivPointer,s.subdivisions,this.smoothShading?s.phongAngle??35:-1):null;this.subdividedGeometry?.dispose(),this.subdividedGeometry=a??void 0,this.subdividedGeometry&&this.originalGeometry.boundingSphere&&(this.subdividedGeometry.boundingSphere=this.originalGeometry.boundingSphere),this.localGeometry=this.subdividedGeometry??this.originalGeometry,e(this),i(this),void 0!==h&&(this.localGeometry.userData.parameters=h),r&&(this.localGeometry.uuid=r)}updateByPatchedOpGeometry(e,i,t){super.updateByPatchedOpGeometry(e,i,t),this.localGeometry&&(0===e.type&&0===e.path.length&&s(e.props)&&this.subdivPointer?this.updateSubdivisionLevel(i):this.createGeometryByControls(i))}};export{m as a,y as b};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t}from"./runtime-chunk-5VJGAC3M.js";import{a as e}from"./runtime-chunk-5CH7XRKY.js";import{d as n,e as s,f as i,g as r,h as a}from"./runtime-chunk-BXPWRF47.js";import{a as o,b as l}from"./runtime-chunk-O5NBGIBR.js";import{b as d,e as c,f as h,g as p}from"./runtime-chunk-23QOKH2J.js";import{a as u}from"./runtime-chunk-H6T5LPRN.js";import{a as m}from"./runtime-chunk-HER7UVU3.js";import{a as f}from"./runtime-chunk-W7QPV37Y.js";import{b as y}from"./runtime-chunk-J2I4VBHR.js";import{a as g,b as x}from"./runtime-chunk-ARTGMJ7O.js";import{a as v}from"./runtime-chunk-LATYCOUS.js";import{d as A}from"./runtime-chunk-FDRTCOJ5.js";import{K as b,da as C,ea as w,g as I}from"./runtime-chunk-YUK55LCN.js";import{b as M,c as P,e as B,h as S,t as D}from"./runtime-chunk-DJJZN367.js";import{a as R,b as E,c as O,d as z,f as j,h as W,i as T}from"./runtime-chunk-QZ35BPGB.js";import{c as _,e as k,g as U}from"./runtime-chunk-TZCHGFVF.js";import{Da as N,K as G,Ka as V,a as F,b as Y,n as L,o as q,w as Q,xa as X}from"./runtime-chunk-OW6T4XFV.js";import{Aa as Z,Ba as H,Dc as K,Ec as J,Fc as $,Gc as tt,Ge as et,Ja as nt,Oa as st,Oc as it,Ra as rt,Tc as at,Vc as ot,Xc as lt,Yc as dt,Zc as ct,bd as ht,cd as pt,ce as ut,dd as mt,kd as ft,l as yt,ld as gt,mc as xt,md as vt,n as At,nd as bt,od as Ct,pd as wt,qd as It,za as Mt}from"./runtime-chunk-VGN7YHB7.js";import{c as Pt}from"./runtime-chunk-ML3Z74BL.js";var Bt=null;function St(t){Bt=t}var Dt=new WeakMap,Rt=1;function Et(t){let e=Dt.get(t);return void 0===e&&(e=Rt++,Dt.set(t,e)),e}function Ot(t,e,n,s){let i=t,r=e;return[Et(n),Et(s),i.layers?.mask??0,i.renderOrder??0,!0===(i.castShadow??r.castShadow)?1:0,!0===(i.receiveShadow??r.receiveShadow)?1:0].join(":")}var zt=[8,32,128,512],jt=zt[zt.length-1],Wt=(new it).makeScale(0,0,0),Tt=class extends It{constructor(t,e,n,s){super(t,e,n),this.isInstanceGroup=!0,this.members=new Array(n).fill(null),this.raycast=()=>{},this.matrixAutoUpdate=!1,this.frustumCulled=!1,this.adoptPassState(s);for(let t=0;t<n;t++)this.setMatrixAt(t,Wt);this.instanceMatrix.needsUpdate=!0}adoptPassState(t){this.layers.mask=t.layers.mask,this.renderOrder=t.renderOrder,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow}assign(t,e){this.members[t]=e}writeSlot(t,e){return!1===e.visible?(this.setMatrixAt(t,Wt),!1):(this.setMatrixAt(t,e.matrixWorld),!0)}park(t){this.members[t]=null,this.setMatrixAt(t,Wt)}get memberCount(){let t=0;for(let e of this.members)null!==e&&t++;return t}},_t=8,kt=class{constructor(t=8){this.minGroupSize=t,this.groups=[],this.groupKeys=new WeakMap,this.placements=new Map,this.page=null,this.stats={instancingGroups:0,instancedDrawsSaved:0,instancingRegroups:0,instancingParks:0,instancingIneligible:{}}}update(t,e){this.page!==t&&(this.teardown(),this.page=t,e=!0),!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),e&&this.reconcile(t),this.refresh()}reconcile(t){let e={},n=new Map;t.traverse(t=>{if(!0===t.isInstanceGroup)return;let s=function(t){if(!0!==t.isMesh)return"not-a-mesh";if(O(t)||j(t)||E(t)||R(t))return"excluded-type";let e=function(t){let e=W(t)?t.object:t;return void 0!==e.geometry?e:void 0}(t);if(void 0===e)return"not-a-mesh";let n=e.material;if(void 0===n)return"not-a-mesh";if(Array.isArray(n))return"array-material";let s=e.builtSharedGeometry;if(void 0===s)return"unrealized-geometry";if(!function(t){return!0===t.isShared}(s))return"unshared-geometry";if(void 0===s.attributes.position)return"empty-geometry";if(void 0!==s.morphAttributes.position)return"morph";if(!0===e.isSkinnedMesh)return"skinned";let i=e.morphTargetInfluences;if(void 0!==i&&i.length>0)return"morph";if(0!==s.drawRange.start||s.drawRange.count!==Number.POSITIVE_INFINITY)return"draw-range";let r=n;return null!=r.positionNode||null!=r.castShadowPositionNode?"position-node":!0===r.transparent?"transparent":void 0!==e.userData?.__splinePlanarMirror?"reflection":function(t){let e=t;for(;null!==e;){let t=e.states;if(void 0!==t&&Object.keys(t).length>0)return!0;e=e.parent}return!1}(e)?"interaction-states":{object:t,owner:e,geometry:s,material:n,key:Ot(t,e,s,n)}}(t);if("string"==typeof s)return void(e[s]=(e[s]??0)+1);let i=n.get(s.key);void 0===i?n.set(s.key,[s]):i.push(s)});let s=new Map;for(let[t,e]of n)for(let n of e)s.set(n.object,t);let i=!1;for(let[t,e]of this.placements)s.get(t)!==this.groupKeys.get(e.group)&&this.parkPlacement(t,e);for(let t=this.groups.length-1;t>=0;t--){let e=this.groups[t];e.memberCount>=this.minGroupSize||(this.destroyGroup(e),this.groups.splice(t,1),i=!0)}for(let[e,s]of n){let n=s.filter(t=>!this.placements.has(t.object));if(0===n.length)continue;let r=0;for(let t of this.groups){if(r>=n.length)break;if(this.groupKeys.get(t)!==e)continue;let{members:s}=t;for(let e=0;e<s.length&&r<n.length;e++)null===s[e]&&this.place(t,e,n[r++].object)}for(;n.length-r>=this.minGroupSize;){let s=n.slice(r,r+jt);this.groups.push(this.createGroup(t,e,s)),r+=s.length,i=!0}}i&&this.stats.instancingRegroups++,this.publishGroupStats(),this.stats.instancingIneligible=e}createGroup(t,e,n){let s=n[0],i=new Tt(s.geometry,s.material,function(t){for(let e of zt)if(t<=e)return e;return jt}(n.length),s.object);this.groupKeys.set(i,e);for(let t=0;t<n.length;t++)this.place(i,t,n[t].object);return t.add(i),i}destroyGroup(t){for(let e=0;e<t.members.length;e++){let n=t.members[e];null!==n&&this.parkPlacement(n,{group:t,slot:e})}t.removeFromParent(),t.dispose()}place(t,e,n){t.assign(e,n),this.placements.set(n,{group:t,slot:e}),n.isDrawSuppressed=!0}parkPlacement(t,e){e.group.park(e.slot),e.group.instanceMatrix.needsUpdate=!0,this.placements.delete(t),t.isDrawSuppressed=!1,this.stats.instancingParks++}refresh(){for(let t of this.groups){let{members:e}=t,n=null;for(let s=0;s<e.length;s++){let i=e[s];null!==i&&(null===n&&(n=i),t.writeSlot(s,i))}null!==n&&(t.adoptPassState(n),t.instanceMatrix.needsUpdate=!0)}}teardown(){for(let t of this.groups)this.destroyGroup(t);this.groups.length=0;for(let t of this.placements.keys())t.isDrawSuppressed=!1;this.placements.clear(),this.publishGroupStats()}dispose(){this.teardown(),this.page=null}publishGroupStats(){let t=0;for(let e of this.groups){let n=e.memberCount;n>0&&(t+=n-1)}this.stats.instancingGroups=this.groups.length,this.stats.instancedDrawsSaved=t}},Ut=function(){let t=new Float32Array(1),e=new Int32Array(t.buffer);return function(n){return t[0]=n,e[0]}}(),Nt=function(t,e,n,s){return t+(e<<8)+(n<<16)+(s<<24)},Gt=new K;function Vt(t){let e=!1;return t.scene.objects.traverse((t,n)=>{if(!1===n.visible)return!0;"Splat"===n.type&&(e=!0)}),e}var Ft,Yt,Lt=class extends gt{constructor(t,e,n,s,i=!1,r=1,a,o){super(n,s),this.splatCount=e,this.meshIndexIntervals=a,this.meshMatrixWorlds=o,this.splatBuffers=t,this.geometry=n,this.material=s,this.splatDataTextures=null,this.halfPrecisionCovariancesOnGPU=i,this.devicePixelRatio=r,this.resetLocalSplatDataAndTexturesFromSplatBuffer()}static buildMesh(t,e,n=!1,s=1,i,r){let a=Lt.buildGeomtery(e),o=Lt.buildMaterial(i);return new Lt(t,e,a,o,n,s,i,r)}static buildMaterial(t){if("webgpu"===b()&&Bt)return Bt.createSplatMaterial(t);let e={covariancesTexture:{type:"t",value:null},centersColorsTexture:{type:"t",value:null},meshIndexIntervals:{value:t},meshMatrixWorldsTexture:{type:"t",value:null},focal:{type:"v2",value:new K},viewport:{type:"v2",value:new K},basisViewport:{type:"v2",value:new K},debugColor:{type:"v3",value:new at},covariancesTextureSize:{type:"v2",value:new K(1024,1024)},centersColorsTextureSize:{type:"v2",value:new K(1024,1024)},orthoZoom:{type:"f",value:-1}};return new ut({uniforms:e,vertexShader:"\n precision highp float;\n #include <common>\n\n attribute uint splatIndex;\n\n uniform highp sampler2D covariancesTexture;\n uniform highp usampler2D centersColorsTexture;\n uniform vec2 focal;\n uniform vec2 viewport;\n uniform vec2 basisViewport;\n uniform vec2 covariancesTextureSize;\n uniform vec2 centersColorsTextureSize;\n\t\t\t\t\t\tuniform highp sampler2D meshMatrixWorldsTexture;\n\t\t\t\t\t\tuniform uint meshIndexIntervals[257];\n\t\t\t\t\t\tuniform float orthoZoom;\n\n varying vec4 vColor;\n varying vec2 vUv;\n\n varying vec2 vPosition;\n\n const vec4 encodeNorm4 = vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0);\n const uvec4 mask4 = uvec4(uint(0x000000FF), uint(0x0000FF00), uint(0x00FF0000), uint(0xFF000000));\n const uvec4 shift4 = uvec4(0, 8, 16, 24);\n vec4 uintToRGBAVec (uint u) {\n uvec4 urgba = mask4 & u;\n urgba = urgba >> shift4;\n vec4 rgba = vec4(urgba) * encodeNorm4;\n return rgba;\n }\n\n vec2 getDataUV(in int stride, in int offset, in vec2 dimensions) {\n vec2 samplerUV = vec2(0.0, 0.0);\n float d = float(splatIndex * uint(stride) + uint(offset)) / dimensions.x;\n samplerUV.y = float(floor(d)) / dimensions.y;\n samplerUV.x = fract(d);\n return samplerUV;\n }\n\n void main () {\n uvec4 sampledCenterColor = texture(centersColorsTexture, getDataUV(1, 0, centersColorsTextureSize));\n vec3 splatCenter = uintBitsToFloat(uvec3(sampledCenterColor.gba));\n vColor = uintToRGBAVec(sampledCenterColor.r);\n\n vPosition = position.xy * 2.0;\n\n\t\t\t\t\t\t\t\tuint meshIndex;\n\t\t\t\t\t\t\t\tfor (int i = 1; i < 257; i++) {\n\t\t\t\t\t\t\t\t\tif (splatIndex < meshIndexIntervals[i]) {\n\t\t\t\t\t\t\t\t\t\tmeshIndex = uint(i - 1);\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tfloat strideMulmeshIndex = float(4u*meshIndex);\n\t\t\t\t\t\t\t\tfloat meshMatrixWorldsTextureLength = float(256*4);\n\n\t\t\t\t\t\t\t\tmat4 modelMat = mat4(\n\t\t\t\t\t\t\t\t\ttexture(meshMatrixWorldsTexture, vec2((strideMulmeshIndex+0.0)/meshMatrixWorldsTextureLength, 0)),\n\t\t\t\t\t\t\t\t\ttexture(meshMatrixWorldsTexture, vec2((strideMulmeshIndex+1.0)/meshMatrixWorldsTextureLength, 0)),\n\t\t\t\t\t\t\t\t\ttexture(meshMatrixWorldsTexture, vec2((strideMulmeshIndex+2.0)/meshMatrixWorldsTextureLength, 0)),\n\t\t\t\t\t\t\t\t\ttexture(meshMatrixWorldsTexture, vec2((strideMulmeshIndex+3.0)/meshMatrixWorldsTextureLength, 0))\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\tmat4 modelViewMat = viewMatrix * modelMat;\n\t\t\t\t\t\t\t\tvec4 viewCenter = modelViewMat * vec4(splatCenter, 1.0); \n vec4 clipCenter = projectionMatrix * viewCenter;\n\n vec2 sampledCovarianceA = texture(covariancesTexture, getDataUV(3, 0, covariancesTextureSize)).rg;\n vec2 sampledCovarianceB = texture(covariancesTexture, getDataUV(3, 1, covariancesTextureSize)).rg;\n vec2 sampledCovarianceC = texture(covariancesTexture, getDataUV(3, 2, covariancesTextureSize)).rg;\n\n vec3 cov3D_M11_M12_M13 = vec3(sampledCovarianceA.rg, sampledCovarianceB.r);\n vec3 cov3D_M22_M23_M33 = vec3(sampledCovarianceB.g, sampledCovarianceC.rg);\n\n \n mat3 Vrk = mat3(\n cov3D_M11_M12_M13.x, cov3D_M11_M12_M13.y, cov3D_M11_M12_M13.z,\n cov3D_M11_M12_M13.y, cov3D_M22_M23_M33.x, cov3D_M22_M23_M33.y,\n cov3D_M11_M12_M13.z, cov3D_M22_M23_M33.y, cov3D_M22_M23_M33.z\n );\n float s = 1.0 / (viewCenter.z * viewCenter.z);\n\n mat3 W = transpose(mat3(modelViewMat));\n mat3 T = orthoZoom > 0.0 ? W : W * mat3(\n\t\t\t\t\t\t\t\t\tfocal.x / viewCenter.z, 0., -(focal.x * viewCenter.x) * s,\n\t\t\t\t\t\t\t\t\t0., focal.y / viewCenter.z, -(focal.y * viewCenter.y) * s,\n\t\t\t\t\t\t\t\t\t0., 0., 0.\n\t\t\t\t\t\t\t\t);\n mat3 cov2Dm = transpose(T) * Vrk * T;\n cov2Dm[0][0] += 0.3;\n cov2Dm[1][1] += 0.3;\n\n \n \n \n \n vec3 cov2Dv = vec3(cov2Dm[0][0], cov2Dm[0][1], cov2Dm[1][1]);\n\n vec3 ndcCenter = clipCenter.xyz / clipCenter.w;\n\n \n \n \n \n \n \n \n \n float a = cov2Dv.x;\n float d = cov2Dv.z;\n float b = cov2Dv.y;\n float D = a * d - b * b;\n float trace = a + d;\n float traceOver2 = 0.5 * trace;\n float term2 = sqrt(trace * trace / 4.0 - D);\n float eigenValue1 = traceOver2 + term2;\n\t\t\t\t\t\t\t\tfloat eigenValue2 = max(traceOver2 - term2, 0.00); \n\n const float maxSplatSize = 1024.0;\n vec2 eigenVector1 = normalize(vec2(b, eigenValue1 - a));\n \n vec2 eigenVector2 = vec2(eigenVector1.y, -eigenVector1.x);\n vec2 basisVector1 = eigenVector1 * min(sqrt(2.0 * eigenValue1), maxSplatSize);\n vec2 basisVector2 = eigenVector2 * min(sqrt(2.0 * eigenValue2), maxSplatSize);\n\n vec2 ndcOffset = vec2(vPosition.x * basisVector1 + vPosition.y * basisVector2) * basisViewport;\n\n\t\t\t\t\t\t\t\tif (orthoZoom > 0.0) {\n\t\t\t\t\t\t\t\t\tndcOffset *= orthoZoom;\n\t\t\t\t\t\t\t\t}\n\n gl_Position = vec4(ndcCenter.xy + ndcOffset, ndcCenter.z, 1.0);\n }",fragmentShader:"\n precision highp float;\n #include <common>\n\n uniform vec3 debugColor;\n\n varying vec4 vColor;\n varying vec2 vUv;\n\n varying vec2 vPosition;\n\t\t\t\t\t\tlayout(location = 1) out vec4 gVelocity; \n\n void main () {\n \n \n float A = -dot(vPosition, vPosition);\n if (A < -4.0) discard;\n vec3 color = vColor.rgb;\n A = exp(A) * vColor.a;\n gl_FragColor = vec4(color.rgb, A);\n\t\t\t\t\t\t\t\tgVelocity = vec4(0.0); \n }",transparent:!0,alphaTest:1,blending:At,depthTest:!0,depthWrite:!1,side:yt})}static buildGeomtery(t){let e=new mt;e.setIndex([0,1,2,0,2,3]);let n=new Float32Array(12),s=new ct(n,3);e.setAttribute("position",s),s.setXYZ(0,-1,-1,0),s.setXYZ(1,-1,1,0),s.setXYZ(2,1,1,0),s.setXYZ(3,1,-1,0),s.needsUpdate=!0;let i=(new et).copy(e),r=new Uint32Array(t),a=new wt(r,1,!1);return a.setUsage(xt),i.setAttribute("splatIndex",a),i.instanceCount=t,i}resetLocalSplatDataAndTexturesFromSplatBuffer(){this.updateLocalSplatDataFromSplatBuffer(),this.allocateAndStoreLocalSplatDataInTextures()}updateLocalSplatDataFromSplatBuffer(){this.splatBuffers.forEach(t=>t.buildPreComputedBuffers()),this.covariances=new Float32Array(6*this.splatCount),this.colors=new Uint8Array(4*this.splatCount),this.centers=new Float32Array(3*this.splatCount);let t=0,e=0,n=0;for(let s of this.splatBuffers){let i=s.nsplats;this.colors.subarray(t,t+4*i).set(s.colorsA),t+=4*i,this.centers.subarray(e,e+3*i).set(s.decoded.xyz.denormDequant().data),e+=3*i,this.covariances.subarray(n,n+6*i).set(new Float32Array(s.precomputedCovarianceBufferData)),n+=6*i}}allocateAndStoreLocalSplatDataInTextures(){let t=this.splatCount,e=new K(4096,1024);for(;e.x*e.y*2<6*t;)e.y*=2;let n,s,i=new K(4096,1024);for(;i.x*i.y*4<4*t;)i.y*=2;if(this.halfPrecisionCovariancesOnGPU){s=new Uint16Array(e.x*e.y*2);for(let t=0;t<this.covariances.length;t++)s[t]=dt.toHalfFloat(this.covariances[t]);n=new bt(s,e.x,e.y,st,H)}else s=new Float32Array(e.x*e.y*2),s.set(this.covariances),n=new bt(s,e.x,e.y,st,Z);n.needsUpdate=!0,this.material.uniforms.covariancesTexture.value=n,this.material.uniforms.covariancesTextureSize.value.copy(e);let r=new Uint32Array(i.x*i.y*4);for(let e=0;e<t;e++){let t=4*e,n=3*e,s=4*e;r[s]=Nt(this.colors[t],this.colors[t+1],this.colors[t+2],this.colors[t+3]),r[s+1]=Ut(this.centers[n]),r[s+2]=Ut(this.centers[n+1]),r[s+3]=Ut(this.centers[n+2])}let a=new bt(r,i.x,i.y,rt,Mt);"webgpu"!==b()&&(a.internalFormat="RGBA32UI"),a.needsUpdate=!0,this.material.uniforms.centersColorsTexture.value=a,this.material.uniforms.centersColorsTextureSize.value.copy(i);let o=new Float32Array(4096);for(let t=0;t<this.meshMatrixWorlds.length;t++)o.set(this.meshMatrixWorlds[t].elements,16*t);let l=new bt(o,1024,1,nt,Z);l.needsUpdate=!0,this.material.uniforms.meshMatrixWorldsTexture.value=l,this.material.uniformsNeedUpdate=!0,this.splatDataTextures={covariances:{data:s,texture:n,size:e},centerColors:{data:r,texture:a,size:i},meshMatrixWorlds:{data:o,texture:l}}}updateIndexes(t){let e=this.geometry;e.attributes.splatIndex.set(t),e.attributes.splatIndex.needsUpdate=!0,e.instanceCount=t.length}updateUniforms(t,e,n,s){this.splatCount>0&&(Gt.set(t.x*this.devicePixelRatio,t.y*this.devicePixelRatio),this.material.uniforms.viewport.value.copy(Gt),this.material.uniforms.basisViewport.value.set(2/Gt.x,2/Gt.y),this.material.uniforms.focal.value.set(e,n),this.material.uniforms.orthoZoom.value=s,this.material.uniformsNeedUpdate=!0)}getSplatDataTextures(){return this.splatDataTextures}getSplatCount(){return this.splatCount}getCenters(){return this.centers}getColors(){return this.colors}getCovariances(){return this.covariances}dispose(){this.geometry.dispose(),this.material.dispose(),this.splatDataTextures&&(this.splatDataTextures.covariances.texture.dispose(),this.splatDataTextures.centerColors.texture.dispose(),this.splatDataTextures.meshMatrixWorlds.texture.dispose()),this.removeFromParent()}},qt=new Promise(t=>{Ft=t}),Qt=!1;function Xt(){if(!Qt)return Yt||(Yt=async function(){let t=await import("./gaussian-splat-compression.js");Ft(t),Qt=!0}())}var Zt=new it,Ht=new tt,Kt=new $,Jt=new $,$t=new $,te=new $,ee=new $,ne=new $;function se(t,e,n){n.length=0;let{axis:s,sign:i,limit:r}=e;for(let e=0;e<t.length;e++){let a=t[e],o=t[(e+1)%t.length],l=(0===s?a.px:1===s?a.py:a.pz)*i-r,d=(0===s?o.px:1===s?o.py:o.pz)*i-r,c=l<=0,h=d<=0;if(c&&n.push(a),c!==h){let t=l/(l-d);n.push({px:a.px+(o.px-a.px)*t,py:a.py+(o.py-a.py)*t,pz:a.pz+(o.pz-a.pz)*t,nx:a.nx+(o.nx-a.nx)*t,ny:a.ny+(o.ny-a.ny)*t,nz:a.nz+(o.nz-a.nz)*t})}}return n}function ie(t,e,n,s,i,r,a,o,l){let d=t.geometry,c=d.getAttribute("position");if(void 0===c||0===c.count)return!0;let h=d.getAttribute("normal"),p=d.getIndex(),u=null!==p?p.count:c.count;if(u>15e5)return!0;let m=d.drawRange.start,f=m+(d.drawRange.count===1/0?u-m:Math.min(d.drawRange.count,u-m));Zt.copy(t.objectToDecal),Ht.getNormalMatrix(Zt);let y=[],g=[];for(let t=m;t+2<f;t+=3){let d=null!==p?p.getX(t):t,u=null!==p?p.getX(t+1):t+1,m=null!==p?p.getX(t+2):t+2;if(Kt.fromBufferAttribute(c,d).applyMatrix4(Zt),Jt.fromBufferAttribute(c,u).applyMatrix4(Zt),$t.fromBufferAttribute(c,m).applyMatrix4(Zt),Kt.z>n&&Jt.z>n&&$t.z>n||Kt.z<-n&&Jt.z<-n&&$t.z<-n)continue;te.subVectors(Jt,Kt),ee.subVectors($t,Kt),ne.crossVectors(te,ee);let f=ne.length();if(!(0===f||ne.z/f<=.01)){if(y.length=0,void 0!==h)te.fromBufferAttribute(h,d).applyMatrix3(Ht),y.push({px:Kt.x,py:Kt.y,pz:Kt.z,nx:te.x,ny:te.y,nz:te.z}),te.fromBufferAttribute(h,u).applyMatrix3(Ht),y.push({px:Jt.x,py:Jt.y,pz:Jt.z,nx:te.x,ny:te.y,nz:te.z}),te.fromBufferAttribute(h,m).applyMatrix3(Ht),y.push({px:$t.x,py:$t.y,pz:$t.z,nx:te.x,ny:te.y,nz:te.z});else{ne.divideScalar(f);for(let t of[Kt,Jt,$t])y.push({px:t.x,py:t.y,pz:t.z,nx:ne.x,ny:ne.y,nz:ne.z})}for(let t of e){if(0===y.length)break;let e=se(y,t,g);g=y,y=e}if(!(y.length<3)){if(a.length/3+3*(y.length-2)>3e5)return!1;for(let t=1;t+1<y.length;t++)for(let e of[y[0],y[t],y[t+1]]){l.push(e.px*s+.5,e.py*i+.5);let t=e.nx,n=e.ny,d=e.nz,c=Math.hypot(t,n,d);c>0?(t/=c,n/=c,d/=c):(t=0,n=0,d=1),a.push(e.px+t*r,e.py+n*r,e.pz+d*r),o.push(t,n,d)}}}}return!0}var re=new lt,ae=new lt,oe=new it,le=new $,de=class extends C{constructor(t,e,n){super(t,e),this.data=e,this.geometry=new mt,this.lastSignature=[],this.nextSignature=[],this.scanned=[],this.lastParams={width:0,height:0,depth:0,offset:0},this.context=n;let s=this.data.geometry;this.lastParams={width:this.resolveNumber(s.width,0),height:this.resolveNumber(s.height,0),depth:this.resolveNumber(s.depth,0),offset:s.offset??0},this.geometry.userData={type:"DecalGeometry",parameters:{...this.lastParams}}}get isLOD(){return this.updateDecal(),!1}get isDecalObject(){return!0}resolveNumber(t,e){if("number"==typeof t)return t;let n=Number(this.context.shared.getVariable(t));return Number.isFinite(n)?n:e}currentParams(){let t=this.dataPatched.geometry;return{width:this.resolveNumber(t.width,this.lastParams.width),height:this.resolveNumber(t.height,this.lastParams.height),depth:this.resolveNumber(t.depth,this.lastParams.depth),offset:t.offset??0}}projectionRoot(){let t=this.parent;for(;null!==t&&S.is(t);){if("Page"===t.data?.type)return t;t=t.parent}return this.context.scene}scanTargets(t,e,n){let s=this.scanned;s.length=0;let i=this.projectionRoot();if(null===i)return s;re.makeEmpty();for(let s=0;s<8;s++)le.set((1&s?.5:-.5)*t,(2&s?.5:-.5)*e,(4&s?.5:-.5)*n).applyMatrix4(this.matrixWorld),re.expandByPoint(le);return i.traverse(t=>{if(t===this||!S.is(t)||!(t instanceof D)||t instanceof de||"Mesh"!==t.dataPatched?.type||!t.visible||t.destroyedInAction||512&t.layers.mask)return;let e=t.geometry,n=e?.getAttribute("position");void 0===n||0===n.count||0!==e.drawRange.count&&(null===e.boundingBox&&e.computeBoundingBox(),ae.copy(e.boundingBox).applyMatrix4(t.matrixWorld),re.intersectsBox(ae)&&s.push(t))}),s}collectSignature(t,e,n){t.length=0,t.push(n.width,n.height,n.depth,n.offset);for(let e of this.matrixWorld.elements)t.push(e);for(let n of e){t.push(n.id,n.geometry.id);let e=n.geometry.getAttribute("position");t.push(void 0===e?-1:"version"in e?e.version:e.data.version);let s=n.geometry.getIndex();t.push(null!==s?s.version:-1),t.push(n.geometry.drawRange.count===1/0?-1:n.geometry.drawRange.count);for(let e of n.matrixWorld.elements)t.push(e)}}signaturesEqual(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}updateDecal(){if(this.disposed)return!1;this.updateWorldMatrix(!0,!1);let t=this.currentParams(),e=this.scanTargets(t.width,t.height,t.depth);if(this.collectSignature(this.nextSignature,e,t),this.signaturesEqual(this.nextSignature,this.lastSignature))return!1;let n=this.lastSignature;this.lastSignature=this.nextSignature,this.nextSignature=n,this.lastParams=t,oe.copy(this.matrixWorld).invert();let s=e.map(t=>({geometry:t.geometry,objectToDecal:(new it).multiplyMatrices(oe,t.matrixWorld)}));return this.geometry.dispose(),this.geometry=function(t,e){let n=Math.max(Math.abs(e.width),1e-6),s=Math.max(Math.abs(e.height),1e-6),i=Math.max(Math.abs(e.depth),1e-6),r=[{axis:0,sign:1,limit:n/2},{axis:0,sign:-1,limit:n/2},{axis:1,sign:1,limit:s/2},{axis:1,sign:-1,limit:s/2},{axis:2,sign:1,limit:i/2},{axis:2,sign:-1,limit:i/2}],a=[],o=[],l=[];for(let d of t)if(!ie(d,r,i/2,1/n,1/s,e.offset,a,o,l))break;let d=new mt;return d.setAttribute("position",new ht(a,3)),d.setAttribute("normal",new ht(o,3)),d.setAttribute("uv",new ht(l,2)),0===a.length?(d.setDrawRange(0,0),d.boundingSphere=new pt):d.computeBoundingSphere(),d}(s,t),this.geometry.userData={type:"DecalGeometry",parameters:{width:t.width,height:t.height,depth:t.depth}},g(this),x(this),this.resetBBoxNeedsUpdate(),!0}updateByPatchedOp(t,e,n){super.updateByPatchedOp(t,e,n),M(t.path,["geometry"])&&this.resetBBoxNeedsUpdate()}updateEntityBoxSize(t,e){let n=this.currentParams();t.setScalar(0),e.set(n.width,n.height,n.depth).multiplyScalar(.5)}dispose(){super.dispose(),this.geometry.dispose()}},ce=class extends(A(vt,v)){constructor(t,e){super(),this.super_Entity(t,e),this.objectHelper.update(),this.matrixAutoUpdate=!0}updateState(t,e){this.updateState_Entity(t,e)}},he=function(){try{let t=window.location.href;if(t.includes("reducesubdiv=")){let e=t.indexOf("reducesubdiv=")+13;return parseInt(t.slice(e,e+1))}}catch{}}();function pe(n,s,i){if(console.assert(void 0!==s.type),"Mesh"===s.type)return function(t,e,n){let s;if(void 0!==he&&e?.geometry&&"subdivisions"in e.geometry&&(e.geometry.subdivisions??0)>he&&Object.assign(e.geometry,{subdivisions:he}),"TextGeometry"===e.geometry.type||"InputGeometry"===e.geometry.type){let s=U(e.geometry.type);return s?s(t,e,n):(_("InputGeometry"===e.geometry.type?"textinputs":"text",`a Mesh with ${e.geometry.type}`),new w(t,e,n))}if("SubdivGeometry"===e.geometry.type)s=new y(t,e,n);else if("PathGeometry"===e.geometry.type||"VectorGeometry"===e.geometry.type||"ShapeBlendGeometry"===e.geometry.type){let i=U(e.geometry.type);i?s=i(t,e,n):(_("ShapeBlendGeometry"===e.geometry.type?"shape-blends":"PathGeometry"===e.geometry.type?"3d-paths":"vector-shapes",`a Mesh with ${e.geometry.type}`),s=new w(t,e,n))}else if("BooleanGeometry"===e.geometry.type)s=new d(t,e,n);else if("DecalGeometry"===e.geometry.type)s=new de(t,e,n);else if("UIGeometry"===e.geometry.type){let i=U("UIGeometry");i?s=i(t,e,n):(_("ui-2d","a Mesh with UIGeometry"),s=new w(t,e,n))}else s=new w(t,e,n);return s}(n,s,i);if("Empty"===s.type)return new e(n,s);if("Particle"===s.type){let t=k("Particle");return t?t(n,s,i):(_("particles","a Particle system"),new e(n,s))}if("ParticleCollider"===s.type)return new f(n,s,i);if("Hair"===s.type){let t=k("Hair");return t?t(n,s,i):(_("hair","a Hair System"),new e(n,s))}if("Splat"===s.type)return new e(n,s);if("Bone"===s.type)return new ce(n,s);if("Page"===s.type)return new a(n,s,i);if("PointLight"===s.type)return new t(n,s,i);if("SpotLight"===s.type)return new l(n,s,i);if("DirectionalLight"===s.type)return new o(n,s,i);if("Component"===s.type||"Instance"===s.type){let t=k(s.type);return t?t(n,s,i):(_("components",`a ${s.type}`),new e(n,s))}return G.is(s.type)?new m(n,s):(console.error(s),new e(n,s))}P.createEntity=pe,P.changeEntityProptotype=function(t,e,n){let s=pe(t.identity,e,n),i=t.children,r=t.attachedPaths,a=t.parent,o=t.component,l=t.instances,d=t.overrideData,c=t.uuid,h=t.stateSelection;t.dispose();for(let e of Object.keys(t))delete t[e];Object.setPrototypeOf(t,Object.getPrototypeOf(s));for(let e of Object.keys(s))t[e]=s[e];t.children=[...t.children,...i],t.attachedPaths=r,t.parent=a,t.component=o,t.instances=l,t.uuid=c,t.overrideData=d,t.updateState(t.data,n),h&&t.changeSelectedState(h,n),t.resetBBoxNeedsUpdate()};var ue,me=class{constructor(){this._constraints=new Map}setConstraint(t,e){null===e?this._constraints.delete(t):this._constraints.set(t,e)}removeDependencies(t){this._constraints.delete(t)}applyConstraints(t){let e=new Set;this._constraints.forEach((n,s)=>{let i=[s,n],r=n;for(;this._constraints.has(r);){if(r=this._constraints.get(r),i.includes(r)){console.warn(`circular dependency detected: ${i.join(" -> ")}`);break}e.has(r)||i.push(r)}for(let n=i.length-2;n>=0;n--)if(!e.has(i[n])){let s=t.find(i[n]);s?s.applyPathSnapping(t):console.warn(`missing entity ${i[n]}`),e.add(i[n])}})}findDependency(t,e){let n=t;for(;this._constraints.has(n);)if(n=this._constraints.get(n),n===e)return!0;return!1}},fe=class{};Pt(fe,"DepthMapRange",65536),Pt(fe,"MemoryPageSize",65536),Pt(fe,"BytesPerFloat",4),Pt(fe,"BytesPerInt",4),qt.then(t=>ue=t);var ye=class{constructor(t={}){Pt(this,"updateView",function(){let t=new it,e=[],n=new $(0,0,-1),s=new $(0,0,-1),i=new $,r=new $;return function(a=!1,o){let l=this.updateMatrixWorldsInWorkerIfNeeded(),d=this.cropsChanged();if(!a){s.set(0,0,-1).applyQuaternion(o.quaternion);let t=!1,e=!1;if(s.dot(n)<=.95&&(t=!0),r.copy(o.position).sub(i).length()>=1&&(e=!0),!(t||e||l||d||this.needsInitialRender))return}this.needsInitialRender=!1,i.copy(o.position),n.copy(s),t.copy(o.matrixWorld).invert(),t.premultiply(this.dummyPerspectiveMatrix),e[0]=o.position.x,e[1]=o.position.y,e[2]=o.position.z;let c={sort:{view:t.elements,cameraPosition:e,splatRenderCount:this.splatRenderCount,splatSortCount:this.splatRenderCount},...l?{newMatrixWorlds:this.meshMatrixWorlds}:{},...d?{newCropsArray:this.cropsArray}:{}};this.sortRunning?this.queuedMessage=c:(this.queuedMessage=null,this.sortRunning=!0,this.sortWorker.postMessage(c))}}()),this.scene=t.scene,this.currentPage=null,this.devicePixelRatio=window.devicePixelRatio,this.sortWorker=null,this.splatRenderCount=0,this.splatSortCount=0,this.splatMesh=null,this.sortRunning=!1,this.meshMatrixWorlds=null,this.meshMatrixWorldsOld=null,this.cropsArray=null,this.splatEntries=null,this.queuedMessage=null,this.needsInitialRender=!0,this.dummyPerspectiveMatrix=(new it).makePerspective(-1,1,-1,1,.1,1e3)}updateSplatMeshUniforms(t,e){let n=new K;null!==this.splatMesh&&this.splatMesh.getSplatCount()>0&&(t.getSize(n),this.cameraFocalLengthX=e.projectionMatrix.elements[0]*this.devicePixelRatio*n.x*.45,this.cameraFocalLengthY=e.projectionMatrix.elements[5]*this.devicePixelRatio*n.y*.45,this.splatMesh.updateUniforms(n,this.cameraFocalLengthX,this.cameraFocalLengthY,e.isPerspectiveCamera?-1:e.zoom*this.devicePixelRatio))}loadSplat(t={}){this.activePage=this.scene.activePage,t.position&&(t.position=(new $).fromArray(t.position)),t.orientation&&(t.orientation=(new J).fromArray(t.orientation)),t.halfPrecisionCovariances=!!t.halfPrecisionCovariances;let e=[];if(this.splatEntries=e,this.activePage.traverseVisibleEntity(t=>{"Splat"===t.data.type&&e.push(t)}),this.splatMesh&&this.splatMesh.dispose(),0===e.length)return this.splatMesh=null,!1;this.meshMatrixWorlds=e.map(t=>t.matrixWorld),this.meshMatrixWorldsOld=e.map(t=>t.matrixWorld.clone()),this.cropsArray=e.map(t=>t.data.crops.map(t=>t.data)),this._splatBufferCache??(this._splatBufferCache=new WeakMap);let n=e.map(t=>{let e=this._splatBufferCache.get(t.data.buffer);return void 0===e&&(e=new ue.GSplineBuffer(new Uint8Array(t.data.buffer).buffer),this._splatBufferCache.set(t.data.buffer,e)),e}),s=0,i=[0];for(let t of n)s+=t.getSplatCount(),i.push(s);return this.setupSplatMesh(n,s,t.position,t.orientation,t.halfPrecisionCovariances,this.devicePixelRatio,i,this.meshMatrixWorlds),this.setupSortWorker(s),!0}updateMatrixWorldsInWorkerIfNeeded(){let t=this.splatDataTextures.meshMatrixWorlds.data;for(let e=0;e<this.meshMatrixWorlds.length;e++)t.set(this.meshMatrixWorlds[e].elements,16*e);return this.splatDataTextures.meshMatrixWorlds.texture.needsUpdate=!0,!this.meshMatrixWorlds.every((t,e)=>t.equals(this.meshMatrixWorldsOld[e]))&&(this.meshMatrixWorldsOld=this.meshMatrixWorlds.map(t=>t.clone()),!0)}cropsChanged(){let t=!1;return this.splatEntries.forEach((e,n)=>{e.data.crops.forEach((e,s)=>{void 0===this.cropsArray[n][s]?(t=!0,this.cropsArray[n][s]=e.data):Object.entries(e.data).forEach(([e,i])=>{(Array.isArray(i)&&i.some((t,i)=>t!==this.cropsArray[n][s][e][i])||i!==this.cropsArray[n][s]?.[e])&&(t=!0,this.cropsArray[n][s][e]=i)})}),e.data.crops.length!==this.cropsArray[n]?.length&&(this.cropsArray[n].length=e.data.crops.length,t=!0)}),t}setupSplatMesh(t,e,n=new $,s=new J,i=!1,r=1,a,o){this.splatMesh=Lt.buildMesh(t,e,i,r,a,o),this.splatMesh.position.copy(n),this.splatMesh.quaternion.copy(s),this.splatMesh.frustumCulled=!1,this.splatMesh.renderOrder=99999,this.splatRenderCount=e,this.splatMesh.onBeforeRender=(t,e,n)=>this.update(t,n)}setupSortWorker(t){this.sortWorker=function(t){let e=new Worker(URL.createObjectURL(new Blob(["(","\nfunction sortWorker(self) {\n\tlet wasmInstance;\n\tlet splatCount;\n\tlet splatRC;\n\tlet indexesOffset;\n\tlet positionsOffset;\n\tlet viewProjOffset;\n\tlet frequenciesOffset;\n\tlet indexesOutOffset;\n\tlet sortBuffersOffset;\n\tlet wasmMemory;\n\tlet positions;\n\n\tlet Constants;\n\tlet floatPositions;\n\tlet meshIndexIntervals;\n\tlet meshMatrixWorlds;\n\tlet cropsArray;\n\n\tfunction sort(viewProj) {\n\t\t// console.time('WASM SORT');\n\t\tconst viewProjArray = new Float64Array(wasmMemory, viewProjOffset, 16);\n\t\tfor (let i = 0; i < 16; i++) {\n\t\t\tviewProjArray[i] = viewProj[i];\n\t\t}\n\t\tlet indexesBuffer;\n\t\t// console.timeEnd('WASM SORT');\n\t\tif (splatRC > 1) {\n\t\t\twasmInstance.exports.sortIndexes(\n\t\t\t\tindexesOffset,\n\t\t\t\tpositionsOffset,\n\t\t\t\tsortBuffersOffset,\n\t\t\t\tviewProjOffset,\n\t\t\t\tfrequenciesOffset,\n\t\t\t\tindexesOutOffset,\n\t\t\t\tConstants.DepthMapRange,\n\t\t\t\tsplatRC\n\t\t\t);\n\t\t\tconst indexes = new Uint32Array(splatRC);\n\t\t\tindexesBuffer = indexes.buffer;\n\t\t\tindexes.set(new Uint32Array(wasmMemory, indexesOutOffset, splatRC));\n\t\t} else if (splatRC === 1) {\n\t\t\tconst indexes = new Uint32Array(splatRC);\n\t\t\tindexes[0] = new Uint32Array(wasmMemory, indexesOffset, splatCount)[0];\n\t\t\tindexesBuffer = indexes.buffer;\n\t\t} else {\n\t\t\tindexesBuffer = new ArrayBuffer(0);\n\t\t}\n\n\t\tself.postMessage(\n\t\t\t{\n\t\t\t\tsortDone: true,\n\t\t\t\tindexesBuffer,\n\t\t\t},\n\t\t\t[indexesBuffer]\n\t\t);\n\t}\n\tfunction updateRenderedSplats(\n\t\tmeshMatrixWorlds,\n\t\tcropsArray,\n\t\tmeshIndexIntervals\n\t) {\n\t\tconst renderedPositions = new Float32Array(\n\t\t\twasmMemory,\n\t\t\tpositionsOffset,\n\t\t\tsplatCount * 3\n\t\t);\n\t\tsplatRC = 0;\n\t\tconst wasmMemoryIndexes = new Uint32Array(\n\t\t\twasmMemory,\n\t\t\tindexesOffset,\n\t\t\tsplatCount\n\t\t);\n\t\tfor (let i = 0; i < meshIndexIntervals.length - 1; i++) {\n\t\t\tconst crops = cropsArray[i];\n\t\t\tconst matrixWorld = meshMatrixWorlds[i].elements;\n\t\t\tconst paramsIn = crops\n\t\t\t\t.filter((a) => a.enabled && a.mode === 'Include')\n\t\t\t\t.map((c) =>\n\t\t\t\t\tc.type === 'Box'\n\t\t\t\t\t\t? computeBoundingBoxVertices(c)\n\t\t\t\t\t\t: computeEllipsoidParams(c)\n\t\t\t\t);\n\t\t\tconst paramsOut = crops\n\t\t\t\t.filter((a) => a.enabled && a.mode === 'Exclude')\n\t\t\t\t.map((c) =>\n\t\t\t\t\tc.type === 'Box'\n\t\t\t\t\t\t? computeBoundingBoxVertices(c)\n\t\t\t\t\t\t: computeEllipsoidParams(c)\n\t\t\t\t);\n\t\t\tfor (let j = meshIndexIntervals[i]; j < meshIndexIntervals[i + 1]; j++) {\n\t\t\t\tconst x = floatPositions[j * 3];\n\t\t\t\tconst y = floatPositions[j * 3 + 1];\n\t\t\t\tconst z = floatPositions[j * 3 + 2];\n\t\t\t\tif (\n\t\t\t\t\t(paramsIn.length === 0 || isInBounds(x, y, z, paramsIn)) &&\n\t\t\t\t\t(paramsOut.length === 0 || !isInBounds(x, y, z, paramsOut))\n\t\t\t\t) {\n\t\t\t\t\tconst w =\n\t\t\t\t\t\t1 /\n\t\t\t\t\t\t(matrixWorld[3] * x +\n\t\t\t\t\t\t\tmatrixWorld[7] * y +\n\t\t\t\t\t\t\tmatrixWorld[11] * z +\n\t\t\t\t\t\t\tmatrixWorld[15]);\n\t\t\t\t\trenderedPositions[splatRC * 3] =\n\t\t\t\t\t\t(matrixWorld[0] * x +\n\t\t\t\t\t\t\tmatrixWorld[4] * y +\n\t\t\t\t\t\t\tmatrixWorld[8] * z +\n\t\t\t\t\t\t\tmatrixWorld[12]) *\n\t\t\t\t\t\tw;\n\t\t\t\t\trenderedPositions[splatRC * 3 + 1] =\n\t\t\t\t\t\t(matrixWorld[1] * x +\n\t\t\t\t\t\t\tmatrixWorld[5] * y +\n\t\t\t\t\t\t\tmatrixWorld[9] * z +\n\t\t\t\t\t\t\tmatrixWorld[13]) *\n\t\t\t\t\t\tw;\n\t\t\t\t\trenderedPositions[splatRC * 3 + 2] =\n\t\t\t\t\t\t(matrixWorld[2] * x +\n\t\t\t\t\t\t\tmatrixWorld[6] * y +\n\t\t\t\t\t\t\tmatrixWorld[10] * z +\n\t\t\t\t\t\t\tmatrixWorld[14]) *\n\t\t\t\t\t\tw;\n\t\t\t\t\twasmMemoryIndexes[splatRC] = j;\n\t\t\t\t\tsplatRC++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tfunction getOutOfBoundsIndexes(floatPositions, crops) {\n\t\tconst outOfBoundsIndexes = [];\n\t\tconst paramsIn = crops\n\t\t\t.filter((a) => a.enabled && a.mode === 'Include')\n\t\t\t.map((c) =>\n\t\t\t\tc.type === 'Box'\n\t\t\t\t\t? computeBoundingBoxVertices(c)\n\t\t\t\t\t: computeEllipsoidParams(c)\n\t\t\t);\n\t\tconst paramsOut = crops\n\t\t\t.filter((a) => a.enabled && a.mode === 'Exclude')\n\t\t\t.map((c) =>\n\t\t\t\tc.type === 'Box'\n\t\t\t\t\t? computeBoundingBoxVertices(c)\n\t\t\t\t\t: computeEllipsoidParams(c)\n\t\t\t);\n\n\t\tconst len = floatPositions.length;\n\t\tfor (let j = 0; j < len; j += 3) {\n\t\t\tconst x = floatPositions[j];\n\t\t\tconst y = floatPositions[j + 1];\n\t\t\tconst z = floatPositions[j + 2];\n\t\t\tif (\n\t\t\t\t(paramsIn.length === 0 || isInBounds(x, y, z, paramsIn)) &&\n\t\t\t\t(paramsOut.length === 0 || !isInBounds(x, y, z, paramsOut))\n\t\t\t) {\n\t\t\t\t// in bounds: intentionally skip\n\t\t\t} else {\n\t\t\t\toutOfBoundsIndexes.push(j / 3);\n\t\t\t}\n\t\t}\n\t\t// console.log(outOfBoundsIndexes);\n\t\treturn outOfBoundsIndexes;\n\t}\n\n\tfunction isInBounds(x, y, z, params, mode) {\n\t\treturn params[mode === 'Intersect' ? 'every' : 'some']((param) => {\n\t\t\tconst t = applyRotationMatrix(\n\t\t\t\tx,\n\t\t\t\ty,\n\t\t\t\tz,\n\t\t\t\tparam.invRotationMatrix,\n\t\t\t\tparam.cropCenter\n\t\t\t);\n\t\t\treturn Array.isArray(param)\n\t\t\t\t? isVertexInsideBoundingBox(t.x, t.y, t.z, param)\n\t\t\t\t: isPointInsideEllipsoid(t.x, t.y, t.z, param);\n\t\t});\n\t}\n\tfunction applyRotationMatrix(_x, _y, _z, e, pivot) {\n\t\tconst x = _x - pivot[0];\n\t\tconst y = _y - pivot[1];\n\t\tconst z = _z - pivot[2];\n\t\tconst w = 1 / (e[3] * x + e[7] * y + e[11] * z + e[15]);\n\t\treturn {\n\t\t\tx: (e[0] * x + e[4] * y + e[8] * z + e[12]) * w + pivot[0],\n\t\t\ty: (e[1] * x + e[5] * y + e[9] * z + e[13]) * w + pivot[1],\n\t\t\tz: (e[2] * x + e[6] * y + e[10] * z + e[14]) * w + pivot[2],\n\t\t};\n\t}\n\tfunction computeBoundingBoxVertices(box) {\n\t\tconst halfSizeX = box.cropSize[0] / 2;\n\t\tconst halfSizeY = box.cropSize[1] / 2;\n\t\tconst halfSizeZ = box.cropSize[2] / 2;\n\t\tconst bounds = [\n\t\t\tbox.cropCenter[0] - halfSizeX,\n\t\t\tbox.cropCenter[1] - halfSizeY,\n\t\t\tbox.cropCenter[2] - halfSizeZ,\n\t\t\tbox.cropCenter[0] + halfSizeX,\n\t\t\tbox.cropCenter[1] + halfSizeY,\n\t\t\tbox.cropCenter[2] + halfSizeZ,\n\t\t];\n\t\tconst invRotationMatrix = getInvRotationMatrix(box.cropRotation);\n\t\treturn Object.assign(bounds, {\n\t\t\tinvRotationMatrix,\n\t\t\tcropCenter: box.cropCenter,\n\t\t});\n\t}\n\tfunction getInvRotationMatrix(_rotation) {\n\t\tconst te = [];\n\t\tconst x = (_rotation[0] * Math.PI) / 180,\n\t\t\ty = (_rotation[1] * Math.PI) / 180,\n\t\t\tz = (_rotation[2] * Math.PI) / 180;\n\t\tconst a = Math.cos(x),\n\t\t\tb = Math.sin(x);\n\t\tconst c = Math.cos(y),\n\t\t\td = Math.sin(y);\n\t\tconst e = Math.cos(z),\n\t\t\tf = Math.sin(z);\n\t\tconst ae = a * e,\n\t\t\taf = a * f,\n\t\t\tbe = b * e,\n\t\t\tbf = b * f;\n\n\t\tte[0] = c * e;\n\t\tte[1] = -c * f;\n\t\tte[2] = d;\n\n\t\tte[4] = af + be * d;\n\t\tte[5] = ae - bf * d;\n\t\tte[6] = -b * c;\n\n\t\tte[8] = bf - ae * d;\n\t\tte[9] = be + af * d;\n\t\tte[10] = a * c;\n\n\t\tte[12] = 0;\n\t\tte[13] = 0;\n\t\tte[14] = 0;\n\n\t\tte[3] = 0;\n\t\tte[7] = 0;\n\t\tte[11] = 0;\n\t\tte[15] = 1;\n\n\t\treturn te;\n\t}\n\tfunction isVertexInsideBoundingBox(x, y, z, bounds) {\n\t\treturn (\n\t\t\tx >= bounds[0] &&\n\t\t\tx <= bounds[3] &&\n\t\t\ty >= bounds[1] &&\n\t\t\ty <= bounds[4] &&\n\t\t\tz >= bounds[2] &&\n\t\t\tz <= bounds[5]\n\t\t);\n\t}\n\tfunction computeEllipsoidParams(ellipsoid) {\n\t\t// Precompute the scaling factors\n\t\tconst invRadiusX = 2 / ellipsoid.cropSize[0];\n\t\tconst invRadiusY = 2 / ellipsoid.cropSize[1];\n\t\tconst invRadiusZ = 2 / ellipsoid.cropSize[2];\n\t\tconst invRotationMatrix = getInvRotationMatrix(ellipsoid.cropRotation);\n\t\treturn {\n\t\t\tinvRadiusX,\n\t\t\tinvRadiusY,\n\t\t\tinvRadiusZ,\n\t\t\tcropCenter: ellipsoid.cropCenter,\n\t\t\tinvRotationMatrix,\n\t\t};\n\t}\n\tfunction isPointInsideEllipsoid(x, y, z, ellipsoidParams) {\n\t\tconst _x = (x - ellipsoidParams.cropCenter[0]) * ellipsoidParams.invRadiusX;\n\t\tconst _y = (y - ellipsoidParams.cropCenter[1]) * ellipsoidParams.invRadiusY;\n\t\tconst _z = (z - ellipsoidParams.cropCenter[2]) * ellipsoidParams.invRadiusZ;\n\t\treturn _x * _x + _y * _y + _z * _z <= 1;\n\t}\n\n\tself.onmessage = (e) => {\n\t\tif (e.data.getCroppedIndexes) {\n\t\t\tconst outOfBoundsIndexes = new Uint32Array(\n\t\t\t\tgetOutOfBoundsIndexes(new Float32Array(e.data.positions), e.data.crops)\n\t\t\t).buffer;\n\t\t\tself.postMessage(\n\t\t\t\t{\n\t\t\t\t\toutOfBoundsIndexes,\n\t\t\t\t},\n\t\t\t\t[outOfBoundsIndexes]\n\t\t\t);\n\t\t} else if (e.data.positions) {\n\t\t\tpositions = e.data.positions;\n\t\t\tfloatPositions = new Float32Array(positions);\n\t\t\tmeshMatrixWorlds = e.data.meshMatrixWorlds;\n\t\t\tcropsArray = e.data.cropsArray;\n\t\t\tmeshIndexIntervals = e.data.meshIndexIntervals;\n\t\t\tupdateRenderedSplats(meshMatrixWorlds, cropsArray, meshIndexIntervals);\n\t\t\tself.postMessage({\n\t\t\t\tsortSetupComplete: true,\n\t\t\t});\n\t\t} else if (e.data.sort || e.data.newMatrixWorlds || e.data.newCropsArray) {\n\t\t\tif (e.data.newMatrixWorlds || e.data.newCropsArray) {\n\t\t\t\tcropsArray = e.data.newCropsArray || cropsArray;\n\t\t\t\tmeshMatrixWorlds = e.data.newMatrixWorlds || meshMatrixWorlds;\n\t\t\t\tupdateRenderedSplats(meshMatrixWorlds, cropsArray, meshIndexIntervals);\n\t\t\t}\n\t\t\tsort(e.data.sort.view, e.data.sort.cameraPosition);\n\t\t} else if (e.data.init) {\n\t\t\t// Yep, this is super hacky and gross :(\n\t\t\tConstants = e.data.init.Constants;\n\n\t\t\tsplatCount = e.data.init.splatCount;\n\n\t\t\tconst INDEXES_BYTES_PER_ENTRY = Constants.BytesPerInt;\n\t\t\tconst POSITIONS_BYTES_PER_ENTRY = Constants.BytesPerFloat * 3;\n\n\t\t\tconst sorterWasmBytes = new Uint8Array(e.data.init.sorterWasmBytes);\n\t\t\tconst memoryBytesPerVertex =\n\t\t\t\tINDEXES_BYTES_PER_ENTRY + POSITIONS_BYTES_PER_ENTRY;\n\t\t\tconst memoryRequiredForVertices = splatCount * memoryBytesPerVertex;\n\t\t\tconst memoryRequiredForSortBuffers =\n\t\t\t\tsplatCount * Constants.BytesPerInt * 2 +\n\t\t\t\tConstants.DepthMapRange * Constants.BytesPerInt * 2;\n\t\t\tconst extraMemory = Constants.MemoryPageSize * 32;\n\t\t\tconst totalRequiredMemory =\n\t\t\t\tmemoryRequiredForVertices + memoryRequiredForSortBuffers + extraMemory;\n\t\t\tconst totalPagesRequired =\n\t\t\t\tMath.floor(totalRequiredMemory / Constants.MemoryPageSize) + 1;\n\t\t\tconst sorterWasmImport = {\n\t\t\t\tmodule: {},\n\t\t\t\tenv: {\n\t\t\t\t\tmemory: new WebAssembly.Memory({\n\t\t\t\t\t\tinitial: totalPagesRequired * 2,\n\t\t\t\t\t\tmaximum: totalPagesRequired * 3,\n\t\t\t\t\t\tshared: true,\n\t\t\t\t\t}),\n\t\t\t\t},\n\t\t\t};\n\t\t\tWebAssembly.compile(sorterWasmBytes)\n\t\t\t\t.then((wasmModule) => {\n\t\t\t\t\treturn WebAssembly.instantiate(wasmModule, sorterWasmImport);\n\t\t\t\t})\n\t\t\t\t.then((instance) => {\n\t\t\t\t\twasmInstance = instance;\n\t\t\t\t\tindexesOffset = 0;\n\t\t\t\t\tpositionsOffset = splatCount * INDEXES_BYTES_PER_ENTRY;\n\t\t\t\t\tviewProjOffset =\n\t\t\t\t\t\tpositionsOffset + splatCount * POSITIONS_BYTES_PER_ENTRY;\n\t\t\t\t\tsortBuffersOffset = viewProjOffset + 16 * Constants.BytesPerFloat * 2;\n\t\t\t\t\tfrequenciesOffset =\n\t\t\t\t\t\tsortBuffersOffset + splatCount * Constants.BytesPerInt;\n\t\t\t\t\tindexesOutOffset =\n\t\t\t\t\t\tfrequenciesOffset + Constants.DepthMapRange * Constants.BytesPerInt;\n\t\t\t\t\twasmMemory = sorterWasmImport.env.memory.buffer;\n\t\t\t\t\tself.postMessage({\n\t\t\t\t\t\tsortSetupPhase1Complete: true,\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t}\n\t};\n}\n",")(self)"],{type:"application/javascript"}))),n=atob("AGFzbQEAAAAADwhkeWxpbmsuMAEEAAAAAAETA2AAAGAIf39/f39/f38AYAABfwISAQNlbnYGbWVtb3J5AgMAgIAEAwQDAAECBzkDEV9fd2FzbV9jYWxsX2N0b3JzAAALc29ydEluZGV4ZXMAARNlbXNjcmlwdGVuX3Rsc19pbml0AAIK3gMDAwABC9IDAwF/BnwBfgJAIAdFDQAgAysDUCEMIAMrAzAhDSADKwMQIQ5BACEDRP///////+9/IQtEAAAAAAAAEAAhCgNAIAIgA0ECdGoCfyAOIAEgA0EMbGoiCCoCALuiIA0gCCoCBLuioCAMIAgqAgi7oqBEAAAAAAAAsECiIgmZRAAAAAAAAOBBYwRAIAmqDAELQYCAgIB4CzYCACAJIAsgCSALYxshCyAJIAogCSAKZBshCiADQQFqIgMgB0cNAAsgB0UNACAGuCAKIAuhoyEJQQAhAwNAAn8gCSACIANBAnRqIgEoAgC3IAuhoiIKmUQAAAAAAADgQWMEQCAKqgwBC0GAgICAeAshCCABIAg2AgAgBCAIQQJ0aiIBIAEoAgBBAWo2AgAgA0EBaiIDIAdHDQALCyAGQQJPBEAgBCgCACEIQQEhAwNAIAQgA0ECdGoiASABKAIAIAhqIgg2AgAgA0EBaiIDIAZHDQALCyAHQQFrIgGtIQ8DQCAEIAIgD6dBAnQiA2ooAgBBAnRqIgcgBygCAEEBayIHNgIAIAUgASAHa0ECdGogACADaigCADYCACAPUCEDIA9CAX0hDyADRQ0ACyAGBEAgBEEAIAZBAnT8CwALCwQAQQAL"),s=new Uint8Array(n.length);for(let t=0;t<n.length;t++)s[t]=n.charCodeAt(t);return e.postMessage({init:{sorterWasmBytes:s.buffer,splatCount:t,Constants:{BytesPerFloat:fe.BytesPerFloat,BytesPerInt:fe.BytesPerInt,DepthMapRange:fe.DepthMapRange,MemoryPageSize:fe.MemoryPageSize}}}),e}(t),this.sortWorker.onmessage=t=>{t.data.sortDone?(this.sortRunning=!1,this.splatMesh?.updateIndexes(new Uint32Array(t.data.indexesBuffer)),this.lastSortTime=t.data.sortTime,this.queuedMessage&&(this.sortWorker.postMessage(this.queuedMessage),this.queuedMessage=null)):t.data.sortCanceled?this.sortRunning=!1:t.data.sortSetupPhase1Complete?this.sortWorker.postMessage({positions:this.splatMesh.getCenters().buffer,meshMatrixWorlds:this.splatMesh.meshMatrixWorlds,meshIndexIntervals:this.splatMesh.meshIndexIntervals,cropsArray:this.cropsArray}):t.data.sortSetupComplete&&(this.splatDataTextures=this.splatMesh.getSplatDataTextures(),this.scene.activePage.add(this.splatMesh),this.needsInitialRender=!0)}}update(t,e){null!==this.splatMesh&&(this.updateSplatMeshUniforms(t,e),this.updateView(!1,e))}getSplatMesh(){return this.splatMesh}},ge=new ft;ge.wireframe=!0;var xe=new $,ve=class extends ot{constructor(t,n){super(),this.data=t,this.sharedAssets=n,this.enableHelpers=!1,this.wireframeState=!1,this.needsTransmissionDirty=!0,this.needsNormalDirty=!0,this.needsReflectionDirty=!0,this._needsTransmission=!1,this._needsNormal=!1,this._normalPassNeeds={outline:!1,cavity:!1},this._needsReflection=!1,this.geometryCacheChanged=!1,this.splatViewer=null,this.shapeBlendIntances=[],this.hairInstances=[],this.shadowsDirty=!0,this.instanceGroupsDirty=!0,this._autoInstancing=null,this.entityByUuid={},this.entityIdentityToEntity={},this.toExpandCloner=new Set,this.toUpdateCloner=new Set,this.pendingCommands=[],this.pathConstraints=new me,this.invisibleObjects=new e("jflkdsafjasdifjaslk",{...X.defaultData,visible:!1,name:"buildin invisible"}),this.needsRecomputeInstances=!1,this.init(t,n),this.matrixAutoUpdate=!1,this.errorPage=new a("fdasfa",{...N.defaultData,name:""},{shared:n,scene:this})}markGeometryCacheDirty(){this.geometryCacheChanged=!0}markShadowsDirty(){this.shadowsDirty=!0}markInstanceGroupsDirty(){this.instanceGroupsDirty=!0}get autoInstancing(){return this._autoInstancing}updateInstanceGroups(t,e){let n=this._autoInstancing;(null===n||n.minGroupSize!==e)&&(n?.dispose(),n=new kt(e),this._autoInstancing=n);let s=this.instanceGroupsDirty;return this.instanceGroupsDirty=!1,n.update(t,s),n.stats}releaseInstanceGroups(){this._autoInstancing?.teardown(),this.instanceGroupsDirty=!0}markNeedsUpdateRendererDirty(){this.needsTransmissionDirty=!0,this.needsNormalDirty=!0,this.needsReflectionDirty=!0,this.shadowsDirty=!0,this.instanceGroupsDirty=!0}needsTransmission(){return this.needsTransmissionDirty&&(this._needsTransmission=s(this),this.needsTransmissionDirty=!1),this._needsTransmission}needsNormal(){return this.needsNormalDirty&&(this._normalPassNeeds=n(this),this._needsNormal=this._normalPassNeeds.outline||this._normalPassNeeds.cavity,this.needsNormalDirty=!1),this._needsNormal}normalPassNeeds(){return this.needsNormal(),this._normalPassNeeds}needsReflection(){return this.needsReflectionDirty&&(this._needsReflection=i(this),this.needsReflectionDirty=!1),this._needsReflection}registerInstanceAndSetUuid(t){let e=t.identity.join("-"),n=this.entityIdentityToEntity[e];n&&(t.uuid=n.uuid),this.entityIdentityToEntity[e]=t,this.entityByUuid[t.uuid]=t}markPenumbraSizeDirty(){for(let t of this.children)t instanceof a&&(t.penumbraSizeArrayCache=null)}findInstance(t){return this.entityIdentityToEntity[t.join("-")]}get bgColor(){return this.activePage.bgColor}get postprocessing(){return this.activePage.data.postprocessing}getWithSortKey(t){let e=this.find(t);if(void 0===e)return;let n=[],s=e;for(;s!==this;){let t=s;s=s.parent;let e=s.children.indexOf(t);n.splice(0,0,e)}return{entity:e,sortKey:n}}getAllSorted(t){let e=[];for(let n of t){let t=this.getWithSortKey(n.id);void 0!==t&&e.push(t)}return e.sort((t,e)=>Y(t.sortKey,e.sortKey)),e.map(t=>t.entity)}nonExistOrDescendantOf(t,e){let n=this.find(t);if(void 0===n)return!0;for(;n;){if(n.uuid===e)return!0;n=n.parent}return!1}find(t){if(this.activePage&&this.activePage.personalCamera.parent){if("f23858d0-4a3b-4bd8-8173-66ed0af7f6fb-personalCamera"===t)return this.activePage.personalCamera;if(t===Q)return this.activePage.personalCamera}if(""===t||void 0===t)return;let e=this.entityByUuid[t];return void 0===e?this.getObjectByProperty("uuid",t):e}find2D(t){for(let e of this.children)if(e instanceof a&&e.uiScene){let n=e.uiScene.find(t);if(n)return n}}findScene2DfromObject2D(t){for(let e of this.children)if(e instanceof a&&e.uiScene&&e.uiScene.find(t))return e.uiScene}find2DInUIObjects(t){let e;return this.traverseEntity(n=>{void 0===e&&j(n)&&(e=n.uiCanvas.find(t))}),e}traverse2D(t){for(let e of this.children)e instanceof a&&e.uiScene&&e.uiScene.traverse(t)}debugEnsureEntity(t){let e=this.find(t);e?Array.isArray(e.identity)&&void 0===this.findInstance(e.identity)&&console.error("not found instance"):console.error("not found")}addPendingExpandCloner(t){this.toExpandCloner.add(t)}addPendingUpdateCloner(t){this.toUpdateCloner.add(t)}markToExpandCloner(t){this.toExpandCloner.add(t),t.traverseEntityAncestors(t=>{this.toExpandCloner.add(t)})}doPendingExpandCloner(t){this.toExpandCloner.forEach(e=>{e.expandCloner(t)}),this.toExpandCloner.clear()}doPendingUpdateCloner(t){this.toUpdateCloner.forEach(e=>{e.cloner?.update(t)}),this.toUpdateCloner.clear()}doPendingUpdates(t){this.doPendingExpandCloner(t),this.doPendingUpdateCloner(t),this.applyPendingCommands()}addPendingCommand(t){this.pendingCommands.push(t)}applyPendingCommands(){this.pendingCommands.forEach(t=>t()),this.pendingCommands.length=0}updateByLibOp(t,e){1===t.path.length&&"components"===t.path[0]&&1===t.type&&this.createChildrenObjects([{...t.data.asset,id:t.id}],this.invisibleObjects,e)}updateTreeByOp(t,e){if(0===t.path.length&&7===t.type){let n=null===t.parent?this:this.find(t.parent);if(void 0===n)throw new Error(`scene tree add: parent ${t.parent} not found for object ${t.id}`);let s=this.createObject(t.id,t.data,t.children,n,t.localIndex,e);s.updateVisible(this),s.resetBBoxNeedsUpdate(),c(s)&&h(s.parent)&&(s.invalidateUpstreamBooleanData(),s.parent.invalidateDownstreamBooleanData().recomputeBoolean()),this.markNeedsRecomputeInstancesForAncessors(n),this.markNeedsRecomputeInstancesForChildren(s),this.markToExpandCloner(s),this.markPenumbraSizeDirty(),s.updatePathSnapping()}else if(0===t.path.length&&8===t.type){let e=this.find(t.id);if(void 0===e)throw new Error(`scene tree delete: object ${t.id} not found`);e.traverseEntity(t=>{O(t)&&(this.shapeBlendIntances=this.shapeBlendIntances.filter(e=>e!==t)),E(t)&&(this.hairInstances=this.hairInstances.filter(e=>e!==t))}),this.markToExpandCloner(e),e.resetBBoxNeedsUpdate(),this.unregisterObject(e);let n=e.parent;this.markNeedsRecomputeInstancesForAncessors(n),this.markNeedsRecomputeInstancesForChildren(e),this.markPenumbraSizeDirty(),e.parent.remove(e),h(e.parent)&&(e.parent.invalidateUpstreamBooleanData(),e.parent.invalidateDownstreamBooleanData().recomputeBoolean()),c(e)&&(e.freeBooleanPointer(),n instanceof d&&n.invalidateDownstreamBooleanData().recomputeBoolean()),z(e)&&e.detachShape(),this.disposeAndUnregisterEntityRecursivelyIfNotReregistered(e),this.pathConstraints.removeDependencies(e.uuid),e.updatePathSnapping()}else if(0===t.path.length&&9===t.type){let e=this.find(t.id);if(void 0===e)throw new Error(`scene tree move: object ${t.id} not found`);this.markNeedsRecomputeInstancesForChildren(e);let n=e.parent;this.markNeedsRecomputeInstancesForAncessors(n),e.cloner?.resetOnMove(),this.markToExpandCloner(e);let s=null===t.parent?this:this.find(t.parent);if(void 0===s)throw new Error(`scene tree move: new parent ${t.parent} not found for object ${t.id}`);s.add(e),this.markNeedsRecomputeInstancesForAncessors(s),this.markToExpandCloner(e),e.invalidateClonerTransform(e),e.updateVisible(this),e.resetBBoxNeedsUpdate(),this.markPenumbraSizeDirty();let i=t.localIndex;s.children.splice(i,0,s.children.pop()),c(e)&&(e.invalidateUpstreamBooleanData(),h(e.parent)?e.parent.invalidateDownstreamBooleanData().recomputeBoolean():n instanceof d&&n.invalidateDownstreamBooleanData().recomputeBoolean()),e.updatePathSnapping()}this.markNeedsUpdateRendererDirty(),this.markGeometryCacheDirty()}get playPage(){return this.find(this.data.publish.playPage)??this.errorPage}updatePage(t){this.shadowsDirty=!0,this.activePage&&this.activePage.onDeactive(),this.activePage=this.errorPage;for(let e of this.children)e instanceof a&&(e.visible=e.uuid===t,e.visible&&(this.activePage=e,this.activePage.onActive(this)));this.activePage!==this.splatViewer?.activePage&&this.reloadSplats()}updateEntityByOp(t,e,n,s){if(this.shadowsDirty=!0,0===e.type){if(("overrides"in e.props||"component"in e.props)&&this.markNeedsRecomputeInstances(),"visible"in e.props&&this.markPenumbraSizeDirty(),e.path.includes("overrides")&&"states"in e.props){let{rest:t}=e.props;e={...e,props:t},this.markNeedsRecomputeInstances()}"pathSnapping"===e.path[0]&&void 0!==e.props.pathId&&this.pathConstraints.setConstraint(t,e.props.pathId)}let i=this.find(t);if(i)try{(function(t,e,n,s){t.updateByOp(e,n,s,!1)})(i,e,n,{scene:this,shared:s}),i instanceof w&&i.updateGeometryGroupsIfNeeded()}catch(t){console.error(t)}}updateEntity2DByOp(t,e,n,s,i,r=[]){t.updateEntityByOp(e,n,s,i),this.traverseEntity(t=>{(j(t)||t instanceof a)&&(r.includes(t.frameId??"")||t.frameId===e)&&t.updateEntity2DByOp(e,n,s,i)})}get activeCamera(){return this.activePage.activeCamera}switchActiveCamera(t){this.activePage.switchActiveCamera(t)}isInvisibleObjects(t){return t===this.invisibleObjects||t.hasAnccestor(this.invisibleObjects)}init(t,e){let n=Object.entries(e.data.lib.components).map((t,e)=>({data:t[1].asset.data,children:t[1].asset.children,id:t[0],fi:e}));this.invisibleObjects.updateState(this.invisibleObjects.data,{scene:this,shared:e}),this.add(this.invisibleObjects),this.createChildrenObjects(n,this.invisibleObjects,e),this.createChildrenObjects(t.objects,this,e),this.updatePage(t.publish.playPage),this.activePage.switchToPlayCamera(),this.expandInstances(e,!0),this.traverseEntity(t=>{t instanceof m&&t.updateUp()}),this.doPendingExpandCloner({scene:this,shared:e}),this.applyPendingCommands()}markNeedsRecomputeInstances(){this.needsRecomputeInstances=!0}markNeedsRecomputeInstancesForChildren(t){t.traverseEntity(t=>{("Component"===t.data.type||"Instance"===t.data.type)&&this.markNeedsRecomputeInstances()})}markNeedsRecomputeInstancesForAncessors(t){S.is(t)&&("Component"===t.data.type&&this.markNeedsRecomputeInstances(),t.traverseAncestors(t=>{S.is(t)&&"Component"===t.data.type&&this.markNeedsRecomputeInstances()}))}relativeizeInner(t,e,n,s,i,r,a){if(t){let o=s.find(t);o&&o!==s&&i.forInstancesRec(s=>{s.data=L(s.data,i=>{let o=i.events.data(a.id),l=s.goUp(r);if(l){let s=[...F(l.identity),t].join("-"),i=this.entityIdentityToEntity[s];if(i){let t=i.uuid;q.zoom(o,e)[n]=t}else console.warn("cannot find instance")}}).data})}}rewriteActions(t,e,n,s,i,r){t.forEach(t=>{"Transition"===t.data.type||"Animation"===t.data.type?this.relativeizeInner(t.data.object,[...e,t.id],"object",n,s,i,r):"Conditional"===t.data.type&&(this.rewriteActions(t.data.ifActions,[...e,t.id,"ifActions"],n,s,i,r),this.rewriteActions(t.data.elseActions,[...e,t.id,"elseActions"],n,s,i,r))})}rewriteEventsBeforeGoToPlayMode(){this.traverseEntity(t=>{if(T(t)&&"string"==typeof t.identity&&"Component"===t.data.type)return t.traverseEntity((e,n)=>{e.data.events.forEach(s=>{if("GameControl"===s.data.type){let i=!1;if(e.forInstancesRec(t=>{t.data=L(t.data,e=>{t.isInstanceRoot||(e.events.delete(s.id),i=!0)}).data}),!1===i)for(let i of V.list)this.rewriteActions(s.data.gameActions[i],["gameActions",i],t,e,n,s)}else"Conditional"===s.data.type?("Distance"===s.data.condition.type?(this.relativeizeInner(s.data.condition.fromObject,["condition"],"fromObject",t,e,n,s),this.relativeizeInner(s.data.condition.toObject,["condition"],"toObject",t,e,n,s)):"State"===s.data.condition.type?this.relativeizeInner(s.data.condition.object,["condition"],"object",t,e,n,s):"Comparison"===s.data.condition.type&&("Property"===s.data.condition.lOperand.type&&this.relativeizeInner(s.data.condition.lOperand.value[0],["condition","lOperand","value"],0,t,e,n,s),"Property"===s.data.condition.rOperand.type&&this.relativeizeInner(s.data.condition.rOperand.value[0],["condition","rOperand","value"],0,t,e,n,s)),this.rewriteActions(s.data.inActions,["inActions"],t,e,n,s),this.rewriteActions(s.data.outActions,["outActions"],t,e,n,s)):"actions"in s.data&&this.rewriteActions(s.data.actions,["actions"],t,e,n,s)})}),!0})}expandInstances(t,e,n){let s=new Set;this.traverseEntity(i=>{if(T(i)&&i.isInstanceRoot)return i.expandInstanceChildren({scene:this,shared:t,pendingDeletes:s}),e||i.resetBBoxNeedsUpdate(),n&&i.traverseEntity(t=>{n.addClip(t)}),!0});for(let t of s)this.disposeAndUnregisterEntityRecursivelyIfNotReregistered(t),u(t)}recomputeInstances(t,e){this.needsRecomputeInstances&&(this.needsRecomputeInstances=!1,this.traverseEntity(t=>{T(t)&&t.isInstanceRoot&&(t.component=void 0)}),this.expandInstances(t,!1,e))}disposeAndUnregisterEntityRecursivelyIfNotReregistered(t){t.traverseEntity(t=>{let e="string"==typeof t.identity?t.identity:t.identity.join("-");this.entityIdentityToEntity[e]===t&&(delete this.entityByUuid[t.uuid],delete this.entityIdentityToEntity[e]),t.dispose()})}clearScene(){this._autoInstancing?.dispose(),this._autoInstancing=null,this.instanceGroupsDirty=!0;for(let t of this.children)S.is(t)&&t.disposeRecursively();this.children.length=0}resetAfterClear(t,e){this.init(t,e)}raycast(t){return this.raycast1(t,!1)}raycast1(t,e){let n=[],s=i=>{for(let a of i.children){let i=a.cloner;if(S.is(a)&&!a.raycastLock&&(a.visible||i?.object.data.visible))if(!0===e&&a.isInstanceRoot){let e=[];if(t.intersectObject(a,!0,e),e.length){let t=e[0];t.object=a,t.point.applyMatrix4(t.object.matrixWorld);let s=a.matrixWorld.clone().invert();t.point.applyMatrix4(s),n.push(t)}}else(c(a)||p(a)&&this.enableHelpers&&a.objectHelper.visible)&&(t.intersectObject(a,!1,n),r(a,t,n)),s(a)}};return s(this.activePage),n}raycastWithClones(t){let e=[],n=s=>{for(let i of s.children){let s=i.cloner;S.is(i)&&(i.visible||s?.object.data.visible)&&((c(i)||p(i)&&this.enableHelpers&&i.objectHelper.visible)&&(t.intersectObject(i,!1,e),r(i,t,e,!0)),n(i))}};return n(this),e}forEachEntity(t){for(let e of this.children)S.is(e)&&t(e)}traverseConcreteEntity(t){for(let e of this.children)S.is(e)&&e.isConcreteEntity&&e.traverseEntity(t)}traverseEntity(t){for(let e of this.children)S.is(e)&&e.traverseEntity(t)}updateFont(t,e){this.traverseEntity(n=>{if(n instanceof w&&"Mesh"===n.data.type&&("TextGeometry"===n.data.geometry.type||"InputGeometry"===n.data.geometry.type)&&n.data.geometry.font===t){let s=n.geometry,i=n.data.geometry;s.updateFont(t,e).then(()=>{s.update(i,e);let t=n.invalidateDownstreamBooleanData();h(t)&&t.recomputeBoolean()})}})}traverseObject(t){for(let e of this.children)B.is(e)&&e.traverseObject(t)}traverseVisibleEntity(t){for(let e of this.children)S.is(e)&&e.visible&&e.traverseVisibleEntity(t)}dispose(){this.clearScene()}createChildrenObjects(t,e,n){let s=0;for(let i of t)this.createObject(i.id,i.data,i.children,e,s,n),s+=1}registerObjectCreatedInLegacy(t){this.entityByUuid[t.uuid]=t}unregisterObject(t){delete this.entityByUuid[t.uuid];for(let e of t.children)this.unregisterObject(e)}createObject(t,e,n,s,i,r){let a={scene:this,shared:r},o=pe(t,e,a);return O(o)&&this.shapeBlendIntances.push(o),E(o)&&this.hairInstances.push(o),o&&(this.entityByUuid[t]=o,s.add(o),s.children.splice(i,0,s.children.pop()),n.length>0&&(o.isInstanceRoot?console.error("instance should not have children!"):this.createChildrenObjects(n,o,r)),o.updateState(e,a),o instanceof w&&o.updateGeometryGroupsIfNeeded(),o.updateVisible(this),o.cloner&&this.toExpandCloner.add(o),e.pathSnapping?.pathId&&this.pathConstraints.setConstraint(t,e.pathSnapping.pathId)),"Empty"===e.type&&e.animations&&o.traverseEntity(t=>{let e=t.dataPatched;if(t instanceof w&&e.bones&&e.boneInverses){let n=e.bones.map(t=>this.find(t)),s=e.boneInverses.map(t=>(new it).fromArray(t)),i=new Ct(n,s);t.bind(i,t.bindMatrix)}else t.matrixAutoUpdate=!0}),o}getCenter(t){let e=[];for(let n=0,s=t.length;n<s;++n){let{id:s,recursive:i}=t[n],r=this.find(s),a=i?r.recursiveBBox:r.singleBBox;e.push(...a.vertices)}let n=new lt;return n.setFromPoints(e),n.getCenter(xe),xe}copyMatrixWorld(t,e){if(null===t)return void e.identity();let n=this.find(t);n?(n.updateWorldMatrix(!0,!1),e.copy(n.matrixWorld)):e.identity()}copyParentMatrixWorld(t,e){if(null===t)return void e.identity();let n=this.find(t)?.parent;n?(n.updateWorldMatrix(!0,!1),e.copy(n.matrixWorld)):e.identity()}traverseMaterial(t){this.traverseEntity(e=>{if(e instanceof D)if(Array.isArray(e.material))for(let n=0;n<e.material.length;n++)I(e.material[n])&&t(e.material[n]);else I(e.material)&&t(e.material)})}updateViewPlaneSize(t,e,n=!1){this.traverseConcreteEntity(s=>{s instanceof m&&s.setViewplaneSize(t,e,n)})}initializeSplatViewer(){this.splatViewer=new ye({scene:this}),this.reloadSplats()}reloadSplats(){this.splatViewer?.loadSplat()}};export{_t as a,St as b,Vt as c,Xt as d,ge as e,ve as f};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as e}from"./runtime-chunk-4KZXQGUQ.js";var t=null;function n(e){t=e}function r(){return t}function a(t){let n=t?.tracks.filter(e=>"vector"===e.ValueTypeName||"quaternion"===e.ValueTypeName).map(e=>e.times.length);if(n?.length){let t=e(n);return t&&t>2?t:2}return 2}export{a,n as b,r as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
)@d��i�m*�0�&��˥�`���N��f��v�k�tW���D d��-1B��8�GH*���,�V���N����ҫ[�;���t��
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t,b as e}from"./runtime-chunk-FDRTCOJ5.js";import{Ec as s,Fc as r,Sc as a,Xe as i}from"./runtime-chunk-VGN7YHB7.js";var o=new r(1,1,1),m=new r,d=new r,u=new s,c=class extends(t(i)){constructor(t,e=15){super(e),this.object=t,this.dummy=new a,this.object.updateMatrixWorld(),this.name=`EmptyObjectHelper: ${t.uuid}`,this.matrix=this.dummy.matrixWorld,this.matrixAutoUpdate=!1,this.object.isBone&&(this.visible=!1)}raycast(t,s){e(this.object,c.geometryHelper,t,s,!1,this.dummy)}update(){}updateMatrix(){}updateMatrixWorld(t){this.object.matrixWorld.decompose(m,u,d),this.matrix.compose(m,u,o),super.updateMatrixWorld(t)}updateWorldMatrix(t,e){}};export{c as a};
|
|
Binary file
|
|
Binary file
|