@splinetool/runtime 2.0.6 → 2.0.8

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 (330) hide show
  1. package/build/hana-ui.js +44 -40
  2. package/build/hana-ui.js.br +0 -0
  3. package/build/hana-ui.js.gz +0 -0
  4. package/build/hana-ui.wasm +0 -0
  5. package/build/hana-ui.wasm.br +0 -0
  6. package/build/hana-ui.wasm.gz +0 -0
  7. package/build/{runtime-aiAssistant-KA7ZJ3F6.js → runtime-aiAssistant-KCI2YU3F.js} +1 -1
  8. package/build/runtime-aiAssistant-KCI2YU3F.js.br +0 -0
  9. package/build/runtime-aiAssistant-KCI2YU3F.js.gz +0 -0
  10. package/build/{runtime-apiServices-CGMAW2B4.js → runtime-apiServices-EYRJ5E55.js} +1 -1
  11. package/build/runtime-apiServices-EYRJ5E55.js.br +0 -0
  12. package/build/runtime-apiServices-EYRJ5E55.js.gz +0 -0
  13. package/build/{runtime-audio-GCUGVRQ3.js → runtime-audio-TEHDPDRZ.js} +1 -1
  14. package/build/runtime-audio-TEHDPDRZ.js.br +4 -0
  15. package/build/runtime-audio-TEHDPDRZ.js.gz +0 -0
  16. package/build/{runtime-chunk-HUFJRFTO.js → runtime-chunk-23QXG35G.js} +1 -1
  17. package/build/runtime-chunk-23QXG35G.js.br +0 -0
  18. package/build/runtime-chunk-23QXG35G.js.gz +0 -0
  19. package/build/{runtime-chunk-H7D3VFTJ.js → runtime-chunk-32KZP4YN.js} +1 -1
  20. package/build/runtime-chunk-32KZP4YN.js.br +0 -0
  21. package/build/runtime-chunk-32KZP4YN.js.gz +0 -0
  22. package/build/{runtime-chunk-MM2G3DLE.js → runtime-chunk-3GRN37GY.js} +1 -1
  23. package/build/runtime-chunk-3GRN37GY.js.br +0 -0
  24. package/build/runtime-chunk-3GRN37GY.js.gz +0 -0
  25. package/build/{runtime-chunk-LX3KCQF6.js → runtime-chunk-557KVSJL.js} +1 -1
  26. package/build/runtime-chunk-557KVSJL.js.br +0 -0
  27. package/build/runtime-chunk-557KVSJL.js.gz +0 -0
  28. package/build/{runtime-chunk-CX2MRLZA.js → runtime-chunk-5JEZ42OM.js} +1 -1
  29. package/build/runtime-chunk-5JEZ42OM.js.br +0 -0
  30. package/build/runtime-chunk-5JEZ42OM.js.gz +0 -0
  31. package/build/{runtime-chunk-KYA2CB5O.js → runtime-chunk-5RXW5MNJ.js} +1 -1
  32. package/build/runtime-chunk-5RXW5MNJ.js.br +0 -0
  33. package/build/runtime-chunk-5RXW5MNJ.js.gz +0 -0
  34. package/build/{runtime-chunk-AKWBEROQ.js → runtime-chunk-AELTGHV2.js} +1 -1
  35. package/build/runtime-chunk-AELTGHV2.js.br +0 -0
  36. package/build/runtime-chunk-AELTGHV2.js.gz +0 -0
  37. package/build/{runtime-chunk-NAJSQF6K.js → runtime-chunk-BMA5KYBS.js} +1 -1
  38. package/build/runtime-chunk-BMA5KYBS.js.br +0 -0
  39. package/build/runtime-chunk-BMA5KYBS.js.gz +0 -0
  40. package/build/{runtime-chunk-4KX4KQWR.js → runtime-chunk-CKT62HES.js} +1 -1
  41. package/build/runtime-chunk-CKT62HES.js.br +0 -0
  42. package/build/runtime-chunk-CKT62HES.js.gz +0 -0
  43. package/build/{runtime-chunk-CEAWQBAS.js → runtime-chunk-DHWGP6NU.js} +1 -1
  44. package/build/runtime-chunk-DHWGP6NU.js.br +0 -0
  45. package/build/runtime-chunk-DHWGP6NU.js.gz +0 -0
  46. package/build/{runtime-chunk-SXPM42HJ.js → runtime-chunk-DK66VKWP.js} +1 -1
  47. package/build/runtime-chunk-DK66VKWP.js.br +0 -0
  48. package/build/runtime-chunk-DK66VKWP.js.gz +0 -0
  49. package/build/{runtime-chunk-XUM5HEC6.js → runtime-chunk-E3IEBR27.js} +1 -1
  50. package/build/runtime-chunk-E3IEBR27.js.br +0 -0
  51. package/build/runtime-chunk-E3IEBR27.js.gz +0 -0
  52. package/build/{runtime-chunk-ITLS6YIC.js → runtime-chunk-EJJZJ5MV.js} +1 -1
  53. package/build/runtime-chunk-EJJZJ5MV.js.br +0 -0
  54. package/build/runtime-chunk-EJJZJ5MV.js.gz +0 -0
  55. package/build/{runtime-chunk-NWCLOXDY.js → runtime-chunk-EPHVY3XO.js} +1 -1
  56. package/build/runtime-chunk-EPHVY3XO.js.br +0 -0
  57. package/build/runtime-chunk-EPHVY3XO.js.gz +0 -0
  58. package/build/{runtime-chunk-GN3HDYV2.js → runtime-chunk-F3ZACLZW.js} +1 -1
  59. package/build/runtime-chunk-F3ZACLZW.js.br +0 -0
  60. package/build/runtime-chunk-F3ZACLZW.js.gz +0 -0
  61. package/build/{runtime-chunk-PUBEJSJO.js → runtime-chunk-GZ7C2GJM.js} +1 -1
  62. package/build/runtime-chunk-GZ7C2GJM.js.br +0 -0
  63. package/build/runtime-chunk-GZ7C2GJM.js.gz +0 -0
  64. package/build/{runtime-chunk-BPYFB4BD.js → runtime-chunk-HK23JJVH.js} +1 -1
  65. package/build/runtime-chunk-HK23JJVH.js.br +0 -0
  66. package/build/runtime-chunk-HK23JJVH.js.gz +0 -0
  67. package/build/{runtime-chunk-4DNX5FPP.js → runtime-chunk-HZ6FL5GH.js} +1 -1
  68. package/build/runtime-chunk-HZ6FL5GH.js.br +0 -0
  69. package/build/runtime-chunk-HZ6FL5GH.js.gz +0 -0
  70. package/build/{runtime-chunk-FY3XD5P2.js → runtime-chunk-KE6HNYUL.js} +1 -1
  71. package/build/runtime-chunk-KE6HNYUL.js.br +0 -0
  72. package/build/runtime-chunk-KE6HNYUL.js.gz +0 -0
  73. package/build/runtime-chunk-KNL33WN7.js +1 -0
  74. package/build/runtime-chunk-KNL33WN7.js.br +0 -0
  75. package/build/runtime-chunk-KNL33WN7.js.gz +0 -0
  76. package/build/runtime-chunk-OUXEWX5Z.js +1 -0
  77. package/build/runtime-chunk-OUXEWX5Z.js.br +0 -0
  78. package/build/runtime-chunk-OUXEWX5Z.js.gz +0 -0
  79. package/build/{runtime-chunk-RRXSRYPQ.js → runtime-chunk-PDASWDVC.js} +1 -1
  80. package/build/{runtime-chunk-RRXSRYPQ.js.br → runtime-chunk-PDASWDVC.js.br} +0 -0
  81. package/build/runtime-chunk-PDASWDVC.js.gz +0 -0
  82. package/build/{runtime-chunk-JQ3A6ENO.js → runtime-chunk-RLYG5YBB.js} +1 -1
  83. package/build/runtime-chunk-RLYG5YBB.js.br +1 -0
  84. package/build/runtime-chunk-RLYG5YBB.js.gz +0 -0
  85. package/build/{runtime-chunk-OF7IZ6BI.js → runtime-chunk-TAY7IXEZ.js} +1 -1
  86. package/build/runtime-chunk-TAY7IXEZ.js.br +0 -0
  87. package/build/runtime-chunk-TAY7IXEZ.js.gz +0 -0
  88. package/build/{runtime-chunk-R34HNX2O.js → runtime-chunk-U4QOT2PX.js} +1 -1
  89. package/build/runtime-chunk-U4QOT2PX.js.br +0 -0
  90. package/build/runtime-chunk-U4QOT2PX.js.gz +0 -0
  91. package/build/{runtime-chunk-GO25U5WN.js → runtime-chunk-UIM3XKIT.js} +1 -1
  92. package/build/runtime-chunk-UIM3XKIT.js.br +0 -0
  93. package/build/runtime-chunk-UIM3XKIT.js.gz +0 -0
  94. package/build/{runtime-chunk-4E4NQ6GS.js → runtime-chunk-USGQ26QU.js} +1 -1
  95. package/build/{runtime-chunk-4E4NQ6GS.js.br → runtime-chunk-USGQ26QU.js.br} +0 -0
  96. package/build/runtime-chunk-USGQ26QU.js.gz +0 -0
  97. package/build/{runtime-chunk-RBM3UDQF.js → runtime-chunk-VPEJ5BFD.js} +1 -1
  98. package/build/runtime-chunk-VPEJ5BFD.js.br +0 -0
  99. package/build/{runtime-chunk-RBM3UDQF.js.gz → runtime-chunk-VPEJ5BFD.js.gz} +0 -0
  100. package/build/{runtime-chunk-XXRCB3ME.js → runtime-chunk-YULW5JRE.js} +1 -1
  101. package/build/runtime-chunk-YULW5JRE.js.br +0 -0
  102. package/build/runtime-chunk-YULW5JRE.js.gz +0 -0
  103. package/build/{runtime-classicRuntime-PJ7JLKSY.js → runtime-classicRuntime-U672GAGM.js} +1 -1
  104. package/build/runtime-classicRuntime-U672GAGM.js.br +0 -0
  105. package/build/runtime-classicRuntime-U672GAGM.js.gz +0 -0
  106. package/build/runtime-cloners-2AC7OZRC.js +1 -0
  107. package/build/runtime-cloners-2AC7OZRC.js.br +0 -0
  108. package/build/runtime-cloners-2AC7OZRC.js.gz +0 -0
  109. package/build/{runtime-components-VRLLFORJ.js → runtime-components-L63NUGAO.js} +1 -1
  110. package/build/runtime-components-L63NUGAO.js.br +0 -0
  111. package/build/runtime-components-L63NUGAO.js.gz +0 -0
  112. package/build/{runtime-conditional-VA7AKA6O.js → runtime-conditional-HGOAXTBF.js} +1 -1
  113. package/build/runtime-conditional-HGOAXTBF.js.br +0 -0
  114. package/build/runtime-conditional-HGOAXTBF.js.gz +0 -0
  115. package/build/{runtime-createDestroy-IQVBLQ24.js → runtime-createDestroy-QHHQ6LYS.js} +1 -1
  116. package/build/runtime-createDestroy-QHHQ6LYS.js.br +0 -0
  117. package/build/runtime-createDestroy-QHHQ6LYS.js.gz +0 -0
  118. package/build/{runtime-dragDrop-XFI62H3C.js → runtime-dragDrop-YBSWK3ET.js} +1 -1
  119. package/build/runtime-dragDrop-YBSWK3ET.js.br +0 -0
  120. package/build/runtime-dragDrop-YBSWK3ET.js.gz +0 -0
  121. package/build/{runtime-gameControls-W3YS7OS2.js → runtime-gameControls-DSJRSTW5.js} +1 -1
  122. package/build/runtime-gameControls-DSJRSTW5.js.br +0 -0
  123. package/build/runtime-gameControls-DSJRSTW5.js.gz +0 -0
  124. package/build/runtime-hair-V4RTCES2.js +1 -0
  125. package/build/runtime-hair-V4RTCES2.js.br +2 -0
  126. package/build/runtime-hair-V4RTCES2.js.gz +0 -0
  127. package/build/{runtime-mergeStaticGeometries-KJFDZ7TP.js → runtime-mergeStaticGeometries-VXENKMD4.js} +1 -1
  128. package/build/runtime-mergeStaticGeometries-VXENKMD4.js.br +0 -0
  129. package/build/runtime-mergeStaticGeometries-VXENKMD4.js.gz +0 -0
  130. package/build/{runtime-miscActions-UGVVC2QC.js → runtime-miscActions-RPUPHHGJ.js} +1 -1
  131. package/build/runtime-miscActions-RPUPHHGJ.js.br +0 -0
  132. package/build/runtime-miscActions-RPUPHHGJ.js.gz +0 -0
  133. package/build/{runtime-mouseHover-O7Y26SM5.js → runtime-mouseHover-HG6AHA2L.js} +1 -1
  134. package/build/runtime-mouseHover-HG6AHA2L.js.br +0 -0
  135. package/build/runtime-mouseHover-HG6AHA2L.js.gz +0 -0
  136. package/build/{runtime-particles-GFRULQXO.js → runtime-particles-ZHE2MC33.js} +1 -1
  137. package/build/runtime-particles-ZHE2MC33.js.br +0 -0
  138. package/build/runtime-particles-ZHE2MC33.js.gz +0 -0
  139. package/build/{runtime-paths-Q7I56BAX.js → runtime-paths-GN6E6ZYL.js} +1 -1
  140. package/build/runtime-paths-GN6E6ZYL.js.br +0 -0
  141. package/build/runtime-paths-GN6E6ZYL.js.gz +0 -0
  142. package/build/{runtime-resize-2ZFLSK2M.js → runtime-resize-LACR4RFK.js} +1 -1
  143. package/build/runtime-resize-LACR4RFK.js.br +0 -0
  144. package/build/runtime-resize-LACR4RFK.js.gz +0 -0
  145. package/build/{runtime-sceneTransition-Z65VROHI.js → runtime-sceneTransition-QLPFYHHY.js} +1 -1
  146. package/build/runtime-sceneTransition-QLPFYHHY.js.br +0 -0
  147. package/build/runtime-sceneTransition-QLPFYHHY.js.gz +0 -0
  148. package/build/{runtime-scroll-NWKW6A6L.js → runtime-scroll-WZZBT2XR.js} +1 -1
  149. package/build/runtime-scroll-WZZBT2XR.js.br +0 -0
  150. package/build/runtime-scroll-WZZBT2XR.js.gz +0 -0
  151. package/build/runtime-shapeBlends-O6ATLCCA.js +1 -0
  152. package/build/runtime-shapeBlends-O6ATLCCA.js.br +0 -0
  153. package/build/runtime-shapeBlends-O6ATLCCA.js.gz +0 -0
  154. package/build/{runtime-text-VK3OGBSY.js → runtime-text-UADJSRL4.js} +1 -1
  155. package/build/runtime-text-UADJSRL4.js.br +0 -0
  156. package/build/runtime-text-UADJSRL4.js.gz +0 -0
  157. package/build/{runtime-textInputs-JJQSKO3C.js → runtime-textInputs-7U3TTJ4X.js} +1 -1
  158. package/build/runtime-textInputs-7U3TTJ4X.js.br +0 -0
  159. package/build/runtime-textInputs-7U3TTJ4X.js.gz +0 -0
  160. package/build/runtime-timeline-JXKHKUAC.js +1 -0
  161. package/build/runtime-timeline-JXKHKUAC.js.br +0 -0
  162. package/build/runtime-timeline-JXKHKUAC.js.gz +0 -0
  163. package/build/{runtime-tracking-KYP5WOMH.js → runtime-tracking-MC74576T.js} +1 -1
  164. package/build/runtime-tracking-MC74576T.js.br +0 -0
  165. package/build/runtime-tracking-MC74576T.js.gz +0 -0
  166. package/build/{runtime-transitions-FDRKYMVP.js → runtime-transitions-S22YS7E6.js} +1 -1
  167. package/build/runtime-transitions-S22YS7E6.js.br +0 -0
  168. package/build/runtime-transitions-S22YS7E6.js.gz +0 -0
  169. package/build/{runtime-ui2d-YO6M74VQ.js → runtime-ui2d-EX3RBXPP.js} +1 -1
  170. package/build/runtime-ui2d-EX3RBXPP.js.br +0 -0
  171. package/build/runtime-ui2d-EX3RBXPP.js.gz +0 -0
  172. package/build/{runtime-updater-FS5YHXO4.js → runtime-updater-GOXAMNAK.js} +1 -1
  173. package/build/runtime-updater-GOXAMNAK.js.br +5 -0
  174. package/build/runtime-updater-GOXAMNAK.js.gz +0 -0
  175. package/build/{runtime-variables-CYDDC6HF.js → runtime-variables-36KLHNE5.js} +1 -1
  176. package/build/runtime-variables-36KLHNE5.js.br +0 -0
  177. package/build/runtime-variables-36KLHNE5.js.gz +0 -0
  178. package/build/{runtime-vectorShapes-VMDJ36X2.js → runtime-vectorShapes-J5Y3LMND.js} +1 -1
  179. package/build/runtime-vectorShapes-J5Y3LMND.js.br +0 -0
  180. package/build/runtime-vectorShapes-J5Y3LMND.js.gz +0 -0
  181. package/build/{runtime-video-MTXK33PT.js → runtime-video-XIULR4BY.js} +1 -1
  182. package/build/runtime-video-XIULR4BY.js.br +0 -0
  183. package/build/runtime-video-XIULR4BY.js.gz +0 -0
  184. package/build/runtime-webgpu-LDZ3N2D5.js +1 -0
  185. package/build/runtime-webgpu-LDZ3N2D5.js.br +0 -0
  186. package/build/runtime-webgpu-LDZ3N2D5.js.gz +0 -0
  187. package/build/runtime.cjs +102 -102
  188. package/build/runtime.js +1 -1
  189. package/build/runtime.js.br +0 -0
  190. package/build/runtime.js.gz +0 -0
  191. package/build/runtime.standalone.js +1 -1
  192. package/build/runtime.standalone.js.br +0 -0
  193. package/build/runtime.standalone.js.gz +0 -0
  194. package/build/runtime.standalone.webgl.js +1 -1
  195. package/build/runtime.standalone.webgl.js.br +0 -0
  196. package/build/runtime.standalone.webgl.js.gz +0 -0
  197. package/build/runtime.standalone.webgpu.js +1 -1
  198. package/build/runtime.standalone.webgpu.js.br +0 -0
  199. package/build/runtime.standalone.webgpu.js.gz +0 -0
  200. package/build/runtime.standalone.webgpu.micro.js +1 -1
  201. package/build/runtime.standalone.webgpu.micro.js.br +0 -0
  202. package/build/runtime.standalone.webgpu.micro.js.gz +0 -0
  203. package/build/runtime.standalone.webgpu.min.js +1 -1
  204. package/build/runtime.standalone.webgpu.min.js.br +0 -0
  205. package/build/runtime.standalone.webgpu.min.js.gz +0 -0
  206. package/package.json +1 -1
  207. package/build/runtime-aiAssistant-KA7ZJ3F6.js.br +0 -0
  208. package/build/runtime-aiAssistant-KA7ZJ3F6.js.gz +0 -0
  209. package/build/runtime-apiServices-CGMAW2B4.js.br +0 -0
  210. package/build/runtime-apiServices-CGMAW2B4.js.gz +0 -0
  211. package/build/runtime-audio-GCUGVRQ3.js.br +0 -0
  212. package/build/runtime-audio-GCUGVRQ3.js.gz +0 -0
  213. package/build/runtime-chunk-3KIZF7P5.js +0 -1
  214. package/build/runtime-chunk-3KIZF7P5.js.br +0 -0
  215. package/build/runtime-chunk-3KIZF7P5.js.gz +0 -0
  216. package/build/runtime-chunk-4DNX5FPP.js.br +0 -0
  217. package/build/runtime-chunk-4DNX5FPP.js.gz +0 -0
  218. package/build/runtime-chunk-4E4NQ6GS.js.gz +0 -0
  219. package/build/runtime-chunk-4KX4KQWR.js.br +0 -0
  220. package/build/runtime-chunk-4KX4KQWR.js.gz +0 -0
  221. package/build/runtime-chunk-AKWBEROQ.js.br +0 -0
  222. package/build/runtime-chunk-AKWBEROQ.js.gz +0 -0
  223. package/build/runtime-chunk-BPYFB4BD.js.br +0 -0
  224. package/build/runtime-chunk-BPYFB4BD.js.gz +0 -0
  225. package/build/runtime-chunk-CCJD7IX7.js +0 -1
  226. package/build/runtime-chunk-CCJD7IX7.js.br +0 -0
  227. package/build/runtime-chunk-CCJD7IX7.js.gz +0 -0
  228. package/build/runtime-chunk-CEAWQBAS.js.br +0 -0
  229. package/build/runtime-chunk-CEAWQBAS.js.gz +0 -0
  230. package/build/runtime-chunk-CX2MRLZA.js.br +0 -0
  231. package/build/runtime-chunk-CX2MRLZA.js.gz +0 -0
  232. package/build/runtime-chunk-FY3XD5P2.js.br +0 -0
  233. package/build/runtime-chunk-FY3XD5P2.js.gz +0 -0
  234. package/build/runtime-chunk-GN3HDYV2.js.br +0 -0
  235. package/build/runtime-chunk-GN3HDYV2.js.gz +0 -0
  236. package/build/runtime-chunk-GO25U5WN.js.br +0 -0
  237. package/build/runtime-chunk-GO25U5WN.js.gz +0 -0
  238. package/build/runtime-chunk-H7D3VFTJ.js.br +0 -0
  239. package/build/runtime-chunk-H7D3VFTJ.js.gz +0 -0
  240. package/build/runtime-chunk-HUFJRFTO.js.br +0 -0
  241. package/build/runtime-chunk-HUFJRFTO.js.gz +0 -0
  242. package/build/runtime-chunk-ITLS6YIC.js.br +0 -0
  243. package/build/runtime-chunk-ITLS6YIC.js.gz +0 -0
  244. package/build/runtime-chunk-JQ3A6ENO.js.br +0 -1
  245. package/build/runtime-chunk-JQ3A6ENO.js.gz +0 -0
  246. package/build/runtime-chunk-KYA2CB5O.js.br +0 -0
  247. package/build/runtime-chunk-KYA2CB5O.js.gz +0 -0
  248. package/build/runtime-chunk-LX3KCQF6.js.br +0 -0
  249. package/build/runtime-chunk-LX3KCQF6.js.gz +0 -0
  250. package/build/runtime-chunk-MM2G3DLE.js.br +0 -0
  251. package/build/runtime-chunk-MM2G3DLE.js.gz +0 -0
  252. package/build/runtime-chunk-NAJSQF6K.js.br +0 -0
  253. package/build/runtime-chunk-NAJSQF6K.js.gz +0 -0
  254. package/build/runtime-chunk-NWCLOXDY.js.br +0 -0
  255. package/build/runtime-chunk-NWCLOXDY.js.gz +0 -0
  256. package/build/runtime-chunk-OF7IZ6BI.js.br +0 -0
  257. package/build/runtime-chunk-OF7IZ6BI.js.gz +0 -0
  258. package/build/runtime-chunk-PUBEJSJO.js.br +0 -0
  259. package/build/runtime-chunk-PUBEJSJO.js.gz +0 -0
  260. package/build/runtime-chunk-R34HNX2O.js.br +0 -0
  261. package/build/runtime-chunk-R34HNX2O.js.gz +0 -0
  262. package/build/runtime-chunk-RBM3UDQF.js.br +0 -0
  263. package/build/runtime-chunk-RRXSRYPQ.js.gz +0 -0
  264. package/build/runtime-chunk-SXPM42HJ.js.br +0 -0
  265. package/build/runtime-chunk-SXPM42HJ.js.gz +0 -0
  266. package/build/runtime-chunk-XUM5HEC6.js.br +0 -0
  267. package/build/runtime-chunk-XUM5HEC6.js.gz +0 -0
  268. package/build/runtime-chunk-XXRCB3ME.js.br +0 -0
  269. package/build/runtime-chunk-XXRCB3ME.js.gz +0 -0
  270. package/build/runtime-classicRuntime-PJ7JLKSY.js.br +0 -0
  271. package/build/runtime-classicRuntime-PJ7JLKSY.js.gz +0 -0
  272. package/build/runtime-cloners-SM2IKR3Q.js +0 -1
  273. package/build/runtime-cloners-SM2IKR3Q.js.br +0 -3
  274. package/build/runtime-cloners-SM2IKR3Q.js.gz +0 -0
  275. package/build/runtime-components-VRLLFORJ.js.br +0 -0
  276. package/build/runtime-components-VRLLFORJ.js.gz +0 -0
  277. package/build/runtime-conditional-VA7AKA6O.js.br +0 -0
  278. package/build/runtime-conditional-VA7AKA6O.js.gz +0 -0
  279. package/build/runtime-createDestroy-IQVBLQ24.js.br +0 -0
  280. package/build/runtime-createDestroy-IQVBLQ24.js.gz +0 -0
  281. package/build/runtime-dragDrop-XFI62H3C.js.br +0 -0
  282. package/build/runtime-dragDrop-XFI62H3C.js.gz +0 -0
  283. package/build/runtime-gameControls-W3YS7OS2.js.br +0 -0
  284. package/build/runtime-gameControls-W3YS7OS2.js.gz +0 -0
  285. package/build/runtime-hair-CWPDHNZF.js +0 -1
  286. package/build/runtime-hair-CWPDHNZF.js.br +0 -1
  287. package/build/runtime-hair-CWPDHNZF.js.gz +0 -0
  288. package/build/runtime-mergeStaticGeometries-KJFDZ7TP.js.br +0 -0
  289. package/build/runtime-mergeStaticGeometries-KJFDZ7TP.js.gz +0 -0
  290. package/build/runtime-miscActions-UGVVC2QC.js.br +0 -0
  291. package/build/runtime-miscActions-UGVVC2QC.js.gz +0 -0
  292. package/build/runtime-mouseHover-O7Y26SM5.js.br +0 -0
  293. package/build/runtime-mouseHover-O7Y26SM5.js.gz +0 -0
  294. package/build/runtime-particles-GFRULQXO.js.br +0 -0
  295. package/build/runtime-particles-GFRULQXO.js.gz +0 -0
  296. package/build/runtime-paths-Q7I56BAX.js.br +0 -0
  297. package/build/runtime-paths-Q7I56BAX.js.gz +0 -0
  298. package/build/runtime-resize-2ZFLSK2M.js.br +0 -0
  299. package/build/runtime-resize-2ZFLSK2M.js.gz +0 -0
  300. package/build/runtime-sceneTransition-Z65VROHI.js.br +0 -0
  301. package/build/runtime-sceneTransition-Z65VROHI.js.gz +0 -0
  302. package/build/runtime-scroll-NWKW6A6L.js.br +0 -0
  303. package/build/runtime-scroll-NWKW6A6L.js.gz +0 -0
  304. package/build/runtime-shapeBlends-QB7JKEHC.js +0 -1
  305. package/build/runtime-shapeBlends-QB7JKEHC.js.br +0 -5
  306. package/build/runtime-shapeBlends-QB7JKEHC.js.gz +0 -0
  307. package/build/runtime-text-VK3OGBSY.js.br +0 -0
  308. package/build/runtime-text-VK3OGBSY.js.gz +0 -0
  309. package/build/runtime-textInputs-JJQSKO3C.js.br +0 -0
  310. package/build/runtime-textInputs-JJQSKO3C.js.gz +0 -0
  311. package/build/runtime-timeline-WRAEBCRZ.js +0 -1
  312. package/build/runtime-timeline-WRAEBCRZ.js.br +0 -0
  313. package/build/runtime-timeline-WRAEBCRZ.js.gz +0 -0
  314. package/build/runtime-tracking-KYP5WOMH.js.br +0 -0
  315. package/build/runtime-tracking-KYP5WOMH.js.gz +0 -0
  316. package/build/runtime-transitions-FDRKYMVP.js.br +0 -0
  317. package/build/runtime-transitions-FDRKYMVP.js.gz +0 -0
  318. package/build/runtime-ui2d-YO6M74VQ.js.br +0 -0
  319. package/build/runtime-ui2d-YO6M74VQ.js.gz +0 -0
  320. package/build/runtime-updater-FS5YHXO4.js.br +0 -1
  321. package/build/runtime-updater-FS5YHXO4.js.gz +0 -0
  322. package/build/runtime-variables-CYDDC6HF.js.br +0 -0
  323. package/build/runtime-variables-CYDDC6HF.js.gz +0 -0
  324. package/build/runtime-vectorShapes-VMDJ36X2.js.br +0 -0
  325. package/build/runtime-vectorShapes-VMDJ36X2.js.gz +0 -0
  326. package/build/runtime-video-MTXK33PT.js.br +0 -0
  327. package/build/runtime-video-MTXK33PT.js.gz +0 -0
  328. package/build/runtime-webgpu-WDY6L7BV.js +0 -1
  329. package/build/runtime-webgpu-WDY6L7BV.js.br +0 -0
  330. package/build/runtime-webgpu-WDY6L7BV.js.gz +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splinetool/runtime",
3
- "version": "2.0.6",
3
+ "version": "2.0.8",
4
4
  "description": "Spline is a collaborative design platform for creating production-ready interactive experiences in multiple dimensions. © 2025 Spline, Inc.",
5
5
  "keywords": [
6
6
  "spline",
Binary file
Binary file
@@ -1 +0,0 @@
1
- import{b as t}from"./runtime-chunk-N2ZRGNPR.js";import{a as e,c as i}from"./runtime-chunk-VAVYZ35B.js";import{b as s,c as o,d as a,e as n}from"./runtime-chunk-FQNSP44B.js";import{a as r}from"./runtime-chunk-JQ3A6ENO.js";import{G as h,a as l}from"./runtime-chunk-SXPM42HJ.js";import{f as d,g as c}from"./runtime-chunk-NWCLOXDY.js";import{h as p}from"./runtime-chunk-4KX4KQWR.js";import{a as m,g as u,h as y,i as v}from"./runtime-chunk-2PT2WH66.js";import{a as g}from"./runtime-chunk-4KZXQGUQ.js";import{c as f}from"./runtime-chunk-TZCHGFVF.js";import{Fa as b}from"./runtime-chunk-RBM3UDQF.js";import{Bc as E,Dc as P,Ec as C,Fc as M,Oc as x,Oe as T,Pc as S,Rc as D,Xc as w,b as R,bd as j,cd as G,dd as L}from"./runtime-chunk-VGN7YHB7.js";var B=200,A=null;function W(t){A=t}function O(){return A}function I(t){let e=!1;return t.scene.objects.forEach(i=>{"Page"===i.data.type&&!e&&i.data.publish.gameControlObject&&b.traverseModuleInstances(t,i.id,(t,i,s)=>{for(let t of s)"GameControl"===t.data.type&&t.data.navmesh.enabled&&(e=!0)})}),e}function F(t){return s?t.metaKey:t.ctrlKey}function k(t,e){return Math.abs(t+3*e)<=2||Math.abs(t+3*window.devicePixelRatio*e)<=2}var V={type:"change"},z={type:"start"},H={type:"end",nonOrbit:!0},Z={type:"end",nonOrbit:!1},U={type:"end",isZoom:!0,nonOrbit:!0},Y={type:"end",changed:!1},X={type:"cameraAnimatingInTimeline"},N=new C,K=new P,_=2*Math.PI,Q=new M,q=new P,J=new M,$=new C,tt=new x,et={type:"requestRender"},it=class extends E{constructor(t,i,s={isPlayMode:!1,isExport:!1},a){super(),this.object=t,this.domElement=i,this.options=s,this.timelineState=a,this.enabled=!0,this.useKeyEvents=!0,this.enableDamping=!1,this.enableZoom=!0,this.enableRotate=!0,this.enablePan=!0,this.autoRotate=!1,this.rotationLimitsMode=0,this.panLimitsMode=0,this.rotationSoftLimit=2,this.panSoftLimit=2,this.hoverRotatePanMode=0,this.zoomLimitsEnabled=!1,this.mouseButtons=[0,5],this.mouseButtonsPlay=[3,4,5],this.touches=[null,R.DOLLY_ROTATE,R.PAN],this.offset=new M,this.eye=new M,this.lastPosition=new M,this.lastQuaternion=new C,this.current=new P,this.overShoot=new P,this.overRatio=new P,this.spherical=new T,this.sphericalDelta=new T,this.panOffset=new M,this.panLeftV=new M,this.panUpV=new M,this.panV=new M,this.rotateStart=new P,this.rotateEnd=new P,this.rotateDelta=new P,this.panStart=new P,this.panEnd=new P,this.panDelta=new P,this.dollyStart=new P,this.dollyEnd=new P,this.dollyDelta=new P,this.rotationRangeFactor=new P,this.panRangeFactor=new P,this.state=-1,this.zoomChanged=!1,this.isPointerDown=!1,this.isThetaFlipped=!1,this.prevScale=0,this.scale=1,this.gesture=!1,this.lastTrackpadPanTime=-1/0,this.lastMouseWheelZoomTime=-1/0,this.timer=-1,this.timerHover=-1,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPhi=0,this.maxPhi=Math.PI,this.minTheta=-1/0,this.maxTheta=1/0,this.minH=0,this.maxH=Math.PI,this.minV=-1/0,this.maxV=1/0,this.autoRotateClockwise=!0,this.isPanOverShoot=!1,this.isRotateOverShoot=!1,this.resetHoverEffectOnPointerLeave=!1,this.hasChange=!1,this.useWindowEvents=!1,this.isTouchZoom=!0,this.autoRotateSpeed=2,this.dampingFactor=.125,this.zoomSpeed=2,this.rotateSpeed=1,this.rotateFactor=1,this.panSpeed=1,this.hoverRotatePanStrength=.1,this.hoverRotateDamping=this.dampingFactor,this.isCurrentlyDamping=!1,this.thetaIsFree=!1,this.phiIsFree=!1,this.needsUpdate=!0,this.onCameraChange=t=>{this.object.removeEventListener("beginState",this.onBeginState),this.object.removeEventListener("completeState",this.onCompleteState),this.object.removeEventListener("cameraChange",this.onCameraChange),this.object=t.camera,this.object.addEventListener("beginState",this.onBeginState),this.object.addEventListener("completeState",this.onCompleteState),this.object.addEventListener("cameraChange",this.onCameraChange)},this.update=()=>{this.object.updateWorldMatrix(!0,!1),this.object.matrixWorld.decompose(J,$,Q),this.offset.copy(J).sub(this.target),this.spherical.setFromVector3(this.offset),this.object.isUpVectorFlipped&&(this.spherical.phi*=-1,this.spherical.theta-=Math.PI),this.autoRotate&&-1===this.state&&this.rotateLeft((!0===this.autoRotateClockwise?1:-1)*this.getAutoRotationAngle()),0!==this.rotationLimitsMode&&this.applyLimits(this.sphericalDelta,this.rotationLimitsMode,this.rotationSoftLimit,this.maxTheta,this.minTheta,this.maxPhi,this.minPhi,this.rotationRangeFactor),2!==this.rotationLimitsMode&&(this.spherical.phi+=this.sphericalDelta.phi),(1!==this.rotationLimitsMode||!0===this.autoRotate)&&(this.spherical.theta+=this.sphericalDelta.theta),this.spherical.radius*=this.scale,this.zoomLimitsEnabled&&this.object.isPerspectiveCamera&&(this.spherical.radius=Math.max(this.minDistance,Math.min(this.maxDistance,this.spherical.radius))),0!==this.panLimitsMode&&(this.target.applyQuaternion(N.copy($).invert()),this.panOffset.applyQuaternion(N),this.applyLimits(this.panOffset,this.panLimitsMode,this.panSoftLimit,this.maxH,this.minH,this.maxV,this.minV,this.panRangeFactor),this.target.applyQuaternion($),this.panOffset.applyQuaternion($)),2===this.panLimitsMode&&(this.panOffset.y=0),1===this.panLimitsMode&&(this.panOffset.x=0),-1!==this.state||this.gesture?(this.target.add(this.panOffset),this.panOffset.set(0,0,0)):(this.panOffset.multiplyScalar(1-this.dampingFactor),this.target.add(this.panOffset)),this.offset.setFromSpherical(this.spherical),J.copy(this.target).add(this.offset),this.object.position.copy(this.target).add(this.offset),this.object.parent&&(tt.copy(this.object.parent.matrixWorld).invert(),this.object.position.applyMatrix4(tt));let t=this.spherical.phi%_;if(this.eye.copy(this.offset).normalize(),this.object.up.copy(D.DEFAULT_UP).applyAxisAngle(this.eye,this.object.angleOffsetFromUp),t>0&&t>Math.PI||t<0&&t>-Math.PI?(this.object.up.negate(),this.object.lookAt(this.target),this.object.isUpVectorFlipped=!0):(this.object.lookAt(this.target),this.object.isUpVectorFlipped=!1),-1===this.state||!0===this.enableDamping){let t=1===this.hoverRotatePanMode?this.hoverRotateDamping:this.dampingFactor;this.sphericalDelta.theta*=1-t,this.sphericalDelta.phi*=1-t}else this.sphericalDelta.set(0,0,0);if(this.scale=1,this.lastPosition.distanceToSquared(this.object.position)>.01||8*(1-this.lastQuaternion.dot(this.object.quaternion))>1e-8)return this.dispatchEvent(V),this.object.dispatchEvent(et),this.lastPosition.copy(this.object.position),this.lastQuaternion.copy(this.object.quaternion),void(this.isCurrentlyDamping=!0);this.isPanOverShoot=!1,this.isRotateOverShoot=!1,this.object.wasMovedBySwitchCameraAction=!1,this.sphericalDelta.set(0,0,0),this.panOffset.set(0,0,0),this.isCurrentlyDamping=!1},this.onPointerDown=t=>{!1!==this.enabled&&("touch"===t.pointerType||"pen"===t.pointerType&&n?this.onPointerDownTouch(t):this.onPointerDownMouse(t),-1!==this.state&&(this.isPointerDown=!0,this.dispatchEvent(z),this.domElement.addEventListener("pointermove",this.onPointerMove),this.domElement.addEventListener("pointerup",this.onPointerUp),t.stopPropagation(),"touch"===t.pointerType||"pen"===t.pointerType&&n||this.domElement.setPointerCapture(t.pointerId)))},this.onPointerLeave=t=>{this.resetHoverEffectOnPointerLeave&&!this.useWindowEvents?(1===this.hoverRotatePanMode?(this.sphericalDelta.theta=-this.spherical.theta,this.sphericalDelta.phi=-this.spherical.phi,Q.subVectors(this.position0,this.target0),this.spherical.setFromVector3(Q),this.sphericalDelta.theta+=this.spherical.theta,this.sphericalDelta.phi+=this.spherical.phi,this.sphericalDelta.theta/=8,this.sphericalDelta.phi/=8):2===this.hoverRotatePanMode&&this.panOffset.subVectors(this.target0,this.target).divideScalar(8),this.update()):this.pointerLeaveEvent=t},this.onPointerEnter=t=>{this.resetHoverEffectOnPointerLeave||void 0===this.pointerLeaveEvent?q.set(t.clientX-this.domElement.clientWidth/2,t.clientY-this.domElement.clientHeight/2):q.set(t.clientX-this.pointerLeaveEvent.clientX,t.clientY-this.pointerLeaveEvent.clientY),1===this.hoverRotatePanMode?(this.rotateDelta.copy(q).multiplyScalar(this.rotateSpeed*this.hoverRotatePanStrength).rotateAround(K,-this.object.angleOffsetFromUp),this.rotateLeft(2*Math.PI*this.rotateDelta.x/this.domElement.clientHeight),this.rotateUp(2*Math.PI*this.rotateDelta.y/this.domElement.clientHeight),this.rotateStart.set(t.clientX,t.clientY)):2===this.hoverRotatePanMode&&(this.panDelta.copy(q).multiplyScalar(this.panSpeed*this.hoverRotatePanStrength),this.pan(this.panDelta.x,this.panDelta.y),this.panStart.set(t.clientX,t.clientY)),this.update()},this.onPointerMove=t=>{this.timelineState?.isPlayingCameraAnimation?this.dispatchEvent(X):!1!==this.enabled&&(this.checkRaycastLock()||("touch"===t.pointerType||"pen"===t.pointerType&&n?this.onPointerMoveTouch(t):this.onPointerMoveMouse(t),t.stopPropagation()))},this.onPointerUp=t=>{this.isPointerDown=!1,0===e.length&&(this.domElement.removeEventListener("pointermove",this.onPointerMove),this.domElement.removeEventListener("pointerup",this.onPointerUp)),e.length>1&&t.preventDefault(),this.hasChange?this.dispatchEvent(0===this.state?Z:H):this.dispatchEvent(Y),this.state=-1,t&&(t.stopPropagation(),"touch"===t.pointerType||"pen"===t.pointerType&&n||this.domElement.releasePointerCapture(t.pointerId))},this.onPointerDownMouse=t=>{let e;switch(e=this.useKeyEvents?this.mouseButtons[t.button]:this.mouseButtonsPlay[t.button],e){case 0:if(!0!==t.altKey||t.shiftKey||F(t)){if(" "===this.key){if(!1===this.enablePan)return;this.handleMouseDownPan(t),this.state=2}}else{if(!1===this.enableRotate)return;this.handleMouseDownRotate(t),this.state=0}break;case 4:if(!1===this.enablePan)return;this.handleMouseDownPan(t),this.state=2;break;case 3:if(F(t)||t.shiftKey){if(!1===this.enablePan)return;this.handleMouseDownPan(t),this.state=2}else{if(!1===this.enableRotate)return;this.handleMouseDownRotate(t),this.state=0}break;case 5:if(F(t)||t.shiftKey){if(!1===this.enableRotate)return;this.handleMouseDownRotate(t),this.state=0}else{if(!1===this.enablePan)return;this.handleMouseDownPan(t),this.state=2}break;default:this.state=-1}},this.onPointerMoveMouse=t=>{switch(this.state){case 0:if(!1===this.enableRotate)return;this.handleMouseMoveRotate(t);break;case 1:if(!1===this.enableZoom)return;this.handleMouseMoveDolly(t);break;case 2:if(!1===this.enablePan)return;this.handleMouseMovePan(t)}this.object.wasMovedByUser=!0},this.onPointerDownTouch=t=>{switch(e.length>1&&t.preventDefault(),this.touches[e.length-1]){case R.ROTATE:if(!1===this.enableRotate)return void(this.state=-1);this.handleTouchStartRotate(),this.state=3;break;case R.PAN:if(!1===this.enablePan)return void(this.state=-1);this.handleTouchStartPan(),this.state=4;break;case R.DOLLY_PAN:if(!1===this.enableZoom&&!1===this.enablePan)return;this.handleTouchStartDollyPan(),this.state=5;break;case R.DOLLY_ROTATE:if(!1===this.enableZoom&&!1===this.enableRotate)return;this.handleTouchStartDollyRotate(),this.state=6;break;default:this.state=-1}},this.onPointerMoveTouch=t=>{switch(e.length>1&&t.preventDefault(),this.state){case 3:if(!1===this.enableRotate)return;this.handleTouchMoveRotate(t),this.update();break;case 4:if(!1===this.enablePan)return;this.handleTouchMovePan(t),this.update();break;case 5:if(!1===this.enableZoom&&!1===this.enablePan)return;this.handleTouchMoveDollyPan(t),this.update();break;case 6:if(!1===this.enableZoom&&!1===this.enableRotate)return;this.handleTouchMoveDollyRotate(t),this.update();break;default:this.state=-1}this.object.wasMovedByUser=!0},this.dispatchEndDebounced=g(()=>{this.zoomChanged?this.dispatchEvent(U):this.dispatchEvent(H),this.zoomChanged=!1},33),this.onMouseWheel=t=>{if(!1!==this.enabled&&(!1!==this.enableZoom||!1!==this.enablePan)&&!this.checkRaycastLock()){if(!this.options.isExport&&this.domElement.clientHeight===document.body.clientHeight&&this.domElement.clientWidth===document.body.clientWidth&&t.preventDefault(),this.dispatchEvent(z),this.timelineState?.isPlayingCameraAnimation)return void this.dispatchEvent(X);this.handleMouseWheel(t),this.dispatchEndDebounced(),this.object.wasMovedByUser=!0}},this.onGesture=t=>{if(t.preventDefault(),!1!==this.enabled&&!this.checkRaycastLock()&&!o){if(this.timelineState?.isPlayingCameraAnimation)return void this.dispatchEvent(X);if("gesturechange"===t.type){if(!1===this.enableZoom||!1===this.isTouchZoom)return;this.dispatchEvent(z),t.scale>this.prevScale?this.dollyIn(this.getZoomScale()):t.scale<this.prevScale&&this.dollyOut(this.getZoomScale()),this.prevScale=t.scale,this.update(),this.object.wasMovedByUser=!0}else this.dispatchEvent(H)}},this.onContextMenu=t=>{t.preventDefault()},this.onTouchEnd=t=>{t.preventDefault()},this.onKeyDown=t=>{!1!==this.enabled&&(this.key=t.key," "===t.key&&this.dispatchEvent(z))},this.onKeyUp=t=>{this.key=void 0,!1!==this.enabled&&(-1!==this.state&&"Alt"===t.key&&this.onPointerUp(e[0])," "===t.key&&this.dispatchEvent(H))},this.onPointerHover=t=>{"mouse"!==t.pointerType||!1===this.enabled||-1!==this.state||2===this.hoverRotatePanMode&&this.isPanOverShoot||1===this.hoverRotatePanMode&&this.isRotateOverShoot||(this.isPointerDown=!0,2===this.hoverRotatePanMode?this.handleMouseMovePan(t,this.hoverRotatePanStrength):1===this.hoverRotatePanMode&&this.handleMouseMoveRotate(t,this.hoverRotatePanStrength))},this.onBeginState=()=>{this.enabled=!1,this.needsUpdate=!1},this.onCompleteState=t=>{t.isfromEntity&&this.options.isPlayMode||(this.enabled=!0,this.needsUpdate=!0,this.object.updateUp(),this.object.getTarget(this.target))},this.target=this.object.getTarget(),this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.quat0=this.object.quaternion.clone(),this.isUpVectorFlipped0=this.object.isUpVectorFlipped,this.object.updateWorldMatrix(!0,!1),this.object.matrixWorld.decompose(J,$,Q),this.offset.copy(J).sub(this.target),this.spherical.setFromVector3(this.offset),this.object.isUpVectorFlipped&&(this.spherical.phi*=-1,this.spherical.theta-=Math.PI),this.initialSphericalRadius=this.spherical.radius,this.addEventListenersToCamera()}dispatchEvent(t){"start"===t.type?this.hasChange=!1:this.hasChange=!0,super.dispatchEvent(t)}addEventListenersToCamera(){this.object.addEventListener("beginState",this.onBeginState),this.object.addEventListener("completeState",this.onCompleteState),this.object.addEventListener("cameraChange",this.onCameraChange)}removeEventListenersFromCamera(){this.object.removeEventListener("beginState",this.onBeginState),this.object.removeEventListener("completeState",this.onCompleteState),this.object.removeEventListener("cameraChange",this.onCameraChange)}updateUseWindowEvents(t){if(window.removeEventListener("pointermove",this.onPointerHover),this.domElement.removeEventListener("pointermove",this.onPointerHover),this.useWindowEvents=t,0!==this.hoverRotatePanMode&&(this.useWindowEvents?window.addEventListener("pointermove",this.onPointerHover):this.domElement.addEventListener("pointermove",this.onPointerHover)),this.domElement.removeEventListener("pointerleave",this.onPointerLeave),this.domElement.removeEventListener("pointerenter",this.onPointerEnter),window.removeEventListener("pointerleave",this.onPointerLeave),window.removeEventListener("pointerenter",this.onPointerEnter),0!==this.hoverRotatePanMode&&!this.useWindowEvents){let t=this.useWindowEvents?window:this.domElement;t.addEventListener("pointerleave",this.onPointerLeave),t.addEventListener("pointerenter",this.onPointerEnter)}}fromJSON(t,e){this.rotateFactor=t.rotationSpeed??1,this.setEnableDampingSpeed(t.enableDamping),this.enablePan=t.enablePan,this.enableZoom=t.enableZoom,this.enableRotate=t.enableRotate,this.rotationLimitsMode=t.rotationLimitsMode,this.thetaIsFree=t.rotationHorizontalOffset.min===t.rotationHorizontalOffset.max&&t.rotationHorizontalOffset.min===Math.PI,this.phiIsFree=t.rotationVerticalOffset.min===t.rotationVerticalOffset.max&&t.rotationVerticalOffset.min===Math.PI,this.panLimitsMode=t.panLimitsMode,this.panSoftLimit=t.panSoftLimit,this.rotationSoftLimit=t.rotationSoftLimit,this.hoverRotatePanMode=t.hoverRotatePanMode,this.hoverRotateDamping=t.hoverRotateDamping??this.dampingFactor,this.useWindowEvents="window"===e,0!==this.hoverRotatePanMode&&(this.useWindowEvents?window.addEventListener("pointermove",this.onPointerHover):this.domElement.addEventListener("pointermove",this.onPointerHover));let i=t.hoverRotatePanStrength/100;this.hoverRotatePanStrength=i**2,this.zoomLimitsEnabled=t.zoomLimitsEnabled,this.minZoom=t.zoomLimits.min,this.maxZoom=Math.max(t.zoomLimits.min,t.zoomLimits.max),this.minDistance=1e3/this.maxZoom,this.maxDistance=Math.max(this.minDistance,1e3/t.zoomLimits.min),this.autoRotate=t.autoRotate,this.autoRotateSpeed=t.autoRotateSpeed,this.autoRotateClockwise=t.autoRotateClockwise;let s=this.object.getTarget().applyQuaternion(N.copy(this.object.quaternion).invert());this.minV=-t.panVerticalOffset.min+s.y,this.maxV=t.panVerticalOffset.max+s.y,this.minH=-t.panHorizontalOffset.min+s.x,this.maxH=t.panHorizontalOffset.max+s.x,this.panRangeFactor.set(this.maxH-this.minH,this.maxV-this.minV).divideScalar(2),this.rotationRangeFactor.setScalar(Math.PI).divideScalar(4),this.minPhi=st(this.spherical.phi-t.rotationVerticalOffset.min),this.maxPhi=st(this.spherical.phi+t.rotationVerticalOffset.max),this.minTheta=st(st(this.spherical.theta)-t.rotationHorizontalOffset.min),this.maxTheta=st(st(this.spherical.theta)+t.rotationHorizontalOffset.max),this.isThetaFlipped=this.minTheta>this.maxTheta,1===t.orbitTouches&&(this.touches[0]=R.ROTATE),1===t.panTouches&&(this.touches[0]=R.PAN),2===t.orbitTouches&&(this.touches[1]=R.DOLLY_ROTATE),2===t.panTouches&&(this.touches[1]=R.DOLLY_PAN),3===t.orbitTouches&&(this.touches[2]=R.ROTATE),3===t.panTouches&&(this.touches[2]=R.PAN),this.isTouchZoom=t.isTouchZoom,this.resetHoverEffectOnPointerLeave=t.resetHoverEffectOnPointerLeave??!1}connect(){if(this.domElement.addEventListener("contextmenu",this.onContextMenu),this.domElement.addEventListener("pointerdown",this.onPointerDown),this.domElement.addEventListener("wheel",this.onMouseWheel),window.addEventListener("keydown",this.onKeyDown,!1),window.addEventListener("keyup",this.onKeyUp,!1),this.domElement.addEventListener("gesturestart",this.onGesture),this.domElement.addEventListener("gesturechange",this.onGesture),this.domElement.addEventListener("gestureend",this.onGesture),this.domElement.addEventListener("touchend",this.onTouchEnd),0!==this.hoverRotatePanMode&&!this.useWindowEvents){let t=this.useWindowEvents?window:this.domElement;t.addEventListener("pointerleave",this.onPointerLeave),t.addEventListener("pointerenter",this.onPointerEnter)}this.pointerLeaveEvent=void 0}dispose(){this.removeEventListenersFromCamera(),this.domElement.removeEventListener("contextmenu",this.onContextMenu),this.domElement.removeEventListener("pointerdown",this.onPointerDown),this.domElement.removeEventListener("wheel",this.onMouseWheel),window.removeEventListener("keydown",this.onKeyDown,!1),window.removeEventListener("keyup",this.onKeyUp,!1),this.domElement.removeEventListener("pointermove",this.onPointerHover),window.removeEventListener("pointermove",this.onPointerHover),this.domElement.removeEventListener("gesturestart",this.onGesture),this.domElement.removeEventListener("gesturechange",this.onGesture),this.domElement.removeEventListener("gestureend",this.onGesture),this.domElement.removeEventListener("touchend",this.onTouchEnd),this.domElement.removeEventListener("pointerleave",this.onPointerLeave),this.domElement.removeEventListener("pointerenter",this.onPointerEnter),window.removeEventListener("pointerleave",this.onPointerLeave),window.removeEventListener("pointerenter",this.onPointerEnter),this.domElement.removeEventListener("pointermove",this.onPointerMove),this.domElement.removeEventListener("pointerup",this.onPointerUp)}applyLimits(t,e,i,s,o,a,n,r){let h,l,d;this.overShoot.set(0,0),t instanceof M?(h=t.x,l=t.y,this.current.set(this.target.x,this.target.y),d=!0):(h=t.theta,l=t.phi,this.current.set(st(this.spherical.theta),st(this.spherical.phi)),d=!1),0===i&&(this.current.x+=h,this.current.y+=l),(3===e||2===e)&&(!d&&this.isThetaFlipped?this.current.x>s&&this.current.x<0?this.overShoot.x=s-this.current.x:this.current.x<o&&this.current.x>0&&(this.overShoot.x=o-this.current.x):this.current.x>s?this.overShoot.x=s-this.current.x:this.current.x<o&&(this.overShoot.x=o-this.current.x)),(3===e||1===e)&&(this.current.y>a?this.overShoot.y=a-this.current.y:this.current.y<n&&(this.overShoot.y=n-this.current.y)),d||(this.overShoot.x=st(this.overShoot.x),this.overShoot.y=st(this.overShoot.y)),0!==i?(this.overRatio.copy(this.overShoot).divide(r),this.overRatio.x=Math.min(Math.abs(this.overRatio.x),1),this.overRatio.y=Math.min(Math.abs(this.overRatio.y),1),1===i&&(this.overRatio.x=ot(Math.abs(this.overRatio.x)),this.overRatio.y=ot(Math.abs(this.overRatio.y))),this.isPointerDown||1===i?2===i&&(this.overRatio.x>.9&&!this.thetaIsFree||this.overRatio.y>.9&&!this.phiIsFree)?this.isPointerDown=!1:(h*this.overShoot.x<0&&!this.thetaIsFree&&(h*=1-this.overRatio.x),l*this.overShoot.y<0&&!this.phiIsFree&&(l*=1-this.overRatio.y)):2===i&&(!d&&(this.overRatio.x>.002&&!this.thetaIsFree||this.overRatio.y>.002&&!this.phiIsFree)||d&&(Math.abs(this.overShoot.x)>2||Math.abs(this.overShoot.y)>2)?(this.thetaIsFree||(h=.05*this.overShoot.x),this.phiIsFree||(l=.05*this.overShoot.y),d?this.isPanOverShoot=!0:this.isRotateOverShoot=!0):d?this.isPanOverShoot=!1:this.isRotateOverShoot=!1)):(h+=this.overShoot.x,l+=this.overShoot.y),t instanceof M?(t.x=h,t.y=l):(this.thetaIsFree||(t.theta=h),this.phiIsFree||(t.phi=l))}setEnableDampingSpeed(t){this.enableDamping=t,this.rotateSpeed=(!0===t?.2:1)*this.rotateFactor}stopDamping(){this.sphericalDelta.theta=0,this.sphericalDelta.phi=0,this.panOffset.set(0,0,0)}setTarget(t,e,i){this.stopDamping(),this.target.set(t,e,i)}getAutoRotationAngle(){return 2*Math.PI/60/60*this.autoRotateSpeed}getZoomScale(){return Math.pow(.95,this.zoomSpeed)}rotateLeft(t){this.sphericalDelta.theta-=t}rotateUp(t){this.sphericalDelta.phi-=t}panLeft(t,e){this.panLeftV.setFromMatrixColumn(e,0),this.panLeftV.multiplyScalar(-t),this.panOffset.add(this.panLeftV)}panUp(t,e){this.panUpV.setFromMatrixColumn(e,1),this.panUpV.multiplyScalar(t),this.panOffset.add(this.panUpV)}pan(t,e){let i=this.domElement;if(i&&this.object.isPerspectiveCamera){let s=this.object.position;this.panV.copy(s).sub(this.target);let o=this.panV.length();o*=Math.tan(this.object.fov/2*Math.PI/180),this.panLeft(2*t*o/i.clientHeight,this.object.matrixWorld),this.panUp(2*e*o/i.clientHeight,this.object.matrixWorld)}else i&&this.object.isOrthographicCamera&&(this.panLeft(t*(this.object.right-this.object.left)/this.object.zoom/i.clientWidth,this.object.matrixWorld),this.panUp(e*(this.object.top-this.object.bottom)/this.object.zoom/i.clientHeight,this.object.matrixWorld));this.dispatchEvent(V)}dollyOut(t){this.object.isPerspectiveCamera?this.scale/=t:this.object.isOrthographicCamera&&(this.object.zoom*=t,this.zoomLimitsEnabled&&(this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom))),this.object.updateProjectionMatrix(),this.zoomChanged=!0),this.dispatchEvent(V)}dollyIn(t){this.object.isPerspectiveCamera?this.scale*=t:this.object.isOrthographicCamera&&(this.object.zoom/=t,this.zoomLimitsEnabled&&(this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom))),this.object.updateProjectionMatrix(),this.zoomChanged=!0),this.dispatchEvent(V)}setZoom(t){if(this.dispatchEvent(z),this.object.isPerspectiveCamera){let e=this.initialSphericalRadius/t/this.spherical.radius;this.scale=e}else this.object.isOrthographicCamera&&(this.object.zoom=t,this.zoomLimitsEnabled&&(this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom))),this.object.updateProjectionMatrix(),this.zoomChanged=!0);this.dispatchEvent(H)}handleMouseDownRotate(t){this.rotateStart.set(t.clientX,t.clientY)}handleMouseDownDolly(t){this.dollyStart.set(t.clientX,t.clientY)}handleMouseDownPan(t){this.panStart.set(t.clientX,t.clientY)}handleMouseMoveRotate(t,e=1){void 0!==t.movementX?this.rotateDelta.set(t.movementX,t.movementY):(this.rotateEnd.set(t.clientX,t.clientY),this.rotateDelta.subVectors(this.rotateEnd,this.rotateStart),this.rotateStart.copy(this.rotateEnd)),this.rotateDelta.multiplyScalar(this.rotateSpeed*e).rotateAround(K,-this.object.angleOffsetFromUp);let i=this.domElement,s=this.useWindowEvents?window.innerHeight:i.clientHeight,o=2*Math.PI*this.rotateDelta.x/s,a=2*Math.PI*this.rotateDelta.y/s;this.rotateLeft(o),this.rotateUp(a),this.update()}handleMouseMoveDolly(t){this.dollyEnd.set(t.clientX,t.clientY),this.dollyDelta.subVectors(this.dollyEnd,this.dollyStart),this.dollyDelta.y>0?this.dollyOut(this.getZoomScale()):this.dollyDelta.y<0&&this.dollyIn(this.getZoomScale()),this.dollyStart.copy(this.dollyEnd),this.update()}handleMouseMovePan(t,e=1){void 0!==t.movementX?this.panDelta.set(t.movementX,t.movementY):(this.panEnd.set(t.clientX,t.clientY),this.panDelta.subVectors(this.panEnd,this.panStart),this.panStart.copy(this.panEnd)),this.panDelta.multiplyScalar(this.panSpeed*e),this.pan(this.panDelta.x,this.panDelta.y),this.update()}handleMouseWheel(t){if(0===t.deltaX&&0===t.deltaY)return;let e=!0===t.ctrlKey||!0===F(t),i=!1===F(t)&&!0===(0===(r=t).wheelDeltaY||0===r.deltaY?!(s&&r.shiftKey&&Math.abs(r.wheelDeltaX)>=120)&&(r.wheelDeltaX?k(r.wheelDeltaX,r.deltaX):0===r.deltaMode):r.wheelDeltaY?k(r.wheelDeltaY,r.deltaY):0===r.deltaMode),o=!1===e&&(!0===this.gesture||t.timeStamp-this.lastTrackpadPanTime<300),n=!1===e&&!1===o&&t.timeStamp-this.lastMouseWheelZoomTime<300;var r;if(!1!==a||!1!==n||!0!==i&&!0!==o){if(!1===this.enableZoom)return;this.gesture&&(window.clearTimeout(this.timer),this.gesture=!1,this.isPointerDown=!1,this.dispatchEvent(H)),!1===e&&!1===i&&(this.lastMouseWheelZoomTime=t.timeStamp),0===t.deltaY?t.deltaX<0?this.dollyIn(this.getZoomScale()):t.deltaX>0&&this.dollyOut(this.getZoomScale()):t.deltaY<0?this.dollyIn(this.getZoomScale()):t.deltaY>0&&this.dollyOut(this.getZoomScale()),this.update(),this.gesture=!1,this.isPointerDown=!1}else{if(!1===this.enablePan)return;let e=!1===this.gesture&&!1===o;this.lastTrackpadPanTime=t.timeStamp,this.gesture||(this.gesture=!0,this.isPointerDown=!0),!1===e&&(this.panDelta.set(-t.deltaX,-t.deltaY).multiplyScalar(this.panSpeed),this.panDelta.x=Math.min(Math.abs(this.panDelta.x),100)*(this.panDelta.x<0?-1:1),this.panDelta.y=Math.min(Math.abs(this.panDelta.y),100)*(this.panDelta.y<0?-1:1),t.altKey?this.pan(0,this.panDelta.y):t.shiftKey?this.pan(this.panDelta.x,0):this.pan(this.panDelta.x,this.panDelta.y),this.update()),window.clearTimeout(this.timer),this.timer=window.setTimeout(()=>{this.gesture=!1,this.isPointerDown=!1,this.dispatchEvent(H)},100)}}handleTouchStartRotate(){if(2===e.length){let t=.5*(e[0].pageX+e[1].pageX),i=.5*(e[0].pageY+e[1].pageY);this.rotateStart.set(t,i)}else this.rotateStart.set(e[0].pageX,e[0].pageY)}handleTouchStartPan(){if(2===e.length){let t=.5*(e[0].pageX+e[1].pageX),i=.5*(e[0].pageY+e[1].pageY);this.panStart.set(t,i)}else this.panStart.set(e[0].pageX,e[0].pageY)}handleTouchStartDolly(){let t=e[0].pageX-e[1].pageX,i=e[0].pageY-e[1].pageY,s=Math.sqrt(t*t+i*i);this.dollyStart.set(0,s)}handleTouchStartDollyPan(){this.enableZoom&&!0===this.isTouchZoom&&this.handleTouchStartDolly(),this.enablePan&&this.handleTouchStartPan()}handleTouchStartDollyRotate(){this.enableZoom&&!0===this.isTouchZoom&&this.handleTouchStartDolly(),this.enableRotate&&this.handleTouchStartRotate()}handleTouchMoveRotate(t){if(2===e.length){let e=i(t),s=.5*(t.pageX+e.x),o=.5*(t.pageY+e.y);this.rotateEnd.set(s,o)}else{if(t.pointerId!==e[0].pointerId)return;this.rotateEnd.set(t.pageX,t.pageY)}this.rotateDelta.subVectors(this.rotateEnd,this.rotateStart).multiplyScalar(this.rotateSpeed);let s=this.domElement;s&&(this.rotateLeft(2*Math.PI*this.rotateDelta.x/s.clientHeight),this.rotateUp(2*Math.PI*this.rotateDelta.y/s.clientHeight)),this.rotateStart.copy(this.rotateEnd)}handleTouchMovePan(t){if(2===e.length){let e=i(t),s=.5*(t.pageX+e.x),o=.5*(t.pageY+e.y);this.panEnd.set(s,o)}else{if(t.pointerId!==e[0].pointerId)return;this.panEnd.set(t.pageX,t.pageY)}this.panDelta.subVectors(this.panEnd,this.panStart).multiplyScalar(this.panSpeed),this.pan(this.panDelta.x,this.panDelta.y),this.panStart.copy(this.panEnd)}handleTouchMoveDolly(t){let e=i(t),s=t.pageX-e.x,o=t.pageY-e.y,a=Math.sqrt(s*s+o*o);this.dollyEnd.set(0,a),this.dollyDelta.set(0,Math.pow(this.dollyEnd.y/this.dollyStart.y,this.zoomSpeed)),this.dollyOut(this.dollyDelta.y),this.dollyStart.copy(this.dollyEnd)}handleTouchMoveDollyPan(t){this.enableZoom&&!0===this.isTouchZoom&&this.handleTouchMoveDolly(t),this.enablePan&&this.handleTouchMovePan(t)}handleTouchMoveDollyRotate(t){this.enableZoom&&!0===this.isTouchZoom&&this.handleTouchMoveDolly(t),this.enableRotate&&this.handleTouchMoveRotate(t)}checkRaycastLock(){if(this.object.data.raycastLock){if(this.options.isPlayMode)return!1;{let t=this.options?.showCameraLock;return t&&t(),!0}}return!1}};function st(t){let e=2*Math.PI;for(;t<=-Math.PI;)t+=e;for(;t>Math.PI;)t-=e;return t}function ot(t){return 1-Math.pow(1-t,4)}var at,nt,rt=new Promise(t=>{at=t});function ht(t){return nt||(nt=async function(){let e=t??"https://cdn.spline.design/@splinetool/runtime@2.0.6/build",i=import("./physics.js"),[s,o]=await Promise.all([i,fetch(`${e}/physics.wasm`).then(t=>t.arrayBuffer())]);await s.init(o),at(s)}())}function lt(t){let e=t.elements,i=e[0]**2+e[1]**2+e[2]**2,s=e[4]**2+e[5]**2+e[6]**2,o=e[8]**2+e[9]**2+e[10]**2,a=e[0]**2+e[4]**2+e[8]**2,n=e[1]**2+e[5]**2+e[9]**2,r=e[2]**2+e[6]**2+e[10]**2,h=1e-8;return i<h||s<h||o<h||a<h||n<h||r<h}function dt(t,e){let i=new L;if(e&&lt(e))return i.setAttribute("position",new j([],3)),i.setIndex([]),i;if(!t.getAttribute("position"))return i.setAttribute("position",new j([],3)),i.setIndex([]),i;let{positions:s,triIndices:o}=h(t.getAttribute("position"),t.getIndex());return i.setAttribute("position",new j(s,3)),i.setIndex(o),e&&i.applyMatrix4(e),i}var ct,pt=class{constructor(t,e,i,s,o,a){this.id=t,this.data=e,this.object=i,this.initialDisabled=!1,this.actions=d(e,e.actions,s,o,a,i),this.target=e.target}disconnect(){c(this.actions)}dispatch(t){this.initialDisabled||(this.actions.Transition.forEach(t=>{t.object.currentTransitionEvent!==this&&(t.object.currentTransitionEvent=this,t.init())}),this.object.dispatchEvent({type:"beginEvent",eventName:"Collision"}),this.actions.Transition.forEach(t=>{"Toggle"===t.data.runMode?t.toggle():t.play()}),this.actions.Animation.forEach(t=>{"Toggle"===t.data.runMode?t.toggle():t.play()}),this.actions.TimelineAnimation.forEach(t=>{"runMode"in t.data&&"Toggle"===t.data.runMode?t.toggle():t.play()}),this.actions.Reset.forEach(t=>{t.dispatch()}),this.actions.Link.forEach(t=>{t.dispatch()}),this.actions.Reset.forEach(t=>{t.dispatch()}),this.actions.Create.forEach(t=>{t.dispatch()}),this.actions.Destroy.forEach(e=>{e.dispatch(t??!1)}),this.actions.SetVariable.forEach(t=>t.checkConditions()),this.actions.SetVariable.forEach(t=>t.dispatch()),this.actions.DynamicVariablePlay.forEach(t=>t.dispatch()),this.actions.Audio.forEach(t=>{t.dispatchBasic()}),this.actions.Particles.forEach(t=>{t.dispatchBasic()}),this.actions.Video.forEach(t=>{t.dispatchBasic()}),this.actions.ClearLocalStorage.forEach(t=>t.dispatch()),this.actions.UserAPI.forEach(t=>t.dispatch()))}},mt=class{constructor(t,e,i,s,o,a){this.id=t,this.data=e,this.object=i,this.page=s,this.currentIntersectedObjects=[],this.actions=d(e,e.actions,s,o,a,i),this.target=e.target,this.triggeringObjects=[];for(let t of e.triggeringObjects){let e=s.scene.find(t);e&&this.triggeringObjects.push(e)}}isValidTriggeringObject(t){return"all"===this.target||this.triggeringObjects.some(e=>e===t||e.isAncestorOf(t.uuid)||t.isAncestorOf(e.uuid))}disconnect(){c(this.actions)}dispatch(){this.object.destroyedInAction||(this.actions.Transition.forEach(t=>{t.object.currentTransitionEvent!==this&&(t.object.currentTransitionEvent=this,t.init())}),this.object.dispatchEvent({type:"beginEvent",eventName:"Trigger"}),this.actions.Transition.forEach(t=>{"Toggle"===t.data.runMode?t.toggle():t.play()}),this.actions.SwitchCamera.forEach(t=>{"Toggle"===t.data.runMode?t.toggle():t.play()}),this.actions.TimelineAnimation.forEach(t=>{"runMode"in t.data&&"Toggle"===t.data.runMode?t.toggle():t.play()}),this.actions.Link.forEach(t=>{t.dispatch()}),this.actions.Reset.forEach(t=>{t.dispatch()}),this.actions.Create.forEach(t=>{t.dispatch()}),this.actions.Destroy.forEach(t=>{t.dispatch(!1)}),this.actions.Audio.forEach(t=>{t.dispatchBasic()}),this.actions.Particles.forEach(t=>{t.dispatchBasic()}),this.actions.Video.forEach(t=>{t.dispatchBasic()}),this.actions.SceneTransition.forEach(t=>{t.dispatch()}),this.actions.SetVariable.forEach(t=>t.checkConditions()),this.actions.SetVariable.forEach(t=>t.dispatch()),this.actions.DynamicVariablePlay.forEach(t=>t.dispatch()),this.actions.ClearLocalStorage.forEach(t=>t.dispatch()),this.actions.UserAPI.forEach(t=>t.dispatch()))}};rt.then(t=>ct=t);var ut=new M,yt=new C,vt=new M,gt=(new S(0,0,0,"YXZ"),new S(0,0,0,"XYZ")),ft=new M,bt=new M,Et=new M(1,1,1),Pt=new C,Ct=new x,Mt=new x,xt={type:"updateMatrix"},Tt=new C,St=new G,Dt=.01,wt={type:"beginEvent",eventName:"Collision"},Rt={type:"beginEvent",eventName:"Trigger"};function jt(t){if(b.physicsEnabled(t.scene.objects))return!0;let e=!1;return t.scene.objects.traverse((t,i)=>{if(i.events)if(Array.isArray(i.events)){for(let t of i.events)if(!0!==t.data.disabled&&"GameControl"===t.data.type&&t.data.collisionEnabled){e=!0;break}}else for(let t of Object.values(i.events))if(!0!==t.disabled&&"GameControl"===t.type&&t.collisionEnabled){e=!0;break}}),e}var Gt=t=>t.states.some(t=>void 0!==t.data.position||void 0!==t.data.rotation||void 0!==t.data.hiddenMatrix||void 0!==t.data.cloner||void 0!==t.data.pathSnapping);function Lt(t){return u(v(t)?t.object:t)}var Bt,At,Wt,Ot=class{constructor(t){this.eventContext=t,this.isEnabled=!1,this.gameControl=null,this.joysticks=[],this.joystickToGameControls=[],this.sharedGameControlGlobals={entitiesWithTransformAnim:[],entityToCollisionEvents:{},colliderToEntity:new Map,kinematicBodyToEntity:new Map,triggers:[],gamePads:[],createdObjects:[],nCreatedPerAction:{}},this.sensorToTriggerEvent={},this.eventManager=void 0,this.needsCollisionDetection=!1,this.initializationCounter=-1,this.fixedBodiesToWatch=[],this.rigidBodyToMesh=new Map,this.nActiveRigidBodies=0,this.collisionEvents=[],this.isExport=!1,this.skipRender=!0,this._staticBVHAttrIds=new WeakMap,this._staticBVHNextAttrId=1,this.processRigidBody=t=>{if(t.bodyType()!==ct.RigidBodyType.Dynamic)return;t.isSleeping()||this.nActiveRigidBodies++;let[e,i,s]=this.rigidBodyToMesh.get(t.handle);if(ut.copy(t.translation()).multiplyScalar(this.pixelsPerMeter),yt.copy(t.rotation()),e.matrixWorld.compose(ut,yt,i),e.hasNonUniformScale&&e.matrixWorld.multiply(e.shearScale),e.dispatchEvent(xt),s){let t=e.cloner;if(t&&void 0===t.objectForSample){t.matrixWorld.copy(e.matrixWorld);for(let e of t.children)e.updateMatrixWorld(!0)}for(let t of e.children)t.updateMatrixWorld(!0)}},this.accumulator=0,this.handleCollisionEvents=(t,e,i)=>{if(!1===i)return;let s,o;if(this.sensorToTriggerEvent[t]?(s=this.sensorToTriggerEvent[t],o=this.sharedGameControlGlobals.colliderToEntity.get(e)):this.sensorToTriggerEvent[e]&&(s=this.sensorToTriggerEvent[e],o=this.sharedGameControlGlobals.colliderToEntity.get(t)),s&&o&&s.isValidTriggeringObject(o))s.dispatch();else{for(let i=this.sharedGameControlGlobals.createdObjects.length-1;i>=0;i--){let s=this.sharedGameControlGlobals.createdObjects[i];if(s.userData.hasCollisionDestroy&&(s.rigidBody?.collider(0).handle===t||s.rigidBody?.collider(0).handle===e)){this.sharedGameControlGlobals.createdObjects.splice(i,1),s.removeFromParent();let t=s.rigidBody;requestAnimationFrame(()=>{s.rigidBody===t&&(this.sharedGameControlGlobals.rapierWorld?.removeRigidBody(t),s.rigidBody=void 0)});break}}if(void 0!==this.gameControl?.object&&this.gameControl.object===this.sharedGameControlGlobals.colliderToEntity.get(t)){let t=this.sharedGameControlGlobals.colliderToEntity.get(e),i=this.sharedGameControlGlobals.entityToCollisionEvents[t.uuid];if(void 0===i)return;for(let s of i)"character"===s.data.target&&this.dispatchCollisionEvent(s,t,e)}else if(void 0!==this.gameControl?.object&&this.gameControl.object===this.sharedGameControlGlobals.colliderToEntity.get(e)){let e=this.sharedGameControlGlobals.colliderToEntity.get(t),i=this.sharedGameControlGlobals.entityToCollisionEvents[e.uuid];if(void 0===i)return;for(let s of i)"character"===s.data.target&&this.dispatchCollisionEvent(s,e,t)}else{let i=this.sharedGameControlGlobals.colliderToEntity.get(t),s=this.sharedGameControlGlobals.entityToCollisionEvents[i.uuid];if(void 0!==s)for(let e of s)"scene"===e.data.target&&this.dispatchCollisionEvent(e,i,t);let o=this.sharedGameControlGlobals.colliderToEntity.get(e),a=this.sharedGameControlGlobals.entityToCollisionEvents[o?.uuid];if(void 0!==a)for(let t of a)"scene"===t.data.target&&this.dispatchCollisionEvent(t,o,e)}}},this.isExport=t.isExport,this.sharedAssets=t.sharedAssets,this.renderer=t.renderer,this.requestRender=t.requestRender,this.domElement=this.renderer.domElement,this.pixelsPerMeter=200,this.gravity=this.page.data.globalPhysics.gravity}get page(){return this.eventContext.page}markIsDestroyTarget(){this.page.traverseVisibleEntity(t=>{let e=t.dataPatched;for(let t of e.events){if(!0===t.data.disabled)continue;let e=t.data.actions?.find(t=>"Destroy"===t.data.type)?.data;if(e)for(let t of e.objects){let e=this.page.scene.find(t);e&&(e.userData.hasDestroy=!0)}}})}markIsDragObject(){this.page.traverseVisibleEntity(t=>{let e=t.dataPatched;for(let t of e.events)if(!0!==t.data.disabled&&"DragDrop"===t.data.type)for(let e of t.data.objects){let t=this.page.scene.find(e);t&&(t.userData.hasDrag=!0)}})}_staticBVHIdOf(t){let e=this._staticBVHAttrIds.get(t);return void 0===e&&(e=this._staticBVHNextAttrId++,this._staticBVHAttrIds.set(t,e)),e}initBVH(){if(null===t())return void f("collision-bvh","trigger/collision detection");let e=[],i=[];if(this.page.traverseChildren(t=>{let s,o=t instanceof r,a=m(t);if(y(t)||o||a)return;s=v(t)?t.object:t;let n=s.dataPatched;if("visibility"===n.physics?.enabled?!n.visible:!n.physics?.enabled)return!0;let h=t.geometry,l=!0===s.userData.hasDestroy,d=!0===s.userData.hasDrag;if(Gt(n)||l||d||s.dataPatched.events.some(t=>!0!==t.data.disabled&&("GameControl"===t.data.type||"Follow"===t.data.type)))return t.updateMatrixWorldRigid(),this.addBoundsTree(t),!0;if(h){let s=h.getAttribute("position");if(void 0!==s&&s.count>0){e.push({geometry:h,matrixWorld:t.matrixWorld}),i.push(h.id,this._staticBVHIdOf(s),s.version,null!==h.index?this._staticBVHIdOf(h.index):-1,null!==h.index?h.index.version:-1);for(let e of t.matrixWorld.elements)i.push(e)}}return!!Lt(t)||void 0}),e.length>0){let s=this._staticBVHCache;if(void 0!==s&&s.signature.length===i.length&&s.signature.every((t,e)=>t===i[e]))return void(this.sharedGameControlGlobals.staticMeshBVH=s.bvh);let o=e.map(t=>dt(t.geometry,t.matrixWorld)),a=l(o,!1),n=new(t())(a);this._staticBVHCache={signature:i,bvh:n},this.sharedGameControlGlobals.staticMeshBVH=n}}addRigidBody(t,e,i){if(lt(t.matrixWorld))return;let s=[],o="geometry"in t?t.geometry:void 0,a=e.dataPatched;if(void 0!==o?.getAttribute("position")&&s.push(dt(o,t.shearScale)),a.physics.fusedBody){let e=this.gatherChildrenGeom(t,s);t.traverseObject(e),t.children.forEach(t=>t.updateMatrixWorld(!0));let i=t.cloner;i&&void 0===i.objectForSample&&"dynamic"===a.physics.rigidBody&&(i.traverseObject(e),i.children.forEach(t=>t.updateMatrixWorld(!0)))}if(s.length>0){let n,r=!1,h=!i.fromCreate&&"dynamic"===a.physics.rigidBody||i.fromCreate&&i.dynamic;h?(n=ct.RigidBodyDesc.dynamic(),n.setLinearDamping(a.physics.damping).setAngularDamping(a.physics.damping).setAdditionalMass(1e-9).setGravityScale(a.physics.gravityScale).enabledRotations(...a.physics.enabledRotation).enabledTranslations(...a.physics.enabledTranslation)):(i.hasTransformAnim||i.hasFollow||i.hasDrag)&&!i.fromCreate?(n=ct.RigidBodyDesc.kinematicPositionBased(),r=!0):n=ct.RigidBodyDesc.fixed();let d=l(s);(t.hasNonUniformScale?t.matrixWorldRigid:t.matrixWorld).decompose(ut,yt,vt),t.position0=ut.clone().divideScalar(this.pixelsPerMeter),t.rotation0=yt.clone(),ut.divideScalar(this.pixelsPerMeter),n.setTranslation(ut.x,ut.y,ut.z).setRotation(yt),o?d?.scale(1/this.pixelsPerMeter,1/this.pixelsPerMeter,1/this.pixelsPerMeter):d?.scale(vt.x/this.pixelsPerMeter,vt.y/this.pixelsPerMeter,vt.z/this.pixelsPerMeter);let c=this.sharedGameControlGlobals.rapierWorld.createRigidBody(n),p=!(void 0===a.geometry||"SubdivGeometry"===a.geometry.type||"NonParametricGeometry"===a.geometry.type||"BooleanGeometry"===a.geometry.type||"VectorGeometry"===a.geometry.type||"StarGeometry"===a.geometry.type||"RectangleGeometry"===a.geometry.type||"EllipseGeometry"===a.geometry.type||"TriangleGeometry"===a.geometry.type||"TorusGeometry"===a.geometry.type||"HelixGeometry"===a.geometry.type);try{this.addCollider(c,a.physics,d,e,p)}catch{try{this.addCollider(c,a.physics,d,e,!1)}catch(t){console.error(t)}}if(0===c.numColliders())return void this.sharedGameControlGlobals.rapierWorld.removeRigidBody(c);h?this.rigidBodyToMesh.set(c.handle,[t,vt.clone(),a.physics.fusedBody]):r?(this.sharedGameControlGlobals.kinematicBodyToEntity.set(c.handle,t),this.sharedGameControlGlobals.entitiesWithTransformAnim.push(t)):this.fixedBodiesToWatch.push([t,c,(t.hasNonUniformScale?t.matrixWorldRigid:t.matrixWorld).clone()]),t.rigidBody=c}}addBoundsTree(e){let i=[];if(void 0!==e.geometry?.getAttribute("position")&&e.geometry?.getAttribute("position").count>0&&i.push(dt(e.geometry,e.shearScale)),e.traverseObject(this.gatherChildrenGeom(e,i)),e.children.forEach(t=>t.updateMatrixWorld(!0)),i.length>0){let s=l(i,!1);e.bvhGeometry=s,s.getAttribute("position").count>0&&(e.bvhGeometry.boundsTree=new(t())(s),this.sharedGameControlGlobals.entitiesWithTransformAnim.push(e))}}addCollider(t,e,i,s,o=!0){if(0===i?.getAttribute("position").count||0===i?.getIndex()?.count)return;let a;i&&(a="trimesh"===e.colliderType?ct.ColliderDesc.trimesh(i.getAttribute("position").array,i.getIndex().array):ct.ColliderDesc.convexMesh(i.getAttribute("position").array,o?i.getIndex().array:void 0)),a.setFrictionCombineRule(ct.CoefficientCombineRule.Average).setRestitutionCombineRule(ct.CoefficientCombineRule.Average).setDensity(e.density).setFriction(e.friction).setRestitution(e.restitution);let n=this.sharedGameControlGlobals.rapierWorld.createCollider(a,t);this.sharedGameControlGlobals.colliderToEntity.set(n.handle,s),this.sharedGameControlGlobals.entityToCollisionEvents[s.uuid]?.some(t=>"scene"===t.target)&&n.setActiveEvents(ct.ActiveEvents.COLLISION_EVENTS)}gatherChildrenGeom(t,e){let i=Lt(t);return(s,o)=>{if(0===o)return;if(i&&s.parent===t)return!0;let a;if(y(s)){if(!s.objectForSample)return!0===s.object.dataPatched.physics.fusedBody&&"dynamic"===s.object.dataPatched.physics.rigidBody||void 0;if(s.objectForSample.dataPatched.physics.fusedBody)return;a=s.object}else if(v(s))a=s.object;else if(a=s,a.dataPatched.cloner?.hideBase)return!0;let n=a.dataPatched;if("visibility"===n.physics.enabled?!n.visible:!n.physics.enabled)return!0;1===o?t.hasNonUniformScale?s.matrixWorld.multiplyMatrices(t.shearScale,s.hiddenMatrix):s.matrixWorld.copy(s.hiddenMatrix):s.matrixWorld.multiplyMatrices(s.parent.matrixWorld,s.hiddenMatrix),s.matrixWorld.multiply(s.matrix);let r=s.geometry;return void 0!==r?.getAttribute("position")&&e.push(dt(r,s.matrixWorld)),!!Lt(s)||void 0}}activate(t){if(this.isEnabled)return;this.isEnabled=!0,this.eventManager=t,this.usePhysics=this.page.data.globalPhysics.usePhysics;let e=this.page.playCamera,i=!1;this.page.traverseEntity(t=>{for(let e of t.dataPatched.events)if(!1===e.data.disabled&&"Trigger"===e.data.type)return this.needsCollisionDetection=!0,!0});let s=O();if(null!==s?i=s.setup({manager:this,camera:e,renderer:this.renderer,sharedAssets:this.sharedAssets,eventContext:this.eventContext,isExport:this.isExport})||i:null!==this.page.data.publish.gameControlObject&&f("game-controls","the scene's game controls"),!1===i){let{enableRotate:t,enablePan:i,enableZoom:s,autoRotate:o,hoverRotatePanMode:a}=this.eventManager.publish.orbitControls;(t||i||s||o||0!==a)&&(this.orbitControls=new it(e,this.renderer.domElement,{isExport:this.isExport,isPlayMode:!0}),this.orbitControls.addEventListener("change",this.requestRender),this.orbitControls.addEventListener("end",this.requestRender),this.orbitControls.addEventListener("start",this.requestRender),this.orbitControls.fromJSON(this.eventManager.publish.orbitControls,this.eventManager.publish.mouseEventTarget),this.orbitControls.useKeyEvents=!1,this.orbitControls.addEventListenersToCamera(),this.orbitControls.connect(),this.orbitControls.update())}let o=this.renderer.domElement.width/this.renderer.getPixelRatio(),a=this.renderer.domElement.height/this.renderer.getPixelRatio();O()?.createJoysticks(this,o,a),this.markIsDestroyTarget(),this.markIsDragObject(),this.rebuildBVH(),this.initializationCounter++,window.setTimeout(()=>{this.collisionEvents.forEach(t=>t.initialDisabled=!1)},80)}initPhysics(){this.sharedGameControlGlobals.rapierWorld?.free(),this.sharedGameControlGlobals.rapierWorld=new ct.World(new ct.Vector3(0,this.gravity,0)),this.events=new ct.EventQueue(!0);let t=[],e=[];if(this.page.traverseChildren(i=>{let s;if(y(i)){if(!i.objectForSample)return!0===i.object.dataPatched.physics.fusedBody&&"dynamic"===i.object.dataPatched.physics.rigidBody||void 0;if(i.objectForSample.dataPatched.physics.fusedBody)return;s=i.object}else if(v(i))s=i.object;else{if(m(i)||i instanceof r)return;if(s=i,!1===s.dataPatched.cloner?.disabled&&s.dataPatched.cloner?.hideBase&&!0!==s.dataPatched.physics?.fusedBody)return!0}let o,a=s.dataPatched;for(let t of a.events)!0!==t.data.disabled&&"GameControl"===t.data.type&&(o=t.data);if(!a.physics||("visibility"===a.physics.enabled?!a.visible:!a.physics.enabled))return!0;i.updateMatrixWorldRigid();let n=Gt(a),h=!1,l=s.userData.hasDestroy,d=s.userData.hasDrag,c=!1;for(let t of a.events)if(!0!==t.data.disabled)if("Collision"===t.data.type){h=!0;let e=new pt(t.id,t.data,s,this.page,this.sharedAssets,this.eventManager);e.initialDisabled=!0,this.collisionEvents.push(e),this.sharedGameControlGlobals.entityToCollisionEvents[s.uuid]&&this.sharedGameControlGlobals.entityToCollisionEvents[s.uuid].every(e=>e.id!==t.id)?this.sharedGameControlGlobals.entityToCollisionEvents[s.uuid].push(e):this.sharedGameControlGlobals.entityToCollisionEvents[s.uuid]=[e]}else if("Follow"===t.data.type){c=!0;let e=t.data.target;i.traverseVisible(t=>{t.userData.isFollowingObj=e})}"dynamic"===a.physics.rigidBody&&!1===a.physics.fusedBody&&(i.matrixWorldFusedFalse=i.matrixWorld.clone());let p=i.geometry;if(void 0!==o){let t=ct.RigidBodyDesc.kinematicPositionBased();(i.hasNonUniformScale?i.matrixWorldRigid:i.matrixWorld).decompose(ut,yt,vt),i.position0=ut.clone().divideScalar(this.pixelsPerMeter),i.rotation0=yt.clone(),ut.divideScalar(this.pixelsPerMeter),t.setTranslation(ut.x,ut.y,ut.z).setRotation(yt);let e,n=this.sharedGameControlGlobals.rapierWorld.createRigidBody(t);i.rigidBody=n,e="sphere"===o.collider.type?ct.ColliderDesc.ball(o.collider.radius/this.pixelsPerMeter):"capsule"===o.collider.type?ct.ColliderDesc.capsule((o.collider.height/2-o.collider.radius)/this.pixelsPerMeter,o.collider.radius/this.pixelsPerMeter):ct.ColliderDesc.cuboid(o.collider.width/this.pixelsPerMeter/2,o.collider.height/this.pixelsPerMeter/2,o.collider.depth/this.pixelsPerMeter/2),e.setFrictionCombineRule(ct.CoefficientCombineRule.Average).setDensity(a.physics.density).setFriction(a.physics.friction).setRestitution(0).setRestitutionCombineRule(ct.CoefficientCombineRule.Min);let r=this.sharedGameControlGlobals.rapierWorld.createCollider(e,n);this.sharedGameControlGlobals.colliderToEntity.set(r.handle,s),ut.fromArray(o.collider.position.map(t=>"number"==typeof t?t:0)).multiply(vt.setFromMatrixScale(s.matrixWorld)).divideScalar(this.pixelsPerMeter),r.setTranslationWrtParent(ut);let h=(new C).setFromEuler((new S).setFromVector3((new M).fromArray(o.collider.rotation.map(t=>"number"==typeof t?t:0))));r.setRotationWrtParent(h),r.setActiveEvents(ct.ActiveEvents.COLLISION_EVENTS),this.generateSensorColliderDescs(s,!0)}else"dynamic"===a.physics.rigidBody||n||c||l||d||h?(this.addRigidBody(i,s,{hasFollow:c,hasTransformAnim:n,hasDrag:d}),this.generateSensorColliderDescs(s,a.physics.fusedBody)):(p&&t.push(dt(p,i.matrixWorld)),a.physics.fusedBody&&!Lt(i)&&i.traverseObject((e,i)=>{if(0===i)return;let s;if(y(e)){if(!e.objectForSample)return!0===e.object.dataPatched.physics.fusedBody&&"dynamic"===e.object.dataPatched.physics.rigidBody||void 0;if(e.objectForSample.dataPatched.physics.fusedBody)return;s=e.object}else{if(m(e)||e instanceof r)return;if(v(e))s=e.object;else if(s=e,s.dataPatched.cloner?.hideBase)return!0}let o=s.dataPatched;if("visibility"===o.physics.enabled?!o.visible:!o.physics.enabled)return!0;let a=e.geometry;return void 0!==a?.getAttribute("position")&&t.push(dt(a,e.matrixWorld)),!!Lt(e)||void 0}),this.generateSensorColliderDescs(s,a.physics.fusedBody,e));return!(!0!==a.physics?.fusedBody&&!o&&!Lt(i))||void 0}),0===t.length)return;let i=l(t);i.scale(1/this.pixelsPerMeter,1/this.pixelsPerMeter,1/this.pixelsPerMeter);let s=ct.RigidBodyDesc.fixed(),o=this.sharedGameControlGlobals.rapierWorld.createRigidBody(s),a=ct.ColliderDesc.trimesh(i.getAttribute("position").array,i.getIndex().array).setFrictionCombineRule(ct.CoefficientCombineRule.Multiply).setRestitutionCombineRule(ct.CoefficientCombineRule.Multiply).setFriction(1).setRestitution(1);this.sharedGameControlGlobals.rapierWorld.createCollider(a,o);for(let[t,i]of e){let e=this.sharedGameControlGlobals.rapierWorld.createCollider(t,o);this.sensorToTriggerEvent[e.handle]=i}}updatePositions(){return this.nActiveRigidBodies=0,this.sharedGameControlGlobals.rapierWorld.forEachRigidBody(this.processRigidBody),this.nActiveRigidBodies>0}rebuildBVH(){this.usePhysics?this.initPhysics():(this.page.traverseEntity(t=>{for(let e of t.dataPatched.events)if("Trigger"===e.data.type&&!0!==e.data.disabled){let i=new mt(e.id,e.data,t,this.page,this.sharedAssets,this.eventManager),s=(new x).compose(ft.fromArray(e.data.position.map(t=>"number"==typeof t?t:0)),Pt.setFromEuler(gt.fromArray(e.data.rotation.map(t=>"number"==typeof t?t:0))),Et);if("box"===e.data.triggerZone){let o=new w;o.min.fromArray(e.data.size.map(t=>"number"==typeof t?t:0)).multiplyScalar(-.5),o.max.fromArray(e.data.size.map(t=>"number"==typeof t?t:0)).multiplyScalar(.5),this.sharedGameControlGlobals.triggers.push([o,s,t,i])}else this.sharedGameControlGlobals.triggers.push([e.data.radius,s,t,i])}}),this.needsCollisionDetection&&this.initBVH())}disconnectEvents(){this.collisionEvents.forEach(t=>t.disconnect()),this.sharedGameControlGlobals.triggers.forEach(t=>t[3].disconnect()),this.sharedGameControlGlobals.triggers.length=0}deactivate(){if(this.isEnabled){this.isEnabled=!1,this.page.traverse(t=>{let e=t;e.matrixWorldFusedFalse&&(e.matrixWorldFusedFalse=void 0),e.rigidBody&&(e.rigidBody=void 0),e.position0&&(e.position0=void 0),e.rotation0&&(e.rotation0=void 0)}),this.sharedGameControlGlobals.rapierWorld?.free(),this.sharedGameControlGlobals.rapierWorld=void 0,this.sharedGameControlGlobals.staticMeshBVH=void 0,this.accumulator=0,this.sharedGameControlGlobals.entitiesWithTransformAnim=[],this.sharedGameControlGlobals.kinematicBodyToEntity.clear(),this.fixedBodiesToWatch=[],this.disconnectEvents(),this.gameControl?.reset(),this.gameControl?.dispose(),this.gameControl=null,this.initializationCounter=-1,this.joysticks.forEach(([t,e])=>{t?.destroy(),e.remove()}),this.joystickToGameControls=[],this.joysticks=[],this.orbitControls&&(this.orbitControls.dispose(),this.orbitControls=void 0),this.navigationMeshWrapper?.dispose(),this.navigationMeshWrapper=void 0;for(let t of Object.values(this.sharedGameControlGlobals.entityToCollisionEvents))t.forEach(t=>t.disconnect());this.sharedGameControlGlobals.entityToCollisionEvents={},this.page.updateMatrixWorld(!0)}}update(t){if(!this.isEnabled)return!0;let e=!0;if(void 0!==this.orbitControls&&this.orbitControls.needsUpdate&&(this.orbitControls.update(),e=!this.orbitControls.isCurrentlyDamping),this.initializationCounter>=0&&this.initializationCounter<2?(this.initializationCounter++,e=!1):2===this.initializationCounter&&this.gameControl&&(e=!this.gameControl.update(t)&&e),!1===this.usePhysics&&this.checkTrigger(),this.usePhysics){let i=.016666666666666666;if(0===t)e=this.stepPhysics()&&e;else{let s=t/1e3;s<i&&s>.55*i&&(s=i),this.accumulator+=s;let o=performance.now(),a=0,n=6;for(;this.accumulator>=i&&a<n&&(e=this.stepPhysics()&&e,this.accumulator-=i,a++,!(performance.now()-o>1e3*i)););this.accumulator=this.accumulator%i}}this.skipRender=e}recordPhysicsPose(t){(t.hasNonUniformScale?t.matrixWorldRigid:t.matrixWorld).decompose(ut,yt,vt);let e=t;void 0===e.prevQ?(e.prevQ=yt.clone(),e.prevT=ut.clone()):(e.prevQ.copy(yt),e.prevT.copy(ut))}promoteMovedFixedBodies(){for(let t=this.fixedBodiesToWatch.length-1;t>=0;t--){let[e,i,s]=this.fixedBodiesToWatch[t];(e.hasNonUniformScale?e.matrixWorldRigid:e.matrixWorld).equals(s)||(i.setBodyType(ct.RigidBodyType.KinematicPositionBased,!0),this.sharedGameControlGlobals.kinematicBodyToEntity.set(i.handle,e),this.sharedGameControlGlobals.entitiesWithTransformAnim.push(e),this.fixedBodiesToWatch.splice(t,1))}}clampPushedBodies(){let t=this.gameControl?.object.rigidBody;if(void 0===t)return;let e=this.sharedGameControlGlobals.rapierWorld,i=t.linvel(),s=t.translation(),o=Math.hypot(i.x,i.z);for(let a=0;a<t.numColliders();a++){let n=t.collider(a);e.contactPairsWith(n,t=>{let a=t.parent();if(null===a||!a.isDynamic())return;let r=a.translation(),h=-1/0,l=0,d=0;if(e.contactPair(n,t,t=>{let e=t.normal(),o=e.x*(r.x-s.x)+e.y*(r.y-s.y)+e.z*(r.z-s.z)<0?-1:1;if(Math.abs(e.y)>.7)return;let a=o*e.x,n=o*e.z,c=Math.hypot(a,n);if(c<1e-4)return;let p=(i.x*a+i.z*n)/c;p>h&&(h=p,l=a/c,d=n/c)}),h===-1/0)return;let c=i.x*l+i.z*d;if(c<-Dt)return;let p=a.linvel();if(o>Dt&&c>Dt){let t=p.x*l+p.z*d;if(t<=0)return;let e=Math.min(t,c);return void a.setLinvel({x:l*e,y:p.y,z:d*e},!0)}let m=p.x*l+p.z*d-Math.max(0,c);if(m<=0)return;let u=.5*m;a.setLinvel({x:p.x-l*u,y:p.y,z:p.z-d*u},!0)})}}stepPhysics(){this.promoteMovedFixedBodies();for(let t of this.sharedGameControlGlobals.kinematicBodyToEntity.values())this.recordPhysicsPose(t),t.rigidBody.setNextKinematicTranslation(ut.divideScalar(this.pixelsPerMeter)),t.rigidBody.setNextKinematicRotation(yt);for(let t of this.sharedGameControlGlobals.entitiesWithTransformAnim)!0!==t.rigidBody?.isKinematic()&&this.recordPhysicsPose(t);return this.sharedGameControlGlobals.rapierWorld.step(this.events),this.clampPushedBodies(),this.events?.drainCollisionEvents(this.handleCollisionEvents),!this.updatePositions()}dispatchCollisionEvent(t,e,i){let s,o=(this.sharedGameControlGlobals.rapierWorld?.getCollider(i))._parent;if(e.cloner)for(let t of e.cloner.children)if(t.rigidBody===o){s=t;break}t.dispatch(s),e.dispatchEvent(wt)}updateUseWindowEvents(t){this.orbitControls?.updateUseWindowEvents(t)}generateSensorColliderDescs(t,e,i){let s=Mt.copy(t.matrixWorld).invert();t.traverseEntity((o,a)=>{if(!1===e&&1===a)return!0;for(let e of o.dataPatched.events)if("Trigger"===e.data.type&&!0!==e.data.disabled){let a,n=new mt(e.id,e.data,o,this.page,this.sharedAssets,this.eventManager);if(a="box"===e.data.triggerZone?ct.ColliderDesc.cuboid(...e.data.size.map(t=>("number"==typeof t?t:1)/(2*this.pixelsPerMeter))):ct.ColliderDesc.ball(e.data.radius/this.pixelsPerMeter),a.setDensity(0).setSensor(!0).setActiveEvents(ct.ActiveEvents.COLLISION_EVENTS),ft.fromArray(e.data.position.map(t=>"number"==typeof t?t:0)),Pt.setFromEuler(gt.fromArray(e.data.rotation.map(t=>"number"==typeof t?t:0))),Ct.compose(ft,Pt,Et).premultiply(o.matrixWorld),i?(Ct.decompose(ft,Pt,bt),a.setActiveCollisionTypes(ct.ActiveCollisionTypes.KINEMATIC_FIXED|ct.ActiveCollisionTypes.DYNAMIC_FIXED)):(Ct.premultiply(s).decompose(ft,Pt,bt),t.rigidBody.bodyType()===ct.RigidBodyType.Dynamic||(t.rigidBody.bodyType()===ct.RigidBodyType.Fixed?a.setActiveCollisionTypes(ct.ActiveCollisionTypes.KINEMATIC_FIXED|ct.ActiveCollisionTypes.DYNAMIC_FIXED):a.setActiveCollisionTypes(ct.ActiveCollisionTypes.KINEMATIC_KINEMATIC|ct.ActiveCollisionTypes.DYNAMIC_KINEMATIC))),ft.divideScalar(this.pixelsPerMeter),a.setTranslation(ft.x,ft.y,ft.z),a.setRotation(Pt),i)i.push([a,n]);else{let e=this.sharedGameControlGlobals.rapierWorld.createCollider(a,t.rigidBody);this.sensorToTriggerEvent[e.handle]=n}}})}checkTrigger(){let t;for(let e=0;e<this.sharedGameControlGlobals.triggers.length;e++){let[i,s,o,a]=this.sharedGameControlGlobals.triggers[e];for(let e=0;e<this.sharedGameControlGlobals.entitiesWithTransformAnim.length;e++){let n=this.sharedGameControlGlobals.entitiesWithTransformAnim[e];if(o===n||!1===a.isValidTriggeringObject(p.is(n)?n:n.object))continue;let r=Mt.copy(o.matrixWorld).decompose(ft,Tt,bt).compose(ft,Tt,Et).multiply(s),h=Ct.copy(n.matrixWorld).invert().multiply(r),l=n.bvhGeometry.boundsTree;i instanceof w?t=l.intersectsBox(i,h):(St.radius=i,St.center.setFromMatrixPosition(h),t=l.intersectsSphere(St)),t?-1===a.currentIntersectedObjects.indexOf(n)&&(a.currentIntersectedObjects.push(n),a.dispatch(),o.dispatchEvent(Rt)):a.currentIntersectedObjects=a.currentIntersectedObjects.filter(t=>t!==n)}}}},It=new Promise(t=>{Bt=t});function Ft(t){return Wt||(Wt=async function(){let e=t??"https://cdn.spline.design/@splinetool/runtime@2.0.6/build";typeof window<"u"&&(At=new URL(e.endsWith("/")?e:`${e}/`,window.location.href).href);let i=import("./navmesh.js"),[s,o]=await Promise.all([i,fetch(`${e}/navmesh.wasm`).then(t=>t.arrayBuffer())]),a=s.default,n=await a({wasmBinary:o});Bt(n)}())}export{it as a,ht as b,B as c,W as d,I as e,dt as f,wt as g,jt as h,Gt as i,Ot as j,It as k,At as l,Ft as m};
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1 +0,0 @@
1
- import{e,g as t,j as a}from"./runtime-chunk-FY3XD5P2.js";import{a as r}from"./runtime-chunk-CX2MRLZA.js";import{a as n,b as o}from"./runtime-chunk-GN3HDYV2.js";import{c as i,e as s,f as l}from"./runtime-chunk-XXRCB3ME.js";import{a as u}from"./runtime-chunk-H7D3VFTJ.js";import{b as d}from"./runtime-chunk-XUM5HEC6.js";import{U as p,Y as c,Z as h,da as f,ea as g,h as m}from"./runtime-chunk-SXPM42HJ.js";import{v as y}from"./runtime-chunk-4KX4KQWR.js";import{d as b,e as v}from"./runtime-chunk-2PT2WH66.js";import{d as w,f as j}from"./runtime-chunk-4KZXQGUQ.js";import{A as D,B as S,I as E,N as V,O as B,P as x,Q as O,R as A,S as C,da as k,ma as M,pa as R,va as N,z as P}from"./runtime-chunk-RBM3UDQF.js";import{Cc as G,Dc as q,Ec as z,Fc as I,Oc as F,Pc as $,Tc as U}from"./runtime-chunk-VGN7YHB7.js";var{degToRad:T,radToDeg:_}=G,W=new I,L=new I,X=new z;function H(e,t,a,r,n,o){let i=void 0!==a[e]?a[e]:void 0,s=r[e];if(null==s)return;let l=null!=i?"string"==typeof i?Number(n.getVariable(i)??0):i:t[e],u="string"==typeof s?Number(n.getVariable(s)??0):s;return l!==u?{update:a=>{let r=G.lerp(l,u,a);t[e]=o?Math.trunc(r):r},start:()=>{t[e]=l},end:()=>{t[e]=u}}:void 0}function Q(e,t,a,r,n,o){let i=a[e]?a[e]:void 0,s=r[e];if(!s)return;let l=t[e],u=[...i??l].map(e=>"string"==typeof e?Number(n.getVariable(e)??0):e),d=[...s].map(e=>"string"==typeof e?Number(n.getVariable(e)??0):e);return u.length!==d.length||w(u,d)?void 0:{update:a=>{u.forEach((r,n)=>{let i=G.lerp(r,d[n],a);t[e][n]=o?Math.trunc(i):i})},start:()=>{Object.assign(t[e],u)},end:()=>{Object.assign(t[e],d)}}}function Y(e,t,a){return t.forEach((t,r)=>{e.setComponent(r,"string"==typeof t?Number(a.getVariable(t)??0):t)}),e}function K(e,t,a,r,n){let o=a[e]?a[e]:void 0,i=r[e];if(!i)return;let s=t[e],l=o?Y(new I,o,n):s.clone(),u=Y(new I,i,n);return l.equals(u)?void 0:{update:e=>{s.lerpVectors(l,u,e)},start:()=>{s.copy(l)},end:()=>{s.copy(u)}}}function Z(e,t,a){return t.forEach((t,r)=>{e.setComponent(r,"string"==typeof t?Number(a.getVariable(t)??0):t)}),e}function J(e,t,a,r,n){let o=a[e]?a[e]:void 0,i=r[e];if(!i)return;let s=t[e],l=!(s instanceof q),u=s instanceof q?s:(new q).fromArray(s),d=o?Z(new q,o,n):u.clone(),p=Z(new q,i,n);return d.equals(p)?void 0:{update:a=>{u.lerpVectors(d,p,a),l&&(t[e]=u.toArray())},start:()=>{u.copy(d),l&&(t[e]=u.toArray())},end:()=>{u.copy(p),l&&(t[e]=u.toArray())}}}function ee(e,t,a,r,n){let o=a[e]?a[e]:void 0,i=r[e];if(!i)return;let s=t[e],l=new m(s.r,s.g,s.b,s.a),u=o?"string"==typeof o?n.getColor(o).clone():new m(o.r,o.g,o.b,o.a):l.clone(),d="string"==typeof i?n.getColor(i).clone():new m(i.r,i.g,i.b,i.a);return u.equals(d)?void 0:{update:a=>{l.lerpColors(u,d,a);let r=G.lerp(u.a,d.a,a);l.a=r,t[e]={r:l.r,g:l.g,b:l.b,a:l.a}},start:()=>{l.copy(u)},end:()=>{l.copy(d)}}}function te(e,t,a,r,n){return"number"==typeof t[e]?H(e,t,a??{},r,n):Array.isArray(t[e])?Q(e,t,a??{},r,n):void 0}function ae(e,t,a,r,n){let o=a[e],i=r[e];if("number"==typeof t[e])Math.abs(o-i)>1e-4&&(t[e]=G.lerp(o,i,n));else if(Array.isArray(t[e]))for(let a=0,r=o.length;a<r;a++)t[e][a]=G.lerp(o[a],i[a],n)}function re(e,t,a,r){let n=e.geometry.userData.parameters.extrusion;if(n)return M.forEach(e=>{ae(e,n,t,a,r)}),n}function ne(e,t,a,r){let n=e.updatedPathSnapping;if(n)return N.forEach(e=>{ae(e,n,t,a,r)}),n}function oe(e,t,a,r,n){let o=e.getValue(r);if(void 0!==o){if("colors"===r)return function(e,t,a,r="colors"){if(!e.hasValue(r)||!(r in a))return;let n=[],o=e.getValue(r),i=t?t[r]:o.map(e=>e.toArray()),s=a[r];for(let e=0;e<o.length;++e){let t=[...i[e]],a=[...s[e]];S.isEqual(t,a)||n.push({update:r=>{o[e].fromArray(S.lerp(t,a,r))},start:()=>{o[e].fromArray(t)},end:()=>{o[e].fromArray(a)}})}return n.length?n:void 0}(e,t,a,r);if(Array.isArray(o))return"steps"===r?function(e,t,a,r="steps"){if(!e.hasValue(r)||!(r in a))return;let n=[],o=e.getValue(r),i=t?t[r]:o,s=a[r];return w(i,s)||n.push({update:t=>{let a=[...o];for(let e=0;e<o.length;++e){let r=i[e],n=s[e];a[e]=G.lerp(r,n,t)}e.setValue(r,a)},start:()=>{e.setValue(r,i)},end:()=>{e.setValue(r,s)}}),n.length?n:void 0}(e,t,a,r):void 0;if("number"==typeof o)return function(e,t,a,r,n){if(!e.hasValue(r)||!(r in a))return;let o=t?t[r]:e.getValue(r),i=a[r],s="string"==typeof o?Number(n.getVariable(o)??0):o,l="string"==typeof i?Number(n.getVariable(i)??0):i;return{update:t=>{e.setValue(r,G.lerp(s,l,t))},start:()=>{e.setValue(r,s)},end:()=>{e.setValue(r,l)}}}(e,t,a,r,n);if("boolean"!=typeof o){if(o instanceof q)return function(e,t,a,r){if(!e.hasValue(r)||!(r in a))return;let n=e.getValue(r),o=t?(new q).fromArray(t[r]):n.clone(),i=(new q).fromArray(a[r]);return o.equals(i)?void 0:{update:e=>{n.lerpVectors(o,i,e)},start:()=>{n.copy(o)},end:()=>{n.copy(i)}}}(e,t,a,r);if(o instanceof I)return function(e,t,a,r,n){if(!e.hasValue(r)||!(r in a))return;let o=e.getValue(r),i=t?t[r]:void 0,s=a[r],l=i?Y(new I,i,n):o.clone(),u=Y(new I,s,n);return l.equals(u)?void 0:{update:e=>{o.lerpVectors(l,u,e)},start:()=>{o.copy(l)},end:()=>{o.copy(u)}}}(e,t,a,r,n);if(o instanceof m)return function(e,t,a,r,n){if(!e.hasValue(r)||!(r in a))return;let o=t?t[r]:void 0,i=a[r],s=e.getValue(r),l=o?"string"==typeof o?n.color(o).clone():(new U).setRGB(o.r,o.g,o.b):s.clone(),u="string"==typeof i?n.color(i).clone():new m(i.r,i.g,i.b,i.a);if(l.equals(u))return;let d=s.clone();return{update:t=>{e.getValue(r)!==d&&e.setValue(r,d),d.lerpColors(l,u,t)},start:()=>{d.copy(l)},end:()=>{d.copy(u)}}}(e,t,a,r,n);if(o instanceof U)return function(e,t,a,r,n){if(!e.hasValue(r)||!(r in a))return;let o=t?t[r]:void 0,i=a[r],s=e.getValue(r),l=o?"string"==typeof o?n.color(o).clone():(new U).setRGB(o.r,o.g,o.b):s.clone(),u="string"==typeof i?n.color(i).clone():(new U).setRGB(i.r,i.g,i.b);if(l.equals(u))return;let d=s.clone();return{update:t=>{e.getValue(r)!==d&&e.setValue(r,d),d.lerpColors(l,u,t)},start:()=>{d.copy(l)},end:()=>{d.copy(u)}}}(e,t,a,r,n);if("isTexture"in o)return function(e,t,a,r="texture"){if(!e.hasValue(r)||!(r in a))return;let n=e.getNode("rotation"),o=t?.[r]?.rotation??0,i=a[r]?.rotation??0;if(n&&o!==i)return{update:e=>{n.value=G.lerp(o,i,e)*G.DEG2RAD},start:()=>{n.value=o*G.DEG2RAD},end:()=>{n.value=i*G.DEG2RAD}};let s=e.getNode("mat");if(!s)return;let l=t?t[r]:s,u=a[r],d=[...l.repeat],p=[...l.offset],c=[...u.repeat],h=[...u.offset],f=l.rotation??0,g=u.rotation??0;return P.isEqual(d,c)&&P.isEqual(p,h)&&f===g?void 0:{update:e=>{s.repeat=P.lerp(d,c,e),s.offset=P.lerp(p,h,e),s.rotation=G.lerp(f,g,e),s.updateMatrix()},start:()=>{s.repeat=[...d],s.offset=[...p],s.rotation=f,s.updateMatrix()},end:()=>{s.repeat=[...c],s.offset=[...h],s.rotation=g,s.updateMatrix()}}}(e,t,a,r)}}}function ie(e,t,a,r){let n=[],o=p(a,r)||!!t.layers&&p(t,r);n.push(function(e,t){return{update:()=>{e.transparent=t}}}(e,o)),function(e,t,a){let r=e.ensureRainbowNoiseCompiled;if("function"==typeof r)for(let n of[...e.layers]){if("rainbow"!==n.type)continue;let o=t.layers?.data(n.uuid),i=a.layers.data(n.uuid);(c(o?.noiseStrength)||c(i?.noiseStrength))&&r.call(e,n.uuid)}}(e,t,a);for(let o of e.layers){let e=t.layers?.data(o.uuid),i=a.layers.data(o.uuid);if(!i||"light"!==o.type&&(!(o.visible??1)||!(i.visible??1)))continue;let s=h[o.type]??[],l=o.getNames().filter(e=>!s.includes(e)&&!k.some(t=>e.includes(t)));for(let t of l)try{let a=oe(o,e,i,t,r);a&&(Array.isArray(a)?n.push(...a):n.push(a))}catch(e){console.error(`lerpMaterial: unexpected material layer for ${t}`,e)}}return n}function se(e,t,a,r,n,o){let i=oe(t,a,r,e,o);!i||(Array.isArray(i)?i.forEach(e=>e.update(n)):i.update(n))}new $;var le=new I,ue=new $;function de(e,t,a,r){let n=r.cloner?.parameters;if(n){ae("count",n,e,t,a),n.count=Math.trunc(n.count);for(let r of B)ae(r,n.radial,e.radial,t.radial,a);for(let r of x)ae(r,n.linear,e.linear,t.linear,a);for(let r of O)ae(r,n.grid,e.grid,t.grid,a);for(let r of A)ae(r,n.toObject,e.toObject,t.toObject,a);return n}}function pe(e,t,a,r){let n=r.cloner?.parameters;if(n){for(let r of C)ae(r,n.randomnessObject,e.randomnessObject,t.randomnessObject,a);return n}}function ce(r,n,o,p,c){let h=[];return r.data.visible&&h.push(...function(e,t,a,r,n){let o,i,u,d,p,c,h,f,g=[];if(v(e)?(o=J("position",e,t,a,n),o&&g.push(o),u=H("rotation",e,t,a,n),u&&g.push(u),d=J("shear",e,t,a,n),d&&g.push(d)):(f={slide:t.pathSnapping?.slide??e.updatedPathSnapping?.slide??e.dataPatched.pathSnapping?.slide??0,offset:t.pathSnapping?.offset??e.updatedPathSnapping?.offset??e.dataPatched.pathSnapping?.offset??0},c=H("slide",f,t.pathSnapping??e.updatedPathSnapping??e.dataPatched.pathSnapping,a.pathSnapping??e.dataPatched.pathSnapping,n),c&&g.push(c),h=H("offset",f,t.pathSnapping??e.updatedPathSnapping??e.dataPatched.pathSnapping,a.pathSnapping??e.dataPatched.pathSnapping,n),h&&g.push(h),!c&&!h&&(o=K("position",e,t,a,n),o&&g.push(o),i=K("scale",e,t,a,n),i&&g.push(i),u=function(e,t,a,r,n){let o=t?.rotation?t.rotation.map(e=>("string"==typeof e?Number(n.getVariable(e)??0):e)*G.DEG2RAD):void 0,i=a.rotation?.map(e=>("string"==typeof e?Number(n.getVariable(e)??0):e)*G.DEG2RAD);if(!i)return;let s=o?(new I).fromArray(o):(new I).setFromEuler(e.rotation),l=(new I).fromArray(i);if(s.equals(l))return;let u=le.subVectors(l,s);if(r&&u.toArray().every(e=>Math.abs(e)<2*Math.PI)){let t=(new z).setFromEuler(ue.setFromVector3(s)),a=(new z).setFromEuler(ue.setFromVector3(l));return{update:r=>{!function(e,t,a,r){if(0===r)return a.copy(e);if(1===r)return a.copy(t);let n=e.w*t.w+e.x*t.x+e.y*t.y+e.z*t.z;if(n>=1)return a.copy(e);let o=1-n*n;if(o<=Number.EPSILON){let n=1-r;return a.w=n*e.w+r*t.w,a.x=n*e.x+r*t.x,a.y=n*e.y+r*t.y,a.z=n*e.z+r*t.z,a.normalize(),a}let i=Math.sqrt(o),s=Math.atan2(i,n),l=Math.sin((1-r)*s)/i,u=Math.sin(r*s)/i;a.w=e.w*l+t.w*u,a.x=e.x*l+t.x*u,a.y=e.y*l+t.y*u,a.z=e.z*l+t.z*u}(t,a,e.quaternion,r)},start:()=>{e.rotation.setFromVector3(s)},end:()=>{e.rotation.setFromVector3(l)}}}return{update:t=>{le.lerpVectors(s,l,t),e.rotation.setFromVector3(le)},start:()=>{e.rotation.setFromVector3(s)},end:()=>{e.rotation.setFromVector3(l)}}}(e,t,a,r,n),u&&g.push(u),p=function(e,t,a,r){let n=a[e]?a[e]:void 0,o=r[e];if(!o)return;let i=t[e],s=n?(new F).fromArray(n):i.clone(),l=new I,u=new z,d=new I;s.decompose(l,u,d);let p=(new F).fromArray(o),c=new I,h=new z,f=new I;return p.decompose(c,h,f),s.equals(p)?void 0:{update:e=>{X.slerpQuaternions(u,h,e),W.lerpVectors(l,c,e),L.lerpVectors(d,f,e),i.compose(W,X,L)},start:()=>{i.compose(l,u,d)},end:()=>{i.compose(c,h,f)}}}("hiddenMatrix",e,t,a),p&&g.push(p))),o||i||u||p||c||h){let a=v(e)?()=>{e.updateWorldMatrix(!0,!1,!0),e.resetBBoxNeedsUpdate()}:()=>{e.updateMatrix(),e.hasNonUniformScale&&(e.updateMatrixWorld(),e.updateMatrixWorldRigid()),e.parent?.matrixWorldFusedFalse&&(e.matrixWorld.multiplyMatrices(e.parent.matrixWorldFusedFalse,e.matrix),e.matrixWorldNeedsUpdate=!1),s(e)&&l(e.parent)&&e.invalidateDownstreamBooleanData(!0),e.updatePathSnapping(Object.assign({},t.pathSnapping,f))};g.push({update:a,start:a,end:a})}return g}(r,n,o,c,p.shared)),v(r)?h.push(...function(r,n,o,i,s){let l,u,d,p,c,h,f,g,m,y,b,v,w,j,D,S=[];if("width"in r&&(l=H("width",r,n,o,s),l&&S.push(l)),"height"in r&&(u=H("height",r,n,o,s),u&&S.push(u)),r instanceof e||r instanceof a){let t={...n.fill},a={...o.fill};void 0!==t.enabled&&t.enabled!==a.enabled&&(S.push(function(t){return{update:()=>{t instanceof e&&(t.fill.enabled=!0)}}}(r)),t.enabled||Object.assign(t,{enabled:!0,color:{...t.color,a:0}}),a.enabled||Object.assign(a,{enabled:!0,color:{...a.color,a:0}})),d=ee("color",r.fill,t,a,s),d&&S.push(d)}if(r instanceof e){let t={...n.stroke},a={...o.stroke};(t.enabled||a.enabled)&&(S.push(function(t){return{update:()=>{t instanceof e&&(t.stroke.enabled=!0)}}}(r)),t.enabled||Object.assign(t,{enabled:!0,color:{...t.color,a:0}}),a.enabled||Object.assign(a,{enabled:!0,color:{...a.color,a:0}})),p=ee("color",r.stroke,t,a,s),p&&S.push(p),c=H("thickness",r.stroke,t,a,s),c&&S.push(c)}if(r instanceof e){let t={...n.dropShadow},a={...o.dropShadow};(t.enabled||a.enabled)&&(S.push(function(t){return{update:()=>{t instanceof e&&(t.dropShadow.enabled=!0)}}}(r)),t.enabled||Object.assign(t,{enabled:!0,color:{...t.color,a:0}}),a.enabled||Object.assign(a,{enabled:!0,color:{...a.color,a:0}})),h=ee("color",r.dropShadow,t,a,s),h&&S.push(h),f=H("blurRadius",r.dropShadow,t,a,s),f&&S.push(f),m=H("spread",r.dropShadow,t,a,s),m&&S.push(m),g=J("offset",r.dropShadow,t,a,s),g&&S.push(g)}if(r instanceof e){let t={...n.innerShadow},a={...o.innerShadow};(t.enabled||a.enabled)&&(S.push(function(t){return{update:()=>{t instanceof e&&(t.innerShadow.enabled=!0)}}}(r)),t.enabled||Object.assign(t,{enabled:!0,color:{...t.color,a:0}}),a.enabled||Object.assign(a,{enabled:!0,color:{...a.color,a:0}})),y=ee("color",r.innerShadow,t,a,s),y&&S.push(y),b=H("blurRadius",r.innerShadow,t,a,s),b&&S.push(b),w=H("spread",r.innerShadow,t,a,s),w&&S.push(w),v=J("offset",r.innerShadow,t,a,s),v&&S.push(v)}if(r instanceof e||r instanceof a){let t={...n.backgroundBlur},a={...o.backgroundBlur};(t.enabled||a.enabled)&&(S.push(function(t){return{update:()=>{t instanceof e&&(t.backgroundBlur.enabled=!0)}}}(r)),t.enabled||Object.assign(t,{enabled:!0,radius:0}),a.enabled||Object.assign(a,{enabled:!0,radius:0})),j=H("radius",r.backgroundBlur,t,a,s),j&&S.push(j)}if(r instanceof e){let t={...n.layerBlur},a={...o.layerBlur};(t.enabled||a.enabled)&&(S.push(function(t){return{update:()=>{t instanceof e&&(t.layerBlur.enabled=!0)}}}(r)),t.enabled||Object.assign(t,{enabled:!0,radius:0}),a.enabled||Object.assign(a,{enabled:!0,radius:0})),D=H("radius",r.layerBlur,t,a,s),D&&S.push(D)}if(r instanceof a||r instanceof t){let e=Q("cornerRadius",r,n,o,s);e&&S.push(e)}return S}(r,n,o,0,p.shared)):(r.data.visible&&h.push(...function(e,t,a,r){let n=[];if(!("cloner"in a)||!e.cloner)return n;let o=e.cloner,i="cloner"in t?t.cloner:{},s=a.cloner;V.forEach(e=>{let t;t="count"===e?H("count",o.parameters,i,s,r.shared,!0):te(e,o.parameters,i??{},s,r.shared),t&&n.push(t)});let l=function(e,t,a,r){if("radial"!==e.parameters.type)return;let n=t.radial,o=a.radial;if(!o)return;let i=e.parameters.radial,s=[];return B.forEach(e=>{let t=te(e,i,n??{},o,r);t&&s.push(t)}),s}(o,i,s,r.shared);l?.length&&n.push(...l);let u=function(e,t,a,r){if("linear"!==e.parameters.type)return;let n=t.linear,o=a.linear;if(!o)return;let i=[],s=e.parameters.linear;return x.forEach(e=>{let t=te(e,s,n??{},o,r);t&&i.push(t)}),i}(o,i,s,r.shared);u?.length&&n.push(...u);let d=function(e,t,a,r){if("grid"!==e.parameters.type)return;let n=t.grid,o=a.grid;if(!o)return;let i=[],s=e.parameters.grid;return O.forEach(e=>{let t;t="count"===e?Q(e,s,n??{},o,r,!0):te(e,s,n??{},o,r),t&&i.push(t)}),i}(o,i,s,r.shared);d?.length&&n.push(...d);let p=function(e,t,a,r){if("toObject"!==e.parameters.type)return;let n=t.toObject,o=a.toObject;if(!o)return;let i=[],s=e.parameters.toObject;return A.forEach(e=>{let t;t="count"===e?H(e,s,n??{},o,r,!0):te(e,s,n??{},o,r),t&&i.push(t)}),i}(o,i,s,r.shared);p?.length&&n.push(...p);let c=function(e,t,a,r){if(!e.parameters.randomness)return;let n=t.randomnessObject,o=a.randomnessObject;if(!o)return;let i=[],s=e.parameters.randomnessObject;return C.forEach(e=>{let t=te(e,s,n??{},o,r);t&&i.push(t)}),i}(o,i,s,r.shared);return c?.length&&n.push(...c),n.length&&n.push({update:()=>{o.update(r)}}),n}(r,n,o,p)),r instanceof y?(r instanceof g&&r.data.visible&&h.push(...function(e,t,a,r){let n=[];if(!("geometry"in a))return n;let o=e.geometry.userData.parameters,i="geometry"in t?t.geometry:{},s=a.geometry;if(e instanceof d){let t=function(e,t,a,r){if(void 0===a.scaleBaked)return;let n=(t.scaleBaked??e.data.geometry.scaleBaked).map(e=>"string"==typeof e?Number(r.shared.getVariable(e)??0):e),o=a.scaleBaked.map(e=>"string"==typeof e?Number(r.shared.getVariable(e)??0):e);if(D.isEqual(n,o))return;let i=[];return i.push({update:t=>{e.updateGeometryInteractions({scaleBaked:[G.lerp(n[0],o[0],t),G.lerp(n[1],o[1],t),G.lerp(n[2],o[2],t)]},r.shared),e.invalidateDownstreamBooleanData(),e.refreshAttachedClonersInteractions(r)},start:()=>{e.updateGeometryInteractions({scaleBaked:n},r.shared),e.invalidateDownstreamBooleanData(),e.refreshAttachedClonersInteractions(r)},end:()=>{e.updateGeometryInteractions({scaleBaked:o},r.shared),e.invalidateDownstreamBooleanData(),e.refreshAttachedClonersInteractions(r)}}),i}(e,i,s,r);t&&n.push(...t)}else{let t={};if(Object.assign(t,j(o,R),j(i,R)),R.forEach(e=>{let a=te(e,t,i,s,r.shared);a&&n.push(a)}),b(e)){Object.assign(t,{extrusion:{...o.extrusion}});let e=function(e,t,a,r){if(!a.extrusion)return;let n=e.extrusion,o=t.extrusion??{},i=a.extrusion,s=[];return M.forEach(e=>{let t=te(e,n,o,i,r);t&&s.push(t)}),s}(t,i,s,r.shared);e&&n.push(...e)}n.length&&n.push({update:a=>{e.updateGeometryInteractions(t,r.shared),e.updateGeometryGroupsIfNeeded(),e.refreshAttachedClonersInteractions(r)},start:a=>{e.updateGeometryInteractions(t,r.shared),e.updateGeometryGroupsIfNeeded(),e.refreshAttachedClonersInteractions(r)},end:a=>{e.updateGeometryInteractions(t,r.shared),e.updateGeometryGroupsIfNeeded(),e.refreshAttachedClonersInteractions(r)}})}return n}(r,n,o,p)),r.data.visible&&!(r instanceof f&&r.materialOverride)&&h.push(...function(e,t,a,r){let n=[];if(Array.isArray(e.material)){if(!("materials"in a)||!a.materials)return n;let o="materials"in t&&t.materials?t.materials:[],i=a.materials;e.material.forEach((e,t)=>{if(!i[t])return;let a=o[t]??{},s=i[t];"string"==typeof a||"string"==typeof s||n.push(...ie(e,a,s,r))})}else{if(!("material"in a)||!a.material)return n;let o="material"in t&&t.material?t.material:{},i=a.material;if("string"==typeof o||"string"==typeof i)return n;n.push(...ie(e.material,o,i,r))}return n}(r,n,o,p.shared))):i.is(r)?r.data.visible&&h.push(...function(e,t,a,r){let n=[];if(void 0!==a.intensity){let o=H("intensity",e,t,a,r);o&&n.push(o)}if(void 0!==a.color){let o=function(e,t,a,r,n){let o=a[e]?a[e]:void 0,i=r[e];if(!i)return;let s=t[e],l=o?"string"==typeof o?n.getColor(o).clone():(new U).setRGB(o.r,o.g,o.b):s.clone(),u="string"==typeof i?n.getColor(i).clone():(new U).setRGB(i.r,i.g,i.b);if(l.equals(u))return;let d=s.clone();return{update:a=>{d.lerpColors(l,u,a),t[e]?.copy?.(d)},start:()=>{d.copy(l)},end:()=>{d.copy(u)}}}("color",e,t,a,r);o&&n.push(o)}return n}(r,n,o,p.shared)):r instanceof u&&h.push(...function(e,t,a,r){let n=[],o="OrthographicCamera"===e.cameraType?t.orthographic?.zoom:t.perspective?.zoom,i="OrthographicCamera"===e.cameraType?a.orthographic?.zoom:a.perspective?.zoom;if(void 0!==i){let t=o??e.zoom,a=i;t!==a&&n.push({update:r=>{e.zoom=G.lerp(t,a,r),e.updateProjectionMatrix()},start:()=>{e.zoom=t,e.updateProjectionMatrix()},end:()=>{e.zoom=a,e.updateProjectionMatrix()}})}if(void 0!==a.targetOffset){let o=H("targetOffset",e,t,a,r);o&&n.push(o)}return n}(r,n,o,p.shared))),h.length?{update:e=>{h.forEach(t=>t.update(e))},start:e=>{h.forEach(t=>t.start?.(e))},end:e=>{h.forEach(t=>t.end?.(e))}}:void 0}function he(e,t){return{position(t){Object.assign(e.position,t),(void 0!==t.x||void 0!==t.y||void 0!==t.z)&&(e.updateMatrix(),e.resetBBoxNeedsUpdate(),e instanceof g&&e.invalidateDownstreamBooleanData(),e.dispatchEvent({type:"requestRender"}))},rotation(t){let a=Object.keys(t)[0];e.rotation[a]=t[a]*G.DEG2RAD,(void 0!==t.x||void 0!==t.y||void 0!==t.z)&&(e.updateMatrix(),e.resetBBoxNeedsUpdate(),e instanceof g&&e.invalidateDownstreamBooleanData(),e.dispatchEvent({type:"requestRender"}))},scale(t){Object.assign(e.scale,t),(void 0!==t.x||void 0!==t.y||void 0!==t.z)&&(e.updateMatrix(),e.resetBBoxNeedsUpdate(),e instanceof g&&e.invalidateDownstreamBooleanData(),e.dispatchEvent({type:"requestRender"}))},shapeSize(a){e instanceof g&&(e.userData.value={...e.userData.value,...a},(void 0!==a.x||void 0!==a.y||void 0!==a.z)&&(e.updateGeometryInteractions({width:e.userData.value.x,height:e.userData.value.y,depth:e.userData.value.z},t.shared),e.resetBBoxNeedsUpdate(),e.invalidateDownstreamBooleanData(),e.dispatchEvent({type:"requestRender"})))},material(a,r,n){n&&(Object.entries(n).forEach(([a,{start:n,end:o,t:i}])=>{let s=r.getValue(a);e instanceof y&&!Array.isArray(e.material)&&"alpha"===a&&"number"==typeof s&&s>0&&(e.material.transparent=!0),void 0!==s&&se(a,r,n,o,i,t.shared)}),e.dispatchEvent({type:"requestRender"}))},opacity(a){if(e instanceof y&&!Array.isArray(e.material)){let r=e.material.getLayersOfType("light")[0];if(void 0===r)return;e.material.transparent=!0,se("alphaOverride",r,{alphaOverride:a},{alphaOverride:a+1},0,t.shared),e.dispatchEvent({type:"requestRender"})}},light(t,a){(e instanceof n||e instanceof r||e instanceof o)&&(e[t]=a,e.dispatchEvent({type:"requestRender"}))},cloner(e){e.cloner?.update(t),e instanceof g&&e.invalidateDownstreamBooleanData(),e.dispatchEvent({type:"requestRender"})},pathExtrusion(e,a){e.geometry.userData.parameters.extrusion={...e.geometry.userData.parameters.extrusion,...a},e.updateGeometryInteractions({extrusion:{...e.geometry.userData.parameters.extrusion}},t.shared),e.resetBBoxNeedsUpdate(),e.invalidateDownstreamBooleanData(),e.dispatchEvent({type:"requestRender"})},pathSnapping(t){e.userData.pathSnapping={...e.userData.pathSnapping,...t},e.updatePathSnapping(e.userData.pathSnapping),e.dispatchEvent({type:"requestRender"})}}}var fe={type:"beginState"};function ge(e){let t;if(5===e.easing){let{control1:a,control2:r}=e;t=`cubicBezier(\n\t\t\t${a[0]}, ${a[1]}, ${r[0]}, ${r[1]}\n\t\t)`}else if(6===e.easing){let{mass:a,stiffness:r,damping:n,velocity:o}=e;t=`spring( ${a}, ${r}, ${n}, ${o} )`}else{let a;switch(e.easing){case 0:default:a=E.linear;break;case 1:a=E.ease;break;case 2:a=E.easeIn;break;case 3:a=E.easeOut;break;case 4:a=E.easeInOut}let[r,n,o,i]=a;t=`cubicBezier( ${r}, ${n}, ${o}, ${i} )`}return{duration:Math.max(e.duration,1e-4),easing:t}}function me(e){let t={delay:0,loop:-1===e.repeat||e.repeat+1};if(0===e.repeat)t.direction="normal",t.rewind=!1;else switch(e.direction){case"pingpong":t.direction="alternate",t.rewind=!1;break;case"pingpong-rewind":t.direction="alternate",t.rewind=!0;break;default:t.direction="normal",t.rewind=!1}switch(t.delay=0,t.endDelay=0,t.startOnceDelay=0,t.pingPongDelayCorrection=0,t.pingPongEndDelayCorrection=0,e.delayDirection){case"start-once":t.startOnceDelay=e.delay;break;case"start":t.delay=e.delay;break;case"end":t.endDelay=e.delay;break;case"start-end":case void 0:t.delay=e.delay,t.endDelay=e.delay}return"alternate"===t.direction&&(t.delay/=2,t.endDelay/=2,"start"===e.delayDirection?(t.pingPongDelayCorrection=t.delay,"number"==typeof t.loop&&t.loop%2==0&&(t.pingPongEndDelayCorrection=t.delay)):"end"===e.delayDirection?"number"==typeof t.loop&&t.loop%2!=0&&(t.pingPongEndDelayCorrection=t.endDelay):"start-end"===e.delayDirection&&(t.pingPongDelayCorrection=t.delay,t.pingPongEndDelayCorrection=t.endDelay)),t}var ye={type:"completeState",isfromEntity:!1};function be(e,t){let a,r;if("string"==typeof t?(a=t,r=e.states?.[a]):null===t&&(a=null,r=e.data),void 0!==a&&void 0!==r)return{id:a,data:r}}var ve=class{constructor(e,t,a,r,n,o,i){if(this.object=e,this.data=r,this.sharedAssets=n,this.allowSlerp=o,this.page=i,this.targets={t:0},this.firstLoop=!0,this._changeBegan=!1,this._changeCompleted=!0,this.onChange=()=>{this.callback&&(this.callback.update(this.targets.t),this.object.requestRender()),0===this.targets.t||1===this.targets.t?this._changeCompleted||(this._changeCompleted=!0,this._changeBegan=!1,this.onChangeComplete()):(this._changeCompleted&&(this._changeCompleted=!1),this._changeBegan||(this._changeBegan=!0,this.onChangeBegin()))},this.onChangeBegin=()=>{this.object.reversibleToState=this.to.id;let e=this.targets.t>.5?this.from.id:this.to.id;this.object.prevState!==this.object.currentState&&(this.object.prevState=this.object.currentState),this.object.currentState=e,this.object.dispatchEvent({type:"beginState",state:e}),v(this.object)||this.object.traverseEntity(e=>{e!==this.object&&e instanceof u&&e.dispatchEvent(fe)})},this.onChangeComplete=()=>{this.firstLoop&&(this.onFirstLoop(),this.firstLoop=!1),this.object.reversibleToState=this.to.id;let e=this.targets.t<.5?this.from.id:this.to.id;this.object.prevState!==this.object.currentState&&(this.object.prevState=this.object.currentState),this.object.currentState=e,this.object.dispatchEvent({type:"completeState",state:e}),v(this.object)||this.object.traverseEntity(e=>{e!==this.object&&e instanceof u&&e.dispatchEvent(ye)})},this.onFirstLoop=()=>{this.useCurrentState&&(this.callback=ce(this.object,this.from.data,this.to.data,{scene:this.page.scene,shared:this.sharedAssets},this.allowSlerp))},void 0===t){let e=be(this.object,this.object.currentState===a?this.object.prevState:this.object.currentState);if(!e)throw new Error("Missing property");this.from=e}else{let e=be(this.object,t);if(!e)throw new Error("Missing property");this.from=e}if(void 0===a)throw new Error("Missing property");{let e=be(this.object,a);if(!e)throw new Error("Missing property");this.to=e}this.useCurrentState=void 0===t||void 0===a,this.params={targets:this.targets,t:1,autoplay:!1,...me(r),...ge(r),change:this.onChange},this.callback=ce(this.object,void 0===t?{}:this.from.data,void 0===a?{}:this.to.data,{scene:this.page.scene,shared:this.sharedAssets},this.allowSlerp)}get changeBegan(){return this._changeBegan}get changeCompleted(){return this._changeCompleted}};export{re as a,ne as b,de as c,pe as d,he as e,fe as f,ge as g,me as h,ye as i,be as j,ve as k};
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1 +0,0 @@
1
- G ��8�K��:��*#�0B�������<?}D�a�aAѭ�� 1СdݷA�ff˒b8ȸ����&>3���7�����mڗ��m�H�ơ���B��s�Uj���Fڟn��/�I2��h�-���
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1 +0,0 @@
1
- import{a as r}from"./runtime-chunk-PUBEJSJO.js";import"./runtime-chunk-RRXSRYPQ.js";import"./runtime-chunk-XUM5HEC6.js";import"./runtime-chunk-ITLS6YIC.js";import"./runtime-chunk-SXPM42HJ.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{c as m}from"./runtime-chunk-4KX4KQWR.js";import"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-R34HNX2O.js";import{a as n}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-RBM3UDQF.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";m.Cloner=r,n("cloners");
@@ -1,3 +0,0 @@
1
- W(�ø�۴����np����.b��[;�����]�AR"�^&!ȝ��[@!�<�0 9�4�ay
2
- ���q{��!����Bɯ_LI�pSM<��T�M\ʪe��W�Pq��n���)�+y�(��/_��Pf�M��T v�g�Oj�Ta`��e�Yy�
3
- ����Q%�׉;��C�����À��R��h�-��T9}
@@ -1 +0,0 @@
1
- import{k as r}from"./runtime-chunk-HUFJRFTO.js";import"./runtime-chunk-4KX4KQWR.js";import"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-R34HNX2O.js";import{a as i,d as m}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-RBM3UDQF.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";m("Hair",(i,m,n)=>new r(i,m,n)),i("hair");
@@ -1 +0,0 @@
1
- ���tc=7U��np^l�|�A�RKNC[��&��y��y��>H�%�q����Y�O��y�=�oS?n\`\ק|��;�S���؀�p���beE��0iG��B����.�:�S��+i�&�����ݧI<�p�*:�.�礖[ꤪJ�K��_K���0�4�����R
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1 +0,0 @@
1
- import{k as m}from"./runtime-chunk-BPYFB4BD.js";import"./runtime-chunk-PUBEJSJO.js";import"./runtime-chunk-RRXSRYPQ.js";import"./runtime-chunk-JQ3A6ENO.js";import"./runtime-chunk-XUM5HEC6.js";import"./runtime-chunk-ITLS6YIC.js";import"./runtime-chunk-4E4NQ6GS.js";import"./runtime-chunk-AKWBEROQ.js";import"./runtime-chunk-SXPM42HJ.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import"./runtime-chunk-4KX4KQWR.js";import"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-R34HNX2O.js";import{a as n,f as r}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-RBM3UDQF.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";r("ShapeBlendGeometry",(n,r,t)=>new m(n,r,t)),n("shape-blends");
@@ -1,5 +0,0 @@
1
- 
2
- ������"tn-Uv |��J���~�}a�^��F@����!( �VK$�8�4Ѝ��(�^��`^�z[�k{��H����I�W��
3
- ���@��YA�� ΃
4
- �lµ�VO.�D�� �~�`��>�a V
5
- ��� �ӹ?�ˇ,��>ߖ8��7b�C~���tX��S�7�
Binary file
Binary file
@@ -1 +0,0 @@
1
- import{a as t,b as e,c as i,d as a,e as n,f as s,h as r,i as o}from"./runtime-chunk-CCJD7IX7.js";import"./runtime-chunk-FY3XD5P2.js";import"./runtime-chunk-NTUTXO7Q.js";import{a as l}from"./runtime-chunk-R43XZP65.js";import{a as d}from"./runtime-chunk-CX2MRLZA.js";import{a as h,b as u}from"./runtime-chunk-GN3HDYV2.js";import"./runtime-chunk-XXRCB3ME.js";import"./runtime-chunk-FTVQTRM7.js";import{a as c}from"./runtime-chunk-H7D3VFTJ.js";import"./runtime-chunk-XUM5HEC6.js";import"./runtime-chunk-ITLS6YIC.js";import"./runtime-chunk-AKWBEROQ.js";import{Y as m,ca as p}from"./runtime-chunk-SXPM42HJ.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{b as g,e as f}from"./runtime-chunk-NWCLOXDY.js";import"./runtime-chunk-4KX4KQWR.js";import{d as y}from"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-4KZXQGUQ.js";import{g as v,h as x,i as M}from"./runtime-chunk-R34HNX2O.js";import{a as C}from"./runtime-chunk-TZCHGFVF.js";import{A as b,B as N,C as k,D as T,E as j,q as O,z as w}from"./runtime-chunk-RBM3UDQF.js";import{Bc as F,Cc as E}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var A=0;function D(){A++}function P(t,e){return(e.epoch!==A||e.t!==t.t||e.index!==t.index)&&(e.epoch=A,e.t=t.t,e.index=t.index,!0)}function I(t,e,i,a){if(e){let n={},s=[...e.keyframes??[]].sort((t,e)=>t.data.time-e.data.time);if("data"in t){let e=s[0];e&&i?.(e.data.value,t),n={index:[],t:[]};for(let t=0;t<s.length-1;t++){let e=s[t],i=s[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*s[0].data.time:0};n.t.push({...a,value:t%2==0?1:0,easing:x(e.data.easing.type,{control1:v(e.data.easing.cubicControls?.control1,[0,0]),control2:v(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),n.index.push({...a,value:t,easing:"linear"})}if(s.length>1){let e={t:0,index:0},r={t:NaN,index:NaN};return{targets:e,...n,update:()=>{if(!P(e,r))return;let n=Math.ceil(e.index),o=n%2==0?e.t:1-e.t,l=s?.[Math.min(n,s.length-1)].data.value,d=s?.[Math.min(n,s.length-1)+1]?.data.value,h={},u={};if(Object.keys(l).length>0&&Object.keys(d).length>0)for(let e in t.data)if(e in l&&e in d){let t=L(l[e],d[e],o,a);void 0!==t&&(h[e]=t,u[e]={start:l,end:d,t:o})}i?.({...h},t,u)}}}}}}function L(t,e,i,a){if("string"==typeof t&&a&&(t=a.color(t)),"string"==typeof e&&a&&(e=a.color(e)),"number"==typeof t)return E.lerp(t,e,i);if(j.is(t))return j.lerp(t,e,i);if(T.is(t))return T.lerp(t,e,i);if(Array.isArray(t))return(t.length>e.length?e:t).map((a,n)=>{if(Array.isArray(a)){let a=t[n].length>e[n].length?e[n].length:t[n].length;return(4===a?N:3===a?b:w).lerp(t[n],e[n],i)}return E.lerp(t[n],e[n],i)});if("object"==typeof t&&null!==t){let n={};for(let s in t){let r=L(t[s],e[s],i,a);void 0!==r&&(n[s]=r)}return n}}var _=new Map,H=new Map,X=class extends F{constructor(s,g,f,C,b,N,T){super(),this.id=s,this.data=g,this.scene=f,this.sharedAssets=C,this.object=b,this.eventType=N,this.actionCondition=T,this.toggleIsForward=!1,this._finished=!1,this.hasPlayedOnce=!1,this._shouldForwardLoop=!1,this._shouldPauseOnNextLoopComplete=!1,this.hiddenMatrixOverrides=[],this._onLoopComplete=()=>{this._shouldPauseOnNextLoopComplete&&(this.timeline.pause(),this._shouldPauseOnNextLoopComplete=!1)};try{let s=r(this.data);"number"==typeof s.loop&&s.loop--,this.timeline=l.timeline({...s,autoplay:!1}),this._shouldForwardLoop=!0===s.loop||"number"==typeof s.loop&&s.loop>1;let g=this.sharedAssets.data.timelineAnimations[this.data.timeline].mapping;Object.entries(g).forEach(([s,r])=>{let o=this.scene.find(s);if(!o)return;let l=o.data.timelineAnimations[r];if(!l)return;let g=o.data.states.data(r);g?.hiddenMatrix&&16===g.hiddenMatrix.length&&!k.isEqual(g.hiddenMatrix,o.data.hiddenMatrix)&&this.hiddenMatrixOverrides.push({objId:s,original:o.hiddenMatrix.clone(),state:g.hiddenMatrix});let b=function(n,s,r,o){let l=[];return s.properties.forEach(s=>{let g=s.data.path?.[0];if(g&&["position","rotation","scale"].includes(g)){let t=function(t,e=()=>{}){let i=[];for(let a of M){let n=[...t.keyframes??[]].filter(t=>void 0!==t.data.value[a]).sort((t,e)=>t.data.time-e.data.time),s=n[0];s&&e?.(s.data.value);let r={index:[],t:[]};for(let t=0;t<n.length-1;t++){let e=n[t],i=n[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*n[0].data.time:0};r.t.push({...a,value:t%2==0?1:0,easing:x(e.data.easing.type,{control1:v(e.data.easing.cubicControls?.control1,[0,0]),control2:v(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),r.index.push({...a,value:t,easing:"linear"})}if(n.length>1){let t={t:0,index:0},s={t:NaN,index:NaN};i.push({targets:t,...r,update:()=>{if(!P(t,s))return;let i=Math.ceil(t.index),r=i%2==0?t.t:1-t.t,o=n?.[i].data.value,l=n?.[i+1]?.data.value;void 0!==o&&void 0!==l&&e?.({[a]:o[a]+(l[a]-o[a])*r})}})}}return i}(s.data,r?.[g]);t&&l.push(...t)}if(g&&"shape size"===g&&"geometry"in n){let t=function(t,e,i){let a=[];for(let t of M){let n={},s=[...e.keyframes??[]].filter(e=>void 0!==e.data.value[t]).sort((t,e)=>t.data.time-e.data.time),r=s[0];r&&i?.(r.data.value),n={index:[],t:[]};for(let t=0;t<s.length-1;t++){let e=s[t],i=s[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*s[0].data.time:0};n.t.push({...a,value:t%2==0?1:0,easing:x(e.data.easing.type,{control1:v(e.data.easing.cubicControls?.control1,[0,0]),control2:v(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),n.index.push({...a,value:t,easing:"linear"})}if(s.length>1){let e={t:0,index:0},r={t:NaN,index:NaN};a.push({targets:e,...n,update:()=>{if(!P(e,r))return;let a=Math.ceil(e.index),n=a%2==0?e.t:1-e.t,o=s?.[a].data.value,l=s?.[a+1]?.data.value;void 0!==o&&void 0!==l&&i?.({[t]:o[t]+(l[t]-o[t])*n})}})}}return a}(0,s.data,r?.shapeSize);t&&l.push(...t)}if(g&&"path extrusion"===g&&y(n)){let e=function(e,i,a){let n={},s=[...i.keyframes??[]].sort((t,e)=>t.data.time-e.data.time),r=s[0];r&&a?.(e,r.data.value),n={index:[],t:[]};for(let t=0;t<s.length-1;t++){let e=s[t],i=s[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*s[0].data.time:0};n.t.push({...a,value:t%2==0?1:0,easing:x(e.data.easing.type,{control1:v(e.data.easing.cubicControls?.control1,[0,0]),control2:v(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),n.index.push({...a,value:t,easing:"linear"})}if(s.length>1){let i={t:0,index:0},r={t:NaN,index:NaN};return{targets:i,...n,update:()=>{if(!P(i,r))return;let n=Math.ceil(i.index),o=n%2==0?i.t:1-i.t,l=s?.[Math.min(n,s.length-1)].data.value,d=s?.[Math.min(n,s.length-1)+1]?.data.value;a?.(e,t(e,l,d,o))}}}}(n,s.data,r?.pathExtrusion);e&&l.push(e)}if(g&&"path snapping"===g&&n.data.pathSnapping){let t=function(t,i,a){let n={},s=[...i.keyframes??[]].sort((t,e)=>t.data.time-e.data.time),r=s[0];r&&a?.(r.data.value),n={index:[],t:[]};for(let t=0;t<s.length-1;t++){let e=s[t],i=s[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*s[0].data.time:0};n.t.push({...a,value:t%2==0?1:0,easing:x(e.data.easing.type,{control1:v(e.data.easing.cubicControls?.control1,[0,0]),control2:v(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),n.index.push({...a,value:t,easing:"linear"})}if(s.length>1){let i={t:0,index:0},r={t:NaN,index:NaN};return{targets:i,...n,update:()=>{if(!P(i,r))return;let n=Math.ceil(i.index),o=n%2==0?i.t:1-i.t,l=s?.[Math.min(n,s.length-1)].data.value,d=s?.[Math.min(n,s.length-1)+1]?.data.value;a?.(e(t,l,d,o))}}}}(n,s.data,r?.pathSnapping);t&&l.push(t)}if(g&&"material"===g&&"Mesh"===n.type&&"material"in n){let t=p(n.material)?n.material:void 0;if(t){let e=s.data.id;if(e){let i=(s.data.keyframes??[]).some(t=>m(t.data.value?.noiseStrength)),a=t.ensureRainbowNoiseCompiled,n=e=>{i&&"function"==typeof a&&a.call(t,e)};n(e);let d=t.getLayerByUuid(e);if(d){let t=I(d,s.data,r?.material,o);t&&l.push(t)}else{let e=s.data.type;for(let i of t.getLayersOfType(e))n(i.uuid);let i=t.getLayersOfType(e);if(i)for(let t of i){let e=I(t,s.data,r?.material,o);e&&l.push(e)}}}}}if(g&&"opacity"===g&&"Mesh"===n.type&&"material"in n){let t=function(t,e){if(t){let i={},a=[...t.keyframes??[]].sort((t,e)=>t.data.time-e.data.time),n=a[0];n&&e?.(n.data.value),i={index:[],t:[]};for(let t=0;t<a.length-1;t++){let e=a[t],n=a[t+1]??e,s={duration:1e3*(n?.data?.time-e.data.time),delay:0===t?1e3*a[0].data.time:0};i.t.push({...s,value:t%2==0?1:0,easing:x(e.data.easing.type,{control1:v(e.data.easing.cubicControls?.control1,[0,0]),control2:v(n.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),i.index.push({...s,value:t,easing:"linear"})}if(a.length>1){let t={t:0,index:0},n={t:NaN,index:NaN};return{targets:t,...i,update:()=>{if(!P(t,n))return;let i=Math.ceil(t.index),s=i%2==0?t.t:1-t.t,r=a?.[Math.min(i,a.length-1)].data.value,o=a?.[Math.min(i,a.length-1)+1]?.data.value;e?.(E.lerp(r,o,s))}}}}}(s.data,r?.opacity);t&&l.push(t)}if(g&&"cloner"===g){let t=function(t,e,n){let s={},r=[...e.keyframes??[]].sort((t,e)=>t.data.time-e.data.time),o=r[0];o&&n?.(t,o.data.value,o.data.value),s={index:[],t:[]};for(let t=0;t<r.length-1;t++){let e=r[t],i=r[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*r[0].data.time:0};s.t.push({...a,value:t%2==0?1:0,easing:x(e.data.easing.type,{control1:v(e.data.easing.cubicControls?.control1,[0,0]),control2:v(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),s.index.push({...a,value:t,easing:"linear"})}if(r.length>1){let e={t:0,index:0},o={t:NaN,index:NaN};return{targets:e,...s,update:()=>{if(!P(e,o))return;let s=Math.ceil(e.index),l=s%2==0?e.t:1-e.t,d=r?.[Math.min(s,r.length-1)].data.value,h=r?.[Math.min(s,r.length-1)+1]?.data.value;n?.(t,d.randomnessObject?void 0:i(d,h,l,t),d.randomnessObject?a(d,h,l,t):void 0)}}}}(n,s.data,r?.cloner);t&&l.push(t)}if(g&&"camera"===g&&n instanceof c){let t=function(t,e,i,a){if(e){let n={[a]:[]},s=[...e.keyframes??[]].sort((t,e)=>t.data.time-e.data.time),r=s[0];r&&(t[a]=r.data.value,i?.(a,r.data.value));for(let t=0;t<s.length-1;t++){let e=s[t];if(!Number.isFinite(e.data.value))continue;let i=s[t+1]??e;n[a].push({value:i.data.value,easing:x(e.data.easing.type,{control1:v(e.data.easing.cubicControls?.control1,[0,0]),control2:v(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters),duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*s[0].data.time:0})}if(s.length>1)return{targets:t,...n,update:()=>{i?.(a,t[a])}}}}(n,s.data,r?.camera,"zoom");t&&l.push(t)}if(g&&"light"===g&&(n instanceof h||n instanceof d||n instanceof u)){let t=function(t,e,i,a,n){if(e){let s={},r=[...e.keyframes??[]].sort((t,e)=>t.data.time-e.data.time),o=r[0];if(o){let e=o.data.value;t[a]=e,i?.(a,e)}s={index:[],t:[]};for(let t=0;t<r.length-1;t++){let e=r[t],i=r[t+1]??e,a={duration:1e3*(i?.data?.time-e.data.time),delay:0===t?1e3*r[0].data.time:0};s.t.push({...a,value:t%2==0?1:0,easing:x(e.data.easing.type,{control1:v(e.data.easing.cubicControls?.control1,[0,0]),control2:v(i.data.easing.cubicControls?.control2,[1,1])},e.data.easing.springParameters)}),s.index.push({...a,value:t,easing:"linear"})}if(r.length>1){let t={t:0,index:0},e={t:NaN,index:NaN};return{targets:t,...s,update:()=>{if(!P(t,e))return;let s=Math.ceil(t.index),o=s%2==0?t.t:1-t.t,l=r?.[Math.min(s,r.length-1)].data.value,d=r?.[Math.min(s,r.length-1)+1]?.data.value;i?.(a,L(l,d,o,n))}}}}}(n,s.data,r?.light,s.data.path[1],o);t&&l.push(t)}}),l}(o,{...l},n(o,{scene:f,shared:C}),this.sharedAssets),N=("start"===this.data.delayDirection?this.data.delay:0)+("start-end"===this.data.delayDirection?this.data.delay:0)+("start-once"===this.data.delayDirection?this.data.delay:0);b.forEach(t=>{this.timeline.add(t,N)}),this.timeline.duration=1e3*l.to+N}),this.timeline.delay=0,this.timeline.duration+=("start"===this.data.delayDirection?this.data.delay:0)+("end"===this.data.delayDirection?this.data.delay:0)+("start-end"===this.data.delayDirection?2*this.data.delay:0)+("start-once"===this.data.delayDirection?2*this.data.delay:0),this.timeline.finished.then(()=>{Object.keys(g).forEach(t=>{let e=this.scene.find(t);e instanceof c&&e.dispatchEvent(o)}),this._finished=!0}),this.timeline.loopComplete=this._onLoopComplete}catch(t){throw new Error("Missing property")}b&&(H.has(b.uuid)?H.get(b.uuid).push(this):H.set(b.uuid,[this])),_.set(s,this)}get playing(){return!1===this.timeline.paused}get finished(){return this._finished}get paused(){return this.timeline.paused}applyStateHiddenMatrices(){for(let{objId:t,state:e}of this.hiddenMatrixOverrides){let i=this.scene.find(t);i&&i.hiddenMatrix.fromArray(e)}}restoreOriginalHiddenMatrices(){for(let{objId:t,original:e}of this.hiddenMatrixOverrides){let i=this.scene.find(t);i&&i.hiddenMatrix.copy(e)}}play(){let t=void 0!==this.eventType&&O(this.eventType)&&"Once"===this.data.runMode&&this.hasPlayedOnce&&this.paused&&this.timeline.currentTime>0&&!this._finished;if(void 0!==this.eventType&&O(this.eventType)&&"Once"===this.data.runMode&&this.hasPlayedOnce&&!t||void 0===this.eventType&&this._finished)return!1;this.hasPlayedOnce=!0,this.applyStateHiddenMatrices();let e=this.sharedAssets.data.timelineAnimations[this.data.timeline].mapping;Object.keys(e).forEach(t=>{let e=this.scene.find(t);e instanceof c&&e.dispatchEvent(s)}),D(),this.paused&&this.timeline.currentTime>0?this.timeline.play():this.timeline.restart()}pauseTimeline(){this.paused||this.timeline.pause()}pause(){this.pauseTimeline()}stop(){this.pauseTimeline(),this.seek(0),this.timeline.reset(),this.restoreOriginalHiddenMatrices(),this._finished=!1}seek(t){this.timeline.seek(t*this.timeline.duration,!0)}toggle(t){let e=this.paused&&this.timeline.currentTime>0&&this.timeline.currentTime<this.timeline.duration;if(void 0!==t?this.toggleIsForward=t:e||(this.toggleIsForward=!this.toggleIsForward),this.playing){if(!this.toggleIsForward&&this.timeline.reversed&&this._shouldForwardLoop&&this.timeline.remaining%2==1)return void(this._shouldPauseOnNextLoopComplete=!0);this.timeline.reverse(this.timeline.duration-this.timeline.currentTime),this._shouldForwardLoop&&this.timeline.loop&&this.timeline.reversed&&(this._shouldPauseOnNextLoopComplete=!0)}else this.applyStateHiddenMatrices(),D(),(!this.toggleIsForward!==this.timeline.reversed||!this.toggleIsForward&&this.timeline.reversed&&"alternate"===this.timeline.direction)&&this.timeline.reverse(),"number"==typeof this.timeline.loop&&"number"==typeof this.timeline.remaining&&this.timeline.remaining<this.timeline.loop&&this.toggleIsForward&&(this.timeline.remaining=this.timeline.loop),this.timeline.play()}playFromCurrent(){this.toggle(!0)}reverseFromCurrent(){this.toggle(!1)}dispose(){this.pauseTimeline(),this.restoreOriginalHiddenMatrices()}},S=class{constructor(t){this.data=t}dispatch(){this.data.playTimeline?this.pauseTimeline(this.data.playTimeline):this.data.object?this.pauseAllTimelinesFromObject(this.data.object):this.pauseAllTimelines()}pauseTimeline(t){let e=this.getTimelineActions(t);!e.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{e.forEach(t=>{t[this.data.interaction]()}),this.disposeDelay()},this.data.delay)):e.forEach(t=>{t[this.data.interaction]()}))}getTimelineActions(t){let e=_.get(t);return e?[e]:[..._.values()].filter(e=>e.data.timeline===t)}pauseAllTimelinesFromObject(t){let e=H.get(t);!e?.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{e.forEach(t=>t[this.data.interaction]()),this.disposeDelay()},this.data.delay)):e.forEach(t=>t[this.data.interaction]()))}pauseAllTimelines(){let t=[...H.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}},R=class{constructor(t,e,i,a,n,s,r){this.data=e;let o="interaction"in e?e.interaction:"play";if("play"===o||void 0===o)this.interaction=new X(t,e,i,a,n,s,r);else{if("pause"!==o&&"stop"!==o)throw new Error("Missing property");this.interaction=new S(e)}}get playing(){return this.interaction instanceof X&&this.interaction.playing}get finished(){return!(this.interaction instanceof X)||this.interaction.finished}get paused(){return!(this.interaction instanceof X)||this.interaction.paused}play(){if(this.interaction instanceof X)return this.interaction.play();this.interaction.dispatch()}stop(){this.interaction instanceof X&&this.interaction.stop()}seek(t){this.interaction instanceof X&&this.interaction.seek(t)}toggle(t){this.interaction instanceof X?this.interaction.toggle(t):this.interaction.dispatch()}playFromCurrent(){this.interaction instanceof X?this.interaction.playFromCurrent():this.interaction.dispatch()}dispatchConditional(){this.interaction instanceof X?f(this.interaction.sharedAssets,this.interaction.actionCondition)&&this.interaction.playFromCurrent():this.interaction.dispatch()}reverseFromCurrent(){this.interaction instanceof X&&this.interaction.reverseFromCurrent()}dispose(){this.interaction.dispose()}};g("TimelineAnimation",({id:t,data:e,page:i,shared:a,object:n,eventType:s,actionCondition:r})=>new R(t,e,i.scene,a,n,s,r)),C("timeline");
Binary file
Binary file
@@ -1 +0,0 @@
1
- Z`��8F��z����W��e)nƃ�C� 8� naZ;�t���8��[��`�ꁦ7,��