@splinetool/runtime 2.0.33 → 2.0.35

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.
Files changed (360) hide show
  1. package/README.md +6 -2
  2. package/build/{runtime-aiAssistant-O2CXSPWK.js → runtime-aiAssistant-CV4K5RNS.js} +1 -1
  3. package/build/runtime-aiAssistant-CV4K5RNS.js.br +0 -0
  4. package/build/runtime-aiAssistant-CV4K5RNS.js.gz +0 -0
  5. package/build/{runtime-apiServices-332YME3N.js → runtime-apiServices-IZQKNNJR.js} +1 -1
  6. package/build/runtime-apiServices-IZQKNNJR.js.br +0 -0
  7. package/build/runtime-apiServices-IZQKNNJR.js.gz +0 -0
  8. package/build/{runtime-audio-W35MH46I.js → runtime-audio-WTF7P43O.js} +1 -1
  9. package/build/runtime-audio-WTF7P43O.js.br +0 -0
  10. package/build/runtime-audio-WTF7P43O.js.gz +0 -0
  11. package/build/{runtime-chunk-B5IERHDJ.js → runtime-chunk-27CHRAEV.js} +1 -1
  12. package/build/runtime-chunk-27CHRAEV.js.br +0 -0
  13. package/build/runtime-chunk-27CHRAEV.js.gz +0 -0
  14. package/build/{runtime-chunk-VKFSHS4O.js → runtime-chunk-57QRPNRK.js} +1 -1
  15. package/build/runtime-chunk-57QRPNRK.js.br +0 -0
  16. package/build/runtime-chunk-57QRPNRK.js.gz +0 -0
  17. package/build/{runtime-chunk-4PWCQGEO.js → runtime-chunk-5BLW3U4U.js} +1 -1
  18. package/build/runtime-chunk-5BLW3U4U.js.br +0 -0
  19. package/build/runtime-chunk-5BLW3U4U.js.gz +0 -0
  20. package/build/{runtime-chunk-7KG76FNY.js → runtime-chunk-5LOD2XNQ.js} +1 -1
  21. package/build/runtime-chunk-5LOD2XNQ.js.br +0 -0
  22. package/build/runtime-chunk-5LOD2XNQ.js.gz +0 -0
  23. package/build/{runtime-chunk-SB5SNGGM.js → runtime-chunk-AUNVTNFP.js} +1 -1
  24. package/build/runtime-chunk-AUNVTNFP.js.br +0 -0
  25. package/build/runtime-chunk-AUNVTNFP.js.gz +0 -0
  26. package/build/{runtime-chunk-K3MJM76A.js → runtime-chunk-C6JZPJNZ.js} +1 -1
  27. package/build/runtime-chunk-C6JZPJNZ.js.br +0 -0
  28. package/build/runtime-chunk-C6JZPJNZ.js.gz +0 -0
  29. package/build/{runtime-chunk-H5PVAACQ.js → runtime-chunk-CP7JGFPR.js} +1 -1
  30. package/build/runtime-chunk-CP7JGFPR.js.br +0 -0
  31. package/build/runtime-chunk-CP7JGFPR.js.gz +0 -0
  32. package/build/{runtime-chunk-FYZZPPDQ.js → runtime-chunk-CPEZA5MP.js} +1 -1
  33. package/build/runtime-chunk-CPEZA5MP.js.br +0 -0
  34. package/build/runtime-chunk-CPEZA5MP.js.gz +0 -0
  35. package/build/runtime-chunk-GGSUJEGZ.js +1 -0
  36. package/build/runtime-chunk-GGSUJEGZ.js.br +0 -0
  37. package/build/runtime-chunk-GGSUJEGZ.js.gz +0 -0
  38. package/build/{runtime-chunk-45XEVQ3G.js → runtime-chunk-GJ7YEOAK.js} +1 -1
  39. package/build/runtime-chunk-GJ7YEOAK.js.br +0 -0
  40. package/build/runtime-chunk-GJ7YEOAK.js.gz +0 -0
  41. package/build/{runtime-chunk-PBQNNEHM.js → runtime-chunk-HBQHIMBZ.js} +1 -1
  42. package/build/runtime-chunk-HBQHIMBZ.js.br +0 -0
  43. package/build/runtime-chunk-HBQHIMBZ.js.gz +0 -0
  44. package/build/runtime-chunk-HD7WF3XN.js +1 -0
  45. package/build/runtime-chunk-HD7WF3XN.js.br +0 -0
  46. package/build/runtime-chunk-HD7WF3XN.js.gz +0 -0
  47. package/build/{runtime-chunk-Y5OIIRGT.js → runtime-chunk-KSOJ4DSW.js} +1 -1
  48. package/build/runtime-chunk-KSOJ4DSW.js.br +0 -0
  49. package/build/runtime-chunk-KSOJ4DSW.js.gz +0 -0
  50. package/build/{runtime-chunk-LDOZDZC7.js → runtime-chunk-L46QFZMO.js} +1 -1
  51. package/build/{runtime-chunk-LDOZDZC7.js.br → runtime-chunk-L46QFZMO.js.br} +0 -0
  52. package/build/runtime-chunk-L46QFZMO.js.gz +0 -0
  53. package/build/{runtime-chunk-RYZ5Y2UD.js → runtime-chunk-ME5P3BFH.js} +1 -1
  54. package/build/runtime-chunk-ME5P3BFH.js.br +0 -0
  55. package/build/runtime-chunk-ME5P3BFH.js.gz +0 -0
  56. package/build/{runtime-chunk-Q2NJ34WP.js → runtime-chunk-N47UOJSA.js} +1 -1
  57. package/build/runtime-chunk-N47UOJSA.js.br +0 -0
  58. package/build/runtime-chunk-N47UOJSA.js.gz +0 -0
  59. package/build/{runtime-chunk-VDZLCK3P.js → runtime-chunk-NL5MFDOU.js} +1 -1
  60. package/build/runtime-chunk-NL5MFDOU.js.br +0 -0
  61. package/build/runtime-chunk-NL5MFDOU.js.gz +0 -0
  62. package/build/{runtime-chunk-GD6DXFXU.js → runtime-chunk-NQTG72XN.js} +1 -1
  63. package/build/runtime-chunk-NQTG72XN.js.br +0 -0
  64. package/build/runtime-chunk-NQTG72XN.js.gz +0 -0
  65. package/build/{runtime-chunk-PWCPVKZV.js → runtime-chunk-NTC3VZED.js} +1 -1
  66. package/build/runtime-chunk-NTC3VZED.js.br +0 -0
  67. package/build/runtime-chunk-NTC3VZED.js.gz +0 -0
  68. package/build/runtime-chunk-ODJETDNL.js +1 -0
  69. package/build/runtime-chunk-ODJETDNL.js.br +0 -0
  70. package/build/runtime-chunk-ODJETDNL.js.gz +0 -0
  71. package/build/{runtime-chunk-GMD2NH74.js → runtime-chunk-OMC3Z65E.js} +1 -1
  72. package/build/runtime-chunk-OMC3Z65E.js.br +0 -0
  73. package/build/runtime-chunk-OMC3Z65E.js.gz +0 -0
  74. package/build/{runtime-chunk-E6DD5XGN.js → runtime-chunk-QIYQ5UOG.js} +1 -1
  75. package/build/runtime-chunk-QIYQ5UOG.js.br +0 -0
  76. package/build/runtime-chunk-QIYQ5UOG.js.gz +0 -0
  77. package/build/{runtime-chunk-AN7KRN56.js → runtime-chunk-QXGIWNC7.js} +1 -1
  78. package/build/runtime-chunk-QXGIWNC7.js.br +0 -0
  79. package/build/runtime-chunk-QXGIWNC7.js.gz +0 -0
  80. package/build/{runtime-chunk-TT2F77QZ.js → runtime-chunk-RJL6PC2M.js} +1 -1
  81. package/build/runtime-chunk-RJL6PC2M.js.br +0 -0
  82. package/build/runtime-chunk-RJL6PC2M.js.gz +0 -0
  83. package/build/runtime-chunk-RSGNJXM5.js +1 -0
  84. package/build/runtime-chunk-RSGNJXM5.js.br +0 -0
  85. package/build/runtime-chunk-RSGNJXM5.js.gz +0 -0
  86. package/build/{runtime-chunk-NCJON2ZQ.js → runtime-chunk-U7MK4DFE.js} +1 -1
  87. package/build/{runtime-chunk-NCJON2ZQ.js.br → runtime-chunk-U7MK4DFE.js.br} +0 -0
  88. package/build/runtime-chunk-U7MK4DFE.js.gz +0 -0
  89. package/build/{runtime-chunk-DETJAPEW.js → runtime-chunk-VCWF6YLW.js} +1 -1
  90. package/build/runtime-chunk-VCWF6YLW.js.br +0 -0
  91. package/build/runtime-chunk-VCWF6YLW.js.gz +0 -0
  92. package/build/runtime-chunk-VKW2VLP6.js +1 -0
  93. package/build/runtime-chunk-VKW2VLP6.js.br +0 -0
  94. package/build/runtime-chunk-VKW2VLP6.js.gz +0 -0
  95. package/build/runtime-chunk-W4OOPEZP.js +1 -0
  96. package/build/runtime-chunk-W4OOPEZP.js.br +0 -0
  97. package/build/runtime-chunk-W4OOPEZP.js.gz +0 -0
  98. package/build/runtime-chunk-WKTS4T2Q.js +1 -0
  99. package/build/runtime-chunk-WKTS4T2Q.js.br +0 -0
  100. package/build/runtime-chunk-WKTS4T2Q.js.gz +0 -0
  101. package/build/{runtime-chunk-WTHIEJBK.js → runtime-chunk-Y5F2EZVH.js} +1 -1
  102. package/build/runtime-chunk-Y5F2EZVH.js.br +0 -0
  103. package/build/runtime-chunk-Y5F2EZVH.js.gz +0 -0
  104. package/build/{runtime-chunk-XKVJRGT3.js → runtime-chunk-Z6ZBAY4J.js} +1 -1
  105. package/build/runtime-chunk-Z6ZBAY4J.js.br +0 -0
  106. package/build/runtime-chunk-Z6ZBAY4J.js.gz +0 -0
  107. package/build/{runtime-chunk-67LSERUX.js → runtime-chunk-ZC75VIFC.js} +1 -1
  108. package/build/runtime-chunk-ZC75VIFC.js.br +0 -0
  109. package/build/runtime-chunk-ZC75VIFC.js.gz +0 -0
  110. package/build/{runtime-classicRuntime-G2NHV252.js → runtime-classicRuntime-R6RA2SQQ.js} +1 -1
  111. package/build/runtime-classicRuntime-R6RA2SQQ.js.br +0 -0
  112. package/build/{runtime-classicRuntime-G2NHV252.js.gz → runtime-classicRuntime-R6RA2SQQ.js.gz} +0 -0
  113. package/build/runtime-cloners-Q7V5ZLTE.js +1 -0
  114. package/build/runtime-cloners-Q7V5ZLTE.js.br +0 -0
  115. package/build/runtime-cloners-Q7V5ZLTE.js.gz +0 -0
  116. package/build/{runtime-components-RN6FVN37.js → runtime-components-7RUMS3JQ.js} +1 -1
  117. package/build/runtime-components-7RUMS3JQ.js.br +0 -0
  118. package/build/runtime-components-7RUMS3JQ.js.gz +0 -0
  119. package/build/{runtime-conditional-RPHIH6FU.js → runtime-conditional-3IFYLPUZ.js} +1 -1
  120. package/build/runtime-conditional-3IFYLPUZ.js.br +0 -0
  121. package/build/runtime-conditional-3IFYLPUZ.js.gz +0 -0
  122. package/build/{runtime-createDestroy-DF5QEIQ3.js → runtime-createDestroy-TCMXIHRC.js} +1 -1
  123. package/build/runtime-createDestroy-TCMXIHRC.js.br +0 -0
  124. package/build/runtime-createDestroy-TCMXIHRC.js.gz +0 -0
  125. package/build/{runtime-dragDrop-BIHQ5KZR.js → runtime-dragDrop-AYN474PR.js} +1 -1
  126. package/build/runtime-dragDrop-AYN474PR.js.br +0 -0
  127. package/build/runtime-dragDrop-AYN474PR.js.gz +0 -0
  128. package/build/{runtime-fxBloom-76KMQOQQ.js → runtime-fxBloom-3ZO2BPNP.js} +1 -1
  129. package/build/runtime-fxBloom-3ZO2BPNP.js.br +0 -0
  130. package/build/runtime-fxBloom-3ZO2BPNP.js.gz +0 -0
  131. package/build/{runtime-fxDepthOfField-72TWLFER.js → runtime-fxDepthOfField-TPS5PYYU.js} +1 -1
  132. package/build/runtime-fxDepthOfField-TPS5PYYU.js.br +0 -0
  133. package/build/runtime-fxDepthOfField-TPS5PYYU.js.gz +0 -0
  134. package/build/{runtime-gameControls-66ZOCHBQ.js → runtime-gameControls-P6K32DIB.js} +1 -1
  135. package/build/runtime-gameControls-P6K32DIB.js.br +0 -0
  136. package/build/runtime-gameControls-P6K32DIB.js.gz +0 -0
  137. package/build/runtime-hair-NKR7ZEMC.js +1 -0
  138. package/build/runtime-hair-NKR7ZEMC.js.br +3 -0
  139. package/build/runtime-hair-NKR7ZEMC.js.gz +0 -0
  140. package/build/{runtime-mergeStaticGeometries-HHUXK4BW.js → runtime-mergeStaticGeometries-OTUSZ7GT.js} +1 -1
  141. package/build/runtime-mergeStaticGeometries-OTUSZ7GT.js.br +0 -0
  142. package/build/runtime-mergeStaticGeometries-OTUSZ7GT.js.gz +0 -0
  143. package/build/runtime-miscActions-VWS3QBGI.js +1 -0
  144. package/build/runtime-miscActions-VWS3QBGI.js.br +0 -0
  145. package/build/runtime-miscActions-VWS3QBGI.js.gz +0 -0
  146. package/build/{runtime-mouseHover-3G4E5GAF.js → runtime-mouseHover-JLDPVYNQ.js} +1 -1
  147. package/build/runtime-mouseHover-JLDPVYNQ.js.br +0 -0
  148. package/build/runtime-mouseHover-JLDPVYNQ.js.gz +0 -0
  149. package/build/{runtime-particles-PN3EYBDA.js → runtime-particles-YDC7T762.js} +1 -1
  150. package/build/runtime-particles-YDC7T762.js.br +0 -0
  151. package/build/runtime-particles-YDC7T762.js.gz +0 -0
  152. package/build/{runtime-paths-GSK2JZMU.js → runtime-paths-D3NHEOQD.js} +1 -1
  153. package/build/runtime-paths-D3NHEOQD.js.br +0 -0
  154. package/build/runtime-paths-D3NHEOQD.js.gz +0 -0
  155. package/build/{runtime-resize-UW73Z5IN.js → runtime-resize-JNYXXTBN.js} +1 -1
  156. package/build/runtime-resize-JNYXXTBN.js.br +0 -0
  157. package/build/runtime-resize-JNYXXTBN.js.gz +0 -0
  158. package/build/{runtime-sceneTransition-LPS7ZHS4.js → runtime-sceneTransition-ADRVEUJX.js} +1 -1
  159. package/build/runtime-sceneTransition-ADRVEUJX.js.br +0 -0
  160. package/build/runtime-sceneTransition-ADRVEUJX.js.gz +0 -0
  161. package/build/runtime-scroll-LVOID77I.js +1 -0
  162. package/build/runtime-scroll-LVOID77I.js.br +0 -0
  163. package/build/runtime-scroll-LVOID77I.js.gz +0 -0
  164. package/build/runtime-shapeBlends-Y527SIEL.js +1 -0
  165. package/build/runtime-shapeBlends-Y527SIEL.js.br +2 -0
  166. package/build/runtime-shapeBlends-Y527SIEL.js.gz +0 -0
  167. package/build/{runtime-text-CGWVXLNC.js → runtime-text-5MEHB6BG.js} +1 -1
  168. package/build/runtime-text-5MEHB6BG.js.br +0 -0
  169. package/build/runtime-text-5MEHB6BG.js.gz +0 -0
  170. package/build/{runtime-textInputs-C5RWG2TR.js → runtime-textInputs-LB2IQKHR.js} +1 -1
  171. package/build/runtime-textInputs-LB2IQKHR.js.br +0 -0
  172. package/build/runtime-textInputs-LB2IQKHR.js.gz +0 -0
  173. package/build/runtime-timeline-DSJULP7T.js +1 -0
  174. package/build/runtime-timeline-DSJULP7T.js.br +0 -0
  175. package/build/runtime-timeline-DSJULP7T.js.gz +0 -0
  176. package/build/{runtime-tracking-4J3G5NE6.js → runtime-tracking-VFG37MMZ.js} +1 -1
  177. package/build/runtime-tracking-VFG37MMZ.js.br +0 -0
  178. package/build/runtime-tracking-VFG37MMZ.js.gz +0 -0
  179. package/build/runtime-transitions-T24DDYKS.js +1 -0
  180. package/build/runtime-transitions-T24DDYKS.js.br +0 -0
  181. package/build/runtime-transitions-T24DDYKS.js.gz +0 -0
  182. package/build/{runtime-ui2d-Q7BEDZKY.js → runtime-ui2d-WQN2724K.js} +1 -1
  183. package/build/runtime-ui2d-WQN2724K.js.br +0 -0
  184. package/build/runtime-ui2d-WQN2724K.js.gz +0 -0
  185. package/build/{runtime-updater-7DBCK2D5.js → runtime-updater-BNOFPDRB.js} +1 -1
  186. package/build/runtime-updater-BNOFPDRB.js.br +2 -0
  187. package/build/runtime-updater-BNOFPDRB.js.gz +0 -0
  188. package/build/{runtime-variables-WUE23WSE.js → runtime-variables-UHMFC5KF.js} +1 -1
  189. package/build/runtime-variables-UHMFC5KF.js.br +0 -0
  190. package/build/runtime-variables-UHMFC5KF.js.gz +0 -0
  191. package/build/{runtime-vectorShapes-6XWTTMQC.js → runtime-vectorShapes-MSCAPUKX.js} +1 -1
  192. package/build/runtime-vectorShapes-MSCAPUKX.js.br +0 -0
  193. package/build/runtime-vectorShapes-MSCAPUKX.js.gz +0 -0
  194. package/build/{runtime-video-3WYFSQFW.js → runtime-video-HX4EHK3D.js} +1 -1
  195. package/build/runtime-video-HX4EHK3D.js.br +0 -0
  196. package/build/runtime-video-HX4EHK3D.js.gz +0 -0
  197. package/build/runtime-webgpu-6ZR66FPM.js +1 -0
  198. package/build/runtime-webgpu-6ZR66FPM.js.br +0 -0
  199. package/build/runtime-webgpu-6ZR66FPM.js.gz +0 -0
  200. package/build/runtime.cjs +319 -319
  201. package/build/runtime.js +1 -1
  202. package/build/runtime.js.br +0 -0
  203. package/build/runtime.js.gz +0 -0
  204. package/build/runtime.standalone.js +1 -1
  205. package/build/runtime.standalone.js.br +0 -0
  206. package/build/runtime.standalone.js.gz +0 -0
  207. package/build/runtime.standalone.webgl.js +1 -1
  208. package/build/runtime.standalone.webgl.js.br +0 -0
  209. package/build/runtime.standalone.webgl.js.gz +0 -0
  210. package/build/runtime.standalone.webgpu.js +1 -1
  211. package/build/runtime.standalone.webgpu.js.br +0 -0
  212. package/build/runtime.standalone.webgpu.js.gz +0 -0
  213. package/build/runtime.standalone.webgpu.micro.js +1 -1
  214. package/build/runtime.standalone.webgpu.micro.js.br +0 -0
  215. package/build/runtime.standalone.webgpu.micro.js.gz +0 -0
  216. package/build/runtime.standalone.webgpu.min.js +1 -1
  217. package/build/runtime.standalone.webgpu.min.js.br +0 -0
  218. package/build/runtime.standalone.webgpu.min.js.gz +0 -0
  219. package/package.json +12 -3
  220. package/build/runtime-aiAssistant-O2CXSPWK.js.br +0 -0
  221. package/build/runtime-aiAssistant-O2CXSPWK.js.gz +0 -0
  222. package/build/runtime-apiServices-332YME3N.js.br +0 -0
  223. package/build/runtime-apiServices-332YME3N.js.gz +0 -0
  224. package/build/runtime-audio-W35MH46I.js.br +0 -0
  225. package/build/runtime-audio-W35MH46I.js.gz +0 -0
  226. package/build/runtime-chunk-45XEVQ3G.js.br +0 -0
  227. package/build/runtime-chunk-45XEVQ3G.js.gz +0 -0
  228. package/build/runtime-chunk-4PWCQGEO.js.br +0 -0
  229. package/build/runtime-chunk-4PWCQGEO.js.gz +0 -0
  230. package/build/runtime-chunk-5CU7JBFG.js +0 -1
  231. package/build/runtime-chunk-5CU7JBFG.js.br +0 -0
  232. package/build/runtime-chunk-5CU7JBFG.js.gz +0 -0
  233. package/build/runtime-chunk-5FPQ5FYG.js +0 -1
  234. package/build/runtime-chunk-5FPQ5FYG.js.br +0 -0
  235. package/build/runtime-chunk-5FPQ5FYG.js.gz +0 -0
  236. package/build/runtime-chunk-67LSERUX.js.br +0 -0
  237. package/build/runtime-chunk-67LSERUX.js.gz +0 -0
  238. package/build/runtime-chunk-76ASHNH5.js +0 -1
  239. package/build/runtime-chunk-76ASHNH5.js.br +0 -0
  240. package/build/runtime-chunk-76ASHNH5.js.gz +0 -0
  241. package/build/runtime-chunk-7KG76FNY.js.br +0 -0
  242. package/build/runtime-chunk-7KG76FNY.js.gz +0 -0
  243. package/build/runtime-chunk-AN7KRN56.js.br +0 -0
  244. package/build/runtime-chunk-AN7KRN56.js.gz +0 -0
  245. package/build/runtime-chunk-B5IERHDJ.js.br +0 -0
  246. package/build/runtime-chunk-B5IERHDJ.js.gz +0 -0
  247. package/build/runtime-chunk-DETJAPEW.js.br +0 -0
  248. package/build/runtime-chunk-DETJAPEW.js.gz +0 -0
  249. package/build/runtime-chunk-E6DD5XGN.js.br +0 -0
  250. package/build/runtime-chunk-E6DD5XGN.js.gz +0 -0
  251. package/build/runtime-chunk-FYZZPPDQ.js.br +0 -0
  252. package/build/runtime-chunk-FYZZPPDQ.js.gz +0 -0
  253. package/build/runtime-chunk-GD6DXFXU.js.br +0 -0
  254. package/build/runtime-chunk-GD6DXFXU.js.gz +0 -0
  255. package/build/runtime-chunk-GMD2NH74.js.br +0 -0
  256. package/build/runtime-chunk-GMD2NH74.js.gz +0 -0
  257. package/build/runtime-chunk-H5PVAACQ.js.br +0 -0
  258. package/build/runtime-chunk-H5PVAACQ.js.gz +0 -0
  259. package/build/runtime-chunk-IX7AZI2Z.js +0 -1
  260. package/build/runtime-chunk-IX7AZI2Z.js.br +0 -0
  261. package/build/runtime-chunk-IX7AZI2Z.js.gz +0 -0
  262. package/build/runtime-chunk-K3MJM76A.js.br +0 -0
  263. package/build/runtime-chunk-K3MJM76A.js.gz +0 -0
  264. package/build/runtime-chunk-LDOZDZC7.js.gz +0 -0
  265. package/build/runtime-chunk-NCJON2ZQ.js.gz +0 -0
  266. package/build/runtime-chunk-PBQNNEHM.js.br +0 -0
  267. package/build/runtime-chunk-PBQNNEHM.js.gz +0 -0
  268. package/build/runtime-chunk-PWCPVKZV.js.br +0 -0
  269. package/build/runtime-chunk-PWCPVKZV.js.gz +0 -0
  270. package/build/runtime-chunk-Q2NJ34WP.js.br +0 -0
  271. package/build/runtime-chunk-Q2NJ34WP.js.gz +0 -0
  272. package/build/runtime-chunk-RYZ5Y2UD.js.br +0 -0
  273. package/build/runtime-chunk-RYZ5Y2UD.js.gz +0 -0
  274. package/build/runtime-chunk-SB5SNGGM.js.br +0 -0
  275. package/build/runtime-chunk-SB5SNGGM.js.gz +0 -0
  276. package/build/runtime-chunk-T5W7UUKQ.js +0 -1
  277. package/build/runtime-chunk-T5W7UUKQ.js.br +0 -0
  278. package/build/runtime-chunk-T5W7UUKQ.js.gz +0 -0
  279. package/build/runtime-chunk-TT2F77QZ.js.br +0 -0
  280. package/build/runtime-chunk-TT2F77QZ.js.gz +0 -0
  281. package/build/runtime-chunk-VDZLCK3P.js.br +0 -0
  282. package/build/runtime-chunk-VDZLCK3P.js.gz +0 -0
  283. package/build/runtime-chunk-VKFSHS4O.js.br +0 -0
  284. package/build/runtime-chunk-VKFSHS4O.js.gz +0 -0
  285. package/build/runtime-chunk-WTHIEJBK.js.br +0 -0
  286. package/build/runtime-chunk-WTHIEJBK.js.gz +0 -0
  287. package/build/runtime-chunk-XKVJRGT3.js.br +0 -0
  288. package/build/runtime-chunk-XKVJRGT3.js.gz +0 -0
  289. package/build/runtime-chunk-Y5OIIRGT.js.br +0 -0
  290. package/build/runtime-chunk-Y5OIIRGT.js.gz +0 -0
  291. package/build/runtime-chunk-ZE3Y3273.js +0 -1
  292. package/build/runtime-chunk-ZE3Y3273.js.br +0 -0
  293. package/build/runtime-chunk-ZE3Y3273.js.gz +0 -0
  294. package/build/runtime-classicRuntime-G2NHV252.js.br +0 -0
  295. package/build/runtime-cloners-DXUA5B7Z.js +0 -1
  296. package/build/runtime-cloners-DXUA5B7Z.js.br +0 -1
  297. package/build/runtime-cloners-DXUA5B7Z.js.gz +0 -0
  298. package/build/runtime-components-RN6FVN37.js.br +0 -0
  299. package/build/runtime-components-RN6FVN37.js.gz +0 -0
  300. package/build/runtime-conditional-RPHIH6FU.js.br +0 -0
  301. package/build/runtime-conditional-RPHIH6FU.js.gz +0 -0
  302. package/build/runtime-createDestroy-DF5QEIQ3.js.br +0 -0
  303. package/build/runtime-createDestroy-DF5QEIQ3.js.gz +0 -0
  304. package/build/runtime-dragDrop-BIHQ5KZR.js.br +0 -0
  305. package/build/runtime-dragDrop-BIHQ5KZR.js.gz +0 -0
  306. package/build/runtime-fxBloom-76KMQOQQ.js.br +0 -0
  307. package/build/runtime-fxBloom-76KMQOQQ.js.gz +0 -0
  308. package/build/runtime-fxDepthOfField-72TWLFER.js.br +0 -0
  309. package/build/runtime-fxDepthOfField-72TWLFER.js.gz +0 -0
  310. package/build/runtime-gameControls-66ZOCHBQ.js.br +0 -0
  311. package/build/runtime-gameControls-66ZOCHBQ.js.gz +0 -0
  312. package/build/runtime-hair-MA6FN35D.js +0 -1
  313. package/build/runtime-hair-MA6FN35D.js.br +0 -0
  314. package/build/runtime-hair-MA6FN35D.js.gz +0 -0
  315. package/build/runtime-mergeStaticGeometries-HHUXK4BW.js.br +0 -0
  316. package/build/runtime-mergeStaticGeometries-HHUXK4BW.js.gz +0 -0
  317. package/build/runtime-miscActions-24ZVLPRO.js +0 -1
  318. package/build/runtime-miscActions-24ZVLPRO.js.br +0 -0
  319. package/build/runtime-miscActions-24ZVLPRO.js.gz +0 -0
  320. package/build/runtime-mouseHover-3G4E5GAF.js.br +0 -0
  321. package/build/runtime-mouseHover-3G4E5GAF.js.gz +0 -0
  322. package/build/runtime-particles-PN3EYBDA.js.br +0 -0
  323. package/build/runtime-particles-PN3EYBDA.js.gz +0 -0
  324. package/build/runtime-paths-GSK2JZMU.js.br +0 -0
  325. package/build/runtime-paths-GSK2JZMU.js.gz +0 -0
  326. package/build/runtime-resize-UW73Z5IN.js.br +0 -0
  327. package/build/runtime-resize-UW73Z5IN.js.gz +0 -0
  328. package/build/runtime-sceneTransition-LPS7ZHS4.js.br +0 -0
  329. package/build/runtime-sceneTransition-LPS7ZHS4.js.gz +0 -0
  330. package/build/runtime-scroll-2RACPF3L.js +0 -1
  331. package/build/runtime-scroll-2RACPF3L.js.br +0 -0
  332. package/build/runtime-scroll-2RACPF3L.js.gz +0 -0
  333. package/build/runtime-shapeBlends-W3UDTX47.js +0 -1
  334. package/build/runtime-shapeBlends-W3UDTX47.js.br +0 -0
  335. package/build/runtime-shapeBlends-W3UDTX47.js.gz +0 -0
  336. package/build/runtime-text-CGWVXLNC.js.br +0 -0
  337. package/build/runtime-text-CGWVXLNC.js.gz +0 -0
  338. package/build/runtime-textInputs-C5RWG2TR.js.br +0 -0
  339. package/build/runtime-textInputs-C5RWG2TR.js.gz +0 -0
  340. package/build/runtime-timeline-3NEYLJHX.js +0 -1
  341. package/build/runtime-timeline-3NEYLJHX.js.br +0 -0
  342. package/build/runtime-timeline-3NEYLJHX.js.gz +0 -0
  343. package/build/runtime-tracking-4J3G5NE6.js.br +0 -0
  344. package/build/runtime-tracking-4J3G5NE6.js.gz +0 -0
  345. package/build/runtime-transitions-6WCGNZX7.js +0 -1
  346. package/build/runtime-transitions-6WCGNZX7.js.br +0 -0
  347. package/build/runtime-transitions-6WCGNZX7.js.gz +0 -0
  348. package/build/runtime-ui2d-Q7BEDZKY.js.br +0 -0
  349. package/build/runtime-ui2d-Q7BEDZKY.js.gz +0 -0
  350. package/build/runtime-updater-7DBCK2D5.js.br +0 -1
  351. package/build/runtime-updater-7DBCK2D5.js.gz +0 -0
  352. package/build/runtime-variables-WUE23WSE.js.br +0 -0
  353. package/build/runtime-variables-WUE23WSE.js.gz +0 -0
  354. package/build/runtime-vectorShapes-6XWTTMQC.js.br +0 -0
  355. package/build/runtime-vectorShapes-6XWTTMQC.js.gz +0 -0
  356. package/build/runtime-video-3WYFSQFW.js.br +0 -0
  357. package/build/runtime-video-3WYFSQFW.js.gz +0 -0
  358. package/build/runtime-webgpu-TEJIPT3H.js +0 -1
  359. package/build/runtime-webgpu-TEJIPT3H.js.br +0 -0
  360. package/build/runtime-webgpu-TEJIPT3H.js.gz +0 -0
@@ -0,0 +1 @@
1
+ import{a as e,c as t,d as i,e as a,f as n,g as r,j as s}from"./runtime-chunk-VKW2VLP6.js";import"./runtime-chunk-CP7JGFPR.js";import"./runtime-chunk-NTUTXO7Q.js";import"./runtime-chunk-HD7WF3XN.js";import{a as o}from"./runtime-chunk-5LOD2XNQ.js";import{a as l}from"./runtime-chunk-GGSUJEGZ.js";import{a as h,b as c}from"./runtime-chunk-QIYQ5UOG.js";import"./runtime-chunk-CPEZA5MP.js";import"./runtime-chunk-FTVQTRM7.js";import{a as u}from"./runtime-chunk-VCWF6YLW.js";import"./runtime-chunk-HBQHIMBZ.js";import"./runtime-chunk-27CHRAEV.js";import"./runtime-chunk-RJL6PC2M.js";import{Y as d,ca as p,ea as f}from"./runtime-chunk-NL5MFDOU.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{b as m,e as y}from"./runtime-chunk-Y5F2EZVH.js";import{v as g}from"./runtime-chunk-ODJETDNL.js";import"./runtime-chunk-RTLL6WIB.js";import{d as v}from"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-C6JZPJNZ.js";import{a as k}from"./runtime-chunk-TZCHGFVF.js";import{A as D,C as x,D as T,Da as j,Ia as E,Ja as b,Ka as C,ka as O,p as I,ta as A,y as w,z as M}from"./runtime-chunk-WKTS4T2Q.js";import{Bc as F,Cc as S}from"./runtime-chunk-BVVSZMXD.js";import"./runtime-chunk-ML3Z74BL.js";var _=Math.fround;function N(e){return"pingpong"===e||"pingpong-rewind"===e}var P=class{constructor(e){this.config=e,this.effectiveCycleDuration=this.cycleDuration(0)}layout(e){let{config:t}=this;if(N(t.direction)&&e%2==1)return{startDelay:0,endDelay:0};switch(t.delayDirection){case"start-once":return 0===e?{startDelay:t.delay,endDelay:0}:{startDelay:0,endDelay:0};case"start":return{startDelay:t.delay,endDelay:0};case"end":return{startDelay:0,endDelay:t.delay};default:return{startDelay:t.delay,endDelay:t.delay}}}cycleDuration(e){let{config:t}=this,{startDelay:i,endDelay:a}=this.layout(e);return _(t.duration+i+a)}get totalDuration(){let{config:e}=this;if(-1===e.repeat)return 1/0;let t=0;for(let i=0;i<=e.repeat;i++)t=_(t+this.cycleDuration(i));return t}isFinished(e){return e>=this.totalDuration}resolve(e){let t,i,{config:a}=this,n=_(e);if("start-once"===a.delayDirection){let e=_(a.delay+a.duration);if(n<e)t=0,i=n;else{let r=_(n-e);t=1+Math.floor(_(r/a.duration)),i=_(r%a.duration)}}else if(N(a.direction)){let e=this.cycleDuration(0),r=_(e+a.duration),s=Math.floor(_(n/r)),o=_(n%r);o<e?(t=2*s,i=o):(t=2*s+1,i=_(o-e))}else{let e=this.cycleDuration(0);t=Math.floor(_(n/e)),i=_(n%e)}if(-1!==a.repeat&&t>=a.repeat+1)return null;let r,{startDelay:s}=this.layout(t),o=N(a.direction)&&t%2==1,l=s,h=_(l+a.duration);if(i<l)r=o?a.duration:0;else if(i>=h)r=o?0:a.duration;else{let e=_(i-l);r=o?_(a.duration-e):e}return{cycleIndex:t,localTime:r,isReverse:o}}},L=Math.fround;function B(e){return[...e].sort((e,t)=>e.time-t.time)}function V(e){return{easing:e.type,control1:E(e.cubicControls?.control1,[0,0]),control2:E(e.cubicControls?.control2,[1,1]),...e.springParameters}}function z(e,t){let i=[];for(let a of e??[]){let e=t(a.data);void 0!==e&&i.push({time:a.data.time,ease:V(a.data.easing),value:e})}return{keyframes:B(i)}}function G(t,i){if(0===t.keyframes.length)return;let{index0:a,index1:n,t:r}=function(t,i){if(0===t.length)throw new Error("sampleKeyframes requires at least one keyframe");if(i<=t[0].time)return{index0:0,index1:0,t:1};let{found:a,index:n}=function(e,t){let i=e.length,a=0,n=i;for(;a<n;){let r=a+Math.floor(i/2),s=e[r].time;if(s<t)a=r+1;else{if(!(s>t))return{found:!0,index:r};n=r}i=n-a}return{found:!1,index:a}}(t,i);if(a)return{index0:n,index1:n,t:1};if(n>=t.length){let e=t.length-1;return{index0:e,index1:e,t:1}}let r=n-1,s=n,o=t[r].time,l=t[s].time;if(l===o)return{index0:r,index1:s,t:.5};let h=L(l-o),c={...t[r].ease,control2:t[s].ease.control2};return{index0:r,index1:s,t:e(c,h,L(L(i-o)/h))}}(t.keyframes,i),s=t.read;if(s&&s.index0===a&&s.index1===n&&s.t===r)return;let o={index0:a,index1:n,from:t.keyframes[a].value,to:t.keyframes[n].value,t:r};return t.read=o,o}function R(e){e.read=void 0}function U(e,t,i){return e+(t-e)*i}function Z(e,t,i){!e||(e[t]={...e[t],...i})}function H(e,r,s,l,d,p,m){let y=()=>{m.transform=!0,m.bounds=!0,m.boolean=!0,m.render=!0};switch(e.on){case"position":case"scale":{let t=G(e.track,s);if(!t)return;let i=U(t.from,t.to,t.t);return r[e.on][e.axis]=i,Z(p,e.on,{[e.axis]:i}),void y()}case"rotation":{let t=G(e.track,s);if(!t)return;let i=U(t.from,t.to,t.t);return r.rotation[e.axis]=i*S.DEG2RAD,Z(p,"rotation",{[e.axis]:i}),void y()}case"shapeSize":{let t=G(e.track,s);if(!(t&&r instanceof f))return;let i=U(t.from,t.to,t.t);return r.userData.value={...r.userData.value,[e.axis]:i},Z(p,"shapeSize",{[e.axis]:i}),m.size=!0,m.bounds=!0,m.boolean=!0,void(m.render=!0)}case"opacity":{let t=G(e.track,s);if(!t||!(r instanceof g)||Array.isArray(r.material))return;let i=r.material.getLayersOfType("light")[0];if(void 0===i)return;let a=S.lerp(t.from,t.to,t.t);return r.material.transparent=!0,n("alphaOverride",i,{alphaOverride:a},{alphaOverride:a+1},0,l.shared),p&&(p.opacity=a),void(m.render=!0)}case"material":{let t=G(e.track,s);if(!t||0===Object.keys(t.from).length||0===Object.keys(t.to).length)return;let{layer:i}=e,a={};for(let e in i.data){if(!(e in t.from)||!(e in t.to))continue;let s=J(t.from[e],t.to[e],t.t,d);if(void 0===s)continue;a[e]=s;let o=i.getValue(e);void 0!==o&&("alpha"===e&&"number"==typeof o&&o>0&&r instanceof g&&!Array.isArray(r.material)&&(r.material.transparent=!0),n(e,i,t.from,t.to,t.t,l.shared))}return Z(p,"material",{[i.uuid]:a}),void(m.render=!0)}case"light":{let t=G(e.track,s);if(!t||!(r instanceof h||r instanceof o||r instanceof c))return;let i=J(t.from,t.to,t.t,d);return r[e.field]=i,Z(p,"light",{[e.field]:i}),void(m.render=!0)}case"camera":{let t=G(e.track,s);if(!(t&&r instanceof u))return;let i=U(t.from,t.to,t.t);return r[e.field]=i,void Z(p,"camera",{[e.field]:i})}case"cloner":{let t=G(e.track,s);if(!t)return;let n=r.cloner?.parameters,o=i(n,t.from,t.to,t.t);return a(n,o),Z(p,"cloner",o),m.cloner=!0,m.boolean=!0,void(m.render=!0)}case"pathExtrusion":{let i=G(e.track,s);if(!i||!v(r))return;let a=t(O,i.from,i.to,i.t),n=r.geometry.userData.parameters;return n.extrusion={...n.extrusion,...a},Z(p,"pathExtrusion",a),r.updateGeometryInteractions({extrusion:{...n.extrusion}},l.shared),m.bounds=!0,m.boolean=!0,void(m.render=!0)}case"pathSnapping":{let i=G(e.track,s);if(!i)return;let a=r,n=t(A,i.from,i.to,i.t);return a.userData.pathSnapping={...a.userData.pathSnapping,...n},Z(p,"pathSnapping",n),a.updatePathSnapping(a.userData.pathSnapping),void(m.render=!0)}}}function J(e,t,i,a){if("string"==typeof e&&a&&(e=a.color(e)),"string"==typeof t&&a&&(t=a.color(t)),"number"==typeof e)return S.lerp(e,t,i);if(T.is(e))return T.lerp(e,t,i);if(x.is(e))return x.lerp(e,t,i);if(Array.isArray(e))return(e.length>t.length?t:e).map((a,n)=>{if(Array.isArray(a)){let a=e[n].length>t[n].length?t[n].length:e[n].length;return(4===a?D:3===a?M:w).lerp(e[n],t[n],i)}return S.lerp(e[n],t[n],i)});if("object"==typeof e&&null!==e){let n={};for(let r in e){let s=J(e[r],t[r],i,a);void 0!==s&&(n[r]=s)}return n}}var Q=new Map,W=new Map,K=class extends F{constructor(e,t,i,a,n,r,s){super(),this.id=e,this.data=t,this.scene=i,this.sharedAssets=a,this.object=n,this.eventType=r,this.actionCondition=s,this.evaluators=[],this.elapsed=0,this.lastTime=null,this.direction=1,this._playing=!1,this._finished=!1,this.hasPlayedOnce=!1,this.pauseOnNextCycleEnd=!1,this.lastCycleIndex=0;try{let e=j.findTimeline(this.scene.data.objects,this.data.timeline),t=e.duration;this.animatedObjectIds=Object.keys(e.objectTimelines),this.animatedObjectIds.forEach(n=>{let r=this.scene.find(n);if(!r)return;let s=e.objectTimelines[n];!s||this.evaluators.push(function(e,t,i,a,n){let r=function(e,t){let i=[];return b.groupKeyframes(t.keyframes).forEach(t=>{let a=t.path?.[0],n=t.path[1],r=()=>z(t.keyframes,e=>e.value);switch(a){case"position":case"rotation":case"scale":return void(n&&C.includes(n)&&i.push({on:a,axis:n,track:r()}));case"shape size":return void(n&&C.includes(n)&&"geometry"in e&&i.push({on:"shapeSize",axis:n,track:r()}));case"path extrusion":return void(v(e)&&i.push({on:"pathExtrusion",track:z(t.keyframes,e=>e.value)}));case"path snapping":return void(e.data.pathSnapping&&i.push({on:"pathSnapping",track:z(t.keyframes,e=>e.value)}));case"material":return void("Mesh"===e.type&&"material"in e&&function(e,t){let i=p(e.material)?e.material:void 0,a=t.layerId;if(!i||!a)return[];let n=t.keyframes.some(e=>d(e.data.value?.noiseStrength)),r=i.ensureRainbowNoiseCompiled,s=e=>{n&&"function"==typeof r&&r.call(i,e)},o=e=>"data"in e?[{on:"material",layer:e,track:z(t.keyframes,e=>e.value)}]:[];s(a);let l=i.getLayerByUuid(a);if(l)return o(l);let h=t.path[1];for(let e of i.getLayersOfType(h))s(e.uuid);return(i.getLayersOfType(h)??[]).flatMap(o)}(e,t).forEach(e=>i.push(e)));case"opacity":return void("Mesh"===e.type&&"material"in e&&i.push({on:"opacity",track:r()}));case"cloner":return void i.push({on:"cloner",track:z(t.keyframes,e=>e.value)});case"camera":return void(e instanceof u&&i.push({on:"camera",field:"zoom",track:r()}));case"light":return void((e instanceof h||e instanceof o||e instanceof c)&&i.push({on:"light",field:t.path[1],track:z(t.keyframes,e=>e.value)}))}}),i}(e,t);return{duration:i,evaluate(t,i){e.resetBBoxNeedsUpdate();let s={transform:!1,size:!1,cloner:!1,bounds:!1,boolean:!1,render:!1};for(let o of r)H(o,e,t,a,n,i,s);!function(e,t,i){if(t.size&&e instanceof f){let{x:t,y:a,z:n}=e.userData.value;e.updateGeometryInteractions({width:t,height:a,depth:n},i.shared)}t.cloner&&e.cloner?.update(i),t.transform&&e.updateMatrix(),t.bounds&&e.resetBBoxNeedsUpdate(),t.boolean&&e instanceof f&&e.invalidateDownstreamBooleanData(),t.render&&e.dispatchEvent({type:"requestRender"})}(e,s,a)},invalidate(){for(let e of r)R(e.track)}}}(r,{...s},t,{scene:i,shared:a},this.sharedAssets))}),this.schedule=new P((l=this.data,{duration:t,delay:_(l.delay/1e3),delayDirection:l.delayDirection??"start-end",direction:l.direction??"normal",repeat:l.repeat}))}catch(e){throw new Error("Missing property")}var l;n&&(W.has(n.uuid)?W.get(n.uuid).push(this):W.set(n.uuid,[this])),Q.set(e,this)}get playing(){return this._playing}get finished(){return this._finished}get paused(){return!this._playing}update(e){null!==this.lastTime&&(this.elapsed=Math.max(0,this.elapsed+(e-this.lastTime)*this.direction)),this.lastTime=e,this.applyAtElapsed()}applyAtElapsed(){if(-1===this.direction&&0===this.elapsed)return void this.pause();let e=this.schedule.resolve(this.elapsed);if(e){if(e.cycleIndex!==this.lastCycleIndex&&(this.lastCycleIndex=e.cycleIndex,this.pauseOnNextCycleEnd))return this.pauseOnNextCycleEnd=!1,void this.pause();for(let t of this.evaluators)t.evaluate(e.localTime)}else 1===this.direction&&this.schedule.isFinished(this.elapsed)&&this.finish()}finish(){this.pause(),this._finished=!0,this.animatedObjectIds.forEach(e=>{let t=this.scene.find(e);t instanceof u&&t.dispatchEvent(s)})}startTicking(){this._playing=!0,this.lastTime=null;for(let e of this.evaluators)e.invalidate();l.add(this)}play(){let e=void 0!==this.eventType&&I(this.eventType)&&"Once"===this.data.runMode&&this.hasPlayedOnce&&this.paused&&this.elapsed>0&&!this._finished;if(void 0!==this.eventType&&I(this.eventType)&&"Once"===this.data.runMode&&this.hasPlayedOnce&&!e||void 0===this.eventType&&this._finished)return!1;this.hasPlayedOnce=!0,this.animatedObjectIds.forEach(e=>{let t=this.scene.find(e);t instanceof u&&t.dispatchEvent(r)}),!e&&(0===this.elapsed||this._finished)&&(this.elapsed=0,this.lastCycleIndex=0,this._finished=!1),this.direction=1,this.startTicking()}pause(){this._playing=!1,this.lastTime=null,l.remove(this)}stop(){this.pause(),this.elapsed=0,this.lastCycleIndex=0,this.applyAtElapsed(),this._finished=!1}seek(e){let t=this.schedule.totalDuration;this.elapsed=e*(Number.isFinite(t)?t:this.schedule.effectiveCycleDuration);for(let e of this.evaluators)e.invalidate();this.applyAtElapsed()}toggle(e){let t=e??-1===this.direction;this._playing&&this.direction===(t?1:-1)||(t&&this._finished&&(this.elapsed=0,this.lastCycleIndex=0,this._finished=!1),this.direction=t?1:-1,this.pauseOnNextCycleEnd=!1,this.startTicking())}playFromCurrent(){this.toggle(!0)}reverseFromCurrent(){this.toggle(!1)}dispose(){this.pause()}},X=class{constructor(e){this.data=e}dispatch(){this.data.playTimeline?this.pauseTimeline(this.data.playTimeline):this.data.object?this.pauseAllTimelinesFromObject(this.data.object):this.pauseAllTimelines()}pauseTimeline(e){let t=this.getTimelineActions(e);!t.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{t.forEach(e=>{e[this.data.interaction]()}),this.disposeDelay()},this.data.delay)):t.forEach(e=>{e[this.data.interaction]()}))}getTimelineActions(e){let t=Q.get(e);return t?[t]:[...Q.values()].filter(t=>t.data.timeline===e)}pauseAllTimelinesFromObject(e){let t=W.get(e);!t?.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{t.forEach(e=>e[this.data.interaction]()),this.disposeDelay()},this.data.delay)):t.forEach(e=>e[this.data.interaction]()))}pauseAllTimelines(){let e=[...W.values()];!e.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{e.forEach(e=>{e.forEach(e=>{e[this.data.interaction]()})}),this.disposeDelay()},this.data.delay)):e.forEach(e=>{e.forEach(e=>{e[this.data.interaction]()})}))}disposeDelay(){clearTimeout(this.timeoutId),delete this.timeoutId}dispose(){clearTimeout(this.timeoutId),delete this.timeoutId}},Y=class{constructor(e,t,i,a,n,r,s){this.data=t;let o="interaction"in t?t.interaction:"play";if("play"===o||void 0===o)this.interaction=new K(e,t,i,a,n,r,s);else{if("pause"!==o&&"stop"!==o)throw new Error("Missing property");this.interaction=new X(t)}}get playing(){return this.interaction instanceof K&&this.interaction.playing}get finished(){return!(this.interaction instanceof K)||this.interaction.finished}get paused(){return!(this.interaction instanceof K)||this.interaction.paused}play(){if(this.interaction instanceof K)return this.interaction.play();this.interaction.dispatch()}stop(){this.interaction instanceof K&&this.interaction.stop()}seek(e){this.interaction instanceof K&&this.interaction.seek(e)}toggle(e){this.interaction instanceof K?this.interaction.toggle(e):this.interaction.dispatch()}playFromCurrent(){this.interaction instanceof K?this.interaction.playFromCurrent():this.interaction.dispatch()}dispatchConditional(){this.interaction instanceof K?y(this.interaction.sharedAssets,this.interaction.actionCondition)&&this.interaction.playFromCurrent():this.interaction.dispatch()}reverseFromCurrent(){this.interaction instanceof K&&this.interaction.reverseFromCurrent()}dispose(){this.interaction.dispose()}};m("TimelineAnimation",({id:e,data:t,page:i,shared:a,object:n,eventType:r,actionCondition:s})=>new Y(e,t,i.scene,a,n,r,s)),k("timeline");
@@ -1 +1 @@
1
- import{a as e}from"./runtime-chunk-NBYTQLIB.js";import{f as t}from"./runtime-chunk-FYZZPPDQ.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-DETJAPEW.js";import"./runtime-chunk-B5IERHDJ.js";import"./runtime-chunk-TT2F77QZ.js";import"./runtime-chunk-VDZLCK3P.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{f as o,g as r}from"./runtime-chunk-WTHIEJBK.js";import{d,v as l}from"./runtime-chunk-T5W7UUKQ.js";import"./runtime-chunk-RTLL6WIB.js";import"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-K3MJM76A.js";import{a as u}from"./runtime-chunk-TZCHGFVF.js";import{r as h,s as c}from"./runtime-chunk-ZE3Y3273.js";import{Ec as p,Fc as m,Oc as v,rd as g}from"./runtime-chunk-BVVSZMXD.js";import"./runtime-chunk-ML3Z74BL.js";var E=new m,f=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)}},P=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(f),f.negate(),E.copy(f)):"xy"===n?E.set(0,0,1):"xz"===n?E.set(0,1,0):"yz"===n&&E.set(1,0,0),L.setFromNormalAndCoplanarPoint(E,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=E.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)}},b=new m,j=new m,R=new v,C=new p,S=new p,k=new m,N=new m,O=new m,T=new m,Q=new g,z={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)}}(),V=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}},I=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 V(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(k),!e.isReset)if(e.target)e.target.getWorldPosition(N);else{if("custom"===s?(l().getWorldDirection(j),j.negate(),Q.setFromNormalAndCoplanarPoint(j,k)):("xy"===s?b.set(0,0,1):"xz"===s?b.set(0,1,0):"yz"===s&&b.set(1,0,0),Q.setFromNormalAndCoplanarPoint(b,k)),!u.ray.intersectPlane(Q,N))return;i>0&&("custom"===s||void 0===s)&&N.addScaledVector(j,i)}if(e.isReset||(c?"target"===t?O.copy(c.up).applyMatrix4(R.extractRotation(c.matrixWorld)).normalize():o.some(e=>!1===e)?("x"===n?(T.set(0,0,1),!1===o[2]&&T.set(0,1,0)):"y"===n?(T.set(1,0,0),!1===o[0]&&T.set(0,0,1)):(T.set(0,1,0),!1===o[1]&&T.set(1,0,0)),O.copy(T).applyQuaternion(e.worldQuaternion0).normalize()):O.set(0,1,0):"custom"===s?O.set(0,1,0):O.copy(b)),e.isReset)S.copy(e.worldQuaternion0);else if(k.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;S.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=R.elements;Z.subVectors(t,n),0===Z.lengthSq()&&(Z.z=1),Z.normalize(),U.crossVectors(i,Z),0===U.lengthSq()&&(1===Math.abs(i.z)?Z.x+=1e-4:Z.z+=1e-4,Z.normalize(),U.crossVectors(i,Z)),U.normalize(),B.crossVectors(Z,U),"x"===s?1===a.z?[U,B,Z]=[Z,U,B]:(U.negate(),[U,Z]=[Z,U]):"y"===s?1===a.x?[U,B,Z]=[B,Z,U]:(U.negate(),[B,Z]=[Z,B]):1===a.x&&(U.negate(),[U,B]=[B,U]),o[0]=U.x,o[4]=B.x,o[8]=Z.x,o[1]=U.y,o[5]=B.y,o[9]=Z.y,o[2]=U.z,o[6]=B.z,o[10]=Z.z})(0,N,k,O,n,T),S.setFromRotationMatrix(R),C.setFromUnitVectors(T.applyQuaternion(S),O),o.some(e=>!1===e)&&"target"!==t&&S.premultiply(C).normalize()}e.currentDampingFactor>1?(h.updateWorldMatrix(!0,!1),C.setFromRotationMatrix(d(h.matrixWorld)),C.slerp(S,1/e.currentDampingFactor),A(h,R.makeRotationFromQuaternion(C)),e.paused=8*(1-C.dot(S))<1e-6):(A(h,R.makeRotationFromQuaternion(S)),e.paused=!0),e.object?.dispatchEvent({type:"beginEvent",eventName:"LookAt"}),h.dispatchEvent(z),h.dispatchEvent(W)}},B=new m,U=new m,Z=new m;i("Follow",({eventContext:e,eventManager:t})=>new P(e,t)),i("LookAt",({eventContext:e})=>new I(e)),u("tracking");
1
+ import{a as e}from"./runtime-chunk-NBYTQLIB.js";import{f as t}from"./runtime-chunk-CPEZA5MP.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-VCWF6YLW.js";import"./runtime-chunk-27CHRAEV.js";import"./runtime-chunk-RJL6PC2M.js";import"./runtime-chunk-NL5MFDOU.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{f as o,g as r}from"./runtime-chunk-Y5F2EZVH.js";import{d,v as l}from"./runtime-chunk-ODJETDNL.js";import"./runtime-chunk-RTLL6WIB.js";import"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-C6JZPJNZ.js";import{a as u}from"./runtime-chunk-TZCHGFVF.js";import{r as h,s as c}from"./runtime-chunk-WKTS4T2Q.js";import{Ec as p,Fc as m,Oc as v,rd as g}from"./runtime-chunk-BVVSZMXD.js";import"./runtime-chunk-ML3Z74BL.js";var E=new m,f=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(f),f.negate(),E.copy(f)):"xy"===n?E.set(0,0,1):"xz"===n?E.set(0,1,0):"yz"===n&&E.set(1,0,0),L.setFromNormalAndCoplanarPoint(E,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=E.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)}},P=new m,b=new m,R=new v,j=new p,N=new p,S=new m,k=new m,O=new m,z=new m,T=new g,W={type:"requestRender"},Q={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}},I=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(k);else{if("custom"===s?(l().getWorldDirection(b),b.negate(),T.setFromNormalAndCoplanarPoint(b,S)):("xy"===s?P.set(0,0,1):"xz"===s?P.set(0,1,0):"yz"===s&&P.set(1,0,0),T.setFromNormalAndCoplanarPoint(P,S)),!u.ray.intersectPlane(T,k))return;i>0&&("custom"===s||void 0===s)&&k.addScaledVector(b,i)}if(e.isReset||(c?"target"===t?O.copy(c.up).applyMatrix4(R.extractRotation(c.matrixWorld)).normalize():o.some(e=>!1===e)?("x"===n?(z.set(0,0,1),!1===o[2]&&z.set(0,1,0)):"y"===n?(z.set(1,0,0),!1===o[0]&&z.set(0,0,1)):(z.set(0,1,0),!1===o[1]&&z.set(1,0,0)),O.copy(z).applyQuaternion(e.worldQuaternion0).normalize()):O.set(0,1,0):"custom"===s?O.set(0,1,0):O.copy(P)),e.isReset)N.copy(e.worldQuaternion0);else if(S.distanceTo(k)>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;N.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=R.elements;Z.subVectors(t,n),0===Z.lengthSq()&&(Z.z=1),Z.normalize(),U.crossVectors(i,Z),0===U.lengthSq()&&(1===Math.abs(i.z)?Z.x+=1e-4:Z.z+=1e-4,Z.normalize(),U.crossVectors(i,Z)),U.normalize(),B.crossVectors(Z,U),"x"===s?1===a.z?[U,B,Z]=[Z,U,B]:(U.negate(),[U,Z]=[Z,U]):"y"===s?1===a.x?[U,B,Z]=[B,Z,U]:(U.negate(),[B,Z]=[Z,B]):1===a.x&&(U.negate(),[U,B]=[B,U]),o[0]=U.x,o[4]=B.x,o[8]=Z.x,o[1]=U.y,o[5]=B.y,o[9]=Z.y,o[2]=U.z,o[6]=B.z,o[10]=Z.z})(0,k,S,O,n,z),N.setFromRotationMatrix(R),j.setFromUnitVectors(z.applyQuaternion(N),O),o.some(e=>!1===e)&&"target"!==t&&N.premultiply(j).normalize()}e.currentDampingFactor>1?(h.updateWorldMatrix(!0,!1),j.setFromRotationMatrix(d(h.matrixWorld)),j.slerp(N,1/e.currentDampingFactor),V(h,R.makeRotationFromQuaternion(j)),e.paused=8*(1-j.dot(N))<1e-6):(V(h,R.makeRotationFromQuaternion(N)),e.paused=!0),e.object?.dispatchEvent({type:"beginEvent",eventName:"LookAt"}),h.dispatchEvent(W),h.dispatchEvent(Q)}},B=new m,U=new m,Z=new m;i("Follow",({eventContext:e,eventManager:t})=>new C(e,t)),i("LookAt",({eventContext:e})=>new I(e)),u("tracking");
@@ -0,0 +1 @@
1
+ import{i as t,k as i,l as e}from"./runtime-chunk-VKW2VLP6.js";import"./runtime-chunk-CP7JGFPR.js";import"./runtime-chunk-NTUTXO7Q.js";import{a as s,b as r,d as n}from"./runtime-chunk-RSGNJXM5.js";import"./runtime-chunk-HD7WF3XN.js";import{a}from"./runtime-chunk-GGSUJEGZ.js";import"./runtime-chunk-CPEZA5MP.js";import"./runtime-chunk-FTVQTRM7.js";import{a as h}from"./runtime-chunk-VCWF6YLW.js";import"./runtime-chunk-HBQHIMBZ.js";import"./runtime-chunk-27CHRAEV.js";import"./runtime-chunk-RJL6PC2M.js";import"./runtime-chunk-NL5MFDOU.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{b as o,e as c}from"./runtime-chunk-Y5F2EZVH.js";import"./runtime-chunk-ODJETDNL.js";import"./runtime-chunk-RTLL6WIB.js";import{e as m}from"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-C6JZPJNZ.js";import{a as d}from"./runtime-chunk-TZCHGFVF.js";import{p as u}from"./runtime-chunk-WKTS4T2Q.js";import{Bc as l,Cc as p}from"./runtime-chunk-BVVSZMXD.js";import"./runtime-chunk-ML3Z74BL.js";function A(t){let i=t.tweens[0]?.data;return{delay:i?.delay??t.delay,delayDirection:i?.delayDirection??"start-once",direction:i?.direction??t.direction,repeat:i?.repeat??t.repeat}}var g={state:null,duration:0,delay:0,delayDirection:"start-once",direction:"normal",repeat:0,easing:0},j=class extends l{constructor(t,i,e,s,r,n){if(super(),this.eventType=t,this.data=i,this.page=e,this.shared=s,this.condition=r,this.runModeOverride=n,this.tweens=[],this.hasPlayedOnce=!1,!i.object)throw new Error("Missing property");let a=this.page.scene.find(i.object)??this.page.uiCanvas?.find(i.object)??this.page.scene.find2DInUIObjects(i.object);if(!a)throw new Error("Missing property");if(!a.states)throw new Error("Missing property");if(this.object=a,i.tweens.length<2)throw new Error("Missing property");this.init()}get playing(){return!0===this.runner?.isPlaying}get animating(){return!0===this.runner?.isAnimating}get contested(){let t=this.object.previousAction;return null!==t&&t!==this&&t.animating}init(){this.initialCurrentState=i(this.object,this.object.currentState).id,this.build()}get runMode(){return void 0!==this.runModeOverride?this.runModeOverride:u(this.eventType)?this.data.runMode:"Repeat"}get currentState(){return"Toggle"===this.runMode?this.initialCurrentState:this.object.currentState}build(){let i=this.data.tweens,s=[];try{let t=i[0].data.state;void 0!==t&&s.push(new e(this.object,t,t,g,this.shared,this.data.allowSlerp??!1,this.page));for(let t=1;t<i.length;t++){let r=i[t-1],n=i[t];s.push(new e(this.object,void 0===r.data.state?this.currentState:r.data.state,void 0===n.data.state?this.currentState:n.data.state,n.data,this.shared,this.data.allowSlerp??!1,this.page))}}catch(t){return void(t instanceof Error&&console.error(t.message))}this.tweens=s,this.runner=new n({...t(A(this.data)),runMode:this.runMode},s.map(t=>t.runner),{claim:()=>this.claimObject(),assignCurrentState:()=>this.rebindTweens(),isOwner:()=>this.object.previousAction===this})}claimObject(){return this.object.previousAction!==this&&(!0===this.object.previousAction?.animating&&this.object.previousAction.pause(),this.object.previousAction=this,!0)}rebindTweens(){for(let t of this.tweens)try{t.rebind()}catch(t){t instanceof Error&&console.error(t.message)}this.object instanceof h&&this.object.wasMovedByUser&&(this.object.wasMovedByUser=!1)}update(t){this.runner?.update(t),!0!==this.runner?.isPlaying&&a.remove(this)}play(){if(!1===c(this.shared,this.condition)||"Once"===this.runMode&&this.hasPlayedOnce)return!1;this.hasPlayedOnce=!0,this.start()}start(){!this.runner||(this.runner.play(a.time),this.runner.isPlaying&&a.add(this))}pause(){this.runner?.stop(),a.remove(this)}stop(){this.pause();let t=void 0===this.data.tweens[0].data.state?this.initialCurrentState:this.data.tweens[0].data.state;m(this.object)?this.object.changeSelectedState(t,{shared:this.shared}):this.object.changeSelectedState(t,{scene:this.page.scene,shared:this.shared}),this.object.currentState=t}seek(t){if(!1===c(this.shared,this.condition))return!1;this.runner?.seek(t)}playDirected(t){if(!1===c(this.shared,this.condition))return!1;!this.runner||(this.runner.playDirected(a.time,t),this.runner.isPlaying&&a.add(this))}playFromCurrent(){this.playDirected(!0)}reverseFromCurrent(){this.playDirected(!1)}dispose(){this.pause()}},f=class extends l{constructor(t,i,e,r,n){super(),this.data=t,this.page=i,this.animationControls=e,this.shared=r,this.condition=n,this.startOnceDelay=0,this.toggleIsForward=!1;let a=t.object,h=i.scene.find(t.object);h&&Array.isArray(h.identity)&&(a=h.identity[0]),this.data={...t,object:a};let o=this.animationControls.clipIdToAction[t.clipId+"/"+a];if(this.duration=o?.getClip()?.duration??1,this.data.crop2){let t=s(o?.getClip());this.leftFrameTime=this.data.crop2[0]/(t-1)*this.duration,this.rightFrameTime=this.data.crop2[1]/(t-1)*this.duration}else{let t=o?.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===c(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,s])=>{let r=e.split("/")[1];this.threeAnimAction!==s&&r===i&&(t?s.fadeOut(.2):s.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=p.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===c(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,s])=>{let r=e.split("/")[1];this.threeAnimAction!==s&&r===t&&s.isRunning()&&(i?s.fadeOut(.2):s.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()}};r(e),o("Transition",({eventType:t,data:i,page:e,shared:s,actionCondition:r,runModeOverride:n})=>new j(t,i,e,s,r,n)),o("Animation",({data:t,page:i,eventManager:e,shared:s,actionCondition:r})=>new f(t,i,e.animationControls,s,r)),d("transitions");
@@ -1 +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-H5PVAACQ.js";import"./runtime-chunk-NTUTXO7Q.js";import"./runtime-chunk-FTVQTRM7.js";import{I as p,ea as f}from"./runtime-chunk-VDZLCK3P.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{b as v}from"./runtime-chunk-T5W7UUKQ.js";import"./runtime-chunk-RTLL6WIB.js";import"./runtime-chunk-2PT2WH66.js";import{e as g,f as y}from"./runtime-chunk-K3MJM76A.js";import{a as w,f as O,j as P}from"./runtime-chunk-TZCHGFVF.js";import{D as j}from"./runtime-chunk-ZE3Y3273.js";import{Ae as b,Ba as x,Bd as R,Cc as S,Lc as T,Le as F,bd as H,ce as D,dd as I,ld as W}from"./runtime-chunk-BVVSZMXD.js";import"./runtime-chunk-ML3Z74BL.js";function M(e,t,i,r){return r?i:2048/Math.max(1,e,t)}var U=new b(-1,1,1,-1,0,1),B=new class extends I{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 D({defines:{},uniforms:{tDiffuse:new F(null)},vertexShader:"\n\tvarying vec2 vUv;\n\tvoid main() {\n\t\tvUv = uv;\n\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t}",fragmentShader:"\n\tuniform sampler2D tDiffuse;\n\tvarying vec2 vUv;\n\tvoid main() {\n\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\tgl_FragColor = texel;\n\t}"}),z=new class{constructor(e){this._mesh=new W(B,e)}dispose(){this._mesh.geometry.dispose()}render(e){e.render(this._mesh,U)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}}(E),k=null,G=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=M(e,t,this.dpr,this.isScreenSpace),this.renderer.setSize(e,t)},this.onFrameOverrideObjectEvent=e=>{if(void 0!==e.target?.uuid){let t=this.frameRoot?.find(e.target.uuid);t&&t.dispatchEvent({...e,target:t})}},this.scene2d=new u(S.generateUUID(),y.defaultData,{dpr:window.devicePixelRatio,shared:s.shared}),this.canvas=(null===k&&(k=document.createElement("canvas")),k),this.renderer=(n=this.canvas,null===G&&(G=new a(n)),G),this.promise=this.init(),this.renderTarget=new T(1,1,{type:x,stencilBuffer:!1,depthBuffer:!1}),s.shared.addUIBuffer(this.uuid,this.renderTarget),this.textureHolder=s.shared.uiBuffer(this.uuid)}get canvasTexture(){return this._canvasTexture||(this._canvasTexture=new R(this.canvas)),this._canvasTexture}async init(){await this.renderer.init(),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=M(e,t,i,r),s=Math.max(i,512/Math.min(e,t)),n=Math.min(s,a);return{width:Math.max(1,Math.ceil(e*n)),height:Math.max(1,Math.ceil(t*n))}}(i,r,t,this.isScreenSpace);this.renderTarget.setSize(a.width,a.height),this._canvasTexture?.dispose(),this._canvasTexture=void 0,this.applyOverrides(e),this.frameOverride?.requestRender()}applyFrame(e){let t=this.context.scene.find2D(e);if(t&&t instanceof o)return this.disposeFrameOverride(),this.frameRoot=t,this.frameOverride=t.clone({dpr:this.renderer.dpr,shared:this.context.shared}),this.scene2d.add(this.frameOverride),this.applySize(),this.frame?.addEventListener("render",this.onRenderRequestedDownstream),this.frameOverride.traverse(e=>{e.addEventListener("beginState",this.onFrameOverrideObjectEvent),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("beginState",this.onFrameOverrideObjectEvent),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 Z=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 Z(e,t,i)),P({Scene2D:u,UICanvas:_,loadHanaUIRUNTIME:r,setHanaUIWasmUrl:i}),w("ui-2d");
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-CP7JGFPR.js";import"./runtime-chunk-NTUTXO7Q.js";import"./runtime-chunk-FTVQTRM7.js";import{I as p,ea as f}from"./runtime-chunk-NL5MFDOU.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{b as v}from"./runtime-chunk-ODJETDNL.js";import"./runtime-chunk-RTLL6WIB.js";import"./runtime-chunk-2PT2WH66.js";import{e as g,f as y}from"./runtime-chunk-C6JZPJNZ.js";import{a as w,f as O,j as P}from"./runtime-chunk-TZCHGFVF.js";import{D as j}from"./runtime-chunk-WKTS4T2Q.js";import{Ae as b,Ba as R,Bd as x,Cc as S,Lc as T,Le as F,bd as H,ce as D,dd as I,ld as W}from"./runtime-chunk-BVVSZMXD.js";import"./runtime-chunk-ML3Z74BL.js";function M(e,t,i,r){return r?i:2048/Math.max(1,e,t)}var B=new b(-1,1,1,-1,0,1),U=new class extends I{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 D({defines:{},uniforms:{tDiffuse:new F(null)},vertexShader:"\n\tvarying vec2 vUv;\n\tvoid main() {\n\t\tvUv = uv;\n\t\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\t}",fragmentShader:"\n\tuniform sampler2D tDiffuse;\n\tvarying vec2 vUv;\n\tvoid main() {\n\t\tvec4 texel = texture2D( tDiffuse, vUv );\n\t\tgl_FragColor = texel;\n\t}"}),z=new class{constructor(e){this._mesh=new W(U,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),k=null,G=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=M(e,t,this.dpr,this.isScreenSpace),this.renderer.setSize(e,t)},this.onFrameOverrideObjectEvent=e=>{if(void 0!==e.target?.uuid){let t=this.frameRoot?.find(e.target.uuid);t&&t.dispatchEvent({...e,target:t})}},this.scene2d=new u(S.generateUUID(),y.defaultData,{dpr:window.devicePixelRatio,shared:s.shared}),this.canvas=(null===k&&(k=document.createElement("canvas")),k),this.renderer=(n=this.canvas,null===G&&(G=new a(n)),G),this.promise=this.init(),this.renderTarget=new T(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=M(e,t,i,r),s=Math.max(i,512/Math.min(e,t)),n=Math.min(s,a);return{width:Math.max(1,Math.ceil(e*n)),height:Math.max(1,Math.ceil(t*n))}}(i,r,t,this.isScreenSpace);this.renderTarget.setSize(a.width,a.height),this._canvasTexture?.dispose(),this._canvasTexture=void 0,this.applyOverrides(e),this.frameOverride?.requestRender()}applyFrame(e){let t=this.context.scene.find2D(e);if(t&&t instanceof o)return this.disposeFrameOverride(),this.frameRoot=t,this.frameOverride=t.clone({dpr:this.renderer.dpr,shared:this.context.shared}),this.scene2d.add(this.frameOverride),this.applySize(),this.frame?.addEventListener("render",this.onRenderRequestedDownstream),this.frameOverride.traverse(e=>{e.addEventListener("beginState",this.onFrameOverrideObjectEvent),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("beginState",this.onFrameOverrideObjectEvent),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&&q({objectOverride:h,objectRoot:d,newParentWidth:i,newParentHeight:r,initialParentWidth:a,initialParentHeight:s})}}function q({objectOverride:e,objectRoot:t,newParentWidth:i,newParentHeight:r,initialParentWidth:a,initialParentHeight:s}){let[n,h]=function(e){if(V(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)N({stateId:n,objectOverride:e,objectRoot:t,newParentWidth:i,newParentHeight:r,initialParentWidth:a,initialParentHeight:s});if(V(e)||e instanceof d)V(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 N({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 V(e){return e instanceof n||e instanceof o||e instanceof s||e instanceof h}var A=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 A(e,t,i)),P({Scene2D:u,UICanvas:_,loadHanaUIRUNTIME:r,setHanaUIWasmUrl:i}),w("ui-2d");
@@ -1 +1 @@
1
- import{Na as a,Oa as e,Pa as t,Qa as s,Ra as u,Sa as m,Ta as c}from"./runtime-chunk-ZE3Y3273.js";import"./runtime-chunk-BVVSZMXD.js";import"./runtime-chunk-ML3Z74BL.js";export{u as updateAllMaterials,c as updateDocumentSchema,m as updateLibSchema,e as updateMaterialSchema,t as updateObjectStateRec,s as updateObjectsSchema,a as updateTextValues};
1
+ import{Na as a,Oa as e,Pa as t,Qa as s,Ra as u,Sa as m,Ta as c}from"./runtime-chunk-WKTS4T2Q.js";import"./runtime-chunk-BVVSZMXD.js";import"./runtime-chunk-ML3Z74BL.js";export{u as updateAllMaterials,c as updateDocumentSchema,m as updateLibSchema,e as updateMaterialSchema,t as updateObjectStateRec,s as updateObjectsSchema,a as updateTextValues};
@@ -0,0 +1,2 @@
1
+ Z`�q����Z<��e��m�ʐͲ5��.�c����#˒,s}f;���
2
+ �7K�]P���
@@ -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-WTHIEJBK.js";import"./runtime-chunk-K3MJM76A.js";import{a as o}from"./runtime-chunk-TZCHGFVF.js";import{Fa as h,Ga as l,u as c}from"./runtime-chunk-ZE3Y3273.js";import{Cc as m,Ec as u,Fc as p,Oc as y,Pc as V}from"./runtime-chunk-BVVSZMXD.js";import"./runtime-chunk-ML3Z74BL.js";var b=new y,v=new p,f=new u,g=new p,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 p?s.clone():s:(s instanceof p?!s.equals(i):i!==s)&&(r.push({objId:a,property:t}),s instanceof p?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:u,startValue:p}=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)!==p&&(t.updateVariable(n,p),this.eventManager.requestRender()),("timer"===c.dynamicVariableType||"stopwatch"===c.dynamicVariableType)&&this.dynamicVars[r].timerSeconds!==p&&(this.dynamicVars[r].timerSeconds=p,t.updateVariable(n,l.getFormattedTimerTime(p,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,p,c.endValue):m.clamp(i,c.endValue,p),i===p&&t.setDynamicVariableToggleIsForward(n,void 0),c.repeat?i===c.endValue&&(i=p):(i===p||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=u+(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,p,e):m.clamp(d,e,p),d===p&&t.setDynamicVariableToggleIsForward(n,void 0),c.repeat?Math.abs(d-e)<("number3decimal"===c.format?1e-4:.1)&&(d=p):(Math.abs(d-p)<("number3decimal"===c.format?1e-4:.1)||Math.abs(d-e)<("number3decimal"===c.format?1e-4:.1))&&t.setDynamicVariablePlayState(n,"Paused")),d!==u&&(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-Y5F2EZVH.js";import"./runtime-chunk-C6JZPJNZ.js";import{a as o}from"./runtime-chunk-TZCHGFVF.js";import{Fa as h,Ga as l,u as c}from"./runtime-chunk-WKTS4T2Q.js";import{Cc as m,Ec as u,Fc as p,Oc as y,Pc as V}from"./runtime-chunk-BVVSZMXD.js";import"./runtime-chunk-ML3Z74BL.js";var b=new y,v=new p,f=new u,g=new p,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 p?s.clone():s:(s instanceof p?!s.equals(i):i!==s)&&(r.push({objId:a,property:t}),s instanceof p?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:u,startValue:p}=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)!==p&&(t.updateVariable(n,p),this.eventManager.requestRender()),("timer"===c.dynamicVariableType||"stopwatch"===c.dynamicVariableType)&&this.dynamicVars[r].timerSeconds!==p&&(this.dynamicVars[r].timerSeconds=p,t.updateVariable(n,l.getFormattedTimerTime(p,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,p,c.endValue):m.clamp(i,c.endValue,p),i===p&&t.setDynamicVariableToggleIsForward(n,void 0),c.repeat?i===c.endValue&&(i=p):(i===p||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=u+(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,p,e):m.clamp(d,e,p),d===p&&t.setDynamicVariableToggleIsForward(n,void 0),c.repeat?Math.abs(d-e)<("number3decimal"===c.format?1e-4:.1)&&(d=p):(Math.abs(d-p)<("number3decimal"===c.format?1e-4:.1)||Math.abs(d-e)<("number3decimal"===c.format?1e-4:.1))&&t.setDynamicVariablePlayState(n,"Paused")),d!==u&&(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 +1 @@
1
- import{ea as t}from"./runtime-chunk-VDZLCK3P.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{u as e}from"./runtime-chunk-T5W7UUKQ.js";import"./runtime-chunk-RTLL6WIB.js";import"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-K3MJM76A.js";import{a as r,f as i}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-ZE3Y3273.js";import"./runtime-chunk-BVVSZMXD.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");
1
+ import{ea as t}from"./runtime-chunk-NL5MFDOU.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{u as e}from"./runtime-chunk-ODJETDNL.js";import"./runtime-chunk-RTLL6WIB.js";import"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-C6JZPJNZ.js";import{a as r,f as i}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-WKTS4T2Q.js";import"./runtime-chunk-BVVSZMXD.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");
@@ -1 +1 @@
1
- import{c as t}from"./runtime-chunk-FQNSP44B.js";import{b as i,e}from"./runtime-chunk-WTHIEJBK.js";import{e as s}from"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-K3MJM76A.js";import{a}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-ZE3Y3273.js";import"./runtime-chunk-BVVSZMXD.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");
1
+ import{c as t}from"./runtime-chunk-FQNSP44B.js";import{b as i,e}from"./runtime-chunk-Y5F2EZVH.js";import{e as s}from"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-C6JZPJNZ.js";import{a}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-WKTS4T2Q.js";import"./runtime-chunk-BVVSZMXD.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");