@splinetool/runtime 2.0.2 → 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/boolean.js +24 -0
- package/build/boolean.js.br +0 -0
- package/build/boolean.js.gz +0 -0
- package/build/boolean.wasm +0 -0
- package/build/boolean.wasm.br +0 -0
- package/build/boolean.wasm.gz +0 -0
- package/build/hana-ui.js +78 -46
- 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-2PT2WH66.js +1 -0
- package/build/runtime-chunk-2PT2WH66.js.br +0 -0
- package/build/runtime-chunk-2PT2WH66.js.gz +0 -0
- package/build/{runtime-chunk-P2XISQYQ.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-3J5YHSQW.js +1 -0
- package/build/runtime-chunk-3J5YHSQW.js.br +0 -0
- package/build/runtime-chunk-3J5YHSQW.js.gz +0 -0
- package/build/{runtime-chunk-FF5REN2J.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-P3254QGK.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-MRUNX43X.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-A2LYIKKC.js → runtime-chunk-DSJY3WL2.js} +1 -1
- package/build/{runtime-chunk-A2LYIKKC.js.br → runtime-chunk-DSJY3WL2.js.br} +0 -0
- package/build/runtime-chunk-DSJY3WL2.js.gz +0 -0
- package/build/{runtime-chunk-RQ3ZQR4P.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-OEXC34HT.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-BJVCOW72.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-HJS3VFEN.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-JFYHGEDN.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-PPLLJM75.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-VRVV54WH.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-TDCFE5IE.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-I47C4XJU.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-LSURXI4Y.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-OLJVVNDS.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-QHPFAHXN.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-E6JCDSXC.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-ZJPGZKPX.js +1 -0
- package/build/runtime-chunk-ZJPGZKPX.js.br +0 -0
- package/build/runtime-chunk-ZJPGZKPX.js.gz +0 -0
- package/build/{runtime-chunk-2SYZJBYJ.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-AMAXBOXT.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-EPAMFKSB.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-HLHRAAC4.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-K6LWK7FL.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-4Y3LE3VX.js +1 -0
- package/build/runtime-mergeStaticGeometries-4Y3LE3VX.js.br +0 -0
- package/build/runtime-mergeStaticGeometries-4Y3LE3VX.js.gz +0 -0
- package/build/{runtime-miscActions-L7BIGLEB.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-W7YEQWJI.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-CK327WCT.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-7AG4A4P5.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-MNQPPLQL.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-5RIKJ4US.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-YBGYTAMD.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-2BXFBQQY.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-6PZW2QIW.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-4HPEEN3B.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-DUDXGADJ.js +1 -0
- 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 +365 -365
- 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-2SYZJBYJ.js.br +0 -0
- package/build/runtime-chunk-2SYZJBYJ.js.gz +0 -0
- package/build/runtime-chunk-2Y73BLCY.js +0 -1
- package/build/runtime-chunk-2Y73BLCY.js.br +0 -0
- package/build/runtime-chunk-2Y73BLCY.js.gz +0 -0
- package/build/runtime-chunk-A2LYIKKC.js.gz +0 -0
- package/build/runtime-chunk-BJVCOW72.js.br +0 -0
- package/build/runtime-chunk-BJVCOW72.js.gz +0 -0
- package/build/runtime-chunk-CTHMLYOZ.js +0 -1
- package/build/runtime-chunk-CTHMLYOZ.js.br +0 -0
- package/build/runtime-chunk-CTHMLYOZ.js.gz +0 -0
- package/build/runtime-chunk-E6JCDSXC.js.br +0 -0
- package/build/runtime-chunk-E6JCDSXC.js.gz +0 -0
- package/build/runtime-chunk-FF5REN2J.js.br +0 -0
- package/build/runtime-chunk-FF5REN2J.js.gz +0 -0
- package/build/runtime-chunk-HJS3VFEN.js.br +0 -0
- package/build/runtime-chunk-HJS3VFEN.js.gz +0 -0
- package/build/runtime-chunk-HL3PBPHE.js +0 -1
- package/build/runtime-chunk-HL3PBPHE.js.br +0 -0
- package/build/runtime-chunk-HL3PBPHE.js.gz +0 -0
- package/build/runtime-chunk-I47C4XJU.js.br +0 -0
- package/build/runtime-chunk-I47C4XJU.js.gz +0 -0
- package/build/runtime-chunk-JFYHGEDN.js.br +0 -0
- package/build/runtime-chunk-JFYHGEDN.js.gz +0 -0
- package/build/runtime-chunk-K4FLB6Y7.js +0 -1
- package/build/runtime-chunk-K4FLB6Y7.js.br +0 -0
- package/build/runtime-chunk-K4FLB6Y7.js.gz +0 -0
- package/build/runtime-chunk-LSURXI4Y.js.br +0 -2
- package/build/runtime-chunk-LSURXI4Y.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-MRUNX43X.js.br +0 -0
- package/build/runtime-chunk-MRUNX43X.js.gz +0 -0
- package/build/runtime-chunk-OEXC34HT.js.br +0 -0
- package/build/runtime-chunk-OEXC34HT.js.gz +0 -0
- package/build/runtime-chunk-OLJVVNDS.js.br +0 -0
- package/build/runtime-chunk-OLJVVNDS.js.gz +0 -0
- package/build/runtime-chunk-P2XISQYQ.js.br +0 -0
- package/build/runtime-chunk-P2XISQYQ.js.gz +0 -0
- package/build/runtime-chunk-P3254QGK.js.br +0 -0
- package/build/runtime-chunk-P3254QGK.js.gz +0 -0
- package/build/runtime-chunk-PPLLJM75.js.br +0 -0
- package/build/runtime-chunk-PPLLJM75.js.gz +0 -0
- package/build/runtime-chunk-QHPFAHXN.js.br +0 -0
- package/build/runtime-chunk-QHPFAHXN.js.gz +0 -0
- package/build/runtime-chunk-QZ35BPGB.js +0 -1
- package/build/runtime-chunk-QZ35BPGB.js.br +0 -0
- package/build/runtime-chunk-QZ35BPGB.js.gz +0 -0
- package/build/runtime-chunk-RAX4YJZF.js +0 -1
- package/build/runtime-chunk-RAX4YJZF.js.br +0 -0
- package/build/runtime-chunk-RAX4YJZF.js.gz +0 -0
- package/build/runtime-chunk-RQ3ZQR4P.js.br +0 -0
- package/build/runtime-chunk-RQ3ZQR4P.js.gz +0 -0
- package/build/runtime-chunk-SKLNU6XK.js +0 -1
- package/build/runtime-chunk-SKLNU6XK.js.br +0 -0
- package/build/runtime-chunk-SKLNU6XK.js.gz +0 -0
- package/build/runtime-chunk-TDCFE5IE.js.br +0 -0
- package/build/runtime-chunk-TDCFE5IE.js.gz +0 -0
- package/build/runtime-chunk-VRVV54WH.js.br +0 -0
- package/build/runtime-chunk-VRVV54WH.js.gz +0 -0
- package/build/runtime-chunk-WSJURWOC.js +0 -1
- package/build/runtime-chunk-WSJURWOC.js.br +0 -0
- package/build/runtime-chunk-WSJURWOC.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-classicRuntime-AMAXBOXT.js.br +0 -0
- package/build/runtime-classicRuntime-AMAXBOXT.js.gz +0 -0
- package/build/runtime-cloners-4W3AOAQX.js +0 -1
- package/build/runtime-cloners-4W3AOAQX.js.br +0 -1
- package/build/runtime-cloners-4W3AOAQX.js.gz +0 -0
- package/build/runtime-components-EPAMFKSB.js.br +0 -0
- package/build/runtime-components-EPAMFKSB.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-HLHRAAC4.js.br +0 -0
- package/build/runtime-createDestroy-HLHRAAC4.js.gz +0 -0
- package/build/runtime-dragDrop-K6LWK7FL.js.br +0 -0
- package/build/runtime-dragDrop-K6LWK7FL.js.gz +0 -0
- package/build/runtime-gameControls-ZJUUKNHM.js +0 -1
- package/build/runtime-gameControls-ZJUUKNHM.js.br +0 -0
- package/build/runtime-gameControls-ZJUUKNHM.js.gz +0 -0
- package/build/runtime-hair-AGUMVL55.js +0 -1
- package/build/runtime-hair-AGUMVL55.js.br +0 -3
- package/build/runtime-hair-AGUMVL55.js.gz +0 -0
- package/build/runtime-mergeStaticGeometries-AOGKOEBX.js +0 -1
- package/build/runtime-mergeStaticGeometries-AOGKOEBX.js.br +0 -0
- package/build/runtime-mergeStaticGeometries-AOGKOEBX.js.gz +0 -0
- package/build/runtime-miscActions-L7BIGLEB.js.br +0 -0
- package/build/runtime-miscActions-L7BIGLEB.js.gz +0 -0
- package/build/runtime-mouseHover-BI5SRQSQ.js +0 -1
- package/build/runtime-mouseHover-BI5SRQSQ.js.br +0 -0
- package/build/runtime-mouseHover-BI5SRQSQ.js.gz +0 -0
- package/build/runtime-particles-W7YEQWJI.js.br +0 -0
- package/build/runtime-particles-W7YEQWJI.js.gz +0 -0
- package/build/runtime-paths-CK327WCT.js.br +0 -0
- package/build/runtime-paths-CK327WCT.js.gz +0 -0
- package/build/runtime-resize-RUUW4IXW.js +0 -1
- package/build/runtime-resize-RUUW4IXW.js.br +0 -0
- package/build/runtime-resize-RUUW4IXW.js.gz +0 -0
- package/build/runtime-sceneTransition-7AG4A4P5.js.br +0 -0
- package/build/runtime-sceneTransition-7AG4A4P5.js.gz +0 -0
- package/build/runtime-scroll-MNQPPLQL.js.br +0 -0
- package/build/runtime-scroll-MNQPPLQL.js.gz +0 -0
- package/build/runtime-shapeBlends-IP5LZ63L.js +0 -1
- package/build/runtime-shapeBlends-IP5LZ63L.js.br +0 -0
- package/build/runtime-shapeBlends-IP5LZ63L.js.gz +0 -0
- package/build/runtime-text-5RIKJ4US.js.br +0 -0
- package/build/runtime-text-5RIKJ4US.js.gz +0 -0
- package/build/runtime-textInputs-YBGYTAMD.js.br +0 -0
- package/build/runtime-textInputs-YBGYTAMD.js.gz +0 -0
- package/build/runtime-timeline-32GBWMFJ.js +0 -1
- package/build/runtime-timeline-32GBWMFJ.js.br +0 -0
- package/build/runtime-timeline-32GBWMFJ.js.gz +0 -0
- package/build/runtime-tracking-2BXFBQQY.js.br +0 -0
- package/build/runtime-tracking-2BXFBQQY.js.gz +0 -0
- package/build/runtime-transitions-6PZW2QIW.js.br +0 -0
- package/build/runtime-transitions-6PZW2QIW.js.gz +0 -0
- package/build/runtime-ui2d-VEQUBXIE.js +0 -1
- package/build/runtime-ui2d-VEQUBXIE.js.br +0 -0
- package/build/runtime-ui2d-VEQUBXIE.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-4HPEEN3B.js.br +0 -0
- package/build/runtime-vectorShapes-4HPEEN3B.js.gz +0 -0
- package/build/runtime-video-TZNR7MEM.js +0 -1
- package/build/runtime-video-TZNR7MEM.js.br +0 -0
- package/build/runtime-video-TZNR7MEM.js.gz +0 -0
- package/build/runtime-webgpu-YNY4OXCZ.js +0 -1
- package/build/runtime-webgpu-YNY4OXCZ.js.br +0 -0
- package/build/runtime-webgpu-YNY4OXCZ.js.gz +0 -0
|
@@ -0,0 +1 @@
|
|
|
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-6UUF5VIS.js";import"./runtime-chunk-WHKBOV2O.js";import"./runtime-chunk-NTUTXO7Q.js";import{a as l}from"./runtime-chunk-R43XZP65.js";import{a as d}from"./runtime-chunk-ZMXEX5NX.js";import{a as h,b as u}from"./runtime-chunk-DSJY3WL2.js";import"./runtime-chunk-3J5YHSQW.js";import"./runtime-chunk-FTVQTRM7.js";import{a as c}from"./runtime-chunk-ESZD4IRS.js";import"./runtime-chunk-WMWQXAOH.js";import"./runtime-chunk-SL64ZYCB.js";import"./runtime-chunk-RF63UVAU.js";import{Y as m,ca as p}from"./runtime-chunk-YFAATRJU.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{b as g,e as f}from"./runtime-chunk-QVC5UDJO.js";import"./runtime-chunk-OOC7YSI5.js";import{d as y}from"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-4KZXQGUQ.js";import{g as v,h as x,i as M}from"./runtime-chunk-5XUI4Z6R.js";import{a as b}from"./runtime-chunk-TZCHGFVF.js";import{A as C,B as k,C as N,D as T,E as j,q as O,z as F}from"./runtime-chunk-OW6T4XFV.js";import{Bc as w,Cc as A}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var E=0;function I(){E++}function P(t,e){return(e.epoch!==E||e.t!==t.t||e.index!==t.index)&&(e.epoch=E,e.t=t.t,e.index=t.index,!0)}function D(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:x(e.data.easing.type,{control1:v(e.data.easing.cubicControls?.control1,[0,0]),control2:v(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(!P(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(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 L(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 A.lerp(t,e,i);if(j.is(t))return j.lerp(t,e,i);if(T.is(t))return T.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:F).lerp(t[n],e[n],i)}return A.lerp(t[n],e[n],i)});if("object"==typeof t&&null!==t){let n={};for(let s in t){let r=L(t[s],e[s],i,a);void 0!==r&&(n[s]=r)}return n}}var _=new Map,S=new Map,H=class extends w{constructor(s,g,f,b,C,k,T){super(),this.id=s,this.data=g,this.scene=f,this.sharedAssets=b,this.object=C,this.eventType=k,this.actionCondition=T,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&&!N.isEqual(g.hiddenMatrix,o.data.hiddenMatrix)&&this.hiddenMatrixOverrides.push({objId:s,original:o.hiddenMatrix.clone(),state:g.hiddenMatrix});let C=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 M){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:x(e.data.easing.type,{control1:v(e.data.easing.cubicControls?.control1,[0,0]),control2:v(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(!P(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 M){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:x(e.data.easing.type,{control1:v(e.data.easing.cubicControls?.control1,[0,0]),control2:v(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(!P(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:x(e.data.easing.type,{control1:v(e.data.easing.cubicControls?.control1,[0,0]),control2:v(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(!P(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:x(e.data.easing.type,{control1:v(e.data.easing.cubicControls?.control1,[0,0]),control2:v(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(!P(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=D(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=D(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:x(e.data.easing.type,{control1:v(e.data.easing.cubicControls?.control1,[0,0]),control2:v(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(!P(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?.(A.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:x(e.data.easing.type,{control1:v(e.data.easing.cubicControls?.control1,[0,0]),control2:v(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(!P(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:x(e.data.easing.type,{control1:v(e.data.easing.cubicControls?.control1,[0,0]),control2:v(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:x(e.data.easing.type,{control1:v(e.data.easing.cubicControls?.control1,[0,0]),control2:v(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(!P(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(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),k=("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);C.forEach(t=>{this.timeline.add(t,k)}),this.timeline.duration=1e3*l.to+k}),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 new Error("Missing property")}C&&(S.has(C.uuid)?S.get(C.uuid).push(this):S.set(C.uuid,[this])),_.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&&O(this.eventType)&&"Once"===this.data.runMode&&this.hasPlayedOnce&&this.paused&&this.timeline.currentTime>0&&!this._finished;if(void 0!==this.eventType&&O(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)}),I(),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(),I(),(!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()}},U=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=_.get(t);return e?[e]:[..._.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}},X=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 H(t,e,i,a,n,s,r);else{if("pause"!==o&&"stop"!==o)throw new Error("Missing property");this.interaction=new U(e)}}get playing(){return this.interaction instanceof H&&this.interaction.playing}get finished(){return!(this.interaction instanceof H)||this.interaction.finished}get paused(){return!(this.interaction instanceof H)||this.interaction.paused}play(){if(this.interaction instanceof H)return this.interaction.play();this.interaction.dispatch()}stop(){this.interaction instanceof H&&this.interaction.stop()}seek(t){this.interaction instanceof H&&this.interaction.seek(t)}toggle(t){this.interaction instanceof H?this.interaction.toggle(t):this.interaction.dispatch()}playFromCurrent(){this.interaction instanceof H?this.interaction.playFromCurrent():this.interaction.dispatch()}dispatchConditional(){this.interaction instanceof H?f(this.interaction.sharedAssets,this.interaction.actionCondition)&&this.interaction.playFromCurrent():this.interaction.dispatch()}reverseFromCurrent(){this.interaction instanceof H&&this.interaction.reverseFromCurrent()}dispose(){this.interaction.dispose()}};g("TimelineAnimation",({id:t,data:e,page:i,shared:a,object:n,eventType:s,actionCondition:r})=>new X(t,e,i.scene,a,n,s,r)),b("timeline");
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./runtime-chunk-NBYTQLIB.js";import{f as t}from"./runtime-chunk-WSJURWOC.js";import{a as n,b as i}from"./runtime-chunk-DZNU62CT.js";import{a as s}from"./runtime-chunk-VAVYZ35B.js";import{e as a}from"./runtime-chunk-FQNSP44B.js";import"./runtime-chunk-RQ3ZQR4P.js";import"./runtime-chunk-TDCFE5IE.js";import"./runtime-chunk-VRVV54WH.js";import"./runtime-chunk-CTHMLYOZ.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{f as o,g as r}from"./runtime-chunk-MM75L5X4.js";import{d,t as l}from"./runtime-chunk-2Y73BLCY.js";import"./runtime-chunk-QZ35BPGB.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-Z5OH244S.js";import{a as u}from"./runtime-chunk-TZCHGFVF.js";import{s as h,t as c}from"./runtime-chunk-OW6T4XFV.js";import{Ec as p,Fc as m,Oc as v,rd as g}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var f=new m,E=new m,w=new m,y=new m,L=new g,M={type:"requestRender"},F=function(){let e=new m,t=new m;return(n,i,s)=>s>0?(e.subVectors(n,i),e.length()<=s?n:t.copy(i).add(e.normalize().multiplyScalar(s))):i}(),x=function(){let e=new v;return(n,i)=>{n.position.copy(i),null!==n.parent&&(e.copy(n.parent.matrixWorld).invert(),n.position.applyMatrix4(e)),e.copy(n.hiddenMatrix).invert(),n.position.applyMatrix4(e),n.updateMatrix(),n.hasNonUniformScale&&(n.updateMatrixWorld(),n.updateMatrixWorldRigid()),n instanceof l&&t(n.parent)&&n.invalidateDownstreamBooleanData(!0)}}(),D=class{constructor(e,t,n,i,s,a){this.data=e,this.id=t,this.object=n,this.paused=!1,this.currentDampingFactor=1,this.snapComplete=!1,this.isReset=!1,this.worldPosition0=new m,this.timeoutId=null,this.delayFinished=!0,this.wasOutside=!1,this.data={...h.defaultData,...e,...void 0===e.resetOnPointerLeave&&{resetOnPointerLeave:!1}},void 0===e.target||"cursor"===e.target||(this.target=i.find(e.target)),this.data.dampingFactor&&(this.currentDampingFactor=this.data.dampingFactor),this.resetDampingFactor=80/this.data.resetSpeed+1,this.object.getWorldPosition(this.worldPosition0),this.actions=o(e,e.actions,i,s,a,n)}},C=class extends n{constructor(e,t){super(e),this.eventManager=t,this.events=[],this.pairOfEventListeners=[],this.onMouseMove=e=>{if(!(s.length>1)){this.eventContext.updateRaycaster(e);for(let e of this.events)void 0===e.target&&this.updateSingleEvent(e)}},this.onMouseEnter=e=>{for(let e of this.events)void 0===e.target&&(e.isReset=!1,e.currentDampingFactor=e.data.dampingFactor)},this.onMouseLeave=e=>{for(let e of this.events)void 0===e.target&&(e.data.resetOnPointerLeave&&(e.isReset=!0,e.currentDampingFactor=e.resetDampingFactor),this.updateSingleEvent(e))},this.onTargetChange=e=>()=>{this.updateSingleEvent(e)}}connect(){let{page:e}=this.eventContext;if(e.traverseEntity(t=>{let n=t.data?.events.find(e=>"Follow"===e.data.type&&!e.data.disabled);n&&(!e.data.globalPhysics.usePhysics||"dynamic"!==t.dataPatched.physics?.rigidBody)&&this.events.push(new D(n.data,n.id,t,e,this.eventContext.sharedAssets,this.eventManager))}),!this.events.length)return;let{domElement:t,eventElement:n}=this.eventContext;this.domEventsNeeded.clear(),a&&(this.domEventsNeeded.add("pointerdown"),t.addEventListener("pointerdown",this.onMouseMove)),this.domEventsNeeded.add("pointermove"),n.addEventListener("pointermove",this.onMouseMove),this.eventContext.useWindowEvents||(t.addEventListener("pointerenter",this.onMouseEnter),t.addEventListener("pointerleave",this.onMouseLeave));for(let e of this.events)if(void 0!==e.target){let t=e.target,n=this.onTargetChange(e);this.pairOfEventListeners.push([t,n]),t.addEventListener("requestRender",n)}}disconnect(){if(!this.events.length)return;let{domElement:e,eventElement:t}=this.eventContext;this.domEventsNeeded.clear(),a&&e.removeEventListener("pointerdown",this.onMouseMove),t.removeEventListener("pointermove",this.onMouseMove),e.removeEventListener("pointerenter",this.onMouseEnter),e.removeEventListener("pointerleave",this.onMouseLeave);for(let[e,t]of this.pairOfEventListeners)e.removeEventListener("requestRender",t);for(let e of this.events)e.paused=!0,e.isReset=!1,r(e.actions)}onAnimationFrameDamping(){for(let e of this.events)e.paused||this.updateSingleEvent(e,!0)}updateSingleEvent(e,t=!1){this.events.forEach(e=>{e.actions.Create.forEach(e=>{e.dispatchThrottled()})});let{plane:n,limitDistance:i,limitDistanceEnabled:s}=e.data;if(e.object.getWorldPosition(w),e.isReset)y.copy(e.worldPosition0);else if(e.target)e.target.getWorldPosition(y);else{let{getCamera:e,raycaster:t}=this.eventContext;if("custom"===n?(e().getWorldDirection(E),E.negate(),f.copy(E)):"xy"===n?f.set(0,0,1):"xz"===n?f.set(0,1,0):"yz"===n&&f.set(1,0,0),L.setFromNormalAndCoplanarPoint(f,w),!t.ray.intersectPlane(L,y))return}if(!e.isReset)if(y.distanceTo(e.worldPosition0)>i&&s&&e.target){if(e.snapComplete=!1,e.data.snapDelay&&(e.delayFinished=!1,typeof window<"u"&&null!==e.timeoutId&&(window.clearTimeout(e.timeoutId),e.timeoutId=null)),e.wasOutside=!0,!e.data.resetAfterDistanceLimit)return;y.copy(e.worldPosition0),e.currentDampingFactor=e.resetDampingFactor}else if(e.wasOutside&&(e.data.snapDelay&&typeof window<"u"&&(e.timeoutId=window.setTimeout(()=>{e.delayFinished=!0,e.paused=!1,this.updateSingleEvent(e)},1e3*e.data.snapDelay)),e.currentDampingFactor=e.data.dampingFactor,e.wasOutside=!1),!1===e.delayFinished)return;!1===e.data.enabledTranslation[0]&&(y.x=w.x),!1===e.data.enabledTranslation[1]&&(y.y=w.y),!1===e.data.enabledTranslation[2]&&(y.z=w.z);let a=F(w,y,e.wasOutside?0:e.data.maxDelta);if(e.currentDampingFactor>1){let n=f.subVectors(a,w).divideScalar(e.currentDampingFactor);w.add(n),t&&x(e.object,w),e.paused=n.length()<.01}else x(e.object,a),e.paused=!0;e.object?.dispatchEvent({type:"beginEvent",eventName:"Follow"}),e.object.dispatchEvent(M)}},R=new m,b=new m,j=new v,P=new p,O=new p,S=new m,N=new m,k=new m,Q=new m,z=new g,W={type:"requestRender"},T={type:"changeRotation"},V=function(){let e=new v;return function(n,i){null!==n.parent?e.multiplyMatrices(n.parent.matrixWorld,n.hiddenMatrix):e.copy(n.hiddenMatrix),i.premultiply(d(e).invert()),n.rotation.setFromRotationMatrix(i),n.updateMatrix(),n instanceof l&&t(n.parent)&&n.invalidateDownstreamBooleanData(!0)}}(),A=class{constructor(e,t,n,i){this.id=t,this.object=n,this.paused=!1,this.currentDampingFactor=1,this.isReset=!1,this.worldQuaternion0=new p,this.timeoutId=null,this.delayFinished=!0,this.wasOutside=!1,this.data={...c.defaultData,...e,...void 0===e.resetOnPointerLeave&&{resetOnPointerLeave:!1}},void 0===e.target||"cursor"===e.target||(this.target=i.find(e.target)),this.data.dampingFactor&&(this.currentDampingFactor=this.data.dampingFactor),this.object.getWorldQuaternion(this.worldQuaternion0),isNaN(this.worldQuaternion0.x)&&(this.worldQuaternion0.x=0),isNaN(this.worldQuaternion0.y)&&(this.worldQuaternion0.y=0),isNaN(this.worldQuaternion0.z)&&(this.worldQuaternion0.z=0),isNaN(this.worldQuaternion0.w)&&(this.worldQuaternion0.w=1),this.resetDampingFactor=80/this.data.resetSpeed+1}},B=class extends n{constructor(){super(...arguments),this.events=[],this.pairOfEventListeners=[],this.pairOfUserEventListeners=[],this.onMouseMove=e=>{if(!(s.length>1)){this._lastMouseEvent=e,this.eventContext.updateRaycaster(e);for(let e of this.events)void 0===e.target&&this.updateSingleEvent(e)}},this.onMouseEnter=e=>{for(let e of this.events)void 0===e.target&&(e.isReset=!1,e.currentDampingFactor=e.data.dampingFactor)},this.onMouseLeave=e=>{for(let e of this.events)void 0===e.target&&(e.data.resetOnPointerLeave&&(e.isReset=!0,e.currentDampingFactor=e.resetDampingFactor),this.updateSingleEvent(e))},this.onScroll=e=>{if(this._lastMouseEvent){let e=new PointerEvent("pointermove",{clientX:this._lastMouseEvent.clientX,clientY:this._lastMouseEvent.clientY,bubbles:!0,cancelable:!0,view:window});this.eventContext.eventElement.dispatchEvent(e)}},this.onTargetChange=e=>()=>{this.updateSingleEvent(e)},this.createUserEventListener=t=>({eventName:n,target:i})=>{if(!n||!i)return;let s=e(n);s&&"LookAt"===s&&this.updateSingleEvent(t)}}connect(){let{page:e}=this.eventContext;if(e.traverseEntity(t=>{let n=t.data?.events.find(e=>"LookAt"===e.data.type&&!e.data.disabled);n&&(!e.data.globalPhysics.usePhysics||"dynamic"!==t.dataPatched.physics?.rigidBody)&&this.events.push(new A(n.data,n.id,t,e))}),!this.events.length)return;let{domElement:t,eventElement:n}=this.eventContext;this.domEventsNeeded.clear(),a&&(this.domEventsNeeded.add("pointerdown"),t.addEventListener("pointerdown",this.onMouseMove)),this.domEventsNeeded.add("pointermove"),n.addEventListener("pointermove",this.onMouseMove),this.eventContext.useWindowEvents?n.addEventListener("scroll",this.onScroll):(t.addEventListener("pointerenter",this.onMouseEnter),t.addEventListener("pointerleave",this.onMouseLeave));for(let e of this.events){if(void 0!==e.target){let t=this.onTargetChange(e),n=e.target;this.pairOfEventListeners.push([n,t]),n.addEventListener("requestRender",t)}let t=this.createUserEventListener(e),n=e.object;this.pairOfUserEventListeners.push([n,t]),n.addEventListener("userEvent",t)}}disconnect(){if(!this.events.length)return;let{domElement:e,eventElement:t}=this.eventContext;this.domEventsNeeded.clear(),a&&e.removeEventListener("pointerdown",this.onMouseMove),t.removeEventListener("pointermove",this.onMouseMove),e.removeEventListener("pointerenter",this.onMouseEnter),e.removeEventListener("pointerleave",this.onMouseLeave),t.removeEventListener("scroll",this.onScroll);for(let[e,t]of this.pairOfEventListeners)e.removeEventListener("requestRender",t);for(let[e,t]of this.pairOfUserEventListeners)e.removeEventListener("userEvent",t);for(let e of this.events)e.paused=!0,e.isReset=!1}onAnimationFrameDamping(){for(let e of this.events)e.paused||this.updateSingleEvent(e)}updateSingleEvent(e){let{tilt:t,axis:n,distance:i,plane:s,limitDistance:a,enabledRotation:o,limitDistanceEnabled:r}=e.data,{getCamera:l,raycaster:u}=this.eventContext,{object:h,target:c}=e;if(h.getWorldPosition(S),!e.isReset)if(e.target)e.target.getWorldPosition(N);else{if("custom"===s?(l().getWorldDirection(b),b.negate(),z.setFromNormalAndCoplanarPoint(b,S)):("xy"===s?R.set(0,0,1):"xz"===s?R.set(0,1,0):"yz"===s&&R.set(1,0,0),z.setFromNormalAndCoplanarPoint(R,S)),!u.ray.intersectPlane(z,N))return;i>0&&("custom"===s||void 0===s)&&N.addScaledVector(b,i)}if(e.isReset||(c?"target"===t?k.copy(c.up).applyMatrix4(j.extractRotation(c.matrixWorld)).normalize():o.some(e=>!1===e)?("x"===n?(Q.set(0,0,1),!1===o[2]&&Q.set(0,1,0)):"y"===n?(Q.set(1,0,0),!1===o[0]&&Q.set(0,0,1)):(Q.set(0,1,0),!1===o[1]&&Q.set(1,0,0)),k.copy(Q).applyQuaternion(e.worldQuaternion0).normalize()):k.set(0,1,0):"custom"===s?k.set(0,1,0):k.copy(R)),e.isReset)O.copy(e.worldQuaternion0);else if(S.distanceTo(N)>a&&r&&c){if(e.data.snapDelay&&(e.delayFinished=!1,typeof window<"u"&&null!==e.timeoutId&&(window.clearTimeout(e.timeoutId),e.timeoutId=null)),e.wasOutside=!0,!e.data.resetAfterDistanceLimit)return;O.copy(e.worldQuaternion0),e.currentDampingFactor=e.resetDampingFactor}else{if(e.wasOutside&&(e.data.snapDelay&&typeof window<"u"&&(e.timeoutId=window.setTimeout(()=>{e.delayFinished=!0,e.paused=!1,this.updateSingleEvent(e)},1e3*e.data.snapDelay)),e.currentDampingFactor=e.data.dampingFactor,e.wasOutside=!1),!1===e.delayFinished)return;(function(e,t,n,i,s,a){let o=j.elements;Y.subVectors(t,n),0===Y.lengthSq()&&(Y.z=1),Y.normalize(),U.crossVectors(i,Y),0===U.lengthSq()&&(1===Math.abs(i.z)?Y.x+=1e-4:Y.z+=1e-4,Y.normalize(),U.crossVectors(i,Y)),U.normalize(),I.crossVectors(Y,U),"x"===s?1===a.z?[U,I,Y]=[Y,U,I]:(U.negate(),[U,Y]=[Y,U]):"y"===s?1===a.x?[U,I,Y]=[I,Y,U]:(U.negate(),[I,Y]=[Y,I]):1===a.x&&(U.negate(),[U,I]=[I,U]),o[0]=U.x,o[4]=I.x,o[8]=Y.x,o[1]=U.y,o[5]=I.y,o[9]=Y.y,o[2]=U.z,o[6]=I.z,o[10]=Y.z})(0,N,S,k,n,Q),O.setFromRotationMatrix(j),P.setFromUnitVectors(Q.applyQuaternion(O),k),o.some(e=>!1===e)&&"target"!==t&&O.premultiply(P).normalize()}e.currentDampingFactor>1?(h.updateWorldMatrix(!0,!1),P.setFromRotationMatrix(d(h.matrixWorld)),P.slerp(O,1/e.currentDampingFactor),V(h,j.makeRotationFromQuaternion(P)),e.paused=8*(1-P.dot(O))<1e-6):(V(h,j.makeRotationFromQuaternion(O)),e.paused=!0),e.object?.dispatchEvent({type:"beginEvent",eventName:"LookAt"}),h.dispatchEvent(W),h.dispatchEvent(T)}},I=new m,U=new m,Y=new m;i("Follow",({eventContext:e,eventManager:t})=>new C(e,t)),i("LookAt",({eventContext:e})=>new B(e)),u("tracking");
|
|
1
|
+
import{a as e}from"./runtime-chunk-NBYTQLIB.js";import{f as t}from"./runtime-chunk-3J5YHSQW.js";import{a as n,b as i}from"./runtime-chunk-DZNU62CT.js";import{a as s}from"./runtime-chunk-VAVYZ35B.js";import{e as a}from"./runtime-chunk-FQNSP44B.js";import"./runtime-chunk-ESZD4IRS.js";import"./runtime-chunk-SL64ZYCB.js";import"./runtime-chunk-RF63UVAU.js";import"./runtime-chunk-YFAATRJU.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{f as o,g as r}from"./runtime-chunk-QVC5UDJO.js";import{d,v as l}from"./runtime-chunk-OOC7YSI5.js";import"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-5XUI4Z6R.js";import{a as u}from"./runtime-chunk-TZCHGFVF.js";import{s as h,t as c}from"./runtime-chunk-OW6T4XFV.js";import{Ec as p,Fc as m,Oc as v,rd as g}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var f=new m,E=new m,w=new m,y=new m,F=new g,L={type:"requestRender"},M=function(){let e=new m,t=new m;return(n,i,s)=>s>0?(e.subVectors(n,i),e.length()<=s?n:t.copy(i).add(e.normalize().multiplyScalar(s))):i}(),x=function(){let e=new v;return(n,i)=>{n.position.copy(i),null!==n.parent&&(e.copy(n.parent.matrixWorld).invert(),n.position.applyMatrix4(e)),e.copy(n.hiddenMatrix).invert(),n.position.applyMatrix4(e),n.updateMatrix(),n.hasNonUniformScale&&(n.updateMatrixWorld(),n.updateMatrixWorldRigid()),n instanceof l&&t(n.parent)&&n.invalidateDownstreamBooleanData(!0)}}(),D=class{constructor(e,t,n,i,s,a){this.data=e,this.id=t,this.object=n,this.paused=!1,this.currentDampingFactor=1,this.snapComplete=!1,this.isReset=!1,this.worldPosition0=new m,this.timeoutId=null,this.delayFinished=!0,this.wasOutside=!1,this.data={...h.defaultData,...e,...void 0===e.resetOnPointerLeave&&{resetOnPointerLeave:!1}},void 0===e.target||"cursor"===e.target||(this.target=i.find(e.target)),this.data.dampingFactor&&(this.currentDampingFactor=this.data.dampingFactor),this.resetDampingFactor=80/this.data.resetSpeed+1,this.object.getWorldPosition(this.worldPosition0),this.actions=o(e,e.actions,i,s,a,n)}},R=class extends n{constructor(e,t){super(e),this.eventManager=t,this.events=[],this.pairOfEventListeners=[],this.onMouseMove=e=>{if(!(s.length>1)){this.eventContext.updateRaycaster(e);for(let e of this.events)void 0===e.target&&this.updateSingleEvent(e)}},this.onMouseEnter=e=>{for(let e of this.events)void 0===e.target&&(e.isReset=!1,e.currentDampingFactor=e.data.dampingFactor)},this.onMouseLeave=e=>{for(let e of this.events)void 0===e.target&&(e.data.resetOnPointerLeave&&(e.isReset=!0,e.currentDampingFactor=e.resetDampingFactor),this.updateSingleEvent(e))},this.onTargetChange=e=>()=>{this.updateSingleEvent(e)}}connect(){let{page:e}=this.eventContext;if(e.traverseEntity(t=>{let n=t.data?.events.find(e=>"Follow"===e.data.type&&!e.data.disabled);n&&(!e.data.globalPhysics.usePhysics||"dynamic"!==t.dataPatched.physics?.rigidBody)&&this.events.push(new D(n.data,n.id,t,e,this.eventContext.sharedAssets,this.eventManager))}),!this.events.length)return;let{domElement:t,eventElement:n}=this.eventContext;this.domEventsNeeded.clear(),a&&(this.domEventsNeeded.add("pointerdown"),t.addEventListener("pointerdown",this.onMouseMove)),this.domEventsNeeded.add("pointermove"),n.addEventListener("pointermove",this.onMouseMove),this.eventContext.useWindowEvents||(t.addEventListener("pointerenter",this.onMouseEnter),t.addEventListener("pointerleave",this.onMouseLeave));for(let e of this.events)if(void 0!==e.target){let t=e.target,n=this.onTargetChange(e);this.pairOfEventListeners.push([t,n]),t.addEventListener("requestRender",n)}}disconnect(){if(!this.events.length)return;let{domElement:e,eventElement:t}=this.eventContext;this.domEventsNeeded.clear(),a&&e.removeEventListener("pointerdown",this.onMouseMove),t.removeEventListener("pointermove",this.onMouseMove),e.removeEventListener("pointerenter",this.onMouseEnter),e.removeEventListener("pointerleave",this.onMouseLeave);for(let[e,t]of this.pairOfEventListeners)e.removeEventListener("requestRender",t);for(let e of this.events)e.paused=!0,e.isReset=!1,r(e.actions)}onAnimationFrameDamping(){for(let e of this.events)e.paused||this.updateSingleEvent(e,!0)}updateSingleEvent(e,t=!1){this.events.forEach(e=>{e.actions.Create.forEach(e=>{e.dispatchThrottled()})});let{plane:n,limitDistance:i,limitDistanceEnabled:s}=e.data;if(e.object.getWorldPosition(w),e.isReset)y.copy(e.worldPosition0);else if(e.target)e.target.getWorldPosition(y);else{let{getCamera:e,raycaster:t}=this.eventContext;if("custom"===n?(e().getWorldDirection(E),E.negate(),f.copy(E)):"xy"===n?f.set(0,0,1):"xz"===n?f.set(0,1,0):"yz"===n&&f.set(1,0,0),F.setFromNormalAndCoplanarPoint(f,w),!t.ray.intersectPlane(F,y))return}if(!e.isReset)if(y.distanceTo(e.worldPosition0)>i&&s&&e.target){if(e.snapComplete=!1,e.data.snapDelay&&(e.delayFinished=!1,typeof window<"u"&&null!==e.timeoutId&&(window.clearTimeout(e.timeoutId),e.timeoutId=null)),e.wasOutside=!0,!e.data.resetAfterDistanceLimit)return;y.copy(e.worldPosition0),e.currentDampingFactor=e.resetDampingFactor}else if(e.wasOutside&&(e.data.snapDelay&&typeof window<"u"&&(e.timeoutId=window.setTimeout(()=>{e.delayFinished=!0,e.paused=!1,this.updateSingleEvent(e)},1e3*e.data.snapDelay)),e.currentDampingFactor=e.data.dampingFactor,e.wasOutside=!1),!1===e.delayFinished)return;!1===e.data.enabledTranslation[0]&&(y.x=w.x),!1===e.data.enabledTranslation[1]&&(y.y=w.y),!1===e.data.enabledTranslation[2]&&(y.z=w.z);let a=M(w,y,e.wasOutside?0:e.data.maxDelta);if(e.currentDampingFactor>1){let n=f.subVectors(a,w).divideScalar(e.currentDampingFactor);w.add(n),t&&x(e.object,w),e.paused=n.length()<.01}else x(e.object,a),e.paused=!0;e.object?.dispatchEvent({type:"beginEvent",eventName:"Follow"}),e.object.dispatchEvent(L)}},b=new m,C=new m,j=new v,S=new p,P=new p,O=new m,N=new m,k=new m,Q=new m,z=new g,T={type:"requestRender"},W={type:"changeRotation"},A=function(){let e=new v;return function(n,i){null!==n.parent?e.multiplyMatrices(n.parent.matrixWorld,n.hiddenMatrix):e.copy(n.hiddenMatrix),i.premultiply(d(e).invert()),n.rotation.setFromRotationMatrix(i),n.updateMatrix(),n instanceof l&&t(n.parent)&&n.invalidateDownstreamBooleanData(!0)}}(),U=class{constructor(e,t,n,i){this.id=t,this.object=n,this.paused=!1,this.currentDampingFactor=1,this.isReset=!1,this.worldQuaternion0=new p,this.timeoutId=null,this.delayFinished=!0,this.wasOutside=!1,this.data={...c.defaultData,...e,...void 0===e.resetOnPointerLeave&&{resetOnPointerLeave:!1}},void 0===e.target||"cursor"===e.target||(this.target=i.find(e.target)),this.data.dampingFactor&&(this.currentDampingFactor=this.data.dampingFactor),this.object.getWorldQuaternion(this.worldQuaternion0),isNaN(this.worldQuaternion0.x)&&(this.worldQuaternion0.x=0),isNaN(this.worldQuaternion0.y)&&(this.worldQuaternion0.y=0),isNaN(this.worldQuaternion0.z)&&(this.worldQuaternion0.z=0),isNaN(this.worldQuaternion0.w)&&(this.worldQuaternion0.w=1),this.resetDampingFactor=80/this.data.resetSpeed+1}},V=class extends n{constructor(){super(...arguments),this.events=[],this.pairOfEventListeners=[],this.pairOfUserEventListeners=[],this.onMouseMove=e=>{if(!(s.length>1)){this._lastMouseEvent=e,this.eventContext.updateRaycaster(e);for(let e of this.events)void 0===e.target&&this.updateSingleEvent(e)}},this.onMouseEnter=e=>{for(let e of this.events)void 0===e.target&&(e.isReset=!1,e.currentDampingFactor=e.data.dampingFactor)},this.onMouseLeave=e=>{for(let e of this.events)void 0===e.target&&(e.data.resetOnPointerLeave&&(e.isReset=!0,e.currentDampingFactor=e.resetDampingFactor),this.updateSingleEvent(e))},this.onScroll=e=>{if(this._lastMouseEvent){let e=new PointerEvent("pointermove",{clientX:this._lastMouseEvent.clientX,clientY:this._lastMouseEvent.clientY,bubbles:!0,cancelable:!0,view:window});this.eventContext.eventElement.dispatchEvent(e)}},this.onTargetChange=e=>()=>{this.updateSingleEvent(e)},this.createUserEventListener=t=>({eventName:n,target:i})=>{if(!n||!i)return;let s=e(n);s&&"LookAt"===s&&this.updateSingleEvent(t)}}connect(){let{page:e}=this.eventContext;if(e.traverseEntity(t=>{let n=t.data?.events.find(e=>"LookAt"===e.data.type&&!e.data.disabled);n&&(!e.data.globalPhysics.usePhysics||"dynamic"!==t.dataPatched.physics?.rigidBody)&&this.events.push(new U(n.data,n.id,t,e))}),!this.events.length)return;let{domElement:t,eventElement:n}=this.eventContext;this.domEventsNeeded.clear(),a&&(this.domEventsNeeded.add("pointerdown"),t.addEventListener("pointerdown",this.onMouseMove)),this.domEventsNeeded.add("pointermove"),n.addEventListener("pointermove",this.onMouseMove),this.eventContext.useWindowEvents?n.addEventListener("scroll",this.onScroll):(t.addEventListener("pointerenter",this.onMouseEnter),t.addEventListener("pointerleave",this.onMouseLeave));for(let e of this.events){if(void 0!==e.target){let t=this.onTargetChange(e),n=e.target;this.pairOfEventListeners.push([n,t]),n.addEventListener("requestRender",t)}let t=this.createUserEventListener(e),n=e.object;this.pairOfUserEventListeners.push([n,t]),n.addEventListener("userEvent",t)}}disconnect(){if(!this.events.length)return;let{domElement:e,eventElement:t}=this.eventContext;this.domEventsNeeded.clear(),a&&e.removeEventListener("pointerdown",this.onMouseMove),t.removeEventListener("pointermove",this.onMouseMove),e.removeEventListener("pointerenter",this.onMouseEnter),e.removeEventListener("pointerleave",this.onMouseLeave),t.removeEventListener("scroll",this.onScroll);for(let[e,t]of this.pairOfEventListeners)e.removeEventListener("requestRender",t);for(let[e,t]of this.pairOfUserEventListeners)e.removeEventListener("userEvent",t);for(let e of this.events)e.paused=!0,e.isReset=!1}onAnimationFrameDamping(){for(let e of this.events)e.paused||this.updateSingleEvent(e)}updateSingleEvent(e){let{tilt:t,axis:n,distance:i,plane:s,limitDistance:a,enabledRotation:o,limitDistanceEnabled:r}=e.data,{getCamera:l,raycaster:u}=this.eventContext,{object:h,target:c}=e;if(h.getWorldPosition(O),!e.isReset)if(e.target)e.target.getWorldPosition(N);else{if("custom"===s?(l().getWorldDirection(C),C.negate(),z.setFromNormalAndCoplanarPoint(C,O)):("xy"===s?b.set(0,0,1):"xz"===s?b.set(0,1,0):"yz"===s&&b.set(1,0,0),z.setFromNormalAndCoplanarPoint(b,O)),!u.ray.intersectPlane(z,N))return;i>0&&("custom"===s||void 0===s)&&N.addScaledVector(C,i)}if(e.isReset||(c?"target"===t?k.copy(c.up).applyMatrix4(j.extractRotation(c.matrixWorld)).normalize():o.some(e=>!1===e)?("x"===n?(Q.set(0,0,1),!1===o[2]&&Q.set(0,1,0)):"y"===n?(Q.set(1,0,0),!1===o[0]&&Q.set(0,0,1)):(Q.set(0,1,0),!1===o[1]&&Q.set(1,0,0)),k.copy(Q).applyQuaternion(e.worldQuaternion0).normalize()):k.set(0,1,0):"custom"===s?k.set(0,1,0):k.copy(b)),e.isReset)P.copy(e.worldQuaternion0);else if(O.distanceTo(N)>a&&r&&c){if(e.data.snapDelay&&(e.delayFinished=!1,typeof window<"u"&&null!==e.timeoutId&&(window.clearTimeout(e.timeoutId),e.timeoutId=null)),e.wasOutside=!0,!e.data.resetAfterDistanceLimit)return;P.copy(e.worldQuaternion0),e.currentDampingFactor=e.resetDampingFactor}else{if(e.wasOutside&&(e.data.snapDelay&&typeof window<"u"&&(e.timeoutId=window.setTimeout(()=>{e.delayFinished=!0,e.paused=!1,this.updateSingleEvent(e)},1e3*e.data.snapDelay)),e.currentDampingFactor=e.data.dampingFactor,e.wasOutside=!1),!1===e.delayFinished)return;(function(e,t,n,i,s,a){let o=j.elements;Y.subVectors(t,n),0===Y.lengthSq()&&(Y.z=1),Y.normalize(),B.crossVectors(i,Y),0===B.lengthSq()&&(1===Math.abs(i.z)?Y.x+=1e-4:Y.z+=1e-4,Y.normalize(),B.crossVectors(i,Y)),B.normalize(),I.crossVectors(Y,B),"x"===s?1===a.z?[B,I,Y]=[Y,B,I]:(B.negate(),[B,Y]=[Y,B]):"y"===s?1===a.x?[B,I,Y]=[I,Y,B]:(B.negate(),[I,Y]=[Y,I]):1===a.x&&(B.negate(),[B,I]=[I,B]),o[0]=B.x,o[4]=I.x,o[8]=Y.x,o[1]=B.y,o[5]=I.y,o[9]=Y.y,o[2]=B.z,o[6]=I.z,o[10]=Y.z})(0,N,O,k,n,Q),P.setFromRotationMatrix(j),S.setFromUnitVectors(Q.applyQuaternion(P),k),o.some(e=>!1===e)&&"target"!==t&&P.premultiply(S).normalize()}e.currentDampingFactor>1?(h.updateWorldMatrix(!0,!1),S.setFromRotationMatrix(d(h.matrixWorld)),S.slerp(P,1/e.currentDampingFactor),A(h,j.makeRotationFromQuaternion(S)),e.paused=8*(1-S.dot(P))<1e-6):(A(h,j.makeRotationFromQuaternion(P)),e.paused=!0),e.object?.dispatchEvent({type:"beginEvent",eventName:"LookAt"}),h.dispatchEvent(T),h.dispatchEvent(W)}},I=new m,B=new m,Y=new m;i("Follow",({eventContext:e,eventManager:t})=>new R(e,t)),i("LookAt",({eventContext:e})=>new V(e)),u("tracking");
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as t}from"./runtime-chunk-
|
|
1
|
+
import{a as t}from"./runtime-chunk-GPACKOH2.js";import{k as i}from"./runtime-chunk-6UUF5VIS.js";import"./runtime-chunk-WHKBOV2O.js";import"./runtime-chunk-NTUTXO7Q.js";import{a as e,b as n}from"./runtime-chunk-KGZNRID6.js";import"./runtime-chunk-R43XZP65.js";import"./runtime-chunk-ZMXEX5NX.js";import"./runtime-chunk-DSJY3WL2.js";import"./runtime-chunk-3J5YHSQW.js";import"./runtime-chunk-FTVQTRM7.js";import"./runtime-chunk-ESZD4IRS.js";import"./runtime-chunk-WMWQXAOH.js";import"./runtime-chunk-SL64ZYCB.js";import"./runtime-chunk-RF63UVAU.js";import"./runtime-chunk-YFAATRJU.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{b as r,e as s}from"./runtime-chunk-QVC5UDJO.js";import"./runtime-chunk-OOC7YSI5.js";import"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-5XUI4Z6R.js";import{a as h}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-OW6T4XFV.js";import{Bc as o,Cc as m}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var a=class extends o{constructor(t,i,n,r,s){super(),this.data=t,this.page=i,this.animationControls=n,this.shared=r,this.condition=s,this.startOnceDelay=0,this.toggleIsForward=!1;let h=t.object,o=i.scene.find(t.object);o&&Array.isArray(o.identity)&&(h=o.identity[0]),this.data={...t,object:h};let m=this.animationControls.clipIdToAction[t.clipId+"/"+h];if(this.duration=m?.getClip()?.duration??1,this.data.crop2){let t=e(m?.getClip());this.leftFrameTime=this.data.crop2[0]/(t-1)*this.duration,this.rightFrameTime=this.data.crop2[1]/(t-1)*this.duration}else{let t=m?.getClip()?.tracks[0]?.times.length;t&&t>1?(this.leftFrameTime=this.data.crop[0]/t*this.duration,this.rightFrameTime=this.data.crop[1]/t*this.duration):(this.leftFrameTime=0,this.rightFrameTime=this.duration)}this.startOnceDelay=t.delay}get playing(){return this.threeAnimAction?.isRunning()??!1}play(t=!1){if(!1===s(this.shared,this.condition))return!1;window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(()=>{if(this.threeAnimAction=this.animationControls.play(this.data),!this.threeAnimAction)return;this.threeAnimAction.reset(),this.threeAnimAction.time=this.leftFrameTime,this.threeAnimAction._clip.start=this.leftFrameTime,this.threeAnimAction._clip.duration=this.rightFrameTime;let i=this.data.object;Object.entries(this.animationControls.clipIdToAction).forEach(([e,n])=>{let r=e.split("/")[1];this.threeAnimAction!==n&&r===i&&(t?n.fadeOut(.2):n.stop())}),t&&this.threeAnimAction?.fadeIn(.2)},this.startOnceDelay)}pause(){this.threeAnimAction&&(this.threeAnimAction.paused=!0),window.clearTimeout(this.timeoutId),delete this.timeoutId}stop(){this.threeAnimAction?.fadeOut(.2)}seek(t){this.threeAnimAction=this.animationControls.play(this.data),this.threeAnimAction&&(this.threeAnimAction.paused=!0,this.threeAnimAction.time=m.clamp(this.threeAnimAction.time+1/60*t,this.leftFrameTime,this.rightFrameTime-16e-5),this.animationControls.needsUpdate=!0,this.animationControls.requestRender())}toggle(t,i=!1){if(!1===s(this.shared,this.condition))return!1;this.toggleIsForward=t??!this.toggleIsForward,this.threeAnimAction&&(this.threeAnimAction._loopCount=0),this.playing?this.threeAnimAction&&(this.threeAnimAction.timeScale=this.toggleIsForward?1:-1,this.toggleIsForward?(this.threeAnimAction._clip.start=this.leftFrameTime,this.threeAnimAction._clip.duration=this.rightFrameTime):(this.threeAnimAction._clip.start=this.rightFrameTime,this.threeAnimAction._clip.duration=this.leftFrameTime)):this.timeoutId=window.setTimeout(()=>{if(this.threeAnimAction=this.animationControls.play(this.data),this.threeAnimAction){this.toggleIsForward?(this.threeAnimAction.time=this.leftFrameTime,this.threeAnimAction._clip.start=this.leftFrameTime,this.threeAnimAction._clip.duration=this.rightFrameTime):(this.threeAnimAction.time=this.rightFrameTime,this.threeAnimAction._clip.start=this.rightFrameTime,this.threeAnimAction._clip.duration=this.leftFrameTime),this.threeAnimAction.paused=!1,this.threeAnimAction.timeScale=this.toggleIsForward?1:-1;let t=this.data.clipId.split("/")[1];Object.entries(this.animationControls.clipIdToAction).forEach(([e,n])=>{let r=e.split("/")[1];this.threeAnimAction!==n&&r===t&&n.isRunning()&&(i?n.fadeOut(.2):n.stop())}),i&&this.threeAnimAction?.fadeIn(.2)}},this.startOnceDelay)}playFromCurrent(){this.toggle(!0)}reverseFromCurrent(){this.toggle(!1)}dispose(){let t=this.animationControls.clipIdToAction[this.data.clipId+"/"+this.data.object]?.getClip();t&&(t.duration=this.duration),this.pause()}};n(i),r("Transition",({eventType:i,data:e,page:n,shared:r,actionCondition:s})=>new t(i,e,n,r,s)),r("Animation",({data:t,page:i,eventManager:e,shared:n,actionCondition:r})=>new a(t,i,e.animationControls,n,r)),h("transitions");
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
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 u,n as l}from"./runtime-chunk-WHKBOV2O.js";import"./runtime-chunk-NTUTXO7Q.js";import"./runtime-chunk-FTVQTRM7.js";import{I as p,ea as f}from"./runtime-chunk-YFAATRJU.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{b as v}from"./runtime-chunk-OOC7YSI5.js";import"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-4KZXQGUQ.js";import{e as g,f as y}from"./runtime-chunk-5XUI4Z6R.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 R,Bd as x,Cc as S,Lc as F,Le as T,bd as H,ce as I,dd as W,ld as D}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";function U(e,t,i,r){return r?i:2048/Math.max(1,e,t)}var B=new b(-1,1,1,-1,0,1),M=new class extends W{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 I({defines:{},uniforms:{tDiffuse:new T(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 D(M,e)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,B)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}}(E),G=null,k=null,C=t.identity(),_=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=U(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 u(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 F(1,1,{type:R,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 x(this.canvas)),this._canvasTexture}async init(){await this.renderer.init(),this.renderer.uiFontReady?.then(()=>{this.frameOverride&&this.onRenderRequestedDownstream()})}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=C,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=U(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&&A({objectOverride:h,objectRoot:d,newParentWidth:i,newParentHeight:r,initialParentWidth:a,initialParentHeight:s})}}function A({objectOverride:e,objectRoot:t,newParentWidth:i,newParentHeight:r,initialParentWidth:a,initialParentHeight:s}){let[n,h]=function(e){if(q(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:u,position:p}=l({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)V({stateId:n,objectOverride:e,objectRoot:t,newParentWidth:i,newParentHeight:r,initialParentWidth:a,initialParentHeight:s});if(q(e)||e instanceof d)q(e)&&(e.width=o,e.height=u,e.data={...e.data,width:o,height:u}),L({objectOverride:e,objectRoot:t,newParentWidth:o,newParentHeight:u,initialParentWidth:n,initialParentHeight:h});else if(e instanceof m){let i=t,r=0!==n?o/n:1,a=0!==h?u/h:1;e.path=c(i.path,r,a),e.data={...e.data,path:e.path}}}function V({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}=l({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 q(e){return e instanceof n||e instanceof o||e instanceof s||e instanceof h}var N=class extends f{constructor(e,t,i){super(e,t,i),this.isUIObject=!0,this.uiCanvas=new _(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 N(e,t,i)),P({Scene2D:u,UICanvas:_,loadHanaUIRUNTIME:r,setHanaUIWasmUrl:i}),w("ui-2d");
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as e}from"./runtime-chunk-TU4KDRKR.js";import{a,b as t}from"./runtime-chunk-DZNU62CT.js";import{a as i,b as s,e as r,f as n,g as d}from"./runtime-chunk-MM75L5X4.js";import"./runtime-chunk-Z5OH244S.js";import{a as o}from"./runtime-chunk-TZCHGFVF.js";import{Ha as h,Ia as l,v as c}from"./runtime-chunk-OW6T4XFV.js";import{Cc as m,Ec as p,Fc as u,Oc as y,Pc as V}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var b=new y,v=new u,f=new p,g=new u,T=new V,I=class extends a{constructor(a,t,i,s,r){super(a),this.sharedVariables=t,this.eventManager=i,this.needsMouse=s,this.needsRaycast=r,this.dynamicVars=[],this.variablesToWatch=[],this.prevMouseProperty=null,this.prevRaycastProperty=null,this.pauseTime=0,this.isOutOfFocus=!1,this.events=[],this.onFrame=a=>{let t=this.eventContext.sharedAssets;if(this.rafId=window.requestAnimationFrame(this.onFrame),this.isOutOfFocus)return;let i=new Date,s=[],r=[];for(let e=0;e<this.propertiesToWatch.length;e++){let{objectId:a,property:t,prevValue:i}=this.propertiesToWatch[e],s=this.eventContext.scene.find(a),n=c.propertyPaths[t];if("width"===n[0]||"height"===n[0]||"depth"===n[0])s=s.geometry.userData.parameters[n[0]];else if(("position"===n[0]||"rotation"===n[0]&&n.length>1)&&s.getPhysicsLocalMatrix?.(b))b.decompose(v,f,g),"position"===n[0]?s=n.length>1?v[n[1]]:v:(T.setFromQuaternion(f,s.rotation.order),s=T[n[1]]);else for(let e=0;e<n.length;e++)s=s[n[e]];null===i?this.propertiesToWatch[e].prevValue=s instanceof u?s.clone():s:(s instanceof u?!s.equals(i):i!==s)&&(r.push({objId:a,property:t}),s instanceof u?this.propertiesToWatch[e].prevValue.copy(s):this.propertiesToWatch[e].prevValue=s)}for(let e=0;e<this.variablesToWatch.length;e++){let{id:a,prevValue:i}=this.variablesToWatch[e],r=t.getVariable(a);r!==i&&(s.push(a),this.variablesToWatch[e].prevValue=r)}for(let r=0;r<this.dynamicVars.length;r++){let{id:n,expectedTime:d,last:o,data:c,timerSeconds:p,startValue:u}=this.dynamicVars[r],y=1e3;if("timer"!==c.dynamicVariableType&&"stopwatch"!==c.dynamicVariableType||"number3decimal"!==c.format?"counter"===c.dynamicVariableType?y=c.updateInterval:"random"===c.dynamicVariableType&&(y=c.isStatic?1/0:c.updateInterval):y=1,-1!==d){if("Stopped"!==t.getDynamicVariablePlayState(n)&&"Restarted"!==t.getDynamicVariablePlayState(n)||(this.dynamicVars[r].last=a,this.dynamicVars[r].expectedTime=a+y,"counter"===c.dynamicVariableType&&t.getVariable(n)!==u&&(t.updateVariable(n,u),this.eventManager.requestRender()),("timer"===c.dynamicVariableType||"stopwatch"===c.dynamicVariableType)&&this.dynamicVars[r].timerSeconds!==u&&(this.dynamicVars[r].timerSeconds=u,t.updateVariable(n,l.getFormattedTimerTime(u,c)),this.eventManager.requestRender()),"Restarted"===t.getDynamicVariablePlayState(n)&&t.setDynamicVariablePlayState(n,"Playing"),"Stopped"!==t.getDynamicVariablePlayState(n))){if("Paused"===t.getDynamicVariablePlayState(n)){void 0===this.dynamicVars[r].deltaToExpectedTime&&(this.dynamicVars[r].deltaToExpectedTime=Math.max(this.dynamicVars[r].expectedTime-a,0)),this.dynamicVars[r].last=a-(y-this.dynamicVars[r].deltaToExpectedTime),this.dynamicVars[r].expectedTime=a+this.dynamicVars[r].deltaToExpectedTime;continue}if(this.dynamicVars[r].deltaToExpectedTime=void 0,a>=d)if(this.dynamicVars[r].last=a,this.dynamicVars[r].expectedTime+=y,"random"===c.dynamicVariableType){let e=c.min+Math.random()*(c.max-c.min),a=c.decimals;e=Math.round(e*Math.pow(10,a))/Math.pow(10,a),t.updateVariable(n,e),s.push(n),this.eventManager.requestRender()}else if("counter"===c.dynamicVariableType){let e=t.getVariable(n),a=t.getDynamicVariableToggleIsForward(n)??!0,i=t.getVariable(n)+c.increment*(a?1:-1);c.hasEnd&&(i=c.increment>0?m.clamp(i,u,c.endValue):m.clamp(i,c.endValue,u),i===u&&t.setDynamicVariableToggleIsForward(n,void 0),c.repeat?i===c.endValue&&(i=u):(i===u||i===c.endValue)&&t.setDynamicVariablePlayState(n,"Paused")),i!==e&&(s.push(n),t.updateVariable(n,i),this.eventManager.requestRender())}else if("time"===c.dynamicVariableType){let a=t.getVariable(n),r=e(i,c);if("object"==typeof a&&"textValue"in a&&"object"==typeof r&&"textValue"in r){if(Array.isArray(a.textValue)&&Array.isArray(r.textValue)){if(a.textValue.every((e,a)=>e===r.textValue[a]))continue}else if(a.textValue===r.textValue)continue}else if(a===r)continue;t.updateVariable(n,r),s.push(n),this.eventManager.requestRender()}else{let e=h.isTextValue(c.endValue)?w(c.endValue.textValue):c.endValue,i=t.getDynamicVariableToggleIsForward(n)??!0,d=p+(a-o)/1e3*("timer"===c.dynamicVariableType?-1:1)*(i?1:-1);d=Math.max(d,0),c.hasEnd&&(d="stopwatch"===c.dynamicVariableType?m.clamp(d,u,e):m.clamp(d,e,u),d===u&&t.setDynamicVariableToggleIsForward(n,void 0),c.repeat?Math.abs(d-e)<("number3decimal"===c.format?1e-4:.1)&&(d=u):(Math.abs(d-u)<("number3decimal"===c.format?1e-4:.1)||Math.abs(d-e)<("number3decimal"===c.format?1e-4:.1))&&t.setDynamicVariablePlayState(n,"Paused")),d!==p&&(s.push(n),this.dynamicVars[r].timerSeconds=d,t.updateVariable(n,l.getFormattedTimerTime(d,c)),this.eventManager.requestRender())}}}else this.dynamicVars[r].last=a,this.dynamicVars[r].expectedTime=a+y}let n=!1;t.mouseProperty!==this.prevMouseProperty&&(this.prevMouseProperty=t.mouseProperty,n=!0);let d=!1;t.raycastProperty!==this.prevRaycastProperty&&(this.prevRaycastProperty=t.raycastProperty,d=!0),this.events.forEach(e=>{(s.includes(e.data.variableId)||r.find(a=>a.objId===e.data.objectId&&a.property===e.data.property)||"mouseProperty"===e.data.variableId&&n||"raycastProperty"===e.data.variableId&&d)&&(e.dispatch(),this.eventManager.requestRender())})},this.onBlur=()=>{this.pause()},this.onFocus=()=>{this.resume()}}pause(){this.isOutOfFocus||(this.isOutOfFocus=!0,this.pauseTime=Date.now())}resume(){if(!this.isOutOfFocus)return;this.isOutOfFocus=!1;let e=Date.now()-this.pauseTime;for(let a=0;a<this.dynamicVars.length;a++)this.dynamicVars[a].last+=e,this.dynamicVars[a].expectedTime+=e}connect(){this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(e=>"VariableChange"===e.data.type&&!e.data.disabled).forEach(a=>{this.events.push(new P(a.id,a.data,e,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager))})}),this.propertiesToWatch=this.events.filter(e=>"objectProperty"===e.data.variableId&&null!==e.data.objectId).map(e=>({objectId:e.data.objectId,property:e.data.property,prevValue:null}));let a=this.eventContext.sharedAssets;this.sharedVariables.forEach(({id:t,data:i})=>{if(!("dynamicVariableType"in i))return void(this.events.find(e=>e.data.variableId===t)&&this.variablesToWatch.push({id:t,prevValue:a.getVariable(t)}));let s;if("timer"===i.dynamicVariableType||"stopwatch"===i.dynamicVariableType){let e;if(h.isTextValue(i.value)&&Array.isArray(i.value.textValue)){let a=i.value.textValue;e=3===a.length?a[2]+60*a[1]+3600*a[0]:a[1]+60*a[0]}else e=i.value;s=e,this.dynamicVars.push({id:t,last:-1,expectedTime:-1,data:i,timerSeconds:e,startValue:s})}else"time"===i.dynamicVariableType&&a.updateVariable(t,e(new Date,i)),"counter"===i.dynamicVariableType&&(s=h.isTextValue(i.value)?w(i.value.textValue):i.value),this.dynamicVars.push({id:t,last:-1,expectedTime:-1,data:i,startValue:s})}),this.rafId=window.requestAnimationFrame(this.onFrame),window.addEventListener("blur",this.onBlur),window.addEventListener("focus",this.onFocus)}disconnect(){window.removeEventListener("blur",this.onBlur),window.removeEventListener("focus",this.onFocus),this.rafId&&(window.cancelAnimationFrame(this.rafId),this.rafId=void 0),this.events.forEach(e=>e.dispose())}},P=class{constructor(e,a,t,i,s,r){this.id=e,this.data=a,this.object=t,this.actions=n(a,a.actions,i,s,r,t)}dispatch(){let e=this.actions;e.Audio.forEach(e=>e.dispatchConditional()),e.Particles.forEach(e=>e.dispatchConditional()),e.Video.forEach(e=>e.dispatchConditional()),e.Create.forEach(e=>e.dispatch()),e.Destroy.forEach(e=>e.dispatch()),e.Reset.forEach(e=>e.dispatch()),e.Transition.forEach(e=>{e.object.currentTransitionEvent!==this&&(e.object.currentTransitionEvent=this),e.init()}),e.Transition.forEach(e=>e.play()),e.Animation.forEach(e=>e.play()),e.TimelineAnimation.forEach(e=>e.dispatchConditional()),e.SwitchCamera.forEach(e=>e.play()),e.SceneTransition.forEach(e=>e.dispatch()),e.SetVariable.forEach(e=>e.checkConditions()),e.SetVariable.forEach(e=>e.dispatch()),e.DynamicVariablePlay.forEach(e=>e.dispatch()),e.ClearLocalStorage.forEach(e=>e.dispatch()),e.UserAPI.forEach(e=>e.dispatch())}dispose(){d(this.actions)}};function w(e){return 3===e.length?e[2]+60*e[1]+3600*e[0]:e[1]+60*e[0]}var x=class{constructor(e,a,t,i){this.data=e,this.page=a,this.shared=t,this.condition=i,this.evaluatedCondition=!1}checkConditions(){this.evaluatedCondition=r(this.shared,this.condition)}dispatch(){if(!1===this.evaluatedCondition)return!1;let e=this.shared.getVariable(this.data.variableId),a=i(this.data.expression,this.shared,h.typeOfVariable(e));void 0!==a&&this.shared.updateVariable(this.data.variableId,"string"==typeof a?{textValue:a}:a)}dispose(){}},D=class{constructor(e,a,t,i){this.data=e,this.page=a,this.shared=t,this.condition=i,this.timeoutId=null}dispatchInner(){if(!1===r(this.shared,this.condition))return!1;let e=this.shared.getDynamicVariablePlayState(this.data.variableId);if("PlayPause"===this.data.mode)void 0===this.shared.getDynamicVariableToggleIsForward(this.data.variableId)&&this.shared.setDynamicVariableToggleIsForward(this.data.variableId,!0),this.shared.setDynamicVariablePlayState(this.data.variableId,"Playing"===e?"Paused":"Playing");else if("Play"===this.data.mode&&"Playing"!==e)void 0===this.shared.getDynamicVariableToggleIsForward(this.data.variableId)&&this.shared.setDynamicVariableToggleIsForward(this.data.variableId,!0),this.shared.setDynamicVariablePlayState(this.data.variableId,"Playing");else if("Stop"===this.data.mode&&"Stopped"!==e)this.shared.setDynamicVariablePlayState(this.data.variableId,"Stopped");else if("Pause"===this.data.mode&&"Paused"!==e)this.shared.setDynamicVariablePlayState(this.data.variableId,"Paused");else if("Restart"===this.data.mode)this.shared.setDynamicVariablePlayState(this.data.variableId,"Restarted");else if("Toggle"===this.data.mode){let a=this.shared.getDynamicVariableToggleIsForward(this.data.variableId);"Playing"===e?this.shared.setDynamicVariableToggleIsForward(this.data.variableId,void 0!==a&&!a):(this.shared.setDynamicVariableToggleIsForward(this.data.variableId,!a),this.shared.setDynamicVariablePlayState(this.data.variableId,"Playing"))}}dispatch(){let e=this.data.delay,a=this.shared.getDynamicVariablePlayState(this.data.variableId);"PlayPause"===this.data.mode&&"Playing"===a&&(e=this.data.pauseDelay),0!==e?(this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(()=>{this.timeoutId=null,this.dispatchInner()},e)):this.dispatchInner()}dispose(){this.timeoutId&&window.clearTimeout(this.timeoutId)}};t("VariableChange",({eventContext:e,sharedVariables:a,eventManager:t,needsMouse:i,needsRaycast:s})=>new I(e,a,t,i,s)),s("SetVariable",({data:e,page:a,shared:t,actionCondition:i})=>new x(e,a,t,i)),s("DynamicVariablePlay",({data:e,page:a,shared:t,actionCondition:i})=>new D(e,a,t,i)),o("variables");
|
|
1
|
+
import{b as e}from"./runtime-chunk-TU4KDRKR.js";import{a,b as t}from"./runtime-chunk-DZNU62CT.js";import{a as i,b as s,e as r,f as n,g as d}from"./runtime-chunk-QVC5UDJO.js";import"./runtime-chunk-5XUI4Z6R.js";import{a as o}from"./runtime-chunk-TZCHGFVF.js";import{Ha as h,Ia as l,v as c}from"./runtime-chunk-OW6T4XFV.js";import{Cc as m,Ec as p,Fc as u,Oc as y,Pc as V}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var b=new y,v=new u,f=new p,g=new u,T=new V,I=class extends a{constructor(a,t,i,s,r){super(a),this.sharedVariables=t,this.eventManager=i,this.needsMouse=s,this.needsRaycast=r,this.dynamicVars=[],this.variablesToWatch=[],this.prevMouseProperty=null,this.prevRaycastProperty=null,this.pauseTime=0,this.isOutOfFocus=!1,this.events=[],this.onFrame=a=>{let t=this.eventContext.sharedAssets;if(this.rafId=window.requestAnimationFrame(this.onFrame),this.isOutOfFocus)return;let i=new Date,s=[],r=[];for(let e=0;e<this.propertiesToWatch.length;e++){let{objectId:a,property:t,prevValue:i}=this.propertiesToWatch[e],s=this.eventContext.scene.find(a),n=c.propertyPaths[t];if("width"===n[0]||"height"===n[0]||"depth"===n[0])s=s.geometry.userData.parameters[n[0]];else if(("position"===n[0]||"rotation"===n[0]&&n.length>1)&&s.getPhysicsLocalMatrix?.(b))b.decompose(v,f,g),"position"===n[0]?s=n.length>1?v[n[1]]:v:(T.setFromQuaternion(f,s.rotation.order),s=T[n[1]]);else for(let e=0;e<n.length;e++)s=s[n[e]];null===i?this.propertiesToWatch[e].prevValue=s instanceof u?s.clone():s:(s instanceof u?!s.equals(i):i!==s)&&(r.push({objId:a,property:t}),s instanceof u?this.propertiesToWatch[e].prevValue.copy(s):this.propertiesToWatch[e].prevValue=s)}for(let e=0;e<this.variablesToWatch.length;e++){let{id:a,prevValue:i}=this.variablesToWatch[e],r=t.getVariable(a);r!==i&&(s.push(a),this.variablesToWatch[e].prevValue=r)}for(let r=0;r<this.dynamicVars.length;r++){let{id:n,expectedTime:d,last:o,data:c,timerSeconds:p,startValue:u}=this.dynamicVars[r],y=1e3;if("timer"!==c.dynamicVariableType&&"stopwatch"!==c.dynamicVariableType||"number3decimal"!==c.format?"counter"===c.dynamicVariableType?y=c.updateInterval:"random"===c.dynamicVariableType&&(y=c.isStatic?1/0:c.updateInterval):y=1,-1!==d){if("Stopped"!==t.getDynamicVariablePlayState(n)&&"Restarted"!==t.getDynamicVariablePlayState(n)||(this.dynamicVars[r].last=a,this.dynamicVars[r].expectedTime=a+y,"counter"===c.dynamicVariableType&&t.getVariable(n)!==u&&(t.updateVariable(n,u),this.eventManager.requestRender()),("timer"===c.dynamicVariableType||"stopwatch"===c.dynamicVariableType)&&this.dynamicVars[r].timerSeconds!==u&&(this.dynamicVars[r].timerSeconds=u,t.updateVariable(n,l.getFormattedTimerTime(u,c)),this.eventManager.requestRender()),"Restarted"===t.getDynamicVariablePlayState(n)&&t.setDynamicVariablePlayState(n,"Playing"),"Stopped"!==t.getDynamicVariablePlayState(n))){if("Paused"===t.getDynamicVariablePlayState(n)){void 0===this.dynamicVars[r].deltaToExpectedTime&&(this.dynamicVars[r].deltaToExpectedTime=Math.max(this.dynamicVars[r].expectedTime-a,0)),this.dynamicVars[r].last=a-(y-this.dynamicVars[r].deltaToExpectedTime),this.dynamicVars[r].expectedTime=a+this.dynamicVars[r].deltaToExpectedTime;continue}if(this.dynamicVars[r].deltaToExpectedTime=void 0,a>=d)if(this.dynamicVars[r].last=a,this.dynamicVars[r].expectedTime+=y,"random"===c.dynamicVariableType){let e=c.min+Math.random()*(c.max-c.min),a=c.decimals;e=Math.round(e*Math.pow(10,a))/Math.pow(10,a),t.updateVariable(n,e),s.push(n),this.eventManager.requestRender()}else if("counter"===c.dynamicVariableType){let e=t.getVariable(n),a=t.getDynamicVariableToggleIsForward(n)??!0,i=t.getVariable(n)+c.increment*(a?1:-1);c.hasEnd&&(i=c.increment>0?m.clamp(i,u,c.endValue):m.clamp(i,c.endValue,u),i===u&&t.setDynamicVariableToggleIsForward(n,void 0),c.repeat?i===c.endValue&&(i=u):(i===u||i===c.endValue)&&t.setDynamicVariablePlayState(n,"Paused")),i!==e&&(s.push(n),t.updateVariable(n,i),this.eventManager.requestRender())}else if("time"===c.dynamicVariableType){let a=t.getVariable(n),r=e(i,c);if("object"==typeof a&&"textValue"in a&&"object"==typeof r&&"textValue"in r){if(Array.isArray(a.textValue)&&Array.isArray(r.textValue)){if(a.textValue.every((e,a)=>e===r.textValue[a]))continue}else if(a.textValue===r.textValue)continue}else if(a===r)continue;t.updateVariable(n,r),s.push(n),this.eventManager.requestRender()}else{let e=h.isTextValue(c.endValue)?w(c.endValue.textValue):c.endValue,i=t.getDynamicVariableToggleIsForward(n)??!0,d=p+(a-o)/1e3*("timer"===c.dynamicVariableType?-1:1)*(i?1:-1);d=Math.max(d,0),c.hasEnd&&(d="stopwatch"===c.dynamicVariableType?m.clamp(d,u,e):m.clamp(d,e,u),d===u&&t.setDynamicVariableToggleIsForward(n,void 0),c.repeat?Math.abs(d-e)<("number3decimal"===c.format?1e-4:.1)&&(d=u):(Math.abs(d-u)<("number3decimal"===c.format?1e-4:.1)||Math.abs(d-e)<("number3decimal"===c.format?1e-4:.1))&&t.setDynamicVariablePlayState(n,"Paused")),d!==p&&(s.push(n),this.dynamicVars[r].timerSeconds=d,t.updateVariable(n,l.getFormattedTimerTime(d,c)),this.eventManager.requestRender())}}}else this.dynamicVars[r].last=a,this.dynamicVars[r].expectedTime=a+y}let n=!1;t.mouseProperty!==this.prevMouseProperty&&(this.prevMouseProperty=t.mouseProperty,n=!0);let d=!1;t.raycastProperty!==this.prevRaycastProperty&&(this.prevRaycastProperty=t.raycastProperty,d=!0),this.events.forEach(e=>{(s.includes(e.data.variableId)||r.find(a=>a.objId===e.data.objectId&&a.property===e.data.property)||"mouseProperty"===e.data.variableId&&n||"raycastProperty"===e.data.variableId&&d)&&(e.dispatch(),this.eventManager.requestRender())})},this.onBlur=()=>{this.pause()},this.onFocus=()=>{this.resume()}}pause(){this.isOutOfFocus||(this.isOutOfFocus=!0,this.pauseTime=Date.now())}resume(){if(!this.isOutOfFocus)return;this.isOutOfFocus=!1;let e=Date.now()-this.pauseTime;for(let a=0;a<this.dynamicVars.length;a++)this.dynamicVars[a].last+=e,this.dynamicVars[a].expectedTime+=e}connect(){this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(e=>"VariableChange"===e.data.type&&!e.data.disabled).forEach(a=>{this.events.push(new P(a.id,a.data,e,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager))})}),this.propertiesToWatch=this.events.filter(e=>"objectProperty"===e.data.variableId&&null!==e.data.objectId).map(e=>({objectId:e.data.objectId,property:e.data.property,prevValue:null}));let a=this.eventContext.sharedAssets;this.sharedVariables.forEach(({id:t,data:i})=>{if(!("dynamicVariableType"in i))return void(this.events.find(e=>e.data.variableId===t)&&this.variablesToWatch.push({id:t,prevValue:a.getVariable(t)}));let s;if("timer"===i.dynamicVariableType||"stopwatch"===i.dynamicVariableType){let e;if(h.isTextValue(i.value)&&Array.isArray(i.value.textValue)){let a=i.value.textValue;e=3===a.length?a[2]+60*a[1]+3600*a[0]:a[1]+60*a[0]}else e=i.value;s=e,this.dynamicVars.push({id:t,last:-1,expectedTime:-1,data:i,timerSeconds:e,startValue:s})}else"time"===i.dynamicVariableType&&a.updateVariable(t,e(new Date,i)),"counter"===i.dynamicVariableType&&(s=h.isTextValue(i.value)?w(i.value.textValue):i.value),this.dynamicVars.push({id:t,last:-1,expectedTime:-1,data:i,startValue:s})}),this.rafId=window.requestAnimationFrame(this.onFrame),window.addEventListener("blur",this.onBlur),window.addEventListener("focus",this.onFocus)}disconnect(){window.removeEventListener("blur",this.onBlur),window.removeEventListener("focus",this.onFocus),this.rafId&&(window.cancelAnimationFrame(this.rafId),this.rafId=void 0),this.events.forEach(e=>e.dispose())}},P=class{constructor(e,a,t,i,s,r){this.id=e,this.data=a,this.object=t,this.actions=n(a,a.actions,i,s,r,t)}dispatch(){let e=this.actions;e.Audio.forEach(e=>e.dispatchConditional()),e.Particles.forEach(e=>e.dispatchConditional()),e.Video.forEach(e=>e.dispatchConditional()),e.Create.forEach(e=>e.dispatch()),e.Destroy.forEach(e=>e.dispatch()),e.Reset.forEach(e=>e.dispatch()),e.Transition.forEach(e=>{e.object.currentTransitionEvent!==this&&(e.object.currentTransitionEvent=this),e.init()}),e.Transition.forEach(e=>e.play()),e.Animation.forEach(e=>e.play()),e.TimelineAnimation.forEach(e=>e.dispatchConditional()),e.SwitchCamera.forEach(e=>e.play()),e.SceneTransition.forEach(e=>e.dispatch()),e.SetVariable.forEach(e=>e.checkConditions()),e.SetVariable.forEach(e=>e.dispatch()),e.DynamicVariablePlay.forEach(e=>e.dispatch()),e.ClearLocalStorage.forEach(e=>e.dispatch()),e.UserAPI.forEach(e=>e.dispatch())}dispose(){d(this.actions)}};function w(e){return 3===e.length?e[2]+60*e[1]+3600*e[0]:e[1]+60*e[0]}var x=class{constructor(e,a,t,i){this.data=e,this.page=a,this.shared=t,this.condition=i,this.evaluatedCondition=!1}checkConditions(){this.evaluatedCondition=r(this.shared,this.condition)}dispatch(){if(!1===this.evaluatedCondition)return!1;let e=this.shared.getVariable(this.data.variableId),a=i(this.data.expression,this.shared,h.typeOfVariable(e));void 0!==a&&this.shared.updateVariable(this.data.variableId,"string"==typeof a?{textValue:a}:a)}dispose(){}},D=class{constructor(e,a,t,i){this.data=e,this.page=a,this.shared=t,this.condition=i,this.timeoutId=null}dispatchInner(){if(!1===r(this.shared,this.condition))return!1;let e=this.shared.getDynamicVariablePlayState(this.data.variableId);if("PlayPause"===this.data.mode)void 0===this.shared.getDynamicVariableToggleIsForward(this.data.variableId)&&this.shared.setDynamicVariableToggleIsForward(this.data.variableId,!0),this.shared.setDynamicVariablePlayState(this.data.variableId,"Playing"===e?"Paused":"Playing");else if("Play"===this.data.mode&&"Playing"!==e)void 0===this.shared.getDynamicVariableToggleIsForward(this.data.variableId)&&this.shared.setDynamicVariableToggleIsForward(this.data.variableId,!0),this.shared.setDynamicVariablePlayState(this.data.variableId,"Playing");else if("Stop"===this.data.mode&&"Stopped"!==e)this.shared.setDynamicVariablePlayState(this.data.variableId,"Stopped");else if("Pause"===this.data.mode&&"Paused"!==e)this.shared.setDynamicVariablePlayState(this.data.variableId,"Paused");else if("Restart"===this.data.mode)this.shared.setDynamicVariablePlayState(this.data.variableId,"Restarted");else if("Toggle"===this.data.mode){let a=this.shared.getDynamicVariableToggleIsForward(this.data.variableId);"Playing"===e?this.shared.setDynamicVariableToggleIsForward(this.data.variableId,void 0!==a&&!a):(this.shared.setDynamicVariableToggleIsForward(this.data.variableId,!a),this.shared.setDynamicVariablePlayState(this.data.variableId,"Playing"))}}dispatch(){let e=this.data.delay,a=this.shared.getDynamicVariablePlayState(this.data.variableId);"PlayPause"===this.data.mode&&"Playing"===a&&(e=this.data.pauseDelay),0!==e?(this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(()=>{this.timeoutId=null,this.dispatchInner()},e)):this.dispatchInner()}dispose(){this.timeoutId&&window.clearTimeout(this.timeoutId)}};t("VariableChange",({eventContext:e,sharedVariables:a,eventManager:t,needsMouse:i,needsRaycast:s})=>new I(e,a,t,i,s)),s("SetVariable",({data:e,page:a,shared:t,actionCondition:i})=>new x(e,a,t,i)),s("DynamicVariablePlay",({data:e,page:a,shared:t,actionCondition:i})=>new D(e,a,t,i)),o("variables");
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ea as t}from"./runtime-chunk-
|
|
1
|
+
import{ea as t}from"./runtime-chunk-YFAATRJU.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{u as e}from"./runtime-chunk-OOC7YSI5.js";import"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-5XUI4Z6R.js";import{a as r,f as i}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-OW6T4XFV.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var n=class extends t{get forceComputeSize(){return!0}get shape(){return this.geometry.userData.shape}updateEntityBoxSize(t,r){let i=this.geometry.getAttribute("position");void 0!==i?e(i,this.geometry.drawRange.start,this.geometry.drawRange.count<1/0?this.geometry.drawRange.count:i.count,t,r):super.updateEntityBoxSize(t,r)}};i("VectorGeometry",(t,e,r)=>new n(t,e,r)),r("vector-shapes");
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as t}from"./runtime-chunk-FQNSP44B.js";import{b as i,e}from"./runtime-chunk-QVC5UDJO.js";import{e as s}from"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-5XUI4Z6R.js";import{a}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-OW6T4XFV.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var o=new Map,d=new Map,n=class{constructor(i,e,s){this.data=e,this.isPlayVideoAction=!0,this.delay=0,this.status="stopped";let{layerId:a,loop:n,volume:h,delay:l}=e;if(this.object=s,void 0===a)throw new Error("Missing property");let r=function(t,i){let e;if("material"in t){let s=t.material;e=Array.isArray(s)?t.material[0].layers.find(t=>t.uuid===i):t.material.layers.find(t=>t.uuid===i)}if(!e)return;let s=e.color?.texture?.image?.img??e.holders?.find(t=>t.isVideo)?.img;return s instanceof HTMLVideoElement?s:void 0}(s,a);r&&(this.videoElement=r,this.videoElement.loop=n===1/0,t&&(this.videoElement.autoplay=!0),void 0!==h&&(this.videoElement.volume=h)),void 0!==l&&(this.delay=l),d.has(s.uuid)?d.get(s.uuid).push(this):d.set(s.uuid,[this]),o.set(i,this),this.pause()}mute(){!this.videoElement||(this.videoElement.muted=!0)}unMute(){!this.videoElement||(this.videoElement.muted=!1)}play(t){if(!this.videoElement)return;let i=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);t?(this.mute(),this.delay+=150):i?(this.mute(),window.setTimeout(()=>{this.unMute()},100)):this.unMute(),this.delayTimerId=window.setTimeout(()=>{if(!this.videoElement)return;let t=this.videoElement.play();void 0!==t&&t.then(t=>{}).catch(t=>{this.play()}),this.clearDelay()},this.delay),this.status="playing"}clearDelay(){this.delayTimerId&&(clearTimeout(this.delayTimerId),delete this.delayTimerId)}pause(){!this.videoElement||(this.videoElement.pause(),this.status="paused")}stop(){!this.videoElement||(this.videoElement.pause(),this.videoElement.currentTime=0,this.status="stopped",this.clearDelay())}seek(t){return new Promise(i=>{if(!this.videoElement)return i();let e=this.videoElement.duration;if(e>0){let i=t%e;this.videoElement.currentTime=i}this.videoElement.addEventListener("seeked",()=>i(),{once:!0})})}playByToggle(){"stop"===this.data.toggle?"playing"===this.status?this.stop():(this.stop(),this.play()):"pause"===this.data.toggle?"playing"===this.status?this.pause():this.play():(this.stop(),this.play())}dispose(){!this.videoElement||(this.stop(),this.videoElement.muted=!0)}},h=class{constructor(t){this.data=t,this.isPauseVideoAction=!0}dispatch(){this.data.playVideo?this.pauseVideo(this.data.playVideo):this.data.object?this.pauseAllVideosFromObject(this.data.object):this.pauseAllVideos()}pauseVideo(t){let i=o.get(t);!i||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{i[this.data.interaction](),this.disposeDelay()},this.data.delay)):i[this.data.interaction]())}pauseAllVideosFromObject(t){let i=d.get(t);!i?.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{i.forEach(t=>t[this.data.interaction]()),this.disposeDelay()},this.data.delay)):i.forEach(t=>t[this.data.interaction]()))}pauseAllVideos(){let t=[...d.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}},l=class{constructor(t,i,e,s,a){if(this.data=i,this.shared=s,this.condition=a,"play"===i.interaction)this.interaction=new n(t,i,e);else{if("pause"!==i.interaction&&"stop"!==i.interaction)throw new Error("Missing property");this.interaction=new h(i)}}dispatchBasic(){if(!1===e(this.shared,this.condition))return!1;this.interaction instanceof n?this.interaction.playByToggle():this.interaction.dispatch()}dispatchConditional(){if(!1===e(this.shared,this.condition))return!1;this.interaction instanceof n?this.interaction.play():this.interaction.dispatch()}dispose(){this.interaction.dispose()}};i("Video",({id:t,data:i,object:e,shared:a,actionCondition:o})=>s(e)?null:new l(t,i,e,a,o)),a("video");
|
|
Binary file
|
|
Binary file
|