@splinetool/runtime 1.12.97 → 2.0.1

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 (365) hide show
  1. package/README.md +195 -22
  2. package/build/boolean.js +406 -2
  3. package/build/boolean.js.br +0 -0
  4. package/build/boolean.js.gz +0 -0
  5. package/build/boolean.wasm +0 -0
  6. package/build/boolean.wasm.br +0 -0
  7. package/build/boolean.wasm.gz +0 -0
  8. package/build/gaussian-splat-compression.js.br +0 -0
  9. package/build/gaussian-splat-compression.js.gz +0 -0
  10. package/build/hana-ui.js +4299 -0
  11. package/build/hana-ui.js.br +0 -0
  12. package/build/hana-ui.js.gz +0 -0
  13. package/build/hana-ui.wasm +0 -0
  14. package/build/hana-ui.wasm.br +0 -0
  15. package/build/hana-ui.wasm.gz +0 -0
  16. package/build/howler.js.br +0 -0
  17. package/build/howler.js.gz +0 -0
  18. package/build/navmesh.js.br +0 -0
  19. package/build/navmesh.js.gz +0 -0
  20. package/build/navmesh.wasm +0 -0
  21. package/build/navmesh.wasm.br +0 -0
  22. package/build/navmesh.wasm.gz +0 -0
  23. package/build/opentype.js.br +0 -0
  24. package/build/opentype.js.gz +0 -0
  25. package/build/physics.js +1 -1
  26. package/build/physics.js.br +0 -0
  27. package/build/physics.js.gz +0 -0
  28. package/build/physics.wasm +0 -0
  29. package/build/physics.wasm.br +0 -0
  30. package/build/physics.wasm.gz +0 -0
  31. package/build/process.js +2 -2
  32. package/build/process.js.br +0 -0
  33. package/build/process.js.gz +0 -0
  34. package/build/process.wasm +0 -0
  35. package/build/process.wasm.br +0 -0
  36. package/build/process.wasm.gz +0 -0
  37. package/build/runtime-DRACOLoader-TQHJ6SJB.js +1 -0
  38. package/build/runtime-DRACOLoader-TQHJ6SJB.js.br +0 -0
  39. package/build/runtime-DRACOLoader-TQHJ6SJB.js.gz +0 -0
  40. package/build/runtime-Perfs-KMJFDYHU.js +1 -0
  41. package/build/runtime-Perfs-KMJFDYHU.js.br +0 -0
  42. package/build/runtime-Perfs-KMJFDYHU.js.gz +0 -0
  43. package/build/runtime-aiAssistant-XJVJ7TQB.js +1 -0
  44. package/build/runtime-aiAssistant-XJVJ7TQB.js.br +0 -0
  45. package/build/runtime-aiAssistant-XJVJ7TQB.js.gz +0 -0
  46. package/build/runtime-apiServices-KAO5SQJZ.js +1 -0
  47. package/build/runtime-apiServices-KAO5SQJZ.js.br +0 -0
  48. package/build/runtime-apiServices-KAO5SQJZ.js.gz +0 -0
  49. package/build/runtime-audio-Y3GYW4YQ.js +1 -0
  50. package/build/runtime-audio-Y3GYW4YQ.js.br +0 -0
  51. package/build/runtime-audio-Y3GYW4YQ.js.gz +0 -0
  52. package/build/runtime-bloom-XRHHZNNT.js +1 -0
  53. package/build/runtime-bloom-XRHHZNNT.js.br +0 -0
  54. package/build/runtime-bloom-XRHHZNNT.js.gz +0 -0
  55. package/build/runtime-brightnessContrast-RHV6X2Z4.js +1 -0
  56. package/build/runtime-brightnessContrast-RHV6X2Z4.js.br +0 -0
  57. package/build/runtime-brightnessContrast-RHV6X2Z4.js.gz +0 -0
  58. package/build/runtime-chromaticAberration-LSGAMQAK.js +1 -0
  59. package/build/runtime-chromaticAberration-LSGAMQAK.js.br +0 -0
  60. package/build/runtime-chromaticAberration-LSGAMQAK.js.gz +0 -0
  61. package/build/runtime-chunk-23QOKH2J.js +1 -0
  62. package/build/runtime-chunk-23QOKH2J.js.br +0 -0
  63. package/build/runtime-chunk-23QOKH2J.js.gz +0 -0
  64. package/build/runtime-chunk-2VFLTNIU.js +1 -0
  65. package/build/runtime-chunk-2VFLTNIU.js.br +0 -0
  66. package/build/runtime-chunk-2VFLTNIU.js.gz +0 -0
  67. package/build/runtime-chunk-44SAPZDZ.js +1 -0
  68. package/build/runtime-chunk-44SAPZDZ.js.br +0 -0
  69. package/build/runtime-chunk-44SAPZDZ.js.gz +0 -0
  70. package/build/runtime-chunk-4KZXQGUQ.js +1 -0
  71. package/build/runtime-chunk-4KZXQGUQ.js.br +0 -0
  72. package/build/runtime-chunk-4KZXQGUQ.js.gz +0 -0
  73. package/build/runtime-chunk-4YV3EXSU.js +1 -0
  74. package/build/runtime-chunk-4YV3EXSU.js.br +0 -0
  75. package/build/runtime-chunk-4YV3EXSU.js.gz +0 -0
  76. package/build/runtime-chunk-5CH7XRKY.js +1 -0
  77. package/build/runtime-chunk-5CH7XRKY.js.br +0 -0
  78. package/build/runtime-chunk-5CH7XRKY.js.gz +0 -0
  79. package/build/runtime-chunk-5VJGAC3M.js +1 -0
  80. package/build/runtime-chunk-5VJGAC3M.js.br +0 -0
  81. package/build/runtime-chunk-5VJGAC3M.js.gz +0 -0
  82. package/build/runtime-chunk-7NBWIU4W.js +1 -0
  83. package/build/runtime-chunk-7NBWIU4W.js.br +0 -0
  84. package/build/runtime-chunk-7NBWIU4W.js.gz +0 -0
  85. package/build/runtime-chunk-ARTGMJ7O.js +1 -0
  86. package/build/runtime-chunk-ARTGMJ7O.js.br +0 -0
  87. package/build/runtime-chunk-ARTGMJ7O.js.gz +0 -0
  88. package/build/runtime-chunk-BXPWRF47.js +1 -0
  89. package/build/runtime-chunk-BXPWRF47.js.br +0 -0
  90. package/build/runtime-chunk-BXPWRF47.js.gz +0 -0
  91. package/build/runtime-chunk-CRYQVRO6.js +1 -0
  92. package/build/runtime-chunk-CRYQVRO6.js.br +0 -0
  93. package/build/runtime-chunk-CRYQVRO6.js.gz +0 -0
  94. package/build/runtime-chunk-CVUJ3GMH.js +1 -0
  95. package/build/runtime-chunk-CVUJ3GMH.js.br +0 -0
  96. package/build/runtime-chunk-CVUJ3GMH.js.gz +0 -0
  97. package/build/runtime-chunk-DJJZN367.js +1 -0
  98. package/build/runtime-chunk-DJJZN367.js.br +0 -0
  99. package/build/runtime-chunk-DJJZN367.js.gz +0 -0
  100. package/build/runtime-chunk-DZNU62CT.js +1 -0
  101. package/build/runtime-chunk-DZNU62CT.js.br +0 -0
  102. package/build/runtime-chunk-DZNU62CT.js.gz +0 -0
  103. package/build/runtime-chunk-EAXCCTR5.js +1 -0
  104. package/build/runtime-chunk-EAXCCTR5.js.br +0 -0
  105. package/build/runtime-chunk-EAXCCTR5.js.gz +0 -0
  106. package/build/runtime-chunk-EOV2DL2V.js +1 -0
  107. package/build/runtime-chunk-EOV2DL2V.js.br +0 -0
  108. package/build/runtime-chunk-EOV2DL2V.js.gz +0 -0
  109. package/build/runtime-chunk-FDRTCOJ5.js +1 -0
  110. package/build/runtime-chunk-FDRTCOJ5.js.br +0 -0
  111. package/build/runtime-chunk-FDRTCOJ5.js.gz +0 -0
  112. package/build/runtime-chunk-FQNSP44B.js +1 -0
  113. package/build/runtime-chunk-FQNSP44B.js.br +0 -0
  114. package/build/runtime-chunk-FQNSP44B.js.gz +0 -0
  115. package/build/runtime-chunk-FTVQTRM7.js +1 -0
  116. package/build/runtime-chunk-FTVQTRM7.js.br +0 -0
  117. package/build/runtime-chunk-FTVQTRM7.js.gz +0 -0
  118. package/build/runtime-chunk-GFTBNL2W.js +1 -0
  119. package/build/runtime-chunk-GFTBNL2W.js.br +0 -0
  120. package/build/runtime-chunk-GFTBNL2W.js.gz +0 -0
  121. package/build/runtime-chunk-H6BPTR74.js +1 -0
  122. package/build/runtime-chunk-H6BPTR74.js.br +0 -0
  123. package/build/runtime-chunk-H6BPTR74.js.gz +0 -0
  124. package/build/runtime-chunk-H6T5LPRN.js +1 -0
  125. package/build/runtime-chunk-H6T5LPRN.js.br +0 -0
  126. package/build/runtime-chunk-H6T5LPRN.js.gz +0 -0
  127. package/build/runtime-chunk-HER7UVU3.js +1 -0
  128. package/build/runtime-chunk-HER7UVU3.js.br +0 -0
  129. package/build/runtime-chunk-HER7UVU3.js.gz +0 -0
  130. package/build/runtime-chunk-J2I4VBHR.js +1 -0
  131. package/build/runtime-chunk-J2I4VBHR.js.br +0 -0
  132. package/build/runtime-chunk-J2I4VBHR.js.gz +0 -0
  133. package/build/runtime-chunk-JFAQQYSH.js +1 -0
  134. package/build/runtime-chunk-JFAQQYSH.js.br +0 -0
  135. package/build/runtime-chunk-JFAQQYSH.js.gz +0 -0
  136. package/build/runtime-chunk-KGZNRID6.js +1 -0
  137. package/build/runtime-chunk-KGZNRID6.js.br +1 -0
  138. package/build/runtime-chunk-KGZNRID6.js.gz +0 -0
  139. package/build/runtime-chunk-LATYCOUS.js +1 -0
  140. package/build/runtime-chunk-LATYCOUS.js.br +0 -0
  141. package/build/runtime-chunk-LATYCOUS.js.gz +0 -0
  142. package/build/runtime-chunk-MBBODDV7.js +1 -0
  143. package/build/runtime-chunk-MBBODDV7.js.br +0 -0
  144. package/build/runtime-chunk-MBBODDV7.js.gz +0 -0
  145. package/build/runtime-chunk-ML3Z74BL.js +1 -0
  146. package/build/runtime-chunk-ML3Z74BL.js.br +0 -0
  147. package/build/runtime-chunk-ML3Z74BL.js.gz +0 -0
  148. package/build/runtime-chunk-MM75L5X4.js +1 -0
  149. package/build/runtime-chunk-MM75L5X4.js.br +0 -0
  150. package/build/runtime-chunk-MM75L5X4.js.gz +0 -0
  151. package/build/runtime-chunk-N2ZRGNPR.js +1 -0
  152. package/build/runtime-chunk-N2ZRGNPR.js.br +0 -0
  153. package/build/runtime-chunk-N2ZRGNPR.js.gz +0 -0
  154. package/build/runtime-chunk-NBYTQLIB.js +1 -0
  155. package/build/runtime-chunk-NBYTQLIB.js.br +0 -0
  156. package/build/runtime-chunk-NBYTQLIB.js.gz +0 -0
  157. package/build/runtime-chunk-NSD7DU3P.js +1 -0
  158. package/build/runtime-chunk-NSD7DU3P.js.br +0 -0
  159. package/build/runtime-chunk-NSD7DU3P.js.gz +0 -0
  160. package/build/runtime-chunk-NTUTXO7Q.js +1 -0
  161. package/build/runtime-chunk-NTUTXO7Q.js.br +0 -0
  162. package/build/runtime-chunk-NTUTXO7Q.js.gz +0 -0
  163. package/build/runtime-chunk-O5NBGIBR.js +1 -0
  164. package/build/runtime-chunk-O5NBGIBR.js.br +0 -0
  165. package/build/runtime-chunk-O5NBGIBR.js.gz +0 -0
  166. package/build/runtime-chunk-OFPUAZKY.js +1 -0
  167. package/build/runtime-chunk-OFPUAZKY.js.br +0 -0
  168. package/build/runtime-chunk-OFPUAZKY.js.gz +0 -0
  169. package/build/runtime-chunk-OW6T4XFV.js +1 -0
  170. package/build/runtime-chunk-OW6T4XFV.js.br +0 -0
  171. package/build/runtime-chunk-OW6T4XFV.js.gz +0 -0
  172. package/build/runtime-chunk-QZ35BPGB.js +1 -0
  173. package/build/runtime-chunk-QZ35BPGB.js.br +0 -0
  174. package/build/runtime-chunk-QZ35BPGB.js.gz +0 -0
  175. package/build/runtime-chunk-R43XZP65.js +1 -0
  176. package/build/runtime-chunk-R43XZP65.js.br +0 -0
  177. package/build/runtime-chunk-R43XZP65.js.gz +0 -0
  178. package/build/runtime-chunk-T53JMQSH.js +1 -0
  179. package/build/runtime-chunk-T53JMQSH.js.br +0 -0
  180. package/build/runtime-chunk-T53JMQSH.js.gz +0 -0
  181. package/build/runtime-chunk-T6CHRQ6N.js +1 -0
  182. package/build/runtime-chunk-T6CHRQ6N.js.br +0 -0
  183. package/build/runtime-chunk-T6CHRQ6N.js.gz +0 -0
  184. package/build/runtime-chunk-TU4KDRKR.js +1 -0
  185. package/build/runtime-chunk-TU4KDRKR.js.br +0 -0
  186. package/build/runtime-chunk-TU4KDRKR.js.gz +0 -0
  187. package/build/runtime-chunk-TZCHGFVF.js +1 -0
  188. package/build/runtime-chunk-TZCHGFVF.js.br +3 -0
  189. package/build/runtime-chunk-TZCHGFVF.js.gz +0 -0
  190. package/build/runtime-chunk-UK4GQHMO.js +1 -0
  191. package/build/runtime-chunk-UK4GQHMO.js.br +0 -0
  192. package/build/runtime-chunk-UK4GQHMO.js.gz +0 -0
  193. package/build/runtime-chunk-USXMESRF.js +1 -0
  194. package/build/runtime-chunk-USXMESRF.js.br +0 -0
  195. package/build/runtime-chunk-USXMESRF.js.gz +0 -0
  196. package/build/runtime-chunk-VAVYZ35B.js +1 -0
  197. package/build/runtime-chunk-VAVYZ35B.js.br +0 -0
  198. package/build/runtime-chunk-VAVYZ35B.js.gz +0 -0
  199. package/build/runtime-chunk-VGN7YHB7.js +1 -0
  200. package/build/runtime-chunk-VGN7YHB7.js.br +0 -0
  201. package/build/runtime-chunk-VGN7YHB7.js.gz +0 -0
  202. package/build/runtime-chunk-W7QPV37Y.js +1 -0
  203. package/build/runtime-chunk-W7QPV37Y.js.br +1 -0
  204. package/build/runtime-chunk-W7QPV37Y.js.gz +0 -0
  205. package/build/runtime-chunk-WQXDDUFV.js +1 -0
  206. package/build/runtime-chunk-WQXDDUFV.js.br +0 -0
  207. package/build/runtime-chunk-WQXDDUFV.js.gz +0 -0
  208. package/build/runtime-chunk-XLOQIQSS.js +1 -0
  209. package/build/runtime-chunk-XLOQIQSS.js.br +0 -0
  210. package/build/runtime-chunk-XLOQIQSS.js.gz +0 -0
  211. package/build/runtime-chunk-Y3BMDVJ7.js +1 -0
  212. package/build/runtime-chunk-Y3BMDVJ7.js.br +0 -0
  213. package/build/runtime-chunk-Y3BMDVJ7.js.gz +0 -0
  214. package/build/runtime-chunk-YUK55LCN.js +1 -0
  215. package/build/runtime-chunk-YUK55LCN.js.br +0 -0
  216. package/build/runtime-chunk-YUK55LCN.js.gz +0 -0
  217. package/build/runtime-chunk-YVNDW5TV.js +1 -0
  218. package/build/runtime-chunk-YVNDW5TV.js.br +0 -0
  219. package/build/runtime-chunk-YVNDW5TV.js.gz +0 -0
  220. package/build/runtime-chunk-YXATXASV.js +1 -0
  221. package/build/runtime-chunk-YXATXASV.js.br +1 -0
  222. package/build/runtime-chunk-YXATXASV.js.gz +0 -0
  223. package/build/runtime-chunk-Z5OH244S.js +1 -0
  224. package/build/runtime-chunk-Z5OH244S.js.br +0 -0
  225. package/build/runtime-chunk-Z5OH244S.js.gz +0 -0
  226. package/build/runtime-classicRuntime-F5CEZRNL.js +1 -0
  227. package/build/runtime-classicRuntime-F5CEZRNL.js.br +0 -0
  228. package/build/runtime-classicRuntime-F5CEZRNL.js.gz +0 -0
  229. package/build/runtime-cloners-BLAFVALM.js +1 -0
  230. package/build/runtime-cloners-BLAFVALM.js.br +0 -0
  231. package/build/runtime-cloners-BLAFVALM.js.gz +0 -0
  232. package/build/runtime-collisionBVH-KXZNWTEK.js +1 -0
  233. package/build/runtime-collisionBVH-KXZNWTEK.js.br +0 -0
  234. package/build/runtime-collisionBVH-KXZNWTEK.js.gz +0 -0
  235. package/build/runtime-components-DYNXEVOC.js +1 -0
  236. package/build/runtime-components-DYNXEVOC.js.br +0 -0
  237. package/build/runtime-components-DYNXEVOC.js.gz +0 -0
  238. package/build/runtime-conditional-3A423CXW.js +1 -0
  239. package/build/runtime-conditional-3A423CXW.js.br +0 -0
  240. package/build/runtime-conditional-3A423CXW.js.gz +0 -0
  241. package/build/runtime-createDestroy-FUUG7UAK.js +1 -0
  242. package/build/runtime-createDestroy-FUUG7UAK.js.br +0 -0
  243. package/build/runtime-createDestroy-FUUG7UAK.js.gz +0 -0
  244. package/build/runtime-depthOfField-BBWDHJYP.js +1 -0
  245. package/build/runtime-depthOfField-BBWDHJYP.js.br +0 -0
  246. package/build/runtime-depthOfField-BBWDHJYP.js.gz +0 -0
  247. package/build/runtime-dragDrop-GPFMU3ZB.js +1 -0
  248. package/build/runtime-dragDrop-GPFMU3ZB.js.br +0 -0
  249. package/build/runtime-dragDrop-GPFMU3ZB.js.gz +0 -0
  250. package/build/runtime-fxBloom-IGFV4KJD.js +1 -0
  251. package/build/runtime-fxBloom-IGFV4KJD.js.br +0 -0
  252. package/build/runtime-fxBloom-IGFV4KJD.js.gz +0 -0
  253. package/build/runtime-fxDepthOfField-WX7WD3K4.js +1 -0
  254. package/build/runtime-fxDepthOfField-WX7WD3K4.js.br +0 -0
  255. package/build/runtime-fxDepthOfField-WX7WD3K4.js.gz +0 -0
  256. package/build/runtime-gameControls-TGEINRCX.js +1 -0
  257. package/build/runtime-gameControls-TGEINRCX.js.br +0 -0
  258. package/build/runtime-gameControls-TGEINRCX.js.gz +0 -0
  259. package/build/runtime-hair-YOTI2EFL.js +1 -0
  260. package/build/runtime-hair-YOTI2EFL.js.br +0 -0
  261. package/build/runtime-hair-YOTI2EFL.js.gz +0 -0
  262. package/build/runtime-hueSaturation-X3HAZK2G.js +1 -0
  263. package/build/runtime-hueSaturation-X3HAZK2G.js.br +0 -0
  264. package/build/runtime-hueSaturation-X3HAZK2G.js.gz +0 -0
  265. package/build/runtime-mergeStaticGeometries-JI7YWYGH.js +1 -0
  266. package/build/runtime-mergeStaticGeometries-JI7YWYGH.js.br +3 -0
  267. package/build/runtime-mergeStaticGeometries-JI7YWYGH.js.gz +0 -0
  268. package/build/runtime-miscActions-INSZA2CP.js +1 -0
  269. package/build/runtime-miscActions-INSZA2CP.js.br +0 -0
  270. package/build/runtime-miscActions-INSZA2CP.js.gz +0 -0
  271. package/build/runtime-mouseHover-GZW7KW6H.js +1 -0
  272. package/build/runtime-mouseHover-GZW7KW6H.js.br +0 -0
  273. package/build/runtime-mouseHover-GZW7KW6H.js.gz +0 -0
  274. package/build/runtime-navmesh-UJTUAHXM.js +1 -0
  275. package/build/runtime-navmesh-UJTUAHXM.js.br +0 -0
  276. package/build/runtime-navmesh-UJTUAHXM.js.gz +0 -0
  277. package/build/runtime-noise-UF5CMIO3.js +1 -0
  278. package/build/runtime-noise-UF5CMIO3.js.br +0 -0
  279. package/build/runtime-noise-UF5CMIO3.js.gz +0 -0
  280. package/build/runtime-particles-T2CREK6M.js +1 -0
  281. package/build/runtime-particles-T2CREK6M.js.br +0 -0
  282. package/build/runtime-particles-T2CREK6M.js.gz +0 -0
  283. package/build/runtime-paths-PRHQFJ3X.js +1 -0
  284. package/build/runtime-paths-PRHQFJ3X.js.br +0 -0
  285. package/build/runtime-paths-PRHQFJ3X.js.gz +0 -0
  286. package/build/runtime-pixelation-QFSF4L6X.js +1 -0
  287. package/build/runtime-pixelation-QFSF4L6X.js.br +0 -0
  288. package/build/runtime-pixelation-QFSF4L6X.js.gz +0 -0
  289. package/build/runtime-resize-SM6PZWJY.js +1 -0
  290. package/build/runtime-resize-SM6PZWJY.js.br +0 -0
  291. package/build/runtime-resize-SM6PZWJY.js.gz +0 -0
  292. package/build/runtime-sceneTransition-JUZVB2S3.js +1 -0
  293. package/build/runtime-sceneTransition-JUZVB2S3.js.br +0 -0
  294. package/build/runtime-sceneTransition-JUZVB2S3.js.gz +0 -0
  295. package/build/runtime-scroll-Q6NRRL4F.js +1 -0
  296. package/build/runtime-scroll-Q6NRRL4F.js.br +0 -0
  297. package/build/runtime-scroll-Q6NRRL4F.js.gz +0 -0
  298. package/build/runtime-shapeBlends-CPHLT3XC.js +1 -0
  299. package/build/runtime-shapeBlends-CPHLT3XC.js.br +0 -0
  300. package/build/runtime-shapeBlends-CPHLT3XC.js.gz +0 -0
  301. package/build/runtime-text-TBHPCNPL.js +1 -0
  302. package/build/runtime-text-TBHPCNPL.js.br +0 -0
  303. package/build/runtime-text-TBHPCNPL.js.gz +0 -0
  304. package/build/runtime-textInputs-4HQER44D.js +1 -0
  305. package/build/runtime-textInputs-4HQER44D.js.br +0 -0
  306. package/build/runtime-textInputs-4HQER44D.js.gz +0 -0
  307. package/build/runtime-timeline-UKR4DEQS.js +1 -0
  308. package/build/runtime-timeline-UKR4DEQS.js.br +0 -0
  309. package/build/runtime-timeline-UKR4DEQS.js.gz +0 -0
  310. package/build/runtime-tracking-5HISHPEY.js +1 -0
  311. package/build/runtime-tracking-5HISHPEY.js.br +0 -0
  312. package/build/runtime-tracking-5HISHPEY.js.gz +0 -0
  313. package/build/runtime-transitions-FBNOSFXY.js +1 -0
  314. package/build/runtime-transitions-FBNOSFXY.js.br +0 -0
  315. package/build/runtime-transitions-FBNOSFXY.js.gz +0 -0
  316. package/build/runtime-ui2d-3AMS3CSG.js +1 -0
  317. package/build/runtime-ui2d-3AMS3CSG.js.br +0 -0
  318. package/build/runtime-ui2d-3AMS3CSG.js.gz +0 -0
  319. package/build/runtime-updater-3ELP7WMM.js +1 -0
  320. package/build/runtime-updater-3ELP7WMM.js.br +1 -0
  321. package/build/runtime-updater-3ELP7WMM.js.gz +0 -0
  322. package/build/runtime-variables-U36KPJ5V.js +1 -0
  323. package/build/runtime-variables-U36KPJ5V.js.br +0 -0
  324. package/build/runtime-variables-U36KPJ5V.js.gz +0 -0
  325. package/build/runtime-vectorShapes-GIS26ELU.js +1 -0
  326. package/build/runtime-vectorShapes-GIS26ELU.js.br +0 -0
  327. package/build/runtime-vectorShapes-GIS26ELU.js.gz +0 -0
  328. package/build/runtime-video-TZNR7MEM.js +1 -0
  329. package/build/runtime-video-TZNR7MEM.js.br +0 -0
  330. package/build/runtime-video-TZNR7MEM.js.gz +0 -0
  331. package/build/runtime-vignette-3KJD4P5D.js +1 -0
  332. package/build/runtime-vignette-3KJD4P5D.js.br +0 -0
  333. package/build/runtime-vignette-3KJD4P5D.js.gz +0 -0
  334. package/build/runtime-webgpu-LYDFJW3X.js +1 -0
  335. package/build/runtime-webgpu-LYDFJW3X.js.br +0 -0
  336. package/build/runtime-webgpu-LYDFJW3X.js.gz +0 -0
  337. package/build/runtime.cjs +6286 -4569
  338. package/build/runtime.js +1 -8175
  339. package/build/runtime.js.br +0 -0
  340. package/build/runtime.js.gz +0 -0
  341. package/build/runtime.standalone.js +1 -0
  342. package/build/runtime.standalone.js.br +0 -0
  343. package/build/runtime.standalone.js.gz +0 -0
  344. package/build/runtime.standalone.webgl.js +1 -0
  345. package/build/runtime.standalone.webgl.js.br +0 -0
  346. package/build/runtime.standalone.webgl.js.gz +0 -0
  347. package/build/runtime.standalone.webgpu.js +1 -0
  348. package/build/runtime.standalone.webgpu.js.br +0 -0
  349. package/build/runtime.standalone.webgpu.js.gz +0 -0
  350. package/build/runtime.standalone.webgpu.micro.js +1 -0
  351. package/build/runtime.standalone.webgpu.micro.js.br +0 -0
  352. package/build/runtime.standalone.webgpu.micro.js.gz +0 -0
  353. package/build/runtime.standalone.webgpu.min.js +1 -0
  354. package/build/runtime.standalone.webgpu.min.js.br +0 -0
  355. package/build/runtime.standalone.webgpu.min.js.gz +0 -0
  356. package/build/sky-alto.png +0 -0
  357. package/build/sky-cirrus.png +0 -0
  358. package/build/smaa-area.png +0 -0
  359. package/build/smaa-node-area.png +0 -0
  360. package/build/smaa-node-search.png +0 -0
  361. package/build/smaa-search.png +0 -0
  362. package/build/snippets/hana-82e9eb82a79dead4/js-imports.js +93 -0
  363. package/package.json +104 -89
  364. package/runtime.d.ts +301 -2
  365. package/build/ui.js +0 -3
@@ -0,0 +1 @@
1
+ import{a as t}from"./runtime-chunk-YXATXASV.js";import"./runtime-chunk-OFPUAZKY.js";import{a as n}from"./runtime-chunk-EOV2DL2V.js";import"./runtime-chunk-Y3BMDVJ7.js";import{Bc as e,Db as r,Fc as a,Le as o,Oc as i,Tc as c,Vc as s,we as y}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";new y,new c,new Float32Array([255/256/256**3,255/256/65536,255/256/256,255/256]);var l=new Map([[0,null],[1,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return min(x+y,1.0)*opacity+x*(1.0-opacity);}"],[2,"vec3 blend(const in vec3 x,const in vec3 y,const in float opacity){return y*opacity+x*(1.0-opacity);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){float a=min(y.a,opacity);return vec4(blend(x.rgb,y.rgb,a),max(x.a,a));}"],[3,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(x+y)*0.5*opacity+x*(1.0-opacity);}"],[4,"float blend(const in float x,const in float y){return(y==0.0)?y:max(1.0-(1.0-x)/y,0.0);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[5,"float blend(const in float x,const in float y){return(y==1.0)?y:min(x/(1.0-y),1.0);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[6,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return min(x,y)*opacity+x*(1.0-opacity);}"],[7,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return abs(x-y)*opacity+x*(1.0-opacity);}"],[8,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(x+y-2.0*x*y)*opacity+x*(1.0-opacity);}"],[9,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return max(x,y)*opacity+x*(1.0-opacity);}"],[10,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return x*y*opacity+x*(1.0-opacity);}"],[11,"float blend(const in float x,const in float y){return(y>0.0)?min(x/y,1.0):1.0;}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[12,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(1.0-abs(1.0-x-y))*opacity+x*(1.0-opacity);}"],[13,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return y*opacity+x*(1.0-opacity);}"],[14,"float blend(const in float x,const in float y){return(x<0.5)?(2.0*x*y):(1.0-2.0*(1.0-x)*(1.0-y));}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[15,"float blend(const in float x,const in float y){return(y==1.0)?y:min(x*x/(1.0-y),1.0);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[16,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(1.0-(1.0-x)*(1.0-y))*opacity+x*(1.0-opacity);}"],[17,"float blend(const in float x,const in float y){return(y<0.5)?(2.0*x*y+x*x*(1.0-2.0*y)):(sqrt(x)*(2.0*y-1.0)+2.0*x*(1.0-y));}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[18,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return max(x+y-1.0,0.0)*opacity+x*(1.0-opacity);}"]]),u=class extends e{constructor(t,n=1){super(),this.f=t,this.opacity=new o(n)}getOpacity(){return this.opacity.value}setOpacity(t){this.opacity.value=t}get blendFunction(){return this.f}set blendFunction(t){this.f=t,this.dispatchEvent({type:"change"})}getBlendFunction(){return this.blendFunction}setBlendFunction(t){this.blendFunction=t}getShaderCode(){return l.get(this.blendFunction)}},x=class extends e{constructor(t,n,{attributes:e=0,blendFunction:r=16,defines:a=new Map,uniforms:o=new Map,extensions:i=null,vertexShader:c=null}={}){super(),this.name=t,this.renderer=null,this.attributes=e,this.fragmentShader=n,this.vertexShader=c,this.defines=a,this.uniforms=o,this.extensions=i,this.blendMode=new u(r),this.blendMode.addEventListener("change",t=>this.setChanged())}getName(){return this.name}setRenderer(t){this.renderer=t}getDefines(){return this.defines}getUniforms(){return this.uniforms}getExtensions(){return this.extensions}getBlendMode(){return this.blendMode}getAttributes(){return this.attributes}setAttributes(t){this.attributes=t,this.setChanged()}getFragmentShader(){return this.fragmentShader}setFragmentShader(t){this.fragmentShader=t,this.setChanged()}getVertexShader(){return this.vertexShader}setVertexShader(t){this.vertexShader=t,this.setChanged()}setChanged(){this.dispatchEvent({type:"change"})}setDepthTexture(t,n=r){}update(t,n,e){}setSize(t,n){}initialize(t,n,e){}dispose(){for(let t of Object.keys(this)){let n=this[t];if(null!==n&&"object"==typeof n&&"function"==typeof n.dispose){if(n instanceof s||n===this.renderer)continue;this[t].dispose()}}}},d=(new Float32Array([0,0]),new Float32Array([0,1,1]),new Float32Array([0,1,1,2]),new Float32Array([0,1,2,2,3]),new Float32Array([0,1,2,3,4,4,5]),new Float32Array([0,1,2,3,4,5,7,8,9,10]),new a,new i,class extends x{constructor({blendFunction:t=13,hue:n=0,saturation:e=0}={}){super("HueSaturationEffect","uniform vec3 hue;uniform float saturation;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec3 color=vec3(dot(inputColor.rgb,hue.xyz),dot(inputColor.rgb,hue.zxy),dot(inputColor.rgb,hue.yzx));float average=(color.r+color.g+color.b)/3.0;vec3 diff=average-color;if(saturation>0.0){color+=diff*(1.0-1.0/(1.001-saturation));}else{color+=diff*-saturation;}outputColor=vec4(min(color,1.0),inputColor.a);}",{blendFunction:t,uniforms:new Map([["hue",new o(new a)],["saturation",new o(e)]])}),this.hue=n}get saturation(){return this.uniforms.get("saturation").value}set saturation(t){this.uniforms.get("saturation").value=t}getSaturation(){return this.saturation}setSaturation(t){this.saturation=t}get hue(){let t=this.uniforms.get("hue").value;return Math.acos((3*t.x-1)/2)}set hue(t){let n=Math.sin(t),e=Math.cos(t);this.uniforms.get("hue").value.set((2*e+1)/3,(-Math.sqrt(3)*n-e+1)/3,(Math.sqrt(3)*n-e+1)/3)}getHue(){return this.hue}setHue(t){this.hue=t}});function w(t,n,e){return t+(n-t)*e}function h(t,n,e,r){let a=w(t,n,.75),o=w(e,r,.75);return w(a,o,.875)}new c,Math.PI,new a,new a,new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,0,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([1,0,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([0,1,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([0,1,1]),new Float32Array([1,1,1]),new Float32Array(2),new Float32Array(2),new Float32Array([0,-.25,.25,-.125,.125,-.375,.375]),new Float32Array([0,0]),new Float32Array([.25,-.25]),new Float32Array([-.25,.25]),new Float32Array([.125,-.125]),new Float32Array([-.125,.125]),new Uint8Array([0,0]),new Uint8Array([3,0]),new Uint8Array([0,3]),new Uint8Array([3,3]),new Uint8Array([1,0]),new Uint8Array([4,0]),new Uint8Array([1,3]),new Uint8Array([4,3]),new Uint8Array([0,1]),new Uint8Array([3,1]),new Uint8Array([0,4]),new Uint8Array([3,4]),new Uint8Array([1,1]),new Uint8Array([4,1]),new Uint8Array([1,4]),new Uint8Array([4,4]),new Uint8Array([0,0]),new Uint8Array([1,0]),new Uint8Array([0,2]),new Uint8Array([1,2]),new Uint8Array([2,0]),new Uint8Array([3,0]),new Uint8Array([2,2]),new Uint8Array([3,2]),new Uint8Array([0,1]),new Uint8Array([1,1]),new Uint8Array([0,3]),new Uint8Array([1,3]),new Uint8Array([2,1]),new Uint8Array([3,1]),new Uint8Array([2,3]),new Uint8Array([3,3]),new Map([[h(0,0,0,0),new Float32Array([0,0,0,0])],[h(0,0,0,1),new Float32Array([0,0,0,1])],[h(0,0,1,0),new Float32Array([0,0,1,0])],[h(0,0,1,1),new Float32Array([0,0,1,1])],[h(0,1,0,0),new Float32Array([0,1,0,0])],[h(0,1,0,1),new Float32Array([0,1,0,1])],[h(0,1,1,0),new Float32Array([0,1,1,0])],[h(0,1,1,1),new Float32Array([0,1,1,1])],[h(1,0,0,0),new Float32Array([1,0,0,0])],[h(1,0,0,1),new Float32Array([1,0,0,1])],[h(1,0,1,0),new Float32Array([1,0,1,0])],[h(1,0,1,1),new Float32Array([1,0,1,1])],[h(1,1,0,0),new Float32Array([1,1,0,0])],[h(1,1,0,1),new Float32Array([1,1,0,1])],[h(1,1,1,0),new Float32Array([1,1,1,0])],[h(1,1,1,1),new Float32Array([1,1,1,1])]]);var v=class extends t{constructor(){super(d),this._hue=0}set hue(t){this._hue=t,this.effect.setHue(t)}get hue(){return this._hue}set saturation(t){this.effect.uniforms.get("saturation").value=t}get saturation(){return this.effect.uniforms.get("saturation").value}};n("hueSaturation",()=>new v);
@@ -0,0 +1 @@
1
+ import{b as e}from"./runtime-chunk-J2I4VBHR.js";import"./runtime-chunk-ARTGMJ7O.js";import{a as r}from"./runtime-chunk-YUK55LCN.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{t}from"./runtime-chunk-DJJZN367.js";import"./runtime-chunk-QZ35BPGB.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-Z5OH244S.js";import"./runtime-chunk-TZCHGFVF.js";import{fa as i}from"./runtime-chunk-OW6T4XFV.js";import{ld as n}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";function a(e){let r;if(e.index)for(let t=0;t<e.index.array.length;t+=3)r=e.index.array[t],e.index.array[t]=e.index.array[t+2],e.index.array[t+2]=r}function o(r){return r instanceof e?"SubdivObject":"NonParametricGeometry"===r.geometry.type?"NonParametric":"Mesh"}function l(e,l){let s=function(e,r){let n={};return e.traverseEntity(e=>{if(!e.visible||!(e instanceof t)||"Mesh"!==e.type||Array.isArray(e.material)||e.states&&Object.keys(e.states).length)return;let a=e.parent;for(;a;){if(a instanceof t&&e.states&&Object.keys(e.states).length)return;a=a.parent}let l=e.material.uuid,s=r.shared.materials[l];if(s){if(!i.isMergable(s))return}else{let t=r.scene.objects.get(e.uuid)?.data;if(t&&"material"in t&&"string"!=typeof t.material){if(!i.isMergable(t.material))return;l=i.getHash(t.material)}}n[l]||(n[l]={});let u=n[l][o(e)];if(u){if(u.push(e),e.cloner)for(let r of e.cloner.children)u.push(r)}else if(n[l][o(e)]=[e],e.cloner)for(let r of e.cloner.children)n[l][o(e)].push(r)}),n}(l,e),u=function(e){let r=0;return Object.values(e).forEach(e=>{Object.values(e).forEach(e=>{let t=e.length;t>r&&(r=t)})}),r}(s),c=new Array(u),m=0,f=new Array(u),h=0,d=new Array(u),p=0,j=new Array(u),y=0;for(let[e,i]of Object.entries(s))for(let u of Object.values(i)){if(h=0,p=0,u.forEach(e=>{e instanceof t&&(f[h++]=e.geometry.clone(),d[p++]=e)}),p<2)continue;for(let e=0;e<p;e++)d[e].updateWorldMatrix(!0,!1),f[e].applyMatrix4(d[e].matrixWorld),d[e].matrixWorld.determinant()<0&&a(f[e]);let i=r(f.slice(0,h),!1);if(i){let r;"SubdivObject"===e?(console.warn("Turning subdiv object into mesh"),r=new n(i,d[0].material)):r=new n(i,d[0].material),r.castShadow=d[0].castShadow,r.receiveShadow=d[0].receiveShadow,l.add(r);let a=e=>{y=0;for(let r of e)r.children&&a(r.children),r instanceof t&&(Array.isArray(r.material)||s[r.material.uuid]&&s[r.material.uuid][o(r)]&&s[r.material.uuid][o(r)].length>1||(j[y++]=r));for(let e=0;e<y;e++)l.attach(j[e])};for(let e=0;e<p;e++){let r=d[e];a(r.children),c[m++]=r}}}for(let e=0;e<m;e++)c[e].removeFromParent()}export{l as mergeStaticGeometries,a as reverseWindingOrder};
@@ -0,0 +1,3 @@
1
+ 8
2
+ �.�����f����ɧ�-M���""���f�P��ڪZH�������Z$k��-g�2���:���z|�d��1���`��*������J�ꆤ��d���|�&0BQJB��1�.�A���;q�e������[gOl����?6��$�K�
3
+ a�G��W�"qm�R�d C^&�J��J���X��A+i�KDV)eoʩ�a�a����t�g��rhDzJ�[�e�.PQ���/�X�!�������0ӗ�ָ��1���b�9T����)$�k=���Q����
@@ -0,0 +1 @@
1
+ import"./runtime-chunk-EAXCCTR5.js";import{g as t}from"./runtime-chunk-YVNDW5TV.js";import"./runtime-chunk-T6CHRQ6N.js";import"./runtime-chunk-NTUTXO7Q.js";import{a as e}from"./runtime-chunk-UK4GQHMO.js";import{a}from"./runtime-chunk-R43XZP65.js";import"./runtime-chunk-5VJGAC3M.js";import"./runtime-chunk-BXPWRF47.js";import"./runtime-chunk-O5NBGIBR.js";import"./runtime-chunk-23QOKH2J.js";import"./runtime-chunk-TU4KDRKR.js";import"./runtime-chunk-FTVQTRM7.js";import{a as i,b as r}from"./runtime-chunk-VAVYZ35B.js";import{a as s,c as o}from"./runtime-chunk-FQNSP44B.js";import"./runtime-chunk-HER7UVU3.js";import"./runtime-chunk-J2I4VBHR.js";import"./runtime-chunk-ARTGMJ7O.js";import"./runtime-chunk-FDRTCOJ5.js";import{aa as n}from"./runtime-chunk-YUK55LCN.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{b as h,e as m}from"./runtime-chunk-MM75L5X4.js";import"./runtime-chunk-DJJZN367.js";import"./runtime-chunk-QZ35BPGB.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-Z5OH244S.js";import{a as c}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-OW6T4XFV.js";import{Bc as p,Ec as d,Fc as l}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var u=(t,e)=>e.some(e=>e instanceof RegExp?e.test(t):e===t);var g=class{constructor({url:t,context:e},a,i,r){if(this.controlsManager=a,this.shared=i,this.condition=r,!t)throw new Error("Missing property");this.url=t.startsWith("mailto:")?t:function(t,e){if(e={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...e},t=t.trim(),/^data:/i.test(t))return((t,{stripHash:e})=>{let a=/^data:(?<type>[^,]*?),(?<data>[^#]*?)(?:#(?<hash>.*))?$/.exec(t);if(!a)throw new Error(`Invalid URL: ${t}`);let{type:i,data:r,hash:s}=a.groups,o=i.split(";");s=e?"":s;let n=!1;"base64"===o[o.length-1]&&(o.pop(),n=!0);let h=(o.shift()||"").toLowerCase(),m=[...o.map(t=>{let[e,a=""]=t.split("=").map(t=>t.trim());return"charset"===e&&(a=a.toLowerCase(),"us-ascii"===a)?"":`${e}${a?`=${a}`:""}`}).filter(Boolean)];return n&&m.push("base64"),(m.length>0||h&&"text/plain"!==h)&&m.unshift(h),`data:${m.join(";")},${n?r.trim():r}${s?`#${s}`:""}`})(t,e);if(/^view-source:/i.test(t))throw new Error("`view-source:` is not supported as it is a non-standard protocol");let a=t.startsWith("//");!a&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,e.defaultProtocol));let i=new URL(t);if(e.forceHttp&&e.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(e.forceHttp&&"https:"===i.protocol&&(i.protocol="http:"),e.forceHttps&&"http:"===i.protocol&&(i.protocol="https:"),e.stripAuthentication&&(i.username="",i.password=""),e.stripHash?i.hash="":e.stripTextFragment&&(i.hash=i.hash.replace(/#?:~:text.*?$/i,"")),i.pathname){let t=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,e=0,a="";for(;;){let r=t.exec(i.pathname);if(!r)break;let s=r[0],o=r.index;a+=i.pathname.slice(e,o).replace(/\/{2,}/g,"/"),a+=s,e=o+s.length}a+=i.pathname.slice(e,i.pathname.length).replace(/\/{2,}/g,"/"),i.pathname=a}if(i.pathname)try{i.pathname=decodeURI(i.pathname)}catch{}if(!0===e.removeDirectoryIndex&&(e.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let t=i.pathname.split("/"),a=t[t.length-1];u(a,e.removeDirectoryIndex)&&(t=t.slice(0,-1),i.pathname=t.slice(1).join("/")+"/")}if(i.hostname&&(i.hostname=i.hostname.replace(/\.$/,""),e.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(i.hostname)&&(i.hostname=i.hostname.replace(/^www\./,""))),Array.isArray(e.removeQueryParameters))for(let t of[...i.searchParams.keys()])u(t,e.removeQueryParameters)&&i.searchParams.delete(t);if(!0===e.removeQueryParameters&&(i.search=""),e.sortQueryParameters){i.searchParams.sort();try{i.search=decodeURIComponent(i.search)}catch{}}e.removeTrailingSlash&&(i.pathname=i.pathname.replace(/\/$/,""));let r=t;return t=i.toString(),!e.removeSingleSlash&&"/"===i.pathname&&!r.endsWith("/")&&""===i.hash&&(t=t.replace(/\/$/,"")),(e.removeTrailingSlash||"/"===i.pathname)&&""===i.hash&&e.removeSingleSlash&&(t=t.replace(/\/$/,"")),a&&!e.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\/\//,"")),t}(t,{removeTrailingSlash:!1,removeSingleSlash:!1,stripWWW:!1}),this.context=e??"tab"}dispatch(){if(!1===m(this.shared,this.condition))return!1;o?window.location.assign(this.url):("tab"===this.context||s&&"none"===this.context?window.open(this.url,"_blank"):"window"===this.context?window.open(this.url,"_blank",`width=${window.innerWidth}, height=${window.innerHeight}`):window.open(this.url,"_parent"),this.controlsManager.orbitControls?.onPointerUp(i[0]),r())}},w=class{constructor(t,e,a,i,r){this.data=t,this.page=e,this.shared=a,this.eventManager=i,this.condition=r}dispatch(){if(!1===m(this.shared,this.condition))return!1;clearTimeout(this.timeoutId),delete this.timeoutId,this.timeoutId=window.setTimeout(()=>{this.shared.reset(this.shared.data,!0),e(this.page,this.shared,!0),this.eventManager.reset(),this.eventManager.controlsManager.gameControl?.reset(!0),this.page.switchToPlayCamera(),this.eventManager.controlsManager.requestRender(),delete this.timeoutId},1e3*(this.data.delay??0))}dispose(){clearTimeout(this.timeoutId),delete this.timeoutId}},f={type:"beginState"},v={type:"completeState",isfromEntity:!1},C={type:"requestRender"},y=class extends p{constructor(t,e,a,i){super(),this.data=t,this.page=e,this.shared=a,this.condition=i,this.toggleIsForward=!1,this.posStart=new l,this.posEnd=new l,this.qStart=new d,this.qEnd=new d,this.zoomStart=1,this.zoomEnd=1}init(){}get playing(){return this.animation&&this.animation.began&&!this.animation.completed}buildAnimation(e=!1){if(!this.data.animate)return;let i=this.page.scene.find(this.data.targetCamera);if(!i||!i.visible)throw new ReferenceError("Target camera not founded or not visible");let r={t:0};this.posStart.copy(this.page.activeCamera.position),this.qStart.copy(this.page.activeCamera.quaternion),this.zoomStart=this.page.activeCamera.zoom,this.animation=a({targets:r,t:1,...t(this.data),update:()=>{0===r.t&&("Toggle"!==this.data.runMode||this.toggleIsForward?(this.posEnd.copy(i.position),this.qEnd.copy(i.quaternion),this.zoomEnd=i.zoom,this.fromCamera=this.page.activeCamera,this.switchCamera(i.uuid)):this.fromCamera&&(this.posEnd.copy(this.fromCamera.position),this.qEnd.copy(this.fromCamera.quaternion),this.zoomEnd=this.fromCamera.zoom,this.switchCamera(this.fromCamera.uuid)),this.page.activeCamera.dispatchEvent(f));let t=this.page.activeCamera;t.position.lerpVectors(this.posStart,this.posEnd,r.t),t.quaternion.slerpQuaternions(this.qStart,this.qEnd,r.t),t.zoom=this.zoomStart+(this.zoomEnd-this.zoomStart)*r.t,t.wasMovedBySwitchCameraAction=!0,t.updateMatrix(),t.updateMatrixWorld(),t.updateProjectionMatrix(),t.dispatchEvent(C),1===r.t&&t.dispatchEvent(v)}})}switchCamera(t){let e=this.page.activeCamera,a=this.page.scene.find(t);if(!a||!a.visible)throw new ReferenceError("Target camera not founded or not visible");this.page.switchActiveCamera(a),e.dispatchEvent({type:"cameraChange",camera:a})}play(){if(!1===m(this.shared,this.condition))return!1;if(!this.playing&&this.page.activeCamera.uuid!==this.data.targetCamera)try{clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(()=>{delete this.timeoutId,this.data.animate?(this.buildAnimation(),this.animation?.play()):this.switchCamera(this.data.targetCamera)},1e3*this.data.delay)}catch{}}pause(){this.animation?.pause(),clearTimeout(this.timeoutId),delete this.timeoutId}toggle(t){if(!1===m(this.shared,this.condition))return!1;if(window.clearTimeout(this.timeoutId),delete this.timeoutId,t!==this.toggleIsForward)try{this.playing?(this.animation?.pause(),this.toggleIsForward=t??!this.toggleIsForward,this.buildAnimation(!0),this.animation?.play()):this.timeoutId=window.setTimeout(()=>{this.toggleIsForward=t??!this.toggleIsForward,this.data.animate?(this.animation?.pause(),this.buildAnimation(),this.animation?.play()):(this.toggleIsForward?(this.fromCamera=this.page.activeCamera,this.switchCamera(this.data.targetCamera)):this.fromCamera&&this.switchCamera(this.fromCamera.uuid),this.page.activeCamera.dispatchEvent(v),this.page.activeCamera.dispatchEvent(C))},1e3*this.data.delay)}catch{}}playFromCurrent(){this.toggle(!0)}reverseFromCurrent(){this.toggle(!1)}dispose(){this.pause(),this.toggleIsForward=!1}},I=class{constructor(t,e,a,i){this.data=t,this.page=e,this.shared=a,this.condition=i}dispatch(){if(!1===m(this.shared,this.condition))return!1;("single"===this.data.target?this.data.variableId?[this.data.variableId]:[]:Object.keys(this.shared.getVariables())).forEach(t=>{this.shared.getVariable(t);let e=this.shared.data.variables.data(t)?.value;void 0!==e&&this.shared.updateVariable(t,e),this.shared.enableLocalStorageForPersistentVariables&&localStorage.removeItem(n(t))})}dispose(){}};h("Link",({data:t,eventManager:e,shared:a,actionCondition:i})=>new g(t,e.controlsManager,a,i)),h("Reset",({data:t,page:e,shared:a,eventManager:i,actionCondition:r})=>new w(t,e,a,i,r)),h("SwitchCamera",({data:t,page:e,shared:a,actionCondition:i})=>new y(t,e,a,i)),h("ClearLocalStorage",({data:t,page:e,shared:a,actionCondition:i})=>new I(t,e,a,i)),c("misc-actions");
@@ -0,0 +1 @@
1
+ import{a as t,b as e,c as s,d as i}from"./runtime-chunk-7NBWIU4W.js";import"./runtime-chunk-5CH7XRKY.js";import{a as n}from"./runtime-chunk-NBYTQLIB.js";import{h as r}from"./runtime-chunk-BXPWRF47.js";import"./runtime-chunk-O5NBGIBR.js";import"./runtime-chunk-23QOKH2J.js";import"./runtime-chunk-TU4KDRKR.js";import{a as o,b as a}from"./runtime-chunk-DZNU62CT.js";import{a as h}from"./runtime-chunk-VAVYZ35B.js";import{e as c}from"./runtime-chunk-FQNSP44B.js";import"./runtime-chunk-HER7UVU3.js";import"./runtime-chunk-ARTGMJ7O.js";import"./runtime-chunk-LATYCOUS.js";import"./runtime-chunk-FDRTCOJ5.js";import"./runtime-chunk-YUK55LCN.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{f as u,g as m}from"./runtime-chunk-MM75L5X4.js";import"./runtime-chunk-DJJZN367.js";import{e as v,f as p}from"./runtime-chunk-QZ35BPGB.js";import"./runtime-chunk-4KZXQGUQ.js";import{a as d}from"./runtime-chunk-Z5OH244S.js";import{a as E}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-OW6T4XFV.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var f=class{constructor(t,e,s,i,n,r){this.id=t,this.data=e,this.object=s,this.entered=!1,this.actions=u(e,e.actions,i,n,r,s)}disconnect(){m(this.actions)}dispatchEnter(){this.actions.Transition.forEach(t=>{t.object.currentTransitionEvent!==this&&(t.object.currentTransitionEvent=this,t.init())}),this.entered||(this.entered=!0,this.actions.TimelineAnimation.forEach(t=>t.playFromCurrent()),this.actions.Transition.forEach(t=>t.playFromCurrent()),this.actions.Animation.forEach(t=>t.play()),this.actions.Create.forEach(t=>t.dispatchStart()),this.actions.Particles.forEach(t=>t.dispatchBasic()),this.actions.Destroy.forEach(t=>t.dispatch()),this.actions.SwitchCamera.forEach(t=>t.playFromCurrent()),this.actions.SceneTransition.forEach(t=>t.dispatch()),this.actions.SetVariable.forEach(t=>t.checkConditions()),this.actions.SetVariable.forEach(t=>t.dispatch()),this.actions.DynamicVariablePlay.forEach(t=>t.dispatch()),this.actions.ClearLocalStorage.forEach(t=>t.dispatch()),this.actions.UserAPI.forEach(t=>t.dispatch()))}dispatchLeave(){this.actions.Transition.forEach(t=>{t.object.currentTransitionEvent!==this&&(t.object.currentTransitionEvent=this,t.init())}),this.entered&&(this.entered=!1,this.actions.TimelineAnimation.forEach(t=>t.reverseFromCurrent()),this.actions.Create.forEach(t=>t.dispatchStop()),this.actions.Transition.forEach(t=>t.reverseFromCurrent()),this.actions.Particles.forEach(t=>t.reverseFromCurrent()),this.actions.SwitchCamera.forEach(t=>t.reverseFromCurrent()))}dispatchUserEvent(t){this.actions.Transition.forEach(t=>{t.object.currentTransitionEvent!==this&&(t.object.currentTransitionEvent=this,t.init())}),t?(this.actions.Transition.forEach(t=>t.reverseFromCurrent()),this.actions.Particles.forEach(t=>t.reverseFromCurrent()),this.actions.Animation.forEach(t=>t.reverseFromCurrent()),this.actions.TimelineAnimation.forEach(t=>t.reverseFromCurrent()),this.actions.SwitchCamera.forEach(t=>t.reverseFromCurrent())):(this.actions.Transition.forEach(t=>t.playFromCurrent()),this.actions.Animation.forEach(t=>t.playFromCurrent()),this.actions.TimelineAnimation.forEach(t=>t.playFromCurrent()),this.actions.Create.forEach(t=>t.dispatch()),this.actions.Particles.forEach(t=>t.dispatchBasic()),this.actions.Destroy.forEach(t=>t.dispatch()),this.actions.SwitchCamera.forEach(t=>t.playFromCurrent())),this.actions.SceneTransition.forEach(t=>t.dispatch()),this.actions.SetVariable.forEach(t=>t.checkConditions()),this.actions.SetVariable.forEach(t=>t.dispatch()),this.actions.DynamicVariablePlay.forEach(t=>t.dispatch()),this.actions.ClearLocalStorage.forEach(t=>t.dispatch()),this.actions.UserAPI.forEach(t=>t.dispatch())}},j=class extends o{constructor(t,e){super(t),this.eventManager=e,this.eventsPerObjects={},this.objects=[],this.objects2D=[],this._prevObjects=[],this.onMouseDown=t=>{h.length>1||(this.eventContext.updateRaycaster(t),this.handleMouseHoverEvent())},this.onMouseUp=t=>{h.length>1||this.handleMouseHoverEvent(!0)},this.onMouseMove=t=>{h.length>1||(this.eventContext.updateRaycaster(t),this.handleMouseHoverEvent())},this.onUserEvent=({eventName:t,target:e,reverse:s})=>{if(!t||!e)return;let i=n(t);i&&"MouseHover"===i&&(e.dispatchEvent({type:"beginEvent",eventName:"MouseHover"}),this.eventsPerObjects[e.uuid]?.forEach(t=>t.dispatchUserEvent(s)))}}connect(){let{page:t,sharedAssets:e}=this.eventContext,s=(s,i)=>{if(s.visible&&s.data?.events.length){for(let{id:i,data:n}of s.data.events)if(!n.disabled&&"MouseHover"===n.type)try{let r=new f(i,n,s,t,e,this.eventManager);this.eventsPerObjects[s.uuid]?this.eventsPerObjects[s.uuid].push(r):this.eventsPerObjects[s.uuid]=[r]}catch(t){d&&console.error(t)}this.eventsPerObjects[s.uuid]?.length&&this.objects.push(v(s)?i:s)}};if(t.traverseEntity(t=>{(p(t)||t instanceof r)&&t.frame?.traverse(e=>{s(e,t)}),s(t)}),!this.objects.length)return;let{domElement:i}=this.eventContext;this.domEventsNeeded.clear(),c&&(this.domEventsNeeded.add("pointerdown"),i.addEventListener("pointerdown",this.onMouseDown),this.domEventsNeeded.add("pointerup"),i.addEventListener("pointerup",this.onMouseUp)),this.domEventsNeeded.add("pointermove"),i.addEventListener("pointermove",this.onMouseMove),this.objects.forEach(t=>{t.addEventListener("userEvent",this.onUserEvent)})}disconnect(){if(!this.objects.length)return;let{domElement:t}=this.eventContext;this.domEventsNeeded.clear(),c&&(t.removeEventListener("pointerdown",this.onMouseDown),t.removeEventListener("pointerup",this.onMouseUp)),t.removeEventListener("pointermove",this.onMouseMove),Object.values(this.eventsPerObjects).forEach(t=>{t.forEach(t=>{t.disconnect()})}),this.objects.forEach(t=>{t.removeEventListener("userEvent",this.onUserEvent)})}handleMouseHoverEvent(n=!1){let r=[];if(!n){let{stopRaycast:n,raycaster:o,page:a,pointerScreen:h}=this.eventContext,c=!1;if(a.uiCanvas&&(c=s(a,[h.x,h.y],Object.keys(this.eventsPerObjects),t=>{r.push(t)})),n&&!c){let i=t(o,a,this.objects);r=e(i),i.forEach(t=>{p(t.object)&&s(t.object,[t?.uv?.x??0,t?.uv?.y??0],Object.keys(this.eventsPerObjects),t=>{r.push(t)})})}else this.objects.forEach(t=>{let e=i(o,t);e&&(r.push(t),p(t)&&s(t,[e?.uv?.x??0,e?.uv?.y??0],Object.keys(this.eventsPerObjects),t=>{r.push(t)}))})}this._prevObjects.length&&this._prevObjects.forEach(t=>{r.includes(t)||(t.dispatchEvent({type:"beginEvent",eventName:"MouseHover"}),this.eventsPerObjects[t.uuid]?.forEach(t=>t.dispatchLeave()))}),r.length&&r.forEach(t=>{t.dispatchEvent({type:"beginEvent",eventName:"MouseHover"}),this.eventsPerObjects[t.uuid]?.forEach(t=>t.dispatchEnter())}),this._prevObjects=r}};a("MouseHover",({eventContext:t,eventManager:e})=>new j(t,e)),E("mousehover");
@@ -0,0 +1 @@
1
+ import"./runtime-chunk-ML3Z74BL.js";var t,e=(t=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0,function(e){var r,n;(e=typeof(e=e||{})<"u"?e:{}).ready=new Promise(function(t,e){r=t,n=e});var o,_={};for(o in e)e.hasOwnProperty(o)&&(_[o]=e[o]);var p=[],i="./this.program",a="";typeof document<"u"&&document.currentScript&&(a=document.currentScript.src),t&&(a=t),a=0!==a.indexOf("blob:")?a.substr(0,a.replace(/[?#].*/,"").lastIndexOf("/")+1):"";var s=e.print||console.log.bind(console),c=e.printErr||console.warn.bind(console);for(o in _)_.hasOwnProperty(o)&&(e[o]=_[o]);_=null,e.arguments&&(p=e.arguments),e.thisProgram&&(i=e.thisProgram),e.quit&&e.quit;var u,l,y=[];e.wasmBinary&&(l=e.wasmBinary),e.noExitRuntime,"object"!=typeof WebAssembly&&V("no native wasm support detected");var m,f=!1;function d(t,e){t||V("Assertion failed: "+e)}var g,b,h,v,w,C=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function A(t,e,r){for(var n=e+r,o=e;t[o]&&!(o>=n);)++o;if(o-e>16&&t.subarray&&C)return C.decode(t.subarray(e,o));for(var _="";e<o;){var p=t[e++];if(128&p){var i=63&t[e++];if(192!=(224&p)){var a=63&t[e++];if((p=224==(240&p)?(15&p)<<12|i<<6|a:(7&p)<<18|i<<12|a<<6|63&t[e++])<65536)_+=String.fromCharCode(p);else{var s=p-65536;_+=String.fromCharCode(55296|s>>10,56320|1023&s)}}else _+=String.fromCharCode((31&p)<<6|i)}else _+=String.fromCharCode(p)}return _}function P(t,e){return t?A(h,t,e):""}function j(t,e){return t%e>0&&(t+=e-t%e),t}function D(t){g=t,e.HEAP8=b=new Int8Array(t),e.HEAP16=new Int16Array(t),e.HEAP32=v=new Int32Array(t),e.HEAPU8=h=new Uint8Array(t),e.HEAPU16=new Uint16Array(t),e.HEAPU32=new Uint32Array(t),e.HEAPF32=w=new Float32Array(t),e.HEAPF64=new Float64Array(t)}e.INITIAL_MEMORY;var x,S=[],M=[],N=[];function O(t){S.unshift(t)}function R(t){N.unshift(t)}var E,T,z=0,F=null,k=null;function V(t){e.onAbort&&e.onAbort(t),c(t="Aborted("+t+")"),f=!0,t+=". Build with -s ASSERTIONS=1 for more info.";var r=new WebAssembly.RuntimeError(t);throw n(r),r}function W(t){return t.startsWith("data:application/octet-stream;base64,")}function H(t){try{if(t==E&&l)return new Uint8Array(l);throw"both async and sync fetching of the wasm failed"}catch(t){V(t)}}function L(t){for(;t.length>0;){var r=t.shift();if("function"!=typeof r){var n=r.func;"number"==typeof n?void 0===r.arg?Q(n)():Q(n)(r.arg):n(void 0===r.arg?null:r.arg)}else r(e)}}e.preloadedImages={},e.preloadedAudios={},W(E="navmesh.wasm")||(T=E,E=e.locateFile?e.locateFile(T,a):a+T);var I=[];function Q(t){var e=I[t];return e||(t>=I.length&&(I.length=t+1),I[t]=e=x.get(t)),e}function Y(t,e){x.set(t,e),I[t]=e}function U(t){this.excPtr=t,this.ptr=t-16,this.set_type=function(t){v[this.ptr+4>>2]=t},this.get_type=function(){return v[this.ptr+4>>2]},this.set_destructor=function(t){v[this.ptr+8>>2]=t},this.get_destructor=function(){return v[this.ptr+8>>2]},this.set_refcount=function(t){v[this.ptr>>2]=t},this.set_caught=function(t){t=t?1:0,b[this.ptr+12|0]=t},this.get_caught=function(){return 0!=b[this.ptr+12|0]},this.set_rethrown=function(t){t=t?1:0,b[this.ptr+13|0]=t},this.get_rethrown=function(){return 0!=b[this.ptr+13|0]},this.init=function(t,e){this.set_type(t),this.set_destructor(e),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var t=v[this.ptr>>2];v[this.ptr>>2]=t+1},this.release_ref=function(){var t=v[this.ptr>>2];return v[this.ptr>>2]=t-1,1===t}}function B(t){try{return m.grow(t-g.byteLength+65535>>>16),D(m.buffer),1}catch{}}var q={};function G(){if(!G.strings){var t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:i||"./this.program"};for(var e in q)void 0===q[e]?delete t[e]:t[e]=q[e];var r=[];for(var e in t)r.push(e+"="+t[e]);G.strings=r}return G.strings}var J={mappings:{},buffers:[null,[],[]],printChar:function(t,e){var r=J.buffers[t];0===e||10===e?((1===t?s:c)(A(r,0)),r.length=0):r.push(e)},varargs:void 0,get:function(){return J.varargs+=4,v[J.varargs-4>>2]},getStr:function(t){return P(t)},get64:function(t,e){return t}};function X(t){return t%4==0&&(t%100!=0||t%400==0)}function Z(t,e){for(var r=0,n=0;n<=e;r+=t[n++]);return r}var K=[31,29,31,30,31,30,31,31,30,31,30,31],$=[31,28,31,30,31,30,31,31,30,31,30,31];function tt(t,e){for(var r=new Date(t.getTime());e>0;){var n=X(r.getFullYear()),o=r.getMonth(),_=(n?K:$)[o];if(!(e>_-r.getDate()))return r.setDate(r.getDate()+e),r;e-=_-r.getDate()+1,r.setDate(1),o<11?r.setMonth(o+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r}var et,rt={l:function(t){return Pr(t+16)+16},k:function(t,e,r){throw new U(t).init(e,r),t},b:function(){V("")},j:function(t,e,r){h.copyWithin(t,e,e+r)},a:function(t){var e=h.length,r=2147483648;if((t>>>=0)>r)return!1;for(var n=1;n<=4;n*=2){var o=e*(1+.2/n);if(o=Math.min(o,t+100663296),B(Math.min(r,j(Math.max(t,o),65536))))return!0}return!1},g:function(t,e){var r=0;return G().forEach(function(n,o){var _=e+r;v[t+4*o>>2]=_,function(t,e){for(var r=0;r<t.length;++r)b[0|e++]=t.charCodeAt(r);b[0|e]=0}(n,_),r+=n.length+1}),0},h:function(t,e){var r=G();v[t>>2]=r.length;var n=0;return r.forEach(function(t){n+=t.length+1}),v[e>>2]=n,0},c:function(t){return 0},e:function(t,e,r,n){var o=J.getStreamFromFD(t),_=J.doReadv(o,e,r);return v[n>>2]=_,0},i:function(t,e,r,n,o){},d:function(t,e,r,n){for(var o=0,_=0;_<r;_++){var p=v[e>>2],i=v[e+4>>2];e+=8;for(var a=0;a<i;a++)J.printChar(t,h[p+a]);o+=i}return v[n>>2]=o,0},f:function(t,e,r,n){return function(t,e,r,n){var o=v[n+40>>2],_={tm_sec:v[n>>2],tm_min:v[n+4>>2],tm_hour:v[n+8>>2],tm_mday:v[n+12>>2],tm_mon:v[n+16>>2],tm_year:v[n+20>>2],tm_wday:v[n+24>>2],tm_yday:v[n+28>>2],tm_isdst:v[n+32>>2],tm_gmtoff:v[n+36>>2],tm_zone:o?P(o):""},p=P(r),i={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var a in i)p=p.replace(new RegExp(a,"g"),i[a]);var s=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["January","February","March","April","May","June","July","August","September","October","November","December"];function u(t,e,r){for(var n="number"==typeof t?t.toString():t||"";n.length<e;)n=r[0]+n;return n}function l(t,e){return u(t,e,"0")}function y(t,e){function r(t){return t<0?-1:t>0?1:0}var n;return 0===(n=r(t.getFullYear()-e.getFullYear()))&&0===(n=r(t.getMonth()-e.getMonth()))&&(n=r(t.getDate()-e.getDate())),n}function m(t){switch(t.getDay()){case 0:return new Date(t.getFullYear()-1,11,29);case 1:return t;case 2:return new Date(t.getFullYear(),0,3);case 3:return new Date(t.getFullYear(),0,2);case 4:return new Date(t.getFullYear(),0,1);case 5:return new Date(t.getFullYear()-1,11,31);case 6:return new Date(t.getFullYear()-1,11,30)}}function f(t){var e=tt(new Date(t.tm_year+1900,0,1),t.tm_yday),r=new Date(e.getFullYear(),0,4),n=new Date(e.getFullYear()+1,0,4),o=m(r),_=m(n);return y(o,e)<=0?y(_,e)<=0?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var d={"%a":function(t){return s[t.tm_wday].substring(0,3)},"%A":function(t){return s[t.tm_wday]},"%b":function(t){return c[t.tm_mon].substring(0,3)},"%B":function(t){return c[t.tm_mon]},"%C":function(t){return l((t.tm_year+1900)/100|0,2)},"%d":function(t){return l(t.tm_mday,2)},"%e":function(t){return u(t.tm_mday,2," ")},"%g":function(t){return f(t).toString().substring(2)},"%G":function(t){return f(t)},"%H":function(t){return l(t.tm_hour,2)},"%I":function(t){var e=t.tm_hour;return 0==e?e=12:e>12&&(e-=12),l(e,2)},"%j":function(t){return l(t.tm_mday+Z(X(t.tm_year+1900)?K:$,t.tm_mon-1),3)},"%m":function(t){return l(t.tm_mon+1,2)},"%M":function(t){return l(t.tm_min,2)},"%n":function(){return"\n"},"%p":function(t){return t.tm_hour>=0&&t.tm_hour<12?"AM":"PM"},"%S":function(t){return l(t.tm_sec,2)},"%t":function(){return"\t"},"%u":function(t){return t.tm_wday||7},"%U":function(t){var e=new Date(t.tm_year+1900,0,1),r=0===e.getDay()?e:tt(e,7-e.getDay()),n=new Date(t.tm_year+1900,t.tm_mon,t.tm_mday);if(y(r,n)<0){var o=Z(X(n.getFullYear())?K:$,n.getMonth()-1)-31,_=31-r.getDate()+o+n.getDate();return l(Math.ceil(_/7),2)}return 0===y(r,e)?"01":"00"},"%V":function(t){var e,r=new Date(t.tm_year+1900,0,4),n=new Date(t.tm_year+1901,0,4),o=m(r),_=m(n),p=tt(new Date(t.tm_year+1900,0,1),t.tm_yday);return y(p,o)<0?"53":y(_,p)<=0?"01":(e=o.getFullYear()<t.tm_year+1900?t.tm_yday+32-o.getDate():t.tm_yday+1-o.getDate(),l(Math.ceil(e/7),2))},"%w":function(t){return t.tm_wday},"%W":function(t){var e=new Date(t.tm_year,0,1),r=1===e.getDay()?e:tt(e,0===e.getDay()?1:7-e.getDay()+1),n=new Date(t.tm_year+1900,t.tm_mon,t.tm_mday);if(y(r,n)<0){var o=Z(X(n.getFullYear())?K:$,n.getMonth()-1)-31,_=31-r.getDate()+o+n.getDate();return l(Math.ceil(_/7),2)}return 0===y(r,e)?"01":"00"},"%y":function(t){return(t.tm_year+1900).toString().substring(2)},"%Y":function(t){return t.tm_year+1900},"%z":function(t){var e=t.tm_gmtoff,r=e>=0;return e=(e=Math.abs(e)/60)/60*100+e%60,(r?"+":"-")+String("0000"+e).slice(-4)},"%Z":function(t){return t.tm_zone},"%%":function(){return"%"}};for(var a in d)p.includes(a)&&(p=p.replace(new RegExp(a,"g"),d[a](_)));var g=function(t){var e=function(t){for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&(n=65536+((1023&n)<<10)|1023&t.charCodeAt(++r)),n<=127?++e:e+=n<=2047?2:n<=65535?3:4}return e}(t)+1,r=new Array(e);return function(t,e,r,n){if(!(n>0))return 0;for(var o=r+n-1,_=0;_<t.length;++_){var p=t.charCodeAt(_);if(p>=55296&&p<=57343&&(p=65536+((1023&p)<<10)|1023&t.charCodeAt(++_)),p<=127){if(r>=o)break;e[r++]=p}else if(p<=2047){if(r+1>=o)break;e[r++]=192|p>>6,e[r++]=128|63&p}else if(p<=65535){if(r+2>=o)break;e[r++]=224|p>>12,e[r++]=128|p>>6&63,e[r++]=128|63&p}else{if(r+3>=o)break;e[r++]=240|p>>18,e[r++]=128|p>>12&63,e[r++]=128|p>>6&63,e[r++]=128|63&p}}e[r]=0}(t,r,0,r.length),r}(p);return g.length>e?0:(function(t,e){b.set(t,e)}(g,t),g.length-1)}(t,e,r,n)}},nt=(function(){var t={a:rt};function r(t,r){var n=t.exports;e.asm=n,D((m=e.asm.m).buffer),x=e.asm.Jb,function(t){M.unshift(t)}(e.asm.n),function(){if(z--,e.monitorRunDependencies&&e.monitorRunDependencies(z),0==z&&(null!==F&&(clearInterval(F),F=null),k)){var t=k;k=null,t()}}()}function o(t){r(t.instance)}function _(e){return(l||"function"!=typeof fetch?Promise.resolve().then(function(){return H(E)}):fetch(E,{credentials:"same-origin"}).then(function(t){if(!t.ok)throw"failed to load wasm binary file at '"+E+"'";return t.arrayBuffer()}).catch(function(){return H(E)})).then(function(e){return WebAssembly.instantiate(e,t)}).then(function(t){return t}).then(e,function(t){c("failed to asynchronously prepare wasm: "+t),V(t)})}if(z++,e.monitorRunDependencies&&e.monitorRunDependencies(z),e.instantiateWasm)try{return e.instantiateWasm(t,r)}catch(t){return c("Module.instantiateWasm callback failed with error: "+t),!1}(l||"function"!=typeof WebAssembly.instantiateStreaming||W(E)||"function"!=typeof fetch?_(o):fetch(E,{credentials:"same-origin"}).then(function(e){return WebAssembly.instantiateStreaming(e,t).then(o,function(t){return c("wasm streaming compile failed: "+t),c("falling back to ArrayBuffer instantiation"),_(o)})})).catch(n)}(),e.___wasm_call_ctors=function(){return(e.___wasm_call_ctors=e.asm.n).apply(null,arguments)},e._emscripten_bind_VoidPtr___destroy___0=function(){return(nt=e._emscripten_bind_VoidPtr___destroy___0=e.asm.o).apply(null,arguments)}),ot=e._emscripten_bind_rcConfig_rcConfig_0=function(){return(ot=e._emscripten_bind_rcConfig_rcConfig_0=e.asm.p).apply(null,arguments)},_t=e._emscripten_bind_rcConfig_get_width_0=function(){return(_t=e._emscripten_bind_rcConfig_get_width_0=e.asm.q).apply(null,arguments)},pt=e._emscripten_bind_rcConfig_set_width_1=function(){return(pt=e._emscripten_bind_rcConfig_set_width_1=e.asm.r).apply(null,arguments)},it=e._emscripten_bind_rcConfig_get_height_0=function(){return(it=e._emscripten_bind_rcConfig_get_height_0=e.asm.s).apply(null,arguments)},at=e._emscripten_bind_rcConfig_set_height_1=function(){return(at=e._emscripten_bind_rcConfig_set_height_1=e.asm.t).apply(null,arguments)},st=e._emscripten_bind_rcConfig_get_tileSize_0=function(){return(st=e._emscripten_bind_rcConfig_get_tileSize_0=e.asm.u).apply(null,arguments)},ct=e._emscripten_bind_rcConfig_set_tileSize_1=function(){return(ct=e._emscripten_bind_rcConfig_set_tileSize_1=e.asm.v).apply(null,arguments)},ut=e._emscripten_bind_rcConfig_get_borderSize_0=function(){return(ut=e._emscripten_bind_rcConfig_get_borderSize_0=e.asm.w).apply(null,arguments)},lt=e._emscripten_bind_rcConfig_set_borderSize_1=function(){return(lt=e._emscripten_bind_rcConfig_set_borderSize_1=e.asm.x).apply(null,arguments)},yt=e._emscripten_bind_rcConfig_get_cs_0=function(){return(yt=e._emscripten_bind_rcConfig_get_cs_0=e.asm.y).apply(null,arguments)},mt=e._emscripten_bind_rcConfig_set_cs_1=function(){return(mt=e._emscripten_bind_rcConfig_set_cs_1=e.asm.z).apply(null,arguments)},ft=e._emscripten_bind_rcConfig_get_ch_0=function(){return(ft=e._emscripten_bind_rcConfig_get_ch_0=e.asm.A).apply(null,arguments)},dt=e._emscripten_bind_rcConfig_set_ch_1=function(){return(dt=e._emscripten_bind_rcConfig_set_ch_1=e.asm.B).apply(null,arguments)},gt=e._emscripten_bind_rcConfig_get_bmin_1=function(){return(gt=e._emscripten_bind_rcConfig_get_bmin_1=e.asm.C).apply(null,arguments)},bt=e._emscripten_bind_rcConfig_set_bmin_2=function(){return(bt=e._emscripten_bind_rcConfig_set_bmin_2=e.asm.D).apply(null,arguments)},ht=e._emscripten_bind_rcConfig_get_bmax_1=function(){return(ht=e._emscripten_bind_rcConfig_get_bmax_1=e.asm.E).apply(null,arguments)},vt=e._emscripten_bind_rcConfig_set_bmax_2=function(){return(vt=e._emscripten_bind_rcConfig_set_bmax_2=e.asm.F).apply(null,arguments)},wt=e._emscripten_bind_rcConfig_get_walkableSlopeAngle_0=function(){return(wt=e._emscripten_bind_rcConfig_get_walkableSlopeAngle_0=e.asm.G).apply(null,arguments)},Ct=e._emscripten_bind_rcConfig_set_walkableSlopeAngle_1=function(){return(Ct=e._emscripten_bind_rcConfig_set_walkableSlopeAngle_1=e.asm.H).apply(null,arguments)},At=e._emscripten_bind_rcConfig_get_walkableHeight_0=function(){return(At=e._emscripten_bind_rcConfig_get_walkableHeight_0=e.asm.I).apply(null,arguments)},Pt=e._emscripten_bind_rcConfig_set_walkableHeight_1=function(){return(Pt=e._emscripten_bind_rcConfig_set_walkableHeight_1=e.asm.J).apply(null,arguments)},jt=e._emscripten_bind_rcConfig_get_walkableClimb_0=function(){return(jt=e._emscripten_bind_rcConfig_get_walkableClimb_0=e.asm.K).apply(null,arguments)},Dt=e._emscripten_bind_rcConfig_set_walkableClimb_1=function(){return(Dt=e._emscripten_bind_rcConfig_set_walkableClimb_1=e.asm.L).apply(null,arguments)},xt=e._emscripten_bind_rcConfig_get_walkableRadius_0=function(){return(xt=e._emscripten_bind_rcConfig_get_walkableRadius_0=e.asm.M).apply(null,arguments)},St=e._emscripten_bind_rcConfig_set_walkableRadius_1=function(){return(St=e._emscripten_bind_rcConfig_set_walkableRadius_1=e.asm.N).apply(null,arguments)},Mt=e._emscripten_bind_rcConfig_get_maxEdgeLen_0=function(){return(Mt=e._emscripten_bind_rcConfig_get_maxEdgeLen_0=e.asm.O).apply(null,arguments)},Nt=e._emscripten_bind_rcConfig_set_maxEdgeLen_1=function(){return(Nt=e._emscripten_bind_rcConfig_set_maxEdgeLen_1=e.asm.P).apply(null,arguments)},Ot=e._emscripten_bind_rcConfig_get_maxSimplificationError_0=function(){return(Ot=e._emscripten_bind_rcConfig_get_maxSimplificationError_0=e.asm.Q).apply(null,arguments)},Rt=e._emscripten_bind_rcConfig_set_maxSimplificationError_1=function(){return(Rt=e._emscripten_bind_rcConfig_set_maxSimplificationError_1=e.asm.R).apply(null,arguments)},Et=e._emscripten_bind_rcConfig_get_minRegionArea_0=function(){return(Et=e._emscripten_bind_rcConfig_get_minRegionArea_0=e.asm.S).apply(null,arguments)},Tt=e._emscripten_bind_rcConfig_set_minRegionArea_1=function(){return(Tt=e._emscripten_bind_rcConfig_set_minRegionArea_1=e.asm.T).apply(null,arguments)},zt=e._emscripten_bind_rcConfig_get_mergeRegionArea_0=function(){return(zt=e._emscripten_bind_rcConfig_get_mergeRegionArea_0=e.asm.U).apply(null,arguments)},Ft=e._emscripten_bind_rcConfig_set_mergeRegionArea_1=function(){return(Ft=e._emscripten_bind_rcConfig_set_mergeRegionArea_1=e.asm.V).apply(null,arguments)},kt=e._emscripten_bind_rcConfig_get_maxVertsPerPoly_0=function(){return(kt=e._emscripten_bind_rcConfig_get_maxVertsPerPoly_0=e.asm.W).apply(null,arguments)},Vt=e._emscripten_bind_rcConfig_set_maxVertsPerPoly_1=function(){return(Vt=e._emscripten_bind_rcConfig_set_maxVertsPerPoly_1=e.asm.X).apply(null,arguments)},Wt=e._emscripten_bind_rcConfig_get_detailSampleDist_0=function(){return(Wt=e._emscripten_bind_rcConfig_get_detailSampleDist_0=e.asm.Y).apply(null,arguments)},Ht=e._emscripten_bind_rcConfig_set_detailSampleDist_1=function(){return(Ht=e._emscripten_bind_rcConfig_set_detailSampleDist_1=e.asm.Z).apply(null,arguments)},Lt=e._emscripten_bind_rcConfig_get_detailSampleMaxError_0=function(){return(Lt=e._emscripten_bind_rcConfig_get_detailSampleMaxError_0=e.asm._).apply(null,arguments)},It=e._emscripten_bind_rcConfig_set_detailSampleMaxError_1=function(){return(It=e._emscripten_bind_rcConfig_set_detailSampleMaxError_1=e.asm.$).apply(null,arguments)},Qt=e._emscripten_bind_rcConfig___destroy___0=function(){return(Qt=e._emscripten_bind_rcConfig___destroy___0=e.asm.aa).apply(null,arguments)},Yt=e._emscripten_bind_Vec3_Vec3_0=function(){return(Yt=e._emscripten_bind_Vec3_Vec3_0=e.asm.ba).apply(null,arguments)},Ut=e._emscripten_bind_Vec3_Vec3_3=function(){return(Ut=e._emscripten_bind_Vec3_Vec3_3=e.asm.ca).apply(null,arguments)},Bt=e._emscripten_bind_Vec3_get_x_0=function(){return(Bt=e._emscripten_bind_Vec3_get_x_0=e.asm.da).apply(null,arguments)},qt=e._emscripten_bind_Vec3_set_x_1=function(){return(qt=e._emscripten_bind_Vec3_set_x_1=e.asm.ea).apply(null,arguments)},Gt=e._emscripten_bind_Vec3_get_y_0=function(){return(Gt=e._emscripten_bind_Vec3_get_y_0=e.asm.fa).apply(null,arguments)},Jt=e._emscripten_bind_Vec3_set_y_1=function(){return(Jt=e._emscripten_bind_Vec3_set_y_1=e.asm.ga).apply(null,arguments)},Xt=e._emscripten_bind_Vec3_get_z_0=function(){return(Xt=e._emscripten_bind_Vec3_get_z_0=e.asm.ha).apply(null,arguments)},Zt=e._emscripten_bind_Vec3_set_z_1=function(){return(Zt=e._emscripten_bind_Vec3_set_z_1=e.asm.ia).apply(null,arguments)},Kt=e._emscripten_bind_Vec3___destroy___0=function(){return(Kt=e._emscripten_bind_Vec3___destroy___0=e.asm.ja).apply(null,arguments)},$t=e._emscripten_bind_Triangle_Triangle_0=function(){return($t=e._emscripten_bind_Triangle_Triangle_0=e.asm.ka).apply(null,arguments)},te=e._emscripten_bind_Triangle_getPoint_1=function(){return(te=e._emscripten_bind_Triangle_getPoint_1=e.asm.la).apply(null,arguments)},ee=e._emscripten_bind_Triangle___destroy___0=function(){return(ee=e._emscripten_bind_Triangle___destroy___0=e.asm.ma).apply(null,arguments)},re=e._emscripten_bind_DebugNavMesh_DebugNavMesh_0=function(){return(re=e._emscripten_bind_DebugNavMesh_DebugNavMesh_0=e.asm.na).apply(null,arguments)},ne=e._emscripten_bind_DebugNavMesh_getTriangleCount_0=function(){return(ne=e._emscripten_bind_DebugNavMesh_getTriangleCount_0=e.asm.oa).apply(null,arguments)},oe=e._emscripten_bind_DebugNavMesh_getTriangle_1=function(){return(oe=e._emscripten_bind_DebugNavMesh_getTriangle_1=e.asm.pa).apply(null,arguments)},_e=e._emscripten_bind_DebugNavMesh___destroy___0=function(){return(_e=e._emscripten_bind_DebugNavMesh___destroy___0=e.asm.qa).apply(null,arguments)},pe=e._emscripten_bind_dtNavMesh___destroy___0=function(){return(pe=e._emscripten_bind_dtNavMesh___destroy___0=e.asm.ra).apply(null,arguments)},ie=e._emscripten_bind_NavmeshData_NavmeshData_0=function(){return(ie=e._emscripten_bind_NavmeshData_NavmeshData_0=e.asm.sa).apply(null,arguments)},ae=e._emscripten_bind_NavmeshData_get_dataPointer_0=function(){return(ae=e._emscripten_bind_NavmeshData_get_dataPointer_0=e.asm.ta).apply(null,arguments)},se=e._emscripten_bind_NavmeshData_set_dataPointer_1=function(){return(se=e._emscripten_bind_NavmeshData_set_dataPointer_1=e.asm.ua).apply(null,arguments)},ce=e._emscripten_bind_NavmeshData_get_size_0=function(){return(ce=e._emscripten_bind_NavmeshData_get_size_0=e.asm.va).apply(null,arguments)},ue=e._emscripten_bind_NavmeshData_set_size_1=function(){return(ue=e._emscripten_bind_NavmeshData_set_size_1=e.asm.wa).apply(null,arguments)},le=e._emscripten_bind_NavmeshData___destroy___0=function(){return(le=e._emscripten_bind_NavmeshData___destroy___0=e.asm.xa).apply(null,arguments)},ye=e._emscripten_bind_NavPath_getPointCount_0=function(){return(ye=e._emscripten_bind_NavPath_getPointCount_0=e.asm.ya).apply(null,arguments)},me=e._emscripten_bind_NavPath_getPoint_1=function(){return(me=e._emscripten_bind_NavPath_getPoint_1=e.asm.za).apply(null,arguments)},fe=e._emscripten_bind_NavPath___destroy___0=function(){return(fe=e._emscripten_bind_NavPath___destroy___0=e.asm.Aa).apply(null,arguments)},de=e._emscripten_bind_dtObstacleRef___destroy___0=function(){return(de=e._emscripten_bind_dtObstacleRef___destroy___0=e.asm.Ba).apply(null,arguments)},ge=e._emscripten_bind_dtCrowdAgentParams_dtCrowdAgentParams_0=function(){return(ge=e._emscripten_bind_dtCrowdAgentParams_dtCrowdAgentParams_0=e.asm.Ca).apply(null,arguments)},be=e._emscripten_bind_dtCrowdAgentParams_get_radius_0=function(){return(be=e._emscripten_bind_dtCrowdAgentParams_get_radius_0=e.asm.Da).apply(null,arguments)},he=e._emscripten_bind_dtCrowdAgentParams_set_radius_1=function(){return(he=e._emscripten_bind_dtCrowdAgentParams_set_radius_1=e.asm.Ea).apply(null,arguments)},ve=e._emscripten_bind_dtCrowdAgentParams_get_height_0=function(){return(ve=e._emscripten_bind_dtCrowdAgentParams_get_height_0=e.asm.Fa).apply(null,arguments)},we=e._emscripten_bind_dtCrowdAgentParams_set_height_1=function(){return(we=e._emscripten_bind_dtCrowdAgentParams_set_height_1=e.asm.Ga).apply(null,arguments)},Ce=e._emscripten_bind_dtCrowdAgentParams_get_maxAcceleration_0=function(){return(Ce=e._emscripten_bind_dtCrowdAgentParams_get_maxAcceleration_0=e.asm.Ha).apply(null,arguments)},Ae=e._emscripten_bind_dtCrowdAgentParams_set_maxAcceleration_1=function(){return(Ae=e._emscripten_bind_dtCrowdAgentParams_set_maxAcceleration_1=e.asm.Ia).apply(null,arguments)},Pe=e._emscripten_bind_dtCrowdAgentParams_get_maxSpeed_0=function(){return(Pe=e._emscripten_bind_dtCrowdAgentParams_get_maxSpeed_0=e.asm.Ja).apply(null,arguments)},je=e._emscripten_bind_dtCrowdAgentParams_set_maxSpeed_1=function(){return(je=e._emscripten_bind_dtCrowdAgentParams_set_maxSpeed_1=e.asm.Ka).apply(null,arguments)},De=e._emscripten_bind_dtCrowdAgentParams_get_collisionQueryRange_0=function(){return(De=e._emscripten_bind_dtCrowdAgentParams_get_collisionQueryRange_0=e.asm.La).apply(null,arguments)},xe=e._emscripten_bind_dtCrowdAgentParams_set_collisionQueryRange_1=function(){return(xe=e._emscripten_bind_dtCrowdAgentParams_set_collisionQueryRange_1=e.asm.Ma).apply(null,arguments)},Se=e._emscripten_bind_dtCrowdAgentParams_get_pathOptimizationRange_0=function(){return(Se=e._emscripten_bind_dtCrowdAgentParams_get_pathOptimizationRange_0=e.asm.Na).apply(null,arguments)},Me=e._emscripten_bind_dtCrowdAgentParams_set_pathOptimizationRange_1=function(){return(Me=e._emscripten_bind_dtCrowdAgentParams_set_pathOptimizationRange_1=e.asm.Oa).apply(null,arguments)},Ne=e._emscripten_bind_dtCrowdAgentParams_get_separationWeight_0=function(){return(Ne=e._emscripten_bind_dtCrowdAgentParams_get_separationWeight_0=e.asm.Pa).apply(null,arguments)},Oe=e._emscripten_bind_dtCrowdAgentParams_set_separationWeight_1=function(){return(Oe=e._emscripten_bind_dtCrowdAgentParams_set_separationWeight_1=e.asm.Qa).apply(null,arguments)},Re=e._emscripten_bind_dtCrowdAgentParams_get_updateFlags_0=function(){return(Re=e._emscripten_bind_dtCrowdAgentParams_get_updateFlags_0=e.asm.Ra).apply(null,arguments)},Ee=e._emscripten_bind_dtCrowdAgentParams_set_updateFlags_1=function(){return(Ee=e._emscripten_bind_dtCrowdAgentParams_set_updateFlags_1=e.asm.Sa).apply(null,arguments)},Te=e._emscripten_bind_dtCrowdAgentParams_get_obstacleAvoidanceType_0=function(){return(Te=e._emscripten_bind_dtCrowdAgentParams_get_obstacleAvoidanceType_0=e.asm.Ta).apply(null,arguments)},ze=e._emscripten_bind_dtCrowdAgentParams_set_obstacleAvoidanceType_1=function(){return(ze=e._emscripten_bind_dtCrowdAgentParams_set_obstacleAvoidanceType_1=e.asm.Ua).apply(null,arguments)},Fe=e._emscripten_bind_dtCrowdAgentParams_get_queryFilterType_0=function(){return(Fe=e._emscripten_bind_dtCrowdAgentParams_get_queryFilterType_0=e.asm.Va).apply(null,arguments)},ke=e._emscripten_bind_dtCrowdAgentParams_set_queryFilterType_1=function(){return(ke=e._emscripten_bind_dtCrowdAgentParams_set_queryFilterType_1=e.asm.Wa).apply(null,arguments)},Ve=e._emscripten_bind_dtCrowdAgentParams_get_userData_0=function(){return(Ve=e._emscripten_bind_dtCrowdAgentParams_get_userData_0=e.asm.Xa).apply(null,arguments)},We=e._emscripten_bind_dtCrowdAgentParams_set_userData_1=function(){return(We=e._emscripten_bind_dtCrowdAgentParams_set_userData_1=e.asm.Ya).apply(null,arguments)},He=e._emscripten_bind_dtCrowdAgentParams___destroy___0=function(){return(He=e._emscripten_bind_dtCrowdAgentParams___destroy___0=e.asm.Za).apply(null,arguments)},Le=e._emscripten_bind_NavMesh_NavMesh_0=function(){return(Le=e._emscripten_bind_NavMesh_NavMesh_0=e.asm._a).apply(null,arguments)},Ie=e._emscripten_bind_NavMesh_destroy_0=function(){return(Ie=e._emscripten_bind_NavMesh_destroy_0=e.asm.$a).apply(null,arguments)},Qe=e._emscripten_bind_NavMesh_build_5=function(){return(Qe=e._emscripten_bind_NavMesh_build_5=e.asm.ab).apply(null,arguments)},Ye=e._emscripten_bind_NavMesh_buildFromNavmeshData_1=function(){return(Ye=e._emscripten_bind_NavMesh_buildFromNavmeshData_1=e.asm.bb).apply(null,arguments)},Ue=e._emscripten_bind_NavMesh_getNavmeshData_0=function(){return(Ue=e._emscripten_bind_NavMesh_getNavmeshData_0=e.asm.cb).apply(null,arguments)},Be=e._emscripten_bind_NavMesh_freeNavmeshData_1=function(){return(Be=e._emscripten_bind_NavMesh_freeNavmeshData_1=e.asm.db).apply(null,arguments)},qe=e._emscripten_bind_NavMesh_getDebugNavMesh_0=function(){return(qe=e._emscripten_bind_NavMesh_getDebugNavMesh_0=e.asm.eb).apply(null,arguments)},Ge=e._emscripten_bind_NavMesh_getClosestPoint_1=function(){return(Ge=e._emscripten_bind_NavMesh_getClosestPoint_1=e.asm.fb).apply(null,arguments)},Je=e._emscripten_bind_NavMesh_getRandomPointAround_2=function(){return(Je=e._emscripten_bind_NavMesh_getRandomPointAround_2=e.asm.gb).apply(null,arguments)},Xe=e._emscripten_bind_NavMesh_moveAlong_2=function(){return(Xe=e._emscripten_bind_NavMesh_moveAlong_2=e.asm.hb).apply(null,arguments)},Ze=e._emscripten_bind_NavMesh_getNavMesh_0=function(){return(Ze=e._emscripten_bind_NavMesh_getNavMesh_0=e.asm.ib).apply(null,arguments)},Ke=e._emscripten_bind_NavMesh_computePath_2=function(){return(Ke=e._emscripten_bind_NavMesh_computePath_2=e.asm.jb).apply(null,arguments)},$e=e._emscripten_bind_NavMesh_setDefaultQueryExtent_1=function(){return($e=e._emscripten_bind_NavMesh_setDefaultQueryExtent_1=e.asm.kb).apply(null,arguments)},tr=e._emscripten_bind_NavMesh_getDefaultQueryExtent_0=function(){return(tr=e._emscripten_bind_NavMesh_getDefaultQueryExtent_0=e.asm.lb).apply(null,arguments)},er=e._emscripten_bind_NavMesh_addCylinderObstacle_3=function(){return(er=e._emscripten_bind_NavMesh_addCylinderObstacle_3=e.asm.mb).apply(null,arguments)},rr=e._emscripten_bind_NavMesh_addBoxObstacle_3=function(){return(rr=e._emscripten_bind_NavMesh_addBoxObstacle_3=e.asm.nb).apply(null,arguments)},nr=e._emscripten_bind_NavMesh_removeObstacle_1=function(){return(nr=e._emscripten_bind_NavMesh_removeObstacle_1=e.asm.ob).apply(null,arguments)},or=e._emscripten_bind_NavMesh_update_0=function(){return(or=e._emscripten_bind_NavMesh_update_0=e.asm.pb).apply(null,arguments)},_r=e._emscripten_bind_NavMesh___destroy___0=function(){return(_r=e._emscripten_bind_NavMesh___destroy___0=e.asm.qb).apply(null,arguments)},pr=e._emscripten_bind_Crowd_Crowd_3=function(){return(pr=e._emscripten_bind_Crowd_Crowd_3=e.asm.rb).apply(null,arguments)},ir=e._emscripten_bind_Crowd_destroy_0=function(){return(ir=e._emscripten_bind_Crowd_destroy_0=e.asm.sb).apply(null,arguments)},ar=e._emscripten_bind_Crowd_addAgent_2=function(){return(ar=e._emscripten_bind_Crowd_addAgent_2=e.asm.tb).apply(null,arguments)},sr=e._emscripten_bind_Crowd_removeAgent_1=function(){return(sr=e._emscripten_bind_Crowd_removeAgent_1=e.asm.ub).apply(null,arguments)},cr=e._emscripten_bind_Crowd_update_1=function(){return(cr=e._emscripten_bind_Crowd_update_1=e.asm.vb).apply(null,arguments)},ur=e._emscripten_bind_Crowd_getAgentPosition_1=function(){return(ur=e._emscripten_bind_Crowd_getAgentPosition_1=e.asm.wb).apply(null,arguments)},lr=e._emscripten_bind_Crowd_getAgentVelocity_1=function(){return(lr=e._emscripten_bind_Crowd_getAgentVelocity_1=e.asm.xb).apply(null,arguments)},yr=e._emscripten_bind_Crowd_getAgentNextTargetPath_1=function(){return(yr=e._emscripten_bind_Crowd_getAgentNextTargetPath_1=e.asm.yb).apply(null,arguments)},mr=e._emscripten_bind_Crowd_getAgentState_1=function(){return(mr=e._emscripten_bind_Crowd_getAgentState_1=e.asm.zb).apply(null,arguments)},fr=e._emscripten_bind_Crowd_overOffmeshConnection_1=function(){return(fr=e._emscripten_bind_Crowd_overOffmeshConnection_1=e.asm.Ab).apply(null,arguments)},dr=e._emscripten_bind_Crowd_agentGoto_2=function(){return(dr=e._emscripten_bind_Crowd_agentGoto_2=e.asm.Bb).apply(null,arguments)},gr=e._emscripten_bind_Crowd_agentTeleport_2=function(){return(gr=e._emscripten_bind_Crowd_agentTeleport_2=e.asm.Cb).apply(null,arguments)},br=e._emscripten_bind_Crowd_getAgentParameters_1=function(){return(br=e._emscripten_bind_Crowd_getAgentParameters_1=e.asm.Db).apply(null,arguments)},hr=e._emscripten_bind_Crowd_setAgentParameters_2=function(){return(hr=e._emscripten_bind_Crowd_setAgentParameters_2=e.asm.Eb).apply(null,arguments)},vr=e._emscripten_bind_Crowd_setDefaultQueryExtent_1=function(){return(vr=e._emscripten_bind_Crowd_setDefaultQueryExtent_1=e.asm.Fb).apply(null,arguments)},wr=e._emscripten_bind_Crowd_getDefaultQueryExtent_0=function(){return(wr=e._emscripten_bind_Crowd_getDefaultQueryExtent_0=e.asm.Gb).apply(null,arguments)},Cr=e._emscripten_bind_Crowd_getCorners_1=function(){return(Cr=e._emscripten_bind_Crowd_getCorners_1=e.asm.Hb).apply(null,arguments)},Ar=e._emscripten_bind_Crowd___destroy___0=function(){return(Ar=e._emscripten_bind_Crowd___destroy___0=e.asm.Ib).apply(null,arguments)},Pr=e._malloc=function(){return(Pr=e._malloc=e.asm.Kb).apply(null,arguments)};function jr(t){function n(){et||(et=!0,e.calledRun=!0,!f&&(L(M),r(e),e.onRuntimeInitialized&&e.onRuntimeInitialized(),function(){if(e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;)R(e.postRun.shift());L(N)}()))}t=t||p,z>0||(function(){if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;)O(e.preRun.shift());L(S)}(),z>0)||(e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},1),n()},1)):n())}if(e._free=function(){return(e._free=e.asm.Lb).apply(null,arguments)},e.UTF8ToString=P,e.addFunction=function(t,e){if(u||(u=new WeakMap,function(t,e){for(var r=0;r<0+e;r++){var n=Q(r);n&&u.set(n,r)}}(0,x.length)),u.has(t))return u.get(t);var r=function(){if(y.length)return y.pop();try{x.grow(1)}catch(t){throw t instanceof RangeError?"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH.":t}return x.length-1}();try{Y(r,t)}catch(o){if(!(o instanceof TypeError))throw o;var n=function(t,e){if("function"==typeof WebAssembly.Function){for(var r={i:"i32",j:"i64",f:"f32",d:"f64"},n={parameters:[],results:"v"==e[0]?[]:[r[e[0]]]},o=1;o<e.length;++o)n.parameters.push(r[e[o]]);return new WebAssembly.Function(n,t)}var _=[1,0,1,96],p=e.slice(0,1),i=e.slice(1),a={i:127,j:126,f:125,d:124};for(_.push(i.length),o=0;o<i.length;++o)_.push(a[i[o]]);"v"==p?_.push(0):_=_.concat([1,a[p]]),_[1]=_.length-2;var s=new Uint8Array([0,97,115,109,1,0,0,0].concat(_,[2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0])),c=new WebAssembly.Module(s);return new WebAssembly.Instance(c,{e:{f:t}}).exports.f}(t,e);Y(r,n)}return u.set(t,r),r},k=function t(){et||jr(),et||(k=t)},e.run=jr,e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);e.preInit.length>0;)e.preInit.pop()();function Dr(){}function xr(t){return(t||Dr).__cache__}function Sr(t,e){var r=xr(e),n=r[t];return n||((n=Object.create((e||Dr).prototype)).ptr=t,r[t]=n)}jr(),Dr.prototype=Object.create(Dr.prototype),Dr.prototype.constructor=Dr,Dr.prototype.__class__=Dr,Dr.__cache__={},e.WrapperObject=Dr,e.getCache=xr,e.wrapPointer=Sr,e.castObject=function(t,e){return Sr(t.ptr,e)},e.NULL=Sr(0),e.destroy=function(t){if(!t.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";t.__destroy__(),delete xr(t.__class__)[t.ptr]},e.compare=function(t,e){return t.ptr===e.ptr},e.getPointer=function(t){return t.ptr},e.getClass=function(t){return t.__class__};var Mr={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(Mr.needed){for(var t=0;t<Mr.temps.length;t++)e._free(Mr.temps[t]);Mr.temps.length=0,e._free(Mr.buffer),Mr.buffer=0,Mr.size+=Mr.needed,Mr.needed=0}Mr.buffer||(Mr.size+=128,Mr.buffer=e._malloc(Mr.size),d(Mr.buffer)),Mr.pos=0},alloc:function(t,r){d(Mr.buffer);var n,o=r.BYTES_PER_ELEMENT,_=t.length*o;return _=_+7&-8,Mr.pos+_>=Mr.size?(d(_>0),Mr.needed+=_,n=e._malloc(_),Mr.temps.push(n)):(n=Mr.buffer+Mr.pos,Mr.pos+=_),n},copy:function(t,e,r){switch(r>>>=0,e.BYTES_PER_ELEMENT){case 2:r>>>=1;break;case 4:r>>>=2;break;case 8:r>>>=3}for(var n=0;n<t.length;n++)e[r+n]=t[n]}};function Nr(){throw"cannot construct a VoidPtr, no constructor in IDL"}function Or(){this.ptr=ot(),xr(Or)[this.ptr]=this}function Rr(t,e,r){return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),r&&"object"==typeof r&&(r=r.ptr),void 0===t?(this.ptr=Yt(),void(xr(Rr)[this.ptr]=this)):void 0===e?(this.ptr=_emscripten_bind_Vec3_Vec3_1(t),void(xr(Rr)[this.ptr]=this)):void 0===r?(this.ptr=_emscripten_bind_Vec3_Vec3_2(t,e),void(xr(Rr)[this.ptr]=this)):(this.ptr=Ut(t,e,r),void(xr(Rr)[this.ptr]=this))}function Er(){this.ptr=$t(),xr(Er)[this.ptr]=this}function Tr(){this.ptr=re(),xr(Tr)[this.ptr]=this}function zr(){throw"cannot construct a dtNavMesh, no constructor in IDL"}function Fr(){this.ptr=ie(),xr(Fr)[this.ptr]=this}function kr(){throw"cannot construct a NavPath, no constructor in IDL"}function Vr(){throw"cannot construct a dtObstacleRef, no constructor in IDL"}function Wr(){this.ptr=ge(),xr(Wr)[this.ptr]=this}function Hr(){this.ptr=Le(),xr(Hr)[this.ptr]=this}function Lr(t,e,r){t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),r&&"object"==typeof r&&(r=r.ptr),this.ptr=pr(t,e,r),xr(Lr)[this.ptr]=this}return Nr.prototype=Object.create(Dr.prototype),Nr.prototype.constructor=Nr,Nr.prototype.__class__=Nr,Nr.__cache__={},e.VoidPtr=Nr,Nr.prototype.__destroy__=Nr.prototype.__destroy__=function(){var t=this.ptr;nt(t)},Or.prototype=Object.create(Dr.prototype),Or.prototype.constructor=Or,Or.prototype.__class__=Or,Or.__cache__={},e.rcConfig=Or,Or.prototype.get_width=Or.prototype.get_width=function(){var t=this.ptr;return _t(t)},Or.prototype.set_width=Or.prototype.set_width=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),pt(e,t)},Object.defineProperty(Or.prototype,"width",{get:Or.prototype.get_width,set:Or.prototype.set_width}),Or.prototype.get_height=Or.prototype.get_height=function(){var t=this.ptr;return it(t)},Or.prototype.set_height=Or.prototype.set_height=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),at(e,t)},Object.defineProperty(Or.prototype,"height",{get:Or.prototype.get_height,set:Or.prototype.set_height}),Or.prototype.get_tileSize=Or.prototype.get_tileSize=function(){var t=this.ptr;return st(t)},Or.prototype.set_tileSize=Or.prototype.set_tileSize=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),ct(e,t)},Object.defineProperty(Or.prototype,"tileSize",{get:Or.prototype.get_tileSize,set:Or.prototype.set_tileSize}),Or.prototype.get_borderSize=Or.prototype.get_borderSize=function(){var t=this.ptr;return ut(t)},Or.prototype.set_borderSize=Or.prototype.set_borderSize=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),lt(e,t)},Object.defineProperty(Or.prototype,"borderSize",{get:Or.prototype.get_borderSize,set:Or.prototype.set_borderSize}),Or.prototype.get_cs=Or.prototype.get_cs=function(){var t=this.ptr;return yt(t)},Or.prototype.set_cs=Or.prototype.set_cs=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),mt(e,t)},Object.defineProperty(Or.prototype,"cs",{get:Or.prototype.get_cs,set:Or.prototype.set_cs}),Or.prototype.get_ch=Or.prototype.get_ch=function(){var t=this.ptr;return ft(t)},Or.prototype.set_ch=Or.prototype.set_ch=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),dt(e,t)},Object.defineProperty(Or.prototype,"ch",{get:Or.prototype.get_ch,set:Or.prototype.set_ch}),Or.prototype.get_bmin=Or.prototype.get_bmin=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),gt(e,t)},Or.prototype.set_bmin=Or.prototype.set_bmin=function(t,e){var r=this.ptr;Mr.prepare(),t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),bt(r,t,e)},Object.defineProperty(Or.prototype,"bmin",{get:Or.prototype.get_bmin,set:Or.prototype.set_bmin}),Or.prototype.get_bmax=Or.prototype.get_bmax=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),ht(e,t)},Or.prototype.set_bmax=Or.prototype.set_bmax=function(t,e){var r=this.ptr;Mr.prepare(),t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),vt(r,t,e)},Object.defineProperty(Or.prototype,"bmax",{get:Or.prototype.get_bmax,set:Or.prototype.set_bmax}),Or.prototype.get_walkableSlopeAngle=Or.prototype.get_walkableSlopeAngle=function(){var t=this.ptr;return wt(t)},Or.prototype.set_walkableSlopeAngle=Or.prototype.set_walkableSlopeAngle=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Ct(e,t)},Object.defineProperty(Or.prototype,"walkableSlopeAngle",{get:Or.prototype.get_walkableSlopeAngle,set:Or.prototype.set_walkableSlopeAngle}),Or.prototype.get_walkableHeight=Or.prototype.get_walkableHeight=function(){var t=this.ptr;return At(t)},Or.prototype.set_walkableHeight=Or.prototype.set_walkableHeight=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Pt(e,t)},Object.defineProperty(Or.prototype,"walkableHeight",{get:Or.prototype.get_walkableHeight,set:Or.prototype.set_walkableHeight}),Or.prototype.get_walkableClimb=Or.prototype.get_walkableClimb=function(){var t=this.ptr;return jt(t)},Or.prototype.set_walkableClimb=Or.prototype.set_walkableClimb=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Dt(e,t)},Object.defineProperty(Or.prototype,"walkableClimb",{get:Or.prototype.get_walkableClimb,set:Or.prototype.set_walkableClimb}),Or.prototype.get_walkableRadius=Or.prototype.get_walkableRadius=function(){var t=this.ptr;return xt(t)},Or.prototype.set_walkableRadius=Or.prototype.set_walkableRadius=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),St(e,t)},Object.defineProperty(Or.prototype,"walkableRadius",{get:Or.prototype.get_walkableRadius,set:Or.prototype.set_walkableRadius}),Or.prototype.get_maxEdgeLen=Or.prototype.get_maxEdgeLen=function(){var t=this.ptr;return Mt(t)},Or.prototype.set_maxEdgeLen=Or.prototype.set_maxEdgeLen=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Nt(e,t)},Object.defineProperty(Or.prototype,"maxEdgeLen",{get:Or.prototype.get_maxEdgeLen,set:Or.prototype.set_maxEdgeLen}),Or.prototype.get_maxSimplificationError=Or.prototype.get_maxSimplificationError=function(){var t=this.ptr;return Ot(t)},Or.prototype.set_maxSimplificationError=Or.prototype.set_maxSimplificationError=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Rt(e,t)},Object.defineProperty(Or.prototype,"maxSimplificationError",{get:Or.prototype.get_maxSimplificationError,set:Or.prototype.set_maxSimplificationError}),Or.prototype.get_minRegionArea=Or.prototype.get_minRegionArea=function(){var t=this.ptr;return Et(t)},Or.prototype.set_minRegionArea=Or.prototype.set_minRegionArea=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Tt(e,t)},Object.defineProperty(Or.prototype,"minRegionArea",{get:Or.prototype.get_minRegionArea,set:Or.prototype.set_minRegionArea}),Or.prototype.get_mergeRegionArea=Or.prototype.get_mergeRegionArea=function(){var t=this.ptr;return zt(t)},Or.prototype.set_mergeRegionArea=Or.prototype.set_mergeRegionArea=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Ft(e,t)},Object.defineProperty(Or.prototype,"mergeRegionArea",{get:Or.prototype.get_mergeRegionArea,set:Or.prototype.set_mergeRegionArea}),Or.prototype.get_maxVertsPerPoly=Or.prototype.get_maxVertsPerPoly=function(){var t=this.ptr;return kt(t)},Or.prototype.set_maxVertsPerPoly=Or.prototype.set_maxVertsPerPoly=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Vt(e,t)},Object.defineProperty(Or.prototype,"maxVertsPerPoly",{get:Or.prototype.get_maxVertsPerPoly,set:Or.prototype.set_maxVertsPerPoly}),Or.prototype.get_detailSampleDist=Or.prototype.get_detailSampleDist=function(){var t=this.ptr;return Wt(t)},Or.prototype.set_detailSampleDist=Or.prototype.set_detailSampleDist=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Ht(e,t)},Object.defineProperty(Or.prototype,"detailSampleDist",{get:Or.prototype.get_detailSampleDist,set:Or.prototype.set_detailSampleDist}),Or.prototype.get_detailSampleMaxError=Or.prototype.get_detailSampleMaxError=function(){var t=this.ptr;return Lt(t)},Or.prototype.set_detailSampleMaxError=Or.prototype.set_detailSampleMaxError=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),It(e,t)},Object.defineProperty(Or.prototype,"detailSampleMaxError",{get:Or.prototype.get_detailSampleMaxError,set:Or.prototype.set_detailSampleMaxError}),Or.prototype.__destroy__=Or.prototype.__destroy__=function(){var t=this.ptr;Qt(t)},Rr.prototype=Object.create(Dr.prototype),Rr.prototype.constructor=Rr,Rr.prototype.__class__=Rr,Rr.__cache__={},e.Vec3=Rr,Rr.prototype.get_x=Rr.prototype.get_x=function(){var t=this.ptr;return Bt(t)},Rr.prototype.set_x=Rr.prototype.set_x=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),qt(e,t)},Object.defineProperty(Rr.prototype,"x",{get:Rr.prototype.get_x,set:Rr.prototype.set_x}),Rr.prototype.get_y=Rr.prototype.get_y=function(){var t=this.ptr;return Gt(t)},Rr.prototype.set_y=Rr.prototype.set_y=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Jt(e,t)},Object.defineProperty(Rr.prototype,"y",{get:Rr.prototype.get_y,set:Rr.prototype.set_y}),Rr.prototype.get_z=Rr.prototype.get_z=function(){var t=this.ptr;return Xt(t)},Rr.prototype.set_z=Rr.prototype.set_z=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Zt(e,t)},Object.defineProperty(Rr.prototype,"z",{get:Rr.prototype.get_z,set:Rr.prototype.set_z}),Rr.prototype.__destroy__=Rr.prototype.__destroy__=function(){var t=this.ptr;Kt(t)},Er.prototype=Object.create(Dr.prototype),Er.prototype.constructor=Er,Er.prototype.__class__=Er,Er.__cache__={},e.Triangle=Er,Er.prototype.getPoint=Er.prototype.getPoint=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),Sr(te(e,t),Rr)},Er.prototype.__destroy__=Er.prototype.__destroy__=function(){var t=this.ptr;ee(t)},Tr.prototype=Object.create(Dr.prototype),Tr.prototype.constructor=Tr,Tr.prototype.__class__=Tr,Tr.__cache__={},e.DebugNavMesh=Tr,Tr.prototype.getTriangleCount=Tr.prototype.getTriangleCount=function(){var t=this.ptr;return ne(t)},Tr.prototype.getTriangle=Tr.prototype.getTriangle=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),Sr(oe(e,t),Er)},Tr.prototype.__destroy__=Tr.prototype.__destroy__=function(){var t=this.ptr;_e(t)},zr.prototype=Object.create(Dr.prototype),zr.prototype.constructor=zr,zr.prototype.__class__=zr,zr.__cache__={},e.dtNavMesh=zr,zr.prototype.__destroy__=zr.prototype.__destroy__=function(){var t=this.ptr;pe(t)},Fr.prototype=Object.create(Dr.prototype),Fr.prototype.constructor=Fr,Fr.prototype.__class__=Fr,Fr.__cache__={},e.NavmeshData=Fr,Fr.prototype.get_dataPointer=Fr.prototype.get_dataPointer=function(){var t=this.ptr;return ae(t)},Fr.prototype.set_dataPointer=Fr.prototype.set_dataPointer=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),se(e,t)},Object.defineProperty(Fr.prototype,"dataPointer",{get:Fr.prototype.get_dataPointer,set:Fr.prototype.set_dataPointer}),Fr.prototype.get_size=Fr.prototype.get_size=function(){var t=this.ptr;return ce(t)},Fr.prototype.set_size=Fr.prototype.set_size=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),ue(e,t)},Object.defineProperty(Fr.prototype,"size",{get:Fr.prototype.get_size,set:Fr.prototype.set_size}),Fr.prototype.__destroy__=Fr.prototype.__destroy__=function(){var t=this.ptr;le(t)},kr.prototype=Object.create(Dr.prototype),kr.prototype.constructor=kr,kr.prototype.__class__=kr,kr.__cache__={},e.NavPath=kr,kr.prototype.getPointCount=kr.prototype.getPointCount=function(){var t=this.ptr;return ye(t)},kr.prototype.getPoint=kr.prototype.getPoint=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),Sr(me(e,t),Rr)},kr.prototype.__destroy__=kr.prototype.__destroy__=function(){var t=this.ptr;fe(t)},Vr.prototype=Object.create(Dr.prototype),Vr.prototype.constructor=Vr,Vr.prototype.__class__=Vr,Vr.__cache__={},e.dtObstacleRef=Vr,Vr.prototype.__destroy__=Vr.prototype.__destroy__=function(){var t=this.ptr;de(t)},Wr.prototype=Object.create(Dr.prototype),Wr.prototype.constructor=Wr,Wr.prototype.__class__=Wr,Wr.__cache__={},e.dtCrowdAgentParams=Wr,Wr.prototype.get_radius=Wr.prototype.get_radius=function(){var t=this.ptr;return be(t)},Wr.prototype.set_radius=Wr.prototype.set_radius=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),he(e,t)},Object.defineProperty(Wr.prototype,"radius",{get:Wr.prototype.get_radius,set:Wr.prototype.set_radius}),Wr.prototype.get_height=Wr.prototype.get_height=function(){var t=this.ptr;return ve(t)},Wr.prototype.set_height=Wr.prototype.set_height=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),we(e,t)},Object.defineProperty(Wr.prototype,"height",{get:Wr.prototype.get_height,set:Wr.prototype.set_height}),Wr.prototype.get_maxAcceleration=Wr.prototype.get_maxAcceleration=function(){var t=this.ptr;return Ce(t)},Wr.prototype.set_maxAcceleration=Wr.prototype.set_maxAcceleration=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Ae(e,t)},Object.defineProperty(Wr.prototype,"maxAcceleration",{get:Wr.prototype.get_maxAcceleration,set:Wr.prototype.set_maxAcceleration}),Wr.prototype.get_maxSpeed=Wr.prototype.get_maxSpeed=function(){var t=this.ptr;return Pe(t)},Wr.prototype.set_maxSpeed=Wr.prototype.set_maxSpeed=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),je(e,t)},Object.defineProperty(Wr.prototype,"maxSpeed",{get:Wr.prototype.get_maxSpeed,set:Wr.prototype.set_maxSpeed}),Wr.prototype.get_collisionQueryRange=Wr.prototype.get_collisionQueryRange=function(){var t=this.ptr;return De(t)},Wr.prototype.set_collisionQueryRange=Wr.prototype.set_collisionQueryRange=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),xe(e,t)},Object.defineProperty(Wr.prototype,"collisionQueryRange",{get:Wr.prototype.get_collisionQueryRange,set:Wr.prototype.set_collisionQueryRange}),Wr.prototype.get_pathOptimizationRange=Wr.prototype.get_pathOptimizationRange=function(){var t=this.ptr;return Se(t)},Wr.prototype.set_pathOptimizationRange=Wr.prototype.set_pathOptimizationRange=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Me(e,t)},Object.defineProperty(Wr.prototype,"pathOptimizationRange",{get:Wr.prototype.get_pathOptimizationRange,set:Wr.prototype.set_pathOptimizationRange}),Wr.prototype.get_separationWeight=Wr.prototype.get_separationWeight=function(){var t=this.ptr;return Ne(t)},Wr.prototype.set_separationWeight=Wr.prototype.set_separationWeight=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Oe(e,t)},Object.defineProperty(Wr.prototype,"separationWeight",{get:Wr.prototype.get_separationWeight,set:Wr.prototype.set_separationWeight}),Wr.prototype.get_updateFlags=Wr.prototype.get_updateFlags=function(){var t=this.ptr;return Re(t)},Wr.prototype.set_updateFlags=Wr.prototype.set_updateFlags=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Ee(e,t)},Object.defineProperty(Wr.prototype,"updateFlags",{get:Wr.prototype.get_updateFlags,set:Wr.prototype.set_updateFlags}),Wr.prototype.get_obstacleAvoidanceType=Wr.prototype.get_obstacleAvoidanceType=function(){var t=this.ptr;return Te(t)},Wr.prototype.set_obstacleAvoidanceType=Wr.prototype.set_obstacleAvoidanceType=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),ze(e,t)},Object.defineProperty(Wr.prototype,"obstacleAvoidanceType",{get:Wr.prototype.get_obstacleAvoidanceType,set:Wr.prototype.set_obstacleAvoidanceType}),Wr.prototype.get_queryFilterType=Wr.prototype.get_queryFilterType=function(){var t=this.ptr;return Fe(t)},Wr.prototype.set_queryFilterType=Wr.prototype.set_queryFilterType=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),ke(e,t)},Object.defineProperty(Wr.prototype,"queryFilterType",{get:Wr.prototype.get_queryFilterType,set:Wr.prototype.set_queryFilterType}),Wr.prototype.get_userData=Wr.prototype.get_userData=function(){var t=this.ptr;return Sr(Ve(t),Nr)},Wr.prototype.set_userData=Wr.prototype.set_userData=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),We(e,t)},Object.defineProperty(Wr.prototype,"userData",{get:Wr.prototype.get_userData,set:Wr.prototype.set_userData}),Wr.prototype.__destroy__=Wr.prototype.__destroy__=function(){var t=this.ptr;He(t)},Hr.prototype=Object.create(Dr.prototype),Hr.prototype.constructor=Hr,Hr.prototype.__class__=Hr,Hr.__cache__={},e.NavMesh=Hr,Hr.prototype.destroy=Hr.prototype.destroy=function(){var t=this.ptr;Ie(t)},Hr.prototype.build=Hr.prototype.build=function(t,e,r,n,o){var _=this.ptr;Mr.prepare(),"object"==typeof t&&(t=function(t){if("object"==typeof t){var e=Mr.alloc(t,w);return Mr.copy(t,w,e),e}return t}(t)),e&&"object"==typeof e&&(e=e.ptr),"object"==typeof r&&(r=function(t){if("object"==typeof t){var e=Mr.alloc(t,v);return Mr.copy(t,v,e),e}return t}(r)),n&&"object"==typeof n&&(n=n.ptr),o&&"object"==typeof o&&(o=o.ptr),Qe(_,t,e,r,n,o)},Hr.prototype.buildFromNavmeshData=Hr.prototype.buildFromNavmeshData=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Ye(e,t)},Hr.prototype.getNavmeshData=Hr.prototype.getNavmeshData=function(){var t=this.ptr;return Sr(Ue(t),Fr)},Hr.prototype.freeNavmeshData=Hr.prototype.freeNavmeshData=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),Be(e,t)},Hr.prototype.getDebugNavMesh=Hr.prototype.getDebugNavMesh=function(){var t=this.ptr;return Sr(qe(t),Tr)},Hr.prototype.getClosestPoint=Hr.prototype.getClosestPoint=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),Sr(Ge(e,t),Rr)},Hr.prototype.getRandomPointAround=Hr.prototype.getRandomPointAround=function(t,e){var r=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Sr(Je(r,t,e),Rr)},Hr.prototype.moveAlong=Hr.prototype.moveAlong=function(t,e){var r=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Sr(Xe(r,t,e),Rr)},Hr.prototype.getNavMesh=Hr.prototype.getNavMesh=function(){var t=this.ptr;return Sr(Ze(t),zr)},Hr.prototype.computePath=Hr.prototype.computePath=function(t,e){var r=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),Sr(Ke(r,t,e),kr)},Hr.prototype.setDefaultQueryExtent=Hr.prototype.setDefaultQueryExtent=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),$e(e,t)},Hr.prototype.getDefaultQueryExtent=Hr.prototype.getDefaultQueryExtent=function(){var t=this.ptr;return Sr(tr(t),Rr)},Hr.prototype.addCylinderObstacle=Hr.prototype.addCylinderObstacle=function(t,e,r){var n=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),r&&"object"==typeof r&&(r=r.ptr),Sr(er(n,t,e,r),Vr)},Hr.prototype.addBoxObstacle=Hr.prototype.addBoxObstacle=function(t,e,r){var n=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),r&&"object"==typeof r&&(r=r.ptr),Sr(rr(n,t,e,r),Vr)},Hr.prototype.removeObstacle=Hr.prototype.removeObstacle=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),nr(e,t)},Hr.prototype.update=Hr.prototype.update=function(){var t=this.ptr;or(t)},Hr.prototype.__destroy__=Hr.prototype.__destroy__=function(){var t=this.ptr;_r(t)},Lr.prototype=Object.create(Dr.prototype),Lr.prototype.constructor=Lr,Lr.prototype.__class__=Lr,Lr.__cache__={},e.Crowd=Lr,Lr.prototype.destroy=Lr.prototype.destroy=function(){var t=this.ptr;ir(t)},Lr.prototype.addAgent=Lr.prototype.addAgent=function(t,e){var r=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),ar(r,t,e)},Lr.prototype.removeAgent=Lr.prototype.removeAgent=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),sr(e,t)},Lr.prototype.update=Lr.prototype.update=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),cr(e,t)},Lr.prototype.getAgentPosition=Lr.prototype.getAgentPosition=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),Sr(ur(e,t),Rr)},Lr.prototype.getAgentVelocity=Lr.prototype.getAgentVelocity=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),Sr(lr(e,t),Rr)},Lr.prototype.getAgentNextTargetPath=Lr.prototype.getAgentNextTargetPath=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),Sr(yr(e,t),Rr)},Lr.prototype.getAgentState=Lr.prototype.getAgentState=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),mr(e,t)},Lr.prototype.overOffmeshConnection=Lr.prototype.overOffmeshConnection=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),!!fr(e,t)},Lr.prototype.agentGoto=Lr.prototype.agentGoto=function(t,e){var r=this.ptr;t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),dr(r,t,e)},Lr.prototype.agentTeleport=Lr.prototype.agentTeleport=function(t,e){var r=this.ptr;t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),gr(r,t,e)},Lr.prototype.getAgentParameters=Lr.prototype.getAgentParameters=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),Sr(br(e,t),Wr)},Lr.prototype.setAgentParameters=Lr.prototype.setAgentParameters=function(t,e){var r=this.ptr;t&&"object"==typeof t&&(t=t.ptr),e&&"object"==typeof e&&(e=e.ptr),hr(r,t,e)},Lr.prototype.setDefaultQueryExtent=Lr.prototype.setDefaultQueryExtent=function(t){var e=this.ptr;t&&"object"==typeof t&&(t=t.ptr),vr(e,t)},Lr.prototype.getDefaultQueryExtent=Lr.prototype.getDefaultQueryExtent=function(){var t=this.ptr;return Sr(wr(t),Rr)},Lr.prototype.getCorners=Lr.prototype.getCorners=function(t){var e=this.ptr;return t&&"object"==typeof t&&(t=t.ptr),Sr(Cr(e,t),kr)},Lr.prototype.__destroy__=Lr.prototype.__destroy__=function(){var t=this.ptr;Ar(t)},e.ready});export{e as default};
@@ -0,0 +1 @@
1
+ import{a as n}from"./runtime-chunk-YXATXASV.js";import"./runtime-chunk-OFPUAZKY.js";import{a as t}from"./runtime-chunk-EOV2DL2V.js";import"./runtime-chunk-Y3BMDVJ7.js";import{Bc as e,Db as r,Fc as a,Le as i,Oc as o,Tc as c,Vc as y,we as s}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";new s,new c,new Float32Array([255/256/256**3,255/256/65536,255/256/256,255/256]);var l=new Map([[0,null],[1,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return min(x+y,1.0)*opacity+x*(1.0-opacity);}"],[2,"vec3 blend(const in vec3 x,const in vec3 y,const in float opacity){return y*opacity+x*(1.0-opacity);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){float a=min(y.a,opacity);return vec4(blend(x.rgb,y.rgb,a),max(x.a,a));}"],[3,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(x+y)*0.5*opacity+x*(1.0-opacity);}"],[4,"float blend(const in float x,const in float y){return(y==0.0)?y:max(1.0-(1.0-x)/y,0.0);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[5,"float blend(const in float x,const in float y){return(y==1.0)?y:min(x/(1.0-y),1.0);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[6,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return min(x,y)*opacity+x*(1.0-opacity);}"],[7,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return abs(x-y)*opacity+x*(1.0-opacity);}"],[8,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(x+y-2.0*x*y)*opacity+x*(1.0-opacity);}"],[9,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return max(x,y)*opacity+x*(1.0-opacity);}"],[10,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return x*y*opacity+x*(1.0-opacity);}"],[11,"float blend(const in float x,const in float y){return(y>0.0)?min(x/y,1.0):1.0;}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[12,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(1.0-abs(1.0-x-y))*opacity+x*(1.0-opacity);}"],[13,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return y*opacity+x*(1.0-opacity);}"],[14,"float blend(const in float x,const in float y){return(x<0.5)?(2.0*x*y):(1.0-2.0*(1.0-x)*(1.0-y));}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[15,"float blend(const in float x,const in float y){return(y==1.0)?y:min(x*x/(1.0-y),1.0);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[16,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(1.0-(1.0-x)*(1.0-y))*opacity+x*(1.0-opacity);}"],[17,"float blend(const in float x,const in float y){return(y<0.5)?(2.0*x*y+x*x*(1.0-2.0*y)):(sqrt(x)*(2.0*y-1.0)+2.0*x*(1.0-y));}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[18,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return max(x+y-1.0,0.0)*opacity+x*(1.0-opacity);}"]]),d=class extends e{constructor(n,t=1){super(),this.f=n,this.opacity=new i(t)}getOpacity(){return this.opacity.value}setOpacity(n){this.opacity.value=n}get blendFunction(){return this.f}set blendFunction(n){this.f=n,this.dispatchEvent({type:"change"})}getBlendFunction(){return this.blendFunction}setBlendFunction(n){this.blendFunction=n}getShaderCode(){return l.get(this.blendFunction)}},u=class extends e{constructor(n,t,{attributes:e=0,blendFunction:r=16,defines:a=new Map,uniforms:i=new Map,extensions:o=null,vertexShader:c=null}={}){super(),this.name=n,this.renderer=null,this.attributes=e,this.fragmentShader=t,this.vertexShader=c,this.defines=a,this.uniforms=i,this.extensions=o,this.blendMode=new d(r),this.blendMode.addEventListener("change",n=>this.setChanged())}getName(){return this.name}setRenderer(n){this.renderer=n}getDefines(){return this.defines}getUniforms(){return this.uniforms}getExtensions(){return this.extensions}getBlendMode(){return this.blendMode}getAttributes(){return this.attributes}setAttributes(n){this.attributes=n,this.setChanged()}getFragmentShader(){return this.fragmentShader}setFragmentShader(n){this.fragmentShader=n,this.setChanged()}getVertexShader(){return this.vertexShader}setVertexShader(n){this.vertexShader=n,this.setChanged()}setChanged(){this.dispatchEvent({type:"change"})}setDepthTexture(n,t=r){}update(n,t,e){}setSize(n,t){}initialize(n,t,e){}dispose(){for(let n of Object.keys(this)){let t=this[n];if(null!==t&&"object"==typeof t&&"function"==typeof t.dispose){if(t instanceof y||t===this.renderer)continue;this[n].dispose()}}}},x=(new Float32Array([0,0]),new Float32Array([0,1,1]),new Float32Array([0,1,1,2]),new Float32Array([0,1,2,2,3]),new Float32Array([0,1,2,3,4,4,5]),new Float32Array([0,1,2,3,4,5,7,8,9,10]),new a,new o,new c,class extends u{constructor({blendFunction:n=16,premultiply:t=!1}={}){super("NoiseEffect","void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec3 noise=vec3(rand(uv*time));\n#ifdef PREMULTIPLY\noutputColor=vec4(min(inputColor.rgb*noise,vec3(1.0)),inputColor.a);\n#else\noutputColor=vec4(noise,inputColor.a);\n#endif\n}",{blendFunction:n}),this.premultiply=t}get premultiply(){return this.defines.has("PREMULTIPLY")}set premultiply(n){this.premultiply!==n&&(n?this.defines.set("PREMULTIPLY","1"):this.defines.delete("PREMULTIPLY"),this.setChanged())}isPremultiplied(){return this.premultiply}setPremultiplied(n){this.premultiply=n}});function p(n,t,e){return n+(t-n)*e}function w(n,t,e,r){let a=p(n,t,.75),i=p(e,r,.75);return p(a,i,.875)}Math.PI,new a,new a,new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,0,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([1,0,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([0,1,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([0,1,1]),new Float32Array([1,1,1]),new Float32Array(2),new Float32Array(2),new Float32Array([0,-.25,.25,-.125,.125,-.375,.375]),new Float32Array([0,0]),new Float32Array([.25,-.25]),new Float32Array([-.25,.25]),new Float32Array([.125,-.125]),new Float32Array([-.125,.125]),new Uint8Array([0,0]),new Uint8Array([3,0]),new Uint8Array([0,3]),new Uint8Array([3,3]),new Uint8Array([1,0]),new Uint8Array([4,0]),new Uint8Array([1,3]),new Uint8Array([4,3]),new Uint8Array([0,1]),new Uint8Array([3,1]),new Uint8Array([0,4]),new Uint8Array([3,4]),new Uint8Array([1,1]),new Uint8Array([4,1]),new Uint8Array([1,4]),new Uint8Array([4,4]),new Uint8Array([0,0]),new Uint8Array([1,0]),new Uint8Array([0,2]),new Uint8Array([1,2]),new Uint8Array([2,0]),new Uint8Array([3,0]),new Uint8Array([2,2]),new Uint8Array([3,2]),new Uint8Array([0,1]),new Uint8Array([1,1]),new Uint8Array([0,3]),new Uint8Array([1,3]),new Uint8Array([2,1]),new Uint8Array([3,1]),new Uint8Array([2,3]),new Uint8Array([3,3]),new Map([[w(0,0,0,0),new Float32Array([0,0,0,0])],[w(0,0,0,1),new Float32Array([0,0,0,1])],[w(0,0,1,0),new Float32Array([0,0,1,0])],[w(0,0,1,1),new Float32Array([0,0,1,1])],[w(0,1,0,0),new Float32Array([0,1,0,0])],[w(0,1,0,1),new Float32Array([0,1,0,1])],[w(0,1,1,0),new Float32Array([0,1,1,0])],[w(0,1,1,1),new Float32Array([0,1,1,1])],[w(1,0,0,0),new Float32Array([1,0,0,0])],[w(1,0,0,1),new Float32Array([1,0,0,1])],[w(1,0,1,0),new Float32Array([1,0,1,0])],[w(1,0,1,1),new Float32Array([1,0,1,1])],[w(1,1,0,0),new Float32Array([1,1,0,0])],[w(1,1,0,1),new Float32Array([1,1,0,1])],[w(1,1,1,0),new Float32Array([1,1,1,0])],[w(1,1,1,1),new Float32Array([1,1,1,1])]]);var A=class extends n{constructor(){super(x),this.blendFunction=14}};t("noise",()=>new A);
@@ -0,0 +1 @@
1
+ import{b as e,d as t,e as i}from"./runtime-chunk-GFTBNL2W.js";import{b as n,e as s}from"./runtime-chunk-MM75L5X4.js";import{b as r,t as o}from"./runtime-chunk-DJJZN367.js";import"./runtime-chunk-QZ35BPGB.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-Z5OH244S.js";import{a,d as l}from"./runtime-chunk-TZCHGFVF.js";import{T as u,l as c}from"./runtime-chunk-OW6T4XFV.js";import{Aa as h,Cc as d,Dc as m,Ec as p,Ed as v,Fc as f,Gd as y,Ic as S,Ja as g,Jc as x,Pc as z,Rc as b,Vd as T,Wc as E,Wd as R,Xd as P,bd as _,dd as C,kd as A,ld as D,nd as w,pd as F,qd as I,te as V}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var N=new E,U=new f,O=new m,L=new m,M=new m,Q=class{constructor(e){this.geometry=e.geometry,this.randomFunction=Math.random,this.indexAttribute=this.geometry.index,this.positionAttribute=this.geometry.getAttribute("position"),this.normalAttribute=this.geometry.getAttribute("normal"),this.colorAttribute=this.geometry.getAttribute("color"),this.uvAttribute=this.geometry.getAttribute("uv"),this.weightAttribute=null,this.distribution=null}setWeightAttribute(e){return this.weightAttribute=e?this.geometry.getAttribute(e):null,this}build(){let e=this.indexAttribute,t=this.positionAttribute,i=this.weightAttribute,n=e?e.count/3:t.count/3,s=new Float32Array(n);for(let r=0;r<n;r++){let n=1,o=3*r,a=3*r+1,l=3*r+2;e&&(o=e.getX(o),a=e.getX(a),l=e.getX(l)),i&&(n=i.getX(o)+i.getX(a)+i.getX(l)),N.a.fromBufferAttribute(t,o),N.b.fromBufferAttribute(t,a),N.c.fromBufferAttribute(t,l),n*=N.getArea(),s[r]=n}let r=new Float32Array(n),o=0;for(let e=0;e<n;e++)o+=s[e],r[e]=o;return this.distribution=r,this}setRandomGenerator(e){return this.randomFunction=e,this}sample(e,t,i,n){let s=this._sampleFaceIndex();return this._sampleFace(s,e,t,i,n)}_sampleFaceIndex(){let e=this.distribution[this.distribution.length-1];return this._binarySearch(this.randomFunction()*e)}_binarySearch(e){let t=this.distribution,i=0,n=t.length-1,s=-1;for(;i<=n;){let r=Math.ceil((i+n)/2);if(0===r||t[r-1]<=e&&t[r]>e){s=r;break}e<t[r]?n=r-1:i=r+1}return s}_sampleFace(e,t,i,n,s){let r=this.randomFunction(),o=this.randomFunction();r+o>1&&(r=1-r,o=1-o);let a=this.indexAttribute,l=3*e,u=3*e+1,c=3*e+2;return a&&(l=a.getX(l),u=a.getX(u),c=a.getX(c)),N.a.fromBufferAttribute(this.positionAttribute,l),N.b.fromBufferAttribute(this.positionAttribute,u),N.c.fromBufferAttribute(this.positionAttribute,c),t.set(0,0,0).addScaledVector(N.a,r).addScaledVector(N.b,o).addScaledVector(N.c,1-(r+o)),void 0!==i&&(void 0!==this.normalAttribute?(N.a.fromBufferAttribute(this.normalAttribute,l),N.b.fromBufferAttribute(this.normalAttribute,u),N.c.fromBufferAttribute(this.normalAttribute,c),i.set(0,0,0).addScaledVector(N.a,r).addScaledVector(N.b,o).addScaledVector(N.c,1-(r+o)).normalize()):N.getNormal(i)),void 0!==n&&void 0!==this.colorAttribute&&(N.a.fromBufferAttribute(this.colorAttribute,l),N.b.fromBufferAttribute(this.colorAttribute,u),N.c.fromBufferAttribute(this.colorAttribute,c),U.set(0,0,0).addScaledVector(N.a,r).addScaledVector(N.b,o).addScaledVector(N.c,1-(r+o)),n.r=U.x,n.g=U.y,n.b=U.z),void 0!==s&&void 0!==this.uvAttribute&&(O.fromBufferAttribute(this.uvAttribute,l),L.fromBufferAttribute(this.uvAttribute,u),M.fromBufferAttribute(this.uvAttribute,c),s.set(0,0).addScaledVector(O,r).addScaledVector(L,o).addScaledVector(M,1-(r+o))),this}};function B(e,t){let i=e,n=new Float32Array(4*t*t);for(let e=0;e<t*t;e++)n[4*e]=i[3*e],n[4*e+1]=i[3*e+1],n[4*e+2]=i[3*e+2],n[4*e+3]=0;let s=new w(n,t,t,g,h);return s.needsUpdate=!0,s}var W=class{constructor(e,t,i,n){this.type="SphereEmitterShape",this.targetMesh=void 0,this.size=e,this.type=i,this.textureSize=function(e){let t=Math.ceil(Math.sqrt(e));return Math.max(t,1)}(t),this.targetMesh="BufferGeometry"===n?.geometry.type||"Mesh"===n?.type&&n&&n.geometry.hasAttribute("position")&&n.geometry.hasAttribute("normal")?n:this.getMesh(i,1);let{positions:s,dataTexture:r,dataTextureNormals:o}=this.createPositions(this.textureSize,this.targetMesh??this.getMesh(i,1));this.positionsTexture=r,this.positionsAttribute=s,this.directionsTexture=o}createPositions(e,t){let{positions:i,normals:n}=function(e,t){let i=new D(e.geometry,e.material),n=[],s=[],r=new f,o=new f;null!==i.geometry.index&&(i.geometry=i.geometry.toNonIndexed());let a=new Q(i).build();for(let e=0;e<t;e++)a.sample(r,o),n.push(r.x,r.y,r.z),s.push(o.x,o.y,o.z);return{positions:new Float32Array(n),normals:new Float32Array(s)}}(t,e*e);return{dataTexture:B(i,e),positions:i,dataTextureNormals:B(n,e)}}getMesh(e,t){let i=null;switch(e){case"SphereEmitterShape":i=new R(.5*t,32,32);break;case"TorusEmitterShape":i=new P(.5*t,.3,15,40);break;case"ConeEmitterShape":i=new y(t,t,15);break;case"BoxEmitterShape":i=new v(t,t,t);break;case"PlaneEmitterShape":i=new T(t,t),i.rotateX(-Math.PI/2);break;default:i=new R(t,32,32)}return new D(i,new A({color:16711680}))}applyToShader(e,t){this.size=(new f).fromArray(t.size.map(e=>"number"==typeof e?e:1)),e.uEmitterSize.value=this.size}dispose(){this.positionsTexture.dispose(),this.directionsTexture.dispose(),this.positionsAttribute=new Float32Array}};function k(e){let t={...e},i=u.defaultData;t.forceFieldObjectId&&(t.colliderEntityId=t.forceFieldObjectId);let n={...i.shape,...t.shape},s={...i.renderMaterial,...t.renderMaterial};return{...i,...t,shape:n,renderMaterial:s}}var q=class extends b{constructor(n,s){super(),this.type="ParticleEmitter",this.debugMode=!1,this.worldSpace=!0,this.rootObject=null,this.gpuCompute=null,this.positionSimRT=null,this.velocitySimRT=null,this.emissionRateSimRT=null,this.emitterShape=void 0,this.isEmitting=!1,this.hasBeenReset=!1,this.emittedParticlesAmount=0,this.lastEmitTime=0,this.globalTime=0,this.targetFPS=60,this.previousRatio=1,this.lerpFactor=.4,this.particlesAmount=0,this.noiseStrength=0,this.noiseScale=0,this.isBillboardBased=!0,this.simFeaturesDefinition={USE_COLLIDER:!1,USE_ATTRACTOR:!1,USE_VORTEX:!1,USE_SPHERE_COLLIDER:!1,USE_BOX_COLLIDER:!1,USE_FORCE_LOCAL_SPACE:!1,USE_NORMALS:!1,USE_CURL_NOISE:!0,USE_SIMPLEX_NOISE:!1,USE_FBM_NOISE:!1},this.textureLoader=new V,this.textureRequestId=0,this.currentWorldPosition=new f,this.systemQuaternion=new p,this.worldGravity=new f(0,0,0),this.directionAxis=new f(0,0,0),this.colliderV3=new f(0,0,0),this.colliderQuaternion=new p(0,0,0,1),this.matrixAutoUpdate=!0,this.renderer=n,this.system=s,this.shared=s.context.shared;let r=s.data;this.material=i(n)?e()?.createMaterial(r.renderMaterial,s.context)??t().createMaterial(r.renderMaterial,s.context):t().createMaterial(r.renderMaterial,s.context),this.material.uniforms={uSize:{value:0},uSizeEnd:{value:0},uColor:{value:r.renderMaterial.color},uColor2:{value:r.renderMaterial.color2},uPosition:{value:new f(0,0,0)},uEmissionData:{value:new f(0,0,0)},uTexture:{value:this.defaultTexture},uWorldOffset:{value:new f(0,0,0)},uWorldQuaternion:{value:new x(0,0,0,1)},uRandScaleFactor:{value:r.randomScale??0},uRandRotationFactor:{value:r.randomRotation??0},uRotation:{value:r.renderMaterial.spriteRotation[0]??0},uRotationEnd:{value:r.renderMaterial.spriteRotation[1]??0}},this.setTexture(this.material.uniforms,r.renderMaterial.texture),this.init(r)}setTexture(e,t){let i=t.data,n=++this.textureRequestId;if("string"==typeof t){let i=this.shared.image(t),s=()=>{if(n!==this.textureRequestId)return;let t=new S(i.img);t.needsUpdate=!0,e.uTexture.value=t};return void(i.loaded?s():i.loadPromise.then(s))}if("string"!=typeof i){let t=new Image;t.onload=()=>{if(n!==this.textureRequestId)return;let i=new S(t);i.needsUpdate=!0,e.uTexture.value=i};let s=new Blob([i],{type:"image/*"}),r=URL.createObjectURL(s);t.src=r}}updateGeometryAttributes(e,t){let n=function(e){let t=new Float32Array(e*e*2);for(let i=0;i<e;i++)for(let n=0;n<e;n++){let s=i*e+n;t[2*s+0]=i/(e-1),t[2*s+1]=n/(e-1)}return t}(t);if(!this.emitterShape?.positionsAttribute)return;let s=new F(n,2);e.geometry.setAttribute("ref",s),i(this.renderer)&&e.geometry.setAttribute("particleRef",s)}applyWorldSpace(){if(!(this.system.started&&this.worldSpace&&this.positionSimRT&&this.velocitySimRT))return;let e=this.system;e.getWorldQuaternion(this.systemQuaternion),this.systemQuaternion.invert(),e.getWorldPosition(this.currentWorldPosition),this.material.uniforms.uWorldOffset.value=this.currentWorldPosition,this.material.uniforms.uWorldQuaternion.value.copy(this.systemQuaternion.normalize()),this.positionSimRT.material.uniforms.uWorldOffset.value=this.currentWorldPosition,this.systemQuaternion.invert(),this.positionSimRT.material.uniforms.uWorldQuaternion.value.copy(this.systemQuaternion.normalize()),this.velocitySimRT.material.uniforms.uWorldQuaternion.value.copy(this.systemQuaternion.normalize())}update(e,t){if(!this.gpuCompute||!this.positionSimRT||!this.velocitySimRT||!this.emissionRateSimRT||this.hasBeenReset)return;if(this.checkIfAllParticlesAreDead()&&!this.hasBeenReset)return void this.reset();this.applyWorldSpace(),this.globalTime=e,this.positionSimRT.material.uniforms.uTime.value=e,this.emissionRateSimRT.material.uniforms.uTime.value=e;let i=1e3/t,n=this.targetFPS/i,s=this.previousRatio+(n-this.previousRatio)*this.lerpFactor;this.positionSimRT.material.uniforms.uFPSRatio.value=s,this.previousRatio=s;let r=this.isEmitting?this.GoEmitSomeParticles(e,this.system.data.birthRatePerSec):0;this.emissionRateSimRT.material.uniforms.uLastIndexEmitted.value=this.emittedParticlesAmount,this.emissionRateSimRT.material.uniforms.uParticlesToEmit.value=r,this.material.uniforms.uPosition.value=this.gpuCompute.getCurrentRenderTarget(this.positionSimRT)?.texture,this.system.colliderEntities.length>0&&this.renderColliders(),this.gpuCompute.compute()}renderColliders(){if(!this.velocitySimRT)return;let e=this.system.colliderEntities[0],t=this.simFeaturesDefinition.USE_COLLIDER||this.simFeaturesDefinition.USE_ATTRACTOR||this.simFeaturesDefinition.USE_VORTEX;if(e.destroyedInAction&&t&&this.init(k({...this.system.data,colliderEntityId:null})),!e||e.destroyedInAction)return;e.getWorldPosition(this.colliderV3),0===this.colliderV3.y&&(this.colliderV3.y=1e-4),this.velocitySimRT.material.uniforms.uColliderPos.value.copy(this.colliderV3);let i=e.data.size;this.colliderV3.fromArray(i),this.velocitySimRT.material.uniforms.uColliderSize.value.copy(this.simFeaturesDefinition.USE_SPHERE_COLLIDER?this.colliderV3.multiplyScalar(.5):this.colliderV3),e.getWorldQuaternion(this.colliderQuaternion),this.velocitySimRT.material.uniforms.uColliderQuaternion.value.copy(this.colliderQuaternion.normalize()),this.velocitySimRT.material.uniforms.uColliderQuaternionInvert.value.copy(this.colliderQuaternion.normalize().invert())}updateState(e){!this.velocitySimRT||!this.positionSimRT||(e.renderMaterial&&this.updateMaterialState(e.renderMaterial),this.updateParticleState(e))}updateVariableState(e,t){if(!this.velocitySimRT||!this.positionSimRT)return;"size"===t[2]&&this.material.updateState({size:[e,this.material.uniforms.uSizeEnd.value]}),"sizeEnd"===t[2]&&this.material.updateState({size:[this.material.uniforms.uSize.value,e]});let i=(e,t)=>{let i=[...this.system.data.shape.size];i[e]=t,this.updateParticleState({shape:{...this.system.data.shape,size:i}})};"shape_size_0"===t[2]&&i(0,e),"shape_size_1"===t[2]&&i(1,e),"shape_size_2"===t[2]&&i(2,e),"speed"===t[2]&&(this.velocitySimRT.material.uniforms.uSpeed.value=e/10),"gravity"===t[2]&&this.worldGravity.set(0,e/100,0),"noiseStrength"===t[2]&&(this.noiseStrength=e,this.velocitySimRT.material.uniforms.uNoiseStrength.value=this.noiseStrength),"noiseScale"===t[2]&&(this.noiseScale=e,this.velocitySimRT.material.uniforms.uNoiseScale.value=this.noiseScale),"direction_x"===t[2]&&(this.directionAxis=this.getDirectionAxis([Number(e),this.system.data.direction[1],this.system.data.direction[2]])),"direction_y"===t[2]&&(this.directionAxis=this.getDirectionAxis([this.system.data.direction[0],Number(e),this.system.data.direction[2]])),"direction_z"===t[2]&&(this.directionAxis=this.getDirectionAxis([this.system.data.direction[0],this.system.data.direction[1],Number(e)]))}updateMaterialState(e){this.material.updateState({...e,size:e.size?[Number(this.shared.getVariable(e.size[0],[this.uuid,"particles","size"])),Number(this.shared.getVariable(e.size[1],[this.uuid,"particles","sizeEnd"]))]:[0,0]}),e.texture&&(this.setTexture(this.material.uniforms,e.texture),this.material.needsUpdate=!0)}updateParticleState(e){if(this.positionSimRT&&this.velocitySimRT){if(this.shouldReInitGPUCompute(e)&&this.init(k(this.system.data)),void 0!==e.life&&(this.positionSimRT.material.uniforms.uMaxLifeTime.value=e.life),void 0!==e.speed&&(this.velocitySimRT.material.uniforms.uSpeed.value=Number(this.shared.getVariable(e.speed,[this.uuid,"particles","speed"]))/10),void 0!==e.collisionBounce&&(this.velocitySimRT.material.uniforms.uBounce.value=e.collisionBounce),void 0!==e.noiseStrength&&(this.noiseStrength=Number(this.shared.getVariable(e.noiseStrength,[this.uuid,"particles","noiseStrength"])),this.velocitySimRT.material.uniforms.uNoiseStrength.value=this.noiseStrength),void 0!==e.noiseScale&&(this.noiseScale=Number(this.shared.getVariable(e.noiseScale,[this.uuid,"particles","noiseScale"])),this.velocitySimRT.material.uniforms.uNoiseScale.value=this.noiseScale),void 0!==e.noiseSeed&&(this.velocitySimRT.material.uniforms.uNoiseSeed.value=e.noiseSeed),void 0!==e.randomMass&&(this.velocitySimRT.material.uniforms.uRandomMassFactor.value=e.randomMass),void 0!==e.renderMaterial?.size){let t=this.shared.getVariable(e.renderMaterial.size[0],[this.uuid,"particles","size"]);this.velocitySimRT.material.uniforms.particleSize.value=Number(t)}if(void 0!==e.renderMaterial?.spriteRotation&&(this.material.uniforms.uRotation.value=e.renderMaterial.spriteRotation[0],this.material.uniforms.uRotationEnd.value=e.renderMaterial.spriteRotation[1]),void 0!==e.shape){let t=e.shape.size??this.system.data.shape.size,i=[Number(this.shared.getVariable(t[0],[this.uuid,"particles","shape_size_0"])),Number(this.shared.getVariable(t[1],[this.uuid,"particles","shape_size_1"])),Number(this.shared.getVariable(t[2],[this.uuid,"particles","shape_size_2"]))],n={...k(this.system.data).shape,size:i};this.emitterShape?.applyToShader(this.positionSimRT.material.uniforms,n)}if(void 0!==e.gravity&&(this.worldGravity.set(0,Number(this.shared.getVariable(this.system.data.gravity,[this.uuid,"particles","gravity"]))/100,0),this.velocitySimRT.material.uniforms.uGravity={value:this.worldGravity}),void 0!==e.direction){let t=this.getDirectionFromVariable(e.direction);this.directionAxis=this.getDirectionAxis(t),this.velocitySimRT.material.uniforms.uDirectionsAxis.value=this.directionAxis}void 0!==e.randomRotation&&(this.material.uniforms.uRandRotationFactor.value=e.randomRotation),void 0!==e.randomScale&&(this.material.uniforms.uRandScaleFactor.value=e.randomScale)}}updateForceFieldParameters(e){!this.velocitySimRT||(void 0!==e.forceIntensity&&(this.velocitySimRT.material.uniforms.uForceIntensity.value=e.forceIntensity),void 0!==e.forceDambing&&(this.velocitySimRT.material.uniforms.uForceDamping.value=e.forceDambing))}getDirectionAxis(e){let t=[Number(e[0])*d.DEG2RAD,Number(e[1])*d.DEG2RAD,Number(e[2])*d.DEG2RAD],i=new z(t[0],t[1],t[2],"XYZ");return this.directionAxis.set(0,1,0).applyEuler(i).normalize(),this.velocitySimRT&&(this.velocitySimRT.material.uniforms.uDirectionsAxis.value=this.directionAxis),this.directionAxis}shouldReInitGPUCompute(e){let{birthRatePerSec:t,rootObjectType:i,colliderEntityId:n,shape:s,emitTimeDuration:r,emitTimeCycle:o,life:a,directionMode:l,noiseType:u}=e;return void 0!==t||void 0!==i||n||null===n||void 0!==o||void 0!==s||void 0!==a||void 0!==r||void 0!==l||void 0!==u}init(n){this.dispose(),this.particlesAmount=this.getMaxParticlesAmount({birthRatePerSecond:n.birthRatePerSec,particleMaxLifeTime:n.life,loopDuration:"infinity"===n.emitTimeCycle?0:n.emitTimeDuration}),this.particlesAmount>1e5&&(console.warn("The maximum number of particles is limited to 100000."),this.particlesAmount=1e5),this.emitterShape=this.createShape(n.shape,this.particlesAmount);let s=setInterval(()=>{if(!this.emitterShape)return;let e=this.emitterShape.positionsTexture.source.data.data;e&&!isNaN(e[0])?clearInterval(s):this.init(n)},100);if(!this.emitterShape)return;let r=this.updateSimulationDefinition(n),o=i(this.renderer)?e().createComputation(this.emitterShape.textureSize,this.emitterShape.textureSize,this.renderer,this.simFeaturesDefinition):t().createComputation(this.emitterShape.textureSize,this.emitterShape.textureSize,this.renderer),a=o.addVariable("uCurrentPosition",r+"\n\n\n\nuniform sampler2D uOriginalPosition;\nuniform float uTime;\nuniform float uSpeed; \nuniform vec3 uWorldOffset; \nuniform vec4 uWorldQuaternion;\nuniform float uMaxLifeTime;\nuniform vec3 uEmitterSize;\nuniform float uFPSRatio; \n\nfloat random (vec2 st) {\n return fract(sin(dot(st.xy,\n vec2(12.9898,78.233)))*\n 43758.5453123);\n}\nvec3 applyQuaternionToVector( vec4 q, vec3 v ){\n return v + 2.0 * cross( q.xyz, cross( q.xyz, v ) + q.w * v );\n}\n\nvec3 applyForce(vec3 force, float mass) {\n vec3 acceleration = force / mass;\n \n return acceleration;\n }\n \n\nvoid main() {\n vec2 vUv = gl_FragCoord.xy / resolution.xy;\n vec3 position = texture2D( uCurrentPosition, vUv ).xyz;\n float currentLife = texture2D( uCurrentPosition, vUv ).w; \n float isSpawning = texture2D( uCurrentEmissionRate, vUv ).r; \n float isActive = texture2D( uCurrentEmissionRate, vUv ).g; \n float timeStart = texture2D( uCurrentEmissionRate, vUv ).b; \n vec3 originalPosition = ((texture2D( uOriginalPosition, vUv ).xyz) * uEmitterSize);\n vec3 velocity = texture2D( uCurrentVelocity, vUv ).xyz;\n float collisionFlag = texture2D( uCurrentVelocity, vUv ).w; \n float lifeTime = uMaxLifeTime;\n\n \n \n float isColliding = step(0.5, collisionFlag); \n float bounceOffset = 3.0 * isColliding; \n vec3 collisionAdjustedVelocity = velocity * (1.0 + bounceOffset);\n\n \n vec3 fpsVelocity = velocity * min(uFPSRatio, 5.0);\n position += mix(fpsVelocity, collisionAdjustedVelocity, isColliding);\n\n \n \n \n vec3 newPosition = applyQuaternionToVector(uWorldQuaternion, originalPosition) + uWorldOffset;\n originalPosition = mix(originalPosition, newPosition, isSpawning);\n position = mix(position, originalPosition, isSpawning);;\n timeStart = mix(timeStart, uTime, isSpawning);\n\n \n float timeLeft = max(lifeTime - (uTime - timeStart), 0.0);\n float life_Normalize = timeLeft / lifeTime;\n\n \n vec4 activeColor = vec4(position, life_Normalize);\n \n gl_FragColor = mix(vec4(0.0), activeColor, isActive);\n\n}\n",this.emitterShape.positionsTexture),l=o.addVariable("uCurrentVelocity",r+"\n\n\n\nuniform sampler2D uOriginalPosition;\nuniform sampler2D uDirections; \nuniform vec3 uDirectionsAxis;\nuniform vec4 uWorldQuaternion;\nuniform vec3 uGravity; \nuniform float uNoiseStrength; \nuniform float uNoiseScale; \nuniform float uNoiseSeed; \nuniform float particleSize;\nuniform float uSpeed; \nuniform float uRandomMassFactor;\n\n\nuniform vec3 uColliderPos; \nuniform vec3 uColliderSize; \nuniform vec4 uColliderQuaternion; \nuniform vec4 uColliderQuaternionInvert; \nuniform float uBounce; \nuniform float uForceDamping;\nuniform float uForceIntensity;\n\n\n\n\n vec3 mod289(vec3 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n }\n \n vec4 mod289(vec4 x) {\n return x - floor(x * (1.0 / 289.0)) * 289.0;\n }\n \n vec4 permute(vec4 x) {\n return mod289(((x*34.0)+1.0)*x);\n }\n \n vec4 taylorInvSqrt(vec4 r)\n {\n return 1.79284291400159 - 0.85373472095314 * r;\n }\n \n vec3 fade(vec3 t) {\n return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n\n float snoise(vec3 v)\n {\n const vec2 C = vec2(1.0/6.0, 1.0/3.0) ;\n const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\n vec3 i = floor(v + dot(v, C.yyy) );\n vec3 x0 = v - i + dot(i, C.xxx) ;\n vec3 g = step(x0.yzx, x0.xyz);\n vec3 l = 1.0 - g;\n vec3 i1 = min( g.xyz, l.zxy );\n vec3 i2 = max( g.xyz, l.zxy );\n vec3 x1 = x0 - i1 + C.xxx;\n vec3 x2 = x0 - i2 + C.yyy; \n vec3 x3 = x0 - D.yyy; \n \n \n i = mod289(i);\n vec4 p = permute( permute( permute(\n i.z + vec4(0.0, i1.z, i2.z, 1.0 ))\n + i.y + vec4(0.0, i1.y, i2.y, 1.0 ))\n + i.x + vec4(0.0, i1.x, i2.x, 1.0 ));\n \n \n \n float n_ = 0.142857142857; \n vec3 ns = n_ * D.wyz - D.xzx;\n \n vec4 j = p - 49.0 * floor(p * ns.z * ns.z); \n \n vec4 x_ = floor(j * ns.z);\n vec4 y_ = floor(j - 7.0 * x_ ); \n \n vec4 x = x_ *ns.x + ns.yyyy;\n vec4 y = y_ *ns.x + ns.yyyy;\n vec4 h = 1.0 - abs(x) - abs(y);\n \n vec4 b0 = vec4( x.xy, y.xy );\n vec4 b1 = vec4( x.zw, y.zw );\n \n vec4 s0 = floor(b0)*2.0 + 1.0;\n vec4 s1 = floor(b1)*2.0 + 1.0;\n vec4 sh = -step(h, vec4(0.0));\n \n vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy ;\n vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww ;\n \n vec3 p0 = vec3(a0.xy,h.x);\n vec3 p1 = vec3(a0.zw,h.y);\n vec3 p2 = vec3(a1.xy,h.z);\n vec3 p3 = vec3(a1.zw,h.w);\n \n \n vec4 norm = taylorInvSqrt(vec4(dot(p0,p0), dot(p1,p1), dot(p2, p2), dot(p3,p3)));\n p0 *= norm.x;\n p1 *= norm.y;\n p2 *= norm.z;\n p3 *= norm.w;\n \n \n vec4 m = max(0.6 - vec4(dot(x0,x0), dot(x1,x1), dot(x2,x2), dot(x3,x3)), 0.0);\n m = m * m;\n return 42.0 * dot( m*m, vec4( dot(p0,x0), dot(p1,x1),\n dot(p2,x2), dot(p3,x3) ) );\n }\n \n vec3 snoiseVec3( vec3 x ){\n \n float s = snoise(vec3( x ));\n float s1 = snoise(vec3( x.y - 19.1 , x.z + 33.4 , x.x + 47.2 ));\n float s2 = snoise(vec3( x.z + 74.2 , x.x - 124.5 , x.y + 99.4 ));\n vec3 c = vec3( s , s1 , s2 );\n return c;\n \n }\n \n \n vec3 curlNoise( vec3 p, float seed){\n p += seed;\n const float e = .1;\n vec3 dx = vec3( e , 0.0 , 0.0 );\n vec3 dy = vec3( 0.0 , e , 0.0 );\n vec3 dz = vec3( 0.0 , 0.0 , e );\n \n vec3 p_x0 = snoiseVec3( p - dx );\n vec3 p_x1 = snoiseVec3( p + dx );\n vec3 p_y0 = snoiseVec3( p - dy );\n vec3 p_y1 = snoiseVec3( p + dy );\n vec3 p_z0 = snoiseVec3( p - dz );\n vec3 p_z1 = snoiseVec3( p + dz );\n \n float x = p_y1.z - p_y0.z - p_z1.y + p_z0.y;\n float y = p_z1.x - p_z0.x - p_x1.z + p_x0.z;\n float z = p_x1.y - p_x0.y - p_y1.x + p_y0.x;\n \n const float divisor = 1.0 / ( 2.0 * e );\n return normalize( vec3( x , y , z ) * divisor );\n \n }\n\n\n\nfloat cnoise(vec3 P)\n{\n vec3 Pi0 = floor(P); \n vec3 Pi1 = Pi0 + vec3(1.0); \n Pi0 = mod289(Pi0);\n Pi1 = mod289(Pi1);\n vec3 Pf0 = fract(P); \n vec3 Pf1 = Pf0 - vec3(1.0); \n vec4 ix = vec4(Pi0.x, Pi1.x, Pi0.x, Pi1.x);\n vec4 iy = vec4(Pi0.yy, Pi1.yy);\n vec4 iz0 = Pi0.zzzz;\n vec4 iz1 = Pi1.zzzz;\n\n vec4 ixy = permute(permute(ix) + iy);\n vec4 ixy0 = permute(ixy + iz0);\n vec4 ixy1 = permute(ixy + iz1);\n\n vec4 gx0 = ixy0 * (1.0 / 7.0);\n vec4 gy0 = fract(floor(gx0) * (1.0 / 7.0)) - 0.5;\n gx0 = fract(gx0);\n vec4 gz0 = vec4(0.5) - abs(gx0) - abs(gy0);\n vec4 sz0 = step(gz0, vec4(0.0));\n gx0 -= sz0 * (step(0.0, gx0) - 0.5);\n gy0 -= sz0 * (step(0.0, gy0) - 0.5);\n\n vec4 gx1 = ixy1 * (1.0 / 7.0);\n vec4 gy1 = fract(floor(gx1) * (1.0 / 7.0)) - 0.5;\n gx1 = fract(gx1);\n vec4 gz1 = vec4(0.5) - abs(gx1) - abs(gy1);\n vec4 sz1 = step(gz1, vec4(0.0));\n gx1 -= sz1 * (step(0.0, gx1) - 0.5);\n gy1 -= sz1 * (step(0.0, gy1) - 0.5);\n\n vec3 g000 = vec3(gx0.x,gy0.x,gz0.x);\n vec3 g100 = vec3(gx0.y,gy0.y,gz0.y);\n vec3 g010 = vec3(gx0.z,gy0.z,gz0.z);\n vec3 g110 = vec3(gx0.w,gy0.w,gz0.w);\n vec3 g001 = vec3(gx1.x,gy1.x,gz1.x);\n vec3 g101 = vec3(gx1.y,gy1.y,gz1.y);\n vec3 g011 = vec3(gx1.z,gy1.z,gz1.z);\n vec3 g111 = vec3(gx1.w,gy1.w,gz1.w);\n\n vec4 norm0 = taylorInvSqrt(vec4(dot(g000, g000), dot(g010, g010), dot(g100, g100), dot(g110, g110)));\n g000 *= norm0.x;\n g010 *= norm0.y;\n g100 *= norm0.z;\n g110 *= norm0.w;\n vec4 norm1 = taylorInvSqrt(vec4(dot(g001, g001), dot(g011, g011), dot(g101, g101), dot(g111, g111)));\n g001 *= norm1.x;\n g011 *= norm1.y;\n g101 *= norm1.z;\n g111 *= norm1.w;\n\n float n000 = dot(g000, Pf0);\n float n100 = dot(g100, vec3(Pf1.x, Pf0.yz));\n float n010 = dot(g010, vec3(Pf0.x, Pf1.y, Pf0.z));\n float n110 = dot(g110, vec3(Pf1.xy, Pf0.z));\n float n001 = dot(g001, vec3(Pf0.xy, Pf1.z));\n float n101 = dot(g101, vec3(Pf1.x, Pf0.y, Pf1.z));\n float n011 = dot(g011, vec3(Pf0.x, Pf1.yz));\n float n111 = dot(g111, Pf1);\n\n vec3 fade_xyz = fade(Pf0);\n vec4 n_z = mix(vec4(n000, n100, n010, n110), vec4(n001, n101, n011, n111), fade_xyz.z);\n vec2 n_yz = mix(n_z.xy, n_z.zw, fade_xyz.y);\n float n_xyz = mix(n_yz.x, n_yz.y, fade_xyz.x); \n return 2.2 * n_xyz;\n}\n\n\nvec3 fbm_vec3(vec3 p, float frequency, float offset)\n{\n return vec3(\n cnoise((p+vec3(offset))*frequency),\n cnoise((p+vec3(offset+20.0))*frequency),\n cnoise((p+vec3(offset-30.0))*frequency)\n );\n}\n\n\nfloat rand(vec2 co){\n return fract(sin(dot(co, vec2(12.9898, 78.233))) * 43758.5453);\n}\nvec3 applyQuaternionToVector( vec4 q, vec3 v ){\n return v + 2.0 * cross( q.xyz, cross( q.xyz, v ) + q.w * v );\n } \nvec3 applyForce(vec3 force, float mass) {\n vec3 acceleration = force / mass;\n \n return acceleration;\n}\n\nvec4 conjugate(vec4 q) {\n return vec4(q.w, -q.x, -q.y, -q.z);\n}\n\n\nvec3 ellipsoidNormal(vec3 p, vec3 radii) {\n return normalize(p / (radii * radii));\n}\n\nfloat friction = .3;\n\nvoid main() {\n vec2 vUv = gl_FragCoord.xy / resolution.xy;\n vec3 position = texture2D( uCurrentPosition, vUv ).xyz;\n vec3 originalPosition = texture2D( uOriginalPosition, vUv ).xyz;\n float timeLeft = texture2D( uCurrentPosition, vUv ).w;\n vec3 directions = texture2D( uDirections, vUv ).xyz; \n vec3 velocity = texture2D( uCurrentVelocity, vUv ).xyz;\n float mass = rand(originalPosition.xy) * 0.5 + 0.5;\n float isSpawning = texture2D( uCurrentEmissionRate, vUv ).x; \n float isActive = texture2D( uCurrentEmissionRate, vUv ).y; \n float collisionFlag =texture2D( uCurrentVelocity, vUv ).w; \n\n \n mass = (1.0 - (uRandomMassFactor * mass));\n \n if (isActive == 1.0) {\n \n \n \n #ifdef USE_CURL_NOISE\n if (uNoiseScale > 0.0 ) {\n velocity = curlNoise(position * uNoiseScale * .002, uNoiseSeed) * ( uNoiseStrength + 1.0) * .05 * uSpeed;\n }\n \n if (uNoiseStrength > 0.0 && uNoiseScale == 0.0 ) {\n velocity += curlNoise( position, uNoiseSeed) * uNoiseStrength * 0.05 * uSpeed;\n }\n #endif\n \n #ifdef USE_SIMPLEX_NOISE\n if (uNoiseScale > 0.0 ) {\n velocity = vec3(snoise(position * uNoiseScale * .001) * ( uNoiseStrength + 1.0) * .1);\n velocity *= uSpeed;\n }\n \n if (uNoiseStrength > 0.0 && uNoiseScale == 0.0) {\n velocity += vec3(snoise(position * uNoiseStrength * .001) * .05 * uSpeed);\n }\n #endif\n \n #ifdef USE_FBM_NOISE\n if (uNoiseScale > 0.0 ) {\n velocity = fbm_vec3(position * uNoiseScale * .001, ( uNoiseStrength + 1.0), uNoiseSeed);\n velocity *= uSpeed;\n }\n \n if (uNoiseStrength > 0.0 && uNoiseScale == 0.0 ) { \n velocity += fbm_vec3(position * uNoiseStrength * .001, ( uNoiseStrength + 1.0), uNoiseSeed) * .1 * uSpeed;\n }\n #endif\n\n \n \n #ifdef USE_COLLIDER\n float restitution = max(uBounce * 2., .01); \n \n \n #ifdef USE_SPHERE_COLLIDER \n \n vec3 radii = uColliderSize;\n \n vec3 relPos = position - uColliderPos;\n \n relPos = applyQuaternionToVector(uColliderQuaternionInvert, relPos); \n \n vec3 scaledPos = relPos / radii;\n \n float dist = length(scaledPos); \n \n \n if (dist <= 1. + particleSize / length(radii) && collisionFlag == 0.0) {\n \n vec3 adjustedPos = scaledPos * (1.0 + particleSize / length(radii)); \n \n vec3 normal = ellipsoidNormal(adjustedPos, radii);\n \n normal = applyQuaternionToVector(uColliderQuaternion, normal);\n \n velocity = reflect(velocity, normal) * restitution;\n\n collisionFlag = 1.0;\n } else {\n collisionFlag = 0.0;\n }\n #endif\n\n \n \n #ifdef USE_BOX_COLLIDER\n \n vec3 boxHalfSize = uColliderSize / 2.0;\n \n vec3 localPos = applyQuaternionToVector(uColliderQuaternionInvert, position - uColliderPos); \n \n vec3 localDistance = abs(localPos) - boxHalfSize;\n float distToSurface = max(localDistance.x, max(localDistance.y, localDistance.z)); \n\n \n if (distToSurface <= particleSize * 0.5 && collisionFlag == 0.0) { \n \n vec3 normal;\n if (localDistance.x > localDistance.y && localDistance.x > localDistance.z) {\n normal = vec3(sign(localPos.x), 0.0, 0.0);\n } else if (localDistance.y > localDistance.z) {\n normal = vec3(0.0, sign(localPos.y), 0.0);\n } else {\n normal = vec3(0.0, 0.0, sign(localPos.z));\n } \n \n normal = applyQuaternionToVector(uColliderQuaternion, normal); \n \n velocity = reflect(velocity, normal) * restitution;\n \n collisionFlag = 1.0;\n } else {\n collisionFlag = 0.0;\n }\n #endif \n #endif \n \n\n \n \n #ifdef USE_ATTRACTOR\n\n #ifdef USE_SPHERE_COLLIDER \n \n vec3 radii = uColliderSize;\n \n vec3 relPos = position - uColliderPos;\n \n relPos = applyQuaternionToVector(uColliderQuaternionInvert, relPos); \n \n vec3 scaledPos = relPos / radii;\n \n float distToSurface = length(scaledPos); \n float insideCheck = 1.0;\n\n #endif\n\n\n #ifdef USE_BOX_COLLIDER\n \n vec3 boxHalfSize = uColliderSize / 2.0;\n \n vec3 localPos = applyQuaternionToVector(uColliderQuaternionInvert, position - uColliderPos); \n vec3 localDistance = abs(localPos) - boxHalfSize;\n float distToSurface = max(localDistance.x, max(localDistance.y, localDistance.z));\n float insideCheck = particleSize;\n #endif \n \n \n #ifdef USE_FORCE_LOCAL_SPACE\n if (distToSurface <= insideCheck ) { \n \n #ifdef USE_SPHERE_COLLIDER \n float attractorStrength = (1.0 - distToSurface ) * uForceIntensity; \n #endif\n\n #ifdef USE_BOX_COLLIDER\n float attractorStrength = max((1.0 - insideCheck / distToSurface), 0.) * uForceIntensity; \n #endif\n\n float attractorDamping = uForceDamping; \n \n \n vec3 attractorRadii = uColliderSize;\n \n vec3 relPos = position - uColliderPos;\n \n relPos = applyQuaternionToVector(uColliderQuaternionInvert, relPos); \n \n vec3 scaledPos = relPos / attractorRadii;\n\n \n float attractorRadius = length(scaledPos);\n \n vec3 relativePosition = position - uColliderPos;\n \n vec3 attractorForce = normalize(relativePosition) * attractorStrength;\n \n velocity -= attractorForce;\n \n velocity *= attractorDamping;\n }\n #else \n \n vec3 relativePosition = position - uColliderPos;\n \n vec3 attractorForce = normalize(relativePosition) * uForceIntensity;\n \n velocity -= attractorForce;\n \n velocity *= uForceDamping;\n #endif \n #endif \n \n \n \n #ifdef USE_VORTEX\n \n vec3 boxHalfSize = uColliderSize / 2.0;\n \n vec3 localPos = applyQuaternionToVector(uColliderQuaternionInvert, position - uColliderPos); \n vec3 localDistance = abs(localPos) - boxHalfSize;\n float distToSurface = max(localDistance.x, max(localDistance.y, localDistance.z));\n\n \n if (distToSurface <= particleSize) {\n float vortexStrength = uForceIntensity;\n vec3 localTopCenter = vec3(0.0, 0., 0.0);\n\n \n vec3 vortexCenter = uColliderPos + applyQuaternionToVector(uColliderQuaternion, localTopCenter);\n \n vec3 vortexVector = vortexCenter - position;\n\n \n \n vec3 upVector = vec3(0.0, 1.0, 0.01);\n vec3 rotationAxis = cross(upVector, applyQuaternionToVector(uColliderQuaternion, vortexVector));\n rotationAxis = normalize(rotationAxis);\n\n \n float rotationSpeed = length(vortexVector * vortexStrength * 3.0) ; \n\n vec3 rotationVelocity = rotationAxis * rotationSpeed;\n \n velocity = rotationVelocity * 0.005 ;\n\n \n \n \n vec3 originDirection = applyQuaternionToVector(uWorldQuaternion, directions);\n velocity += applyForce( originDirection * uSpeed * (1. - uForceDamping) , mass * .5);\n }\n #endif \n\n } \n \n\n \n \n \n #ifdef USE_NORMALS\n velocity = mix(velocity, applyQuaternionToVector(uWorldQuaternion, directions) * uSpeed, isSpawning);\n #else\n velocity = mix(velocity, applyQuaternionToVector(uWorldQuaternion, uDirectionsAxis) * uSpeed, isSpawning); \n #endif\n \n \n velocity += applyForce(uGravity, mass * .5) * (1.0 - collisionFlag);\n\n gl_FragColor = vec4(velocity, collisionFlag);\n}\n",this.emitterShape.directionsTexture),u=o.addVariable("uCurrentEmissionRate","\n\n\n\n\nuniform sampler2D uIndex; \nuniform float uLastIndexEmitted; \nuniform float uParticlesToEmit; \nuniform float uTime;\n\nvoid main() {\n vec2 vUv = gl_FragCoord.xy / resolution.xy;\n float particleIndex = texture(uIndex, vUv).x;\n float timeLeft = texture2D( uCurrentPosition, vUv ).w;\n float isActive = texture2D( uCurrentEmissionRate, vUv ).g; \n float timeStart = texture2D( uCurrentEmissionRate, vUv ).b;\n\n\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n float emitLowerBound = step(uLastIndexEmitted, particleIndex);\n float emitUpperBound = step(particleIndex, uLastIndexEmitted + uParticlesToEmit - 1.0);\n float emitParticle = emitLowerBound * emitUpperBound; \n\n \n timeStart = mix(timeStart, uTime, emitParticle);\n gl_FragColor = vec4(emitParticle, mix(isActive, 1.0, emitParticle), timeStart, 1.0);\n\n\n}\n",function(e){let t=new Float32Array(4*e*e);for(let i=0;i<e*e;i++)t[4*i]=0,t[4*i+1]=0,t[4*i+2]=0,t[4*i+3]=0;let i=new w(t,e,e,g,h);return i.needsUpdate=!0,i}(this.emitterShape.textureSize));o.setVariableDependencies(a,[a,l,u]),o.setVariableDependencies(l,[a,l,u]),o.setVariableDependencies(u,[a,l,u]);let c=function({size:e}){let t=new Float32Array(4*e*e);for(let i=0;i<e*e;i++)t[4*i]=i,t[4*i+1]=0,t[4*i+2]=0,t[4*i+3]=0;let i=new w(t,e,e,g,h);return i.needsUpdate=!0,i}({size:this.emitterShape.textureSize}),d={uOriginalPosition:{value:this.emitterShape.positionsTexture},uWorldOffset:{value:new f(0,0,0)},uWorldQuaternion:{value:new x(0,0,0,1)},uTime:{value:0},uFPSRatio:{value:1},uMaxLifeTime:{value:n.life},uEmitterSize:{value:new f(Number(this.shared.getVariable(n.shape.size[0],[this.uuid,"particles","shape_size_0"])),Number(this.shared.getVariable(n.shape.size[1],[this.uuid,"particles","shape_size_1"])),Number(this.shared.getVariable(n.shape.size[2],[this.uuid,"particles","shape_size_2"])))},particleSize:{value:0}};a.material.uniforms=d;let m=this.getDirectionFromVariable(n.direction);this.directionAxis=this.getDirectionAxis(m),this.worldGravity.set(0,Number(this.shared.getVariable(this.system.data.gravity,[this.uuid,"particles","gravity"]))/100,0),this.noiseStrength=Number(this.shared.getVariable(n.noiseStrength,[this.uuid,"particles","noiseStrength"])),this.noiseScale=Number(this.shared.getVariable(n.noiseScale,[this.uuid,"particles","noiseScale"]));let p=n.colliderEntityId&&this.system.getColliderData(n.colliderEntityId),v={uOriginalPosition:{value:this.emitterShape.positionsTexture},uDirections:{value:this.emitterShape.directionsTexture},uDirectionsAxis:{value:this.directionAxis},uWorldQuaternion:{value:new x(0,0,0,1)},uColliderPos:{value:new f(0,0,0)},uColliderSize:{value:new f(0,0,0)},uForceIntensity:{value:p?p.forceIntensity:0},uForceDamping:{value:p?p.forceDambing:0},uColliderQuaternion:{value:new x(0,0,0,1)},uColliderQuaternionInvert:{value:new x(0,0,0,1)},particleSize:{value:0},uGravity:{value:this.worldGravity},uNoiseStrength:{value:this.noiseStrength},uNoiseScale:{value:this.noiseScale},uNoiseSeed:{value:n.noiseSeed},uRandomMassFactor:{value:n.randomMass},uBounce:{value:n.collisionBounce},uSpeed:{value:Number(this.shared.getVariable(n.speed,[this.uuid,"particles","speed"]))/10}};l.material.uniforms=v;let y={uIndex:{value:c},uTime:{value:0},uLastIndexEmitted:{value:0},uParticlesToEmit:{value:0}};u.material.uniforms=y;let S=[Number(this.shared.getVariable(n.shape.size[0],[this.uuid,"particles","shape_size_0"])),Number(this.shared.getVariable(n.shape.size[1],[this.uuid,"particles","shape_size_1"])),Number(this.shared.getVariable(n.shape.size[2],[this.uuid,"particles","shape_size_2"]))],z={...k(this.system.data).shape,size:S};this.emitterShape.applyToShader(a.material.uniforms,z),o.init(),this.gpuCompute=o,this.positionSimRT=a,this.velocitySimRT=l,this.emissionRateSimRT=u,this.material.uniforms.uPosition.value=o.getCurrentRenderTarget(a)?.texture,this.rootObject=this.createPrimaryEmitter(this.emitterShape.textureSize),this.add(this.rootObject),this.material.needsUpdate=!0}getDirectionFromVariable(e){return[Number(this.shared.getVariable(e[0],[this.uuid,"particles","direction_x"])),Number(this.shared.getVariable(e[1],[this.uuid,"particles","direction_y"])),Number(this.shared.getVariable(e[2],[this.uuid,"particles","direction_z"]))]}updateSimulationDefinition(e){if(this.simFeaturesDefinition.USE_COLLIDER=!1,this.simFeaturesDefinition.USE_ATTRACTOR=!1,this.simFeaturesDefinition.USE_VORTEX=!1,this.simFeaturesDefinition.USE_SPHERE_COLLIDER=!1,this.simFeaturesDefinition.USE_BOX_COLLIDER=!1,this.simFeaturesDefinition.USE_FORCE_LOCAL_SPACE=!1,this.simFeaturesDefinition.USE_NORMALS=!1,this.simFeaturesDefinition.USE_CURL_NOISE=!1,this.simFeaturesDefinition.USE_SIMPLEX_NOISE=!1,this.simFeaturesDefinition.USE_FBM_NOISE=!1,e.colliderEntityId&&this.system.colliderEntities.length>0){let t=this.system.getColliderData(e.colliderEntityId);switch(t?.forceType){case"attractor":this.simFeaturesDefinition.USE_ATTRACTOR=!0;break;case"collider":this.simFeaturesDefinition.USE_COLLIDER=!0;break;case"vortex":this.simFeaturesDefinition.USE_VORTEX=!0}let i=t?.colliderType;"sphere"===i&&(this.simFeaturesDefinition.USE_SPHERE_COLLIDER=!0),"box"===i&&(this.simFeaturesDefinition.USE_BOX_COLLIDER=!0),"helper"===t?.forceRange&&(this.simFeaturesDefinition.USE_FORCE_LOCAL_SPACE=!0)}"normals"===e.directionMode&&(this.simFeaturesDefinition.USE_NORMALS=!0),"curl"===e.noiseType&&(this.simFeaturesDefinition.USE_CURL_NOISE=!0),"simplex"===e.noiseType&&(this.simFeaturesDefinition.USE_SIMPLEX_NOISE=!0),"fbm"===e.noiseType&&(this.simFeaturesDefinition.USE_FBM_NOISE=!0);let t="";for(let[e,i]of Object.entries(this.simFeaturesDefinition))i&&(t+=`#define ${e}\n`);return t}createShape(e,t){this.emitterShape&&this.emitterShape.dispose();let i=new f(Number(this.shared.getVariable(e.size[0],[this.uuid,"particles","shape_size_0"])),Number(this.shared.getVariable(e.size[1],[this.uuid,"particles","shape_size_1"])),Number(this.shared.getVariable(e.size[2],[this.uuid,"particles","shape_size_2"])));if("MeshEmitterShape"===e.type){let n=null;return this.system.context.scene.traverseEntity(t=>{t.uuid===e.fromMeshId&&(n=t)}),n?new W(i,t,e.type,n):new W(i,t,"SphereEmitterShape")}return new W(i,t,e.type)}createPrimaryEmitter(e){let t=e*e,i=new I(new T(1,1,1),this.material,t);return this.updateGeometryAttributes(i,e),this.material.needsUpdate=!0,i.onBeforeRender=()=>{this.applyWorldSpace()},i}getMaxParticlesAmount({birthRatePerSecond:e,particleMaxLifeTime:t,loopDuration:i=0}){return Math.ceil(e*(t+i))}dispose(){!this.gpuCompute||(this.rootObject?.parent?.remove(this.rootObject),this.gpuCompute.dispose(),this.material.nodeMaterialDispose(),this.emitterShape?.dispose())}GoEmitSomeParticles(e,t){let i=e-this.lastEmitTime,n=1/t;if(i>=n){let t=Math.max(1,Math.floor(i/n));return this.lastEmitTime=e,this.emittedParticlesAmount+t>this.particlesAmount&&(this.emittedParticlesAmount=0),this.emittedParticlesAmount+=t,t}return 0}checkIfAllParticlesAreDead(){return this.lastEmitTime+this.system.data.life+1<this.globalTime}reset(){this.hasBeenReset=!0,this.lastEmitTime=0,this.emittedParticlesAmount=0,this.gpuCompute&&this.init(k(this.system.data))}startEmitting(e){this.isEmitting=!0,this.hasBeenReset=!1,this.lastEmitTime=e}stopEmitting(){this.isEmitting=!1}},X=class extends o{constructor(e,t,i){super(e,t),this.type="ParticleSystem",this.isParticleSystem=!0,this.geometry=new C,this.actualTime=0,this.currentLoopTime=0,this.started=!1,this.stopped=!1,this.timeoutId=void 0,this.isFrozen=!1,this.isIdle=!0,this.emitter=null,this.colliderEntities=[],this.renderer=null,this.isPreWarm=!1,this._hasOnAfterRenderBeenCalled=!1,this.onAfterRender=e=>{e.warmupInFlight||this._hasOnAfterRenderBeenCalled||(this._hasOnAfterRenderBeenCalled=!0,this.init(e))},this.context=i,this.data={...t,...k(t)},this.geometry.setAttribute("position",new _([],3)),this.material=new A({colorWrite:!1}),this.frustumCulled=!1}init(e){this.renderer=e,this.emitter=new q(e,this),this.add(this.emitter),this.updateParticleState(this.data)}update(e){if(!this.isReady||!this.started||this.isFrozen||this.isIdle)return;this.actualTime+=e,this.stopped||(this.currentLoopTime+=e);let t="one_time"===this.data.emitTimeCycle;if(("loop"===this.data.emitTimeCycle||t)&&this.currentLoopTime>1e3*this.data.emitTimeDuration&&(this.stopped||(this.stop(),t||this.start(1e3*this.data.emitTimeDelay))),this.emitter&&this.started){let t=this.actualTime/1e3;this.emitter.update(t,e)}this.scale.set(1,1,1),this.updateMatrix()}isReady(){return!!this.emitter}hasCollider(e){return this.colliderEntities.some(t=>t.identity===e)}getColliderData(e){let t=this.colliderEntities.find(t=>t.identity===e);return t?t.data:null}updateByPatchedOp(e,t,i){super.updateByPatchedOp(e,t,i),r(e.path,["renderMaterial"])&&this.updateParticleState({renderMaterial:{...this.data.renderMaterial,...c.drop(e,1).props}}),r(e.path,["shape"])&&this.updateParticleState({shape:{...this.data.shape,...c.drop(e,1).props}})}updateState(e,t){super.updateState(e,t),this.updateParticleState(e)}updateParticleState(e){if(this.emitter){if(void 0!==e.colliderEntityId&&null!==e.colliderEntityId){let t=this.context.scene.find(e.colliderEntityId);this.colliderEntities=t?[t]:[]}null===e.colliderEntityId&&(this.colliderEntities=[]),this.emitter.updateState(e),e.emitTimeCycle&&this.started&&this.start()}}updateFromColliderEntity(e){!this.emitter||(this.emitter.updateForceFieldParameters(e),this.stop(),this.start())}start(e=0){this.currentLoopTime=0,e?this.timeoutId=window.setTimeout(()=>{this.start(0)},e):(this.started=!0,this.stopped=!1,this.isFrozen=!1,this.emitter?.startEmitting(this.actualTime/1e3),this._requestRender())}froze(){this.isFrozen=!0,this._requestRender()}unFroze(){this.isFrozen=!1,this._requestRender()}stop(){this.stopped=!0,this.currentLoopTime=0,this.emitter?.stopEmitting(),clearTimeout(this.timeoutId),this._requestRender()}reset(){this.started=!1,this.stopped=!1,this.emitter?.reset(),this._requestRender()}_requestRender(){this.context.shared.requestRender()}wakeUp(){this.isIdle=!1}sleep(){this.isIdle=!0,this.reset()}},j=class{constructor(e,t,i,n){this.data=e,this.page=t,this.shared=i,this.condition=n,this.delay=0,this.emission=e.emission,void 0!==e.delay&&(this.delay=e.delay),this.particleSystem=this.page.scene.find(this.data.emitterObjectId)}toggleEmitting(){this.particleSystem.started&&!this.particleSystem.stopped?this.stop(this.delay):this.start(this.delay)}toggleFroze(){this.particleSystem.started&&!this.particleSystem.isFrozen?this.freeze(this.delay):this.unFreeze(this.delay)}start(e=0){e?this.delayTimerId=window.setTimeout(()=>{this.start(0),this.clearDelay()},e):this.particleSystem.start()}stop(e=0){e?this.delayTimerId=window.setTimeout(()=>{this.stop(0),this.clearDelay()},e):this.particleSystem.stop()}freeze(e=0){e?this.delayTimerId=window.setTimeout(()=>{this.freeze(0),this.clearDelay()},e):this.particleSystem.froze()}unFreeze(e=0){e?this.delayTimerId=window.setTimeout(()=>{this.unFreeze(0),this.clearDelay()},e):this.particleSystem.unFroze()}reset(e=0){e?this.delayTimerId=window.setTimeout(()=>{this.reset(0),this.clearDelay()},e):this.particleSystem.reset()}reverseFromCurrent(){switch(this.emission){case"emitToggle":this.toggleEmitting();break;case"pauseToggle":this.toggleFroze()}}dispatchBasic(){if(!1===s(this.shared,this.condition)||!this.particleSystem)return!1;switch(this.emission){case"start":this.start(this.delay);break;case"emitToggle":this.toggleEmitting();break;case"pause":this.freeze(this.delay);break;case"pauseToggle":this.toggleFroze();break;case"stop":this.stop(this.delay);break;case"reset":this.reset(this.delay)}}dispatchConditional(){if(!1===s(this.shared,this.condition)||!this.particleSystem)return!1;switch(this.emission){case"start":this.start(this.delay);break;case"stop":this.stop(this.delay);break;case"reset":this.reset(this.delay)}}dispatchGameControl(e){if(!1===s(this.shared,this.condition)||!this.particleSystem)return!1;"start"===e?this.start(this.delay):this.stop(this.delay)}dispose(){!this.particleSystem||(this.particleSystem.reset(),this.clearDelay())}clearDelay(){this.delayTimerId&&(clearTimeout(this.delayTimerId),delete this.delayTimerId)}};l("Particle",(e,t,i)=>new X(e,t,i)),n("Particles",({data:e,page:t,shared:i,actionCondition:n})=>new j(e,t,i,n)),a("particles");
@@ -0,0 +1 @@
1
+ import{A as e,ea as t,q as s,r as i,s as n,t as a,u as r,v as o,w as l,x as h,y as u,z as p}from"./runtime-chunk-YUK55LCN.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{g as c,s as d}from"./runtime-chunk-DJJZN367.js";import"./runtime-chunk-QZ35BPGB.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-Z5OH244S.js";import{a as m,f as g,h as y}from"./runtime-chunk-TZCHGFVF.js";import{ja as f,ka as v,la as w}from"./runtime-chunk-OW6T4XFV.js";import{Cc as x,Dc as S,Fc as b,Gc as _,Oc as C,Zc as P,dd as M}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var A=class extends t{constructor(e,t,s){super(e,t,s),this.isPathObject=!0,this._shapeId=null,this._lastShapeParams=null,this._lastShape=null,this._context=s}updateState(e,t){super.updateState(e,t),this.updateShape(),this.refreshAttachedCloners(t)}updateShape(){let t,s={...this.data.geometry.extrusion.shape};for(let e in s)"string"==typeof s[e]&&(s[e]=this._context.shared.getVariable(s[e],[this.uuid,"geometry","extrusion","shape",e]));if("Custom"===s.type){let e=s.shapeId;if(e!==this._shapeId&&this.detachShape(),e){this._shapeId=e;let s=this._context.scene.find(e);s?.data&&(s.attachedPaths.add(this),t=s.geometry.userData?.shape),t||this._context.scene.addPendingCommand(()=>this.updateShape())}}else if(null!==this._lastShape&&this._sameShapeParams(s))t=this._lastShape;else{let i;switch(s.type){case"Rectangle":i=p;break;case"Ellipse":i=h;break;case"Polygon":i=u;break;case"Star":i=e;break;default:throw new Error(`Unknown shape type: ${s.type}`)}t=i.create({parameters:s}).userData.shape,this._lastShapeParams=s,this._lastShape=t??null}let i=this.geometry;t&&i.inputs&&(i.inputs.shapeData=t,i.build())}_sameShapeParams(e){let t=this._lastShapeParams;if(null===t)return!1;for(let s in e)if(!Object.is(e[s],t[s]))return!1;for(let s in t)if(!(s in e))return!1;return!0}detachShape(){null!==this._shapeId&&this._context.scene.find(this._shapeId)?.attachedPaths.delete(this)}supportsInPlaceGeometryUpdate(){return!1}createGeometryDelayed(e){this.geometryCreateDeleyed=e.shared,this.updateShape(),this.refreshAttachedPaths(e)}updateTransformState(e,t){return super.updateTransformState(e,t)}updateGeometryInteractions(e,t){super.updateGeometryInteractions(e,t),this.updateShape()}updateEntityBoxSize(e,t){let s=this.geometry.getAttribute("position");void 0!==s&&s.count>0?d(s,this.geometry.drawRange.start,this.geometry.drawRange.count<1/0?this.geometry.drawRange.count:s.count,e,t):super.updateEntityBoxSize(e,t)}},D=new C,O=new C,k=new C,I=new b,R=new b,T=new b,z=new b,E=new b,j=new b,G=new b,U=new WeakMap,B=new WeakMap,F=new WeakMap;function V(e){e.setIndex(null),e.setAttribute("position",new P(new Float32Array(0),3)),e.setAttribute("normal",new P(new Float32Array(0),3)),e.setAttribute("uv",new P(new Float32Array(0),2)),e.setDrawRange(0,0)}var N=class extends M{constructor(e){super(),this.type="PathExtrusionGeometry",this.inputs=e,this.build()}_isGeometryClosed(){return this.inputs.path.isClosed&&1===this.inputs.parameters.extrusion.depth}_isOpenEnded(){let e=this.inputs.parameters.extrusion;return!(this.inputs.path.isClosed&&1===e.depth&&function(e){let t=2*Math.PI;return(e%t+t)%t===(0%t+t)%t}(e.twist)&&e.startScale===e.endScale)}build(){let{points:e,matrices:t}=this._getSampledPath();if(e.length<2)return void V(this);let{depth:s,offset:i}=this.inputs.parameters.extrusion;s=Math.max(0,Math.min(s,1)),i=Math.max(0,Math.min(i,1));let n=this.inputs.path.isClosed?e.length:e.length-1,a=Math.floor(i*n),r=this.inputs.path.isClosed?Math.ceil((s+i)*n):Math.ceil(Math.min(1,s+i)*n),o=Math.min(Math.max(2,r-a+1),n+2),h=[],u=[];for(let s=0;s<o;s++){let i=this.inputs.path.isClosed?(s+a)%e.length:Math.min(s+a,e.length-1);h.push(e[i].clone()),u.push(t[i].clone())}let p=(e,t,s)=>{h[e]=h[e].clone().lerp(h[t],s),u[e]=function(e,t,s){let i=[new b,new b,new b],n=[new b,new b,new b];return e.extractBasis(i[0],i[1],i[2]),t.extractBasis(n[0],n[1],n[2]),i.forEach((e,t)=>{let i=n[t],a=x.lerp(e.length(),i.length(),s);e.lerp(i,s).setLength(a)}),(new C).makeBasis(i[0],i[1],i[2])}(u[e],u[t],s)},c=0,d=i*n%1;(!this.inputs.path.isClosed||s<=1)&&(d||0===i)&&(c=d,p(0,1,c));let m=0,g=(i+s)*n%1;if((this.inputs.path.isClosed&&s<=1||!this.inputs.path.isClosed&&i+s<1)&&g&&(m=g,p(h.length-1,h.length-2,1-m)),0===s){let e=h.length-1;h[e].copy(h[0]),u[e].copy(u[0])}this._applyPathModifiers(u,c,m);let{bevel:y,bevelSides:f}=this.inputs.parameters.extrusion,v=y>0?this.inputs.parameters.extrusion.capType:"flat",w=5;"Custom"===this.inputs.parameters.extrusion.shape.type&&(w="low"===this.inputs.parameters.extrusion.shape.shapeQuality?5:12);let S,{regions:_,infos:M,vertices:A}=this._getShapePoints(w),k=0;if("round"===v){let e=this.inputs.shapeData,t=F.get(e);void 0!==t&&t.bevel===y&&t.curveSegments===w&&t.bevelSides===f?S=t.geometry:(S=new l(e,2*y,y,w,f,void 0,!0),F.set(e,{bevel:y,curveSegments:w,bevelSides:f,geometry:S})),k=S.getAttribute("position").count}let I=0,R=0;M.sort((e,t)=>e.start-t.start),M.forEach(e=>{e.verticesStart=I,e.verticesCount=e.continuous.reduce((e,t,s)=>e+(0!==s&&t?1:2),0),R+=e.verticesCount,I=R});let T,z=R*o,E=0;this._isOpenEnded()&&"flat"===v&&(T=this._getSurfaceTesselation(_),E=T.vertexCount);let j=z+2*E+2*k,G=z+2*E,U={positions:new Float32Array(3*j),normals:new Float32Array(3*j),uvs:new Float32Array(2*j)},B=S?S.getIndex().array:null,N=0;M.forEach(e=>{N+=e.count});let Z=N*(o-1)*6+(T?2*T.elementCount*3:0)+(B?2*B.length:0),H=new Uint32Array(Z),q=0;if(M.forEach(e=>{q=this._extrudeRegion(e,A,u,h,U,H,q,this._isGeometryClosed()&&!this._isOpenEnded())}),T&&(q=this._closeEnd(T,z,H,q,U,u[0],h[0],!1),q=this._closeEnd(T,z+E,H,q,U,u[u.length-1],h[h.length-1],!0)),S){U.positions.set(S.getAttribute("position").array,3*G),U.normals.set(S.getAttribute("normal").array,3*G),U.uvs.set(S.getAttribute("uv").array,2*G);for(let e=G;e<G+k;e++)U.uvs[2*e+1]=1e-4;let e=q;for(let e=0;e<B.length;e++)H[q++]=B[e]+G;G+=k,U.positions.set(S.getAttribute("position").array,3*G),U.normals.set(S.getAttribute("normal").array,3*G),U.uvs.set(S.getAttribute("uv").array,2*G);let t=q;for(let e=0;e<B.length;e++)H[q++]=B[e]+G;this.setAttribute("position",new P(U.positions,3)),this.setAttribute("normal",new P(U.normals,3)),this.setAttribute("uv",new P(U.uvs,2)),this._setIndexFromUint32(H);let s=D;s.copy(u[u.length-1]).setPosition(h[h.length-1]),this.applyMatrix4OnRange(s,G,j),s.copy(u[0]).setPosition(h[0]).multiply(O.makeScale(1,1,-1)),this.applyMatrix4OnRange(s,G-k,G),this.reverseIndicesOnRange(e,t)}else this.setAttribute("position",new P(U.positions,3)),this.setAttribute("normal",new P(U.normals,3)),this.setAttribute("uv",new P(U.uvs,2)),this._setIndexFromUint32(H)}_setIndexFromUint32(e){let t=!1;for(let s=e.length-1;s>=0;--s)if(e[s]>=65535){t=!0;break}this.setIndex(new P(t?e:new Uint16Array(e),1))}_getSampledPath(){let e=this.inputs.path,t=c(e),s=U.get(t);if(void 0===s||s.subdivisions!==e.subdivisions||s.subdivisionMode!==e.subdivisionMode){let i=this._extractPathPoints(t),n=i.length<2?[]:this._computeBasisMatrices(i);s={subdivisions:e.subdivisions,subdivisionMode:e.subdivisionMode,points:i,matrices:n},U.set(t,s)}return s}_extractPathPoints(e){let t=this.inputs.path.subdivisions,s="uniform"===this.inputs.path.subdivisionMode?e.getSpacedPoints(4*t):e.getPoints(t);if(s.length<2)return[];let i=[s[0]];return s.forEach(e=>{i[i.length-1].distanceToSquared(e)>.001&&i.push(e)}),this.inputs.path.isClosed&&i[i.length-1].distanceTo(i[0])<.001&&i.pop(),i}_computeBasisMatrices(e){let t=[],s=e.length,i=this.inputs.path.isClosed,n=new b,a=new b,r=new b,o=new b,l=new b(0,1,0);for(let h=0;h<s;h++){let u,p,c=e[h];u=0===h?i?e[e.length-2]:I.copy(c).multiplyScalar(2).sub(e[1]):e[h-1],p=h===s-1?i?e[1]:I.copy(c).multiplyScalar(2).sub(e[h-1]):e[h+1],R.subVectors(c,u).normalize(),T.subVectors(p,c).normalize();let d=z.addVectors(R,T).normalize();r.copy(d),0===h&&(d.equals(l)||E.copy(d).negate().equals(l))&&l.set(0,0,1);let m=j.crossVectors(l,d).normalize(),g=G.crossVectors(d,m).normalize();l.copy(g),o.copy(m),0===h&&(n.copy(g),a.copy(d));let y=(new C).makeBasis(m,g,d);t.push(y)}let h=i?a:r,u=i?n:new b(0,1,0),p=h.clone().cross(o).normalize(),c=Math.acos(u.dot(p));if(isNaN(c))return t;let d=u.clone().cross(p);h.dot(d)>0&&(c*=-1);for(let e=1;e<t.length;e++)t[e].multiply(k.makeRotationZ(c*e/t.length));return t}_applyPathModifiers(e,t,s){let i=e.length,{angle:n,twist:a,startScale:r,endScale:o}=this.inputs.parameters.extrusion,l=new C,h=new C;return e.forEach((e,u)=>{let p=0===u?0:u===i-1?1:(u-t)/(i-(0===s?0:1)-(t+(1-s)));l.makeRotationZ(x.lerp(n,n+a,p)*x.DEG2RAD);let c=x.lerp(r,o,p);h.makeScale(c,c,c),e.multiply(l).multiply(h)}),e}_getShapePoints(e,t=s.ODD){let i=this.inputs.shapeData,n=B.get(i);return(void 0===n||n.curveSegments!==e||n.windingRule!==t)&&(n={curveSegments:e,windingRule:t,shapePoints:this._computeShapePoints(e,t)},B.set(i,n)),n.shapePoints}_getSurfaceTesselation(e){let t,a=B.get(this.inputs.shapeData);if(void 0!==a?.surfaceTesselation)return a.surfaceTesselation;try{t=n({windingRule:s.ODD,elementType:i.POLYGONS,polySize:3,vertexSize:2,strict:!0,contours:e})}catch{t=o}return void 0!==a&&(a.surfaceTesselation=t),t}_computeShapePoints(e=12,t=s.ODD){let o,l,h=this.inputs.shapeData,u=h.extractShapePointsToFlatArray([],e),p=h.shapeHoles.map(t=>{let s=t.extractShapePointsToFlatArray([],e),i=[];for(let e=s.length-1;e>=1;e-=2){let t=s[e-1],n=s[e-0];i.push(t,n)}return i});try{o=n({windingRule:t,elementType:i.BOUNDARY_CONTOURS,vertexSize:2,strict:!0,contours:[u]})}catch{o=a}try{l=n({windingRule:s.ODD,elementType:i.BOUNDARY_CONTOURS,vertexSize:2,strict:!0,contours:[...p]})}catch{l=r}if(!o)throw new Error("error generating geometry");let c=o.elementCount;if(l){o.elementCount+=l.elementCount;for(let e=0;e<l.elements.length;e++){let t=l.elements[e],s=e%2==0?o.vertexCount:0;o.elements.push(t+s)}for(let e=0;e<l.vertexIndices.length;e++){let t=l.vertexIndices[e],s=o.vertexCount;o.vertexIndices.push(t+s)}for(let e=0;e<l.vertices.length;e++){let t=l.vertices[e];o.vertices.push(t)}}let d=1/0,m=-1/0,g=1/0,y=-1/0;for(let e=0,t=o.vertexCount;e<t;e++){let t=2*e,s=o.vertices[t+0],i=o.vertices[t+1];s<d&&(d=s),s>m&&(m=s),i<g&&(g=i),i>y&&(y=i)}let f=[];for(let e=o.elementCount-1;e>=0;e--){let t=e>=c,s=2*e,i=o.elements[s+0],n=o.elements[s+1],a=i+n,r={start:i,count:n,normals:[],isHole:t,continuous:[],verticesStart:0,verticesCount:0};f.push(r);let l=i,u=a-1,p=i+1,d=h.roundedCurves.length;do{let e=l-i,s=o.vertices[2*u+0],c=o.vertices[2*u+1],m=o.vertices[2*l+0],g=o.vertices[2*l+1],y=o.vertices[2*p+0],f=o.vertices[2*p+1],v=m-s,w=g-c,x=Math.sqrt(v*v+w*w);v/=x,w/=x;let S=m-y,b=g-f,_=Math.sqrt(S*S+b*b);S/=_,b/=_,r.normals[2*e+0]=-b,r.normals[2*e+1]=S;let C=o.vertexIndices[l];if(Array.isArray(C))r.continuous[e]=!1;else{let[t,s]=h.getCurveIndexFromVertexId(C-1,!0);if(s>0&&s<1)r.continuous[e]=!0;else{let i=1===s?t+1:t-1;i=(i+d)%d;let n=1===s?0:1,a=h.roundedCurves[t].getTangent(s),o=h.roundedCurves[i].getTangent(n);r.continuous[e]=a.dot(o)>.95}}t&&(r.normals[2*e+0]*=-1,r.normals[2*e+1]*=-1),[u,l,p]=[l,p,p+1],p>=a&&(p-=n)}while(p!==i+1)}return{regions:[u,...p],infos:f,vertices:o.vertices}}_insertVertex(e,t,s,i,n){let a=2*t,r=3*t;e.positions[r+0]=s.x,e.positions[r+1]=s.y,e.positions[r+2]=s.z,e.normals[r+0]=i.x,e.normals[r+1]=i.y,e.normals[r+2]=i.z,e.uvs[a+0]=n.x,e.uvs[a+1]=n.y}_extrudeRegion(e,t,s,i,n,a,r,o){let l=e.wallTemplate;if(void 0===l){l=[];for(let s=0;s<e.count;s++){let i,n,a=2*(e.start+s),r=t[a+0],o=t[a+1];if(e.continuous[s])i=e.normals[2*s+0],n=e.normals[2*s+1];else{let l=0===s?2*(e.start+e.count-1):a-2,h=r-t[l+0];i=-(o-t[l+1]),n=h,e.isHole||(i=-i,n=-n)}let h=0===s?1:s/e.count;if(l.push(r,o,i,n,h,0),!e.continuous[s]||0===s)if(0===s)l.push(r,o,e.normals[0],e.normals[1],0,1);else{let u=s===e.count-1?2*e.start:a+2,p=t[u+0]-r;i=-(t[u+1]-o),n=p,e.isHole||(i=-i,n=-n),l.push(r,o,i,n,h,1)}}e.wallTemplate=l}let h=s.length,u=l.length,p=n.positions,c=n.normals,d=n.uvs;for(let t=0;t<h;t++){let n=s[t].elements,a=n[0],r=n[1],o=n[2],m=n[4],g=n[5],y=n[6],f=n[12],v=n[13],w=n[14],x=i[t],S=t/(h-1),b=0,_=0,C=0,P=e.verticesStart*h+e.verticesCount*t;for(let e=0;e<u;e+=6){if(0===l[e+5]){let t=l[e+0],s=l[e+1];b=a*t+m*s+f+x.x,_=r*t+g*s+v+x.y,C=o*t+y*s+w+x.z}let t=l[e+2],s=l[e+3],i=a*t+m*s+f,n=r*t+g*s+v,h=o*t+y*s+w,u=1/(Math.sqrt(i*i+n*n+h*h)||1);i*=u,n*=u,h*=u;let M=2*P,A=3*P;p[A+0]=b,p[A+1]=_,p[A+2]=C,c[A+0]=i,c[A+1]=n,c[A+2]=h,d[M+0]=l[e+4],d[M+1]=S,P++}}let m=e.wallQuadPattern;if(void 0===m){m=[];let t=0;for(let s=0;s<e.count;s++)(!e.continuous[s]||0===s)&&t++,m.push(t,s===e.count-1?0:t+1),t++;e.wallQuadPattern=m}let g=h-1,y=m.length,f=e.isHole;for(let t=0;t<g;t++){let s=e.verticesStart*h+e.verticesCount*t,i=s+e.verticesCount;for(let e=0;e<y;e+=2){let t=s+m[e],n=s+m[e+1],o=i+m[e+1],l=i+m[e];f?(a[r++]=t,a[r++]=o,a[r++]=n,a[r++]=t,a[r++]=l,a[r++]=o):(a[r++]=t,a[r++]=n,a[r++]=o,a[r++]=t,a[r++]=o,a[r++]=l)}}return r}_closeEnd(e,t,s,i,n,a,r,o){let l=e.vertexCount,h=new b(0,0,o?-1:1).applyMatrix4(a),u=new b,p=new S;for(let s=0;s<l;s++){let i=2*s;u.set(e.vertices[i+0],e.vertices[i+1],0).applyMatrix4(a).add(r),this._insertVertex(n,t+s,u,h,p)}let c=e.elements;for(let n=0;n<e.elementCount;n++){let e=3*n;s[i++]=c[e+0]+t,s[i++]=c[e+(o?1:2)]+t,s[i++]=c[e+(o?2:1)]+t}return i}applyMatrix4OnRange(e,t,s){let i,n,a,r,o=e.elements,l=(new _).getNormalMatrix(e).elements,h=this.attributes.position,u=this.attributes.normal;if(!h||!u)return;let p=h.array,c=u.array,d=h.itemSize;for(let e=t*d,h=s*d;e<h;e+=d)i=p[e+0],n=p[e+1],a=p[e+2],r=1/(o[3]*i+o[7]*n+o[11]*a+o[15]),p[e+0]=(o[0]*i+o[4]*n+o[8]*a+o[12])*r,p[e+1]=(o[1]*i+o[5]*n+o[9]*a+o[13])*r,p[e+2]=(o[2]*i+o[6]*n+o[10]*a+o[14])*r,i=c[e+0],n=c[e+1],a=c[e+2],c[e+0]=l[0]*i+l[3]*n+l[6]*a,c[e+1]=l[1]*i+l[4]*n+l[7]*a,c[e+2]=l[2]*i+l[5]*n+l[8]*a;h.needsUpdate=!0,u.needsUpdate=!0}reverseIndicesOnRange(e,t){let s=this.index;if(s){for(let i=e;i<t;i+=3){let e=s.getX(i),t=s.getX(i+1),n=s.getX(i+2);s.setXYZ(i,n,t,e)}s.needsUpdate=!0}}};g("PathGeometry",(e,t,s)=>new A(e,t,s)),y("PathGeometry",class{static create(e){return this.build(this.normalizeInputs(e))}static normalizeInputs(e,t){let s=Object.assign({},t?.parameters??{width:100,height:100,depth:1,subdivisions:12,roundness:0,extrudeBevelSize:0,extrudeBevelSegments:3},e.parameters),i=Math.abs(s.width),n=Math.abs(s.height??s.width),a=Math.abs(s.depth??0),r=t?.shapeData??h.create({parameters:{...v,width:"number"==typeof v.width?v.width:100,height:"number"==typeof v.height?v.height:100}}).userData.shape;return{path:e.path??f.defaultData(),parameters:Object.assign(s,{width:i,height:n,depth:a,extrusion:{...w,...s.extrusion}}),shapeData:r}}static build(e){if(e.path.points.length>=2){let t=new N(e);return Object.assign(t,{userData:{...e,type:"PathGeometry"}})}{let t=new M;return V(t),Object.assign(t,{userData:{...e,type:"PathGeometry"}})}}}),m("3d-paths");
@@ -0,0 +1 @@
1
+ import{a as t}from"./runtime-chunk-YXATXASV.js";import"./runtime-chunk-OFPUAZKY.js";import{a as n}from"./runtime-chunk-EOV2DL2V.js";import"./runtime-chunk-Y3BMDVJ7.js";import{Bc as e,Db as r,Dc as a,Fc as i,Le as o,Oc as c,Tc as y,Vc as s,we as l}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";new l,new y,new Float32Array([255/256/256**3,255/256/65536,255/256/256,255/256]);var u=new Map([[0,null],[1,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return min(x+y,1.0)*opacity+x*(1.0-opacity);}"],[2,"vec3 blend(const in vec3 x,const in vec3 y,const in float opacity){return y*opacity+x*(1.0-opacity);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){float a=min(y.a,opacity);return vec4(blend(x.rgb,y.rgb,a),max(x.a,a));}"],[3,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(x+y)*0.5*opacity+x*(1.0-opacity);}"],[4,"float blend(const in float x,const in float y){return(y==0.0)?y:max(1.0-(1.0-x)/y,0.0);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[5,"float blend(const in float x,const in float y){return(y==1.0)?y:min(x/(1.0-y),1.0);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[6,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return min(x,y)*opacity+x*(1.0-opacity);}"],[7,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return abs(x-y)*opacity+x*(1.0-opacity);}"],[8,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(x+y-2.0*x*y)*opacity+x*(1.0-opacity);}"],[9,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return max(x,y)*opacity+x*(1.0-opacity);}"],[10,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return x*y*opacity+x*(1.0-opacity);}"],[11,"float blend(const in float x,const in float y){return(y>0.0)?min(x/y,1.0):1.0;}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[12,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(1.0-abs(1.0-x-y))*opacity+x*(1.0-opacity);}"],[13,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return y*opacity+x*(1.0-opacity);}"],[14,"float blend(const in float x,const in float y){return(x<0.5)?(2.0*x*y):(1.0-2.0*(1.0-x)*(1.0-y));}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[15,"float blend(const in float x,const in float y){return(y==1.0)?y:min(x*x/(1.0-y),1.0);}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[16,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return(1.0-(1.0-x)*(1.0-y))*opacity+x*(1.0-opacity);}"],[17,"float blend(const in float x,const in float y){return(y<0.5)?(2.0*x*y+x*x*(1.0-2.0*y)):(sqrt(x)*(2.0*y-1.0)+2.0*x*(1.0-y));}vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=vec4(blend(x.r,y.r),blend(x.g,y.g),blend(x.b,y.b),blend(x.a,y.a));return z*opacity+x*(1.0-opacity);}"],[18,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return max(x+y-1.0,0.0)*opacity+x*(1.0-opacity);}"]]),d=class extends e{constructor(t,n=1){super(),this.f=t,this.opacity=new o(n)}getOpacity(){return this.opacity.value}setOpacity(t){this.opacity.value=t}get blendFunction(){return this.f}set blendFunction(t){this.f=t,this.dispatchEvent({type:"change"})}getBlendFunction(){return this.blendFunction}setBlendFunction(t){this.blendFunction=t}getShaderCode(){return u.get(this.blendFunction)}},x=class extends e{constructor(t,n,{attributes:e=0,blendFunction:r=16,defines:a=new Map,uniforms:i=new Map,extensions:o=null,vertexShader:c=null}={}){super(),this.name=t,this.renderer=null,this.attributes=e,this.fragmentShader=n,this.vertexShader=c,this.defines=a,this.uniforms=i,this.extensions=o,this.blendMode=new d(r),this.blendMode.addEventListener("change",t=>this.setChanged())}getName(){return this.name}setRenderer(t){this.renderer=t}getDefines(){return this.defines}getUniforms(){return this.uniforms}getExtensions(){return this.extensions}getBlendMode(){return this.blendMode}getAttributes(){return this.attributes}setAttributes(t){this.attributes=t,this.setChanged()}getFragmentShader(){return this.fragmentShader}setFragmentShader(t){this.fragmentShader=t,this.setChanged()}getVertexShader(){return this.vertexShader}setVertexShader(t){this.vertexShader=t,this.setChanged()}setChanged(){this.dispatchEvent({type:"change"})}setDepthTexture(t,n=r){}update(t,n,e){}setSize(t,n){}initialize(t,n,e){}dispose(){for(let t of Object.keys(this)){let n=this[t];if(null!==n&&"object"==typeof n&&"function"==typeof n.dispose){if(n instanceof s||n===this.renderer)continue;this[t].dispose()}}}},w=(new Float32Array([0,0]),new Float32Array([0,1,1]),new Float32Array([0,1,1,2]),new Float32Array([0,1,2,2,3]),new Float32Array([0,1,2,3,4,4,5]),new Float32Array([0,1,2,3,4,5,7,8,9,10]),new i,new c,new y,class extends x{constructor(t=30){super("PixelationEffect","uniform bool active;uniform vec2 d;void mainUv(inout vec2 uv){if(active){uv=vec2(d.x*(floor(uv.x/d.x)+0.5),d.y*(floor(uv.y/d.y)+0.5));}}",{uniforms:new Map([["active",new o(!1)],["d",new o(new a)]])}),this.resolution=new a,this.d=0,this.granularity=t}get granularity(){return this.d}set granularity(t){let n=Math.floor(t);n%2>0&&(n+=1),this.d=n,this.uniforms.get("active").value=n>0,this.setSize(this.resolution.width,this.resolution.height)}getGranularity(){return this.granularity}setGranularity(t){this.granularity=t}setSize(t,n){this.resolution.set(t,n),this.uniforms.get("d").value.setScalar(this.d).divide(this.resolution)}});function A(t,n,e){return t+(n-t)*e}function v(t,n,e,r){let a=A(t,n,.75),i=A(e,r,.75);return A(a,i,.875)}Math.PI,new i,new i,new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array(3),new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([1,0,0]),new Float32Array([1,0,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([1,0,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([1,1,0]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,1,0]),new Float32Array([0,1,1]),new Float32Array([1,1,1]),new Float32Array([0,0,0]),new Float32Array([0,0,1]),new Float32Array([0,1,1]),new Float32Array([1,1,1]),new Float32Array(2),new Float32Array(2),new Float32Array([0,-.25,.25,-.125,.125,-.375,.375]),new Float32Array([0,0]),new Float32Array([.25,-.25]),new Float32Array([-.25,.25]),new Float32Array([.125,-.125]),new Float32Array([-.125,.125]),new Uint8Array([0,0]),new Uint8Array([3,0]),new Uint8Array([0,3]),new Uint8Array([3,3]),new Uint8Array([1,0]),new Uint8Array([4,0]),new Uint8Array([1,3]),new Uint8Array([4,3]),new Uint8Array([0,1]),new Uint8Array([3,1]),new Uint8Array([0,4]),new Uint8Array([3,4]),new Uint8Array([1,1]),new Uint8Array([4,1]),new Uint8Array([1,4]),new Uint8Array([4,4]),new Uint8Array([0,0]),new Uint8Array([1,0]),new Uint8Array([0,2]),new Uint8Array([1,2]),new Uint8Array([2,0]),new Uint8Array([3,0]),new Uint8Array([2,2]),new Uint8Array([3,2]),new Uint8Array([0,1]),new Uint8Array([1,1]),new Uint8Array([0,3]),new Uint8Array([1,3]),new Uint8Array([2,1]),new Uint8Array([3,1]),new Uint8Array([2,3]),new Uint8Array([3,3]),new Map([[v(0,0,0,0),new Float32Array([0,0,0,0])],[v(0,0,0,1),new Float32Array([0,0,0,1])],[v(0,0,1,0),new Float32Array([0,0,1,0])],[v(0,0,1,1),new Float32Array([0,0,1,1])],[v(0,1,0,0),new Float32Array([0,1,0,0])],[v(0,1,0,1),new Float32Array([0,1,0,1])],[v(0,1,1,0),new Float32Array([0,1,1,0])],[v(0,1,1,1),new Float32Array([0,1,1,1])],[v(1,0,0,0),new Float32Array([1,0,0,0])],[v(1,0,0,1),new Float32Array([1,0,0,1])],[v(1,0,1,0),new Float32Array([1,0,1,0])],[v(1,0,1,1),new Float32Array([1,0,1,1])],[v(1,1,0,0),new Float32Array([1,1,0,0])],[v(1,1,0,1),new Float32Array([1,1,0,1])],[v(1,1,1,0),new Float32Array([1,1,1,0])],[v(1,1,1,1),new Float32Array([1,1,1,1])]]);var h=class extends t{constructor(){super(w)}get granularity(){return this.effect.getGranularity()}set granularity(t){this.effect.setGranularity(t)}};n("pixelation",()=>new h);
@@ -0,0 +1 @@
1
+ import{h as t}from"./runtime-chunk-BXPWRF47.js";import"./runtime-chunk-O5NBGIBR.js";import"./runtime-chunk-23QOKH2J.js";import"./runtime-chunk-TU4KDRKR.js";import{a as i,b as s}from"./runtime-chunk-DZNU62CT.js";import"./runtime-chunk-HER7UVU3.js";import"./runtime-chunk-ARTGMJ7O.js";import"./runtime-chunk-FDRTCOJ5.js";import"./runtime-chunk-YUK55LCN.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{f as e,g as a}from"./runtime-chunk-MM75L5X4.js";import"./runtime-chunk-DJJZN367.js";import{f as n}from"./runtime-chunk-QZ35BPGB.js";import"./runtime-chunk-4KZXQGUQ.js";import{a as r}from"./runtime-chunk-Z5OH244S.js";import{a as o}from"./runtime-chunk-TZCHGFVF.js";import{u as c}from"./runtime-chunk-OW6T4XFV.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var h=class{constructor(t,i,s,a,n,r,o,c){this.eventId=t,this.id=i,this.data=s,this.dataEvent=a,this.object=n,this.stage=!1,this.actions=e(a,s.actions,r,o,c,n)}disconnect(){a(this.actions)}dispatchIn(){this.actions.Audio.forEach(t=>t.dispatchBasic()),this.actions.Particles.forEach(t=>t.dispatchBasic()),this.actions.Video.forEach(t=>t.dispatchBasic()),this.actions.Create.forEach(t=>t.dispatch()),this.actions.Destroy.forEach(t=>t.dispatch()),this.actions.Reset.forEach(t=>t.dispatch()),this.actions.Link.forEach(t=>t.dispatch()),this.actions.Transition.forEach(t=>{t.object.currentTransitionEvent!==this&&(t.object.currentTransitionEvent=this,t.init())}),this.actions.Transition.forEach(t=>t.toggle()),this.actions.Animation.forEach(t=>t.play()),this.actions.SwitchCamera.forEach(t=>t.play()),this.actions.SceneTransition.forEach(t=>t.dispatch()),this.actions.SetVariable.forEach(t=>t.checkConditions()),this.actions.SetVariable.forEach(t=>t.dispatch()),this.actions.DynamicVariablePlay.forEach(t=>t.dispatch()),this.actions.ClearLocalStorage.forEach(t=>t.dispatch()),this.actions.UserAPI.forEach(t=>t.dispatch())}dispatchOut(){this.actions.Transition.forEach(t=>{t.toggle()})}},m=class extends i{constructor(t,i){super(t),this.eventManager=i,this.breakpoints=[],this.resize=(t,i)=>{this.breakpoints.forEach(s=>{let e,a=c.deviceToSize(s.data.size),n="horizontal"===s.dataEvent.orientation?t:i;switch(s.data.operator){case"<":e=n<a[0];break;case">":e=n>a[0];break;case"<>":e=n>a[0]&&n<a[1]}s.stage!==e&&(s.stage=e,s.stage?s.dispatchIn():s.dispatchOut())})},this.onResizeObserver=new ResizeObserver(t=>{for(let i of t){let{width:t,height:s}=i.contentRect;this.resize(t,s)}})}connect(){let{page:i,sharedAssets:s,domElement:e}=this.eventContext;this.onResizeObserver.observe(e);let a=t=>{if(t.visible&&t.data?.events.length)for(let{data:e,id:a}of t.data.events)e.disabled||"Resize"===e.type&&e.breakpoints.forEach(({data:n,id:o})=>{try{let r=new h(a,o,n,e,t,i,s,this.eventManager);this.breakpoints.push(r)}catch(t){r&&console.error(t)}})};i.traverseEntity(i=>{(n(i)||i instanceof t)&&i.frame?.traverse(t=>{a(t)}),a(i)})}disconnect(){this.onResizeObserver.disconnect(),this.breakpoints.forEach(t=>{t.disconnect()}),this.breakpoints=[]}};s("Resize",({eventContext:t,eventManager:i})=>new m(t,i)),o("resize");
@@ -0,0 +1 @@
1
+ import{a as t}from"./runtime-chunk-UK4GQHMO.js";import"./runtime-chunk-BXPWRF47.js";import"./runtime-chunk-O5NBGIBR.js";import"./runtime-chunk-23QOKH2J.js";import"./runtime-chunk-TU4KDRKR.js";import"./runtime-chunk-HER7UVU3.js";import"./runtime-chunk-ARTGMJ7O.js";import"./runtime-chunk-FDRTCOJ5.js";import"./runtime-chunk-YUK55LCN.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{b as e,e as i}from"./runtime-chunk-MM75L5X4.js";import"./runtime-chunk-DJJZN367.js";import"./runtime-chunk-QZ35BPGB.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-Z5OH244S.js";import{a}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-OW6T4XFV.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var n=class{constructor(t,e,i,a,n){this.data=t,this.page=e,this.eventManager=i,this.shared=a,this.condition=n,this.timeOutId=-1,this.scene=e.scene}dispatch(){if(!1===i(this.shared,this.condition))return!1;this.data.target!==this.page.uuid&&(window.clearTimeout(this.timeOutId),this.timeOutId=window.setTimeout(()=>{this.play()},1e3*this.data.delay))}dispose(){window.clearTimeout(this.timeOutId)}play(){if(this.scene.children.every(t=>t.uuid!==this.data.target||t.data.uiScene))return;"fade"===this.data.transition&&this.data.duration>0&&this.eventManager.eventContext.renderer.renderFromSceneForSceneTransitionPass(this.scene,this.scene.activeCamera,1e3*this.data.duration),this.eventManager.deactivate(),this.eventManager.controlsManager.deactivate();let e=this.scene.activeCamera;this.scene.updatePage(this.data.target),this.scene.traverseVisibleEntity(t=>{"ParticleSystem"===t.type&&(t.sleep(),t.wakeUp(),t.data.autoPlay?t.start():t.stop())}),this.scene.activePage.switchToPlayCamera(),this.scene.activeCamera.copyViewPlaneSize(e),t(this.scene.activePage,this.shared),this.eventManager.activate(),this.eventManager.controlsManager.activate(this.eventManager)}};e("SceneTransition",({data:t,page:e,eventManager:i,shared:a,actionCondition:s})=>new n(t,e,i,a,s)),a("scene-transition");
@@ -0,0 +1 @@
1
+ import{a as t}from"./runtime-chunk-NBYTQLIB.js";import{h as e}from"./runtime-chunk-BXPWRF47.js";import"./runtime-chunk-O5NBGIBR.js";import"./runtime-chunk-23QOKH2J.js";import"./runtime-chunk-TU4KDRKR.js";import{a as i,b as s}from"./runtime-chunk-DZNU62CT.js";import"./runtime-chunk-HER7UVU3.js";import"./runtime-chunk-ARTGMJ7O.js";import"./runtime-chunk-FDRTCOJ5.js";import"./runtime-chunk-YUK55LCN.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{f as n,g as o}from"./runtime-chunk-MM75L5X4.js";import"./runtime-chunk-DJJZN367.js";import{f as r}from"./runtime-chunk-QZ35BPGB.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-Z5OH244S.js";import{a}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-OW6T4XFV.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var h=class{constructor(t,e,i,s,o,r){this.id=t,this.data=e,this.object=i,this.scrollCounter=0,this.actions=n(e,e.actions,s,o,r,i)}connect(){this.scrollCounter=0}disconnect(){o(this.actions)}dispatch(t){this.actions.Transition.forEach(t=>{t.object.currentTransitionEvent!==this&&(t.object.currentTransitionEvent=this,t.init())});let e=t>0?1:-1;this.scrollCounter+=e,this.scrollCounter=Math.min(Math.max(this.scrollCounter,0),this.data.steps);let i=this.scrollCounter/this.data.steps;this.actions.Transition.forEach(t=>t.seek(i)),this.actions.Animation.forEach(t=>t.seek(e)),this.actions.TimelineAnimation.forEach(t=>t.seek(i)),this.actions.Create.forEach(t=>t.dispatchThrottled()),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())}dispatchUserEvent(t){this.actions.Transition.forEach(t=>{t.object.currentTransitionEvent!==this&&(t.object.currentTransitionEvent=this,t.init())}),t?(this.actions.Transition.forEach(t=>t.reverseFromCurrent()),this.actions.Animation.forEach(t=>t.reverseFromCurrent()),this.actions.TimelineAnimation.forEach(t=>t.reverseFromCurrent())):(this.actions.Transition.forEach(t=>{t.playFromCurrent()}),this.actions.Animation.forEach(t=>{t.playFromCurrent()}),this.actions.TimelineAnimation.forEach(t=>{t.playFromCurrent()})),this.actions.Create.forEach(t=>t.dispatchThrottled()),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())}},c=class{constructor(t,e,i,s,o,r,a){this.id=t,this.data=e,this.object=i,this.domElement=r,this.eventManager=a,this.scrollStart=0,this.scrollEnd=0,this.actions=n(e,e.actions,s,o,a,i)}getStickyParentElement(){let t=this.domElement;for(;t;){if("sticky"===window.getComputedStyle(t).position)return t;t=t.parentElement}return null}computeScrollBounds(){let t=this.getStickyParentElement(),e=t?.parentElement,i=this.domElement.getBoundingClientRect(),s={top:i.top,bottom:i.bottom,left:i.left,right:i.right,width:i.width,height:i.height};if(e){let n=e.getBoundingClientRect(),o=window.getComputedStyle(t),r=parseFloat(o.marginTop)+parseFloat(o.marginBottom),a=parseFloat(o.top),h=parseFloat(o.bottom),c=n.height-r;if(isNaN(a)){if(!isNaN(h)){let t=document.body.clientHeight??window.innerHeight,e=window.innerWidth-(document.documentElement.clientWidth??window.innerWidth);i.bottom===t-h?(s.top+=n.top-i.height+h+e,s.bottom+=n.top-i.height+h+e):i.bottom<t-h&&(s.top-=c-i.height,s.bottom-=c-i.height)}}else i.top===a?(s.top+=n.top-a,s.bottom+=n.top-a):i.top<0&&(s.top-=c-i.height,s.bottom-=c-i.height)}let n=document.body,o=document.documentElement,r=window.pageYOffset||o.scrollTop||n.scrollTop,a=o.clientTop||n.clientTop||0,h=Math.round(s.top+r-a);if("enter"===this.data.startFrom){let t=window.innerHeight,e=s.height,i=this.data.enterAnchor,n="top"===i?t:"bottom"===i?t-e:t-.5*e;this.scrollStart=h-n}else this.scrollStart=0;this.scrollStart+=this.data.startOffset??0,this.scrollEnd=this.scrollStart+(this.data.endAfter??400),this.box=s,this.computeScroll({x:window.scrollX,y:window.scrollY})}connect(){this.computeScrollBounds()}disconnect(){o(this.actions)}handleResize(){this.computeScrollBounds()}get isInvalidBox(){return void 0===this.box||0===this.box.width&&0===this.box.height&&0===this.box.top&&0===this.box.bottom}computeScroll({x:t,y:e}){this.actions.Transition.forEach(t=>{t.object.currentTransitionEvent!==this&&(t.object.currentTransitionEvent=this,t.init())});let i=this.scrollEnd-this.scrollStart,s=Math.min(1,Math.max(0,(e-this.scrollStart)/i));this.actions.Transition.forEach(t=>t.seek(s)),this.actions.Animation.forEach(t=>t.seek(s)),this.actions.TimelineAnimation.forEach(t=>t.seek(s)),this.actions.Create.forEach(t=>t.dispatchThrottled()),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())}dispatch(t){this.isInvalidBox&&this.computeScrollBounds(),this.computeScroll(t)}dispatchUserEvent(t){this.actions.Transition.forEach(t=>{t.object.currentTransitionEvent!==this&&(t.object.currentTransitionEvent=this,t.init())}),t?(this.actions.Transition.forEach(t=>t.reverseFromCurrent()),this.actions.Animation.forEach(t=>t.reverseFromCurrent()),this.actions.TimelineAnimation.forEach(t=>t.reverseFromCurrent())):(this.actions.Transition.forEach(t=>{t.playFromCurrent()}),this.actions.Animation.forEach(t=>{t.playFromCurrent()}),this.actions.TimelineAnimation.forEach(t=>{t.playFromCurrent()})),this.actions.Create.forEach(t=>t.dispatchThrottled()),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())}},l=class extends i{constructor(e,i){super(e),this.managers=i,this.wheelEventsPerObject=new Map,this.scrollEventsPerObject=new Map,this.isInview=!0,this.handleResize=()=>{[...this.scrollEventsPerObject.entries()].forEach(([t,e])=>{e.forEach(t=>t.handleResize())})},this.onScroll=t=>{if(!this.isInview)return;let e={y:window.scrollY,x:window.scrollX};[...this.scrollEventsPerObject.entries()].forEach(([t,i])=>{t.dispatchEvent({type:"beginEvent",eventName:"Scroll",scroll:e}),i.forEach(t=>t.dispatch(e))})},this.onWheel=t=>{!this.isInview||t.ctrlKey||[...this.wheelEventsPerObject.entries()].forEach(([e,i])=>{e.dispatchEvent({type:"beginEvent",eventName:"Scroll",deltaY:t.deltaY}),i.forEach(e=>e.dispatch(t.deltaY))})},this.onUserEvent=({eventName:e,target:i,reverse:s})=>{if(!e||!i)return;let n=t(e);n&&"Scroll"===n&&(i.dispatchEvent({type:"beginEvent",eventName:"Scroll"}),this.wheelEventsPerObject.get(i)?.forEach(t=>{t.dispatchUserEvent(s)}))}}connect(){let{page:t,sharedAssets:i,domElement:s,isExport:n}=this.eventContext,o=e=>{if(e.data?.events.length)for(let{id:o,data:r}of e.data.events)if(!r.disabled&&"Scroll"===r.type)if("load"!==r.trigger&&n){let n=new c(o,r,e,t,i,s,this.managers);this.scrollEventsPerObject.has(e)?this.scrollEventsPerObject.get(e)?.push(n):this.scrollEventsPerObject.set(e,[n])}else{let s=new h(o,r,e,t,i,this.managers);this.wheelEventsPerObject.has(e)?this.wheelEventsPerObject.get(e)?.push(s):this.wheelEventsPerObject.set(e,[s])}};t.traverseEntity(t=>{(r(t)||t instanceof e)&&t.frame?.traverse(t=>{o(t)}),o(t)}),this.intersectionObserver=new IntersectionObserver(t=>{let e=t[0];e&&(this.isInview=e.isIntersecting)},{root:null}),this.intersectionObserver.observe(this.eventContext.domElement),[...this.wheelEventsPerObject.entries()].forEach(([t,e])=>{e.forEach(t=>t.connect()),t.addEventListener("userEvent",this.onUserEvent)}),[...this.scrollEventsPerObject.entries()].forEach(([t,e])=>{e.forEach(t=>t.connect()),t.addEventListener("userEvent",this.onUserEvent)}),[...this.wheelEventsPerObject.values()].some(t=>t.length)&&(this.domEventsNeeded.add("wheel"),window.addEventListener("wheel",this.onWheel)),[...this.scrollEventsPerObject.values()].some(t=>t.length)&&(this.domEventsNeeded.add("scroll"),window.addEventListener("scroll",this.onScroll),window.addEventListener("resize",this.handleResize))}disconnect(){window.removeEventListener("wheel",this.onWheel),window.removeEventListener("scroll",this.onScroll),window.removeEventListener("resize",this.handleResize),this.intersectionObserver.unobserve(this.eventContext.domElement),this.domEventsNeeded.clear(),[...this.wheelEventsPerObject.entries()].forEach(([t,e])=>{e.forEach(t=>t.disconnect()),t.removeEventListener("userEvent",this.onUserEvent)}),[...this.scrollEventsPerObject.entries()].forEach(([t,e])=>{e.forEach(t=>t.disconnect()),t.removeEventListener("userEvent",this.onUserEvent)})}};s("Scroll",({eventContext:t,eventManager:e})=>new l(t,e)),a("scroll");
@@ -0,0 +1 @@
1
+ import{k as m}from"./runtime-chunk-XLOQIQSS.js";import"./runtime-chunk-WQXDDUFV.js";import"./runtime-chunk-44SAPZDZ.js";import"./runtime-chunk-W7QPV37Y.js";import"./runtime-chunk-J2I4VBHR.js";import"./runtime-chunk-ARTGMJ7O.js";import"./runtime-chunk-LATYCOUS.js";import"./runtime-chunk-FDRTCOJ5.js";import"./runtime-chunk-YUK55LCN.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import"./runtime-chunk-DJJZN367.js";import"./runtime-chunk-QZ35BPGB.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-Z5OH244S.js";import{a as n,f as r}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-OW6T4XFV.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";r("ShapeBlendGeometry",(n,r,t)=>new m(n,r,t)),n("shape-blends");
@@ -0,0 +1 @@
1
+ import{a as t}from"./runtime-chunk-44SAPZDZ.js";import{a as e,b as i}from"./runtime-chunk-T53JMQSH.js";import{B as r,n}from"./runtime-chunk-YUK55LCN.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import"./runtime-chunk-DJJZN367.js";import"./runtime-chunk-QZ35BPGB.js";import"./runtime-chunk-4KZXQGUQ.js";import"./runtime-chunk-Z5OH244S.js";import{a as s,f as o,h as a}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-OW6T4XFV.js";import{Dc as h,Jd as l,Ld as u,Nd as c,Qd as f,Qe as d,Rd as p,Sd as g,Tc as m}from"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var y=class{constructor(){this.type="ShapePath",this.color=new m,this.subPaths=[],this.currentPath=null}moveTo(t,e){return this.currentPath=new f,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e),this}lineTo(t,e){return this.currentPath?.lineTo(t,e),this}quadraticCurveTo(t,e,i,r){return this.currentPath?.quadraticCurveTo(t,e,i,r),this}bezierCurveTo(t,e,i,r,n,s){return this.currentPath?.bezierCurveTo(t,e,i,r,n,s),this}splineThru(t){return this.currentPath?.splineThru(t),this}toShapes(){let t={loc:0,t:0};function e(e,r,n,s){let o=e.x,a=r.x,h=n.x,l=s.x,u=e.y,c=r.y,f=n.y,d=s.y,p=(l-h)*(u-f)-(d-f)*(o-h),g=(d-f)*(a-o)-(l-h)*(c-u),m=p/g,y=((a-o)*(u-f)-(c-u)*(o-h))/g;if(0===g&&0!==p||m<=0||m>=1||y<0||y>1)return null;if(0===p&&0===g){for(let h=0;h<2;h++){if(i(0===h?n:s,e,r),0===t.loc){let e=0===h?n:s;return{x:e.x,y:e.y,t:t.t}}if(2===t.loc)return{x:+(o+t.t*(a-o)).toPrecision(10),y:+(u+t.t*(c-u)).toPrecision(10),t:t.t}}return null}for(let o=0;o<2;o++)if(i(0===o?n:s,e,r),0===t.loc){let e=0===o?n:s;return{x:e.x,y:e.y,t:t.t}}return{x:+(o+m*(a-o)).toPrecision(10),y:+(u+m*(c-u)).toPrecision(10),t:m}}function i(e,i,r){let n,s=r.x-i.x,o=r.y-i.y,a=e.x-i.x,h=e.y-i.y,l=s*h-a*o;return e.x===i.x&&e.y===i.y?(t.loc=0,void(t.t=0)):e.x===r.x&&e.y===r.y?(t.loc=1,void(t.t=1)):void(l<-Number.EPSILON?t.loc=3:l>Number.EPSILON?t.loc=4:s*a<0||o*h<0?t.loc=5:Math.sqrt(s*s+o*o)<Math.sqrt(a*a+h*h)?t.loc=6:(n=0!==s?a/s:h/o,t.loc=2,t.t=n))}let r=0,n=999999999,s=-999999999,o=[];this.subPaths.forEach(t=>{let e=t.getPoints(),i=-999999999,a=999999999,l=-999999999,u=999999999;for(let t=0;t<e.length;t++){let r=e[t];r.y>i&&(i=r.y),r.y<a&&(a=r.y),r.x>l&&(l=r.x),r.x<u&&(u=r.x)}s<=l&&(s=l+1),n>=u&&(n=u-1),e.length&&o.push({curves:t.curves,points:e,isCW:g.isClockWise(e),identifier:r++,boundingBox:new d(new h(u,a),new h(l,i))})});let a=o.map(t=>function(t,i,r,n,s){(null==s||""===s)&&(s="nonzero");let o=new h;t.boundingBox.getCenter(o);let a=function(t,i,r){let n=new h;i.getCenter(n);let s=[];return r.forEach(i=>{i.boundingBox.containsPoint(n)&&function(t,i){let r=[],n=[];for(let s=1;s<t.length;s++){let o=t[s-1],a=t[s];for(let t=1;t<i.length;t++){let s=e(o,a,i[t-1],i[t]);null!==s&&void 0===r.find(t=>t.t<=s.t+Number.EPSILON&&t.t>=s.t-Number.EPSILON)&&(r.push(s),n.push(new h(s.x,s.y)))}}return n}(t,i.points).forEach(t=>{s.push({identifier:i.identifier,isCW:i.isCW,point:t})})}),s.sort((t,e)=>t.point.x-e.point.x),s}([new h(r,o.y),new h(n,o.y)],t.boundingBox,i);a.sort((t,e)=>t.point.x-e.point.x);let l=[],u=[];a.forEach(e=>{e.identifier===t.identifier?l.push(e):u.push(e)});let c=l[0].point.x,f=[],d=0;for(;d<u.length&&u[d].point.x<c;)f.length>0&&f[f.length-1]===u[d].identifier?f.pop():f.push(u[d].identifier),d++;if(f.push(t.identifier),"evenodd"===s){let e=f.length%2==0,i=f[f.length-2];return{identifier:t.identifier,isHole:e,for:i}}if("nonzero"===s){let e=!0,r=null,n=null;for(let t=0;t<f.length;t++){let s=f[t];i[s]&&(e?(n=i[s].isCW,e=!1,r=s):n!==i[s].isCW&&(n=i[s].isCW,e=!0))}return{identifier:t.identifier,isHole:e,for:r}}console.warn('fill-rule: "'+s+'" is currently not implemented.')}(t,o,n,s,this.userData?.style.fillRule)),l=[];return o.forEach(t=>{let e=a[t.identifier];if(e&&!e.isHole){let e=new p;e.curves=t.curves,a.filter(e=>e?.isHole&&e.for===t.identifier).forEach(t=>{if(t){let i=o[t.identifier],r=new f;r.curves=i.curves,e.holes.push(r)}}),l.push(e)}}),l}},x=new class{async load(t,e,r=()=>{}){let{load:n}=await i;n(t,(t,i)=>{t||!i?r(t??"Something went wrong"):e(i)})}async parse(t){let{parse:e,Bidi:r}=await i;try{let i=e(t),n=new r,s=t=>i.charToGlyphIndex(t.char);return n.registerModifier("glyphIndex",null,s),n.applyFeatures(i,i.defaultRenderOptions.features),{font:i,bidi:n}}catch(t){console.error(t)}}};function b(t,e){return e.state.glyphIndex===t||e.state.fina===t||e.state.medi===t||e.state.init===t}o("TextGeometry",(e,i,r)=>new t(e,i,r));var w={create:(t,e)=>new r(t,e)};a("TextGeometry",w),a("InputGeometry",w),n(class{constructor(t){this._arrayBuffer=new ArrayBuffer(1),this._isLoaded=!1,this._intercepted=!1,this._isUserFont=t.isUserFont??!1,this._loadingPromise=this.load(t)}update(t){this._isLoaded=!1,this._isUserFont=t.isUserFont??!1,this._loadingPromise=this.load(t)}async load(t){try{let i=await async function(t){let i,r,n=!1;if(t.url?(i=await async function(t){let e;try{e=await fetch(t)}catch(e){throw new Error(`could not fetch the font at ${t}: ${e}`)}if(!e.ok)throw new Error(`${e.status} ${e.statusText} fetching the font at ${t}`);return await e.arrayBuffer()}(t.url),r=t.url,n=t.url.startsWith("/")):t.data&&(i=t.data.buffer.slice(t.data.byteOffset,t.data.byteOffset+t.data.byteLength)),i){if(!e)return{font:void 0,url:r,intercepted:n,arr:i,bidi:null};{let t=await x.parse(i);if(t)return{font:t.font,url:r,intercepted:n,arr:i,bidi:t.bidi}}}}(t);i&&(this._arrayBuffer=i.arr,this._url=i.url,this.font=i.font,this._intercepted=i.intercepted,this._isLoaded=!0,this._bidi=i.bidi)}catch(e){console.warn(`Could not load the font "${t.url??"(inline data)"}"`,e)}}get url(){return this._url}get intercepted(){return this._intercepted}get isLoaded(){return this._isLoaded}get loadingPromise(){return this._loadingPromise}reverseLigaturesTable(t,e,i){if(!this._bidi)return[];let r=this._bidi;r.getTextGlyphs(e);let n=r.tokenizer.tokens,s=[],o=0,a=i.length===n.length;for(let r=0;r<i.length;r++){let h=i[r].index,l=String.fromCharCode(i[r].unicode),u=n[o];if(b(h,u)||a)s.push({char:l,index:h,replacements:[u.state.glyphIndex],replacementChars:[u.char]}),o++;else{let i=u.char,r="",n=[u.state.glyphIndex],a=[],c=!1;for(;!c;)o++,r=e.charAt(o),i+=r,n.push(t.charToGlyphIndex(r)),a=t.stringToGlyphs(i),1===a.length&&a[0].index===h&&(c=!0),o>e.length&&(c=!0);s.push({char:l,index:h,replacements:n,replacementChars:Array.from(i)}),o++}}return s}generateShapes(t,e,i){if(!this._isLoaded)return;let r=this.font,n=e.fontSize/this.unitsPerEm,s=e.fontSize*e.lineHeight,o=t.map(t=>this.getTextWidth(t,e)),a="string"==typeof e.width?Number(i.getVariable(e.width)):e.width,h="string"==typeof e.height?Number(i.getVariable(e.height)):e.height,l=this.getCharWidth("\n",e),u=1===e.horizontalAlign?l:0,c=this.getLineInitialOffsetX(o[0],a,e.horizontalAlign,t[0],l),f=this.getLineInitialOffsetY(s,t.length,h,n,e.verticalAlign),d=[],p=t.map(()=>[]),g=t.map(()=>[]);for(let h=0;h<t.length;h++){let m=t[h],y={features:{liga:!0},letterSpacing:e.letterSpacing},x=[];try{x=r.stringToGlyphs(m,y)}catch(t){console.warn(t)}c=this.getLineInitialOffsetX(o[h],a,e.horizontalAlign,m,l);let b=[];try{b=this.reverseLigaturesTable(r,m,x)}catch(t){console.warn(t)}let w=this.computeSpaceWidthForLine(t,h,e,i),P=0,S=x[0];S&&2===e.horizontalAlign&&void 0!==S.leftSideBearing&&(c-=S.leftSideBearing*n),this.font?.forEachGlyph(m,c,f,e.fontSize,y,(t,i,s,o,a)=>{let l=0===t.index?"\n":t.unicode?String.fromCharCode(t.unicode):void 0,c=b[P],f=0;if("\n"===l)f=u;else if(" "===l)f=w;else{let r=this.createPath(t,n,i,s,e);r&&(f=r.offsetX,d.push(r.path))}if(1===c.replacements.length)g[h].push([i,s]),p[h].push(f);else{let t=c.replacements.map(t=>(r.glyphs.get(t).advanceWidth??0)*n),e=t.reduce((t,e)=>t+e,0),o=t.map(t=>t/e),a=i;for(let t=0;t<o.length;t++){let e=f*o[t];g[h].push([a,s]),p[h].push(e),a+=e}}P++}),f-=s}let m=[];for(let t=0,e=d.length;t<e;t++)m.push(...d[t].toShapes());return{shapes:m,charWidths:p,lineWidths:o,charCoords:g}}get isUserFont(){return this._isUserFont}get arrayBuffer(){return this._arrayBuffer}get ascender(){return this.font?.ascender??0}get descender(){return this.font?.descender??0}get familyName(){return this.font?.names.fontFamily??""}get subfamilyName(){return this.font?.names.fontSubfamily??""}get unitsPerEm(){return this.font?.unitsPerEm??1}getLineInitialOffsetX(t,e,i,r,n){return(3===i||2===i)&&r.indexOf("\n")>=0&&(t-=n),3===i?.5*e-.5*t:2===i?e-t:0}getLineInitialOffsetY(t,e,i,r,n){let s=e*t,o=t-Math.abs(this.ascender-this.descender)*r,a=-this.ascender*r-o/2;return 3===n?-(i-s-a):2===n?-(.5*i-.5*s-a):a}createPath(t,e,i,r,n){let s=t.getPath(i,-r,n.fontSize,{kerning:!1,letterSpacing:n.letterSpacing});if(!s)return void console.error('THREE.Font: character "'+t+'" does not exists in font family '+this.familyName+".");let o=new y,a=(t.advanceWidth??1)*e;if(t)for(let t of s.commands){let e=o.currentPath?.currentPoint;if(!e||"Z"===t.type||e.x!==t.x||-e.y!==t.y)switch(t.type){case"M":o.moveTo(t.x,-t.y);break;case"L":o.lineTo(t.x,-t.y);break;case"Q":o.quadraticCurveTo(t.x1,-t.y1,t.x,-t.y);break;case"C":o.bezierCurveTo(t.x1,-t.y1,t.x2,-t.y2,t.x,-t.y)}}return o.subPaths.forEach(t=>{let e=function(t){if(t.length){let e=t[0];if(e instanceof u)return e.v1;if(e instanceof l||e instanceof c)return e.v0}}(t.curves);void 0!==e&&t.currentPoint.distanceTo(e)>0&&t.lineTo(e.x,e.y)}),{offsetX:a,path:o}}getCharWidth(t,e){return this.font?.getAdvanceWidth(t,e.fontSize,{kerning:!0,letterSpacing:e.letterSpacing})??0}getTextWidth(t,e){return this.font?.getAdvanceWidth(t,e.fontSize,{kerning:!0,letterSpacing:e.letterSpacing})??0}computeSpaceWidthForLine(t,e,i,r){let n=this.getCharWidth(" ",i),s=t[e];if(s){let o=this.countSpaces(s.trimEnd());if(4===i.horizontalAlign&&e<t.length-1&&o)return(("string"==typeof i.width?Number(r.getVariable(i.width)):i.width)-(this.getTextWidth(s,i)-o*n))/o}return n}countSpaces(t){return(t.match(/ /g)||[]).length}}),s("text");