@splinetool/runtime 2.0.3 → 2.0.4
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/hana-ui.js +46 -31
- package/build/hana-ui.js.br +0 -0
- package/build/hana-ui.js.gz +0 -0
- package/build/hana-ui.wasm +0 -0
- package/build/hana-ui.wasm.br +0 -0
- package/build/hana-ui.wasm.gz +0 -0
- package/build/runtime-aiAssistant-RMA2DMFU.js +1 -0
- package/build/runtime-aiAssistant-RMA2DMFU.js.br +0 -0
- package/build/runtime-aiAssistant-RMA2DMFU.js.gz +0 -0
- package/build/runtime-apiServices-KA4FEP5Y.js +1 -0
- package/build/runtime-apiServices-KA4FEP5Y.js.br +0 -0
- package/build/runtime-apiServices-KA4FEP5Y.js.gz +0 -0
- package/build/{runtime-audio-Y3GYW4YQ.js → runtime-audio-BQSRM3W2.js} +1 -1
- package/build/runtime-audio-BQSRM3W2.js.br +0 -0
- package/build/runtime-audio-BQSRM3W2.js.gz +0 -0
- package/build/{runtime-chunk-MVRGHRTL.js → runtime-chunk-36FZTFCC.js} +1 -1
- package/build/runtime-chunk-36FZTFCC.js.br +0 -0
- package/build/runtime-chunk-36FZTFCC.js.gz +0 -0
- package/build/{runtime-chunk-ZHNGVKGZ.js → runtime-chunk-3J5YHSQW.js} +1 -1
- package/build/runtime-chunk-3J5YHSQW.js.br +0 -0
- package/build/runtime-chunk-3J5YHSQW.js.gz +0 -0
- package/build/{runtime-chunk-32ZE2X4C.js → runtime-chunk-4I22JDL6.js} +1 -1
- package/build/runtime-chunk-4I22JDL6.js.br +0 -0
- package/build/runtime-chunk-4I22JDL6.js.gz +0 -0
- package/build/{runtime-chunk-Z5OH244S.js → runtime-chunk-5XUI4Z6R.js} +1 -1
- package/build/runtime-chunk-5XUI4Z6R.js.br +0 -0
- package/build/runtime-chunk-5XUI4Z6R.js.gz +0 -0
- package/build/runtime-chunk-6UUF5VIS.js +1 -0
- package/build/runtime-chunk-6UUF5VIS.js.br +0 -0
- package/build/runtime-chunk-6UUF5VIS.js.gz +0 -0
- package/build/{runtime-chunk-RAAW7WHN.js → runtime-chunk-CIBY4YG3.js} +1 -1
- package/build/runtime-chunk-CIBY4YG3.js.br +0 -0
- package/build/runtime-chunk-CIBY4YG3.js.gz +0 -0
- package/build/{runtime-chunk-XTKPUDRE.js → runtime-chunk-DKGQ6OYZ.js} +1 -1
- package/build/runtime-chunk-DKGQ6OYZ.js.br +0 -0
- package/build/runtime-chunk-DKGQ6OYZ.js.gz +0 -0
- package/build/{runtime-chunk-4FAMJWEB.js → runtime-chunk-DSJY3WL2.js} +1 -1
- package/build/runtime-chunk-DSJY3WL2.js.br +0 -0
- package/build/runtime-chunk-DSJY3WL2.js.gz +0 -0
- package/build/{runtime-chunk-W7THORYR.js → runtime-chunk-ESZD4IRS.js} +1 -1
- package/build/runtime-chunk-ESZD4IRS.js.br +0 -0
- package/build/runtime-chunk-ESZD4IRS.js.gz +0 -0
- package/build/{runtime-chunk-NGWM5WPD.js → runtime-chunk-GPACKOH2.js} +1 -1
- package/build/runtime-chunk-GPACKOH2.js.br +0 -0
- package/build/runtime-chunk-GPACKOH2.js.gz +0 -0
- package/build/{runtime-chunk-6UQ4Z4JG.js → runtime-chunk-I5QFGBIU.js} +1 -1
- package/build/runtime-chunk-I5QFGBIU.js.br +0 -0
- package/build/runtime-chunk-I5QFGBIU.js.gz +0 -0
- package/build/{runtime-chunk-EXHPAC6T.js → runtime-chunk-JNSHQPHC.js} +1 -1
- package/build/runtime-chunk-JNSHQPHC.js.br +0 -0
- package/build/runtime-chunk-JNSHQPHC.js.gz +0 -0
- package/build/{runtime-chunk-TQBPVLGB.js → runtime-chunk-LT4UVXE2.js} +1 -1
- package/build/runtime-chunk-LT4UVXE2.js.br +0 -0
- package/build/runtime-chunk-LT4UVXE2.js.gz +0 -0
- package/build/{runtime-chunk-Y2GFSK5L.js → runtime-chunk-NTW4X3NC.js} +1 -1
- package/build/runtime-chunk-NTW4X3NC.js.br +0 -0
- package/build/runtime-chunk-NTW4X3NC.js.gz +0 -0
- package/build/runtime-chunk-OOC7YSI5.js +1 -0
- package/build/runtime-chunk-OOC7YSI5.js.br +0 -0
- package/build/runtime-chunk-OOC7YSI5.js.gz +0 -0
- package/build/runtime-chunk-QVC5UDJO.js +1 -0
- package/build/runtime-chunk-QVC5UDJO.js.br +0 -0
- package/build/runtime-chunk-QVC5UDJO.js.gz +0 -0
- package/build/runtime-chunk-R7NC6CZZ.js +1 -0
- package/build/runtime-chunk-R7NC6CZZ.js.br +0 -0
- package/build/runtime-chunk-R7NC6CZZ.js.gz +0 -0
- package/build/{runtime-chunk-D2IFC55F.js → runtime-chunk-RF63UVAU.js} +1 -1
- package/build/runtime-chunk-RF63UVAU.js.br +0 -0
- package/build/runtime-chunk-RF63UVAU.js.gz +0 -0
- package/build/{runtime-chunk-MC3OVJQU.js → runtime-chunk-SL64ZYCB.js} +1 -1
- package/build/runtime-chunk-SL64ZYCB.js.br +0 -0
- package/build/runtime-chunk-SL64ZYCB.js.gz +0 -0
- package/build/{runtime-chunk-BCJEHBXX.js → runtime-chunk-TPKGBIJU.js} +1 -1
- package/build/runtime-chunk-TPKGBIJU.js.br +0 -0
- package/build/runtime-chunk-TPKGBIJU.js.gz +0 -0
- package/build/{runtime-chunk-ZULFQKQK.js → runtime-chunk-V5NUL7BL.js} +1 -1
- package/build/runtime-chunk-V5NUL7BL.js.br +1 -0
- package/build/runtime-chunk-V5NUL7BL.js.gz +0 -0
- package/build/{runtime-chunk-G5XH52BM.js → runtime-chunk-V7XDOE2W.js} +1 -1
- package/build/runtime-chunk-V7XDOE2W.js.br +0 -0
- package/build/runtime-chunk-V7XDOE2W.js.gz +0 -0
- package/build/{runtime-chunk-PXPQZ7SX.js → runtime-chunk-W4ZCHGLQ.js} +1 -1
- package/build/runtime-chunk-W4ZCHGLQ.js.br +0 -0
- package/build/runtime-chunk-W4ZCHGLQ.js.gz +0 -0
- package/build/runtime-chunk-WHKBOV2O.js +1 -0
- package/build/runtime-chunk-WHKBOV2O.js.br +0 -0
- package/build/runtime-chunk-WHKBOV2O.js.gz +0 -0
- package/build/{runtime-chunk-D6NWJJTR.js → runtime-chunk-WMWQXAOH.js} +1 -1
- package/build/runtime-chunk-WMWQXAOH.js.br +0 -0
- package/build/runtime-chunk-WMWQXAOH.js.gz +0 -0
- package/build/runtime-chunk-YFAATRJU.js +1 -0
- package/build/runtime-chunk-YFAATRJU.js.br +0 -0
- package/build/runtime-chunk-YFAATRJU.js.gz +0 -0
- package/build/{runtime-chunk-Q4H7PFTE.js → runtime-chunk-ZJPGZKPX.js} +1 -1
- package/build/runtime-chunk-ZJPGZKPX.js.br +0 -0
- package/build/runtime-chunk-ZJPGZKPX.js.gz +0 -0
- package/build/{runtime-chunk-SQKBNW2G.js → runtime-chunk-ZMXEX5NX.js} +1 -1
- package/build/runtime-chunk-ZMXEX5NX.js.br +0 -0
- package/build/runtime-chunk-ZMXEX5NX.js.gz +0 -0
- package/build/{runtime-classicRuntime-IFIIFBNS.js → runtime-classicRuntime-UOZ6RID5.js} +1 -1
- package/build/runtime-classicRuntime-UOZ6RID5.js.br +0 -0
- package/build/runtime-classicRuntime-UOZ6RID5.js.gz +0 -0
- package/build/runtime-cloners-DALMNZYL.js +1 -0
- package/build/runtime-cloners-DALMNZYL.js.br +0 -0
- package/build/runtime-cloners-DALMNZYL.js.gz +0 -0
- package/build/{runtime-components-LNJJ3QLB.js → runtime-components-IGNRKI6T.js} +1 -1
- package/build/runtime-components-IGNRKI6T.js.br +0 -0
- package/build/runtime-components-IGNRKI6T.js.gz +0 -0
- package/build/runtime-conditional-DCOFCW5I.js +1 -0
- package/build/runtime-conditional-DCOFCW5I.js.br +0 -0
- package/build/runtime-conditional-DCOFCW5I.js.gz +0 -0
- package/build/{runtime-createDestroy-DWI7C4WO.js → runtime-createDestroy-JLB7IIQL.js} +1 -1
- package/build/runtime-createDestroy-JLB7IIQL.js.br +0 -0
- package/build/runtime-createDestroy-JLB7IIQL.js.gz +0 -0
- package/build/{runtime-dragDrop-46CHKTIE.js → runtime-dragDrop-ERDSNA3S.js} +1 -1
- package/build/runtime-dragDrop-ERDSNA3S.js.br +0 -0
- package/build/runtime-dragDrop-ERDSNA3S.js.gz +0 -0
- package/build/runtime-gameControls-XKOQVZZC.js +1 -0
- package/build/runtime-gameControls-XKOQVZZC.js.br +0 -0
- package/build/runtime-gameControls-XKOQVZZC.js.gz +0 -0
- package/build/runtime-hair-EOZHA2BH.js +1 -0
- package/build/runtime-hair-EOZHA2BH.js.br +0 -0
- package/build/runtime-hair-EOZHA2BH.js.gz +0 -0
- package/build/{runtime-mergeStaticGeometries-O5XKFANJ.js → runtime-mergeStaticGeometries-4Y3LE3VX.js} +1 -1
- package/build/runtime-mergeStaticGeometries-4Y3LE3VX.js.br +0 -0
- package/build/runtime-mergeStaticGeometries-4Y3LE3VX.js.gz +0 -0
- package/build/{runtime-miscActions-IRARI4E6.js → runtime-miscActions-KIRLTM7C.js} +1 -1
- package/build/runtime-miscActions-KIRLTM7C.js.br +0 -0
- package/build/runtime-miscActions-KIRLTM7C.js.gz +0 -0
- package/build/runtime-mouseHover-WULIJFG2.js +1 -0
- package/build/runtime-mouseHover-WULIJFG2.js.br +0 -0
- package/build/runtime-mouseHover-WULIJFG2.js.gz +0 -0
- package/build/{runtime-particles-INK4LA4P.js → runtime-particles-NNV35DLD.js} +1 -1
- package/build/runtime-particles-NNV35DLD.js.br +0 -0
- package/build/runtime-particles-NNV35DLD.js.gz +0 -0
- package/build/{runtime-paths-LRTW3RNL.js → runtime-paths-RRXZ3PXM.js} +1 -1
- package/build/runtime-paths-RRXZ3PXM.js.br +0 -0
- package/build/runtime-paths-RRXZ3PXM.js.gz +0 -0
- package/build/runtime-resize-V6LZSOZB.js +1 -0
- package/build/runtime-resize-V6LZSOZB.js.br +0 -0
- package/build/runtime-resize-V6LZSOZB.js.gz +0 -0
- package/build/{runtime-sceneTransition-X7RGRC3W.js → runtime-sceneTransition-CP5TI3VP.js} +1 -1
- package/build/runtime-sceneTransition-CP5TI3VP.js.br +0 -0
- package/build/runtime-sceneTransition-CP5TI3VP.js.gz +0 -0
- package/build/{runtime-scroll-VK7XXJPE.js → runtime-scroll-Q7VGS5NM.js} +1 -1
- package/build/runtime-scroll-Q7VGS5NM.js.br +0 -0
- package/build/runtime-scroll-Q7VGS5NM.js.gz +0 -0
- package/build/runtime-shapeBlends-UN7GGFRG.js +1 -0
- package/build/runtime-shapeBlends-UN7GGFRG.js.br +0 -0
- package/build/runtime-shapeBlends-UN7GGFRG.js.gz +0 -0
- package/build/{runtime-text-KC66JGLC.js → runtime-text-N6XLUSM2.js} +1 -1
- package/build/runtime-text-N6XLUSM2.js.br +0 -0
- package/build/runtime-text-N6XLUSM2.js.gz +0 -0
- package/build/{runtime-textInputs-Y7CREUMS.js → runtime-textInputs-IW2E6BNU.js} +1 -1
- package/build/runtime-textInputs-IW2E6BNU.js.br +0 -0
- package/build/runtime-textInputs-IW2E6BNU.js.gz +0 -0
- package/build/runtime-timeline-JA2JZIS7.js +1 -0
- package/build/runtime-timeline-JA2JZIS7.js.br +0 -0
- package/build/runtime-timeline-JA2JZIS7.js.gz +0 -0
- package/build/{runtime-tracking-FA45SGZJ.js → runtime-tracking-M57J2PGK.js} +1 -1
- package/build/runtime-tracking-M57J2PGK.js.br +0 -0
- package/build/runtime-tracking-M57J2PGK.js.gz +0 -0
- package/build/{runtime-transitions-A7UP5OMB.js → runtime-transitions-PELRDE7B.js} +1 -1
- package/build/runtime-transitions-PELRDE7B.js.br +0 -0
- package/build/runtime-transitions-PELRDE7B.js.gz +0 -0
- package/build/runtime-ui2d-IOB5Y76W.js +1 -0
- package/build/runtime-ui2d-IOB5Y76W.js.br +0 -0
- package/build/runtime-ui2d-IOB5Y76W.js.gz +0 -0
- package/build/{runtime-variables-U36KPJ5V.js → runtime-variables-Q6Q2JCGI.js} +1 -1
- package/build/runtime-variables-Q6Q2JCGI.js.br +0 -0
- package/build/runtime-variables-Q6Q2JCGI.js.gz +0 -0
- package/build/{runtime-vectorShapes-MA6PKTF5.js → runtime-vectorShapes-ISY7MWHY.js} +1 -1
- package/build/runtime-vectorShapes-ISY7MWHY.js.br +0 -0
- package/build/runtime-vectorShapes-ISY7MWHY.js.gz +0 -0
- package/build/{runtime-video-7GHZOZRJ.js → runtime-video-DUDXGADJ.js} +1 -1
- package/build/runtime-video-DUDXGADJ.js.br +0 -0
- package/build/runtime-video-DUDXGADJ.js.gz +0 -0
- package/build/runtime-webgpu-4ZCV5EAD.js +1 -0
- package/build/runtime-webgpu-4ZCV5EAD.js.br +0 -0
- package/build/runtime-webgpu-4ZCV5EAD.js.gz +0 -0
- package/build/runtime.cjs +325 -325
- package/build/runtime.js +1 -1
- package/build/runtime.js.br +0 -0
- package/build/runtime.js.gz +0 -0
- package/build/runtime.standalone.js +1 -1
- package/build/runtime.standalone.js.br +0 -0
- package/build/runtime.standalone.js.gz +0 -0
- package/build/runtime.standalone.webgl.js +1 -1
- package/build/runtime.standalone.webgl.js.br +0 -0
- package/build/runtime.standalone.webgl.js.gz +0 -0
- package/build/runtime.standalone.webgpu.js +1 -1
- package/build/runtime.standalone.webgpu.js.br +0 -0
- package/build/runtime.standalone.webgpu.js.gz +0 -0
- package/build/runtime.standalone.webgpu.micro.js +1 -1
- package/build/runtime.standalone.webgpu.micro.js.br +0 -0
- package/build/runtime.standalone.webgpu.micro.js.gz +0 -0
- package/build/runtime.standalone.webgpu.min.js +1 -1
- package/build/runtime.standalone.webgpu.min.js.br +0 -0
- package/build/runtime.standalone.webgpu.min.js.gz +0 -0
- package/package.json +1 -1
- package/build/runtime-aiAssistant-XJVJ7TQB.js +0 -1
- package/build/runtime-aiAssistant-XJVJ7TQB.js.br +0 -0
- package/build/runtime-aiAssistant-XJVJ7TQB.js.gz +0 -0
- package/build/runtime-apiServices-KAO5SQJZ.js +0 -1
- package/build/runtime-apiServices-KAO5SQJZ.js.br +0 -0
- package/build/runtime-apiServices-KAO5SQJZ.js.gz +0 -0
- package/build/runtime-audio-Y3GYW4YQ.js.br +0 -0
- package/build/runtime-audio-Y3GYW4YQ.js.gz +0 -0
- package/build/runtime-chunk-32ZE2X4C.js.br +0 -0
- package/build/runtime-chunk-32ZE2X4C.js.gz +0 -0
- package/build/runtime-chunk-4FAMJWEB.js.br +0 -0
- package/build/runtime-chunk-4FAMJWEB.js.gz +0 -0
- package/build/runtime-chunk-6UQ4Z4JG.js.br +0 -0
- package/build/runtime-chunk-6UQ4Z4JG.js.gz +0 -0
- package/build/runtime-chunk-BCJEHBXX.js.br +0 -0
- package/build/runtime-chunk-BCJEHBXX.js.gz +0 -0
- package/build/runtime-chunk-D2IFC55F.js.br +0 -0
- package/build/runtime-chunk-D2IFC55F.js.gz +0 -0
- package/build/runtime-chunk-D6NWJJTR.js.br +0 -0
- package/build/runtime-chunk-D6NWJJTR.js.gz +0 -0
- package/build/runtime-chunk-EXHPAC6T.js.br +0 -0
- package/build/runtime-chunk-EXHPAC6T.js.gz +0 -0
- package/build/runtime-chunk-G5XH52BM.js.br +0 -0
- package/build/runtime-chunk-G5XH52BM.js.gz +0 -0
- package/build/runtime-chunk-MC3OVJQU.js.br +0 -0
- package/build/runtime-chunk-MC3OVJQU.js.gz +0 -0
- package/build/runtime-chunk-MM75L5X4.js +0 -1
- package/build/runtime-chunk-MM75L5X4.js.br +0 -0
- package/build/runtime-chunk-MM75L5X4.js.gz +0 -0
- package/build/runtime-chunk-MVRGHRTL.js.br +0 -0
- package/build/runtime-chunk-MVRGHRTL.js.gz +0 -0
- package/build/runtime-chunk-NGWM5WPD.js.br +0 -0
- package/build/runtime-chunk-NGWM5WPD.js.gz +0 -0
- package/build/runtime-chunk-NRJDJMQZ.js +0 -1
- package/build/runtime-chunk-NRJDJMQZ.js.br +0 -0
- package/build/runtime-chunk-NRJDJMQZ.js.gz +0 -0
- package/build/runtime-chunk-PXPQZ7SX.js.br +0 -0
- package/build/runtime-chunk-PXPQZ7SX.js.gz +0 -0
- package/build/runtime-chunk-Q4H7PFTE.js.br +0 -0
- package/build/runtime-chunk-Q4H7PFTE.js.gz +0 -0
- package/build/runtime-chunk-QFGFABLH.js +0 -1
- package/build/runtime-chunk-QFGFABLH.js.br +0 -0
- package/build/runtime-chunk-QFGFABLH.js.gz +0 -0
- package/build/runtime-chunk-RAAW7WHN.js.br +0 -0
- package/build/runtime-chunk-RAAW7WHN.js.gz +0 -0
- package/build/runtime-chunk-SQKBNW2G.js.br +0 -0
- package/build/runtime-chunk-SQKBNW2G.js.gz +0 -0
- package/build/runtime-chunk-TQBPVLGB.js.br +0 -0
- package/build/runtime-chunk-TQBPVLGB.js.gz +0 -0
- package/build/runtime-chunk-U5ACSO5E.js +0 -1
- package/build/runtime-chunk-U5ACSO5E.js.br +0 -0
- package/build/runtime-chunk-U5ACSO5E.js.gz +0 -0
- package/build/runtime-chunk-W7THORYR.js.br +0 -0
- package/build/runtime-chunk-W7THORYR.js.gz +0 -0
- package/build/runtime-chunk-XTKPUDRE.js.br +0 -0
- package/build/runtime-chunk-XTKPUDRE.js.gz +0 -0
- package/build/runtime-chunk-XV2ZLRKD.js +0 -1
- package/build/runtime-chunk-XV2ZLRKD.js.br +0 -0
- package/build/runtime-chunk-XV2ZLRKD.js.gz +0 -0
- package/build/runtime-chunk-Y2GFSK5L.js.br +0 -0
- package/build/runtime-chunk-Y2GFSK5L.js.gz +0 -0
- package/build/runtime-chunk-Z5OH244S.js.br +0 -0
- package/build/runtime-chunk-Z5OH244S.js.gz +0 -0
- package/build/runtime-chunk-ZHNGVKGZ.js.br +0 -0
- package/build/runtime-chunk-ZHNGVKGZ.js.gz +0 -0
- package/build/runtime-chunk-ZLW3UWOA.js +0 -1
- package/build/runtime-chunk-ZLW3UWOA.js.br +0 -0
- package/build/runtime-chunk-ZLW3UWOA.js.gz +0 -0
- package/build/runtime-chunk-ZULFQKQK.js.br +0 -0
- package/build/runtime-chunk-ZULFQKQK.js.gz +0 -0
- package/build/runtime-classicRuntime-IFIIFBNS.js.br +0 -0
- package/build/runtime-classicRuntime-IFIIFBNS.js.gz +0 -0
- package/build/runtime-cloners-WEF7XIM4.js +0 -1
- package/build/runtime-cloners-WEF7XIM4.js.br +0 -2
- package/build/runtime-cloners-WEF7XIM4.js.gz +0 -0
- package/build/runtime-components-LNJJ3QLB.js.br +0 -0
- package/build/runtime-components-LNJJ3QLB.js.gz +0 -0
- package/build/runtime-conditional-3A423CXW.js +0 -1
- package/build/runtime-conditional-3A423CXW.js.br +0 -0
- package/build/runtime-conditional-3A423CXW.js.gz +0 -0
- package/build/runtime-createDestroy-DWI7C4WO.js.br +0 -0
- package/build/runtime-createDestroy-DWI7C4WO.js.gz +0 -0
- package/build/runtime-dragDrop-46CHKTIE.js.br +0 -0
- package/build/runtime-dragDrop-46CHKTIE.js.gz +0 -0
- package/build/runtime-gameControls-YA2YP4UH.js +0 -1
- package/build/runtime-gameControls-YA2YP4UH.js.br +0 -0
- package/build/runtime-gameControls-YA2YP4UH.js.gz +0 -0
- package/build/runtime-hair-XVWLJEZC.js +0 -1
- package/build/runtime-hair-XVWLJEZC.js.br +0 -3
- package/build/runtime-hair-XVWLJEZC.js.gz +0 -0
- package/build/runtime-mergeStaticGeometries-O5XKFANJ.js.br +0 -0
- package/build/runtime-mergeStaticGeometries-O5XKFANJ.js.gz +0 -0
- package/build/runtime-miscActions-IRARI4E6.js.br +0 -0
- package/build/runtime-miscActions-IRARI4E6.js.gz +0 -0
- package/build/runtime-mouseHover-3LVJJIFG.js +0 -1
- package/build/runtime-mouseHover-3LVJJIFG.js.br +0 -0
- package/build/runtime-mouseHover-3LVJJIFG.js.gz +0 -0
- package/build/runtime-particles-INK4LA4P.js.br +0 -0
- package/build/runtime-particles-INK4LA4P.js.gz +0 -0
- package/build/runtime-paths-LRTW3RNL.js.br +0 -0
- package/build/runtime-paths-LRTW3RNL.js.gz +0 -0
- package/build/runtime-resize-4OIVU46M.js +0 -1
- package/build/runtime-resize-4OIVU46M.js.br +0 -0
- package/build/runtime-resize-4OIVU46M.js.gz +0 -0
- package/build/runtime-sceneTransition-X7RGRC3W.js.br +0 -0
- package/build/runtime-sceneTransition-X7RGRC3W.js.gz +0 -0
- package/build/runtime-scroll-VK7XXJPE.js.br +0 -0
- package/build/runtime-scroll-VK7XXJPE.js.gz +0 -0
- package/build/runtime-shapeBlends-VLITROES.js +0 -1
- package/build/runtime-shapeBlends-VLITROES.js.br +0 -2
- package/build/runtime-shapeBlends-VLITROES.js.gz +0 -0
- package/build/runtime-text-KC66JGLC.js.br +0 -0
- package/build/runtime-text-KC66JGLC.js.gz +0 -0
- package/build/runtime-textInputs-Y7CREUMS.js.br +0 -0
- package/build/runtime-textInputs-Y7CREUMS.js.gz +0 -0
- package/build/runtime-timeline-KTMKRAZU.js +0 -1
- package/build/runtime-timeline-KTMKRAZU.js.br +0 -0
- package/build/runtime-timeline-KTMKRAZU.js.gz +0 -0
- package/build/runtime-tracking-FA45SGZJ.js.br +0 -0
- package/build/runtime-tracking-FA45SGZJ.js.gz +0 -0
- package/build/runtime-transitions-A7UP5OMB.js.br +0 -0
- package/build/runtime-transitions-A7UP5OMB.js.gz +0 -0
- package/build/runtime-ui2d-XLYMHVMW.js +0 -1
- package/build/runtime-ui2d-XLYMHVMW.js.br +0 -0
- package/build/runtime-ui2d-XLYMHVMW.js.gz +0 -0
- package/build/runtime-variables-U36KPJ5V.js.br +0 -0
- package/build/runtime-variables-U36KPJ5V.js.gz +0 -0
- package/build/runtime-vectorShapes-MA6PKTF5.js.br +0 -0
- package/build/runtime-vectorShapes-MA6PKTF5.js.gz +0 -0
- package/build/runtime-video-7GHZOZRJ.js.br +0 -0
- package/build/runtime-video-7GHZOZRJ.js.gz +0 -0
- package/build/runtime-webgpu-JPQ4VPBY.js +0 -1
- package/build/runtime-webgpu-JPQ4VPBY.js.br +0 -0
- package/build/runtime-webgpu-JPQ4VPBY.js.gz +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as t}from"./runtime-chunk-Q4H7PFTE.js";import"./runtime-chunk-RAAW7WHN.js";import{c as e,d as i,f as o,g as s,i as n,k as r,l as a}from"./runtime-chunk-QFGFABLH.js";import"./runtime-chunk-N2ZRGNPR.js";import{a as h}from"./runtime-chunk-VAVYZ35B.js";import{e as l,f as c,g as d}from"./runtime-chunk-FQNSP44B.js";import{a as m}from"./runtime-chunk-W7THORYR.js";import"./runtime-chunk-ZULFQKQK.js";import"./runtime-chunk-D6NWJJTR.js";import"./runtime-chunk-MC3OVJQU.js";import"./runtime-chunk-6UQ4Z4JG.js";import"./runtime-chunk-D2IFC55F.js";import{$ as p,G as u,N as y,a as g,p as f}from"./runtime-chunk-NRJDJMQZ.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{f as v,g as b}from"./runtime-chunk-MM75L5X4.js";import{h as x}from"./runtime-chunk-ZLW3UWOA.js";import"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-4KZXQGUQ.js";import{a as w}from"./runtime-chunk-Z5OH244S.js";import{a as P}from"./runtime-chunk-TZCHGFVF.js";import{Ka as M,La as E,ea as S,g as j,ua as A}from"./runtime-chunk-OW6T4XFV.js";import{Bc as T,Cc as D,Dc as k,Ec as C,Fc as O,Oc as z,Pc as R,Re as F,Xc as _,Zc as W,dd as X,ld as N}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var V=(t,e)=>{let i=e.x-t.x,o=e.y-t.y;return Math.sqrt(i*i+o*o)},L=t=>t*(Math.PI/180),I=new Map,Q=(t,e,i)=>{let o,s=e.split(/[ ,]+/g);for(let e=0;e<s.length;e+=1)o=s[e],t.addEventListener?t.addEventListener(o,i,!1):t.attachEvent&&t.attachEvent(o,i)},Z=(t,e,i)=>{let o,s=e.split(/[ ,]+/g);for(let e=0;e<s.length;e+=1)o=s[e],t.removeEventListener?t.removeEventListener(o,i):t.detachEvent&&t.detachEvent(o,i)},B=t=>(t.preventDefault(),t.type.match(/^touch/)?t.changedTouches:t),Y=()=>{if(!(typeof window>"u"))return{x:void 0!==window.pageXOffset?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft,y:void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop}},G=(t,e)=>{e.top||e.right||e.bottom||e.left?(t.style.top=e.top,t.style.right=e.right,t.style.bottom=e.bottom,t.style.left=e.left):(t.style.left=e.x+"px",t.style.top=e.y+"px")},q=(t,e,i)=>{let o=U(t);for(let t in o)if(Object.prototype.hasOwnProperty.call(o,t))if("string"==typeof e)o[t]=e+" "+i;else{let s="";for(let t=0,o=e.length;t<o;t+=1)s+=e[t]+" "+i+", ";o[t]=s.slice(0,-2)}return o},U=t=>{let e={};return e[t]="",["webkit","Moz","o"].forEach(function(i){e[i+t.charAt(0).toUpperCase()+t.slice(1)]=""}),e},H=(t,e)=>{for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},J=(t,e)=>{if(t.length)for(let i=0,o=t.length;i<o;i+=1)e(t[i]);else e(t)};typeof window<"u"&&(K="ontouchstart"in window,$=!!window.PointerEvent,tt=!!window.MSPointerEvent);var K,$,tt,et,it={start:"mousedown",move:"mousemove",end:"mouseup"},ot={};function st(){}$?et={start:"pointerdown",move:"pointermove",end:"pointerup, pointercancel"}:tt?et={start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:K?(et={start:"touchstart",move:"touchmove",end:"touchend, touchcancel"},ot=it):et=it,st.prototype.on=function(t,e){var i,o=this,s=t.split(/[ ,]+/g);o._handlers_=o._handlers_||{};for(var n=0;n<s.length;n+=1)i=s[n],o._handlers_[i]=o._handlers_[i]||[],o._handlers_[i].push(e);return o},st.prototype.off=function(t,e){var i=this;return i._handlers_=i._handlers_||{},void 0===t?i._handlers_={}:void 0===e?i._handlers_[t]=null:i._handlers_[t]&&i._handlers_[t].indexOf(e)>=0&&i._handlers_[t].splice(i._handlers_[t].indexOf(e),1),i},st.prototype.trigger=function(t,e){var i,o=this,s=t.split(/[ ,]+/g);o._handlers_=o._handlers_||{};for(var n=0;n<s.length;n+=1)i=s[n],o._handlers_[i]&&o._handlers_[i].length&&o._handlers_[i].forEach(function(t){t.call(o,{type:i,target:o},e)})},st.prototype.config=function(t){var e=this;e.options=e.defaults||{},t&&(e.options=((t,e)=>{let i={};for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&Object.prototype.hasOwnProperty.call(e,o)?i[o]=e[o]:Object.prototype.hasOwnProperty.call(t,o)&&(i[o]=t[o]);return i})(e.options,t))},st.prototype.bindEvt=function(t,e){var i=this;return i._domHandlers_=i._domHandlers_||{},i._domHandlers_[e]=function(){"function"==typeof i["on"+e]?i["on"+e].apply(i,arguments):console.warn('[WARNING] : Missing "on'+e+'" handler.')},Q(t,et[e],i._domHandlers_[e]),ot[e]&&Q(t,ot[e],i._domHandlers_[e]),i},st.prototype.unbindEvt=function(t,e){var i=this;return i._domHandlers_=i._domHandlers_||{},Z(t,et[e],i._domHandlers_[e]),ot[e]&&Z(t,ot[e],i._domHandlers_[e]),delete i._domHandlers_[e],this};var nt=st;function rt(t,e){return this.identifier=e.identifier,this.position=e.position,this.frontPosition=e.frontPosition,this.collection=t,this.defaults={size:100,threshold:.1,color:"white",fadeTime:250,dataOnly:!1,restJoystick:!0,restOpacity:1,mode:"dynamic",zone:document.body,lockX:!1,lockY:!1,shape:"circle"},this.config(e),"dynamic"===this.options.mode&&(this.options.restOpacity=0),this.id=rt.id,rt.id+=1,this.buildEl().stylize(),this.instance={el:this.ui.el,on:this.on.bind(this),off:this.off.bind(this),show:this.show.bind(this),hide:this.hide.bind(this),add:this.addToDom.bind(this),remove:this.removeFromDom.bind(this),destroy:this.destroy.bind(this),setPosition:this.setPosition.bind(this),resetDirection:this.resetDirection.bind(this),computeDirection:this.computeDirection.bind(this),trigger:this.trigger.bind(this),position:this.position,frontPosition:this.frontPosition,ui:this.ui,identifier:this.identifier,id:this.id,options:this.options},this.instance}rt.prototype=new nt,rt.constructor=rt,rt.id=0,rt.prototype.buildEl=function(t){return this.ui={},this.options.dataOnly||(this.ui.el=document.createElement("div"),this.ui.back=document.createElement("div"),this.ui.front=document.createElement("div"),this.ui.el.className="nipple collection_"+this.collection.id,this.ui.back.className="back",this.ui.front.className="front",this.ui.el.setAttribute("id","nipple_"+this.collection.id+"_"+this.id),this.ui.el.appendChild(this.ui.back),this.ui.el.appendChild(this.ui.front)),this},rt.prototype.stylize=function(){if(this.options.dataOnly)return this;var t=this.options.fadeTime+"ms",e=(()=>{let t=U("borderRadius");for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(t[e]="50%");return t})(),i=q("transition","opacity",t),o={};return o.el={position:"absolute",opacity:this.options.restOpacity,display:"block",zIndex:999},o.back={position:"absolute",display:"block",width:this.options.size+"px",height:this.options.size+"px",marginLeft:-this.options.size/2+"px",marginTop:-this.options.size/2+"px",background:"rgba(255, 255, 255, .4)",border:"solid 2px rgba(0, 0, 0, .1)"},o.front={width:this.options.size/2+"px",height:this.options.size/2+"px",position:"absolute",display:"block",marginLeft:-this.options.size/4+"px",marginTop:-this.options.size/4+"px",background:"rgba(255, 255, 255, .8)",border:"solid 2px rgba(0, 0, 0, .1)"},H(o.el,i),"circle"===this.options.shape&&H(o.back,e),H(o.front,e),this.applyStyles(o),this},rt.prototype.applyStyles=function(t){for(var e in this.ui)if(Object.prototype.hasOwnProperty.call(this.ui,e))for(var i in t[e])this.ui[e].style[i]=t[e][i];return this},rt.prototype.addToDom=function(){return this.options.dataOnly||document.body.contains(this.ui.el)||this.options.zone.appendChild(this.ui.el),this},rt.prototype.removeFromDom=function(){return this.options.dataOnly||!document.body.contains(this.ui.el)||this.options.zone.removeChild(this.ui.el),this},rt.prototype.destroy=function(){clearTimeout(this.removeTimeout),clearTimeout(this.showTimeout),clearTimeout(this.restTimeout),this.trigger("destroyed",this.instance),this.removeFromDom(),this.off(),this.ui=null,this.instance=null,this.collection=null,this.options=null},rt.prototype.show=function(t){var e=this;return e.options.dataOnly||(clearTimeout(e.removeTimeout),clearTimeout(e.showTimeout),clearTimeout(e.restTimeout),e.addToDom(),e.restCallback(),setTimeout(function(){e.ui.el.style.opacity=1},0),e.showTimeout=setTimeout(function(){e.trigger("shown",e.instance),"function"==typeof t&&t.call(this)},e.options.fadeTime)),e},rt.prototype.hide=function(t){var e=this;if(e.options.dataOnly)return e;if(e.ui.el.style.opacity=e.options.restOpacity,clearTimeout(e.removeTimeout),clearTimeout(e.showTimeout),clearTimeout(e.restTimeout),e.removeTimeout=setTimeout(function(){var i="dynamic"===e.options.mode?"none":"block";e.ui.el.style.display=i,"function"==typeof t&&t.call(e),e.trigger("hidden",e.instance)},e.options.fadeTime),e.options.restJoystick){let i=e.options.restJoystick,o={};o.x=!0===i||!1!==i.x?0:e.instance.frontPosition.x,o.y=!0===i||!1!==i.y?0:e.instance.frontPosition.y,e.setPosition(t,o)}return e},rt.prototype.setPosition=function(t,e){var i=this;i.frontPosition={x:e.x,y:e.y};var o=i.options.fadeTime+"ms",s={};s.front=q("transition",["top","left"],o);var n={front:{}};n.front={left:i.frontPosition.x+"px",top:i.frontPosition.y+"px"},i.applyStyles(s),i.applyStyles(n),i.restTimeout=setTimeout(function(){"function"==typeof t&&t.call(i),i.restCallback()},i.options.fadeTime)},rt.prototype.restCallback=function(){var t=this,e={};e.front=q("transition","none",""),t.applyStyles(e),t.trigger("rested",t.instance)},rt.prototype.resetDirection=function(){this.direction={x:!1,y:!1,angle:!1}},rt.prototype.computeDirection=function(t){var e,i,o,s=t.angle.radian,n=Math.PI/4,r=Math.PI/2;if(s>n&&s<3*n&&!t.lockX?e="up":s>-n&&s<=n&&!t.lockY?e="left":s>3*-n&&s<=-n&&!t.lockX?e="down":t.lockY||(e="right"),t.lockY||(i=s>-r&&s<r?"left":"right"),t.lockX||(o=s>0?"up":"down"),t.force>this.options.threshold){var a,h={};for(a in this.direction)Object.prototype.hasOwnProperty.call(this.direction,a)&&(h[a]=this.direction[a]);var l={};for(a in this.direction={x:i,y:o,angle:e},t.direction=this.direction,h)h[a]===this.direction[a]&&(l[a]=!0);if(l.x&&l.y&&l.angle)return t;(!l.x||!l.y)&&this.trigger("plain",t),l.x||this.trigger("plain:"+i,t),l.y||this.trigger("plain:"+o,t),l.angle||this.trigger("dir dir:"+e,t)}else this.resetDirection();return t};var at=rt;function ht(t,e){var i=this;i.nipples=[],i.idles=[],i.actives=[],i.ids=[],i.pressureIntervals={},i.manager=t,i.id=ht.id,ht.id+=1,i.defaults={zone:document.body,multitouch:!1,maxNumberOfNipples:10,mode:"dynamic",position:{top:0,left:0},catchDistance:200,size:100,threshold:.1,color:"white",fadeTime:250,dataOnly:!1,restJoystick:!0,restOpacity:1,lockX:!1,lockY:!1,shape:"circle",dynamicPage:!1,follow:!1},i.config(e),("static"===i.options.mode||"semi"===i.options.mode)&&(i.options.multitouch=!1),i.options.multitouch||(i.options.maxNumberOfNipples=1);let o=getComputedStyle(i.options.zone.parentElement);return o&&"flex"===o.display&&(i.parentIsFlex=!0),i.updateBox(),i.prepareNipples(),i.bindings(),i.begin(),i.nipples}ht.prototype=new nt,ht.constructor=ht,ht.id=0,ht.prototype.prepareNipples=function(){var t=this,e=t.nipples;e.on=t.on.bind(t),e.off=t.off.bind(t),e.options=t.options,e.destroy=t.destroy.bind(t),e.ids=t.ids,e.id=t.id,e.processOnMove=t.processOnMove.bind(t),e.processOnEnd=t.processOnEnd.bind(t),e.get=function(t){if(void 0===t)return e[0];for(var i=0,o=e.length;i<o;i+=1)if(e[i].identifier===t)return e[i];return!1}},ht.prototype.bindings=function(){var t=this;t.bindEvt(t.options.zone,"start"),t.options.zone.style.touchAction="none",t.options.zone.style.msTouchAction="none"},ht.prototype.begin=function(){var t=this,e=t.options;if("static"===e.mode){var i=t.createNipple(e.position,t.manager.getIdentifier());i.add(),t.idles.push(i)}},ht.prototype.createNipple=function(t,e){var i=this,o=i.manager.scroll,s={},n=i.options,r=i.parentIsFlex?o.x:o.x+i.box.left,a=i.parentIsFlex?o.y:o.y+i.box.top;if(t.x&&t.y)s={x:t.x-r,y:t.y-a};else if(t.top||t.right||t.bottom||t.left){var h=document.createElement("DIV");h.style.display="hidden",h.style.top=t.top,h.style.right=t.right,h.style.bottom=t.bottom,h.style.left=t.left,h.style.position="absolute",n.zone.appendChild(h);var l=h.getBoundingClientRect();n.zone.removeChild(h),s=t,t={x:l.left+o.x,y:l.top+o.y}}var c=new at(i,{color:n.color,size:n.size,threshold:n.threshold,fadeTime:n.fadeTime,dataOnly:n.dataOnly,restJoystick:n.restJoystick,restOpacity:n.restOpacity,mode:n.mode,identifier:e,position:t,zone:n.zone,frontPosition:{x:0,y:0},shape:n.shape});return n.dataOnly||(G(c.ui.el,s),G(c.ui.front,c.frontPosition)),i.nipples.push(c),i.trigger("added "+c.identifier+":added",c),i.manager.trigger("added "+c.identifier+":added",c),i.bindNipple(c),c},ht.prototype.updateBox=function(){this.box=this.options.zone.getBoundingClientRect()},ht.prototype.bindNipple=function(t){var e,i=this,o=function(t,o){e=t.type+" "+o.id+":"+t.type,i.trigger(e,o)};t.on("destroyed",i.onDestroyed.bind(i)),t.on("shown hidden rested dir plain",o),t.on("dir:up dir:right dir:down dir:left",o),t.on("plain:up plain:right plain:down plain:left",o)},ht.prototype.pressureFn=function(t,e,i){var o=this,s=0;clearInterval(o.pressureIntervals[i]),o.pressureIntervals[i]=setInterval(function(){var i=t.force||t.pressure||t.webkitForce||0;i!==s&&(e.trigger("pressure",i),o.trigger("pressure "+e.identifier+":pressure",i),s=i)}.bind(o),100)},ht.prototype.onstart=function(t){var e=this,i=e.options,o=t;return t=B(t),e.updateBox(),J(t,function(s){e.actives.length<i.maxNumberOfNipples?e.processOnStart(s):o.type.match(/^touch/)&&(Object.keys(e.manager.ids).forEach(function(i){if(Object.values(o.touches).findIndex(function(t){return t.identifier===i})<0){var s=[t[0]];s.identifier=i,e.processOnEnd(s)}}),e.actives.length<i.maxNumberOfNipples&&e.processOnStart(s))}),e.manager.bindDocument(),!1},ht.prototype.processOnStart=function(t){var e,i=this,o=i.options,s=i.manager.getIdentifier(t),n=t.force||t.pressure||t.webkitForce||0,r={x:t.pageX,y:t.pageY},a=i.getOrCreate(s,r);a.identifier!==s&&i.manager.removeIdentifier(a.identifier),a.identifier=s;var h=function(e){e.trigger("start",e),i.trigger("start "+e.id+":start",e),e.show(),n>0&&i.pressureFn(t,e,e.identifier),i.processOnMove(t)};if((e=i.idles.indexOf(a))>=0&&i.idles.splice(e,1),i.actives.push(a),i.ids.push(a.identifier),"semi"!==o.mode)h(a);else{if(!(V(r,a.position)<=o.catchDistance))return a.destroy(),void i.processOnStart(t);h(a)}return a},ht.prototype.getOrCreate=function(t,e){var i,o=this,s=o.options;return/(semi|static)/.test(s.mode)?(i=o.idles[0])?(o.idles.splice(0,1),i):"semi"===s.mode?o.createNipple(e,t):(console.warn("Coudln't find the needed nipple."),!1):i=o.createNipple(e,t)},ht.prototype.processOnMove=function(t){var e=this,i=e.options,o=e.manager.getIdentifier(t),s=e.nipples.get(o),n=e.manager.scroll;if((t=>isNaN(t.buttons)?0!==t.pressure:0!==t.buttons)(t)){if(!s)return console.error("Found zombie joystick with ID "+o),void e.manager.removeIdentifier(o);if(i.dynamicPage){var r=s.el.getBoundingClientRect();s.position={x:n.x+r.left,y:n.y+r.top}}s.identifier=o;var a=s.options.size/2,h={x:t.pageX,y:t.pageY};i.lockX&&(h.y=s.position.y),i.lockY&&(h.x=s.position.x);var l,c,d=V(h,s.position),m=((t,e)=>{let i=e.x-t.x,o=e.y-t.y;return(t=>t*(180/Math.PI))(Math.atan2(o,i))})(h,s.position),p=L(m),u=d/a,y={distance:d,position:h};if("circle"===s.options.shape?(l=Math.min(d,a),c=((t,e,i)=>{let o={x:0,y:0};return i=L(i),o.x=t.x-e*Math.cos(i),o.y=t.y-e*Math.sin(i),o})(s.position,l,m)):(c=((t,e,i)=>({x:Math.min(Math.max(t.x,e.x-i),e.x+i),y:Math.min(Math.max(t.y,e.y-i),e.y+i)}))(h,s.position,a),l=V(c,s.position)),i.follow){if(d>a){let t=h.x-c.x,i=h.y-c.y;s.position.x+=t,s.position.y+=i,s.el.style.top=s.position.y-(e.box.top+n.y)+"px",s.el.style.left=s.position.x-(e.box.left+n.x)+"px",d=V(h,s.position)}}else h=c,d=l;var g=h.x-s.position.x,f=h.y-s.position.y;s.frontPosition={x:g,y:f},i.dataOnly||G(s.ui.front,s.frontPosition);var v={identifier:s.identifier,position:h,force:u,pressure:t.force||t.pressure||t.webkitForce||0,distance:d,angle:{radian:p,degree:m},vector:{x:g/a,y:-f/a},raw:y,instance:s,lockX:i.lockX,lockY:i.lockY};(v=s.computeDirection(v)).angle={radian:L(180-m),degree:180-m},s.trigger("move",v),e.trigger("move "+s.id+":move",v)}else this.processOnEnd(t)},ht.prototype.processOnEnd=function(t){var e=this,i=e.options,o=e.manager.getIdentifier(t),s=e.nipples.get(o),n=e.manager.removeIdentifier(s.identifier);!s||(i.dataOnly||s.hide(function(){"dynamic"===i.mode&&(s.trigger("removed",s),e.trigger("removed "+s.id+":removed",s),e.manager.trigger("removed "+s.id+":removed",s),s.destroy())}),clearInterval(e.pressureIntervals[s.identifier]),s.resetDirection(),s.trigger("end",s),e.trigger("end "+s.id+":end",s),e.ids.indexOf(s.identifier)>=0&&e.ids.splice(e.ids.indexOf(s.identifier),1),e.actives.indexOf(s)>=0&&e.actives.splice(e.actives.indexOf(s),1),/(semi|static)/.test(i.mode)?e.idles.push(s):e.nipples.indexOf(s)>=0&&e.nipples.splice(e.nipples.indexOf(s),1),e.manager.unbindDocument(),/(semi|static)/.test(i.mode)&&(e.manager.ids[n.id]=n.identifier))},ht.prototype.onDestroyed=function(t,e){var i=this;i.nipples.indexOf(e)>=0&&i.nipples.splice(i.nipples.indexOf(e),1),i.actives.indexOf(e)>=0&&i.actives.splice(i.actives.indexOf(e),1),i.idles.indexOf(e)>=0&&i.idles.splice(i.idles.indexOf(e),1),i.ids.indexOf(e.identifier)>=0&&i.ids.splice(i.ids.indexOf(e.identifier),1),i.manager.removeIdentifier(e.identifier),i.manager.unbindDocument()},ht.prototype.destroy=function(){var t=this;for(var e in t.unbindEvt(t.options.zone,"start"),t.nipples.forEach(function(t){t.destroy()}),t.pressureIntervals)Object.prototype.hasOwnProperty.call(t.pressureIntervals,e)&&clearInterval(t.pressureIntervals[e]);t.trigger("destroyed",t.nipples),t.manager.unbindDocument(),t.off(),t.pressureIntervals={},t.nipples=[],t.idles=[],t.actives=[],t.ids=[],t.manager=null};var lt=ht;function ct(t){var e=this;e.ids={},e.index=0,e.collections=[],e.scroll=Y(),e._windowBound=!1,e.config(t),e.prepareCollections();var i=function(){var t;e.collections.forEach(function(i){i.forEach(function(i){t=i.el.getBoundingClientRect(),i.position={x:e.scroll.x+t.left,y:e.scroll.y+t.top}})})};return e._onResize=function(){(t=>{I.has(t)&&clearTimeout(I.get(t)),I.set(t,setTimeout(function(){I.delete(t),t()},100))})(i)},e._onScroll=function(){e.scroll=Y()},e.collections}ct.prototype=new nt,ct.constructor=ct,ct.prototype.prepareCollections=function(){var t=this;t.collections.create=t.create.bind(t),t.collections.on=t.on.bind(t),t.collections.off=t.off.bind(t),t.collections.destroy=t.destroy.bind(t),t.collections.get=function(e){var i;return t.collections.every(function(t){return!(i=t.get(e))}),i}},ct.prototype.create=function(t){return this.createCollection(t)},ct.prototype.bindWindowEvents=function(){var t=this;t._windowBound||typeof window>"u"||(t._windowBound=!0,Q(window,"resize",t._onResize),Q(window,"scroll",t._onScroll))},ct.prototype.unbindWindowEvents=function(){var t=this;!t._windowBound||typeof window>"u"||(t._windowBound=!1,Z(window,"resize",t._onResize),Z(window,"scroll",t._onScroll))},ct.prototype.createCollection=function(t){var e=this,i=new lt(e,t);return e.bindCollection(i),e.collections.push(i),e.bindWindowEvents(),i},ct.prototype.bindCollection=function(t){var e,i=this,o=function(t,o){e=t.type+" "+o.id+":"+t.type,i.trigger(e,o)};t.on("destroyed",i.onDestroyed.bind(i)),t.on("shown hidden rested dir plain",o),t.on("dir:up dir:right dir:down dir:left",o),t.on("plain:up plain:right plain:down plain:left",o)},ct.prototype.bindDocument=function(){var t=this;t.binded||(t.bindEvt(document,"move").bindEvt(document,"end"),t.binded=!0)},ct.prototype.unbindDocument=function(t){var e=this;(!Object.keys(e.ids).length||!0===t)&&(e.unbindEvt(document,"move").unbindEvt(document,"end"),e.binded=!1)},ct.prototype.getIdentifier=function(t){var e;return t?void 0===(e=void 0===t.identifier?t.pointerId:t.identifier)&&(e=this.latest||0):e=this.index,void 0===this.ids[e]&&(this.ids[e]=this.index,this.index+=1),this.latest=e,this.ids[e]},ct.prototype.removeIdentifier=function(t){var e={};for(var i in this.ids)if(this.ids[i]===t){e.id=i,e.identifier=this.ids[i],delete this.ids[i];break}return e},ct.prototype.onmove=function(t){return this.onAny("move",t),!1},ct.prototype.onend=function(t){return this.onAny("end",t),!1},ct.prototype.oncancel=function(t){return this.onAny("end",t),!1},ct.prototype.onAny=function(t,e){var i,o=this,s="processOn"+t.charAt(0).toUpperCase()+t.slice(1);e=B(e);var n=function(t,e,i){i.ids.indexOf(e)>=0&&(i[s](t),t._found_=!0)};return J(e,function(t){i=o.getIdentifier(t),J(o.collections,n.bind(null,t,i)),t._found_||o.removeIdentifier(i)}),!1},ct.prototype.destroy=function(){var t=this;t.unbindDocument(!0),t.unbindWindowEvents(),t.ids={},t.index=0,t.collections.forEach(function(t){t.destroy()}),t.collections=[],t.off()},ct.prototype.onDestroyed=function(t,e){var i=this;if(i.collections.indexOf(e)<0)return!1;i.collections.splice(i.collections.indexOf(e),1),0===i.collections.length&&i.unbindWindowEvents()};var dt=ct,mt=null;function pt(){return mt||(mt=new dt),mt}var ut={create:function(t){return pt().create(t)},destroy:function(){mt&&(mt.destroy(),mt=null)},get factory(){return pt()}},yt=.02,gt=new O,ft=new O,vt=new O,bt=new O,xt=new O,wt=new O,Pt=new z,Mt=new z,Et=new z,St=new C,jt=new C,At=new R(0,0,0,"YXZ"),Tt=new O(1,0,0),Dt=new O(0,1,0),kt=new O(0,0,1),Ct=new O(1,1,1),Ot=[],zt=t=>Ot[t]??(Ot[t]=new O),Rt=new O,Ft=new O,_t=new O,Wt=new O,Xt=new C,Nt=new O,Vt=new C,Lt=new F,It=new _,Qt={type:"requestRender"},Zt={type:"updateMatrix"},Bt=class extends T{constructor(t,i,o,s,n,r,a,h,p){super(),this.object=t,this.domElement=i,this.data=o,this.gloabalPhysics=s,this.controlsManager=n,this.cameraFollow=r,this.camera=a,this.page=h,this.sharedAssets=p,this.enableDamping=!0,this.hiddenMatrix0=new z,this.target0=new O,this.zoom0=1,this.rotForce=1,this.moveForce=1,this.pixelsPerMeter=e,this.euler0=new R(0,0,0,"YXZ"),this.position0Cam=new O,this.quat0Cam=new C,this.scale0Cam=new O,this.hiddenMatrix0Cam=new z,this.threshEndTranslate=.01,this.threshEndRotate=1e-8,this.threshEndRotVel=.005,this.collider={type:"capsule",radius:40,segment:new F(new O(0,-40,0),new O(0,40,0)),matrix:new z,position:new O,rotation:new C},this.euler=new R(0,0,0,"YXZ"),this.eulerDelta=new O,this.lastPosition=new O,this.lastCameraQuaternion=new C,this.lastCameraPosition=new O,this.PI_2=Math.PI/2,this.prevMouse=new k,this.velocityTarget=new O,this.velocity=new O,this.directionXZ=new O,this.rotVelocityStick=new O,this.rotVelocityTarget=new O,this.rotVelocity=new O,this.rotDirection=new O,this.nonColliderRotOffset=new z,this.nonColliderPosOffset=new z,this.firstPointerId=-1,this.rot=new O,this.path=[],this.movementState={moveNegZ:0,movePosZ:0,moveNegX:0,movePosX:0,moveNegY:0,movePosY:0,rotPosX:0,rotNegX:0,rotPosY:0,rotNegY:0,jump:0,run:0},this.onObject=!1,this.actionState={},this.keyAssignments=[["moveNegZ","W"],["moveNegX","A"],["movePosZ","S"],["movePosX","D"],["rotPosX","ArrowUp"],["rotPosY","ArrowLeft"],["rotNegX","ArrowDown"],["rotNegY","ArrowRight"],["jump"," "]],this.collisionEnabled=!0,this.offsetMatrix=new z,this.objectToTarget=new O,this.objectToTarget0=new O,this.objectToCamXZ=new O,this.objectToCamXZ0=new O,this.targetToCamera=new O,this.targetToCamera0=new O,this.cameraPolarAxis0=new O,this.targetPos=new O,this.targetQuat=new C,this.lerpFactorPos=(new O).setScalar(.3),this.lerpFactorPosStart=.3,this.lerpFactorPosEnd=.3,this.lerpFactorRotStart=.3,this.lerpFactorRotEnd=.3,this.lerpFactorPosCamera=.3,this.lerpFactorRotCamera=.3,this.objXZQuat=new C,this.objXZQuatInv=new C,this.objXZRotMat=new z,this.isFirstPerson=!1,this.didHit=!1,this.groundVelocity=new O,this.pushedVelocity=new O,this.groundYRotation=0,this.objectRealQuat=new C,this.colliderWorldQuat=new C,this.groundNormal=new O,this.groundTilt=new C,this.groundTiltInv=new C,this.lastHitObj=null,this.isFirstFrame=!0,this.rotationAccumWhenOrientWithCamera=0,this.navMeshPathDest=null,this.position=new O,this.quaternion=new C,this.scale=new O,this.initialAction=!0,this.onPointerDown=t=>{!(t.target===this.domElement||t.target instanceof HTMLElement&&"SPLINE-VIEWER"===t.target.tagName&&t.target.shadowRoot?.contains(this.domElement))||-1!==this.firstPointerId||(this.firstPointerId=t.pointerId,this.domElement.ownerDocument.addEventListener("pointermove",this.onPointerMove),this.domElement.ownerDocument.addEventListener("pointerup",this.onPointerUp),"keys"!==this.rotBy&&!l&&!c&&this.domElement.requestPointerLock(),this.prevMouse.set(t.clientX,t.clientY))},this.onPointerUp=t=>{this.firstPointerId=-1,this.domElement.ownerDocument.removeEventListener("pointermove",this.onPointerMove),this.domElement.ownerDocument.removeEventListener("pointerup",this.onPointerUp),"mouse"===t.pointerType&&this.domElement.ownerDocument.exitPointerLock()},this.onPointerMove=t=>{if(t.pointerId!==this.firstPointerId)return;let e=t.clientX-this.prevMouse.x,i=t.clientY-this.prevMouse.y;this.prevMouse.set(t.clientX,t.clientY),"mouse"===t.pointerType&&"keys"!==this.rotBy&&(c&&d<15.5&&!l?(this.eulerDelta.y=-e*this.mouseOrbitSensitivity,this.eulerDelta.x=-i*this.mouseOrbitSensitivity):(this.eulerDelta.y=-t.movementX*this.mouseOrbitSensitivity,this.eulerDelta.x=-t.movementY*this.mouseOrbitSensitivity)),"mouse"!==t.pointerType&&"drag"===this.rotByTouch&&(this.eulerDelta.y=-e*this.mouseOrbitSensitivity*5,this.eulerDelta.x=-i*this.mouseOrbitSensitivity*5),this.controlsManager.requestRender()},this.onPointerlockChange=t=>{this.domElement.ownerDocument.pointerLockElement===this.domElement?Bt.isLocked=!0:Bt.isLocked=!1},this.onPointerlockError=()=>{console.error("SPE.GameControls: Unable to use Pointer Lock API")},this.handleVisibilityChange=()=>{if(document?.hidden)for(let t in this.movementState)this.movementState[t]=0},this.onKeyDown=t=>{!(t.target instanceof HTMLInputElement)&&("ArrowLeft"===t.code||"ArrowUp"===t.code||"ArrowRight"===t.code||"ArrowDown"===t.code||"Space"===t.code)&&t.preventDefault();for(let e of this.keyAssignments)if(t.key.toUpperCase()===e[1]||t.key===e[1]){this.movementState[e[0]]=1;break}this.controlsManager.requestRender()},this.onKeyUp=t=>{for(let e of this.keyAssignments)if(t.key.toUpperCase()===e[1]||t.key===e[1]||t.code.slice(3,t.code.length).toUpperCase()===e[1]){this.movementState[e[0]]=0;break}},this.copyVRGamePadValues=(t,e)=>{for(let i=2;i<4;i++){let o=t.axes[i];0===e?2===i?this.movementState.movePosX=o:this.movementState.movePosZ=o:(t.buttons[3].pressed?this.movementState.jump=1:this.movementState.jump=0,2===i?this.movementState.rotPosY=o:"fly"===this.moveMode&&(this.movementState.moveNegY=o))}},this.sharedGameControlGlobals=n.sharedGameControlGlobals,t===a&&(this.isFirstPerson=!0),this.hiddenMatrix0.copy(this.object.hiddenMatrix),this.object.parent?this.object.hiddenMatrix.copy(this.object.parent.matrixWorld).invert():this.object.hiddenMatrix.identity(),this.object.matrix.copy(this.object.matrixWorld),this.object.matrix.decompose(this.position,this.quaternion,this.scale),this.euler0.setFromQuaternion(this.quaternion,"YXZ");let u=this.euler0.clone(),g=u.y;if(this.objectRealQuat.copy(this.quaternion),u.y=0,this.quaternion.setFromEuler(u),this.objXZQuat.copy(this.quaternion),this.objXZQuatInv.copy(this.objXZQuat).invert(),this.objXZRotMat.makeRotationFromQuaternion(this.quaternion),u.set(0,g,0),this.quaternion.setFromEuler(u),this.rot.setFromEuler(u),this.object.matrixAutoUpdate=!1,(this.isFirstPerson||!0===this.cameraFollow)&&(this.target0.copy(this.camera.getTarget()),this.zoom0=this.camera.zoom),!0===this.cameraFollow){this.position0Cam.copy(this.camera.position),this.quat0Cam.copy(this.camera.quaternion),this.scale0Cam.copy(this.camera.scale),this.hiddenMatrix0Cam.copy(this.camera.hiddenMatrix),this.camera.parent?(this.camera.hiddenMatrix.copy(this.camera?.parent.matrixWorld),this.camera.matrix.copy(this.camera.matrixWorld)):this.camera.hiddenMatrix.identity(),this.camera.matrix.copy(this.camera.matrixWorld),this.camera.matrix.decompose(this.camera.position,this.camera.quaternion,this.camera.scale),this.camera.matrixAutoUpdate=!1,this.offsetMatrix.copy(this.object.matrix).invert().multiply(this.camera.matrix);let t,e=new O(0,0,-1).applyQuaternion(this.camera.quaternion),i=(new O).subVectors(this.position,this.camera.position);this.objectToCamXZ.copy(i),this.objectToCamXZ.y=0,this.objectToCamXZ0.copy(this.objectToCamXZ),Math.abs(e.y)<1e-6?(i.y=0,e.y=0,t=i.projectOnVector(e)):t=i.y/e.y>0?e.multiplyScalar(i.y/e.y):e.multiplyScalar(i.length()),this.targetToCamera0.copy(t).negate();let o=this.camera.position.clone().add(t);this.objectToTarget0.subVectors(o,this.position);let s=(new R).setFromQuaternion(this.camera.quaternion,"YXZ");this.cameraPolarOffset=-s.x,s.x=0,s.z=0,s.y-=Math.PI/2,this.cameraPolarAxis0.set(0,0,-1).applyEuler(s)}if(this.object instanceof m&&(this.object.matrixAutoUpdate=!1),this.euler.setFromQuaternion(this.quaternion,"YXZ"),this.rotByTouch=o.rotByTouch??"joystick",this.rotBy=o.rotBy??"keys",this.rotationMode=o.rotationMode??"normal",this.moveMode=o.moveMode??"walk",this.collisionEnabled=o.collisionEnabled,this.speedTranslate=1*(o.speedTranslate??250),this.speedOrbit=.025*(o.speedRotate??100),this.mouseOrbitSensitivity=16e-6*(o.speedRotate??100),this.keyAssignments=o.keyAssignments.map(t=>{let e=[t[0],t[1]];return"▲"===e[1]?e[1]="ArrowUp":"◀"===e[1]?e[1]="ArrowLeft":"▼"===e[1]?e[1]="ArrowDown":"▶"===e[1]?e[1]="ArrowRight":"⇧"===e[1]?e[1]="Shift":"↵"===e[1]?e[1]="Enter":"Space"===e[1]?e[1]=" ":"⌘"===e[1]?e[1]="Meta":"Ctrl"===e[1]?e[1]="Control":"Esc"===e[1]&&(e[1]="Escape"),e}),"mouse"===o.rotBy){let t;t=this.keyAssignments.findIndex(t=>"rotNegX"===t[0]),-1!==t&&(this.keyAssignments[t][1]=""),t=this.keyAssignments.findIndex(t=>"rotPosX"===t[0]),-1!==t&&(this.keyAssignments[t][1]=""),t=this.keyAssignments.findIndex(t=>"rotPosY"===t[0]),-1!==t&&(this.keyAssignments[t][1]=""),t=this.keyAssignments.findIndex(t=>"rotNegY"===t[0]),-1!==t&&(this.keyAssignments[t][1]="")}this.lerpFactorPosStart=1-.02**(1/(60*(o.delayPos[0]??.3))),this.lerpFactorPosEnd=1-.02**(1/(60*(o.delayPos[1]??.3))),this.lerpFactorPos.setScalar(this.lerpFactorPosStart),this.lerpFactorRotStart=1-.02**(1/(60*(o.delayRot[0]??.3))),this.lerpFactorRotEnd=1-.02**(1/(60*(o.delayRot[1]??.3))),this.lerpFactorPosCamera=1-.02**(1/(60*(o.delayPosCamera??.3))),this.lerpFactorRotCamera=1-.02**(1/(60*(o.delayRotCamera??.3))),this.gravity=12*(this.gloabalPhysics.gravity??A.defaultData.gravity),this.usePhysics=this.gloabalPhysics.usePhysics??A.defaultData.usePhysics,this.jumpPower=20*o.jumpPower,this.resetYPosition=this.position.y+Math.abs(o.resetYPosition)*(this.gravity>0?1:-1),this.alignToGround=o.alignToGround??!1,this.orientMode=o.autoOrientMove?o.orientMode:"none",this.orientWith=o.orientWith??E.defaultDataThirdPerson.orientWith,this.slopeThresh=65*Math.PI/180,"capsule"===o.collider.type?(this.collider.radius=o.collider.radius,this.collider.segment.start.y=o.collider.height/2-o.collider.radius,this.collider.segment.end.y=-this.collider.segment.start.y,this.offset=o.collider.height*yt/this.pixelsPerMeter,this.stepThresh=.3*o.collider.height/this.pixelsPerMeter,this.colliderHeight=o.collider.height):"sphere"===o.collider.type?(this.collider.radius=o.collider.radius,this.collider.segment.start.y=0,this.collider.segment.end.y=0,this.offset=2*o.collider.radius*yt/this.pixelsPerMeter,this.stepThresh=2*o.collider.radius*.3/this.pixelsPerMeter,this.colliderHeight=2*o.collider.radius):(this.offset=o.collider.height*yt/this.pixelsPerMeter,this.stepThresh=.3*o.collider.height/this.pixelsPerMeter,this.colliderHeight=o.collider.height),this.collider.type=o.collider.type;let v=(new O).fromArray(o.collider.position.map(t=>"number"==typeof t?t:0)),b=(new C).setFromEuler((new R).fromArray([...o.collider.rotation.map(t=>"number"==typeof t?t:0),"XYZ"]));this.collider.position.copy(v).multiply(this.scale),this.collider.rotation.copy(b),this.collider.matrix.compose(v,b,Ct),void 0!==o.cameraXAxis&&(this.cameraXAxis=o.cameraXAxis,this.cameraYAxis=o.cameraYAxis,this.minPolarAngle=o.cameraRotXLimits[0],this.maxPolarAngle=o.cameraRotXLimits[1],this.minAzimuthAngleRel=o.cameraRotYLimits[0],this.maxAzimuthAngleRel=o.cameraRotYLimits[1]),this.forwardDir=o.forwardDirection??"-z",this.isFirstPerson&&(this.forwardDir="-z"),this.runMultiplier=o.runMultiplier??2;let x=2*o.navmesh.destinationHelperRadius;if(x>0){let t=new j;t.push({fi:0,data:{...S.defaultData("light","phong"),alpha:0},id:"layer1"}),t.push({fi:0,data:{...S.defaultData("color"),color:o.navmesh.destinationHelperColor,alpha:o.navmesh.destinationHelperColor.a},id:"layer2"});let e=y({layers:t},{scene:this.page.scene,shared:this.sharedAssets});this.navMeshPathDest=new N(f.create({parameters:{width:x,height:x/10,hollow:.7}}),e),this.navMeshPathDest.material.userData.opacity0=o.navmesh.destinationHelperColor.a}this.activate()}reset(t=!1){if(this.object.hiddenMatrix.copy(this.hiddenMatrix0),t){this.object.updateMatrix(),this.object.updateMatrixWorld(),this.object.matrix.copy(this.object.matrixWorld),this.object.matrix.decompose(this.position,this.quaternion,this.scale),this.object.parent?this.object.hiddenMatrix.copy(this.object.parent.matrixWorld).invert():this.object.hiddenMatrix.identity();let t=(new R).setFromQuaternion(this.quaternion,"YXZ"),e=t.y;this.objectRealQuat.copy(this.quaternion),t.y=0,this.quaternion.setFromEuler(t),this.objXZQuat.copy(this.quaternion),this.objXZQuatInv.copy(this.objXZQuat).invert(),this.objXZRotMat.makeRotationFromQuaternion(this.quaternion),t.set(0,e,0),this.quaternion.setFromEuler(t),this.rot.setFromEuler(t),this.euler.setFromQuaternion(this.quaternion,"YXZ"),this.velocityTarget.set(0,0,0),this.velocity.set(0,0,0)}else this.object instanceof m?this.object.matrixAutoUpdate=!0:this.object.updateMatrix();!0===this.cameraFollow&&(this.camera.quaternion.copy(this.quat0Cam),this.camera.position.copy(this.position0Cam),this.camera.scale.copy(this.scale0Cam),this.camera.hiddenMatrix.copy(this.hiddenMatrix0Cam),this.camera.matrixAutoUpdate=!0),this.controlsManager.requestRender()}activate(){this.instantiateActions(),this.domElement.ownerDocument.addEventListener("pointerdown",this.onPointerDown),this.domElement.ownerDocument.addEventListener("keydown",this.onKeyDown),this.domElement.ownerDocument.addEventListener("keyup",this.onKeyUp),this.domElement.ownerDocument.addEventListener("pointerlockchange",this.onPointerlockChange),this.domElement.ownerDocument.addEventListener("pointerlockerror",this.onPointerlockError),this.domElement.ownerDocument.addEventListener("visibilitychange",this.handleVisibilityChange)}deactivate(){this.disposeActions(),this.domElement.ownerDocument.removeEventListener("pointerdown",this.onPointerDown),this.domElement.ownerDocument.removeEventListener("keydown",this.onKeyDown),this.domElement.ownerDocument.removeEventListener("keyup",this.onKeyUp),this.domElement.ownerDocument.removeEventListener("pointerlockchange",this.onPointerlockChange),this.domElement.ownerDocument.removeEventListener("pointerlockerror",this.onPointerlockError),this.domElement.ownerDocument.removeEventListener("visibilitychange",this.handleVisibilityChange)}dispose(){this.deactivate(),this.navMeshPathDest?.parent&&this.page.remove(this.navMeshPathDest)}instantiateActions(){let t=this.data,e=this.sharedAssets;void 0!==t.gameActions&&(this.actions={},M.list.forEach(i=>{this.actions[i]=v({...t,disabled:!1,type:"GameControl"},t.gameActions[i],this.page,e,this.controlsManager.eventManager,this.object)})),this.dispatchStopEvent("move"),this.dispatchStopEvent("run"),this.dispatchStopEvent("jump"),this.dispatchStartEvent("idle"),this.initialAction&&(this.initialAction=!1)}disposeActions(){this.initialAction=!1,this.dispatchStopEvent("idle"),this.dispatchStopEvent("move"),this.dispatchStopEvent("run"),this.dispatchStopEvent("jump"),b(this.actions.idle),b(this.actions.move),b(this.actions.run),b(this.actions.jump)}dispatchStartEvent(t){void 0!==this.actions[t]&&(this.actionState[t]||(this.actionState[t]=!0,this.actions[t].Transition.forEach(t=>{t.play()}),this.actions[t].Animation.forEach(t=>{t.play(!1===this.initialAction)}),this.actions[t].TimelineAnimation.forEach(t=>{t.play()}),this.actions[t].Create.forEach(t=>{t.dispatchStart()}),this.actions[t].Audio.forEach(t=>{t.dispatchGameControl("start")}),this.actions[t].Particles.forEach(t=>{t.dispatchGameControl("start")})))}dispatchStopEvent(t){void 0!==this.actions[t]&&(!this.actionState[t]||(this.actionState[t]=!1,this.actions[t].Transition.forEach(t=>{t.stop(),null!==t.object.currentState&&t.object.changeSelectedState(null,{scene:this.page.scene,shared:this.sharedAssets})}),this.actions[t].TimelineAnimation.forEach(t=>{t.stop()}),this.actions[t].Create.forEach(t=>{t.dispatchStop()}),this.actions[t].Audio.forEach(t=>{t.dispatchGameControl("stop")}),this.actions[t].Particles.forEach(t=>{t.dispatchGameControl("stop")})))}get colliderWorldPosition(){return bt.copy(this.collider.position).applyQuaternion(this.objectRealQuat).add(this.position)}update(t){if(this.gravity<0?this.position.y<this.resetYPosition:this.position.y>this.resetYPosition)return this.reset(!0),!0;this.sharedGameControlGlobals.gamePads.forEach(this.copyVRGamePadValues);let e=(this.isFirstFrame?16.6:t)/1e3;this.isFirstFrame&&(this.isFirstFrame=!1);let i=60*e,o=!1;if(this.groundYRotation=0,this.groundVelocity.set(0,0,0),this.usePhysics&&this.collisionEnabled&&this.object.rigidBody?.collider(0).shape){let t=xt.set(0,(0===this.velocity.y?this.pixelsPerMeter*Math.max(Math.abs(this.gravity)/120,1)*(this.gravity>0?1:-1):this.velocity.y)*e,0).divideScalar(this.pixelsPerMeter),i=this.sharedGameControlGlobals.rapierWorld.castShape(this.colliderWorldPosition.divideScalar(this.pixelsPerMeter),this.colliderWorldQuat,t,this.object.rigidBody?.collider(0).shape,0,1,!1,8,void 0,void 0,this.object.rigidBody);if(i){this.onObject=!0,this.groundNormal.set(i.normal2.x,i.normal2.y,i.normal2.z).applyQuaternion(this.colliderWorldQuat).negate(),this.alignToGround&&this.groundTiltAdjustment(this.groundNormal),Math.acos(this.groundNormal.y)<this.slopeThresh&&(o=!0),0===i.collider.parent()?.bodyType()&&Math.acos(this.groundNormal.y)*(180/Math.PI)>45&&(this.onObject=!1);let t=i.collider.parent(),s=null!==t&&t.isKinematic()?t:null,n=null===s?void 0:this.sharedGameControlGlobals.kinematicBodyToEntity.get(s.handle);if(null!==s&&n?.userData.isFollowingObj!==this.object.uuid){let t=this.object.getWorldPosition(bt).add(this.collider.position).divideScalar(this.pixelsPerMeter),i=s.velocityAtPoint(t);this.groundVelocity.set(i.x,i.y,i.z).multiplyScalar(this.pixelsPerMeter),this.groundYRotation=s.angvel().y*e}}else this.onObject=!1}if("walk"===this.moveMode&&this.collisionEnabled&&(1===this.movementState.jump&&this.onObject&&(this.velocityTarget.y=this.jumpPower,this.movementState.jump=0,this.dispatchStopEvent("idle"),this.dispatchStopEvent("move"),this.dispatchStopEvent("run"),this.dispatchStopEvent("jump"),this.dispatchStartEvent("jump"),this.onObject=!1),this.onObject?this.velocityTarget.y/=2:this.velocityTarget.y+=this.gravity*i),"fly"===this.moveMode&&(this.velocityTarget.y=(this.movementState.movePosY-this.movementState.moveNegY)*this.speedTranslate),this.directionXZ.z=this.movementState.movePosZ-this.movementState.moveNegZ,this.directionXZ.x=this.movementState.movePosX-this.movementState.moveNegX,"+z"===this.forwardDir&&this.directionXZ.multiplyScalar(-1),this.directionXZ.manhattanLength()>0&&(this.path=[]),this.navMeshPathDest){let t=this.navMeshPathDest.material;if("walk"===this.moveMode&&this.path.length>1){this.navMeshPathDest.position.copy(this.path[this.path.length-1]),this.navMeshPathDest.parent||this.page.add(this.navMeshPathDest);let e=bt.subVectors(this.path[1],this.position),i=xt.subVectors(this.path[1],this.path[0]);e.dot(i)<0?this.path.shift():(this.directionXZ.x=i.x,this.directionXZ.z=i.z),t.opacity=t.userData.opacity0}else t.opacity-=.05*t.userData.opacity0,this.navMeshPathDest.material.opacity<=0&&this.navMeshPathDest.parent&&this.page.remove(this.navMeshPathDest)}this.directionXZ.normalize(),this.movementState.run?this.moveForce=this.runMultiplier:this.moveForce=1,this.velocityTarget.z=this.directionXZ.z*this.speedTranslate*this.moveForce,this.velocityTarget.x=this.directionXZ.x*this.speedTranslate*this.moveForce,("walk"===this.moveMode?this.velocityTarget.x+this.velocityTarget.z===0:0===this.velocityTarget.manhattanLength())?this.lerpFactorPos.setScalar(this.lerpFactorPosEnd):this.lerpFactorPos.setScalar(this.lerpFactorPosStart),"walk"===this.moveMode&&(this.lerpFactorPos.y=1),!1===this.didHit&&0===this.pushedVelocity.manhattanLength()||!1===this.usePhysics?(this.velocity.x+=(this.velocityTarget.x-this.velocity.x)*(1-(1-this.lerpFactorPos.x)**i),this.velocity.y+=(this.velocityTarget.y-this.velocity.y)*(1-(1-this.lerpFactorPos.y)**i),this.velocity.z+=(this.velocityTarget.z-this.velocity.z)*(1-(1-this.lerpFactorPos.z)**i)):this.velocity.copy(this.velocityTarget),("walk"===this.moveMode?this.velocity.x**2+this.velocity.z**2<this.speedTranslate:this.velocity.lengthSq()<this.speedTranslate)?(this.dispatchStopEvent("move"),this.dispatchStopEvent("run"),this.onObject&&(this.dispatchStopEvent("jump"),this.dispatchStartEvent("idle"))):(this.dispatchStopEvent("idle"),(this.onObject||"fly"===this.moveMode)&&(this.dispatchStopEvent("jump"),this.movementState.run?(this.dispatchStopEvent("move"),this.dispatchStartEvent("run")):(this.dispatchStopEvent("run"),this.dispatchStartEvent("move"))));let n=vt.copy(this.velocity);if("none"!==this.orientMode&&!1===this.isFirstPerson){let t=xt.copy(n);t.y=0,n.set(0,n.y,t.length()*("+z"===this.forwardDir?1:-1))}if(this.directionXZ.manhattanLength()>0&&"none"!==this.orientMode&&!1===this.isFirstPerson)if("camera"===this.orientWith&&this.path.length<=1){let t=bt;this.camera.getWorldDirection(t);let e=wt.copy(Dt).multiplyScalar(t.dot(Dt));t.sub(e);let i=xt.copy(this.directionXZ);i.x*=-1,this.rot.y=t.angleTo(i)*(t.cross(i).y>0?-1:1)+this.rotationAccumWhenOrientWithCamera}else this.rot.y=(this.path.length>1?0:this.euler.y)+Math.atan2(-this.directionXZ.z,this.directionXZ.x)+Math.PI/2*("+z"===this.forwardDir?1:-1);if(At.setFromVector3(this.rot),"walk"===this.moveMode&&(At.x=0),n.applyEuler(At),o&&(jt.setFromUnitVectors(Dt,this.groundNormal),n.applyQuaternion(jt)),!0===this.usePhysics&&this.object.rigidBody){this.pushedVelocity.set(0,0,0);let t=0;for(let i of this.sharedGameControlGlobals.entitiesWithTransformAnim){if(void 0===i.rigidBody||void 0===i.prevQ)continue;(i.hasNonUniformScale?i.matrixWorldRigid:i.matrixWorld).decompose(Rt,Xt,Ft);let o=this.object.getWorldPosition(_t).add(this.collider.position).sub(Rt);Vt.copy(i.prevQ).invert().premultiply(Xt);let r=wt.subVectors(Rt,i.prevT).add(Wt.copy(o).applyQuaternion(Vt).sub(o)).divideScalar(e).divideScalar(this.pixelsPerMeter),a=i.rigidBody.collider(0).castCollider(r,this.object.rigidBody.collider(0),bt.copy(n).divideScalar(this.pixelsPerMeter),0,e,!1);r.multiplyScalar(this.pixelsPerMeter);let h=x.is(i)?i:i.object;if(null!==a&&this.lastHitObj!==h){let t;i instanceof p&&(t=i);let e=this.sharedGameControlGlobals.entityToCollisionEvents[h.uuid];if(e)for(let i of e)"character"===i.data.target&&(i.dispatch(t),h.dispatchEvent(s));this.lastHitObj=h}null!==a&&(Math.abs(r.x)>Math.abs(this.pushedVelocity.x)&&(this.pushedVelocity.x=r.x),Math.abs(r.y)>Math.abs(this.pushedVelocity.y)&&(this.pushedVelocity.y=r.y),Math.abs(r.z)>Math.abs(this.pushedVelocity.z)&&(this.pushedVelocity.z=r.z),zt(t++).copy(a.normal1).applyQuaternion(i.quaternion))}if(t>0){for(let e=0;e<t;e++){let t=zt(e),i=t.dot(n);i<0&&n.addScaledVector(t,-i)}n.add(this.pushedVelocity)}else n.add(this.groundVelocity)}if(this.rotDirection.y=Number(this.movementState.rotPosY)-Number(this.movementState.rotNegY),this.rotDirection.x=Number(this.movementState.rotPosX)-Number(this.movementState.rotNegX),this.rotDirection.normalize(),"normal"===this.rotationMode&&(this.movementState.rotPosX||this.movementState.rotNegX)||"steer"===this.rotationMode&&(this.movementState.rotPosX||this.movementState.rotNegX)&&(this.movementState.movePosZ||this.movementState.moveNegZ||"walk"===this.moveMode)?this.rotVelocityStick.x=-this.rotDirection.x*this.speedOrbit*this.rotForce:this.rotVelocityStick.x=0,"normal"===this.rotationMode&&(this.movementState.rotPosY||this.movementState.rotNegY)||"steer"===this.rotationMode&&(this.movementState.rotPosY||this.movementState.rotNegY)&&(this.movementState.movePosZ||this.movementState.moveNegZ)?this.rotVelocityStick.y=-this.rotDirection.y*this.speedOrbit*this.rotForce:this.rotVelocityStick.y=0,this.rotVelocityTarget.subVectors(this.eulerDelta.divideScalar(e),this.rotVelocityStick),0===this.rotVelocityTarget.manhattanLength()?this.rotVelocity.lerp(this.rotVelocityTarget,1-(1-this.lerpFactorRotEnd)**i):this.rotVelocity.lerp(this.rotVelocityTarget,1-(1-this.lerpFactorRotStart)**i),this.euler.x+=this.rotVelocity.x*e,this.euler.y+=this.rotVelocity.y*e+this.groundYRotation,0===this.rotVelocityTarget.y&&0===this.directionXZ.manhattanLength()?this.rotationAccumWhenOrientWithCamera=0:(!1===this.cameraFollow||"Locked"===this.cameraYAxis)&&(this.rotationAccumWhenOrientWithCamera+=this.rotVelocity.y*e),!1===this.isFirstPerson&&"none"!==this.orientMode&&this.directionXZ.manhattanLength()>0){if("radial"===this.orientMode){this.objectToCamXZ.copy(this.objectToCamXZ0).applyAxisAngle(Dt,this.euler.y-this.euler0.y);let t=xt.copy(this.objectToCamXZ).normalize(),i=wt.copy(n).multiplyScalar(e);i.y=0;let o=i.sub(bt.copy(t).multiplyScalar(i.dot(t))).cross(t).y;this.euler.y-=Math.atan2(o,this.objectToCamXZ.length())}}else this.rot.y+=this.rotVelocity.y*e+this.groundYRotation,0!==this.rotVelocityTarget.y&&(!1===this.cameraFollow||"Locked"===this.cameraYAxis)&&(this.euler.y=this.rot.y);if(!0===this.cameraFollow&&("walk"===this.moveMode?"Limit"===this.cameraXAxis?this.euler.x=D.clamp(this.euler.x,-this.maxPolarAngle+this.cameraPolarOffset+1e-6,-this.minPolarAngle+this.cameraPolarOffset-1e-6):this.euler.x=D.clamp(this.euler.x,-this.PI_2+this.cameraPolarOffset,this.PI_2+this.cameraPolarOffset):"Limit"===this.cameraXAxis&&(this.euler.x=D.clamp(this.euler.x,-this.PI_2,this.PI_2))),"fly"===this.moveMode?this.rot.x=this.euler.x:this.isFirstPerson&&(At.copy(this.euler),At.y=0,this.nonColliderRotOffset.makeRotationFromEuler(At)),St.setFromAxisAngle(Tt,this.rot.x),jt.setFromAxisAngle(Dt,this.rot.y),jt.multiply(St),St.setFromAxisAngle(kt,this.rot.z),jt.multiply(St),this.quaternion.copy(jt),this.objectRealQuat.multiplyQuaternions(this.quaternion,this.objXZQuat),this.colliderWorldQuat.copy(this.objectRealQuat).multiply(this.collider.rotation),this.collisionEnabled)if(this.usePhysics&&this.object.rigidBody?.collider(0).shape){let t=xt.copy(n).multiplyScalar(e/this.pixelsPerMeter),i=null;this.didHit=!1;let o=new O;for(let e=0;e<5;e++){let n=t.length(),r=wt.copy(t).normalize();if(i=this.sharedGameControlGlobals.rapierWorld.castShape(this.colliderWorldPosition.divideScalar(this.pixelsPerMeter).add(o),this.colliderWorldQuat,r,this.object.rigidBody.collider(0).shape,0,n,!1,12,void 0,void 0,this.object.rigidBody),null===i){0===e&&0!==this.directionXZ.manhattanLength()&&(this.lastHitObj=null),o.add(t);break}{this.didHit=!0;let a=this.sharedGameControlGlobals.colliderToEntity.get(i.collider.handle);if(a!==this.lastHitObj&&0===e){this.lastHitObj=a;let t=this.sharedGameControlGlobals.entityToCollisionEvents[a?.uuid];if(t)for(let e of t)if("character"===e.data.target){let t,o=(this.sharedGameControlGlobals.rapierWorld?.getCollider(i.collider.handle))._parent;if(a.cloner)for(let e of a.cloner.children)if(e.rigidBody===o){t=e;break}e.dispatch(t),a.dispatchEvent(s)}}let h=gt.set(i.normal2.x,i.normal2.y,i.normal2.z).applyQuaternion(this.colliderWorldQuat),l=ft.copy(r).multiplyScalar(i.time_of_impact).dot(h),c=i.time_of_impact;if(0===c&&(this.position.y+=this.offset*this.pixelsPerMeter),l>this.offset&&(c=i.time_of_impact*(l-this.offset)/l,o.addScaledVector(r,c)),t.copy(r).multiplyScalar(n-c),Math.acos(-h.y)>this.slopeThresh){let e=this.colliderWorldPosition.divideScalar(this.pixelsPerMeter).add(o),s=wt.copy(i.witness2).applyQuaternion(this.colliderWorldQuat);s.y=0;let n=e.add(s);n.y+=this.stepThresh;let r=this.sharedGameControlGlobals.rapierWorld.castShape(n,this.colliderWorldQuat,t,this.object.rigidBody?.collider(0).shape,0,1,!1,12,void 0,void 0,this.object.rigidBody);null!==r&&0===r.time_of_impact&&(h.y=0,h.normalize())}t.addScaledVector(h,-t.dot(h))}}this.position.addScaledVector(o,this.pixelsPerMeter),bt.copy(this.position).divideScalar(this.pixelsPerMeter),St.copy(this.quaternion).premultiply(this.groundTilt).multiply(this.objXZQuat);let r=this.object.rigidBody,a=void 0!==r&&Nt.copy(bt).sub(r.translation()).lengthSq()>1;void 0!==r&&(a?(r.setTranslation(bt,!0),r.setRotation(St,!0)):(r.setNextKinematicTranslation(bt),r.setNextKinematicRotation(St)))}else{let t=this.onObject?1:5,i=n.multiplyScalar(e/t);for(let o=0;o<t;o++)this.position.add(i),this.collisionAdjustment(e/t)}else this.position.addScaledVector(n,e);if("walk"===this.moveMode&&this.onObject&&(this.velocityTarget.y=0,this.velocity.y=0),this.quaternion.premultiply(this.groundTilt).multiply(this.objXZQuat),this.object.matrix.compose(this.position,this.quaternion,this.scale),this.object.matrixWorldNeedsUpdate=!0,this.object.matrix.multiply(this.nonColliderPosOffset).multiply(this.nonColliderRotOffset),this.quaternion.premultiply(this.groundTiltInv).multiply(this.objXZQuatInv),!0===this.cameraFollow){this.updateFollowArms();let t=this.objectToTarget.add(this.position),e=this.targetToCamera.add(t);Pt.lookAt(e,t,Dt).setPosition(e),Pt.decompose(this.targetPos,this.targetQuat,bt),this.camera.quaternion.slerp(this.targetQuat,1-(1-this.lerpFactorRotCamera)**i),this.camera.position.lerp(this.targetPos,1-(1-this.lerpFactorPosCamera)**i),this.camera.updateMatrix(),this.camera.updateMatrixWorld(),"Limit"===this.cameraYAxis&&"cartesian"===this.orientMode&&(this.euler.y=D.clamp(this.euler.y,this.minAzimuthAngleRel,this.maxAzimuthAngleRel)),this.euler.x=D.clamp(this.euler.x,-this.PI_2+(this.cameraPolarOffset<0?this.cameraPolarOffset:0),this.PI_2+(this.cameraPolarOffset>0?this.cameraPolarOffset:0))}return this.eulerDelta.set(0,0,0),this.object.dispatchEvent(Zt),!(this.path.length<2&&this.lastPosition.distanceToSquared(this.position)<this.threshEndTranslate&&Math.abs(this.rotVelocity.x)<this.threshEndRotVel&&Math.abs(this.rotVelocity.y)<this.threshEndRotVel&&(void 0===this.camera||this.isFirstPerson||this.lastCameraPosition.distanceToSquared(this.camera.position)<this.threshEndTranslate&&8*(1-this.lastCameraQuaternion.dot(this.camera.quaternion))<this.threshEndRotate)&&("fly"===this.moveMode||!0===this.onObject||!1===this.collisionEnabled)&&(null===this.navMeshPathDest||this.navMeshPathDest.material.opacity<-.04*this.navMeshPathDest?.material?.userData.opacity0)||(this.camera&&(this.lastCameraPosition.copy(this.camera.position),this.lastCameraQuaternion.copy(this.camera.quaternion)),this.lastPosition.copy(this.position),this.object.dispatchEvent(Qt),0))}updateFollowArms(){this.objectToTarget.copy(this.objectToTarget0),this.targetToCamera.copy(this.targetToCamera0);let t,e=St.setFromAxisAngle(Dt,"Limit"===this.cameraYAxis&&"radial"!==this.orientMode?D.clamp(this.euler.y-this.euler0.y,this.minAzimuthAngleRel,this.maxAzimuthAngleRel):this.euler.y-this.euler0.y);("Locked"!==this.cameraYAxis||"radial"===this.orientMode)&&this.objectToTarget.applyQuaternion(e),t="Limit"===this.cameraXAxis?D.clamp(this.euler.x,-this.maxPolarAngle+this.cameraPolarOffset+1e-6,-this.minPolarAngle+this.cameraPolarOffset-1e-6):D.clamp(this.euler.x,-this.PI_2+this.cameraPolarOffset+1e-6,this.PI_2+this.cameraPolarOffset-1e-6);let i=bt.copy(this.cameraPolarAxis0);("Locked"!==this.cameraYAxis||"radial"===this.orientMode)&&i.applyQuaternion(e);let o=jt.setFromAxisAngle(i,t);"Locked"!==this.cameraYAxis&&this.targetToCamera.applyQuaternion(e),"Locked"!==this.cameraXAxis&&this.targetToCamera.applyQuaternion(o)}groundTiltAdjustment(t){180*Dt.angleTo(t)/Math.PI<15||180*Dt.angleTo(t)/Math.PI>85?St.identity():St.setFromUnitVectors(Dt,t),this.groundTilt.slerp(St,.06),this.groundTiltInv.copy(this.groundTilt).invert()}collisionAdjustment(t){let e=ft.set(0,0,0);this.object.matrix.compose(this.position,this.quaternion,this.scale);let i=Pt.multiplyMatrices(this.object.matrix,this.objXZRotMat).multiply(this.collider.matrix).decompose(bt,St,xt).compose(bt,St,Ct);this.sharedGameControlGlobals.entitiesWithTransformAnim.forEach(t=>{if(t===this.object||t.isDescendantOf(this.object)||!t.bvhGeometry||!t.bvhGeometry.boundsTree)return;It.makeEmpty(),t.updateMatrixWorldRigid();let o=t.matrixWorldRigid,s=Mt.copy(o).invert(),n=Et.copy(Mt).multiply(i);Lt.copy(this.collider.segment),Lt.start.applyMatrix4(n),Lt.end.applyMatrix4(n);let r=gt.copy(this.position).applyMatrix4(s);It.expandByPoint(Lt.start),It.expandByPoint(Lt.end),It.min.addScalar(-this.collider.radius),It.max.addScalar(this.collider.radius),t.bvhGeometry.boundsTree.shapecast({boundsTraverseOrder:t=>t.distanceToPoint(Lt.end),intersectsBounds:t=>t.intersectsBox(It),intersectsTriangle:t=>{let i=bt,s=xt,n=t.closestPointToSegment(Lt,i,s);if(n<this.collider.radius){let t=this.collider.radius-n,a=s.sub(i).normalize(),h=wt.copy(r);h.addScaledVector(a,t);let l=h.applyMatrix4(o).sub(this.position);e.add(l),Lt.start.addScaledVector(a,t),Lt.end.addScaledVector(a,t)}}})}),It.makeEmpty(),Lt.copy(this.collider.segment),Lt.start.applyMatrix4(i),Lt.end.applyMatrix4(i),It.expandByPoint(Lt.start),It.expandByPoint(Lt.end),It.min.addScalar(-this.collider.radius),It.max.addScalar(this.collider.radius),this.sharedGameControlGlobals.staticMeshBVH?.shapecast({boundsTraverseOrder:t=>t.distanceToPoint(Lt.end),intersectsBounds:t=>t.intersectsBox(It),intersectsTriangle:t=>{let i=bt,o=xt,s=t.closestPointToSegment(Lt,i,o);if(s<this.collider.radius){let t=this.collider.radius-s,n=o.sub(i).normalize();this.alignToGround&&this.groundTiltAdjustment(n),e.addScaledVector(n,t),Lt.start.addScaledVector(n,t),Lt.end.addScaledVector(n,t)}}}),this.onObject=Math.abs(e.y)>Math.abs(t*this.velocity.y*.25),this.onObject&&this.dispatchStopEvent("jump");let o=Math.max(0,e.length()-1e-5);e.normalize().multiplyScalar(o),this.position.add(e)}pause(){this.firstPointerId=-1,this.movementState={moveNegZ:0,movePosZ:0,moveNegX:0,movePosX:0,moveNegY:0,movePosY:0,rotPosX:0,rotNegX:0,rotPosY:0,rotNegY:0,jump:0,run:0},this.deactivate()}resume(){this.activate()}},Yt=Bt;Yt.isLocked=!1;var Gt,qt,Ut,Ht=w?typeof window<"u"?window.location.href:"":"https://cdn.spline.design/@splinetool/runtime@2.0.3/build/",Jt={cs:6,ch:2,walkableSlopeAngle:90,walkableHeight:20,walkableClimb:5,walkableRadius:0,maxEdgeLen:12,maxSimplificationError:1.3,minRegionArea:8,mergeRegionArea:20,maxVertsPerPoly:6,detailSampleDist:6,detailSampleMaxError:1};r.then(t=>{Gt=t,qt=new t.Vec3,Ut=new t.Vec3});var Kt=new O,$t=class{constructor(e=!1,i=!1){var s;this.usePhysics=e,this.isExport=i,this.onPointerDown=t=>{if(1!==h.length)return;let{raycaster:e,page:i}=this.eventContext;this.eventContext.updateRaycaster(t);let o=i.raycastWithClones(e);if(0!==o.length){if(this.gameControl){let t=Kt.copy(this.gameControl.colliderWorldPosition);t.y-=this.gameControl.colliderHeight/2,this.gameControl.path=this.computePath(t,o[0].point)}this.eventContext.requestRender()}},this.traverseWithPhysics=(e,i)=>s=>{let r;if(s instanceof t){if(!s.objectForSample)return!0===s.object.dataPatched.physics.fusedBody&&"dynamic"===s.object.dataPatched.physics.rigidBody||void 0;if(s.objectForSample.dataPatched.physics.fusedBody)return;r=s.object}else if(s instanceof p)r=s.object;else if(r=s,!1===r.dataPatched.cloner?.disabled&&r.dataPatched.cloner?.hideBase&&!0!==r.dataPatched.physics?.fusedBody)return!0;if(i&&!r.userData.navmesh)return;let a=r.dataPatched;if(!a.visible&&!0!==a.physics?.enabled)return!0;s.updateMatrixWorldRigid();let h=n(a),l=r.userData.hasDestroy,c=r.userData.hasDrag,d=!1,m=!1;for(let t of a.events)!0!==t.data.disabled&&("GameControl"===t.data.type?d=!0:"Follow"===t.data.type&&(m=!0));if(d||h||m||l||c)return!0;if(this.usePhysics&&"dynamic"===a.physics?.rigidBody){if(this.usePhysics&&a.physics?.fusedBody)return!0}else if("geometry"in s&&s.geometry&&e.push(o(s.geometry,s.matrixWorld)),this.usePhysics&&a.physics?.fusedBody)return s.traverseObject((i,s)=>{if(0===s)return;let n;if(i instanceof t){if(!i.objectForSample)return!0===i.object.dataPatched.physics.fusedBody&&"dynamic"===i.object.dataPatched.physics.rigidBody||void 0;if(i.objectForSample.dataPatched.physics.fusedBody)return;n=i.object}else if(i instanceof p)n=i.object;else if(n=i,i.dataPatched.cloner?.hideBase)return!0;let r=n.dataPatched;if(!r.visible&&!0!==r.physics?.enabled)return!0;"geometry"in i&&i.geometry&&e.push(o(i.geometry,i.matrixWorld))}),!0},this.traverseNoPhysics=(e,i)=>s=>{let r;if(s instanceof t)return;r=s instanceof p?s.object:s;let a=r.dataPatched;if("visibility"===a.physics.enabled?!a.visible:!a.physics.enabled)return!0;if(i&&!r.userData.navmesh)return;let h=s.geometry,l=!0===r.userData.hasDestroy,c=!0===r.userData.hasDrag;if(n(a)||l||c||r.dataPatched.events.some(t=>!0!==t.data.disabled&&"GameControl"===t.data.type))return!0;h&&e.push(o(h,s.matrixWorld))},this.navmeshWasm=Gt,this.navMesh=new this.navmeshWasm.NavMesh,this._workerURL=URL.createObjectURL(new Blob([(i?(s=a??Ht,`\n(async function() {\n\tconst [wasmImport, wasmBinary] = await Promise.all([\n\t\timport('${s}' + 'navmesh.js'),\n\t\tfetch('${s}' + 'navmesh.wasm').then((res) => res.arrayBuffer()),\n\t]);\n\tconst wasmModule = wasmImport.default;\n\tself.module = await wasmModule({ wasmBinary });\n\tpostMessage('ready');\n})();\n`):"\n(async function() {\n\tconst [wasmImport, wasmBinary] = await Promise.all([\n\t\timport(self.location.origin + '/_libraries/navmesh.js'),\n\t\tfetch(self.location.origin + '/_libraries/navmesh.wasm').then((res) => res.arrayBuffer()),\n\t]);\n\tconst wasmModule = wasmImport.default;\n\tself.module = await wasmModule({ wasmBinary });\n\tpostMessage('ready');\n})();\n")+"\n\nonmessage = function(messageEvent) {\n\tconst meshData = messageEvent.data;\n\tconst positions = meshData[0];\n\tconst offset = meshData[1];\n\tconst indices = meshData[2];\n\tconst indicesLength = meshData[3];\n\tconst parameters = meshData[4];\n\n\tconst module = self.module;\n\tconst rc = new module.rcConfig();\n\trc.cs = parameters.cs;\n\trc.ch = parameters.ch;\n\trc.borderSize = parameters.borderSize ? parameters.borderSize : 0;\n\trc.tileSize = parameters.tileSize ? parameters.tileSize : 0;\n\trc.walkableSlopeAngle = parameters.walkableSlopeAngle;\n\trc.walkableHeight = parameters.walkableHeight;\n\trc.walkableClimb = parameters.walkableClimb;\n\trc.walkableRadius = parameters.walkableRadius;\n\trc.maxEdgeLen = parameters.maxEdgeLen;\n\trc.maxSimplificationError = parameters.maxSimplificationError;\n\trc.minRegionArea = parameters.minRegionArea;\n\trc.mergeRegionArea = parameters.mergeRegionArea;\n\trc.maxVertsPerPoly = parameters.maxVertsPerPoly;\n\trc.detailSampleDist = parameters.detailSampleDist;\n\trc.detailSampleMaxError = parameters.detailSampleMaxError;\n\n\tif (!self.navMesh) {\n\t\tself.navMesh = new module.NavMesh();\n\t}\n\tself.navMesh.build(positions, offset, indices, indicesLength, rc);\n\n\tconst navmeshData = navMesh.getNavmeshData();\n\tconst arrView = new Uint8Array(module.HEAPU8.buffer, navmeshData.dataPointer, navmeshData.size);\n\tconst ret = new Uint8Array(navmeshData.size);\n\tret.set(arrView);\n\tnavMesh.freeNavmeshData(navmeshData);\n\n\tpostMessage(ret);\n}\n"])),this._worker=new Worker(this._workerURL),this.whenWorkerReady=new Promise(t=>{this._worker.addEventListener("message",()=>t(),{once:!0})})}init(t,e,i){this.gameControl=e,this.eventContext=i,this.setDefaultQueryExtent((new O).setScalar(t.ch*t.walkableRadius*1.2)),this._worker.onmessage=()=>{this.createNavMesh(i.page,t,t=>{this.buildFromNavmeshData(t.data)})},this.eventContext.renderer.domElement.addEventListener("pointerdown",this.onPointerDown)}createNavMesh(t,e,i){e.objects.forEach(e=>{let i=t.scene.find(e);i.traverseEntity(t=>{t.userData.navmesh=!0}),i.cloner?.traverseObject(t=>{t.userData.navmesh=!0})});let o=[],s=(this.usePhysics?this.traverseWithPhysics:this.traverseNoPhysics)(o,"custom"===e.zones);if(t.traverseChildren(s),e.objects.forEach(e=>{let i=t.scene.find(e);i.traverseEntity(t=>{t.userData.navmesh=void 0}),i.cloner?.traverseObject(t=>{t.userData.navmesh=void 0})}),0===o.length)return!1;let n=g(o),{positions:r,triIndices:a}=u(n.getAttribute("position"),n.getIndex());return this._worker.postMessage([r,r.length/3,a,a.length,{...Jt,...e}]),this._worker.onmessage=i,!0}createDebugNavGeometry(){let t,e,i=this.navMesh.getDebugNavMesh(),o=i.getTriangleCount(),s=new Uint32Array(3*o),n=new Float32Array(3*o*3);for(t=0;t<3*o;t++)s[t]=t;for(t=0;t<o;t++)for(e=0;e<3;e++){let o=i.getTriangle(t).getPoint(e);n[9*t+3*e+0]=o.x,n[9*t+3*e+1]=o.y,n[9*t+3*e+2]=o.z}let r=new X;return r.setIndex(new W(s,1)),r.setAttribute("position",new W(n,3)),r}getClosestPoint(t){return qt.x=t.x,qt.y=t.y,qt.z=t.z,this.navMesh.getClosestPoint(qt)}getClosestPointToRef(t,e){qt.x=t.x,qt.y=t.y,qt.z=t.z;let i=this.navMesh.getClosestPoint(qt);e.set(i.x,i.y,i.z)}getRandomPointAround(t,e){return qt.x=t.x,qt.y=t.y,qt.z=t.z,this.navMesh.getRandomPointAround(qt,e)}getRandomPointAroundToRef(t,e,i){qt.x=t.x,qt.y=t.y,qt.z=t.z;let o=this.navMesh.getRandomPointAround(qt,e);i.set(o.x,o.y,o.z)}moveAlong(t,e){return qt.x=t.x,qt.y=t.y,qt.z=t.z,Ut.x=e.x,Ut.y=e.y,Ut.z=e.z,this.navMesh.moveAlong(qt,Ut)}moveAlongToRef(t,e,i){return qt.x=t.x,qt.y=t.y,qt.z=t.z,Ut.x=e.x,Ut.y=e.y,Ut.z=e.z,this.navMesh.moveAlong(qt,Ut)}computePath(t,e){let i=this.getClosestPoint(e);if(Ut.x=i.x,Ut.y=i.y,Ut.z=i.z,Math.sqrt(Math.pow(e.x-i.x,2)+Math.pow(e.y-i.y,2)+Math.pow(e.z-i.z,2))>this.getDefaultQueryExtent().y)return[];this.getClosestPoint(t);let o=this.navMesh.computePath(qt,Ut),s=o.getPointCount(),n=[];for(let t=0;t<s;t++){let e=o.getPoint(t);n.push(new O(e.x,e.y,e.z))}return n}createCrowd(t,e){return new te(this,t,e)}setDefaultQueryExtent(t){qt.x=t.x,qt.y=t.y,qt.z=t.z,this.navMesh.setDefaultQueryExtent(qt)}getDefaultQueryExtent(){return this.navMesh.getDefaultQueryExtent()}buildFromNavmeshData(t){let e=t.length*t.BYTES_PER_ELEMENT,i=this.navmeshWasm._malloc(e),o=new Uint8Array(this.navmeshWasm.HEAPU8.buffer,i,e);o.set(t);let s=new this.navmeshWasm.NavmeshData;s.dataPointer=o.byteOffset,s.size=t.length,this.navMesh.buildFromNavmeshData(s),this.navmeshWasm._free(o.byteOffset)}getNavmeshData(){let t=this.navMesh.getNavmeshData(),e=new Uint8Array(this.navmeshWasm.HEAPU8.buffer,t.dataPointer,t.size),i=new Uint8Array(t.size);return i.set(e),this.navMesh.freeNavmeshData(t),i}getDefaultQueryExtentToRef(t){let e=this.navMesh.getDefaultQueryExtent();t.set(e.x,e.y,e.z)}dispose(){this.navMesh.destroy(),this._worker.terminate(),URL.revokeObjectURL(this._workerURL),this.eventContext?.renderer.domElement.removeEventListener("pointerdown",this.onPointerDown)}addCylinderObstacle(t,e,i){return qt.x=t.x,qt.y=t.y,qt.z=t.z,this.navMesh.addCylinderObstacle(qt,e,i)}addBoxObstacle(t,e,i){return qt.x=t.x,qt.y=t.y,qt.z=t.z,Ut.x=e.x,Ut.y=e.y,Ut.z=e.z,this.navMesh.addBoxObstacle(qt,Ut,i)}removeObstacle(t){this.navMesh.removeObstacle(t)}isSupported(){return void 0!==this.navmeshWasm}},te=class{constructor(t,e,i){this.navmeshWasmWrapper=t,this.transforms=[],this.agents=new Array,this.reachRadii=new Array,this._agentDestinationArmed=new Array,this._agentDestination=new Array,this.crowd=new this.navmeshWasmWrapper.navmeshWasm.Crowd(e,i,this.navmeshWasmWrapper.navMesh.getNavMesh())}onReachTarget(t,e){}addAgent(t,e,i){let o=new this.navmeshWasmWrapper.navmeshWasm.dtCrowdAgentParams;o.radius=e.radius,o.height=e.height,o.maxAcceleration=e.maxAcceleration,o.maxSpeed=e.maxSpeed,o.collisionQueryRange=e.collisionQueryRange,o.pathOptimizationRange=e.pathOptimizationRange,o.separationWeight=e.separationWeight,o.updateFlags=7,o.obstacleAvoidanceType=0,o.queryFilterType=0,o.userData=0;let s=this.crowd.addAgent(new this.navmeshWasmWrapper.navmeshWasm.Vec3(t.x,t.y,t.z),o);return this.transforms.push(i),this.agents.push(s),this.reachRadii.push(e.reachRadius?e.reachRadius:e.radius),this._agentDestinationArmed.push(!1),this._agentDestination.push(new O(0,0,0)),s}getAgentPosition(t){return this.crowd.getAgentPosition(t)}getAgentPositionToRef(t,e){let i=this.crowd.getAgentPosition(t);e.set(i.x,i.y,i.z)}getAgentVelocity(t){return this.crowd.getAgentVelocity(t)}getAgentVelocityToRef(t,e){let i=this.crowd.getAgentVelocity(t);e.set(i.x,i.y,i.z)}getAgentNextTargetPath(t){return this.crowd.getAgentNextTargetPath(t)}getAgentNextTargetPathToRef(t,e){let i=this.crowd.getAgentNextTargetPath(t);e.set(i.x,i.y,i.z)}getAgentState(t){return this.crowd.getAgentState(t)}overOffmeshConnection(t){return this.crowd.overOffmeshConnection(t)}agentGoto(t,e){this.crowd.agentGoto(t,new this.navmeshWasmWrapper.navmeshWasm.Vec3(e.x,e.y,e.z));let i=this.agents.indexOf(t);i>-1&&(this._agentDestinationArmed[i]=!0,this._agentDestination[i].set(e.x,e.y,e.z))}agentTeleport(t,e){this.crowd.agentTeleport(t,new this.navmeshWasmWrapper.navmeshWasm.Vec3(e.x,e.y,e.z))}updateAgentParameters(t,e){let i=this.crowd.getAgentParameters(t);void 0!==e.radius&&(i.radius=e.radius),void 0!==e.height&&(i.height=e.height),void 0!==e.maxAcceleration&&(i.maxAcceleration=e.maxAcceleration),void 0!==e.maxSpeed&&(i.maxSpeed=e.maxSpeed),void 0!==e.collisionQueryRange&&(i.collisionQueryRange=e.collisionQueryRange),void 0!==e.pathOptimizationRange&&(i.pathOptimizationRange=e.pathOptimizationRange),void 0!==e.separationWeight&&(i.separationWeight=e.separationWeight),this.crowd.setAgentParameters(t,i)}removeAgent(t){this.crowd.removeAgent(t);let e=this.agents.indexOf(t);e>-1&&(this.agents.splice(e,1),this.transforms.splice(e,1),this.reachRadii.splice(e,1),this._agentDestinationArmed.splice(e,1),this._agentDestination.splice(e,1))}getAgents(){return this.agents}update(t){if(this.navmeshWasmWrapper.navMesh.update(),t<=.001)return;let e=1/60;{let i=Math.floor(t/e);i>10&&(i=10),i<1&&(i=1);let o=t/i;for(let t=0;t<i;t++)this.crowd.update(o)}for(let t=0;t<this.agents.length;t++){let e=this.agents[t],i=this.getAgentPosition(e);if(this.transforms[t].copy(i),this._agentDestinationArmed[t]){let o=i.x-this._agentDestination[t].x,s=i.z-this._agentDestination[t].z,n=this.reachRadii[t],r=this._agentDestination[t].y-this.reachRadii[t],a=this._agentDestination[t].y+this.reachRadii[t],h=o*o+s*s;i.y>r&&i.y<a&&h<n*n&&(this.onReachTarget(e,this._agentDestination[t]),this._agentDestinationArmed[t]=!1)}}}setDefaultQueryExtent(t){let e=new this.navmeshWasmWrapper.navmeshWasm.Vec3(t.x,t.y,t.z);this.crowd.setDefaultQueryExtent(e)}getDefaultQueryExtent(){return this.crowd.getDefaultQueryExtent()}getDefaultQueryExtentToRef(t){let e=this.crowd.getDefaultQueryExtent();t.set(e.x,e.y,e.z)}getCorners(t){let e,i=this.crowd.getCorners(t),o=i.getPointCount(),s=[];for(e=0;e<o;e++){let t=i.getPoint(e);s.push(new O(t.x,t.y,t.z))}return s}dispose(){this.crowd.destroy()}};i({setup:function(t){let{manager:e,camera:i}=t,o=!1,s=5,n=8,r=9,a="drag",h=e.page.data.publish.gameControlObject,c=null!==h?e.page.find(h):null,d=null;if(c)for(let t of c.data.events){if(t.data.disabled||"GameControl"!==t.data.type)continue;let i=c;for(;e.usePhysics&&null!==(i=i.parent)?.parent;)i.data.physics;t.data.collisionEnabled&&(e.needsCollisionDetection=!0),null===d&&(d=t.data)}if(c&&d&&(!0===c.data.visible||!0===c.data.physics.enabled)){o=o||d.camera===i.uuid||c.uuid===i.uuid;let h=new Yt(c,t.renderer.domElement,d,t.eventContext.page.data.globalPhysics,e,c.uuid!==i.uuid&&d.camera===i.uuid,i,e.page,t.sharedAssets);e.gameControl=h,s=d.joystickPosLoc,n=d.joystickRotLoc,r=d.jumpTouchButtonLoc,a=d.rotByTouch,l&&d.touchControl&&(e.joystickToGameControls[s]="pos","walk"===d.moveMode&&(e.joystickToGameControls[r]="jmp"),"joystick"===a&&(e.joystickToGameControls[n]="rot"))}if(e.gameControl&&e.gameControl.data.navmesh.enabled){let i=e.gameControl.data;if(!e.navigationMeshWrapper){let o;e.navigationMeshWrapper=new $t(e.usePhysics,t.isExport),o="sphere"===i.collider.type?2*i.collider.radius:i.collider.height,o=Math.floor(o/i.navmesh.ch-1),e.navigationMeshWrapper.init({...i.navmesh,walkableHeight:o},e.gameControl,t.eventContext)}}return o},createJoysticks:function(t,e,i){t.joystickToGameControls.forEach((o,s)=>{let n=document.body.appendChild(document.createElement("div")),[r,a,h]=t.eventManager.eventContext.publish.joystickSizeAndXYOffset[s],l=(e-5*r)/4+r,c={},d="jmp"===o,m=d?0:r;s<10?(s<5?c.top=m/2:c.bottom=m/2,c.left=m/2+s%5*l):10===s?(c.left=m/2,c.top=i/2):(c.right=m/2,c.top=i/2),c.top?c.top-=a[1]:c.bottom+=a[1],c.left?c.left+=a[0]:c.right-=a[0];for(let t in c)c[t]+="px";if(d){let e=n.appendChild(document.createElement("div"));Object.assign(e.style,c,{position:"absolute",width:r+"px",height:r+"px",backgroundColor:`rgba(255,255,255,${"show"===h?.4:0})`,zIndex:"9999",borderRadius:r+"px",border:"show"===h?"solid 2px rgba(0, 0, 0, .1)":"none",display:"flex",alignItems:"center",justifyContent:"center",touchAction:"none"});let i=r/16*16*.4;return"show"===h&&(e.innerHTML=`\n\t\t\t\t\t\t<svg width="${i}" height="${.4*r}" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n\t\t\t\t\t\t\t<path d="M2 10L8 4L14 10" stroke="black" stroke-opacity="40%" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t`),e.addEventListener("pointerdown",()=>{t.gameControl.movementState.jump=1,t.requestRender()}),e.addEventListener("touchend",t=>t.preventDefault()),void(t.joysticks[s]=[void 0,n])}let p={zone:n,mode:"static",position:c,size:r};"hide"===h&&(p.restOpacity=0);let u=ut.create(p);u.on("move",(e,i)=>{let s=t.gameControl;"pos"===o?i.force<.2?s.moveForce=0:(s.movementState.movePosZ=Math.sin(-i.angle.radian),s.movementState.movePosX=Math.cos(-i.angle.radian),i.force>1.2?s.movementState.run=1:s.movementState.run=0,i.force<.3?s.moveForce=(i.force-.2)/.1:s.moveForce=1):"rot"===o&&(i.force<.2?s.rotForce=0:(s.movementState.rotPosX=i.vector.y,s.movementState.rotPosY=-i.vector.x,i.force<.3?s.rotForce=(i.force-.2)/.1:s.rotForce=1)),t.requestRender()}),u.on("end",(e,i)=>{let s=t.gameControl;"pos"===o?(s.movementState.movePosZ=0,s.movementState.movePosX=0,s.moveForce=1):"rot"===o&&(s.movementState.rotPosX=0,s.movementState.rotPosY=0,s.rotForce=1)}),t.joysticks[s]=[u,n]})}}),P("game-controls");
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{k as r}from"./runtime-chunk-EXHPAC6T.js";import"./runtime-chunk-ZLW3UWOA.js";import"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-Z5OH244S.js";import{a as i,d as m}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-OW6T4XFV.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";m("Hair",(i,m,n)=>new r(i,m,n)),i("hair");
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as t,b as e,c as s,d as i}from"./runtime-chunk-PXPQZ7SX.js";import"./runtime-chunk-MVRGHRTL.js";import{a as n}from"./runtime-chunk-NBYTQLIB.js";import{h as r}from"./runtime-chunk-BCJEHBXX.js";import"./runtime-chunk-4FAMJWEB.js";import"./runtime-chunk-ZHNGVKGZ.js";import"./runtime-chunk-TU4KDRKR.js";import{a as o,b as a}from"./runtime-chunk-DZNU62CT.js";import{a as h}from"./runtime-chunk-VAVYZ35B.js";import{e as c}from"./runtime-chunk-FQNSP44B.js";import"./runtime-chunk-W7THORYR.js";import"./runtime-chunk-MC3OVJQU.js";import"./runtime-chunk-6UQ4Z4JG.js";import"./runtime-chunk-D2IFC55F.js";import"./runtime-chunk-NRJDJMQZ.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{f as u,g as m}from"./runtime-chunk-MM75L5X4.js";import"./runtime-chunk-ZLW3UWOA.js";import{e as v,f as p}from"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-4KZXQGUQ.js";import{a as d}from"./runtime-chunk-Z5OH244S.js";import{a as E}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-OW6T4XFV.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var f=class{constructor(t,e,s,i,n,r){this.id=t,this.data=e,this.object=s,this.entered=!1,this.actions=u(e,e.actions,i,n,r,s)}disconnect(){m(this.actions)}dispatchEnter(){this.actions.Transition.forEach(t=>{t.object.currentTransitionEvent!==this&&(t.object.currentTransitionEvent=this,t.init())}),this.entered||(this.entered=!0,this.actions.TimelineAnimation.forEach(t=>t.playFromCurrent()),this.actions.Transition.forEach(t=>t.playFromCurrent()),this.actions.Animation.forEach(t=>t.play()),this.actions.Create.forEach(t=>t.dispatchStart()),this.actions.Particles.forEach(t=>t.dispatchBasic()),this.actions.Destroy.forEach(t=>t.dispatch()),this.actions.SwitchCamera.forEach(t=>t.playFromCurrent()),this.actions.SceneTransition.forEach(t=>t.dispatch()),this.actions.SetVariable.forEach(t=>t.checkConditions()),this.actions.SetVariable.forEach(t=>t.dispatch()),this.actions.DynamicVariablePlay.forEach(t=>t.dispatch()),this.actions.ClearLocalStorage.forEach(t=>t.dispatch()),this.actions.UserAPI.forEach(t=>t.dispatch()))}dispatchLeave(){this.actions.Transition.forEach(t=>{t.object.currentTransitionEvent!==this&&(t.object.currentTransitionEvent=this,t.init())}),this.entered&&(this.entered=!1,this.actions.TimelineAnimation.forEach(t=>t.reverseFromCurrent()),this.actions.Create.forEach(t=>t.dispatchStop()),this.actions.Transition.forEach(t=>t.reverseFromCurrent()),this.actions.Particles.forEach(t=>t.reverseFromCurrent()),this.actions.SwitchCamera.forEach(t=>t.reverseFromCurrent()))}dispatchUserEvent(t){this.actions.Transition.forEach(t=>{t.object.currentTransitionEvent!==this&&(t.object.currentTransitionEvent=this,t.init())}),t?(this.actions.Transition.forEach(t=>t.reverseFromCurrent()),this.actions.Particles.forEach(t=>t.reverseFromCurrent()),this.actions.Animation.forEach(t=>t.reverseFromCurrent()),this.actions.TimelineAnimation.forEach(t=>t.reverseFromCurrent()),this.actions.SwitchCamera.forEach(t=>t.reverseFromCurrent())):(this.actions.Transition.forEach(t=>t.playFromCurrent()),this.actions.Animation.forEach(t=>t.playFromCurrent()),this.actions.TimelineAnimation.forEach(t=>t.playFromCurrent()),this.actions.Create.forEach(t=>t.dispatch()),this.actions.Particles.forEach(t=>t.dispatchBasic()),this.actions.Destroy.forEach(t=>t.dispatch()),this.actions.SwitchCamera.forEach(t=>t.playFromCurrent())),this.actions.SceneTransition.forEach(t=>t.dispatch()),this.actions.SetVariable.forEach(t=>t.checkConditions()),this.actions.SetVariable.forEach(t=>t.dispatch()),this.actions.DynamicVariablePlay.forEach(t=>t.dispatch()),this.actions.ClearLocalStorage.forEach(t=>t.dispatch()),this.actions.UserAPI.forEach(t=>t.dispatch())}},j=class extends o{constructor(t,e){super(t),this.eventManager=e,this.eventsPerObjects={},this.objects=[],this.objects2D=[],this._prevObjects=[],this.onMouseDown=t=>{h.length>1||(this.eventContext.updateRaycaster(t),this.handleMouseHoverEvent())},this.onMouseUp=t=>{h.length>1||this.handleMouseHoverEvent(!0)},this.onMouseMove=t=>{h.length>1||(this.eventContext.updateRaycaster(t),this.handleMouseHoverEvent())},this.onUserEvent=({eventName:t,target:e,reverse:s})=>{if(!t||!e)return;let i=n(t);i&&"MouseHover"===i&&(e.dispatchEvent({type:"beginEvent",eventName:"MouseHover"}),this.eventsPerObjects[e.uuid]?.forEach(t=>t.dispatchUserEvent(s)))}}connect(){let{page:t,sharedAssets:e}=this.eventContext,s=(s,i)=>{if(s.visible&&s.data?.events.length){for(let{id:i,data:n}of s.data.events)if(!n.disabled&&"MouseHover"===n.type)try{let r=new f(i,n,s,t,e,this.eventManager);this.eventsPerObjects[s.uuid]?this.eventsPerObjects[s.uuid].push(r):this.eventsPerObjects[s.uuid]=[r]}catch(t){d&&console.error(t)}this.eventsPerObjects[s.uuid]?.length&&this.objects.push(v(s)?i:s)}};if(t.traverseEntity(t=>{(p(t)||t instanceof r)&&t.frame?.traverse(e=>{s(e,t)}),s(t)}),!this.objects.length)return;let{domElement:i}=this.eventContext;this.domEventsNeeded.clear(),c&&(this.domEventsNeeded.add("pointerdown"),i.addEventListener("pointerdown",this.onMouseDown),this.domEventsNeeded.add("pointerup"),i.addEventListener("pointerup",this.onMouseUp)),this.domEventsNeeded.add("pointermove"),i.addEventListener("pointermove",this.onMouseMove),this.objects.forEach(t=>{t.addEventListener("userEvent",this.onUserEvent)})}disconnect(){if(!this.objects.length)return;let{domElement:t}=this.eventContext;this.domEventsNeeded.clear(),c&&(t.removeEventListener("pointerdown",this.onMouseDown),t.removeEventListener("pointerup",this.onMouseUp)),t.removeEventListener("pointermove",this.onMouseMove),Object.values(this.eventsPerObjects).forEach(t=>{t.forEach(t=>{t.disconnect()})}),this.objects.forEach(t=>{t.removeEventListener("userEvent",this.onUserEvent)})}handleMouseHoverEvent(n=!1){let r=[];if(!n){let{stopRaycast:n,raycaster:o,page:a,pointerScreen:h}=this.eventContext,c=!1;if(a.uiCanvas&&(c=s(a,[h.x,h.y],Object.keys(this.eventsPerObjects),t=>{r.push(t)})),n&&!c){let i=t(o,a,this.objects);r=e(i),i.forEach(t=>{p(t.object)&&s(t.object,[t?.uv?.x??0,t?.uv?.y??0],Object.keys(this.eventsPerObjects),t=>{r.push(t)})})}else this.objects.forEach(t=>{let e=i(o,t);e&&(r.push(t),p(t)&&s(t,[e?.uv?.x??0,e?.uv?.y??0],Object.keys(this.eventsPerObjects),t=>{r.push(t)}))})}this._prevObjects.length&&this._prevObjects.forEach(t=>{r.includes(t)||(t.dispatchEvent({type:"beginEvent",eventName:"MouseHover"}),this.eventsPerObjects[t.uuid]?.forEach(t=>t.dispatchLeave()))}),r.length&&r.forEach(t=>{t.dispatchEvent({type:"beginEvent",eventName:"MouseHover"}),this.eventsPerObjects[t.uuid]?.forEach(t=>t.dispatchEnter())}),this._prevObjects=r}};a("MouseHover",({eventContext:t,eventManager:e})=>new j(t,e)),E("mousehover");
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as t}from"./runtime-chunk-BCJEHBXX.js";import"./runtime-chunk-4FAMJWEB.js";import"./runtime-chunk-ZHNGVKGZ.js";import"./runtime-chunk-TU4KDRKR.js";import{a as i,b as s}from"./runtime-chunk-DZNU62CT.js";import"./runtime-chunk-W7THORYR.js";import"./runtime-chunk-MC3OVJQU.js";import"./runtime-chunk-D2IFC55F.js";import"./runtime-chunk-NRJDJMQZ.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{f as e,g as a}from"./runtime-chunk-MM75L5X4.js";import"./runtime-chunk-ZLW3UWOA.js";import{f as n}from"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-4KZXQGUQ.js";import{a as r}from"./runtime-chunk-Z5OH244S.js";import{a as o}from"./runtime-chunk-TZCHGFVF.js";import{u as c}from"./runtime-chunk-OW6T4XFV.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var h=class{constructor(t,i,s,a,n,r,o,c){this.eventId=t,this.id=i,this.data=s,this.dataEvent=a,this.object=n,this.stage=!1,this.actions=e(a,s.actions,r,o,c,n)}disconnect(){a(this.actions)}dispatchIn(){this.actions.Audio.forEach(t=>t.dispatchBasic()),this.actions.Particles.forEach(t=>t.dispatchBasic()),this.actions.Video.forEach(t=>t.dispatchBasic()),this.actions.Create.forEach(t=>t.dispatch()),this.actions.Destroy.forEach(t=>t.dispatch()),this.actions.Reset.forEach(t=>t.dispatch()),this.actions.Link.forEach(t=>t.dispatch()),this.actions.Transition.forEach(t=>{t.object.currentTransitionEvent!==this&&(t.object.currentTransitionEvent=this,t.init())}),this.actions.Transition.forEach(t=>t.toggle()),this.actions.Animation.forEach(t=>t.play()),this.actions.SwitchCamera.forEach(t=>t.play()),this.actions.SceneTransition.forEach(t=>t.dispatch()),this.actions.SetVariable.forEach(t=>t.checkConditions()),this.actions.SetVariable.forEach(t=>t.dispatch()),this.actions.DynamicVariablePlay.forEach(t=>t.dispatch()),this.actions.ClearLocalStorage.forEach(t=>t.dispatch()),this.actions.UserAPI.forEach(t=>t.dispatch())}dispatchOut(){this.actions.Transition.forEach(t=>{t.toggle()})}},m=class extends i{constructor(t,i){super(t),this.eventManager=i,this.breakpoints=[],this.resize=(t,i)=>{this.breakpoints.forEach(s=>{let e,a=c.deviceToSize(s.data.size),n="horizontal"===s.dataEvent.orientation?t:i;switch(s.data.operator){case"<":e=n<a[0];break;case">":e=n>a[0];break;case"<>":e=n>a[0]&&n<a[1]}s.stage!==e&&(s.stage=e,s.stage?s.dispatchIn():s.dispatchOut())})},this.onResizeObserver=new ResizeObserver(t=>{for(let i of t){let{width:t,height:s}=i.contentRect;this.resize(t,s)}})}connect(){let{page:i,sharedAssets:s,domElement:e}=this.eventContext;this.onResizeObserver.observe(e);let a=t=>{if(t.visible&&t.data?.events.length)for(let{data:e,id:a}of t.data.events)e.disabled||"Resize"===e.type&&e.breakpoints.forEach(({data:n,id:o})=>{try{let r=new h(a,o,n,e,t,i,s,this.eventManager);this.breakpoints.push(r)}catch(t){r&&console.error(t)}})};i.traverseEntity(i=>{(n(i)||i instanceof t)&&i.frame?.traverse(t=>{a(t)}),a(i)})}disconnect(){this.onResizeObserver.disconnect(),this.breakpoints.forEach(t=>{t.disconnect()}),this.breakpoints=[]}};s("Resize",({eventContext:t,eventManager:i})=>new m(t,i)),o("resize");
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{k as m}from"./runtime-chunk-32ZE2X4C.js";import"./runtime-chunk-Q4H7PFTE.js";import"./runtime-chunk-RAAW7WHN.js";import"./runtime-chunk-ZULFQKQK.js";import"./runtime-chunk-D6NWJJTR.js";import"./runtime-chunk-MC3OVJQU.js";import"./runtime-chunk-6UQ4Z4JG.js";import"./runtime-chunk-D2IFC55F.js";import"./runtime-chunk-NRJDJMQZ.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import"./runtime-chunk-ZLW3UWOA.js";import"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-Z5OH244S.js";import{a as n,f as r}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-OW6T4XFV.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";r("ShapeBlendGeometry",(n,r,t)=>new m(n,r,t)),n("shape-blends");
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as t,b as e,c as i,d as a,e as n,f as s,h as r,i as o}from"./runtime-chunk-U5ACSO5E.js";import"./runtime-chunk-XV2ZLRKD.js";import"./runtime-chunk-NTUTXO7Q.js";import{a as l}from"./runtime-chunk-R43XZP65.js";import{a as d}from"./runtime-chunk-SQKBNW2G.js";import{a as h,b as u}from"./runtime-chunk-4FAMJWEB.js";import"./runtime-chunk-ZHNGVKGZ.js";import"./runtime-chunk-FTVQTRM7.js";import{a as c}from"./runtime-chunk-W7THORYR.js";import"./runtime-chunk-D6NWJJTR.js";import"./runtime-chunk-MC3OVJQU.js";import"./runtime-chunk-D2IFC55F.js";import{Y as m,ca as p}from"./runtime-chunk-NRJDJMQZ.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{b as g,e as f}from"./runtime-chunk-MM75L5X4.js";import"./runtime-chunk-ZLW3UWOA.js";import{d as y}from"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-4KZXQGUQ.js";import{a as v,h as x,i as M,j as N}from"./runtime-chunk-Z5OH244S.js";import{a as b}from"./runtime-chunk-TZCHGFVF.js";import{A as C,B as k,C as T,D as j,E as O,q as F,z as w}from"./runtime-chunk-OW6T4XFV.js";import{Bc as A,Cc as E}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var D=0;function P(){D++}function I(t,e){return(e.epoch!==D||e.t!==t.t||e.index!==t.index)&&(e.epoch=D,e.t=t.t,e.index=t.index,!0)}function L(t,e,i,a){if(e){let n={},s=[...e.keyframes??[]].sort((t,e)=>t.data.time-e.data.time);if("data"in t){let e=s[0];e&&i?.(e.data.value,t),n={index:[],t:[]};for(let t=0;t<s.length-1;t++){let e=s[t],i=s[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*s[0].data.time:0};n.t.push({...a,value:t%2==0?1:0,easing:M(e.data.easing.type,{control1:x(e.data.easing.cubicControls?.control1,[0,0]),control2:x(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),n.index.push({...a,value:t,easing:"linear"})}if(s.length>1){let e={t:0,index:0},r={t:NaN,index:NaN};return{targets:e,...n,update:()=>{if(!I(e,r))return;let n=Math.ceil(e.index),o=n%2==0?e.t:1-e.t,l=s?.[Math.min(n,s.length-1)].data.value,d=s?.[Math.min(n,s.length-1)+1]?.data.value,h={},u={};if(Object.keys(l).length>0&&Object.keys(d).length>0)for(let e in t.data)if(e in l&&e in d){let t=_(l[e],d[e],o,a);void 0!==t&&(h[e]=t,u[e]={start:l,end:d,t:o})}i?.({...h},t,u)}}}}}}function _(t,e,i,a){if("string"==typeof t&&a&&(t=a.color(t)),"string"==typeof e&&a&&(e=a.color(e)),"number"==typeof t)return E.lerp(t,e,i);if(O.is(t))return O.lerp(t,e,i);if(j.is(t))return j.lerp(t,e,i);if(Array.isArray(t))return(t.length>e.length?e:t).map((a,n)=>{if(Array.isArray(a)){let a=t[n].length>e[n].length?e[n].length:t[n].length;return(4===a?k:3===a?C:w).lerp(t[n],e[n],i)}return E.lerp(t[n],e[n],i)});if("object"==typeof t&&null!==t){let n={};for(let s in t){let r=_(t[s],e[s],i,a);void 0!==r&&(n[s]=r)}return n}}var H=new Map,S=new Map,Z=class extends A{constructor(s,g,f,b,C,k,j){super(),this.id=s,this.data=g,this.scene=f,this.sharedAssets=b,this.object=C,this.eventType=k,this.actionCondition=j,this.toggleIsForward=!1,this._finished=!1,this.hasPlayedOnce=!1,this._shouldForwardLoop=!1,this._shouldPauseOnNextLoopComplete=!1,this.hiddenMatrixOverrides=[],this._onLoopComplete=()=>{this._shouldPauseOnNextLoopComplete&&(this.timeline.pause(),this._shouldPauseOnNextLoopComplete=!1)};try{let s=r(this.data);"number"==typeof s.loop&&s.loop--,this.timeline=l.timeline({...s,autoplay:!1}),this._shouldForwardLoop=!0===s.loop||"number"==typeof s.loop&&s.loop>1;let g=this.sharedAssets.data.timelineAnimations[this.data.timeline].mapping;Object.entries(g).forEach(([s,r])=>{let o=this.scene.find(s);if(!o)return;let l=o.data.timelineAnimations[r];if(!l)return;let g=o.data.states.data(r);g?.hiddenMatrix&&16===g.hiddenMatrix.length&&!T.isEqual(g.hiddenMatrix,o.data.hiddenMatrix)&&this.hiddenMatrixOverrides.push({objId:s,original:o.hiddenMatrix.clone(),state:g.hiddenMatrix});let v=function(n,s,r,o){let l=[];return s.properties.forEach(s=>{let g=s.data.path?.[0];if(g&&["position","rotation","scale"].includes(g)){let t=function(t,e=()=>{}){let i=[];for(let a of N){let n=[...t.keyframes??[]].filter(t=>void 0!==t.data.value[a]).sort((t,e)=>t.data.time-e.data.time),s=n[0];s&&e?.(s.data.value);let r={index:[],t:[]};for(let t=0;t<n.length-1;t++){let e=n[t],i=n[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*n[0].data.time:0};r.t.push({...a,value:t%2==0?1:0,easing:M(e.data.easing.type,{control1:x(e.data.easing.cubicControls?.control1,[0,0]),control2:x(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),r.index.push({...a,value:t,easing:"linear"})}if(n.length>1){let t={t:0,index:0},s={t:NaN,index:NaN};i.push({targets:t,...r,update:()=>{if(!I(t,s))return;let i=Math.ceil(t.index),r=i%2==0?t.t:1-t.t,o=n?.[i].data.value,l=n?.[i+1]?.data.value;void 0!==o&&void 0!==l&&e?.({[a]:o[a]+(l[a]-o[a])*r})}})}}return i}(s.data,r?.[g]);t&&l.push(...t)}if(g&&"shape size"===g&&"geometry"in n){let t=function(t,e,i){let a=[];for(let t of N){let n={},s=[...e.keyframes??[]].filter(e=>void 0!==e.data.value[t]).sort((t,e)=>t.data.time-e.data.time),r=s[0];r&&i?.(r.data.value),n={index:[],t:[]};for(let t=0;t<s.length-1;t++){let e=s[t],i=s[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*s[0].data.time:0};n.t.push({...a,value:t%2==0?1:0,easing:M(e.data.easing.type,{control1:x(e.data.easing.cubicControls?.control1,[0,0]),control2:x(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),n.index.push({...a,value:t,easing:"linear"})}if(s.length>1){let e={t:0,index:0},r={t:NaN,index:NaN};a.push({targets:e,...n,update:()=>{if(!I(e,r))return;let a=Math.ceil(e.index),n=a%2==0?e.t:1-e.t,o=s?.[a].data.value,l=s?.[a+1]?.data.value;void 0!==o&&void 0!==l&&i?.({[t]:o[t]+(l[t]-o[t])*n})}})}}return a}(0,s.data,r?.shapeSize);t&&l.push(...t)}if(g&&"path extrusion"===g&&y(n)){let e=function(e,i,a){let n={},s=[...i.keyframes??[]].sort((t,e)=>t.data.time-e.data.time),r=s[0];r&&a?.(e,r.data.value),n={index:[],t:[]};for(let t=0;t<s.length-1;t++){let e=s[t],i=s[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*s[0].data.time:0};n.t.push({...a,value:t%2==0?1:0,easing:M(e.data.easing.type,{control1:x(e.data.easing.cubicControls?.control1,[0,0]),control2:x(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),n.index.push({...a,value:t,easing:"linear"})}if(s.length>1){let i={t:0,index:0},r={t:NaN,index:NaN};return{targets:i,...n,update:()=>{if(!I(i,r))return;let n=Math.ceil(i.index),o=n%2==0?i.t:1-i.t,l=s?.[Math.min(n,s.length-1)].data.value,d=s?.[Math.min(n,s.length-1)+1]?.data.value;a?.(e,t(e,l,d,o))}}}}(n,s.data,r?.pathExtrusion);e&&l.push(e)}if(g&&"path snapping"===g&&n.data.pathSnapping){let t=function(t,i,a){let n={},s=[...i.keyframes??[]].sort((t,e)=>t.data.time-e.data.time),r=s[0];r&&a?.(r.data.value),n={index:[],t:[]};for(let t=0;t<s.length-1;t++){let e=s[t],i=s[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*s[0].data.time:0};n.t.push({...a,value:t%2==0?1:0,easing:M(e.data.easing.type,{control1:x(e.data.easing.cubicControls?.control1,[0,0]),control2:x(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),n.index.push({...a,value:t,easing:"linear"})}if(s.length>1){let i={t:0,index:0},r={t:NaN,index:NaN};return{targets:i,...n,update:()=>{if(!I(i,r))return;let n=Math.ceil(i.index),o=n%2==0?i.t:1-i.t,l=s?.[Math.min(n,s.length-1)].data.value,d=s?.[Math.min(n,s.length-1)+1]?.data.value;a?.(e(t,l,d,o))}}}}(n,s.data,r?.pathSnapping);t&&l.push(t)}if(g&&"material"===g&&"Mesh"===n.type&&"material"in n){let t=p(n.material)?n.material:void 0;if(t){let e=s.data.id;if(e){let i=(s.data.keyframes??[]).some(t=>m(t.data.value?.noiseStrength)),a=t.ensureRainbowNoiseCompiled,n=e=>{i&&"function"==typeof a&&a.call(t,e)};n(e);let d=t.getLayerByUuid(e);if(d){let t=L(d,s.data,r?.material,o);t&&l.push(t)}else{let e=s.data.type;for(let i of t.getLayersOfType(e))n(i.uuid);let i=t.getLayersOfType(e);if(i)for(let t of i){let e=L(t,s.data,r?.material,o);e&&l.push(e)}}}}}if(g&&"opacity"===g&&"Mesh"===n.type&&"material"in n){let t=function(t,e){if(t){let i={},a=[...t.keyframes??[]].sort((t,e)=>t.data.time-e.data.time),n=a[0];n&&e?.(n.data.value),i={index:[],t:[]};for(let t=0;t<a.length-1;t++){let e=a[t],n=a[t+1]??e,s={duration:1e3*(n?.data?.time-e.data.time),delay:0===t?1e3*a[0].data.time:0};i.t.push({...s,value:t%2==0?1:0,easing:M(e.data.easing.type,{control1:x(e.data.easing.cubicControls?.control1,[0,0]),control2:x(n.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),i.index.push({...s,value:t,easing:"linear"})}if(a.length>1){let t={t:0,index:0},n={t:NaN,index:NaN};return{targets:t,...i,update:()=>{if(!I(t,n))return;let i=Math.ceil(t.index),s=i%2==0?t.t:1-t.t,r=a?.[Math.min(i,a.length-1)].data.value,o=a?.[Math.min(i,a.length-1)+1]?.data.value;e?.(E.lerp(r,o,s))}}}}}(s.data,r?.opacity);t&&l.push(t)}if(g&&"cloner"===g){let t=function(t,e,n){let s={},r=[...e.keyframes??[]].sort((t,e)=>t.data.time-e.data.time),o=r[0];o&&n?.(t,o.data.value,o.data.value),s={index:[],t:[]};for(let t=0;t<r.length-1;t++){let e=r[t],i=r[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*r[0].data.time:0};s.t.push({...a,value:t%2==0?1:0,easing:M(e.data.easing.type,{control1:x(e.data.easing.cubicControls?.control1,[0,0]),control2:x(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),s.index.push({...a,value:t,easing:"linear"})}if(r.length>1){let e={t:0,index:0},o={t:NaN,index:NaN};return{targets:e,...s,update:()=>{if(!I(e,o))return;let s=Math.ceil(e.index),l=s%2==0?e.t:1-e.t,d=r?.[Math.min(s,r.length-1)].data.value,h=r?.[Math.min(s,r.length-1)+1]?.data.value;n?.(t,d.randomnessObject?void 0:i(d,h,l,t),d.randomnessObject?a(d,h,l,t):void 0)}}}}(n,s.data,r?.cloner);t&&l.push(t)}if(g&&"camera"===g&&n instanceof c){let t=function(t,e,i,a){if(e){let n={[a]:[]},s=[...e.keyframes??[]].sort((t,e)=>t.data.time-e.data.time),r=s[0];r&&(t[a]=r.data.value,i?.(a,r.data.value));for(let t=0;t<s.length-1;t++){let e=s[t];if(!Number.isFinite(e.data.value))continue;let i=s[t+1]??e;n[a].push({value:i.data.value,easing:M(e.data.easing.type,{control1:x(e.data.easing.cubicControls?.control1,[0,0]),control2:x(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters),duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*s[0].data.time:0})}if(s.length>1)return{targets:t,...n,update:()=>{i?.(a,t[a])}}}}(n,s.data,r?.camera,"zoom");t&&l.push(t)}if(g&&"light"===g&&(n instanceof h||n instanceof d||n instanceof u)){let t=function(t,e,i,a,n){if(e){let s={},r=[...e.keyframes??[]].sort((t,e)=>t.data.time-e.data.time),o=r[0];if(o){let e=o.data.value;t[a]=e,i?.(a,e)}s={index:[],t:[]};for(let t=0;t<r.length-1;t++){let e=r[t],i=r[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*r[0].data.time:0};s.t.push({...a,value:t%2==0?1:0,easing:M(e.data.easing.type,{control1:x(e.data.easing.cubicControls?.control1,[0,0]),control2:x(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),s.index.push({...a,value:t,easing:"linear"})}if(r.length>1){let t={t:0,index:0},e={t:NaN,index:NaN};return{targets:t,...s,update:()=>{if(!I(t,e))return;let s=Math.ceil(t.index),o=s%2==0?t.t:1-t.t,l=r?.[Math.min(s,r.length-1)].data.value,d=r?.[Math.min(s,r.length-1)+1]?.data.value;i?.(a,_(l,d,o,n))}}}}}(n,s.data,r?.light,s.data.path[1],o);t&&l.push(t)}}),l}(o,{...l},n(o,{scene:f,shared:b}),this.sharedAssets),C=("start"===this.data.delayDirection?this.data.delay:0)+("start-end"===this.data.delayDirection?this.data.delay:0)+("start-once"===this.data.delayDirection?this.data.delay:0);v.forEach(t=>{this.timeline.add(t,C)}),this.timeline.duration=1e3*l.to+C}),this.timeline.delay=0,this.timeline.duration+=("start"===this.data.delayDirection?this.data.delay:0)+("end"===this.data.delayDirection?this.data.delay:0)+("start-end"===this.data.delayDirection?2*this.data.delay:0)+("start-once"===this.data.delayDirection?2*this.data.delay:0),this.timeline.finished.then(()=>{Object.keys(g).forEach(t=>{let e=this.scene.find(t);e instanceof c&&e.dispatchEvent(o)}),this._finished=!0}),this.timeline.loopComplete=this._onLoopComplete}catch(t){throw v&&console.error(t),new Error("Missing property")}C&&(S.has(C.uuid)?S.get(C.uuid).push(this):S.set(C.uuid,[this])),H.set(s,this)}get playing(){return!1===this.timeline.paused}get finished(){return this._finished}get paused(){return this.timeline.paused}applyStateHiddenMatrices(){for(let{objId:t,state:e}of this.hiddenMatrixOverrides){let i=this.scene.find(t);i&&i.hiddenMatrix.fromArray(e)}}restoreOriginalHiddenMatrices(){for(let{objId:t,original:e}of this.hiddenMatrixOverrides){let i=this.scene.find(t);i&&i.hiddenMatrix.copy(e)}}play(){let t=void 0!==this.eventType&&F(this.eventType)&&"Once"===this.data.runMode&&this.hasPlayedOnce&&this.paused&&this.timeline.currentTime>0&&!this._finished;if(void 0!==this.eventType&&F(this.eventType)&&"Once"===this.data.runMode&&this.hasPlayedOnce&&!t||void 0===this.eventType&&this._finished)return!1;this.hasPlayedOnce=!0,this.applyStateHiddenMatrices();let e=this.sharedAssets.data.timelineAnimations[this.data.timeline].mapping;Object.keys(e).forEach(t=>{let e=this.scene.find(t);e instanceof c&&e.dispatchEvent(s)}),P(),this.paused&&this.timeline.currentTime>0?this.timeline.play():this.timeline.restart()}pauseTimeline(){this.paused||this.timeline.pause()}pause(){this.pauseTimeline()}stop(){this.pauseTimeline(),this.seek(0),this.timeline.reset(),this.restoreOriginalHiddenMatrices(),this._finished=!1}seek(t){this.timeline.seek(t*this.timeline.duration,!0)}toggle(t){let e=this.paused&&this.timeline.currentTime>0&&this.timeline.currentTime<this.timeline.duration;if(void 0!==t?this.toggleIsForward=t:e||(this.toggleIsForward=!this.toggleIsForward),this.playing){if(!this.toggleIsForward&&this.timeline.reversed&&this._shouldForwardLoop&&this.timeline.remaining%2==1)return void(this._shouldPauseOnNextLoopComplete=!0);this.timeline.reverse(this.timeline.duration-this.timeline.currentTime),this._shouldForwardLoop&&this.timeline.loop&&this.timeline.reversed&&(this._shouldPauseOnNextLoopComplete=!0)}else this.applyStateHiddenMatrices(),P(),(!this.toggleIsForward!==this.timeline.reversed||!this.toggleIsForward&&this.timeline.reversed&&"alternate"===this.timeline.direction)&&this.timeline.reverse(),"number"==typeof this.timeline.loop&&"number"==typeof this.timeline.remaining&&this.timeline.remaining<this.timeline.loop&&this.toggleIsForward&&(this.timeline.remaining=this.timeline.loop),this.timeline.play()}playFromCurrent(){this.toggle(!0)}reverseFromCurrent(){this.toggle(!1)}dispose(){this.pauseTimeline(),this.restoreOriginalHiddenMatrices()}},R=class{constructor(t){this.data=t}dispatch(){this.data.playTimeline?this.pauseTimeline(this.data.playTimeline):this.data.object?this.pauseAllTimelinesFromObject(this.data.object):this.pauseAllTimelines()}pauseTimeline(t){let e=this.getTimelineActions(t);!e.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{e.forEach(t=>{t[this.data.interaction]()}),this.disposeDelay()},this.data.delay)):e.forEach(t=>{t[this.data.interaction]()}))}getTimelineActions(t){let e=H.get(t);return e?[e]:[...H.values()].filter(e=>e.data.timeline===t)}pauseAllTimelinesFromObject(t){let e=S.get(t);!e?.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{e.forEach(t=>t[this.data.interaction]()),this.disposeDelay()},this.data.delay)):e.forEach(t=>t[this.data.interaction]()))}pauseAllTimelines(){let t=[...S.values()];!t.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{t.forEach(t=>{t.forEach(t=>{t[this.data.interaction]()})}),this.disposeDelay()},this.data.delay)):t.forEach(t=>{t.forEach(t=>{t[this.data.interaction]()})}))}disposeDelay(){clearTimeout(this.timeoutId),delete this.timeoutId}dispose(){clearTimeout(this.timeoutId),delete this.timeoutId}},U=class{constructor(t,e,i,a,n,s,r){this.data=e;let o="interaction"in e?e.interaction:"play";if("play"===o||void 0===o)this.interaction=new Z(t,e,i,a,n,s,r);else{if("pause"!==o&&"stop"!==o)throw new Error("Missing property");this.interaction=new R(e)}}get playing(){return this.interaction instanceof Z&&this.interaction.playing}get finished(){return!(this.interaction instanceof Z)||this.interaction.finished}get paused(){return!(this.interaction instanceof Z)||this.interaction.paused}play(){if(this.interaction instanceof Z)return this.interaction.play();this.interaction.dispatch()}stop(){this.interaction instanceof Z&&this.interaction.stop()}seek(t){this.interaction instanceof Z&&this.interaction.seek(t)}toggle(t){this.interaction instanceof Z?this.interaction.toggle(t):this.interaction.dispatch()}playFromCurrent(){this.interaction instanceof Z?this.interaction.playFromCurrent():this.interaction.dispatch()}dispatchConditional(){this.interaction instanceof Z?f(this.interaction.sharedAssets,this.interaction.actionCondition)&&this.interaction.playFromCurrent():this.interaction.dispatch()}reverseFromCurrent(){this.interaction instanceof Z&&this.interaction.reverseFromCurrent()}dispose(){this.interaction.dispose()}};g("TimelineAnimation",({id:t,data:e,page:i,shared:a,object:n,eventType:s,actionCondition:r})=>new U(t,e,i.scene,a,n,s,r)),b("timeline");
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./runtime-chunk-CVUJ3GMH.js";import{a as t,b as i,c as r,d as a,f as s,g as n,h,i as d,j as o,k as m,l as c,m as l,n as u}from"./runtime-chunk-XV2ZLRKD.js";import"./runtime-chunk-NTUTXO7Q.js";import"./runtime-chunk-FTVQTRM7.js";import{I as p,ea as f}from"./runtime-chunk-NRJDJMQZ.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{b as v}from"./runtime-chunk-ZLW3UWOA.js";import"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-4KZXQGUQ.js";import{f as g,g as y}from"./runtime-chunk-Z5OH244S.js";import{a as w,f as O,j as P}from"./runtime-chunk-TZCHGFVF.js";import{E as j}from"./runtime-chunk-OW6T4XFV.js";import{Ae as b,Ba as x,Bd as R,Cc as S,Lc as T,Le as F,bd as H,ce as W,dd as D,ld as I}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";function M(e,t,i,r){return r?i:2048/Math.max(1,e,t)}var U=new b(-1,1,1,-1,0,1),B=new class extends D{constructor(){super(),this.setAttribute("position",new H([-1,3,0,-1,-1,0,3,-1,0],3)),this.setAttribute("uv",new H([0,2,0,0,2,0],2))}},E=new W({defines:{},uniforms:{tDiffuse:new F(null)},vertexShader:"\n\tvarying vec2 vUv;\n\tvoid main() {\n\t\tvUv = uv;\n\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t}",fragmentShader:"\n\tuniform sampler2D tDiffuse;\n\tvarying vec2 vUv;\n\tvoid main() {\n\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\tgl_FragColor = texel;\n\t}"}),z=new class{constructor(e){this._mesh=new I(B,e)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,U)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}}(E),G=null,k=null,_=t.identity(),C=class{constructor(t,i,r,s){var n;this.uuid=t,this.width=i,this.height=r,this.context=s,this.enabled=!0,this.isScreenSpace=!1,this.dpr=window.devicePixelRatio,this.isFrameDirty=!1,this.onRenderRequestedDownstream=()=>{this.isFrameDirty=!0,this.isScreenSpace||e(this),this.context.shared.requestRender()},this._innerApplySize=()=>{let e=this.width,t=this.height;this.renderer.dpr=M(e,t,this.dpr,this.isScreenSpace),this.renderer.setSize(e,t)},this.onFrameOverrideObjectEvent=e=>{if(void 0!==e.target?.uuid){let t=this.frameRoot?.find(e.target.uuid);t&&t.dispatchEvent({...e,target:t})}},this.scene2d=new l(S.generateUUID(),y.defaultData,{dpr:window.devicePixelRatio,shared:s.shared}),this.canvas=(null===G&&(G=document.createElement("canvas")),G),this.renderer=(n=this.canvas,null===k&&(k=new a(n)),k),this.promise=this.init(),this.renderTarget=new T(1,1,{type:x,stencilBuffer:!1,depthBuffer:!1}),s.shared.addUIBuffer(this.uuid,this.renderTarget),this.textureHolder=s.shared.uiBuffer(this.uuid)}get canvasTexture(){return this._canvasTexture||(this._canvasTexture=new R(this.canvas)),this._canvasTexture}async init(){await this.renderer.init()}render(e){if(this.isFrameDirty){if(this.isFrameDirty=!1,this._innerApplySize(),this.renderer.clear(),this.frameOverride?.draw(this.renderer),this.renderer.render(),this.canvasTexture.needsUpdate=!0,e.blitTextureToTarget)e.blitTextureToTarget(this.canvasTexture,this.renderTarget);else{E.uniforms.tDiffuse.value=this.canvasTexture;let t=e.getRenderTarget();e.setRenderTarget(this.renderTarget),e.clear(),z.render(e),e.setRenderTarget(t)}this.textureHolder?.setNeedsUpdate(!0)}}updateEntity2DByOp(e,t,i,r){this.scene2d.updateEntityByOp(e,t,i,r),this.applySize()}updateTreeByOp(e,t){this.scene2d.updateTreeByOp(e,t),this.applySize()}applyOverrides(e){if(this.frameOverride&&this.frameRoot){this.frameOverride.position=[0,0],this.frameOverride.rotation=0;let t=e?.width??this.width,i=e?.height??this.height;this.frameOverride.width=t,this.frameOverride.height=i,this.frameOverride.localMatrix=_,this.isScreenSpace&&(this.frameOverride.fill.color=j.from0to1([0,0,0,0])),this.frameOverride.data={...this.frameOverride.data,width:t,height:i},L({objectOverride:this.frameOverride,objectRoot:this.frameRoot,newParentWidth:this.frameOverride.width,newParentHeight:this.frameOverride.height,initialParentWidth:this.frameRoot.width,initialParentHeight:this.frameRoot.height}),this.frameOverride.updateWorldMatrix(!0,!1,!0)}}applySize(e,t=window.devicePixelRatio){let i=Math.max(1,e?.width??this.width),r=Math.max(1,e?.height??this.height);this.dpr=t,this.width=i,this.height=r,this._innerApplySize();let a=function(e,t,i,r){let a=M(e,t,i,r),s=Math.max(i,512/Math.min(e,t)),n=Math.min(s,a);return{width:Math.max(1,Math.ceil(e*n)),height:Math.max(1,Math.ceil(t*n))}}(i,r,t,this.isScreenSpace);this.renderTarget.setSize(a.width,a.height),this._canvasTexture?.dispose(),this._canvasTexture=void 0,this.applyOverrides(e),this.frameOverride?.requestRender()}applyFrame(e){let t=this.context.scene.find2D(e);if(t&&t instanceof o)return this.disposeFrameOverride(),this.frameRoot=t,this.frameOverride=t.clone({dpr:this.renderer.dpr,shared:this.context.shared}),this.scene2d.add(this.frameOverride),this.applySize(),this.frame?.addEventListener("render",this.onRenderRequestedDownstream),this.frameOverride.traverse(e=>{e.addEventListener("beginState",this.onFrameOverrideObjectEvent)}),this.frameOverride.traverse(e=>{e.addEventListener("completeState",this.onFrameOverrideObjectEvent)}),this.frame?.requestRender(),t}get frame(){return this.frameOverride}get frameId(){return this.frame?.uuid}find(e){return this.scene2d.find(e)}get texture(){return this.textureHolder?.getTexture(1001)}disposeFrameOverride(){this.frameOverride?.removeEventListener("render",this.onRenderRequestedDownstream),this.frameOverride?.traverse(e=>{e.removeEventListener("beginStateChange",this.onFrameOverrideObjectEvent)}),this.frameOverride?.traverse(e=>{e.removeEventListener("completeState",this.onFrameOverrideObjectEvent)}),this.frameOverride&&this.scene2d.remove(this.frameOverride)}};function L({objectOverride:e,objectRoot:t,newParentWidth:i,newParentHeight:r,initialParentWidth:a,initialParentHeight:s}){if(e instanceof o&&t instanceof o||e instanceof d&&t instanceof d)for(let n=0,h=e.children.length;n<h;n++){let h=e.children[n],d=t.children[n];h&&d&&h.uuid===d.uuid&&V({objectOverride:h,objectRoot:d,newParentWidth:i,newParentHeight:r,initialParentWidth:a,initialParentHeight:s})}}function V({objectOverride:e,objectRoot:t,newParentWidth:i,newParentHeight:r,initialParentWidth:a,initialParentHeight:s}){let[n,h]=function(e){if(Z(e))return[e.width,e.height];if(e instanceof m){let[t,i]=e.getHalfSize();return[2*t,2*i]}if(e instanceof d){let[t,i]=e.recursiveBBox.getHalfSize();return[2*t,2*i]}return[0,0]}(t),{width:o,height:l,position:p}=u({constraints:e.data,newParentWidth:i,newParentHeight:r,initialParentWidth:a,initialParentHeight:s,objectInitialWidth:n,objectInitialHeight:h,objectInitialPosition:t.position});if(e.position=p,e.data={...e.data,position:p},e.states)for(let n in e.states)A({stateId:n,objectOverride:e,objectRoot:t,newParentWidth:i,newParentHeight:r,initialParentWidth:a,initialParentHeight:s});if(Z(e)||e instanceof d)Z(e)&&(e.width=o,e.height=l,e.data={...e.data,width:o,height:l}),L({objectOverride:e,objectRoot:t,newParentWidth:o,newParentHeight:l,initialParentWidth:n,initialParentHeight:h});else if(e instanceof m){let i=t,r=0!==n?o/n:1,a=0!==h?l/h:1;e.path=c(i.path,r,a),e.data={...e.data,path:e.path}}}function A({stateId:e,objectOverride:t,objectRoot:i,newParentWidth:r,newParentHeight:a,initialParentWidth:s,initialParentHeight:n}){let h=t.states?.[e],d=i.states?.[e];if(h&&d){let{width:i,height:o,position:m}=u({constraints:t.data,newParentWidth:r,newParentHeight:a,initialParentWidth:s,initialParentHeight:n,objectInitialWidth:g.isResizeable(d)?d.width:0,objectInitialHeight:g.isResizeable(d)?d.height:0,objectInitialPosition:d.position});Object.assign(t.states[e],{position:m}),g.isResizeable(h)&&Object.assign(t.states[e],{width:i,height:o})}}function Z(e){return e instanceof n||e instanceof o||e instanceof s||e instanceof h}var q=class extends f{constructor(e,t,i){super(e,t,i),this.isUIObject=!0,this.uiCanvas=new C(e+"-canvas",t.geometry.width,t.geometry.height,i),this.uiCanvas.promise.then(()=>{this.applyFrame(this.dataPatched.geometry.frame,i.shared)})}updateByPatchedOpGeometry(e,t,i){super.updateByPatchedOpGeometry(e,t,i),0===e.type&&(void 0!==e.props.frame&&this.applyFrame(e.props.frame,i.shared),(void 0!==e.props.width||void 0!==e.props.height)&&this.applySize(e.props,i.shared))}applySize(e,t){let i=e?.width??this.dataPatched.geometry.width,r=e?.height??this.dataPatched.geometry.height;this.uiCanvas.applySize({width:i,height:r}),this.applyGeometryParametersFromFrame(t)}applyFrame(e,t){this.uiCanvas.applyFrame(e),this.applyGeometryParametersFromFrame(t),this.applyMaterialParametersFromFrame({shared:t})}applyGeometryParametersFromFrame(e){let t=this.frame;t&&(Object.assign(this.data,{geometry:Object.assign(this.data.geometry,{cornerRadius:t.cornerRadius,cornerType:0})}),Object.assign(this.dataPatched,{geometry:Object.assign(this.dataPatched.geometry,{cornerRadius:t.cornerRadius,cornerType:0})}),this.localGeometry?.dispose(),this.localGeometry=p(this.dataPatched.geometry,e,this.data.flatShading,this))}applyMaterialParametersFromFrame(e){let t=this.frame;if(t){let i=t.data.backgroundBlur;Object.assign(this.data.material.layers[0].data.texture,{image:this.uiCanvas.uuid}),Object.assign(this.data.material.layers[1].data,{roughness:i.radius,alpha:i.enabled?1:0}),Object.assign(this.dataPatched.material.layers[0].data.texture,{image:this.uiCanvas.uuid}),Object.assign(this.dataPatched.material.layers[1].data,{roughness:i.radius,alpha:i.enabled?1:0}),this.material.reset?.(this.dataPatched.material,e,!0)}}updateEntity2DByOp(e,t,i,r){this.uiCanvas.updateEntity2DByOp(e,t,i,r),e===this.frameId&&0===t.type&&(void 0!==t.props.cornerRadius?this.applyGeometryParametersFromFrame(r):v(t.path,["backgroundBlur"])&&this.applyMaterialParametersFromFrame({shared:r}))}get frame(){return this.uiCanvas.frame}get frameId(){return this.frame?.uuid}removeInteractionGeometry(e){super.removeInteractionGeometry(e),this.applySize({},e)}updateGeometryInteractions(e,t){super.updateGeometryInteractions(e,t),this.applySize({width:e.width,height:e.height},t);let i={...this.data.geometry,...e};this.localGeometry?.dispose(),this.localGeometry=p(i,t,this.data.flatShading,this)}};O("UIGeometry",(e,t,i)=>new q(e,t,i)),P({Scene2D:l,UICanvas:C,loadHanaUIRUNTIME:r,setHanaUIWasmUrl:i}),w("ui-2d");
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|