@splinetool/runtime 2.0.12 → 2.0.14
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-aiAssistant-L3HFJZ2G.js → runtime-aiAssistant-CYJ626R5.js} +1 -1
- package/build/runtime-aiAssistant-CYJ626R5.js.br +0 -0
- package/build/runtime-aiAssistant-CYJ626R5.js.gz +0 -0
- package/build/{runtime-apiServices-KSRZJMJI.js → runtime-apiServices-QWPNWK6X.js} +1 -1
- package/build/runtime-apiServices-QWPNWK6X.js.br +0 -0
- package/build/runtime-apiServices-QWPNWK6X.js.gz +0 -0
- package/build/{runtime-audio-CNGZPKC5.js → runtime-audio-CZNFK3LE.js} +1 -1
- package/build/runtime-audio-CZNFK3LE.js.br +0 -0
- package/build/runtime-audio-CZNFK3LE.js.gz +0 -0
- package/build/{runtime-chunk-POTYLEGO.js → runtime-chunk-2PDJQLZS.js} +1 -1
- package/build/runtime-chunk-2PDJQLZS.js.br +0 -0
- package/build/runtime-chunk-2PDJQLZS.js.gz +0 -0
- package/build/{runtime-chunk-TD5YRDN7.js → runtime-chunk-44ON5NFS.js} +1 -1
- package/build/runtime-chunk-44ON5NFS.js.br +0 -0
- package/build/runtime-chunk-44ON5NFS.js.gz +0 -0
- package/build/{runtime-chunk-FGRW5LUR.js → runtime-chunk-4SENJRD5.js} +1 -1
- package/build/runtime-chunk-4SENJRD5.js.br +0 -0
- package/build/runtime-chunk-4SENJRD5.js.gz +0 -0
- package/build/{runtime-chunk-M424ONWP.js → runtime-chunk-4UHPUSEP.js} +1 -1
- package/build/runtime-chunk-4UHPUSEP.js.br +0 -0
- package/build/runtime-chunk-4UHPUSEP.js.gz +0 -0
- package/build/{runtime-chunk-K67GTQLJ.js → runtime-chunk-7PFZBRGF.js} +1 -1
- package/build/runtime-chunk-7PFZBRGF.js.br +0 -0
- package/build/runtime-chunk-7PFZBRGF.js.gz +0 -0
- package/build/{runtime-chunk-D3BWEUN6.js → runtime-chunk-AIWIOLR6.js} +1 -1
- package/build/runtime-chunk-AIWIOLR6.js.br +0 -0
- package/build/{runtime-chunk-D3BWEUN6.js.gz → runtime-chunk-AIWIOLR6.js.gz} +0 -0
- package/build/runtime-chunk-CHOZ3Y5I.js +1 -0
- package/build/runtime-chunk-CHOZ3Y5I.js.br +0 -0
- package/build/runtime-chunk-CHOZ3Y5I.js.gz +0 -0
- package/build/runtime-chunk-DHZVCYH4.js +1 -0
- package/build/runtime-chunk-DHZVCYH4.js.br +0 -0
- package/build/runtime-chunk-DHZVCYH4.js.gz +0 -0
- package/build/{runtime-chunk-UX2PD5MY.js → runtime-chunk-DMRFHNRP.js} +1 -1
- package/build/runtime-chunk-DMRFHNRP.js.br +0 -0
- package/build/runtime-chunk-DMRFHNRP.js.gz +0 -0
- package/build/{runtime-chunk-3CMVQQOR.js → runtime-chunk-EJDIVLQA.js} +1 -1
- package/build/runtime-chunk-EJDIVLQA.js.br +0 -0
- package/build/runtime-chunk-EJDIVLQA.js.gz +0 -0
- package/build/{runtime-chunk-2LTYI3AN.js → runtime-chunk-GZVBZLQ3.js} +1 -1
- package/build/runtime-chunk-GZVBZLQ3.js.br +0 -0
- package/build/runtime-chunk-GZVBZLQ3.js.gz +0 -0
- package/build/{runtime-chunk-AYLDDUAZ.js → runtime-chunk-H2442PY7.js} +1 -1
- package/build/runtime-chunk-H2442PY7.js.br +0 -0
- package/build/runtime-chunk-H2442PY7.js.gz +0 -0
- package/build/{runtime-chunk-SRQQYOPW.js → runtime-chunk-HKD2ORV5.js} +1 -1
- package/build/runtime-chunk-HKD2ORV5.js.br +0 -0
- package/build/runtime-chunk-HKD2ORV5.js.gz +0 -0
- package/build/runtime-chunk-INDD2IUU.js +1 -0
- package/build/runtime-chunk-INDD2IUU.js.br +0 -0
- package/build/runtime-chunk-INDD2IUU.js.gz +0 -0
- package/build/{runtime-chunk-SNCE2TY4.js → runtime-chunk-L5SU5F5J.js} +1 -1
- package/build/runtime-chunk-L5SU5F5J.js.br +0 -0
- package/build/runtime-chunk-L5SU5F5J.js.gz +0 -0
- package/build/{runtime-chunk-3A4X5B7V.js → runtime-chunk-LUASUHYM.js} +1 -1
- package/build/runtime-chunk-LUASUHYM.js.br +0 -0
- package/build/runtime-chunk-LUASUHYM.js.gz +0 -0
- package/build/{runtime-chunk-W44H46BZ.js → runtime-chunk-MF6PRJPV.js} +1 -1
- package/build/runtime-chunk-MF6PRJPV.js.br +0 -0
- package/build/runtime-chunk-MF6PRJPV.js.gz +0 -0
- package/build/runtime-chunk-MKUFNGGW.js +1 -0
- package/build/runtime-chunk-MKUFNGGW.js.br +0 -0
- package/build/runtime-chunk-MKUFNGGW.js.gz +0 -0
- package/build/{runtime-chunk-3O7PY43O.js → runtime-chunk-N473U2V2.js} +1 -1
- package/build/runtime-chunk-N473U2V2.js.br +0 -0
- package/build/runtime-chunk-N473U2V2.js.gz +0 -0
- package/build/{runtime-chunk-DMDTTYNN.js → runtime-chunk-NAJO6T26.js} +1 -1
- package/build/runtime-chunk-NAJO6T26.js.br +0 -0
- package/build/runtime-chunk-NAJO6T26.js.gz +0 -0
- package/build/{runtime-chunk-SFPD5AFA.js → runtime-chunk-NQ5JYNZM.js} +1 -1
- package/build/runtime-chunk-NQ5JYNZM.js.br +0 -0
- package/build/runtime-chunk-NQ5JYNZM.js.gz +0 -0
- package/build/runtime-chunk-PCGGIHOQ.js +1 -0
- package/build/runtime-chunk-PCGGIHOQ.js.br +0 -0
- package/build/runtime-chunk-PCGGIHOQ.js.gz +0 -0
- package/build/{runtime-chunk-BZJCMBUI.js → runtime-chunk-PLKRHTT5.js} +1 -1
- package/build/runtime-chunk-PLKRHTT5.js.br +0 -0
- package/build/runtime-chunk-PLKRHTT5.js.gz +0 -0
- package/build/runtime-chunk-QYZPTNBH.js +1 -0
- package/build/runtime-chunk-QYZPTNBH.js.br +0 -0
- package/build/runtime-chunk-QYZPTNBH.js.gz +0 -0
- package/build/{runtime-chunk-4KZXQGUQ.js → runtime-chunk-RTLL6WIB.js} +1 -1
- package/build/runtime-chunk-RTLL6WIB.js.br +0 -0
- package/build/runtime-chunk-RTLL6WIB.js.gz +0 -0
- package/build/{runtime-chunk-E3QYEXEP.js → runtime-chunk-S6KLXGEL.js} +1 -1
- package/build/runtime-chunk-S6KLXGEL.js.br +0 -0
- package/build/runtime-chunk-S6KLXGEL.js.gz +0 -0
- package/build/runtime-chunk-ST4VJ5DF.js +1 -0
- package/build/runtime-chunk-ST4VJ5DF.js.br +0 -0
- package/build/runtime-chunk-ST4VJ5DF.js.gz +0 -0
- package/build/{runtime-chunk-HN7CSPUY.js → runtime-chunk-U5366HDY.js} +1 -1
- package/build/runtime-chunk-U5366HDY.js.br +0 -0
- package/build/runtime-chunk-U5366HDY.js.gz +0 -0
- package/build/{runtime-chunk-WGMSWSKD.js → runtime-chunk-XOP32NU4.js} +1 -1
- package/build/runtime-chunk-XOP32NU4.js.br +0 -0
- package/build/runtime-chunk-XOP32NU4.js.gz +0 -0
- package/build/{runtime-chunk-UBSXIKOG.js → runtime-chunk-YURN6PI7.js} +1 -1
- package/build/runtime-chunk-YURN6PI7.js.br +0 -0
- package/build/runtime-chunk-YURN6PI7.js.gz +0 -0
- package/build/{runtime-chunk-AAGXG7XK.js → runtime-chunk-ZH7TNSZJ.js} +1 -1
- package/build/runtime-chunk-ZH7TNSZJ.js.br +0 -0
- package/build/runtime-chunk-ZH7TNSZJ.js.gz +0 -0
- package/build/{runtime-classicRuntime-XD52Z3ID.js → runtime-classicRuntime-CTLZXFOK.js} +1 -1
- package/build/runtime-classicRuntime-CTLZXFOK.js.br +0 -0
- package/build/runtime-classicRuntime-CTLZXFOK.js.gz +0 -0
- package/build/runtime-cloners-6BXWHHH6.js +1 -0
- package/build/runtime-cloners-6BXWHHH6.js.br +0 -0
- package/build/runtime-cloners-6BXWHHH6.js.gz +0 -0
- package/build/runtime-components-YTMTPERH.js +1 -0
- package/build/runtime-components-YTMTPERH.js.br +0 -0
- package/build/runtime-components-YTMTPERH.js.gz +0 -0
- package/build/runtime-conditional-CEO237EN.js +1 -0
- package/build/runtime-conditional-CEO237EN.js.br +0 -0
- package/build/runtime-conditional-CEO237EN.js.gz +0 -0
- package/build/{runtime-createDestroy-HT4FKH5P.js → runtime-createDestroy-2RJVOGQP.js} +1 -1
- package/build/runtime-createDestroy-2RJVOGQP.js.br +0 -0
- package/build/runtime-createDestroy-2RJVOGQP.js.gz +0 -0
- package/build/{runtime-dragDrop-FB4BVR5B.js → runtime-dragDrop-CUXGIFGP.js} +1 -1
- package/build/runtime-dragDrop-CUXGIFGP.js.br +0 -0
- package/build/runtime-dragDrop-CUXGIFGP.js.gz +0 -0
- package/build/{runtime-gameControls-KXHLXQUL.js → runtime-gameControls-HKLCWLKJ.js} +1 -1
- package/build/runtime-gameControls-HKLCWLKJ.js.br +0 -0
- package/build/runtime-gameControls-HKLCWLKJ.js.gz +0 -0
- package/build/runtime-hair-R36ZBISB.js +1 -0
- package/build/runtime-hair-R36ZBISB.js.br +1 -0
- package/build/runtime-hair-R36ZBISB.js.gz +0 -0
- package/build/{runtime-mergeStaticGeometries-GWJX3PTU.js → runtime-mergeStaticGeometries-RPBLPAJO.js} +1 -1
- package/build/runtime-mergeStaticGeometries-RPBLPAJO.js.br +0 -0
- package/build/runtime-mergeStaticGeometries-RPBLPAJO.js.gz +0 -0
- package/build/runtime-miscActions-V7N7OCRE.js +1 -0
- package/build/runtime-miscActions-V7N7OCRE.js.br +0 -0
- package/build/runtime-miscActions-V7N7OCRE.js.gz +0 -0
- package/build/{runtime-mouseHover-ATG5LR7E.js → runtime-mouseHover-2FQXNHVN.js} +1 -1
- package/build/runtime-mouseHover-2FQXNHVN.js.br +0 -0
- package/build/runtime-mouseHover-2FQXNHVN.js.gz +0 -0
- package/build/{runtime-particles-E7XPFZHE.js → runtime-particles-JZREUE5L.js} +1 -1
- package/build/runtime-particles-JZREUE5L.js.br +0 -0
- package/build/runtime-particles-JZREUE5L.js.gz +0 -0
- package/build/{runtime-paths-EZZ2EKYD.js → runtime-paths-H3BLID6D.js} +1 -1
- package/build/runtime-paths-H3BLID6D.js.br +0 -0
- package/build/runtime-paths-H3BLID6D.js.gz +0 -0
- package/build/runtime-resize-ZD62VEBD.js +1 -0
- package/build/runtime-resize-ZD62VEBD.js.br +0 -0
- package/build/runtime-resize-ZD62VEBD.js.gz +0 -0
- package/build/{runtime-sceneTransition-RUIJWZQL.js → runtime-sceneTransition-UMLH7ZRG.js} +1 -1
- package/build/runtime-sceneTransition-UMLH7ZRG.js.br +0 -0
- package/build/runtime-sceneTransition-UMLH7ZRG.js.gz +0 -0
- package/build/{runtime-scroll-2YNJT2VF.js → runtime-scroll-G27Z5O4C.js} +1 -1
- package/build/runtime-scroll-G27Z5O4C.js.br +0 -0
- package/build/runtime-scroll-G27Z5O4C.js.gz +0 -0
- package/build/runtime-shapeBlends-E6SX5CX3.js +1 -0
- package/build/runtime-shapeBlends-E6SX5CX3.js.br +0 -0
- package/build/runtime-shapeBlends-E6SX5CX3.js.gz +0 -0
- package/build/{runtime-text-FMV3CA36.js → runtime-text-MQDKSA5W.js} +1 -1
- package/build/runtime-text-MQDKSA5W.js.br +0 -0
- package/build/runtime-text-MQDKSA5W.js.gz +0 -0
- package/build/{runtime-textInputs-CYBDVKZW.js → runtime-textInputs-5DEQBIWS.js} +1 -1
- package/build/runtime-textInputs-5DEQBIWS.js.br +0 -0
- package/build/runtime-textInputs-5DEQBIWS.js.gz +0 -0
- package/build/runtime-timeline-Z7YJ7ASI.js +1 -0
- package/build/runtime-timeline-Z7YJ7ASI.js.br +0 -0
- package/build/runtime-timeline-Z7YJ7ASI.js.gz +0 -0
- package/build/{runtime-tracking-EMTZIN3W.js → runtime-tracking-IW6LURXT.js} +1 -1
- package/build/runtime-tracking-IW6LURXT.js.br +0 -0
- package/build/runtime-tracking-IW6LURXT.js.gz +0 -0
- package/build/runtime-transitions-B5OB67GR.js +1 -0
- package/build/runtime-transitions-B5OB67GR.js.br +0 -0
- package/build/runtime-transitions-B5OB67GR.js.gz +0 -0
- package/build/{runtime-ui2d-KV2KXS4A.js → runtime-ui2d-R4W643OE.js} +1 -1
- package/build/runtime-ui2d-R4W643OE.js.br +0 -0
- package/build/runtime-ui2d-R4W643OE.js.gz +0 -0
- package/build/{runtime-updater-A22NUPB5.js → runtime-updater-2CFDVEWY.js} +1 -1
- package/build/runtime-updater-2CFDVEWY.js.br +0 -0
- package/build/runtime-updater-2CFDVEWY.js.gz +0 -0
- package/build/{runtime-variables-MHCE3K3T.js → runtime-variables-S7QUT7HH.js} +1 -1
- package/build/runtime-variables-S7QUT7HH.js.br +0 -0
- package/build/runtime-variables-S7QUT7HH.js.gz +0 -0
- package/build/{runtime-vectorShapes-5G7BQGJ6.js → runtime-vectorShapes-ASLQ3T6K.js} +1 -1
- package/build/runtime-vectorShapes-ASLQ3T6K.js.br +0 -0
- package/build/runtime-vectorShapes-ASLQ3T6K.js.gz +0 -0
- package/build/{runtime-video-YA2L3X6S.js → runtime-video-SBFWLQQT.js} +1 -1
- package/build/runtime-video-SBFWLQQT.js.br +0 -0
- package/build/runtime-video-SBFWLQQT.js.gz +0 -0
- package/build/{runtime-webgpu-2J3TE4FB.js → runtime-webgpu-XRBI423N.js} +1 -1
- package/build/runtime-webgpu-XRBI423N.js.br +0 -0
- package/build/runtime-webgpu-XRBI423N.js.gz +0 -0
- package/build/runtime.cjs +429 -431
- package/build/runtime.js +1 -1
- package/build/runtime.js.br +0 -0
- package/build/runtime.js.gz +0 -0
- package/build/runtime.standalone.js +1 -1
- package/build/runtime.standalone.js.br +0 -0
- package/build/runtime.standalone.js.gz +0 -0
- package/build/runtime.standalone.webgl.js +1 -1
- package/build/runtime.standalone.webgl.js.br +0 -0
- package/build/runtime.standalone.webgl.js.gz +0 -0
- package/build/runtime.standalone.webgpu.js +1 -1
- package/build/runtime.standalone.webgpu.js.br +0 -0
- package/build/runtime.standalone.webgpu.js.gz +0 -0
- package/build/runtime.standalone.webgpu.micro.js +1 -1
- package/build/runtime.standalone.webgpu.micro.js.br +0 -0
- package/build/runtime.standalone.webgpu.micro.js.gz +0 -0
- package/build/runtime.standalone.webgpu.min.js +1 -1
- package/build/runtime.standalone.webgpu.min.js.br +0 -0
- package/build/runtime.standalone.webgpu.min.js.gz +0 -0
- package/package.json +2 -1
- package/build/runtime-aiAssistant-L3HFJZ2G.js.br +0 -0
- package/build/runtime-aiAssistant-L3HFJZ2G.js.gz +0 -0
- package/build/runtime-apiServices-KSRZJMJI.js.br +0 -0
- package/build/runtime-apiServices-KSRZJMJI.js.gz +0 -0
- package/build/runtime-audio-CNGZPKC5.js.br +0 -0
- package/build/runtime-audio-CNGZPKC5.js.gz +0 -0
- package/build/runtime-chunk-2LTYI3AN.js.br +0 -0
- package/build/runtime-chunk-2LTYI3AN.js.gz +0 -0
- package/build/runtime-chunk-3A4X5B7V.js.br +0 -0
- package/build/runtime-chunk-3A4X5B7V.js.gz +0 -0
- package/build/runtime-chunk-3CMVQQOR.js.br +0 -0
- package/build/runtime-chunk-3CMVQQOR.js.gz +0 -0
- package/build/runtime-chunk-3O7PY43O.js.br +0 -0
- package/build/runtime-chunk-3O7PY43O.js.gz +0 -0
- package/build/runtime-chunk-4KZXQGUQ.js.br +0 -0
- package/build/runtime-chunk-4KZXQGUQ.js.gz +0 -0
- package/build/runtime-chunk-5IABHLHS.js +0 -1
- package/build/runtime-chunk-5IABHLHS.js.br +0 -0
- package/build/runtime-chunk-5IABHLHS.js.gz +0 -0
- package/build/runtime-chunk-6ARRPM23.js +0 -1
- package/build/runtime-chunk-6ARRPM23.js.br +0 -0
- package/build/runtime-chunk-6ARRPM23.js.gz +0 -0
- package/build/runtime-chunk-AAGXG7XK.js.br +0 -0
- package/build/runtime-chunk-AAGXG7XK.js.gz +0 -0
- package/build/runtime-chunk-AYLDDUAZ.js.br +0 -0
- package/build/runtime-chunk-AYLDDUAZ.js.gz +0 -0
- package/build/runtime-chunk-BZJCMBUI.js.br +0 -0
- package/build/runtime-chunk-BZJCMBUI.js.gz +0 -0
- package/build/runtime-chunk-D3BWEUN6.js.br +0 -0
- package/build/runtime-chunk-DMDTTYNN.js.br +0 -0
- package/build/runtime-chunk-DMDTTYNN.js.gz +0 -0
- package/build/runtime-chunk-E3QYEXEP.js.br +0 -0
- package/build/runtime-chunk-E3QYEXEP.js.gz +0 -0
- package/build/runtime-chunk-E753C25I.js +0 -1
- package/build/runtime-chunk-E753C25I.js.br +0 -0
- package/build/runtime-chunk-E753C25I.js.gz +0 -0
- package/build/runtime-chunk-FGRW5LUR.js.br +0 -0
- package/build/runtime-chunk-FGRW5LUR.js.gz +0 -0
- package/build/runtime-chunk-HN7CSPUY.js.br +0 -0
- package/build/runtime-chunk-HN7CSPUY.js.gz +0 -0
- package/build/runtime-chunk-K67GTQLJ.js.br +0 -0
- package/build/runtime-chunk-K67GTQLJ.js.gz +0 -0
- package/build/runtime-chunk-KGZNRID6.js +0 -1
- package/build/runtime-chunk-KGZNRID6.js.br +0 -1
- package/build/runtime-chunk-KGZNRID6.js.gz +0 -0
- package/build/runtime-chunk-M424ONWP.js.br +0 -0
- package/build/runtime-chunk-M424ONWP.js.gz +0 -0
- package/build/runtime-chunk-POTYLEGO.js.br +0 -0
- package/build/runtime-chunk-POTYLEGO.js.gz +0 -0
- package/build/runtime-chunk-R43XZP65.js +0 -1
- package/build/runtime-chunk-R43XZP65.js.br +0 -0
- package/build/runtime-chunk-R43XZP65.js.gz +0 -0
- package/build/runtime-chunk-SFPD5AFA.js.br +0 -0
- package/build/runtime-chunk-SFPD5AFA.js.gz +0 -0
- package/build/runtime-chunk-SIC5B7QX.js +0 -1
- package/build/runtime-chunk-SIC5B7QX.js.br +0 -0
- package/build/runtime-chunk-SIC5B7QX.js.gz +0 -0
- package/build/runtime-chunk-SNCE2TY4.js.br +0 -0
- package/build/runtime-chunk-SNCE2TY4.js.gz +0 -0
- package/build/runtime-chunk-SRQQYOPW.js.br +0 -0
- package/build/runtime-chunk-SRQQYOPW.js.gz +0 -0
- package/build/runtime-chunk-TD5YRDN7.js.br +0 -0
- package/build/runtime-chunk-TD5YRDN7.js.gz +0 -0
- package/build/runtime-chunk-UBSXIKOG.js.br +0 -0
- package/build/runtime-chunk-UBSXIKOG.js.gz +0 -0
- package/build/runtime-chunk-UX2PD5MY.js.br +0 -0
- package/build/runtime-chunk-UX2PD5MY.js.gz +0 -0
- package/build/runtime-chunk-VGEECQH4.js +0 -1
- package/build/runtime-chunk-VGEECQH4.js.br +0 -0
- package/build/runtime-chunk-VGEECQH4.js.gz +0 -0
- package/build/runtime-chunk-W44H46BZ.js.br +0 -4
- package/build/runtime-chunk-W44H46BZ.js.gz +0 -0
- package/build/runtime-chunk-WGBR2HLR.js +0 -1
- package/build/runtime-chunk-WGBR2HLR.js.br +0 -0
- package/build/runtime-chunk-WGBR2HLR.js.gz +0 -0
- package/build/runtime-chunk-WGMSWSKD.js.br +0 -0
- package/build/runtime-chunk-WGMSWSKD.js.gz +0 -0
- package/build/runtime-classicRuntime-XD52Z3ID.js.br +0 -0
- package/build/runtime-classicRuntime-XD52Z3ID.js.gz +0 -0
- package/build/runtime-cloners-7P25TLWX.js +0 -1
- package/build/runtime-cloners-7P25TLWX.js.br +0 -0
- package/build/runtime-cloners-7P25TLWX.js.gz +0 -0
- package/build/runtime-components-KE6NSJIH.js +0 -1
- package/build/runtime-components-KE6NSJIH.js.br +0 -0
- package/build/runtime-components-KE6NSJIH.js.gz +0 -0
- package/build/runtime-conditional-66QFNGF3.js +0 -1
- package/build/runtime-conditional-66QFNGF3.js.br +0 -0
- package/build/runtime-conditional-66QFNGF3.js.gz +0 -0
- package/build/runtime-createDestroy-HT4FKH5P.js.br +0 -0
- package/build/runtime-createDestroy-HT4FKH5P.js.gz +0 -0
- package/build/runtime-dragDrop-FB4BVR5B.js.br +0 -0
- package/build/runtime-dragDrop-FB4BVR5B.js.gz +0 -0
- package/build/runtime-gameControls-KXHLXQUL.js.br +0 -0
- package/build/runtime-gameControls-KXHLXQUL.js.gz +0 -0
- package/build/runtime-hair-RGFARTLM.js +0 -1
- package/build/runtime-hair-RGFARTLM.js.br +0 -1
- package/build/runtime-hair-RGFARTLM.js.gz +0 -0
- package/build/runtime-mergeStaticGeometries-GWJX3PTU.js.br +0 -0
- package/build/runtime-mergeStaticGeometries-GWJX3PTU.js.gz +0 -0
- package/build/runtime-miscActions-QTP3QTK2.js +0 -1
- package/build/runtime-miscActions-QTP3QTK2.js.br +0 -0
- package/build/runtime-miscActions-QTP3QTK2.js.gz +0 -0
- package/build/runtime-mouseHover-ATG5LR7E.js.br +0 -0
- package/build/runtime-mouseHover-ATG5LR7E.js.gz +0 -0
- package/build/runtime-particles-E7XPFZHE.js.br +0 -0
- package/build/runtime-particles-E7XPFZHE.js.gz +0 -0
- package/build/runtime-paths-EZZ2EKYD.js.br +0 -0
- package/build/runtime-paths-EZZ2EKYD.js.gz +0 -0
- package/build/runtime-resize-MUZH7MEA.js +0 -1
- package/build/runtime-resize-MUZH7MEA.js.br +0 -0
- package/build/runtime-resize-MUZH7MEA.js.gz +0 -0
- package/build/runtime-sceneTransition-RUIJWZQL.js.br +0 -0
- package/build/runtime-sceneTransition-RUIJWZQL.js.gz +0 -0
- package/build/runtime-scroll-2YNJT2VF.js.br +0 -0
- package/build/runtime-scroll-2YNJT2VF.js.gz +0 -0
- package/build/runtime-shapeBlends-KRYJJPAK.js +0 -1
- package/build/runtime-shapeBlends-KRYJJPAK.js.br +0 -3
- package/build/runtime-shapeBlends-KRYJJPAK.js.gz +0 -0
- package/build/runtime-text-FMV3CA36.js.br +0 -0
- package/build/runtime-text-FMV3CA36.js.gz +0 -0
- package/build/runtime-textInputs-CYBDVKZW.js.br +0 -0
- package/build/runtime-textInputs-CYBDVKZW.js.gz +0 -0
- package/build/runtime-timeline-3FHFLHWF.js +0 -1
- package/build/runtime-timeline-3FHFLHWF.js.br +0 -0
- package/build/runtime-timeline-3FHFLHWF.js.gz +0 -0
- package/build/runtime-tracking-EMTZIN3W.js.br +0 -0
- package/build/runtime-tracking-EMTZIN3W.js.gz +0 -0
- package/build/runtime-transitions-VL46OOZE.js +0 -1
- package/build/runtime-transitions-VL46OOZE.js.br +0 -0
- package/build/runtime-transitions-VL46OOZE.js.gz +0 -0
- package/build/runtime-ui2d-KV2KXS4A.js.br +0 -0
- package/build/runtime-ui2d-KV2KXS4A.js.gz +0 -0
- package/build/runtime-updater-A22NUPB5.js.br +0 -1
- package/build/runtime-updater-A22NUPB5.js.gz +0 -0
- package/build/runtime-variables-MHCE3K3T.js.br +0 -0
- package/build/runtime-variables-MHCE3K3T.js.gz +0 -0
- package/build/runtime-vectorShapes-5G7BQGJ6.js.br +0 -0
- package/build/runtime-vectorShapes-5G7BQGJ6.js.gz +0 -0
- package/build/runtime-video-YA2L3X6S.js.br +0 -0
- package/build/runtime-video-YA2L3X6S.js.gz +0 -0
- package/build/runtime-webgpu-2J3TE4FB.js.br +0 -0
- package/build/runtime-webgpu-2J3TE4FB.js.gz +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as e,c as t}from"./runtime-chunk-ST4VJ5DF.js";import{g as i}from"./runtime-chunk-RTLL6WIB.js";var s=null;function r(e){s=e}function n(){return s}function h(e){let t=e?.tracks.filter(e=>"vector"===e.ValueTypeName||"quaternion"===e.ValueTypeName).map(e=>e.times.length);if(t?.length){let e=i(t);return e&&e>2?e:2}return 2}var a=Math.fround;function o(e){return"pingpong"===e||"pingpong-rewind"===e}var d=class{constructor(e,t,i={}){this.hooks=i,this.isPlaying=!1,this.playingIndex=0,this.currentRepeat=0,this.isReversed=!1,this.startTime=0,this.isToggledForward=!1,this.hasPlayedOnce=!1,this.isFirstTweenAfterStart=!1,this.isResumeScheduledAfterStartDelay=!1,this.config=e,this.tweens=t,this.delay=a(e.delay/1e3)}get currentTween(){return this.tweens[this.playingIndex]}play(e){if(0===this.tweens.length||this.isPlaying&&"Toggle"!==this.config.runMode||this.hasPlayedOnce&&"Once"===this.config.runMode)return;let t=this.isPlaying;this.isPlaying=!0,this.hasPlayedOnce=!0,this.currentRepeat=this.config.repeat,this.startTime=e,(this.hooks.claim?.()??!1)&&(this.isToggledForward=!1,!t&&!this.isReversed&&this.hooks.assignCurrentState?.()),"Toggle"===this.config.runMode?(this.toggleDirection(),t?this.resume(this.startTime):this.startChain()):this.startChain()}stop(){this.currentTween?.stop(),this.isPlaying=!1,this.isReversed=!1}playDirected(e,t){if(0===this.tweens.length)return;let i=this.isPlaying;i&&this.isForward===t||(this.isPlaying=!0,this.hasPlayedOnce=!0,this.currentRepeat=this.config.repeat,this.startTime=e,this.isToggledForward=t,this.isReversed=!t,(this.hooks.claim?.()??!1)&&!i&&!this.isReversed&&this.hooks.assignCurrentState?.(),i?this.resume(this.startTime):this.startChain())}get isForward(){return!this.isReversed}seek(e){let t=this.tweens.reduce((e,t)=>e+t.duration,0)*e,i=0;for(let e of this.tweens){if(i+e.duration>t)return void e.seek((t-i)/e.duration);i+=e.duration}}update(i){if(this.isPlaying&&!1===this.hooks.isOwner?.()&&this.stop(),!this.isPlaying)return;let s=function(e,t){return t?"start"===e?"end":"end"===e?"start":e:e}(this.config.delayDirection,this.isReversed),r=0;if("start-once"===s&&this.isFirstTweenAfterStart||!this.isReversed&&0===this.playingIndex&&(!o(this.config.direction)||this.isFirstTweenAfterStart)&&("start"===s||"start-end"===s)){if(t(i,this.startTime,this.delay))return;r=this.delay}if(this.isResumeScheduledAfterStartDelay&&(this.resume(e(this.startTime,r)),this.isResumeScheduledAfterStartDelay=!1),this.currentTween.update(i),this.currentTween.isPlaying)return;if(this.isFirstTweenAfterStart=!1,this.isReversed?this.playingIndex>0:this.playingIndex<this.tweens.length-1)return void this.advanceToNextTween();let n=0;if("end"===s||"start-end"===s){if(t(i,this.currentTween.endTime,this.delay))return;n=this.delay}0!==this.currentRepeat?(this.currentRepeat>0&&(this.currentRepeat-=1),o(this.config.direction)&&("Toggle"===this.config.runMode?this.toggleDirection():this.isReversed=!this.isReversed),this.startTime=e(this.currentTween.endTime,n),this.playingIndex=this.isReversed?this.tweens.length-1:0,"normal"===this.config.direction&&this.currentTween.seek(this.currentTween.isReversed?1:0),this.resume(this.startTime)):this.stop()}advanceToNextTween(){let e=this.currentTween;e.isPingpong&&e.config.repeat%2==1&&e.seek(e.isReversed?0:1);let t=e.endTime,i=this.isReversed;this.playingIndex+=i?-1:1;let s=this.currentTween;i&&s.isPingpong&&s.config.repeat%2==1&&s.seek(1),this.resume(t)}startChain(){this.playingIndex=this.isReversed?this.tweens.length-1:0,this.isFirstTweenAfterStart=!0,this.isResumeScheduledAfterStartDelay=!0}resume(e){let t=this.currentTween;this.isReversed&&"pingpong-rewind"===this.config.direction&&(t.overrideDirection="pingpong-rewind"),t.isReversed=!(!this.isReversed||"normal"!==t.repeatDirection&&t.config.repeat%2==1),t.start(e)}toggleDirection(){this.isToggledForward=!this.isToggledForward,this.isReversed=!this.isToggledForward}};export{h as a,r as b,n as c,d};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as e,d as a,e as t,f as r,w as n,y as o}from"./runtime-chunk-AIWIOLR6.js";var i,d,l,u,s,f,c,p,h,g,A,b,m,y,w,D,v,k,B,S,O,j;(i||(i={})).emptyImage={data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVQYV2NgYAAAAAMAAWgmWQ0AAAAASUVORK5CYII=",name:"empty"},(d||(d={})).is=function(e){return!0},(u=l||(l={})).defaultData={position:[0,0],scale:[1,1],rotation:0,shear:[0,0]},u.merge=function(e,a){return{position:a?.position??e.position,rotation:a?.rotation??e.rotation,scale:a?.scale??e.scale,shear:a?.shear??e.shear}},u.diff=function(e,t){return a({position:o.isEqual(e.position,t.position)?void 0:t.position,rotation:e.rotation===t.rotation?void 0:t.rotation,scale:o.isEqual(e.scale,t.scale)?void 0:t.scale,shear:e.shear&&t.shear&&o.isEqual(e.shear,t.shear)?void 0:t.shear})},(s||(s={})).defaultData={horizontalConstraint:0,verticalConstraint:0},(f||(f={})).defaultData={direction:"row",wrap:"unwrap",align:"top-left",gap:10,rowGap:10,autoGap:!1,autoRowGap:!1,leftPadding:8,rightPadding:8,topPadding:8,bottomPadding:8},(c||(c={})).defaultData={opacity:1,fill:{color:e.fromHexAndA(n,1),enabled:!0},stroke:{color:e.from0to1([0,0,0,1]),thickness:1,enabled:!1,mode:"inside"},layerBlur:{radius:2,enabled:!1},backgroundBlur:{radius:2,enabled:!1},dropShadow:{offset:[10,10],blurRadius:10,color:e.from0to1([0,0,0,1]),enabled:!1,spread:0},innerShadow:{offset:[10,10],blurRadius:10,color:e.from0to1([0,0,0,1]),enabled:!1,spread:0}},(h=p||(p={})).newEmpty=function(e,a){return{name:a}},h.patch=function(e,a){if(void 0===a)return e;let t={...e};return Object.assign(t,l.merge(t,a)),t=function(e,a){if(void 0===a)return e;let t={...e},r=["width","height","cornerRadius"];for(let e of r)e in t&&e in a&&void 0!==a[e]&&Object.assign(t,{[e]:a[e]});return t}(t,a),t=function(e,a){if(void 0===a)return e;let t={...e};return"fill"in t&&"fill"in a&&void 0!==a.fill&&Object.assign(t,{fill:{...t.fill,...a.fill}}),"stroke"in t&&"stroke"in a&&void 0!==a.stroke&&Object.assign(t,{stroke:{...t.stroke,...a.stroke}}),"layerBlur"in t&&"layerBlur"in a&&void 0!==a.layerBlur&&Object.assign(t,{layerBlur:{...t.layerBlur,...a.layerBlur}}),"backgroundBlur"in t&&"backgroundBlur"in a&&void 0!==a.backgroundBlur&&Object.assign(t,{backgroundBlur:{...t.backgroundBlur,...a.backgroundBlur}}),"dropShadow"in t&&"dropShadow"in a&&void 0!==a.dropShadow&&Object.assign(t,{dropShadow:{...t.dropShadow,...a.dropShadow}}),"innerShadow"in t&&"innerShadow"in a&&void 0!==a.innerShadow&&Object.assign(t,{innerShadow:{...t.innerShadow,...a.innerShadow}}),t}(t,a),t},h.toOps=function(e,a){let t,r=[];for(let[e,n]of Object.entries(a))"name"!==e&&(void 0===t&&(t={path:[],props:{},type:0},r.push(t)),t.props[e]=n);return r},(g||(g={})).defaultData={...l.defaultData,...s.defaultData,states:new r,events:new r,visible:!0,raycastLock:!1},(A||(A={})).defaultData={...g.defaultData,...c.defaultData},(b||(b={})).defaultData={cornerRadius:[0,0,0,0]},(m||(m={})).defaultData={...A.defaultData,type:"ellipse2d",width:100,height:100,name:"Ellipse"},(y||(y={})).defaultData={...A.defaultData,...b.defaultData,type:"rectangle2d",width:100,height:100,name:"Rectangle"},(w||(w={})).defaultData={...A.defaultData,type:"text2d",width:100,height:100,fontSize:12,lineHeight:1.2,letterSpacing:0,text:{textValue:"Hello world"},horizontalAlign:1,verticalAlign:1,textTransform:1,font:"Roboto_regular",name:"Text"},(D||(D={})).defaultData={...A.defaultData,type:"path2d",path:"",name:"Path"},(v||(v={})).is=function(e){return"ellipse2d"===e.type||"rectangle2d"===e.type||"text2d"===e.type||"vector2d"===e.type||"path2d"===e.type},(k||(k={})).defaultData={...g.defaultData,name:"Group",type:"group2d"},(B||(B={})).defaultData=()=>({...g.defaultData,...b.defaultData,...c.defaultData,name:"Frame",type:"frame2d",clipped:!0,width:200,height:200,fill:{color:e.fromHexAndA(4737101,1),enabled:!0},stroke:{color:e.fromHexAndA(0,1),thickness:1,enabled:!1,mode:"inside"},backgroundBlur:{radius:2,enabled:!1},layerBlur:{radius:2,enabled:!1}}),(e=>{e.defaultData=function(e){switch(e){case"rectangle2d":case"vector2d":return{...y.defaultData};case"ellipse2d":return{...m.defaultData};case"text2d":return{...w.defaultData};case"path2d":return{...D.defaultData};case"frame2d":return{...B.defaultData()};case"group2d":return{...k.defaultData}}},e.getPivot=function(e){return"width"in e&&"height"in e?["number"==typeof e.width?.5*e.width:0,"number"==typeof e.height?.5*e.height:0]:[0,0]},e.isResizeable=function(e){return"rectangle2d"===e.type||"ellipse2d"===e.type||"text2d"===e.type||"frame2d"===e.type},e.isAutoLayoutable=function(e){return"frame2d"===e.type&&void 0!==e.autoLayout},e.hasCorners=function(e){return"rectangle2d"===e.type||"frame2d"===e.type}})(S||(S={})),(j=O||(O={})).defaultData={name:"UI",type:"scene2d",objects:new t},j.emptyData=function(){return{type:"scene2d",objects:new t}};export{i as a,p as b,y as c,k as d,S as e,O as f};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,b as i}from"./runtime-chunk-
|
|
1
|
+
import{a as e,b as i}from"./runtime-chunk-7PFZBRGF.js";import{E as t,F as s,ea as o}from"./runtime-chunk-YURN6PI7.js";import{v as r}from"./runtime-chunk-QYZPTNBH.js";import{Fc as h,Oc as a,Xc as d,cd as n}from"./runtime-chunk-BVVSZMXD.js";var l=new d,u=new h;function m(e){let i=!1;return e.scene.objects.traverse((e,t)=>{"Mesh"===t.type&&"SubdivGeometry"===t.geometry.type&&(i=!0)}),i}var y=class extends o{constructor(e,i,t){super(e,i,t),this.data=i,this.hiddenMatrixOld=new a,this.smoothShading=!0,this.skipReactionUpdate=!1}chooseGeoemtryCache(e){return this.dataPatched.flatShading?e.geometryCache:e.geometryCache2}get subdivPointerNew(){return void 0!==this.localGeometry?this.subdivPointer:this.geometry.ensureSubdivPointer()}get originalGeometryNew(){return void 0!==this.localGeometry?this.originalGeometry:this.geometry.originalGeometry}get phongAngle(){return this.data.geometry.phongAngle??45}updateEntityBoxSize(e,i){let t=this.geometry.userData.parameters;e.copy(this.originalGeometryNew.boundingSphere.center),i.set(t.width,t.height,t.depth??0).multiplyScalar(.5)}createGeometryByControls(s){if(!0===this.skipReactionUpdate)return;let o=this.localGeometry?.uuid,{originalGeometry:r,subdividedGeometry:h,subdivPointer:a}=t.build(s,this.subdivPointer,this.smoothShading,this.hasNonUniformScale?this.shearScale:void 0);this.subdivPointer=a,void 0!==r&&(this.originalGeometry?.dispose(),this.originalGeometry=r),void 0!==h&&(this.subdividedGeometry?.dispose(),this.subdividedGeometry=h??void 0),this.localGeometry=this.subdividedGeometry??this.originalGeometry,e(this),i(this),this.calcBoundingBox(),o&&(this.localGeometry.uuid=o)}updateState(e,i){if(super.updateState(e,i),void 0!==e.flatShading){let t=this.material;this.material=Array.isArray(t)?t.map(e=>e.getFlavor(!1,e.side,e.wireframe)):t.getFlavor(!1,t.side,t.wireframe),this.smoothShading=!e.flatShading,this.createGeometryDelayed(i)}}updateMesh(e=!1,i=!1,s=!1){i&&this.subdividedGeometry||t.buildLevel(this.subdivPointer,!0,this.smoothShading?this.phongAngle:-1,this.originalGeometry,e&&this.hasNonUniformScale?this.shearScaleInv:void 0,s),this.subdividedGeometry&&t.buildLevel(this.subdivPointer,!1,this.smoothShading?this.phongAngle:-1,this.subdividedGeometry,e&&this.hasNonUniformScale?this.shearScaleInv:void 0)}updateTopology(){let s=this.localGeometry?.uuid;this.originalGeometry.dispose(),this.originalGeometry=t.buildLevel(this.subdivPointer,!0,this.smoothShading?this.phongAngle:-1),this.subdividedGeometry&&(this.subdividedGeometry.dispose(),this.subdividedGeometry=t.buildLevel(this.subdivPointer,!1,this.smoothShading?this.phongAngle:-1)),this.localGeometry=this.subdividedGeometry??this.originalGeometry,e(this),i(this),this.calcBoundingBox(),s&&(this.localGeometry.uuid=s)}raycast(e,i){let t=this.localGeometry;this.localGeometry=this.originalGeometryNew,r.prototype.raycast.call(this,e,i),this.localGeometry=t}activateShearCompensation(){!this.hasNonUniformScale||(this.matrix.copy(this.matrixWorldRigid),this.hiddenMatrixOld.copy(this.hiddenMatrix),this.hiddenMatrix.copy(this.parent.matrixWorld).invert())}deactivateShearCompensation(){!this.hasNonUniformScale||(this.updateMatrix(),this.hasNonUniformScale=void 0,this.hiddenMatrix.copy(this.hiddenMatrixOld))}calcBoundingBox(){let e=this.originalGeometry;null===e.boundingSphere&&(e.boundingSphere=new n,this.subdividedGeometry&&(this.subdividedGeometry.boundingSphere=e.boundingSphere));let i=e.attributes.position,t=e.boundingSphere.center;l.setFromBufferAttribute(i),l.getCenter(t),e.boundingSphere.radius=t.distanceTo(l.max),isNaN(e.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this),l.getSize(u),this.hasNonUniformScale&&u.divide(this.scale);let s={width:u.x,height:u.y,depth:u.z};return this.geometry.userData.parameters=s,s}updateBoundingSphere(e){let i=this.originalGeometry;l.min.set(e[0],e[2],e[4]),l.max.set(e[1],e[3],e[5]),this.hasNonUniformScale&&(l.min.applyMatrix4(this.shearScaleInv),l.max.applyMatrix4(this.shearScaleInv)),null===i.boundingSphere&&(i.boundingSphere=new n);let t=i.boundingSphere.center;l.getCenter(t),i.boundingSphere.radius=t.distanceTo(l.max)}freeSubdivPointer(){this.subdivPointer&&(t.freeSubdivPointer(this.subdivPointer),this.subdivPointer=0),this.localGeometry=void 0,this.originalGeometry?.dispose(),this.subdividedGeometry?.dispose()}dispose(){super.dispose(),this.freeSubdivPointer()}updateSubdivisionLevel(s){if(!0===this.skipReactionUpdate)return;let o=this.localGeometry,r=o?.uuid,h=o?.userData.parameters,a=s.subdivisions>0?t.buildRefined(this.subdivPointer,s.subdivisions,this.smoothShading?s.phongAngle??35:-1):null;this.subdividedGeometry?.dispose(),this.subdividedGeometry=a??void 0,this.subdividedGeometry&&this.originalGeometry.boundingSphere&&(this.subdividedGeometry.boundingSphere=this.originalGeometry.boundingSphere),this.localGeometry=this.subdividedGeometry??this.originalGeometry,e(this),i(this),void 0!==h&&(this.localGeometry.userData.parameters=h),r&&(this.localGeometry.uuid=r)}updateByPatchedOpGeometry(e,i,t){super.updateByPatchedOpGeometry(e,i,t),this.localGeometry&&(0===e.type&&0===e.path.length&&s(e.props)&&this.subdivPointer?this.updateSubdivisionLevel(i):this.createGeometryByControls(i))}};export{m as a,y as b};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as t}from"./runtime-chunk-
|
|
1
|
+
import{d as t}from"./runtime-chunk-N473U2V2.js";import{a as s,b as a}from"./runtime-chunk-NAJO6T26.js";import{Be as e,Cc as i,Ec as o,Fc as h,Se as r,Ue as d,Ve as n,ye as c}from"./runtime-chunk-BVVSZMXD.js";var l=class extends(s(d)){constructor(t,s=15,a=10066329){super(t,s,a),this.object=t,this.added=!1,this.name=`DirectionalLightHelper: ${t.uuid}`}raycast(t,s){a(this.object,l.geometryHelper,t,s)}},p=class extends(t(e,l)){constructor(t,s,a){super(),this.super_Entity(t,s),this.castShadow=!0,this.shadow.mapSize.width=2048,this.shadow.mapSize.height=2048,this.shadow.normalBias=1,this.layers.enable(3);let e=this.shadow.camera;e.top=1250,e.bottom=-1250,e.right=1250,e.left=-1250,e.near=-1e4,e.far=2500;let i=new n(this.shadow.camera);i.visible=!1,this.gizmos.shadowmap=i}update(){this.shadow.camera.updateProjectionMatrix();for(let t in this.gizmos){let s=this.gizmos[t];s instanceof n&&s.update()}}updateMatrixWorld(t){super.updateMatrixWorld(t),this.objectHelper&&this.objectHelper.update()}updateState(t,s){this.updateState_Light(t,s);let a=void 0!==t.depth&&t.depth!==this.shadow.camera.far||void 0!==t.size&&t.size/2!==this.shadow.camera.right;void 0!==t.size&&function(t,s){t.shadow.camera.right=s/2,t.shadow.camera.left=-s/2,t.shadow.camera.top=s/2,t.shadow.camera.bottom=-s/2,t.shadow.needsUpdate=!0}(this,t.size),void 0!==t.shadowRadius&&(this.shadow.radius=t.shadowRadius),void 0!==t.shadowResolution&&(this.shadow.mapSize.set(t.shadowResolution,t.shadowResolution),this.shadow.map&&(this.shadow.map.dispose(),this.shadow.map=null)),void 0!==t.penumbraSize&&s.scene.markPenumbraSizeDirty(),a&&this.update()}},m=class extends(s(r)){constructor(t,s=6710886){super(t,s),this.object=t,this.matrix=t.matrixWorld,this.name=`SpotLightHelper: ${t.uuid}`}raycast(t,s){a(this.object,m.geometryHelper,t,s)}update(){if(void 0!==this.object){let t=m._vector,s=this.object.distance?this.object.distance:1e3,a=s*Math.tan(this.object.angle);this.cone.scale.set(a,a,s),t.setFromMatrixPosition(this.object.target.matrixWorld),this.cone.lookAt(t);let e=void 0!==this.color?this.color:this.light.color;if(this.cone.material instanceof Array)for(let t=0,s=this.cone.material.length;t<s;t++)this.cone.material[t].color.set(e);else this.cone.material.color.set(e)}}},u=m;u._vector=new h;var w=new h,b=new h,g=new o,v=class extends(t(c,u)){constructor(t,s,a){super(),this.super_Entity(t,s),this.castShadow=!0,this.shadow.mapSize.width=1024,this.shadow.mapSize.height=1024,this.shadow.normalBias=1,this.layers.enable(3);let e=this.shadow.camera;e.fov=2*i.RAD2DEG*this.angle,e.aspect=1,e.near=100,e.far=2500;let o=new n(this.shadow.camera);o.visible=!1,this.gizmos.shadowmap=o,this.update()}update(){this.shadow.camera.updateProjectionMatrix();for(let t in this.gizmos){let s=this.gizmos[t];s instanceof n&&s.update()}}updateMatrixWorld(t){super.updateMatrixWorld(t),b.setFromMatrixPosition(this.matrixWorld),g.setFromRotationMatrix(this.matrixWorld),w.copy(this.up).applyQuaternion(g).negate().multiplyScalar(this.distance),this.target.position.copy(b).add(w),this.target.updateMatrixWorld(),this.objectHelper&&this.objectHelper.update()}updateState(t,s){this.updateState_Light(t,s),void 0!==t.distance&&(this.distance=t.distance),void 0!==t.decay&&(this.decay=t.decay),void 0!==t.angle&&(this.angle=t.angle),void 0!==t.penumbra&&(this.penumbra=t.penumbra),void 0!==t.shadowRadius&&(this.shadow.radius=t.shadowRadius),void 0!==t.penumbraSize&&s.scene.markPenumbraSizeDirty(),void 0!==t.shadowResolution&&(this.shadow.mapSize.set(t.shadowResolution,t.shadowResolution),this.shadow.map&&(this.shadow.map.dispose(),this.shadow.map=null))}};export{p as a,v as b};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./runtime-chunk-TU4KDRKR.js";import{W as o}from"./runtime-chunk-
|
|
1
|
+
import{a as e}from"./runtime-chunk-TU4KDRKR.js";import{W as o}from"./runtime-chunk-YURN6PI7.js";import{Dc as n,Fc as t,Jc as r}from"./runtime-chunk-BVVSZMXD.js";var i={enabled:!1},s=new WeakMap;function a(e){if(!i.enabled)return e;let o=s.get(e);return o||(o={...e,bloom:{...e.bloom,kernelSize:0},depthOfField:{...e.depthOfField,enabled:!1}},s.set(e,o)),o}var c=new WeakSet;function l(e){if(!e.isPointLight&&!e.isSpotLight&&!e.isDirectionalLight)return!1;if(i.enabled){if(!0===e.castShadow)return e.castShadow=!1,c.add(e),!0}else if(c.has(e)&&(c.delete(e),!1===e.castShadow))return e.castShadow=!0,!0;return!1}function u(i,s){switch(i.type){case"cavity":return function(e,o){return{...h(e,o),ridge:e.ridge,valley:e.valley}}(i,s);case"dust":return function(n,t){return{...h(n,t),color:e(n.color,t),coverage:o(n.coverage,t)??.2,softness:o(n.softness,t)??.2,noiseStrength:o(n.noiseStrength,t)??.2,noiseScale:o(n.noiseScale,t)??1}}(i,s);case"fresnel":return function(o,n){let{bias:t,scale:r,intensity:i,factor:s,color:a}=o;return{...h(o,n),color:e(a,n),bias:t,scale:r,intensity:i,factor:s}}(i,s);case"gradient":return function(e,o){let{gradientType:t,smooth:i,colors:s,steps:a,angle:c,offset:l,morph:u}=e;return{...h(e,o),gradientType:t,smooth:i,colors:s.map(e=>new r(e[0],e[1],e[2],e[3])),num:s.length,steps:a,offset:new n(...l.map(e=>"number"==typeof e?e:0)),morph:new n(...u.map(e=>"number"==typeof e?e:0)),angle:c}}(i,s);case"depth":return function(e,o){let{gradientType:n,near:i,far:s,isVector:a,isWorldSpace:c,origin:l,direction:u,colors:f,steps:p,smooth:m}=e;return{...h(e,o),gradientType:n,near:i,far:s,isVector:a,isWorldSpace:c,origin:new t(...l),direction:u?new t(...u):new t(1,0,0),colors:f.map(e=>void 0!==e?new r(e[0],e[1],e[2],e[3]):new r(0,0,0,0)),steps:p.slice(0,f.length),smooth:m}}(i,s);case"normal":return function(e,o){let{cnormal:n}=e;return{...h(e,o),cnormal:new t(n[0],n[1],n[2])}}(i,s);case"noise":return function(o,r){return{...h(o,r),scale:o.scale,move:o.move,fA:new n(...o.fA.map(e=>"number"==typeof e?e:0)),fB:new n(...o.fB.map(e=>"number"==typeof e?e:0)),size:new t(...o.size),distortion:new n(...o.distortion.map(e=>"number"==typeof e?e:0)),colorA:e(o.colorA,r),colorB:e(o.colorB,r),colorC:e(o.colorC,r),colorD:e(o.colorD,r),noiseType:o.noiseType,voronoiStyle:o.voronoiStyle,highCut:o.highCut,lowCut:o.lowCut,smoothness:o.smoothness,seed:o.seed,quality:o.quality}}(i,s);case"rainbow":return function(e,o){return{...h(e,o),filmThickness:e.filmThickness,movement:e.movement,wavelengths:new t(...e.wavelengths),noiseStrength:e.noiseStrength,noiseScale:e.noiseScale,offset:new t(...e.offset)}}(i,s);case"toon":return function(o,n){return{...h(o,n),positioning:o.positioning,colors:o.colors.map(e=>new r(e[0],e[1],e[2],e[3])),num:o.colors.length,steps:o.steps,source:new t(...o.source),isWorldSpace:o.isWorldSpace,noiseStrength:o.noiseStrength,noiseScale:o.noiseScale,shadowColor:e(o.shadowColor,n),offset:new t(...o.offset)}}(i,s);case"outline":return function(o,n){return{...h(o,n),outlineColor:e(o.outlineColor,n),contourColor:e(o.contourColor,n),outlineWidth:o.outlineWidth,contourWidth:o.contourWidth,outlineThreshold:o.outlineThreshold,contourThreshold:o.contourThreshold,outlineSmoothing:o.outlineSmoothing,contourFrequency:o.contourFrequency,contourDirection:new t(...o.contourDirection),positionalLines:o.positionalLines,compensation:o.compensation}}(i,s);case"transmission":return function(o,n){return{...h(o,n),thickness:o.thickness,ior:o.ior,roughness:o.roughness,attenuationColor:void 0!==o.attenuationColor?e(o.attenuationColor,n):{r:1,g:1,b:1,a:1},attenuationDistance:o.attenuationDistance??0}}(i,s);case"reflection":return function(e,n){return{...h(e,n),blur:o(e.blur,n)??0,thickness:o(e.thickness,n)??.001,steps:o(e.steps,n)??60,stepSize:o(e.stepSize,n)??.005,tracingMode:e.tracingMode,mirror:e.mirror??0}}(i,s);case"pattern":return function(o,t){return{...h(o,t),style:o.style,projection:o.projection,axis:o.axis,blending:o.blending,offset:new n(...o.offset.map(e=>"number"==typeof e?e:0)),colorA:e(o.colorA,t),colorB:e(o.colorB,t),frequency:new n(...o.frequency.map(e=>"number"==typeof e?e:0)),size:o.size,variation:o.variation,smoothness:o.smoothness,zigzag:o.zigzag,rotation:o.rotation,vertical:new n(...o.vertical.map(e=>"number"==typeof e?e:0)),horizontal:new n(...o.horizontal.map(e=>"number"==typeof e?e:0)),sides:o.sides}}(i,s);case"vertexColor":return h(i,s);default:return function(o,n){return{...h(o,n),color:e(o.color,n)}}(i,s)}}function f(e){return{type:e.type}}function h(e,o){let{alpha:n,mode:t,isMask:r}=e,i="string"==typeof n?Number(o.getVariable(n)??100)/100:n;return{...f(e),alpha:i,mode:t,isMask:r}}export{i as a,a as b,l as c,u as d};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./runtime-chunk-FGRW5LUR.js";import{a as e}from"./runtime-chunk-W44H46BZ.js";import{$ as i,ea as a}from"./runtime-chunk-UBSXIKOG.js";import{e as n,h as s}from"./runtime-chunk-6ARRPM23.js";import{a as r}from"./runtime-chunk-2PT2WH66.js";import{Aa as o,Dc as l,Ec as h,Fc as p,Ja as d,Jc as c,Lc as f,Ma as u,Oc as v,Qe as m,Vc as x,Vd as y,Zc as g,ce as S,dd as b,de as T,ld as P,na as _,nc as z,nd as w,we as R}from"./runtime-chunk-BVVSZMXD.js";var O=new b;O.setAttribute("position",new g(new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),3));var L=class extends T{constructor(t){super({...t,depthTest:!1,depthWrite:!1,glslVersion:z,vertexShader:"\n\t\t\t\tprecision highp float;\n\t\t\t\tin vec3 position;\n\t\t\t\tvoid main() {\n\t\t\t\t\tgl_Position = vec4(position, 1);\n\t\t\t\t}\n\t\t\t"})}customProgramCacheKey(){return""}};function k(){return{shapeInput:()=>"\n\t\t\tconst float posRowCoord = 0.1; \n\t\t\tconst float quatRowCoord = 0.3; \n\t\t\tconst float param1RowCoord = 0.5;\n\t\t\tconst float param2RowCoord = 0.7;\n\t\t\tconst float colorRowCoord = 0.9; \n\t\t\tuniform sampler2D shapesDataTexture;\n\t\t\tvec4 shapePos(float iin) { \n\t\t\t\tvec4 r = texture(shapesDataTexture, vec2(iin, posRowCoord));\n\t\t\t\treturn r;\n\t\t\t}\n\t\t\tvec4 shapeQuat(float iin) {\n\t\t\t\tvec4 r = texture(shapesDataTexture, vec2(iin, quatRowCoord));\n\t\t\t\treturn r;\n\t\t\t}\n\t\t\tvec4 shapeParams1(float iin) {\n\t\t\t\tvec4 r = texture(shapesDataTexture, vec2(iin, param1RowCoord));\n\t\t\t\treturn r;\n\t\t\t}\n\t\t\tvec4 shapeParams2(float iin) {\n\t\t\t\tvec4 r = texture(shapesDataTexture, vec2(iin, param2RowCoord));\n\t\t\t\treturn r;\n\t\t\t}\n\t\t\tvec4 shapeColor(float iin) {\n\t\t\t\tvec4 r = texture(shapesDataTexture, vec2(iin, colorRowCoord));\n\t\t\t\treturn r;\n\t\t\t}\n\t\t",getxyzi:"\n\t\t\t// this code must complement lookup\n\t\t\tfloat xi = mod(gl_FragCoord.x - 0.5, VOXEL_RESOLUTION);\n\t\t\tfloat yi = mod(gl_FragCoord.y - 0.5, VOXEL_RESOLUTION);\n\t\t\tfloat zi = floor((gl_FragCoord.x - 0.5) * INV_VOXEL_RESOLUTION) + floor((gl_FragCoord.y - 0.5) * INV_VOXEL_RESOLUTION) * Z_LAYERS_PER_ROW;\n\t\t",lookup:"\n\t\t\tuniform sampler2D potentialPassTexture;\n\t\t\tuniform sampler2D voxelPassTexture; \n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tvec4 look(float xi, float yi, float zi, sampler2D rt) {\n\t\t\t\tvec2 uv = vec2(\n\t\t\t\t\tmod(zi, Z_LAYERS_PER_ROW) + (xi + 0.5) / VOXEL_RESOLUTION,\n\t\t\t\t\tfloor(zi / Z_LAYERS_PER_ROW) + (yi + 0.5) / VOXEL_RESOLUTION\n\t\t\t\t); \n\t\t\t\tuv /= Z_LAYERS_PER_ROW;\n\t\t\t\treturn texture(rt, uv);\n\t\t\t}\n\t\t",getpart:"\n\t\t\tfloat getpart(inout float a, float b) {\n\t\t\t\tfloat t = floor(a/b);\n\t\t\t\tfloat r = a - t*b;\n\t\t\t\ta = t;\n\t\t\t\treturn r;\n\t\t\t}\n\t\t",triTable:new Float32Array([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3,8,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,9,1,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3,8,1,1,8,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,10,2,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3,8,0,10,2,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,10,2,9,9,2,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3,8,2,8,10,2,8,9,10,-1,-1,-1,-1,-1,-1,-1,2,11,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2,11,0,0,11,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,9,1,11,3,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2,11,1,11,9,1,11,8,9,-1,-1,-1,-1,-1,-1,-1,1,10,3,3,10,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,10,0,10,8,0,10,11,8,-1,-1,-1,-1,-1,-1,-1,0,9,3,9,11,3,9,10,11,-1,-1,-1,-1,-1,-1,-1,10,8,9,11,8,10,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8,7,4,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,3,4,4,3,7,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,9,1,0,7,4,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,9,1,4,1,7,4,1,3,7,-1,-1,-1,-1,-1,-1,-1,10,2,1,7,4,8,-1,-1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3,2,4,5,5,4,5,2,4,1,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,3,2,3,3,4,3,4,4,5,3,2,4,3,4,3,5,2,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,4,3,4,4,3,4,5,5,4,4,3,5,2,5,4,2,1,2,3,3,4,3,4,4,5,3,4,4,5,2,3,3,2,3,4,4,5,4,5,5,2,4,3,5,4,3,2,4,1,3,4,4,5,4,5,3,4,4,5,5,2,3,4,2,1,2,3,3,2,3,4,2,1,3,2,4,1,2,1,1,0])}}var D=new R,U=null;function E(t){U=t}function M(){return U}var C=null;function F(t){C=t}function I(){return C}var N=null;function V(t){N=t}function B(){return N}var X=k(),A=24,W=96,H=!1,q=!0;try{let t=new URLSearchParams(window.location.search);H="0"===t.get("dbgsbstatic"),q="0"!==t.get("sb512")}catch{}function K(t){let e=t.getAttribute("position");return void 0===e?-1:1048576*(e.version??e.data?.version??0)+(e.count??0)%1048576}var G=class extends a{constructor(t,e,i){super(t,e,i),this.data=e,this.isShapeBlendEntity=!0,this.needsRebuild=!0,this.customDepthMaterialNeedsUpdate=!1,this._prevShapeData=null,this._prevSpan=-1,this._reach=new Float32Array(96),this._prevReach=new Float32Array(96),this._fieldDirtyFull=!0,this._fieldDirtyMin=new p,this._fieldDirtyMax=new p,this._maxBlendK=0,this._meshSdfBaked=new Map,this._meshSdfWanted=new Map,this._passesRenderer=null,this._npart=-1,this.spatialn=1,this.drawRangeNeedsForceUpdate=!0,this._resolutionLevel=-1,this._authoredResolutionLevel=-1,this.ultraFieldResolution=0,this.resolution=64,this.spatialDivisions=25,this.zLayersPerRow=8,this.basePyramidSize=512,this.pyramidTexture1Width=341,this.pyramidTexture1Height=256,this.pyramidTexture2Width=170,this.pyramidTexture2Height=128,this.numLevels=9,this.pyramidLevelSizes=[1,2,4,8,16,32,64,128,256,512],this.bboxSize=0,this.bboxOffset=0,this.shapesDataTexture={value:void 0},this.spatialscene=new x,this.potentialPassScene=new x,this.voxelPassScene=new x,this._spatialPassRenderTargets=[],this._potentialPassRenderTargets=[],this._voxelPassRenderTargets=[],this._pyramidRenderTargets=[],this.geometry=new b,this.geometry.drawRange.count=0,this.spatialPassUniforms={span:{value:-1},shapesDataTexture:this.shapesDataTexture,npart:{value:this.npart},spatialn:{value:this.spatialn}},this.spatialMesh=new P(O,this.spatialPassMaterial()),this.spatialMesh.frustumCulled=!1,this.spatialscene.add(this.spatialMesh);let a=new w(X.triTable,16,256,u,o);a.needsUpdate=!0;let n=new w(X.numTrisTable,256,1,u,o);n.needsUpdate=!0,this.voxelPassUniforms={potentialPassTexture:{value:void 0},numTrisTable:{value:n}},this.voxelMesh=new P(O,this.voxelPassMaterial()),this.voxelMesh.frustumCulled=!1,this.voxelPassScene.add(this.voxelMesh),this.potentialPassUniforms={shapesDataTexture:this.shapesDataTexture,spatialPassTexture:{value:void 0},npart:{value:this.npart},spatialn:{value:this.spatialn}},this.potentialMesh=new P(O,this.potentialPassMaterial()),this.potentialMesh.frustumCulled=!1,this.potentialPassScene.add(this.potentialMesh),this.marchPassUniforms={triTable:{value:a},potentialPassTexture:{value:void 0},voxelPassTexture:{value:void 0},pyramidTexture1:{value:void 0},pyramidTexture1Size:{value:void 0},pyramidTexture2:{value:void 0},pyramidTexture2Size:{value:void 0}},this.frustumCulled=!1,this.onBeforeShadowPass=t=>{let e=at.call(this);if(0===this.npart)return void(this.geometry.drawRange.count=0);let i=this.material.root;if(i.shadersPatchedForShapeBlend){if(this.customDepthMaterialNeedsUpdate){this.customDepthMaterialNeedsUpdate=!1,this.customDepthMaterial=new S({vertexShader:i.vertexShader,fragmentShader:"\n\t\t\t\t\t\t#include <packing>\n\t\t\t\t\t\tvoid main()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgl_FragColor = packDepthToRGBA(gl_FragCoord.z);\n\t\t\t\t\t\t}\n\t\t\t\t\t",uniforms:i.uniforms,defines:this.material.defines}),this.isMeshDepthMaterial=!0,this.customDistanceMaterial=new S({vertexShader:i.vertexShader,fragmentShader:"\n\t\t\t\t\t#include <common>\n\t\t\t\t\t#include <packing>\n\t\t\t\t\tuniform vec3 referencePosition;\n\t\t\t\t\tuniform float nearDistance;\n\t\t\t\t\tuniform float farDistance;\n\t\t\t\t\t\n\t\t\t\t\tvarying vec3 vWPosition;\n\t\t\t\t\tvoid main()\n\t\t\t\t\t{\n\t\t\t\t\t\tfloat dist = length(vWPosition - referencePosition);\n\t\t\t\t\t\tdist = (dist - nearDistance) / (farDistance - nearDistance);\n\t\t\t\t\t\tdist = saturate(dist);\n\t\t\t\t\t\t\n\t\t\t\t\t\tgl_FragColor = packDepthToRGBA( dist );\n\t\t\t\t\t}",uniforms:{nearDistance:{value:0},farDistance:{value:0},referencePosition:{value:new p},opacity:{value:0},...i.uniforms},defines:this.material.defines});let t=this.customDistanceMaterial;t.referencePosition=new p,t.nearDistance=0,t.farDistance=0,t.opacity=1,t.isMeshDistanceMaterial=!0}}else this.patchVertexShaderForShapeBlend(i),i.shadersPatchedForShapeBlend=!0,this.customDepthMaterialNeedsUpdate=!0;this.spatialPassUniforms.npart.value=this.npart,this.spatialPassUniforms.spatialn.value=this.spatialn,this.potentialPassUniforms.npart.value=this.npart,this.potentialPassUniforms.spatialn.value=this.spatialn;let a=this.needsRebuild;if(this.needsRebuild){this.needsRebuild=!1,this.spatialMesh.material.defines.RES=this.resolutionLevel,this.spatialMesh.material.needsUpdate=!0,this.potentialMesh.material.defines.RES=this.resolutionLevel,this.potentialPassUniforms.spatialPassTexture.value=this.spatialPassRenderTarget.texture,this.potentialMesh.material.needsUpdate=!0,this.voxelMesh.material.defines.RES=this.resolutionLevel,this.voxelMesh.material.needsUpdate=!0,this.voxelPassUniforms.potentialPassTexture.value=this.potentialPassRenderTarget.texture,this.marchPassUniforms.potentialPassTexture.value=this.potentialPassRenderTarget.texture,this.marchPassUniforms.voxelPassTexture.value=this.voxelPassRenderTarget.textures[0],this.material.defines.RES=this.resolutionLevel,this.material.defines.LEVELS=this.pyramidLevelSizes.length,this.material.defines.LOOP=this.pyramidLevelSizes.length%2==0?this.pyramidLevelSizes.length-3:this.pyramidLevelSizes.length-2,this.material.defines.HALF=this.pyramidLevelSizes.length%2==0?1:0,this.material.needsUpdate=!0;let t=this.pyramidLevelSizes.length%2==0?0:1,e=this.pyramidLevelSizes.length%2==0?1:0;this.marchPassUniforms.pyramidTexture2.value=this.pyramidRenderTarget[t].texture,this.marchPassUniforms.pyramidTexture2Size.value=new l(this.pyramidRenderTarget[t].width,this.pyramidRenderTarget[t].height),this.marchPassUniforms.pyramidTexture1.value=this.pyramidRenderTarget[e].texture,this.marchPassUniforms.pyramidTexture1Size.value=new l(this.pyramidRenderTarget[e].width,this.pyramidRenderTarget[e].height),Object.assign(this.material.uniforms,this.marchPassUniforms)}if(!e&&!a&&!this.drawRangeNeedsForceUpdate&&this._passesRenderer===t)return;this._passesRenderer=t;let n=t.shadowMap.enabled;t.shadowMap.enabled=!1;let s=t.getRenderTarget();t.setRenderTarget(this.spatialPassRenderTarget),t.render(this.spatialscene,D),t.setRenderTarget(this.potentialPassRenderTarget),t.render(this.potentialPassScene,D),t.setRenderTarget(this.voxelPassRenderTarget),t.render(this.voxelPassScene,D),G.streamCompaction.renderPyramid(this.resolutionLevel,this.pyramidLevelSizes,t,this.voxelPassRenderTarget,this.pyramidRenderTarget).then(t=>{this.material.wireframe&&(3*t>this.geometry.attributes.position.count||this.drawRangeNeedsForceUpdate)&&(this.geometry.dispose(),this.geometry=new b,this.geometry.userData.parameters={width:this.bboxSize,height:this.bboxSize,depth:this.bboxSize,centerOffset:[this.bboxOffset,this.bboxOffset,this.bboxOffset]},this.geometry.attributes.position=new g(new Float32Array(3*t*2),3)),(3*t>this.geometry.drawRange.count||this.drawRangeNeedsForceUpdate)&&(this.geometry.drawRange.count=3*Math.floor(1.2*t),this.markSceneShadowsDirty()),this.drawRangeNeedsForceUpdate=!1}),t.shadowMap.enabled=n,t.setRenderTarget(s)}}markSceneShadowsDirty(){let t=this.parent;if(null!==t){for(;t.parent;)t=t.parent;t.markShadowsDirty?.()}}set npart(t){t!==this._npart&&(this.drawRangeNeedsForceUpdate=!0,this._npart=t,this.spatialn=Math.ceil(t/96))}get npart(){return this._npart}set resolutionLevel(t){let e=Math.min(q?9:8,Math.max(5,t));if(e===this._authoredResolutionLevel)return;this._authoredResolutionLevel=e,this.ultraFieldResolution=Math.pow(2,e);let i=Math.min(8,e);switch(this._resolutionLevel=i,this.resolution=Math.pow(2,i),this.resolutionLevel){case 5:this.pyramidLevelSizes=[1,2,4,6,12,24,48,96,192],this.bboxSize=496,this.bboxOffset=-8;break;case 6:this.pyramidLevelSizes=[1,2,4,8,16,32,64,128,256,512],this.bboxSize=504,this.bboxOffset=-4;break;case 7:this.pyramidLevelSizes=[1,2,4,6,12,24,48,96,192,384,768,1536],this.bboxSize=508,this.bboxOffset=-2;break;case 8:this.pyramidLevelSizes=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096],this.bboxSize=510,this.bboxOffset=-1}this.pyramidTexture1Width=0,this.pyramidTexture2Width=0,this.pyramidTexture1Height=this.pyramidLevelSizes[this.pyramidLevelSizes.length-2],this.pyramidTexture2Height=this.pyramidLevelSizes[this.pyramidLevelSizes.length-3];for(let t=this.pyramidLevelSizes.length-2;t>=0;t--)(this.pyramidLevelSizes.length-2)%2==t%2?this.pyramidTexture1Width+=this.pyramidLevelSizes[t]:this.pyramidTexture2Width+=this.pyramidLevelSizes[t];this.basePyramidSize=this.pyramidLevelSizes[this.pyramidLevelSizes.length-1],this.zLayersPerRow=this.basePyramidSize/this.resolution,this.numLevels=this.pyramidLevelSizes.length-1,this.geometry.userData.parameters={width:this.bboxSize,height:this.bboxSize,depth:this.bboxSize,centerOffset:[this.bboxOffset,this.bboxOffset,this.bboxOffset]},this.needsRebuild=!0,this.customDepthMaterialNeedsUpdate=!0}get resolutionLevel(){return this._resolutionLevel}get spatialPassRenderTarget(){let t=this._spatialPassRenderTargets[this.resolutionLevel];return t||(t=new f(this.spatialDivisions*this.spatialn,this.spatialDivisions**2,{format:d,type:o,stencilBuffer:!1,depthBuffer:!1,generateMipmaps:!1,minFilter:_,magFilter:_}),this._spatialPassRenderTargets[this.resolutionLevel]=t),t}get potentialPassRenderTarget(){let t=this._potentialPassRenderTargets[this.resolutionLevel];return t||(t=new f(this.basePyramidSize,this.basePyramidSize,{format:d,type:o,stencilBuffer:!1,depthBuffer:!1,generateMipmaps:!1,minFilter:_,magFilter:_}),this._potentialPassRenderTargets[this.resolutionLevel]=t),t}get voxelPassRenderTarget(){let t=this._voxelPassRenderTargets[this.resolutionLevel];return t||(t=new f(this.basePyramidSize,this.basePyramidSize,{count:2,stencilBuffer:!1,depthBuffer:!1,generateMipmaps:!1,minFilter:_,magFilter:_}),t.textures[0].format=d,t.textures[0].type=o,t.textures[1].format=u,t.textures[1].type=o,this._voxelPassRenderTargets[this.resolutionLevel]=t),t}get pyramidRenderTarget(){let t=this._pyramidRenderTargets[this.resolutionLevel];return t||(t=[new f(this.pyramidTexture1Width,this.pyramidTexture1Height,{format:d,type:o,stencilBuffer:!1,depthBuffer:!1,magFilter:_,minFilter:_}),new f(this.pyramidTexture2Width,this.pyramidTexture2Height,{format:d,type:o,stencilBuffer:!1,depthBuffer:!1,magFilter:_,minFilter:_})],this._pyramidRenderTargets[this.resolutionLevel]=t),t}updateState(t,e){let i=this.material;super.updateState(t,e),i!==this.material&&(this.needsRebuild=!0),t.geometry&&(this.resolutionLevel=t.geometry.resolutionLevel,this.geometry.userData.parameters={width:this.bboxSize,height:this.bboxSize,depth:this.bboxSize,centerOffset:[this.bboxOffset,this.bboxOffset,this.bboxOffset]}),t.wireframe&&!this.geometry.getAttribute("position")?this.geometry.setAttribute("position",new g(new Float32Array(3*this.geometry.drawRange.count),3)):!t.wireframe&&this.geometry.getAttribute("position")&&this.geometry.deleteAttribute("position")}spatialPassMaterial(){let t=`\n\t\t\tprecision highp float;\n\t\t\tout vec4 pc_FragColor;\n\t\t\tconst float spatialDivisions = ${this.spatialDivisions}.;\n\t\t\tuniform float span;\n\t\t\tuniform float npart;\n\t\t\tuniform float spatialn;\n\t\t\t${X.shapeInput()}\n\n\t\t\tvec3 low, high; \n\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tfloat spatialKey(float lowi) {\n\t\t\t\tfloat t = 0.;\n\t\t\t\tfor (float ii = 23.; ii >= 0.; ii--) {\n\t\t\t\t\tfloat i = ii + lowi;\n\t\t\t\t\tfloat iin = (i + 0.5) / 96.;\n\t\t\t\t\tvec4 shape = shapePos(iin);\n\t\t\t\t\tvec3 d = shape.xyz;\n\t\t\t\t\tfloat op = shape.w;\n\t\n\t\t\t\t\tt *= 2.;\n\t\t\t\t\tt += (\n\t\t\t\t\t\tlow.x < d.x && d.x < high.x &&\n\t\t\t\t\t\tlow.y < d.y && d.y < high.y &&\n\t\t\t\t\t\tlow.z < d.z && d.z < high.z &&\n\t\t\t\t\t\ti < npart || op == -2. \n\t\t\t\t\t) ? 1. : 0.;\n\t\t\t\t}\n\t\t\t\treturn t;\n\t\t\t}\n\n\t\t\t${X.getpart}\n\n\t\t\tvoid main() { \n\t\t\t\t\n\t\t\t\tvec3 div; \n\t\t\t\t\n\t\t\t\tfloat yz = float(gl_FragCoord.y - 0.5); \n\t\t\t\tdiv.y = getpart(yz, spatialDivisions);\n\t\t\t\tdiv.z = yz; \n\n\t\t\t\tfloat lx = float(gl_FragCoord.x - 0.5); \n\t\t\t\tfloat lowi = getpart(lx, spatialn) * 96.;\n\t\t\t\tdiv.x = lx;\n\n\t\t\t\tlow = div / spatialDivisions * 2. - 1. - span;\n\t\t\t\thigh = (div+1.) / spatialDivisions * 2. - 1. + span;\n\n\t\t\t\t\n\t\t\t\tpc_FragColor.x = spatialKey(lowi);\n\t\t\t\tpc_FragColor.y = spatialKey(lowi+24.);\n\t\t\t\tpc_FragColor.z = spatialKey(lowi+48.);\n\t\t\t\tpc_FragColor.w = spatialKey(lowi+72.);\n\t\t\t}\n\t\t`;return new L({name:"Spatial Pass",fragmentShader:t,uniforms:this.spatialPassUniforms})}potentialPassMaterial(){let t=`\n\t\t\tprecision highp float;\n\t\t\tout vec4 pc_FragColor;\n\n\t\t\t${X.shapeInput()}\n\t\t\tuniform sampler2D spatialPassTexture;\n\n\t\t\tconst float res = float(RES);\n\t\t\tconst float VOXEL_RESOLUTION = pow(2., res);\n\t\t\tconst float Z_LAYERS_PER_ROW = ceil(pow(2., res / 2.));\n\t\t\tconst float VOXEL_RESOLUTION_SUB1 = VOXEL_RESOLUTION - 1.;\n\t\t\tconst float INV_VOXEL_RESOLUTION = 1.0 / VOXEL_RESOLUTION;\n\n\t\t\tuniform float npart;\n\t\t\tuniform float spatialn;\n\t\t\tconst float spatialDivisions = ${this.spatialDivisions}.;\n\t\t\tconst float spatialDivisions2 = spatialDivisions * spatialDivisions;\n\t\t\tconst float spatialDivisionsSub1 = spatialDivisions - 1.;\n\n\t\t\t${X.getpart}\n\n\t\t\tvec3 packRGBAToVec3(vec4 color) {\n\t\t\t\tuint r = uint(color.r * 255.);\n\t\t\t\tuint g = uint(color.g * 255.);\n\t\t\t\tuint combined = (r << 8) | g; \n\t\t\t\treturn vec3(float(combined) * 0.00001525902, color.b, color.a); \n\t\t\t}\n\n\t\t\tvoid applyQuaternionToVector(in vec4 q, inout vec3 v) {\n\t\t\t\tv += 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);\n\t\t\t}\n\n\t\t\t\n\n\n\n\t\t\t\n\t\t\tfloat smoothOperation(float op, float sdf, float d, float k) {\n\t\t\t \n\t\t\t \n\t\t\t\t\n\n\t\t\t\tfloat signSubtract = clamp(op, -1., 1.);\n\t\t\t\tfloat signIntersection = 2. * (op - signSubtract) + 1.;\n\t\t\t\tfloat h = clamp(\n\t\t\t\t\t0.5 + signSubtract * 0.5 * (sdf - signSubtract * signIntersection * d) / k,\n\t\t\t\t\t0.0,\n\t\t\t\t\t1.0\n\t\t\t\t);\n\t\t\t\treturn mix(sdf, signSubtract * signIntersection * d, h) - \n\t\t\t\t\t\t\t signSubtract * k * h * (1.0 - h);\n\t\t\t}\n\n\t\t\tfloat sdSphere( vec3 p, float s )\n\t\t\t{\n\t\t\t\treturn length(p)-s;\n\t\t\t}\n\n\t\t\tfloat sdEllipsoid( vec3 p, vec3 r )\n\t\t\t{\n\t\t\t\tfloat k0 = length(p/r);\n\t\t\t\tfloat k1 = length(p/(r*r));\n\t\t\t\treturn k0*(k0-1.0)/k1;\n\t\t\t}\n\n\t\t\tfloat sdBox( vec3 p, vec3 b )\n\t\t\t{\n\t\t\t\tvec3 q = abs(p) - b;\n\t\t\t\treturn length(max(q,0.0)) + min(max(q.x,max(q.y,q.z)),0.0);\n\t\t\t}\n\n\t\t\tfloat sdTorus( vec3 p, vec2 t )\n\t\t\t{\n\t\t\t\tvec2 q = vec2(length(p.xy)-t.x,p.z);\n\t\t\t\treturn length(q)-t.y;\n\t\t\t}\n\n\t\t\tfloat sdCappedTorus( vec3 p, vec2 sc, float ra, float rb)\n\t\t\t{\n\t\t\t\tp.x = abs(p.x);\n\t\t\t\tfloat k = (sc.y*p.x>sc.x*p.y) ? dot(p.xy,sc) : length(p.xy);\n\t\t\t\treturn sqrt( dot(p,p) + ra*ra - 2.0*ra*k ) - rb;\n\t\t\t}\n\n\t\t\tfloat dot2( in vec2 v ) { return dot(v,v); }\n\t\t\tfloat sdCappedCone( vec3 p, float h, float r1, float r2 )\n\t\t\t{\n\t\t\t\tvec2 q = vec2( length(p.xz), p.y );\n\t\t\t\tvec2 k1 = vec2(r2,h);\n\t\t\t\tvec2 k2 = vec2(r2-r1,2.0*h);\n\t\t\t\tvec2 ca = vec2(q.x-min(q.x,(q.y<0.0)?r1:r2), abs(q.y)-h);\n\t\t\t\tvec2 cb = q - k1 + k2*clamp( dot(k1-q,k2)/dot2(k2), 0.0, 1.0 );\n\t\t\t\tfloat s = (cb.x<0.0 && ca.y<0.0) ? -1.0 : 1.0;\n\t\t\t\treturn s*sqrt( min(dot2(ca),dot2(cb)) );\n\t\t\t}\n\n\t\t\tfloat sdCappedCylinder( vec3 p, float h, float r )\n\t\t\t{\n\t\t\t\tvec2 d = abs(vec2(length(p.xz),p.y)) - vec2(r,h);\n\t\t\t\treturn min(max(d.x,d.y),0.0) + length(max(d,0.0));\n\t\t\t}\n\n\t\t\tfloat maxBlend = 0.0;\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tvoid fillSpatialInner(\n\t\t\t\tfloat ii,\n\t\t\t\tfloat activeKey,\n\t\t\t\tvec3 corner,\n\t\t\t\tinout float sdf,\n\t\t\t\tinout float colorDivisor,\n\t\t\t\tinout vec4 trackColor\n\t\t\t) {\n\t\t\t\tfor (float i = 0.; i < 24.; i++) {\n\t\t\t\t\tif (activeKey < 1.) break; \n\t\t\t\t\tactiveKey *= 0.5;\n\t\t\t\t\tif (fract(activeKey) < 0.5) continue;\n\n\t\t\t\t\tfloat iin = (i + ii + 0.5) * ${1/96};\n\t\t\t\t\tvec4 shape = shapePos(iin);\n\t\t\t\t\tvec4 quat = shapeQuat(iin);\n\t\t\t\t\tvec4 params1 = shapeParams1(iin);\n\t\t\t\t\tvec4 params2 = shapeParams2(iin);\n\n\t\t\t\t\tvec3 p = corner - shape.xyz;\n\t\t\t\t\tapplyQuaternionToVector(quat, p);\n\t\t\t\t\tp /= params2.z; // scale\n\t\t\t\t\tfloat d; // d in -1..1 coordinates\n\t\t\t\t\tswitch (int(params1.x)) {\n\t\t\t\t\t\tcase 0: d = sdSphere(p, params1.y); break;\n\t\t\t\t\t\tcase 1: d = sdEllipsoid(p, params1.yzw); break;\n\t\t\t\t\t\tcase 2: d = sdBox(p, params1.yzw); break;\n\t\t\t\t\t\tcase 3: d = sdCappedCylinder(p, params1.y, params1.z); break;\n\t\t\t\t\t\tcase 4: d = sdCappedCone(p, params1.y, params1.z, params1.w); break;\n\t\t\t\t\t\tcase 5: d = sdTorus(p, params1.yz); break;\n\t\t\t\t\t\tcase 6: d = sdCappedTorus(p, params1.yz, params1.w, params2.w); break;\n\t\t\t\t\t\t// Mesh children (type 7) live in a WebGPU-only baked SDF\n\t\t\t\t\t\t// atlas — the GLSL evaluator skips the shape entirely\n\t\t\t\t\t\t// (also closes the latent uninitialized-d default).\n\t\t\t\t\t\tdefault: continue;\n\t\t\t\t\t}\n\t\t\t\t\td -= params2.y; // rounded edge\n\t\t\t\t\td *= params2.z; // scale\n\n\t\t\t\t\tfloat k = params2.x;\n\t\t\t\t\tfloat op = shape.w;\n\n\t\t\t\t\tsdf = smoothOperation(shape.w, sdf, d, k);\n\n\t\t\t\t\tfloat isNegativeOne = step(-1.5, op) * step(op, -0.5); // 1 when op == -1, 0 otherwise\n\t\t\t\t\tfloat colorCull = smoothstep(maxBlend, 0., -d);\n\t\t\t\t\tfloat cullFactor = mix(1.0, colorCull, isNegativeOne);\n\t\t\t\t\ttrackColor *= cullFactor;\n\t\t\t\t\tcolorDivisor *= cullFactor;\n\n\t\t\t\t\tmaxBlend = max(maxBlend, k);\n\n\t\t\t\t\tk += 2. * INV_VOXEL_RESOLUTION; // avoid division by zero, and other color artifacts with very small k\n\t\t\t\t\tfloat nearness = smoothstep(k, 0., d);\n\n\t\t\t\t\tvec4 color = shapeColor(iin);\n\t\t\t\t\tnearness *= float(color.a >= 0.);\n\n\t\t\t\t\tcolorDivisor += nearness;\n\t\t\t\t\ttrackColor += color * nearness;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvec3 div;\n\t\t\t// compute potential from all spheres; collect +ve and =ve values separately\n\t\t\t// work in blocks of A*4 (=96) spheres, using the bit flags in 4 float channel 'activeKey' values\n\t\t\t// TODO check if extra vec3 output useful, not really used at present\n\t\t\tfloat fillSpatial(vec3 corner, inout vec4 trackColor) {\n\t\t\t\tfloat sdf = 1e3; // hack: initialize to large value\n\t\t\t\tfloat colorDivisor = 0.;\n\t\t\t\t// spatialPassTexture holds x=> lowi, x faster moving and y=> z, y faster moving\n\t\t\t\tfloat divyz = (div.y + div.z * spatialDivisions + 0.5) / (spatialDivisions2);\n\t\t\t\tfor (float ii = 0.; ii < spatialn; ii++) {\n\t\t\t\t\tfloat i = ii * 96.;\n\n\t\t\t\t\tvec4 activeKey = texture(spatialPassTexture, vec2((div.x * spatialn + ii + 0.5)/(spatialn * spatialDivisions), divyz));\n\t\t\t\t\tfillSpatialInner(i, activeKey.x, corner, sdf, colorDivisor, trackColor);\n\t\t\t\t\tfillSpatialInner(i+24., activeKey.y, corner, sdf, colorDivisor, trackColor);\n\t\t\t\t\tfillSpatialInner(i+48., activeKey.z, corner, sdf, colorDivisor, trackColor);\n\t\t\t\t\tfillSpatialInner(i+72., activeKey.w, corner, sdf, colorDivisor, trackColor);\n\t\t\t\t}\n\n\t\t\t\ttrackColor /= colorDivisor;\n\t\t\t\treturn mix(sdf, 0.0, step(1e20 - 0.1, sdf));\n\t\t\t}\n\n\t\t\tvoid main() {\n\t\t\t\t${X.getxyzi} \n\n\t\t\t\tvec3 xyzi = vec3(xi,yi,zi);\n\t\t\t\tvec3 corner = xyzi / VOXEL_RESOLUTION_SUB1 * 2. - 1.; \n\n\t\t\t\tdiv = floor(xyzi / VOXEL_RESOLUTION_SUB1 * spatialDivisionsSub1);\n\n\t\t\t\tvec4 c = vec4(0.);\n\t\t\t\tfloat t = fillSpatial(corner, c);\n\n\t\t\t\tpc_FragColor = vec4(t, packRGBAToVec3(c)); \n\t\t\t}\n\t\t`;return new L({name:"PotentialPass",fragmentShader:t,uniforms:this.potentialPassUniforms})}voxelPassMaterial(){let t=`\n\t\t\tprecision highp float;\n\t\t\tlayout(location = 0) out vec4 pc_FragColor;\n\t\t\tlayout(location = 1) out vec4 numTris;\n\n\t\t\tconst float res = float(RES);\n\t\t\tconst float VOXEL_RESOLUTION = pow(2., res);\n\t\t\tconst float VOXEL_RESOLUTION_SUB1 = VOXEL_RESOLUTION - 1.; \n\t\t\tconst float Z_LAYERS_PER_ROW = ceil(pow(2., res / 2.));\n\t\t\tconst float INV_VOXEL_RESOLUTION = 1.0 / VOXEL_RESOLUTION;\n\t\t\tuniform sampler2D numTrisTable; \n\n\t\t\tfloat keyi(float f000, float f100, float f010, float f110, float f001, float f101, float f011, float f111) {\n\t\t\t\treturn (float(f000 < 0.) * 1.) +\n\t\t\t\t\t\t\t (float(f100 < 0.) * 2.) +\n\t\t\t\t\t\t\t (float(f010 < 0.) * 8.) +\n\t\t\t\t\t\t\t (float(f110 < 0.) * 4.) +\n\t\t\t\t\t\t\t (float(f001 < 0.) * 16.) +\n\t\t\t\t\t\t\t (float(f101 < 0.) * 32.) +\n\t\t\t\t\t\t\t (float(f011 < 0.) * 128.) +\n\t\t\t\t\t\t\t (float(f111 < 0.) * 64.);\n\t\t\t}\n\n\t\t\t${X.lookup}\n\n\t\t\tvec3 compNormi(float xi, float yi, float zi) {\n\t\t\t\tfloat dx = look(xi + 1., yi, zi, potentialPassTexture).r - look(xi - 1., yi, zi, potentialPassTexture).r;\n\t\t\t\tfloat dy = look(xi, yi + 1., zi, potentialPassTexture).r - look(xi, yi - 1., zi, potentialPassTexture).r;\n\t\t\t\tfloat dz = look(xi, yi, zi + 1., potentialPassTexture).r - look(xi, yi, zi - 1., potentialPassTexture).r;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (dx == 0.0 && dy == 0.0 && dz == 0.0) {\n\t\t\t\t\treturn vec3(0.199, 0.299, 0.399);\n\t\t\t\t}\n\t\t\t\treturn normalize(vec3(dx, dy, dz));\n\t\t\t}\n\n\t\t\tvoid main() {\n\t\t\t\t${X.getxyzi} \n\n\t\t\t\tvec3 normal = compNormi(xi, yi, zi); \n\n\t\t\t\tif (xi >= VOXEL_RESOLUTION_SUB1 || yi >= VOXEL_RESOLUTION_SUB1 || zi >= VOXEL_RESOLUTION_SUB1) {\n\t\t\t\t\tpc_FragColor = vec4(normal, 0.);\n\t\t\t\t\tnumTris = vec4(0.);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfloat\n\t\t\t\t\tf000 = look(xi, yi, zi, potentialPassTexture).r,\n\t\t\t\t\tf100 = look(xi+1., yi, zi, potentialPassTexture).r,\n\t\t\t\t\tf010 = look(xi, yi+1., zi, potentialPassTexture).r,\n\t\t\t\t\tf110 = look(xi+1., yi+1., zi, potentialPassTexture).r,\n\t\t\t\t\tf001 = look(xi, yi, zi+1., potentialPassTexture).r,\n\t\t\t\t\tf101 = look(xi+1., yi, zi+1., potentialPassTexture).r,\n\t\t\t\t\tf011 = look(xi, yi+1., zi+1., potentialPassTexture).r,\n\t\t\t\t\tf111 = look(xi+1., yi+1., zi+1., potentialPassTexture).r;\n\t\t\t\tfloat key = keyi(f000, f100, f010, f110, f001, f101, f011, f111);\n\n\t\t\t\tpc_FragColor = vec4(normal, key);\n\n\t\t\t\tnumTris = texture(numTrisTable, vec2((key + 0.5) / 256., 0.5));\n\t\t\t}\n\t\t`;return new L({name:"VoxelPass",fragmentShader:t,uniforms:this.voxelPassUniforms})}patchVertexShaderForShapeBlend(t){let e=`\n\t\t#ifdef SHAPEBLEND \n\t\t\tprecision highp sampler2D;\n\n\t\t\tuniform float isol;\n\n\t\t\tuniform sampler2D triTable; \n\t\t\tuniform sampler2D pyramidTexture1;\n\t\t\tuniform vec2 pyramidTexture1Size;\n\t\t\tuniform sampler2D pyramidTexture2;\n\t\t\tuniform vec2 pyramidTexture2Size;\n\n\t\t\tconst vec2 halfPixelOffset = vec2(0.5, 0.5);\n\n\t\t\tconst vec2 rShift = vec2(0., 1.);\n\t\t\tconst vec2 gShift = vec2(1., 1.);\n\t\t\tconst vec2 bShift = vec2(1., 0.);\n\n\t\t\tconst float res = float(RES);\n\t\t\tconst float VOXEL_RESOLUTION = pow(2., res);\n\t\t\tconst float Z_LAYERS_PER_ROW = ceil(pow(2., res / 2.));\n\t\t\tconst float INV_VOXEL_RESOLUTION = 1.0 / VOXEL_RESOLUTION;\n\n\t\t\tconst float scale_factor = 2.;\n\n\t\t\t#if SHAPEBLEND == 5\n\t\t\t\tconst float levelShiftX[7] = float[7](4., 6., 12., 24., 48., 96., 192.);\n\t\t\t\tconst float scale = 8. * scale_factor;\n\t\t\t\tconst vec3 originOffset = vec3(16.);\n\t\t\t#elif SHAPEBLEND == 7\n\t\t\t\tconst float levelShiftX[10] = float[10](4., 6., 12., 24., 48., 96., 192., 384., 768., 1536.); \n\t\t\t\tconst float scale = 2. * scale_factor;\n\t\t\t\tconst vec3 originOffset = vec3(64.);\n\t\t\t#elif SHAPEBLEND == 8\n\t\t\t\tconst float levelShiftX[11] = float[11](4., 8., 16., 32., 64., 128., 256., 512., 1024., 2048., 4096.);\n\t\t\t\tconst float scale = scale_factor;\n\t\t\t\tconst vec3 originOffset = vec3(128.);\n\t\t\t#else\n\t\t\t\tconst float levelShiftX[8] = float[8](4., 8., 16., 32., 64., 128., 256., 512.);\n\t\t\t\tconst float scale = 4. * scale_factor;\n\t\t\t\tconst vec3 originOffset = vec3(32.);\n\t\t\t#endif\n\n\t\t\t${X.lookup}\n\n\t\t\tconst vec3 offsets[24] = vec3[](\n\t\t\t\tvec3(0., 0., 0.), vec3(1., 0., 0.),\n\t\t\t\tvec3(1., 0., 0.), vec3(1., 1., 0.),\n\t\t\t\tvec3(0., 1., 0.), vec3(1., 1., 0.),\n\t\t\t\tvec3(0., 0., 0.), vec3(0., 1., 0.),\n\t\t\t\tvec3(0., 0., 1.), vec3(1., 0., 1.),\n\t\t\t\tvec3(1., 0., 1.), vec3(1., 1., 1.),\n\t\t\t\tvec3(0., 1., 1.), vec3(1., 1., 1.),\n\t\t\t\tvec3(0., 0., 1.), vec3(0., 1., 1.),\n\t\t\t\tvec3(0., 0., 0.), vec3(0., 0., 1.),\n\t\t\t\tvec3(1., 0., 0.), vec3(1., 0., 1.),\n\t\t\t\tvec3(1., 1., 0.), vec3(1., 1., 1.),\n\t\t\t\tvec3(0., 1., 0.), vec3(0., 1., 1.)\n\t\t\t);\n\n\t\t\tvec2 computeShiftedPosition1(vec2 xy, float levelOriginX) {\n\t\t\t\tvec2 xyShifted = xy;\n\t\t\t\txyShifted.x += levelOriginX;\n\t\t\t\treturn (xyShifted + halfPixelOffset) / pyramidTexture1Size;\n\t\t\t}\n\n\t\t\tvec2 computeShiftedPosition2(vec2 xy, float levelOriginX) {\n\t\t\t\tvec2 xyShifted = xy;\n\t\t\t\txyShifted.x += levelOriginX;\n\t\t\t\treturn (xyShifted + halfPixelOffset) / pyramidTexture2Size;\n\t\t\t}\n\n\t\t\tvec4 unpackVec3ToRGBA(vec3 vec) {\n\t\t\t\tuint combined = uint(vec.x * 65535.0 + 0.5); \n\t\t\t\tfloat g = float(combined & uint(0xFF)) * 0.00392156862; \n\t\t\t\tfloat r = float((combined >> 8) & uint(0xFF)) * 0.00392156862; \n\t\t\n\t\t\t\treturn vec4(r, g, vec.y, vec.z);\n\t\t\t}\n\n\t\t\tout vec4 marchColor;\n\t\t\t\n\t\t#endif\n\t\t`;t.vertexShader=e+t.vertexShader.replace("#include <project_vertex>","\n\t\t#ifdef SHAPEBLEND\n\t\t\tfloat triIndex = floor(float(gl_VertexID/3));\n\t\t\tfloat vertexIndex = float(gl_VertexID);\n\t\t\t\n\t\t\t\n\t\t\tfloat levelOriginX1 = pyramidTexture1Size.x - 2.;\n\t\t\tfloat levelOriginX2 = pyramidTexture2Size.x - 1.;\n\t\t\tvec2 xy = vec2(0.);\n\t\t\tvec4 lookUp = texture(pyramidTexture2, computeShiftedPosition2(xy, levelOriginX2));\n\t\t\t\n\t\t\t\n\t\t\tif (triIndex >= lookUp.r) return;\n\t\t\t\n\t\t\t\n\t\t\tfloat start = 0.;\n\t\t\tvec4 triIndexVec = vec4(triIndex);\n\t\t\t\n\t\t\t\n\t\t\tfor (int i = 0; i < LOOP;) {\n\t\t\t\t\n\t\t\t\tvec4 ends = lookUp + vec4(start);\n\t\t\t\tvec4 starts = vec4(ends.gba, start);\n\t\t\t\tvec4 check = vec4(greaterThanEqual(triIndexVec, starts)) * \n\t\t\t\t\t\t\t\t\t\t\tvec4(lessThan(triIndexVec, ends));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\txy *= 2.;\n\t\t\t\txy += check.r * rShift + check.g * gShift + check.b * bShift;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tstart = dot(check, starts);\n\t\t\t\tlevelOriginX2 -= levelShiftX[i];\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tlookUp = texture(pyramidTexture1, computeShiftedPosition1(xy, levelOriginX1));\n\t\t\t\ti++;\n\n\t\t\t\tends = lookUp + vec4(start);\n\t\t\t\tstarts = vec4(ends.gba, start);\n\t\t\t\tcheck = vec4(greaterThanEqual(triIndexVec, starts)) * \n\t\t\t\t\t\t\t\t\t\t\tvec4(lessThan(triIndexVec, ends));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\txy *= 2.;\n\t\t\t\txy += check.r * rShift + check.g * gShift + check.b * bShift;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tstart = dot(check, starts);\n\t\t\t\tlevelOriginX1 -= levelShiftX[i];\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tlookUp = texture(pyramidTexture2, computeShiftedPosition2(xy, levelOriginX2));\n\n\t\t\t\ti++;\n\t\t\t}\n\n\t\t\t#if HALF == 1\n\t\t\t\tvec4 ends = lookUp + vec4(start);\n\t\t\t\tvec4 starts = vec4(ends.gba, start);\n\t\t\t\tvec4 check = vec4(greaterThanEqual(triIndexVec, starts)) * vec4(lessThan(triIndexVec, ends));\n\t\t\t\n\t\t\t\t\n\t\t\t\txy *= 2.;\n\t\t\t\txy += check.r * rShift + check.g * gShift + check.b * bShift;\n\t\t\t\n\t\t\t\t\n\t\t\t\tstart = dot(check, starts);\n\t\t\t#endif\n\t\t\t\n\t\t\t\n\t\t\tvec3 gridPos;\n\t\t\tgridPos.x = mod(xy.x, VOXEL_RESOLUTION);\n\t\t\tgridPos.y = mod(xy.y, VOXEL_RESOLUTION);\n\t\t\tgridPos.z = floor(xy.x * INV_VOXEL_RESOLUTION) + \n\t\t\t\t\t\t\t\t\tfloor(xy.y * INV_VOXEL_RESOLUTION) * Z_LAYERS_PER_ROW;\n\t\t\t\n\t\t\t\n\t\t\tvertexIndex -= start * 3.;\n\t\t\tfloat vk = vertexIndex * 0.0625 + 0.03125; \n\t\t\t\n\t\t\t\n\t\t\tvec4 voxel = look(gridPos.x, gridPos.y, gridPos.z, voxelPassTexture);\n\t\t\tfloat key = (voxel.w + 0.5) * 0.00390625; \n\t\t\t\n\t\t\t\n\t\t\tfloat edgeNum = texture(triTable, vec2(vk, key)).x;\n\t\t\tint edgeIndex = int(edgeNum) * 2;\n\t\t\t\n\t\t\t\n\t\t\tvec3 p1 = gridPos + offsets[edgeIndex];\n\t\t\tvec3 p2 = gridPos + offsets[edgeIndex + 1];\n\t\t\t\n\t\t\t\n\t\t\tvec4 potential1 = look(p1.x, p1.y, p1.z, potentialPassTexture);\n\t\t\tvec4 potential2 = look(p2.x, p2.y, p2.z, potentialPassTexture);\n\t\t\t\n\t\t\t\n\t\t\tfloat mu = potential1.r / (potential1.r - potential2.r);\n\n\t\t\tmarchColor = mix(\n\t\t\t\tunpackVec3ToRGBA(potential1.gba),\n\t\t\t\tunpackVec3ToRGBA(potential2.gba),\n\t\t\t\tmu\n\t\t\t);\n\n\t\t\ttransformed = p1 + (p2 - p1) * mu;\n\t\t\ttransformed -= originOffset;\n\t\t\ttransformed *= scale;\n\t\t\tvec4 data1 = look(p1.x, p1.y, p1.z, voxelPassTexture);\n\t\t\tvec4 data2 = look(p2.x, p2.y, p2.z, voxelPassTexture);\n\t\t\tobjectNormal = normalize(mix(data1.xyz, data2.xyz, mu));\n\t\t\ttransformedNormal = normalMatrix * objectNormal;\n\t\t\t#ifndef FLAT_SHADED\n\t\t\t\tvNormal = transformedNormal;\n\t\t\t#endif\n\t\t#endif\n\t\t\n#include <project_vertex>");let i=t.fragmentShader.match(/vec3 diffuseColor[^\n]*\n/);if(!i)return;let a=`\n\t\t#ifdef SHAPEBLEND_C\n\t\t\t#if SHAPEBLEND_C == 1\n\t\t\t\t${i[0].replace(/nodeU0,/g,"marchColor.rgb,").replace(/nodeU\d+(?=,g_uid\d+_calpha\))/g,"marchColor.a")}\n\t\t\t#else\n\t\t\t\t${i[0]}\n\t\t\t#endif\n\t\t#else\n\t\t\t${i[0]}\n\t\t#endif\n\t\t`;t.fragmentShader="in vec4 marchColor;\n"+t.fragmentShader.replace(i[0],a),Object.assign(t.uniforms,this.marchPassUniforms)}initDebugPass(t){console.log("fboToDebug.width",t.width,t.height),this.geometry=new y(t.width,t.height),this.geometry.userData={parameters:{width:4,height:4}};let e={inputTexture:{value:t.textures.length>1?t.textures[1]:t.texture},pyramidTextureSize:{value:void 0}},i=t=>{t.vertexShader="\n\t\t\t\tprecision highp float;\n\n\t\t\t\tvarying vec2 vUv;\n\n\t\t\t\tvoid main() {\n\t\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t\t\tvUv = uv;\n\t\t\t\t}\n\t\t\t",t.fragmentShader="\n\t\t\t\tlayout(location = 1) out vec4 gVelocity;\n\n\t\t\t\tprecision highp float;\n\t\t\t\t\n\t\t\t\tuniform sampler2D inputTexture;\n\t\t\t\tvarying vec2 vUv;\n\n\t\t\t\tuniform vec2 pyramidTextureSize;\n\n\t\t\t\tvoid main() {\n\t\t\t\t\t\t\n\t\t\t\t\t\tgl_FragColor = texture(inputTexture, vUv);\n\t\t\t\t\t\tgVelocity = vec4(0.0);\n\t\t\t\t}\n\t\t\t",e.pyramidTextureSize.value=new l(this.pyramidRenderTarget[0].width,this.pyramidRenderTarget[0].height),Object.assign(t.uniforms,e)};this.material.shapeBlendhack=i,this.material.root.shapeBlendhack=i}dispose(){super.dispose(),B()?.release(this)}},j=G;j.streamCompaction=new class{constructor(){this.pyramidPassScene=new x,this.pyramidPassMaterial=new L({name:"PyramidPass"}),this.pyramidPassUniforms={inputTexture:{value:void 0},inputWidth:{value:0},inputHeight:{value:0},inputShiftX:{value:0},outputShiftX:{value:0}},this.pyramidTopLevelReadPixelBuffer=new Float32Array(4),this.pyramidPassMaterial.fragmentShader="\n\t\t\tprecision highp float;\n\t\t\tprecision highp sampler2D;\n\t\t\tlayout(location = 0) out vec4 pc_FragColor;\n\t\t\tuniform sampler2D inputTexture;\n\t\t\tuniform float inputWidth;\n\t\t\tuniform float inputHeight;\n\t\t\tuniform float inputShiftX;\n\t\t\tuniform float outputShiftX;\n\t\t\tconst vec2 half_unit_coord = vec2(0.5);\n\t\t\tconst vec4 one = vec4(1.0);\n\t\t\tvoid main() {\n\t\t\t\tvec2 inputSize = vec2(inputWidth, inputHeight);\n\t\t\t\tvec2 input_pixel_uv = 1. / inputSize;\n\t\t\t\tvec2 coord = gl_FragCoord.xy - half_unit_coord;\n\t\t\t\tcoord.x -= outputShiftX;\n\t\t\t\tcoord = coord * 2. + half_unit_coord;\n\t\t\t\tcoord.x += inputShiftX;\n\n\t\t\t\t\n\t\t\t\tvec2 input_uv = coord / inputSize;\n\t\t\t\tfloat bl = texture(inputTexture, input_uv).r;\n\n\t\t\t\t\n\t\t\t\tinput_uv.x += input_pixel_uv.x;\n\t\t\t\tfloat br = texture(inputTexture, input_uv).r;\n\n\t\t\t\t\n\t\t\t\tinput_uv.y += input_pixel_uv.y;\n\t\t\t\tfloat tr = texture(inputTexture, input_uv).r;\n\n\t\t\t\t\n\t\t\t\tinput_uv.x -= input_pixel_uv.x;\n\t\t\t\tfloat tl = texture(inputTexture, input_uv).r;\n\n\t\t\t\tpc_FragColor.a = bl;\n\t\t\t\tpc_FragColor.b = pc_FragColor.a + br;\n\t\t\t\tpc_FragColor.g = pc_FragColor.b + tr;\n\t\t\t\tpc_FragColor.r = pc_FragColor.g + tl; \n\t\t\t}\n\t\t",this.pyramidPassMaterial.uniforms=this.pyramidPassUniforms,this.pyramidPassMaterial.depthTest=!1,this.pyramidPassMaterial.depthWrite=!1;let t=new P(O,this.pyramidPassMaterial);t.frustumCulled=!1,this.pyramidPassScene.add(t)}renderPyramid(t,e,i,a,n){(new m).min.setScalar(0);let s=e.length-1,r=new c;i.getViewport(r),this.pyramidPassUniforms.inputShiftX.value=0,this.pyramidPassUniforms.outputShiftX.value=0;let o=s-1;for(let s=o;s>=0;s--){let r=s%2==o%2?n[0]:n[1],l=s===o?a:s%2==o%2?n[1]:n[0];this.pyramidPassUniforms.inputTexture.value=l.textures.length>1?l.textures[1]:l.texture,this.pyramidPassUniforms.inputWidth.value="width"in l?l.width:1,this.pyramidPassUniforms.inputHeight.value="height"in l?l.height:1,i.setRenderTarget(r);let h=e[s],p=i.getPixelRatio();i.setViewport(this.pyramidPassUniforms.outputShiftX.value/p,0,h/p,h/p),2===s&&t%2!=0&&i.setViewport(this.pyramidPassUniforms.outputShiftX.value/p,0,3/p,3/p),i.render(this.pyramidPassScene,D);let d=this.pyramidPassUniforms.inputShiftX.value;this.pyramidPassUniforms.inputShiftX.value=this.pyramidPassUniforms.outputShiftX.value,this.pyramidPassUniforms.outputShiftX.value=d,s<o&&(this.pyramidPassUniforms.outputShiftX.value+=e[s+1])}i.setViewport(r);let l=e.length%2==0?0:1;return i.readRenderTargetPixelsAsync(n[l],n[l].width-1,0,1,1,this.pyramidTopLevelReadPixelBuffer).then(()=>this.pyramidTopLevelReadPixelBuffer[0])}};var $=new v,Z=new v,Y=new h,Q=new p,J=new p,tt=new h;function et(t,e=0){let i=this.children.length;for(;i--;){let a=this.children[i];n.is(a)&&it.call(a,t,e+1)}}function it(t,e=0){if(!0!==t(this,e)){let i=this.children.length;for(;i--;){let a=this.children[i];n.is(a)&&it.call(a,t,e+1)}}}function at(){if(void 0===this.shapesDataTexture.value){let t=new w(new Float32Array(1920),96,5,d,o);this.shapesDataTexture.value=t}let n=this.shapesDataTexture.value,l=n.image.data,h=0,p=0,c=this.data.geometry.blendRange,f=$.copy(this.matrixWorld).invert(),u=this._npart,v=0;this._meshSdfWanted.clear();let m=null;if(et.call(this,n=>{if(!1===n.visible)return!0;let o;if(n instanceof t)return;if(n instanceof e||r(n))return;o=n instanceof i?n.object:n;let d=n.data?.cloner;if(s.is(n)&&d&&!d.hideBase&&"radial"!==d.type&&!0!==d.disabled||!(o instanceof a))return;let u=o.geometry.userData.parameters,x=u?.shapeBlendNode??o.dataPatched?.geometry?.shapeBlendNode;if(void 0===x)return;if(Z.multiplyMatrices(f,n.matrixWorld).decompose(J,Y,Q),"TorusGeometry"===u?.type&&360!==u.arc){let t=u.arc*Math.PI/180;t/=4,Y.multiply(tt.set(0,0,Math.sin(t),Math.cos(t)))}let y=x.overrideGlobalBlend?x.blendRange:c;y=y/this.bboxSize*2,l[4*v]=(J.x-this.bboxOffset)/this.bboxSize*2,l[4*v+1]=(J.y-this.bboxOffset)/this.bboxSize*2,l[4*v+2]=(J.z-this.bboxOffset)/this.bboxSize*2,l[4*v+3]=0===x.operation?1:2===x.operation?-1:-2,l[384+4*v]=-Y.x,l[384+4*v+1]=-Y.y,l[384+4*v+2]=-Y.z,l[384+4*v+3]=Y.w;let g=new Float32Array(4),S=0,b=y;if("SphereGeometry"===u?.type)u.width===u.height&&u.width===u.depth?g[0]=0:g[0]=1,g[1]=u.width/this.bboxSize,g[2]=u.height/this.bboxSize,g[3]=u.depth/this.bboxSize,b=Math.max(g[1],g[2],g[3])*Q.x+y;else if("CubeGeometry"===u?.type){S=u.cornerRadius;let t=u.width,e=u.height,i=u.depth;g[0]=2,g[1]=(t-2*S)/this.bboxSize,g[2]=(e-2*S)/this.bboxSize,g[3]=(i-2*S)/this.bboxSize,b=Math.sqrt(t**2+e**2+i**2)/this.bboxSize*Q.x+y}else if("CylinderGeometry"===u?.type){S=u.cornerRadius;let t=u.height,e=u.radiusBottom,i=u.radiusTop;if(i>=e){let a=Math.atan2(i-e,t),n=(Math.PI/2-a)/2;i-=S/Math.tan(n),e-=S*Math.tan(n)}else if(e>i){let a=Math.atan2(e-i,t),n=(Math.PI/2-a)/2;i-=S*Math.tan(n),e-=S/Math.tan(n)}g[1]=(u.height-2*S)/this.bboxSize,e===i?(g[0]=3,g[2]=e/this.bboxSize*2):(g[0]=4,g[2]=e/this.bboxSize*2,g[3]=i/this.bboxSize*2),b=(Math.hypot(g[1],Math.max(Math.abs(g[2]),Math.abs(g[3])))+S/this.bboxSize*2)*Q.x+y}else if("TorusGeometry"===u?.type){if(g[0]=5,g[1]=(u.width-u.depth)/this.bboxSize,g[2]=u.depth/this.bboxSize,360!==u.arc){g[0]=6,g[3]=g[1],l[1152+4*v+3]=g[2];let t=2*Math.atan2(g[2]/2,g[1]),e=u.arc*Math.PI/180/2-t;g[1]=Math.sin(e),g[2]=Math.cos(e)}b=u.width*Q.x/this.bboxSize+y}else{let t=o.geometry;(m??(m=new Set)).add(t.uuid);let e=this._meshSdfBaked.get(t.uuid),i=K(t);if((void 0===e||e.posVersion!==i)&&this._meshSdfWanted.set(t.uuid,t),void 0===e)return;g[0]=7,g[1]=e.slot,g[2]=e.boxHalf.x/this.bboxSize*2,g[3]=e.boxHalf.y/this.bboxSize*2,l[1152+4*v+3]=e.boxHalf.z/this.bboxSize*2,b=Math.hypot(e.boxHalf.x,e.boxHalf.y,e.boxHalf.z)/this.bboxSize*2*Q.x+y}l.set(g,768+4*v),h=Math.max(h,b),p=Math.max(p,y),this._reach[v]=b,l[1152+4*v]=y,l[1152+4*v+1]=S/this.bboxSize*2,l[1152+4*v+2]=Q.x;let T,P,_=Array.isArray(o.material)?o.material[0]:o.material,z=_;if(z?.getShapeBlendBaseColor){let t=z.getShapeBlendBaseColor();T=t,P=t.a}else void 0!==_?.uniforms?.nodeU0?(T=_.uniforms.nodeU0.node.value,P=_.uniforms.nodeU1?.value??1):(T={r:1,g:1,b:1},P=1);0!==x.operation&&!x.useColor&&(P=-1),l[1536+4*v]=T.r,l[1536+4*v+1]=T.g,l[1536+4*v+2]=T.b,l[1536+4*v+3]=P,P<1&&1===this.material.defines?.SHAPEBLEND_C&&(this.material.transparent=!0),v++}),this._meshSdfBaked.size>0){let t=m??new Set;for(let e of this._meshSdfBaked.keys())t.has(e)||this._meshSdfBaked.delete(e)}this.npart=v,this._maxBlendK=p;let x=1.1*h+2/(this.spatialDivisions-1)+4/(this.resolution-1);this.spatialPassUniforms.span.value=x;let y=this._prevShapeData,g=u!==v,S=null===y||this._prevSpan!==x||g,b=S||H,T=this._fieldDirtyMin.set(1/0,1/0,1/0),P=this._fieldDirtyMax.set(-1/0,-1/0,-1/0);if(null!==y){let t=Math.max(v,u);for(let e=0;e<t;e++){let t=!1;for(let i=0;i<5;i++){let a=384*i+4*e;if(l[a]!==y[a]||l[a+1]!==y[a+1]||l[a+2]!==y[a+2]||l[a+3]!==y[a+3]){t=!0;break}}if(!t)continue;if(S=!0,b)break;let i=l[4*e],a=l[4*e+1],n=l[4*e+2],s=y[4*e],r=y[4*e+1],o=y[4*e+2],h=this._reach[e],p=this._prevReach[e];Number.isFinite(i+a+n+h)&&Number.isFinite(s+r+o+p)?(T.x=Math.min(T.x,i-h,s-p),T.y=Math.min(T.y,a-h,r-p),T.z=Math.min(T.z,n-h,o-p),P.x=Math.max(P.x,i+h,s+p),P.y=Math.max(P.y,a+h,r+p),P.z=Math.max(P.z,n+h,o+p)):b=!0}}return H&&(S=!0),this._fieldDirtyFull=b||T.x===1/0,S&&(null===y?this._prevShapeData=new Float32Array(l):y.set(l),this._prevReach.set(this._reach),this._prevSpan=x,n.needsUpdate=!0),S}function nt(t){return at.call(t)}export{k as a,E as b,M as c,F as d,I as e,V as f,B as g,A as h,W as i,K as j,j as k,nt as l};
|
|
1
|
+
import{a as t}from"./runtime-chunk-4SENJRD5.js";import{a as e}from"./runtime-chunk-MF6PRJPV.js";import{$ as i,ea as a}from"./runtime-chunk-YURN6PI7.js";import{e as n,h as s}from"./runtime-chunk-QYZPTNBH.js";import{a as r}from"./runtime-chunk-2PT2WH66.js";import{Aa as o,Dc as l,Ec as h,Fc as p,Ja as d,Jc as c,Lc as f,Ma as u,Oc as v,Qe as m,Vc as x,Vd as y,Zc as g,ce as S,dd as b,de as T,ld as P,na as _,nc as z,nd as w,we as R}from"./runtime-chunk-BVVSZMXD.js";var O=new b;O.setAttribute("position",new g(new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),3));var L=class extends T{constructor(t){super({...t,depthTest:!1,depthWrite:!1,glslVersion:z,vertexShader:"\n\t\t\t\tprecision highp float;\n\t\t\t\tin vec3 position;\n\t\t\t\tvoid main() {\n\t\t\t\t\tgl_Position = vec4(position, 1);\n\t\t\t\t}\n\t\t\t"})}customProgramCacheKey(){return""}};function k(){return{shapeInput:()=>"\n\t\t\tconst float posRowCoord = 0.1; \n\t\t\tconst float quatRowCoord = 0.3; \n\t\t\tconst float param1RowCoord = 0.5;\n\t\t\tconst float param2RowCoord = 0.7;\n\t\t\tconst float colorRowCoord = 0.9; \n\t\t\tuniform sampler2D shapesDataTexture;\n\t\t\tvec4 shapePos(float iin) { \n\t\t\t\tvec4 r = texture(shapesDataTexture, vec2(iin, posRowCoord));\n\t\t\t\treturn r;\n\t\t\t}\n\t\t\tvec4 shapeQuat(float iin) {\n\t\t\t\tvec4 r = texture(shapesDataTexture, vec2(iin, quatRowCoord));\n\t\t\t\treturn r;\n\t\t\t}\n\t\t\tvec4 shapeParams1(float iin) {\n\t\t\t\tvec4 r = texture(shapesDataTexture, vec2(iin, param1RowCoord));\n\t\t\t\treturn r;\n\t\t\t}\n\t\t\tvec4 shapeParams2(float iin) {\n\t\t\t\tvec4 r = texture(shapesDataTexture, vec2(iin, param2RowCoord));\n\t\t\t\treturn r;\n\t\t\t}\n\t\t\tvec4 shapeColor(float iin) {\n\t\t\t\tvec4 r = texture(shapesDataTexture, vec2(iin, colorRowCoord));\n\t\t\t\treturn r;\n\t\t\t}\n\t\t",getxyzi:"\n\t\t\t// this code must complement lookup\n\t\t\tfloat xi = mod(gl_FragCoord.x - 0.5, VOXEL_RESOLUTION);\n\t\t\tfloat yi = mod(gl_FragCoord.y - 0.5, VOXEL_RESOLUTION);\n\t\t\tfloat zi = floor((gl_FragCoord.x - 0.5) * INV_VOXEL_RESOLUTION) + floor((gl_FragCoord.y - 0.5) * INV_VOXEL_RESOLUTION) * Z_LAYERS_PER_ROW;\n\t\t",lookup:"\n\t\t\tuniform sampler2D potentialPassTexture;\n\t\t\tuniform sampler2D voxelPassTexture; \n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tvec4 look(float xi, float yi, float zi, sampler2D rt) {\n\t\t\t\tvec2 uv = vec2(\n\t\t\t\t\tmod(zi, Z_LAYERS_PER_ROW) + (xi + 0.5) / VOXEL_RESOLUTION,\n\t\t\t\t\tfloor(zi / Z_LAYERS_PER_ROW) + (yi + 0.5) / VOXEL_RESOLUTION\n\t\t\t\t); \n\t\t\t\tuv /= Z_LAYERS_PER_ROW;\n\t\t\t\treturn texture(rt, uv);\n\t\t\t}\n\t\t",getpart:"\n\t\t\tfloat getpart(inout float a, float b) {\n\t\t\t\tfloat t = floor(a/b);\n\t\t\t\tfloat r = a - t*b;\n\t\t\t\ta = t;\n\t\t\t\treturn r;\n\t\t\t}\n\t\t",triTable:new Float32Array([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3,8,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,9,1,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3,8,1,1,8,9,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,10,2,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3,8,0,10,2,1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,10,2,9,9,2,0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3,8,2,8,10,2,8,9,10,-1,-1,-1,-1,-1,-1,-1,2,11,3,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2,11,0,0,11,8,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,9,1,11,3,2,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2,11,1,11,9,1,11,8,9,-1,-1,-1,-1,-1,-1,-1,1,10,3,3,10,11,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1,10,0,10,8,0,10,11,8,-1,-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1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]),numTrisTable:new Float32Array([0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,2,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,3,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,3,2,3,3,2,3,4,4,3,3,4,4,3,4,5,5,2,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,3,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,4,2,3,3,4,3,4,2,3,3,4,4,5,4,5,3,2,3,4,4,3,4,5,3,2,4,5,5,4,5,2,4,1,1,2,2,3,2,3,3,4,2,3,3,4,3,4,4,3,2,3,3,4,3,4,4,5,3,2,4,3,4,3,5,2,2,3,3,4,3,4,4,5,3,4,4,5,4,5,5,4,3,4,4,3,4,5,5,4,4,3,5,2,5,4,2,1,2,3,3,4,3,4,4,5,3,4,4,5,2,3,3,2,3,4,4,5,4,5,5,2,4,3,5,4,3,2,4,1,3,4,4,5,4,5,3,4,4,5,5,2,3,4,2,1,2,3,3,2,3,4,2,1,3,2,4,1,2,1,1,0])}}var D=new R,U=null;function E(t){U=t}function M(){return U}var C=null;function F(t){C=t}function N(){return C}var I=null;function V(t){I=t}function B(){return I}var X=k(),A=24,W=96,H=!1,q=!0;try{let t=new URLSearchParams(window.location.search);H="0"===t.get("dbgsbstatic"),q="0"!==t.get("sb512")}catch{}function K(t){let e=t.getAttribute("position");return void 0===e?-1:1048576*(e.version??e.data?.version??0)+(e.count??0)%1048576}var j=class extends a{constructor(t,e,i){super(t,e,i),this.data=e,this.isShapeBlendEntity=!0,this.needsRebuild=!0,this.customDepthMaterialNeedsUpdate=!1,this._prevShapeData=null,this._prevSpan=-1,this._reach=new Float32Array(96),this._prevReach=new Float32Array(96),this._fieldDirtyFull=!0,this._fieldDirtyMin=new p,this._fieldDirtyMax=new p,this._maxBlendK=0,this._meshSdfBaked=new Map,this._meshSdfWanted=new Map,this._passesRenderer=null,this._npart=-1,this.spatialn=1,this.drawRangeNeedsForceUpdate=!0,this._resolutionLevel=-1,this._authoredResolutionLevel=-1,this.ultraFieldResolution=0,this.resolution=64,this.spatialDivisions=25,this.zLayersPerRow=8,this.basePyramidSize=512,this.pyramidTexture1Width=341,this.pyramidTexture1Height=256,this.pyramidTexture2Width=170,this.pyramidTexture2Height=128,this.numLevels=9,this.pyramidLevelSizes=[1,2,4,8,16,32,64,128,256,512],this.bboxSize=0,this.bboxOffset=0,this.shapesDataTexture={value:void 0},this.spatialscene=new x,this.potentialPassScene=new x,this.voxelPassScene=new x,this._spatialPassRenderTargets=[],this._potentialPassRenderTargets=[],this._voxelPassRenderTargets=[],this._pyramidRenderTargets=[],this.geometry=new b,this.geometry.drawRange.count=0,this.spatialPassUniforms={span:{value:-1},shapesDataTexture:this.shapesDataTexture,npart:{value:this.npart},spatialn:{value:this.spatialn}},this.spatialMesh=new P(O,this.spatialPassMaterial()),this.spatialMesh.frustumCulled=!1,this.spatialscene.add(this.spatialMesh);let a=new w(X.triTable,16,256,u,o);a.needsUpdate=!0;let n=new w(X.numTrisTable,256,1,u,o);n.needsUpdate=!0,this.voxelPassUniforms={potentialPassTexture:{value:void 0},numTrisTable:{value:n}},this.voxelMesh=new P(O,this.voxelPassMaterial()),this.voxelMesh.frustumCulled=!1,this.voxelPassScene.add(this.voxelMesh),this.potentialPassUniforms={shapesDataTexture:this.shapesDataTexture,spatialPassTexture:{value:void 0},npart:{value:this.npart},spatialn:{value:this.spatialn}},this.potentialMesh=new P(O,this.potentialPassMaterial()),this.potentialMesh.frustumCulled=!1,this.potentialPassScene.add(this.potentialMesh),this.marchPassUniforms={triTable:{value:a},potentialPassTexture:{value:void 0},voxelPassTexture:{value:void 0},pyramidTexture1:{value:void 0},pyramidTexture1Size:{value:void 0},pyramidTexture2:{value:void 0},pyramidTexture2Size:{value:void 0}},this.frustumCulled=!1,this.onBeforeShadowPass=t=>{let e=at.call(this);if(0===this.npart)return void(this.geometry.drawRange.count=0);let i=this.material.root;if(i.shadersPatchedForShapeBlend){if(this.customDepthMaterialNeedsUpdate){this.customDepthMaterialNeedsUpdate=!1,this.customDepthMaterial=new S({vertexShader:i.vertexShader,fragmentShader:"\n\t\t\t\t\t\t#include <packing>\n\t\t\t\t\t\tvoid main()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tgl_FragColor = packDepthToRGBA(gl_FragCoord.z);\n\t\t\t\t\t\t}\n\t\t\t\t\t",uniforms:i.uniforms,defines:this.material.defines}),this.isMeshDepthMaterial=!0,this.customDistanceMaterial=new S({vertexShader:i.vertexShader,fragmentShader:"\n\t\t\t\t\t#include <common>\n\t\t\t\t\t#include <packing>\n\t\t\t\t\tuniform vec3 referencePosition;\n\t\t\t\t\tuniform float nearDistance;\n\t\t\t\t\tuniform float farDistance;\n\t\t\t\t\t\n\t\t\t\t\tvarying vec3 vWPosition;\n\t\t\t\t\tvoid main()\n\t\t\t\t\t{\n\t\t\t\t\t\tfloat dist = length(vWPosition - referencePosition);\n\t\t\t\t\t\tdist = (dist - nearDistance) / (farDistance - nearDistance);\n\t\t\t\t\t\tdist = saturate(dist);\n\t\t\t\t\t\t\n\t\t\t\t\t\tgl_FragColor = packDepthToRGBA( dist );\n\t\t\t\t\t}",uniforms:{nearDistance:{value:0},farDistance:{value:0},referencePosition:{value:new p},opacity:{value:0},...i.uniforms},defines:this.material.defines});let t=this.customDistanceMaterial;t.referencePosition=new p,t.nearDistance=0,t.farDistance=0,t.opacity=1,t.isMeshDistanceMaterial=!0}}else this.patchVertexShaderForShapeBlend(i),i.shadersPatchedForShapeBlend=!0,this.customDepthMaterialNeedsUpdate=!0;this.spatialPassUniforms.npart.value=this.npart,this.spatialPassUniforms.spatialn.value=this.spatialn,this.potentialPassUniforms.npart.value=this.npart,this.potentialPassUniforms.spatialn.value=this.spatialn;let a=this.needsRebuild;if(this.needsRebuild){this.needsRebuild=!1,this.spatialMesh.material.defines.RES=this.resolutionLevel,this.spatialMesh.material.needsUpdate=!0,this.potentialMesh.material.defines.RES=this.resolutionLevel,this.potentialPassUniforms.spatialPassTexture.value=this.spatialPassRenderTarget.texture,this.potentialMesh.material.needsUpdate=!0,this.voxelMesh.material.defines.RES=this.resolutionLevel,this.voxelMesh.material.needsUpdate=!0,this.voxelPassUniforms.potentialPassTexture.value=this.potentialPassRenderTarget.texture,this.marchPassUniforms.potentialPassTexture.value=this.potentialPassRenderTarget.texture,this.marchPassUniforms.voxelPassTexture.value=this.voxelPassRenderTarget.textures[0],this.material.defines.RES=this.resolutionLevel,this.material.defines.LEVELS=this.pyramidLevelSizes.length,this.material.defines.LOOP=this.pyramidLevelSizes.length%2==0?this.pyramidLevelSizes.length-3:this.pyramidLevelSizes.length-2,this.material.defines.HALF=this.pyramidLevelSizes.length%2==0?1:0,this.material.needsUpdate=!0;let t=this.pyramidLevelSizes.length%2==0?0:1,e=this.pyramidLevelSizes.length%2==0?1:0;this.marchPassUniforms.pyramidTexture2.value=this.pyramidRenderTarget[t].texture,this.marchPassUniforms.pyramidTexture2Size.value=new l(this.pyramidRenderTarget[t].width,this.pyramidRenderTarget[t].height),this.marchPassUniforms.pyramidTexture1.value=this.pyramidRenderTarget[e].texture,this.marchPassUniforms.pyramidTexture1Size.value=new l(this.pyramidRenderTarget[e].width,this.pyramidRenderTarget[e].height),Object.assign(this.material.uniforms,this.marchPassUniforms)}if(!e&&!a&&!this.drawRangeNeedsForceUpdate&&this._passesRenderer===t)return;this._passesRenderer=t;let n=t.shadowMap.enabled;t.shadowMap.enabled=!1;let s=t.getRenderTarget();t.setRenderTarget(this.spatialPassRenderTarget),t.render(this.spatialscene,D),t.setRenderTarget(this.potentialPassRenderTarget),t.render(this.potentialPassScene,D),t.setRenderTarget(this.voxelPassRenderTarget),t.render(this.voxelPassScene,D),j.streamCompaction.renderPyramid(this.resolutionLevel,this.pyramidLevelSizes,t,this.voxelPassRenderTarget,this.pyramidRenderTarget).then(t=>{this.material.wireframe&&(3*t>this.geometry.attributes.position.count||this.drawRangeNeedsForceUpdate)&&(this.geometry.dispose(),this.geometry=new b,this.geometry.userData.parameters={width:this.bboxSize,height:this.bboxSize,depth:this.bboxSize,centerOffset:[this.bboxOffset,this.bboxOffset,this.bboxOffset]},this.geometry.attributes.position=new g(new Float32Array(3*t*2),3)),(3*t>this.geometry.drawRange.count||this.drawRangeNeedsForceUpdate)&&(this.geometry.drawRange.count=3*Math.floor(1.2*t),this.markSceneShadowsDirty()),this.drawRangeNeedsForceUpdate=!1}),t.shadowMap.enabled=n,t.setRenderTarget(s)}}markSceneShadowsDirty(){let t=this.parent;if(null!==t){for(;t.parent;)t=t.parent;t.markShadowsDirty?.()}}set npart(t){t!==this._npart&&(this.drawRangeNeedsForceUpdate=!0,this._npart=t,this.spatialn=Math.ceil(t/96))}get npart(){return this._npart}set resolutionLevel(t){let e=Math.min(q?9:8,Math.max(5,t));if(e===this._authoredResolutionLevel)return;this._authoredResolutionLevel=e,this.ultraFieldResolution=Math.pow(2,e);let i=Math.min(8,e);switch(this._resolutionLevel=i,this.resolution=Math.pow(2,i),this.resolutionLevel){case 5:this.pyramidLevelSizes=[1,2,4,6,12,24,48,96,192],this.bboxSize=496,this.bboxOffset=-8;break;case 6:this.pyramidLevelSizes=[1,2,4,8,16,32,64,128,256,512],this.bboxSize=504,this.bboxOffset=-4;break;case 7:this.pyramidLevelSizes=[1,2,4,6,12,24,48,96,192,384,768,1536],this.bboxSize=508,this.bboxOffset=-2;break;case 8:this.pyramidLevelSizes=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096],this.bboxSize=510,this.bboxOffset=-1}this.pyramidTexture1Width=0,this.pyramidTexture2Width=0,this.pyramidTexture1Height=this.pyramidLevelSizes[this.pyramidLevelSizes.length-2],this.pyramidTexture2Height=this.pyramidLevelSizes[this.pyramidLevelSizes.length-3];for(let t=this.pyramidLevelSizes.length-2;t>=0;t--)(this.pyramidLevelSizes.length-2)%2==t%2?this.pyramidTexture1Width+=this.pyramidLevelSizes[t]:this.pyramidTexture2Width+=this.pyramidLevelSizes[t];this.basePyramidSize=this.pyramidLevelSizes[this.pyramidLevelSizes.length-1],this.zLayersPerRow=this.basePyramidSize/this.resolution,this.numLevels=this.pyramidLevelSizes.length-1,this.geometry.userData.parameters={width:this.bboxSize,height:this.bboxSize,depth:this.bboxSize,centerOffset:[this.bboxOffset,this.bboxOffset,this.bboxOffset]},this.needsRebuild=!0,this.customDepthMaterialNeedsUpdate=!0}get resolutionLevel(){return this._resolutionLevel}get spatialPassRenderTarget(){let t=this._spatialPassRenderTargets[this.resolutionLevel];return t||(t=new f(this.spatialDivisions*this.spatialn,this.spatialDivisions**2,{format:d,type:o,stencilBuffer:!1,depthBuffer:!1,generateMipmaps:!1,minFilter:_,magFilter:_}),this._spatialPassRenderTargets[this.resolutionLevel]=t),t}get potentialPassRenderTarget(){let t=this._potentialPassRenderTargets[this.resolutionLevel];return t||(t=new f(this.basePyramidSize,this.basePyramidSize,{format:d,type:o,stencilBuffer:!1,depthBuffer:!1,generateMipmaps:!1,minFilter:_,magFilter:_}),this._potentialPassRenderTargets[this.resolutionLevel]=t),t}get voxelPassRenderTarget(){let t=this._voxelPassRenderTargets[this.resolutionLevel];return t||(t=new f(this.basePyramidSize,this.basePyramidSize,{count:2,stencilBuffer:!1,depthBuffer:!1,generateMipmaps:!1,minFilter:_,magFilter:_}),t.textures[0].format=d,t.textures[0].type=o,t.textures[1].format=u,t.textures[1].type=o,this._voxelPassRenderTargets[this.resolutionLevel]=t),t}get pyramidRenderTarget(){let t=this._pyramidRenderTargets[this.resolutionLevel];return t||(t=[new f(this.pyramidTexture1Width,this.pyramidTexture1Height,{format:d,type:o,stencilBuffer:!1,depthBuffer:!1,magFilter:_,minFilter:_}),new f(this.pyramidTexture2Width,this.pyramidTexture2Height,{format:d,type:o,stencilBuffer:!1,depthBuffer:!1,magFilter:_,minFilter:_})],this._pyramidRenderTargets[this.resolutionLevel]=t),t}updateState(t,e){let i=this.material;super.updateState(t,e),i!==this.material&&(this.needsRebuild=!0),t.geometry&&(this.resolutionLevel=t.geometry.resolutionLevel,this.geometry.userData.parameters={width:this.bboxSize,height:this.bboxSize,depth:this.bboxSize,centerOffset:[this.bboxOffset,this.bboxOffset,this.bboxOffset]}),t.wireframe&&!this.geometry.getAttribute("position")?this.geometry.setAttribute("position",new g(new Float32Array(3*this.geometry.drawRange.count),3)):!t.wireframe&&this.geometry.getAttribute("position")&&this.geometry.deleteAttribute("position")}spatialPassMaterial(){let t=`\n\t\t\tprecision highp float;\n\t\t\tout vec4 pc_FragColor;\n\t\t\tconst float spatialDivisions = ${this.spatialDivisions}.;\n\t\t\tuniform float span;\n\t\t\tuniform float npart;\n\t\t\tuniform float spatialn;\n\t\t\t${X.shapeInput()}\n\n\t\t\tvec3 low, high; \n\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tfloat spatialKey(float lowi) {\n\t\t\t\tfloat t = 0.;\n\t\t\t\tfor (float ii = 23.; ii >= 0.; ii--) {\n\t\t\t\t\tfloat i = ii + lowi;\n\t\t\t\t\tfloat iin = (i + 0.5) / 96.;\n\t\t\t\t\tvec4 shape = shapePos(iin);\n\t\t\t\t\tvec3 d = shape.xyz;\n\t\t\t\t\tfloat op = shape.w;\n\t\n\t\t\t\t\tt *= 2.;\n\t\t\t\t\tt += (\n\t\t\t\t\t\tlow.x < d.x && d.x < high.x &&\n\t\t\t\t\t\tlow.y < d.y && d.y < high.y &&\n\t\t\t\t\t\tlow.z < d.z && d.z < high.z &&\n\t\t\t\t\t\ti < npart || op == -2. \n\t\t\t\t\t) ? 1. : 0.;\n\t\t\t\t}\n\t\t\t\treturn t;\n\t\t\t}\n\n\t\t\t${X.getpart}\n\n\t\t\tvoid main() { \n\t\t\t\t\n\t\t\t\tvec3 div; \n\t\t\t\t\n\t\t\t\tfloat yz = float(gl_FragCoord.y - 0.5); \n\t\t\t\tdiv.y = getpart(yz, spatialDivisions);\n\t\t\t\tdiv.z = yz; \n\n\t\t\t\tfloat lx = float(gl_FragCoord.x - 0.5); \n\t\t\t\tfloat lowi = getpart(lx, spatialn) * 96.;\n\t\t\t\tdiv.x = lx;\n\n\t\t\t\tlow = div / spatialDivisions * 2. - 1. - span;\n\t\t\t\thigh = (div+1.) / spatialDivisions * 2. - 1. + span;\n\n\t\t\t\t\n\t\t\t\tpc_FragColor.x = spatialKey(lowi);\n\t\t\t\tpc_FragColor.y = spatialKey(lowi+24.);\n\t\t\t\tpc_FragColor.z = spatialKey(lowi+48.);\n\t\t\t\tpc_FragColor.w = spatialKey(lowi+72.);\n\t\t\t}\n\t\t`;return new L({name:"Spatial Pass",fragmentShader:t,uniforms:this.spatialPassUniforms})}potentialPassMaterial(){let t=`\n\t\t\tprecision highp float;\n\t\t\tout vec4 pc_FragColor;\n\n\t\t\t${X.shapeInput()}\n\t\t\tuniform sampler2D spatialPassTexture;\n\n\t\t\tconst float res = float(RES);\n\t\t\tconst float VOXEL_RESOLUTION = pow(2., res);\n\t\t\tconst float Z_LAYERS_PER_ROW = ceil(pow(2., res / 2.));\n\t\t\tconst float VOXEL_RESOLUTION_SUB1 = VOXEL_RESOLUTION - 1.;\n\t\t\tconst float INV_VOXEL_RESOLUTION = 1.0 / VOXEL_RESOLUTION;\n\n\t\t\tuniform float npart;\n\t\t\tuniform float spatialn;\n\t\t\tconst float spatialDivisions = ${this.spatialDivisions}.;\n\t\t\tconst float spatialDivisions2 = spatialDivisions * spatialDivisions;\n\t\t\tconst float spatialDivisionsSub1 = spatialDivisions - 1.;\n\n\t\t\t${X.getpart}\n\n\t\t\tvec3 packRGBAToVec3(vec4 color) {\n\t\t\t\tuint r = uint(color.r * 255.);\n\t\t\t\tuint g = uint(color.g * 255.);\n\t\t\t\tuint combined = (r << 8) | g; \n\t\t\t\treturn vec3(float(combined) * 0.00001525902, color.b, color.a); \n\t\t\t}\n\n\t\t\tvoid applyQuaternionToVector(in vec4 q, inout vec3 v) {\n\t\t\t\tv += 2.0 * cross(q.xyz, cross(q.xyz, v) + q.w * v);\n\t\t\t}\n\n\t\t\t\n\n\n\n\t\t\t\n\t\t\tfloat smoothOperation(float op, float sdf, float d, float k) {\n\t\t\t \n\t\t\t \n\t\t\t\t\n\n\t\t\t\tfloat signSubtract = clamp(op, -1., 1.);\n\t\t\t\tfloat signIntersection = 2. * (op - signSubtract) + 1.;\n\t\t\t\tfloat h = clamp(\n\t\t\t\t\t0.5 + signSubtract * 0.5 * (sdf - signSubtract * signIntersection * d) / k,\n\t\t\t\t\t0.0,\n\t\t\t\t\t1.0\n\t\t\t\t);\n\t\t\t\treturn mix(sdf, signSubtract * signIntersection * d, h) - \n\t\t\t\t\t\t\t signSubtract * k * h * (1.0 - h);\n\t\t\t}\n\n\t\t\tfloat sdSphere( vec3 p, float s )\n\t\t\t{\n\t\t\t\treturn length(p)-s;\n\t\t\t}\n\n\t\t\tfloat sdEllipsoid( vec3 p, vec3 r )\n\t\t\t{\n\t\t\t\tfloat k0 = length(p/r);\n\t\t\t\tfloat k1 = length(p/(r*r));\n\t\t\t\treturn k0*(k0-1.0)/k1;\n\t\t\t}\n\n\t\t\tfloat sdBox( vec3 p, vec3 b )\n\t\t\t{\n\t\t\t\tvec3 q = abs(p) - b;\n\t\t\t\treturn length(max(q,0.0)) + min(max(q.x,max(q.y,q.z)),0.0);\n\t\t\t}\n\n\t\t\tfloat sdTorus( vec3 p, vec2 t )\n\t\t\t{\n\t\t\t\tvec2 q = vec2(length(p.xy)-t.x,p.z);\n\t\t\t\treturn length(q)-t.y;\n\t\t\t}\n\n\t\t\tfloat sdCappedTorus( vec3 p, vec2 sc, float ra, float rb)\n\t\t\t{\n\t\t\t\tp.x = abs(p.x);\n\t\t\t\tfloat k = (sc.y*p.x>sc.x*p.y) ? dot(p.xy,sc) : length(p.xy);\n\t\t\t\treturn sqrt( dot(p,p) + ra*ra - 2.0*ra*k ) - rb;\n\t\t\t}\n\n\t\t\tfloat dot2( in vec2 v ) { return dot(v,v); }\n\t\t\tfloat sdCappedCone( vec3 p, float h, float r1, float r2 )\n\t\t\t{\n\t\t\t\tvec2 q = vec2( length(p.xz), p.y );\n\t\t\t\tvec2 k1 = vec2(r2,h);\n\t\t\t\tvec2 k2 = vec2(r2-r1,2.0*h);\n\t\t\t\tvec2 ca = vec2(q.x-min(q.x,(q.y<0.0)?r1:r2), abs(q.y)-h);\n\t\t\t\tvec2 cb = q - k1 + k2*clamp( dot(k1-q,k2)/dot2(k2), 0.0, 1.0 );\n\t\t\t\tfloat s = (cb.x<0.0 && ca.y<0.0) ? -1.0 : 1.0;\n\t\t\t\treturn s*sqrt( min(dot2(ca),dot2(cb)) );\n\t\t\t}\n\n\t\t\tfloat sdCappedCylinder( vec3 p, float h, float r )\n\t\t\t{\n\t\t\t\tvec2 d = abs(vec2(length(p.xz),p.y)) - vec2(r,h);\n\t\t\t\treturn min(max(d.x,d.y),0.0) + length(max(d,0.0));\n\t\t\t}\n\n\t\t\tfloat maxBlend = 0.0;\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tvoid fillSpatialInner(\n\t\t\t\tfloat ii,\n\t\t\t\tfloat activeKey,\n\t\t\t\tvec3 corner,\n\t\t\t\tinout float sdf,\n\t\t\t\tinout float colorDivisor,\n\t\t\t\tinout vec4 trackColor\n\t\t\t) {\n\t\t\t\tfor (float i = 0.; i < 24.; i++) {\n\t\t\t\t\tif (activeKey < 1.) break; \n\t\t\t\t\tactiveKey *= 0.5;\n\t\t\t\t\tif (fract(activeKey) < 0.5) continue;\n\n\t\t\t\t\tfloat iin = (i + ii + 0.5) * ${1/96};\n\t\t\t\t\tvec4 shape = shapePos(iin);\n\t\t\t\t\tvec4 quat = shapeQuat(iin);\n\t\t\t\t\tvec4 params1 = shapeParams1(iin);\n\t\t\t\t\tvec4 params2 = shapeParams2(iin);\n\n\t\t\t\t\tvec3 p = corner - shape.xyz;\n\t\t\t\t\tapplyQuaternionToVector(quat, p);\n\t\t\t\t\tp /= params2.z; // scale\n\t\t\t\t\tfloat d; // d in -1..1 coordinates\n\t\t\t\t\tswitch (int(params1.x)) {\n\t\t\t\t\t\tcase 0: d = sdSphere(p, params1.y); break;\n\t\t\t\t\t\tcase 1: d = sdEllipsoid(p, params1.yzw); break;\n\t\t\t\t\t\tcase 2: d = sdBox(p, params1.yzw); break;\n\t\t\t\t\t\tcase 3: d = sdCappedCylinder(p, params1.y, params1.z); break;\n\t\t\t\t\t\tcase 4: d = sdCappedCone(p, params1.y, params1.z, params1.w); break;\n\t\t\t\t\t\tcase 5: d = sdTorus(p, params1.yz); break;\n\t\t\t\t\t\tcase 6: d = sdCappedTorus(p, params1.yz, params1.w, params2.w); break;\n\t\t\t\t\t\t// Mesh children (type 7) live in a WebGPU-only baked SDF\n\t\t\t\t\t\t// atlas — the GLSL evaluator skips the shape entirely\n\t\t\t\t\t\t// (also closes the latent uninitialized-d default).\n\t\t\t\t\t\tdefault: continue;\n\t\t\t\t\t}\n\t\t\t\t\td -= params2.y; // rounded edge\n\t\t\t\t\td *= params2.z; // scale\n\n\t\t\t\t\tfloat k = params2.x;\n\t\t\t\t\tfloat op = shape.w;\n\n\t\t\t\t\tsdf = smoothOperation(shape.w, sdf, d, k);\n\n\t\t\t\t\tfloat isNegativeOne = step(-1.5, op) * step(op, -0.5); // 1 when op == -1, 0 otherwise\n\t\t\t\t\tfloat colorCull = smoothstep(maxBlend, 0., -d);\n\t\t\t\t\tfloat cullFactor = mix(1.0, colorCull, isNegativeOne);\n\t\t\t\t\ttrackColor *= cullFactor;\n\t\t\t\t\tcolorDivisor *= cullFactor;\n\n\t\t\t\t\tmaxBlend = max(maxBlend, k);\n\n\t\t\t\t\tk += 2. * INV_VOXEL_RESOLUTION; // avoid division by zero, and other color artifacts with very small k\n\t\t\t\t\tfloat nearness = smoothstep(k, 0., d);\n\n\t\t\t\t\tvec4 color = shapeColor(iin);\n\t\t\t\t\tnearness *= float(color.a >= 0.);\n\n\t\t\t\t\tcolorDivisor += nearness;\n\t\t\t\t\ttrackColor += color * nearness;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvec3 div;\n\t\t\t// compute potential from all spheres; collect +ve and =ve values separately\n\t\t\t// work in blocks of A*4 (=96) spheres, using the bit flags in 4 float channel 'activeKey' values\n\t\t\t// TODO check if extra vec3 output useful, not really used at present\n\t\t\tfloat fillSpatial(vec3 corner, inout vec4 trackColor) {\n\t\t\t\tfloat sdf = 1e3; // hack: initialize to large value\n\t\t\t\tfloat colorDivisor = 0.;\n\t\t\t\t// spatialPassTexture holds x=> lowi, x faster moving and y=> z, y faster moving\n\t\t\t\tfloat divyz = (div.y + div.z * spatialDivisions + 0.5) / (spatialDivisions2);\n\t\t\t\tfor (float ii = 0.; ii < spatialn; ii++) {\n\t\t\t\t\tfloat i = ii * 96.;\n\n\t\t\t\t\tvec4 activeKey = texture(spatialPassTexture, vec2((div.x * spatialn + ii + 0.5)/(spatialn * spatialDivisions), divyz));\n\t\t\t\t\tfillSpatialInner(i, activeKey.x, corner, sdf, colorDivisor, trackColor);\n\t\t\t\t\tfillSpatialInner(i+24., activeKey.y, corner, sdf, colorDivisor, trackColor);\n\t\t\t\t\tfillSpatialInner(i+48., activeKey.z, corner, sdf, colorDivisor, trackColor);\n\t\t\t\t\tfillSpatialInner(i+72., activeKey.w, corner, sdf, colorDivisor, trackColor);\n\t\t\t\t}\n\n\t\t\t\ttrackColor /= colorDivisor;\n\t\t\t\treturn mix(sdf, 0.0, step(1e20 - 0.1, sdf));\n\t\t\t}\n\n\t\t\tvoid main() {\n\t\t\t\t${X.getxyzi} \n\n\t\t\t\tvec3 xyzi = vec3(xi,yi,zi);\n\t\t\t\tvec3 corner = xyzi / VOXEL_RESOLUTION_SUB1 * 2. - 1.; \n\n\t\t\t\tdiv = floor(xyzi / VOXEL_RESOLUTION_SUB1 * spatialDivisionsSub1);\n\n\t\t\t\tvec4 c = vec4(0.);\n\t\t\t\tfloat t = fillSpatial(corner, c);\n\n\t\t\t\tpc_FragColor = vec4(t, packRGBAToVec3(c)); \n\t\t\t}\n\t\t`;return new L({name:"PotentialPass",fragmentShader:t,uniforms:this.potentialPassUniforms})}voxelPassMaterial(){let t=`\n\t\t\tprecision highp float;\n\t\t\tlayout(location = 0) out vec4 pc_FragColor;\n\t\t\tlayout(location = 1) out vec4 numTris;\n\n\t\t\tconst float res = float(RES);\n\t\t\tconst float VOXEL_RESOLUTION = pow(2., res);\n\t\t\tconst float VOXEL_RESOLUTION_SUB1 = VOXEL_RESOLUTION - 1.; \n\t\t\tconst float Z_LAYERS_PER_ROW = ceil(pow(2., res / 2.));\n\t\t\tconst float INV_VOXEL_RESOLUTION = 1.0 / VOXEL_RESOLUTION;\n\t\t\tuniform sampler2D numTrisTable; \n\n\t\t\tfloat keyi(float f000, float f100, float f010, float f110, float f001, float f101, float f011, float f111) {\n\t\t\t\treturn (float(f000 < 0.) * 1.) +\n\t\t\t\t\t\t\t (float(f100 < 0.) * 2.) +\n\t\t\t\t\t\t\t (float(f010 < 0.) * 8.) +\n\t\t\t\t\t\t\t (float(f110 < 0.) * 4.) +\n\t\t\t\t\t\t\t (float(f001 < 0.) * 16.) +\n\t\t\t\t\t\t\t (float(f101 < 0.) * 32.) +\n\t\t\t\t\t\t\t (float(f011 < 0.) * 128.) +\n\t\t\t\t\t\t\t (float(f111 < 0.) * 64.);\n\t\t\t}\n\n\t\t\t${X.lookup}\n\n\t\t\tvec3 compNormi(float xi, float yi, float zi) {\n\t\t\t\tfloat dx = look(xi + 1., yi, zi, potentialPassTexture).r - look(xi - 1., yi, zi, potentialPassTexture).r;\n\t\t\t\tfloat dy = look(xi, yi + 1., zi, potentialPassTexture).r - look(xi, yi - 1., zi, potentialPassTexture).r;\n\t\t\t\tfloat dz = look(xi, yi, zi + 1., potentialPassTexture).r - look(xi, yi, zi - 1., potentialPassTexture).r;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (dx == 0.0 && dy == 0.0 && dz == 0.0) {\n\t\t\t\t\treturn vec3(0.199, 0.299, 0.399);\n\t\t\t\t}\n\t\t\t\treturn normalize(vec3(dx, dy, dz));\n\t\t\t}\n\n\t\t\tvoid main() {\n\t\t\t\t${X.getxyzi} \n\n\t\t\t\tvec3 normal = compNormi(xi, yi, zi); \n\n\t\t\t\tif (xi >= VOXEL_RESOLUTION_SUB1 || yi >= VOXEL_RESOLUTION_SUB1 || zi >= VOXEL_RESOLUTION_SUB1) {\n\t\t\t\t\tpc_FragColor = vec4(normal, 0.);\n\t\t\t\t\tnumTris = vec4(0.);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tfloat\n\t\t\t\t\tf000 = look(xi, yi, zi, potentialPassTexture).r,\n\t\t\t\t\tf100 = look(xi+1., yi, zi, potentialPassTexture).r,\n\t\t\t\t\tf010 = look(xi, yi+1., zi, potentialPassTexture).r,\n\t\t\t\t\tf110 = look(xi+1., yi+1., zi, potentialPassTexture).r,\n\t\t\t\t\tf001 = look(xi, yi, zi+1., potentialPassTexture).r,\n\t\t\t\t\tf101 = look(xi+1., yi, zi+1., potentialPassTexture).r,\n\t\t\t\t\tf011 = look(xi, yi+1., zi+1., potentialPassTexture).r,\n\t\t\t\t\tf111 = look(xi+1., yi+1., zi+1., potentialPassTexture).r;\n\t\t\t\tfloat key = keyi(f000, f100, f010, f110, f001, f101, f011, f111);\n\n\t\t\t\tpc_FragColor = vec4(normal, key);\n\n\t\t\t\tnumTris = texture(numTrisTable, vec2((key + 0.5) / 256., 0.5));\n\t\t\t}\n\t\t`;return new L({name:"VoxelPass",fragmentShader:t,uniforms:this.voxelPassUniforms})}patchVertexShaderForShapeBlend(t){let e=`\n\t\t#ifdef SHAPEBLEND \n\t\t\tprecision highp sampler2D;\n\n\t\t\tuniform float isol;\n\n\t\t\tuniform sampler2D triTable; \n\t\t\tuniform sampler2D pyramidTexture1;\n\t\t\tuniform vec2 pyramidTexture1Size;\n\t\t\tuniform sampler2D pyramidTexture2;\n\t\t\tuniform vec2 pyramidTexture2Size;\n\n\t\t\tconst vec2 halfPixelOffset = vec2(0.5, 0.5);\n\n\t\t\tconst vec2 rShift = vec2(0., 1.);\n\t\t\tconst vec2 gShift = vec2(1., 1.);\n\t\t\tconst vec2 bShift = vec2(1., 0.);\n\n\t\t\tconst float res = float(RES);\n\t\t\tconst float VOXEL_RESOLUTION = pow(2., res);\n\t\t\tconst float Z_LAYERS_PER_ROW = ceil(pow(2., res / 2.));\n\t\t\tconst float INV_VOXEL_RESOLUTION = 1.0 / VOXEL_RESOLUTION;\n\n\t\t\tconst float scale_factor = 2.;\n\n\t\t\t#if SHAPEBLEND == 5\n\t\t\t\tconst float levelShiftX[7] = float[7](4., 6., 12., 24., 48., 96., 192.);\n\t\t\t\tconst float scale = 8. * scale_factor;\n\t\t\t\tconst vec3 originOffset = vec3(16.);\n\t\t\t#elif SHAPEBLEND == 7\n\t\t\t\tconst float levelShiftX[10] = float[10](4., 6., 12., 24., 48., 96., 192., 384., 768., 1536.); \n\t\t\t\tconst float scale = 2. * scale_factor;\n\t\t\t\tconst vec3 originOffset = vec3(64.);\n\t\t\t#elif SHAPEBLEND == 8\n\t\t\t\tconst float levelShiftX[11] = float[11](4., 8., 16., 32., 64., 128., 256., 512., 1024., 2048., 4096.);\n\t\t\t\tconst float scale = scale_factor;\n\t\t\t\tconst vec3 originOffset = vec3(128.);\n\t\t\t#else\n\t\t\t\tconst float levelShiftX[8] = float[8](4., 8., 16., 32., 64., 128., 256., 512.);\n\t\t\t\tconst float scale = 4. * scale_factor;\n\t\t\t\tconst vec3 originOffset = vec3(32.);\n\t\t\t#endif\n\n\t\t\t${X.lookup}\n\n\t\t\tconst vec3 offsets[24] = vec3[](\n\t\t\t\tvec3(0., 0., 0.), vec3(1., 0., 0.),\n\t\t\t\tvec3(1., 0., 0.), vec3(1., 1., 0.),\n\t\t\t\tvec3(0., 1., 0.), vec3(1., 1., 0.),\n\t\t\t\tvec3(0., 0., 0.), vec3(0., 1., 0.),\n\t\t\t\tvec3(0., 0., 1.), vec3(1., 0., 1.),\n\t\t\t\tvec3(1., 0., 1.), vec3(1., 1., 1.),\n\t\t\t\tvec3(0., 1., 1.), vec3(1., 1., 1.),\n\t\t\t\tvec3(0., 0., 1.), vec3(0., 1., 1.),\n\t\t\t\tvec3(0., 0., 0.), vec3(0., 0., 1.),\n\t\t\t\tvec3(1., 0., 0.), vec3(1., 0., 1.),\n\t\t\t\tvec3(1., 1., 0.), vec3(1., 1., 1.),\n\t\t\t\tvec3(0., 1., 0.), vec3(0., 1., 1.)\n\t\t\t);\n\n\t\t\tvec2 computeShiftedPosition1(vec2 xy, float levelOriginX) {\n\t\t\t\tvec2 xyShifted = xy;\n\t\t\t\txyShifted.x += levelOriginX;\n\t\t\t\treturn (xyShifted + halfPixelOffset) / pyramidTexture1Size;\n\t\t\t}\n\n\t\t\tvec2 computeShiftedPosition2(vec2 xy, float levelOriginX) {\n\t\t\t\tvec2 xyShifted = xy;\n\t\t\t\txyShifted.x += levelOriginX;\n\t\t\t\treturn (xyShifted + halfPixelOffset) / pyramidTexture2Size;\n\t\t\t}\n\n\t\t\tvec4 unpackVec3ToRGBA(vec3 vec) {\n\t\t\t\tuint combined = uint(vec.x * 65535.0 + 0.5); \n\t\t\t\tfloat g = float(combined & uint(0xFF)) * 0.00392156862; \n\t\t\t\tfloat r = float((combined >> 8) & uint(0xFF)) * 0.00392156862; \n\t\t\n\t\t\t\treturn vec4(r, g, vec.y, vec.z);\n\t\t\t}\n\n\t\t\tout vec4 marchColor;\n\t\t\t\n\t\t#endif\n\t\t`;t.vertexShader=e+t.vertexShader.replace("#include <project_vertex>","\n\t\t#ifdef SHAPEBLEND\n\t\t\tfloat triIndex = floor(float(gl_VertexID/3));\n\t\t\tfloat vertexIndex = float(gl_VertexID);\n\t\t\t\n\t\t\t\n\t\t\tfloat levelOriginX1 = pyramidTexture1Size.x - 2.;\n\t\t\tfloat levelOriginX2 = pyramidTexture2Size.x - 1.;\n\t\t\tvec2 xy = vec2(0.);\n\t\t\tvec4 lookUp = texture(pyramidTexture2, computeShiftedPosition2(xy, levelOriginX2));\n\t\t\t\n\t\t\t\n\t\t\tif (triIndex >= lookUp.r) return;\n\t\t\t\n\t\t\t\n\t\t\tfloat start = 0.;\n\t\t\tvec4 triIndexVec = vec4(triIndex);\n\t\t\t\n\t\t\t\n\t\t\tfor (int i = 0; i < LOOP;) {\n\t\t\t\t\n\t\t\t\tvec4 ends = lookUp + vec4(start);\n\t\t\t\tvec4 starts = vec4(ends.gba, start);\n\t\t\t\tvec4 check = vec4(greaterThanEqual(triIndexVec, starts)) * \n\t\t\t\t\t\t\t\t\t\t\tvec4(lessThan(triIndexVec, ends));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\txy *= 2.;\n\t\t\t\txy += check.r * rShift + check.g * gShift + check.b * bShift;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tstart = dot(check, starts);\n\t\t\t\tlevelOriginX2 -= levelShiftX[i];\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tlookUp = texture(pyramidTexture1, computeShiftedPosition1(xy, levelOriginX1));\n\t\t\t\ti++;\n\n\t\t\t\tends = lookUp + vec4(start);\n\t\t\t\tstarts = vec4(ends.gba, start);\n\t\t\t\tcheck = vec4(greaterThanEqual(triIndexVec, starts)) * \n\t\t\t\t\t\t\t\t\t\t\tvec4(lessThan(triIndexVec, ends));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\txy *= 2.;\n\t\t\t\txy += check.r * rShift + check.g * gShift + check.b * bShift;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tstart = dot(check, starts);\n\t\t\t\tlevelOriginX1 -= levelShiftX[i];\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tlookUp = texture(pyramidTexture2, computeShiftedPosition2(xy, levelOriginX2));\n\n\t\t\t\ti++;\n\t\t\t}\n\n\t\t\t#if HALF == 1\n\t\t\t\tvec4 ends = lookUp + vec4(start);\n\t\t\t\tvec4 starts = vec4(ends.gba, start);\n\t\t\t\tvec4 check = vec4(greaterThanEqual(triIndexVec, starts)) * vec4(lessThan(triIndexVec, ends));\n\t\t\t\n\t\t\t\t\n\t\t\t\txy *= 2.;\n\t\t\t\txy += check.r * rShift + check.g * gShift + check.b * bShift;\n\t\t\t\n\t\t\t\t\n\t\t\t\tstart = dot(check, starts);\n\t\t\t#endif\n\t\t\t\n\t\t\t\n\t\t\tvec3 gridPos;\n\t\t\tgridPos.x = mod(xy.x, VOXEL_RESOLUTION);\n\t\t\tgridPos.y = mod(xy.y, VOXEL_RESOLUTION);\n\t\t\tgridPos.z = floor(xy.x * INV_VOXEL_RESOLUTION) + \n\t\t\t\t\t\t\t\t\tfloor(xy.y * INV_VOXEL_RESOLUTION) * Z_LAYERS_PER_ROW;\n\t\t\t\n\t\t\t\n\t\t\tvertexIndex -= start * 3.;\n\t\t\tfloat vk = vertexIndex * 0.0625 + 0.03125; \n\t\t\t\n\t\t\t\n\t\t\tvec4 voxel = look(gridPos.x, gridPos.y, gridPos.z, voxelPassTexture);\n\t\t\tfloat key = (voxel.w + 0.5) * 0.00390625; \n\t\t\t\n\t\t\t\n\t\t\tfloat edgeNum = texture(triTable, vec2(vk, key)).x;\n\t\t\tint edgeIndex = int(edgeNum) * 2;\n\t\t\t\n\t\t\t\n\t\t\tvec3 p1 = gridPos + offsets[edgeIndex];\n\t\t\tvec3 p2 = gridPos + offsets[edgeIndex + 1];\n\t\t\t\n\t\t\t\n\t\t\tvec4 potential1 = look(p1.x, p1.y, p1.z, potentialPassTexture);\n\t\t\tvec4 potential2 = look(p2.x, p2.y, p2.z, potentialPassTexture);\n\t\t\t\n\t\t\t\n\t\t\tfloat mu = potential1.r / (potential1.r - potential2.r);\n\n\t\t\tmarchColor = mix(\n\t\t\t\tunpackVec3ToRGBA(potential1.gba),\n\t\t\t\tunpackVec3ToRGBA(potential2.gba),\n\t\t\t\tmu\n\t\t\t);\n\n\t\t\ttransformed = p1 + (p2 - p1) * mu;\n\t\t\ttransformed -= originOffset;\n\t\t\ttransformed *= scale;\n\t\t\tvec4 data1 = look(p1.x, p1.y, p1.z, voxelPassTexture);\n\t\t\tvec4 data2 = look(p2.x, p2.y, p2.z, voxelPassTexture);\n\t\t\tobjectNormal = normalize(mix(data1.xyz, data2.xyz, mu));\n\t\t\ttransformedNormal = normalMatrix * objectNormal;\n\t\t\t#ifndef FLAT_SHADED\n\t\t\t\tvNormal = transformedNormal;\n\t\t\t#endif\n\t\t#endif\n\t\t\n#include <project_vertex>");let i=t.fragmentShader.match(/vec3 diffuseColor[^\n]*\n/);if(!i)return;let a=`\n\t\t#ifdef SHAPEBLEND_C\n\t\t\t#if SHAPEBLEND_C == 1\n\t\t\t\t${i[0].replace(/nodeU0,/g,"marchColor.rgb,").replace(/nodeU\d+(?=,g_uid\d+_calpha\))/g,"marchColor.a")}\n\t\t\t#else\n\t\t\t\t${i[0]}\n\t\t\t#endif\n\t\t#else\n\t\t\t${i[0]}\n\t\t#endif\n\t\t`;t.fragmentShader="in vec4 marchColor;\n"+t.fragmentShader.replace(i[0],a),Object.assign(t.uniforms,this.marchPassUniforms)}initDebugPass(t){console.log("fboToDebug.width",t.width,t.height),this.geometry=new y(t.width,t.height),this.geometry.userData={parameters:{width:4,height:4}};let e={inputTexture:{value:t.textures.length>1?t.textures[1]:t.texture},pyramidTextureSize:{value:void 0}},i=t=>{t.vertexShader="\n\t\t\t\tprecision highp float;\n\n\t\t\t\tvarying vec2 vUv;\n\n\t\t\t\tvoid main() {\n\t\t\t\t\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t\t\t\t\t\tvUv = uv;\n\t\t\t\t}\n\t\t\t",t.fragmentShader="\n\t\t\t\tlayout(location = 1) out vec4 gVelocity;\n\n\t\t\t\tprecision highp float;\n\t\t\t\t\n\t\t\t\tuniform sampler2D inputTexture;\n\t\t\t\tvarying vec2 vUv;\n\n\t\t\t\tuniform vec2 pyramidTextureSize;\n\n\t\t\t\tvoid main() {\n\t\t\t\t\t\t\n\t\t\t\t\t\tgl_FragColor = texture(inputTexture, vUv);\n\t\t\t\t\t\tgVelocity = vec4(0.0);\n\t\t\t\t}\n\t\t\t",e.pyramidTextureSize.value=new l(this.pyramidRenderTarget[0].width,this.pyramidRenderTarget[0].height),Object.assign(t.uniforms,e)};this.material.shapeBlendhack=i,this.material.root.shapeBlendhack=i}dispose(){super.dispose(),B()?.release(this)}},G=j;G.streamCompaction=new class{constructor(){this.pyramidPassScene=new x,this.pyramidPassMaterial=new L({name:"PyramidPass"}),this.pyramidPassUniforms={inputTexture:{value:void 0},inputWidth:{value:0},inputHeight:{value:0},inputShiftX:{value:0},outputShiftX:{value:0}},this.pyramidTopLevelReadPixelBuffer=new Float32Array(4),this.pyramidPassMaterial.fragmentShader="\n\t\t\tprecision highp float;\n\t\t\tprecision highp sampler2D;\n\t\t\tlayout(location = 0) out vec4 pc_FragColor;\n\t\t\tuniform sampler2D inputTexture;\n\t\t\tuniform float inputWidth;\n\t\t\tuniform float inputHeight;\n\t\t\tuniform float inputShiftX;\n\t\t\tuniform float outputShiftX;\n\t\t\tconst vec2 half_unit_coord = vec2(0.5);\n\t\t\tconst vec4 one = vec4(1.0);\n\t\t\tvoid main() {\n\t\t\t\tvec2 inputSize = vec2(inputWidth, inputHeight);\n\t\t\t\tvec2 input_pixel_uv = 1. / inputSize;\n\t\t\t\tvec2 coord = gl_FragCoord.xy - half_unit_coord;\n\t\t\t\tcoord.x -= outputShiftX;\n\t\t\t\tcoord = coord * 2. + half_unit_coord;\n\t\t\t\tcoord.x += inputShiftX;\n\n\t\t\t\t\n\t\t\t\tvec2 input_uv = coord / inputSize;\n\t\t\t\tfloat bl = texture(inputTexture, input_uv).r;\n\n\t\t\t\t\n\t\t\t\tinput_uv.x += input_pixel_uv.x;\n\t\t\t\tfloat br = texture(inputTexture, input_uv).r;\n\n\t\t\t\t\n\t\t\t\tinput_uv.y += input_pixel_uv.y;\n\t\t\t\tfloat tr = texture(inputTexture, input_uv).r;\n\n\t\t\t\t\n\t\t\t\tinput_uv.x -= input_pixel_uv.x;\n\t\t\t\tfloat tl = texture(inputTexture, input_uv).r;\n\n\t\t\t\tpc_FragColor.a = bl;\n\t\t\t\tpc_FragColor.b = pc_FragColor.a + br;\n\t\t\t\tpc_FragColor.g = pc_FragColor.b + tr;\n\t\t\t\tpc_FragColor.r = pc_FragColor.g + tl; \n\t\t\t}\n\t\t",this.pyramidPassMaterial.uniforms=this.pyramidPassUniforms,this.pyramidPassMaterial.depthTest=!1,this.pyramidPassMaterial.depthWrite=!1;let t=new P(O,this.pyramidPassMaterial);t.frustumCulled=!1,this.pyramidPassScene.add(t)}renderPyramid(t,e,i,a,n){(new m).min.setScalar(0);let s=e.length-1,r=new c;i.getViewport(r),this.pyramidPassUniforms.inputShiftX.value=0,this.pyramidPassUniforms.outputShiftX.value=0;let o=s-1;for(let s=o;s>=0;s--){let r=s%2==o%2?n[0]:n[1],l=s===o?a:s%2==o%2?n[1]:n[0];this.pyramidPassUniforms.inputTexture.value=l.textures.length>1?l.textures[1]:l.texture,this.pyramidPassUniforms.inputWidth.value="width"in l?l.width:1,this.pyramidPassUniforms.inputHeight.value="height"in l?l.height:1,i.setRenderTarget(r);let h=e[s],p=i.getPixelRatio();i.setViewport(this.pyramidPassUniforms.outputShiftX.value/p,0,h/p,h/p),2===s&&t%2!=0&&i.setViewport(this.pyramidPassUniforms.outputShiftX.value/p,0,3/p,3/p),i.render(this.pyramidPassScene,D);let d=this.pyramidPassUniforms.inputShiftX.value;this.pyramidPassUniforms.inputShiftX.value=this.pyramidPassUniforms.outputShiftX.value,this.pyramidPassUniforms.outputShiftX.value=d,s<o&&(this.pyramidPassUniforms.outputShiftX.value+=e[s+1])}i.setViewport(r);let l=e.length%2==0?0:1;return i.readRenderTargetPixelsAsync(n[l],n[l].width-1,0,1,1,this.pyramidTopLevelReadPixelBuffer).then(()=>this.pyramidTopLevelReadPixelBuffer[0])}};var $=new v,Z=new v,Y=new h,Q=new p,J=new p,tt=new h;function et(t,e=0){let i=this.children.length;for(;i--;){let a=this.children[i];n.is(a)&&it.call(a,t,e+1)}}function it(t,e=0){if(!0!==t(this,e)){let i=this.children.length;for(;i--;){let a=this.children[i];n.is(a)&&it.call(a,t,e+1)}}}function at(){if(void 0===this.shapesDataTexture.value){let t=new w(new Float32Array(1920),96,5,d,o);this.shapesDataTexture.value=t}let n=this.shapesDataTexture.value,l=n.image.data,h=0,p=0,c=this.data.geometry.blendRange,f=$.copy(this.matrixWorld).invert(),u=this._npart,v=0;this._meshSdfWanted.clear();let m=null;if(et.call(this,n=>{if(!1===n.visible)return!0;let o;if(n instanceof t)return;if(n instanceof e||r(n))return;o=n instanceof i?n.object:n;let d=n.data?.cloner;if(s.is(n)&&d&&!d.hideBase&&"radial"!==d.type&&!0!==d.disabled||!(o instanceof a))return;let u=o.geometry.userData.parameters,x=u?.shapeBlendNode??o.dataPatched?.geometry?.shapeBlendNode;if(void 0===x)return;if(Z.multiplyMatrices(f,n.matrixWorld).decompose(J,Y,Q),"TorusGeometry"===u?.type&&360!==u.arc){let t=u.arc*Math.PI/180;t/=4,Y.multiply(tt.set(0,0,Math.sin(t),Math.cos(t)))}let y=x.overrideGlobalBlend?x.blendRange:c;y=y/this.bboxSize*2,l[4*v]=(J.x-this.bboxOffset)/this.bboxSize*2,l[4*v+1]=(J.y-this.bboxOffset)/this.bboxSize*2,l[4*v+2]=(J.z-this.bboxOffset)/this.bboxSize*2,l[4*v+3]=0===x.operation?1:2===x.operation?-1:-2,l[384+4*v]=-Y.x,l[384+4*v+1]=-Y.y,l[384+4*v+2]=-Y.z,l[384+4*v+3]=Y.w;let g=new Float32Array(4),S=0,b=y;if("SphereGeometry"===u?.type)u.width===u.height&&u.width===u.depth?g[0]=0:g[0]=1,g[1]=u.width/this.bboxSize,g[2]=u.height/this.bboxSize,g[3]=u.depth/this.bboxSize,b=Math.max(g[1],g[2],g[3])*Q.x+y;else if("CubeGeometry"===u?.type){S=u.cornerRadius;let t=u.width,e=u.height,i=u.depth;g[0]=2,g[1]=(t-2*S)/this.bboxSize,g[2]=(e-2*S)/this.bboxSize,g[3]=(i-2*S)/this.bboxSize,b=Math.sqrt(t**2+e**2+i**2)/this.bboxSize*Q.x+y}else if("CylinderGeometry"===u?.type){S=u.cornerRadius;let t=u.height,e=u.radiusBottom,i=u.radiusTop;if(i>=e){let a=Math.atan2(i-e,t),n=(Math.PI/2-a)/2;i-=S/Math.tan(n),e-=S*Math.tan(n)}else if(e>i){let a=Math.atan2(e-i,t),n=(Math.PI/2-a)/2;i-=S*Math.tan(n),e-=S/Math.tan(n)}g[1]=(u.height-2*S)/this.bboxSize,e===i?(g[0]=3,g[2]=e/this.bboxSize*2):(g[0]=4,g[2]=e/this.bboxSize*2,g[3]=i/this.bboxSize*2),b=(Math.hypot(g[1],Math.max(Math.abs(g[2]),Math.abs(g[3])))+S/this.bboxSize*2)*Q.x+y}else if("TorusGeometry"===u?.type){if(g[0]=5,g[1]=(u.width-u.depth)/this.bboxSize,g[2]=u.depth/this.bboxSize,360!==u.arc){g[0]=6,g[3]=g[1],l[1152+4*v+3]=g[2];let t=2*Math.atan2(g[2]/2,g[1]),e=u.arc*Math.PI/180/2-t;g[1]=Math.sin(e),g[2]=Math.cos(e)}b=u.width*Q.x/this.bboxSize+y}else{let t=o.geometry;(m??(m=new Set)).add(t.uuid);let e=this._meshSdfBaked.get(t.uuid),i=K(t);if((void 0===e||e.posVersion!==i)&&this._meshSdfWanted.set(t.uuid,t),void 0===e)return;g[0]=7,g[1]=e.slot,g[2]=e.boxHalf.x/this.bboxSize*2,g[3]=e.boxHalf.y/this.bboxSize*2,l[1152+4*v+3]=e.boxHalf.z/this.bboxSize*2,b=Math.hypot(e.boxHalf.x,e.boxHalf.y,e.boxHalf.z)/this.bboxSize*2*Q.x+y}l.set(g,768+4*v),h=Math.max(h,b),p=Math.max(p,y),this._reach[v]=b,l[1152+4*v]=y,l[1152+4*v+1]=S/this.bboxSize*2,l[1152+4*v+2]=Q.x;let T,P,_=Array.isArray(o.material)?o.material[0]:o.material,z=_;if(z?.getShapeBlendBaseColor){let t=z.getShapeBlendBaseColor();T=t,P=t.a}else void 0!==_?.uniforms?.nodeU0?(T=_.uniforms.nodeU0.node.value,P=_.uniforms.nodeU1?.value??1):(T={r:1,g:1,b:1},P=1);0!==x.operation&&!x.useColor&&(P=-1),l[1536+4*v]=T.r,l[1536+4*v+1]=T.g,l[1536+4*v+2]=T.b,l[1536+4*v+3]=P,P<1&&1===this.material.defines?.SHAPEBLEND_C&&(this.material.transparent=!0),v++}),this._meshSdfBaked.size>0){let t=m??new Set;for(let e of this._meshSdfBaked.keys())t.has(e)||this._meshSdfBaked.delete(e)}this.npart=v,this._maxBlendK=p;let x=1.1*h+2/(this.spatialDivisions-1)+4/(this.resolution-1);this.spatialPassUniforms.span.value=x;let y=this._prevShapeData,g=u!==v,S=null===y||this._prevSpan!==x||g,b=S||H,T=this._fieldDirtyMin.set(1/0,1/0,1/0),P=this._fieldDirtyMax.set(-1/0,-1/0,-1/0);if(null!==y){let t=Math.max(v,u);for(let e=0;e<t;e++){let t=!1;for(let i=0;i<5;i++){let a=384*i+4*e;if(l[a]!==y[a]||l[a+1]!==y[a+1]||l[a+2]!==y[a+2]||l[a+3]!==y[a+3]){t=!0;break}}if(!t)continue;if(S=!0,b)break;let i=l[4*e],a=l[4*e+1],n=l[4*e+2],s=y[4*e],r=y[4*e+1],o=y[4*e+2],h=this._reach[e],p=this._prevReach[e];Number.isFinite(i+a+n+h)&&Number.isFinite(s+r+o+p)?(T.x=Math.min(T.x,i-h,s-p),T.y=Math.min(T.y,a-h,r-p),T.z=Math.min(T.z,n-h,o-p),P.x=Math.max(P.x,i+h,s+p),P.y=Math.max(P.y,a+h,r+p),P.z=Math.max(P.z,n+h,o+p)):b=!0}}return H&&(S=!0),this._fieldDirtyFull=b||T.x===1/0,S&&(null===y?this._prevShapeData=new Float32Array(l):y.set(l),this._prevReach.set(this._reach),this._prevSpan=x,n.needsUpdate=!0),S}function nt(t){return at.call(t)}export{k as a,E as b,M as c,F as d,N as e,V as f,B as g,A as h,W as i,K as j,G as k,nt as l};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./runtime-chunk-
|
|
1
|
+
import{a as t}from"./runtime-chunk-LUASUHYM.js";import{d as e}from"./runtime-chunk-NAJO6T26.js";import{Sc as s}from"./runtime-chunk-BVVSZMXD.js";var r=class extends(e(s,t)){constructor(t,e){super(),this.super_Entity(t,e),this.objectHelper.update(),"Empty"===this.data.type&&(this.objectHelper.visible=!1)}updateState(t,e){this.updateState_Entity(t,e),"buffer"in t&&1===Object.keys(t).length&&e.scene.reloadSplats()}};export{r as a};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e}from"./runtime-chunk-TZCHGFVF.js";import{Fa as t,q as r}from"./runtime-chunk-AIWIOLR6.js";var i=new Map;function n(e,t){i.set(e,t)}var s=class{static get version(){return"1.3.8"}static toString(){return"JavaScript Expression Parser (JSEP) v"+s.version}static addUnaryOp(e){return s.max_unop_len=Math.max(e.length,s.max_unop_len),s.unary_ops[e]=1,s}static addBinaryOp(e,t,r){return s.max_binop_len=Math.max(e.length,s.max_binop_len),s.binary_ops[e]=t,r?s.right_associative.add(e):s.right_associative.delete(e),s}static addIdentifierChar(e){return s.additional_identifier_chars.add(e),s}static addLiteral(e,t){return s.literals[e]=t,s}static removeUnaryOp(e){return delete s.unary_ops[e],e.length===s.max_unop_len&&(s.max_unop_len=s.getMaxKeyLen(s.unary_ops)),s}static removeAllUnaryOps(){return s.unary_ops={},s.max_unop_len=0,s}static removeIdentifierChar(e){return s.additional_identifier_chars.delete(e),s}static removeBinaryOp(e){return delete s.binary_ops[e],e.length===s.max_binop_len&&(s.max_binop_len=s.getMaxKeyLen(s.binary_ops)),s.right_associative.delete(e),s}static removeAllBinaryOps(){return s.binary_ops={},s.max_binop_len=0,s}static removeLiteral(e){return delete s.literals[e],s}static removeAllLiterals(){return s.literals={},s}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(e){this.expr=e,this.index=0}static parse(e){return new s(e).parse()}static getMaxKeyLen(e){return Math.max(0,...Object.keys(e).map(e=>e.length))}static isDecimalDigit(e){return e>=48&&e<=57}static binaryPrecedence(e){return s.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!s.binary_ops[String.fromCharCode(e)]||s.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return s.isIdentifierStart(e)||s.isDecimalDigit(e)}throwError(e){let t=new Error(e+" at character "+this.index);throw t.index=this.index,t.description=e,t}runHook(e,t){if(s.hooks[e]){let r={context:this,node:t};return s.hooks.run(e,r),r.node}return t}searchHook(e){if(s.hooks[e]){let t={context:this};return s.hooks[e].find(function(e){return e.call(t.context,t),t.node}),t.node}}gobbleSpaces(){let e=this.code;for(;e===s.SPACE_CODE||e===s.TAB_CODE||e===s.LF_CODE||e===s.CR_CODE;)e=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let e=this.gobbleExpressions(),t=1===e.length?e[0]:{type:s.COMPOUND,body:e};return this.runHook("after-all",t)}gobbleExpressions(e){let t,r,i=[];for(;this.index<this.expr.length;)if(t=this.code,t===s.SEMCOL_CODE||t===s.COMMA_CODE)this.index++;else if(r=this.gobbleExpression())i.push(r);else if(this.index<this.expr.length){if(t===e)break;this.throwError('Unexpected "'+this.char+'"')}return i}gobbleExpression(){let e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}gobbleBinaryOp(){this.gobbleSpaces();let e=this.expr.substr(this.index,s.max_binop_len),t=e.length;for(;t>0;){if(s.binary_ops.hasOwnProperty(e)&&(!s.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!s.isIdentifierPart(this.expr.charCodeAt(this.index+e.length))))return this.index+=t,e;e=e.substr(0,--t)}return!1}gobbleBinaryExpression(){let e,t,r,i,n,o,a,h,l;if(o=this.gobbleToken(),!o||(t=this.gobbleBinaryOp(),!t))return o;for(n={value:t,prec:s.binaryPrecedence(t),right_a:s.right_associative.has(t)},a=this.gobbleToken(),a||this.throwError("Expected expression after "+t),i=[o,n,a];t=this.gobbleBinaryOp();){if(r=s.binaryPrecedence(t),0===r){this.index-=t.length;break}n={value:t,prec:r,right_a:s.right_associative.has(t)},l=t;let h=e=>n.right_a&&e.right_a?r>e.prec:r<=e.prec;for(;i.length>2&&h(i[i.length-2]);)a=i.pop(),t=i.pop().value,o=i.pop(),e={type:s.BINARY_EXP,operator:t,left:o,right:a},i.push(e);e=this.gobbleToken(),e||this.throwError("Expected expression after "+l),i.push(n,e)}for(h=i.length-1,e=i[h];h>1;)e={type:s.BINARY_EXP,operator:i[h-1].value,left:i[h-2],right:e},h-=2;return e}gobbleToken(){let e,t,r,i;if(this.gobbleSpaces(),i=this.searchHook("gobble-token"),i)return this.runHook("after-token",i);if(e=this.code,s.isDecimalDigit(e)||e===s.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===s.SQUOTE_CODE||e===s.DQUOTE_CODE)i=this.gobbleStringLiteral();else if(e===s.OBRACK_CODE)i=this.gobbleArray();else{for(t=this.expr.substr(this.index,s.max_unop_len),r=t.length;r>0;){if(s.unary_ops.hasOwnProperty(t)&&(!s.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!s.isIdentifierPart(this.expr.charCodeAt(this.index+t.length)))){this.index+=r;let e=this.gobbleToken();return e||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:s.UNARY_EXP,operator:t,argument:e,prefix:!0})}t=t.substr(0,--r)}s.isIdentifierStart(e)?(i=this.gobbleIdentifier(),s.literals.hasOwnProperty(i.name)?i={type:s.LITERAL,value:s.literals[i.name],raw:i.name}:i.name===s.this_str&&(i={type:s.THIS_EXP})):e===s.OPAREN_CODE&&(i=this.gobbleGroup())}return i?(i=this.gobbleTokenProperty(i),this.runHook("after-token",i)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let t=this.code;for(;t===s.PERIOD_CODE||t===s.OBRACK_CODE||t===s.OPAREN_CODE||t===s.QUMARK_CODE;){let r;if(t===s.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==s.PERIOD_CODE)break;r=!0,this.index+=2,this.gobbleSpaces(),t=this.code}this.index++,t===s.OBRACK_CODE?(e={type:s.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()},this.gobbleSpaces(),t=this.code,t!==s.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):t===s.OPAREN_CODE?e={type:s.CALL_EXP,arguments:this.gobbleArguments(s.CPAREN_CODE),callee:e}:(t===s.PERIOD_CODE||r)&&(r&&this.index--,this.gobbleSpaces(),e={type:s.MEMBER_EXP,computed:!1,object:e,property:this.gobbleIdentifier()}),r&&(e.optional=!0),this.gobbleSpaces(),t=this.code}return e}gobbleNumericLiteral(){let e,t,r="";for(;s.isDecimalDigit(this.code);)r+=this.expr.charAt(this.index++);if(this.code===s.PERIOD_CODE)for(r+=this.expr.charAt(this.index++);s.isDecimalDigit(this.code);)r+=this.expr.charAt(this.index++);if(e=this.char,"e"===e||"E"===e){for(r+=this.expr.charAt(this.index++),e=this.char,("+"===e||"-"===e)&&(r+=this.expr.charAt(this.index++));s.isDecimalDigit(this.code);)r+=this.expr.charAt(this.index++);s.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+r+this.char+")")}return t=this.code,s.isIdentifierStart(t)?this.throwError("Variable names cannot start with a number ("+r+this.char+")"):(t===s.PERIOD_CODE||1===r.length&&r.charCodeAt(0)===s.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:s.LITERAL,value:parseFloat(r),raw:r}}gobbleStringLiteral(){let e="",t=this.index,r=this.expr.charAt(this.index++),i=!1;for(;this.index<this.expr.length;){let t=this.expr.charAt(this.index++);if(t===r){i=!0;break}if("\\"===t)switch(t=this.expr.charAt(this.index++),t){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+="\t";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=t}else e+=t}return i||this.throwError('Unclosed quote after "'+e+'"'),{type:s.LITERAL,value:e,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let e=this.code,t=this.index;for(s.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(e=this.code,s.isIdentifierPart(e));)this.index++;return{type:s.IDENTIFIER,name:this.expr.slice(t,this.index)}}gobbleArguments(e){let t=[],r=!1,i=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let n=this.code;if(n===e){r=!0,this.index++,e===s.CPAREN_CODE&&i&&i>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(n===s.COMMA_CODE){if(this.index++,i++,i!==t.length)if(e===s.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===s.CBRACK_CODE)for(let e=t.length;e<i;e++)t.push(null)}else if(t.length!==i&&0!==i)this.throwError("Expected comma");else{let e=this.gobbleExpression();(!e||e.type===s.COMPOUND)&&this.throwError("Expected comma"),t.push(e)}}return r||this.throwError("Expected "+String.fromCharCode(e)),t}gobbleGroup(){this.index++;let e=this.gobbleExpressions(s.CPAREN_CODE);if(this.code===s.CPAREN_CODE)return this.index++,1===e.length?e[0]:!!e.length&&{type:s.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:s.ARRAY_EXP,elements:this.gobbleArguments(s.CBRACK_CODE)}}},o=new class{add(e,t,r){if("string"!=typeof arguments[0])for(let e in arguments[0])this.add(e,arguments[0][e],arguments[1]);else(Array.isArray(e)?e:[e]).forEach(function(e){this[e]=this[e]||[],t&&this[e][r?"unshift":"push"](t)},this)}run(e,t){this[e]=this[e]||[],this[e].forEach(function(e){e.call(t&&t.context?t.context:t,t)})}};Object.assign(s,{hooks:o,plugins:new class{constructor(e){this.jsep=e,this.registered={}}register(...e){e.forEach(e=>{if("object"!=typeof e||!e.name||!e.init)throw new Error("Invalid JSEP plugin format");this.registered[e.name]||(e.init(this.jsep),this.registered[e.name]=e)})}}(s),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},right_associative:new Set,additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),s.max_unop_len=s.getMaxKeyLen(s.unary_ops),s.max_binop_len=s.getMaxKeyLen(s.binary_ops);var a=e=>new s(e).parse();Object.getOwnPropertyNames(s).forEach(e=>{void 0===a[e]&&"prototype"!==e&&(a[e]=s[e])}),a.Jsep=s;var h={name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let r=t.node,i=this.gobbleExpression();if(i||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let n=this.gobbleExpression();if(n||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:i,alternate:n},r.operator&&e.binary_ops[r.operator]<=.9){let i=r;for(;i.right.operator&&e.binary_ops[i.right.operator]<=.9;)i=i.right;t.node.test=i.right,i.right=t.node,t.node=r}}else this.throwError("Expected :")}})}};a.plugins.register(h);var l=["+","-","*","/","(",")","==","!=",">","<",">=","<=","and","or","!","%","^",","],c=["0","1","2","3","4","5","6","7","8","9","."],d=["sin","cos","tan","asin","acos","atan","atan2","sqrt","abs","log","exp","floor","ceil","round","min","max","random"];function p(e){return"string"==typeof e&&!isNaN(e)&&!isNaN(parseFloat(e))}function u(e,r,i="number"){let n,s,o="";for(let n=0;n<e.length;n++){let s=e[n];if("objType"in s&&"api"===s.objType){let e=JSON.parse(s.id),t=e[0],i=r.getUserAPI(t);if(void 0!==i&&"function"==typeof i.retrieveValue){let t=i.retrieveValue(e.slice(1));void 0!==t&&(o+=t)}continue}if("objType"in s&&"webhook"===s.objType){let e=JSON.parse(s.id),[t,i]=e,n=r.getUserWebhook(t);if(void 0!==n){let e=n.getParameterValue(i);void 0!==e&&(o+=e)}continue}if("objType"in s&&"aiAssistant"===s.objType){let e=r.openAIRealtime;if("objId"in s&&void 0!==s.objId){let t;if(r.scene.data.objects.traverse((e,r)=>{let i=r.events?.find(e=>e.id===s.objId);i&&(t=i)}),void 0!==t&&"AIAssistantListener"===t.data.type){let r=e?.computeAnalysisForListenerEvent(t.data);if(void 0!==r){o+=r;continue}}}o+=e?.voice??0;continue}if("id"in s){let a=e[n-1];if(n>0&&"id"in a)return void console.error("Two variables in a row",e);let h=r.getVariable(s.id),l=t.getDisplayedValue(h);"number"===i&&t.isTextValue(h)&&Array.isArray(h.textValue)&&1===h.textValue.length?l=parseFloat(l).toString():"boolean"===i&&t.isBoolean(h)?l=h?"true":"false":"boolean"===i&&t.isTextValue(h)&&!Array.isArray(h.textValue)&&(l='"'+l+'"'),o+=l;continue}"string"!==i?"and"!==s.name?"or"!==s.name?"True"!==s.name?"False"!==s.name?"boolean"!==i||p(s.name)||c.includes(s.name)||l.includes(s.name)||d.includes(s.name.replace(/\($/g,""))?o+=s.name:o+='"'+s.name+'"':o+="false":o+="true":o+="||":o+="&&":('"'!==s.name&&("+"!==s.name||s.escaped)&&(o+=s.name),"+"===s.name&&!s.escaped&&"\\"===o[o.length-1]&&(o=o.slice(0,-1)+s.name))}if("string"===i)return o;if(0===e.length){if("number"===i)return 0;if("boolean"===i)return!1}try{n=a(o)}catch(e){return void console.error(o,e)}try{s=f(n)}catch(e){console.error(o,n,e)}return s}function f(e){switch(e.type){case"BinaryExpression":switch(e.operator){case"==":return Number(f(e.left)===f(e.right));case"!=":return Number(f(e.left)!==f(e.right));case">":return Number(f(e.left)>f(e.right));case">=":return Number(f(e.left)>=f(e.right));case"<":return Number(f(e.left)<f(e.right));case"<=":return Number(f(e.left)<=f(e.right));case"+":return f(e.left)+f(e.right);case"-":return f(e.left)-f(e.right);case"*":return f(e.left)*f(e.right);case"/":return f(e.left)/f(e.right);case"%":return f(e.left)%f(e.right);case"&&":return f(e.left)&&f(e.right);case"||":return f(e.left)||f(e.right);case"^":return Math.pow(f(e.left),f(e.right));default:throw new Error("Unknown operator: "+e.operator)}case"UnaryExpression":switch(e.operator){case"-":return-f(e.argument);case"!":return Number(!f(e.argument));default:throw new Error("Unknown operator: "+e.operator)}case"Identifier":throw new Error("Unknown identifier: "+e.name);case"Literal":return e.value;case"CallExpression":if("Identifier"===e.callee.type){if("random"===e.callee.name){let t=0,r=1;if(e.arguments.length>=1)try{t=f(e.arguments[0])}catch(e){console.warn(e)}if(e.arguments.length>=2)try{r=f(e.arguments[1])}catch(e){console.warn(e)}return t=Math.min(r,t),r=Math.max(r,t),t+Math.random()*(r-t)}return Math[e.callee.name].apply(null,e.arguments.map(f))}throw new Error("Unknown node");default:throw new Error("Unknown node type: "+e.type)}}a.addBinaryOp("^",11,!0);var b={mousehover:!0,scroll:!0,dragdrop:!0,tracking:!0,resize:!0,conditional:!0,variables:!0,"api-services":!0,"ai-assistant":!0,textinputs:!0,audio:!0,video:!0,"create-destroy":!0,"scene-transition":!0,timeline:!0,transitions:!0,"misc-actions":!0},g=Object.keys(b),E={MouseHover:"mousehover",Scroll:"scroll",DragDrop:"dragdrop",Follow:"tracking",LookAt:"tracking",Resize:"resize",Conditional:"conditional",VariableChange:"variables",API:"api-services",WEBHOOK:"api-services",AIAssistantListener:"ai-assistant",AIAssistantTrigger:"ai-assistant"},x={Audio:"audio",Video:"video",Particles:"particles",Link:"misc-actions",Reset:"misc-actions",SwitchCamera:"misc-actions",ClearLocalStorage:"misc-actions",Create:"create-destroy",Destroy:"create-destroy",Transition:"transitions",Animation:"transitions",TimelineAnimation:"timeline",SceneTransition:"scene-transition",SetVariable:"variables",DynamicVariablePlay:"variables",UserAPI:"api-services"};function y(e){return"object"==typeof e&&null!==e}var m=class extends Error{};function _(e,t){void 0!==t&&t in b&&e.add(t)}function A(e,t){let r=new Set,i=e=>{if(void 0!==e){if(!Array.isArray(e))throw new m;for(let t of e){if(!y(t))throw new m;n(t.data)}}},n=e=>{if(!y(e)||"string"!=typeof e.type)throw new m;_(r,x[e.type]),"Conditional"===e.type&&(i(e.ifActions),i(e.elseActions))},s=e=>{if(!y(e)||"string"!=typeof e.type)throw new m;if(!0!==e.disabled){if(t?.(e.type),_(r,E[e.type]),i(e.actions),i(e.inActions),i(e.outActions),i(e.successActions),i(e.errorActions),void 0!==e.dragDropActions){if(!y(e.dragDropActions))throw new m;for(let t of Object.values(e.dragDropActions))i(t)}if(void 0!==e.gameActions){if(!y(e.gameActions))throw new m;for(let t of Object.values(e.gameActions))i(t)}if(void 0!==e.breakpoints){if(!Array.isArray(e.breakpoints))throw new m;for(let t of e.breakpoints){if(!y(t)||!y(t.data))throw new m;i(t.data.actions)}}}},o=e=>{if(!y(e))throw new m;(e=>{let t=e.events;if(void 0!==t)if(Array.isArray(t))for(let e of t){if(!y(e))throw new m;s(e.data)}else{if(!y(t))throw new m;for(let e of Object.values(t))s(e)}})(e),"Mesh"===e.type&&y(e.geometry)&&"InputGeometry"===e.geometry.type&&r.add("textinputs"),"Page"===e.type&&y(e.uiScene)&&a(e.uiScene.objects)},a=e=>{if(!y(e)||"function"!=typeof e.traverse)throw new m;e.traverse((e,t)=>{o(t)})},h=e=>{if(!y(e))throw new m;void 0!==e.data&&o(e.data);let t=e.children;if(void 0!==t){if(!Array.isArray(t))throw new m;for(let e of t)h(e)}};try{a(e.scene.objects);let t=e.shared;if(void 0!==t){if(!y(t))throw new m;let e=t.variables;if(void 0!==e){if(!Array.isArray(e))throw new m;for(let t of e){if(!y(t)||!y(t.data))throw new m;"dynamicVariableType"in t.data&&r.add("variables")}}let i=t.userAPIs;if(void 0!==i){if(!y(i))throw new m;for(let e of Object.values(i)){let t=y(e)?e.integration:void 0;y(t)&&"VoiceAssistant"===t.type?r.add("ai-assistant"):r.add("api-services")}}let n=t.userWebhooks;if(void 0!==n){if(!y(n))throw new m;Object.keys(n).length>0&&r.add("api-services")}let s=t.lib;if(void 0!==s){if(!y(s))throw new m;let e=s.components;if(void 0!==e){if(!y(e))throw new m;for(let t of Object.values(e)){if(!y(t))throw new m;void 0!==t.asset&&h(t.asset)}}}}}catch{return new Set(g)}return r}function C(e,t){if(void 0===t)return!0;if(0===t.expression.length)return!1;let r=u(t.expression,e,"boolean");return t.negate?!r:!!r}function O(t,n,s,o,a,h,l){let c={Audio:[],Video:[],Particles:[],Link:[],Destroy:[],Create:[],Reset:[],Transition:[],TimelineAnimation:[],SwitchCamera:[],Animation:[],SceneTransition:[],SetVariable:[],DynamicVariablePlay:[],ClearLocalStorage:[],UserAPI:[]},d=n=>({id:p,data:u})=>{try{if("Conditional"===u.type)return void(r[t.type].includes("Conditional")&&(u.ifActions.forEach(d({expression:u.condition,negate:!1})),u.elseActions.forEach(d({expression:u.condition,negate:!0}))));if(!r[t.type].includes(u.type))return;let f=function(e){return i.get(e)}(u.type);if(void 0===f)return void e(x[u.type]??"misc-actions",`a "${u.type}" action`);let b=f({id:p,data:u,object:h,page:s,shared:o,eventManager:a,eventType:t.type,actionCondition:n,runModeOverride:l});null!=b&&u.type in c&&c[u.type].push(b)}catch(e){}};return n.forEach(d()),c}function w(e){Object.values(e).forEach(e=>{e.forEach(e=>{"function"==typeof e.dispose&&e.dispose()})})}export{u as a,n as b,E as c,A as d,C as e,O as f,w as g};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as n}from"./runtime-chunk-
|
|
1
|
+
import{h as n}from"./runtime-chunk-QYZPTNBH.js";function e(o){if(o.component){let t=o.component.instances.indexOf(o);t>=0&&o.component.instances.splice(t,1);for(let t of o.children)n.is(t)&&e(t)}}export{e as a};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t,b as e}from"./runtime-chunk-
|
|
1
|
+
import{a as t,b as e}from"./runtime-chunk-NAJO6T26.js";import{Ec as s,Fc as r,Sc as a,Xe as i}from"./runtime-chunk-BVVSZMXD.js";var o=new r(1,1,1),m=new r,d=new r,u=new s,c=class extends(t(i)){constructor(t,e=15){super(e),this.object=t,this.dummy=new a,this.object.updateMatrixWorld(),this.name=`EmptyObjectHelper: ${t.uuid}`,this.matrix=this.dummy.matrixWorld,this.matrixAutoUpdate=!1,this.object.isBone&&(this.visible=!1)}raycast(t,s){e(this.object,c.geometryHelper,t,s,!1,this.dummy)}update(){}updateMatrix(){}updateMatrixWorld(t){this.object.matrixWorld.decompose(m,u,d),this.matrix.compose(m,u,o),super.updateMatrixWorld(t)}updateWorldMatrix(t,e){}};export{c as a};
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./runtime-chunk-
|
|
1
|
+
import{a as t}from"./runtime-chunk-LUASUHYM.js";import{d as e}from"./runtime-chunk-NAJO6T26.js";import{Sc as s}from"./runtime-chunk-BVVSZMXD.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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e,g as t,j as r}from"./runtime-chunk-PLKRHTT5.js";import{a,b as n}from"./runtime-chunk-ST4VJ5DF.js";import{c as i,e as s,f as o}from"./runtime-chunk-N473U2V2.js";import{a as l}from"./runtime-chunk-4UHPUSEP.js";import{b as u}from"./runtime-chunk-DMRFHNRP.js";import{U as d,Y as c,Z as p,da as h,ea as f,h as g}from"./runtime-chunk-YURN6PI7.js";import{v as m}from"./runtime-chunk-QYZPTNBH.js";import{d as b,e as y}from"./runtime-chunk-RTLL6WIB.js";import{d as v,e as w}from"./runtime-chunk-2PT2WH66.js";import{A as S,F as j,G as V,L as A,M,N as D,O as R,P as k,Q as x,ba as E,ka as O,na as P,y as B,z as N}from"./runtime-chunk-AIWIOLR6.js";import{Cc as C,Dc as I,Ec as F,Fc as G,Oc as T,Pc as q,Tc as z}from"./runtime-chunk-BVVSZMXD.js";var L=Math.fround,W=[.01,100],U=[.01,1e4],H=[.01,1e3],Q=[.01,1e3];function Y(e,[t,r]){return Math.min(Math.max(e,t),r)}function Z(e,t,r,a,n){e=Y(e,W),t=Y(t,U),r=Y(r,H),a=Y(a,Q);let i=Math.sqrt(t/e),s=r/(2*Math.sqrt(t*e)),o=s<1?i*Math.sqrt(1-s*s):0,l=s<1?(s*i-a)/o:-a+i;return e=>{let t=void 0!==n?n*e:e;return t=s<1?Math.exp(-t*s*i)*(1*Math.cos(o*t)+l*Math.sin(o*t)):(1+l*t)*Math.exp(-t*i),0===e||1===e?e:1-t}}var J=L(.001),K=L(1e-7),X=L(.1);function $(e,t){return L(L(1-L(3*t))+L(3*e))}function _(e,t){return L(L(3*t)-L(6*e))}function ee(e){return L(3*e)}function te(e,t,r){return L(L(L(L(L($(t,r)*e)+_(t,r))*e)+ee(t))*e)}function re(e,t,r){let a=L(L(L(3*$(t,r))*e)*e),n=L(L(2*_(t,r))*e);return L(L(a+n)+ee(t))}var ae=e=>e;function ne(e,t,r,a){if(e=L(e),t=L(t),r=L(r),a=L(a),e<0||e>1||r<0||r>1||e===t&&r===a)return ae;let n=new Float32Array(11);for(let t=0;t<11;t++)n[t]=te(L(t*X),e,r);return i=>0===(i=L(i))||1===i?i:te((t=>{let a=0,i=1;for(;10!==i&&n[i]<=t;)a=L(a+X),i+=1;i-=1;let s=L(L(t-n[i])/L(n[i+1]-n[i])),o=L(a+L(s*X)),l=re(o,e,r);return l>=J?function(e,t,r,a){for(let n=0;n<4;n++){let n=re(t,r,a);if(0===n)return t;let i=L(te(t,r,a)-e);t=L(t-L(i/n))}return t}(t,o,e,r):0===l?o:function(e,t,r,a,n){let i,s=0,o=0;do{s=L(t+L(L(r-t)/2)),i=L(te(s,a,n)-e),i>0?r=s:t=s,o+=1}while(Math.abs(i)>K&&o<10);return s}(t,a,L(a+X),e,r)})(i),t,a)}var ie=L(1.70158);function se(e,t,r){switch(e.easing){case 0:default:return r;case 1:return ne(.25,.1,.25,1)(r);case 2:return ne(.42,0,1,1)(r);case 3:return ne(0,0,.58,1)(r);case 4:return ne(.42,0,.58,1)(r);case 7:return ne(.25,1,.5,1)(r);case 8:return Math.floor(r);case 5:{let{control1:t,control2:a}=e;return t&&a?ne(t[0],t[1],a[0],a[1])(r):r}case 6:{let{mass:a,stiffness:n,damping:i,velocity:s}=e;return void 0===a||void 0===n||void 0===i||void 0===s?r:L(Z(a,n,i,s,t)(r))}}}L(ie+1);var oe=Math.fround,le=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=function(e,t){if(6!==e.easing)return t;let{mass:r,stiffness:a,damping:n,velocity:i}=e;return void 0===r||void 0===a||void 0===n||void 0===i?t:function(e,t,r,a){let n=.16666666666666666,i=0,s=0,o=Z(e,t,r,a);for(let e=0;e<1e5;e++)if(i+=n,1===o(i)){if(s+=1,s>=16)break}else s=0;return L(i*n)}(r,a,n,i)}(e.ease,oe(e.duration/1e3)),this.delay=oe(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?.()}stop(){this.isPlaying=!1}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=oe(t-r);let i=0===this.duration?1:Math.min(Math.max(oe(t/this.duration),0),1);if(this.lerp(i),1!==i)return;let s=this.actualDelayDirection;if("end"===s||"start-end"===s){if(t<oe(this.duration+this.delay))return;this.endTime=n(this.startTime,oe(oe(r+this.duration)+this.delay))}else this.endTime=n(this.startTime,oe(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=oe(1-e),e=this.ease(e),e=oe(1-e)):e=this.ease(e),this.apply(e)}ease(e){return se(this.config.ease,this.duration,e)}},{degToRad:ue,radToDeg:de}=C,ce=new G,pe=new G,he=new F;function fe(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=C.lerp(l,u,r);t[e]=i?Math.trunc(a):a},start:()=>{t[e]=l},end:()=>{t[e]=u}}:void 0}function ge(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=C.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 me(e,t,r){return t.forEach((t,a)=>{e.setComponent(a,"string"==typeof t?Number(r.getVariable(t)??0):t)}),e}function be(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?me(new G,i,n):o.clone(),u=me(new G,s,n);return l.equals(u)?void 0:{update:e=>{o.lerpVectors(l,u,e)},start:()=>{o.copy(l)},end:()=>{o.copy(u)}}}function ye(e,t,r){return t.forEach((t,a)=>{e.setComponent(a,"string"==typeof t?Number(r.getVariable(t)??0):t)}),e}function ve(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 I),u=o instanceof I?o:(new I).fromArray(o),d=i?ye(new I,i,n):u.clone(),c=ye(new I,s,n);return d.equals(c)?void 0:{update:r=>{u.lerpVectors(d,c,r),l&&(t[e]=u.toArray())},start:()=>{u.copy(d),l&&(t[e]=u.toArray())},end:()=>{u.copy(c),l&&(t[e]=u.toArray())}}}function we(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 g(o.r,o.g,o.b,o.a),u=i?"string"==typeof i?n.getColor(i).clone():new g(i.r,i.g,i.b,i.a):l.clone(),d="string"==typeof s?n.getColor(s).clone():new g(s.r,s.g,s.b,s.a);return u.equals(d)?void 0:{update:r=>{l.lerpColors(u,d,r);let a=C.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 Se(e,t,r,a,n){return"number"==typeof t[e]?fe(e,t,r??{},a,n):Array.isArray(t[e])?ge(e,t,r??{},a,n):void 0}function je(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 Ve(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]=C.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)=>C.lerp(e[r],s[r],a))}}return n}function Ae(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]];S.isEqual(t,r)||n.push({update:a=>{i[e].fromArray(S.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]=C.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,C.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 I)return function(e,t,r,a){if(!e.hasValue(a)||!(a in r))return;let n=e.getValue(a),i=t?(new I).fromArray(t[a]):n.clone(),s=(new I).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 G)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?me(new G,s,n):i.clone(),u=me(new G,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 g)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 z).setRGB(i.r,i.g,i.b):o.clone(),u="string"==typeof s?n.color(s).clone():new g(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 z)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 z).setRGB(i.r,i.g,i.b):o.clone(),u="string"==typeof s?n.color(s).clone():(new z).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"){if(!e.hasValue(a)||!(a in r))return;let n=e.getNode("rotation"),i=t?.[a]?.rotation??0,s=r[a]?.rotation??0;if(n&&i!==s)return{update:e=>{n.value=C.lerp(i,s,e)*C.DEG2RAD},start:()=>{n.value=i*C.DEG2RAD},end:()=>{n.value=s*C.DEG2RAD}};let o=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(!o)return;let l=t?t[a]:o,u=r[a],d=[...l.repeat],c=[...l.offset],p=[...u.repeat],h=[...u.offset],f=l.rotation??0,g=u.rotation??0;return B.isEqual(d,p)&&B.isEqual(c,h)&&f===g?void 0:{update:e=>{o.repeat=B.lerp(d,p,e),o.offset=B.lerp(c,h,e),o.rotation=C.lerp(f,g,e),o.updateMatrix()},start:()=>{o.repeat=[...d],o.offset=[...c],o.rotation=f,o.updateMatrix()},end:()=>{o.repeat=[...p],o.offset=[...h],o.rotation=g,o.updateMatrix()}}}(e,t,r,a)}}}function Me(e,t,r,a){let n=[],i=d(r,a)||!!t.layers&&d(t,a);n.push(function(e,t){return{update:()=>{e.transparent=t}}}(e,i)),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);(c(i?.noiseStrength)||c(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=p[i.type]??[],l=i.getNames().filter(e=>!o.includes(e)&&!E.some(t=>e.includes(t)));for(let t of l)try{let r=Ae(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 De(e,t,r,a,n,i){let s=Ae(t,r,a,e,i);!s||(Array.isArray(s)?s.forEach(e=>e.update(n)):s.update(n))}new q;var Re=new G,ke=new q;var xe=[["radial",M],["linear",D],["grid",R],["toObject",k],["randomnessObject",x]];function Ee(e,t,r,a){if(!e)return{};let n=Ve(["count"],t,r,a);void 0!==n.count&&(n.count=Math.trunc(n.count));for(let[i,s]of xe){if(!e[i])continue;let o=Ve(s,t[i],r[i],a);Object.keys(o).length&&(n[i]=o)}return n}function Oe(e,t){if(e){void 0!==t.count&&(e.count=t.count);for(let[r]of xe){let a=t[r];a&&je(e[r],a)}}}function Pe(a,n,d,c,p){let g=[];return a.data.visible&&g.push(...function(e,t,r,a,n){let i,l,u,d,c,p,h,f,g=[];if(w(e)?(i=ve("position",e,t,r,n),i&&g.push(i),u=fe("rotation",e,t,r,n),u&&g.push(u),d=ve("shear",e,t,r,n),d&&g.push(d)):(f={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=fe("slide",f,t.pathSnapping??e.updatedPathSnapping??e.dataPatched.pathSnapping,r.pathSnapping??e.dataPatched.pathSnapping,n),p&&g.push(p),h=fe("offset",f,t.pathSnapping??e.updatedPathSnapping??e.dataPatched.pathSnapping,r.pathSnapping??e.dataPatched.pathSnapping,n),h&&g.push(h),!p&&!h&&(i=be("position",e,t,r,n),i&&g.push(i),l=be("scale",e,t,r,n),l&&g.push(l),u=function(e,t,r,a,n){let i=t?.rotation?t.rotation.map(e=>("string"==typeof e?Number(n.getVariable(e)??0):e)*C.DEG2RAD):void 0,s=r.rotation?.map(e=>("string"==typeof e?Number(n.getVariable(e)??0):e)*C.DEG2RAD);if(!s)return;let o=i?(new G).fromArray(i):(new G).setFromEuler(e.rotation),l=(new G).fromArray(s);if(o.equals(l))return;let u=Re.subVectors(l,o);if(a&&u.toArray().every(e=>Math.abs(e)<2*Math.PI)){let t=(new F).setFromEuler(ke.setFromVector3(o)),r=(new F).setFromEuler(ke.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=>{Re.lerpVectors(o,l,t),e.rotation.setFromVector3(Re)},start:()=>{e.rotation.setFromVector3(o)},end:()=>{e.rotation.setFromVector3(l)}}}(e,t,r,a,n),u&&g.push(u),c=function(e,t,r,a){let n=r[e]?r[e]:void 0,i=a[e];if(!i)return;let s=t[e],o=n?(new T).fromArray(n):s.clone(),l=new G,u=new F,d=new G;o.decompose(l,u,d);let c=(new T).fromArray(i),p=new G,h=new F,f=new G;return c.decompose(p,h,f),o.equals(c)?void 0:{update:e=>{he.slerpQuaternions(u,h,e),ce.lerpVectors(l,p,e),pe.lerpVectors(d,f,e),s.compose(ce,he,pe)},start:()=>{s.compose(l,u,d)},end:()=>{s.compose(p,h,f)}}}("hiddenMatrix",e,t,r),c&&g.push(c))),i||l||u||c||p||h){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),s(e)&&o(e.parent)&&e.invalidateDownstreamBooleanData(!0),e.updatePathSnapping(Object.assign({},t.pathSnapping,f))};g.push({update:r,start:r,end:r})}return g}(a,n,d,p,c.shared)),w(a)?g.push(...function(a,n,i,s,o){let l,u,d,c,p,h,f,g,m,b,y,v,w,S,j,V=[];if("width"in a&&(l=fe("width",a,n,i,o),l&&V.push(l)),"height"in a&&(u=fe("height",a,n,i,o),u&&V.push(u)),a instanceof e||a instanceof r){let t={...n.fill},r={...i.fill};void 0!==t.enabled&&t.enabled!==r.enabled&&(V.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=we("color",a.fill,t,r,o),d&&V.push(d)}if(a instanceof e){let t={...n.stroke},r={...i.stroke};(t.enabled||r.enabled)&&(V.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}})),c=we("color",a.stroke,t,r,o),c&&V.push(c),p=fe("thickness",a.stroke,t,r,o),p&&V.push(p)}if(a instanceof e){let t={...n.dropShadow},r={...i.dropShadow};(t.enabled||r.enabled)&&(V.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=we("color",a.dropShadow,t,r,o),h&&V.push(h),f=fe("blurRadius",a.dropShadow,t,r,o),f&&V.push(f),m=fe("spread",a.dropShadow,t,r,o),m&&V.push(m),g=ve("offset",a.dropShadow,t,r,o),g&&V.push(g)}if(a instanceof e){let t={...n.innerShadow},r={...i.innerShadow};(t.enabled||r.enabled)&&(V.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=we("color",a.innerShadow,t,r,o),b&&V.push(b),y=fe("blurRadius",a.innerShadow,t,r,o),y&&V.push(y),w=fe("spread",a.innerShadow,t,r,o),w&&V.push(w),v=ve("offset",a.innerShadow,t,r,o),v&&V.push(v)}if(a instanceof e||a instanceof r){let t={...n.backgroundBlur},r={...i.backgroundBlur};(t.enabled||r.enabled)&&(V.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})),S=fe("radius",a.backgroundBlur,t,r,o),S&&V.push(S)}if(a instanceof e){let t={...n.layerBlur},r={...i.layerBlur};(t.enabled||r.enabled)&&(V.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=fe("radius",a.layerBlur,t,r,o),j&&V.push(j)}if(a instanceof r||a instanceof t){let e=ge("cornerRadius",a,n,i,o);e&&V.push(e)}return V}(a,n,d,0,c.shared)):(a.data.visible&&g.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;A.forEach(e=>{let t;t="count"===e?fe("count",i.parameters,s,o,a.shared,!0):Se(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=Se(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 D.forEach(e=>{let t=Se(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 R.forEach(e=>{let t;t="count"===e?ge(e,o,n??{},i,a,!0):Se(e,o,n??{},i,a),t&&s.push(t)}),s}(i,s,o,a.shared);d?.length&&n.push(...d);let c=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 k.forEach(e=>{let t;t="count"===e?fe(e,o,n??{},i,a,!0):Se(e,o,n??{},i,a),t&&s.push(t)}),s}(i,s,o,a.shared);c?.length&&n.push(...c);let p=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 x.forEach(e=>{let t=Se(e,o,n??{},i,a);t&&s.push(t)}),s}(i,s,o,a.shared);return p?.length&&n.push(...p),n.length&&n.push({update:()=>{i.update(a)}}),n}(a,n,d,c)),a instanceof m?(a instanceof f&&a.data.visible&&g.push(...function(e,t,r,a){let n=[];if(!("geometry"in r))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.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(N.isEqual(n,i))return;let s=[];return s.push({update:t=>{e.updateGeometryInteractions({scaleBaked:[C.lerp(n[0],i[0],t),C.lerp(n[1],i[1],t),C.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={};if(Object.assign(t,y(i,P),y(s,P)),P.forEach(e=>{let r=Se(e,t,s,o,a.shared);r&&n.push(r)}),v(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 O.forEach(e=>{let t=Se(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,c)),a.data.visible&&!(a instanceof h&&a.materialOverride)&&g.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(...Me(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(...Me(e.material,i,s,a))}return n}(a,n,d,c.shared))):i.is(a)?a.data.visible&&g.push(...function(e,t,r,a){let n=[];if(void 0!==r.intensity){let i=fe("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 z).setRGB(i.r,i.g,i.b):o.clone(),u="string"==typeof s?n.getColor(s).clone():(new z).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,c.shared)):a instanceof l&&g.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=C.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=fe("targetOffset",e,t,r,a);i&&n.push(i)}return n}(a,n,d,c.shared))),g.length?{update:e=>{g.forEach(t=>t.update(e))},start:e=>{g.forEach(t=>t.start?.(e))},end:e=>{g.forEach(t=>t.end?.(e))}}:void 0}var Be={type:"beginState"};function Ne(e){if(5===e.easing){let{control1:t,control2:r}=e;return{easing:5,control1:t??V.defaultData.control1,control2:r??V.defaultData.control2}}if(6===e.easing){let{mass:t,stiffness:r,damping:a,velocity:n}=e;return{easing:6,mass:t??j.defaultData.mass,stiffness:r??j.defaultData.stiffness,damping:a??j.defaultData.damping,velocity:n??j.defaultData.velocity}}return{easing:e.easing}}function Ce(e){return{delay:e.delay,delayDirection:e.delayDirection??"start-end",direction:e.direction??"normal",repeat:e.repeat}}var Ie={type:"completeState",isfromEntity:!1};function Fe(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 Ge=class{constructor(e,t,r,a,n,i,s,o={}){var l;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.builtReversed=!1,this.startStateId=null,this.buildCallback=()=>{this.builtReversed=this.runner.isReversed,this.startStateId=w(this.object)?null:this.object.transitionState.state,this.callback=Pe(this.object,{},this.end.data,{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 le({duration:(l=a).duration,ease:Ne(l),...Ce(l)},this.onChange,this.buildCallback),this.rebind()}rebind(){let{fromRef:e,toRef:t}=this;if(void 0===e){let e=Fe(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=Fe(this.object,e);if(!t)throw new Error("Missing property");this.from=t}if(void 0===t)throw new Error("Missing property");let r=Fe(this.object,t);if(!r)throw new Error("Missing property");this.to=r,this.buildCallback()}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 l&&e.dispatchEvent(t?Ie:Be)}),t?this.hooks.onComplete?.(r):this.hooks.onBegin?.(r))}};export{se as a,le as b,Ve as c,Ee as d,Oe as e,De as f,Be as g,Ne as h,Ce as i,Ie as j,Fe as k,Ge as l};
|
|
Binary file
|
|
Binary file
|