@cimplify/sdk 0.108.0 → 0.110.2

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 (608) hide show
  1. package/LICENSE +21 -0
  2. package/dist/advanced.d.mts +4 -3
  3. package/dist/advanced.d.ts +4 -3
  4. package/dist/advanced.js +24 -24
  5. package/dist/advanced.mjs +5 -5
  6. package/dist/animation-4EXBXRVX.js +27 -0
  7. package/dist/animation-6DICNWUP.mjs +6 -0
  8. package/dist/audio-DhvyjqdA.d.mts +249 -0
  9. package/dist/audio-m0w8cnxq.d.ts +249 -0
  10. package/dist/avatars.d.mts +110 -0
  11. package/dist/avatars.d.ts +110 -0
  12. package/dist/avatars.js +82 -0
  13. package/dist/avatars.mjs +5 -0
  14. package/dist/backend-gUCzs5Kg.d.mts +3866 -0
  15. package/dist/backend-gUCzs5Kg.d.ts +3866 -0
  16. package/dist/{catalogue-B4eLL8Mi.d.ts → catalogue-CPTMyBUz.d.mts} +109 -221
  17. package/dist/catalogue-DzrTXP3v.d.mts +541 -0
  18. package/dist/catalogue-DzrTXP3v.d.ts +541 -0
  19. package/dist/{catalogue-OT89_Ifs.d.mts → catalogue-OTuS5zp-.d.ts} +109 -221
  20. package/dist/chunk-22BD3RHN.mjs +1809 -0
  21. package/dist/chunk-25T4JHEA.mjs +21 -0
  22. package/dist/chunk-2AQ237Y4.js +508 -0
  23. package/dist/chunk-2IC4H6OV.mjs +48 -0
  24. package/dist/chunk-2LHLG4OB.mjs +71 -0
  25. package/dist/chunk-2O2CG465.js +1709 -0
  26. package/dist/chunk-2Q4DTHXK.js +316 -0
  27. package/dist/chunk-2QTQ6BUH.mjs +46 -0
  28. package/dist/chunk-2UN4SFLR.mjs +100 -0
  29. package/dist/chunk-2V75I7K3.js +454 -0
  30. package/dist/chunk-2V7IL4HC.js +10 -0
  31. package/dist/chunk-34XBXUMW.js +296 -0
  32. package/dist/chunk-3C4C654I.js +71 -0
  33. package/dist/chunk-3DAD2LDF.mjs +72 -0
  34. package/dist/chunk-3GXH2NFD.mjs +4 -0
  35. package/dist/chunk-3O47ZFW3.js +961 -0
  36. package/dist/chunk-3OY3VYNF.mjs +11 -0
  37. package/dist/chunk-3S6WPBZL.js +2936 -0
  38. package/dist/chunk-3TUOUP5T.js +399 -0
  39. package/dist/chunk-3VEH23I5.mjs +1380 -0
  40. package/dist/chunk-3ZYSAW2T.mjs +263 -0
  41. package/dist/chunk-4ANVF274.js +103 -0
  42. package/dist/chunk-4C7I3ELN.js +388 -0
  43. package/dist/chunk-4DYKAYFO.mjs +8 -0
  44. package/dist/chunk-4ZDR72SG.js +329 -0
  45. package/dist/chunk-52YS45RR.js +1066 -0
  46. package/dist/chunk-5325XSCH.js +107 -0
  47. package/dist/chunk-5AD5X6AV.js +13 -0
  48. package/dist/chunk-5BYDGGWO.mjs +197 -0
  49. package/dist/chunk-5C3C7VDM.mjs +55 -0
  50. package/dist/chunk-5HFMY3D7.js +660 -0
  51. package/dist/chunk-5LH2QN3T.js +1862 -0
  52. package/dist/chunk-5PJEXSOW.js +44 -0
  53. package/dist/chunk-5SXDH3Y7.js +90 -0
  54. package/dist/chunk-5YFBGGCK.mjs +502 -0
  55. package/dist/chunk-5YWN6H5Q.mjs +133 -0
  56. package/dist/chunk-66QP3SMN.js +402 -0
  57. package/dist/chunk-6DAEZKIG.mjs +385 -0
  58. package/dist/chunk-6DATW7TB.mjs +420 -0
  59. package/dist/{chunk-JRGK3NXR.mjs → chunk-6ETDAU62.mjs} +72 -212
  60. package/dist/chunk-6H254EVP.mjs +178 -0
  61. package/dist/chunk-6PFNJPBJ.mjs +820 -0
  62. package/dist/chunk-6PJWXIFX.mjs +357 -0
  63. package/dist/chunk-6SWKWCMS.js +80 -0
  64. package/dist/chunk-6VVXXX7S.js +808 -0
  65. package/dist/chunk-6WUBSMTX.js +1403 -0
  66. package/dist/chunk-73SGZLAQ.mjs +35 -0
  67. package/dist/chunk-76L2V6KD.mjs +4 -0
  68. package/dist/chunk-7AAIAVAA.js +1531 -0
  69. package/dist/chunk-7ARSJPV3.mjs +93 -0
  70. package/dist/chunk-7BHW5GTC.mjs +1234 -0
  71. package/dist/chunk-7DQSDKDU.js +6 -0
  72. package/dist/chunk-7IQQQENP.mjs +401 -0
  73. package/dist/chunk-7KFTYENS.js +11357 -0
  74. package/dist/chunk-7SM6XSPZ.js +3171 -0
  75. package/dist/chunk-7SXOHAIR.mjs +28 -0
  76. package/dist/chunk-A2MAX6S4.js +90 -0
  77. package/dist/chunk-A33OORT7.mjs +1530 -0
  78. package/dist/{chunk-U6ACF76H.mjs → chunk-A36JRXXH.mjs} +1075 -1845
  79. package/dist/chunk-A7BU3BK4.js +52 -0
  80. package/dist/chunk-A7MQSN2V.mjs +77 -0
  81. package/dist/chunk-A7V4L2IT.mjs +416 -0
  82. package/dist/chunk-AABEK6XU.js +226 -0
  83. package/dist/chunk-AGV33FWC.mjs +5005 -0
  84. package/dist/chunk-AHNR3BXI.js +108 -0
  85. package/dist/chunk-AQ5RLBU2.mjs +286 -0
  86. package/dist/chunk-AQOE6WCG.js +1270 -0
  87. package/dist/chunk-ATAWRACV.mjs +62 -0
  88. package/dist/chunk-ATCURNUV.js +14 -0
  89. package/dist/chunk-AWPV33OO.js +6 -0
  90. package/dist/chunk-AYJPHKYV.js +337 -0
  91. package/dist/chunk-AZ5BGWHB.js +162 -0
  92. package/dist/chunk-AZAXD44P.js +1373 -0
  93. package/dist/chunk-BBGKQIJJ.mjs +406 -0
  94. package/dist/chunk-BP4JLSUA.js +1453 -0
  95. package/dist/{chunk-SUCE7FWA.mjs → chunk-BTUSVHIE.mjs} +539 -978
  96. package/dist/chunk-BU6OK542.mjs +818 -0
  97. package/dist/chunk-CVSRWM6W.js +418 -0
  98. package/dist/chunk-CYBMFMJD.mjs +247 -0
  99. package/dist/chunk-DDJLDOUX.mjs +217 -0
  100. package/dist/{chunk-V32BCG7M.js → chunk-DFZWHNRG.js} +75 -215
  101. package/dist/chunk-DJ2C7AVG.js +644 -0
  102. package/dist/chunk-DS2VU4WW.mjs +102 -0
  103. package/dist/chunk-DSAG7T5P.js +7290 -0
  104. package/dist/chunk-E2QPPH7I.js +327 -0
  105. package/dist/chunk-E65WCTIG.mjs +1187 -0
  106. package/dist/{chunk-33VCYWVL.mjs → chunk-E6QQKDNE.mjs} +30 -42
  107. package/dist/chunk-ECDK6QBF.mjs +981 -0
  108. package/dist/chunk-EIB4OWVQ.mjs +620 -0
  109. package/dist/chunk-EQUZYCGO.js +250 -0
  110. package/dist/chunk-F3UJ6ZRM.mjs +313 -0
  111. package/dist/chunk-F63N2ZTQ.js +7023 -0
  112. package/dist/chunk-F6XRYEM3.mjs +26 -0
  113. package/dist/chunk-FE6VCE4K.js +5030 -0
  114. package/dist/chunk-FLWD6GRR.js +1372 -0
  115. package/dist/chunk-FQBFWJBS.mjs +110 -0
  116. package/dist/chunk-FXVJ2HFU.js +26 -0
  117. package/dist/chunk-FZMQMQBW.js +312 -0
  118. package/dist/chunk-G3EEC44R.js +53 -0
  119. package/dist/{chunk-KG3WT4PR.mjs → chunk-GCKWKLZF.mjs} +73 -104
  120. package/dist/chunk-GCX7TY4D.mjs +6826 -0
  121. package/dist/chunk-GDB6TCSD.js +450 -0
  122. package/dist/chunk-GDCV4IWO.mjs +21 -0
  123. package/dist/chunk-GDZT5LZ5.js +170 -0
  124. package/dist/chunk-GHPUYD4I.mjs +213 -0
  125. package/dist/chunk-GHS6MIL6.mjs +1432 -0
  126. package/dist/chunk-GPS2THCL.mjs +11 -0
  127. package/dist/{chunk-EV2EVOYS.js → chunk-GTJWQAGU.js} +31 -42
  128. package/dist/chunk-GVTI6UJQ.mjs +130 -0
  129. package/dist/chunk-GXKI64OT.mjs +1138 -0
  130. package/dist/chunk-GYDYF2WX.js +275 -0
  131. package/dist/chunk-GYLP6UG4.mjs +705 -0
  132. package/dist/chunk-H3OQKK6X.js +1158 -0
  133. package/dist/chunk-H5DFSCJ6.js +40 -0
  134. package/dist/chunk-HAGEIC2L.mjs +186 -0
  135. package/dist/chunk-HAJ4JRFO.js +293 -0
  136. package/dist/chunk-HDR72GB6.js +188 -0
  137. package/dist/chunk-HF5HPS4T.mjs +40 -0
  138. package/dist/chunk-HK6LOFDS.js +218 -0
  139. package/dist/chunk-HMWYTXCY.mjs +143 -0
  140. package/dist/chunk-HPCSRCMA.js +89 -0
  141. package/dist/chunk-HSEO6TPU.js +247 -0
  142. package/dist/chunk-I5FOHCLH.js +132 -0
  143. package/dist/chunk-IDLW4NWA.mjs +85 -0
  144. package/dist/chunk-IIDZ5WUX.js +61 -0
  145. package/dist/chunk-IR74FJHU.js +2332 -0
  146. package/dist/chunk-IRVFYAKP.mjs +100 -0
  147. package/dist/{chunk-XBL3TMPC.mjs → chunk-IZDWAL53.mjs} +1795 -3287
  148. package/dist/chunk-J2KZXIU3.js +51 -0
  149. package/dist/chunk-J2U6PJSO.js +91 -0
  150. package/dist/chunk-J5AJNY2N.js +283 -0
  151. package/dist/chunk-J6KQZ4FO.mjs +821 -0
  152. package/dist/{chunk-OWW5GUSB.js → chunk-JGBCIKJV.js} +7 -6
  153. package/dist/chunk-JKGTBMU7.mjs +25 -0
  154. package/dist/chunk-JR3TNEQC.js +422 -0
  155. package/dist/chunk-JURRXY2J.mjs +29 -0
  156. package/dist/chunk-K3HW5I2A.mjs +317 -0
  157. package/dist/chunk-K46SMZ66.mjs +103 -0
  158. package/dist/chunk-K4UDGE3Z.mjs +6 -0
  159. package/dist/chunk-KDQOR4QQ.mjs +350 -0
  160. package/dist/chunk-KDTVOLHI.mjs +288 -0
  161. package/dist/chunk-KGHJH5KJ.mjs +35 -0
  162. package/dist/chunk-KIZOA5LX.mjs +140 -0
  163. package/dist/chunk-KK6HYVBI.mjs +242 -0
  164. package/dist/chunk-KMKWGXMK.js +856 -0
  165. package/dist/chunk-KPA6K5IB.js +80 -0
  166. package/dist/chunk-KU7O4IXU.mjs +260 -0
  167. package/dist/chunk-KVFNRJOR.mjs +11142 -0
  168. package/dist/chunk-KZJRSXHK.js +2432 -0
  169. package/dist/chunk-LHWPRUJL.js +79 -0
  170. package/dist/chunk-LIV3KXJG.mjs +369 -0
  171. package/dist/chunk-LKV4LACG.js +21 -0
  172. package/dist/chunk-LUY45X3U.mjs +263 -0
  173. package/dist/chunk-LYEZZEEF.mjs +17 -0
  174. package/dist/chunk-M5EXQZYY.mjs +1519 -0
  175. package/dist/chunk-ME6HGG4I.mjs +1338 -0
  176. package/dist/chunk-MEXP6DA6.js +31 -0
  177. package/dist/chunk-MG52AW3H.js +902 -0
  178. package/dist/chunk-MIPO6F72.js +334 -0
  179. package/dist/{chunk-5QW7CQBA.js → chunk-MKIJQL5Q.js} +211 -321
  180. package/dist/chunk-MN3YETVN.mjs +17 -0
  181. package/dist/chunk-MOBSBXVE.mjs +2391 -0
  182. package/dist/chunk-MOMOZEUM.mjs +88 -0
  183. package/dist/chunk-MRFUNRAP.js +62 -0
  184. package/dist/chunk-MTIHEW2M.js +433 -0
  185. package/dist/chunk-N4RGGDEL.mjs +73 -0
  186. package/dist/chunk-NH654HAT.js +10 -0
  187. package/dist/chunk-NHJUGZUR.mjs +253 -0
  188. package/dist/chunk-NMQT4HG3.mjs +757 -0
  189. package/dist/chunk-NPSYB6DC.mjs +906 -0
  190. package/dist/chunk-NW2GPMSO.js +857 -0
  191. package/dist/chunk-NXKQOQ6L.js +76 -0
  192. package/dist/chunk-NXLAZIJZ.js +309 -0
  193. package/dist/chunk-NYWNA5CF.js +148 -0
  194. package/dist/chunk-NZTKLY2W.js +1442 -0
  195. package/dist/chunk-O2ICABUD.js +36 -0
  196. package/dist/chunk-OIVVQQ22.js +862 -0
  197. package/dist/chunk-OKC2B4O3.mjs +312 -0
  198. package/dist/chunk-OLWFPDBK.js +2220 -0
  199. package/dist/chunk-OMTVH334.js +3779 -0
  200. package/dist/chunk-OQRVEM56.mjs +362 -0
  201. package/dist/chunk-OXMIBOD4.js +337 -0
  202. package/dist/chunk-PBL6YL5L.mjs +288 -0
  203. package/dist/chunk-PDOELNNQ.js +97 -0
  204. package/dist/chunk-PDQJY2GZ.js +136 -0
  205. package/dist/chunk-PKOZXD2Q.js +1274 -0
  206. package/dist/chunk-PPF2BYFL.mjs +2191 -0
  207. package/dist/chunk-PQTQKNKD.js +539 -0
  208. package/dist/chunk-PRSR4FAV.mjs +81 -0
  209. package/dist/chunk-PTRNO5UD.js +95 -0
  210. package/dist/chunk-Q2Y3VMKH.js +2000 -0
  211. package/dist/chunk-QCZOE65N.js +96 -0
  212. package/dist/chunk-QDYFLATW.mjs +52 -0
  213. package/dist/chunk-QQABGCMM.js +22 -0
  214. package/dist/chunk-QS6TRHMR.js +345 -0
  215. package/dist/chunk-R56P64LB.mjs +208 -0
  216. package/dist/chunk-RCQ2MPBV.js +428 -0
  217. package/dist/chunk-RFVRPYR2.mjs +856 -0
  218. package/dist/chunk-RKBLPGPV.js +11521 -0
  219. package/dist/chunk-RM2V4IND.mjs +327 -0
  220. package/dist/chunk-RQXN5A34.mjs +613 -0
  221. package/dist/chunk-RUVGVNOF.mjs +2687 -0
  222. package/dist/chunk-SAFJIGYB.mjs +165 -0
  223. package/dist/chunk-SKQFLBDD.js +263 -0
  224. package/dist/chunk-SMK6JU2F.mjs +2092 -0
  225. package/dist/{chunk-UVRPC2P7.js → chunk-SNNEOS5Z.js} +1984 -3476
  226. package/dist/chunk-SPCRQ6NO.mjs +1246 -0
  227. package/dist/chunk-SWX4SALA.mjs +19 -0
  228. package/dist/{chunk-JVODCGFP.mjs → chunk-SYEO2WV4.mjs} +128 -238
  229. package/dist/chunk-T2QQMX2N.js +10 -0
  230. package/dist/chunk-T3AFF3L7.mjs +57 -0
  231. package/dist/chunk-T6Z2EXYL.js +712 -0
  232. package/dist/chunk-T7LOXGYX.js +118 -0
  233. package/dist/chunk-TJCAE7RC.mjs +1315 -0
  234. package/dist/chunk-TJI3K6RP.js +137 -0
  235. package/dist/chunk-TL2SVO4P.mjs +55 -0
  236. package/dist/chunk-TM63CYGN.mjs +399 -0
  237. package/dist/chunk-TU5RYTYU.mjs +13 -0
  238. package/dist/chunk-TVJZ4GPS.js +1553 -0
  239. package/dist/chunk-TWM6DLYF.js +371 -0
  240. package/dist/chunk-U63OC4TQ.js +30 -0
  241. package/dist/{chunk-L5GKVQVJ.js → chunk-U6BVSJZ6.js} +25 -57
  242. package/dist/chunk-U6UVWEAK.mjs +792 -0
  243. package/dist/chunk-UCEPNO6N.mjs +11048 -0
  244. package/dist/{chunk-ANT574FD.js → chunk-UCR5HRYM.js} +74 -105
  245. package/dist/chunk-UG5BTOTF.mjs +334 -0
  246. package/dist/chunk-UGH37BQW.mjs +157 -0
  247. package/dist/chunk-V7ZRH3PY.mjs +271 -0
  248. package/dist/chunk-VBGHBL3E.mjs +1394 -0
  249. package/dist/chunk-VRBDAS5I.js +920 -0
  250. package/dist/chunk-VVE3Y76O.js +230 -0
  251. package/dist/chunk-W65JIRI4.mjs +1182 -0
  252. package/dist/chunk-WHYKAT7G.js +62 -0
  253. package/dist/{chunk-YOIVZ6OA.mjs → chunk-WIZRUIZB.mjs} +25 -57
  254. package/dist/chunk-WKWTDZS7.js +385 -0
  255. package/dist/chunk-WLMINRC4.mjs +78 -0
  256. package/dist/chunk-WOF3AD3J.js +22 -0
  257. package/dist/chunk-WWKMOA76.js +1262 -0
  258. package/dist/chunk-X5A5FOWW.js +615 -0
  259. package/dist/chunk-X6CN6KQF.mjs +192 -0
  260. package/dist/chunk-XD2PMH46.mjs +517 -0
  261. package/dist/chunk-XJA2NGTI.mjs +88 -0
  262. package/dist/chunk-XJIHN3BY.mjs +8 -0
  263. package/dist/chunk-XK6UDWJS.js +203 -0
  264. package/dist/chunk-XPG3N5CF.mjs +415 -0
  265. package/dist/chunk-XVZ2NKSU.mjs +74 -0
  266. package/dist/chunk-XYP45OLE.js +117 -0
  267. package/dist/chunk-XZSDGZX6.mjs +301 -0
  268. package/dist/chunk-Y2EMGN4T.mjs +120 -0
  269. package/dist/chunk-Y3XWP5XW.mjs +298 -0
  270. package/dist/chunk-Y4K22JL6.js +228 -0
  271. package/dist/chunk-Y65LXQGA.mjs +3164 -0
  272. package/dist/chunk-Y66WVMO5.mjs +87 -0
  273. package/dist/chunk-Y7JWLB25.mjs +7280 -0
  274. package/dist/chunk-YCDXAJKU.js +175 -0
  275. package/dist/chunk-YRDQCCIS.js +152 -0
  276. package/dist/chunk-YV52DGSA.js +111 -0
  277. package/dist/chunk-YXGZQPUD.js +94 -0
  278. package/dist/chunk-Z3A3AFVU.mjs +102 -0
  279. package/dist/chunk-ZCY6YKKP.mjs +475 -0
  280. package/dist/chunk-ZEQHXVU5.js +215 -0
  281. package/dist/chunk-ZF7JCXCI.js +284 -0
  282. package/dist/chunk-ZJBRUH6V.js +29 -0
  283. package/dist/chunk-ZMIL4ZOA.js +365 -0
  284. package/dist/chunk-ZR5ULMN2.mjs +337 -0
  285. package/dist/chunk-ZXREOYOW.js +87 -0
  286. package/dist/{client-BSP9U1O1.d.mts → client-CX_WR0-J.d.mts} +2 -2
  287. package/dist/client-Dytx_ZTC.d.ts +230 -0
  288. package/dist/{client-B878xeAP.d.ts → client-dqOhP9Nc.d.ts} +2 -2
  289. package/dist/client-hTKbCuhG.d.mts +230 -0
  290. package/dist/clock-B-UAjkKa.d.mts +5 -0
  291. package/dist/clock-B-UAjkKa.d.ts +5 -0
  292. package/dist/config-BlXQluJR.d.mts +36 -0
  293. package/dist/config-BlXQluJR.d.ts +36 -0
  294. package/dist/courier-Cnn-edJ4.d.ts +95 -0
  295. package/dist/courier-FmGfkvIN.d.mts +95 -0
  296. package/dist/crowd-DdHFbqKK.d.ts +186 -0
  297. package/dist/crowd-hOVSAmA3.d.mts +186 -0
  298. package/dist/danfo-BEBapFlX.d.mts +146 -0
  299. package/dist/danfo-UQ_PTIIx.d.ts +146 -0
  300. package/dist/{elements-Bty6Qs_N.d.mts → elements-DdsRig-2.d.mts} +1548 -257
  301. package/dist/{elements-Bty6Qs_N.d.ts → elements-DdsRig-2.d.ts} +1548 -257
  302. package/dist/engines/godot.d.mts +56 -0
  303. package/dist/engines/godot.d.ts +56 -0
  304. package/dist/engines/godot.js +28 -0
  305. package/dist/engines/godot.mjs +3 -0
  306. package/dist/engines/wasm.d.mts +11 -0
  307. package/dist/engines/wasm.d.ts +11 -0
  308. package/dist/engines/wasm.js +178 -0
  309. package/dist/engines/wasm.mjs +176 -0
  310. package/dist/fallback-CrG_lTFk.d.mts +270 -0
  311. package/dist/fallback-CrG_lTFk.d.ts +270 -0
  312. package/dist/fallback-KDB4Y2CE.mjs +6 -0
  313. package/dist/fallback-Y26TQENE.js +19 -0
  314. package/dist/features-CZB4rmcD.d.mts +118 -0
  315. package/dist/features-CZB4rmcD.d.ts +118 -0
  316. package/dist/fit-BWiE7rgA.d.mts +44 -0
  317. package/dist/fit-DK0oT7zO.d.ts +44 -0
  318. package/dist/five-a-side-Bv1AOUy3.d.mts +115 -0
  319. package/dist/five-a-side-EC51SJY1.d.ts +115 -0
  320. package/dist/fluid-ARr0qUIL.d.ts +939 -0
  321. package/dist/fluid-DLlEj2cs.d.mts +939 -0
  322. package/dist/game/conformance.d.mts +84 -0
  323. package/dist/game/conformance.d.ts +84 -0
  324. package/dist/game/conformance.js +1025 -0
  325. package/dist/game/conformance.mjs +994 -0
  326. package/dist/game/heap.d.mts +40 -0
  327. package/dist/game/heap.d.ts +40 -0
  328. package/dist/game/heap.js +48 -0
  329. package/dist/game/heap.mjs +7 -0
  330. package/dist/game/kit/canvas.d.mts +240 -0
  331. package/dist/game/kit/canvas.d.ts +240 -0
  332. package/dist/game/kit/canvas.js +3566 -0
  333. package/dist/game/kit/canvas.mjs +1039 -0
  334. package/dist/game/kit/courier.d.mts +17 -0
  335. package/dist/game/kit/courier.d.ts +17 -0
  336. package/dist/game/kit/courier.js +66 -0
  337. package/dist/game/kit/courier.mjs +49 -0
  338. package/dist/game/kit/danfo.d.mts +11 -0
  339. package/dist/game/kit/danfo.d.ts +11 -0
  340. package/dist/game/kit/danfo.js +109 -0
  341. package/dist/game/kit/danfo.mjs +44 -0
  342. package/dist/game/kit/engine.d.mts +29 -0
  343. package/dist/game/kit/engine.d.ts +29 -0
  344. package/dist/game/kit/engine.js +183 -0
  345. package/dist/game/kit/engine.mjs +30 -0
  346. package/dist/game/kit/five-a-side.d.mts +11 -0
  347. package/dist/game/kit/five-a-side.d.ts +11 -0
  348. package/dist/game/kit/five-a-side.js +86 -0
  349. package/dist/game/kit/five-a-side.mjs +41 -0
  350. package/dist/game/kit/frontier.d.mts +344 -0
  351. package/dist/game/kit/frontier.d.ts +344 -0
  352. package/dist/game/kit/frontier.js +435 -0
  353. package/dist/game/kit/frontier.mjs +14 -0
  354. package/dist/game/kit/genesis.d.mts +752 -0
  355. package/dist/game/kit/genesis.d.ts +752 -0
  356. package/dist/game/kit/genesis.js +380 -0
  357. package/dist/game/kit/genesis.mjs +15 -0
  358. package/dist/game/kit/ludo.d.mts +15 -0
  359. package/dist/game/kit/ludo.d.ts +15 -0
  360. package/dist/game/kit/ludo.js +87 -0
  361. package/dist/game/kit/ludo.mjs +42 -0
  362. package/dist/game/kit/runner.d.mts +12 -0
  363. package/dist/game/kit/runner.d.ts +12 -0
  364. package/dist/game/kit/runner.js +83 -0
  365. package/dist/game/kit/runner.mjs +46 -0
  366. package/dist/game/kit/shootout.d.mts +13 -0
  367. package/dist/game/kit/shootout.d.ts +13 -0
  368. package/dist/game/kit/shootout.js +122 -0
  369. package/dist/game/kit/shootout.mjs +57 -0
  370. package/dist/game/kit/slots.d.mts +392 -0
  371. package/dist/game/kit/slots.d.ts +392 -0
  372. package/dist/game/kit/slots.js +215 -0
  373. package/dist/game/kit/slots.mjs +6 -0
  374. package/dist/game/kit/tycoon.d.mts +16 -0
  375. package/dist/game/kit/tycoon.d.ts +16 -0
  376. package/dist/game/kit/tycoon.js +145 -0
  377. package/dist/game/kit/tycoon.mjs +44 -0
  378. package/dist/game/kit/word.d.mts +11 -0
  379. package/dist/game/kit/word.d.ts +11 -0
  380. package/dist/game/kit/word.js +78 -0
  381. package/dist/game/kit/word.mjs +41 -0
  382. package/dist/game/kit/worlds.d.mts +18 -0
  383. package/dist/game/kit/worlds.d.ts +18 -0
  384. package/dist/game/kit/worlds.js +74 -0
  385. package/dist/game/kit/worlds.mjs +49 -0
  386. package/dist/game/kit.d.mts +53 -0
  387. package/dist/game/kit.d.ts +53 -0
  388. package/dist/game/kit.js +2610 -0
  389. package/dist/game/kit.mjs +101 -0
  390. package/dist/game/prepared.d.mts +14 -0
  391. package/dist/game/prepared.d.ts +14 -0
  392. package/dist/game/prepared.js +81 -0
  393. package/dist/game/prepared.mjs +32 -0
  394. package/dist/game-Bx8onkhX.d.mts +1451 -0
  395. package/dist/game-fgQy2YIm.d.ts +1451 -0
  396. package/dist/game-theme-CBTw1b_d.d.mts +35 -0
  397. package/dist/game-theme-Dg-ict5A.d.ts +35 -0
  398. package/dist/game.d.mts +3546 -0
  399. package/dist/game.d.ts +3546 -0
  400. package/dist/game.js +4455 -0
  401. package/dist/game.mjs +50 -0
  402. package/dist/graphics-C6YjWYvP.d.ts +5 -0
  403. package/dist/graphics-Dk2yQnYN.d.mts +5 -0
  404. package/dist/guest-DrsA00XD.d.mts +732 -0
  405. package/dist/guest-wIdfoT05.d.ts +732 -0
  406. package/dist/hit-stop-BKkVwTq7.d.mts +43 -0
  407. package/dist/hit-stop-D-8pPYnM.d.ts +43 -0
  408. package/dist/hot-Crn9XpHJ.d.ts +29 -0
  409. package/dist/hot-DH3nOhQD.d.mts +29 -0
  410. package/dist/{index-CQStGb3B.d.mts → index-6gkHMGAq.d.mts} +2 -2
  411. package/dist/index-B8ybCKJI.d.ts +41 -0
  412. package/dist/{index-DJwXmoaP.d.ts → index-B98Xac8e.d.ts} +2 -2
  413. package/dist/{index-B7oA_1XI.d.ts → index-B_ByTtIT.d.ts} +2 -2
  414. package/dist/index-DHjNHb1c.d.mts +41 -0
  415. package/dist/{index-DhUSTAhT.d.mts → index-DbAN_VQE.d.mts} +2 -2
  416. package/dist/index.d.mts +134 -24
  417. package/dist/index.d.ts +134 -24
  418. package/dist/index.js +407 -248
  419. package/dist/index.mjs +184 -58
  420. package/dist/interactives-authoring.d.mts +231 -0
  421. package/dist/interactives-authoring.d.ts +231 -0
  422. package/dist/interactives-authoring.js +1743 -0
  423. package/dist/interactives-authoring.mjs +1704 -0
  424. package/dist/interactives-canvas.global.js +148 -0
  425. package/dist/interactives-guest.d.mts +20 -0
  426. package/dist/interactives-guest.d.ts +20 -0
  427. package/dist/interactives-guest.js +63 -0
  428. package/dist/interactives-guest.json +1 -0
  429. package/dist/interactives-guest.mjs +61 -0
  430. package/dist/interactives-jsc.global.js +9357 -0
  431. package/dist/interactives-meters.d.mts +93 -0
  432. package/dist/interactives-meters.d.ts +93 -0
  433. package/dist/interactives-meters.js +252 -0
  434. package/dist/interactives-meters.mjs +68 -0
  435. package/dist/interactives-production.d.mts +430 -0
  436. package/dist/interactives-production.d.ts +430 -0
  437. package/dist/interactives-production.js +1231 -0
  438. package/dist/interactives-production.mjs +1170 -0
  439. package/dist/interactives-record.d.mts +112 -0
  440. package/dist/interactives-record.d.ts +112 -0
  441. package/dist/interactives-record.js +302 -0
  442. package/dist/interactives-record.mjs +295 -0
  443. package/dist/interactives-runtime.d.mts +61 -0
  444. package/dist/interactives-runtime.d.ts +61 -0
  445. package/dist/interactives-runtime.js +442 -0
  446. package/dist/interactives-runtime.mjs +25 -0
  447. package/dist/interactives-studio-kernel.global.js +1 -0
  448. package/dist/interactives-studio.d.mts +806 -0
  449. package/dist/interactives-studio.d.ts +806 -0
  450. package/dist/interactives-studio.js +5741 -0
  451. package/dist/interactives-studio.mjs +5651 -0
  452. package/dist/interactives-tick.d.mts +90 -0
  453. package/dist/interactives-tick.d.ts +90 -0
  454. package/dist/interactives-tick.js +203 -0
  455. package/dist/interactives-tick.mjs +6 -0
  456. package/dist/interactives-web.d.mts +762 -0
  457. package/dist/interactives-web.d.ts +762 -0
  458. package/dist/interactives-web.js +5000 -0
  459. package/dist/interactives-web.mjs +4628 -0
  460. package/dist/interactives.d.mts +2430 -0
  461. package/dist/interactives.d.ts +2430 -0
  462. package/dist/interactives.js +5723 -0
  463. package/dist/interactives.mjs +4333 -0
  464. package/dist/juice-CoHxlpKA.d.ts +42 -0
  465. package/dist/juice-DQztFS43.d.mts +42 -0
  466. package/dist/launch-T2f4_Di4.d.mts +151 -0
  467. package/dist/launch-d6oreMzR.d.ts +151 -0
  468. package/dist/library-DXYaMFhi.d.mts +69 -0
  469. package/dist/library-DXYaMFhi.d.ts +69 -0
  470. package/dist/link-BUTqGmyi.d.mts +38 -0
  471. package/dist/link-BUTqGmyi.d.ts +38 -0
  472. package/dist/lint.js +104 -204
  473. package/dist/lint.mjs +103 -203
  474. package/dist/local-D8_I6UeL.d.mts +6967 -0
  475. package/dist/local-VZkqsCzR.d.ts +6967 -0
  476. package/dist/lockstep-BLf6dglI.d.mts +321 -0
  477. package/dist/lockstep-D50Ia0JW.d.ts +321 -0
  478. package/dist/ludo-B8ClkDqr.d.ts +205 -0
  479. package/dist/ludo-BOuohQ-M.d.mts +205 -0
  480. package/dist/mock/cli.mjs +200 -56
  481. package/dist/mock/library.js +200 -56
  482. package/dist/mock/library.mjs +200 -56
  483. package/dist/mock/msw.js +200 -56
  484. package/dist/mock/msw.mjs +200 -56
  485. package/dist/native-BodxSh03.d.mts +16 -0
  486. package/dist/native-DUHMT8gA.d.ts +16 -0
  487. package/dist/network-ZXLD7l1b.d.mts +19 -0
  488. package/dist/network-ZXLD7l1b.d.ts +19 -0
  489. package/dist/online-XeymeM9s.d.ts +381 -0
  490. package/dist/online-d7W_Al9a.d.mts +381 -0
  491. package/dist/params-DxFb5G_U.d.mts +155 -0
  492. package/dist/params-DxFb5G_U.d.ts +155 -0
  493. package/dist/play-BRRlfLhX.d.ts +940 -0
  494. package/dist/play-ClrMd_e8.d.mts +940 -0
  495. package/dist/policy-CCw8tXLm.d.mts +3078 -0
  496. package/dist/policy-CMqOSQIu.d.ts +3078 -0
  497. package/dist/ports-B_0v_P3A.d.mts +13 -0
  498. package/dist/ports-CGU_3e_0.d.ts +13 -0
  499. package/dist/prefetch-BHnicOQj.d.ts +117 -0
  500. package/dist/prefetch-CBXgYacv.d.mts +117 -0
  501. package/dist/{price-CSztR02F.d.mts → price-BOzexBww.d.mts} +1 -1
  502. package/dist/{price-C_vasx9A.d.ts → price-C1h9sPxE.d.ts} +1 -1
  503. package/dist/protocol-C8qbpUbT.d.mts +242 -0
  504. package/dist/protocol-C8qbpUbT.d.ts +242 -0
  505. package/dist/rapier-AZHT4YI7.js +7886 -0
  506. package/dist/rapier-ODEPCQA6.mjs +7792 -0
  507. package/dist/react.d.mts +157 -15
  508. package/dist/react.d.ts +157 -15
  509. package/dist/react.js +5564 -5904
  510. package/dist/react.mjs +5451 -5808
  511. package/dist/runner-CQcLL7By.d.ts +189 -0
  512. package/dist/runner-D46Yj-wE.d.mts +189 -0
  513. package/dist/runtime-BRWfkf_q.d.mts +51 -0
  514. package/dist/runtime-DyuBMkKM.d.ts +51 -0
  515. package/dist/scheduling-D2ajXpMC.d.ts +224 -0
  516. package/dist/scheduling-DSRbbaZb.d.mts +224 -0
  517. package/dist/schema-BrWxzKp6.d.mts +63 -0
  518. package/dist/schema-BrWxzKp6.d.ts +63 -0
  519. package/dist/server/evict.js +34 -37
  520. package/dist/server/evict.mjs +34 -37
  521. package/dist/server/tanstack.d.mts +49 -3
  522. package/dist/server/tanstack.d.ts +49 -3
  523. package/dist/server/tanstack.js +169 -117
  524. package/dist/server/tanstack.mjs +166 -118
  525. package/dist/{server-Dckg4Vdr.d.ts → server-D29IIuDV.d.ts} +136 -130
  526. package/dist/{server-B6dW7-Lj.d.mts → server-DQMWPnc8.d.mts} +136 -130
  527. package/dist/server.d.mts +45 -5
  528. package/dist/server.d.ts +45 -5
  529. package/dist/server.js +171 -227
  530. package/dist/server.mjs +165 -225
  531. package/dist/session-grant-CJ27DwrT.d.mts +19 -0
  532. package/dist/session-grant-CJ27DwrT.d.ts +19 -0
  533. package/dist/shootout-BJZeX6FG.d.ts +140 -0
  534. package/dist/shootout-tcZd1Rxt.d.mts +140 -0
  535. package/dist/state-replica-stMtdkVD.d.mts +42 -0
  536. package/dist/state-replica-stMtdkVD.d.ts +42 -0
  537. package/dist/studio-CowqWqez.d.mts +14 -0
  538. package/dist/studio-CowqWqez.d.ts +14 -0
  539. package/dist/styles.css +1 -1
  540. package/dist/template-AhCdB1kW.d.mts +190 -0
  541. package/dist/template-BkEGVTQj.d.ts +190 -0
  542. package/dist/terrain-BMxEc6Oc.d.ts +429 -0
  543. package/dist/terrain-C-XC1Oui.d.mts +429 -0
  544. package/dist/testing/msw.d.mts +28 -4
  545. package/dist/testing/msw.d.ts +28 -4
  546. package/dist/testing/msw.js +15 -21
  547. package/dist/testing/msw.mjs +15 -21
  548. package/dist/testing/suite.d.mts +6 -5
  549. package/dist/testing/suite.d.ts +6 -5
  550. package/dist/testing/suite.js +89 -124
  551. package/dist/testing/suite.mjs +81 -116
  552. package/dist/testing.d.mts +27 -1227
  553. package/dist/testing.d.ts +27 -1227
  554. package/dist/testing.js +127 -131
  555. package/dist/testing.mjs +19 -23
  556. package/dist/tick-transport-C8QEh8Uw.d.mts +50 -0
  557. package/dist/tick-transport-UjHY3xK1.d.ts +50 -0
  558. package/dist/timeline-protocol-hp6e8zFB.d.mts +47 -0
  559. package/dist/timeline-protocol-hp6e8zFB.d.ts +47 -0
  560. package/dist/tokens-DhanQRQS.d.mts +21 -0
  561. package/dist/tokens-K8yxwd6G.d.ts +21 -0
  562. package/dist/tree-C-Io2Hbx.d.mts +35 -0
  563. package/dist/tree-CP_qSW4H.d.ts +35 -0
  564. package/dist/tycoon-B5KHk2Xx.d.mts +255 -0
  565. package/dist/tycoon-hmHo-3HX.d.ts +255 -0
  566. package/dist/types-BQkxPwZP.d.mts +219 -0
  567. package/dist/types-D_f6UUxM.d.ts +219 -0
  568. package/dist/ui-DwHicuFv.d.mts +563 -0
  569. package/dist/ui-hi7S2YcH.d.ts +563 -0
  570. package/dist/{sign-in-DQlIdqsi.d.mts → url-52ndUruG.d.mts} +15 -1
  571. package/dist/{sign-in-DQlIdqsi.d.ts → url-52ndUruG.d.ts} +15 -1
  572. package/dist/utils.d.mts +3 -3
  573. package/dist/utils.d.ts +3 -3
  574. package/dist/utils.js +37 -37
  575. package/dist/utils.mjs +4 -4
  576. package/dist/vars-Dc_PrhBK.d.mts +511 -0
  577. package/dist/vars-Dc_PrhBK.d.ts +511 -0
  578. package/dist/vm-IUARFFAI.mjs +63 -0
  579. package/dist/vm-N7L6MGGH.js +65 -0
  580. package/dist/weave-delivery-CW-Kstut.d.mts +360 -0
  581. package/dist/weave-delivery-CW-Kstut.d.ts +360 -0
  582. package/dist/web-Dss74a7v.d.ts +883 -0
  583. package/dist/web-f9ZQPoyw.d.mts +883 -0
  584. package/dist/web-transport-C7MkBL0a.d.ts +19 -0
  585. package/dist/web-transport-aYEqXMd9.d.mts +19 -0
  586. package/dist/weight-CPGjsgjV.d.ts +92 -0
  587. package/dist/weight-tF1ODR1p.d.mts +92 -0
  588. package/dist/word-BcX9Jcmv.d.mts +70 -0
  589. package/dist/word-C7sVPLHm.d.ts +70 -0
  590. package/dist/world-PvILHDR1.d.ts +2285 -0
  591. package/dist/world-qekkXjJv.d.mts +2285 -0
  592. package/dist/worlds-Br2Pb0Cs.d.ts +109 -0
  593. package/dist/worlds-D5ydYr7d.d.mts +109 -0
  594. package/engines/c/cimplify.h +108 -0
  595. package/engines/c/cimplify.lib.js +11 -0
  596. package/engines/godot/addons/cimplify/cimplify.gd +97 -0
  597. package/engines/rust/interactives-ctx/Cargo.toml +9 -0
  598. package/engines/rust/interactives-ctx/src/lib.rs +189 -0
  599. package/package.json +189 -3
  600. package/vendor/rapier3d-compat/LICENSE +201 -0
  601. package/vendor/rapier3d-compat/PATCHES.md +61 -0
  602. package/dist/chunk-2P4KXFB6.js +0 -274
  603. package/dist/chunk-3G6RQLXK.mjs +0 -21
  604. package/dist/chunk-3V4DVXV3.mjs +0 -254
  605. package/dist/chunk-EDK3LNM6.js +0 -2436
  606. package/dist/chunk-F7J3HK27.js +0 -4549
  607. package/dist/chunk-U4MW6PYU.mjs +0 -23
  608. package/dist/chunk-XREIZ56K.js +0 -26
@@ -0,0 +1,1187 @@
1
+ import { DEFAULT_FFT_SIZE, MIN_FFT_SIZE, MAX_FFT_SIZE, DEFAULT_SMOOTHING, DEFAULT_MIN_DECIBELS, DEFAULT_MAX_DECIBELS, engineFractureExports, EngineFracturer } from './chunk-5YFBGGCK.mjs';
2
+ import { DEFAULT_EVENT_CAPACITY, RING_COUNT, RING_DROPPED, symbol, DATA_LIST_MAX, DATA_TALLIES, ListSweep, readAs, toUint64, toUint32, joinF64, joinU64, RING_HEADER_WORDS } from './chunk-SMK6JU2F.mjs';
3
+ import { COLUMN_ALIGN } from './chunk-A33OORT7.mjs';
4
+ import { GameError } from './chunk-XJIHN3BY.mjs';
5
+
6
+ // src/game/kernel/compute.ts
7
+ var ENGINE_COMPUTE_EXPORT_NAMES = ["engine_compute_frame", "engine_compute_priority", "engine_compute_registers", "engine_compute_clear"], KERNEL_PRIORITIES = ["simulation", "presentation", "optional"], PRIORITY_LEVEL = { simulation: 0, presentation: 1, optional: 2 };
8
+ function priorityLevel(priority) {
9
+ return priority === void 0 ? 0 : PRIORITY_LEVEL[priority];
10
+ }
11
+ var COMPUTE_SPACE_CPU = 0, COMPUTE_SPACE_GPU = 1, COMPUTE_DEFERRED = -7, COMPUTE_STOPPED = -8, COMPUTE_HEADER_WORDS = 16, COMPUTE_DIAGNOSTIC_WORDS = 8, COMPUTE_DIAGNOSTIC_CAPACITY = 32, COMPUTE_REGISTER_WORDS = (16) + (32) * (8), REG_CPU_BUDGET_NS = 1, REG_CPU_SPENT_NS = 2, REG_DEFERRED = 5, REG_STOPPED = 6, REG_COUNT = 8, DIAG_CODE = 0, DIAG_SPACE = 1, DIAG_BINDING = 2, DIAG_ROUTE = 4, DIAG_NS = 5, DIAG_ROWS = 6, DIAG_FRAME = 7, NANOS_PER_MS = 1e6, MAX_TIER = 2, SPACE_SHIFT = 2 ** 32, CPU_SLOT_MASK = 1023;
12
+ function keyOf(space, binding) {
13
+ return space * SPACE_SHIFT + (space === (0) ? binding & (1023) : binding);
14
+ }
15
+ var CODES = [null, "frame_over", "kernel_heavy", "kernel_deferred", "kernel_stopped", "gpu_deferred", "gpu_stall"], ROUTES = ["interpreter", "jit", "prebuilt", "native", "gpu"], MESSAGES = {
16
+ frame_over: "Kernels used more time this frame than some phones can spare.",
17
+ kernel_heavy: "This kernel is too heavy for some phones.",
18
+ kernel_deferred: "This kernel waited for the next frame so the game stays smooth.",
19
+ kernel_stopped: "This kernel ran too long and was stopped so the game stays responsive.",
20
+ gpu_deferred: "This GPU kernel waited for the next frame so the game stays smooth.",
21
+ gpu_stall: "GPU work took longer than a frame."
22
+ };
23
+ function computeLogLine(d) {
24
+ let who = d.kernel === null ? "" : ` kernel ${d.kernel}`, rows = d.rows > 0 ? ` on ${d.rows} rows` : "";
25
+ return `[compute ${d.code}]${who} ${d.ms.toFixed(2)} ms${rows} via ${d.route}: ${d.message}`;
26
+ }
27
+ function decodeComputeDiagnostics(registers, names) {
28
+ let out = [], count = Math.min(registers[(8)], (32));
29
+ for (let k = 0; k < count; k++) {
30
+ let at = (16) + k * (8), code = CODES[registers[at + (0)]] ?? null;
31
+ code !== null && out.push({
32
+ code,
33
+ kernel: names(registers[at + (1)], registers[at + (2)]),
34
+ route: ROUTES[registers[at + (4)]] ?? "interpreter",
35
+ ms: registers[at + (5)] / (1e6),
36
+ rows: registers[at + (6)],
37
+ frame: registers[at + (7)],
38
+ message: MESSAGES[code]
39
+ });
40
+ }
41
+ return out;
42
+ }
43
+ var ComputeMonitor = class _ComputeMonitor {
44
+ constructor(exports, memory) {
45
+ this.exports = exports;
46
+ this.memory = memory;
47
+ this.names = /* @__PURE__ */ new Map();
48
+ this.kernels = /* @__PURE__ */ new Map();
49
+ this.levels = /* @__PURE__ */ new Map();
50
+ this.view = new Uint32Array(0);
51
+ this.readout = { budgetMs: 0, spentMs: 0, deferred: 0, stopped: 0 };
52
+ this.nameOf = (space, binding) => this.names.get(keyOf(space, binding)) ?? null;
53
+ this.onBound = null;
54
+ }
55
+ get last() {
56
+ return this.readout;
57
+ }
58
+ static bind(symbols, memory) {
59
+ for (let name of ENGINE_COMPUTE_EXPORT_NAMES) if (typeof symbols[name] != "function") return null;
60
+ return new _ComputeMonitor(symbols, memory);
61
+ }
62
+ bound(space, binding, kernel, priority) {
63
+ let key = keyOf(space, binding);
64
+ this.names.set(key, kernel), this.kernels.set(key, [space, binding, kernel]), this.levels.set(key, 0), this.prioritise(space, binding, priority), this.onBound?.(space, binding, kernel);
65
+ }
66
+ unbound(space, binding) {
67
+ let key = keyOf(space, binding);
68
+ this.names.delete(key), this.kernels.delete(key), this.levels.delete(key);
69
+ }
70
+ boundKernels() {
71
+ return this.kernels.values();
72
+ }
73
+ prioritise(space, binding, priority) {
74
+ let key = keyOf(space, binding);
75
+ (this.levels.get(key) ?? 0) !== priority && this.exports.engine_compute_priority(space, binding, priority) >= 0 && this.levels.set(key, priority);
76
+ }
77
+ frame(tier, frameMicros, sink) {
78
+ this.exports.engine_compute_frame(Math.min(Math.max(Math.trunc(tier), 0), (2)), Math.max(Math.trunc(frameMicros), 0));
79
+ let at = this.exports.engine_compute_registers();
80
+ if (at === 0) return;
81
+ let buffer = this.memory.buffer;
82
+ (this.view.buffer !== buffer || this.view.byteOffset !== at) && (this.view = new Uint32Array(buffer, at, COMPUTE_REGISTER_WORDS));
83
+ let registers = this.view, readout = this.readout;
84
+ if (readout.budgetMs = registers[(1)] / (1e6), readout.spentMs = registers[(2)] / (1e6), readout.deferred = registers[(5)], readout.stopped = registers[(6)], registers[(8)] === 0) return;
85
+ let found = decodeComputeDiagnostics(registers, this.nameOf);
86
+ this.exports.engine_compute_clear();
87
+ for (let diagnostic of found) sink(diagnostic);
88
+ }
89
+ };
90
+
91
+ // src/game/kernel/events.ts
92
+ var TRUE_BITS = 4294967295, channels = /* @__PURE__ */ new Map(), currentRow = -1;
93
+ function setEmitRow(row) {
94
+ currentRow = row;
95
+ }
96
+ function emitRow() {
97
+ return currentRow;
98
+ }
99
+ var EventChannel = class {
100
+ constructor(name, fields, capacity) {
101
+ this.name = name;
102
+ this.fields = fields;
103
+ this.capacity = capacity;
104
+ this.count = 0;
105
+ this.lost = 0;
106
+ this.at = 0;
107
+ if (this.names = Object.keys(fields), this.kinds = this.names.map((n) => fields[n]), this.names.length > 8) throw new GameError("invalid_argument", `events carry at most ${8} fields`);
108
+ this.ring = new Uint32Array(capacity * 10), this.floats = new Float32Array(this.ring.buffer), this.ints = new Int32Array(this.ring.buffer);
109
+ let event = {}, channel = this;
110
+ Object.defineProperty(event, "row", { get: () => channel.ring[channel.at + 1], enumerable: true }), this.names.forEach((name2, k) => {
111
+ let word = 2 + k, kind = this.kinds[k];
112
+ Object.defineProperty(event, name2, {
113
+ get: () => kind === "f32" ? channel.floats[channel.at + word] : kind === "i32" ? channel.ints[channel.at + word] : kind === "bool" ? channel.ring[channel.at + word] !== 0 : channel.ring[channel.at + word],
114
+ enumerable: true
115
+ });
116
+ }), this.event = Object.freeze(event);
117
+ }
118
+ get pending() {
119
+ return this.count;
120
+ }
121
+ get dropped() {
122
+ return this.lost;
123
+ }
124
+ emit(payload) {
125
+ let values = payload;
126
+ if (this.count >= this.capacity) {
127
+ this.lost++;
128
+ return;
129
+ }
130
+ let at = this.count * 10;
131
+ this.ring[at + 1] = currentRow >>> 0;
132
+ for (let k = 0; k < this.names.length; k++) {
133
+ let value = values[this.names[k]], word = at + 2 + k, kind = this.kinds[k];
134
+ kind === "f32" ? this.floats[word] = value : kind === "bool" ? this.ring[word] = value ? (4294967295) : 0 : this.ring[word] = value >>> 0;
135
+ }
136
+ this.count++;
137
+ }
138
+ accept(source, entry) {
139
+ if (this.count >= this.capacity) {
140
+ this.lost++;
141
+ return;
142
+ }
143
+ this.ring.set(source.subarray(entry, entry + 10), this.count * 10), this.count++;
144
+ }
145
+ addLost(count) {
146
+ this.lost += count;
147
+ }
148
+ drain(visit) {
149
+ let total = this.count;
150
+ for (let k = 0; k < total; k++)
151
+ this.at = k * 10, visit(this.event);
152
+ return this.count = 0, this.lost = 0, total;
153
+ }
154
+ };
155
+ function events(name, fields, capacity = DEFAULT_EVENT_CAPACITY) {
156
+ if (channels.has(name)) throw new GameError("invalid_argument", `an event channel named ${name} already exists`);
157
+ let channel = new EventChannel(name, fields, capacity);
158
+ return channels.set(name, channel), channel;
159
+ }
160
+ function registerChannel(channel) {
161
+ if (channels.has(channel.name)) throw new GameError("invalid_argument", `an event channel named ${channel.name} already exists`);
162
+ channels.set(channel.name, channel);
163
+ }
164
+ function routeEvents(ring, metas) {
165
+ let count = ring[RING_COUNT], dropped = ring[RING_DROPPED];
166
+ if (!(metas === void 0 || count === 0 && dropped === 0)) {
167
+ for (let k = 0; k < count; k++) {
168
+ let entry = RING_HEADER_WORDS + k * 10, meta = metas[ring[entry]];
169
+ (meta === void 0 ? void 0 : channels.get(meta.name))?.accept(ring, entry);
170
+ }
171
+ if (dropped > 0) for (let meta of metas) channels.get(meta.name)?.addLost(dropped);
172
+ }
173
+ }
174
+
175
+ // src/game/kernel/joins.ts
176
+ var NO_REF = 4294967295;
177
+ function symbol2(name) {
178
+ return symbol(name);
179
+ }
180
+ function pickRows(n, when, seed, tick, weight) {
181
+ throw new GameError("unsupported_feature", "pickRows() runs inside compiled kernels; build the game (cimplify build or cimplify dev) so the kernel has bytecode");
182
+ }
183
+ function list(kind, capacity) {
184
+ if (!Number.isInteger(capacity) || capacity < 1 || capacity > DATA_LIST_MAX) throw new GameError("invalid_argument", `lists hold 1..${DATA_LIST_MAX} elements per row`);
185
+ return Object.freeze({ at: "u32", len: "u32" });
186
+ }
187
+ var pools = /* @__PURE__ */ new WeakMap(), poolEngine = null, WORD_BYTES = 4;
188
+ function setPoolEngine(engine) {
189
+ poolEngine = engine;
190
+ }
191
+ function poolEntry(table, field, capacity, kind, component) {
192
+ let byField = pools.get(table);
193
+ byField === void 0 && (byField = /* @__PURE__ */ new Map(), pools.set(table, byField));
194
+ let key = `${field}#${component}`, words = table.capacity * capacity, entry = byField.get(key);
195
+ if (entry === void 0 || entry.words !== words || entry.kind !== kind) {
196
+ let engine = table.native ? poolEngine : null, at = engine === null ? 0 : engine.alloc(words * (4));
197
+ if (engine !== null && at === 0) throw new GameError("capacity_exceeded", `engine memory cannot hold the ${field} list pool`);
198
+ at !== 0 && engine !== null && new Uint32Array(engine.memory.buffer, at, words).fill(0), entry = { at, words, kind, array: null }, byField.set(key, entry);
199
+ }
200
+ return entry;
201
+ }
202
+ function view(entry) {
203
+ if (entry.at === 0)
204
+ return entry.array ?? (entry.array = entry.kind === "f32" ? new Float32Array(entry.words) : entry.kind === "i32" ? new Int32Array(entry.words) : new Uint32Array(entry.words)), entry.array;
205
+ let buffer = poolEngine.memory.buffer;
206
+ return (entry.array === null || entry.array.buffer !== buffer) && (entry.array = entry.kind === "f32" ? new Float32Array(buffer, entry.at, entry.words) : entry.kind === "i32" ? new Int32Array(buffer, entry.at, entry.words) : new Uint32Array(buffer, entry.at, entry.words)), entry.array;
207
+ }
208
+ function listPool(table, field, capacity, kind = "u32", component = 0) {
209
+ return view(poolEntry(table, field, capacity, kind === "bool" ? "u32" : kind, component));
210
+ }
211
+ function listPoolAddress(table, field, capacity, kind = "u32", component = 0) {
212
+ let entry = poolEntry(table, field, capacity, kind === "bool" ? "u32" : kind, component);
213
+ return { at: entry.at, words: entry.words };
214
+ }
215
+ function readDataReport(meta, words) {
216
+ let tallies = {};
217
+ (meta.data?.tallies ?? []).forEach((name, k) => {
218
+ tallies[name] = words[k];
219
+ });
220
+ let sites = words[DATA_TALLIES + 5], picks = [], at = DATA_TALLIES + 6 + sites;
221
+ for (let site = 0; site < sites; site++) {
222
+ let n = words[DATA_TALLIES + 6 + site];
223
+ picks.push(words.slice(at, at + n)), at += n;
224
+ }
225
+ let t = DATA_TALLIES;
226
+ return { picks, tallies, commands: { sent: words[t], applied: words[t + 1], dropped: words[t + 2], overflow: words[t + 3] }, unplaced: words[t + 4] };
227
+ }
228
+ var STORAGE = { f32: 0, i32: 1, u32: 2, u8: 3, vec2: 0, vec3: 0, vec4: 0 };
229
+ function column(table, field, component, kernel) {
230
+ if (!(field in table.schema)) throw new GameError("invalid_argument", `kernel ${kernel} reads ${field}, which its table does not have`);
231
+ return { values: table.values(field, component), storage: STORAGE[table.schema[field]] };
232
+ }
233
+ function readList(table, field, capacity, row, kind = "u32") {
234
+ let at = column(table, `${field}.at`, 0, "readList"), len = column(table, `${field}.len`, 0, "readList"), pool = listPool(table, field, capacity, kind), sweep = new ListSweep(0, 0, 0, capacity);
235
+ sweep.bind(table.capacity), sweep.run(at, len, 2, table.count);
236
+ let base = readAs(2, at.storage, at.values[row]), n = readAs(2, len.storage, len.values[row]);
237
+ return base === 0 ? [] : Array.from(pool.subarray(base - 1, base - 1 + n));
238
+ }
239
+ function isTable(value) {
240
+ return typeof value == "object" && value !== null && "schema" in value && "capacity" in value && "values" in value;
241
+ }
242
+ function hasData(meta) {
243
+ if (meta.data !== void 0) return true;
244
+ let slots = meta.slots;
245
+ for (let k = 0; k < slots.length; k++) if (slots[k].table !== void 0) return true;
246
+ return false;
247
+ }
248
+ function dataTables(meta, own, args) {
249
+ let tables = [own];
250
+ for (let t of meta.data?.tables ?? []) {
251
+ let value = args[t.position];
252
+ if (!isTable(value)) throw new GameError("invalid_argument", `kernel ${meta.name} takes the table for ${t.name} as argument ${t.position + 1}; pass an entity table`);
253
+ tables[t.table] = value;
254
+ }
255
+ return tables;
256
+ }
257
+ function scalarArgs(meta, args) {
258
+ let skip = new Set((meta.data?.tables ?? []).map((t) => t.position));
259
+ return args.filter((_, k) => !skip.has(k));
260
+ }
261
+ function dataColumn(meta, tables, slot) {
262
+ if (slot.table === void 0) return null;
263
+ let table = tables[slot.table];
264
+ return slot.pool !== void 0 ? { values: listPool(table, slot.field, slot.pool, slot.kind, slot.component), storage: slot.kind === "f32" ? 0 : slot.kind === "i32" ? 1 : 2 } : column(table, slot.field, slot.component, meta.name);
265
+ }
266
+ function bindData(machine, meta, tables, columns, bound) {
267
+ for (let t of meta.data?.tables ?? []) {
268
+ let table = tables[t.table];
269
+ bound.get(t.table) !== table.capacity && (machine.bindTable(t.table, table.capacity), bound.set(t.table, table.capacity)), machine.setCount(t.table, table.count);
270
+ }
271
+ meta.slots.forEach((slot, k) => {
272
+ slot.pool !== void 0 && bound.get(-1 - k) !== columns[k].values.length && (machine.bindPool(k, columns[k].values.length), bound.set(-1 - k, columns[k].values.length));
273
+ });
274
+ }
275
+ function reportData(machine, meta) {
276
+ let tallies = {};
277
+ return (meta.data?.tallies ?? []).forEach((name, k) => {
278
+ tallies[name] = machine.tallies[k];
279
+ }), {
280
+ picks: Array.from({ length: meta.data?.picks ?? 0 }, (_, k) => machine.pickRows(k).slice()),
281
+ tallies,
282
+ commands: { ...machine.stats },
283
+ unplaced: machine.unplaced
284
+ };
285
+ }
286
+ var bits = new Uint32Array(1), floats = new Float32Array(bits.buffer), Queue = class extends EventChannel {
287
+ constructor(name, fields, table) {
288
+ super(name, fields, table.capacity);
289
+ this.table = table;
290
+ this.overflow = 0;
291
+ for (let field of Object.keys(fields))
292
+ if (!(field in table.schema)) throw new GameError("invalid_argument", `queue ${name} needs a ${field} column in its table`);
293
+ }
294
+ accept(source, entry) {
295
+ let table = this.table;
296
+ if (table.count >= table.capacity) {
297
+ this.overflow++;
298
+ return;
299
+ }
300
+ let row = table.spawn();
301
+ this.names.forEach((name, k) => {
302
+ let raw = source[entry + 2 + k], values = table.values(name), kind = this.kinds[k];
303
+ kind === "f32" ? (bits[0] = raw, values[row] = floats[0]) : kind === "i32" ? values[row] = raw | 0 : kind === "bool" ? values[row] = raw !== 0 ? 1 : 0 : values[row] = raw >>> 0;
304
+ });
305
+ }
306
+ emit(payload) {
307
+ let table = this.table;
308
+ if (table.count >= table.capacity) {
309
+ this.overflow++;
310
+ return;
311
+ }
312
+ let row = table.spawn(), values = payload;
313
+ for (let name of this.names) {
314
+ let value = values[name];
315
+ table.values(name)[row] = typeof value == "boolean" ? value ? 1 : 0 : value;
316
+ }
317
+ }
318
+ push(payload) {
319
+ this.emit(payload);
320
+ }
321
+ get dropped() {
322
+ return super.dropped + this.overflow;
323
+ }
324
+ clear() {
325
+ this.table.count = 0, this.overflow = 0;
326
+ }
327
+ };
328
+ function queue(name, fields, table) {
329
+ let q = new Queue(name, fields, table);
330
+ return registerChannel(q), q;
331
+ }
332
+
333
+ // src/game/kernel/wide.ts
334
+ var MASK64 = (1n << 64n) - 1n, MASK32 = 0xffffffffn;
335
+ function f64(x) {
336
+ return typeof x == "bigint" ? Number(BigInt.asUintN(64, x)) : typeof x == "boolean" ? x ? 1 : 0 : x;
337
+ }
338
+ function u64(x) {
339
+ return typeof x == "bigint" ? BigInt.asUintN(64, x) : typeof x == "boolean" ? x ? 1n : 0n : toUint64(x);
340
+ }
341
+ function toU32(x) {
342
+ return typeof x == "bigint" ? Number(BigInt.asUintN(64, x) & MASK32) : typeof x == "boolean" ? x ? 1 : 0 : toUint32(x);
343
+ }
344
+ function f64Bits(lo, hi) {
345
+ return joinF64(lo, hi);
346
+ }
347
+ function u64Words(lo, hi) {
348
+ return joinU64(lo, hi);
349
+ }
350
+ var argView = new Float64Array(1), argHalves = new Uint32Array(argView.buffer);
351
+ function writeWideArg(words, at, kind, value) {
352
+ if (kind === "u64") {
353
+ let v = typeof value == "bigint" ? BigInt.asUintN(64, value) : toUint64(Number(value));
354
+ return words[at] = Number(v & MASK32), words[at + 1] = Number(v >> 32n), at + 2;
355
+ }
356
+ argView[0] = typeof value == "bigint" ? Number(value) : value;
357
+ let nan = Number.isNaN(argView[0]);
358
+ return words[at] = nan ? 0 : argHalves[0], words[at + 1] = nan ? 2146959360 : argHalves[1], at + 2;
359
+ }
360
+ function width(x) {
361
+ return typeof x == "bigint" ? 64 : 32;
362
+ }
363
+ function big(x) {
364
+ return typeof x == "bigint" ? BigInt.asUintN(64, x) : BigInt(x >>> 0);
365
+ }
366
+ function back(like, v) {
367
+ return typeof like == "bigint" ? v & MASK64 : Number(v & MASK32);
368
+ }
369
+ function ones(n, bits2) {
370
+ return n >= bits2 ? (1n << BigInt(bits2)) - 1n : (1n << BigInt(Math.max(0, n))) - 1n;
371
+ }
372
+ function popcnt(x) {
373
+ let v = big(x), n = 0;
374
+ for (; v > 0n; )
375
+ n += Number(v & 1n), v >>= 1n;
376
+ return n;
377
+ }
378
+ function clz(x) {
379
+ let bits2 = width(x), v = big(x), n = 0;
380
+ for (let k = bits2 - 1; k >= 0 && (v >> BigInt(k) & 1n) === 0n; k--) n++;
381
+ return n;
382
+ }
383
+ function ctz(x) {
384
+ let bits2 = width(x), v = big(x), n = 0;
385
+ for (let k = 0; k < bits2 && (v >> BigInt(k) & 1n) === 0n; k++) n++;
386
+ return n;
387
+ }
388
+ function rotl(x, by) {
389
+ let bits2 = width(x), s = BigInt(by & bits2 - 1), v = big(x);
390
+ return back(x, (v << s | v >> BigInt(bits2) - s) & ones(bits2, bits2));
391
+ }
392
+ function rotr(x, by) {
393
+ let bits2 = width(x);
394
+ return rotl(x, bits2 - (by & bits2 - 1) & bits2 - 1);
395
+ }
396
+ function bitExtract(x, offset, count) {
397
+ let bits2 = width(x);
398
+ return back(x, big(x) >> BigInt(offset & bits2 - 1) & ones(count >>> 0, bits2));
399
+ }
400
+ function bitInsert(base, value, offset, count) {
401
+ let bits2 = width(base), at = BigInt(offset & bits2 - 1), field = ones(count >>> 0, bits2) << at;
402
+ return back(base, (big(base) & ~field | big(value) << at & field) & ones(bits2, bits2));
403
+ }
404
+ function spread(v, bits2, step) {
405
+ let out = 0n;
406
+ for (let k = 0; k < bits2; k++) out |= (v >> BigInt(k) & 1n) << BigInt(k * step);
407
+ return out;
408
+ }
409
+ function gather(v, bits2, step, at) {
410
+ let out = 0n;
411
+ for (let k = 0; k < bits2; k++) out |= (v >> BigInt(k * step + at) & 1n) << BigInt(k);
412
+ return Number(out);
413
+ }
414
+ function morton2(x, y) {
415
+ return Number(spread(big(x), 16, 2) | spread(big(y), 16, 2) << 1n);
416
+ }
417
+ function morton3(x, y, z) {
418
+ return Number(spread(big(x), 10, 3) | spread(big(y), 10, 3) << 1n | spread(big(z), 10, 3) << 2n);
419
+ }
420
+ function morton2Wide(x, y) {
421
+ return spread(big(x), 32, 2) | spread(big(y), 32, 2) << 1n;
422
+ }
423
+ function morton3Wide(x, y, z) {
424
+ return spread(big(x), 21, 3) | spread(big(y), 21, 3) << 1n | spread(big(z), 21, 3) << 2n;
425
+ }
426
+ function unmorton2(code) {
427
+ let bits2 = typeof code == "bigint" ? 32 : 16, v = big(code);
428
+ return { x: gather(v, bits2, 2, 0), y: gather(v, bits2, 2, 1) };
429
+ }
430
+ function unmorton3(code) {
431
+ let bits2 = typeof code == "bigint" ? 21 : 10, v = big(code);
432
+ return { x: gather(v, bits2, 3, 0), y: gather(v, bits2, 3, 1), z: gather(v, bits2, 3, 2) };
433
+ }
434
+
435
+ // src/game/fluid/engine.ts
436
+ var FLUID_DESC_FLOATS = 18, FLUID_SURFACE_FLOATS = 17, FLUID_EMITTER_FLOATS = 12, FLUID_COLLIDER_FLOATS = 19, FLUID_COLLIDER_VOLUME = 18, FLUID_MAX_COLLIDERS = 64;
437
+ var FLUID_MAX_EMITTERS = 8, FLUID_FORCE_WORDS = 6, FLUID_FORCE_FLOATS = (64) * (6), FLUID_CAP_SIMULATION = 1, FLUID_CAP_SURFACE = 2, ENGINE_FLUID_EXPORT_NAMES = [
438
+ "engine_fluid_caps",
439
+ "engine_fluid_create",
440
+ "engine_fluid_destroy",
441
+ "engine_fluid_parameters",
442
+ "engine_fluid_surface",
443
+ "engine_fluid_emitter",
444
+ "engine_fluid_colliders",
445
+ "engine_fluid_step",
446
+ "engine_fluid_pause",
447
+ "engine_fluid_clear",
448
+ "engine_fluid_count",
449
+ "engine_fluid_forces",
450
+ "engine_fluid_volume",
451
+ "engine_fluid_volume_info",
452
+ "engine_fluid_volumes_clear"
453
+ ], NULL = 0, F32_BYTES = 4, U32_BYTES = 4, MICROS = 1e6, SCRATCH_FLOATS = (19) * (64) + FLUID_FORCE_FLOATS;
454
+ function engineFluidExports(runtime) {
455
+ let symbols = runtime.symbols;
456
+ return ENGINE_FLUID_EXPORT_NAMES.every((name) => typeof symbols[name] == "function") ? symbols : null;
457
+ }
458
+ var EngineFluids = class {
459
+ constructor(runtime, exports, render) {
460
+ this.runtime = runtime;
461
+ this.exports = exports;
462
+ this.render = render;
463
+ this.pointer = (0);
464
+ this.buffer = null;
465
+ this.floats = new Float32Array(0);
466
+ this.caps = exports.engine_fluid_caps();
467
+ }
468
+ scratch() {
469
+ if (this.pointer === (0) && (this.pointer = this.runtime.exports.engine_alloc(SCRATCH_FLOATS * (4), COLUMN_ALIGN), this.pointer === (0)))
470
+ throw new GameError("capacity_exceeded", "engine memory cannot hold fluid parameters");
471
+ let buffer = this.runtime.memory.buffer;
472
+ return buffer !== this.buffer && (this.buffer = buffer, this.floats = new Float32Array(buffer)), this.pointer;
473
+ }
474
+ put(values, count = values.length) {
475
+ let pointer = this.scratch();
476
+ return this.floats.set(values.subarray(0, count), pointer >>> 2), pointer;
477
+ }
478
+ check(code, what) {
479
+ if (!(code >= 0)) throw new GameError("invalid_argument", `the engine refused the fluid ${what} (${code})`);
480
+ return code;
481
+ }
482
+ create(desc, surface) {
483
+ let descPointer = this.put(desc), surfacePointer = descPointer + (18) * (4);
484
+ return this.floats.set(surface, surfacePointer >>> 2), this.check(this.exports.engine_fluid_create(this.render(), descPointer, surfacePointer), "description");
485
+ }
486
+ destroy(fluid) {
487
+ this.exports.engine_fluid_destroy(this.render(), fluid);
488
+ }
489
+ parameters(fluid, desc) {
490
+ this.check(this.exports.engine_fluid_parameters(this.render(), fluid, this.put(desc)), "parameters");
491
+ }
492
+ surface(fluid, surface) {
493
+ this.check(this.exports.engine_fluid_surface(this.render(), fluid, this.put(surface)), "surface");
494
+ }
495
+ emitter(fluid, index, emitter) {
496
+ this.check(this.exports.engine_fluid_emitter(this.render(), fluid, index, this.put(emitter)), "emitter");
497
+ }
498
+ colliders(fluid, colliders, count) {
499
+ this.check(this.exports.engine_fluid_colliders(this.render(), fluid, this.put(colliders, count * (19)), count), "colliders");
500
+ }
501
+ step(fluid, seconds) {
502
+ this.exports.engine_fluid_step(this.render(), fluid, Math.max(0, Math.round(seconds * (1e6))));
503
+ }
504
+ pause(fluid, paused) {
505
+ this.exports.engine_fluid_pause(this.render(), fluid, paused ? 1 : 0);
506
+ }
507
+ clear(fluid) {
508
+ this.exports.engine_fluid_clear(this.render(), fluid);
509
+ }
510
+ count(fluid) {
511
+ return Math.max(0, this.exports.engine_fluid_count(this.render(), fluid));
512
+ }
513
+ forces(fluid, out) {
514
+ let pointer = this.scratch() + (19) * (64) * (4);
515
+ if (!(this.exports.engine_fluid_forces(this.render(), fluid, pointer) >= 0)) return;
516
+ let at = pointer >>> 2;
517
+ for (let i = 0; i < FLUID_FORCE_FLOATS; i++) out[i] = this.floats[at + i];
518
+ }
519
+ volume(fluid, positions, indices, resolution, padding) {
520
+ let vertices = Math.floor(positions.length / 3), triangles = Math.floor(indices.length / 3), positionBytes = vertices * 3 * (4), indexBytes = triangles * 3 * (4), bytes = positionBytes + indexBytes, block = this.runtime.exports.engine_alloc(bytes, COLUMN_ALIGN);
521
+ if (block === (0)) throw new GameError("capacity_exceeded", "engine memory cannot hold the collider mesh");
522
+ try {
523
+ let memory = this.runtime.memory.buffer;
524
+ new Float32Array(memory, block, vertices * 3).set(positions.subarray(0, vertices * 3)), new Uint32Array(memory, block + positionBytes, triangles * 3).set(indices.subarray(0, triangles * 3));
525
+ let index = this.check(
526
+ this.exports.engine_fluid_volume(this.render(), fluid, block, vertices, block + positionBytes, triangles, resolution, padding),
527
+ "collider mesh"
528
+ ), info = this.scratch();
529
+ this.check(this.exports.engine_fluid_volume_info(this.render(), fluid, index, info), "volume");
530
+ let at = info >>> 2, f = this.floats;
531
+ return { index, half: [f[at + 3], f[at + 4], f[at + 5]], centre: [f[at + 6], f[at + 7], f[at + 8]] };
532
+ } finally {
533
+ this.runtime.exports.engine_free(block, bytes, COLUMN_ALIGN);
534
+ }
535
+ }
536
+ clearVolumes(fluid) {
537
+ this.exports.engine_fluid_volumes_clear(this.render(), fluid);
538
+ }
539
+ };
540
+
541
+ // src/game/chemistry/engine.ts
542
+ var CHEMISTRY_EXPORT_NAMES = [
543
+ "engine_chemistry_open",
544
+ "engine_chemistry_close",
545
+ "engine_chemistry_define",
546
+ "engine_chemistry_find",
547
+ "engine_chemistry_catalog",
548
+ "engine_chemistry_text",
549
+ "engine_chemistry_counts",
550
+ "engine_chemistry_species_info",
551
+ "engine_chemistry_reaction_info",
552
+ "engine_chemistry_grid_open",
553
+ "engine_chemistry_grid_close",
554
+ "engine_chemistry_grid_step",
555
+ "engine_chemistry_grid_paint",
556
+ "engine_chemistry_grid_set",
557
+ "engine_chemistry_grid_heat",
558
+ "engine_chemistry_grid_power",
559
+ "engine_chemistry_grid_columns",
560
+ "engine_chemistry_grid_colours",
561
+ "engine_chemistry_grid_events",
562
+ "engine_chemistry_grid_clear_events",
563
+ "engine_chemistry_grid_watch",
564
+ "engine_chemistry_grid_threshold",
565
+ "engine_chemistry_grid_unthreshold",
566
+ "engine_chemistry_grid_fired",
567
+ "engine_chemistry_grid_stats",
568
+ "engine_chemistry_grid_probe",
569
+ "engine_chemistry_grid_save",
570
+ "engine_chemistry_grid_saved",
571
+ "engine_chemistry_grid_load",
572
+ "engine_chemistry_vessel_open",
573
+ "engine_chemistry_vessel_close",
574
+ "engine_chemistry_vessel_add",
575
+ "engine_chemistry_vessel_take",
576
+ "engine_chemistry_vessel_heat",
577
+ "engine_chemistry_vessel_power",
578
+ "engine_chemistry_vessel_step",
579
+ "engine_chemistry_vessel_vent",
580
+ "engine_chemistry_vessel_state",
581
+ "engine_chemistry_particles_open",
582
+ "engine_chemistry_particles_close",
583
+ "engine_chemistry_particles_spawn",
584
+ "engine_chemistry_particles_step",
585
+ "engine_chemistry_particles_columns",
586
+ "engine_chemistry_particles_events"
587
+ ], CHEMISTRY_NATURE_WORDS = 8, CHEMISTRY_BOX_WORDS = 6, CHEMISTRY_SPECIES_WORDS = 16, CHEMISTRY_REACTION_WORDS = 24, CHEMISTRY_COLUMNS = 16, CHEMISTRY_STATS_WORDS = 16, CHEMISTRY_PROBE_WORDS = 16, CHEMISTRY_EVENT_HEADER = 2, CHEMISTRY_EVENT_WORDS = 4, CHEMISTRY_VESSEL_SLOTS = 16, CHEMISTRY_VESSEL_WORDS = 36, CHEMISTRY_ATMOSPHERE = 0, CHEMISTRY_VACUUM = 4294967295, CHEMISTRY_REFUSED = 65536, CHEMISTRY_SLOTS = 4, CHEMISTRY_TQ = 16, CHEMISTRY_UNSET = 4294967295;
588
+ function bindChemistryEngine(symbols, memory) {
589
+ for (let name of CHEMISTRY_EXPORT_NAMES) if (typeof symbols[name] != "function") return null;
590
+ return typeof symbols.engine_alloc != "function" || typeof symbols.engine_free != "function" ? null : { exports: symbols, memory };
591
+ }
592
+
593
+ // src/game/scenery/port.ts
594
+ var SCENERY_REQUEST_SLOTS = 8, SCENERY_REGISTER_WORDS = 20;
595
+ var SCENERY_REGISTER = {
596
+ chunks: 0,
597
+ resident: 1,
598
+ requested: 2,
599
+ installed: 3,
600
+ evicted: 4,
601
+ deferred: 5,
602
+ failed: 6,
603
+ installedKib: 7,
604
+ residentSplats: 8,
605
+ drawnSplats: 9,
606
+ listedPages: 10,
607
+ poolCapacity: 11,
608
+ poolFreePages: 12,
609
+ tier: 13,
610
+ updates: 14,
611
+ heroSplats: 15,
612
+ heroShed: 16,
613
+ standIn: 17,
614
+ deformedSplats: 18
615
+ };
616
+
617
+ // src/game/world/port.ts
618
+ var STREAM_REGISTER = {
619
+ live: 0,
620
+ loading: 1,
621
+ waiting: 2,
622
+ failed: 3,
623
+ inflight: 4,
624
+ installed: 5,
625
+ installedBytes: 6,
626
+ admitted: 7,
627
+ evicted: 8,
628
+ residentKib: 9,
629
+ poolKib: 10,
630
+ proxyKib: 11,
631
+ sourceKib: 12,
632
+ starved: 13,
633
+ frames: 14,
634
+ totalInstalls: 15
635
+ }, STREAM_PACK_REQUESTS = 16, STREAM_PACK_RELEASES = 17, STREAM_MAX_PACK_REQUESTS = 16, STREAM_MAX_PACK_RELEASES = 16, STREAM_REQUEST_LIST = 18, STREAM_RELEASE_LIST = (18) + (16), STREAM_REGISTER_BLOCK_WORDS = STREAM_RELEASE_LIST + (16), STREAM_LAZY_PACKS_FLAG = 256, STREAM_PRIORITY_SHIFT = 24, STREAM_PRIORITY_NOW = 0, STREAM_PRIORITY_SOON = 1, STREAM_START_PACK = 0, AssetPriority = { now: (0), soon: (1) }, STREAM_PACK_MASK = (1 << (24)) - 1, STREAM_EYE_FLOATS = 6, STREAM_ACTOR_FLOATS = 2, STREAM_COLLIDER_FLOATS = 8, STREAM_OP_INSERT = 1, TIER_INDEX = { low: 0, mid: 1, high: 2 }, STREAM_PACK_CONTENDED = -6;
636
+
637
+ // src/game/backends/engine/render-abi.ts
638
+ var RENDER_KERNEL_INSTANCES_FEATURE = "render_kernel_instances_1";
639
+ var MEDIA_VOLUME_FEATURE = "media_volume_1";
640
+ var RENDER_FEED_POSE_FEATURE = "render_feed_pose_1";
641
+ var COMPARE_FUNCTIONS = [
642
+ "never",
643
+ "less",
644
+ "equal",
645
+ "lessEqual",
646
+ "greater",
647
+ "notEqual",
648
+ "greaterEqual",
649
+ "always"
650
+ ], BLEND_EQUATIONS = ["add", "subtract", "reverseSubtract", "min", "max"], BLEND_FACTORS = [
651
+ "zero",
652
+ "one",
653
+ "srcColor",
654
+ "oneMinusSrcColor",
655
+ "srcAlpha",
656
+ "oneMinusSrcAlpha",
657
+ "dstColor",
658
+ "oneMinusDstColor",
659
+ "dstAlpha",
660
+ "oneMinusDstAlpha",
661
+ "srcAlphaSaturate"
662
+ ], STENCIL_OPERATIONS = [
663
+ "keep",
664
+ "zero",
665
+ "replace",
666
+ "increment",
667
+ "decrement",
668
+ "invert",
669
+ "incrementWrap",
670
+ "decrementWrap"
671
+ ];
672
+ var EMITTER_SHAPES = ["point", "sphere", "cone", "box", "disc"], EMITTER_COLLISIONS = ["none", "plane", "depth"];
673
+ var FOG_MODES = ["linear", "exp2", "height"];
674
+ var BUFFER_OWNER_CAPABILITIES = {
675
+ 12: 4194304,
676
+ 13: 8388608,
677
+ 14: -2147483648
678
+ }, STAT_GPU_LAST_NS = 17, STAT_GPU_P50_NS = 18, STAT_GPU_P95_NS = 19, STAT_GPU_BYTES_LOW = 20, STAT_GPU_BYTES_HIGH = 21;
679
+ var STAT_THERMAL_TIER = 23, STAT_PARTICLES_ALIVE = 24, STAT_RAW_DISPATCHES = 25, STAT_RAW_GPU_NS = 26, STAT_RAW_DISABLED = 27, STAT_TRANSPARENT_SORTED = 28, STAT_TEXT_GLYPHS = 29, STAT_DRAW_CALLS = 32;
680
+ var STAT_TRIANGLES = 33, OP_SET_RENDER_ORDER = 31, OP_EMIT = 32, OP_SET_EMITTER_RATE = 33, OP_MARK_EMITTER = 34, OP_DESTROY_EMITTER = 35, OP_RAW_DISPATCH = 36, OP_RAW_COPY = 37, OP_RAW_DESTROY_BUFFER = 38, OP_RAW_MARK_BUFFER = 39, OP_SET_SHADOW = 40, OP_SET_MATERIAL_WORD = 41, OP_RAW_DRAW = 42, OP_RAW_DESTROY_TEXTURE = 43, OP_RAW_MARK_TEXTURE = 44, OP_RAW_COPY_TEXTURE = 45, OP_SET_LOD = 46, OP_CLEAR_EMITTER = 50, OP_SET_WEATHER = 51, OP_SET_TIME_OF_DAY = 52, OP_MARK_TEXTURE_REGION = 54, OP_SET_EFFECT = 55, OP_SET_EFFECT_TEXTURE = 60, OP_SET_VOLUMETRICS = 61, TEXTURE_FORMAT_R8 = 3, TEXTURE_FORMAT_RG8 = 4, TEXTURE_FORMAT_R16F = 5, TEXTURE_FORMAT_RG16F = 6, TEXTURE_FORMAT_R32F = 7, TEXTURE_FORMAT_RG32F = 8, TEXTURE_FORMAT_R8UI = 9, TEXTURE_FORMAT_R16UI = 10, TEXTURE_FORMAT_R32UI = 11, TEXTURE_FORMAT_RG32UI = 12, TEXTURE_FORMAT_RGBA8UI = 13, TEXTURE_FORMAT_RGBA16UI = 14, TEXTURE_FORMAT_RGBA32UI = 15, TEXTURE_FORMAT_R32I = 16, TEXTURE_FORMAT_RGBA32I = 17, TEXTURE_KIND_2D_ARRAY = 3, TEXTURE_KIND_3D = 4, TEXTURE_KIND_EXTERNAL = 5;
681
+ var TEXTURE_ENCODE_AUTO = 1, TEXTURE_ENCODE_ASTC_4X4 = 2, TEXTURE_ENCODE_BC7 = 3, TARGET_COLORS = 7, TARGET_KIND = 5, TARGET_LAYERS = 6, TARGET_SAMPLED_DEPTH = 8, TARGET_TEXTURES = 16, TARGET_MAX_COLORS = 4, TARGET_KIND_2D = 0, TARGET_KIND_CUBE = 1, TARGET_KIND_ARRAY = 2, PASS_SLICE = 11, PASS_FLAGS = 12, PASS_PLANE = 13, PASS_FLAG_CUBE_FACE = 1, PASS_FLAG_REFLECT = 2, PASS_FLAG_ONCE = 4, ENV_TONE_CURVE = 29, ENV_GI = 30, ENV_GI_INTENSITY = 31, ENV_GI_SPACING = 32, ENV_GI_SUN_ANGLE = 33, GI_MODES = ["off", "field", "full"], EFFECT_LENS_FLARE = 20;
682
+ var MAX_CHAIN_EFFECTS = 64, POST_EFFECT_TEXTURES = 4, OP_SET_CLIP_ADDITIVE = 47, OP_SET_CLIP_MASK = 48, OP_ANIMATION = 53, ANIM_SET_TIME = 1, ANIM_SET_SPEED = 2, ANIM_SET_LOOP = 3, ANIM_SET_PAUSED = 4, ANIM_CROSSFADE = 5, ANIM_SET_SYNC = 6, ANIM_SET_RANGE = 7, ANIM_SET_EVENTS = 8, ANIM_SET_BLEND = 9, ANIM_SET_IK_TARGET = 10, ANIM_SET_IK_POLE = 11;
683
+ var ANIM_FADE = 13, ANIM_DESTROY = 14, ANIM_INERTIALIZE = 15, ANIM_SET_SYNC_MODE = 16, ANIM_CREATE_MASK = 32, ANIM_SET_CLIP_EVENTS = 33, ANIM_CREATE_BLEND = 34, ANIM_CREATE_IK = 35, ANIM_RETARGET = 36, ANIM_HUMANOID = 37, ANIM_CLIP_INFO = 38, ANIM_ROOT_MOTION = 39, ANIM_BAKE_RETARGET = 45, ANIM_SET_SYNC_MARKERS = 46;
684
+ var ANIM_SET_LOD = 47, NODE_POSE_FLOATS = 7, ROOT_MOTION_XZ = 1, ROOT_MOTION_Y = 2, ROOT_MOTION_YAW = 4, ROOT_MOTION_APPLY = 8, ANIM_KIND_MASK = 0, ANIM_KIND_BLEND = 1, ANIM_KIND_IK = 2, ANIM_KIND_RETARGET = 3, ANIM_KIND_ROOT_MOTION = 4, ANIM_EVENT_WORDS = 4, ANIM_MAX_EVENTS = 256, ANIM_ACTION_WORDS = 4, ANIM_ACTION_RUNNING = 1, ANIM_ACTION_PAUSED = 2, ANIM_ACTION_FINISHED = 4, ANIMATION_BUFFER_EVENTS = 0, ANIMATION_BUFFER_ACTIONS = 1, ANIMATION_BUFFER_ROOT_MOTION = 2, TONE_MAPPINGS = ["none", "linear", "reinhard", "aces", "agx", "neutral", "cineon", "custom"], MATERIAL_SLOTS = [
685
+ "map",
686
+ "normalMap",
687
+ "roughnessMap",
688
+ "metalnessMap",
689
+ "emissiveMap",
690
+ "aoMap",
691
+ "clearcoatMap",
692
+ "clearcoatRoughnessMap",
693
+ "clearcoatNormalMap",
694
+ "sheenColorMap",
695
+ "sheenRoughnessMap",
696
+ "specularIntensityMap",
697
+ "specularColorMap",
698
+ "transmissionMap"
699
+ ], CORE_MATERIAL_SLOTS = 6, RENDER_CORE_EXPORTS = [
700
+ "engine_render_create",
701
+ "engine_render_destroy",
702
+ "engine_render_registers",
703
+ "engine_render_desc",
704
+ "engine_render_commands",
705
+ "engine_render_capabilities",
706
+ "engine_render_flush",
707
+ "engine_render_create_geometry",
708
+ "engine_render_commit_geometry",
709
+ "engine_render_create_texture",
710
+ "engine_render_decode_texture",
711
+ "engine_render_create_material",
712
+ "engine_render_create_node",
713
+ "engine_render_create_target",
714
+ "engine_render_create_chain",
715
+ "engine_render_create_pass",
716
+ "engine_render_set_environment",
717
+ "engine_render_load_model",
718
+ "engine_render_install_shaders",
719
+ "engine_render_instantiate",
720
+ "engine_render_find_node",
721
+ "engine_render_play_clip",
722
+ "engine_render_buffer",
723
+ "engine_render_sync",
724
+ "engine_render_animate",
725
+ "engine_render_frame",
726
+ "engine_render_stats",
727
+ "engine_render_node_matrix"
728
+ ], RENDER_FEATURE_EXPORTS = {
729
+ engine_render_create_emitter: 1024,
730
+ engine_render_raw_buffer: 8192,
731
+ engine_render_raw_pipeline: 8192,
732
+ engine_render_raw_bindings: 8192,
733
+ engine_render_raw_read: 8192,
734
+ engine_render_raw_poll: 8192,
735
+ engine_render_raw_texture: 131072,
736
+ engine_render_raw_sampler: 131072,
737
+ engine_render_raw_read_texture: 131072,
738
+ engine_render_load_font: 1048576,
739
+ engine_render_set_text: 1048576,
740
+ engine_render_set_text_style: 1048576,
741
+ engine_render_text_bounds: 1048576,
742
+ engine_render_raycast: 2097152,
743
+ engine_render_set_chain_shader: 256,
744
+ engine_render_animation: -2147483648,
745
+ engine_render_load_clips: -2147483648,
746
+ engine_render_node_poses: -2147483648,
747
+ engine_render_read_target: 32,
748
+ engine_render_texture_object: 32,
749
+ engine_render_reload_model: 128,
750
+ engine_render_reload_texture: 1,
751
+ engine_render_encode_texture: 1
752
+ }, ENGINE_RELOAD_EXPORT_NAMES = ["engine_render_reload_model", "engine_render_reload_texture"], ENGINE_ENCODE_EXPORT_NAMES = ["engine_render_encode_texture"]; [
753
+ ...RENDER_CORE_EXPORTS,
754
+ ...Object.keys(RENDER_FEATURE_EXPORTS)
755
+ ];
756
+
757
+ // src/game/render/vector-surfaces.ts
758
+ var VECTOR_SURFACE_TIERS = { low: 0, mid: 1, high: 2 }, VECTOR_SURFACE_CAPS = { low: 4, mid: 8, high: 16 }, VECTOR_SURFACE_EDGES = { low: 512, mid: 1024, high: 2048 };
759
+ function createVectorSurfaceStats() {
760
+ return { cap: 0, live: 0, encoded: 0, unchanged: 0, offscreen: 0, occluded: 0, overCap: 0, droppedEvents: 0 };
761
+ }
762
+
763
+ // src/game/audio/analyser.ts
764
+ var BLACKMAN_A0 = 0.42, BLACKMAN_A1 = 0.5, BLACKMAN_A2 = 0.08, DECIBELS_PER_LOG = 20, BYTE_MAX = 255, BYTE_CENTER = 128, SILENCE = 1e-12;
765
+ function analyserSettings(desc = {}) {
766
+ let fftSize = desc.fftSize ?? DEFAULT_FFT_SIZE;
767
+ if (!Number.isInteger(fftSize) || fftSize < MIN_FFT_SIZE || fftSize > MAX_FFT_SIZE || (fftSize & fftSize - 1) !== 0)
768
+ throw new GameError("invalid_argument", `fftSize must be a power of two from ${MIN_FFT_SIZE} to ${MAX_FFT_SIZE}`);
769
+ let smoothing = desc.smoothing ?? DEFAULT_SMOOTHING;
770
+ if (!(smoothing >= 0 && smoothing <= 1)) throw new GameError("invalid_argument", "smoothing must be between 0 and 1");
771
+ let minDecibels = desc.minDecibels ?? DEFAULT_MIN_DECIBELS, maxDecibels = desc.maxDecibels ?? DEFAULT_MAX_DECIBELS;
772
+ if (!(minDecibels < maxDecibels)) throw new GameError("invalid_argument", "minDecibels must be below maxDecibels");
773
+ return { fftSize, smoothing, minDecibels, maxDecibels };
774
+ }
775
+ var FftAnalyser = class {
776
+ constructor(settings) {
777
+ this.head = 0;
778
+ let n = settings.fftSize;
779
+ this.fftSize = n, this.binCount = n / 2, this.smoothing = settings.smoothing, this.minDecibels = settings.minDecibels, this.maxDecibels = settings.maxDecibels, this.ring = new Float32Array(n), this.real = new Float64Array(n), this.imag = new Float64Array(n), this.window = new Float64Array(n), this.smoothed = new Float64Array(n / 2), this.bitReverse = new Uint32Array(n), this.cos = new Float64Array(n / 2), this.sin = new Float64Array(n / 2);
780
+ for (let i = 0; i < n; i++) {
781
+ let phase = 2 * Math.PI * i / n;
782
+ this.window[i] = (0.42) - (0.5) * Math.cos(phase) + (0.08) * Math.cos(2 * phase);
783
+ }
784
+ let bits2 = Math.log2(n);
785
+ for (let i = 0; i < n; i++) {
786
+ let r = 0;
787
+ for (let b = 0; b < bits2; b++) r |= (i >>> b & 1) << bits2 - 1 - b;
788
+ this.bitReverse[i] = r;
789
+ }
790
+ for (let i = 0; i < n / 2; i++)
791
+ this.cos[i] = Math.cos(-2 * Math.PI * i / n), this.sin[i] = Math.sin(-2 * Math.PI * i / n);
792
+ }
793
+ push(samples, start, count) {
794
+ let ring = this.ring, n = this.fftSize, head = this.head;
795
+ for (let i = 0; i < count; i++)
796
+ ring[head] = samples[start + i], head = head + 1 === n ? 0 : head + 1;
797
+ this.head = head;
798
+ }
799
+ reset() {
800
+ this.ring.fill(0), this.smoothed.fill(0), this.head = 0;
801
+ }
802
+ timeDomain(out) {
803
+ let ring = this.ring, n = Math.min(out.length, this.fftSize), start = this.head + this.fftSize - n, bytes = out instanceof Uint8Array;
804
+ for (let i = 0; i < n; i++) {
805
+ let v = ring[(start + i) % this.fftSize];
806
+ bytes ? out[i] = clampByte((128) * (1 + v)) : out[i] = v;
807
+ }
808
+ }
809
+ frequency(out) {
810
+ this.transform();
811
+ let n = Math.min(out.length, this.binCount), smoothed = this.smoothed;
812
+ if (out instanceof Uint8Array) {
813
+ let scale = (255) / (this.maxDecibels - this.minDecibels);
814
+ for (let i = 0; i < n; i++) out[i] = clampByte((decibels(smoothed[i]) - this.minDecibels) * scale);
815
+ } else
816
+ for (let i = 0; i < n; i++) out[i] = decibels(smoothed[i]);
817
+ }
818
+ transform() {
819
+ let n = this.fftSize, real = this.real, imag = this.imag, ring = this.ring, head = this.head;
820
+ for (let i = 0; i < n; i++) {
821
+ let j = this.bitReverse[i];
822
+ real[j] = ring[(head + i) % n] * this.window[i], imag[j] = 0;
823
+ }
824
+ for (let size = 2; size <= n; size <<= 1) {
825
+ let half = size >>> 1, stride = n / size;
826
+ for (let block = 0; block < n; block += size)
827
+ for (let k = 0; k < half; k++) {
828
+ let wr = this.cos[k * stride], wi = this.sin[k * stride], a = block + k, b = a + half, tr = real[b] * wr - imag[b] * wi, ti = real[b] * wi + imag[b] * wr;
829
+ real[b] = real[a] - tr, imag[b] = imag[a] - ti, real[a] += tr, imag[a] += ti;
830
+ }
831
+ }
832
+ let tau = this.smoothing, inverse = 1 / n, smoothed = this.smoothed;
833
+ for (let i = 0; i < this.binCount; i++) {
834
+ let magnitude = Math.sqrt(real[i] * real[i] + imag[i] * imag[i]) * inverse;
835
+ smoothed[i] = tau * smoothed[i] + (1 - tau) * magnitude;
836
+ }
837
+ }
838
+ };
839
+ function decibels(magnitude) {
840
+ return (20) * Math.log10(magnitude > (1e-12) ? magnitude : (1e-12));
841
+ }
842
+ function clampByte(value) {
843
+ return value <= 0 ? 0 : value >= (255) ? (255) : Math.floor(value);
844
+ }
845
+
846
+ // src/game/reactive/engine.ts
847
+ var REACTIVE_FEATURE = "reactive_fluid_1", REACTIVE_DESC_WORDS = 32, REACTIVE_GRID = 0, REACTIVE_ORIGIN = 3, REACTIVE_CELL = 6, REACTIVE_LIQUID = 7, REACTIVE_LIQUID_KELVIN = 8, REACTIVE_PARCELS = 9, REACTIVE_CONTACT = 10, REACTIVE_COUPLING = 11, REACTIVE_MAX_PAIRS = 12, REACTIVE_SEED_LOW = 13, REACTIVE_SEED_HIGH = 14, REACTIVE_SMOKE = 16, REACTIVE_SMOKE_SPECIES = 4, REACTIVE_GLOW_FROM_K = 20, REACTIVE_GLOW_FULL_K = 21, REACTIVE_SMOKE_FULL = 22, REACTIVE_FLAME_EXTINCTION = 23, REACTIVE_PLUME_FROM_K = 24, HOB_DESC_WORDS = 12, HOB_FIRST = 0, HOB_LAST = 2, HOB_LAYERS = 4, HOB_METAL = 5, HOB_START_K = 6, HOB_PAN_K = 7, HOB_PAN_JOULES = 8, HOB_FLAME_K = 9, HOB_FLAME_JOULES = 10, HOB_FLAME_LAYERS = 11, REACTIVE_REGISTER_WORDS = 96, REACTIVE_TICK_LOW = 0, REACTIVE_TICK_HIGH = 1;
848
+ var REACTIVE_PAIRS = 3, REACTIVE_DROPPED_PAIRS = 4;
849
+ var REACTIVE_VENTED = 7, REACTIVE_RETIRED = 8, REACTIVE_PARTICLES = 9, REACTIVE_FIRED = 10, REACTIVE_PAN_K = 11, REACTIVE_BURNING = 12, REACTIVE_SMOKY = 13, REACTIVE_HOTTEST_K = 14, REACTIVE_PLUME_COUNT = 15, REACTIVE_DIGEST_LOW = 16, REACTIVE_DIGEST_HIGH = 17;
850
+ var REACTIVE_CAPACITY = 21, REACTIVE_LIT = 22, REACTIVE_SECONDS = 23, REACTIVE_PLUMES = 32, REACTIVE_PLUME_WORDS = 8, REACTIVE_MAX_PLUMES = 8, PLUME_CELL = 0, PLUME_KELVIN = 3, PLUME_SMOKE = 4, PLUME_WORLD = 5, REACTIVE_MAX_PREHEAT_TICKS = 4096, REACTIVE_MAX_STEP_SECONDS = 0.1, REACTIVE_MAX_EDGE = 64, ENGINE_REACTIVE_EXPORT_NAMES = [
851
+ "engine_reactive_create",
852
+ "engine_reactive_destroy",
853
+ "engine_reactive_registers",
854
+ "engine_reactive_hob",
855
+ "engine_reactive_lit",
856
+ "engine_reactive_emitter",
857
+ "engine_reactive_preheat",
858
+ "engine_reactive_step",
859
+ "engine_reactive_media",
860
+ "engine_reactive_texels",
861
+ "engine_reactive_positions",
862
+ "engine_reactive_digest"
863
+ ], NULL2 = 0, WORD = 4, NO_MEDIUM = 0, POSITION_FLOATS = 3, FLOAT = new Float32Array(1), BITS = new Uint32Array(FLOAT.buffer), HIGH_BITS = 32n, SCRATCH_WORDS = (32) + (18) + (12), FLUID_AT = (32), EMITTER_AT = (32) + (18);
864
+ function engineReactiveExports(runtime) {
865
+ let symbols = runtime.symbols;
866
+ return ENGINE_REACTIVE_EXPORT_NAMES.every((name) => typeof symbols[name] == "function") ? symbols : null;
867
+ }
868
+ function failure(code, what) {
869
+ throw code === -1 ? new GameError("capacity_exceeded", `the engine has no room for the reactive fluid ${what}`) : code === -3 ? new GameError("unknown_resource", `the reactive fluid ${what} names an unknown material or a missing hob`) : new GameError("invalid_argument", `the engine refused the reactive fluid ${what} (${code})`);
870
+ }
871
+ function check(code, what) {
872
+ return code >= 0 ? code : failure(code, what);
873
+ }
874
+ var EngineReactive = class {
875
+ constructor(runtime, exports, render) {
876
+ this.runtime = runtime;
877
+ this.exports = exports;
878
+ this.render = render;
879
+ this.scratch = (0);
880
+ this.buffer = null;
881
+ this.words = new Uint32Array(0);
882
+ this.floats = new Float32Array(0);
883
+ this.registerViews = /* @__PURE__ */ new Map();
884
+ this.texelViews = /* @__PURE__ */ new Map();
885
+ this.positionViews = /* @__PURE__ */ new Map();
886
+ }
887
+ views() {
888
+ let buffer = this.runtime.memory.buffer;
889
+ buffer !== this.buffer && (this.buffer = buffer, this.words = new Uint32Array(buffer), this.floats = new Float32Array(buffer));
890
+ }
891
+ at() {
892
+ if (this.scratch === (0) && (this.scratch = this.runtime.exports.engine_alloc(SCRATCH_WORDS * (4), COLUMN_ALIGN), this.scratch === (0)))
893
+ throw new GameError("capacity_exceeded", "engine memory cannot hold reactive fluid parameters");
894
+ return this.views(), this.scratch >>> 2;
895
+ }
896
+ open(chemistry, fluid, desc) {
897
+ let at = this.at();
898
+ this.words.set(desc.subarray(0, (32)), at), this.floats.set(fluid.subarray(0, (18)), at + FLUID_AT);
899
+ let handle = this.exports.engine_reactive_create(chemistry, this.scratch + FLUID_AT * (4), this.scratch);
900
+ if (handle === (0)) throw new GameError("invalid_argument", "the engine refused this reactive fluid (check the liquid, the grids and the contact radius)");
901
+ return handle;
902
+ }
903
+ registers(reactive) {
904
+ this.views();
905
+ let held = this.registerViews.get(reactive);
906
+ if (held !== void 0 && held.buffer === this.buffer) return held;
907
+ let pointer = this.exports.engine_reactive_registers(reactive);
908
+ if (pointer === (0)) throw new GameError("unknown_resource", "this reactive fluid was disposed");
909
+ let view2 = new Uint32Array(this.words.buffer, pointer, (96));
910
+ return this.registerViews.set(reactive, view2), view2;
911
+ }
912
+ hob(reactive, desc) {
913
+ let at = this.at();
914
+ this.words.set(desc.subarray(0, (12)), at), check(this.exports.engine_reactive_hob(reactive, this.scratch), "hob");
915
+ }
916
+ lit(reactive, on) {
917
+ check(this.exports.engine_reactive_lit(reactive, on ? 1 : 0), "burner");
918
+ }
919
+ emitter(reactive, index, emitter) {
920
+ let at = this.at();
921
+ this.floats.set(emitter.subarray(0, (12)), at + EMITTER_AT), check(this.exports.engine_reactive_emitter(reactive, index, this.scratch + EMITTER_AT * (4)), "pour");
922
+ }
923
+ preheat(reactive, targetK, maxTicks) {
924
+ return check(this.exports.engine_reactive_preheat(reactive, targetK, maxTicks), "preheat");
925
+ }
926
+ step(reactive, seconds, tick) {
927
+ FLOAT[0] = seconds, this.registers(reactive)[(23)] = BITS[0], check(this.exports.engine_reactive_step(reactive, tick ? 1 : 0), "step");
928
+ }
929
+ media(reactive, medium) {
930
+ let render = medium === (0) ? (0) : this.render();
931
+ if (medium !== (0) && render === (0)) throw new GameError("unsupported_feature", "writing a media volume needs the engine renderer");
932
+ return check(this.exports.engine_reactive_media(reactive, render, medium), "media volume");
933
+ }
934
+ texels(reactive, count) {
935
+ this.views();
936
+ let held = this.texelViews.get(reactive);
937
+ if (held !== void 0 && held.buffer === this.buffer) return held;
938
+ let pointer = this.exports.engine_reactive_texels(reactive);
939
+ if (pointer === (0)) throw new GameError("unknown_resource", "this reactive fluid was disposed");
940
+ let view2 = new Uint32Array(this.words.buffer, pointer, count);
941
+ return this.texelViews.set(reactive, view2), view2;
942
+ }
943
+ positions(reactive, capacity) {
944
+ let pointer = this.exports.engine_reactive_positions(reactive);
945
+ if (pointer === (0)) throw new GameError("unknown_resource", "this reactive fluid was disposed");
946
+ this.views();
947
+ let held = this.positionViews.get(reactive);
948
+ if (held !== void 0 && held.buffer === this.buffer && held.byteOffset === pointer) return held;
949
+ let view2 = new Float32Array(this.floats.buffer, pointer, capacity * (3));
950
+ return this.positionViews.set(reactive, view2), view2;
951
+ }
952
+ digest(reactive) {
953
+ check(this.exports.engine_reactive_digest(reactive), "digest");
954
+ let r = this.registers(reactive);
955
+ return BigInt(r[(17)]) << HIGH_BITS | BigInt(r[(16)]);
956
+ }
957
+ close(reactive) {
958
+ this.registerViews.delete(reactive), this.texelViews.delete(reactive), this.positionViews.delete(reactive), this.exports.engine_reactive_destroy(reactive);
959
+ }
960
+ };
961
+
962
+ // src/game/destruction/engine.ts
963
+ var DESTRUCT_DESC_FLOATS = 24, DESTRUCT_DAMAGE_FLOATS = 5, DESTRUCT_EVENT_WORDS = 8, DESTRUCT_KIND_BREAK = 1, DESTRUCT_KIND_RETIRE = 2, DESTRUCT_KIND_INTACT_LOST = 3, DESTRUCT_KIND_REMOVE = 4, ENGINE_DESTRUCTION_EXPORT_NAMES = [
964
+ "engine_destruction_open",
965
+ "engine_destruction_close",
966
+ "engine_destructible_create",
967
+ "engine_destructible_destroy",
968
+ "engine_destructible_damage",
969
+ "engine_destructible_attached",
970
+ "engine_destruction_update",
971
+ "engine_destruction_events",
972
+ "engine_destruction_dropped"
973
+ ], ENGINE_DESTRUCTION_STRUCTURE_EXPORT_NAMES = ["engine_destructible_configure"], DESTRUCT_STRUCTURE_FLOATS = 8, STRUCTURE_PROPAGATION = 0, STRUCTURE_BOND_STRENGTH = 1, STRUCTURE_STRESS = 2, STRUCTURE_CLUSTERS = 3, STRUCTURE_LEVELS = 4, STRUCTURE_LEVEL_STRENGTH = 5, DESTRUCT_KIND_BOND = 5;
974
+ var NULL3 = 0, F32_BYTES2 = 4, MICROS2 = 1e6;
975
+ function engineDestructionExports(runtime) {
976
+ let symbols = runtime.symbols;
977
+ return ENGINE_DESTRUCTION_EXPORT_NAMES.every((name) => typeof symbols[name] == "function") ? symbols : null;
978
+ }
979
+ var EngineDestruction = class {
980
+ constructor(runtime, exports, world) {
981
+ this.runtime = runtime;
982
+ this.exports = exports;
983
+ this.world = world;
984
+ this.handle = (0);
985
+ this.scratch = (0);
986
+ this.fracturer = null;
987
+ this.buffer = null;
988
+ this.words = new Uint32Array(0);
989
+ this.floats = new Float32Array(0);
990
+ this.bytes = new Uint8Array(0);
991
+ this.events = { words: this.words, floats: this.floats, offset: 0, count: 0 };
992
+ }
993
+ views() {
994
+ let buffer = this.runtime.memory.buffer;
995
+ buffer !== this.buffer && (this.buffer = buffer, this.words = new Uint32Array(buffer), this.floats = new Float32Array(buffer), this.bytes = new Uint8Array(buffer), this.events.words = this.words, this.events.floats = this.floats);
996
+ }
997
+ open() {
998
+ if (this.handle === (0)) {
999
+ if (this.handle = this.exports.engine_destruction_open(this.world()), this.handle === (0)) throw new GameError("not_initialized", "destruction needs an engine physics world");
1000
+ if (this.scratch = this.runtime.exports.engine_alloc(Math.max((24), (5)) * (4), COLUMN_ALIGN), this.scratch === (0)) throw new GameError("capacity_exceeded", "engine memory cannot hold destruction parameters");
1001
+ }
1002
+ return this.handle;
1003
+ }
1004
+ allocate(bytes) {
1005
+ let pointer = this.runtime.exports.engine_alloc(Math.max(bytes, 4), COLUMN_ALIGN);
1006
+ if (pointer === (0)) throw new GameError("capacity_exceeded", "engine memory cannot hold the fracture asset");
1007
+ return pointer;
1008
+ }
1009
+ create(asset, entities, intact, desc) {
1010
+ let handle = this.open(), assetPointer = this.allocate(asset.byteLength), entityPointer = this.allocate(entities.byteLength);
1011
+ this.views(), this.bytes.set(asset, assetPointer), this.words.set(entities, entityPointer >>> 2), this.floats.set(desc, this.scratch >>> 2);
1012
+ let id = this.exports.engine_destructible_create(
1013
+ handle,
1014
+ this.world(),
1015
+ assetPointer,
1016
+ asset.byteLength,
1017
+ entityPointer,
1018
+ entities.length,
1019
+ intact,
1020
+ this.scratch
1021
+ );
1022
+ if (this.runtime.exports.engine_free(assetPointer, Math.max(asset.byteLength, 4), COLUMN_ALIGN), this.runtime.exports.engine_free(entityPointer, Math.max(entities.byteLength, 4), COLUMN_ALIGN), !(id >= 0)) throw new GameError("invalid_argument", `the engine refused the destructible (${id}); check the fracture asset and that every entity has a transform`);
1023
+ return id;
1024
+ }
1025
+ destroy(destructible) {
1026
+ this.handle !== (0) && this.exports.engine_destructible_destroy(this.handle, this.world(), destructible);
1027
+ }
1028
+ configure(destructible, structure) {
1029
+ let handle = this.open(), call = this.runtime.symbols.engine_destructible_configure;
1030
+ if (typeof call != "function") throw new GameError("unsupported_feature", "structural destruction needs an engine with feature destruction_2");
1031
+ this.views();
1032
+ let at = this.scratch >>> 2;
1033
+ this.floats.fill(0, at, at + (8)), this.floats[at + (0)] = structure.propagation ?? 0, this.floats[at + (1)] = structure.bondStrength, this.floats[at + (2)] = structure.stress ? 1 : 0, this.floats[at + (3)] = structure.clusters ? 1 : 0, this.floats[at + (4)] = structure.levels ?? 0, this.floats[at + (5)] = structure.levelStrength ?? 1;
1034
+ let code = call(handle, this.world(), destructible, this.scratch);
1035
+ if (!(code >= 0)) throw new GameError("invalid_argument", `the engine refused the structure (${code}); configure before any damage, with bondStrength above 0 for stress or clusters`);
1036
+ }
1037
+ damage(destructible, x, y, z, radius, amount) {
1038
+ let handle = this.open();
1039
+ this.views();
1040
+ let at = this.scratch >>> 2;
1041
+ this.floats[at] = x, this.floats[at + 1] = y, this.floats[at + 2] = z, this.floats[at + 3] = radius, this.floats[at + 4] = amount;
1042
+ let hit = this.exports.engine_destructible_damage(handle, destructible, this.scratch);
1043
+ if (!(hit >= 0)) throw new GameError("invalid_argument", `damage refused (${hit})`);
1044
+ return hit;
1045
+ }
1046
+ attached(destructible) {
1047
+ if (this.handle === (0)) return 0;
1048
+ let attached = this.exports.engine_destructible_attached(this.handle, destructible);
1049
+ if (!(attached >= 0)) throw new GameError("invalid_argument", `attached refused (${attached})`);
1050
+ return attached;
1051
+ }
1052
+ update(seconds) {
1053
+ if (this.events.count = 0, this.handle === (0)) return this.events;
1054
+ let count = this.exports.engine_destruction_update(this.handle, this.world(), Math.max(0, Math.round(seconds * (1e6))));
1055
+ if (!(count >= 0)) throw new GameError("invalid_argument", `destruction update refused (${count})`);
1056
+ return count === 0 ? this.events : (this.views(), this.events.offset = this.exports.engine_destruction_events(this.handle) >>> 2, this.events.count = count, this.events);
1057
+ }
1058
+ fracture(mesh, options) {
1059
+ if (this.fracturer === null) {
1060
+ let exports = engineFractureExports(this.runtime);
1061
+ if (exports === null) throw new GameError("unsupported_feature", "breaking a made thing needs an engine with live fracture");
1062
+ this.fracturer = new EngineFracturer(this.runtime, exports);
1063
+ }
1064
+ return this.fracturer.fracture(mesh, options);
1065
+ }
1066
+ dispose() {
1067
+ this.fracturer?.dispose(), this.fracturer = null, this.handle !== (0) && (this.exports.engine_destruction_close(this.handle), this.handle = (0));
1068
+ }
1069
+ };
1070
+
1071
+ // src/game/kernel/transforms-engine.ts
1072
+ var TRANSFORM_EXPORT_NAMES = [
1073
+ "engine_transform_fft_open",
1074
+ "engine_transform_fft_close",
1075
+ "engine_transform_fft_run",
1076
+ "engine_transform_convolver_open",
1077
+ "engine_transform_convolver_close",
1078
+ "engine_transform_convolve",
1079
+ "engine_transform_sat_open",
1080
+ "engine_transform_sat_close",
1081
+ "engine_transform_sat_build",
1082
+ "engine_transform_distance_open",
1083
+ "engine_transform_distance_close",
1084
+ "engine_transform_distance_mask",
1085
+ "engine_transform_distance_signed",
1086
+ "engine_transform_jump_flood",
1087
+ "engine_transform_multigrid_open",
1088
+ "engine_transform_multigrid_close",
1089
+ "engine_transform_multigrid_solve"
1090
+ ];
1091
+ function bindTransformEngine(symbols, memory) {
1092
+ for (let name of TRANSFORM_EXPORT_NAMES) if (typeof symbols[name] != "function") return null;
1093
+ return typeof symbols.engine_alloc != "function" || typeof symbols.engine_free != "function" ? null : { exports: symbols, memory };
1094
+ }
1095
+ var current = null;
1096
+ function useTransformEngine(engine) {
1097
+ current = engine;
1098
+ }
1099
+ function transformEngine() {
1100
+ return current;
1101
+ }
1102
+ var EngineBuffer = class {
1103
+ constructor(engine, bytes) {
1104
+ this.engine = engine;
1105
+ this.bytes = bytes;
1106
+ this.pointer = engine.exports.engine_alloc(Math.max(bytes, 4), 16);
1107
+ }
1108
+ floats(length) {
1109
+ return new Float32Array(this.engine.memory.buffer, this.pointer, length);
1110
+ }
1111
+ words(length) {
1112
+ return new Uint32Array(this.engine.memory.buffer, this.pointer, length);
1113
+ }
1114
+ bytesView(length) {
1115
+ return new Uint8Array(this.engine.memory.buffer, this.pointer, length);
1116
+ }
1117
+ free() {
1118
+ this.engine.exports.engine_free(this.pointer, Math.max(this.bytes, 4), 16);
1119
+ }
1120
+ };
1121
+
1122
+ // src/game/smoke/engine.ts
1123
+ var SMOKE_DESC_FLOATS = 24, SMOKE_EMITTER_FLOATS = 11, SMOKE_TINTED_EMITTER_FLOATS = 14, SMOKE_TINT_AT = 11, SMOKE_MAX_EMITTERS = 8, SMOKE_AXES = 3, ENGINE_SMOKE_TINT_EXPORT = "engine_smoke_emitters_tinted", ENGINE_SMOKE_FOLLOW_EXPORT = "engine_smoke_follow", SMOKE_MICROS_PER_SECOND = 1e6, SMOKE_MAX_STEP_MICROS = 1e5, ENGINE_SMOKE_EXPORT_NAMES = ["engine_smoke_create", "engine_smoke_destroy", "engine_smoke_emitters", "engine_smoke_step"], NULL4 = 0, WORD2 = 4, CAPACITY = -1, UNKNOWN = -3, WHITE = 1, SCRATCH_FLOATS2 = (24) + (8) * (14), EMITTERS_AT = (24);
1124
+ function tinted(floats2, count) {
1125
+ for (let e = 0; e < count; e++)
1126
+ for (let k = 0; k < (3); k++) if (floats2[e * (14) + (11) + k] !== (1)) return true;
1127
+ return false;
1128
+ }
1129
+ function engineSmokeExports(runtime) {
1130
+ let symbols = runtime.symbols;
1131
+ return ENGINE_SMOKE_EXPORT_NAMES.every((name) => typeof symbols[name] == "function") ? symbols : null;
1132
+ }
1133
+ function check2(code, what) {
1134
+ if (code >= 0) return code;
1135
+ throw code === (-1) ? new GameError("capacity_exceeded", `the engine has no room for the smoke ${what}`) : code === (-3) ? new GameError("unknown_resource", `the smoke ${what} names a disposed smoke volume or a missing medium`) : new GameError("invalid_argument", `the engine refused the smoke ${what} (${code})`);
1136
+ }
1137
+ var EngineSmoke = class {
1138
+ constructor(runtime, exports, render) {
1139
+ this.runtime = runtime;
1140
+ this.exports = exports;
1141
+ this.render = render;
1142
+ this.scratch = (0);
1143
+ this.buffer = null;
1144
+ this.floats = new Float32Array(0);
1145
+ }
1146
+ at() {
1147
+ if (this.scratch === (0) && (this.scratch = this.runtime.exports.engine_alloc(SCRATCH_FLOATS2 * (4), COLUMN_ALIGN), this.scratch === (0)))
1148
+ throw new GameError("capacity_exceeded", "engine memory cannot hold smoke parameters");
1149
+ let buffer = this.runtime.memory.buffer;
1150
+ return buffer !== this.buffer && (this.buffer = buffer, this.floats = new Float32Array(buffer)), this.scratch >>> 2;
1151
+ }
1152
+ renderHandle() {
1153
+ let render = this.render();
1154
+ if (render === (0)) throw new GameError("unsupported_feature", "smoke volumes need the engine renderer");
1155
+ return render;
1156
+ }
1157
+ create(desc, medium) {
1158
+ let at = this.at();
1159
+ return this.floats.set(desc.subarray(0, (24)), at), check2(this.exports.engine_smoke_create(this.renderHandle(), this.scratch, medium), "description");
1160
+ }
1161
+ emitters(smoke, floats2, count) {
1162
+ let at = this.at() + EMITTERS_AT, pointer = this.scratch + EMITTERS_AT * (4), tint = this.runtime.symbols[ENGINE_SMOKE_TINT_EXPORT];
1163
+ if (typeof tint == "function") {
1164
+ this.floats.set(floats2.subarray(0, count * (14)), at), check2(tint(this.renderHandle(), smoke, pointer, count), "emitters");
1165
+ return;
1166
+ }
1167
+ if (tinted(floats2, count)) throw new GameError("unsupported_feature", "tinted flames need an engine with smoke emitter tints");
1168
+ for (let e = 0; e < count; e++)
1169
+ this.floats.set(floats2.subarray(e * (14), e * (14) + (11)), at + e * (11));
1170
+ check2(this.exports.engine_smoke_emitters(this.renderHandle(), smoke, pointer, count), "emitters");
1171
+ }
1172
+ follow(smoke, x, y, z) {
1173
+ let call = this.runtime.symbols[ENGINE_SMOKE_FOLLOW_EXPORT];
1174
+ if (typeof call != "function") throw new GameError("unsupported_feature", "a smoke volume that follows a moving thing needs an engine with smoke follow");
1175
+ let at = this.at();
1176
+ this.floats[at] = x, this.floats[at + 1] = y, this.floats[at + 2] = z, check2(call(this.renderHandle(), smoke, this.scratch), "follow");
1177
+ }
1178
+ step(smoke, seconds) {
1179
+ let micros = Math.min(Math.max(Math.round(seconds * (1e6)), 0), (1e5));
1180
+ return check2(this.exports.engine_smoke_step(this.renderHandle(), smoke, micros), "step");
1181
+ }
1182
+ destroy(smoke) {
1183
+ this.exports.engine_smoke_destroy(this.renderHandle(), smoke);
1184
+ }
1185
+ };
1186
+
1187
+ export { ANIMATION_BUFFER_ACTIONS, ANIMATION_BUFFER_EVENTS, ANIMATION_BUFFER_ROOT_MOTION, ANIM_ACTION_FINISHED, ANIM_ACTION_PAUSED, ANIM_ACTION_RUNNING, ANIM_ACTION_WORDS, ANIM_BAKE_RETARGET, ANIM_CLIP_INFO, ANIM_CREATE_BLEND, ANIM_CREATE_IK, ANIM_CREATE_MASK, ANIM_CROSSFADE, ANIM_DESTROY, ANIM_EVENT_WORDS, ANIM_FADE, ANIM_HUMANOID, ANIM_INERTIALIZE, ANIM_KIND_BLEND, ANIM_KIND_IK, ANIM_KIND_MASK, ANIM_KIND_RETARGET, ANIM_KIND_ROOT_MOTION, ANIM_MAX_EVENTS, ANIM_RETARGET, ANIM_ROOT_MOTION, ANIM_SET_BLEND, ANIM_SET_CLIP_EVENTS, ANIM_SET_EVENTS, ANIM_SET_IK_POLE, ANIM_SET_IK_TARGET, ANIM_SET_LOD, ANIM_SET_LOOP, ANIM_SET_PAUSED, ANIM_SET_RANGE, ANIM_SET_SPEED, ANIM_SET_SYNC, ANIM_SET_SYNC_MARKERS, ANIM_SET_SYNC_MODE, ANIM_SET_TIME, AssetPriority, BLEND_EQUATIONS, BLEND_FACTORS, BUFFER_OWNER_CAPABILITIES, CHEMISTRY_ATMOSPHERE, CHEMISTRY_BOX_WORDS, CHEMISTRY_COLUMNS, CHEMISTRY_EVENT_HEADER, CHEMISTRY_EVENT_WORDS, CHEMISTRY_EXPORT_NAMES, CHEMISTRY_NATURE_WORDS, CHEMISTRY_PROBE_WORDS, CHEMISTRY_REACTION_WORDS, CHEMISTRY_REFUSED, CHEMISTRY_SLOTS, CHEMISTRY_SPECIES_WORDS, CHEMISTRY_STATS_WORDS, CHEMISTRY_TQ, CHEMISTRY_UNSET, CHEMISTRY_VACUUM, CHEMISTRY_VESSEL_SLOTS, CHEMISTRY_VESSEL_WORDS, COMPARE_FUNCTIONS, COMPUTE_DEFERRED, COMPUTE_SPACE_CPU, COMPUTE_SPACE_GPU, COMPUTE_STOPPED, CORE_MATERIAL_SLOTS, ComputeMonitor, DESTRUCT_DESC_FLOATS, DESTRUCT_EVENT_WORDS, DESTRUCT_KIND_BOND, DESTRUCT_KIND_BREAK, DESTRUCT_KIND_INTACT_LOST, DESTRUCT_KIND_REMOVE, DESTRUCT_KIND_RETIRE, EFFECT_LENS_FLARE, EMITTER_COLLISIONS, EMITTER_SHAPES, ENGINE_COMPUTE_EXPORT_NAMES, ENGINE_DESTRUCTION_EXPORT_NAMES, ENGINE_DESTRUCTION_STRUCTURE_EXPORT_NAMES, ENGINE_ENCODE_EXPORT_NAMES, ENGINE_FLUID_EXPORT_NAMES, ENGINE_REACTIVE_EXPORT_NAMES, ENGINE_RELOAD_EXPORT_NAMES, ENGINE_SMOKE_EXPORT_NAMES, ENV_GI, ENV_GI_INTENSITY, ENV_GI_SPACING, ENV_GI_SUN_ANGLE, ENV_TONE_CURVE, EngineBuffer, EngineDestruction, EngineFluids, EngineReactive, EngineSmoke, EventChannel, FLUID_CAP_SIMULATION, FLUID_CAP_SURFACE, FLUID_COLLIDER_FLOATS, FLUID_COLLIDER_VOLUME, FLUID_DESC_FLOATS, FLUID_EMITTER_FLOATS, FLUID_FORCE_FLOATS, FLUID_FORCE_WORDS, FLUID_MAX_COLLIDERS, FLUID_MAX_EMITTERS, FLUID_SURFACE_FLOATS, FOG_MODES, FftAnalyser, GI_MODES, HOB_DESC_WORDS, HOB_FIRST, HOB_FLAME_JOULES, HOB_FLAME_K, HOB_FLAME_LAYERS, HOB_LAST, HOB_LAYERS, HOB_METAL, HOB_PAN_JOULES, HOB_PAN_K, HOB_START_K, KERNEL_PRIORITIES, MATERIAL_SLOTS, MAX_CHAIN_EFFECTS, MEDIA_VOLUME_FEATURE, NODE_POSE_FLOATS, NO_REF, OP_ANIMATION, OP_CLEAR_EMITTER, OP_DESTROY_EMITTER, OP_EMIT, OP_MARK_EMITTER, OP_MARK_TEXTURE_REGION, OP_RAW_COPY, OP_RAW_COPY_TEXTURE, OP_RAW_DESTROY_BUFFER, OP_RAW_DESTROY_TEXTURE, OP_RAW_DISPATCH, OP_RAW_DRAW, OP_RAW_MARK_BUFFER, OP_RAW_MARK_TEXTURE, OP_SET_CLIP_ADDITIVE, OP_SET_CLIP_MASK, OP_SET_EFFECT, OP_SET_EFFECT_TEXTURE, OP_SET_EMITTER_RATE, OP_SET_LOD, OP_SET_MATERIAL_WORD, OP_SET_RENDER_ORDER, OP_SET_SHADOW, OP_SET_TIME_OF_DAY, OP_SET_VOLUMETRICS, OP_SET_WEATHER, PASS_FLAGS, PASS_FLAG_CUBE_FACE, PASS_FLAG_ONCE, PASS_FLAG_REFLECT, PASS_PLANE, PASS_SLICE, PLUME_CELL, PLUME_KELVIN, PLUME_SMOKE, PLUME_WORLD, POST_EFFECT_TEXTURES, Queue, REACTIVE_BURNING, REACTIVE_CAPACITY, REACTIVE_CELL, REACTIVE_CONTACT, REACTIVE_COUPLING, REACTIVE_DESC_WORDS, REACTIVE_DROPPED_PAIRS, REACTIVE_FEATURE, REACTIVE_FIRED, REACTIVE_FLAME_EXTINCTION, REACTIVE_GLOW_FROM_K, REACTIVE_GLOW_FULL_K, REACTIVE_GRID, REACTIVE_HOTTEST_K, REACTIVE_LIQUID, REACTIVE_LIQUID_KELVIN, REACTIVE_LIT, REACTIVE_MAX_EDGE, REACTIVE_MAX_PAIRS, REACTIVE_MAX_PLUMES, REACTIVE_MAX_PREHEAT_TICKS, REACTIVE_MAX_STEP_SECONDS, REACTIVE_ORIGIN, REACTIVE_PAIRS, REACTIVE_PAN_K, REACTIVE_PARCELS, REACTIVE_PARTICLES, REACTIVE_PLUMES, REACTIVE_PLUME_COUNT, REACTIVE_PLUME_FROM_K, REACTIVE_PLUME_WORDS, REACTIVE_RETIRED, REACTIVE_SEED_HIGH, REACTIVE_SEED_LOW, REACTIVE_SMOKE, REACTIVE_SMOKE_FULL, REACTIVE_SMOKE_SPECIES, REACTIVE_SMOKY, REACTIVE_TICK_HIGH, REACTIVE_TICK_LOW, REACTIVE_VENTED, RENDER_CORE_EXPORTS, RENDER_FEATURE_EXPORTS, RENDER_FEED_POSE_FEATURE, RENDER_KERNEL_INSTANCES_FEATURE, ROOT_MOTION_APPLY, ROOT_MOTION_XZ, ROOT_MOTION_Y, ROOT_MOTION_YAW, SCENERY_REGISTER, SCENERY_REGISTER_WORDS, SCENERY_REQUEST_SLOTS, SMOKE_DESC_FLOATS, SMOKE_MAX_EMITTERS, SMOKE_TINTED_EMITTER_FLOATS, SMOKE_TINT_AT, STAT_DRAW_CALLS, STAT_GPU_BYTES_HIGH, STAT_GPU_BYTES_LOW, STAT_GPU_LAST_NS, STAT_GPU_P50_NS, STAT_GPU_P95_NS, STAT_PARTICLES_ALIVE, STAT_RAW_DISABLED, STAT_RAW_DISPATCHES, STAT_RAW_GPU_NS, STAT_TEXT_GLYPHS, STAT_THERMAL_TIER, STAT_TRANSPARENT_SORTED, STAT_TRIANGLES, STENCIL_OPERATIONS, STREAM_ACTOR_FLOATS, STREAM_COLLIDER_FLOATS, STREAM_EYE_FLOATS, STREAM_LAZY_PACKS_FLAG, STREAM_MAX_PACK_RELEASES, STREAM_MAX_PACK_REQUESTS, STREAM_OP_INSERT, STREAM_PACK_CONTENDED, STREAM_PACK_MASK, STREAM_PACK_RELEASES, STREAM_PACK_REQUESTS, STREAM_PRIORITY_NOW, STREAM_PRIORITY_SHIFT, STREAM_PRIORITY_SOON, STREAM_REGISTER, STREAM_REGISTER_BLOCK_WORDS, STREAM_RELEASE_LIST, STREAM_REQUEST_LIST, STREAM_START_PACK, TARGET_COLORS, TARGET_KIND, TARGET_KIND_2D, TARGET_KIND_ARRAY, TARGET_KIND_CUBE, TARGET_LAYERS, TARGET_MAX_COLORS, TARGET_SAMPLED_DEPTH, TARGET_TEXTURES, TEXTURE_ENCODE_ASTC_4X4, TEXTURE_ENCODE_AUTO, TEXTURE_ENCODE_BC7, TEXTURE_FORMAT_R16F, TEXTURE_FORMAT_R16UI, TEXTURE_FORMAT_R32F, TEXTURE_FORMAT_R32I, TEXTURE_FORMAT_R32UI, TEXTURE_FORMAT_R8, TEXTURE_FORMAT_R8UI, TEXTURE_FORMAT_RG16F, TEXTURE_FORMAT_RG32F, TEXTURE_FORMAT_RG32UI, TEXTURE_FORMAT_RG8, TEXTURE_FORMAT_RGBA16UI, TEXTURE_FORMAT_RGBA32I, TEXTURE_FORMAT_RGBA32UI, TEXTURE_FORMAT_RGBA8UI, TEXTURE_KIND_2D_ARRAY, TEXTURE_KIND_3D, TEXTURE_KIND_EXTERNAL, TIER_INDEX, TONE_MAPPINGS, TRANSFORM_EXPORT_NAMES, VECTOR_SURFACE_CAPS, VECTOR_SURFACE_EDGES, VECTOR_SURFACE_TIERS, analyserSettings, bindChemistryEngine, bindData, bindTransformEngine, bitExtract, bitInsert, clz, computeLogLine, createVectorSurfaceStats, ctz, dataColumn, dataTables, emitRow, engineDestructionExports, engineFluidExports, engineReactiveExports, engineSmokeExports, events, f64, f64Bits, hasData, list, listPool, listPoolAddress, morton2, morton2Wide, morton3, morton3Wide, pickRows, popcnt, priorityLevel, queue, readDataReport, readList, reportData, rotl, rotr, routeEvents, scalarArgs, setEmitRow, setPoolEngine, symbol2 as symbol, toU32, transformEngine, u64, u64Words, unmorton2, unmorton3, useTransformEngine, writeWideArg };