@splinetool/runtime 2.0.98 → 2.0.99
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/build/{runtime-bloom-46UF2WK3.js → runtime-bloom-7B3ZAMXY.js} +1 -1
- package/build/runtime-bloom-7B3ZAMXY.js.br +0 -0
- package/build/runtime-bloom-7B3ZAMXY.js.gz +0 -0
- package/build/{runtime-brightnessContrast-2FJOXPFC.js → runtime-brightnessContrast-HQGNA5X2.js} +1 -1
- package/build/runtime-brightnessContrast-HQGNA5X2.js.br +0 -0
- package/build/runtime-brightnessContrast-HQGNA5X2.js.gz +0 -0
- package/build/{runtime-chromaticAberration-FIUKRICZ.js → runtime-chromaticAberration-7QQBIOCV.js} +1 -1
- package/build/runtime-chromaticAberration-7QQBIOCV.js.br +0 -0
- package/build/runtime-chromaticAberration-7QQBIOCV.js.gz +0 -0
- package/build/runtime-chunk-2BYRMVRD.js +1 -0
- package/build/runtime-chunk-2BYRMVRD.js.br +0 -0
- package/build/runtime-chunk-2BYRMVRD.js.gz +0 -0
- package/build/{runtime-chunk-EC5GAOEB.js → runtime-chunk-2XCYQQPK.js} +1 -1
- package/build/runtime-chunk-2XCYQQPK.js.br +0 -0
- package/build/runtime-chunk-2XCYQQPK.js.gz +0 -0
- package/build/{runtime-chunk-IIEAGJYM.js → runtime-chunk-4GO5OFNC.js} +1 -1
- package/build/runtime-chunk-4GO5OFNC.js.br +0 -0
- package/build/runtime-chunk-4GO5OFNC.js.gz +0 -0
- package/build/{runtime-chunk-7EGV5IRF.js → runtime-chunk-4XXEJLMG.js} +1 -1
- package/build/runtime-chunk-4XXEJLMG.js.br +0 -0
- package/build/runtime-chunk-4XXEJLMG.js.gz +0 -0
- package/build/{runtime-chunk-W2IKBQDF.js → runtime-chunk-7CNMX337.js} +1 -1
- package/build/runtime-chunk-7CNMX337.js.br +0 -0
- package/build/runtime-chunk-7CNMX337.js.gz +0 -0
- package/build/{runtime-chunk-5OQSNA7N.js → runtime-chunk-CXA5NFNP.js} +1 -1
- package/build/runtime-chunk-CXA5NFNP.js.br +0 -0
- package/build/runtime-chunk-CXA5NFNP.js.gz +0 -0
- package/build/{runtime-chunk-XMU56CQ6.js → runtime-chunk-E6D7DGFO.js} +1 -1
- package/build/runtime-chunk-E6D7DGFO.js.br +0 -0
- package/build/runtime-chunk-E6D7DGFO.js.gz +0 -0
- package/build/{runtime-chunk-XTAUNEX7.js → runtime-chunk-E6R2EOZN.js} +1 -1
- package/build/runtime-chunk-E6R2EOZN.js.br +0 -0
- package/build/runtime-chunk-E6R2EOZN.js.gz +0 -0
- package/build/{runtime-chunk-A2NEOCM5.js → runtime-chunk-FL4LYSMP.js} +1 -1
- package/build/runtime-chunk-FL4LYSMP.js.br +0 -0
- package/build/runtime-chunk-FL4LYSMP.js.gz +0 -0
- package/build/{runtime-chunk-LNB7VVHR.js → runtime-chunk-HGOGHH4M.js} +1 -1
- package/build/runtime-chunk-HGOGHH4M.js.br +0 -0
- package/build/runtime-chunk-HGOGHH4M.js.gz +0 -0
- package/build/{runtime-chunk-E4IEROJD.js → runtime-chunk-IYKDXWML.js} +1 -1
- package/build/runtime-chunk-IYKDXWML.js.br +0 -0
- package/build/runtime-chunk-IYKDXWML.js.gz +0 -0
- package/build/{runtime-chunk-PVIFOGIM.js → runtime-chunk-KADJVVUY.js} +1 -1
- package/build/runtime-chunk-KADJVVUY.js.br +4 -0
- package/build/runtime-chunk-KADJVVUY.js.gz +0 -0
- package/build/{runtime-chunk-QES42G62.js → runtime-chunk-KPYQWJET.js} +1 -1
- package/build/runtime-chunk-KPYQWJET.js.br +0 -0
- package/build/runtime-chunk-KPYQWJET.js.gz +0 -0
- package/build/{runtime-chunk-5XFC4QBD.js → runtime-chunk-LCR6LO6Q.js} +1 -1
- package/build/runtime-chunk-LCR6LO6Q.js.br +0 -0
- package/build/runtime-chunk-LCR6LO6Q.js.gz +0 -0
- package/build/{runtime-chunk-HWSEPZOI.js → runtime-chunk-LM62BADA.js} +1 -1
- package/build/runtime-chunk-LM62BADA.js.br +0 -0
- package/build/runtime-chunk-LM62BADA.js.gz +0 -0
- package/build/{runtime-chunk-VAO3PN7A.js → runtime-chunk-M7S2GXRN.js} +1 -1
- package/build/runtime-chunk-M7S2GXRN.js.br +0 -0
- package/build/runtime-chunk-M7S2GXRN.js.gz +0 -0
- package/build/{runtime-chunk-CXXYRIN6.js → runtime-chunk-MABNKREI.js} +1 -1
- package/build/runtime-chunk-MABNKREI.js.br +0 -0
- package/build/runtime-chunk-MABNKREI.js.gz +0 -0
- package/build/{runtime-chunk-MHDL2FCN.js → runtime-chunk-N53OSDKC.js} +1 -1
- package/build/{runtime-chunk-MHDL2FCN.js.br → runtime-chunk-N53OSDKC.js.br} +0 -0
- package/build/runtime-chunk-N53OSDKC.js.gz +0 -0
- package/build/{runtime-chunk-VF7V3FH7.js → runtime-chunk-PMJ2AYHR.js} +1 -1
- package/build/runtime-chunk-PMJ2AYHR.js.br +0 -0
- package/build/runtime-chunk-PMJ2AYHR.js.gz +0 -0
- package/build/{runtime-chunk-QFQCUJOF.js → runtime-chunk-PY32P2MB.js} +1 -1
- package/build/runtime-chunk-PY32P2MB.js.br +0 -0
- package/build/runtime-chunk-PY32P2MB.js.gz +0 -0
- package/build/{runtime-chunk-C7DIZAFG.js → runtime-chunk-RQFBMEVZ.js} +1 -1
- package/build/runtime-chunk-RQFBMEVZ.js.br +0 -0
- package/build/runtime-chunk-RQFBMEVZ.js.gz +0 -0
- package/build/{runtime-chunk-U2IF34Z5.js → runtime-chunk-SEVXOA7Q.js} +1 -1
- package/build/runtime-chunk-SEVXOA7Q.js.br +0 -0
- package/build/runtime-chunk-SEVXOA7Q.js.gz +0 -0
- package/build/{runtime-chunk-NS7TL6UQ.js → runtime-chunk-T3SAGIHK.js} +1 -1
- package/build/runtime-chunk-T3SAGIHK.js.br +0 -0
- package/build/runtime-chunk-T3SAGIHK.js.gz +0 -0
- package/build/{runtime-chunk-EEHYJMUL.js → runtime-chunk-TVEOQL6G.js} +1 -1
- package/build/runtime-chunk-TVEOQL6G.js.br +0 -0
- package/build/runtime-chunk-TVEOQL6G.js.gz +0 -0
- package/build/{runtime-chunk-SJ36AN6M.js → runtime-chunk-VCM7LVUJ.js} +1 -1
- package/build/runtime-chunk-VCM7LVUJ.js.br +0 -0
- package/build/runtime-chunk-VCM7LVUJ.js.gz +0 -0
- package/build/{runtime-chunk-X4ASEDQV.js → runtime-chunk-WKNVDX3N.js} +1 -1
- package/build/runtime-chunk-WKNVDX3N.js.br +0 -0
- package/build/runtime-chunk-WKNVDX3N.js.gz +0 -0
- package/build/{runtime-chunk-TSE2HK56.js → runtime-chunk-ZJAEOKE6.js} +1 -1
- package/build/{runtime-chunk-TSE2HK56.js.br → runtime-chunk-ZJAEOKE6.js.br} +0 -0
- package/build/{runtime-chunk-TSE2HK56.js.gz → runtime-chunk-ZJAEOKE6.js.gz} +0 -0
- package/build/{runtime-classicRuntime-GNMFZX7G.js → runtime-classicRuntime-QRJGHJF3.js} +1 -1
- package/build/runtime-classicRuntime-QRJGHJF3.js.br +0 -0
- package/build/runtime-classicRuntime-QRJGHJF3.js.gz +0 -0
- package/build/{runtime-cloners-UL7WNWGX.js → runtime-cloners-3SCF7B47.js} +1 -1
- package/build/runtime-cloners-3SCF7B47.js.br +0 -0
- package/build/runtime-cloners-3SCF7B47.js.gz +0 -0
- package/build/{runtime-components-KN54YJ5L.js → runtime-components-U6Y3CFLI.js} +1 -1
- package/build/runtime-components-U6Y3CFLI.js.br +0 -0
- package/build/runtime-components-U6Y3CFLI.js.gz +0 -0
- package/build/{runtime-createDestroy-JFA4TDDF.js → runtime-createDestroy-VKBMFQYZ.js} +1 -1
- package/build/runtime-createDestroy-VKBMFQYZ.js.br +0 -0
- package/build/runtime-createDestroy-VKBMFQYZ.js.gz +0 -0
- package/build/{runtime-depthOfField-QQZE6BGP.js → runtime-depthOfField-VFVDL447.js} +1 -1
- package/build/runtime-depthOfField-VFVDL447.js.br +0 -0
- package/build/runtime-depthOfField-VFVDL447.js.gz +0 -0
- package/build/{runtime-dragDrop-MU7FAUNI.js → runtime-dragDrop-6BEBTD3K.js} +1 -1
- package/build/runtime-dragDrop-6BEBTD3K.js.br +0 -0
- package/build/runtime-dragDrop-6BEBTD3K.js.gz +0 -0
- package/build/{runtime-gameControls-Z7UHGIXB.js → runtime-gameControls-3KGKNHOQ.js} +1 -1
- package/build/runtime-gameControls-3KGKNHOQ.js.br +0 -0
- package/build/runtime-gameControls-3KGKNHOQ.js.gz +0 -0
- package/build/{runtime-hair-OQZCOSS6.js → runtime-hair-CM56MBE5.js} +1 -1
- package/build/runtime-hair-CM56MBE5.js.br +3 -0
- package/build/runtime-hair-CM56MBE5.js.gz +0 -0
- package/build/{runtime-hueSaturation-PDQYK2QW.js → runtime-hueSaturation-TAUU2VZR.js} +1 -1
- package/build/runtime-hueSaturation-TAUU2VZR.js.br +0 -0
- package/build/runtime-hueSaturation-TAUU2VZR.js.gz +0 -0
- package/build/{runtime-mergeStaticGeometries-HPVFB5QY.js → runtime-mergeStaticGeometries-LQZU4BQS.js} +1 -1
- package/build/runtime-mergeStaticGeometries-LQZU4BQS.js.br +0 -0
- package/build/runtime-mergeStaticGeometries-LQZU4BQS.js.gz +0 -0
- package/build/{runtime-miscActions-GLMYLPMU.js → runtime-miscActions-MUUPFMVZ.js} +1 -1
- package/build/runtime-miscActions-MUUPFMVZ.js.br +0 -0
- package/build/runtime-miscActions-MUUPFMVZ.js.gz +0 -0
- package/build/{runtime-mouseHover-QEKGPB3H.js → runtime-mouseHover-DZDHUY63.js} +1 -1
- package/build/runtime-mouseHover-DZDHUY63.js.br +0 -0
- package/build/runtime-mouseHover-DZDHUY63.js.gz +0 -0
- package/build/{runtime-noise-HYKA3FC3.js → runtime-noise-WG33B6W6.js} +1 -1
- package/build/runtime-noise-WG33B6W6.js.br +0 -0
- package/build/runtime-noise-WG33B6W6.js.gz +0 -0
- package/build/{runtime-particles-CXP7OG35.js → runtime-particles-FNMJLGAY.js} +1 -1
- package/build/runtime-particles-FNMJLGAY.js.br +0 -0
- package/build/runtime-particles-FNMJLGAY.js.gz +0 -0
- package/build/{runtime-paths-KT7MKJQW.js → runtime-paths-A723JIAY.js} +1 -1
- package/build/runtime-paths-A723JIAY.js.br +0 -0
- package/build/runtime-paths-A723JIAY.js.gz +0 -0
- package/build/{runtime-pixelation-QNATSU7E.js → runtime-pixelation-N47BVMJD.js} +1 -1
- package/build/runtime-pixelation-N47BVMJD.js.br +0 -0
- package/build/runtime-pixelation-N47BVMJD.js.gz +0 -0
- package/build/{runtime-resize-E45ZZV2M.js → runtime-resize-DOVSOJ5D.js} +1 -1
- package/build/runtime-resize-DOVSOJ5D.js.br +0 -0
- package/build/runtime-resize-DOVSOJ5D.js.gz +0 -0
- package/build/{runtime-sceneTransition-ITUVH6H7.js → runtime-sceneTransition-37LCXK5A.js} +1 -1
- package/build/runtime-sceneTransition-37LCXK5A.js.br +0 -0
- package/build/runtime-sceneTransition-37LCXK5A.js.gz +0 -0
- package/build/{runtime-scroll-ZUVHZJJ2.js → runtime-scroll-7IA4BXTP.js} +1 -1
- package/build/runtime-scroll-7IA4BXTP.js.br +0 -0
- package/build/runtime-scroll-7IA4BXTP.js.gz +0 -0
- package/build/runtime-shapeBlends-TYMCN2YY.js +1 -0
- package/build/runtime-shapeBlends-TYMCN2YY.js.br +0 -0
- package/build/runtime-shapeBlends-TYMCN2YY.js.gz +0 -0
- package/build/{runtime-text-L2IHLEM2.js → runtime-text-53KI7WMP.js} +1 -1
- package/build/runtime-text-53KI7WMP.js.br +0 -0
- package/build/runtime-text-53KI7WMP.js.gz +0 -0
- package/build/{runtime-textInputs-NDVZCDTE.js → runtime-textInputs-TEM3A5UW.js} +1 -1
- package/build/runtime-textInputs-TEM3A5UW.js.br +0 -0
- package/build/runtime-textInputs-TEM3A5UW.js.gz +0 -0
- package/build/{runtime-timeline-JJVT3KXZ.js → runtime-timeline-NBD73ZGM.js} +1 -1
- package/build/runtime-timeline-NBD73ZGM.js.br +0 -0
- package/build/runtime-timeline-NBD73ZGM.js.gz +0 -0
- package/build/{runtime-tracking-KSNP5FCV.js → runtime-tracking-CQOVCOUL.js} +1 -1
- package/build/runtime-tracking-CQOVCOUL.js.br +0 -0
- package/build/runtime-tracking-CQOVCOUL.js.gz +0 -0
- package/build/{runtime-transitions-XNR4EWGY.js → runtime-transitions-PKD4ONL7.js} +1 -1
- package/build/runtime-transitions-PKD4ONL7.js.br +0 -0
- package/build/runtime-transitions-PKD4ONL7.js.gz +0 -0
- package/build/{runtime-ui2d-X4TBR4IV.js → runtime-ui2d-IX6WRAJK.js} +1 -1
- package/build/runtime-ui2d-IX6WRAJK.js.br +0 -0
- package/build/runtime-ui2d-IX6WRAJK.js.gz +0 -0
- package/build/{runtime-vectorShapes-YYHJ4DWW.js → runtime-vectorShapes-EZ6HN5EX.js} +1 -1
- package/build/runtime-vectorShapes-EZ6HN5EX.js.br +0 -0
- package/build/runtime-vectorShapes-EZ6HN5EX.js.gz +0 -0
- package/build/{runtime-vignette-XUF3UCWI.js → runtime-vignette-T6EP3UE3.js} +1 -1
- package/build/runtime-vignette-T6EP3UE3.js.br +0 -0
- package/build/runtime-vignette-T6EP3UE3.js.gz +0 -0
- package/build/{runtime-webgpu-IYPA4QOA.js → runtime-webgpu-F4WYQNH7.js} +1 -1
- package/build/runtime-webgpu-F4WYQNH7.js.br +0 -0
- package/build/runtime-webgpu-F4WYQNH7.js.gz +0 -0
- package/build/runtime.cjs +7 -7
- package/build/runtime.js +1 -1
- package/build/runtime.js.br +0 -0
- package/build/runtime.js.gz +0 -0
- package/build/runtime.standalone.js +1 -1
- package/build/runtime.standalone.js.br +0 -0
- package/build/runtime.standalone.js.gz +0 -0
- package/build/runtime.standalone.webgl.js +1 -1
- 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 -1
- 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 -1
- 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 -1
- package/build/runtime.standalone.webgpu.min.js.br +0 -0
- package/build/runtime.standalone.webgpu.min.js.gz +0 -0
- package/package.json +2 -1
- package/build/runtime-bloom-46UF2WK3.js.br +0 -0
- package/build/runtime-bloom-46UF2WK3.js.gz +0 -0
- package/build/runtime-brightnessContrast-2FJOXPFC.js.br +0 -0
- package/build/runtime-brightnessContrast-2FJOXPFC.js.gz +0 -0
- package/build/runtime-chromaticAberration-FIUKRICZ.js.br +0 -0
- package/build/runtime-chromaticAberration-FIUKRICZ.js.gz +0 -0
- package/build/runtime-chunk-5OQSNA7N.js.br +0 -0
- package/build/runtime-chunk-5OQSNA7N.js.gz +0 -0
- package/build/runtime-chunk-5XFC4QBD.js.br +0 -0
- package/build/runtime-chunk-5XFC4QBD.js.gz +0 -0
- package/build/runtime-chunk-7EGV5IRF.js.br +0 -0
- package/build/runtime-chunk-7EGV5IRF.js.gz +0 -0
- package/build/runtime-chunk-A2NEOCM5.js.br +0 -0
- package/build/runtime-chunk-A2NEOCM5.js.gz +0 -0
- package/build/runtime-chunk-C7DIZAFG.js.br +0 -0
- package/build/runtime-chunk-C7DIZAFG.js.gz +0 -0
- package/build/runtime-chunk-CXXYRIN6.js.br +0 -0
- package/build/runtime-chunk-CXXYRIN6.js.gz +0 -0
- package/build/runtime-chunk-E4IEROJD.js.br +0 -0
- package/build/runtime-chunk-E4IEROJD.js.gz +0 -0
- package/build/runtime-chunk-EC5GAOEB.js.br +0 -0
- package/build/runtime-chunk-EC5GAOEB.js.gz +0 -0
- package/build/runtime-chunk-EEHYJMUL.js.br +0 -0
- package/build/runtime-chunk-EEHYJMUL.js.gz +0 -0
- package/build/runtime-chunk-HWSEPZOI.js.br +0 -0
- package/build/runtime-chunk-HWSEPZOI.js.gz +0 -0
- package/build/runtime-chunk-IIEAGJYM.js.br +0 -0
- package/build/runtime-chunk-IIEAGJYM.js.gz +0 -0
- package/build/runtime-chunk-K4VTFVMK.js +0 -1
- package/build/runtime-chunk-K4VTFVMK.js.br +0 -0
- package/build/runtime-chunk-K4VTFVMK.js.gz +0 -0
- package/build/runtime-chunk-LNB7VVHR.js.br +0 -0
- package/build/runtime-chunk-LNB7VVHR.js.gz +0 -0
- package/build/runtime-chunk-MHDL2FCN.js.gz +0 -0
- package/build/runtime-chunk-NS7TL6UQ.js.br +0 -0
- package/build/runtime-chunk-NS7TL6UQ.js.gz +0 -0
- package/build/runtime-chunk-PVIFOGIM.js.br +0 -2
- package/build/runtime-chunk-PVIFOGIM.js.gz +0 -0
- package/build/runtime-chunk-QES42G62.js.br +0 -0
- package/build/runtime-chunk-QES42G62.js.gz +0 -0
- package/build/runtime-chunk-QFQCUJOF.js.br +0 -0
- package/build/runtime-chunk-QFQCUJOF.js.gz +0 -0
- package/build/runtime-chunk-SJ36AN6M.js.br +0 -0
- package/build/runtime-chunk-SJ36AN6M.js.gz +0 -0
- package/build/runtime-chunk-U2IF34Z5.js.br +0 -0
- package/build/runtime-chunk-U2IF34Z5.js.gz +0 -0
- package/build/runtime-chunk-VAO3PN7A.js.br +0 -0
- package/build/runtime-chunk-VAO3PN7A.js.gz +0 -0
- package/build/runtime-chunk-VF7V3FH7.js.br +0 -0
- package/build/runtime-chunk-VF7V3FH7.js.gz +0 -0
- package/build/runtime-chunk-W2IKBQDF.js.br +0 -0
- package/build/runtime-chunk-W2IKBQDF.js.gz +0 -0
- package/build/runtime-chunk-X4ASEDQV.js.br +0 -0
- package/build/runtime-chunk-X4ASEDQV.js.gz +0 -0
- package/build/runtime-chunk-XMU56CQ6.js.br +0 -0
- package/build/runtime-chunk-XMU56CQ6.js.gz +0 -0
- package/build/runtime-chunk-XTAUNEX7.js.br +0 -0
- package/build/runtime-chunk-XTAUNEX7.js.gz +0 -0
- package/build/runtime-classicRuntime-GNMFZX7G.js.br +0 -0
- package/build/runtime-classicRuntime-GNMFZX7G.js.gz +0 -0
- package/build/runtime-cloners-UL7WNWGX.js.br +0 -0
- package/build/runtime-cloners-UL7WNWGX.js.gz +0 -0
- package/build/runtime-components-KN54YJ5L.js.br +0 -0
- package/build/runtime-components-KN54YJ5L.js.gz +0 -0
- package/build/runtime-createDestroy-JFA4TDDF.js.br +0 -0
- package/build/runtime-createDestroy-JFA4TDDF.js.gz +0 -0
- package/build/runtime-depthOfField-QQZE6BGP.js.br +0 -0
- package/build/runtime-depthOfField-QQZE6BGP.js.gz +0 -0
- package/build/runtime-dragDrop-MU7FAUNI.js.br +0 -0
- package/build/runtime-dragDrop-MU7FAUNI.js.gz +0 -0
- package/build/runtime-gameControls-Z7UHGIXB.js.br +0 -0
- package/build/runtime-gameControls-Z7UHGIXB.js.gz +0 -0
- package/build/runtime-hair-OQZCOSS6.js.br +0 -4
- package/build/runtime-hair-OQZCOSS6.js.gz +0 -0
- package/build/runtime-hueSaturation-PDQYK2QW.js.br +0 -0
- package/build/runtime-hueSaturation-PDQYK2QW.js.gz +0 -0
- package/build/runtime-mergeStaticGeometries-HPVFB5QY.js.br +0 -0
- package/build/runtime-mergeStaticGeometries-HPVFB5QY.js.gz +0 -0
- package/build/runtime-miscActions-GLMYLPMU.js.br +0 -0
- package/build/runtime-miscActions-GLMYLPMU.js.gz +0 -0
- package/build/runtime-mouseHover-QEKGPB3H.js.br +0 -0
- package/build/runtime-mouseHover-QEKGPB3H.js.gz +0 -0
- package/build/runtime-noise-HYKA3FC3.js.br +0 -0
- package/build/runtime-noise-HYKA3FC3.js.gz +0 -0
- package/build/runtime-particles-CXP7OG35.js.br +0 -0
- package/build/runtime-particles-CXP7OG35.js.gz +0 -0
- package/build/runtime-paths-KT7MKJQW.js.br +0 -0
- package/build/runtime-paths-KT7MKJQW.js.gz +0 -0
- package/build/runtime-pixelation-QNATSU7E.js.br +0 -0
- package/build/runtime-pixelation-QNATSU7E.js.gz +0 -0
- package/build/runtime-resize-E45ZZV2M.js.br +0 -0
- package/build/runtime-resize-E45ZZV2M.js.gz +0 -0
- package/build/runtime-sceneTransition-ITUVH6H7.js.br +0 -0
- package/build/runtime-sceneTransition-ITUVH6H7.js.gz +0 -0
- package/build/runtime-scroll-ZUVHZJJ2.js.br +0 -0
- package/build/runtime-scroll-ZUVHZJJ2.js.gz +0 -0
- package/build/runtime-shapeBlends-PIFESE2X.js +0 -1
- package/build/runtime-shapeBlends-PIFESE2X.js.br +0 -0
- package/build/runtime-shapeBlends-PIFESE2X.js.gz +0 -0
- package/build/runtime-text-L2IHLEM2.js.br +0 -0
- package/build/runtime-text-L2IHLEM2.js.gz +0 -0
- package/build/runtime-textInputs-NDVZCDTE.js.br +0 -0
- package/build/runtime-textInputs-NDVZCDTE.js.gz +0 -0
- package/build/runtime-timeline-JJVT3KXZ.js.br +0 -0
- package/build/runtime-timeline-JJVT3KXZ.js.gz +0 -0
- package/build/runtime-tracking-KSNP5FCV.js.br +0 -0
- package/build/runtime-tracking-KSNP5FCV.js.gz +0 -0
- package/build/runtime-transitions-XNR4EWGY.js.br +0 -0
- package/build/runtime-transitions-XNR4EWGY.js.gz +0 -0
- package/build/runtime-ui2d-X4TBR4IV.js.br +0 -0
- package/build/runtime-ui2d-X4TBR4IV.js.gz +0 -0
- package/build/runtime-vectorShapes-YYHJ4DWW.js.br +0 -0
- package/build/runtime-vectorShapes-YYHJ4DWW.js.gz +0 -0
- package/build/runtime-vignette-XUF3UCWI.js.br +0 -0
- package/build/runtime-vignette-XUF3UCWI.js.gz +0 -0
- package/build/runtime-webgpu-IYPA4QOA.js.br +0 -0
- package/build/runtime-webgpu-IYPA4QOA.js.gz +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as t}from"./runtime-chunk-RTLL6WIB.js";import{h as e}from"./runtime-chunk-2PT2WH66.js";import{c as i}from"./runtime-chunk-TZCHGFVF.js";import{Ba as r,C as s,Ca as a,Ea as n,J as o,Pa as l,i as h,j as p,k as d,n as c}from"./runtime-chunk-H3ODKGZ7.js";import{Ec as u,Gc as m,Hc as f,Md as y,Qc as v,Rc as g,Rd as x,Tc as S,Te as w,Zc as M,bd as b,dd as B,ed as P,fd as E,md as A,nd as D}from"./runtime-chunk-KPOUV3HD.js";var C={Cloner:null,changeEntityProptotype:()=>{},createEntity:()=>{}};function O(t,e){let i=[];if(e.length!==t.length)return null;{let r=0;for(;r<t.length;){if("*"===e[r])i.push(t[r]);else if(t[r]!==e[r])return null;r+=1}}return i}function _(t,e){let i=[];if(!(e.length<=t.length))return null;{let r=0;for(;r<e.length;){if("*"===e[r])i.push(t[r]);else if(t[r]!==e[r])return null;r+=1}}return i}var R=new f,T=new f,W=new v,V=[new f(-1,1,1),new f(-1,-1,1),new f(1,-1,1),new f(1,1,1),new f(-1,1,-1),new f(-1,-1,-1),new f(1,-1,-1),new f(1,1,-1)],U=[[0,3],[1,2],[5,6],[4,7],[0,1],[3,2],[7,6],[4,5],[0,4],[1,5],[2,6],[3,7]],L=[[0,2],[7,5],[4,1],[3,6],[4,3],[1,6]],I=(t,e,i)=>{t.updateEntityBoxSize(R,T),W.copy(e).multiply(t.matrixWorld),0===T.x&&0===T.y&&0===T.z?i.push(new f(R.x,R.y,R.z).applyMatrix4(W)):V.forEach(t=>{i.push(t.clone().multiply(T).add(R).applyMatrix4(W))})},z=class extends M{constructor(){super(...arguments),this.matrix=new v,this.vertices=[],this.faces=[],this.edges=[],this.centerEdges=[]}copy(t){return super.copy(t),this.matrix.copy(t.matrix),this.vertices=t.vertices.map(t=>t.clone()),this.faces=t.faces.map(t=>t.clone()),this.edges=t.edges.map(t=>t.clone()),this.centerEdges=t.centerEdges.map(t=>t.clone()),this}setFromObjectSize(t,e=!1){t.updateWorldMatrix(!1,e),this.makeEmpty(),this.matrix.copy(t.matrixWorld);let i=(new v).copy(t.matrixWorld).invert();return this.expandByObjectSize(t,i,e)}expandByObjectSize(t,e,i=!1){let r=[];if(!0===i){let i=[];t.traverseEntity(t=>{if(t.visible||t.cloner&&t.data.visible){if(!("geometry"in t))return W.copy(e).multiply(t.matrixWorld),void i.push((new f).applyMatrix4(W));I(t,e,r)}}),0===r.length&&r.push(...i)}else I(t,e,r);return this.setFromPoints(r)}getCenter(t){return(t=super.getCenter(t)).applyMatrix4(this.matrix),t}getPositionToCenter(t){return(t=super.getCenter(t)).applyMatrix4(W.copy(this.matrix).setPosition(0,0,0)),t}computeVertices(){this.getSize(T).multiplyScalar(.5),this.getCenter(R),W.copy(this.matrix).setPosition(R),this.vertices=V.map(t=>t.clone().multiply(T).applyMatrix4(W))}computeEdges(){this.vertices.length>0&&this.computeVertices(),this.edges=U.map(([t,e])=>new w(this.vertices[t],this.vertices[e])),this.centerEdges=this.edges.map(t=>t.getCenter(new f))}computeFaces(){this.vertices.length>0&&this.computeVertices(),this.faces=L.map(([t,e])=>this.vertices[t].clone().add(this.vertices[e]).multiplyScalar(.5))}},F=new f(1,1,1);function j(t,e,i,r,s=new v){return s.compose(t,e,F).multiply(i).scale(r)}var N,k=new v;(N||(N={})).is=function(t){return t&&t.__isSPEObject};var G=t=>class extends t{constructor(){super(...arguments),this.previousModelViewMatrix=new v,this.copyPreviousMatrix=!0,this.pivotMatrix=new v,this.matrixWorldRigid=new v,this.shearScale=new v,this.shearScaleInv=new v,this.shearMatrix=new v}get __isSPEObject(){return!0}getPhysicsLocalMatrix(t){return!!this.rigidBody?.isDynamic()&&(t.copy(this.matrixWorld),this.hasNonUniformScale&&t.multiply(this.shearScaleInv),this.parent&&t.premultiply(k.copy(this.parent.matrixWorld).invert()),t.multiply(k.copy(this.pivotMatrix).invert()),!0)}isDescendantOf(t){t instanceof S&&(t=t.uuid);let e=this;for(;e.parent;){if(e.parent.uuid===t)return!0;e=e.parent}return!1}updateMatrix(){!this.shearMatrix||(j(this.position,this.quaternion,this.shearMatrix,this.scale,this.matrix),this.matrixWorldNeedsUpdate=!0)}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorld.multiply(this.pivotMatrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(let e of this.children)e.updateMatrixWorld(t)}updateWorldMatrix(t,e){let i=this.parent;if(t&&null!==i&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorld.multiply(this.pivotMatrix),e)for(let t of this.children)t.updateWorldMatrix(!1,!0)}traverseChildren(t,e=0){for(let i of this.children)N.is(i)&&i.traverseObject(t,e+1)}traverseObject(t,e=0){if(!0!==t(this,e))for(let i of this.children)N.is(i)&&i.traverseObject(t,e+1)}updateMatrixWorldRigid(){this.hasNonUniformScale=l(this.matrixWorld,this.matrixWorldRigid,this.shearScale),this.matrixWorldRigid.copyPosition(this.matrixWorld),this.shearScaleInv.copy(this.shearScale).invert()}attach(t,e){this.updateWorldMatrix(!0,!1);let i=(new v).copy(this.matrixWorld).invert();return null!==t.parent&&(t.parent.updateWorldMatrix(!0,!1),i.multiply(t.parent.matrixWorld)),t.applyMatrix4(i),t.updateWorldMatrix(!1,!1),this.add(t),void 0!==e&&(this.children.pop(),this.children.splice(e,0,t)),this}copy(t,e=!1){return super.copy(t,e),this}onAfterRender(t,e,i,r,s,a){this.copyPreviousMatrix&&this.previousModelViewMatrix.copy(this.modelViewMatrix)}},H=class extends x{constructor(){super()}getPoints(t=12){let e,i=[],r=this.getCurveLengths(),s=r[r.length-1]/r.length;for(let a=0,n=this.curves;a<n.length;a++){let o=n[a],l=0===a?r[a]:r[a]-r[a-1],h=Math.ceil(t*l/s),p=o.getPoints(h);for(let t=0;t<p.length;t++){let r=p[t];e&&e.equals(r)||(i.push(r),e=r)}}return this.autoClose&&i.length>1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i}},q=.001,Z=new f,K=new f,Q=new f,J=new f,X=new f,Y=new f,$=new f,tt=new f,et=new f;function it(t,e,i){return Z.subVectors(e,t),K.subVectors(e,i),Z.cross(K).length()<=q}var rt=new WeakMap;function st(t){let e=rt.get(t.points);if(void 0!==e&&e.isClosed===t.isClosed)return e.curve;let i=function(t){let e=t.points,i=[e[0]],r=[new f(...e[0].data.position)];Q.copy(r[0]);for(let t=0;t<e.length-1;t++)Z.fromArray(e[t].data.position),K.fromArray(e[t+1].data.position),X.subVectors(Z,Q),$.subVectors(Z,K),X.cross($).length()>q&&(i.push(e[t]),r.push((new f).copy(Z)),Q.copy(Z));let s=e[e.length-1];i.push(s),r.push(new f(...s.data.position));let a=t.isClosed,n=i.length-(a?0:1),o=i.length,l=[],h=[];for(let t=0;t<o;t++){let e=i[t].data;l.push(new f(...e.controlPrevious.position)),h.push(new f(...e.controlNext.position))}let p=[];for(let t=0;t<n;t++){let e=t===o-1?0:t+1;p.push(it(r[t],h[t],r[e])&&it(r[t],l[e],r[e]))}let d=[];for(let t=0;t<o;t++){let e=i[t].data,s=r[t],n={position:s,prevDir:void 0,nextDir:void 0,controlPrevious:l[t],controlNext:h[t],tan:void 0,baseRoundness:e.roundness,removedLength:0};if(d.push(n),0===e.roundness||!a&&(0===t||t===o-1))continue;let c=a&&0==t?o-1:t-1,u=a&&t==o-1?0:t+1,m=(new f).subVectors(r[c],s).normalize(),y=(new f).subVectors(r[u],s).normalize();n.prevDir=m,n.nextDir=y;let v=p[a&&0===t?o-1:t-1],g=p[t];if(v&&g){J.addVectors(m,y).normalize();let t=Q.crossVectors(J,m).length()/m.dot(J);n.tan=t,n.removedLength=e.roundness/t}}for(let t=0;t<n;t++){let e=a&&t===o-1?0:t+1,i=d[t],r=d[e];if(0!==i.removedLength||0!==r.removedLength){let t=i.position.distanceTo(r.position);i.removedLength=Math.min(i.removedLength,t/2),r.removedLength=Math.min(r.removedLength,t/2)}}let c=new Array(2*o).fill(null);for(let t=0;t<n;t++){let e=a&&t===o-1?0:t+1,i=d[t],r=d[e],s=null;if(p[t]){let t=i.position.clone(),e=r.position.clone();(0!==i.removedLength||0!==r.removedLength)&&(i.nextDir&&t.add(Q.copy(i.nextDir).setLength(i.removedLength)),r.prevDir&&e.add(Q.copy(r.prevDir).setLength(r.removedLength))),t.distanceTo(e)>q&&(s=new y(t,t.clone().lerp(e,.3),e.clone().lerp(t,.3),e))}else i.position.distanceTo(r.position)>q&&(s=new y(i.position,i.controlNext,r.controlPrevious,r.position));c[2*t+1]=s}for(let t=0;t<o;t++){let e=d[t];if(0===e.removedLength)continue;let i=e.position,r=e.prevDir.clone().multiplyScalar(e.removedLength).add(i),s=e.nextDir.clone().multiplyScalar(e.removedLength).add(i),a=e.tan*e.removedLength;J.addVectors(e.prevDir,e.nextDir).normalize(),X.copy(r).lerp(s,.5);let n=r.distanceTo(s)/2;et.copy(J).multiplyScalar(Math.sqrt(Math.pow(a,2)-Math.pow(n,2))).add(X),Y.copy(J).multiplyScalar(-a).add(et);let o=i.distanceTo(Y)/i.distanceTo(X);$.copy(e.prevDir).multiplyScalar(o*i.distanceTo(r)).add(i),tt.copy($).lerp(Y,2);let l=r.clone().lerp($,4/3),h=s.clone().lerp(tt,4/3);c[2*t]=new y(r,l,h,s)}let u=new H;for(let t=0;t<c.length;t++){let e=c[t];e&&u.add(e)}return u}(t);return rt.set(t.points,{isClosed:t.isClosed,curve:i}),i}var at,nt=new v,ot=new m,lt=new m,ht=new g,pt=new f,dt=new f(0,1,0);(at||(at={})).is=function(t){return t&&t.__isEntity};var ct=t=>at.is(t),ut={type:"completeState",isfromEntity:!0},mt=["x","y","z"],ft=new f,yt=new f(1,1,1),vt=new m,gt=new g,xt=new v,St=l=>class extends(G(l)){constructor(){super(...arguments),this.raycastLock=!1,this.scaleLock=!1,this.disposed=!1,this.stateSelection=null,this.destroyedInAction=!1,this.instances=[],this.prevState=null,this.currentState=null,this.currentAnimationAction=null,this.reversibleToState=null,this.transitionState={settled:!0,state:null},this.currentTransitionEvent=null,this.previousAction=null,this._singleBBox=new z,this._recursiveBBox=new z,this.singleBBoxNeedsUpdate=!0,this.recursiveBBoxNeedsUpdate=!0,this._needApplyPathSnapping=!0,this.attachedPaths=new Set}get __isEntity(){return!0}entityChildren(t){let e=this.children[t];if(at.is(e))return e}entityChildrenCount(){let t=this.children.length;for(;t--;)if(at.is(this.children[t]))return t+1;return 0}get isConcreteEntity(){return"string"==typeof this.identity}get isVirtualEntity(){return"string"!=typeof this.identity}get isInstanceRoot(){return this.isConcreteEntity&&"Instance"===this.data.type}nearestInstanceSelfOrParent(){let t=this;for(;"Instance"!==t.data.type;){let e=t.parent;if(!at.is(e))return;t=e}return t}forInstancesRec(t){this.instances.forEach(e=>{e.disposed||t(e),e.forInstancesRec(t)})}super_Entity(t,e){"string"==typeof t&&(this.uuid=t),this.identity=t,this.data=e,this.matrixAutoUpdate=!1,this.dataPatched=this.data}changeSelectedState(t,e,i=!1){if(0!==this.data.states.length||i){for(let t of this.data.states)n.toOps(this.data,t.data).forEach(t=>{let i=p.replaceProps(t,this.data);this.dataPatched=this.data,this.updateByPatchedOp(i,this.data,e)});if(null!==t){let i=this.data.states.data(t);i&&(this.dataPatched=n.patch(this.data,i),n.toOps(this.data,i).forEach(t=>{this.updateByPatchedOp(t,this.dataPatched,e)}))}i&&this.updateTransformState(this.dataPatched,e),this.stateSelection=t,this.updatePathSnapping(this.dataPatched.pathSnapping)}}get singleBBox(){return this.singleBBoxNeedsUpdate&&(this.singleBBoxNeedsUpdate=!1,this._singleBBox.setFromObjectSize(this,!1),this._singleBBox.computeVertices(),this._singleBBox.computeEdges(),this._singleBBox.computeFaces()),this._singleBBox}get recursiveBBox(){return this.recursiveBBoxNeedsUpdate&&(this.recursiveBBoxNeedsUpdate=!1,this._recursiveBBox.setFromObjectSize(this,!0),this._recursiveBBox.computeVertices(),this._recursiveBBox.computeEdges(),this._recursiveBBox.computeFaces()),this._recursiveBBox}updateEntityBoxSize(t,e){t.setScalar(0),e.setScalar(0)}resetBBoxNeedsUpdateSelf(){this.singleBBoxNeedsUpdate=!0,this.recursiveBBoxNeedsUpdate=!0}resetBBoxNeedsUpdate(){this.resetBBoxNeedsUpdateSelf(),this.traverseAncestors(t=>{ct(t)&&t.resetBBoxNeedsUpdateSelf()}),this.traverseEntity(t=>{t.resetBBoxNeedsUpdateSelf()})}find(t){let e;return this.traverseEntity(i=>{i.uuid===t&&(e=i)}),e}traverseSortNextHelper(){let t=this.parent;if(t){let e=t.children,i=e.indexOf(this)+1;if(at.is(e[i]))return e[i];if(at.is(t))return t.traverseSortNextHelper()}}sortNext(){let t=this.children;return this.children.length>0&&at.is(this.children[0])?t[0]:this.traverseSortNextHelper()}goUp(t){let e=this;for(;t>0&&null!==e;)e=e.parent,t-=1;return e}hasAnccestorOrSelf(t){return this===t||this.hasAnccestor(t)}hasAnccestor(t){let e=this.parent;for(;e;){if(t===e)return!0;e=e.parent}return!1}countToAccestor(t){let e=0,i=this;for(;i!==t;){if(null===i)return-1;i=i.parent,e+=1}return e}forEachEntity(t){for(let e of this.children)ct(e)&&t(e)}traverseEntityAncestors(t){this.traverseAncestors(e=>{at.is(e)&&t(e)})}traverseConcreteEntity(t,e=0){if(!0!==t(this,e))for(let i of this.children)ct(i)&&i.isConcreteEntity&&i.traverseEntity(t,e+1)}traverseEntity(t,e=0){if(!0!==t(this,e))for(let i of this.children)ct(i)&&i.traverseEntity(t,e+1)}traverseVisibleEntity(t){t(this);for(let e of this.children)ct(e)&&e.visible&&e.traverseVisibleEntity(t)}updateMatrix(){super.updateMatrix(),this.cloner&&this.cloner.onObjUpdateMatrix(),this.dispatchEvent({type:"updateMatrix"})}updateMatrixWorld(t){super.updateMatrixWorld(t),this.dispatchEvent({type:"updateMatrixWorld"})}copy(t,e=!1){return super.copy(t,e),this.dataPatched=t.dataPatched,this.raycastLock=t.raycastLock,this.scaleLock=t.scaleLock,this}hasEntityChild(){return this.children.some(t=>ct(t))}isAncestorOf(t){if(this.uuid===t)return!1;let e=!1;return this.traverseEntity(i=>{i.uuid===t&&(e=!0)}),e}toObjectTransformState(e=[]){this.updateWorldMatrix(!0,!1);let i={position:this.position.toArray(),rotation:[this.rotation.x*u.RAD2DEG,this.rotation.y*u.RAD2DEG,this.rotation.z*u.RAD2DEG],scale:this.scale.toArray(),shear:s.fromMatrix(this.shearMatrix.toArray()),pivot:[0,0,0],pivotRotation:[0,0,0]};return t(i,e)}getTransformValues(t,e,i){return e[t].map((e,r)=>i?.shared.getVariable(e,[this.uuid,t,mt[r]])??e)}updateTransformState(t,e){let i=!1;if(t.position&&(this.position.fromArray(this.getTransformValues("position",t,e)),i=!0),t.rotation&&(ft.fromArray(this.getTransformValues("rotation",t,e)).multiplyScalar(u.DEG2RAD),this.rotation.setFromVector3(ft),i=!0),t.scale&&(this.scale.fromArray(this.getTransformValues("scale",t,e)),i=!0),t.shear&&(this.shearMatrix.fromArray(s.toMatrix(t.shear)),i=!0),void 0!==t.pivot||void 0!==t.pivotRotation)if(i=!0,void 0!==t.pivot&&void 0!==t.pivotRotation)this.pivotMatrix.compose(ft.fromArray(t.pivot).negate(),vt.setFromEuler(gt.fromArray(t.pivotRotation.map(t=>t*u.DEG2RAD))).invert(),yt);else if(void 0!==t.pivot)this.pivotMatrix.setPosition(-t.pivot[0],-t.pivot[1],-t.pivot[2]);else if(void 0!==t.pivotRotation){let e=ft.setFromMatrixPosition(this.pivotMatrix);vt.setFromEuler(gt.fromArray(t.pivotRotation.map(t=>t*u.DEG2RAD))).invert(),this.pivotMatrix.compose(e,vt,yt)}return i&&(this.updateMatrix(),this.resetBBoxNeedsUpdate(),this.invalidateClonerTransform(this),this.traverseEntityAncestors(t=>{t.invalidateClonerTransform(this)})),t.position&&t.rotation&&t.scale&&this.updateWorldMatrix(!1,!0),i}onVariableUpdate(t=!1){t?this.resetBBoxNeedsUpdate():(this.updateMatrix(),this.resetBBoxNeedsUpdate(),this.invalidateClonerTransform(this),this.traverseEntityAncestors(t=>{t.invalidateClonerTransform(this)}),this.requestRender())}dispose(){this.disposed=!0,this.cloner&&(this.cloner.dispose(),this.cloner=void 0)}disposeChildrenRecursively(){for(let t of this.children)at.is(t)&&t.disposeRecursively()}disposeRecursively(){this.dispose(),this.children.forEach(t=>{at.is(t)&&t.disposeRecursively()})}toState(e=[]){let i={name:this.name,visible:this.visible,raycastLock:this.raycastLock,...this.toObjectTransformState(e)};return t(i,e)}updateByObjUpdateOp(t,e){void 0!==t&&this.updateByOp({type:0,props:t,path:[]},{...this.data,...t},e,!1)}updateByOp(t,e,i,s){let o=this.data;this.data=e;let l=t,p=_(t.path,["states","*"]);if(null!==p){if(0===t.type){let[e]=p;if(this?.stateSelection===e){let e={...t.props};if(delete e.name,Object.values(t.props).some(t=>void 0===t)){let i=this.data;if(void 0!==i){let r=c.zoom(i,t.path.slice(2));if(r)for(let i in t.props)void 0===t.props[i]&&i in r&&(e[i]=r[i])}}l={...t,props:e,path:t.path.slice(2)}}}}else if(0===t.type){let e=this.stateSelection?this.data.states.data(this.stateSelection):void 0;if(void 0!==e){if(void 0!==t.props.name&&e.name){let{name:t,...i}=e;e=i}if(void 0!==t.props.material&&"material"in e){let{material:t,...i}=e;e=i}let i=c.removeOverridden(t.path,t.props,e);l={...t,props:i}}}if(this.updateByPatchedOpBase(l,n.patch(this.data,this.stateSelection?this.data.states.data(this.stateSelection):void 0),i),_(t.path,["overrides"])){let s=[],a=[...t.path];for(s.push(a[1]),a.splice(0,2);a.length>0&&"descendants"===a[0];)s.push(a[1]),a.splice(0,2);if(void 0===s[s.length-1]){if(0===t.type)for(let e of Object.keys(t.props)){s[s.length-1]=e;let r=i.scene.findInstance([this.uuid,...s]);r&&(r.overrideData=t.props[e],r.updateState(h.apply(r.component.data,r.overrideData),i))}}else{let n=i.scene.findInstance([this.uuid,...s]);if(n){let o=c.zoom(n.component.data,a);if(0===(t={...t,path:a}).type){let e=t.props;if(o)for(let[i,r]of Object.entries(t.props))void 0===r&&(e===t.props&&(e={...t.props}),e[i]=o[i]);t={...t,props:e}}n.overrideData=r.resolve(e.overrides,s),n.updateByOp(t,d.applySimple(n.data,t),i,!1)}}}else if(this.instances.length>0){let r;if(0===t.path.length&&0===t.type){let e;for(let i of a.rootOverrideProps)i in t.props&&(void 0===e&&(e={}),e[i]=t.props[i]);e&&(r={...t,props:e})}else for(let e of a.rootOverrideProps)if(_(t.path,[e])){r=t;break}void 0!==r&&this.instances.forEach(t=>{if(t.isInstanceRoot){let e=h.filterOp(t.overrideData,r);e&&t.updateByOp(e,d.applySimple(t.data,e),i,!0)}}),this.instances.forEach(r=>{if(!r.isInstanceRoot){let s=h.filterOp(r.overrideData,t);if(s){let a;a=o===r.data&&t===s?e:d.applySimple(r.data,s),r.updateByOp(s,a,i,!0)}}})}}updateByPatchedOpBase(t,e,i){if(this.dataPatched=e,0===t.path.length&&0===t.type)void 0!==t.props.type&&!o.is(t.props.type)&&C.changeEntityProptotype(this,e,i);else if(1===t.path.length&&"geometry"===t.path[0]&&0===t.type&&"type"in t.props){C.changeEntityProptotype(this,e,i);for(let t of this.children)at.is(t)&&t.updateVisible(i.scene)}this.updateByPatchedOp(t,e,i)}updateByPatchedOp(t,e,i){if(0===t.path.length&&0===t.type?this.updateState(t.props,i):0===t.type&&("resolutionLevel"in t.props||"useChildrenColors"in t.props)&&this.updateState(e,i),"morphTargetInfluences"===t.path[0]&&0===t.type){let r=e.morphTargetInfluences.get(t.path[1])?.data.name;r&&this.updateMorphInfluences(r,i.shared.getVariable(t.props.value,[this.uuid,"morphTargetInfluences",r]))}if(null!==_(t.path,["pathSnapping"])&&this.updatePathSnapping(e.pathSnapping),null!==_(t.path,["cloner"])){let r=d.drop(t,1);0===r.path.length&&0===r.type&&!0===r.props.disabled?this.setFromClonerState(null,i):this.cloner?this.cloner.updateState(e.cloner,i):(this.setFromClonerState(e.cloner,i),this.expandCloner(i)),this.updateVisible(i.scene)}}updatePathSnapping(t=this.dataPatched.pathSnapping){this._updatedPathSnapping=t,this._needApplyPathSnapping=!0}get updatedPathSnapping(){return this._updatedPathSnapping}applyPathSnapping(t){if(!1===this._needApplyPathSnapping)return;let e=this._updatedPathSnapping?.pathId??this.dataPatched.pathSnapping.pathId,i=this._updatedPathSnapping?.slide??this.dataPatched.pathSnapping.slide??0,r=this._updatedPathSnapping?.offset??this.dataPatched.pathSnapping.offset??0,s=this._updatedPathSnapping?.orientation??this.dataPatched.pathSnapping.orientation;if(null===e)return;let a=t.find(e);if(!a)return;this._needApplyPathSnapping=!1;let n=a.data;if(n.geometry.path.points.length<=1)return;let o=st(n.geometry.path),l=function(t){let e=t%1;return e<0?e+1:0===e&&t>0?1:e}(i+r),h=null;try{h=o.curves.length?o.getPointAt(l):null}catch(t){}if(null===h)return;a.updateMatrixWorld();let p=this.parent?xt.copy(this.parent.matrixWorld):xt.identity(),d=function(t,e,i,r){ot.setFromRotationMatrix(nt.extractRotation(r));let s=t.clone().applyMatrix4(nt.copy(r).invert().multiply(i));if(null===e)lt.setFromRotationMatrix(nt.extractRotation(i));else{let t=e.clone().applyMatrix4(nt.extractRotation(i));lt.setFromRotationMatrix(nt.lookAt(pt.set(0,0,0),t,dt))}return{position:s,rotation:(new f).setFromEuler(ht.setFromQuaternion(ot.invert().multiply(lt))).multiplyScalar(u.RAD2DEG)}}(h,"tangential"===s?o.getTangentAt(l):null,a.matrixWorld,p);this.updateTransformState({position:d.position.toArray(),rotation:d.rotation.toArray()}),this.traverseEntity(t=>{t._cameraType&&t.dispatchEvent(ut)})}updateVisible(t){if(this.visible=this.dataPatched.visible&&(!this.dataPatched.cloner||(this.dataPatched.cloner.disabled??!1)||!0!==this.dataPatched.cloner?.hideBase),!t)return;let e=!1;this.traverseEntity(t=>{if("Splat"===t.data.type)return e=!0,!0}),e&&t.reloadSplats()}updateState_Entity(t,e){void 0!==t.name&&(this.name=t.name),void 0!==t.raycastLock&&(this.raycastLock=t.raycastLock),void 0!==t.visible&&(this.updateVisible(e?.scene),this.resetBBoxNeedsUpdate()),e&&"cloner"in t&&void 0!==t.cloner&&(this.setFromClonerState(t.cloner,e),this.updateVisible(e.scene)),this.updateTransformState(t,e)}get attachedSurfaceCloners(){return this.children.filter(t=>e(t)&&"toObject"===t.parameters.type)}setFromClonerState(t,e){if(!this.disposed)if(null===t||t.disabled)this.cloner&&this.cloner.dispose(),this.cloner=void 0;else if(void 0===this.cloner){if(null===C.Cloner)return void i("cloners","a cloner");this.cloner=new C.Cloner(this,t),e.scene.addPendingExpandCloner(this)}else this.cloner.updateState(t,e)}expandCloner(t){!this.disposed&&this.cloner&&this.cloner.expandClones(t)}invalidateClonerTransform(t){this.cloner&&this.cloner.invalidateTransform(t)}requestRender(){this.dispatchEvent({type:"requestRender"})}},wt=class{static create(t){return this.build(this.normalizeInputs(t))}static normalizeInputs(t,e){let i=Object.assign({},e?.parameters??{width:100,revolutions:2,segments:40,pathRadius:10,pathType:0,pathSegments:30,cornerRadius:30,cornerSegments:4},t.parameters),r=Math.abs(i.width),s=Math.abs(i.height??r),a=Math.abs(i.depth??r),n=Math.abs(Math.min(r,a))/2;return{parameters:Object.assign(i,{width:r,height:s,depth:a,radius:n,segments:Math.round(i.segments),pathSegments:Math.round(i.pathSegments),cornerSegments:Math.round(i.cornerSegments)})}}static build(t){let{width:e,height:i,depth:r,radius:s,revolutions:a,segments:n,pathRadius:o,pathType:l,pathSegments:h,cornerRadius:p,cornerSegments:d}=t.parameters,c=new Et(!1,e,i,r,s,a,n,o,l,h,p,d);return Object.assign(c,{userData:{...t,type:"HelixGeometry"}})}},Mt=new b([0,0,0],1);function bt(t){return"TorusGeometry"===t.type&&360===t.arc}var Bt,Pt,Et=class extends E{constructor(t=!0,e=1,i=1,r=1,s=1,a=1,n=1,o=1,l=1,h=1,p=1,d=1){if(super(),0===a)return;let c=t&&1===a;c&&(d=0),p>100&&(p=100),0===p&&(d=0);let u,m,y,v,g,x,S,w,M=()=>new f,b=new f,P=M(),E=M(),A=M(),D=M(),C=M(),O=M(),_=M(),R=M(),T=M(),W=M(),V=M(),U=i-2*o+.001,L=U/a,I=Math.ceil(n*a),z=I+1,F=U/I,j=-U/2,N=h+1,k=2*Math.PI/h,G=Math.PI/2/d,H=Math.min((1-p/100)*o,o-.01),q=o-H,Z=0,K=2*d+2,Q=N*K/2,J=Q+N*z,X=Math.max(0,N*(z+K)),[Y,$,tt]=[3,3,2].map(t=>Array(X*t).fill(0)),et=[],it=s-o;function rt(e,i){let r=Math.PI/2;x=i*F,w=2*Math.PI*(x%L)/L+r,x+=j,S=Math.sin(w)*it,g=Math.cos(w)*it,t?e.set(g,S,x):e.set(g,x,S)}rt(b,-1e-10),rt(P,0),D.copy(b),rt(b,1);let st=b.distanceTo(P),at=c?0:q+H,nt=st*I+2*at,ot=H,lt=nt-at;for(let e=0;e<=I;e++){rt(E,e),V.subVectors(E,D).normalize(),D.copy(E),T.copy(E).setComponent(+t+1,0).normalize(),W.crossVectors(V,T).normalize();let i=0===e,r=e===I,s=i?3*Math.PI/2:G,a=i?ot:lt,n=i?N:J,l=i?0:X-N,p=V.clone().multiplyScalar(i?-q:q).add(E),u=V.clone().multiplyScalar(i?-1:1).normalize();for(let t=0;t<N;t++){let m=t*k;if(C.addVectors(b.copy(T).multiplyScalar(o*Math.cos(m)),P.copy(W).multiplyScalar(o*Math.sin(m))),O.copy(C).normalize(),i||r){c||(Z=l+t,[0,1,2].forEach(t=>{Y[3*Z+t]=p.getComponent(t),$[3*Z+t]=u.getComponent(t)}),tt[2*Z]=+r,tt[2*Z+1]=t/h),P.copy(O).multiplyScalar(H),A.addVectors(E,P);for(let e=0;e<d;e++){let r=e*G+s;_.addVectors(b.copy(V).multiplyScalar(q*Math.sin(r)),P.copy(O).multiplyScalar(q*Math.cos(r))),R.copy(_).normalize(),P.addVectors(A,_),_.normalize(),Z=n+e*N+t,[0,1,2].forEach(t=>{Y[3*Z+t]=P.getComponent(t),$[3*Z+t]=R.getComponent(t)});let o=+i+Math.sin(r);tt[2*Z]=(a+q*o)/nt,tt[2*Z+1]=t/h}}P.addVectors(E,C),Z=Q+e*N+t,[0,1,2].forEach(t=>{Y[3*Z+t]=P.getComponent(t),$[3*Z+t]=O.getComponent(t)}),tt[2*Z]=(at+e*st)/nt,tt[2*Z+1]=t/h}}let ht=z+2*d+2,[pt,dt]=[+c,ht-1];for(let t=pt;t<=dt-1;t++){let e=c&&t===dt-1;for(let i=0;i<N-1;i++)u=t*N+i,m=u+1,y=(e?i:u)+N,v=(e?i+1:m)+N,0===t?et.push(m,v,y):t===ht-2?et.push(u,m,y):et.push(u,m,y,m,v,y)}this.setIndex(et),this.setAttribute("position",new B(Y,3)),this.setAttribute("normal",new B($,3)),this.setAttribute("uv",new B(tt,2))}getClosedTorusIndicesForBooleanOrSubdiv(){let t,e,i,r,s=this.userData.parameters,a=Math.ceil(s.tubularSegments),n=s.radialSegments,o=n+1,l=[];for(let s=1;s<a;s++)for(let a=0;a<n;a++)t=s*o+a,e=t+1,i=t+o,r=e+o,l.push(t,e,i,e,r,i);for(let s=0;s<n;s++)t=a*o+s,e=t+1,i=s+o,r=s+1+o,l.push(t,e,i,e,r,i);return Mt.array=new Uint32Array(l),Mt.count=l.length,Mt}},At=new Map,Dt=0;function Ct(t){return Pt||(Pt=async function(){let e=t??"https://cdn.spline.design/@splinetool/runtime@2.0.98/build",i=import("./boolean.js"),[r,s]=await Promise.all([i,fetch(`${e}/boolean.wasm`).then(t=>t.arrayBuffer())]);await r.default({module_or_path:s}),Bt=r}())}function Ot(){if(void 0===Bt)throw new Error("boolean-wasm is not loaded");return Bt}function _t(t){let e=At.get(t);if(void 0===e)throw new Error("Unknown csg mesh set handle "+t);return e}function Rt(t){return At.set(++Dt,t),Dt}var Tt={0:0,1:1,2:2};function Wt(t,e,i){if(void 0===Bt)return-1;let{positions:r,indices:s,normals:a}=function(t,e){if(e&&void 0!==t.userData.positions){let e=t.userData,i=[];for(let t=0,r=0;t<e.verticesPerFace.length;t++){let s=e.verticesPerFace[t];for(let t=1;t<s-1;t++)i.push(e.indices[r],e.indices[r+t],e.indices[r+t+1]);r+=s}return{positions:e.positions instanceof Float32Array?e.positions:new Float32Array(e.positions),indices:new Uint32Array(i)}}let i;i=bt(t.userData.parameters)?t.getClosedTorusIndicesForBooleanOrSubdiv():t.getIndex();let r,s=t.getAttribute("position");if(null===i){r=new Uint32Array(s.count);for(let t=0;t<r.length;t++)r[t]=t}else r=i.array instanceof Uint32Array?i.array:new Uint32Array(i.array);let a=t.getAttribute("normal"),n=void 0!==a&&3===a.itemSize&&a.count===s.count&&a.array instanceof Float32Array&&!0!==a.isInterleavedBufferAttribute?a.array:void 0;return{positions:s.array,indices:r,normals:n}}(t,e);return Rt(new Bt.CsgMesh(r,s,a))}function Vt(t,e){let i=Ot(),r=Tt[e];if(void 0===r)throw new Error("Unknown boolean operation "+e);let s=t.map(_t);if(1===s.length)return i.clone_mesh(s[0]);let a,n=[];if(2===e&&s.length>2){let t=s[0];for(let e=1;e<s.length-1;e++)t=i.boolean_mesh(t,s[e],0),n.push(t);a=i.boolean_mesh(s[s.length-1],t,2)}else if(2===e)a=i.boolean_mesh(s[1],s[0],2);else{let t=s[s.length-1];for(let e=0;e<s.length-1&&(t=i.boolean_mesh(t,s[e],r),n.push(t),0!==t.tri_count());e++);a=t,n.pop()}for(let t of n)t.free();return a}function Ut(t,e,i,r){let s=Ot(),a=Vt(t,e),n=s.mesh_render_data(a,Math.max(r,0));if(i.setAttribute("position",new B(n.positions(),3)),i.setAttribute("normal",new B(n.normals(),3)),n.free(),null===i.boundingSphere&&(i.boundingSphere=new P),0===a.tri_count())i.boundingSphere.center.set(0,0,0),i.boundingSphere.radius=0,i.userData.parameters={width:0,height:0,depth:0};else{let t=a.bounds();i.boundingSphere.center.set(t[0],t[1],t[2]),i.boundingSphere.radius=(t[3]**2+t[4]**2+t[5]**2)**.5,i.userData.parameters={width:2*t[3],height:2*t[4],depth:2*t[5]}}return Rt(a)}function Lt(t,e){let i=Ot(),r=Vt(t,e),s=i.mesh_topological_data(r),a=s.positions(),n=s.indices();return s.free(),r.free(),{positions:a,indices:n,verticesPerFace:new Uint8Array(n.length/3).fill(3)}}function It(t,e){_t(t).transform(new Float32Array(e.elements))}function zt(t){let e=At.get(t);void 0!==e&&(e.free(),At.delete(t))}function Ft(t,e){return Rt(Ot().instanced_union(_t(t),e))}function jt(t){return null!==t&&"booleanOp"in t}var Nt=class extends(St(D)){constructor(){super(...arguments),this.booleanMeshSetAddress=-1,this.booleanWasTransformed=!1,this.booleanMatrixInvOld=new v}updateVisible(t){super.updateVisible(t),this.visible=!jt(this.parent)&&this.visible,jt(this.parent)&&this.parent.invalidateDownstreamBooleanData()}onClonerLayoutUpdated(){jt(this.parent)&&this.invalidateDownstreamBooleanData()}freeBooleanPointer(){-1!==this.booleanMeshSetAddress&&(zt(this.booleanMeshSetAddress),this.booleanMeshSetAddress=-1)}invalidateDownstreamBooleanData(t=!1){return t?this.booleanWasTransformed=!0:this.freeBooleanPointer(),jt(this.parent)?this.parent.invalidateDownstreamBooleanData():this}invalidateUpstreamBooleanData(){this.freeBooleanPointer();for(let t of this.children)t instanceof Nt&&(t.freeBooleanPointer(),jt(t)&&t.invalidateUpstreamBooleanData())}updateTransformState(t,e){let i=super.updateTransformState(t,e);return i&&jt(this.parent)&&this.invalidateDownstreamBooleanData(!0),i}onVariableUpdate(t=!1){super.onVariableUpdate(t),jt(this.parent)&&this.invalidateDownstreamBooleanData(!0)}},kt=new M;function Gt(t,e=0,i=t.count,r,s){let a=1/0,n=1/0,o=1/0,l=-1/0,h=-1/0,p=-1/0;for(let r=e;r<i;r++){let e=t.getX(r),i=t.getY(r),s=t.getZ(r);e<a&&(a=e),i<n&&(n=i),s<o&&(o=s),e>l&&(l=e),i>h&&(h=i),s>p&&(p=s)}kt.min.set(a,n,o),kt.max.set(l,h,p),kt.getCenter(r),kt.getSize(s).multiplyScalar(.5)}var Ht=new E,qt=new A,Zt=class extends Nt{constructor(t,e){super(Ht,qt),this.super_Entity(t,e)}updateState(t,e){this.updateState_Entity(t,e)}raycast(t,e){if(this.raycastDeformed(t,e))return;super.raycast(t,e)}raycastDeformed(t,e){return!1}updateEntityBoxSize(t,e){let i=this.geometry.getAttribute("position");void 0!==i?Gt(i,this.geometry.drawRange.start,this.geometry.drawRange.count<1/0?this.geometry.drawRange.count:i.count,t,e):super.updateEntityBoxSize(t,e)}};export{O as a,_ as b,C as c,j as d,N as e,G as f,st as g,at as h,ct as i,St as j,wt as k,bt as l,Et as m,Ct as n,Wt as o,Ut as p,Lt as q,It as r,zt as s,Ft as t,Gt as u,Zt as v};
|
|
1
|
+
import{f as t}from"./runtime-chunk-RTLL6WIB.js";import{h as e}from"./runtime-chunk-2PT2WH66.js";import{c as i}from"./runtime-chunk-TZCHGFVF.js";import{Ba as r,C as s,Ca as a,Ea as n,J as o,Pa as l,i as h,j as p,k as d,n as c}from"./runtime-chunk-H3ODKGZ7.js";import{Ec as u,Gc as m,Hc as f,Md as y,Qc as v,Rc as g,Rd as x,Tc as S,Te as w,Zc as M,bd as b,dd as B,ed as P,fd as E,md as A,nd as D}from"./runtime-chunk-KPOUV3HD.js";var C={Cloner:null,changeEntityProptotype:()=>{},createEntity:()=>{}};function O(t,e){let i=[];if(e.length!==t.length)return null;{let r=0;for(;r<t.length;){if("*"===e[r])i.push(t[r]);else if(t[r]!==e[r])return null;r+=1}}return i}function _(t,e){let i=[];if(!(e.length<=t.length))return null;{let r=0;for(;r<e.length;){if("*"===e[r])i.push(t[r]);else if(t[r]!==e[r])return null;r+=1}}return i}var R=new f,T=new f,W=new v,V=[new f(-1,1,1),new f(-1,-1,1),new f(1,-1,1),new f(1,1,1),new f(-1,1,-1),new f(-1,-1,-1),new f(1,-1,-1),new f(1,1,-1)],U=[[0,3],[1,2],[5,6],[4,7],[0,1],[3,2],[7,6],[4,5],[0,4],[1,5],[2,6],[3,7]],L=[[0,2],[7,5],[4,1],[3,6],[4,3],[1,6]],I=(t,e,i)=>{t.updateEntityBoxSize(R,T),W.copy(e).multiply(t.matrixWorld),0===T.x&&0===T.y&&0===T.z?i.push(new f(R.x,R.y,R.z).applyMatrix4(W)):V.forEach(t=>{i.push(t.clone().multiply(T).add(R).applyMatrix4(W))})},z=class extends M{constructor(){super(...arguments),this.matrix=new v,this.vertices=[],this.faces=[],this.edges=[],this.centerEdges=[]}copy(t){return super.copy(t),this.matrix.copy(t.matrix),this.vertices=t.vertices.map(t=>t.clone()),this.faces=t.faces.map(t=>t.clone()),this.edges=t.edges.map(t=>t.clone()),this.centerEdges=t.centerEdges.map(t=>t.clone()),this}setFromObjectSize(t,e=!1){t.updateWorldMatrix(!1,e),this.makeEmpty(),this.matrix.copy(t.matrixWorld);let i=(new v).copy(t.matrixWorld).invert();return this.expandByObjectSize(t,i,e)}expandByObjectSize(t,e,i=!1){let r=[];if(!0===i){let i=[];t.traverseEntity(t=>{if(t.visible||t.cloner&&t.data.visible){if(!("geometry"in t))return W.copy(e).multiply(t.matrixWorld),void i.push((new f).applyMatrix4(W));I(t,e,r)}}),0===r.length&&r.push(...i)}else I(t,e,r);return this.setFromPoints(r)}getCenter(t){return(t=super.getCenter(t)).applyMatrix4(this.matrix),t}getPositionToCenter(t){return(t=super.getCenter(t)).applyMatrix4(W.copy(this.matrix).setPosition(0,0,0)),t}computeVertices(){this.getSize(T).multiplyScalar(.5),this.getCenter(R),W.copy(this.matrix).setPosition(R),this.vertices=V.map(t=>t.clone().multiply(T).applyMatrix4(W))}computeEdges(){this.vertices.length>0&&this.computeVertices(),this.edges=U.map(([t,e])=>new w(this.vertices[t],this.vertices[e])),this.centerEdges=this.edges.map(t=>t.getCenter(new f))}computeFaces(){this.vertices.length>0&&this.computeVertices(),this.faces=L.map(([t,e])=>this.vertices[t].clone().add(this.vertices[e]).multiplyScalar(.5))}},F=new f(1,1,1);function j(t,e,i,r,s=new v){return s.compose(t,e,F).multiply(i).scale(r)}var N,k=new v;(N||(N={})).is=function(t){return t&&t.__isSPEObject};var G=t=>class extends t{constructor(){super(...arguments),this.previousModelViewMatrix=new v,this.copyPreviousMatrix=!0,this.pivotMatrix=new v,this.matrixWorldRigid=new v,this.shearScale=new v,this.shearScaleInv=new v,this.shearMatrix=new v}get __isSPEObject(){return!0}getPhysicsLocalMatrix(t){return!!this.rigidBody?.isDynamic()&&(t.copy(this.matrixWorld),this.hasNonUniformScale&&t.multiply(this.shearScaleInv),this.parent&&t.premultiply(k.copy(this.parent.matrixWorld).invert()),t.multiply(k.copy(this.pivotMatrix).invert()),!0)}isDescendantOf(t){t instanceof S&&(t=t.uuid);let e=this;for(;e.parent;){if(e.parent.uuid===t)return!0;e=e.parent}return!1}updateMatrix(){!this.shearMatrix||(j(this.position,this.quaternion,this.shearMatrix,this.scale,this.matrix),this.matrixWorldNeedsUpdate=!0)}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorld.multiply(this.pivotMatrix),this.matrixWorldNeedsUpdate=!1,t=!0);for(let e of this.children)e.updateMatrixWorld(t)}updateWorldMatrix(t,e){let i=this.parent;if(t&&null!==i&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorld.multiply(this.pivotMatrix),e)for(let t of this.children)t.updateWorldMatrix(!1,!0)}traverseChildren(t,e=0){for(let i of this.children)N.is(i)&&i.traverseObject(t,e+1)}traverseObject(t,e=0){if(!0!==t(this,e))for(let i of this.children)N.is(i)&&i.traverseObject(t,e+1)}updateMatrixWorldRigid(){this.hasNonUniformScale=l(this.matrixWorld,this.matrixWorldRigid,this.shearScale),this.matrixWorldRigid.copyPosition(this.matrixWorld),this.shearScaleInv.copy(this.shearScale).invert()}attach(t,e){this.updateWorldMatrix(!0,!1);let i=(new v).copy(this.matrixWorld).invert();return null!==t.parent&&(t.parent.updateWorldMatrix(!0,!1),i.multiply(t.parent.matrixWorld)),t.applyMatrix4(i),t.updateWorldMatrix(!1,!1),this.add(t),void 0!==e&&(this.children.pop(),this.children.splice(e,0,t)),this}copy(t,e=!1){return super.copy(t,e),this}onAfterRender(t,e,i,r,s,a){this.copyPreviousMatrix&&this.previousModelViewMatrix.copy(this.modelViewMatrix)}},H=class extends x{constructor(){super()}getPoints(t=12){let e,i=[],r=this.getCurveLengths(),s=r[r.length-1]/r.length;for(let a=0,n=this.curves;a<n.length;a++){let o=n[a],l=0===a?r[a]:r[a]-r[a-1],h=Math.ceil(t*l/s),p=o.getPoints(h);for(let t=0;t<p.length;t++){let r=p[t];e&&e.equals(r)||(i.push(r),e=r)}}return this.autoClose&&i.length>1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i}},q=.001,Z=new f,K=new f,Q=new f,J=new f,X=new f,Y=new f,$=new f,tt=new f,et=new f;function it(t,e,i){return Z.subVectors(e,t),K.subVectors(e,i),Z.cross(K).length()<=q}var rt=new WeakMap;function st(t){let e=rt.get(t.points);if(void 0!==e&&e.isClosed===t.isClosed)return e.curve;let i=function(t){let e=t.points,i=[e[0]],r=[new f(...e[0].data.position)];Q.copy(r[0]);for(let t=0;t<e.length-1;t++)Z.fromArray(e[t].data.position),K.fromArray(e[t+1].data.position),X.subVectors(Z,Q),$.subVectors(Z,K),X.cross($).length()>q&&(i.push(e[t]),r.push((new f).copy(Z)),Q.copy(Z));let s=e[e.length-1];i.push(s),r.push(new f(...s.data.position));let a=t.isClosed,n=i.length-(a?0:1),o=i.length,l=[],h=[];for(let t=0;t<o;t++){let e=i[t].data;l.push(new f(...e.controlPrevious.position)),h.push(new f(...e.controlNext.position))}let p=[];for(let t=0;t<n;t++){let e=t===o-1?0:t+1;p.push(it(r[t],h[t],r[e])&&it(r[t],l[e],r[e]))}let d=[];for(let t=0;t<o;t++){let e=i[t].data,s=r[t],n={position:s,prevDir:void 0,nextDir:void 0,controlPrevious:l[t],controlNext:h[t],tan:void 0,baseRoundness:e.roundness,removedLength:0};if(d.push(n),0===e.roundness||!a&&(0===t||t===o-1))continue;let c=a&&0==t?o-1:t-1,u=a&&t==o-1?0:t+1,m=(new f).subVectors(r[c],s).normalize(),y=(new f).subVectors(r[u],s).normalize();n.prevDir=m,n.nextDir=y;let v=p[a&&0===t?o-1:t-1],g=p[t];if(v&&g){J.addVectors(m,y).normalize();let t=Q.crossVectors(J,m).length()/m.dot(J);n.tan=t,n.removedLength=e.roundness/t}}for(let t=0;t<n;t++){let e=a&&t===o-1?0:t+1,i=d[t],r=d[e];if(0!==i.removedLength||0!==r.removedLength){let t=i.position.distanceTo(r.position);i.removedLength=Math.min(i.removedLength,t/2),r.removedLength=Math.min(r.removedLength,t/2)}}let c=new Array(2*o).fill(null);for(let t=0;t<n;t++){let e=a&&t===o-1?0:t+1,i=d[t],r=d[e],s=null;if(p[t]){let t=i.position.clone(),e=r.position.clone();(0!==i.removedLength||0!==r.removedLength)&&(i.nextDir&&t.add(Q.copy(i.nextDir).setLength(i.removedLength)),r.prevDir&&e.add(Q.copy(r.prevDir).setLength(r.removedLength))),t.distanceTo(e)>q&&(s=new y(t,t.clone().lerp(e,.3),e.clone().lerp(t,.3),e))}else i.position.distanceTo(r.position)>q&&(s=new y(i.position,i.controlNext,r.controlPrevious,r.position));c[2*t+1]=s}for(let t=0;t<o;t++){let e=d[t];if(0===e.removedLength)continue;let i=e.position,r=e.prevDir.clone().multiplyScalar(e.removedLength).add(i),s=e.nextDir.clone().multiplyScalar(e.removedLength).add(i),a=e.tan*e.removedLength;J.addVectors(e.prevDir,e.nextDir).normalize(),X.copy(r).lerp(s,.5);let n=r.distanceTo(s)/2;et.copy(J).multiplyScalar(Math.sqrt(Math.pow(a,2)-Math.pow(n,2))).add(X),Y.copy(J).multiplyScalar(-a).add(et);let o=i.distanceTo(Y)/i.distanceTo(X);$.copy(e.prevDir).multiplyScalar(o*i.distanceTo(r)).add(i),tt.copy($).lerp(Y,2);let l=r.clone().lerp($,4/3),h=s.clone().lerp(tt,4/3);c[2*t]=new y(r,l,h,s)}let u=new H;for(let t=0;t<c.length;t++){let e=c[t];e&&u.add(e)}return u}(t);return rt.set(t.points,{isClosed:t.isClosed,curve:i}),i}var at,nt=new v,ot=new m,lt=new m,ht=new g,pt=new f,dt=new f(0,1,0);(at||(at={})).is=function(t){return t&&t.__isEntity};var ct=t=>at.is(t),ut={type:"completeState",isfromEntity:!0},mt=["x","y","z"],ft=new f,yt=new f(1,1,1),vt=new m,gt=new g,xt=new v,St=l=>class extends(G(l)){constructor(){super(...arguments),this.raycastLock=!1,this.scaleLock=!1,this.disposed=!1,this.stateSelection=null,this.destroyedInAction=!1,this.instances=[],this.prevState=null,this.currentState=null,this.currentAnimationAction=null,this.reversibleToState=null,this.transitionState={settled:!0,state:null},this.currentTransitionEvent=null,this.previousAction=null,this._singleBBox=new z,this._recursiveBBox=new z,this.singleBBoxNeedsUpdate=!0,this.recursiveBBoxNeedsUpdate=!0,this._needApplyPathSnapping=!0,this.attachedPaths=new Set}get __isEntity(){return!0}entityChildren(t){let e=this.children[t];if(at.is(e))return e}entityChildrenCount(){let t=this.children.length;for(;t--;)if(at.is(this.children[t]))return t+1;return 0}get isConcreteEntity(){return"string"==typeof this.identity}get isVirtualEntity(){return"string"!=typeof this.identity}get isInstanceRoot(){return this.isConcreteEntity&&"Instance"===this.data.type}nearestInstanceSelfOrParent(){let t=this;for(;"Instance"!==t.data.type;){let e=t.parent;if(!at.is(e))return;t=e}return t}forInstancesRec(t){this.instances.forEach(e=>{e.disposed||t(e),e.forInstancesRec(t)})}super_Entity(t,e){"string"==typeof t&&(this.uuid=t),this.identity=t,this.data=e,this.matrixAutoUpdate=!1,this.dataPatched=this.data}changeSelectedState(t,e,i=!1){if(0!==this.data.states.length||i){for(let t of this.data.states)n.toOps(this.data,t.data).forEach(t=>{let i=p.replaceProps(t,this.data);this.dataPatched=this.data,this.updateByPatchedOp(i,this.data,e)});if(null!==t){let i=this.data.states.data(t);i&&(this.dataPatched=n.patch(this.data,i),n.toOps(this.data,i).forEach(t=>{this.updateByPatchedOp(t,this.dataPatched,e)}))}i&&this.updateTransformState(this.dataPatched,e),this.stateSelection=t,this.updatePathSnapping(this.dataPatched.pathSnapping)}}get singleBBox(){return this.singleBBoxNeedsUpdate&&(this.singleBBoxNeedsUpdate=!1,this._singleBBox.setFromObjectSize(this,!1),this._singleBBox.computeVertices(),this._singleBBox.computeEdges(),this._singleBBox.computeFaces()),this._singleBBox}get recursiveBBox(){return this.recursiveBBoxNeedsUpdate&&(this.recursiveBBoxNeedsUpdate=!1,this._recursiveBBox.setFromObjectSize(this,!0),this._recursiveBBox.computeVertices(),this._recursiveBBox.computeEdges(),this._recursiveBBox.computeFaces()),this._recursiveBBox}updateEntityBoxSize(t,e){t.setScalar(0),e.setScalar(0)}resetBBoxNeedsUpdateSelf(){this.singleBBoxNeedsUpdate=!0,this.recursiveBBoxNeedsUpdate=!0}resetBBoxNeedsUpdate(){this.resetBBoxNeedsUpdateSelf(),this.traverseAncestors(t=>{ct(t)&&t.resetBBoxNeedsUpdateSelf()}),this.traverseEntity(t=>{t.resetBBoxNeedsUpdateSelf()})}find(t){let e;return this.traverseEntity(i=>{i.uuid===t&&(e=i)}),e}traverseSortNextHelper(){let t=this.parent;if(t){let e=t.children,i=e.indexOf(this)+1;if(at.is(e[i]))return e[i];if(at.is(t))return t.traverseSortNextHelper()}}sortNext(){let t=this.children;return this.children.length>0&&at.is(this.children[0])?t[0]:this.traverseSortNextHelper()}goUp(t){let e=this;for(;t>0&&null!==e;)e=e.parent,t-=1;return e}hasAnccestorOrSelf(t){return this===t||this.hasAnccestor(t)}hasAnccestor(t){let e=this.parent;for(;e;){if(t===e)return!0;e=e.parent}return!1}countToAccestor(t){let e=0,i=this;for(;i!==t;){if(null===i)return-1;i=i.parent,e+=1}return e}forEachEntity(t){for(let e of this.children)ct(e)&&t(e)}traverseEntityAncestors(t){this.traverseAncestors(e=>{at.is(e)&&t(e)})}traverseConcreteEntity(t,e=0){if(!0!==t(this,e))for(let i of this.children)ct(i)&&i.isConcreteEntity&&i.traverseEntity(t,e+1)}traverseEntity(t,e=0){if(!0!==t(this,e))for(let i of this.children)ct(i)&&i.traverseEntity(t,e+1)}traverseVisibleEntity(t){t(this);for(let e of this.children)ct(e)&&e.visible&&e.traverseVisibleEntity(t)}updateMatrix(){super.updateMatrix(),this.cloner&&this.cloner.onObjUpdateMatrix(),this.dispatchEvent({type:"updateMatrix"})}updateMatrixWorld(t){super.updateMatrixWorld(t),this.dispatchEvent({type:"updateMatrixWorld"})}copy(t,e=!1){return super.copy(t,e),this.dataPatched=t.dataPatched,this.raycastLock=t.raycastLock,this.scaleLock=t.scaleLock,this}hasEntityChild(){return this.children.some(t=>ct(t))}isAncestorOf(t){if(this.uuid===t)return!1;let e=!1;return this.traverseEntity(i=>{i.uuid===t&&(e=!0)}),e}toObjectTransformState(e=[]){this.updateWorldMatrix(!0,!1);let i={position:this.position.toArray(),rotation:[this.rotation.x*u.RAD2DEG,this.rotation.y*u.RAD2DEG,this.rotation.z*u.RAD2DEG],scale:this.scale.toArray(),shear:s.fromMatrix(this.shearMatrix.toArray()),pivot:[0,0,0],pivotRotation:[0,0,0]};return t(i,e)}getTransformValues(t,e,i){return e[t].map((e,r)=>i?.shared.getVariable(e,[this.uuid,t,mt[r]])??e)}updateTransformState(t,e){let i=!1;if(t.position&&(this.position.fromArray(this.getTransformValues("position",t,e)),i=!0),t.rotation&&(ft.fromArray(this.getTransformValues("rotation",t,e)).multiplyScalar(u.DEG2RAD),this.rotation.setFromVector3(ft),i=!0),t.scale&&(this.scale.fromArray(this.getTransformValues("scale",t,e)),i=!0),t.shear&&(this.shearMatrix.fromArray(s.toMatrix(t.shear)),i=!0),void 0!==t.pivot||void 0!==t.pivotRotation)if(i=!0,void 0!==t.pivot&&void 0!==t.pivotRotation)this.pivotMatrix.compose(ft.fromArray(t.pivot).negate(),vt.setFromEuler(gt.fromArray(t.pivotRotation.map(t=>t*u.DEG2RAD))).invert(),yt);else if(void 0!==t.pivot)this.pivotMatrix.setPosition(-t.pivot[0],-t.pivot[1],-t.pivot[2]);else if(void 0!==t.pivotRotation){let e=ft.setFromMatrixPosition(this.pivotMatrix);vt.setFromEuler(gt.fromArray(t.pivotRotation.map(t=>t*u.DEG2RAD))).invert(),this.pivotMatrix.compose(e,vt,yt)}return i&&(this.updateMatrix(),this.resetBBoxNeedsUpdate(),this.invalidateClonerTransform(this),this.traverseEntityAncestors(t=>{t.invalidateClonerTransform(this)})),t.position&&t.rotation&&t.scale&&this.updateWorldMatrix(!1,!0),i}onVariableUpdate(t=!1){t?this.resetBBoxNeedsUpdate():(this.updateMatrix(),this.resetBBoxNeedsUpdate(),this.invalidateClonerTransform(this),this.traverseEntityAncestors(t=>{t.invalidateClonerTransform(this)}),this.requestRender())}dispose(){this.disposed=!0,this.cloner&&(this.cloner.dispose(),this.cloner=void 0)}disposeChildrenRecursively(){for(let t of this.children)at.is(t)&&t.disposeRecursively()}disposeRecursively(){this.dispose(),this.children.forEach(t=>{at.is(t)&&t.disposeRecursively()})}toState(e=[]){let i={name:this.name,visible:this.visible,raycastLock:this.raycastLock,...this.toObjectTransformState(e)};return t(i,e)}updateByObjUpdateOp(t,e){void 0!==t&&this.updateByOp({type:0,props:t,path:[]},{...this.data,...t},e,!1)}updateByOp(t,e,i,s){let o=this.data;this.data=e;let l=t,p=_(t.path,["states","*"]);if(null!==p){if(0===t.type){let[e]=p;if(this?.stateSelection===e){let e={...t.props};if(delete e.name,Object.values(t.props).some(t=>void 0===t)){let i=this.data;if(void 0!==i){let r=c.zoom(i,t.path.slice(2));if(r)for(let i in t.props)void 0===t.props[i]&&i in r&&(e[i]=r[i])}}l={...t,props:e,path:t.path.slice(2)}}}}else if(0===t.type){let e=this.stateSelection?this.data.states.data(this.stateSelection):void 0;if(void 0!==e){if(void 0!==t.props.name&&e.name){let{name:t,...i}=e;e=i}if(void 0!==t.props.material&&"material"in e){let{material:t,...i}=e;e=i}let i=c.removeOverridden(t.path,t.props,e);l={...t,props:i}}}if(this.updateByPatchedOpBase(l,n.patch(this.data,this.stateSelection?this.data.states.data(this.stateSelection):void 0),i),_(t.path,["overrides"])){let s=[],a=[...t.path];for(s.push(a[1]),a.splice(0,2);a.length>0&&"descendants"===a[0];)s.push(a[1]),a.splice(0,2);if(void 0===s[s.length-1]){if(0===t.type)for(let e of Object.keys(t.props)){s[s.length-1]=e;let r=i.scene.findInstance([this.uuid,...s]);r&&(r.overrideData=t.props[e],r.updateState(h.apply(r.component.data,r.overrideData),i))}}else{let n=i.scene.findInstance([this.uuid,...s]);if(n){let o=c.zoom(n.component.data,a);if(0===(t={...t,path:a}).type){let e=t.props;if(o)for(let[i,r]of Object.entries(t.props))void 0===r&&(e===t.props&&(e={...t.props}),e[i]=o[i]);t={...t,props:e}}n.overrideData=r.resolve(e.overrides,s),n.updateByOp(t,d.applySimple(n.data,t),i,!1)}}}else if(this.instances.length>0){let r;if(0===t.path.length&&0===t.type){let e;for(let i of a.rootOverrideProps)i in t.props&&(void 0===e&&(e={}),e[i]=t.props[i]);e&&(r={...t,props:e})}else for(let e of a.rootOverrideProps)if(_(t.path,[e])){r=t;break}void 0!==r&&this.instances.forEach(t=>{if(t.isInstanceRoot){let e=h.filterOp(t.overrideData,r);e&&t.updateByOp(e,d.applySimple(t.data,e),i,!0)}}),this.instances.forEach(r=>{if(!r.isInstanceRoot){let s=h.filterOp(r.overrideData,t);if(s){let a;a=o===r.data&&t===s?e:d.applySimple(r.data,s),r.updateByOp(s,a,i,!0)}}})}}updateByPatchedOpBase(t,e,i){if(this.dataPatched=e,0===t.path.length&&0===t.type)void 0!==t.props.type&&!o.is(t.props.type)&&C.changeEntityProptotype(this,e,i);else if(1===t.path.length&&"geometry"===t.path[0]&&0===t.type&&"type"in t.props){C.changeEntityProptotype(this,e,i);for(let t of this.children)at.is(t)&&t.updateVisible(i.scene)}this.updateByPatchedOp(t,e,i)}updateByPatchedOp(t,e,i){if(0===t.path.length&&0===t.type?this.updateState(t.props,i):0===t.type&&("resolutionLevel"in t.props||"useChildrenColors"in t.props)&&this.updateState(e,i),"morphTargetInfluences"===t.path[0]&&0===t.type){let r=e.morphTargetInfluences.get(t.path[1])?.data.name;r&&this.updateMorphInfluences(r,i.shared.getVariable(t.props.value,[this.uuid,"morphTargetInfluences",r]))}if(null!==_(t.path,["pathSnapping"])&&this.updatePathSnapping(e.pathSnapping),null!==_(t.path,["cloner"])){let r=d.drop(t,1);0===r.path.length&&0===r.type&&!0===r.props.disabled?this.setFromClonerState(null,i):this.cloner?this.cloner.updateState(e.cloner,i):(this.setFromClonerState(e.cloner,i),this.expandCloner(i)),this.updateVisible(i.scene)}}updatePathSnapping(t=this.dataPatched.pathSnapping){this._updatedPathSnapping=t,this._needApplyPathSnapping=!0}get updatedPathSnapping(){return this._updatedPathSnapping}applyPathSnapping(t){if(!1===this._needApplyPathSnapping)return;let e=this._updatedPathSnapping?.pathId??this.dataPatched.pathSnapping.pathId,i=this._updatedPathSnapping?.slide??this.dataPatched.pathSnapping.slide??0,r=this._updatedPathSnapping?.offset??this.dataPatched.pathSnapping.offset??0,s=this._updatedPathSnapping?.orientation??this.dataPatched.pathSnapping.orientation;if(null===e)return;let a=t.find(e);if(!a)return;this._needApplyPathSnapping=!1;let n=a.data;if(n.geometry.path.points.length<=1)return;let o=st(n.geometry.path),l=function(t){let e=t%1;return e<0?e+1:0===e&&t>0?1:e}(i+r),h=null;try{h=o.curves.length?o.getPointAt(l):null}catch(t){}if(null===h)return;a.updateMatrixWorld();let p=this.parent?xt.copy(this.parent.matrixWorld):xt.identity(),d=function(t,e,i,r){ot.setFromRotationMatrix(nt.extractRotation(r));let s=t.clone().applyMatrix4(nt.copy(r).invert().multiply(i));if(null===e)lt.setFromRotationMatrix(nt.extractRotation(i));else{let t=e.clone().applyMatrix4(nt.extractRotation(i));lt.setFromRotationMatrix(nt.lookAt(pt.set(0,0,0),t,dt))}return{position:s,rotation:(new f).setFromEuler(ht.setFromQuaternion(ot.invert().multiply(lt))).multiplyScalar(u.RAD2DEG)}}(h,"tangential"===s?o.getTangentAt(l):null,a.matrixWorld,p);this.updateTransformState({position:d.position.toArray(),rotation:d.rotation.toArray()}),this.traverseEntity(t=>{t._cameraType&&t.dispatchEvent(ut)})}updateVisible(t){if(this.visible=this.dataPatched.visible&&(!this.dataPatched.cloner||(this.dataPatched.cloner.disabled??!1)||!0!==this.dataPatched.cloner?.hideBase),!t)return;let e=!1;this.traverseEntity(t=>{if("Splat"===t.data.type)return e=!0,!0}),e&&t.reloadSplats()}updateState_Entity(t,e){void 0!==t.name&&(this.name=t.name),void 0!==t.raycastLock&&(this.raycastLock=t.raycastLock),void 0!==t.visible&&(this.updateVisible(e?.scene),this.resetBBoxNeedsUpdate()),e&&"cloner"in t&&void 0!==t.cloner&&(this.setFromClonerState(t.cloner,e),this.updateVisible(e.scene)),this.updateTransformState(t,e)}get attachedSurfaceCloners(){return this.children.filter(t=>e(t)&&"toObject"===t.parameters.type)}setFromClonerState(t,e){if(!this.disposed)if(null===t||t.disabled)this.cloner&&this.cloner.dispose(),this.cloner=void 0;else if(void 0===this.cloner){if(null===C.Cloner)return void i("cloners","a cloner");this.cloner=new C.Cloner(this,t),e.scene.addPendingExpandCloner(this)}else this.cloner.updateState(t,e)}expandCloner(t){!this.disposed&&this.cloner&&this.cloner.expandClones(t)}invalidateClonerTransform(t){this.cloner&&this.cloner.invalidateTransform(t)}requestRender(){this.dispatchEvent({type:"requestRender"})}},wt=class{static create(t){return this.build(this.normalizeInputs(t))}static normalizeInputs(t,e){let i=Object.assign({},e?.parameters??{width:100,revolutions:2,segments:40,pathRadius:10,pathType:0,pathSegments:30,cornerRadius:30,cornerSegments:4},t.parameters),r=Math.abs(i.width),s=Math.abs(i.height??r),a=Math.abs(i.depth??r),n=Math.abs(Math.min(r,a))/2;return{parameters:Object.assign(i,{width:r,height:s,depth:a,radius:n,segments:Math.round(i.segments),pathSegments:Math.round(i.pathSegments),cornerSegments:Math.round(i.cornerSegments)})}}static build(t){let{width:e,height:i,depth:r,radius:s,revolutions:a,segments:n,pathRadius:o,pathType:l,pathSegments:h,cornerRadius:p,cornerSegments:d}=t.parameters,c=new Et(!1,e,i,r,s,a,n,o,l,h,p,d);return Object.assign(c,{userData:{...t,type:"HelixGeometry"}})}},Mt=new b([0,0,0],1);function bt(t){return"TorusGeometry"===t.type&&360===t.arc}var Bt,Pt,Et=class extends E{constructor(t=!0,e=1,i=1,r=1,s=1,a=1,n=1,o=1,l=1,h=1,p=1,d=1){if(super(),0===a)return;let c=t&&1===a;c&&(d=0),p>100&&(p=100),0===p&&(d=0);let u,m,y,v,g,x,S,w,M=()=>new f,b=new f,P=M(),E=M(),A=M(),D=M(),C=M(),O=M(),_=M(),R=M(),T=M(),W=M(),V=M(),U=i-2*o+.001,L=U/a,I=Math.ceil(n*a),z=I+1,F=U/I,j=-U/2,N=h+1,k=2*Math.PI/h,G=Math.PI/2/d,H=Math.min((1-p/100)*o,o-.01),q=o-H,Z=0,K=2*d+2,Q=N*K/2,J=Q+N*z,X=Math.max(0,N*(z+K)),[Y,$,tt]=[3,3,2].map(t=>Array(X*t).fill(0)),et=[],it=s-o;function rt(e,i){let r=Math.PI/2;x=i*F,w=2*Math.PI*(x%L)/L+r,x+=j,S=Math.sin(w)*it,g=Math.cos(w)*it,t?e.set(g,S,x):e.set(g,x,S)}rt(b,-1e-10),rt(P,0),D.copy(b),rt(b,1);let st=b.distanceTo(P),at=c?0:q+H,nt=st*I+2*at,ot=H,lt=nt-at;for(let e=0;e<=I;e++){rt(E,e),V.subVectors(E,D).normalize(),D.copy(E),T.copy(E).setComponent(+t+1,0).normalize(),W.crossVectors(V,T).normalize();let i=0===e,r=e===I,s=i?3*Math.PI/2:G,a=i?ot:lt,n=i?N:J,l=i?0:X-N,p=V.clone().multiplyScalar(i?-q:q).add(E),u=V.clone().multiplyScalar(i?-1:1).normalize();for(let t=0;t<N;t++){let m=t*k;if(C.addVectors(b.copy(T).multiplyScalar(o*Math.cos(m)),P.copy(W).multiplyScalar(o*Math.sin(m))),O.copy(C).normalize(),i||r){c||(Z=l+t,[0,1,2].forEach(t=>{Y[3*Z+t]=p.getComponent(t),$[3*Z+t]=u.getComponent(t)}),tt[2*Z]=+r,tt[2*Z+1]=t/h),P.copy(O).multiplyScalar(H),A.addVectors(E,P);for(let e=0;e<d;e++){let r=e*G+s;_.addVectors(b.copy(V).multiplyScalar(q*Math.sin(r)),P.copy(O).multiplyScalar(q*Math.cos(r))),R.copy(_).normalize(),P.addVectors(A,_),_.normalize(),Z=n+e*N+t,[0,1,2].forEach(t=>{Y[3*Z+t]=P.getComponent(t),$[3*Z+t]=R.getComponent(t)});let o=+i+Math.sin(r);tt[2*Z]=(a+q*o)/nt,tt[2*Z+1]=t/h}}P.addVectors(E,C),Z=Q+e*N+t,[0,1,2].forEach(t=>{Y[3*Z+t]=P.getComponent(t),$[3*Z+t]=O.getComponent(t)}),tt[2*Z]=(at+e*st)/nt,tt[2*Z+1]=t/h}}let ht=z+2*d+2,[pt,dt]=[+c,ht-1];for(let t=pt;t<=dt-1;t++){let e=c&&t===dt-1;for(let i=0;i<N-1;i++)u=t*N+i,m=u+1,y=(e?i:u)+N,v=(e?i+1:m)+N,0===t?et.push(m,v,y):t===ht-2?et.push(u,m,y):et.push(u,m,y,m,v,y)}this.setIndex(et),this.setAttribute("position",new B(Y,3)),this.setAttribute("normal",new B($,3)),this.setAttribute("uv",new B(tt,2))}getClosedTorusIndicesForBooleanOrSubdiv(){let t,e,i,r,s=this.userData.parameters,a=Math.ceil(s.tubularSegments),n=s.radialSegments,o=n+1,l=[];for(let s=1;s<a;s++)for(let a=0;a<n;a++)t=s*o+a,e=t+1,i=t+o,r=e+o,l.push(t,e,i,e,r,i);for(let s=0;s<n;s++)t=a*o+s,e=t+1,i=s+o,r=s+1+o,l.push(t,e,i,e,r,i);return Mt.array=new Uint32Array(l),Mt.count=l.length,Mt}},At=new Map,Dt=0;function Ct(t){return Pt||(Pt=async function(){let e=t??"https://cdn.spline.design/@splinetool/runtime@2.0.99/build",i=import("./boolean.js"),[r,s]=await Promise.all([i,fetch(`${e}/boolean.wasm`).then(t=>t.arrayBuffer())]);await r.default({module_or_path:s}),Bt=r}())}function Ot(){if(void 0===Bt)throw new Error("boolean-wasm is not loaded");return Bt}function _t(t){let e=At.get(t);if(void 0===e)throw new Error("Unknown csg mesh set handle "+t);return e}function Rt(t){return At.set(++Dt,t),Dt}var Tt={0:0,1:1,2:2};function Wt(t,e,i){if(void 0===Bt)return-1;let{positions:r,indices:s,normals:a}=function(t,e){if(e&&void 0!==t.userData.positions){let e=t.userData,i=[];for(let t=0,r=0;t<e.verticesPerFace.length;t++){let s=e.verticesPerFace[t];for(let t=1;t<s-1;t++)i.push(e.indices[r],e.indices[r+t],e.indices[r+t+1]);r+=s}return{positions:e.positions instanceof Float32Array?e.positions:new Float32Array(e.positions),indices:new Uint32Array(i)}}let i;i=bt(t.userData.parameters)?t.getClosedTorusIndicesForBooleanOrSubdiv():t.getIndex();let r,s=t.getAttribute("position");if(null===i){r=new Uint32Array(s.count);for(let t=0;t<r.length;t++)r[t]=t}else r=i.array instanceof Uint32Array?i.array:new Uint32Array(i.array);let a=t.getAttribute("normal"),n=void 0!==a&&3===a.itemSize&&a.count===s.count&&a.array instanceof Float32Array&&!0!==a.isInterleavedBufferAttribute?a.array:void 0;return{positions:s.array,indices:r,normals:n}}(t,e);return Rt(new Bt.CsgMesh(r,s,a))}function Vt(t,e){let i=Ot(),r=Tt[e];if(void 0===r)throw new Error("Unknown boolean operation "+e);let s=t.map(_t);if(1===s.length)return i.clone_mesh(s[0]);let a,n=[];if(2===e&&s.length>2){let t=s[0];for(let e=1;e<s.length-1;e++)t=i.boolean_mesh(t,s[e],0),n.push(t);a=i.boolean_mesh(s[s.length-1],t,2)}else if(2===e)a=i.boolean_mesh(s[1],s[0],2);else{let t=s[s.length-1];for(let e=0;e<s.length-1&&(t=i.boolean_mesh(t,s[e],r),n.push(t),0!==t.tri_count());e++);a=t,n.pop()}for(let t of n)t.free();return a}function Ut(t,e,i,r){let s=Ot(),a=Vt(t,e),n=s.mesh_render_data(a,Math.max(r,0));if(i.setAttribute("position",new B(n.positions(),3)),i.setAttribute("normal",new B(n.normals(),3)),n.free(),null===i.boundingSphere&&(i.boundingSphere=new P),0===a.tri_count())i.boundingSphere.center.set(0,0,0),i.boundingSphere.radius=0,i.userData.parameters={width:0,height:0,depth:0};else{let t=a.bounds();i.boundingSphere.center.set(t[0],t[1],t[2]),i.boundingSphere.radius=(t[3]**2+t[4]**2+t[5]**2)**.5,i.userData.parameters={width:2*t[3],height:2*t[4],depth:2*t[5]}}return Rt(a)}function Lt(t,e){let i=Ot(),r=Vt(t,e),s=i.mesh_topological_data(r),a=s.positions(),n=s.indices();return s.free(),r.free(),{positions:a,indices:n,verticesPerFace:new Uint8Array(n.length/3).fill(3)}}function It(t,e){_t(t).transform(new Float32Array(e.elements))}function zt(t){let e=At.get(t);void 0!==e&&(e.free(),At.delete(t))}function Ft(t,e){return Rt(Ot().instanced_union(_t(t),e))}function jt(t){return null!==t&&"booleanOp"in t}var Nt=class extends(St(D)){constructor(){super(...arguments),this.booleanMeshSetAddress=-1,this.booleanWasTransformed=!1,this.booleanMatrixInvOld=new v}updateVisible(t){super.updateVisible(t),this.visible=!jt(this.parent)&&this.visible,jt(this.parent)&&this.parent.invalidateDownstreamBooleanData()}onClonerLayoutUpdated(){jt(this.parent)&&this.invalidateDownstreamBooleanData()}freeBooleanPointer(){-1!==this.booleanMeshSetAddress&&(zt(this.booleanMeshSetAddress),this.booleanMeshSetAddress=-1)}invalidateDownstreamBooleanData(t=!1){return t?this.booleanWasTransformed=!0:this.freeBooleanPointer(),jt(this.parent)?this.parent.invalidateDownstreamBooleanData():this}invalidateUpstreamBooleanData(){this.freeBooleanPointer();for(let t of this.children)t instanceof Nt&&(t.freeBooleanPointer(),jt(t)&&t.invalidateUpstreamBooleanData())}updateTransformState(t,e){let i=super.updateTransformState(t,e);return i&&jt(this.parent)&&this.invalidateDownstreamBooleanData(!0),i}onVariableUpdate(t=!1){super.onVariableUpdate(t),jt(this.parent)&&this.invalidateDownstreamBooleanData(!0)}},kt=new M;function Gt(t,e=0,i=t.count,r,s){let a=1/0,n=1/0,o=1/0,l=-1/0,h=-1/0,p=-1/0;for(let r=e;r<i;r++){let e=t.getX(r),i=t.getY(r),s=t.getZ(r);e<a&&(a=e),i<n&&(n=i),s<o&&(o=s),e>l&&(l=e),i>h&&(h=i),s>p&&(p=s)}kt.min.set(a,n,o),kt.max.set(l,h,p),kt.getCenter(r),kt.getSize(s).multiplyScalar(.5)}var Ht=new E,qt=new A,Zt=class extends Nt{constructor(t,e){super(Ht,qt),this.super_Entity(t,e)}updateState(t,e){this.updateState_Entity(t,e)}raycast(t,e){if(this.raycastDeformed(t,e))return;super.raycast(t,e)}raycastDeformed(t,e){return!1}updateEntityBoxSize(t,e){let i=this.geometry.getAttribute("position");void 0!==i?Gt(i,this.geometry.drawRange.start,this.geometry.drawRange.count<1/0?this.geometry.drawRange.count:i.count,t,e):super.updateEntityBoxSize(t,e)}};export{O as a,_ as b,C as c,j as d,N as e,G as f,st as g,at as h,ct as i,St as j,wt as k,bt as l,Et as m,Ct as n,Wt as o,Ut as p,Lt as q,It as r,zt as s,Ft as t,Gt as u,Zt as v};
|
|
Binary file
|
|
Binary file
|