@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,3546 @@
1
+ import { G as GameError } from './session-grant-CJ27DwrT.mjs';
2
+ export { d as GameErrorCode } from './session-grant-CJ27DwrT.mjs';
3
+ import { f as GameUi, I as InputActions, F as AgentSpawn, H as ArchetypeHandle, J as GameAi, K as SmartObjectSpawn, T as TargetSpawn, L as EaseId, O as InputTap } from './game-Bx8onkhX.mjs';
4
+ export { A as ActionId, Q as Animation, U as AnimationOptions, W as AxisBinding, X as BreakCause, Y as BreakEvent, Z as ButtonBinding, i as CELL_CLASSES, k as CHEMISTRY_GROUPS, l as CHEMISTRY_REFUSALS, m as CHEMISTRY_REFUSAL_TEXT, n as CellBox, o as CellClass, p as CellProbe, _ as Channel, C as Chemistry, h as ChemistryEvent, r as ChemistryGroup, t as ChemistryParticles, u as ChemistryRefusal, g as ChemistryRegion, v as ChemistryVessel, $ as Clip, a0 as ClipDesc, a1 as ClipPlayerId, a2 as ClipTrack, b as DefineResult, D as Delivery, a3 as Destructible, a4 as DestructibleDesc, a5 as DrainSource, a6 as Ease, a7 as FRAME_PHASE_NAMES, a8 as FrameInput, a9 as FramePhase, aa as FramePhases, G as Game, e as GameNet, ab as GameOptions, a as GameUiHost, ac as GestureOptions, ad as HapticPattern, ae as HudSlot, af as HudSlotKind, ag as HudSlotLayout, ah as InputDevice, ai as InputDeviceId, aj as LongPressGesture, ak as LoopbackOptions, al as LoopbackTransport, w as MaterialInfo, M as MessageReader, am as MessageSchema, d as MessageType, an as MessageWriter, ao as NO_UI_ACTION, N as NatureOptions, ap as OrientationState, aq as PinchGesture, ar as PointerDelta, P as PointerFilter, c as PointerPhase, as as PointerState, at as QuantizedField, au as REACTIVE_DEFAULTS, av as RECORDED_EVENT_BYTES, x as ReactionInfo, aw as ReactiveFluid, ax as ReactiveFluidDesc, ay as ReactiveGrid, az as ReactiveHobDesc, aA as ReactiveMediumLook, aB as ReactivePlume, aC as ReactiveSpecies, aD as ReactiveStats, z as RegionOptions, B as RegionStats, aE as Repeat, aF as RepeatMode, R as RoomTransport, aG as STAGE_TIME, aH as STAGE_X, aI as STAGE_Y, aJ as STAGE_Z, aK as ScratchArena, aL as ScratchCapacity, S as SeededRandom, aM as SnapshotBuffer, aN as SwipeGesture, aO as TapGesture, aP as TweenId, aQ as TweenTarget, aR as TweenTargetId, aS as UiActionId, aT as UiValue, aU as ValueSlot, V as VesselState, aV as WheelState, aW as WireField, aX as WireScalar, aY as createGame, aZ as createReactivePlume, a_ as createReactiveStats, a$ as drainSource, b0 as ease, b1 as easeInPlace, b2 as quantized } from './game-Bx8onkhX.mjs';
5
+ import { bq as KernelEngine, bQ as Vec2, V as Vec3, s as GeometryDesc, N as NodeId, i as GeometryId, j as MaterialId, k as MaterialDesc, a5 as NodeDesc, bR as ShapeDesc, a8 as TextStyleDesc, a9 as PickHit, bS as VehiclePort, bT as BehaviourDecl, bU as ConsiderationDecl, bV as InputDecl, bW as ActionDecl, bX as SightDecl, bY as SteeringDecl, bZ as SkillDecl, b_ as NeedDecl, b$ as ScheduleBlockDecl, az as ArchetypeDecl, c0 as CurveDecl, c1 as BuiltinInput, c2 as AI_EVENT_WORDS, c3 as AI_MAX_GAME_SLOTS, c4 as AI_NONE, c5 as AiEventKind, c6 as AiEventKindCode, ax as AiPort, ay as AiWorldOptions, c7 as BUILTIN_INPUTS, c8 as PHASE_IDLE, c9 as PHASE_RECOVER, ca as PHASE_STRIKE, cb as PHASE_WINDUP, aL as NavPort, aM as NavDesc, A as AudioPort, c as AudioCapabilities, b as AssetSource, l as AnalyserSettings, cc as ToneMapping, v as TextureId, u as TextureDesc, I as RenderTargetId, ac as RenderPassId, ae as PostChainId, cd as PostEffectDesc, bp as WorldStreamingPort, o as SceneryPort, ce as SceneryBodyPort, T as TerrainPort, cf as KeyframeDesc, cg as KeyframeStats } from './backend-gUCzs5Kg.mjs';
6
+ export { ch as AGENT_ARRIVED, ci as AGENT_IDLE, cj as AGENT_LOST, ck as AGENT_MOVING, cl as AGENT_ON_LINK, cm as AGENT_REQUESTING, cn as AGENT_STRIDE, co as AGENT_X, cp as AUDIO_PREVIEW_SUFFIX, aO as AgentDesc, e as AnalyserDesc, cq as AssetPriority, cr as AtmosphereDesc, cs as AxisMotion, ct as BRUSH, cu as BatchBuffers, cv as BlendDesc, cw as BlendEquation, cx as BlendFactor, cy as Blending, bh as BodyDesc, cz as BodyKind, B as BrushOp, cA as CLOTH_FEATURE, cB as CastShapeKind, bn as CharacterControllerDesc, bo as CharacterMove, aA as ChemistryEngine, al as ClipActionId, n as ClothInfo, m as ClothPort, cC as CloudDesc, bb as ColliderDesc, cD as ColorSpace, cE as CompareFunction, C as CompoundPartDesc, bm as ContactRuleDesc, cF as ContactRuleTable, cG as CurvePoint, b0 as CurveTable, cH as DEFAULT_COLLIDER_CLASS, cI as DEFAULT_PANNER, cJ as DISTANCE_MODELS, aE as DestructionPort, D as DeviceTier, cK as DistanceModel, aQ as DriverDesc, cL as EmitterCollision, E as EmitterDesc, a1 as EmitterId, cM as EmitterShape, cN as EngineCurveDesc, aa as EnvironmentDesc, cO as FILTER_KINDS, cP as FLUID_CAP_SIMULATION, cQ as FLUID_CAP_SURFACE, cR as FRAME_ALPHA_SLOT, cS as FRAME_NOW_MS_SLOT, cT as FRAME_SECONDS_SLOT, cU as FRAME_STEP_SECONDS_SLOT, cV as FRAME_TICK_SLOT, cW as FftAnalyser, d as FilterDesc, cX as FilterKind, a as FixedStepLoop, ao as FluidPort, cY as FogDesc, a7 as FontId, a6 as FontSource, aH as FractureMesh, aI as FractureOptions, cZ as FracturePiece, c_ as FractureResult, F as FrameTime, c$ as GEAR_AUTO, d0 as GEAR_NEUTRAL, d1 as GEAR_REVERSE, aJ as GPU_PASS_NAMES, G as GameBackend, r as GameSurface, d2 as GearboxDesc, d3 as GeometryGroup, d4 as GlobalIlluminationDesc, d5 as GlobalIlluminationMode, d6 as GlslSource, d7 as GpuBindGroupId, d8 as GpuBindingDesc, d9 as GpuBlend, da as GpuBlendComponent, db as GpuBlendFactor, dc as GpuBufferDesc, dd as GpuBufferId, de as GpuBufferUsage, df as GpuComputePipelineDesc, dg as GpuDispatchOptions, dh as GpuDrawOptions, di as GpuHook, dj as GpuPipelineId, dk as GpuRect, dl as GpuRenderPipelineDesc, dm as GpuSamplerDesc, dn as GpuSamplerId, dp as GpuSceneResource, dq as GpuSceneTexture, dr as GpuShaderId, a4 as GpuStats, ds as GpuTextureCopy, dt as GpuTextureDesc, du as GpuTextureFormat, dv as GpuTextureId, dw as GpuTextureUsage, dx as GpuTopology, q as GraphicsCapabilities, p as GraphicsPort, an as GraphicsStats, dy as Interpolation, dz as JOINT_AXES, dA as JointAxisName, bl as JointDesc, dB as JointDrive, dC as JointLoad, bi as JointPort, ak as KitTint, dD as LaneSpec, dE as LeanDesc, bN as LightKind, dF as LinesMaterialDesc, dG as LodRange, aG as LoopOptions, dH as MAX_CCD_SUBSTEPS, dI as MAX_COLLIDER_CLASSES, dJ as MAX_PGS_ITERATIONS, dK as MAX_SOLVER_ITERATIONS, dL as MEDIUM_DEFAULTS, dM as MEDIUM_MAX, dN as MEDIUM_MAX_EDGE, dO as MatcapMaterialDesc, dP as MaterialCommon, a0 as MaterialStateDesc, $ as MaterialTextureSlot, dQ as MaterialTint, ag as MediumDesc, dR as MediumId, dS as MediumPort, ah as MediumVolume, x as ModelId, aj as ModelInfo, y as ModelUpgrade, dT as MorphTargetDesc, dU as NOISE, dV as NO_CONTACT_RULE, dW as NO_LINK, dX as NodeCommon, dY as NodeKindDesc, g as NoiseKind, b7 as OceanCascades, b6 as OceanDesc, aN as OffMeshLinkDesc, dZ as POSE_DIR_X, d_ as POSE_DIR_Z, d$ as POSE_LANE, e0 as POSE_SPEED, e1 as POSE_STRIDE, e2 as POSE_X, e3 as POSE_Z, P as PannerDesc, e4 as PhysicalMaterialDesc, bc as PhysicsPort, bP as PhysicsWorldDesc, e5 as PointsMaterialDesc, e6 as PolygonOffsetDesc, ad as PostChainDesc, e7 as PrimitiveShapeDesc, b8 as PuddleOptions, aw as Quat, e8 as RAGDOLL_POSE_STRIDE, e9 as REACTIVE_FEATURE, bk as Ragdoll, ea as RagdollBoneDesc, bj as RagdollDesc, eb as RagdollDrive, ec as RagdollRoot, R as RawGpu, aS as RayHit, aR as RayQuery, aB as ReactivePort, ai as RenderPassDesc, ab as RenderTargetDesc, ed as RenderTargetFormat, b9 as RippleOptions, aP as RoadGraphDesc, ee as SCENERY_REGISTER, ef as SCENERY_REGISTER_WORDS, eg as SCENERY_REQUEST_SLOTS, eh as SEA_STATES, ei as SH_COEFFICIENT_FLOATS, ej as SIGNAL_AMBER, ek as SIGNAL_GREEN, el as SIGNAL_RED, em as SOA_EXPORT_NAMES, en as SOFT_BODY_FEATURE, aX as Scalar, b5 as SeaState, eo as ShaderMaterialDesc, ep as ShaderSource, eq as ShadowDesc, a2 as ShadowParamsDesc, er as ShadowType, aV as ShapeCastQuery, es as Side, et as SignalSpec, eu as SkeletonDesc, ev as SkyDesc, bf as SleepThresholds, aT as SoaEngine, ew as SoaExports, b2 as SoftBodyInfo, b1 as SoftBodyPort, be as SolverSettings, ex as SphereOverlap, ey as SpriteMaterialDesc, ez as StandardMaterialDesc, eA as StencilDesc, eB as StencilOperation, eC as TERRAIN_REGISTER, eD as TIME_SCALE_SLOT, eE as TexelData, eF as TexelFormat, eG as TextAlign, eH as TextDirection, eI as TextureEncode, eJ as TextureFilter, eK as TextureKind, z as TextureRegion, eL as TextureSource, eM as TextureTransform, w as TextureUpgrade, eN as TextureWrap, eO as ToonMaterialDesc, eP as Transparency, eQ as UniformDesc, eR as UniformType, eS as UnlitMaterialDesc, eT as VECTOR_SURFACE_CAPS, eU as VECTOR_SURFACE_EDGES, eV as VECTOR_SURFACE_TIERS, f as Vec3Like, eW as Vec3Tuple, eX as Vec4, J as VectorAssetId, K as VectorSurfaceDesc, Y as VectorSurfaceEvent, Q as VectorSurfaceId, X as VectorSurfacePhase, U as VectorSurfacePlay, eY as VectorSurfacePort, W as VectorSurfaceSeek, Z as VectorSurfaceStats, _ as VectorSurfaceTier, av as Vehicle, au as VehicleDesc, eZ as VertexAttributeDesc, t as VertexData, H as VideoFrameSource, a3 as ViewOffset, e_ as VolumetricCloudsDesc, e$ as VolumetricFogDesc, f0 as VolumetricsDesc, f1 as WHEEL_CENTER, f2 as WHEEL_FORCE_LAT, f3 as WHEEL_FORCE_LONG, f4 as WHEEL_GROUND, f5 as WHEEL_LENGTH, f6 as WHEEL_LOAD, f7 as WHEEL_OMEGA, f8 as WHEEL_POINT, f9 as WHEEL_SLIP, fa as WHEEL_SLIP_ANGLE, fb as WHEEL_SPIN, fc as WHEEL_STEER, fd as Water, b4 as WaterDesc, fe as WaterFlow, ba as WaterSample, ff as WaveDesc, af as WeatherState, fg as WgslSource, fh as WheelDesc, fi as analyserSettings, bL as bindChemistryEngine, fj as bindKernelEngine, fk as bindSoaEngine, fl as createGpuStats, aK as createPickHit, fm as createVectorSurfaceStats, fn as detuneRate, fo as encodeVehicleDesc, fp as kernelIsa, fq as materialTint, fr as mediumIndex, fs as mediumTexel, ft as mediumTexelCount, fu as peakCurve, fv as sampleCurve, fw as seaDesc } from './backend-gUCzs5Kg.mjs';
7
+ import { b as TableSchema, a as EntityTable, u as u32, k as f32, F as FixedArray, v as vec4, l as vec3, m as Each, n as vec2, o as i32, p as Kernel, q as Selection, R as RouteDevice, G as GpuDeviceClass, K as KernelRunner, r as quat, E as Entity, s as NavPath, t as CraftPresetName, w as CraftBodyShape, x as CraftDesc, y as CraftTuning, H as HullSource, A as Aircraft, B as Boat, z as Helicopter, T as Transforms, c as PrefetchLayerDesc } from './world-qekkXjJv.mjs';
8
+ export { J as AeroCurveDesc, L as AircraftOptions, M as AircraftPresetName, O as AreaEffect, Q as AreaEffectDesc, U as ArrayField, V as AssistDesc, X as BOAT_SHEET, Y as BOAT_STEER, Z as BOAT_THROTTLE, _ as BatchGraphics, $ as BatchNav, a0 as BatchPhysics, a1 as BehaviourNode, a2 as BoatOptions, a3 as BoatPresetName, a4 as CRAFT_CHANNELS, a5 as CRAFT_PRESETS, a6 as CRAFT_TELEMETRY_WORDS, a7 as CellInfo, a8 as Comparison, a9 as ComponentFields, aa as ComponentSchema, ab as ComponentStore, C as ComponentType, ac as ComputeCode, ad as ComputeDiagnostic, ae as ComputeFrame, af as ComputeRoute, ag as CpuBackend, ah as Craft, ai as CraftOptions, aj as CraftSystem, ak as CraftWheelDesc, al as CrumpleOptions, am as DEFAULT_PREFETCH_CELL, D as DespawnListener, an as Dev, ao as DrainedEvent, ap as ENGINE_COMPUTE_EXPORT_NAMES, aq as EntityCursor, j as EntityTableOptions, ar as EventChannel, as as EventFieldKind, at as EventFields, au as EventPayload, av as FLIGHT_BRAKE, aw as FLIGHT_FLAPS, ax as FLIGHT_GEAR, ay as FLIGHT_PITCH, az as FLIGHT_ROLL, aA as FLIGHT_THROTTLE, aB as FLIGHT_TILT, aC as FLIGHT_YAW, aD as FLOW_COST_BLOCKED, aE as FLOW_COST_ONE, aF as Falloff, aG as FieldName, aH as FieldSpec, aI as FlightMode, aJ as FlowField, aK as FlowFieldDesc, aL as FlowNav, aM as FlowSample, aN as FlowSteer, aO as FlowSteerDesc, aP as FlowStep, aQ as FoilDesc, aR as GPU_KERNEL_EXPORT_NAMES, aS as HelicopterOptions, aT as HelicopterPresetName, aU as HingeDesc, aV as InspectorPool, I as InspectorReadout, aW as Inventory, aX as Joined, aY as KernelCell, aZ as KernelDataReport, a_ as KernelEntity, a$ as KernelFeed, b0 as KernelHandles, b1 as KernelMachine, b2 as KernelMismatch, b3 as KernelMode, b4 as KernelOptions, b5 as KernelOverlap, b6 as KernelPriority, b7 as KernelRouteReport, b8 as KernelRouter, b9 as KernelServiceAudio, ba as KernelServiceChemistry, bb as KernelServiceGraphics, bc as KernelServiceSources, bd as KernelServiceUi, be as KernelServiceVoxels, bf as KernelSet, bg as KernelSettings, bh as KernelSpawnReport, bi as KernelSystemSpec, bj as KernelSystems, bk as KernelTarget, bl as KernelVoxel, bm as KernelWork, bn as KernelWorld, bo as KernelWorldPort, bp as List, bq as MAX_AERO_TABLE, br as MAX_CRAFT_WHEELS, bs as MAX_FOILS, bt as MAX_HULL_POINTS, bu as MAX_HULL_RESOLUTION, bv as MAX_PREFETCH_LEVELS, bw as MAX_ROTORS, bx as MAX_THRUSTERS, by as MixDesc, bz as NO_CHANNEL, bA as NO_ENTITY, bB as NO_REF, N as Nav, bC as NavStep, bD as NearestFeatureOptions, bE as Neighbours, bF as OverlapInfo, bG as PathBatch, bH as PathBatchDesc, e as Physics, f as PhysicsOptions, bI as PickBatch, bJ as PickBatchDesc, bK as PickInfo, bL as PrefetchDistance, d as PrefetchItemDesc, P as PrefetchLayer, bM as PrefetchLevelDesc, bN as PresetOptions, bO as Query, bP as QueryOptions, bQ as QueryWhere, bR as Queue, bS as ROTOR_COLLECTIVE, bT as ROTOR_CYCLIC_PITCH, bU as ROTOR_CYCLIC_ROLL, bV as ROTOR_ENGINE, bW as ROTOR_PEDAL, bX as RayBatch, bY as RayBatchDesc, bZ as RayHitInfo, b_ as Ref, b$ as RigidBody, c0 as RotorDesc, c1 as RoutePin, c2 as Rows, c3 as ScalarField, c4 as ScalarName, c5 as SeaOptions, c6 as SlotsView, S as SoftBodies, i as SoftBody, h as SoftBodyOptions, g as SoftBodyShape, c7 as SoftCollider, c8 as SoftPlastic, c9 as Status, ca as SweepHitInfo, cb as TELEMETRY_AIRSPEED, cc as TELEMETRY_ALPHA, cd as TELEMETRY_APPARENT_WIND, ce as TELEMETRY_BANK, cf as TELEMETRY_CLIMB, cg as TELEMETRY_CONTACTS, ch as TELEMETRY_GEAR, ci as TELEMETRY_GROUND_EFFECT, cj as TELEMETRY_PITCH, ck as TELEMETRY_PLANING, cl as TELEMETRY_ROTOR, cm as TELEMETRY_SPEED, cn as TELEMETRY_SPOOL, co as TELEMETRY_STALLED, cp as TELEMETRY_SUBMERGED, cq as TELEMETRY_THRUST, cr as TableColumns, cs as TableField, ct as ThrusterDesc, cu as Transform, cv as Vec2Columns, cw as Vec2View, cx as Vec3Columns, cy as Vec3View, cz as Vec4Columns, cA as Vec4View, cB as VectorField, cC as VoxelInfo, cD as WaterControls, W as World, cE as WorldColliderOptions, cF as WorldPackReader, cG as WorldPrefetchOptions, cH as WorldStream, cI as WorldStreamOptions, cJ as WorldStreamStats, cK as WorldStreamer, cL as action, cM as add, cN as applyForce, cO as applyImpulse, cP as autoKernel, cQ as behaviour, cR as chemistryAt, cS as chooseDevice, cT as clamp, cU as compiledKernel, cV as computeLogLine, cW as condition, cX as configureKernels, cY as craftConstant, cZ as craftMix, c_ as craftMixWith, c$ as cross, d0 as crossoverRows, d1 as defineComponent, d2 as despawn, d3 as dev, d4 as dist, d5 as distSq, d6 as div, d7 as dot, d8 as entityGeneration, d9 as entityIndex, da as events, db as fields, dc as flow, dd as flowCost, de as groundHeight, df as hash32, dg as invert, dh as isKernel, di as kernel, dj as kernelMachine, dk as leaveBelowRows, dl as len, dm as lenSq, dn as lerp, dp as lineOfSight, dq as list, dr as listPool, ds as mul, dt as nativeTwinOf, du as navNext, dv as negate, dw as noise2, dx as noise3, dy as normalize, dz as onGpu, dA as overlap, dB as pick, dC as pickRows, dD as playClip, dE as playSound, dF as programDigest, dG as qaxis, dH as qconj, dI as qmul, dJ as qrotate, dK as queue, dL as rand01, dM as raycast, dN as readList, dO as scale, dP as selector, dQ as sequence, dR as setAnchor, dS as setClipWeight, dT as setDefaultKernelEngine, dU as setIkTarget, dV as setInstance, dW as setInstanceColour, dX as setKernelWorld, dY as setVelocity, dZ as setVoxel, d_ as smoothstep, d$ as spawn, e0 as spawnInto, e1 as spawnOverflow, e2 as sub, e3 as sweep, e4 as symbol, e5 as voxelAt, e6 as within, e7 as worldPrefetchLayer } from './world-qekkXjJv.mjs';
9
+ import { K as KernelMeta } from './library-DXYaMFhi.mjs';
10
+ export { a as KernelArgMeta, b as KernelLibrary, c as KernelSlotMeta, L as LibraryMeta, r as readKernelLibrary } from './library-DXYaMFhi.mjs';
11
+ import { s as LockstepKernelHost, t as LockstepLink, D as LockstepSession } from './lockstep-BLf6dglI.mjs';
12
+ import { B as Box3, S as Sphere, t as CameraProjection } from './terrain-C-XC1Oui.mjs';
13
+ export { u as CameraProjectionOptions, v as Cylindrical, D as DomInputOptions, F as Frustum, G as GamepadLike, w as GamepadPoller, x as GamepadSource, y as GrassOptions, I as InputSurface, L as LayerOptions, N as NodeMatrixSource, z as Plane, A as PlanetOptions, s as PointerLockDocument, q as PointerLockTarget, E as ProjectionMode, i as Proposal, H as Ray, J as ScatterColumns, K as ScatterRules, O as Spherical, T as Terrain, Q as TerrainOptions, U as TerrainRecipe, V as Triangle, W as attachDomInput, l as chemistryAiSection, m as chemistryAiToml, X as exitPointerLock, Y as isPointerLocked, Z as noise, _ as openPlanet, $ as openTerrain, p as proposalText, o as proposeReaction, a0 as requestOrientationPermission, a1 as requestPointerLock, a2 as screenOrientationDegrees, a3 as wheelPixels } from './terrain-C-XC1Oui.mjs';
14
+ import { b as Graphics, l as PredictorOptions, m as SceneryEdit } from './fluid-DLlEj2cs.mjs';
15
+ export { B as BatchedDraw, n as CLOTH_DEFAULTS, o as ClothCollider, i as ClothOptions, p as ClothPinning, h as ClothShape, j as ClothSheet, C as Cloths, D as DEFAULT_HORIZONS, q as DEFAULT_PREFETCH_BUDGET, g as Fluid, r as FluidColliderOptions, d as FluidDesc, e as FluidEmitterDesc, c as FluidGridDesc, s as FluidLook, F as FluidMaterial, t as FluidShape, f as GamePrefetch, G as GameScene, a as GameSystem, u as GraphicsScenery, I as InstancedBatch, N as NEXT_SCENE_BUDGET, v as PredictorStats, P as PrefetchAssets, E as PrefetchEntryState, w as PrefetchEye, x as PrefetchReach, y as PrefetchStreamOptions, Q as QuatLike, z as ReachGrid, A as ReachNav, H as Renderable, J as SCENERY_CHUNK_EXTENSION, K as SCENERY_LOAD_SHARE, L as SCENERY_MANIFEST_MAGIC, M as SCENERY_MANIFEST_VERSION, O as SCENERY_MANIFEST_VERSION_PARTS, T as SCENERY_NEED_SHARE, U as SCENERY_PART_COARSE, V as SCENERY_PART_FINE, W as SCENERY_PART_MIDDLE, X as SCENERY_PART_WHOLE, Y as SCENERY_TIER_RADII, S as SceneManager, Z as ScenePrefetch, _ as ScenePrefetchDesc, $ as Scenery, a0 as SceneryAssetReader, a1 as SceneryDrapeOptions, a2 as SceneryGrid, a3 as SceneryLoadOptions, a4 as SceneryManifest, a5 as SceneryMotionOptions, a6 as ScenerySource, a7 as SceneryStandIn, a8 as SceneryStats, a9 as SplatBodyOptions, aa as StreamPredictor, ab as parseSceneryManifest, ac as prefetchCone, ad as sceneryEntryRows, ae as sceneryFirstView, af as sceneryPartDrawLevel, ag as sceneryPartReach, ah as sceneryPrefetchItems, ai as sceneryTierRadii } from './fluid-DLlEj2cs.mjs';
16
+ export { d as HOT_EXPORT, H as HotModule, a as HotReloader, b as HotReport, c as HotScenes, e as acceptHot } from './hot-DH3nOhQD.mjs';
17
+ export { jH as SafeAreaInsets, lc as SurfaceSafeAreaListener } from './local-D8_I6UeL.mjs';
18
+ export { D as DEFAULT_WORKLET_SIZES, a as ENGINE_MIX_RATE, E as EngineGraphicsOptions, b as WORKLET_PROCESSOR_NAME, c as WORKLET_PROCESSOR_SOURCE, d as WorkletAudio, W as WorkletAudioOptions, e as WorkletSizes, s as sharedMemoryAvailable } from './features-CZB4rmcD.mjs';
19
+ export { a as AnalyserId, A as Audio, B as BusId, E as EmitterFeedId, b as EmitterFields, c as EmitterOptions, I as ImpulseDesc, d as ImpulseResponse, R as REVERB_PRESETS, e as ReverbDesc, f as ReverbPreset, S as SoundId, g as StreamId, V as VoiceId, h as encodePanner, i as generateImpulse, j as impulseFrames, v as validateLoop, w as writeImpulse } from './audio-DhvyjqdA.mjs';
20
+ import { T as TickRoomTransport } from './tick-transport-C8QEh8Uw.mjs';
21
+ export { R as RealtimeRoom, a as TickRoomOptions, b as TickRoomSource, j as joinTickRoom } from './tick-transport-C8QEh8Uw.mjs';
22
+ export { I as InMemoryNetworkMemory, N as NetworkMemory, R as RoomClient, a as RoomClientOptions, d as RoomPhase, e as RoomPose, f as RoomPresence, g as RoomStats, S as StorageNetworkMemory } from './client-hTKbCuhG.mjs';
23
+ export { R as RoomDialer } from './link-BUTqGmyi.mjs';
24
+ export { W as WebSocketDialer, a as WebTransportDialer } from './web-transport-aYEqXMd9.mjs';
25
+ import { E as EngineRuntime } from './runtime-BRWfkf_q.mjs';
26
+ import { N as NetworkHint } from './network-ZXLD7l1b.mjs';
27
+ export { F as FeedPrefetchLevel, a as NetworkKind, b as PREFETCH_DEPTH, P as PrefetchDepth, p as prefetchDepth } from './network-ZXLD7l1b.mjs';
28
+ import { C as CatalogueKind, S as SceneCatalogue } from './catalogue-DzrTXP3v.mjs';
29
+ export { a as SCENE_CATALOGUE_VERSION, b as STARTER_CATALOGUE, c as SceneAxis, d as SceneKindMeta, e as SceneKinds, f as SceneSizeClass, g as SceneVec3, h as StarterKind, i as extendCatalogue } from './catalogue-DzrTXP3v.mjs';
30
+ import { b as StudioOutgoing, a as StudioMessage } from './studio-CowqWqez.mjs';
31
+ export { C as CANNOT_REWIND, N as NOT_RECORDING, T as TIMELINE_PREFIX, a as TIMELINE_REPORT, b as TIMELINE_TOPIC, c as TimelineMoment, d as TimelineProof, e as TimelineRefused, f as TimelineState } from './timeline-protocol-hp6e8zFB.mjs';
32
+ import './schema-BrWxzKp6.mjs';
33
+ import './ui-DwHicuFv.mjs';
34
+ import './vars-Dc_PrhBK.mjs';
35
+ import './state-replica-stMtdkVD.mjs';
36
+
37
+ declare const MEDIA_VOLUME_FEATURE = "media_volume_1";
38
+
39
+ declare const GAME_API_VERSION = "0.1.0";
40
+ declare const NO_RESOURCE = 0;
41
+ declare const ALL_LAYERS = 4294967295;
42
+
43
+ declare function engineLockstepHost(engine: KernelEngine | null): LockstepKernelHost | null;
44
+ declare function allocateLockstepState(engine: KernelEngine | null, bytes: number): Uint8Array | null;
45
+
46
+ type LoopElement = "f32" | "f64" | "i32" | "u32" | "u8";
47
+ type LoopFold = "+" | "-" | "*" | "/" | "min" | "max";
48
+ type LoopSchedule = "auto" | "kernel" | "js";
49
+ type LoopArray = Float32Array | Float64Array | Int32Array | Uint32Array | Uint8Array;
50
+ type RowArray = Int32Array | Uint32Array;
51
+ interface LoopField {
52
+ readonly kind: LoopElement;
53
+ readonly read: boolean;
54
+ readonly write: boolean;
55
+ readonly bind: number;
56
+ readonly offset: number;
57
+ readonly gather: number;
58
+ }
59
+ interface LoopTable {
60
+ readonly bind: number;
61
+ readonly kind: LoopElement;
62
+ }
63
+ interface LoopPayload {
64
+ readonly meta: KernelMeta;
65
+ readonly program: string;
66
+ readonly fields: readonly LoopField[];
67
+ readonly bindings: number;
68
+ readonly scalars: number;
69
+ readonly offsets: number;
70
+ readonly gathers: number;
71
+ readonly tables?: readonly LoopTable[];
72
+ readonly folds: readonly LoopFold[];
73
+ readonly origin: number;
74
+ readonly minRows: number;
75
+ }
76
+ interface LoopEngine {
77
+ readonly memory: {
78
+ readonly buffer: ArrayBufferLike;
79
+ };
80
+ alloc(bytes: number, align: number): number;
81
+ free(at: number, bytes: number, align: number): void;
82
+ load(at: number, bytes: number): number;
83
+ unload?(program: number): void;
84
+ runRegion(program: number, columns: number, rows: number, count: number, args: number, argWords: number): number;
85
+ }
86
+ interface LoopSettings {
87
+ readonly schedule?: LoopSchedule;
88
+ readonly chunkRows?: number;
89
+ readonly enabled?: boolean;
90
+ }
91
+ interface LoopStats {
92
+ readonly kernelRuns: number;
93
+ readonly jsRuns: number;
94
+ readonly decided: "trial" | "kernel" | "js";
95
+ readonly kernelNsPerRow: number;
96
+ readonly jsNsPerRow: number;
97
+ }
98
+ declare const LOOP_MAX_REGION_ROWS: number;
99
+ declare function setLoopEngine(next: LoopEngine | null): void;
100
+ declare function loopEngineOf(kernels: KernelEngine | null): LoopEngine | null;
101
+ declare function configureLoops(next: LoopSettings): void;
102
+ declare function vmLoopEngine(arenaBytes?: number): LoopEngine;
103
+ declare class LoweredLoop {
104
+ readonly a: (LoopArray | null)[];
105
+ readonly s: Float64Array;
106
+ readonly o: Float64Array;
107
+ readonly g: (RowArray | null)[];
108
+ readonly r: Float64Array;
109
+ private readonly payload;
110
+ private readonly columns;
111
+ private readonly slotColumn;
112
+ private readonly slotStorage;
113
+ private readonly reductionColumn;
114
+ private readonly argWords;
115
+ private readonly argScalar;
116
+ private readonly argTable;
117
+ private readonly slotTable;
118
+ private readonly tableAt;
119
+ private readonly tableBytes;
120
+ private readonly argHalves;
121
+ private readonly argView;
122
+ private program;
123
+ private owner;
124
+ private ownerGeneration;
125
+ private arena;
126
+ private capacity;
127
+ private columnAt;
128
+ private columnViews;
129
+ private descriptorAt;
130
+ private argsAt;
131
+ private descriptor;
132
+ private argsView;
133
+ private sources;
134
+ private sourceArray;
135
+ private sourceStart;
136
+ private sourceRows;
137
+ private targets;
138
+ private targetRows;
139
+ private stamps;
140
+ private stamp;
141
+ private phase;
142
+ private pending;
143
+ private pendingAt;
144
+ private pendingRows;
145
+ private kernelMs;
146
+ private kernelRows;
147
+ private kernelRuns;
148
+ private jsMs;
149
+ private jsRows;
150
+ private jsRuns;
151
+ constructor(payload: LoopPayload);
152
+ get stats(): LoopStats;
153
+ run(n: number): boolean;
154
+ after(): void;
155
+ private decide;
156
+ release(): void;
157
+ private detach;
158
+ private attach;
159
+ private admissible;
160
+ private distinct;
161
+ private overlaps;
162
+ private spanStart;
163
+ private spanEnd;
164
+ private stageTables;
165
+ private execute;
166
+ private inPlace;
167
+ private reserve;
168
+ private source;
169
+ private target;
170
+ private prepare;
171
+ private finish;
172
+ }
173
+ interface LoopProbe {
174
+ enter(): number;
175
+ exit(loop: string, at: number, rows: number): void;
176
+ }
177
+ declare const LOOP_PROBE_GLOBAL = "__cimplify_loop_probe";
178
+ declare function loopProbe(): LoopProbe | null;
179
+ declare function lowerLoop(payload: string): LoweredLoop;
180
+
181
+ type RecordedArg = number | readonly number[];
182
+ interface KernelRecording {
183
+ readonly rows: number;
184
+ readonly columns: Readonly<Record<string, readonly number[]>>;
185
+ readonly storage: Readonly<Record<string, string>>;
186
+ readonly args: Readonly<Record<string, RecordedArg>>;
187
+ readonly objectiveArgs: Readonly<Record<string, RecordedArg>>;
188
+ readonly steps: number;
189
+ readonly warmup: number;
190
+ }
191
+ interface KernelRecordingOptions {
192
+ readonly args?: Readonly<Record<string, RecordedArg>>;
193
+ readonly objectiveArgs?: Readonly<Record<string, RecordedArg>>;
194
+ readonly steps: number;
195
+ readonly warmup?: number;
196
+ readonly fields?: readonly string[];
197
+ }
198
+ declare function kernelRecording<S extends TableSchema>(table: EntityTable<S>, options: KernelRecordingOptions): KernelRecording;
199
+
200
+ type f64 = number;
201
+ declare function f64(x: number | bigint | boolean): f64;
202
+ type u64 = bigint;
203
+ declare function u64(x: number | bigint | boolean): u64;
204
+ declare function toU32(x: number | bigint | boolean): number;
205
+ declare function f64Bits(lo: number, hi: number): f64;
206
+ declare function u64Words(lo: number, hi: number): u64;
207
+ declare function popcnt(x: number | bigint): number;
208
+ declare function clz(x: number | bigint): number;
209
+ declare function ctz(x: number | bigint): number;
210
+ declare function rotl<T extends number | bigint>(x: T, by: number): T;
211
+ declare function rotr<T extends number | bigint>(x: T, by: number): T;
212
+ declare function bitExtract<T extends number | bigint>(x: T, offset: number, count: number): T;
213
+ declare function bitInsert<T extends number | bigint>(base: T, value: T, offset: number, count: number): T;
214
+ declare function morton2(x: number, y: number): number;
215
+ declare function morton3(x: number, y: number, z: number): number;
216
+ declare function morton2Wide(x: number, y: number): u64;
217
+ declare function morton3Wide(x: number, y: number, z: number): u64;
218
+ declare function unmorton2(code: number | bigint): {
219
+ x: number;
220
+ y: number;
221
+ };
222
+ declare function unmorton3(code: number | bigint): {
223
+ x: number;
224
+ y: number;
225
+ z: number;
226
+ };
227
+
228
+ type KernelArrayKind = "f32" | "i32" | "u32";
229
+ type ArrayData<K extends KernelArrayKind> = K extends "f32" ? Float32Array : K extends "i32" ? Int32Array : Uint32Array;
230
+ interface KernelArray<K extends KernelArrayKind = KernelArrayKind> {
231
+ readonly name: string;
232
+ readonly kind: K;
233
+ readonly length: number;
234
+ readonly data: ArrayData<K>;
235
+ }
236
+ type KernelTable<K extends KernelArrayKind> = ArrayData<K>;
237
+ declare function kernelArray<K extends KernelArrayKind>(name: string, desc: {
238
+ readonly kind: K;
239
+ readonly length: number;
240
+ }): KernelArray<K>;
241
+ declare function rowSum<T extends number>(value: T): T;
242
+ declare function rowMin<T extends number>(value: T): T;
243
+ declare function rowMax<T extends number>(value: T): T;
244
+ declare function rowCount(when?: boolean): u32;
245
+ declare function rowArgMin(value: number): u32;
246
+ declare function rowArgMax(value: number): u32;
247
+ declare function rowPrefixSum<T extends number>(value: T, exclusive?: boolean): T;
248
+ type RowScanOp = "add" | "mul" | "min" | "max" | "and" | "or" | "xor";
249
+ declare function rowScan<T extends number>(value: T, op: RowScanOp, exclusive?: boolean): T;
250
+ declare function rowRecur<T extends number>(a: T, b: T, exclusive?: boolean): T;
251
+ declare function rowFeedback(b: f32, a1: f32, a2: f32): f32;
252
+ declare function rowPhase(increment: f32, period: f32, exclusive?: boolean): f32;
253
+ declare function rowPhase64(increment: f32, period: f32, exclusive?: boolean): f64;
254
+ declare function histogram(bins: KernelArray<"u32" | "i32">, bin: u32): void;
255
+ declare function scatterAdd(target: KernelArray, index: u32, value: f32 | number): void;
256
+ declare function compactRows(list: KernelArray<"u32">): u32;
257
+ declare function sortRows(list: KernelArray<"u32">, key: number, descending?: boolean): u32;
258
+ declare function topRows(list: KernelArray<"u32">, key: number, k: u32, smallest?: boolean): u32;
259
+ declare function groupRows(key: number): {
260
+ readonly group: u32;
261
+ readonly groups: u32;
262
+ };
263
+ declare function dedupRows(key: number): {
264
+ readonly first: boolean;
265
+ readonly distinct: u32;
266
+ };
267
+
268
+ declare function f32Bits(x: number): number;
269
+ declare function f32From(bits: number): number;
270
+ declare function exp$1(x: number): number;
271
+ declare function exp2(x: number): number;
272
+ declare function log$1(x: number): number;
273
+ declare function log2$1(x: number): number;
274
+ declare function pow$1(xIn: number, yIn: number): number;
275
+ declare function sin$1(x: number): number;
276
+ declare function cos$1(x: number): number;
277
+ declare function tan$1(x: number): number;
278
+ declare function atan2$1(y: number, x: number): number;
279
+ declare function atan$1(x: number): number;
280
+ declare function asin$1(xIn: number): number;
281
+ declare function acos$1(xIn: number): number;
282
+ declare const FMATH_CONSTANTS: {
283
+ readonly EXP2_HI: number[];
284
+ readonly EXP2_LO: number[];
285
+ readonly EXP2_POLY: number[];
286
+ readonly EXP_POLY: number[];
287
+ readonly INV_LN2_N: number;
288
+ readonly SHIFT: number;
289
+ readonly SHIFT_SCALED: number;
290
+ readonly EXP_LOW: -104;
291
+ readonly EXP_HIGH: 89;
292
+ readonly EXP2_LOW: -151;
293
+ readonly EXP2_HIGH: 129;
294
+ readonly INV_C: number[];
295
+ readonly LOG_C: number[];
296
+ readonly LOG2_C: number[];
297
+ readonly LN2: number;
298
+ readonly LOG_POLY: number[];
299
+ readonly LOG2_POLY: number[];
300
+ readonly POW_POLY: number[];
301
+ readonly POW_SIGN_BIAS: number;
302
+ readonly POW_OVERFLOW: number;
303
+ readonly POW_SATURATE: number;
304
+ readonly POW_UNDERFLOW: -150;
305
+ readonly LOG_OFF: 1060306944;
306
+ readonly SUBNORMAL_SCALE: 8388608;
307
+ readonly SUBNORMAL_BIAS: number;
308
+ readonly MIN_NORMAL: 8388608;
309
+ readonly INFINITY_BITS: 2139095040;
310
+ readonly ONE_BITS: 1065353216;
311
+ readonly F32_MAX: number;
312
+ readonly HPI_INV: number;
313
+ readonly HPI: number;
314
+ readonly PI63: number;
315
+ readonly COS_C1: number;
316
+ readonly COS_C2: number;
317
+ readonly COS_C3: number;
318
+ readonly COS_C4: number;
319
+ readonly SIN_S1: number;
320
+ readonly SIN_S2: number;
321
+ readonly SIN_S3: number;
322
+ readonly LARGE_TOP: number;
323
+ readonly QUADRANT_ROUND: 8388608;
324
+ readonly INV_PIO4: number[];
325
+ readonly QUARTER_PI: number;
326
+ readonly HALF_PI: number;
327
+ readonly TAN_PI_8: number;
328
+ readonly ATAN_COEFFS: number[];
329
+ };
330
+
331
+ declare const fmath_FMATH_CONSTANTS: typeof FMATH_CONSTANTS;
332
+ declare const fmath_exp2: typeof exp2;
333
+ declare const fmath_f32Bits: typeof f32Bits;
334
+ declare const fmath_f32From: typeof f32From;
335
+ declare namespace fmath {
336
+ export { fmath_FMATH_CONSTANTS as FMATH_CONSTANTS, acos$1 as acos, asin$1 as asin, atan$1 as atan, atan2$1 as atan2, cos$1 as cos, exp$1 as exp, fmath_exp2 as exp2, fmath_f32Bits as f32Bits, fmath_f32From as f32From, log$1 as log, log2$1 as log2, pow$1 as pow, sin$1 as sin, tan$1 as tan };
337
+ }
338
+
339
+ declare function scalbn(x: number, n: number): number;
340
+ declare function sin(x: number): number;
341
+ declare function cos(x: number): number;
342
+ declare function tan(x: number): number;
343
+ declare function atan(x: number): number;
344
+ declare function atan2(y: number, x: number): number;
345
+ declare function asin(x: number): number;
346
+ declare function acos(x: number): number;
347
+ declare function exp(x: number): number;
348
+ declare function log(x: number): number;
349
+ declare function log2(x: number): number;
350
+ declare function pow(x: number, y: number): number;
351
+
352
+ declare const fmath64_acos: typeof acos;
353
+ declare const fmath64_asin: typeof asin;
354
+ declare const fmath64_atan: typeof atan;
355
+ declare const fmath64_atan2: typeof atan2;
356
+ declare const fmath64_cos: typeof cos;
357
+ declare const fmath64_exp: typeof exp;
358
+ declare const fmath64_log: typeof log;
359
+ declare const fmath64_log2: typeof log2;
360
+ declare const fmath64_pow: typeof pow;
361
+ declare const fmath64_scalbn: typeof scalbn;
362
+ declare const fmath64_sin: typeof sin;
363
+ declare const fmath64_tan: typeof tan;
364
+ declare namespace fmath64 {
365
+ export { fmath64_acos as acos, fmath64_asin as asin, fmath64_atan as atan, fmath64_atan2 as atan2, fmath64_cos as cos, fmath64_exp as exp, fmath64_log as log, fmath64_log2 as log2, fmath64_pow as pow, fmath64_scalbn as scalbn, fmath64_sin as sin, fmath64_tan as tan };
366
+ }
367
+
368
+ declare const LANE_OP: {
369
+ readonly F64_ADD: 8192;
370
+ readonly F64_SUB: 8193;
371
+ readonly F64_MUL: 8194;
372
+ readonly F64_DIV: 8195;
373
+ readonly F64_MIN: 8196;
374
+ readonly F64_MAX: 8197;
375
+ readonly F64_MOD: 8198;
376
+ readonly F64_POW: 8199;
377
+ readonly F64_ATAN2: 8200;
378
+ readonly F64_NEG: 8208;
379
+ readonly F64_ABS: 8209;
380
+ readonly F64_SQRT: 8210;
381
+ readonly F64_FLOOR: 8211;
382
+ readonly F64_CEIL: 8212;
383
+ readonly F64_ROUND: 8213;
384
+ readonly F64_TRUNC: 8214;
385
+ readonly F64_SIGN: 8215;
386
+ readonly F64_SIN: 8216;
387
+ readonly F64_COS: 8217;
388
+ readonly F64_TAN: 8218;
389
+ readonly F64_ASIN: 8219;
390
+ readonly F64_ACOS: 8220;
391
+ readonly F64_ATAN: 8221;
392
+ readonly F64_EXP: 8222;
393
+ readonly F64_LOG: 8223;
394
+ readonly F64_LOG2: 8224;
395
+ readonly F64_LT: 8240;
396
+ readonly F64_LE: 8241;
397
+ readonly F64_EQ: 8242;
398
+ readonly F64_NE: 8243;
399
+ readonly F64_FROM_F32: 8256;
400
+ readonly F64_FROM_I32: 8257;
401
+ readonly F64_FROM_U32: 8258;
402
+ readonly F64_TO_F32: 8259;
403
+ readonly F64_TO_I32: 8260;
404
+ readonly F64_TO_U32: 8261;
405
+ readonly F64_FROM_U64: 8262;
406
+ readonly F64_TO_U64: 8263;
407
+ readonly BIT_POPCNT: 8448;
408
+ readonly BIT_CLZ: 8449;
409
+ readonly BIT_CTZ: 8450;
410
+ readonly BIT_ROTL: 8451;
411
+ readonly BIT_ROTR: 8452;
412
+ readonly BIT_EXTRACT: 8453;
413
+ readonly BIT_INSERT: 8454;
414
+ readonly BIT_MORTON2: 8455;
415
+ readonly BIT_MORTON3: 8456;
416
+ readonly BIT_UNMORTON2: 8457;
417
+ readonly BIT_UNMORTON3: 8458;
418
+ readonly BIT64_POPCNT: 8464;
419
+ readonly BIT64_CLZ: 8465;
420
+ readonly BIT64_CTZ: 8466;
421
+ readonly BIT64_ROTL: 8467;
422
+ readonly BIT64_ROTR: 8468;
423
+ readonly BIT64_EXTRACT: 8469;
424
+ readonly BIT64_INSERT: 8470;
425
+ readonly BIT64_MORTON2: 8471;
426
+ readonly BIT64_MORTON3: 8472;
427
+ readonly BIT64_UNMORTON2: 8473;
428
+ readonly BIT64_UNMORTON3: 8474;
429
+ readonly U64_SHL: 8480;
430
+ readonly U64_SHR: 8481;
431
+ readonly U64_MUL: 8482;
432
+ readonly U64_DIV: 8483;
433
+ readonly U64_REM: 8484;
434
+ };
435
+ declare const INSERT_WIDTH_SHIFT = 8;
436
+ declare const CANONICAL_NAN32 = 2143289344;
437
+ declare function laneSignature(sub: number): readonly [number, number] | null;
438
+ declare function joinF64(lo: number, hi: number): number;
439
+ declare function joinU64(lo: number, hi: number): bigint;
440
+ declare function toUint32(x: number): number;
441
+ declare function toUint64(x: number): bigint;
442
+ declare function runLanes(sub: number, inputs: readonly number[], targets: readonly number[], n: number, read: (word: number, lane: number) => number, write: (register: number, lane: number, value: number) => void): void;
443
+ declare function evalLane(sub: number, v: Uint32Array, out: Uint32Array): void;
444
+
445
+ declare const lanes_CANONICAL_NAN32: typeof CANONICAL_NAN32;
446
+ declare const lanes_INSERT_WIDTH_SHIFT: typeof INSERT_WIDTH_SHIFT;
447
+ declare const lanes_LANE_OP: typeof LANE_OP;
448
+ declare const lanes_evalLane: typeof evalLane;
449
+ declare const lanes_joinF64: typeof joinF64;
450
+ declare const lanes_joinU64: typeof joinU64;
451
+ declare const lanes_laneSignature: typeof laneSignature;
452
+ declare const lanes_runLanes: typeof runLanes;
453
+ declare const lanes_toUint32: typeof toUint32;
454
+ declare const lanes_toUint64: typeof toUint64;
455
+ declare namespace lanes {
456
+ export { lanes_CANONICAL_NAN32 as CANONICAL_NAN32, lanes_INSERT_WIDTH_SHIFT as INSERT_WIDTH_SHIFT, lanes_LANE_OP as LANE_OP, lanes_evalLane as evalLane, lanes_joinF64 as joinF64, lanes_joinU64 as joinU64, lanes_laneSignature as laneSignature, lanes_runLanes as runLanes, lanes_toUint32 as toUint32, lanes_toUint64 as toUint64 };
457
+ }
458
+
459
+ declare const CurveKind: {
460
+ readonly step: 0;
461
+ readonly linear: 1;
462
+ readonly hermite: 2;
463
+ readonly bezier: 3;
464
+ };
465
+ interface KernelCurve {
466
+ readonly kind: number;
467
+ readonly keys: readonly number[];
468
+ readonly values: readonly number[];
469
+ readonly channels?: number;
470
+ readonly tangents?: readonly number[];
471
+ readonly outs?: readonly number[];
472
+ readonly ins?: readonly number[];
473
+ }
474
+ interface KernelLut {
475
+ readonly x0: number;
476
+ readonly scale: number;
477
+ readonly values: readonly number[];
478
+ readonly linear?: boolean;
479
+ readonly wrap?: boolean;
480
+ }
481
+ interface KernelLut2 {
482
+ readonly nx: number;
483
+ readonly ny: number;
484
+ readonly x0: number;
485
+ readonly y0: number;
486
+ readonly sx: number;
487
+ readonly sy: number;
488
+ readonly values: readonly number[];
489
+ readonly linear?: boolean;
490
+ readonly wrap?: boolean;
491
+ }
492
+ interface KernelSampler {
493
+ readonly width: number;
494
+ readonly height: number;
495
+ readonly channels: number;
496
+ readonly x0: number;
497
+ readonly y0: number;
498
+ readonly scale: number;
499
+ readonly cell: number;
500
+ readonly wrap?: boolean;
501
+ }
502
+ type GridSize = FixedArray<u32, 3>;
503
+ declare function curve$1(c: KernelCurve, x: f32, channel?: u32): f32;
504
+ declare function gradient(c: KernelCurve, t: f32): vec4;
505
+ declare function lut(t: KernelLut, x: f32): f32;
506
+ declare function lut2(t: KernelLut2, x: f32, y: f32): f32;
507
+ declare function bindSampler(name: string, data: Float32Array): void;
508
+ declare function unbindSampler(name: string): void;
509
+ declare function sampler<S extends KernelSampler>(name: string, desc: S): S;
510
+ declare function sample(s: KernelSampler, x: f32, y: f32, channel?: u32, nearest?: boolean): f32;
511
+ declare function satBox(s: KernelSampler, x0: number, y0: number, x1: number, y1: number): f32;
512
+ declare function heightNormal(s: KernelSampler, x: f32, y: f32, channel?: u32): vec3;
513
+ declare function cell<T extends number>(field: T, dx: number, dy: number, dz: number, grid: GridSize, wrap?: boolean): T;
514
+ type mat3 = FixedArray<f32, 9>;
515
+ declare function mat3(...values: number[]): mat3;
516
+ type mat4 = FixedArray<f32, 16>;
517
+ declare function mat4(...values: number[]): mat4;
518
+ declare function m3mul(a: mat3, b: mat3): mat3;
519
+ declare function m4mul(a: mat4, b: mat4): mat4;
520
+ declare function m3vec(m: mat3, v: vec3): vec3;
521
+ declare function m4point(m: mat4, v: vec3): vec3;
522
+ declare function m4dir(m: mat4, v: vec3): vec3;
523
+ declare function m3transpose(m: mat3): mat3;
524
+ declare function m4transpose(m: mat4): mat4;
525
+ declare function m3inverse(m: mat3): mat3;
526
+ declare function m4inverseAffine(m: mat4): mat4;
527
+
528
+ declare const FAR = 100000000000000000000;
529
+ declare const NO_SEED = 4294967295;
530
+ declare const SCAN_BLOCK = 256;
531
+ declare const FFT_GPU_RELATIVE_BOUND: number;
532
+ declare function isFftSize(n: number): boolean;
533
+ declare class Fft {
534
+ readonly length: number;
535
+ readonly twiddleRe: Float32Array;
536
+ readonly twiddleIm: Float32Array;
537
+ readonly reverse: Uint16Array;
538
+ private readonly scale;
539
+ constructor(length: number);
540
+ transform(re: Float32Array, im: Float32Array, inverse: boolean, offset?: number, stride?: number): void;
541
+ forward(re: Float32Array, im: Float32Array): void;
542
+ inverse(re: Float32Array, im: Float32Array): void;
543
+ }
544
+ declare class Fft2 {
545
+ readonly width: number;
546
+ readonly height: number;
547
+ readonly rows: Fft;
548
+ readonly columns: Fft;
549
+ private readonly scale;
550
+ private native;
551
+ constructor(width: number, height: number);
552
+ get length(): number;
553
+ get onEngine(): boolean;
554
+ dispose(): void;
555
+ private runNative;
556
+ private pass;
557
+ forward(re: Float32Array, im: Float32Array): void;
558
+ inverse(re: Float32Array, im: Float32Array): void;
559
+ forwardReal(input: ArrayLike<number>, re: Float32Array, im: Float32Array): void;
560
+ }
561
+ declare function multiply(re: Float32Array, im: Float32Array, byRe: Float32Array, byIm: Float32Array): void;
562
+ declare class Convolver {
563
+ private readonly fft;
564
+ private readonly kernelRe;
565
+ private readonly kernelIm;
566
+ private readonly workRe;
567
+ private readonly workIm;
568
+ private native;
569
+ constructor(width: number, height: number, kernel: ArrayLike<number>);
570
+ get onEngine(): boolean;
571
+ dispose(): void;
572
+ private runNative;
573
+ convolve(image: ArrayLike<number>, out: Float32Array): void;
574
+ convolvePair(a: ArrayLike<number>, b: ArrayLike<number>, outA: Float32Array, outB: Float32Array): void;
575
+ }
576
+ declare function scan(values: Float32Array, offset?: number, length?: number, stride?: number): void;
577
+ declare class SummedAreaTable {
578
+ readonly width: number;
579
+ readonly height: number;
580
+ private native;
581
+ constructor(width: number, height: number);
582
+ get onEngine(): boolean;
583
+ dispose(): void;
584
+ build(input: ArrayLike<number>, out: Float32Array): void;
585
+ buildU32(input: ArrayLike<number>, out: Uint32Array): void;
586
+ }
587
+ declare function boxSum(table: Float32Array, width: number, height: number, x0: number, y0: number, x1: number, y1: number): number;
588
+ declare function boxSumU32(table: Uint32Array, width: number, height: number, x0: number, y0: number, x1: number, y1: number): number;
589
+ declare const BRUTE_FORCE_SEEDS = 2;
590
+ declare const BRUTE_FORCE_SEEDS_LARGE = 5;
591
+ declare const LARGE_GRID: number;
592
+ declare function distanceMethod(cells: number, seeds: number): "bruteForce" | "envelope";
593
+ declare class DistanceTransform {
594
+ readonly width: number;
595
+ readonly height: number;
596
+ readonly depth: number;
597
+ private readonly v;
598
+ private readonly z;
599
+ private readonly line;
600
+ private readonly argLine;
601
+ private readonly outLine;
602
+ private readonly outArg;
603
+ private readonly cost;
604
+ private readonly seeds;
605
+ readonly nearest: Uint32Array;
606
+ constructor(width: number, height: number, depth?: number);
607
+ private native;
608
+ get onEngine(): boolean;
609
+ dispose(): void;
610
+ private nativeMask;
611
+ get cells(): number;
612
+ private run;
613
+ squared(cost: ArrayLike<number>, out: Float32Array): void;
614
+ fromMask(mask: ArrayLike<number>, out: Float32Array): void;
615
+ envelopeFromMask(mask: ArrayLike<number>, out: Float32Array): void;
616
+ bruteForce(mask: ArrayLike<number>, out: Float32Array): void;
617
+ signed(mask: ArrayLike<number>, scratch: Float32Array, out: Float32Array): void;
618
+ }
619
+ declare function jfaSteps(width: number, height: number): number[];
620
+ declare function jumpFlood(width: number, height: number, mask: ArrayLike<number>, a: Uint32Array, b: Uint32Array, squared: Uint32Array): void;
621
+ type PoissonBoundary = "dirichlet" | "neumann";
622
+ declare const PRE_SMOOTH = 2;
623
+ declare const POST_SMOOTH = 2;
624
+ declare const COARSE_SWEEPS = 64;
625
+ declare class Multigrid {
626
+ readonly boundary: PoissonBoundary;
627
+ private readonly levels;
628
+ private readonly axes;
629
+ private readonly weights;
630
+ constructor(width: number, height: number, depth: number, spacing: number, boundary: PoissonBoundary);
631
+ get cells(): number;
632
+ get depth(): number;
633
+ private sumAt;
634
+ private diagonal;
635
+ private smooth;
636
+ private residual;
637
+ private restrict;
638
+ private prolong;
639
+ private static removeMean;
640
+ vCycle(): void;
641
+ private native;
642
+ get onEngine(): boolean;
643
+ dispose(): void;
644
+ solve(u: Float32Array, f: ArrayLike<number>, cycles: number): number;
645
+ }
646
+
647
+ declare const transforms_BRUTE_FORCE_SEEDS: typeof BRUTE_FORCE_SEEDS;
648
+ declare const transforms_BRUTE_FORCE_SEEDS_LARGE: typeof BRUTE_FORCE_SEEDS_LARGE;
649
+ declare const transforms_COARSE_SWEEPS: typeof COARSE_SWEEPS;
650
+ type transforms_Convolver = Convolver;
651
+ declare const transforms_Convolver: typeof Convolver;
652
+ type transforms_DistanceTransform = DistanceTransform;
653
+ declare const transforms_DistanceTransform: typeof DistanceTransform;
654
+ declare const transforms_FAR: typeof FAR;
655
+ declare const transforms_FFT_GPU_RELATIVE_BOUND: typeof FFT_GPU_RELATIVE_BOUND;
656
+ type transforms_Fft = Fft;
657
+ declare const transforms_Fft: typeof Fft;
658
+ type transforms_Fft2 = Fft2;
659
+ declare const transforms_Fft2: typeof Fft2;
660
+ declare const transforms_LARGE_GRID: typeof LARGE_GRID;
661
+ type transforms_Multigrid = Multigrid;
662
+ declare const transforms_Multigrid: typeof Multigrid;
663
+ declare const transforms_NO_SEED: typeof NO_SEED;
664
+ declare const transforms_POST_SMOOTH: typeof POST_SMOOTH;
665
+ declare const transforms_PRE_SMOOTH: typeof PRE_SMOOTH;
666
+ type transforms_PoissonBoundary = PoissonBoundary;
667
+ declare const transforms_SCAN_BLOCK: typeof SCAN_BLOCK;
668
+ type transforms_SummedAreaTable = SummedAreaTable;
669
+ declare const transforms_SummedAreaTable: typeof SummedAreaTable;
670
+ declare const transforms_boxSum: typeof boxSum;
671
+ declare const transforms_boxSumU32: typeof boxSumU32;
672
+ declare const transforms_distanceMethod: typeof distanceMethod;
673
+ declare const transforms_isFftSize: typeof isFftSize;
674
+ declare const transforms_jfaSteps: typeof jfaSteps;
675
+ declare const transforms_jumpFlood: typeof jumpFlood;
676
+ declare const transforms_multiply: typeof multiply;
677
+ declare const transforms_scan: typeof scan;
678
+ declare namespace transforms {
679
+ export { transforms_BRUTE_FORCE_SEEDS as BRUTE_FORCE_SEEDS, transforms_BRUTE_FORCE_SEEDS_LARGE as BRUTE_FORCE_SEEDS_LARGE, transforms_COARSE_SWEEPS as COARSE_SWEEPS, transforms_Convolver as Convolver, transforms_DistanceTransform as DistanceTransform, transforms_FAR as FAR, transforms_FFT_GPU_RELATIVE_BOUND as FFT_GPU_RELATIVE_BOUND, transforms_Fft as Fft, transforms_Fft2 as Fft2, transforms_LARGE_GRID as LARGE_GRID, transforms_Multigrid as Multigrid, transforms_NO_SEED as NO_SEED, transforms_POST_SMOOTH as POST_SMOOTH, transforms_PRE_SMOOTH as PRE_SMOOTH, type transforms_PoissonBoundary as PoissonBoundary, transforms_SCAN_BLOCK as SCAN_BLOCK, transforms_SummedAreaTable as SummedAreaTable, transforms_boxSum as boxSum, transforms_boxSumU32 as boxSumU32, transforms_distanceMethod as distanceMethod, transforms_isFftSize as isFftSize, transforms_jfaSteps as jfaSteps, transforms_jumpFlood as jumpFlood, transforms_multiply as multiply, transforms_scan as scan };
680
+ }
681
+
682
+ declare const WAKE_NEVER: u32;
683
+ interface Regenerating {
684
+ hp: f32;
685
+ cap: f32;
686
+ wake: u32;
687
+ period: u32;
688
+ }
689
+ declare const REGENERATING_FIELDS: {
690
+ readonly hp: "f32";
691
+ readonly cap: "f32";
692
+ readonly wake: "u32";
693
+ readonly period: "u32";
694
+ };
695
+ declare function regenerate(e: Each<Regenerating>, tick: u32, amount: f32): void;
696
+
697
+ declare const STEER_STOP: u32;
698
+ declare const STEER_SEEK: u32;
699
+ declare const STEER_DIRECTION: u32;
700
+ declare const STEER_FACE: u32;
701
+ interface SteerAgent {
702
+ pos: vec2;
703
+ vel: vec2;
704
+ desired: vec2;
705
+ facing: vec2;
706
+ point: vec2;
707
+ mode: u32;
708
+ arrive: f32;
709
+ throttle: f32;
710
+ speedScale: f32;
711
+ }
712
+ interface Particle {
713
+ pos: vec3;
714
+ vel: vec3;
715
+ age: f32;
716
+ life: f32;
717
+ size: f32;
718
+ }
719
+ interface ParticleLook {
720
+ age: f32;
721
+ life: f32;
722
+ tint: vec4;
723
+ scale: f32;
724
+ }
725
+ interface Bounced {
726
+ pos: vec3;
727
+ vel: vec3;
728
+ }
729
+ declare const LIFE_TINT: {
730
+ kind: 1;
731
+ channels: number;
732
+ keys: number[];
733
+ values: number[];
734
+ };
735
+ declare const LIFE_SIZE: {
736
+ kind: 2;
737
+ keys: number[];
738
+ values: number[];
739
+ tangents: number[];
740
+ };
741
+ declare function arriveVelocity(offset: vec2, arrive: f32, top: f32, throttle: f32, slowing: f32): vec2;
742
+ declare function separationPush(offset: vec2, radius: f32): vec2;
743
+ declare function limitLength2(v: vec2, limit: f32): vec2;
744
+ declare function steerAccelerate(desired: vec2, vel: vec2, budget: f32): vec2;
745
+ declare function headingFrom(v: vec2, fallback: vec2, threshold: f32): vec2;
746
+ declare function steerAgent(e: Each<SteerAgent>, dt: f32, maxSpeed: f32, maxAccel: f32, separationRadius: f32, separationWeight: f32, kinematic: i32): void;
747
+ declare function curlForce(pos: vec3, scale: f32, time: f32, strength: f32): vec3;
748
+ declare function particleVelocity(vel: vec3, force: vec3, damping: f32, dt: f32): vec3;
749
+ declare function planeBounce(pos: vec3, vel: vec3, plane: vec4, bounce: f32): Bounced;
750
+ declare function particleMotion(e: Each<Particle>, dt: f32, gravity: vec3, drag: f32, plane: vec4, bounce: f32, collide: i32, noise: vec3): void;
751
+ declare function particleLook(e: Each<ParticleLook>): void;
752
+
753
+ declare const PARTICLE_FIELDS: {
754
+ readonly pos: "vec3";
755
+ readonly vel: "vec3";
756
+ readonly age: "f32";
757
+ readonly life: "f32";
758
+ readonly size: "f32";
759
+ };
760
+ declare const PARTICLE_LOOK_FIELDS: {
761
+ readonly age: "f32";
762
+ readonly life: "f32";
763
+ readonly tint: "vec4";
764
+ readonly scale: "f32";
765
+ };
766
+ declare function particleStep(e: Each<Particle>, dt: f32, gravity: vec3, drag: f32, plane: vec4, bounce: f32, collide: i32, noise: vec3): void;
767
+
768
+ declare const STEER_AGENT_FIELDS: {
769
+ readonly pos: "vec2";
770
+ readonly vel: "vec2";
771
+ readonly desired: "vec2";
772
+ readonly facing: "vec2";
773
+ readonly point: "vec2";
774
+ readonly mode: "u32";
775
+ readonly arrive: "f32";
776
+ readonly throttle: "f32";
777
+ readonly speedScale: "f32";
778
+ };
779
+
780
+ declare const steerAgents: Kernel<Each<SteerAgent>, [dt: number, maxSpeed: number, maxAccel: number, separationRadius: number, separationWeight: number, kinematic: number]>;
781
+ declare const particleRules: Kernel<Each<Particle>, [dt: number, gravity: vec3, drag: number, plane: vec4, bounce: number, collide: number, noise: vec3]>;
782
+ declare const particleColours: Kernel<Each<ParticleLook>, []>;
783
+ declare const particleMotions: Kernel<Each<Particle>, [dt: number, gravity: vec3, drag: number, plane: vec4, bounce: number, collide: number, noise: vec3]>;
784
+ declare const regenerating: Kernel<Each<Regenerating>, [tick: number, amount: number]>;
785
+
786
+ declare const NEVER = 4294967295;
787
+ declare const UNREACHED = 4294967295;
788
+ declare const NO_LABEL = 4294967295;
789
+ declare function isDue(tick: number, wake: number): boolean;
790
+ declare class KernelSchedule {
791
+ private readonly mask;
792
+ private now;
793
+ private readonly head;
794
+ private readonly next;
795
+ private readonly prev;
796
+ private readonly slotOf;
797
+ private readonly rows;
798
+ private len;
799
+ private count;
800
+ constructor(capacity: number, horizon?: number);
801
+ rebuild(wake: ArrayLike<number>, count: number, now: number): void;
802
+ private unlink;
803
+ private insert;
804
+ set(row: number, wake: number): void;
805
+ collect(tick: number, wake: ArrayLike<number>): Uint32Array;
806
+ due(): Uint32Array;
807
+ settle(wake: ArrayLike<number>): void;
808
+ into(selection: Selection): Selection;
809
+ }
810
+ declare function stagger(tick: number, every: number, ids: ArrayLike<number> | null, count: number, out: Uint32Array): number;
811
+ declare class KernelWatch {
812
+ private readonly columns;
813
+ private readonly capacity;
814
+ private readonly shadow;
815
+ private readonly marks;
816
+ private readonly rows;
817
+ private len;
818
+ private count;
819
+ private primed;
820
+ constructor(columns: number, capacity: number);
821
+ mark(row: number): void;
822
+ markAll(): void;
823
+ private readonly views;
824
+ private view;
825
+ private check;
826
+ changed(watched: readonly WatchedColumn[], count: number): Uint32Array;
827
+ commit(watched: readonly WatchedColumn[], count: number): void;
828
+ into(selection: Selection): Selection;
829
+ }
830
+ type WatchedColumn = Float32Array | Int32Array | Uint32Array | Uint8Array;
831
+ interface Grid {
832
+ readonly width: number;
833
+ readonly height: number;
834
+ readonly depth: number;
835
+ }
836
+ declare function gridCells(grid: Grid): number;
837
+ declare function componentsEdges(nodes: number, a: ArrayLike<number>, b: ArrayLike<number>, parent: Uint32Array, labels: Uint32Array): number;
838
+ declare function componentsGrid(grid: Grid, values: ArrayLike<number>, empty: number, parent: Uint32Array, labels: Uint32Array): number;
839
+ declare function bfsGrid(grid: Grid, passable: ArrayLike<number>, sources: ArrayLike<number>, dist: Uint32Array, queue: Uint32Array): number;
840
+ declare function nearestLabelGrid(grid: Grid, dist: Uint32Array, queue: Uint32Array, reached: number, sources: ArrayLike<number>, sourceLabels: ArrayLike<number>, labels: Uint32Array): void;
841
+ declare function floodFill(grid: Grid, passable: ArrayLike<number>, seeds: ArrayLike<number>, label: number, out: Uint32Array, dist: Uint32Array, queue: Uint32Array): number;
842
+ declare class Csr {
843
+ private readonly offsets;
844
+ private readonly targets;
845
+ private count;
846
+ constructor(nodes: number, edges: number);
847
+ build(nodes: number, a: ArrayLike<number>, b: ArrayLike<number>): void;
848
+ nodes(): number;
849
+ neighbours(node: number): Uint32Array;
850
+ maxDegree(): number;
851
+ }
852
+ declare function bfsGraph(graph: Csr, sources: ArrayLike<number>, dist: Uint32Array, queue: Uint32Array): number;
853
+ declare function propagateGraph(graph: Csr, labels: Uint32Array, next: Uint32Array, work: Uint32Array, rounds: number): number;
854
+ declare function propagateGrid(grid: Grid, labels: Uint32Array, next: Uint32Array, rounds: number): number;
855
+ declare const WALL = 4294967295;
856
+ declare function reachSeeded(grid: Grid, labels: ArrayLike<number>, dist: Uint32Array, queue: Uint32Array, seeded: number, owner: Uint32Array | null): number;
857
+ declare function unionNodes(parent: Uint32Array, a: number, b: number): void;
858
+ declare function findNode(parent: Uint32Array, x: number): number;
859
+
860
+ type toolkit_Csr = Csr;
861
+ declare const toolkit_Csr: typeof Csr;
862
+ type toolkit_Grid = Grid;
863
+ type toolkit_KernelSchedule = KernelSchedule;
864
+ declare const toolkit_KernelSchedule: typeof KernelSchedule;
865
+ type toolkit_KernelWatch = KernelWatch;
866
+ declare const toolkit_KernelWatch: typeof KernelWatch;
867
+ declare const toolkit_NEVER: typeof NEVER;
868
+ declare const toolkit_NO_LABEL: typeof NO_LABEL;
869
+ declare const toolkit_UNREACHED: typeof UNREACHED;
870
+ declare const toolkit_WALL: typeof WALL;
871
+ type toolkit_WatchedColumn = WatchedColumn;
872
+ declare const toolkit_bfsGraph: typeof bfsGraph;
873
+ declare const toolkit_bfsGrid: typeof bfsGrid;
874
+ declare const toolkit_componentsEdges: typeof componentsEdges;
875
+ declare const toolkit_componentsGrid: typeof componentsGrid;
876
+ declare const toolkit_findNode: typeof findNode;
877
+ declare const toolkit_floodFill: typeof floodFill;
878
+ declare const toolkit_gridCells: typeof gridCells;
879
+ declare const toolkit_isDue: typeof isDue;
880
+ declare const toolkit_nearestLabelGrid: typeof nearestLabelGrid;
881
+ declare const toolkit_propagateGraph: typeof propagateGraph;
882
+ declare const toolkit_propagateGrid: typeof propagateGrid;
883
+ declare const toolkit_reachSeeded: typeof reachSeeded;
884
+ declare const toolkit_stagger: typeof stagger;
885
+ declare const toolkit_unionNodes: typeof unionNodes;
886
+ declare namespace toolkit {
887
+ export { toolkit_Csr as Csr, type toolkit_Grid as Grid, toolkit_KernelSchedule as KernelSchedule, toolkit_KernelWatch as KernelWatch, toolkit_NEVER as NEVER, toolkit_NO_LABEL as NO_LABEL, toolkit_UNREACHED as UNREACHED, toolkit_WALL as WALL, type toolkit_WatchedColumn as WatchedColumn, toolkit_bfsGraph as bfsGraph, toolkit_bfsGrid as bfsGrid, toolkit_componentsEdges as componentsEdges, toolkit_componentsGrid as componentsGrid, toolkit_findNode as findNode, toolkit_floodFill as floodFill, toolkit_gridCells as gridCells, toolkit_isDue as isDue, toolkit_nearestLabelGrid as nearestLabelGrid, toolkit_propagateGraph as propagateGraph, toolkit_propagateGrid as propagateGrid, toolkit_reachSeeded as reachSeeded, toolkit_stagger as stagger, toolkit_unionNodes as unionNodes };
888
+ }
889
+
890
+ interface TreeWalk {
891
+ readonly nodes: Uint32Array;
892
+ readonly thresholds: Float32Array;
893
+ readonly values: Float32Array;
894
+ }
895
+ interface TreeModelVariant {
896
+ readonly programs: readonly Uint8Array[];
897
+ readonly walk: TreeWalk | null;
898
+ }
899
+ type TreeModelBackend = "auto" | "gpu" | "wasm" | "vm" | "js";
900
+ type TreeModelFormat = "xgboost" | "lightgbm" | "onnx";
901
+ type TreeModelTransform = {
902
+ readonly kind: "none";
903
+ } | {
904
+ readonly kind: "sigmoid";
905
+ readonly scale: number;
906
+ } | {
907
+ readonly kind: "softmax";
908
+ } | {
909
+ readonly kind: "exp";
910
+ } | {
911
+ readonly kind: "argmax";
912
+ } | {
913
+ readonly kind: "step";
914
+ };
915
+ interface TreeModelInfo {
916
+ readonly name: string;
917
+ readonly file: string;
918
+ readonly format: TreeModelFormat;
919
+ readonly features: number;
920
+ readonly outputs: number;
921
+ readonly width: number;
922
+ readonly featureNames: readonly string[] | null;
923
+ readonly transform: TreeModelTransform;
924
+ readonly base: readonly number[];
925
+ readonly baseLast: boolean;
926
+ readonly divisor: number;
927
+ readonly trees: number;
928
+ readonly nodes: number;
929
+ readonly depth: number;
930
+ readonly parts: number;
931
+ readonly walked?: number;
932
+ }
933
+ interface FlatTrees {
934
+ readonly treeStart: Int32Array;
935
+ readonly treeOutput: Int32Array;
936
+ readonly feature: Int32Array;
937
+ readonly threshold: Float32Array;
938
+ readonly left: Int32Array;
939
+ readonly right: Int32Array;
940
+ readonly flags: Uint8Array;
941
+ readonly leaf: Float32Array;
942
+ }
943
+ type TreeModelOutput = Float32Array | readonly Float32Array[];
944
+ declare class TreeModel {
945
+ readonly info: TreeModelInfo;
946
+ readonly programs: readonly Uint8Array[];
947
+ readonly flat: FlatTrees;
948
+ private readonly parsed;
949
+ private readonly js;
950
+ private vm;
951
+ private wasm;
952
+ private readonly single;
953
+ private chosen;
954
+ readonly walk: TreeWalk | null;
955
+ readonly walked: TreeModelVariant | null;
956
+ programsFor(device: "cpu" | "gpu"): TreeModelVariant;
957
+ constructor(info: TreeModelInfo, programs: readonly Uint8Array[], flat: FlatTrees, walk?: TreeWalk | null, walked?: TreeModelVariant | null);
958
+ get features(): number;
959
+ get outputs(): number;
960
+ get featureNames(): readonly string[] | null;
961
+ get backend(): TreeModelBackend;
962
+ use(backend: TreeModelBackend): this;
963
+ ready(): Promise<TreeModelBackend>;
964
+ private wasmTrees;
965
+ predict(columns: readonly Float32Array[], out: TreeModelOutput, count?: number): number;
966
+ private routed;
967
+ get device(): RouteDevice;
968
+ private gpu;
969
+ private gpuTrees;
970
+ get wasmReady(): boolean;
971
+ predictCpu(columns: readonly Float32Array[], outs: readonly Float32Array[], n: number, backend: TreeModelBackend): void;
972
+ }
973
+ declare function model(file: string, payload?: string): TreeModel;
974
+
975
+ interface GpuSetProbe {
976
+ readonly class: GpuDeviceClass;
977
+ readonly rows: number;
978
+ readonly setFixedNs: number;
979
+ readonly setOpPs: number;
980
+ readonly gatherPs: number;
981
+ }
982
+ declare const GPU_PROBE_LOG_PREFIX = "cimplify-gpu-probe ";
983
+ declare const GPU_PROBE_FLAG = "__CIMPLIFY_GPU_PROBE__";
984
+ declare function probeGpuSetCosts(runner?: KernelRunner): GpuSetProbe | null;
985
+ declare function logGpuSetProbe(runner?: KernelRunner): GpuSetProbe | null;
986
+ declare function runGpuProbeIfAsked(runner?: KernelRunner): GpuSetProbe | null;
987
+
988
+ declare function srgbToLinear(c: f32): f32;
989
+ declare function linearToSrgb(c: f32): f32;
990
+ declare function srgbToLinear3(c: vec3): vec3;
991
+ declare function linearToSrgb3(c: vec3): vec3;
992
+ declare function rgbToHsv(c: vec3): vec3;
993
+ declare function hsvToRgb(c: vec3): vec3;
994
+ declare function rgbToHsl(c: vec3): vec3;
995
+ declare function hslToRgb(c: vec3): vec3;
996
+ declare function linearToOklab(c: vec3): vec3;
997
+ declare function oklabToLinear(c: vec3): vec3;
998
+ declare function oklabToOklch(c: vec3): vec3;
999
+ declare function oklchToOklab(c: vec3): vec3;
1000
+ declare function mixOklab(a: vec3, b: vec3, t: f32): vec3;
1001
+ declare function luminance(c: vec3): f32;
1002
+ declare function premultiply(c: vec4): vec4;
1003
+ declare function unpremultiply(c: vec4): vec4;
1004
+ declare function blendOver(src: vec4, dst: vec4): vec4;
1005
+
1006
+ type fx = i32;
1007
+ interface fx64 {
1008
+ hi: i32;
1009
+ lo: u32;
1010
+ }
1011
+ declare const FX_ONE = 65536;
1012
+ declare const FX_HALF = 32768;
1013
+ declare const FX_MAX = 2147483647;
1014
+ declare const FX_MIN = -2147483648;
1015
+ declare function fxFromInt(i: i32): fx;
1016
+ declare function fxToInt(a: fx): i32;
1017
+ declare function fxFromF32(x: f32): fx;
1018
+ declare function fxToF32(a: fx): f32;
1019
+ declare function fxAdd(a: fx, b: fx): fx;
1020
+ declare function fxSub(a: fx, b: fx): fx;
1021
+ declare function fxNeg(a: fx): fx;
1022
+ declare function fxAbs(a: fx): fx;
1023
+ declare function fxFloor(a: fx): fx;
1024
+ declare function fxFrac(a: fx): fx;
1025
+ declare function fxMul(a: fx, b: fx): fx;
1026
+ declare function fxDiv(a: fx, b: fx): fx;
1027
+ declare function fxSqrt(a: fx): fx;
1028
+ declare function fxSin(angle: fx): fx;
1029
+ declare function fxCos(angle: fx): fx;
1030
+ declare function fxLerp(a: fx, b: fx, t: fx): fx;
1031
+ declare function fx64FromInt(i: i32): fx64;
1032
+ declare function fx64FromFx(a: fx): fx64;
1033
+ declare function fx64ToFx(a: fx64): fx;
1034
+ declare function fx64Neg(a: fx64): fx64;
1035
+ declare function fx64FromF32(x: f32): fx64;
1036
+ declare function fx64ToF32(a: fx64): f32;
1037
+ declare function fx64Add(a: fx64, b: fx64): fx64;
1038
+ declare function fx64Sub(a: fx64, b: fx64): fx64;
1039
+ declare function fx64Lt(a: fx64, b: fx64): boolean;
1040
+ declare function fx64Mul(a: fx64, b: fx64): fx64;
1041
+ declare function fx64Div(a: fx64, b: fx64): fx64;
1042
+ declare function fx64Sqrt(a: fx64): fx64;
1043
+ declare function fx64Sin(angle: fx64): fx64;
1044
+ declare function fx64Cos(angle: fx64): fx64;
1045
+
1046
+ interface LaunchAngles {
1047
+ low: f32;
1048
+ high: f32;
1049
+ ok: boolean;
1050
+ }
1051
+ interface Ballistic {
1052
+ pos: vec3;
1053
+ vel: vec3;
1054
+ }
1055
+ interface SegmentPair {
1056
+ s: f32;
1057
+ t: f32;
1058
+ a: vec3;
1059
+ b: vec3;
1060
+ distSq: f32;
1061
+ }
1062
+ interface TriangleHit {
1063
+ t: f32;
1064
+ u: f32;
1065
+ v: f32;
1066
+ hit: boolean;
1067
+ }
1068
+ declare function interceptTime(relPos: vec3, relVel: vec3, speed: f32): f32;
1069
+ declare function interceptTime2(relPos: vec2, relVel: vec2, speed: f32): f32;
1070
+ declare function launchAngles(speed: f32, distance: f32, height: f32, gravity: f32): LaunchAngles;
1071
+ declare function launchSpeed(angle: f32, distance: f32, height: f32, gravity: f32): f32;
1072
+ declare function projectilePos(pos: vec3, vel: vec3, gravity: vec3, t: f32): vec3;
1073
+ declare function projectileVel(vel: vec3, gravity: vec3, t: f32): vec3;
1074
+ declare function dragPos(pos: vec3, vel: vec3, gravity: vec3, drag: f32, t: f32): vec3;
1075
+ declare function dragVel(vel: vec3, gravity: vec3, drag: f32, t: f32): vec3;
1076
+ declare function quadDragStep(pos: vec3, vel: vec3, gravity: vec3, drag: f32, dt: f32, substeps: i32): Ballistic;
1077
+ declare function closestOnSegment(p: vec3, a: vec3, b: vec3): vec3;
1078
+ declare function segmentDistSq(p: vec3, a: vec3, b: vec3): f32;
1079
+ declare function closestOnTriangle(p: vec3, a: vec3, b: vec3, c: vec3): vec3;
1080
+ declare function closestInAabb(p: vec3, min: vec3, max: vec3): vec3;
1081
+ declare function closestInObb(p: vec3, center: vec3, rotation: quat, half: vec3): vec3;
1082
+ declare function closestSegments(p1: vec3, q1: vec3, p2: vec3, q2: vec3): SegmentPair;
1083
+ declare function raySphere(origin: vec3, dir: vec3, center: vec3, radius: f32): f32;
1084
+ declare function rayAabb(origin: vec3, dir: vec3, min: vec3, max: vec3): f32;
1085
+ declare function rayPlane(origin: vec3, dir: vec3, plane: vec4): f32;
1086
+ declare function rayTriangle(origin: vec3, dir: vec3, a: vec3, b: vec3, c: vec3): TriangleHit;
1087
+ declare function inCone(p: vec3, apex: vec3, axis: vec3, cosHalfAngle: f32, range: f32): boolean;
1088
+ declare function inPolygon<N extends number>(p: vec2, vertices: FixedArray<vec2, N>, count: i32): boolean;
1089
+ declare function inTriangle(p: vec2, a: vec2, b: vec2, c: vec2): boolean;
1090
+ declare function spheresOverlap(c1: vec3, r1: f32, c2: vec3, r2: f32): boolean;
1091
+ declare function aabbOverlap(min1: vec3, max1: vec3, min2: vec3, max2: vec3): boolean;
1092
+ declare function sphereAabbOverlap(center: vec3, radius: f32, min: vec3, max: vec3): boolean;
1093
+ declare function sweepSpherePlane(from: vec3, to: vec3, radius: f32, plane: vec4): f32;
1094
+ declare function planeFromPoints(a: vec3, b: vec3, c: vec3): vec4;
1095
+
1096
+ declare function fsin(x: f32): f32;
1097
+ declare function fcos(x: f32): f32;
1098
+ declare function ftan(x: f32): f32;
1099
+ declare function fasin(x: f32): f32;
1100
+ declare function facos(x: f32): f32;
1101
+ declare function fatan(x: f32): f32;
1102
+ declare function fatan2(y: f32, x: f32): f32;
1103
+ declare function fexp(x: f32): f32;
1104
+ declare function flog(x: f32): f32;
1105
+ declare function flog2(x: f32): f32;
1106
+ declare function fpow(x: f32, y: f32): f32;
1107
+ declare function umulhi(a: u32, b: u32): u32;
1108
+ declare function uaddCarry(a: u32, b: u32, carry: u32): u32;
1109
+ declare function usubBorrow(a: u32, b: u32, borrow: u32): u32;
1110
+
1111
+ declare function packAnimation(clip: u32, phase: f32): u32;
1112
+ interface Damped {
1113
+ value: f32;
1114
+ velocity: f32;
1115
+ }
1116
+ interface Damped2 {
1117
+ value: vec2;
1118
+ velocity: vec2;
1119
+ }
1120
+ interface Damped3 {
1121
+ value: vec3;
1122
+ velocity: vec3;
1123
+ }
1124
+ interface PidState {
1125
+ integral: f32;
1126
+ previous: f32;
1127
+ }
1128
+ interface PidStep {
1129
+ output: f32;
1130
+ state: PidState;
1131
+ }
1132
+ declare function smoothDamp(current: f32, target: f32, velocity: f32, smoothTime: f32, maxSpeed: f32, dt: f32): Damped;
1133
+ declare function smoothDamp2(current: vec2, target: vec2, velocity: vec2, smoothTime: f32, maxSpeed: f32, dt: f32): Damped2;
1134
+ declare function smoothDamp3(current: vec3, target: vec3, velocity: vec3, smoothTime: f32, maxSpeed: f32, dt: f32): Damped3;
1135
+ declare function expSmooth(current: f32, target: f32, rate: f32, dt: f32): f32;
1136
+ declare function expSmooth2(current: vec2, target: vec2, rate: f32, dt: f32): vec2;
1137
+ declare function expSmooth3(current: vec3, target: vec3, rate: f32, dt: f32): vec3;
1138
+ declare function approach(current: f32, target: f32, halfLife: f32, dt: f32): f32;
1139
+ declare function decay(value: f32, rate: f32, dt: f32): f32;
1140
+ declare function moveToward(current: f32, target: f32, maxDelta: f32): f32;
1141
+ declare function moveToward2(current: vec2, target: vec2, maxDelta: f32): vec2;
1142
+ declare function moveToward3(current: vec3, target: vec3, maxDelta: f32): vec3;
1143
+ declare function rotateToward(current: f32, target: f32, maxDelta: f32): f32;
1144
+ declare function pidStep(state: PidState, error: f32, kp: f32, ki: f32, kd: f32, dt: f32, integralLimit: f32): PidStep;
1145
+ declare function springStep(value: f32, velocity: f32, target: f32, stiffness: f32, damping: f32, dt: f32): Damped;
1146
+
1147
+ interface RunningStats {
1148
+ count: f32;
1149
+ mean: f32;
1150
+ m2: f32;
1151
+ }
1152
+ declare function relu(x: f32): f32;
1153
+ declare function leakyRelu(x: f32, slope: f32): f32;
1154
+ declare function sigmoid(x: f32): f32;
1155
+ declare function tanhf(x: f32): f32;
1156
+ declare function softplus(x: f32): f32;
1157
+ declare function dense<I extends number, O extends number>(input: FixedArray<f32, I>, weights: FixedArray<f32, number>, bias: FixedArray<f32, O>, out: FixedArray<f32, O>): FixedArray<f32, O>;
1158
+ declare function denseRelu<I extends number, O extends number>(input: FixedArray<f32, I>, weights: FixedArray<f32, number>, bias: FixedArray<f32, O>, out: FixedArray<f32, O>): FixedArray<f32, O>;
1159
+ declare function denseTable<I extends number, O extends number>(input: FixedArray<f32, I>, table: KernelLut, out: FixedArray<f32, O>): FixedArray<f32, O>;
1160
+ declare function quantize(x: f32, scale: f32): i32;
1161
+ declare function denseQ8<I extends number, O extends number>(input: FixedArray<i32, I>, packed: FixedArray<u32, number>, bias: FixedArray<i32, O>, scale: f32, out: FixedArray<f32, O>): FixedArray<f32, O>;
1162
+ declare function softmax<N extends number>(input: FixedArray<f32, N>, out: FixedArray<f32, N>): FixedArray<f32, N>;
1163
+ declare function argmax<N extends number>(input: FixedArray<f32, N>): i32;
1164
+ declare function statsAdd(stats: RunningStats, x: f32): RunningStats;
1165
+ declare function statsVariance(stats: RunningStats): f32;
1166
+ declare function statsSampleVariance(stats: RunningStats): f32;
1167
+ declare function ema(average: f32, x: f32, alpha: f32): f32;
1168
+
1169
+ declare function simplex2(x: f32, y: f32, seed?: u32): f32;
1170
+ declare function simplex2d(x: f32, y: f32, seed?: u32): vec3;
1171
+ declare function simplex3d(x: f32, y: f32, z: f32, seed?: u32): vec4;
1172
+ declare function simplex3(x: f32, y: f32, z: f32, seed?: u32): f32;
1173
+ declare function simplex4(x: f32, y: f32, z: f32, w: f32, seed?: u32): f32;
1174
+ declare function worley2(x: f32, y: f32, seed?: u32): vec2;
1175
+ declare function worley3(x: f32, y: f32, z: f32, seed?: u32): vec2;
1176
+ declare function curl2(x: f32, y: f32, seed?: u32): vec2;
1177
+ declare function curl3(x: f32, y: f32, z: f32, seed?: u32): vec3;
1178
+ declare function fbm2(x: f32, y: f32, octaves: i32, lacunarity: f32, gain: f32, seed?: u32): f32;
1179
+ declare function fbm3(x: f32, y: f32, z: f32, octaves: i32, lacunarity: f32, gain: f32, seed?: u32): f32;
1180
+ declare function ridged2(x: f32, y: f32, octaves: i32, lacunarity: f32, gain: f32, seed?: u32): f32;
1181
+ declare function ridged3(x: f32, y: f32, z: f32, octaves: i32, lacunarity: f32, gain: f32, seed?: u32): f32;
1182
+ declare function warp2(p: vec2, strength: f32, octaves: i32, seed?: u32): vec2;
1183
+ declare function warp3(p: vec3, strength: f32, octaves: i32, seed?: u32): vec3;
1184
+
1185
+ declare function texNoise(x: f32, y: f32, period: i32, seed?: u32): f32;
1186
+ declare function texFbm(u: f32, v: f32, period: i32, octaves: i32, gain: f32, seed?: u32): f32;
1187
+ declare function texRidged(u: f32, v: f32, period: i32, octaves: i32, gain: f32, seed?: u32): f32;
1188
+ declare function texCells(u: f32, v: f32, period: i32, jitter: f32, seed?: u32): vec3;
1189
+ declare function texBricks(u: f32, v: f32, rows: i32, columns: i32, mortar: f32, seed?: u32): vec3;
1190
+ declare function texTiles(u: f32, v: f32, count: i32, grout: f32, seed?: u32): vec3;
1191
+ declare function texWeave(u: f32, v: f32, count: i32): vec2;
1192
+ declare function texRings(u: f32, v: f32, frequency: f32, distortion: f32, seed?: u32): f32;
1193
+ declare function texRemap(x: f32, low: f32, high: f32): f32;
1194
+ declare function texRamp(t: f32, a: vec3, b: vec3): vec3;
1195
+ declare function texNormal(left: f32, right: f32, down: f32, up: f32, strength: f32): vec3;
1196
+
1197
+ declare function rngKey(seed: u32, row: u32, tick: u32, site: u32): u32;
1198
+ declare function randBits(key: u32, n: u32): u32;
1199
+ declare function randUnit(key: u32, n: u32): f32;
1200
+ declare function randRange(key: u32, n: u32, low: f32, high: f32): f32;
1201
+ declare function randInt(key: u32, n: u32, low: i32, high: i32): i32;
1202
+ declare function randChance(key: u32, n: u32, probability: f32): boolean;
1203
+ declare function randNormal(key: u32, n: u32): f32;
1204
+ declare function randNormal2(key: u32, n: u32): vec2;
1205
+ declare function randGaussian(key: u32, n: u32, mean: f32, deviation: f32): f32;
1206
+ declare function randExp(key: u32, n: u32, rate: f32): f32;
1207
+ declare function randWeighted<N extends number>(key: u32, n: u32, weights: FixedArray<f32, N>): i32;
1208
+ declare function randShuffle<N extends number>(key: u32, n: u32, values: FixedArray<f32, N>, out: FixedArray<f32, N>): FixedArray<f32, N>;
1209
+ declare function randPermute(key: u32, index: u32, count: u32): u32;
1210
+ declare function randInDisc(key: u32, n: u32): vec2;
1211
+ declare function randOnCircle(key: u32, n: u32): vec2;
1212
+ declare function randOnSphere(key: u32, n: u32): vec3;
1213
+ declare function randInBall(key: u32, n: u32): vec3;
1214
+ declare function randHemisphere(key: u32, n: u32, normal: vec3): vec3;
1215
+ declare function randCosHemisphere(key: u32, n: u32, normal: vec3): vec3;
1216
+ declare function poissonPoint(cellX: i32, cellY: i32, cellSize: f32, minDist: f32, seed: u32): vec2;
1217
+
1218
+ interface SwingTwist {
1219
+ swing: quat;
1220
+ twist: quat;
1221
+ }
1222
+ interface AxisAngle {
1223
+ axis: vec3;
1224
+ angle: f32;
1225
+ }
1226
+ interface Basis {
1227
+ t: vec3;
1228
+ b: vec3;
1229
+ }
1230
+ declare function qnormalize(q: quat): quat;
1231
+ declare function qnlerp(a: quat, b: quat, t: f32): quat;
1232
+ declare function qslerp(a: quat, b: quat, t: f32): quat;
1233
+ declare function basisFrom(n: vec3): Basis;
1234
+ declare function qFromAxisAngle(axis: vec3, angle: f32): quat;
1235
+ declare function qToAxisAngle(q: quat): AxisAngle;
1236
+ declare function qFromTo(from: vec3, to: vec3): quat;
1237
+ declare function qLookRotation(forward: vec3, up: vec3): quat;
1238
+ declare function qSwingTwist(q: quat, axis: vec3): SwingTwist;
1239
+ declare function qClampSwingTwist(q: quat, axis: vec3, maxSwing: f32, maxTwist: f32): quat;
1240
+ declare function qFromEuler(euler: vec3): quat;
1241
+ declare function qToEuler(q: quat): vec3;
1242
+ declare function wrapAngle(angle: f32): f32;
1243
+ declare function angleDiff(from: f32, to: f32): f32;
1244
+ declare function rotate2(v: vec2, angle: f32): vec2;
1245
+ declare function angleOf2(v: vec2): f32;
1246
+ declare function dirOf2(angle: f32): vec2;
1247
+ declare function qRotateToward(from: quat, to: quat, maxAngle: f32): quat;
1248
+ declare function qAngle(a: quat, b: quat): f32;
1249
+ declare function qForward(q: quat): vec3;
1250
+ declare function qUp(q: quat): vec3;
1251
+ declare function qRight(q: quat): vec3;
1252
+ declare function packRotation(q: quat): u32;
1253
+ declare function qIntegrate(q: quat, angularVelocity: vec3, dt: f32): quat;
1254
+
1255
+ interface SimBody {
1256
+ pos: vec3;
1257
+ vel: vec3;
1258
+ }
1259
+ interface VerletState {
1260
+ pos: vec3;
1261
+ vel: vec3;
1262
+ acc: vec3;
1263
+ }
1264
+ interface ImpulseResult {
1265
+ v1: vec3;
1266
+ v2: vec3;
1267
+ }
1268
+ declare function eulerStep(pos: vec3, vel: vec3, accel: (p: vec3, v: vec3) => vec3, dt: f32, substeps: i32): SimBody;
1269
+ declare function verletStep(pos: vec3, vel: vec3, acc: vec3, accel: (p: vec3, v: vec3) => vec3, dt: f32, substeps: i32): VerletState;
1270
+ declare function rk2Step(pos: vec3, vel: vec3, accel: (p: vec3, v: vec3) => vec3, dt: f32, substeps: i32): SimBody;
1271
+ declare function sphPoly6(distSq: f32, h: f32): f32;
1272
+ declare function sphSpikyGrad(offset: vec3, h: f32): vec3;
1273
+ declare function sphViscosityLap(r: f32, h: f32): f32;
1274
+ declare function reflectVelocity(vel: vec3, normal: vec3, restitution: f32, friction: f32): vec3;
1275
+ declare function sphereImpulse(p1: vec3, v1: vec3, m1: f32, p2: vec3, v2: vec3, m2: f32, restitution: f32): ImpulseResult;
1276
+ declare function springForce(p1: vec3, p2: vec3, v1: vec3, v2: vec3, rest: f32, stiffness: f32, damping: f32): vec3;
1277
+
1278
+ type Block8 = FixedArray<f32, 8>;
1279
+ type Block16 = FixedArray<f32, 16>;
1280
+ type Block64 = FixedArray<f32, 64>;
1281
+ declare function dct8(input: Block8, out: Block8): Block8;
1282
+ declare function idct8(input: Block8, out: Block8): Block8;
1283
+ declare function dct16(input: Block16, out: Block16): Block16;
1284
+ declare function idct16(input: Block16, out: Block16): Block16;
1285
+ declare function dct8x8(input: Block64, scratch: Block64, out: Block64): Block64;
1286
+ declare function idct8x8(input: Block64, scratch: Block64, out: Block64): Block64;
1287
+
1288
+ interface Biquad {
1289
+ b0: f32;
1290
+ b1: f32;
1291
+ b2: f32;
1292
+ a1: f32;
1293
+ a2: f32;
1294
+ }
1295
+ interface BiquadState {
1296
+ x1: f32;
1297
+ x2: f32;
1298
+ y1: f32;
1299
+ y2: f32;
1300
+ }
1301
+ interface Filtered {
1302
+ y: f32;
1303
+ state: BiquadState;
1304
+ }
1305
+ interface DcState {
1306
+ x1: f32;
1307
+ y1: f32;
1308
+ }
1309
+ interface DcFiltered {
1310
+ y: f32;
1311
+ state: DcState;
1312
+ }
1313
+ declare function biquadLowpass(freq: f32, rate: f32, q: f32): Biquad;
1314
+ declare function biquadHighpass(freq: f32, rate: f32, q: f32): Biquad;
1315
+ declare function biquadBandpass(freq: f32, rate: f32, q: f32): Biquad;
1316
+ declare function biquadNotch(freq: f32, rate: f32, q: f32): Biquad;
1317
+ declare function biquadPeaking(freq: f32, rate: f32, q: f32, gainDb: f32): Biquad;
1318
+ declare function biquadStep(c: Biquad, state: BiquadState, x: f32): Filtered;
1319
+ declare function onePoleAlpha(cutoff: f32, dt: f32): f32;
1320
+ declare function onePole(previous: f32, x: f32, alpha: f32): f32;
1321
+ declare function dcBlock(state: DcState, x: f32, r: f32): DcFiltered;
1322
+
1323
+ type SH4 = vec4;
1324
+ type SH9 = FixedArray<f32, 9>;
1325
+ declare function sh4Basis(d: vec3): SH4;
1326
+ declare function sh4Project(d: vec3, value: f32): SH4;
1327
+ declare function sh4Eval(sh: SH4, d: vec3): f32;
1328
+ declare function sh4Irradiance(sh: SH4, normal: vec3): f32;
1329
+ declare function sh4Add(a: SH4, b: SH4): SH4;
1330
+ declare function sh4Scale(a: SH4, s: f32): SH4;
1331
+ declare function sh4Rotate(sh: SH4, rotation: quat): SH4;
1332
+ declare function sh9Basis(d: vec3, out: SH9): SH9;
1333
+ declare function sh9Project(d: vec3, value: f32, out: SH9): SH9;
1334
+ declare function sh9Eval(sh: SH9, d: vec3): f32;
1335
+ declare function sh9Irradiance(sh: SH9, normal: vec3): f32;
1336
+ declare function sh9Add(a: SH9, b: SH9, out: SH9): SH9;
1337
+ declare function sh9Scale(a: SH9, s: f32, out: SH9): SH9;
1338
+ declare function sh9Rotate(sh: SH9, rotation: quat, out: SH9): SH9;
1339
+
1340
+ declare const KERNEL_STD_SOURCES: Readonly<Record<string, string>>;
1341
+
1342
+ declare function gridComponents(value: u32, grid: GridSize): {
1343
+ readonly label: u32;
1344
+ readonly count: u32;
1345
+ };
1346
+ declare function gridReach(label: u32, source: boolean, grid: GridSize): {
1347
+ readonly dist: u32;
1348
+ readonly owner: u32;
1349
+ readonly reached: u32;
1350
+ };
1351
+ declare function gridPropagate(label: u32, grid: GridSize, rounds: u32): {
1352
+ readonly label: u32;
1353
+ readonly rounds: u32;
1354
+ };
1355
+ declare function edgeComponents(labels: KernelArray<"u32">, a: u32, b: u32): u32;
1356
+
1357
+ declare const MLP_ACT_LINEAR = 0;
1358
+ declare const MLP_ACT_RELU = 1;
1359
+ interface MlpLayer {
1360
+ readonly inputs: number;
1361
+ readonly outputs: number;
1362
+ readonly activation: number;
1363
+ readonly multiplier: number;
1364
+ readonly shift: number;
1365
+ readonly zero: number;
1366
+ readonly scale: number;
1367
+ readonly bias: number;
1368
+ readonly weights: number;
1369
+ readonly stride: number;
1370
+ }
1371
+ interface MlpNet {
1372
+ readonly words: ArrayLike<number>;
1373
+ readonly inputs: number;
1374
+ readonly outputs: number;
1375
+ readonly scale: number;
1376
+ readonly zero: number;
1377
+ readonly layers: readonly MlpLayer[];
1378
+ }
1379
+ declare function routeMlpLane(net: MlpNet, inputs: ArrayLike<number>, lane: number, stride: number): number;
1380
+ declare const MOE_MIN_EXPERTS = 2;
1381
+ declare const MOE_MAX_EXPERTS = 16;
1382
+ interface MoeNet {
1383
+ readonly inputs: number;
1384
+ readonly outputs: number;
1385
+ readonly router: MlpNet;
1386
+ readonly experts: readonly MlpNet[];
1387
+ }
1388
+ declare function parseMoe(words: ArrayLike<number>, length: number, inputs: number, outputs: number): MoeNet | null;
1389
+ declare function evalMoeLane(net: MoeNet, inputs: ArrayLike<number>, lane: number, stride: number, outputs: Uint32Array): number;
1390
+ declare function moeBlob(inputs: number, outputs: number, router: ArrayLike<number>, experts: readonly ArrayLike<number>[]): Uint32Array;
1391
+ declare function moe<N extends number>(net: KernelArray<"u32">, inputs: ArrayLike<number>, outputs: N): FixedArray<f32, N>;
1392
+ interface MlpLayerSpec {
1393
+ readonly outputs: number;
1394
+ readonly activation: number;
1395
+ readonly multiplier: number;
1396
+ readonly shift: number;
1397
+ readonly zero: number;
1398
+ readonly scale: number;
1399
+ readonly bias: ArrayLike<number>;
1400
+ readonly weights: ArrayLike<number>;
1401
+ }
1402
+ declare function mlpBlob(inputs: number, scale: number, zero: number, layers: readonly MlpLayerSpec[]): Uint32Array;
1403
+ declare function mlp<N extends number>(net: KernelArray<"u32">, inputs: ArrayLike<number>, outputs: N): FixedArray<f32, N>;
1404
+ declare function mlpWords(bytes: ArrayBuffer | Uint8Array): Uint32Array;
1405
+ declare function setMlp(net: KernelArray<"u32">, words: Uint32Array): void;
1406
+ declare function loadMlp(net: KernelArray<"u32">, url: string): Promise<void>;
1407
+
1408
+ type LaneKind = "f32" | "i32" | "mask";
1409
+ interface Lanes<K extends LaneKind, N extends 2 | 3 | 4> {
1410
+ readonly kind: K;
1411
+ readonly width: N;
1412
+ readonly x: K extends "mask" ? boolean : number;
1413
+ readonly y: K extends "mask" ? boolean : number;
1414
+ }
1415
+ interface m32x2 extends Lanes<"mask", 2> {
1416
+ readonly x: boolean;
1417
+ readonly y: boolean;
1418
+ }
1419
+ interface m32x3 extends Lanes<"mask", 3> {
1420
+ readonly x: boolean;
1421
+ readonly y: boolean;
1422
+ readonly z: boolean;
1423
+ }
1424
+ interface m32x4 extends Lanes<"mask", 4> {
1425
+ readonly x: boolean;
1426
+ readonly y: boolean;
1427
+ readonly z: boolean;
1428
+ readonly w: boolean;
1429
+ }
1430
+ type F32Vector = f32x2 | f32x3 | f32x4;
1431
+ type I32Vector = i32x2 | i32x3 | i32x4;
1432
+ type MaskVector = m32x2 | m32x3 | m32x4;
1433
+ type NumberVector = F32Vector | I32Vector;
1434
+ type AnyVector = NumberVector | MaskVector;
1435
+ type MaskOf<V> = V extends Lanes<LaneKind, 2> ? m32x2 : V extends Lanes<LaneKind, 3> ? m32x3 : m32x4;
1436
+ type IntOf<V> = V extends Lanes<LaneKind, 2> ? i32x2 : V extends Lanes<LaneKind, 3> ? i32x3 : i32x4;
1437
+ type FloatOf<V> = V extends Lanes<LaneKind, 2> ? f32x2 : V extends Lanes<LaneKind, 3> ? f32x3 : f32x4;
1438
+ type VecOf<V> = V extends Lanes<LaneKind, 2> ? vec2 : V extends Lanes<LaneKind, 3> ? vec3 : vec4;
1439
+ interface f32x2 extends Lanes<"f32", 2> {
1440
+ readonly x: f32;
1441
+ readonly y: f32;
1442
+ }
1443
+ declare function f32x2(x: f32, y?: f32): f32x2;
1444
+ declare function f32x2(v: vec2): f32x2;
1445
+ interface f32x3 extends Lanes<"f32", 3> {
1446
+ readonly x: f32;
1447
+ readonly y: f32;
1448
+ readonly z: f32;
1449
+ }
1450
+ declare function f32x3(x: f32, y?: f32, z?: f32): f32x3;
1451
+ declare function f32x3(v: vec3): f32x3;
1452
+ interface f32x4 extends Lanes<"f32", 4> {
1453
+ readonly x: f32;
1454
+ readonly y: f32;
1455
+ readonly z: f32;
1456
+ readonly w: f32;
1457
+ }
1458
+ declare function f32x4(x: f32, y?: f32, z?: f32, w?: f32): f32x4;
1459
+ declare function f32x4(v: vec4): f32x4;
1460
+ interface i32x2 extends Lanes<"i32", 2> {
1461
+ readonly x: i32;
1462
+ readonly y: i32;
1463
+ }
1464
+ declare function i32x2(x: i32, y?: i32): i32x2;
1465
+ interface i32x3 extends Lanes<"i32", 3> {
1466
+ readonly x: i32;
1467
+ readonly y: i32;
1468
+ readonly z: i32;
1469
+ }
1470
+ declare function i32x3(x: i32, y?: i32, z?: i32): i32x3;
1471
+ interface i32x4 extends Lanes<"i32", 4> {
1472
+ readonly x: i32;
1473
+ readonly y: i32;
1474
+ readonly z: i32;
1475
+ readonly w: i32;
1476
+ }
1477
+ declare function i32x4(x: i32, y?: i32, z?: i32, w?: i32): i32x4;
1478
+ declare function vadd<V extends NumberVector>(a: V, b: V | number): V;
1479
+ declare function vsub<V extends NumberVector>(a: V, b: V | number): V;
1480
+ declare function vmul<V extends NumberVector>(a: V, b: V | number): V;
1481
+ declare function vdiv<V extends F32Vector>(a: V, b: V | number): V;
1482
+ declare function vmin<V extends NumberVector>(a: V, b: V | number): V;
1483
+ declare function vmax<V extends NumberVector>(a: V, b: V | number): V;
1484
+ declare function vabs<V extends NumberVector>(a: V): V;
1485
+ declare function vneg<V extends NumberVector>(a: V): V;
1486
+ declare function vsqrt<V extends F32Vector>(a: V): V;
1487
+ declare function vfloor<V extends F32Vector>(a: V): V;
1488
+ declare function vlt<V extends NumberVector>(a: V, b: V | number): MaskOf<V>;
1489
+ declare function vle<V extends NumberVector>(a: V, b: V | number): MaskOf<V>;
1490
+ declare function veq<V extends NumberVector>(a: V, b: V | number): MaskOf<V>;
1491
+ declare function vne<V extends NumberVector>(a: V, b: V | number): MaskOf<V>;
1492
+ declare function vselect<V extends NumberVector>(mask: MaskOf<V>, a: V, b: V): V;
1493
+ declare function vand<V extends I32Vector | MaskVector>(a: V, b: V | number): V;
1494
+ declare function vor<V extends I32Vector | MaskVector>(a: V, b: V | number): V;
1495
+ declare function vxor<V extends I32Vector>(a: V, b: V | number): V;
1496
+ declare function vnot<V extends I32Vector | MaskVector>(a: V): V;
1497
+ declare function vshl<V extends I32Vector>(a: V, b: V | number): V;
1498
+ declare function vshr<V extends I32Vector>(a: V, b: V | number): V;
1499
+ declare function vushr<V extends I32Vector>(a: V, b: V | number): V;
1500
+ declare function vmuladd<V extends F32Vector>(a: V, b: V | number, c: V | number): V;
1501
+ declare function vlerp<V extends F32Vector>(a: V, b: V, t: V | number): V;
1502
+ declare function vclamp<V extends F32Vector>(x: V, low: V | number, high: V | number): V;
1503
+ declare function vfloat<V extends I32Vector>(a: V): FloatOf<V>;
1504
+ declare function vint<V extends F32Vector>(a: V): IntOf<V>;
1505
+ declare function vlane<V extends AnyVector>(a: V, lane: 0 | 1 | 2 | 3): V["x"];
1506
+ declare function vwith<V extends AnyVector>(a: V, lane: 0 | 1 | 2 | 3, value: V["x"]): V;
1507
+ declare function vshuffle<V extends AnyVector>(a: V, lanes: readonly number[], b?: V): V;
1508
+ declare function vdot<V extends NumberVector>(a: V, b: V): number;
1509
+ declare function vsum(a: NumberVector): number;
1510
+ declare function vhmin(a: NumberVector): number;
1511
+ declare function vhmax(a: NumberVector): number;
1512
+ declare function vlength(a: F32Vector): f32;
1513
+ declare function vnormalize<V extends F32Vector>(a: V): V;
1514
+ declare function vcross(a: f32x3, b: f32x3): f32x3;
1515
+ declare function vtovec<V extends F32Vector>(a: V): VecOf<V>;
1516
+
1517
+ declare const IMPORT_DEFAULT_SAMPLES = 256;
1518
+ declare const IMPORT_DEFAULT_MAX_DRIFT = 0.05;
1519
+ type ImportActivation = {
1520
+ readonly kind: "linear";
1521
+ } | {
1522
+ readonly kind: "relu";
1523
+ } | {
1524
+ readonly kind: "clip";
1525
+ readonly low: number;
1526
+ readonly high: number;
1527
+ } | {
1528
+ readonly kind: "tanh";
1529
+ };
1530
+ interface FloatLayer {
1531
+ readonly inputs: number;
1532
+ readonly outputs: number;
1533
+ readonly weights: Float32Array;
1534
+ readonly bias: Float32Array;
1535
+ activation: ImportActivation;
1536
+ }
1537
+ interface FloatNet {
1538
+ readonly layers: readonly FloatLayer[];
1539
+ }
1540
+ interface ImportLayerReport {
1541
+ readonly net: number;
1542
+ readonly layer: number;
1543
+ readonly inputs: number;
1544
+ readonly outputs: number;
1545
+ readonly activation: number;
1546
+ readonly weightScale: number;
1547
+ readonly activationScale: number;
1548
+ readonly multiplier: number;
1549
+ readonly shift: number;
1550
+ }
1551
+ interface ImportDrift {
1552
+ readonly samples: number;
1553
+ readonly maxError: number;
1554
+ readonly peak: number;
1555
+ readonly relative: number;
1556
+ readonly bound: number;
1557
+ }
1558
+ interface Imported {
1559
+ readonly blob: Uint32Array;
1560
+ readonly inputScale: number;
1561
+ readonly layers: readonly ImportLayerReport[];
1562
+ readonly drift: ImportDrift;
1563
+ readonly memory: number;
1564
+ }
1565
+ declare class ImportError extends GameError {
1566
+ constructor(message: string);
1567
+ }
1568
+ declare function readOnnx(bytes: Uint8Array): FloatNet;
1569
+ declare function checkNet(net: FloatNet): void;
1570
+ declare function generatedSamples(inputs: number, count?: number, range?: number, seed?: number): Float32Array;
1571
+ declare function floatEval(net: FloatNet, input: ArrayLike<number>, out: Float32Array): void;
1572
+ interface ImportOptions {
1573
+ readonly samples?: Float32Array;
1574
+ readonly maxDrift?: number;
1575
+ readonly memory?: number;
1576
+ }
1577
+ declare function importMlp(net: FloatNet, options?: ImportOptions): Imported;
1578
+ declare function importMoe(router: FloatNet, experts: readonly FloatNet[], options?: ImportOptions): Imported;
1579
+ interface PlainLayer {
1580
+ readonly weights: readonly (readonly number[])[];
1581
+ readonly bias?: readonly number[];
1582
+ readonly activation?: "linear" | "relu" | "tanh" | {
1583
+ readonly clip: readonly [number, number];
1584
+ };
1585
+ }
1586
+ declare function plainNet(layers: readonly PlainLayer[]): FloatNet;
1587
+
1588
+ declare const MLP_MEMORY_MIN = 2;
1589
+ declare const MLP_MEMORY_MAX = 4;
1590
+ interface MlpMemory {
1591
+ readonly width: number;
1592
+ readonly previous: ArrayLike<number>;
1593
+ readonly next: ArrayLike<number>;
1594
+ }
1595
+ interface MlpTrainingData {
1596
+ readonly samples: number;
1597
+ readonly inputs: ArrayLike<number>;
1598
+ readonly targets: ArrayLike<number>;
1599
+ readonly memory?: MlpMemory;
1600
+ }
1601
+ interface MlpEpisode {
1602
+ readonly inputs: readonly (readonly number[])[];
1603
+ readonly targets: readonly (readonly number[])[];
1604
+ readonly memory: readonly (readonly number[])[];
1605
+ }
1606
+ declare function joinMemory(data: MlpTrainingData): MlpTrainingData;
1607
+ declare function memorySamples(episodes: readonly MlpEpisode[]): MlpTrainingData;
1608
+ interface MlpTrainingOptions {
1609
+ readonly widths: readonly number[];
1610
+ readonly epochs?: number;
1611
+ readonly batch?: number;
1612
+ readonly learningRate?: number;
1613
+ readonly momentum?: number;
1614
+ readonly seed?: number;
1615
+ }
1616
+ interface MlpTrained {
1617
+ readonly blob: Uint32Array;
1618
+ readonly loss: Float32Array;
1619
+ readonly blobLoss: number;
1620
+ }
1621
+ declare function trainMlp(source: MlpTrainingData, options: MlpTrainingOptions): MlpTrained;
1622
+ declare const MOE_DEFAULT_BALANCE = 0.5;
1623
+ interface MoeTrainingOptions {
1624
+ readonly experts: number;
1625
+ readonly router?: readonly number[];
1626
+ readonly expert?: readonly number[];
1627
+ readonly epochs?: number;
1628
+ readonly batch?: number;
1629
+ readonly learningRate?: number;
1630
+ readonly momentum?: number;
1631
+ readonly seed?: number;
1632
+ readonly balance?: number;
1633
+ }
1634
+ interface MoeTrained {
1635
+ readonly blob: Uint32Array;
1636
+ readonly loss: Float32Array;
1637
+ readonly blobLoss: number;
1638
+ readonly usage: Uint32Array;
1639
+ }
1640
+ declare function trainMoe(source: MlpTrainingData, options: MoeTrainingOptions): MoeTrained;
1641
+
1642
+ type Mat3Array = Float32Array | Float64Array;
1643
+ declare const MAT3_SIZE = 9;
1644
+ declare function mat3Identity(out: Mat3Array, o: number): void;
1645
+ declare function mat3FromMat4(out: Mat3Array, o: number, m: ArrayLike<number>, mo: number): void;
1646
+ declare function mat3Determinant(m: ArrayLike<number>, o: number): number;
1647
+ declare function mat3Invert(out: Mat3Array, o: number, m: ArrayLike<number>, mo: number): boolean;
1648
+ declare function mat3Transpose(out: Mat3Array, o: number, m: ArrayLike<number>, mo: number): void;
1649
+ declare function mat3Multiply(out: Mat3Array, o: number, a: ArrayLike<number>, ao: number, b: ArrayLike<number>, bo: number): void;
1650
+ declare function mat3NormalMatrix(out: Mat3Array, o: number, m: ArrayLike<number>, mo: number): boolean;
1651
+ declare function mat3SetUvTransform(out: Mat3Array, o: number, tx: number, ty: number, sx: number, sy: number, rotation: number, cx: number, cy: number): void;
1652
+
1653
+ declare class Noise {
1654
+ private readonly perm;
1655
+ private readonly perm12;
1656
+ constructor(seed?: number);
1657
+ reseed(seed: number): void;
1658
+ perlin(x: number, y: number, z: number): number;
1659
+ simplex2(xin: number, yin: number): number;
1660
+ simplex3(xin: number, yin: number, zin: number): number;
1661
+ simplex4(x: number, y: number, z: number, w: number): number;
1662
+ fbm2(x: number, y: number, octaves: number, lacunarity?: number, gain?: number): number;
1663
+ fbm3(x: number, y: number, z: number, octaves: number, lacunarity?: number, gain?: number): number;
1664
+ ridged2(x: number, y: number, octaves: number, lacunarity?: number, gain?: number): number;
1665
+ fill2(out: Float32Array, width: number, height: number, scale: number, octaves?: number, offsetX?: number, offsetY?: number): void;
1666
+ }
1667
+
1668
+ type CurvePoint = Vec2 | Vec3;
1669
+ type CatmullRomType = "centripetal" | "chordal" | "catmullrom";
1670
+ interface FrenetFrames {
1671
+ readonly segments: number;
1672
+ readonly tangents: Float32Array;
1673
+ readonly normals: Float32Array;
1674
+ readonly binormals: Float32Array;
1675
+ }
1676
+ declare function allocateFrenetFrames(segments: number): FrenetFrames;
1677
+ declare abstract class Curve<V extends CurvePoint> {
1678
+ arcLengthDivisions: number;
1679
+ needsUpdate: boolean;
1680
+ private cache;
1681
+ private scratchA;
1682
+ private scratchB;
1683
+ abstract createPoint(): V;
1684
+ abstract getPoint(t: number, out: V): V;
1685
+ get dimensions(): 2 | 3;
1686
+ protected scratch(which: 0 | 1): V;
1687
+ getPointAt(u: number, out: V): V;
1688
+ getPoints(divisions?: number): V[];
1689
+ getSpacedPointList(divisions?: number): V[];
1690
+ getSpacedPoints(divisions: number, out?: Float32Array, stride?: 2 | 3): Float32Array;
1691
+ getLength(): number;
1692
+ getLengths(divisions?: number): Float64Array;
1693
+ updateArcLengths(): void;
1694
+ getUtoTmapping(u: number, distance?: number): number;
1695
+ getTangent(t: number, out: V): V;
1696
+ getTangentAt(u: number, out: V): V;
1697
+ computeFrenetFrames(segments: number, closed?: boolean, out?: FrenetFrames): FrenetFrames;
1698
+ }
1699
+ declare abstract class Curve2 extends Curve<Vec2> {
1700
+ createPoint(): Vec2;
1701
+ }
1702
+ declare abstract class Curve3 extends Curve<Vec3> {
1703
+ createPoint(): Vec3;
1704
+ }
1705
+ declare class LineCurve extends Curve2 {
1706
+ readonly v1: Vec2;
1707
+ readonly v2: Vec2;
1708
+ constructor(v1?: Vec2, v2?: Vec2);
1709
+ getPoint(t: number, out: Vec2): Vec2;
1710
+ getPointAt(u: number, out: Vec2): Vec2;
1711
+ getTangent(_t: number, out: Vec2): Vec2;
1712
+ getTangentAt(u: number, out: Vec2): Vec2;
1713
+ }
1714
+ declare class LineCurve3 extends Curve3 {
1715
+ readonly v1: Vec3;
1716
+ readonly v2: Vec3;
1717
+ constructor(v1?: Vec3, v2?: Vec3);
1718
+ getPoint(t: number, out: Vec3): Vec3;
1719
+ getPointAt(u: number, out: Vec3): Vec3;
1720
+ getTangent(_t: number, out: Vec3): Vec3;
1721
+ getTangentAt(u: number, out: Vec3): Vec3;
1722
+ }
1723
+ declare class QuadraticBezierCurve extends Curve2 {
1724
+ readonly v0: Vec2;
1725
+ readonly v1: Vec2;
1726
+ readonly v2: Vec2;
1727
+ constructor(v0?: Vec2, v1?: Vec2, v2?: Vec2);
1728
+ getPoint(t: number, out: Vec2): Vec2;
1729
+ }
1730
+ declare class QuadraticBezierCurve3 extends Curve3 {
1731
+ readonly v0: Vec3;
1732
+ readonly v1: Vec3;
1733
+ readonly v2: Vec3;
1734
+ constructor(v0?: Vec3, v1?: Vec3, v2?: Vec3);
1735
+ getPoint(t: number, out: Vec3): Vec3;
1736
+ }
1737
+ declare class CubicBezierCurve extends Curve2 {
1738
+ readonly v0: Vec2;
1739
+ readonly v1: Vec2;
1740
+ readonly v2: Vec2;
1741
+ readonly v3: Vec2;
1742
+ constructor(v0?: Vec2, v1?: Vec2, v2?: Vec2, v3?: Vec2);
1743
+ getPoint(t: number, out: Vec2): Vec2;
1744
+ }
1745
+ declare class CubicBezierCurve3 extends Curve3 {
1746
+ readonly v0: Vec3;
1747
+ readonly v1: Vec3;
1748
+ readonly v2: Vec3;
1749
+ readonly v3: Vec3;
1750
+ constructor(v0?: Vec3, v1?: Vec3, v2?: Vec3, v3?: Vec3);
1751
+ getPoint(t: number, out: Vec3): Vec3;
1752
+ }
1753
+ declare class SplineCurve extends Curve2 {
1754
+ readonly points: Vec2[];
1755
+ constructor(points?: Vec2[]);
1756
+ getPoint(t: number, out: Vec2): Vec2;
1757
+ }
1758
+ declare class CatmullRomCurve3 extends Curve3 {
1759
+ readonly points: Vec3[];
1760
+ closed: boolean;
1761
+ curveType: CatmullRomType;
1762
+ tension: number;
1763
+ private readonly px;
1764
+ private readonly py;
1765
+ private readonly pz;
1766
+ private readonly head;
1767
+ private readonly tail;
1768
+ constructor(points?: Vec3[], closed?: boolean, curveType?: CatmullRomType, tension?: number);
1769
+ getPoint(t: number, out: Vec3): Vec3;
1770
+ }
1771
+ declare class EllipseCurve extends Curve2 {
1772
+ aX: number;
1773
+ aY: number;
1774
+ xRadius: number;
1775
+ yRadius: number;
1776
+ aStartAngle: number;
1777
+ aEndAngle: number;
1778
+ aClockwise: boolean;
1779
+ aRotation: number;
1780
+ constructor(aX?: number, aY?: number, xRadius?: number, yRadius?: number, aStartAngle?: number, aEndAngle?: number, aClockwise?: boolean, aRotation?: number);
1781
+ getPoint(t: number, out: Vec2): Vec2;
1782
+ }
1783
+ declare class ArcCurve extends EllipseCurve {
1784
+ constructor(aX?: number, aY?: number, radius?: number, startAngle?: number, endAngle?: number, clockwise?: boolean);
1785
+ }
1786
+ declare class FunctionCurve3 extends Curve3 {
1787
+ private readonly fn;
1788
+ constructor(fn: (t: number, out: Vec3) => Vec3);
1789
+ getPoint(t: number, out: Vec3): Vec3;
1790
+ }
1791
+ declare class CurvePath<V extends CurvePoint> extends Curve<V> {
1792
+ readonly curves: Curve<V>[];
1793
+ autoClose: boolean;
1794
+ private curveLengths;
1795
+ private readonly prototypePoint;
1796
+ constructor(prototypePoint: V);
1797
+ createPoint(): V;
1798
+ add(curve: Curve<V>): this;
1799
+ closePath(): this;
1800
+ getPoint(t: number, out: V): V;
1801
+ getPointAt(u: number, out: V): V;
1802
+ getUtoTmapping(u: number): number;
1803
+ getLength(): number;
1804
+ updateArcLengths(): void;
1805
+ getCurveLengths(): Float64Array;
1806
+ getPoints(divisions?: number): V[];
1807
+ }
1808
+ declare class CurvePath3 extends CurvePath<Vec3> {
1809
+ constructor();
1810
+ }
1811
+ declare class Path extends CurvePath<Vec2> {
1812
+ readonly currentPoint: Vec2;
1813
+ constructor(points?: readonly Vec2[]);
1814
+ setFromPoints(points: readonly Vec2[]): this;
1815
+ moveTo(x: number, y: number): this;
1816
+ lineTo(x: number, y: number): this;
1817
+ quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): this;
1818
+ bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): this;
1819
+ splineThru(points: readonly Vec2[]): this;
1820
+ arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, clockwise?: boolean): this;
1821
+ absarc(x: number, y: number, radius: number, startAngle: number, endAngle: number, clockwise?: boolean): this;
1822
+ ellipse(x: number, y: number, xRadius: number, yRadius: number, startAngle: number, endAngle: number, clockwise?: boolean, rotation?: number): this;
1823
+ absellipse(x: number, y: number, xRadius: number, yRadius: number, startAngle: number, endAngle: number, clockwise?: boolean, rotation?: number): this;
1824
+ }
1825
+ interface ShapePoints {
1826
+ readonly shape: Vec2[];
1827
+ readonly holes: Vec2[][];
1828
+ }
1829
+ declare class Shape extends Path {
1830
+ readonly holes: Path[];
1831
+ getPointsHoles(divisions?: number): Vec2[][];
1832
+ extractPoints(divisions?: number): ShapePoints;
1833
+ }
1834
+ declare function copyCurvePoint<V extends CurvePoint>(out: V, p: V): V;
1835
+
1836
+ declare function earcut(data: ArrayLike<number>, holeIndices?: ArrayLike<number> | null, dim?: number): number[];
1837
+ declare function earcutDeviation(data: ArrayLike<number>, holeIndices: ArrayLike<number> | null, dim: number, triangles: ArrayLike<number>): number;
1838
+ declare function contourArea(contour: readonly Vec2[]): number;
1839
+ declare function isClockWise(contour: readonly Vec2[]): boolean;
1840
+ declare function triangulateShape(contour: readonly Vec2[], holes: readonly (readonly Vec2[])[]): number[];
1841
+ declare const ShapeUtils: {
1842
+ readonly area: typeof contourArea;
1843
+ readonly isClockWise: typeof isClockWise;
1844
+ readonly triangulateShape: typeof triangulateShape;
1845
+ };
1846
+
1847
+ interface PrimitiveBuffers {
1848
+ readonly positions: Float32Array;
1849
+ readonly normals: Float32Array;
1850
+ readonly uvs: Float32Array;
1851
+ readonly indices: Uint16Array | Uint32Array;
1852
+ }
1853
+ interface PrimitiveSize {
1854
+ readonly vertices: number;
1855
+ readonly indices: number;
1856
+ }
1857
+ declare function allocatePrimitive(size: PrimitiveSize): PrimitiveBuffers;
1858
+ declare function primitiveDesc(buffers: PrimitiveBuffers): GeometryDesc;
1859
+ declare function boxSize(): PrimitiveSize;
1860
+ declare function writeBox(out: PrimitiveBuffers, width: number, height: number, depth: number): void;
1861
+ declare function planeSize(): PrimitiveSize;
1862
+ declare function writePlane(out: PrimitiveBuffers, width: number, height: number): void;
1863
+ declare function sphereSize(widthSegments: number, heightSegments: number): PrimitiveSize;
1864
+ declare function writeSphere(out: PrimitiveBuffers, radius: number, widthSegments: number, heightSegments: number): void;
1865
+ declare function cylinderSize(radialSegments: number): PrimitiveSize;
1866
+ declare function writeCylinder(out: PrimitiveBuffers, radiusTop: number, radiusBottom: number, height: number, radialSegments: number): void;
1867
+ declare function boxGeometry(width?: number, height?: number, depth?: number): GeometryDesc;
1868
+ declare function planeGeometry(width?: number, height?: number): GeometryDesc;
1869
+ declare function sphereGeometry(radius?: number, widthSegments?: number, heightSegments?: number): GeometryDesc;
1870
+ declare function cylinderGeometry(radiusTop?: number, radiusBottom?: number, height?: number, radialSegments?: number): GeometryDesc;
1871
+
1872
+ declare function planeGridSize(widthSegments: number, heightSegments: number): PrimitiveSize;
1873
+ declare function writePlaneGrid(out: PrimitiveBuffers, width: number, height: number, widthSegments: number, heightSegments: number): void;
1874
+ declare function planeGridGeometry(width?: number, height?: number, widthSegments?: number, heightSegments?: number): GeometryDesc;
1875
+ declare function circleSize(segments: number): PrimitiveSize;
1876
+ declare function writeCircle(out: PrimitiveBuffers, radius: number, segments: number, thetaStart: number, thetaLength: number): void;
1877
+ declare function circleGeometry(radius?: number, segments?: number, thetaStart?: number, thetaLength?: number): GeometryDesc;
1878
+ declare function ringSize(thetaSegments: number, phiSegments: number): PrimitiveSize;
1879
+ declare function writeRing(out: PrimitiveBuffers, innerRadius: number, outerRadius: number, thetaSegments: number, phiSegments: number, thetaStart: number, thetaLength: number): void;
1880
+ declare function ringGeometry(innerRadius?: number, outerRadius?: number, thetaSegments?: number, phiSegments?: number, thetaStart?: number, thetaLength?: number): GeometryDesc;
1881
+ declare function cylinderShellSize(radiusTop: number, radiusBottom: number, radialSegments: number, heightSegments: number, openEnded: boolean): PrimitiveSize;
1882
+ declare function writeCylinderShell(out: PrimitiveBuffers, radiusTop: number, radiusBottom: number, height: number, radialSegments: number, heightSegments: number, openEnded: boolean, thetaStart: number, thetaLength: number): void;
1883
+ declare function cylinderShellGeometry(radiusTop?: number, radiusBottom?: number, height?: number, radialSegments?: number, heightSegments?: number, openEnded?: boolean, thetaStart?: number, thetaLength?: number): GeometryDesc;
1884
+ declare function coneGeometry(radius?: number, height?: number, radialSegments?: number, heightSegments?: number, openEnded?: boolean, thetaStart?: number, thetaLength?: number): GeometryDesc;
1885
+ declare function sphereSectorSize(widthSegments: number, heightSegments: number, thetaStart: number, thetaLength: number): PrimitiveSize;
1886
+ declare function writeSphereSector(out: PrimitiveBuffers, radius: number, widthSegments: number, heightSegments: number, phiStart: number, phiLength: number, thetaStart: number, thetaLength: number): void;
1887
+ declare function sphereSectorGeometry(radius?: number, widthSegments?: number, heightSegments?: number, phiStart?: number, phiLength?: number, thetaStart?: number, thetaLength?: number): GeometryDesc;
1888
+ declare function torusSize(radialSegments: number, tubularSegments: number): PrimitiveSize;
1889
+ declare function writeTorus(out: PrimitiveBuffers, radius: number, tube: number, radialSegments: number, tubularSegments: number, arc: number): void;
1890
+ declare function torusGeometry(radius?: number, tube?: number, radialSegments?: number, tubularSegments?: number, arc?: number): GeometryDesc;
1891
+ declare function torusKnotSize(tubularSegments: number, radialSegments: number): PrimitiveSize;
1892
+ declare function writeTorusKnot(out: PrimitiveBuffers, radius: number, tube: number, tubularSegments: number, radialSegments: number, p: number, q: number): void;
1893
+ declare function torusKnotGeometry(radius?: number, tube?: number, tubularSegments?: number, radialSegments?: number, p?: number, q?: number): GeometryDesc;
1894
+ declare function capsuleSize(capSegments: number, radialSegments: number, heightSegments: number): PrimitiveSize;
1895
+ declare function writeCapsule(out: PrimitiveBuffers, radius: number, height: number, capSegments: number, radialSegments: number, heightSegments: number): void;
1896
+ declare function capsuleGeometry(radius?: number, height?: number, capSegments?: number, radialSegments?: number, heightSegments?: number): GeometryDesc;
1897
+ declare function latheSize(points: number, segments: number): PrimitiveSize;
1898
+ declare function writeLathe(out: PrimitiveBuffers, points: readonly Vec2[], segments: number, phiStart: number, phiLength: number): void;
1899
+ declare function latheGeometry(points?: readonly Vec2[], segments?: number, phiStart?: number, phiLength?: number): GeometryDesc;
1900
+ declare function tubeSize(tubularSegments: number, radialSegments: number): PrimitiveSize;
1901
+ declare function writeTube<V extends CurvePoint>(out: PrimitiveBuffers, path: Curve<V>, tubularSegments: number, radius: number, radialSegments: number, closed: boolean, frames?: FrenetFrames): void;
1902
+ declare function tubeGeometry<V extends CurvePoint>(path: Curve<V>, tubularSegments?: number, radius?: number, radialSegments?: number, closed?: boolean): GeometryDesc;
1903
+ type ParametricFunction = (u: number, v: number, out: Vec3) => void;
1904
+ declare function parametricSize(slices: number, stacks: number): PrimitiveSize;
1905
+ declare function writeParametric(out: PrimitiveBuffers, fn: ParametricFunction, slices: number, stacks: number): void;
1906
+ declare function parametricGeometry(fn: ParametricFunction, slices?: number, stacks?: number): GeometryDesc;
1907
+ declare function segmentedBoxSize(widthSegments: number, heightSegments: number, depthSegments: number): PrimitiveSize;
1908
+ declare function writeSegmentedBox(out: PrimitiveBuffers, width: number, height: number, depth: number, widthSegments: number, heightSegments: number, depthSegments: number): void;
1909
+ declare function segmentedBoxGeometry(width?: number, height?: number, depth?: number, widthSegments?: number, heightSegments?: number, depthSegments?: number): GeometryDesc;
1910
+ declare function roundedBoxGeometry(width?: number, height?: number, depth?: number, segments?: number, radius?: number): GeometryDesc;
1911
+ declare function polyhedronGeometry(vertices: ArrayLike<number>, indices: ArrayLike<number>, radius?: number, detail?: number): GeometryDesc;
1912
+ declare function tetrahedronGeometry(radius?: number, detail?: number): GeometryDesc;
1913
+ declare function octahedronGeometry(radius?: number, detail?: number): GeometryDesc;
1914
+ declare function icosahedronGeometry(radius?: number, detail?: number): GeometryDesc;
1915
+ declare function dodecahedronGeometry(radius?: number, detail?: number): GeometryDesc;
1916
+ declare function shapeGeometry(shapes: Shape | readonly Shape[], curveSegments?: number): GeometryDesc;
1917
+ interface ExtrudeOptions {
1918
+ readonly curveSegments?: number;
1919
+ readonly steps?: number;
1920
+ readonly depth?: number;
1921
+ readonly bevelEnabled?: boolean;
1922
+ readonly bevelThickness?: number;
1923
+ readonly bevelSize?: number;
1924
+ readonly bevelOffset?: number;
1925
+ readonly bevelSegments?: number;
1926
+ readonly extrudePath?: Curve<Vec3>;
1927
+ }
1928
+ declare function extrudeGeometry(shapes: Shape | readonly Shape[], options?: ExtrudeOptions): GeometryDesc;
1929
+ interface PositionSource$1 {
1930
+ readonly attributes: GeometryDesc["attributes"];
1931
+ readonly index?: ArrayLike<number>;
1932
+ }
1933
+ declare function edgesGeometry(geometry: PositionSource$1, thresholdAngleDegrees?: number): GeometryDesc;
1934
+ declare function wireframeGeometry(geometry: PositionSource$1): GeometryDesc;
1935
+
1936
+ declare function computeVertexNormals(geometry: GeometryDesc): GeometryDesc;
1937
+ declare function computeTangents(geometry: GeometryDesc): GeometryDesc;
1938
+ declare function toNonIndexed(geometry: GeometryDesc): GeometryDesc;
1939
+ declare function mergeGeometries(geometries: readonly GeometryDesc[], useGroups?: boolean): GeometryDesc;
1940
+ declare function mergeVertices(geometry: GeometryDesc, tolerance?: number, keep?: readonly string[]): GeometryDesc;
1941
+ declare function computeBoundingBox(geometry: GeometryDesc, out: Box3): Box3;
1942
+ declare function computeBoundingSphere(geometry: GeometryDesc, out: Sphere, scratch: Box3): Sphere;
1943
+ declare function translateGeometry(geometry: GeometryDesc, x: number, y: number, z: number): GeometryDesc;
1944
+ declare function centerGeometry(geometry: GeometryDesc, scratch: Box3, offset: Vec3): GeometryDesc;
1945
+ declare function applyMatrix4(geometry: GeometryDesc, m: ArrayLike<number>, mo?: number): GeometryDesc;
1946
+
1947
+ interface TypefaceGlyph {
1948
+ readonly ha: number;
1949
+ readonly x_min?: number;
1950
+ readonly x_max?: number;
1951
+ readonly o?: string;
1952
+ }
1953
+ interface TypefaceFont {
1954
+ readonly glyphs: Readonly<Record<string, TypefaceGlyph>>;
1955
+ readonly familyName?: string;
1956
+ readonly resolution: number;
1957
+ readonly ascender?: number;
1958
+ readonly descender?: number;
1959
+ readonly underlineThickness?: number;
1960
+ readonly boundingBox: {
1961
+ readonly xMin?: number;
1962
+ readonly xMax?: number;
1963
+ readonly yMin: number;
1964
+ readonly yMax: number;
1965
+ };
1966
+ }
1967
+ type TextGeometryDirection = "ltr" | "rtl" | "tb";
1968
+ interface TextGeometryOptions extends Omit<ExtrudeOptions, "extrudePath"> {
1969
+ readonly size?: number;
1970
+ readonly direction?: TextGeometryDirection;
1971
+ }
1972
+ declare class ShapePath {
1973
+ readonly subPaths: Path[];
1974
+ private current;
1975
+ moveTo(x: number, y: number): this;
1976
+ lineTo(x: number, y: number): this;
1977
+ quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): this;
1978
+ bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): this;
1979
+ private path;
1980
+ toShapes(): Shape[];
1981
+ }
1982
+ declare function textShapes(font: TypefaceFont, text: string, size?: number, direction?: TextGeometryDirection): Shape[];
1983
+ declare function textGeometry(font: TypefaceFont, text: string, options?: TextGeometryOptions): GeometryDesc;
1984
+
1985
+ type Mat4Array = Float32Array | Float64Array;
1986
+ declare function mat4Identity(out: Mat4Array, o: number): void;
1987
+ declare function mat4Compose(out: Mat4Array, o: number, px: number, py: number, pz: number, qx: number, qy: number, qz: number, qw: number, sx: number, sy: number, sz: number): void;
1988
+ declare function mat4Multiply(out: Mat4Array, o: number, a: Mat4Array, ao: number, b: Mat4Array, bo: number): void;
1989
+ declare function mat4TransformPoint(m: Mat4Array, o: number, v: Vec3): Vec3;
1990
+ declare function mat4Translation(m: Mat4Array, o: number, out: Vec3): Vec3;
1991
+ declare function mat4ComposeArrays(out: Mat4Array, o: number, position: Float32Array, po: number, rotation: Float32Array, ro: number, scale: Float32Array, so: number): void;
1992
+ declare function quatSlerpArrays(out: Float32Array, o: number, a: Float32Array, ao: number, b: Float32Array, bo: number, weights: Float64Array, wi: number): void;
1993
+ declare function mat4Copy(out: Mat4Array, o: number, m: ArrayLike<number>, mo: number): void;
1994
+ declare function mat4Transpose(out: Mat4Array, o: number, m: ArrayLike<number>, mo: number): void;
1995
+ declare function mat4Determinant(m: ArrayLike<number>, mo: number): number;
1996
+ declare function mat4Invert(out: Mat4Array, o: number, m: ArrayLike<number>, mo: number): boolean;
1997
+ declare function quatFromRotationColumns(out: Float32Array | Float64Array, o: number, m11: number, m21: number, m31: number, m12: number, m22: number, m32: number, m13: number, m23: number, m33: number): void;
1998
+ declare function mat4Decompose(m: ArrayLike<number>, mo: number, position: Float32Array | Float64Array, po: number, rotation: Float32Array | Float64Array, ro: number, scale: Float32Array | Float64Array, so: number): void;
1999
+ declare function mat4LookAt(out: Mat4Array, o: number, eyeX: number, eyeY: number, eyeZ: number, targetX: number, targetY: number, targetZ: number, upX: number, upY: number, upZ: number): void;
2000
+ declare function mat4Perspective(out: Mat4Array, o: number, fovYRadians: number, aspect: number, near: number, far: number): void;
2001
+ declare function mat4Frustum(out: Mat4Array, o: number, left: number, right: number, bottom: number, top: number, near: number, far: number): void;
2002
+ declare function mat4Orthographic(out: Mat4Array, o: number, left: number, right: number, bottom: number, top: number, near: number, far: number): void;
2003
+ declare function mat4TransformPointArrays(m: ArrayLike<number>, mo: number, v: ArrayLike<number>, vo: number, out: Float32Array | Float64Array, oo: number): void;
2004
+ declare function mat4TransformDirection(m: Mat4Array, o: number, v: Vec3): Vec3;
2005
+ declare function mat4MaxScale(m: ArrayLike<number>, mo: number): number;
2006
+ declare function slerpInto(out: Float32Array, o: number, ax: number, ay: number, az: number, aw: number, bx: number, by: number, bz: number, bw: number, t: number): void;
2007
+
2008
+ declare function detSin(x: number): number;
2009
+ declare function detCos(x: number): number;
2010
+ declare function detLog(x: number): number;
2011
+ declare function detExp(x: number): number;
2012
+
2013
+ declare class LineWriter {
2014
+ readonly capacity: number;
2015
+ readonly positions: Float32Array;
2016
+ readonly colors: Float32Array;
2017
+ count: number;
2018
+ dropped: number;
2019
+ private hex;
2020
+ private r;
2021
+ private g;
2022
+ private b;
2023
+ private a;
2024
+ private readonly corners;
2025
+ private readonly basis;
2026
+ private readonly matrix;
2027
+ private transformed;
2028
+ constructor(capacity: number);
2029
+ get vertexCount(): number;
2030
+ clear(): void;
2031
+ color(hex: number, alpha?: number): this;
2032
+ setMatrix(m: ArrayLike<number> | null, mo?: number): this;
2033
+ segment(ax: number, ay: number, az: number, bx: number, by: number, bz: number): boolean;
2034
+ axes(m: ArrayLike<number> | null, mo: number, size: number): this;
2035
+ axesAt(px: number, py: number, pz: number, qx: number, qy: number, qz: number, qw: number, size: number): this;
2036
+ box(minX: number, minY: number, minZ: number, maxX: number, maxY: number, maxZ: number, m?: ArrayLike<number> | null, mo?: number): this;
2037
+ frustum(inverseViewProjection: ArrayLike<number>, io: number, apex?: ArrayLike<number> | null): this;
2038
+ circle(cx: number, cy: number, cz: number, radius: number, nx: number, ny: number, nz: number, segments?: number): this;
2039
+ sphere(cx: number, cy: number, cz: number, radius: number, segments?: number): this;
2040
+ cross(x: number, y: number, z: number, size: number): this;
2041
+ arrow(ox: number, oy: number, oz: number, dx: number, dy: number, dz: number, length: number, headLength?: number, headWidth?: number): this;
2042
+ grid(size: number, divisions: number, centerColor?: number, gridColor?: number, y?: number): this;
2043
+ polarGrid(radius: number, sectors: number, rings: number, divisions: number, sectorColor?: number, ringColor?: number, y?: number): this;
2044
+ plane(nx: number, ny: number, nz: number, constant: number, size: number): this;
2045
+ path(points: ArrayLike<number>, count: number, closed?: boolean, stride?: number): this;
2046
+ skeleton(parents: ArrayLike<number>, worlds: ArrayLike<number>, count: number, offset?: number): this;
2047
+ normals(positions: ArrayLike<number>, normals: ArrayLike<number>, vertices: number, size: number): this;
2048
+ directionalLight(size: number, length: number): this;
2049
+ spotLight(angle: number, distance: number, segments?: number): this;
2050
+ hemisphere(size: number, skyColor: number, groundColor: number): this;
2051
+ audioCone(innerAngle: number, outerAngle: number, range: number, innerColor?: number, outerColor?: number): this;
2052
+ private cone;
2053
+ private halfCircle;
2054
+ private cornerEdges;
2055
+ private basisFor;
2056
+ }
2057
+ declare function lineGeometry(writer: LineWriter, dynamic?: boolean): GeometryDesc;
2058
+ declare function axesHelper(size?: number): GeometryDesc;
2059
+ declare function gridHelper(size?: number, divisions?: number, centerColor?: number, gridColor?: number): GeometryDesc;
2060
+ declare function polarGridHelper(radius?: number, sectors?: number, rings?: number, divisions?: number, sectorColor?: number, ringColor?: number): GeometryDesc;
2061
+ declare function arrowHelper(direction: readonly [number, number, number], length?: number, color?: number, headLength?: number, headWidth?: number): GeometryDesc;
2062
+ declare function boxHelper(min: readonly [number, number, number], max: readonly [number, number, number], color?: number): GeometryDesc;
2063
+ declare function cameraHelper(projectionInverse: ArrayLike<number>, color?: number): GeometryDesc;
2064
+ declare function directionalLightHelper(size?: number, length?: number, color?: number): GeometryDesc;
2065
+ declare function spotLightHelper(angle: number, distance?: number, color?: number, segments?: number): GeometryDesc;
2066
+ declare function pointLightHelper(radius?: number, color?: number, segments?: number): GeometryDesc;
2067
+ declare function hemisphereLightHelper(size?: number, skyColor?: number, groundColor?: number): GeometryDesc;
2068
+ declare function planeHelper(normal: readonly [number, number, number], constant?: number, size?: number, color?: number): GeometryDesc;
2069
+ declare function skeletonHelper(parents: ArrayLike<number>, worlds: ArrayLike<number>, color?: number): GeometryDesc;
2070
+ declare function vertexNormalsHelper(positions: ArrayLike<number>, normals: ArrayLike<number>, size?: number, color?: number): GeometryDesc;
2071
+ declare function positionalAudioHelper(innerAngle: number, outerAngle: number, range?: number, innerColor?: number, outerColor?: number): GeometryDesc;
2072
+ declare function helperSegments(desc: GeometryDesc): number;
2073
+
2074
+ declare const DEFAULT_DEBUG_SEGMENTS = 8192;
2075
+ interface DebugGraphics {
2076
+ createGeometry(desc: GeometryDesc): GeometryId;
2077
+ createMaterial(desc: MaterialDesc): MaterialId;
2078
+ createDetached(desc: NodeDesc): NodeId;
2079
+ markGeometryDirty(geometry: GeometryId, name: string, start?: number, count?: number): void;
2080
+ setDrawRange(geometry: GeometryId, start: number, count: number): void;
2081
+ setLayers(node: NodeId, mask: number): void;
2082
+ setVisible(node: NodeId, visible: boolean): void;
2083
+ }
2084
+ interface ContactSource {
2085
+ contactCount(): number;
2086
+ contactEntityA(index: number): Entity;
2087
+ contactEntityB(index: number): Entity;
2088
+ contactStarted(index: number): boolean;
2089
+ }
2090
+ interface PositionSource {
2091
+ position(entity: Entity, out: Vec3): Vec3;
2092
+ }
2093
+ interface DebugDrawOptions {
2094
+ readonly capacity?: number;
2095
+ readonly layers?: number;
2096
+ readonly depthTest?: boolean;
2097
+ readonly renderOrder?: number;
2098
+ }
2099
+ declare class DebugDraw {
2100
+ readonly writer: LineWriter;
2101
+ readonly node: NodeId;
2102
+ readonly geometry: GeometryId;
2103
+ readonly material: MaterialId;
2104
+ private readonly graphics;
2105
+ private flushed;
2106
+ private visible;
2107
+ private readonly a;
2108
+ private readonly b;
2109
+ constructor(graphics: DebugGraphics, options?: DebugDrawOptions);
2110
+ get segments(): number;
2111
+ get dropped(): number;
2112
+ get capacity(): number;
2113
+ setLayers(mask: number): void;
2114
+ setVisible(visible: boolean): void;
2115
+ clear(): void;
2116
+ color(hex: number, alpha?: number): this;
2117
+ transform(matrix: ArrayLike<number> | null, offset?: number): this;
2118
+ line(ax: number, ay: number, az: number, bx: number, by: number, bz: number, color?: number): this;
2119
+ ray(ox: number, oy: number, oz: number, dx: number, dy: number, dz: number, length: number, color?: number): this;
2120
+ arrow(ox: number, oy: number, oz: number, dx: number, dy: number, dz: number, length: number, color?: number): this;
2121
+ box(minX: number, minY: number, minZ: number, maxX: number, maxY: number, maxZ: number, color?: number): this;
2122
+ boxTransformed(minX: number, minY: number, minZ: number, maxX: number, maxY: number, maxZ: number, matrix: ArrayLike<number>, offset?: number, color?: number): this;
2123
+ sphere(x: number, y: number, z: number, radius: number, color?: number, segments?: number): this;
2124
+ circle(x: number, y: number, z: number, radius: number, nx: number, ny: number, nz: number, color?: number, segments?: number): this;
2125
+ axes(matrix: ArrayLike<number>, offset?: number, size?: number): this;
2126
+ axesAt(px: number, py: number, pz: number, qx: number, qy: number, qz: number, qw: number, size?: number): this;
2127
+ grid(size?: number, divisions?: number, y?: number): this;
2128
+ polarGrid(radius: number, sectors: number, rings: number, divisions?: number, y?: number): this;
2129
+ frustum(projection: CameraProjection, color?: number): this;
2130
+ frustumMatrix(inverseViewProjection: ArrayLike<number>, offset?: number, color?: number): this;
2131
+ plane(nx: number, ny: number, nz: number, constant: number, size: number, color?: number): this;
2132
+ point(x: number, y: number, z: number, size: number, color?: number): this;
2133
+ skeleton(parents: ArrayLike<number>, worlds: ArrayLike<number>, count?: number, color?: number): this;
2134
+ path(points: ArrayLike<number>, count: number, color?: number, closed?: boolean): this;
2135
+ navPath(path: NavPath, color?: number, marker?: number): this;
2136
+ contacts(source: ContactSource, positions: PositionSource, color?: number, startedColor?: number): this;
2137
+ shape(shape: ShapeDesc, matrix: ArrayLike<number>, offset?: number, color?: number): this;
2138
+ flush(): void;
2139
+ private tube;
2140
+ }
2141
+
2142
+ declare const DEFAULT_LABEL_CAPACITY = 64;
2143
+ interface LabelAnchorSource {
2144
+ renderPosition(entity: Entity, out: Vec3): Vec3;
2145
+ }
2146
+ interface LabelOccluder {
2147
+ raycast(origin: ArrayLike<number>, direction: ArrayLike<number>, out: PickHit, far?: number, layers?: number): boolean;
2148
+ }
2149
+ interface LabelText {
2150
+ create(entity: Entity, desc: NodeDesc): NodeId;
2151
+ setText(node: NodeId, text: string): void;
2152
+ setVisible(node: NodeId, visible: boolean): void;
2153
+ setTextStyle(node: NodeId, style: TextStyleDesc): void;
2154
+ }
2155
+ interface LabelPlacement {
2156
+ setPosition(entity: Entity, x: number, y: number, z: number): void;
2157
+ }
2158
+ interface LabelSpawner {
2159
+ spawn(): Entity;
2160
+ }
2161
+ interface LabelEngineText {
2162
+ readonly text: LabelText;
2163
+ readonly placement: LabelPlacement;
2164
+ readonly spawner: LabelSpawner;
2165
+ readonly add?: (entity: Entity) => void;
2166
+ }
2167
+ interface ScreenLabelsOptions {
2168
+ readonly capacity?: number;
2169
+ readonly anchors?: LabelAnchorSource;
2170
+ readonly ui?: GameUi;
2171
+ readonly engineText?: LabelEngineText;
2172
+ readonly occluder?: LabelOccluder;
2173
+ readonly occlusionLayers?: number;
2174
+ readonly fadeNear?: number;
2175
+ readonly fadeFar?: number;
2176
+ readonly clampToEdge?: boolean;
2177
+ readonly margin?: number;
2178
+ }
2179
+ interface LabelDesc {
2180
+ readonly name?: string;
2181
+ readonly entity?: Entity;
2182
+ readonly point?: readonly [number, number, number];
2183
+ readonly offset?: readonly [number, number, number];
2184
+ readonly text?: string;
2185
+ readonly style?: TextStyleDesc;
2186
+ readonly hud?: boolean;
2187
+ readonly occlude?: boolean;
2188
+ }
2189
+ declare class ScreenLabels {
2190
+ readonly capacity: number;
2191
+ readonly x: Float32Array;
2192
+ readonly y: Float32Array;
2193
+ readonly depth: Float32Array;
2194
+ readonly distance: Float32Array;
2195
+ readonly opacity: Float32Array;
2196
+ readonly visible: Uint8Array;
2197
+ readonly offscreen: Uint8Array;
2198
+ readonly occluded: Uint8Array;
2199
+ fadeNear: number;
2200
+ fadeFar: number;
2201
+ clampToEdge: boolean;
2202
+ margin: number;
2203
+ occlusionLayers: number;
2204
+ private count;
2205
+ private readonly live;
2206
+ private readonly entities;
2207
+ private readonly points;
2208
+ private readonly offsets;
2209
+ private readonly occludes;
2210
+ private readonly nodes;
2211
+ private readonly labelEntity;
2212
+ private readonly shownOpacity;
2213
+ private readonly shown;
2214
+ private readonly hudX;
2215
+ private readonly hudY;
2216
+ private readonly hudVisible;
2217
+ private readonly hudOpacity;
2218
+ private readonly styles;
2219
+ private readonly anchors;
2220
+ private readonly ui;
2221
+ private readonly engine;
2222
+ private readonly occluder;
2223
+ private readonly world;
2224
+ private readonly ndc;
2225
+ private readonly hit;
2226
+ private readonly origin;
2227
+ private readonly direction;
2228
+ constructor(options?: ScreenLabelsOptions);
2229
+ get size(): number;
2230
+ add(desc: LabelDesc): number;
2231
+ textEntity(label: number): Entity;
2232
+ node(label: number): NodeId;
2233
+ setPoint(label: number, x: number, y: number, z: number): void;
2234
+ setText(label: number, text: string): void;
2235
+ remove(label: number): void;
2236
+ update(projection: CameraProjection): void;
2237
+ private anchor;
2238
+ private occludedBy;
2239
+ private publish;
2240
+ }
2241
+ declare function engineLabelText(graphics: {
2242
+ create(entity: Entity, desc: NodeDesc): NodeId;
2243
+ setText(node: NodeId, text: string): void;
2244
+ setVisible(node: NodeId, visible: boolean): void;
2245
+ setTextStyle(node: NodeId, style: TextStyleDesc): void;
2246
+ }, transforms: LabelPlacement & {
2247
+ add(entity: Entity, x?: number, y?: number, z?: number): number;
2248
+ }, world: LabelSpawner): LabelEngineText;
2249
+
2250
+ interface VehicleWorld {
2251
+ readChassis(body: number, out: Float64Array): boolean;
2252
+ wakeChassis(body: number): void;
2253
+ writeChassis(body: number, motion: Float64Array, wake: boolean): void;
2254
+ castWheel(body: number, origin: Float64Array, direction: Float64Array, hit: Float64Array): number;
2255
+ applyImpulseAtPoint(body: number, impulse: Float64Array, point: Float64Array): void;
2256
+ }
2257
+ declare class VehicleSolver implements VehiclePort {
2258
+ private readonly world;
2259
+ private capacity;
2260
+ private inputs;
2261
+ private states;
2262
+ private descs;
2263
+ private runs;
2264
+ private vehicles;
2265
+ private active;
2266
+ private activeCount;
2267
+ private free;
2268
+ private freeCount;
2269
+ private readonly chassis;
2270
+ private readonly origin;
2271
+ private readonly direction;
2272
+ private readonly hit;
2273
+ private readonly impulse;
2274
+ private readonly point;
2275
+ private readonly tmp;
2276
+ private readonly reg;
2277
+ constructor(world: VehicleWorld);
2278
+ get count(): number;
2279
+ reserve(capacity: number): void;
2280
+ createVehicle(body: number, desc: Float32Array): number;
2281
+ destroyVehicle(vehicle: number): void;
2282
+ releaseBody(body: number): void;
2283
+ vehicleInputs(): Float32Array;
2284
+ vehicleStates(): Float32Array;
2285
+ update(dt: number): void;
2286
+ private stepVehicle;
2287
+ private drivetrain;
2288
+ private brakeTowardRest;
2289
+ private lockDifferentials;
2290
+ private lean;
2291
+ private ratio;
2292
+ private rotate;
2293
+ private relativeVelocity;
2294
+ private inertiaApply;
2295
+ private inverseMassAlong;
2296
+ private applyImpulse;
2297
+ private writeState;
2298
+ }
2299
+
2300
+ declare const CRAFT_BODIES: Readonly<Record<CraftPresetName, CraftBodyShape>>;
2301
+ declare function presetDesc(name: CraftPresetName, arcade: boolean): CraftDesc;
2302
+ declare function tune(desc: CraftDesc, tuning: CraftTuning): CraftDesc;
2303
+
2304
+ declare function hullSamples(source: HullSource | undefined): Float32Array;
2305
+ declare function encodeCraft(desc: CraftDesc): Float32Array;
2306
+
2307
+ type CraftSteering = "stick" | "tilt";
2308
+ interface CraftInputOptions {
2309
+ readonly steering?: CraftSteering;
2310
+ readonly invertPitch?: boolean;
2311
+ }
2312
+ declare class VirtualStick {
2313
+ private readonly input;
2314
+ private readonly controlX;
2315
+ private readonly controlY;
2316
+ private readonly radius;
2317
+ private pointer;
2318
+ private originX;
2319
+ private originY;
2320
+ x: number;
2321
+ y: number;
2322
+ constructor(input: InputActions, radius?: number, controlX?: string, controlY?: string);
2323
+ get active(): boolean;
2324
+ down(pointer: number, x: number, y: number, timeMs: number): void;
2325
+ move(pointer: number, x: number, y: number, timeMs: number): void;
2326
+ up(pointer: number, timeMs: number): void;
2327
+ private emit;
2328
+ }
2329
+ declare class VirtualSlider {
2330
+ private readonly input;
2331
+ private readonly control;
2332
+ value: number;
2333
+ constructor(input: InputActions, control?: string);
2334
+ set(value: number, timeMs: number): void;
2335
+ }
2336
+ interface TiltOptions {
2337
+ readonly rangeDegrees?: number;
2338
+ readonly deadzoneDegrees?: number;
2339
+ readonly smoothing?: number;
2340
+ }
2341
+ declare class TiltSteering {
2342
+ private readonly input;
2343
+ private readonly range;
2344
+ private readonly deadzone;
2345
+ private readonly smoothing;
2346
+ private restBeta;
2347
+ private restGamma;
2348
+ private calibrated;
2349
+ x: number;
2350
+ y: number;
2351
+ constructor(input: InputActions, options?: TiltOptions);
2352
+ calibrate(beta: number, gamma: number): void;
2353
+ update(beta: number, gamma: number, timeMs: number): void;
2354
+ private shape;
2355
+ }
2356
+ declare class BoatInput {
2357
+ private readonly input;
2358
+ private readonly throttle;
2359
+ private readonly rudder;
2360
+ private readonly sheet;
2361
+ constructor(input: InputActions, options?: CraftInputOptions);
2362
+ apply(boat: Boat): void;
2363
+ }
2364
+ declare class AircraftInput {
2365
+ private readonly input;
2366
+ private readonly pitch;
2367
+ private readonly roll;
2368
+ private readonly yaw;
2369
+ private readonly throttle;
2370
+ private readonly flaps;
2371
+ private readonly brake;
2372
+ private readonly invert;
2373
+ constructor(input: InputActions, options?: CraftInputOptions);
2374
+ apply(aircraft: Aircraft): void;
2375
+ }
2376
+ declare class HelicopterInput {
2377
+ private readonly input;
2378
+ private readonly collective;
2379
+ private readonly pitch;
2380
+ private readonly roll;
2381
+ private readonly pedal;
2382
+ constructor(input: InputActions, options?: CraftInputOptions);
2383
+ apply(helicopter: Helicopter): void;
2384
+ }
2385
+ declare const CRAFT_VIRTUAL_CONTROLS: {
2386
+ readonly stickX: "craft.stick.x";
2387
+ readonly stickY: "craft.stick.y";
2388
+ readonly tiltX: "craft.tilt.x";
2389
+ readonly tiltY: "craft.tilt.y";
2390
+ readonly slider: "craft.slider";
2391
+ readonly pedal: "craft.pedal";
2392
+ };
2393
+
2394
+ interface NavTilePoly {
2395
+ readonly verts: readonly number[];
2396
+ readonly neighbours?: readonly number[];
2397
+ readonly area?: number;
2398
+ readonly detailVerts?: readonly (readonly [number, number, number])[];
2399
+ readonly detailTris?: readonly (readonly [number, number, number])[];
2400
+ }
2401
+ interface NavTileDesc {
2402
+ readonly x: number;
2403
+ readonly z: number;
2404
+ readonly verts: readonly (readonly [number, number, number])[];
2405
+ readonly polys: readonly NavTilePoly[];
2406
+ readonly climb?: number;
2407
+ }
2408
+ declare function encodeNavTile(desc: NavTileDesc): Uint8Array;
2409
+
2410
+ declare const curve: {
2411
+ linear: (slope: number, offset: number) => CurveDecl;
2412
+ rising: () => CurveDecl;
2413
+ falling: () => CurveDecl;
2414
+ polynomial: (exponent: number, slope?: number, offset?: number) => CurveDecl;
2415
+ logistic: (steepness: number, midpoint: number) => CurveDecl;
2416
+ step: (threshold: number, below: number, above: number) => CurveDecl;
2417
+ points: (x: readonly number[], y: readonly number[]) => CurveDecl;
2418
+ };
2419
+ declare const input: {
2420
+ builtin: (name: BuiltinInput, min: number, max: number) => InputDecl;
2421
+ game: (slot: number, min: number, max: number) => InputDecl;
2422
+ need: (need: number, min?: number, max?: number) => InputDecl;
2423
+ };
2424
+ declare const behaviour: {
2425
+ idle: () => BehaviourDecl;
2426
+ moveToFocus: (arriveRadius?: number) => BehaviourDecl;
2427
+ pursue: (leadSeconds?: number, arriveRadius?: number) => BehaviourDecl;
2428
+ flee: (safeDistance: number) => BehaviourDecl;
2429
+ keepDistance: (min: number, max: number) => BehaviourDecl;
2430
+ search: (arriveRadius?: number) => BehaviourDecl;
2431
+ wander: () => BehaviourDecl;
2432
+ moveToGoal: (arriveRadius?: number) => BehaviourDecl;
2433
+ attack: (range: number, windupTicks: number, strikeTicks: number, recoverTicks: number) => BehaviourDecl;
2434
+ takeCover: (maxDistance: number) => BehaviourDecl;
2435
+ holdFormation: (arriveRadius?: number) => BehaviourDecl;
2436
+ useObject: (kinds: readonly number[], maxDistance: number) => BehaviourDecl;
2437
+ followSchedule: (arriveRadius?: number) => BehaviourDecl;
2438
+ bark: (lineSet: number) => BehaviourDecl;
2439
+ game: (code: number) => BehaviourDecl;
2440
+ };
2441
+ declare function consider(name: string, shape: CurveDecl): ConsiderationDecl;
2442
+ interface ActionOptions {
2443
+ readonly behaviour: BehaviourDecl;
2444
+ readonly base?: number;
2445
+ readonly momentum?: number;
2446
+ readonly cooldownTicks?: number;
2447
+ readonly speed?: number;
2448
+ readonly consider?: readonly ConsiderationDecl[];
2449
+ }
2450
+ declare function action(name: string, options: ActionOptions): ActionDecl;
2451
+ declare const DEFAULT_STEERING: SteeringDecl;
2452
+ declare const DEFAULT_SKILL: SkillDecl;
2453
+ declare function skill(partial: Partial<SkillDecl>): SkillDecl;
2454
+ interface ArchetypeOptions {
2455
+ readonly thinkEvery?: number;
2456
+ readonly senseEvery?: number;
2457
+ readonly inputs?: Readonly<Record<string, InputDecl>>;
2458
+ readonly actions: readonly ActionDecl[];
2459
+ readonly sight?: SightDecl | null;
2460
+ readonly hearing?: number | null;
2461
+ readonly memorySeconds?: number;
2462
+ readonly awarenessRadius?: number;
2463
+ readonly steering?: Partial<SteeringDecl>;
2464
+ readonly skill?: SkillDecl;
2465
+ readonly needs?: readonly NeedDecl[];
2466
+ readonly schedule?: readonly ScheduleBlockDecl[];
2467
+ readonly scheduleJitterMinutes?: number;
2468
+ }
2469
+ declare function archetype(name: string, options: ArchetypeOptions): ArchetypeDecl;
2470
+ declare function deterministicCos(radians: number): number;
2471
+ declare function sight(range: number, fovDegrees: number, options?: Partial<SightDecl>): SightDecl;
2472
+ declare function encodeArchetype(decl: ArchetypeDecl): Uint32Array;
2473
+ declare function actionIndex(decl: ArchetypeDecl, name: string): number;
2474
+
2475
+ declare const KEEPER_GAME_SLOTS: {
2476
+ readonly shotPower: 0;
2477
+ readonly habitStrength: 1;
2478
+ readonly shotPending: 2;
2479
+ };
2480
+ interface KeeperTuning {
2481
+ readonly reactSlowSeconds: number;
2482
+ readonly reactFastSeconds: number;
2483
+ readonly readNoiseAtSkill0: number;
2484
+ readonly readNoiseAtSkill1: number;
2485
+ readonly guessBase: number;
2486
+ }
2487
+ declare function keeper(tuning?: KeeperTuning): ArchetypeDecl;
2488
+
2489
+ declare const index_AI_EVENT_WORDS: typeof AI_EVENT_WORDS;
2490
+ declare const index_AI_MAX_GAME_SLOTS: typeof AI_MAX_GAME_SLOTS;
2491
+ declare const index_AI_NONE: typeof AI_NONE;
2492
+ declare const index_ActionDecl: typeof ActionDecl;
2493
+ type index_ActionOptions = ActionOptions;
2494
+ declare const index_AgentSpawn: typeof AgentSpawn;
2495
+ declare const index_AiEventKind: typeof AiEventKind;
2496
+ declare const index_AiEventKindCode: typeof AiEventKindCode;
2497
+ declare const index_AiPort: typeof AiPort;
2498
+ declare const index_AiWorldOptions: typeof AiWorldOptions;
2499
+ declare const index_ArchetypeDecl: typeof ArchetypeDecl;
2500
+ declare const index_ArchetypeHandle: typeof ArchetypeHandle;
2501
+ type index_ArchetypeOptions = ArchetypeOptions;
2502
+ declare const index_BUILTIN_INPUTS: typeof BUILTIN_INPUTS;
2503
+ declare const index_BehaviourDecl: typeof BehaviourDecl;
2504
+ declare const index_BuiltinInput: typeof BuiltinInput;
2505
+ declare const index_CurveDecl: typeof CurveDecl;
2506
+ declare const index_DEFAULT_SKILL: typeof DEFAULT_SKILL;
2507
+ declare const index_DEFAULT_STEERING: typeof DEFAULT_STEERING;
2508
+ declare const index_GameAi: typeof GameAi;
2509
+ declare const index_InputDecl: typeof InputDecl;
2510
+ declare const index_KEEPER_GAME_SLOTS: typeof KEEPER_GAME_SLOTS;
2511
+ type index_KeeperTuning = KeeperTuning;
2512
+ declare const index_NeedDecl: typeof NeedDecl;
2513
+ declare const index_PHASE_IDLE: typeof PHASE_IDLE;
2514
+ declare const index_PHASE_RECOVER: typeof PHASE_RECOVER;
2515
+ declare const index_PHASE_STRIKE: typeof PHASE_STRIKE;
2516
+ declare const index_PHASE_WINDUP: typeof PHASE_WINDUP;
2517
+ declare const index_ScheduleBlockDecl: typeof ScheduleBlockDecl;
2518
+ declare const index_SightDecl: typeof SightDecl;
2519
+ declare const index_SkillDecl: typeof SkillDecl;
2520
+ declare const index_SmartObjectSpawn: typeof SmartObjectSpawn;
2521
+ declare const index_SteeringDecl: typeof SteeringDecl;
2522
+ declare const index_TargetSpawn: typeof TargetSpawn;
2523
+ declare const index_action: typeof action;
2524
+ declare const index_actionIndex: typeof actionIndex;
2525
+ declare const index_archetype: typeof archetype;
2526
+ declare const index_behaviour: typeof behaviour;
2527
+ declare const index_consider: typeof consider;
2528
+ declare const index_curve: typeof curve;
2529
+ declare const index_deterministicCos: typeof deterministicCos;
2530
+ declare const index_encodeArchetype: typeof encodeArchetype;
2531
+ declare const index_input: typeof input;
2532
+ declare const index_keeper: typeof keeper;
2533
+ declare const index_sight: typeof sight;
2534
+ declare const index_skill: typeof skill;
2535
+ declare namespace index {
2536
+ export { index_AI_EVENT_WORDS as AI_EVENT_WORDS, index_AI_MAX_GAME_SLOTS as AI_MAX_GAME_SLOTS, index_AI_NONE as AI_NONE, index_ActionDecl as ActionDecl, type index_ActionOptions as ActionOptions, index_AgentSpawn as AgentSpawn, index_AiEventKind as AiEventKind, index_AiEventKindCode as AiEventKindCode, index_AiPort as AiPort, index_AiWorldOptions as AiWorldOptions, index_ArchetypeDecl as ArchetypeDecl, index_ArchetypeHandle as ArchetypeHandle, type index_ArchetypeOptions as ArchetypeOptions, index_BUILTIN_INPUTS as BUILTIN_INPUTS, index_BehaviourDecl as BehaviourDecl, index_BuiltinInput as BuiltinInput, index_CurveDecl as CurveDecl, index_DEFAULT_SKILL as DEFAULT_SKILL, index_DEFAULT_STEERING as DEFAULT_STEERING, index_GameAi as GameAi, index_InputDecl as InputDecl, index_KEEPER_GAME_SLOTS as KEEPER_GAME_SLOTS, type index_KeeperTuning as KeeperTuning, index_NeedDecl as NeedDecl, index_PHASE_IDLE as PHASE_IDLE, index_PHASE_RECOVER as PHASE_RECOVER, index_PHASE_STRIKE as PHASE_STRIKE, index_PHASE_WINDUP as PHASE_WINDUP, index_ScheduleBlockDecl as ScheduleBlockDecl, index_SightDecl as SightDecl, index_SkillDecl as SkillDecl, index_SmartObjectSpawn as SmartObjectSpawn, index_SteeringDecl as SteeringDecl, index_TargetSpawn as TargetSpawn, index_action as action, index_actionIndex as actionIndex, index_archetype as archetype, index_behaviour as behaviour, index_consider as consider, index_curve as curve, index_deterministicCos as deterministicCos, index_encodeArchetype as encodeArchetype, index_input as input, index_keeper as keeper, index_sight as sight, index_skill as skill };
2537
+ }
2538
+
2539
+ declare class JsNav implements NavPort {
2540
+ readonly name = "js-nav";
2541
+ private mesh;
2542
+ private links;
2543
+ private query;
2544
+ private crowd;
2545
+ private traffic;
2546
+ private readonly filter;
2547
+ private extents;
2548
+ private path;
2549
+ private complete;
2550
+ get pathComplete(): boolean;
2551
+ private requireMesh;
2552
+ private requireQuery;
2553
+ private requireCrowd;
2554
+ init(desc: NavDesc): void;
2555
+ private requireLinks;
2556
+ addTile(bytes: Uint8Array): number;
2557
+ removeTile(x: number, z: number): void;
2558
+ addLink(start: readonly [number, number, number], end: readonly [number, number, number], radius: number, bidirectional: boolean, area: number, user: number): number;
2559
+ removeLink(link: number): void;
2560
+ setAreaCost(area: number, cost: number): void;
2561
+ setIncludeMask(low: number, high: number): void;
2562
+ nearest(x: number, y: number, z: number, out: Float32Array): boolean;
2563
+ findPath(sx: number, sy: number, sz: number, ex: number, ey: number, ez: number, out: Float32Array): number;
2564
+ addAgent(x: number, y: number, z: number, radius: number, speed: number, accel: number): number;
2565
+ removeAgent(agent: number): void;
2566
+ setAgentTarget(agent: number, x: number, y: number, z: number): void;
2567
+ stopAgent(agent: number): void;
2568
+ agents(): Float32Array;
2569
+ loadRoads(words: Uint32Array): void;
2570
+ private roads;
2571
+ addVehicle(lane: number, position: number, speed: number, driver: Float32Array): number;
2572
+ removeVehicle(vehicle: number): void;
2573
+ setExternalVehicle(vehicle: number, lane: number, position: number, speed: number): void;
2574
+ vehicles(): Float32Array;
2575
+ signal(lane: number): number;
2576
+ step(dt: number): void;
2577
+ dispose(): void;
2578
+ }
2579
+
2580
+ interface WebAudioOptions {
2581
+ readonly createMediaElement?: () => HTMLMediaElement;
2582
+ }
2583
+ declare class WebAudioPort implements AudioPort {
2584
+ readonly name = "web-audio";
2585
+ readonly capabilities: AudioCapabilities;
2586
+ private readonly context;
2587
+ private readonly buffers;
2588
+ private readonly buses;
2589
+ private readonly voices;
2590
+ private readonly analysers;
2591
+ private readonly sends;
2592
+ private readonly streams;
2593
+ private readonly meterScratch;
2594
+ private readonly createMediaElement;
2595
+ private nextVoice;
2596
+ private readonly onEnded;
2597
+ constructor(context: AudioContext, maxVoices?: number, options?: WebAudioOptions);
2598
+ get sampleRate(): number;
2599
+ get unlocked(): boolean;
2600
+ unlock(): void;
2601
+ decode(source: AssetSource): Promise<number>;
2602
+ createSound(samples: Float32Array, channels: number, sampleRate: number): number;
2603
+ createBus(_name: string, parent: number): number;
2604
+ createReverb(parent: number, impulse: number): number;
2605
+ setBusGain(bus: number, gain: number, rampSeconds: number): void;
2606
+ setBusFilter(bus: number, kind: number, frequency: number, q: number, gainDb: number): void;
2607
+ meter(bus: number, out: Float32Array): void;
2608
+ createAnalyser(bus: number, settings: AnalyserSettings): number;
2609
+ readAnalyser(analyser: number, mode: number, out: Float32Array | Uint8Array): void;
2610
+ setBusSend(bus: number, target: number, gain: number): void;
2611
+ play(sound: number, bus: number, gain: number, rate: number, loop: boolean, spatial: boolean): number;
2612
+ stop(voice: number, fadeSeconds: number): void;
2613
+ isPlaying(voice: number): boolean;
2614
+ setVoiceGain(voice: number, gain: number, rampSeconds: number): void;
2615
+ setVoiceRate(voice: number, rate: number, detuneCents: number): void;
2616
+ setVoiceSpatial(voice: number, params: Float32Array): void;
2617
+ setVoiceLoop(voice: number, loop: boolean, startSeconds: number, endSeconds: number): void;
2618
+ setVoicePosition(voice: number, matrix: Float32Array, offset: number): void;
2619
+ setListener(matrix: Float32Array, offset: number): void;
2620
+ openStream(source: AssetSource, bus: number): Promise<number>;
2621
+ private stream;
2622
+ playStream(stream: number, gain: number, loop: boolean): void;
2623
+ pauseStream(stream: number): void;
2624
+ seekStream(stream: number, seconds: number): void;
2625
+ streamTime(stream: number): number;
2626
+ streamDuration(stream: number): number;
2627
+ closeStream(stream: number): void;
2628
+ suspend(): void;
2629
+ resume(): void;
2630
+ dispose(): void;
2631
+ private ramp;
2632
+ private release;
2633
+ }
2634
+
2635
+ type EnvironmentPreset = "studio" | "outdoor" | "night" | "color" | "debug";
2636
+ interface EnvironmentOptions {
2637
+ readonly width?: number;
2638
+ readonly height?: number;
2639
+ readonly intensity?: number;
2640
+ readonly format?: "rgba16f" | "rgba32f";
2641
+ readonly sunDirection?: readonly [number, number, number];
2642
+ readonly sunColor?: number;
2643
+ readonly sunIntensity?: number;
2644
+ readonly skyColor?: number;
2645
+ readonly horizonColor?: number;
2646
+ readonly groundColor?: number;
2647
+ readonly color?: number;
2648
+ readonly moonDirection?: readonly [number, number, number];
2649
+ readonly starDensity?: number;
2650
+ readonly seed?: number;
2651
+ }
2652
+ interface ApplyEnvironmentOptions extends EnvironmentOptions {
2653
+ readonly background?: boolean;
2654
+ readonly backgroundBlurriness?: number;
2655
+ readonly environmentIntensity?: number;
2656
+ readonly toneMapping?: ToneMapping;
2657
+ readonly exposure?: number;
2658
+ }
2659
+ declare function toHalf(value: number): number;
2660
+ declare function fromHalf(bits: number): number;
2661
+ declare function environmentTexture(preset: EnvironmentPreset, options?: EnvironmentOptions): TextureDesc;
2662
+ declare function applyEnvironmentPreset(graphics: Graphics, preset: EnvironmentPreset, options?: ApplyEnvironmentOptions): TextureId;
2663
+
2664
+ type TransitionKind = "fade" | "wipe" | "iris" | "dissolve" | "pixelate";
2665
+ interface TransitionOptions {
2666
+ readonly color?: number;
2667
+ readonly direction?: readonly [number, number];
2668
+ readonly softness?: number;
2669
+ readonly center?: readonly [number, number];
2670
+ readonly cellSize?: number;
2671
+ readonly noiseScale?: number;
2672
+ readonly edge?: number;
2673
+ }
2674
+ declare const TRANSITION_PROGRESS = "progress";
2675
+ declare function transitionEffect(kind: TransitionKind, options?: TransitionOptions): PostEffectDesc;
2676
+ declare class ScreenTransition {
2677
+ private readonly graphics;
2678
+ readonly chain: PostChainId;
2679
+ readonly effect: number;
2680
+ progress: number;
2681
+ private from;
2682
+ private to;
2683
+ private elapsed;
2684
+ private duration;
2685
+ private curve;
2686
+ private state;
2687
+ constructor(graphics: Graphics, chain: PostChainId, effect?: number);
2688
+ static create(graphics: Graphics, kind: TransitionKind, options?: TransitionOptions): ScreenTransition;
2689
+ get done(): boolean;
2690
+ get running(): boolean;
2691
+ play(seconds: number, curve?: EaseId, from?: number, to?: number): void;
2692
+ cover(seconds: number, curve?: EaseId): void;
2693
+ reveal(seconds: number, curve?: EaseId): void;
2694
+ set(progress: number): void;
2695
+ update(dtSeconds: number): void;
2696
+ private write;
2697
+ }
2698
+ interface CrossfadeOptions {
2699
+ readonly camera: Entity;
2700
+ readonly cameraNode: NodeId;
2701
+ readonly width: number;
2702
+ readonly height: number;
2703
+ readonly fovDegrees: number;
2704
+ readonly near: number;
2705
+ readonly aspect: number;
2706
+ readonly layers?: number;
2707
+ readonly overlayLayer?: number;
2708
+ }
2709
+ declare class CrossfadeTransition {
2710
+ private readonly graphics;
2711
+ readonly target: RenderTargetId;
2712
+ readonly pass: RenderPassId;
2713
+ readonly overlay: Entity;
2714
+ readonly material: MaterialId;
2715
+ readonly geometry: GeometryId;
2716
+ progress: number;
2717
+ private elapsed;
2718
+ private duration;
2719
+ private curve;
2720
+ private state;
2721
+ private live;
2722
+ private pending;
2723
+ private readonly node;
2724
+ constructor(graphics: Graphics, transforms: Transforms, overlay: Entity, options: CrossfadeOptions);
2725
+ capture(live?: boolean): void;
2726
+ play(seconds: number, curve?: EaseId): void;
2727
+ get done(): boolean;
2728
+ update(dtSeconds: number): void;
2729
+ private write;
2730
+ }
2731
+
2732
+ interface BatchedMeshOptions {
2733
+ readonly material: MaterialId;
2734
+ readonly maxVertices: number;
2735
+ readonly maxGeometries?: number;
2736
+ readonly maxInstances: number;
2737
+ readonly maxInstanceVertices?: number;
2738
+ readonly colors?: boolean;
2739
+ readonly castShadow?: boolean;
2740
+ readonly receiveShadow?: boolean;
2741
+ readonly native?: boolean;
2742
+ }
2743
+ declare class BatchedMesh {
2744
+ readonly geometry: GeometryId;
2745
+ readonly node: NodeId;
2746
+ readonly maxInstances: number;
2747
+ private readonly graphics;
2748
+ private readonly sourcePositions;
2749
+ private readonly sourceNormals;
2750
+ private readonly sourceUvs;
2751
+ private sourceUsed;
2752
+ private readonly geometryStart;
2753
+ private readonly geometryCount;
2754
+ private readonly freeHead;
2755
+ private geometries;
2756
+ private readonly positions;
2757
+ private readonly normals;
2758
+ private readonly uvs;
2759
+ private readonly colors;
2760
+ private outputUsed;
2761
+ private readonly instanceGeometry;
2762
+ private readonly instanceStart;
2763
+ private readonly instanceFlags;
2764
+ private readonly instanceNext;
2765
+ private readonly matrices;
2766
+ private readonly instanceColor;
2767
+ private instances;
2768
+ private dirtyLow;
2769
+ private dirtyHigh;
2770
+ private colorDirtyLow;
2771
+ private colorDirtyHigh;
2772
+ private drawn;
2773
+ private readonly draw;
2774
+ private nativeCount;
2775
+ private slotsDirty;
2776
+ private instancesDirty;
2777
+ private sourceDirtyLow;
2778
+ private sourceDirtyHigh;
2779
+ constructor(graphics: Graphics, options: BatchedMeshOptions);
2780
+ get native(): boolean;
2781
+ get geometryCountUsed(): number;
2782
+ get instanceCount(): number;
2783
+ get vertexCount(): number;
2784
+ addGeometry(desc: GeometryDesc): number;
2785
+ addInstance(geometry: number): number;
2786
+ private addNativeInstance;
2787
+ private writeNative;
2788
+ deleteInstance(id: number): void;
2789
+ setMatrixAt(id: number, matrix: ArrayLike<number>, offset?: number): void;
2790
+ getMatrixAt(id: number, out: Float32Array | Float64Array, offset?: number): void;
2791
+ setVisibleAt(id: number, visible: boolean): void;
2792
+ setColorAt(id: number, r: number, g: number, b: number): void;
2793
+ update(): void;
2794
+ private updateNative;
2795
+ private requireLive;
2796
+ private markRange;
2797
+ private collapse;
2798
+ private bake;
2799
+ }
2800
+
2801
+ declare class HeadlessAudio implements AudioPort {
2802
+ readonly name = "headless";
2803
+ readonly capabilities: AudioCapabilities;
2804
+ readonly sampleRate = 48000;
2805
+ private unlockedValue;
2806
+ private soundCount;
2807
+ private busCount;
2808
+ private readonly busGains;
2809
+ private readonly busFilters;
2810
+ private readonly busMeters;
2811
+ private readonly sends;
2812
+ private readonly reverbs;
2813
+ private readonly analysers;
2814
+ private readonly analyserBus;
2815
+ private readonly streams;
2816
+ private readonly voiceSound;
2817
+ private readonly voiceLoop;
2818
+ private readonly voicePosition;
2819
+ private readonly voiceGain;
2820
+ private readonly voiceRate;
2821
+ private readonly voiceLoopPoints;
2822
+ private readonly voiceSpatial;
2823
+ private readonly listener;
2824
+ private nextVoice;
2825
+ constructor(maxVoices?: number);
2826
+ get unlocked(): boolean;
2827
+ unlock(): void;
2828
+ decode(_source: AssetSource): Promise<number>;
2829
+ createSound(samples: Float32Array, channels: number, sampleRate: number): number;
2830
+ createBus(_name: string, _parent: number): number;
2831
+ setBusGain(bus: number, gain: number, _rampSeconds: number): void;
2832
+ busGain(bus: number): number;
2833
+ setBusFilter(bus: number, kind: number, frequency: number, q: number, gainDb: number): void;
2834
+ busFilter(bus: number, out: Float32Array): void;
2835
+ meter(bus: number, out: Float32Array): void;
2836
+ inject(bus: number, samples: Float32Array): void;
2837
+ createAnalyser(bus: number, settings: AnalyserSettings): number;
2838
+ readAnalyser(analyser: number, mode: number, out: Float32Array | Uint8Array): void;
2839
+ createReverb(parent: number, impulse: number): number;
2840
+ reverbImpulse(bus: number): number;
2841
+ setBusSend(bus: number, target: number, gain: number): void;
2842
+ busSend(bus: number, target: number): number;
2843
+ play(sound: number, _bus: number, gain: number, rate: number, loop: boolean, _spatial: boolean): number;
2844
+ stop(voice: number, _fadeSeconds: number): void;
2845
+ isPlaying(voice: number): boolean;
2846
+ setVoiceGain(voice: number, gain: number, _rampSeconds: number): void;
2847
+ voiceGainOf(voice: number): number;
2848
+ setVoiceRate(voice: number, rate: number, detuneCents: number): void;
2849
+ voiceRateOf(voice: number, out: Float32Array): void;
2850
+ setVoiceSpatial(voice: number, params: Float32Array): void;
2851
+ voiceSpatialOf(voice: number, out: Float32Array): void;
2852
+ setVoiceLoop(voice: number, loop: boolean, startSeconds: number, endSeconds: number): void;
2853
+ voiceLoopOf(voice: number, out: Float32Array): void;
2854
+ setVoicePosition(voice: number, matrix: Float32Array, offset: number): void;
2855
+ voiceX(voice: number): number;
2856
+ setListener(matrix: Float32Array, offset: number): void;
2857
+ openStream(_source: AssetSource, bus: number): Promise<number>;
2858
+ private stream;
2859
+ playStream(stream: number, gain: number, loop: boolean): void;
2860
+ pauseStream(stream: number): void;
2861
+ seekStream(stream: number, seconds: number): void;
2862
+ streamTime(stream: number): number;
2863
+ streamDuration(stream: number): number;
2864
+ streamState(stream: number): number;
2865
+ closeStream(stream: number): void;
2866
+ commit(frame: Float64Array, at: number): void;
2867
+ suspend(): void;
2868
+ resume(): void;
2869
+ dispose(): void;
2870
+ }
2871
+
2872
+ interface TickLockstepLinkOptions {
2873
+ readonly seats: number;
2874
+ readonly channel?: string;
2875
+ }
2876
+ declare class TickLockstepLink implements LockstepLink {
2877
+ readonly transport: TickRoomTransport;
2878
+ private readonly seats;
2879
+ private readonly channel;
2880
+ private readonly presence;
2881
+ private readonly record;
2882
+ private session;
2883
+ private lastTick;
2884
+ private readonly sink;
2885
+ constructor(transport: TickRoomTransport, options: TickLockstepLinkOptions);
2886
+ get seat(): number;
2887
+ toReferee(payload: Uint8Array, length: number): void;
2888
+ toPeers(payload: Uint8Array, length: number): void;
2889
+ poll(session: LockstepSession): void;
2890
+ close(): void;
2891
+ }
2892
+
2893
+ declare const GAME_API_PROFILE = "game_api";
2894
+ declare const DIRECT_ENGINE_PREFIX = "direct_engine:";
2895
+ type AdmittedEngine = "three" | "phaser";
2896
+ type GameProfile = {
2897
+ readonly kind: "game_api";
2898
+ } | {
2899
+ readonly kind: "direct_engine";
2900
+ readonly engine: AdmittedEngine;
2901
+ };
2902
+ interface GameManifest {
2903
+ readonly profile: string;
2904
+ }
2905
+ interface ProfileParseResult {
2906
+ readonly ok: boolean;
2907
+ readonly profile: GameProfile | null;
2908
+ readonly error: string | null;
2909
+ }
2910
+ interface SourceFile {
2911
+ readonly path: string;
2912
+ readonly source: string;
2913
+ }
2914
+ type ProfileViolationReason = "engine_import" | "foreign_engine_import" | "backend_import" | "dynamic_import";
2915
+ interface ProfileViolation {
2916
+ readonly path: string;
2917
+ readonly line: number;
2918
+ readonly specifier: string | null;
2919
+ readonly reason: ProfileViolationReason;
2920
+ readonly engine: string | null;
2921
+ }
2922
+ interface ProfileCheckResult {
2923
+ readonly ok: boolean;
2924
+ readonly profile: GameProfile | null;
2925
+ readonly violations: readonly ProfileViolation[];
2926
+ readonly error: string | null;
2927
+ }
2928
+ declare function parseGameProfile(value: string): ProfileParseResult;
2929
+ declare function engineOf(specifier: string): string | null;
2930
+ declare function checkGameSources(manifest: GameManifest, files: readonly SourceFile[]): ProfileCheckResult;
2931
+ interface FoundImport {
2932
+ readonly specifier: string | null;
2933
+ readonly line: number;
2934
+ readonly dynamic: boolean;
2935
+ }
2936
+ declare function scanImports(source: string): FoundImport[];
2937
+
2938
+ declare const ENGINE_STREAM_EXPORT_NAMES: readonly ["engine_stream_open", "engine_stream_close", "engine_stream_provide", "engine_stream_update", "engine_stream_registers", "engine_stream_open_logic", "engine_stream_step_logic", "engine_stream_collider"];
2939
+ type StreamExports = Readonly<Record<(typeof ENGINE_STREAM_EXPORT_NAMES)[number], (...args: number[]) => number>>;
2940
+ declare class EngineWorldStreaming implements WorldStreamingPort {
2941
+ private readonly runtime;
2942
+ private readonly exports;
2943
+ private readonly render;
2944
+ private readonly eye;
2945
+ private readonly actors;
2946
+ private readonly ops;
2947
+ private readonly scratch;
2948
+ private buffer;
2949
+ private floats;
2950
+ private words;
2951
+ private bytes;
2952
+ private lazySupport;
2953
+ constructor(runtime: EngineRuntime, exports: StreamExports, render: () => number);
2954
+ private views;
2955
+ private ensure;
2956
+ private stage;
2957
+ lazyPacks(): boolean;
2958
+ open(world: Uint8Array, materials: readonly number[], tier: number): number;
2959
+ provide(stream: number, pack: Uint8Array): number;
2960
+ update(stream: number, eye: Float32Array): void;
2961
+ registers(stream: number): Uint32Array;
2962
+ openLogic(stream: number, stepSeconds: number, budget: number, actors: number): number;
2963
+ stepLogic(stream: number, actors: Float32Array, count: number, ops: Uint32Array): number;
2964
+ collider(stream: number, index: number, out: Float32Array): void;
2965
+ close(stream: number): void;
2966
+ }
2967
+
2968
+ interface SimulatedLink {
2969
+ readonly bytesPerSecond: number;
2970
+ readonly latencyMs: number;
2971
+ readonly concurrency?: number;
2972
+ readonly budgetBytes?: number;
2973
+ readonly prefetchSlots?: number;
2974
+ readonly preempt?: boolean;
2975
+ }
2976
+ interface SimulatedEngine {
2977
+ readonly radius: number;
2978
+ readonly need: number;
2979
+ readonly unload?: number;
2980
+ readonly maxInflight?: number;
2981
+ }
2982
+ type CameraPath = Float32Array | Float64Array | readonly (readonly [number, number, number])[];
2983
+ interface StreamingSimulation {
2984
+ readonly layer: PrefetchLayerDesc;
2985
+ readonly path: CameraPath;
2986
+ readonly fps?: number;
2987
+ readonly link: SimulatedLink;
2988
+ readonly engine: SimulatedEngine;
2989
+ readonly predictor?: PredictorOptions | false;
2990
+ readonly network?: NetworkHint | null;
2991
+ }
2992
+ interface StreamingReport {
2993
+ readonly frames: number;
2994
+ readonly startupFrames: number;
2995
+ readonly startupMs: number;
2996
+ readonly startupBytes: number;
2997
+ readonly stallFrames: number;
2998
+ readonly firstStallFrame: number;
2999
+ readonly bytesFetched: number;
3000
+ readonly bytesWasted: number;
3001
+ readonly peakHeldBytes: number;
3002
+ readonly prefetchRequests: number;
3003
+ readonly engineRequests: number;
3004
+ readonly prefetchHits: number;
3005
+ readonly preemptedFetches: number;
3006
+ }
3007
+ declare function simulateStreaming(simulation: StreamingSimulation): StreamingReport;
3008
+ declare function scriptedPath(keys: readonly {
3009
+ readonly t: number;
3010
+ readonly at: readonly [number, number, number];
3011
+ }[], fps?: number): Float64Array;
3012
+
3013
+ /** The part of a catalogue variant a twin needs. `services.catalogue.product` returns this shape in `variants`. */
3014
+ interface TwinVariant {
3015
+ readonly variant_id: string;
3016
+ readonly name: string;
3017
+ readonly available: boolean;
3018
+ }
3019
+ /** One variant's look: the edit each named or numbered region takes. Regions it leaves out go back to the captured look. */
3020
+ type TwinLook = Readonly<Record<string, SceneryEdit>>;
3021
+ interface TwinBody {
3022
+ edit(region: number | string, edit: SceneryEdit): void;
3023
+ }
3024
+ interface SplatTwinOptions {
3025
+ /** The splat body or scenery showing the product. */
3026
+ readonly body: TwinBody;
3027
+ readonly variants: readonly TwinVariant[];
3028
+ /** Looks by variant id or, as a fallback, by variant name. A variant with no look shows the capture as it is. */
3029
+ readonly looks: Readonly<Record<string, TwinLook>>;
3030
+ /** Selected when the twin is made. The first available variant if left out. */
3031
+ readonly selected?: string;
3032
+ }
3033
+ /** Connects a catalogue product's variants to edits on one capture, so colours and finishes need no new capture. */
3034
+ declare class SplatTwin {
3035
+ private readonly body;
3036
+ private readonly variants;
3037
+ private readonly looks;
3038
+ private touched;
3039
+ private current;
3040
+ constructor(options: SplatTwinOptions);
3041
+ /** The selected variant, whose id goes to the cart or purchase intent. */
3042
+ get selected(): TwinVariant | null;
3043
+ /** Whether a variant has a look of its own, so a picker can mark the ones the capture cannot show. */
3044
+ shows(variantId: string): boolean;
3045
+ private lookOf;
3046
+ /** Shows a variant. It does not refuse an unavailable one: a shopper may look at a sold-out colour. */
3047
+ select(variantId: string): TwinVariant;
3048
+ }
3049
+
3050
+ declare const ENGINE_SPLAT_EXPORT_NAMES: readonly ["engine_splat_open", "engine_splat_close", "engine_splat_provide", "engine_splat_fail", "engine_splat_update", "engine_splat_requests", "engine_splat_set_transform", "engine_splat_registers"];
3051
+ type SplatExports = Readonly<Record<(typeof ENGINE_SPLAT_EXPORT_NAMES)[number], (...args: number[]) => number>>;
3052
+ declare class EngineScenery implements SceneryPort {
3053
+ private readonly runtime;
3054
+ private readonly exports;
3055
+ private readonly render;
3056
+ private scratch;
3057
+ private scratchBytes;
3058
+ private live;
3059
+ private buffer;
3060
+ private floats;
3061
+ private words;
3062
+ private bytes;
3063
+ readonly bodies: SceneryBodyPort | null;
3064
+ constructor(runtime: EngineRuntime, exports: SplatExports, render: () => number);
3065
+ private stageBody;
3066
+ private views;
3067
+ private ensureScratch;
3068
+ private stage;
3069
+ open(manifest: Uint8Array): number;
3070
+ provide(scene: number, index: number, chunk: Uint8Array): number;
3071
+ fail(scene: number, index: number): number;
3072
+ update(scene: number, eye: Float32Array, requests: Uint32Array): number;
3073
+ setTransform(scene: number, transform: Float32Array): void;
3074
+ registers(scene: number): Uint32Array;
3075
+ close(scene: number): void;
3076
+ }
3077
+
3078
+ type SceneVec2 = readonly [number, number];
3079
+ type SceneRect = readonly [number, number, number, number];
3080
+ type SceneCompass = "north" | "south" | "east" | "west";
3081
+ interface SceneRegionSpec {
3082
+ readonly rect: SceneRect;
3083
+ readonly ground?: string;
3084
+ }
3085
+ interface ScenePathSpec {
3086
+ readonly points: readonly SceneVec2[];
3087
+ readonly width?: number;
3088
+ }
3089
+ interface SceneAreaSpec {
3090
+ readonly size: SceneVec2;
3091
+ readonly ground?: string;
3092
+ readonly regions?: Readonly<Record<string, SceneRegionSpec>>;
3093
+ readonly paths?: Readonly<Record<string, ScenePathSpec>>;
3094
+ readonly points?: Readonly<Record<string, SceneVec2>>;
3095
+ }
3096
+ interface SceneObjectSpec<K extends string = CatalogueKind> {
3097
+ readonly kind: K;
3098
+ readonly count?: number;
3099
+ readonly at?: SceneVec2;
3100
+ readonly yaw?: number;
3101
+ readonly near?: string;
3102
+ readonly within?: number;
3103
+ readonly along?: string;
3104
+ readonly offset?: number;
3105
+ readonly facing?: string;
3106
+ readonly on?: string;
3107
+ readonly inside?: string;
3108
+ readonly reachable_from?: string;
3109
+ readonly visible_from?: string;
3110
+ readonly clear?: number;
3111
+ readonly no_overlap?: boolean;
3112
+ readonly in_bounds?: boolean;
3113
+ readonly spacing?: SceneVec2 | number;
3114
+ }
3115
+ interface SceneQuality {
3116
+ readonly candidates?: number;
3117
+ readonly iterations?: number;
3118
+ readonly tries?: number;
3119
+ }
3120
+ interface SceneAgent {
3121
+ readonly radius?: number;
3122
+ readonly eye?: number;
3123
+ }
3124
+ interface SceneSpec<K extends string = CatalogueKind> {
3125
+ readonly area: SceneAreaSpec;
3126
+ readonly objects: Readonly<Record<string, SceneObjectSpec<K>>>;
3127
+ readonly style?: string;
3128
+ readonly seed?: number;
3129
+ readonly quality?: SceneQuality;
3130
+ readonly agent?: SceneAgent;
3131
+ }
3132
+ interface SceneDefinition<K extends string = CatalogueKind> {
3133
+ readonly kind: "scene";
3134
+ readonly name: string;
3135
+ readonly spec: SceneSpec<K>;
3136
+ }
3137
+ type WireTarget = {
3138
+ readonly point: number;
3139
+ } | {
3140
+ readonly region: number;
3141
+ } | {
3142
+ readonly line: number;
3143
+ } | {
3144
+ readonly object: number;
3145
+ } | {
3146
+ readonly object: number;
3147
+ readonly instance: number;
3148
+ } | {
3149
+ readonly object: number;
3150
+ readonly anchor: number;
3151
+ } | {
3152
+ readonly area: true;
3153
+ } | {
3154
+ readonly direction: number;
3155
+ };
3156
+ type WireRelation = {
3157
+ readonly type: "near";
3158
+ readonly target: WireTarget;
3159
+ readonly within: number;
3160
+ } | {
3161
+ readonly type: "along";
3162
+ readonly line: number;
3163
+ readonly offset: number;
3164
+ } | {
3165
+ readonly type: "facing";
3166
+ readonly target: WireTarget;
3167
+ } | {
3168
+ readonly type: "on";
3169
+ readonly object: number;
3170
+ } | {
3171
+ readonly type: "inside";
3172
+ readonly target: WireTarget;
3173
+ } | {
3174
+ readonly type: "reachable_from";
3175
+ readonly target: WireTarget;
3176
+ } | {
3177
+ readonly type: "visible_from";
3178
+ readonly target: WireTarget;
3179
+ };
3180
+ interface WireKind {
3181
+ readonly name: string;
3182
+ readonly footprint: readonly [number, number];
3183
+ readonly height: number;
3184
+ readonly solid: boolean;
3185
+ readonly anchors: readonly {
3186
+ readonly name: string;
3187
+ readonly at: readonly [number, number, number];
3188
+ }[];
3189
+ }
3190
+ interface WireObject {
3191
+ readonly name: string;
3192
+ readonly kind: number;
3193
+ readonly count: number;
3194
+ readonly at: readonly [number, number] | null;
3195
+ readonly yaw: number | null;
3196
+ readonly clear: number;
3197
+ readonly overlap: boolean;
3198
+ readonly bounds: boolean;
3199
+ readonly spacing: readonly [number, number] | null;
3200
+ readonly relations: readonly WireRelation[];
3201
+ }
3202
+ interface SceneWire {
3203
+ readonly version: 1;
3204
+ readonly name: string;
3205
+ readonly seed: number;
3206
+ readonly style: string;
3207
+ readonly ground: string;
3208
+ readonly area: readonly [number, number];
3209
+ readonly quality: {
3210
+ readonly candidates: number;
3211
+ readonly iterations: number;
3212
+ readonly tries: number;
3213
+ };
3214
+ readonly agent: {
3215
+ readonly radius: number;
3216
+ readonly eye: number;
3217
+ readonly cell: number;
3218
+ };
3219
+ readonly kinds: readonly WireKind[];
3220
+ readonly points: readonly {
3221
+ readonly name: string;
3222
+ readonly at: readonly [number, number];
3223
+ }[];
3224
+ readonly regions: readonly {
3225
+ readonly name: string;
3226
+ readonly rect: readonly [number, number, number, number];
3227
+ }[];
3228
+ readonly lines: readonly {
3229
+ readonly name: string;
3230
+ readonly points: readonly (readonly [number, number])[];
3231
+ readonly outward: 1 | -1;
3232
+ }[];
3233
+ readonly objects: readonly WireObject[];
3234
+ }
3235
+ type SceneDiagnosticCode = "scene.unknown_kind" | "scene.unknown_target" | "scene.bad_target" | "scene.unknown_anchor" | "scene.duplicate_name" | "scene.cycle" | "scene.invalid_value" | "scene.capacity" | "scene.too_large" | "scene.no_top" | "scene.not_static";
3236
+ interface SceneDiagnostic {
3237
+ readonly code: SceneDiagnosticCode;
3238
+ readonly severity: "error" | "warning";
3239
+ readonly message: string;
3240
+ readonly object: string | null;
3241
+ readonly field: string | null;
3242
+ readonly fix: string | null;
3243
+ }
3244
+ interface SceneCompilation {
3245
+ readonly wire: SceneWire | null;
3246
+ readonly diagnostics: readonly SceneDiagnostic[];
3247
+ }
3248
+ interface ScenePlacement {
3249
+ readonly group: number;
3250
+ readonly instance: number;
3251
+ readonly kind: number;
3252
+ readonly yaw: number;
3253
+ readonly flags: number;
3254
+ readonly x: number;
3255
+ readonly y: number;
3256
+ readonly z: number;
3257
+ readonly support: number;
3258
+ }
3259
+ interface ScenePlacementReport {
3260
+ readonly version: 1;
3261
+ readonly scene: string;
3262
+ readonly seed: number;
3263
+ readonly style: string;
3264
+ readonly ground: string;
3265
+ readonly status: "solved" | "unsatisfied";
3266
+ readonly try: number;
3267
+ readonly score: number;
3268
+ readonly digest: string;
3269
+ readonly placements: readonly {
3270
+ readonly name: string;
3271
+ readonly group: string;
3272
+ readonly kind: string;
3273
+ readonly at: readonly [number, number, number];
3274
+ readonly yaw: number;
3275
+ readonly support: string | null;
3276
+ readonly violations: readonly string[];
3277
+ }[];
3278
+ readonly violations: readonly {
3279
+ readonly object: string;
3280
+ readonly code: string;
3281
+ readonly relation: string;
3282
+ readonly amount: number;
3283
+ readonly other: string | null;
3284
+ }[];
3285
+ readonly conflicts?: {
3286
+ readonly objects: readonly string[];
3287
+ readonly reasons: readonly string[];
3288
+ };
3289
+ readonly timings?: {
3290
+ readonly setup_ms: number;
3291
+ readonly solve_ms: number;
3292
+ };
3293
+ }
3294
+
3295
+ interface CompileSceneOptions {
3296
+ readonly catalogue?: SceneCatalogue;
3297
+ }
3298
+ declare function yawStep(degrees: number): number;
3299
+ declare function compileScene(def: SceneDefinition<string>, options?: CompileSceneOptions): SceneCompilation;
3300
+ declare function yawDegrees(step: number): number;
3301
+
3302
+ declare function scene<const S extends SceneSpec<CatalogueKind>>(name: string, spec: S): SceneDefinition<CatalogueKind>;
3303
+ declare function isSceneDefinition(value: unknown): value is SceneDefinition<string>;
3304
+
3305
+ declare const SCENE_OUTPUT_MAGIC = 1313035075;
3306
+ declare const SCENE_OUTPUT_VERSION = 1;
3307
+ declare const SCENE_HEADER_BYTES = 48;
3308
+ declare const SCENE_PLACEMENT_BYTES = 24;
3309
+ declare const SCENE_VIOLATION_BYTES = 12;
3310
+ declare const SCENE_FLAG_PINNED = 1;
3311
+ declare const SCENE_FLAG_SUPPORTED = 2;
3312
+ declare const SCENE_FLAG_VIOLATING = 4;
3313
+ declare const SCENE_SOLVER_EXPORTS: readonly ["engine_scene_alloc", "engine_scene_free", "engine_scene_open", "engine_scene_error", "engine_scene_error_len", "engine_scene_solve", "engine_scene_output", "engine_scene_output_len", "engine_scene_report", "engine_scene_report_len", "engine_scene_close"];
3314
+ interface SceneSolveResult {
3315
+ readonly status: "solved" | "unsatisfied";
3316
+ readonly bytes: Uint8Array;
3317
+ readonly placements: readonly ScenePlacement[];
3318
+ readonly report: ScenePlacementReport;
3319
+ }
3320
+ interface SceneSolver {
3321
+ solve(wire: SceneWire | string, seed?: number): SceneSolveResult;
3322
+ }
3323
+ interface SceneOutputHeader {
3324
+ readonly status: "solved" | "unsatisfied";
3325
+ readonly placements: number;
3326
+ readonly violations: number;
3327
+ readonly conflicts: number;
3328
+ readonly tryIndex: number;
3329
+ readonly seed: number;
3330
+ }
3331
+ declare function readSceneHeader(bytes: Uint8Array): SceneOutputHeader;
3332
+ declare function decodePlacements(bytes: Uint8Array): ScenePlacement[];
3333
+ declare function createSceneSolver(source: BufferSource | WebAssembly.Module): Promise<SceneSolver>;
3334
+
3335
+ declare const ENGINE_TERRAIN_EXPORT_NAMES: readonly ["engine_terrain_open", "engine_terrain_close", "engine_terrain_update", "engine_terrain_registers", "engine_terrain_height", "engine_terrain_normal", "engine_terrain_sculpt", "engine_terrain_colliders", "engine_physics_radial_gravity", "engine_terrain_grass", "engine_terrain_wind", "engine_terrain_interactors", "engine_terrain_look", "engine_terrain_scatter", "engine_noise", "engine_noise_fbm"];
3336
+ type TerrainExports = Readonly<Record<(typeof ENGINE_TERRAIN_EXPORT_NAMES)[number], (...args: number[]) => number>>;
3337
+ declare class EngineTerrain implements TerrainPort {
3338
+ private readonly runtime;
3339
+ private readonly exports;
3340
+ private readonly render;
3341
+ private readonly world;
3342
+ private readonly scratch;
3343
+ private readonly second;
3344
+ private readonly columns;
3345
+ private buffer;
3346
+ private floats;
3347
+ private words;
3348
+ private bytes;
3349
+ constructor(runtime: EngineRuntime, exports: TerrainExports, render: () => number, world: () => number);
3350
+ private views;
3351
+ private ensure;
3352
+ private put;
3353
+ open(desc: Float32Array, source: number, recipe: Float32Array, pack: Uint8Array | null): number;
3354
+ close(terrain: number): void;
3355
+ update(terrain: number, eye: Float32Array): number;
3356
+ registers(terrain: number): Uint32Array;
3357
+ height(x: number, z: number): number;
3358
+ normal(x: number, z: number, out: Float32Array): boolean;
3359
+ sculpt(terrain: number, brush: Float32Array): number;
3360
+ colliders(terrain: number, x: number, y: number, z: number): number;
3361
+ gravity(x: number, y: number, z: number, surface: number, radius: number): number;
3362
+ grass(params: Float32Array): number;
3363
+ wind(x: number, z: number, strength: number, gust: number): void;
3364
+ interactors(data: Float32Array, count: number): void;
3365
+ look(layers: Float32Array, count: number): void;
3366
+ scatter(rules: Float32Array, out: Float32Array, capacity: number): number;
3367
+ noise(kind: number, x: number, y: number, z: number, seed: number): number;
3368
+ fbm(x: number, z: number, octaves: number, frequency: number, seed: number): number;
3369
+ }
3370
+
3371
+ declare const INPUT_SOURCES: readonly ["touch", "gesture", "tilt", "key", "choice", "gift", "vote", "ai"];
3372
+ type InputSource = (typeof INPUT_SOURCES)[number];
3373
+ declare const DEFAULT_LOG_INPUTS: number;
3374
+ declare const DEFAULT_LOG_BYTES: number;
3375
+ interface RecordedInput {
3376
+ tick: number;
3377
+ source: InputSource;
3378
+ a: number;
3379
+ b: number;
3380
+ c: number;
3381
+ bytes: Uint8Array | null;
3382
+ }
3383
+ declare function createRecordedInput(): RecordedInput;
3384
+ declare class InputLog {
3385
+ private readonly ticks;
3386
+ private readonly sources;
3387
+ private readonly words;
3388
+ private readonly at;
3389
+ private readonly lengths;
3390
+ private readonly pool;
3391
+ private count;
3392
+ private used;
3393
+ constructor(inputs?: number, bytes?: number);
3394
+ get length(): number;
3395
+ get lastTick(): number;
3396
+ record(tick: number, source: InputSource, a?: number, b?: number, c?: number, bytes?: Uint8Array | null): void;
3397
+ first(tick: number): number;
3398
+ read(index: number, out: RecordedInput): RecordedInput;
3399
+ forEachAt(tick: number, visit: (input: RecordedInput) => void, scratch: RecordedInput): number;
3400
+ truncateAfter(tick: number): void;
3401
+ clear(): void;
3402
+ }
3403
+ interface KeyframeStore {
3404
+ readonly keyframeEvery: number;
3405
+ keyframe(tick: number): boolean;
3406
+ nearestKeyframe(at: number): number | null;
3407
+ seekKeyframe(tick: number): boolean;
3408
+ truncateKeyframes(after: number): void;
3409
+ clearKeyframes(): void;
3410
+ }
3411
+ interface TimelineSim {
3412
+ restart(): void;
3413
+ step(tick: number, log: InputLog): void;
3414
+ }
3415
+ declare class TimeTravel {
3416
+ private readonly store;
3417
+ readonly log: InputLog;
3418
+ private readonly sim;
3419
+ private tickValue;
3420
+ constructor(store: KeyframeStore, log: InputLog, sim: TimelineSim);
3421
+ get tick(): number;
3422
+ start(): void;
3423
+ advance(): void;
3424
+ diverge(): void;
3425
+ seek(target: number): number;
3426
+ }
3427
+ interface TraceEvent {
3428
+ readonly tick: number;
3429
+ readonly name: string;
3430
+ readonly value: string;
3431
+ }
3432
+ declare class RunTrace {
3433
+ private readonly digests;
3434
+ private ticks;
3435
+ readonly events: TraceEvent[];
3436
+ readonly variables: Map<string, string>;
3437
+ constructor(capacity: number);
3438
+ get length(): number;
3439
+ digest(tick: number, value: bigint): void;
3440
+ at(tick: number): bigint;
3441
+ event(tick: number, name: string, value: string): void;
3442
+ variable(name: string, value: string): void;
3443
+ }
3444
+ interface TraceDiff {
3445
+ readonly firstDivergence: number | null;
3446
+ readonly ticksCompared: number;
3447
+ readonly variables: readonly {
3448
+ readonly name: string;
3449
+ readonly a: string | undefined;
3450
+ readonly b: string | undefined;
3451
+ }[];
3452
+ readonly onlyInA: readonly TraceEvent[];
3453
+ readonly onlyInB: readonly TraceEvent[];
3454
+ }
3455
+ declare function diffTraces(a: RunTrace, b: RunTrace): TraceDiff;
3456
+
3457
+ declare const MIRROR_MAX_DEPTH = 4;
3458
+ /**
3459
+ * Keeps copies of an object's plain state (its numbers, true or false values, typed arrays and nested plain objects)
3460
+ * in preallocated slots, so a keyframe can bring back state that lives outside the engine. The layout is read once;
3461
+ * saving and loading allocate nothing.
3462
+ */
3463
+ declare class StateMirror {
3464
+ readonly slots: number;
3465
+ private readonly scalars;
3466
+ private readonly arrays;
3467
+ private readonly scalarSlots;
3468
+ private readonly arraySlots;
3469
+ private readonly arrayBytes;
3470
+ private readonly copies;
3471
+ constructor(target: object, slots: number, skip?: ReadonlySet<string>);
3472
+ get bytes(): number;
3473
+ save(slot: number): void;
3474
+ load(slot: number): void;
3475
+ private slot;
3476
+ }
3477
+
3478
+ declare const TIMELINE_KEYFRAME_EVERY = 30;
3479
+ declare const TIMELINE_KEYFRAME_SLOTS = 64;
3480
+ declare const TIMELINE_MAX_TICKS: number;
3481
+ interface TimelineSnapshots extends KeyframeStore {
3482
+ enableKeyframes(desc: KeyframeDesc): boolean;
3483
+ digest(): bigint;
3484
+ keyframeStats(): KeyframeStats | null;
3485
+ }
3486
+ interface TimelineGame {
3487
+ readonly input: InputActions;
3488
+ readonly tickHz: number;
3489
+ snapshots(): TimelineSnapshots | null;
3490
+ step(): void;
3491
+ values(): {
3492
+ readonly [name: string]: string;
3493
+ };
3494
+ }
3495
+ type TimelineSend = (message: StudioOutgoing) => void;
3496
+ /**
3497
+ * Time travel for a game in a Studio preview. While it records, every drain of the input queue goes into an input log
3498
+ * and keyframes are taken on a cadence (the engine's world, the attached script state and the input state). Seeking
3499
+ * restores the nearest keyframe and replays the log step by step, so every moment comes back exactly; proving replays
3500
+ * the recording and checks each keyframe's world digest against the one taken live.
3501
+ */
3502
+ declare class StudioTimeline implements InputTap, KeyframeStore {
3503
+ private readonly game;
3504
+ private readonly send;
3505
+ readonly keyframeEvery = 30;
3506
+ private readonly log;
3507
+ private readonly scratch;
3508
+ private readonly digests;
3509
+ private readonly mirror;
3510
+ private travel;
3511
+ private store;
3512
+ private live;
3513
+ private proving;
3514
+ private divergence;
3515
+ private checked;
3516
+ private endTick;
3517
+ private recordingValue;
3518
+ private holdingValue;
3519
+ private readonly replayInput;
3520
+ private readonly sim;
3521
+ constructor(game: TimelineGame, send: TimelineSend);
3522
+ get recording(): boolean;
3523
+ get holding(): boolean;
3524
+ get tick(): number;
3525
+ handle(message: StudioMessage): void;
3526
+ record(): void;
3527
+ stop(): void;
3528
+ /** One live fixed step while recording. */
3529
+ step(): void;
3530
+ seek(target: number): void;
3531
+ play(): void;
3532
+ moment(target: number): void;
3533
+ prove(): void;
3534
+ drained(nowMs: number, events: Uint8Array, count: number): void;
3535
+ keyframe(tick: number): boolean;
3536
+ nearestKeyframe(at: number): number | null;
3537
+ seekKeyframe(tick: number): boolean;
3538
+ truncateKeyframes(after: number): void;
3539
+ clearKeyframes(): void;
3540
+ private from;
3541
+ private resimulate;
3542
+ private refuse;
3543
+ private report;
3544
+ }
3545
+
3546
+ export { ALL_LAYERS, type AdmittedEngine, Aircraft, AircraftInput, AnalyserSettings, type AnyVector, type ApplyEnvironmentOptions, ArcCurve, AssetSource, AudioCapabilities, AudioPort, type AxisAngle, type Ballistic, type Basis, BatchedMesh, type BatchedMeshOptions, type Biquad, type BiquadState, type Block16, type Block64, type Block8, Boat, BoatInput, type Bounced, Box3, CRAFT_BODIES, CRAFT_VIRTUAL_CONTROLS, type CameraPath, CameraProjection, CatalogueKind, CatmullRomCurve3, type CatmullRomType, type CompileSceneOptions, type ContactSource, CraftBodyShape, CraftDesc, type CraftInputOptions, CraftPresetName, type CraftSteering, CraftTuning, type CrossfadeOptions, CrossfadeTransition, CubicBezierCurve, CubicBezierCurve3, Curve, Curve2, Curve3, CurveKind, CurvePath, CurvePath3, type CurvePoint as CurveSample, DEFAULT_DEBUG_SEGMENTS, DEFAULT_LABEL_CAPACITY, DEFAULT_LOG_BYTES, DEFAULT_LOG_INPUTS, DIRECT_ENGINE_PREFIX, type Damped, type Damped2, type Damped3, type DcFiltered, type DcState, DebugDraw, type DebugDrawOptions, type DebugGraphics, ENGINE_SPLAT_EXPORT_NAMES, ENGINE_STREAM_EXPORT_NAMES, ENGINE_TERRAIN_EXPORT_NAMES, Each, EaseId, EllipseCurve, EngineScenery, EngineTerrain, EngineWorldStreaming, Entity, EntityTable, type EnvironmentOptions, type EnvironmentPreset, type ExtrudeOptions, type F32Vector, FX_HALF, FX_MAX, FX_MIN, FX_ONE, type Filtered, FixedArray, type FlatTrees, type FloatLayer, type FloatNet, type FoundImport, type FrenetFrames, FunctionCurve3, GAME_API_PROFILE, GAME_API_VERSION, GPU_PROBE_FLAG, GPU_PROBE_LOG_PREFIX, GameAi, GameError, type GameManifest, type GameProfile, GameUi, GeometryDesc, GeometryId, type PositionSource$1 as GeometryPositionSource, GpuDeviceClass, type GpuSetProbe, Graphics, type GridSize, HeadlessAudio, Helicopter, HelicopterInput, HullSource, type I32Vector, IMPORT_DEFAULT_MAX_DRIFT, IMPORT_DEFAULT_SAMPLES, INPUT_SOURCES, type ImportActivation, type ImportDrift, ImportError, type ImportLayerReport, type ImportOptions, type Imported, type ImpulseResult, InputActions, InputLog, type InputSource, InputTap, JsNav, KERNEL_STD_SOURCES, Kernel, type KernelArray, type KernelArrayKind, type KernelCurve, KernelEngine, type KernelLut, type KernelLut2, KernelMeta, type KernelRecording, type KernelRecordingOptions, KernelRunner, type KernelSampler, KernelSchedule, type KernelTable, KernelWatch, type KeyframeStore, LIFE_SIZE, LIFE_TINT, LOOP_MAX_REGION_ROWS, LOOP_PROBE_GLOBAL, type LabelAnchorSource, type LabelDesc, type LabelEngineText, type LabelOccluder, type LaunchAngles, LineCurve, LineCurve3, LineWriter, type LoopElement, type LoopEngine, type LoopField, type LoopFold, type LoopPayload, type LoopProbe, type LoopSchedule, type LoopSettings, type LoopStats, LoweredLoop, MAT3_SIZE, MEDIA_VOLUME_FEATURE, MIRROR_MAX_DEPTH, MLP_ACT_LINEAR, MLP_ACT_RELU, MLP_MEMORY_MAX, MLP_MEMORY_MIN, MOE_DEFAULT_BALANCE, MOE_MAX_EXPERTS, MOE_MIN_EXPERTS, type MaskVector, type Mat3Array, type Mat4Array, MaterialDesc, MaterialId, type MlpEpisode, type MlpLayerSpec, type MlpMemory, type MlpTrained, type MlpTrainingData, type MlpTrainingOptions, type MoeNet, type MoeTrained, type MoeTrainingOptions, NO_RESOURCE, NavDesc, NavPath, NavPort, type NavTileDesc, type NavTilePoly, NetworkHint, NodeDesc, NodeId, Noise, type NumberVector, PARTICLE_FIELDS, PARTICLE_LOOK_FIELDS, type ParametricFunction, type Particle, type ParticleLook, Path, PickHit, type PidState, type PidStep, type PlainLayer, type PositionSource, PostChainId, PostEffectDesc, PredictorOptions, PrefetchLayerDesc, type PrimitiveBuffers, type PrimitiveSize, type ProfileCheckResult, type ProfileParseResult, type ProfileViolation, type ProfileViolationReason, QuadraticBezierCurve, QuadraticBezierCurve3, REGENERATING_FIELDS, type RecordedArg, type RecordedInput, type Regenerating, RenderPassId, RenderTargetId, type RowScanOp, RunTrace, type RunningStats, SCENE_FLAG_PINNED, SCENE_FLAG_SUPPORTED, SCENE_FLAG_VIOLATING, SCENE_HEADER_BYTES, SCENE_OUTPUT_MAGIC, SCENE_OUTPUT_VERSION, SCENE_PLACEMENT_BYTES, SCENE_SOLVER_EXPORTS, SCENE_VIOLATION_BYTES, type SH4, type SH9, STEER_AGENT_FIELDS, STEER_DIRECTION, STEER_FACE, STEER_SEEK, STEER_STOP, type SceneAgent, type SceneAreaSpec, SceneCatalogue, type SceneCompass, type SceneCompilation, type SceneDefinition, type SceneDiagnostic, type SceneDiagnosticCode, type SceneObjectSpec, type SceneOutputHeader, type ScenePathSpec, type ScenePlacement, type ScenePlacementReport, type SceneQuality, type SceneRect, type SceneRegionSpec, type SceneSolveResult, type SceneSolver, type SceneSpec, type SceneVec2, type SceneWire, SceneryBodyPort, SceneryEdit, SceneryPort, ScreenLabels, type ScreenLabelsOptions, ScreenTransition, type SegmentPair, Selection, Shape, ShapeDesc, ShapePath, type ShapePoints, ShapeUtils, type SimBody, type SimulatedEngine, type SimulatedLink, type SourceFile, Sphere, SplatTwin, type SplatTwinOptions, SplineCurve, StateMirror, type SteerAgent, type StreamingReport, type StreamingSimulation, StudioTimeline, type SwingTwist, TIMELINE_KEYFRAME_EVERY, TIMELINE_KEYFRAME_SLOTS, TIMELINE_MAX_TICKS, TRANSITION_PROGRESS, TableSchema, TerrainPort, type TextGeometryDirection, type TextGeometryOptions, TextStyleDesc, TextureDesc, TextureId, TickLockstepLink, type TickLockstepLinkOptions, TickRoomTransport, type TiltOptions, TiltSteering, TimeTravel, type TimelineGame, type TimelineSend, type TimelineSim, type TimelineSnapshots, ToneMapping, type TraceDiff, type TraceEvent, Transforms, type TransitionKind, type TransitionOptions, TreeModel, type TreeModelBackend, type TreeModelFormat, type TreeModelInfo, type TreeModelOutput, type TreeModelTransform, type TreeModelVariant, type TreeWalk, type TriangleHit, type TwinBody, type TwinLook, type TwinVariant, type TypefaceFont, type TypefaceGlyph, Vec2, Vec3, VehiclePort, VehicleSolver, type VehicleWorld, type VerletState, VirtualSlider, VirtualStick, WAKE_NEVER, type WebAudioOptions, WebAudioPort, type WireKind, type WireObject, type WireRelation, type WireTarget, WorldStreamingPort, aabbOverlap, index as ai, allocateFrenetFrames, allocateLockstepState, allocatePrimitive, angleDiff, angleOf2, applyEnvironmentPreset, applyMatrix4 as applyGeometryMatrix4, approach, argmax, arriveVelocity, arrowHelper, axesHelper, basisFrom, bindSampler, biquadBandpass, biquadHighpass, biquadLowpass, biquadNotch, biquadPeaking, biquadStep, bitExtract, bitInsert, blendOver, boxGeometry, boxHelper, boxSize, cameraHelper, capsuleGeometry, capsuleSize, cell, centerGeometry, checkGameSources, checkNet, circleGeometry, circleSize, closestInAabb, closestInObb, closestOnSegment, closestOnTriangle, closestSegments, clz, compactRows, compileScene, computeBoundingBox, computeBoundingSphere, computeTangents, computeVertexNormals, coneGeometry, configureLoops, contourArea, copyCurvePoint, createRecordedInput, createSceneSolver, ctz, curl2, curl3, curlForce, curve$1 as curve, cylinderGeometry, cylinderShellGeometry, cylinderShellSize, cylinderSize, dcBlock, dct16, dct8, dct8x8, decay, decodePlacements, dedupRows, dense, denseQ8, denseRelu, denseTable, detCos, detExp, detLog, detSin, diffTraces, dirOf2, directionalLightHelper, dodecahedronGeometry, dragPos, dragVel, earcut, earcutDeviation, edgeComponents, edgesGeometry, ema, encodeCraft, encodeNavTile, engineLabelText, engineLockstepHost, engineOf, environmentTexture, eulerStep, evalMoeLane, expSmooth, expSmooth2, expSmooth3, extrudeGeometry, f32, f32x2, f32x3, f32x4, f64, f64Bits, facos, fasin, fatan, fatan2, fbm2, fbm3, fcos, fexp, floatEval, flog, flog2, fpow, fromHalf, fsin, ftan, type fx, type fx64, fx64Add, fx64Cos, fx64Div, fx64FromF32, fx64FromFx, fx64FromInt, fx64Lt, fx64Mul, fx64Neg, fx64Sin, fx64Sqrt, fx64Sub, fx64ToF32, fx64ToFx, fxAbs, fxAdd, fxCos, fxDiv, fxFloor, fxFrac, fxFromF32, fxFromInt, fxLerp, fxMul, fxNeg, fxSin, fxSqrt, fxSub, fxToF32, fxToInt, generatedSamples, gradient, gridComponents, gridHelper, gridPropagate, gridReach, groupRows, headingFrom, heightNormal, helperSegments, hemisphereLightHelper, histogram, hslToRgb, hsvToRgb, hullSamples, i32, i32x2, i32x3, i32x4, icosahedronGeometry, idct16, idct8, idct8x8, importMlp, importMoe, inCone, inPolygon, inTriangle, interceptTime, interceptTime2, isClockWise, isSceneDefinition, joinMemory, kernelArray, lanes as kernelLanes, fmath as kernelMath, fmath64 as kernelMath64, kernelRecording, toolkit as kernelToolkit, transforms as kernelTransforms, latheGeometry, latheSize, launchAngles, launchSpeed, leakyRelu, limitLength2, lineGeometry, linearToOklab, linearToSrgb, linearToSrgb3, loadMlp, logGpuSetProbe, loopEngineOf, loopProbe, lowerLoop, luminance, lut, lut2, type m32x2, type m32x3, type m32x4, m3inverse, m3mul, m3transpose, m3vec, m4dir, m4inverseAffine, m4mul, m4point, m4transpose, mat3, mat3Determinant, mat3FromMat4, mat3Identity, mat3Invert, mat3Multiply, mat3NormalMatrix, mat3SetUvTransform, mat3Transpose, mat4, mat4Compose, mat4ComposeArrays, mat4Copy, mat4Decompose, mat4Determinant, mat4Frustum, mat4Identity, mat4Invert, mat4LookAt, mat4MaxScale, mat4Multiply, mat4Orthographic, mat4Perspective, mat4TransformDirection, mat4TransformPoint, mat4TransformPointArrays, mat4Translation, mat4Transpose, memorySamples, mergeGeometries, mergeVertices, mixOklab, mlp, mlpBlob, mlpWords, model, moe, moeBlob, morton2, morton2Wide, morton3, morton3Wide, moveToward, moveToward2, moveToward3, octahedronGeometry, oklabToLinear, oklabToOklch, oklchToOklab, onePole, onePoleAlpha, packAnimation, packRotation, parametricGeometry, parametricSize, parseGameProfile, parseMoe, particleColours, particleLook, particleMotion, particleMotions, particleRules, particleStep, particleVelocity, pidStep, plainNet, planeBounce, planeFromPoints, planeGeometry, planeGridGeometry, planeGridSize, planeHelper, planeSize, pointLightHelper, poissonPoint, polarGridHelper, polyhedronGeometry, popcnt, positionalAudioHelper, premultiply, presetDesc, primitiveDesc, probeGpuSetCosts, projectilePos, projectileVel, qAngle, qClampSwingTwist, qForward, qFromAxisAngle, qFromEuler, qFromTo, qIntegrate, qLookRotation, qRight, qRotateToward, qSwingTwist, qToAxisAngle, qToEuler, qUp, qnlerp, qnormalize, qslerp, quadDragStep, quantize, quat, quatFromRotationColumns, quatSlerpArrays, randBits, randChance, randCosHemisphere, randExp, randGaussian, randHemisphere, randInBall, randInDisc, randInt, randNormal, randNormal2, randOnCircle, randOnSphere, randPermute, randRange, randShuffle, randUnit, randWeighted, rayAabb, rayPlane, raySphere, rayTriangle, readOnnx, readSceneHeader, reflectVelocity, regenerate, regenerating, relu, rgbToHsl, rgbToHsv, ridged2, ridged3, ringGeometry, ringSize, rk2Step, rngKey, rotate2, rotateToward, rotl, rotr, roundedBoxGeometry, routeMlpLane, rowArgMax, rowArgMin, rowCount, rowFeedback, rowMax, rowMin, rowPhase, rowPhase64, rowPrefixSum, rowRecur, rowScan, rowSum, runGpuProbeIfAsked, sample, sampler, satBox, scanImports, scatterAdd, scene, scriptedPath, segmentDistSq, segmentedBoxGeometry, segmentedBoxSize, separationPush, setLoopEngine, setMlp, sh4Add, sh4Basis, sh4Eval, sh4Irradiance, sh4Project, sh4Rotate, sh4Scale, sh9Add, sh9Basis, sh9Eval, sh9Irradiance, sh9Project, sh9Rotate, sh9Scale, shapeGeometry, sigmoid, simplex2, simplex2d, simplex3, simplex3d, simplex4, simulateStreaming, skeletonHelper, slerpInto, smoothDamp, smoothDamp2, smoothDamp3, softmax, softplus, sortRows, sphPoly6, sphSpikyGrad, sphViscosityLap, sphereAabbOverlap, sphereGeometry, sphereImpulse, sphereSectorGeometry, sphereSectorSize, sphereSize, spheresOverlap, spotLightHelper, springForce, springStep, srgbToLinear, srgbToLinear3, statsAdd, statsSampleVariance, statsVariance, steerAccelerate, steerAgent, steerAgents, sweepSpherePlane, tanhf, tetrahedronGeometry, texBricks, texCells, texFbm, texNoise, texNormal, texRamp, texRemap, texRidged, texRings, texTiles, texWeave, textGeometry, textShapes, toHalf, toNonIndexed, toU32, topRows, torusGeometry, torusKnotGeometry, torusKnotSize, torusSize, trainMlp, trainMoe, transitionEffect, translateGeometry, triangulateShape, tubeGeometry, tubeSize, tune, u32, u64, u64Words, uaddCarry, umulhi, unbindSampler, unmorton2, unmorton3, unpremultiply, usubBorrow, vabs, vadd, vand, vclamp, vcross, vdiv, vdot, vec2, vec3, vec4, veq, verletStep, vertexNormalsHelper, vfloat, vfloor, vhmax, vhmin, vint, vlane, vle, vlength, vlerp, vlt, vmLoopEngine, vmax, vmin, vmul, vmuladd, vne, vneg, vnormalize, vnot, vor, vselect, vshl, vshr, vshuffle, vsqrt, vsub, vsum, vtovec, vushr, vwith, vxor, warp2, warp3, wireframeGeometry, worley2, worley3, wrapAngle, writeBox, writeCapsule, writeCircle, writeCylinder, writeCylinderShell, writeLathe, writeParametric, writePlane, writePlaneGrid, writeRing, writeSegmentedBox, writeSphere, writeSphereSector, writeTorus, writeTorusKnot, writeTube, yawDegrees, yawStep };