@splinetool/runtime 2.0.164 → 2.0.165
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-EM3AKBWU.js → runtime-bloom-NN2NEDMZ.js} +1 -1
- package/build/runtime-bloom-NN2NEDMZ.js.br +0 -0
- package/build/runtime-bloom-NN2NEDMZ.js.gz +0 -0
- package/build/{runtime-brightnessContrast-ZNZM4QR3.js → runtime-brightnessContrast-WI2H276C.js} +1 -1
- package/build/runtime-brightnessContrast-WI2H276C.js.br +0 -0
- package/build/runtime-brightnessContrast-WI2H276C.js.gz +0 -0
- package/build/{runtime-chromaticAberration-HSUQ4RMO.js → runtime-chromaticAberration-QZ27XZ75.js} +1 -1
- package/build/runtime-chromaticAberration-QZ27XZ75.js.br +0 -0
- package/build/runtime-chromaticAberration-QZ27XZ75.js.gz +0 -0
- package/build/{runtime-chunk-4OHO4BTJ.js → runtime-chunk-3LPYL5I4.js} +1 -1
- package/build/runtime-chunk-3LPYL5I4.js.br +0 -0
- package/build/runtime-chunk-3LPYL5I4.js.gz +0 -0
- package/build/{runtime-chunk-DA7YVXFV.js → runtime-chunk-3PSVYH6D.js} +1 -1
- package/build/{runtime-chunk-DA7YVXFV.js.br → runtime-chunk-3PSVYH6D.js.br} +0 -0
- package/build/runtime-chunk-3PSVYH6D.js.gz +0 -0
- package/build/{runtime-chunk-RTWIA3GM.js → runtime-chunk-4OM3WOF2.js} +1 -1
- package/build/runtime-chunk-4OM3WOF2.js.br +0 -0
- package/build/runtime-chunk-4OM3WOF2.js.gz +0 -0
- package/build/{runtime-chunk-LAKWQQVI.js → runtime-chunk-7IU5GEK4.js} +1 -1
- package/build/runtime-chunk-7IU5GEK4.js.br +0 -0
- package/build/runtime-chunk-7IU5GEK4.js.gz +0 -0
- package/build/{runtime-chunk-AXQU6YYX.js → runtime-chunk-7ZWBMCAP.js} +1 -1
- package/build/runtime-chunk-7ZWBMCAP.js.br +0 -0
- package/build/runtime-chunk-7ZWBMCAP.js.gz +0 -0
- package/build/{runtime-chunk-4CHVYZUG.js → runtime-chunk-AWGPDK4A.js} +1 -1
- package/build/runtime-chunk-AWGPDK4A.js.br +0 -0
- package/build/runtime-chunk-AWGPDK4A.js.gz +0 -0
- package/build/{runtime-chunk-JNGJVYZB.js → runtime-chunk-BELWYSDM.js} +1 -1
- package/build/runtime-chunk-BELWYSDM.js.br +0 -0
- package/build/runtime-chunk-BELWYSDM.js.gz +0 -0
- package/build/{runtime-chunk-NQ3C3YS6.js → runtime-chunk-CFZL4CY7.js} +1 -1
- package/build/runtime-chunk-CFZL4CY7.js.br +0 -0
- package/build/runtime-chunk-CFZL4CY7.js.gz +0 -0
- package/build/{runtime-chunk-MPNFIKTZ.js → runtime-chunk-DHIZLIYH.js} +1 -1
- package/build/{runtime-chunk-MPNFIKTZ.js.br → runtime-chunk-DHIZLIYH.js.br} +0 -0
- package/build/{runtime-chunk-MPNFIKTZ.js.gz → runtime-chunk-DHIZLIYH.js.gz} +0 -0
- package/build/{runtime-chunk-B64GNQH3.js → runtime-chunk-EPEN4QF7.js} +1 -1
- package/build/runtime-chunk-EPEN4QF7.js.br +0 -0
- package/build/runtime-chunk-EPEN4QF7.js.gz +0 -0
- package/build/{runtime-chunk-V6OM4V3Q.js → runtime-chunk-EXYWCTCX.js} +1 -1
- package/build/runtime-chunk-EXYWCTCX.js.br +0 -0
- package/build/runtime-chunk-EXYWCTCX.js.gz +0 -0
- package/build/{runtime-chunk-RTX2FGZ3.js → runtime-chunk-F7XMQJYX.js} +1 -1
- package/build/runtime-chunk-F7XMQJYX.js.br +0 -0
- package/build/runtime-chunk-F7XMQJYX.js.gz +0 -0
- package/build/{runtime-chunk-LCLUD5Y5.js → runtime-chunk-GJD5Z27Z.js} +1 -1
- package/build/runtime-chunk-GJD5Z27Z.js.br +1 -0
- package/build/runtime-chunk-GJD5Z27Z.js.gz +0 -0
- package/build/{runtime-chunk-65TZFJC4.js → runtime-chunk-GMNJMBPF.js} +1 -1
- package/build/runtime-chunk-GMNJMBPF.js.br +0 -0
- package/build/runtime-chunk-GMNJMBPF.js.gz +0 -0
- package/build/{runtime-chunk-JZ6WSSKE.js → runtime-chunk-H6TAAMBR.js} +1 -1
- package/build/runtime-chunk-H6TAAMBR.js.br +0 -0
- package/build/runtime-chunk-H6TAAMBR.js.gz +0 -0
- package/build/{runtime-chunk-4WJ7EUOV.js → runtime-chunk-HS7WWNYO.js} +1 -1
- package/build/runtime-chunk-HS7WWNYO.js.br +0 -0
- package/build/runtime-chunk-HS7WWNYO.js.gz +0 -0
- package/build/{runtime-chunk-YUOTERCC.js → runtime-chunk-HXKI3KL7.js} +1 -1
- package/build/runtime-chunk-HXKI3KL7.js.br +0 -0
- package/build/runtime-chunk-HXKI3KL7.js.gz +0 -0
- package/build/{runtime-chunk-XH46ASXL.js → runtime-chunk-IHYZ33KO.js} +1 -1
- package/build/runtime-chunk-IHYZ33KO.js.br +0 -0
- package/build/runtime-chunk-IHYZ33KO.js.gz +0 -0
- package/build/{runtime-chunk-NRQA53X3.js → runtime-chunk-J6XBDO7Z.js} +1 -1
- package/build/runtime-chunk-J6XBDO7Z.js.br +0 -0
- package/build/runtime-chunk-J6XBDO7Z.js.gz +0 -0
- package/build/{runtime-chunk-ELUBBNJJ.js → runtime-chunk-JLQD5I5D.js} +1 -1
- package/build/runtime-chunk-JLQD5I5D.js.br +0 -0
- package/build/runtime-chunk-JLQD5I5D.js.gz +0 -0
- package/build/{runtime-chunk-456VI34X.js → runtime-chunk-LAYGNGBR.js} +1 -1
- package/build/runtime-chunk-LAYGNGBR.js.br +0 -0
- package/build/{runtime-chunk-456VI34X.js.gz → runtime-chunk-LAYGNGBR.js.gz} +0 -0
- package/build/{runtime-chunk-PMW77S62.js → runtime-chunk-LIIZJ7RE.js} +1 -1
- package/build/runtime-chunk-LIIZJ7RE.js.br +0 -0
- package/build/runtime-chunk-LIIZJ7RE.js.gz +0 -0
- package/build/{runtime-chunk-DNANAALE.js → runtime-chunk-M7P5HXFX.js} +1 -1
- package/build/runtime-chunk-M7P5HXFX.js.br +0 -0
- package/build/runtime-chunk-M7P5HXFX.js.gz +0 -0
- package/build/{runtime-chunk-IZX6T7H2.js → runtime-chunk-UK7SWR5G.js} +1 -1
- package/build/runtime-chunk-UK7SWR5G.js.br +0 -0
- package/build/runtime-chunk-UK7SWR5G.js.gz +0 -0
- package/build/runtime-chunk-Y32UTK67.js +1 -0
- package/build/runtime-chunk-Y32UTK67.js.br +0 -0
- package/build/runtime-chunk-Y32UTK67.js.gz +0 -0
- package/build/{runtime-chunk-AS76KZ4N.js → runtime-chunk-YOL3POTO.js} +1 -1
- package/build/runtime-chunk-YOL3POTO.js.br +0 -0
- package/build/runtime-chunk-YOL3POTO.js.gz +0 -0
- package/build/{runtime-chunk-WAC4YKAF.js → runtime-chunk-Z6KRCDRX.js} +1 -1
- package/build/runtime-chunk-Z6KRCDRX.js.br +0 -0
- package/build/runtime-chunk-Z6KRCDRX.js.gz +0 -0
- package/build/{runtime-classicRuntime-IQVWAPSG.js → runtime-classicRuntime-ABGESXO7.js} +1 -1
- package/build/runtime-classicRuntime-ABGESXO7.js.br +0 -0
- package/build/runtime-classicRuntime-ABGESXO7.js.gz +0 -0
- package/build/{runtime-cloners-5IGD5V6Y.js → runtime-cloners-TSRC2K44.js} +1 -1
- package/build/runtime-cloners-TSRC2K44.js.br +0 -0
- package/build/runtime-cloners-TSRC2K44.js.gz +0 -0
- package/build/{runtime-components-WRE2SJB5.js → runtime-components-MLG7NIPW.js} +1 -1
- package/build/runtime-components-MLG7NIPW.js.br +0 -0
- package/build/runtime-components-MLG7NIPW.js.gz +0 -0
- package/build/{runtime-createDestroy-BM5XHCVJ.js → runtime-createDestroy-SJJOIHMI.js} +1 -1
- package/build/runtime-createDestroy-SJJOIHMI.js.br +0 -0
- package/build/runtime-createDestroy-SJJOIHMI.js.gz +0 -0
- package/build/{runtime-depthOfField-LC3U5L6F.js → runtime-depthOfField-A6IMSBPZ.js} +1 -1
- package/build/runtime-depthOfField-A6IMSBPZ.js.br +0 -0
- package/build/runtime-depthOfField-A6IMSBPZ.js.gz +0 -0
- package/build/{runtime-dragDrop-GQRCXQ7Y.js → runtime-dragDrop-GGQNDVLK.js} +1 -1
- package/build/runtime-dragDrop-GGQNDVLK.js.br +0 -0
- package/build/runtime-dragDrop-GGQNDVLK.js.gz +0 -0
- package/build/{runtime-gameControls-XQHV7WML.js → runtime-gameControls-DMZKCNWJ.js} +1 -1
- package/build/runtime-gameControls-DMZKCNWJ.js.br +0 -0
- package/build/runtime-gameControls-DMZKCNWJ.js.gz +0 -0
- package/build/{runtime-hair-YH5PLFTG.js → runtime-hair-WLSFTTV7.js} +1 -1
- package/build/runtime-hair-WLSFTTV7.js.br +2 -0
- package/build/runtime-hair-WLSFTTV7.js.gz +0 -0
- package/build/{runtime-hueSaturation-GGQGQYKZ.js → runtime-hueSaturation-SICCOMAM.js} +1 -1
- package/build/runtime-hueSaturation-SICCOMAM.js.br +0 -0
- package/build/runtime-hueSaturation-SICCOMAM.js.gz +0 -0
- package/build/{runtime-mergeStaticGeometries-4HSTLAYH.js → runtime-mergeStaticGeometries-5B6BMDJG.js} +1 -1
- package/build/runtime-mergeStaticGeometries-5B6BMDJG.js.br +0 -0
- package/build/runtime-mergeStaticGeometries-5B6BMDJG.js.gz +0 -0
- package/build/{runtime-miscActions-SHX7QQVU.js → runtime-miscActions-BGNU3PVX.js} +1 -1
- package/build/runtime-miscActions-BGNU3PVX.js.br +0 -0
- package/build/runtime-miscActions-BGNU3PVX.js.gz +0 -0
- package/build/{runtime-mouseHover-QGXELEH7.js → runtime-mouseHover-6JRTCTHS.js} +1 -1
- package/build/runtime-mouseHover-6JRTCTHS.js.br +0 -0
- package/build/runtime-mouseHover-6JRTCTHS.js.gz +0 -0
- package/build/{runtime-noise-K62GENSZ.js → runtime-noise-JHKLSCCF.js} +1 -1
- package/build/runtime-noise-JHKLSCCF.js.br +0 -0
- package/build/runtime-noise-JHKLSCCF.js.gz +0 -0
- package/build/{runtime-particles-QDKH5GWL.js → runtime-particles-5XNX7NFX.js} +1 -1
- package/build/runtime-particles-5XNX7NFX.js.br +0 -0
- package/build/runtime-particles-5XNX7NFX.js.gz +0 -0
- package/build/{runtime-paths-BQCQ6EJL.js → runtime-paths-XSYX5THX.js} +1 -1
- package/build/runtime-paths-XSYX5THX.js.br +0 -0
- package/build/runtime-paths-XSYX5THX.js.gz +0 -0
- package/build/{runtime-pixelation-OUZL5VVP.js → runtime-pixelation-PQY2GURW.js} +1 -1
- package/build/runtime-pixelation-PQY2GURW.js.br +0 -0
- package/build/runtime-pixelation-PQY2GURW.js.gz +0 -0
- package/build/{runtime-resize-H7VODEYE.js → runtime-resize-ULRZ7MWQ.js} +1 -1
- package/build/runtime-resize-ULRZ7MWQ.js.br +0 -0
- package/build/runtime-resize-ULRZ7MWQ.js.gz +0 -0
- package/build/{runtime-sceneTransition-GTIJVEAL.js → runtime-sceneTransition-TAF74VQZ.js} +1 -1
- package/build/runtime-sceneTransition-TAF74VQZ.js.br +0 -0
- package/build/runtime-sceneTransition-TAF74VQZ.js.gz +0 -0
- package/build/{runtime-scroll-INQRIPHG.js → runtime-scroll-FNHZVLMF.js} +1 -1
- package/build/runtime-scroll-FNHZVLMF.js.br +0 -0
- package/build/runtime-scroll-FNHZVLMF.js.gz +0 -0
- package/build/runtime-shapeBlends-SIA7X5SK.js +1 -0
- package/build/runtime-shapeBlends-SIA7X5SK.js.br +3 -0
- package/build/runtime-shapeBlends-SIA7X5SK.js.gz +0 -0
- package/build/{runtime-text-EBNPPLF6.js → runtime-text-GG2FCDKF.js} +1 -1
- package/build/runtime-text-GG2FCDKF.js.br +0 -0
- package/build/runtime-text-GG2FCDKF.js.gz +0 -0
- package/build/{runtime-textInputs-5EVZOGJU.js → runtime-textInputs-JDMUBBBD.js} +1 -1
- package/build/runtime-textInputs-JDMUBBBD.js.br +0 -0
- package/build/runtime-textInputs-JDMUBBBD.js.gz +0 -0
- package/build/{runtime-timeline-VS4DHEMD.js → runtime-timeline-WIKHMRDC.js} +1 -1
- package/build/runtime-timeline-WIKHMRDC.js.br +0 -0
- package/build/runtime-timeline-WIKHMRDC.js.gz +0 -0
- package/build/{runtime-tracking-3CEMXTS4.js → runtime-tracking-WEYCXONJ.js} +1 -1
- package/build/runtime-tracking-WEYCXONJ.js.br +0 -0
- package/build/runtime-tracking-WEYCXONJ.js.gz +0 -0
- package/build/{runtime-transitions-DLZUNRX5.js → runtime-transitions-N5YIJ6EB.js} +1 -1
- package/build/runtime-transitions-N5YIJ6EB.js.br +0 -0
- package/build/runtime-transitions-N5YIJ6EB.js.gz +0 -0
- package/build/{runtime-ui2d-3QPQK4HY.js → runtime-ui2d-QQYQ5U2P.js} +1 -1
- package/build/runtime-ui2d-QQYQ5U2P.js.br +0 -0
- package/build/runtime-ui2d-QQYQ5U2P.js.gz +0 -0
- package/build/{runtime-vectorShapes-RHUJEM6U.js → runtime-vectorShapes-CMSVNJCT.js} +1 -1
- package/build/runtime-vectorShapes-CMSVNJCT.js.br +0 -0
- package/build/runtime-vectorShapes-CMSVNJCT.js.gz +0 -0
- package/build/{runtime-vignette-U7LIR5I6.js → runtime-vignette-4FXIGUX3.js} +1 -1
- package/build/runtime-vignette-4FXIGUX3.js.br +0 -0
- package/build/runtime-vignette-4FXIGUX3.js.gz +0 -0
- package/build/{runtime-webgpu-EHCDRKSD.js → runtime-webgpu-YWPV53VJ.js} +1 -1
- package/build/runtime-webgpu-YWPV53VJ.js.br +0 -0
- package/build/runtime-webgpu-YWPV53VJ.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 +1 -1
- package/build/runtime-bloom-EM3AKBWU.js.br +0 -0
- package/build/runtime-bloom-EM3AKBWU.js.gz +0 -0
- package/build/runtime-brightnessContrast-ZNZM4QR3.js.br +0 -0
- package/build/runtime-brightnessContrast-ZNZM4QR3.js.gz +0 -0
- package/build/runtime-chromaticAberration-HSUQ4RMO.js.br +0 -0
- package/build/runtime-chromaticAberration-HSUQ4RMO.js.gz +0 -0
- package/build/runtime-chunk-456VI34X.js.br +0 -0
- package/build/runtime-chunk-4CHVYZUG.js.br +0 -0
- package/build/runtime-chunk-4CHVYZUG.js.gz +0 -0
- package/build/runtime-chunk-4OHO4BTJ.js.br +0 -0
- package/build/runtime-chunk-4OHO4BTJ.js.gz +0 -0
- package/build/runtime-chunk-4WJ7EUOV.js.br +0 -0
- package/build/runtime-chunk-4WJ7EUOV.js.gz +0 -0
- package/build/runtime-chunk-65TZFJC4.js.br +0 -0
- package/build/runtime-chunk-65TZFJC4.js.gz +0 -0
- package/build/runtime-chunk-AS76KZ4N.js.br +0 -0
- package/build/runtime-chunk-AS76KZ4N.js.gz +0 -0
- package/build/runtime-chunk-AXQU6YYX.js.br +0 -0
- package/build/runtime-chunk-AXQU6YYX.js.gz +0 -0
- package/build/runtime-chunk-B64GNQH3.js.br +0 -0
- package/build/runtime-chunk-B64GNQH3.js.gz +0 -0
- package/build/runtime-chunk-BKJ46UZM.js +0 -1
- package/build/runtime-chunk-BKJ46UZM.js.br +0 -0
- package/build/runtime-chunk-BKJ46UZM.js.gz +0 -0
- package/build/runtime-chunk-DA7YVXFV.js.gz +0 -0
- package/build/runtime-chunk-DNANAALE.js.br +0 -0
- package/build/runtime-chunk-DNANAALE.js.gz +0 -0
- package/build/runtime-chunk-ELUBBNJJ.js.br +0 -0
- package/build/runtime-chunk-ELUBBNJJ.js.gz +0 -0
- package/build/runtime-chunk-IZX6T7H2.js.br +0 -0
- package/build/runtime-chunk-IZX6T7H2.js.gz +0 -0
- package/build/runtime-chunk-JNGJVYZB.js.br +0 -0
- package/build/runtime-chunk-JNGJVYZB.js.gz +0 -0
- package/build/runtime-chunk-JZ6WSSKE.js.br +0 -0
- package/build/runtime-chunk-JZ6WSSKE.js.gz +0 -0
- package/build/runtime-chunk-LAKWQQVI.js.br +0 -0
- package/build/runtime-chunk-LAKWQQVI.js.gz +0 -0
- package/build/runtime-chunk-LCLUD5Y5.js.br +0 -0
- package/build/runtime-chunk-LCLUD5Y5.js.gz +0 -0
- package/build/runtime-chunk-NQ3C3YS6.js.br +0 -0
- package/build/runtime-chunk-NQ3C3YS6.js.gz +0 -0
- package/build/runtime-chunk-NRQA53X3.js.br +0 -0
- package/build/runtime-chunk-NRQA53X3.js.gz +0 -0
- package/build/runtime-chunk-PMW77S62.js.br +0 -1
- package/build/runtime-chunk-PMW77S62.js.gz +0 -0
- package/build/runtime-chunk-RTWIA3GM.js.br +0 -0
- package/build/runtime-chunk-RTWIA3GM.js.gz +0 -0
- package/build/runtime-chunk-RTX2FGZ3.js.br +0 -0
- package/build/runtime-chunk-RTX2FGZ3.js.gz +0 -0
- package/build/runtime-chunk-V6OM4V3Q.js.br +0 -0
- package/build/runtime-chunk-V6OM4V3Q.js.gz +0 -0
- package/build/runtime-chunk-WAC4YKAF.js.br +0 -0
- package/build/runtime-chunk-WAC4YKAF.js.gz +0 -0
- package/build/runtime-chunk-XH46ASXL.js.br +0 -0
- package/build/runtime-chunk-XH46ASXL.js.gz +0 -0
- package/build/runtime-chunk-YUOTERCC.js.br +0 -0
- package/build/runtime-chunk-YUOTERCC.js.gz +0 -0
- package/build/runtime-classicRuntime-IQVWAPSG.js.br +0 -0
- package/build/runtime-classicRuntime-IQVWAPSG.js.gz +0 -0
- package/build/runtime-cloners-5IGD5V6Y.js.br +0 -0
- package/build/runtime-cloners-5IGD5V6Y.js.gz +0 -0
- package/build/runtime-components-WRE2SJB5.js.br +0 -0
- package/build/runtime-components-WRE2SJB5.js.gz +0 -0
- package/build/runtime-createDestroy-BM5XHCVJ.js.br +0 -0
- package/build/runtime-createDestroy-BM5XHCVJ.js.gz +0 -0
- package/build/runtime-depthOfField-LC3U5L6F.js.br +0 -0
- package/build/runtime-depthOfField-LC3U5L6F.js.gz +0 -0
- package/build/runtime-dragDrop-GQRCXQ7Y.js.br +0 -0
- package/build/runtime-dragDrop-GQRCXQ7Y.js.gz +0 -0
- package/build/runtime-gameControls-XQHV7WML.js.br +0 -0
- package/build/runtime-gameControls-XQHV7WML.js.gz +0 -0
- package/build/runtime-hair-YH5PLFTG.js.br +0 -3
- package/build/runtime-hair-YH5PLFTG.js.gz +0 -0
- package/build/runtime-hueSaturation-GGQGQYKZ.js.br +0 -0
- package/build/runtime-hueSaturation-GGQGQYKZ.js.gz +0 -0
- package/build/runtime-mergeStaticGeometries-4HSTLAYH.js.br +0 -0
- package/build/runtime-mergeStaticGeometries-4HSTLAYH.js.gz +0 -0
- package/build/runtime-miscActions-SHX7QQVU.js.br +0 -0
- package/build/runtime-miscActions-SHX7QQVU.js.gz +0 -0
- package/build/runtime-mouseHover-QGXELEH7.js.br +0 -0
- package/build/runtime-mouseHover-QGXELEH7.js.gz +0 -0
- package/build/runtime-noise-K62GENSZ.js.br +0 -0
- package/build/runtime-noise-K62GENSZ.js.gz +0 -0
- package/build/runtime-particles-QDKH5GWL.js.br +0 -0
- package/build/runtime-particles-QDKH5GWL.js.gz +0 -0
- package/build/runtime-paths-BQCQ6EJL.js.br +0 -0
- package/build/runtime-paths-BQCQ6EJL.js.gz +0 -0
- package/build/runtime-pixelation-OUZL5VVP.js.br +0 -0
- package/build/runtime-pixelation-OUZL5VVP.js.gz +0 -0
- package/build/runtime-resize-H7VODEYE.js.br +0 -0
- package/build/runtime-resize-H7VODEYE.js.gz +0 -0
- package/build/runtime-sceneTransition-GTIJVEAL.js.br +0 -0
- package/build/runtime-sceneTransition-GTIJVEAL.js.gz +0 -0
- package/build/runtime-scroll-INQRIPHG.js.br +0 -0
- package/build/runtime-scroll-INQRIPHG.js.gz +0 -0
- package/build/runtime-shapeBlends-BDMRIATN.js +0 -1
- package/build/runtime-shapeBlends-BDMRIATN.js.br +0 -2
- package/build/runtime-shapeBlends-BDMRIATN.js.gz +0 -0
- package/build/runtime-text-EBNPPLF6.js.br +0 -0
- package/build/runtime-text-EBNPPLF6.js.gz +0 -0
- package/build/runtime-textInputs-5EVZOGJU.js.br +0 -0
- package/build/runtime-textInputs-5EVZOGJU.js.gz +0 -0
- package/build/runtime-timeline-VS4DHEMD.js.br +0 -0
- package/build/runtime-timeline-VS4DHEMD.js.gz +0 -0
- package/build/runtime-tracking-3CEMXTS4.js.br +0 -0
- package/build/runtime-tracking-3CEMXTS4.js.gz +0 -0
- package/build/runtime-transitions-DLZUNRX5.js.br +0 -0
- package/build/runtime-transitions-DLZUNRX5.js.gz +0 -0
- package/build/runtime-ui2d-3QPQK4HY.js.br +0 -0
- package/build/runtime-ui2d-3QPQK4HY.js.gz +0 -0
- package/build/runtime-vectorShapes-RHUJEM6U.js.br +0 -0
- package/build/runtime-vectorShapes-RHUJEM6U.js.gz +0 -0
- package/build/runtime-vignette-U7LIR5I6.js.br +0 -0
- package/build/runtime-vignette-U7LIR5I6.js.gz +0 -0
- package/build/runtime-webgpu-EHCDRKSD.js.br +0 -0
- package/build/runtime-webgpu-EHCDRKSD.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{C as s,Ca as r,Da as a,Fa as n,J as o,Sa as l,i as h,j as p,k as d,n as c}from"./runtime-chunk-ADHKZQMB.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 C}from"./runtime-chunk-KPOUV3HD.js";var D={Cloner:null,changeEntityProptotype:()=>{},createEntity:()=>{}};function O(t,e){let i=[];if(e.length!==t.length)return null;{let s=0;for(;s<t.length;){if("*"===e[s])i.push(t[s]);else if(t[s]!==e[s])return null;s+=1}}return i}function _(t,e){let i=[];if(!(e.length<=t.length))return null;{let s=0;for(;s<e.length;){if("*"===e[s])i.push(t[s]);else if(t[s]!==e[s])return null;s+=1}}return i}var V=new f,R=new f,T=new v,W=[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]],I=[[0,2],[7,5],[4,1],[3,6],[4,3],[1,6]],L=(t,e,i)=>{t.updateEntityBoxSize(V,R),T.copy(e).multiply(t.matrixWorld),0===R.x&&0===R.y&&0===R.z?i.push(new f(V.x,V.y,V.z).applyMatrix4(T)):W.forEach(t=>{i.push(t.clone().multiply(R).add(V).applyMatrix4(T))})},F=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 s=[];if(!0===i){let i=[];t.traverseEntity(t=>{if(t.visible||t.cloner&&t.data.visible){if(!("geometry"in t))return T.copy(e).multiply(t.matrixWorld),void i.push((new f).applyMatrix4(T));L(t,e,s)}}),0===s.length&&s.push(...i)}else L(t,e,s);return this.setFromPoints(s)}getCenter(t){return(t=super.getCenter(t)).applyMatrix4(this.matrix),t}getPositionToCenter(t){return(t=super.getCenter(t)).applyMatrix4(T.copy(this.matrix).setPosition(0,0,0)),t}computeVertices(){this.getSize(R).multiplyScalar(.5),this.getCenter(V),T.copy(this.matrix).setPosition(V),this.vertices=W.map(t=>t.clone().multiply(R).applyMatrix4(T))}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=I.map(([t,e])=>this.vertices[t].clone().add(this.vertices[e]).multiplyScalar(.5))}},z=new f(1,1,1);function j(t,e,i,s,r=new v){return r.compose(t,e,z).multiply(i).scale(s)}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,s,r,a){this.copyPreviousMatrix&&this.previousModelViewMatrix.copy(this.modelViewMatrix)}},H=class extends x{constructor(){super()}getPoints(t=12){let e,i=[],s=this.getCurveLengths(),r=s[s.length-1]/s.length;for(let a=0,n=this.curves;a<n.length;a++){let o=n[a],l=0===a?s[a]:s[a]-s[a-1],h=Math.ceil(t*l/r),p=o.getPoints(h);for(let t=0;t<p.length;t++){let s=p[t];e&&e.equals(s)||(i.push(s),e=s)}}return this.autoClose&&i.length>1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i}},q=.001,Z=new f,Q=new f,K=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),Q.subVectors(e,i),Z.cross(Q).length()<=q}var st=new WeakMap;function rt(t){let e=st.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]],s=[new f(...e[0].data.position)];K.copy(s[0]);for(let t=0;t<e.length-1;t++)Z.fromArray(e[t].data.position),Q.fromArray(e[t+1].data.position),X.subVectors(Z,K),$.subVectors(Z,Q),X.cross($).length()>q&&(i.push(e[t]),s.push((new f).copy(Z)),K.copy(Z));let r=e[e.length-1];i.push(r),s.push(new f(...r.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(s[t],h[t],s[e])&&it(s[t],l[e],s[e]))}let d=[];for(let t=0;t<o;t++){let e=i[t].data,r=s[t],n={position:r,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(s[c],r).normalize(),y=(new f).subVectors(s[u],r).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=K.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],s=d[e];if(0!==i.removedLength||0!==s.removedLength){let t=i.position.distanceTo(s.position);i.removedLength=Math.min(i.removedLength,t/2),s.removedLength=Math.min(s.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],s=d[e],r=null;if(p[t]){let t=i.position.clone(),e=s.position.clone();(0!==i.removedLength||0!==s.removedLength)&&(i.nextDir&&t.add(K.copy(i.nextDir).setLength(i.removedLength)),s.prevDir&&e.add(K.copy(s.prevDir).setLength(s.removedLength))),t.distanceTo(e)>q&&(r=new y(t,t.clone().lerp(e,.3),e.clone().lerp(t,.3),e))}else i.position.distanceTo(s.position)>q&&(r=new y(i.position,i.controlNext,s.controlPrevious,s.position));c[2*t+1]=r}for(let t=0;t<o;t++){let e=d[t];if(0===e.removedLength)continue;let i=e.position,s=e.prevDir.clone().multiplyScalar(e.removedLength).add(i),r=e.nextDir.clone().multiplyScalar(e.removedLength).add(i),a=e.tan*e.removedLength;J.addVectors(e.prevDir,e.nextDir).normalize(),X.copy(s).lerp(r,.5);let n=s.distanceTo(r)/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(s)).add(i),tt.copy($).lerp(Y,2);let l=s.clone().lerp($,4/3),h=r.clone().lerp(tt,4/3);c[2*t]=new y(s,l,h,r)}let u=new H;for(let t=0;t<c.length;t++){let e=c[t];e&&u.add(e)}return u}(t);return st.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 F,this._recursiveBBox=new F,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,s)=>i?.shared.getVariable(e,[this.uuid,t,mt[s]])??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 s=c.zoom(i,t.path.slice(2));if(s)for(let i in t.props)void 0===t.props[i]&&i in s&&(e[i]=s[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,s]of Object.entries(t.props))void 0===s&&(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 s;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&&(s={...t,props:e})}else for(let e of a.rootOverrideProps)if(_(t.path,[e])){s=t;break}void 0!==s&&this.instances.forEach(t=>{if(t.isInstanceRoot){let e=h.filterOp(t.overrideData,s);e&&t.updateByOp(e,d.applySimple(t.data,e),i,!0)}}),this.instances.forEach(s=>{if(!s.isInstanceRoot){let r=h.filterOp(s.overrideData,t);if(r){let a;a=o===s.data&&t===r?e:d.applySimple(s.data,r),s.updateByOp(r,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)&&D.changeEntityProptotype(this,this.data,i);else if(1===t.path.length&&"geometry"===t.path[0]&&0===t.type&&"type"in t.props){D.changeEntityProptotype(this,this.data,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 s=e.morphTargetInfluences.get(t.path[1])?.data.name;s&&this.updateMorphInfluences(s,i.shared.getVariable(t.props.value,[this.uuid,"morphTargetInfluences",s]))}if(null!==_(t.path,["pathSnapping"])&&(this.updatePathSnapping(e.pathSnapping),this.isVirtualEntity&&i.scene?.syncInstancePathConstraint(this)),null!==_(t.path,["cloner"])){let s=d.drop(t,1);0===s.path.length&&0===s.type&&!0===s.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,s=this._updatedPathSnapping?.offset??this.dataPatched.pathSnapping.offset??0,r=this._updatedPathSnapping?.orientation??this.dataPatched.pathSnapping.orientation;if(null===e)return;let a=t.find(this.isVirtualEntity&&t.pathConstraints.getConstraint(this.uuid)||e);if(!a)return;this._needApplyPathSnapping=!1;let n=a.data;if(n.geometry.path.points.length<=1)return;let o=rt(n.geometry.path),l=function(t){let e=t%1;return e<0?e+1:0===e&&t>0?1:e}(i+s),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,s){ot.setFromRotationMatrix(nt.extractRotation(s));let r=t.clone().applyMatrix4(nt.copy(s).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:r,rotation:(new f).setFromEuler(ht.setFromQuaternion(ot.invert().multiply(lt))).multiplyScalar(u.RAD2DEG)}}(h,"tangential"===r?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===D.Cloner)return void i("cloners","a cloner");this.cloner=new D.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),s=Math.abs(i.width),r=Math.abs(i.height??s),a=Math.abs(i.depth??s),n=Math.abs(Math.min(s,a))/2;return{parameters:Object.assign(i,{width:s,height:r,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:s,radius:r,revolutions:a,segments:n,pathRadius:o,pathType:l,pathSegments:h,cornerRadius:p,cornerSegments:d}=t.parameters,c=new Et(!1,e,i,s,r,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,s=1,r=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(),C=M(),D=M(),O=M(),_=M(),V=M(),R=M(),T=M(),W=M(),U=i-2*o+.001,I=U/a,L=Math.ceil(n*a),F=L+1,z=U/L,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,Q=2*d+2,K=N*Q/2,J=K+N*F,X=Math.max(0,N*(F+Q)),[Y,$,tt]=[3,3,2].map(t=>Array(X*t).fill(0)),et=[],it=r-o;function st(e,i){let s=Math.PI/2;x=i*z,w=2*Math.PI*(x%I)/I+s,x+=j,S=Math.sin(w)*it,g=Math.cos(w)*it,t?e.set(g,S,x):e.set(g,x,S)}st(B,-1e-10),st(P,0),C.copy(B),st(B,1);let rt=B.distanceTo(P),at=c?0:q+H,nt=rt*L+2*at,ot=H,lt=nt-at;for(let e=0;e<=L;e++){st(E,e),W.subVectors(E,C).normalize(),C.copy(E),R.copy(E).setComponent(+t+1,0).normalize(),T.crossVectors(W,R).normalize();let i=0===e,s=e===L,r=i?3*Math.PI/2:G,a=i?ot:lt,n=i?N:J,l=i?0:X-N,p=W.clone().multiplyScalar(i?-q:q).add(E),u=W.clone().multiplyScalar(i?-1:1).normalize();for(let t=0;t<N;t++){let m=t*k;if(D.addVectors(B.copy(R).multiplyScalar(o*Math.cos(m)),P.copy(T).multiplyScalar(o*Math.sin(m))),O.copy(D).normalize(),i||s){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]=+s,tt[2*Z+1]=t/h),P.copy(O).multiplyScalar(H),A.addVectors(E,P);for(let e=0;e<d;e++){let s=e*G+r;_.addVectors(B.copy(W).multiplyScalar(q*Math.sin(s)),P.copy(O).multiplyScalar(q*Math.cos(s))),V.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]=V.getComponent(t)});let o=+i+Math.sin(s);tt[2*Z]=(a+q*o)/nt,tt[2*Z+1]=t/h}}P.addVectors(E,D),Z=K+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*rt)/nt,tt[2*Z+1]=t/h}}let ht=F+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,s,r=this.userData.parameters,a=Math.ceil(r.tubularSegments),n=r.radialSegments,o=n+1,l=[];for(let r=1;r<a;r++)for(let a=0;a<n;a++)t=r*o+a,e=t+1,i=t+o,s=e+o,l.push(t,e,i,e,s,i);for(let r=0;r<n;r++)t=a*o+r,e=t+1,i=r+o,s=r+1+o,l.push(t,e,i,e,s,i);return Mt.array=new Uint32Array(l),Mt.count=l.length,Mt}},At=new Map,Ct=0;function Dt(t){return Pt||(Pt=async function(){let e=t??"https://cdn.spline.design/@splinetool/runtime@2.0.164/build",i=import("./boolean.js"),[s,r]=await Promise.all([i,fetch(`${e}/boolean.wasm`).then(t=>t.arrayBuffer())]);await s.default({module_or_path:r}),bt=s}())}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 Vt(t){return At.set(++Ct,t),Ct}var Rt={0:0,1:1,2:2};function Tt(t,e,i){if(void 0===bt)return-1;let{positions:s,indices:r,normals:a}=function(t,e){if(e&&void 0!==t.userData.positions){let e=t.userData,i=[];for(let t=0,s=0;t<e.verticesPerFace.length;t++){let r=e.verticesPerFace[t];for(let t=1;t<r-1;t++)i.push(e.indices[s],e.indices[s+t],e.indices[s+t+1]);s+=r}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 s,r=t.getAttribute("position");if(null===i){s=new Uint32Array(r.count);for(let t=0;t<s.length;t++)s[t]=t}else s=i.array instanceof Uint32Array?i.array:new Uint32Array(i.array);let a=t.getAttribute("normal"),n=void 0!==a&&3===a.itemSize&&a.count===r.count&&a.array instanceof Float32Array&&!0!==a.isInterleavedBufferAttribute?a.array:void 0;return{positions:r.array,indices:s,normals:n}}(t,e);return Vt(new bt.CsgMesh(s,r,a))}function Wt(t,e){let i=Ot(),s=Rt[e];if(void 0===s)throw new Error("Unknown boolean operation "+e);let r=t.map(_t);if(1===r.length)return i.clone_mesh(r[0]);let a,n=[];if(2===e&&r.length>2){let t=r[0];for(let e=1;e<r.length-1;e++)t=i.boolean_mesh(t,r[e],0),n.push(t);a=i.boolean_mesh(r[r.length-1],t,2)}else if(2===e)a=i.boolean_mesh(r[1],r[0],2);else{let t=r[r.length-1];for(let e=0;e<r.length-1&&(t=i.boolean_mesh(t,r[e],s),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,s){let r=Ot(),a=Wt(t,e),n=r.mesh_render_data(a,Math.max(s,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 Vt(a)}function It(t,e){let i=Ot(),s=Wt(t,e),r=i.mesh_topological_data(s),a=r.positions(),n=r.indices();return r.free(),s.free(),{positions:a,indices:n,verticesPerFace:new Uint8Array(n.length/3).fill(3)}}function Lt(t,e){_t(t).transform(new Float32Array(e.elements))}function Ft(t){let e=At.get(t);void 0!==e&&(e.free(),At.delete(t))}function zt(t,e){return Vt(Ot().instanced_union(_t(t),e))}function jt(t){return null!==t&&"booleanOp"in t}var Nt=class extends(St(C)){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&&(Ft(this.booleanMeshSetAddress),this.booleanMeshSetAddress=-1)}dispose(){super.dispose(),this.freeBooleanPointer()}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,s,r){let a=1/0,n=1/0,o=1/0,l=-1/0,h=-1/0,p=-1/0;for(let s=e;s<i;s++){let e=t.getX(s),i=t.getY(s),r=t.getZ(s);e<a&&(a=e),i<n&&(n=i),r<o&&(o=r),e>l&&(l=e),i>h&&(h=i),r>p&&(p=r)}kt.min.set(a,n,o),kt.max.set(l,h,p),kt.getCenter(s),kt.getSize(r).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,D as c,j as d,N as e,G as f,rt as g,at as h,ct as i,St as j,wt as k,Bt as l,Et as m,Dt as n,Tt as o,Ut as p,It as q,Lt as r,Ft as s,zt 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{C as s,Ca as r,Da as a,Fa as n,J as o,Sa as l,i as h,j as p,k as d,n as c}from"./runtime-chunk-ADHKZQMB.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 C}from"./runtime-chunk-KPOUV3HD.js";var D={Cloner:null,changeEntityProptotype:()=>{},createEntity:()=>{}};function O(t,e){let i=[];if(e.length!==t.length)return null;{let s=0;for(;s<t.length;){if("*"===e[s])i.push(t[s]);else if(t[s]!==e[s])return null;s+=1}}return i}function _(t,e){let i=[];if(!(e.length<=t.length))return null;{let s=0;for(;s<e.length;){if("*"===e[s])i.push(t[s]);else if(t[s]!==e[s])return null;s+=1}}return i}var V=new f,R=new f,T=new v,W=[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]],I=[[0,2],[7,5],[4,1],[3,6],[4,3],[1,6]],L=(t,e,i)=>{t.updateEntityBoxSize(V,R),T.copy(e).multiply(t.matrixWorld),0===R.x&&0===R.y&&0===R.z?i.push(new f(V.x,V.y,V.z).applyMatrix4(T)):W.forEach(t=>{i.push(t.clone().multiply(R).add(V).applyMatrix4(T))})},F=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 s=[];if(!0===i){let i=[];t.traverseEntity(t=>{if(t.visible||t.cloner&&t.data.visible){if(!("geometry"in t))return T.copy(e).multiply(t.matrixWorld),void i.push((new f).applyMatrix4(T));L(t,e,s)}}),0===s.length&&s.push(...i)}else L(t,e,s);return this.setFromPoints(s)}getCenter(t){return(t=super.getCenter(t)).applyMatrix4(this.matrix),t}getPositionToCenter(t){return(t=super.getCenter(t)).applyMatrix4(T.copy(this.matrix).setPosition(0,0,0)),t}computeVertices(){this.getSize(R).multiplyScalar(.5),this.getCenter(V),T.copy(this.matrix).setPosition(V),this.vertices=W.map(t=>t.clone().multiply(R).applyMatrix4(T))}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=I.map(([t,e])=>this.vertices[t].clone().add(this.vertices[e]).multiplyScalar(.5))}},z=new f(1,1,1);function j(t,e,i,s,r=new v){return r.compose(t,e,z).multiply(i).scale(s)}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,s,r,a){this.copyPreviousMatrix&&this.previousModelViewMatrix.copy(this.modelViewMatrix)}},H=class extends x{constructor(){super()}getPoints(t=12){let e,i=[],s=this.getCurveLengths(),r=s[s.length-1]/s.length;for(let a=0,n=this.curves;a<n.length;a++){let o=n[a],l=0===a?s[a]:s[a]-s[a-1],h=Math.ceil(t*l/r),p=o.getPoints(h);for(let t=0;t<p.length;t++){let s=p[t];e&&e.equals(s)||(i.push(s),e=s)}}return this.autoClose&&i.length>1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i}},q=.001,Z=new f,Q=new f,K=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),Q.subVectors(e,i),Z.cross(Q).length()<=q}var st=new WeakMap;function rt(t){let e=st.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]],s=[new f(...e[0].data.position)];K.copy(s[0]);for(let t=0;t<e.length-1;t++)Z.fromArray(e[t].data.position),Q.fromArray(e[t+1].data.position),X.subVectors(Z,K),$.subVectors(Z,Q),X.cross($).length()>q&&(i.push(e[t]),s.push((new f).copy(Z)),K.copy(Z));let r=e[e.length-1];i.push(r),s.push(new f(...r.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(s[t],h[t],s[e])&&it(s[t],l[e],s[e]))}let d=[];for(let t=0;t<o;t++){let e=i[t].data,r=s[t],n={position:r,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(s[c],r).normalize(),y=(new f).subVectors(s[u],r).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=K.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],s=d[e];if(0!==i.removedLength||0!==s.removedLength){let t=i.position.distanceTo(s.position);i.removedLength=Math.min(i.removedLength,t/2),s.removedLength=Math.min(s.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],s=d[e],r=null;if(p[t]){let t=i.position.clone(),e=s.position.clone();(0!==i.removedLength||0!==s.removedLength)&&(i.nextDir&&t.add(K.copy(i.nextDir).setLength(i.removedLength)),s.prevDir&&e.add(K.copy(s.prevDir).setLength(s.removedLength))),t.distanceTo(e)>q&&(r=new y(t,t.clone().lerp(e,.3),e.clone().lerp(t,.3),e))}else i.position.distanceTo(s.position)>q&&(r=new y(i.position,i.controlNext,s.controlPrevious,s.position));c[2*t+1]=r}for(let t=0;t<o;t++){let e=d[t];if(0===e.removedLength)continue;let i=e.position,s=e.prevDir.clone().multiplyScalar(e.removedLength).add(i),r=e.nextDir.clone().multiplyScalar(e.removedLength).add(i),a=e.tan*e.removedLength;J.addVectors(e.prevDir,e.nextDir).normalize(),X.copy(s).lerp(r,.5);let n=s.distanceTo(r)/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(s)).add(i),tt.copy($).lerp(Y,2);let l=s.clone().lerp($,4/3),h=r.clone().lerp(tt,4/3);c[2*t]=new y(s,l,h,r)}let u=new H;for(let t=0;t<c.length;t++){let e=c[t];e&&u.add(e)}return u}(t);return st.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 F,this._recursiveBBox=new F,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,s)=>i?.shared.getVariable(e,[this.uuid,t,mt[s]])??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 s=c.zoom(i,t.path.slice(2));if(s)for(let i in t.props)void 0===t.props[i]&&i in s&&(e[i]=s[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,s]of Object.entries(t.props))void 0===s&&(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 s;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&&(s={...t,props:e})}else for(let e of a.rootOverrideProps)if(_(t.path,[e])){s=t;break}void 0!==s&&this.instances.forEach(t=>{if(t.isInstanceRoot){let e=h.filterOp(t.overrideData,s);e&&t.updateByOp(e,d.applySimple(t.data,e),i,!0)}}),this.instances.forEach(s=>{if(!s.isInstanceRoot){let r=h.filterOp(s.overrideData,t);if(r){let a;a=o===s.data&&t===r?e:d.applySimple(s.data,r),s.updateByOp(r,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)&&D.changeEntityProptotype(this,this.data,i);else if(1===t.path.length&&"geometry"===t.path[0]&&0===t.type&&"type"in t.props){D.changeEntityProptotype(this,this.data,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 s=e.morphTargetInfluences.get(t.path[1])?.data.name;s&&this.updateMorphInfluences(s,i.shared.getVariable(t.props.value,[this.uuid,"morphTargetInfluences",s]))}if(null!==_(t.path,["pathSnapping"])&&(this.updatePathSnapping(e.pathSnapping),this.isVirtualEntity&&i.scene?.syncInstancePathConstraint(this)),null!==_(t.path,["cloner"])){let s=d.drop(t,1);0===s.path.length&&0===s.type&&!0===s.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,s=this._updatedPathSnapping?.offset??this.dataPatched.pathSnapping.offset??0,r=this._updatedPathSnapping?.orientation??this.dataPatched.pathSnapping.orientation;if(null===e)return;let a=t.find(this.isVirtualEntity&&t.pathConstraints.getConstraint(this.uuid)||e);if(!a)return;this._needApplyPathSnapping=!1;let n=a.data;if(n.geometry.path.points.length<=1)return;let o=rt(n.geometry.path),l=function(t){let e=t%1;return e<0?e+1:0===e&&t>0?1:e}(i+s),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,s){ot.setFromRotationMatrix(nt.extractRotation(s));let r=t.clone().applyMatrix4(nt.copy(s).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:r,rotation:(new f).setFromEuler(ht.setFromQuaternion(ot.invert().multiply(lt))).multiplyScalar(u.RAD2DEG)}}(h,"tangential"===r?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===D.Cloner)return void i("cloners","a cloner");this.cloner=new D.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),s=Math.abs(i.width),r=Math.abs(i.height??s),a=Math.abs(i.depth??s),n=Math.abs(Math.min(s,a))/2;return{parameters:Object.assign(i,{width:s,height:r,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:s,radius:r,revolutions:a,segments:n,pathRadius:o,pathType:l,pathSegments:h,cornerRadius:p,cornerSegments:d}=t.parameters,c=new Et(!1,e,i,s,r,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,s=1,r=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(),C=M(),D=M(),O=M(),_=M(),V=M(),R=M(),T=M(),W=M(),U=i-2*o+.001,I=U/a,L=Math.ceil(n*a),F=L+1,z=U/L,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,Q=2*d+2,K=N*Q/2,J=K+N*F,X=Math.max(0,N*(F+Q)),[Y,$,tt]=[3,3,2].map(t=>Array(X*t).fill(0)),et=[],it=r-o;function st(e,i){let s=Math.PI/2;x=i*z,w=2*Math.PI*(x%I)/I+s,x+=j,S=Math.sin(w)*it,g=Math.cos(w)*it,t?e.set(g,S,x):e.set(g,x,S)}st(B,-1e-10),st(P,0),C.copy(B),st(B,1);let rt=B.distanceTo(P),at=c?0:q+H,nt=rt*L+2*at,ot=H,lt=nt-at;for(let e=0;e<=L;e++){st(E,e),W.subVectors(E,C).normalize(),C.copy(E),R.copy(E).setComponent(+t+1,0).normalize(),T.crossVectors(W,R).normalize();let i=0===e,s=e===L,r=i?3*Math.PI/2:G,a=i?ot:lt,n=i?N:J,l=i?0:X-N,p=W.clone().multiplyScalar(i?-q:q).add(E),u=W.clone().multiplyScalar(i?-1:1).normalize();for(let t=0;t<N;t++){let m=t*k;if(D.addVectors(B.copy(R).multiplyScalar(o*Math.cos(m)),P.copy(T).multiplyScalar(o*Math.sin(m))),O.copy(D).normalize(),i||s){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]=+s,tt[2*Z+1]=t/h),P.copy(O).multiplyScalar(H),A.addVectors(E,P);for(let e=0;e<d;e++){let s=e*G+r;_.addVectors(B.copy(W).multiplyScalar(q*Math.sin(s)),P.copy(O).multiplyScalar(q*Math.cos(s))),V.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]=V.getComponent(t)});let o=+i+Math.sin(s);tt[2*Z]=(a+q*o)/nt,tt[2*Z+1]=t/h}}P.addVectors(E,D),Z=K+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*rt)/nt,tt[2*Z+1]=t/h}}let ht=F+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,s,r=this.userData.parameters,a=Math.ceil(r.tubularSegments),n=r.radialSegments,o=n+1,l=[];for(let r=1;r<a;r++)for(let a=0;a<n;a++)t=r*o+a,e=t+1,i=t+o,s=e+o,l.push(t,e,i,e,s,i);for(let r=0;r<n;r++)t=a*o+r,e=t+1,i=r+o,s=r+1+o,l.push(t,e,i,e,s,i);return Mt.array=new Uint32Array(l),Mt.count=l.length,Mt}},At=new Map,Ct=0;function Dt(t){return Pt||(Pt=async function(){let e=t??"https://cdn.spline.design/@splinetool/runtime@2.0.165/build",i=import("./boolean.js"),[s,r]=await Promise.all([i,fetch(`${e}/boolean.wasm`).then(t=>t.arrayBuffer())]);await s.default({module_or_path:r}),bt=s}())}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 Vt(t){return At.set(++Ct,t),Ct}var Rt={0:0,1:1,2:2};function Tt(t,e,i){if(void 0===bt)return-1;let{positions:s,indices:r,normals:a}=function(t,e){if(e&&void 0!==t.userData.positions){let e=t.userData,i=[];for(let t=0,s=0;t<e.verticesPerFace.length;t++){let r=e.verticesPerFace[t];for(let t=1;t<r-1;t++)i.push(e.indices[s],e.indices[s+t],e.indices[s+t+1]);s+=r}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 s,r=t.getAttribute("position");if(null===i){s=new Uint32Array(r.count);for(let t=0;t<s.length;t++)s[t]=t}else s=i.array instanceof Uint32Array?i.array:new Uint32Array(i.array);let a=t.getAttribute("normal"),n=void 0!==a&&3===a.itemSize&&a.count===r.count&&a.array instanceof Float32Array&&!0!==a.isInterleavedBufferAttribute?a.array:void 0;return{positions:r.array,indices:s,normals:n}}(t,e);return Vt(new bt.CsgMesh(s,r,a))}function Wt(t,e){let i=Ot(),s=Rt[e];if(void 0===s)throw new Error("Unknown boolean operation "+e);let r=t.map(_t);if(1===r.length)return i.clone_mesh(r[0]);let a,n=[];if(2===e&&r.length>2){let t=r[0];for(let e=1;e<r.length-1;e++)t=i.boolean_mesh(t,r[e],0),n.push(t);a=i.boolean_mesh(r[r.length-1],t,2)}else if(2===e)a=i.boolean_mesh(r[1],r[0],2);else{let t=r[r.length-1];for(let e=0;e<r.length-1&&(t=i.boolean_mesh(t,r[e],s),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,s){let r=Ot(),a=Wt(t,e),n=r.mesh_render_data(a,Math.max(s,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 Vt(a)}function It(t,e){let i=Ot(),s=Wt(t,e),r=i.mesh_topological_data(s),a=r.positions(),n=r.indices();return r.free(),s.free(),{positions:a,indices:n,verticesPerFace:new Uint8Array(n.length/3).fill(3)}}function Lt(t,e){_t(t).transform(new Float32Array(e.elements))}function Ft(t){let e=At.get(t);void 0!==e&&(e.free(),At.delete(t))}function zt(t,e){return Vt(Ot().instanced_union(_t(t),e))}function jt(t){return null!==t&&"booleanOp"in t}var Nt=class extends(St(C)){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&&(Ft(this.booleanMeshSetAddress),this.booleanMeshSetAddress=-1)}dispose(){super.dispose(),this.freeBooleanPointer()}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,s,r){let a=1/0,n=1/0,o=1/0,l=-1/0,h=-1/0,p=-1/0;for(let s=e;s<i;s++){let e=t.getX(s),i=t.getY(s),r=t.getZ(s);e<a&&(a=e),i<n&&(n=i),r<o&&(o=r),e>l&&(l=e),i>h&&(h=i),r>p&&(p=r)}kt.min.set(a,n,o),kt.max.set(l,h,p),kt.getCenter(s),kt.getSize(r).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,D as c,j as d,N as e,G as f,rt as g,at as h,ct as i,St as j,wt as k,Bt as l,Et as m,Dt as n,Tt as o,Ut as p,It as q,Lt as r,Ft as s,zt as t,Gt as u,Zt as v};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./runtime-chunk-
|
|
1
|
+
import{a as t}from"./runtime-chunk-3PSVYH6D.js";import{d as e}from"./runtime-chunk-UK7SWR5G.js";import{Uc as s}from"./runtime-chunk-KPOUV3HD.js";var r=class extends(e(s,t)){constructor(t,e,s){super(),this.super_Entity(t,e),this.context=s,this.objectHelper.update()}updateState(t,e){this.updateState_Entity(t,e)}};export{r as a};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,b as t}from"./runtime-chunk-LAKWQQVI.js";import{a as r,b as i,c as s,d as o}from"./runtime-chunk-IZX6T7H2.js";import{na as a}from"./runtime-chunk-4CHVYZUG.js";import{h as n,o as h,p,q as c,r as m,s as d,t as l,v as u}from"./runtime-chunk-456VI34X.js";import{f}from"./runtime-chunk-RTLL6WIB.js";import{i as g}from"./runtime-chunk-2PT2WH66.js";import{Aa as y,K as v}from"./runtime-chunk-ADHKZQMB.js";import{Ce as C,Gc as b,Hc as T,Qc as j,Tc as w,Vc as P,dd as M,fd as x,wd as O,we as A,yd as S,ye as _,ze as F}from"./runtime-chunk-KPOUV3HD.js";var D=new T,V=new _,W=class extends S{constructor(e){let t=new x,r=new O({color:16777215,vertexColors:!0,toneMapped:!1}),i=[],s=[],o={},a=new P(15711266),n=new P(15711266),h=new P(2857471);function p(e,t,r){c(e,r),c(t,r)}function c(e,t){i.push(0,0,0),s.push(t.r,t.g,t.b),void 0===o[e]&&(o[e]=[]),o[e].push(i.length/3-1)}p("n1","n2",a),p("n2","n4",a),p("n4","n3",a),p("n3","n1",a),p("f1","f2",a),p("f2","f4",a),p("f4","f3",a),p("f3","f1",a),p("n1","f1",a),p("n2","f2",a),p("n3","f3",a),p("n4","f4",a),p("p","n1",n),p("p","n2",n),p("p","n3",n),p("p","n4",n),p("u1","u2",h),p("u2","u3",h),p("u3","u1",h),t.setAttribute("position",new M(i,3)),t.setAttribute("color",new M(s,3)),super(t,r),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}update(){let e=this.geometry,t=this.pointMap;V.projectionMatrixInverse.elements=[.5112609807824982,-0,-0,-0,-0,.41421356237309503,-0,-0,-0,-0,-0,-.099999,-0,-0,-1.0000000000000002,.100001];let r=.8;U("n1",t,e,V,-1,-1,r),U("n2",t,e,V,1,-1,r),U("n3",t,e,V,-1,1,r),U("n4",t,e,V,1,1,r);let i=r;U("f1",t,e,V,-1,-1,i),U("f2",t,e,V,1,-1,i),U("f3",t,e,V,-1,1,i),U("f4",t,e,V,1,1,i);let s=i;U("u1",t,e,V,.35,1.1,s),U("u2",t,e,V,-.35,1.1,s),U("u3",t,e,V,0,1.55,s),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}};function U(e,t,r,i,s,o,a){D.set(s,o,a).unproject(i);let n=t[e];if(void 0!==n){let e=r.getAttribute("position");for(let t=0,r=n.length;t<r;t++)e.setXYZ(n[t],D.x,D.y,D.z)}}var I=class extends(r(W)){constructor(e){super(e),this.object=e,this.name=`CombinedCameraHelper: ${e.uuid}`}updateMatrixWorld(e){super.updateMatrixWorld(e),this.updateTarget()}updateTarget(){let e=this.object.getTarget();this.updateWorldMatrix(!0,!1),this.worldToLocal(e)}raycast(e,t){i(this.object,this.geometry,e,t,!0)}};function z(e){return 1-Math.pow(1-e,3)}var B=new T,L=new T,H=new b,k=new T,R=new T,q=new T,E=class extends(o(_,I)){constructor(e="",t={...y.defaultData,name:""}){super(),this._cameraType="OrthographicCamera",this.targetOffset=v.DefaultTargetOffset,this.isUpVectorFlipped=!1,this.angleOffsetFromUp=0,this.wasMovedByUser=!1,this.wasMovedBySwitchCameraAction=!1,this._createdAt=typeof performance<"u"?performance.now():0,this._tickProjectionTransition=()=>{let e=this._projectionTransition;if(void 0===e)return;if(this.disposed)return void this._endProjectionTransition();e.raf=requestAnimationFrame(this._tickProjectionTransition);let t=E.projectionTransitionRequestRender??e.requestRender;this.updateProjectionMatrix(),t?.()},this.super_Entity(e,t),this.previousProjectionMatrix=new j,this.matrixAutoUpdate=!0,this.width=window.innerWidth,this.height=window.innerHeight;let r=this.width,i=this.height;this.orthoCamera=new C(-.5*r,.5*r,.5*i,-.5*i,-5e4,1e4),this.perspCamera=new F(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(e){let t=E.projectionTransitionsEnabled;E.projectionTransitionsEnabled=!1;try{return e()}finally{E.projectionTransitionsEnabled=t}}get isPerspectiveCamera(){return"PerspectiveCamera"===this.cameraType}get isOrthographicCamera(){return!this.isPerspectiveCamera}get cameraType(){return this._cameraType}set fov(e){this.perspCamera.fov=e}get fov(){return this.perspCamera.fov}setNear(e,t){"PerspectiveCamera"===e?this.perspCamera.near=t:this.orthoCamera.near=t}setZoom(e,t){t>=0&&("PerspectiveCamera"===e?this.perspCamera.zoom=t:this.orthoCamera.zoom=t)}set cameraType(e){"PerspectiveCamera"===e?this.toPerspective():"OrthographicCamera"===e&&this.toOrthographic()}get near(){return"PerspectiveCamera"===this._cameraType?this.perspCamera.near:this.orthoCamera.near}set near(e){"PerspectiveCamera"===this._cameraType?this.perspCamera.near=e:this.orthoCamera.near=e}get zoom(){return"PerspectiveCamera"===this._cameraType?this.perspCamera.zoom:this.orthoCamera.zoom}set zoom(e){e>=0&&("PerspectiveCamera"===this._cameraType?this.perspCamera.zoom=e:this.orthoCamera.zoom=e)}lookAt(e,t,r){"number"==typeof e&&(e=new T(e,t,r)),super.lookAt(e),this.getWorldPosition(B),this.targetOffset=B.distanceTo(e)}getTarget(e=new T){return this.getWorldDirection(L),this.getWorldPosition(B),L.multiplyScalar(this.targetOffset),e.copy(B).add(L),e}getDistanceToTarget(){let e=this.getTarget();return this.getWorldPosition(B),B.distanceTo(e)}updateUp(){this.getWorldQuaternion(H),k.set(0,0,1).applyQuaternion(H),R.copy(w.DEFAULT_UP),this.isUpVectorFlipped&&R.negate(),R.applyQuaternion(H),q.copy(w.DEFAULT_UP).projectOnPlane(k),this.angleOffsetFromUp=q.angleTo(R),this.angleOffsetFromUp*=q.cross(R).dot(k)>=0?1:-1}updateTransformState(e,t){let r=super.updateTransformState(e,t);return void 0!==e.isUpVectorFlipped&&(this.isUpVectorFlipped=e.isUpVectorFlipped),this.updateUp(),r}getViewFrontToObject(e){let t=e.getWorldPosition(new T),r=e.getWorldDirection(new T).multiplyScalar(this.targetOffset);return{position:t.clone().add(r),target:t}}getViewToTarget(e){let t=this.getWorldDirection(new T).multiplyScalar(this.targetOffset);return{position:e.clone().sub(t),target:e}}getViewToObject(e){let t=new T;return e.getWorldPosition(t),this.getViewToTarget(t)}setViewplaneSize(e,t,r=!1){if(this.aspect=e/t,r){let r=e>t?this.aspect:1,i=e>t?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*-e,this.right=.5*e,this.top=.5*t,this.bottom=.5*-t;this.updateProjectionMatrix()}copyViewPlaneSize(e){this.aspect=e.aspect,this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.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 e=this._projectionTransition;if(void 0===e)return 1;let t=(performance.now()-e.start)/e.duration;return t>=1?1:t<=0?0:z(t)}get _activeSubCamera(){return"PerspectiveCamera"===this._cameraType?this.perspCamera:this.orthoCamera}_canAnimateProjection(){return E.projectionTransitionsEnabled&&"function"==typeof requestAnimationFrame&&typeof performance<"u"&&performance.now()-this._createdAt>=E.projectionTransitionMinAgeMs}_beginProjectionTransition(e){let t=this._projectionTransition;void 0===t&&(t={from:new j,blend:new j,blendInverse:new j,start:0,duration:E.projectionTransitionDuration,referenceDepth:1,raf:0,requestRender:e},this._projectionTransition=t),t.from.copy(this.projectionMatrix),t.start=performance.now(),t.duration=E.projectionTransitionDuration,t.referenceDepth=Number.isFinite(this.targetOffset)?Math.max(1,this.targetOffset):1,e&&(t.requestRender=e),0!==t.raf&&cancelAnimationFrame(t.raf),t.raf=requestAnimationFrame(this._tickProjectionTransition)}_applyProjectionTransition(){let e=this._projectionTransition;if(void 0===e)return;let t=(performance.now()-e.start)/e.duration;if(t>=1)return void this._endProjectionTransition();let r=z(t),i=e.from.elements,s=this._activeSubCamera.projectionMatrix.elements,o=e.blend.elements,a=e.referenceDepth,n=Math.max(1e-6,i[15]-i[11]*a),h=r*n/(r*n+(1-r)*Math.max(1e-6,s[15]-s[11]*a));for(let e=0;e<16;e++)o[e]=i[e]+(s[e]-i[e])*h;e.blendInverse.copy(e.blend).invert(),this.projectionMatrix=e.blend,this.projectionMatrixInverse=e.blendInverse}_endProjectionTransition(){let e=this._projectionTransition;if(void 0===e)return;0!==e.raf&&cancelAnimationFrame(e.raf),this._projectionTransition=void 0;let t=this._activeSubCamera;this.projectionMatrix=t.projectionMatrix,this.projectionMatrixInverse=t.projectionMatrixInverse}_syncProjectionTransition(e){let t=e._projectionTransition;if(void 0===t)return void(void 0!==this._projectionTransition&&this._endProjectionTransition());let r=this._projectionTransition;void 0===r?(r={from:new j,blend:new j,blendInverse:new j,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(t.from),r.start=t.start,r.duration=t.duration,r.referenceDepth=t.referenceDepth,this._applyProjectionTransition()}setFocalLength(e){this.perspCamera.setFocalLength(e),this.toPerspective()}getFocalLength(){return this.perspCamera.getFocalLength()}getEffectiveFOV(){return this.perspCamera.getEffectiveFOV()}getFilmWidth(){return this.perspCamera.getFilmWidth()}getFilmHeight(){return this.perspCamera.getFilmHeight()}setViewOffset(e,t,r,i,s,o){"PerspectiveCamera"===this._cameraType?this.perspCamera.setViewOffset(e,t,r,i,s,o):this.orthoCamera.setViewOffset(e,t,r,i,s,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(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}copy(e,t){return super.copy(e,t),this.parent=e.parent,this.orthoCamera.copy(e.orthoCamera),this.perspCamera.copy(e.perspCamera),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.far=e.far,this.view=null===e.view?null:Object.assign({},e.view),this._cameraType=e._cameraType,this.aspect=e.aspect,this.fov=e.fov,this.focus=e.focus,this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this.targetOffset=v.sanitizeTargetOffset(e.targetOffset),this.updateProjectionMatrix(),this._syncProjectionTransition(e),this}toCameraState(e=[]){let t={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 f(t,e)}updateCameraSubtype(e,t){let r="perspective"===e?"PerspectiveCamera":"OrthographicCamera";void 0!==t.zoom&&this.setZoom(r,t.zoom),void 0!==t.near&&this.setNear(r,t.near),void 0!==t.fov&&"PerspectiveCamera"===r&&(this.fov=t.fov)}updateState(e,t){this.updateCameraState(e,t)}updateCameraState(e,t){this.updateState_Entity(e,t),void 0!==e.far&&(this.far=e.far),void 0!==e.orthographic&&this.updateCameraSubtype("orthographic",e.orthographic),void 0!==e.perspective&&this.updateCameraSubtype("perspective",e.perspective),void 0!==e.type&&(e.type!==this._cameraType&&this._canAnimateProjection()&&this._beginProjectionTransition(t?.shared.requestRender),this.cameraType=e.type),void 0!==e.up&&this.up.fromArray(e.up.map(e=>"number"==typeof e?e:0)),void 0!==e.targetOffset&&(this.targetOffset=v.sanitizeTargetOffset(e.targetOffset)),void 0!==e.isUpVectorFlipped&&(this.isUpVectorFlipped=e.isUpVectorFlipped),this.updateProjectionMatrix()}updateByPatchedOp(e,t,r){super.updateByPatchedOp(e,t,r),1===e.path.length&&0===e.type&&this.updateCameraSubtype(e.path[0],e.props)}toState(e){return{...super.toState(e),...this.toCameraState(e),type:this.cameraType}}},G=E;G.projectionTransitionsEnabled=!1,G.projectionTransitionDuration=350,G.projectionTransitionMinAgeMs=1e3;var Q=new j,Z=new j,K=new j,N=new j,X=new j;function Y(e){let t=!1;return e.scene.objects.traverse((e,r)=>{"BooleanGeometry"===r.geometry?.type&&(t=!0)}),t}function $(e,t){let r=e.cloner;return void 0!==r&&r.parent===t?r:void 0}var J=new Float32Array(0);function ee(e,t,r,i){let s=16*(t.children.length+1);J.length<s&&(J=new Float32Array(s));let o=0,a=e=>{e.toArray(J,16*o),o++},n=!0!==t.parameters.hideBase;n&&a(i),K.copy(e.matrix);for(let e of t.children)!g(e)||!1===e.playModeVisible||(N.copy(e.matrix).multiply(e.pivotMatrix),X.multiplyMatrices(K,N),(!n||!X.equals(i))&&a(X));try{return 0===o?0:l(r,J.subarray(0,16*o))}finally{d(r)}}var te=class extends a{constructor(e,t,r){super(e,t),this.data=t,this.meshSetAddresses=[],this.needsTransformForDownstream=!1,this.geometry=new x,this.onAfterRender=(e,t,r,i,s,o)=>{super.onAfterRender(e,t,r,i,s,o),this.recomputeBoolean()},this.geometry.userData.parameters={width:0,height:0,depth:0}}get booleanOp(){return this.data.geometry.operation}get phongAngle(){return this.data.geometry.phongAngle??45}get isLOD(){return this.recomputeBoolean(),!1}updateByPatchedOp(e,t,r){super.updateByPatchedOp(e,t,r),1===e.path.length&&"geometry"===e.path[0]&&0===e.type&&void 0!==e.props.operation&&(this.freeBooleanPointer(),this.resetBBoxNeedsUpdate())}freeBooleanPointer(){super.freeBooleanPointer(),this.geometry.dispose()}recomputeBoolean(r,i=!0){if(-1!==this.booleanMeshSetAddress&&!r)return;for(let e=0;e<this.children.length;e++){let t=this.children[e];t instanceof te&&!0===t.dataPatched.visible&&t.recomputeBoolean(!0===r,i)}this.meshSetAddresses=[];for(let e=0;e<this.children.length;e++){let t=this.children[e];if(t instanceof u&&!0===t.dataPatched.visible&&t.geometry.attributes.position?.count>0&&t.geometry.drawRange.count>0&&0!==t.booleanMeshSetAddress){Q.copy(t.matrix).multiply(t.pivotMatrix);try{let e=$(t,this);if(-1===t.booleanMeshSetAddress){if((t.geometry.index??t.geometry.getAttribute("position")).count/3<15e5){let s=h(t.geometry,!0===r,i);t.booleanMeshSetAddress=void 0===e||-1===s?s:ee(t,e,s,Q)}if(-1===t.booleanMeshSetAddress)return;void 0===e&&m(t.booleanMeshSetAddress,Q),t.booleanMatrixInvOld.copy(Q).invert(),t.booleanWasTransformed=!1}else t instanceof te&&!0===t.needsTransformForDownstream?(void 0===e?m(t.booleanMeshSetAddress,Q):t.booleanMeshSetAddress=ee(t,e,t.booleanMeshSetAddress,Q),t.needsTransformForDownstream=!1):!0===t.booleanWasTransformed&&(m(t.booleanMeshSetAddress,Z.multiplyMatrices(Q,t.booleanMatrixInvOld)),t.booleanMatrixInvOld.copy(Q).invert(),t.booleanWasTransformed=!1)}catch(e){console.error(e),t.booleanMeshSetAddress=0,t.geometry.userData.booleanOperationDidFail=!0;continue}if(0===t.booleanMeshSetAddress)continue;this.meshSetAddresses.push(t.booleanMeshSetAddress),t.geometry.userData.booleanOperationDidFail=!1}}if(0===this.meshSetAddresses.length){if(0!==this.geometry.getAttribute("position")?.array.length){let e=this.geometry;e.dispose(),this.geometry=new x,this.geometry.userData=e.userData,this.geometry.boundingSphere=e.boundingSphere,this.geometry.setAttribute("position",new M([],3))}return void this.geometry.setDrawRange(0,0)}if(!0===r)return c(this.meshSetAddresses,this.booleanOp);let s=this.geometry;s.dispose(),this.geometry=new x,this.geometry.userData=s.userData,this.geometry.boundingSphere=s.boundingSphere;try{this.booleanMeshSetAddress=p(this.meshSetAddresses,this.booleanOp,this.geometry,this.phongAngle)}catch(e){this.booleanMeshSetAddress=0,this.geometry.userData.booleanOperationDidFail=!0,console.error(e)}this.booleanMatrixInvOld.copy(this.matrix).invert(),this.needsTransformForDownstream=!0,e(this),t(this)}dispose(){super.dispose(),this.geometry.dispose()}},re=new WeakSet;function ie(e){return e.isPointLight?1:(e.isSpotLight,3)}function se(e){return e.isDirectionalLight?0:e.isSpotLight?1:2}var oe,ae=[];function ne(e){ae.length=0,e.traverseVisible(e=>{(function(e){let t=e;return!0===t.isPointLight||!0===t.isSpotLight||!0===t.isDirectionalLight})(e)&&(!0===e.castShadow||re.has(e))&&ae.push(e)});let t=!1;if(0===ae.length)return t;ae.sort((e,t)=>se(e)-se(t)||e.id-t.id);let r=12;for(let e of ae){let i=ie(e);i<=r?(r-=i,re.delete(e)&&(e.castShadow=!0,t=!0)):!0===e.castShadow&&(e.castShadow=!1,re.add(e))}return ae.length=0,t}(oe||(oe={})).is=function(e){return n.is(e)&&e instanceof A};var he=(e,t)=>class extends(o(e,t)){updateState_Light(e,t){if(this.updateState_Entity(e,t),void 0!==e.color&&(this.color=t.shared.color(e.color)),void 0!==e.intensity&&(this.intensity=e.intensity*Math.PI),void 0!==e.depth){let t=this.shadow;t.camera.far=e.depth,t.needsUpdate=!0}void 0!==e.shadows&&(function(e){re.delete(e)}(this),this.castShadow=e.shadows)}},pe=e=>e instanceof u,ce=e=>null!==e&&e instanceof te,me=e=>s.is(e);export{G as a,Y as b,te as c,ne as d,oe as e,he as f,pe as g,ce as h,me as i};
|
|
1
|
+
import{a as e,b as t}from"./runtime-chunk-7IU5GEK4.js";import{a as r,b as i,c as s,d as o}from"./runtime-chunk-UK7SWR5G.js";import{na as a}from"./runtime-chunk-AWGPDK4A.js";import{h as n,o as h,p,q as c,r as m,s as d,t as l,v as u}from"./runtime-chunk-LAYGNGBR.js";import{f}from"./runtime-chunk-RTLL6WIB.js";import{i as g}from"./runtime-chunk-2PT2WH66.js";import{Aa as y,K as v}from"./runtime-chunk-ADHKZQMB.js";import{Ce as C,Gc as b,Hc as T,Qc as j,Tc as w,Vc as P,dd as M,fd as x,wd as A,we as O,yd as S,ye as _,ze as F}from"./runtime-chunk-KPOUV3HD.js";var D=new T,W=new _,U=class extends S{constructor(e){let t=new x,r=new A({color:16777215,vertexColors:!0,toneMapped:!1}),i=[],s=[],o={},a=new P(15711266),n=new P(15711266),h=new P(2857471);function p(e,t,r){c(e,r),c(t,r)}function c(e,t){i.push(0,0,0),s.push(t.r,t.g,t.b),void 0===o[e]&&(o[e]=[]),o[e].push(i.length/3-1)}p("n1","n2",a),p("n2","n4",a),p("n4","n3",a),p("n3","n1",a),p("f1","f2",a),p("f2","f4",a),p("f4","f3",a),p("f3","f1",a),p("n1","f1",a),p("n2","f2",a),p("n3","f3",a),p("n4","f4",a),p("p","n1",n),p("p","n2",n),p("p","n3",n),p("p","n4",n),p("u1","u2",h),p("u2","u3",h),p("u3","u1",h),t.setAttribute("position",new M(i,3)),t.setAttribute("color",new M(s,3)),super(t,r),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=o,this.update()}update(){let e=this.geometry,t=this.pointMap;W.projectionMatrixInverse.elements=[.5112609807824982,-0,-0,-0,-0,.41421356237309503,-0,-0,-0,-0,-0,-.099999,-0,-0,-1.0000000000000002,.100001];let r=.8;V("n1",t,e,W,-1,-1,r),V("n2",t,e,W,1,-1,r),V("n3",t,e,W,-1,1,r),V("n4",t,e,W,1,1,r);let i=r;V("f1",t,e,W,-1,-1,i),V("f2",t,e,W,1,-1,i),V("f3",t,e,W,-1,1,i),V("f4",t,e,W,1,1,i);let s=i;V("u1",t,e,W,.35,1.1,s),V("u2",t,e,W,-.35,1.1,s),V("u3",t,e,W,0,1.55,s),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}};function V(e,t,r,i,s,o,a){D.set(s,o,a).unproject(i);let n=t[e];if(void 0!==n){let e=r.getAttribute("position");for(let t=0,r=n.length;t<r;t++)e.setXYZ(n[t],D.x,D.y,D.z)}}var I=class extends(r(U)){constructor(e){super(e),this.object=e,this.name=`CombinedCameraHelper: ${e.uuid}`}updateMatrixWorld(e){super.updateMatrixWorld(e),this.updateTarget()}updateTarget(){let e=this.object.getTarget();this.updateWorldMatrix(!0,!1),this.worldToLocal(e)}raycast(e,t){i(this.object,this.geometry,e,t,!0)}};function z(e){return 1-Math.pow(1-e,3)}var B=new T,L=new T,H=new b,R=new T,k=new T,E=new T,q=class extends(o(_,I)){constructor(e="",t={...y.defaultData,name:""}){super(),this._cameraType="OrthographicCamera",this.targetOffset=v.DefaultTargetOffset,this.isUpVectorFlipped=!1,this.angleOffsetFromUp=0,this.wasMovedByUser=!1,this.wasMovedBySwitchCameraAction=!1,this._createdAt=typeof performance<"u"?performance.now():0,this._tickProjectionTransition=()=>{let e=this._projectionTransition;if(void 0===e)return;if(this.disposed)return void this._endProjectionTransition();e.raf=requestAnimationFrame(this._tickProjectionTransition);let t=q.projectionTransitionRequestRender??e.requestRender;this.updateProjectionMatrix(),t?.()},this.super_Entity(e,t),this.previousProjectionMatrix=new j,this.matrixAutoUpdate=!0,this.width=window.innerWidth,this.height=window.innerHeight;let r=this.width,i=this.height;this.orthoCamera=new C(-.5*r,.5*r,.5*i,-.5*i,-5e4,1e4),this.perspCamera=new F(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(e){let t=q.projectionTransitionsEnabled;q.projectionTransitionsEnabled=!1;try{return e()}finally{q.projectionTransitionsEnabled=t}}get isPerspectiveCamera(){return"PerspectiveCamera"===this.cameraType}get isOrthographicCamera(){return!this.isPerspectiveCamera}get cameraType(){return this._cameraType}set fov(e){this.perspCamera.fov=e}get fov(){return this.perspCamera.fov}setNear(e,t){"PerspectiveCamera"===e?this.perspCamera.near=t:this.orthoCamera.near=t}setZoom(e,t){t>=0&&("PerspectiveCamera"===e?this.perspCamera.zoom=t:this.orthoCamera.zoom=t)}set cameraType(e){"PerspectiveCamera"===e?this.toPerspective():"OrthographicCamera"===e&&this.toOrthographic()}get near(){return"PerspectiveCamera"===this._cameraType?this.perspCamera.near:this.orthoCamera.near}set near(e){"PerspectiveCamera"===this._cameraType?this.perspCamera.near=e:this.orthoCamera.near=e}get zoom(){return"PerspectiveCamera"===this._cameraType?this.perspCamera.zoom:this.orthoCamera.zoom}set zoom(e){e>=0&&("PerspectiveCamera"===this._cameraType?this.perspCamera.zoom=e:this.orthoCamera.zoom=e)}lookAt(e,t,r){"number"==typeof e&&(e=new T(e,t,r)),super.lookAt(e),this.getWorldPosition(B),this.targetOffset=B.distanceTo(e)}getTarget(e=new T){return this.getWorldDirection(L),this.getWorldPosition(B),L.multiplyScalar(this.targetOffset),e.copy(B).add(L),e}getDistanceToTarget(){let e=this.getTarget();return this.getWorldPosition(B),B.distanceTo(e)}updateUp(){this.getWorldQuaternion(H),R.set(0,0,1).applyQuaternion(H),k.copy(w.DEFAULT_UP),this.isUpVectorFlipped&&k.negate(),k.applyQuaternion(H),E.copy(w.DEFAULT_UP).projectOnPlane(R),this.angleOffsetFromUp=E.angleTo(k),this.angleOffsetFromUp*=E.cross(k).dot(R)>=0?1:-1}updateTransformState(e,t){let r=super.updateTransformState(e,t);return void 0!==e.isUpVectorFlipped&&(this.isUpVectorFlipped=e.isUpVectorFlipped),this.updateUp(),r}getViewFrontToObject(e){let t=e.getWorldPosition(new T),r=e.getWorldDirection(new T).multiplyScalar(this.targetOffset);return{position:t.clone().add(r),target:t}}getViewToTarget(e){let t=this.getWorldDirection(new T).multiplyScalar(this.targetOffset);return{position:e.clone().sub(t),target:e}}getViewToObject(e){let t=new T;return e.getWorldPosition(t),this.getViewToTarget(t)}setViewplaneSize(e,t,r=!1){if(this.aspect=e/t,r){let r=e>t?this.aspect:1,i=e>t?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*-e,this.right=.5*e,this.top=.5*t,this.bottom=.5*-t;this.updateProjectionMatrix()}copyViewPlaneSize(e){this.aspect=e.aspect,this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.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 e=this._projectionTransition;if(void 0===e)return 1;let t=(performance.now()-e.start)/e.duration;return t>=1?1:t<=0?0:z(t)}get _activeSubCamera(){return"PerspectiveCamera"===this._cameraType?this.perspCamera:this.orthoCamera}_canAnimateProjection(){return q.projectionTransitionsEnabled&&"function"==typeof requestAnimationFrame&&typeof performance<"u"&&performance.now()-this._createdAt>=q.projectionTransitionMinAgeMs}_beginProjectionTransition(e){let t=this._projectionTransition;void 0===t&&(t={from:new j,blend:new j,blendInverse:new j,start:0,duration:q.projectionTransitionDuration,referenceDepth:1,raf:0,requestRender:e},this._projectionTransition=t),t.from.copy(this.projectionMatrix),t.start=performance.now(),t.duration=q.projectionTransitionDuration,t.referenceDepth=Number.isFinite(this.targetOffset)?Math.max(1,this.targetOffset):1,e&&(t.requestRender=e),0!==t.raf&&cancelAnimationFrame(t.raf),t.raf=requestAnimationFrame(this._tickProjectionTransition)}_applyProjectionTransition(){let e=this._projectionTransition;if(void 0===e)return;let t=(performance.now()-e.start)/e.duration;if(t>=1)return void this._endProjectionTransition();let r=z(t),i=e.from.elements,s=this._activeSubCamera.projectionMatrix.elements,o=e.blend.elements,a=e.referenceDepth,n=Math.max(1e-6,i[15]-i[11]*a),h=r*n/(r*n+(1-r)*Math.max(1e-6,s[15]-s[11]*a));for(let e=0;e<16;e++)o[e]=i[e]+(s[e]-i[e])*h;e.blendInverse.copy(e.blend).invert(),this.projectionMatrix=e.blend,this.projectionMatrixInverse=e.blendInverse}_endProjectionTransition(){let e=this._projectionTransition;if(void 0===e)return;0!==e.raf&&cancelAnimationFrame(e.raf),this._projectionTransition=void 0;let t=this._activeSubCamera;this.projectionMatrix=t.projectionMatrix,this.projectionMatrixInverse=t.projectionMatrixInverse}_syncProjectionTransition(e){let t=e._projectionTransition;if(void 0===t)return void(void 0!==this._projectionTransition&&this._endProjectionTransition());let r=this._projectionTransition;void 0===r?(r={from:new j,blend:new j,blendInverse:new j,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(t.from),r.start=t.start,r.duration=t.duration,r.referenceDepth=t.referenceDepth,this._applyProjectionTransition()}setFocalLength(e){this.perspCamera.setFocalLength(e),this.toPerspective()}getFocalLength(){return this.perspCamera.getFocalLength()}getEffectiveFOV(){return this.perspCamera.getEffectiveFOV()}getFilmWidth(){return this.perspCamera.getFilmWidth()}getFilmHeight(){return this.perspCamera.getFilmHeight()}setViewOffset(e,t,r,i,s,o){"PerspectiveCamera"===this._cameraType?this.perspCamera.setViewOffset(e,t,r,i,s,o):this.orthoCamera.setViewOffset(e,t,r,i,s,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(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}copy(e,t){return super.copy(e,t),this.parent=e.parent,this.orthoCamera.copy(e.orthoCamera),this.perspCamera.copy(e.perspCamera),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.far=e.far,this.view=null===e.view?null:Object.assign({},e.view),this._cameraType=e._cameraType,this.aspect=e.aspect,this.fov=e.fov,this.focus=e.focus,this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this.targetOffset=v.sanitizeTargetOffset(e.targetOffset),this.updateProjectionMatrix(),this._syncProjectionTransition(e),this}toCameraState(e=[]){let t={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 f(t,e)}updateCameraSubtype(e,t){let r="perspective"===e?"PerspectiveCamera":"OrthographicCamera";void 0!==t.zoom&&this.setZoom(r,t.zoom),void 0!==t.near&&this.setNear(r,t.near),void 0!==t.fov&&"PerspectiveCamera"===r&&(this.fov=t.fov)}updateState(e,t){this.updateCameraState(e,t)}updateCameraState(e,t){this.updateState_Entity(e,t),void 0!==e.far&&(this.far=e.far),void 0!==e.orthographic&&this.updateCameraSubtype("orthographic",e.orthographic),void 0!==e.perspective&&this.updateCameraSubtype("perspective",e.perspective),void 0!==e.type&&(e.type!==this._cameraType&&this._canAnimateProjection()&&this._beginProjectionTransition(t?.shared.requestRender),this.cameraType=e.type),void 0!==e.up&&this.up.fromArray(e.up.map(e=>"number"==typeof e?e:0)),void 0!==e.targetOffset&&(this.targetOffset=v.sanitizeTargetOffset(e.targetOffset)),void 0!==e.isUpVectorFlipped&&(this.isUpVectorFlipped=e.isUpVectorFlipped),this.updateProjectionMatrix()}updateByPatchedOp(e,t,r){super.updateByPatchedOp(e,t,r),1===e.path.length&&0===e.type&&this.updateCameraSubtype(e.path[0],e.props)}toState(e){return{...super.toState(e),...this.toCameraState(e),type:this.cameraType}}},G=q;G.projectionTransitionsEnabled=!1,G.projectionTransitionDuration=350,G.projectionTransitionMinAgeMs=1e3;var K=new j,N=new j,Q=new j,Z=new j,Y=new j;function X(e){let t=!1;return e.scene.objects.traverse((e,r)=>{"BooleanGeometry"===r.geometry?.type&&(t=!0)}),t}function $(e,t){let r=e.cloner;return void 0!==r&&r.parent===t?r:void 0}var J=new Float32Array(0);function ee(e,t,r,i){let s=16*(t.children.length+1);J.length<s&&(J=new Float32Array(s));let o=0,a=e=>{e.toArray(J,16*o),o++},n=!0!==t.parameters.hideBase;n&&a(i),Q.copy(e.matrix);for(let e of t.children)!g(e)||!1===e.playModeVisible||(Z.copy(e.matrix).multiply(e.pivotMatrix),Y.multiplyMatrices(Q,Z),(!n||!Y.equals(i))&&a(Y));try{return 0===o?0:l(r,J.subarray(0,16*o))}finally{d(r)}}var te=class extends a{constructor(e,t,r){super(e,t),this.data=t,this.meshSetAddresses=[],this.needsTransformForDownstream=!1,this.geometry=new x,this.onAfterRender=(e,t,r,i,s,o)=>{super.onAfterRender(e,t,r,i,s,o),this.recomputeBoolean()},this.geometry.userData.parameters={width:0,height:0,depth:0}}get booleanOp(){return this.data.geometry.operation}get phongAngle(){return this.data.geometry.phongAngle??45}get isLOD(){return this.recomputeBoolean(),!1}updateByPatchedOp(e,t,r){super.updateByPatchedOp(e,t,r),1===e.path.length&&"geometry"===e.path[0]&&0===e.type&&void 0!==e.props.operation&&(this.freeBooleanPointer(),this.resetBBoxNeedsUpdate())}freeBooleanPointer(){super.freeBooleanPointer(),this.geometry.dispose()}recomputeBoolean(r,i=!0){if(-1!==this.booleanMeshSetAddress&&!r)return;for(let e=0;e<this.children.length;e++){let t=this.children[e];t instanceof te&&!0===t.dataPatched.visible&&t.recomputeBoolean(!0===r,i)}this.meshSetAddresses=[];for(let e=0;e<this.children.length;e++){let t=this.children[e];if(t instanceof u&&!0===t.dataPatched.visible&&t.geometry.attributes.position?.count>0&&t.geometry.drawRange.count>0&&0!==t.booleanMeshSetAddress){K.copy(t.matrix).multiply(t.pivotMatrix);try{let e=$(t,this);if(-1===t.booleanMeshSetAddress){if((t.geometry.index??t.geometry.getAttribute("position")).count/3<15e5){let s=h(t.geometry,!0===r,i);t.booleanMeshSetAddress=void 0===e||-1===s?s:ee(t,e,s,K)}if(-1===t.booleanMeshSetAddress)return;void 0===e&&m(t.booleanMeshSetAddress,K),t.booleanMatrixInvOld.copy(K).invert(),t.booleanWasTransformed=!1}else t instanceof te&&!0===t.needsTransformForDownstream?(void 0===e?m(t.booleanMeshSetAddress,K):t.booleanMeshSetAddress=ee(t,e,t.booleanMeshSetAddress,K),t.needsTransformForDownstream=!1):!0===t.booleanWasTransformed&&(m(t.booleanMeshSetAddress,N.multiplyMatrices(K,t.booleanMatrixInvOld)),t.booleanMatrixInvOld.copy(K).invert(),t.booleanWasTransformed=!1)}catch(e){console.error(e),t.booleanMeshSetAddress=0,t.geometry.userData.booleanOperationDidFail=!0;continue}if(0===t.booleanMeshSetAddress)continue;this.meshSetAddresses.push(t.booleanMeshSetAddress),t.geometry.userData.booleanOperationDidFail=!1}}if(0===this.meshSetAddresses.length){if(0!==this.geometry.getAttribute("position")?.array.length){let e=this.geometry;e.dispose(),this.geometry=new x,this.geometry.userData=e.userData,this.geometry.boundingSphere=e.boundingSphere,this.geometry.setAttribute("position",new M([],3))}return void this.geometry.setDrawRange(0,0)}if(!0===r)return c(this.meshSetAddresses,this.booleanOp);let s=this.geometry;s.dispose(),this.geometry=new x,this.geometry.userData=s.userData,this.geometry.boundingSphere=s.boundingSphere;try{this.booleanMeshSetAddress=p(this.meshSetAddresses,this.booleanOp,this.geometry,this.phongAngle)}catch(e){this.booleanMeshSetAddress=0,this.geometry.userData.booleanOperationDidFail=!0,console.error(e)}this.booleanMatrixInvOld.copy(this.matrix).invert(),this.needsTransformForDownstream=!0,e(this),t(this)}dispose(){super.dispose(),this.geometry.dispose()}},re=new WeakSet;function ie(e){return e.isPointLight?1:(e.isSpotLight,3)}function se(e){return e.isDirectionalLight?0:e.isSpotLight?1:2}var oe,ae=[];function ne(e){ae.length=0,e.traverseVisible(e=>{(function(e){let t=e;return!0===t.isPointLight||!0===t.isSpotLight||!0===t.isDirectionalLight})(e)&&(!0===e.castShadow||re.has(e))&&ae.push(e)});let t=!1;if(0===ae.length)return t;ae.sort((e,t)=>se(e)-se(t)||e.id-t.id);let r=12;for(let e of ae){let i=ie(e);i<=r?(r-=i,re.delete(e)&&(e.castShadow=!0,t=!0)):!0===e.castShadow&&(e.castShadow=!1,re.add(e))}return ae.length=0,t}(oe||(oe={})).is=function(e){return n.is(e)&&e instanceof O};var he=(e,t)=>class extends(o(e,t)){updateState_Light(e,t){if(this.updateState_Entity(e,t),void 0!==e.color&&(this.color=t.shared.color(e.color)),void 0!==e.intensity&&(this.intensity=e.intensity*Math.PI),void 0!==e.depth){let t=this.shadow;t.camera.far=e.depth,t.needsUpdate=!0}void 0!==e.shadows&&(function(e){re.delete(e)}(this),this.castShadow=e.shadows)}},pe=e=>e instanceof u,ce=e=>null!==e&&e instanceof te,me=e=>s.is(e);export{G as a,X as b,te as c,ne as d,oe as e,he as f,pe as g,ce as h,me as i};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./runtime-chunk-
|
|
1
|
+
import{j as e}from"./runtime-chunk-LAYGNGBR.js";import{Gd as t,Hc as r,Qc as i,Ye as n,ed as a,ld as o}from"./runtime-chunk-KPOUV3HD.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=H(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 H(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
|
+
import{e,g as t,j as r}from"./runtime-chunk-H6TAAMBR.js";import{a,b as n}from"./runtime-chunk-HD7WF3XN.js";import{a as i,e as s,g as o,h as l}from"./runtime-chunk-M7P5HXFX.js";import{b as u}from"./runtime-chunk-BELWYSDM.js";import{Z as d,fa as p,ga as c,i as h,na as f,oa as g}from"./runtime-chunk-AWGPDK4A.js";import{v as m}from"./runtime-chunk-LAYGNGBR.js";import{d as b,e as y}from"./runtime-chunk-RTLL6WIB.js";import{c as v,d as S,e as w}from"./runtime-chunk-2PT2WH66.js";import{A as j,B as A,C as V,G as D,H as E,M as R,N as M,O as k,P as x,Q as O,R as B,Xa as P,Ya as N,da as G,ma as C,qa as I,z as F}from"./runtime-chunk-ADHKZQMB.js";import{Ec as z,Fc as T,Gc as q,Hc as W,Rc as L,Vc as H}from"./runtime-chunk-KPOUV3HD.js";var X=Math.fround,U=class{constructor(e,t,r){this.apply=t,this.onStart=r,this.isPlaying=!1,this.isReversed=!1,this.endTime=0,this.startTime=0,this.isFirstLerpAfterStart=!1,this.config=e,this.duration=N(e.ease,X(e.duration/1e3)),this.delay=X(e.delay/1e3),this.currentRepeat=e.repeat}get repeatDirection(){return this.overrideDirection??this.config.direction}get isPingpong(){let e=this.repeatDirection;return"pingpong"===e||"pingpong-rewind"===e}get actualDelayDirection(){return this.isReversed?"start"===this.config.delayDirection?"end":"end"===this.config.delayDirection?"start":this.config.delayDirection:this.config.delayDirection}start(e){this.isPlaying=!0,this.currentRepeat=this.config.repeat,this.isFirstLerpAfterStart=!0,this.startTime=e,this.onStart?.()}endAfterCurrentPass(){this.currentRepeat<0&&(this.currentRepeat=0)}stop(){this.isPlaying=!1}rearm(){this.onStart?.()}seek(e){this.lerp(e)}update(e){if(!this.isPlaying)return;let t=a(e,this.startTime),r=0;if(this.isFirstLerpAfterStart||!this.isPingpong){let e=this.actualDelayDirection;if("start-once"===this.config.delayDirection&&this.isFirstLerpAfterStart||"start"===e||"start-end"===e){if(t<this.delay)return;r=this.delay}}t=X(t-r);let i=0===this.duration?1:Math.min(Math.max(X(t/this.duration),0),1);if(this.lerp(i),!this.isPlaying||1!==i)return;let s=this.actualDelayDirection;if("end"===s||"start-end"===s){if(t<X(this.duration+this.delay))return;this.endTime=n(this.startTime,X(X(r+this.duration)+this.delay))}else this.endTime=n(this.startTime,X(r+this.duration));this.isFirstLerpAfterStart=!1,0!==this.currentRepeat?(this.currentRepeat>0&&(this.currentRepeat-=1),this.isPingpong?this.isReversed=!this.isReversed:this.lerp(0),this.startTime=e,this.onStart?.()):this.stop()}lerp(e){"pingpong-rewind"===this.repeatDirection&&this.isReversed?(e=X(1-e),e=this.ease(e),e=X(1-e)):e=this.ease(e),this.apply(e)}ease(e){return P(this.config.ease,this.duration,e)}},{degToRad:K,radToDeg:Y}=z;function _(e,t,r,a,n,i){let s=void 0!==r[e]?r[e]:void 0,o=a[e];if(null==o)return;let l=null!=s?"string"==typeof s?Number(n.getVariable(s)??0):s:t[e],u="string"==typeof o?Number(n.getVariable(o)??0):o;return l!==u?{update:r=>{let a=z.lerp(l,u,r);t[e]=i?Math.trunc(a):a},start:()=>{t[e]=l},end:()=>{t[e]=u}}:void 0}function Q(e,t,r,a,n,i){let s=r[e]?r[e]:void 0,o=a[e];if(!o)return;let l=t[e],u=[...s??l].map(e=>"string"==typeof e?Number(n.getVariable(e)??0):e),d=[...o].map(e=>"string"==typeof e?Number(n.getVariable(e)??0):e);return u.length!==d.length||b(u,d)?void 0:{update:r=>{u.forEach((a,n)=>{let s=z.lerp(a,d[n],r);t[e][n]=i?Math.trunc(s):s})},start:()=>{Object.assign(t[e],u)},end:()=>{Object.assign(t[e],d)}}}function Z(e,t,r){return t.forEach((t,a)=>{e.setComponent(a,"string"==typeof t?Number(r.getVariable(t)??0):t)}),e}function $(e,t,r,a,n){let i=r[e]?r[e]:void 0,s=a[e];if(!s)return;let o=t[e],l=i?Z(new W,i,n):o.clone(),u=Z(new W,s,n);return l.equals(u)?void 0:{update:e=>{o.lerpVectors(l,u,e)},start:()=>{o.copy(l)},end:()=>{o.copy(u)}}}function J(e,t,r){return t.forEach((t,a)=>{e.setComponent(a,"string"==typeof t?Number(r.getVariable(t)??0):t)}),e}function ee(e,t,r,a,n){let i=r[e]?r[e]:void 0,s=a[e];if(!s)return;let o=t[e],l=!(o instanceof T),u=o instanceof T?o:(new T).fromArray(o),d=i?J(new T,i,n):u.clone(),p=J(new T,s,n);return d.equals(p)?void 0:{update:r=>{u.lerpVectors(d,p,r),l&&(t[e]=u.toArray())},start:()=>{u.copy(d),l&&(t[e]=u.toArray())},end:()=>{u.copy(p),l&&(t[e]=u.toArray())}}}function te(e,t,r,a,n){let i=r[e]?r[e]:void 0,s=a[e];if(!s)return;let o=t[e],l=new h(o.r,o.g,o.b,o.a),u=i?"string"==typeof i?n.getColor(i).clone():new h(i.r,i.g,i.b,i.a):l.clone(),d="string"==typeof s?n.getColor(s).clone():new h(s.r,s.g,s.b,s.a);return u.equals(d)?void 0:{update:r=>{l.lerpColors(u,d,r);let a=z.lerp(u.a,d.a,r);l.a=a,t[e]={r:l.r,g:l.g,b:l.b,a:l.a}},start:()=>{l.copy(u)},end:()=>{l.copy(d)}}}function re(e,t,r,a,n){return"number"==typeof t[e]?_(e,t,r??{},a,n):Array.isArray(t[e])?Q(e,t,r??{},a,n):void 0}function ae(e,t){if(e)for(let[r,a]of Object.entries(t)){let t=e[r];if(Array.isArray(t)&&Array.isArray(a)){let e=Math.min(t.length,a.length);for(let r=0;r<e;r++)t[r]=a[r]}else e[r]=a}}function ne(e,t,r,a){let n={};if(!t||!r)return n;for(let i of e){let e=t[i],s=r[i];if("number"==typeof e&&"number"==typeof s)n[i]=z.lerp(e,s,a);else if(Array.isArray(e)&&Array.isArray(s)){let t=Math.min(e.length,s.length);n[i]=Array.from({length:t},(t,r)=>z.lerp(e[r],s[r],a))}}return n}function ie(e,t,r,a,n){let i=e.getValue(a);if(void 0!==i){if("colors"===a)return function(e,t,r,a="colors"){if(!e.hasValue(a)||!(a in r))return;let n=[],i=e.getValue(a),s=t?t[a]:i.map(e=>e.toArray()),o=r[a];for(let e=0;e<i.length;++e){let t=[...s[e]],r=[...o[e]];A.isEqual(t,r)||n.push({update:a=>{i[e].fromArray(A.lerp(t,r,a))},start:()=>{i[e].fromArray(t)},end:()=>{i[e].fromArray(r)}})}return n.length?n:void 0}(e,t,r,a);if(Array.isArray(i))return"steps"===a?function(e,t,r,a="steps"){if(!e.hasValue(a)||!(a in r))return;let n=[],i=e.getValue(a),s=t?t[a]:i,o=r[a];return b(s,o)||n.push({update:t=>{let r=[...i];for(let e=0;e<i.length;++e){let a=s[e],n=o[e];r[e]=z.lerp(a,n,t)}e.setValue(a,r)},start:()=>{e.setValue(a,s)},end:()=>{e.setValue(a,o)}}),n.length?n:void 0}(e,t,r,a):void 0;if("number"==typeof i)return function(e,t,r,a,n){if(!e.hasValue(a)||!(a in r))return;let i=t?t[a]:e.getValue(a),s=r[a],o="string"==typeof i?Number(n.getVariable(i)??0):i,l="string"==typeof s?Number(n.getVariable(s)??0):s;return{update:t=>{e.setValue(a,z.lerp(o,l,t))},start:()=>{e.setValue(a,o)},end:()=>{e.setValue(a,l)}}}(e,t,r,a,n);if("boolean"!=typeof i){if(i instanceof T)return function(e,t,r,a){if(!e.hasValue(a)||!(a in r))return;let n=e.getValue(a),i=t?(new T).fromArray(t[a]):n.clone(),s=(new T).fromArray(r[a]);return i.equals(s)?void 0:{update:e=>{n.lerpVectors(i,s,e)},start:()=>{n.copy(i)},end:()=>{n.copy(s)}}}(e,t,r,a);if(i instanceof W)return function(e,t,r,a,n){if(!e.hasValue(a)||!(a in r))return;let i=e.getValue(a),s=t?t[a]:void 0,o=r[a],l=s?Z(new W,s,n):i.clone(),u=Z(new W,o,n);return l.equals(u)?void 0:{update:e=>{i.lerpVectors(l,u,e)},start:()=>{i.copy(l)},end:()=>{i.copy(u)}}}(e,t,r,a,n);if(i instanceof h)return function(e,t,r,a,n){if(!e.hasValue(a)||!(a in r))return;let i=t?t[a]:void 0,s=r[a],o=e.getValue(a),l=i?"string"==typeof i?n.color(i).clone():(new H).setRGB(i.r,i.g,i.b):o.clone(),u="string"==typeof s?n.color(s).clone():new h(s.r,s.g,s.b,s.a);if(l.equals(u))return;let d=o.clone();return{update:t=>{e.getValue(a)!==d&&e.setValue(a,d),d.lerpColors(l,u,t)},start:()=>{d.copy(l)},end:()=>{d.copy(u)}}}(e,t,r,a,n);if(i instanceof H)return function(e,t,r,a,n){if(!e.hasValue(a)||!(a in r))return;let i=t?t[a]:void 0,s=r[a],o=e.getValue(a),l=i?"string"==typeof i?n.color(i).clone():(new H).setRGB(i.r,i.g,i.b):o.clone(),u="string"==typeof s?n.color(s).clone():(new H).setRGB(s.r,s.g,s.b);if(l.equals(u))return;let d=o.clone();return{update:t=>{e.getValue(a)!==d&&e.setValue(a,d),d.lerpColors(l,u,t)},start:()=>{d.copy(l)},end:()=>{d.copy(u)}}}(e,t,r,a,n);if("isTexture"in i)return function(e,t,r,a="texture",n){if(!e.hasValue(a)||!(a in r))return;let i=e=>Number("string"==typeof e?n?.getVariable(e)??0:e??0),s=e.getNode("rotation"),o=t?i(t[a]?.rotation):(s?.value??0)*z.RAD2DEG,l=i(r[a]?.rotation);if(s&&Math.abs(o-l)>1e-9)return{update:e=>{s.value=z.lerp(o,l,e)*z.DEG2RAD},start:()=>{s.value=o*z.DEG2RAD},end:()=>{s.value=l*z.DEG2RAD}};let u=function(e){let t=e.getNode("mat");if("function"==typeof t?.updateMatrix)return t;let r=e.getValue("mat");return"function"==typeof r?.updateMatrix?r:void 0}(e);if(!u)return;let d=t?t[a]:u,p=r[a],c=[...d.repeat],h=[...d.offset],f=[...p.repeat],g=[...p.offset],m=d.rotation??0,b=p.rotation??0;return F.isEqual(c,f)&&F.isEqual(h,g)&&m===b?void 0:{update:e=>{u.repeat=F.lerp(c,f,e),u.offset=F.lerp(h,g,e),u.rotation=z.lerp(m,b,e),u.updateMatrix()},start:()=>{u.repeat=[...c],u.offset=[...h],u.rotation=m,u.updateMatrix()},end:()=>{u.repeat=[...f],u.offset=[...g],u.rotation=b,u.updateMatrix()}}}(e,t,r,a,n)}}}function se(e,t,r,a){let n=[],i=t.layers?d(t,a):e.transparent,s=d(r,a);n.push(function(e,t,r){let a=t||r;return{update:t=>{e.setTransparent(1===t?r:a)}}}(e,i,s)),function(e,t,r){let a=e.ensureRainbowNoiseCompiled;if("function"==typeof a)for(let n of[...e.layers]){if("rainbow"!==n.type)continue;let i=t.layers?.data(n.uuid),s=r.layers.data(n.uuid);(p(i?.noiseStrength)||p(s?.noiseStrength))&&a.call(e,n.uuid)}}(e,t,r);for(let i of e.layers){let e=t.layers?.data(i.uuid),s=r.layers.data(i.uuid);if(!s||"light"!==i.type&&(!(i.visible??1)||!(s.visible??1)))continue;let o=c[i.type]??[],l=i.getNames().filter(e=>!o.includes(e)&&!G.some(t=>e.includes(t)));for(let t of l)try{let r=ie(i,e,s,t,a);r&&(Array.isArray(r)?n.push(...r):n.push(r))}catch(e){console.error(`lerpMaterial: unexpected material layer for ${t}`,e)}}return n}function oe(e,t,r,a,n,i){let s=ie(t,r,a,e,i);!s||(Array.isArray(s)?s.forEach(e=>e.update(n)):s.update(n))}new W,new L;var le=new W,ue=new L;var de=[["radial",M],["linear",k],["grid",x],["toObject",O],["randomnessObject",B]];function pe(e,t,r,a){if(!e)return{};let n=ne(["count"],t,r,a);void 0!==n.count&&(n.count=Math.trunc(n.count));for(let[i,s]of de){if(!e[i])continue;let o=ne(s,t[i],r[i],a);Object.keys(o).length&&(n[i]=o)}return n}function ce(e,t){if(e){void 0!==t.count&&(e.count=t.count);for(let[r]of de){let a=t[r];a&&ae(e[r],a)}}}function he(a,n,d,p,c){let h=[];return a.data.visible&&h.push(...function(e,t,r,a,n){let i,s,u,d,p,c,h,f=[];if(w(e)?(i=ee("position",e,t,r,n),i&&f.push(i),u=_("rotation",e,t,r,n),u&&f.push(u),d=ee("shear",e,t,r,n),d&&f.push(d)):(h={slide:t.pathSnapping?.slide??e.updatedPathSnapping?.slide??e.dataPatched.pathSnapping?.slide??0,offset:t.pathSnapping?.offset??e.updatedPathSnapping?.offset??e.dataPatched.pathSnapping?.offset??0},p=_("slide",h,t.pathSnapping??e.updatedPathSnapping??e.dataPatched.pathSnapping,r.pathSnapping??e.dataPatched.pathSnapping,n),p&&f.push(p),c=_("offset",h,t.pathSnapping??e.updatedPathSnapping??e.dataPatched.pathSnapping,r.pathSnapping??e.dataPatched.pathSnapping,n),c&&f.push(c),!p&&!c&&(i=$("position",e,t,r,n),i&&f.push(i),s=$("scale",e,t,r,n),s&&f.push(s),u=function(e,t,r,a,n){let i=t?.rotation?t.rotation.map(e=>("string"==typeof e?Number(n.getVariable(e)??0):e)*z.DEG2RAD):void 0,s=r.rotation?.map(e=>("string"==typeof e?Number(n.getVariable(e)??0):e)*z.DEG2RAD);if(!s)return;let o=i?(new W).fromArray(i):(new W).setFromEuler(e.rotation),l=(new W).fromArray(s);if(o.equals(l))return;let u=le.subVectors(l,o);if(a&&u.toArray().every(e=>Math.abs(e)<2*Math.PI)){let t=(new q).setFromEuler(ue.setFromVector3(o)),r=(new q).setFromEuler(ue.setFromVector3(l));return{update:a=>{!function(e,t,r,a){if(0===a)return r.copy(e);if(1===a)return r.copy(t);let n=e.w*t.w+e.x*t.x+e.y*t.y+e.z*t.z;if(n>=1)return r.copy(e);let i=1-n*n;if(i<=Number.EPSILON){let n=1-a;return r.w=n*e.w+a*t.w,r.x=n*e.x+a*t.x,r.y=n*e.y+a*t.y,r.z=n*e.z+a*t.z,r.normalize(),r}let s=Math.sqrt(i),o=Math.atan2(s,n),l=Math.sin((1-a)*o)/s,u=Math.sin(a*o)/s;r.w=e.w*l+t.w*u,r.x=e.x*l+t.x*u,r.y=e.y*l+t.y*u,r.z=e.z*l+t.z*u}(t,r,e.quaternion,a)},start:()=>{e.rotation.setFromVector3(o)},end:()=>{e.rotation.setFromVector3(l)}}}return{update:t=>{le.lerpVectors(o,l,t),e.rotation.setFromVector3(le)},start:()=>{e.rotation.setFromVector3(o)},end:()=>{e.rotation.setFromVector3(l)}}}(e,t,r,a,n),u&&f.push(u),d=function(e,t,r){let a=t.shear,n=r.shear;if(!n)return;let i=e.shearMatrix,s=a??[i.elements[4],i.elements[8],i.elements[1],i.elements[9],i.elements[2],i.elements[6]],o=n;return s.every((e,t)=>e===o[t])?void 0:{update:e=>{s.forEach((t,r)=>{let a=z.lerp(t,o[r],e);i.elements[V.INDEX_MAP[r]]=a})},start:()=>{s.forEach((e,t)=>{i.elements[V.INDEX_MAP[t]]=e})},end:()=>{o.forEach((e,t)=>{i.elements[V.INDEX_MAP[t]]=e})}}}(e,t,r),d&&f.push(d))),i||s||u||d||p||c){let r=w(e)?()=>{e.updateWorldMatrix(!0,!1,!0),e.resetBBoxNeedsUpdate()}:()=>{e.updateMatrix(),e.hasNonUniformScale&&(e.updateMatrixWorld(),e.updateMatrixWorldRigid()),e.parent?.matrixWorldFusedFalse&&(e.matrixWorld.multiplyMatrices(e.parent.matrixWorldFusedFalse,e.matrix),e.matrixWorldNeedsUpdate=!1),o(e)&&l(e.parent)&&e.invalidateDownstreamBooleanData(!0),e.updatePathSnapping(Object.assign({},t.pathSnapping,h))};f.push({update:r,start:r,end:r})}return f}(a,n,d,c,p.shared)),w(a)?h.push(...function(a,n,i,s,o){let l,u,d,p,c,h,f,g,m,b,y,v,S,w,j,A=[];if("width"in a&&(l=_("width",a,n,i,o),l&&A.push(l)),"height"in a&&(u=_("height",a,n,i,o),u&&A.push(u)),a instanceof e||a instanceof r){let t={...n.fill},r={...i.fill};void 0!==t.enabled&&t.enabled!==r.enabled&&(A.push(function(t){return{update:()=>{t instanceof e&&(t.fill.enabled=!0)}}}(a)),t.enabled||Object.assign(t,{enabled:!0,color:{...t.color,a:0}}),r.enabled||Object.assign(r,{enabled:!0,color:{...r.color,a:0}})),d=te("color",a.fill,t,r,o),d&&A.push(d)}if(a instanceof e){let t={...n.stroke},r={...i.stroke};(t.enabled||r.enabled)&&(A.push(function(t){return{update:()=>{t instanceof e&&(t.stroke.enabled=!0)}}}(a)),t.enabled||Object.assign(t,{enabled:!0,color:{...t.color,a:0}}),r.enabled||Object.assign(r,{enabled:!0,color:{...r.color,a:0}})),p=te("color",a.stroke,t,r,o),p&&A.push(p),c=_("thickness",a.stroke,t,r,o),c&&A.push(c)}if(a instanceof e){let t={...n.dropShadow},r={...i.dropShadow};(t.enabled||r.enabled)&&(A.push(function(t){return{update:()=>{t instanceof e&&(t.dropShadow.enabled=!0)}}}(a)),t.enabled||Object.assign(t,{enabled:!0,color:{...t.color,a:0}}),r.enabled||Object.assign(r,{enabled:!0,color:{...r.color,a:0}})),h=te("color",a.dropShadow,t,r,o),h&&A.push(h),f=_("blurRadius",a.dropShadow,t,r,o),f&&A.push(f),m=_("spread",a.dropShadow,t,r,o),m&&A.push(m),g=ee("offset",a.dropShadow,t,r,o),g&&A.push(g)}if(a instanceof e){let t={...n.innerShadow},r={...i.innerShadow};(t.enabled||r.enabled)&&(A.push(function(t){return{update:()=>{t instanceof e&&(t.innerShadow.enabled=!0)}}}(a)),t.enabled||Object.assign(t,{enabled:!0,color:{...t.color,a:0}}),r.enabled||Object.assign(r,{enabled:!0,color:{...r.color,a:0}})),b=te("color",a.innerShadow,t,r,o),b&&A.push(b),y=_("blurRadius",a.innerShadow,t,r,o),y&&A.push(y),S=_("spread",a.innerShadow,t,r,o),S&&A.push(S),v=ee("offset",a.innerShadow,t,r,o),v&&A.push(v)}if(a instanceof e||a instanceof r){let t={...n.backgroundBlur},r={...i.backgroundBlur};(t.enabled||r.enabled)&&(A.push(function(t){return{update:()=>{t instanceof e&&(t.backgroundBlur.enabled=!0)}}}(a)),t.enabled||Object.assign(t,{enabled:!0,radius:0}),r.enabled||Object.assign(r,{enabled:!0,radius:0})),w=_("radius",a.backgroundBlur,t,r,o),w&&A.push(w)}if(a instanceof e){let t={...n.layerBlur},r={...i.layerBlur};(t.enabled||r.enabled)&&(A.push(function(t){return{update:()=>{t instanceof e&&(t.layerBlur.enabled=!0)}}}(a)),t.enabled||Object.assign(t,{enabled:!0,radius:0}),r.enabled||Object.assign(r,{enabled:!0,radius:0})),j=_("radius",a.layerBlur,t,r,o),j&&A.push(j)}if(a instanceof r||a instanceof t){let e=Q("cornerRadius",a,n,i,o);e&&A.push(e)}return A}(a,n,d,0,p.shared)):(a.data.visible&&h.push(...function(e,t,r,a){let n=[];if(!("cloner"in r)||!e.cloner)return n;let i=e.cloner,s="cloner"in t?t.cloner:{},o=r.cloner;R.forEach(e=>{let t;t="count"===e?_("count",i.parameters,s,o,a.shared,!0):re(e,i.parameters,s??{},o,a.shared),t&&n.push(t)});let l=function(e,t,r,a){if("radial"!==e.parameters.type)return;let n=t.radial,i=r.radial;if(!i)return;let s=e.parameters.radial,o=[];return M.forEach(e=>{let t=re(e,s,n??{},i,a);t&&o.push(t)}),o}(i,s,o,a.shared);l?.length&&n.push(...l);let u=function(e,t,r,a){if("linear"!==e.parameters.type)return;let n=t.linear,i=r.linear;if(!i)return;let s=[],o=e.parameters.linear;return k.forEach(e=>{let t=re(e,o,n??{},i,a);t&&s.push(t)}),s}(i,s,o,a.shared);u?.length&&n.push(...u);let d=function(e,t,r,a){if("grid"!==e.parameters.type)return;let n=t.grid,i=r.grid;if(!i)return;let s=[],o=e.parameters.grid;return x.forEach(e=>{let t;t="count"===e?Q(e,o,n??{},i,a,!0):re(e,o,n??{},i,a),t&&s.push(t)}),s}(i,s,o,a.shared);d?.length&&n.push(...d);let p=function(e,t,r,a){if("toObject"!==e.parameters.type)return;let n=t.toObject,i=r.toObject;if(!i)return;let s=[],o=e.parameters.toObject;return O.forEach(e=>{let t;t="count"===e?_(e,o,n??{},i,a,!0):re(e,o,n??{},i,a),t&&s.push(t)}),s}(i,s,o,a.shared);p?.length&&n.push(...p);let c=function(e,t,r,a){if(!e.parameters.randomness)return;let n=t.randomnessObject,i=r.randomnessObject;if(!i)return;let s=[],o=e.parameters.randomnessObject;return B.forEach(e=>{let t=re(e,o,n??{},i,a);t&&s.push(t)}),s}(i,s,o,a.shared);return c?.length&&n.push(...c),n.length&&n.push({update:()=>{i.update(a)}}),n}(a,n,d,p)),a instanceof m?(a instanceof g&&a.data.visible&&h.push(...function(e,t,r,a){let n=[];if(!("geometry"in r)||v(e))return n;let i=e.geometry.userData.parameters,s="geometry"in t?t.geometry:{},o=r.geometry;if(e instanceof u){let t=function(e,t,r,a){if(void 0===r.scaleBaked)return;let n=(t.scaleBaked??e.appliedGeometrySize??e.data.geometry.scaleBaked).map(e=>"string"==typeof e?Number(a.shared.getVariable(e)??0):e),i=r.scaleBaked.map(e=>"string"==typeof e?Number(a.shared.getVariable(e)??0):e);if(j.isEqual(n,i))return;let s=[];return s.push({update:t=>{e.updateGeometryInteractions({scaleBaked:[z.lerp(n[0],i[0],t),z.lerp(n[1],i[1],t),z.lerp(n[2],i[2],t)]},a.shared),e.invalidateDownstreamBooleanData(),e.refreshAttachedClonersInteractions(a)},start:()=>{e.updateGeometryInteractions({scaleBaked:n},a.shared),e.invalidateDownstreamBooleanData(),e.refreshAttachedClonersInteractions(a)},end:()=>{e.updateGeometryInteractions({scaleBaked:i},a.shared),e.invalidateDownstreamBooleanData(),e.refreshAttachedClonersInteractions(a)}}),s}(e,s,o,a);t&&n.push(...t)}else{let t={},r=e.appliedGeometrySize;if(Object.assign(t,y(i,I),r?{width:r[0],height:r[1],depth:r[2]}:{},y(s,I)),I.forEach(e=>{let r=re(e,t,s,o,a.shared);r&&n.push(r)}),S(e)){Object.assign(t,{extrusion:{...i.extrusion}});let e=function(e,t,r,a){if(!r.extrusion)return;let n=e.extrusion,i=t.extrusion??{},s=r.extrusion,o=[];return C.forEach(e=>{let t=re(e,n,i,s,a);t&&o.push(t)}),o}(t,s,o,a.shared);e&&n.push(...e)}n.length&&n.push({update:r=>{e.updateGeometryInteractions(t,a.shared),e.updateGeometryGroupsIfNeeded(),e.refreshAttachedClonersInteractions(a)},start:r=>{e.updateGeometryInteractions(t,a.shared),e.updateGeometryGroupsIfNeeded(),e.refreshAttachedClonersInteractions(a)},end:r=>{e.updateGeometryInteractions(t,a.shared),e.updateGeometryGroupsIfNeeded(),e.refreshAttachedClonersInteractions(a)}})}return n}(a,n,d,p)),a.data.visible&&!(a instanceof f&&a.materialOverride)&&h.push(...function(e,t,r,a){let n=[];if(Array.isArray(e.material)){if(!("materials"in r)||!r.materials)return n;let i="materials"in t&&t.materials?t.materials:[],s=r.materials;e.material.forEach((e,t)=>{if(!s[t])return;let r=i[t]??{},o=s[t];"string"==typeof r||"string"==typeof o||n.push(...se(e,r,o,a))})}else{if(!("material"in r)||!r.material)return n;let i="material"in t&&t.material?t.material:{},s=r.material;if("string"==typeof i||"string"==typeof s)return n;n.push(...se(e.material,i,s,a))}return n}(a,n,d,p.shared))):s.is(a)?a.data.visible&&h.push(...function(e,t,r,a){let n=[];if(void 0!==r.intensity){let i=_("intensity",e,t,r,a);i&&n.push(i)}if(void 0!==r.color){let i=function(e,t,r,a,n){let i=r[e]?r[e]:void 0,s=a[e];if(!s)return;let o=t[e],l=i?"string"==typeof i?n.getColor(i).clone():(new H).setRGB(i.r,i.g,i.b):o.clone(),u="string"==typeof s?n.getColor(s).clone():(new H).setRGB(s.r,s.g,s.b);if(l.equals(u))return;let d=o.clone();return{update:r=>{d.lerpColors(l,u,r),t[e]?.copy?.(d)},start:()=>{d.copy(l)},end:()=>{d.copy(u)}}}("color",e,t,r,a);i&&n.push(i)}return n}(a,n,d,p.shared)):a instanceof i&&h.push(...function(e,t,r,a){let n=[],i="OrthographicCamera"===e.cameraType?t.orthographic?.zoom:t.perspective?.zoom,s="OrthographicCamera"===e.cameraType?r.orthographic?.zoom:r.perspective?.zoom;if(void 0!==s){let t=i??e.zoom,r=s;t!==r&&n.push({update:a=>{e.zoom=z.lerp(t,r,a),e.updateProjectionMatrix()},start:()=>{e.zoom=t,e.updateProjectionMatrix()},end:()=>{e.zoom=r,e.updateProjectionMatrix()}})}if(void 0!==r.targetOffset){let i=_("targetOffset",e,t,r,a);i&&n.push(i)}return n}(a,n,d,p.shared))),h.length?{update:e=>{h.forEach(t=>t.update(e))},start:e=>{h.forEach(t=>t.start?.(e))},end:e=>{h.forEach(t=>t.end?.(e))}}:void 0}var fe={type:"beginState"};function ge(e){if(5===e.easing){let{control1:t,control2:r}=e;return{easing:5,control1:t??E.defaultData.control1,control2:r??E.defaultData.control2}}if(6===e.easing){let{mass:t,stiffness:r,damping:a,velocity:n}=e;return{easing:6,mass:t??D.defaultData.mass,stiffness:r??D.defaultData.stiffness,damping:a??D.defaultData.damping,velocity:n??D.defaultData.velocity}}return{easing:e.easing}}function me(e){return{delay:e.delay,delayDirection:e.delayDirection??"start-end",direction:e.direction??"normal",repeat:e.repeat}}var be={type:"completeState",isfromEntity:!1};function ye(e,t){let r,a;if("string"==typeof t?(r=t,a=e.states?.[r]):null===t&&(r=null,a=e.data),void 0!==r&&void 0!==a)return{id:r,data:a}}var ve=["position","rotation","scale","shear"],Se=new Set;function we(e){if(e.length<2)return Se;let t=new Set,[r,...a]=e;for(let e of ve){let n=r[e];void 0!==n&&a.every(t=>b(t[e],n))&&t.add(e)}return t}var je=class{constructor(e,t,r,a,n,i,s,o={},l=()=>Se){var u;this.object=e,this.fromRef=t,this.toRef=r,this.data=a,this.sharedAssets=n,this.allowSlerp=i,this.page=s,this.hooks=o,this.inert=l,this.builtReversed=!1,this.startStateId=null,this.buildCallback=()=>{this.builtReversed=this.runner.isReversed,this.startStateId=w(this.object)?null:this.object.transitionState.state,this.callback=he(this.object,{},function(e,t){if(0===t.size)return e;let r={...e};for(let e of t)delete r[e];return r}(this.end.data,this.inert()),{scene:this.page.scene,shared:this.sharedAssets},this.allowSlerp)},this.onChange=e=>{this.builtReversed!==this.runner.isReversed&&this.buildCallback(),this.callback&&(this.callback.update(e),this.object.requestRender()),this.writeState(e)},this.runner=new U({duration:(u=a).duration,ease:ge(u),...me(u)},this.onChange,this.buildCallback),this.rebind()}rebind(){let{fromRef:e,toRef:t}=this;if(void 0===e){let e=ye(this.object,this.object.currentState===t?this.object.prevState:this.object.currentState);if(!e)throw new Error("Missing property");this.from=e}else{let t=ye(this.object,e);if(!t)throw new Error("Missing property");this.from=t}if(void 0===t)throw new Error("Missing property");let r=ye(this.object,t);if(!r)throw new Error("Missing property");this.to=r,this.buildCallback()}refresh(){this.buildCallback()}get endpointData(){return[this.from.data,this.to.data]}get targetStateId(){return this.builtReversed?this.from.id:this.to.id}get start(){return this.builtReversed?this.to:this.from}get end(){return this.builtReversed?this.from:this.to}writeState(e){if(0===e||w(this.object))return;let t=1===e,r=e>.5?this.targetStateId:this.startStateId,a=this.object.transitionState;a.settled===t&&a.state===r||(this.object.transitionState={settled:t,state:r},this.object.reversibleToState=this.end.id,this.object.prevState!==this.object.currentState&&(this.object.prevState=this.object.currentState),this.object.currentState=r,this.object.dispatchEvent({type:"transitionState",settled:t,state:r}),this.object.dispatchEvent({type:t?"completeState":"beginState",state:r}),this.object.traverseEntity(e=>{e!==this.object&&e instanceof i&&e.dispatchEvent(t?be:fe)}),t?this.hooks.onComplete?.(r):this.hooks.onBegin?.(r))}};export{U as a,ne as b,pe as c,ce as d,oe as e,fe as f,ge as g,me as h,be as i,ye as j,Se as k,we as l,je as m};
|
|
Binary file
|
|
Binary file
|