@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.
- package/LICENSE +21 -0
- package/dist/advanced.d.mts +4 -3
- package/dist/advanced.d.ts +4 -3
- package/dist/advanced.js +24 -24
- package/dist/advanced.mjs +5 -5
- package/dist/animation-4EXBXRVX.js +27 -0
- package/dist/animation-6DICNWUP.mjs +6 -0
- package/dist/audio-DhvyjqdA.d.mts +249 -0
- package/dist/audio-m0w8cnxq.d.ts +249 -0
- package/dist/avatars.d.mts +110 -0
- package/dist/avatars.d.ts +110 -0
- package/dist/avatars.js +82 -0
- package/dist/avatars.mjs +5 -0
- package/dist/backend-gUCzs5Kg.d.mts +3866 -0
- package/dist/backend-gUCzs5Kg.d.ts +3866 -0
- package/dist/{catalogue-B4eLL8Mi.d.ts → catalogue-CPTMyBUz.d.mts} +109 -221
- package/dist/catalogue-DzrTXP3v.d.mts +541 -0
- package/dist/catalogue-DzrTXP3v.d.ts +541 -0
- package/dist/{catalogue-OT89_Ifs.d.mts → catalogue-OTuS5zp-.d.ts} +109 -221
- package/dist/chunk-22BD3RHN.mjs +1809 -0
- package/dist/chunk-25T4JHEA.mjs +21 -0
- package/dist/chunk-2AQ237Y4.js +508 -0
- package/dist/chunk-2IC4H6OV.mjs +48 -0
- package/dist/chunk-2LHLG4OB.mjs +71 -0
- package/dist/chunk-2O2CG465.js +1709 -0
- package/dist/chunk-2Q4DTHXK.js +316 -0
- package/dist/chunk-2QTQ6BUH.mjs +46 -0
- package/dist/chunk-2UN4SFLR.mjs +100 -0
- package/dist/chunk-2V75I7K3.js +454 -0
- package/dist/chunk-2V7IL4HC.js +10 -0
- package/dist/chunk-34XBXUMW.js +296 -0
- package/dist/chunk-3C4C654I.js +71 -0
- package/dist/chunk-3DAD2LDF.mjs +72 -0
- package/dist/chunk-3GXH2NFD.mjs +4 -0
- package/dist/chunk-3O47ZFW3.js +961 -0
- package/dist/chunk-3OY3VYNF.mjs +11 -0
- package/dist/chunk-3S6WPBZL.js +2936 -0
- package/dist/chunk-3TUOUP5T.js +399 -0
- package/dist/chunk-3VEH23I5.mjs +1380 -0
- package/dist/chunk-3ZYSAW2T.mjs +263 -0
- package/dist/chunk-4ANVF274.js +103 -0
- package/dist/chunk-4C7I3ELN.js +388 -0
- package/dist/chunk-4DYKAYFO.mjs +8 -0
- package/dist/chunk-4ZDR72SG.js +329 -0
- package/dist/chunk-52YS45RR.js +1066 -0
- package/dist/chunk-5325XSCH.js +107 -0
- package/dist/chunk-5AD5X6AV.js +13 -0
- package/dist/chunk-5BYDGGWO.mjs +197 -0
- package/dist/chunk-5C3C7VDM.mjs +55 -0
- package/dist/chunk-5HFMY3D7.js +660 -0
- package/dist/chunk-5LH2QN3T.js +1862 -0
- package/dist/chunk-5PJEXSOW.js +44 -0
- package/dist/chunk-5SXDH3Y7.js +90 -0
- package/dist/chunk-5YFBGGCK.mjs +502 -0
- package/dist/chunk-5YWN6H5Q.mjs +133 -0
- package/dist/chunk-66QP3SMN.js +402 -0
- package/dist/chunk-6DAEZKIG.mjs +385 -0
- package/dist/chunk-6DATW7TB.mjs +420 -0
- package/dist/{chunk-JRGK3NXR.mjs → chunk-6ETDAU62.mjs} +72 -212
- package/dist/chunk-6H254EVP.mjs +178 -0
- package/dist/chunk-6PFNJPBJ.mjs +820 -0
- package/dist/chunk-6PJWXIFX.mjs +357 -0
- package/dist/chunk-6SWKWCMS.js +80 -0
- package/dist/chunk-6VVXXX7S.js +808 -0
- package/dist/chunk-6WUBSMTX.js +1403 -0
- package/dist/chunk-73SGZLAQ.mjs +35 -0
- package/dist/chunk-76L2V6KD.mjs +4 -0
- package/dist/chunk-7AAIAVAA.js +1531 -0
- package/dist/chunk-7ARSJPV3.mjs +93 -0
- package/dist/chunk-7BHW5GTC.mjs +1234 -0
- package/dist/chunk-7DQSDKDU.js +6 -0
- package/dist/chunk-7IQQQENP.mjs +401 -0
- package/dist/chunk-7KFTYENS.js +11357 -0
- package/dist/chunk-7SM6XSPZ.js +3171 -0
- package/dist/chunk-7SXOHAIR.mjs +28 -0
- package/dist/chunk-A2MAX6S4.js +90 -0
- package/dist/chunk-A33OORT7.mjs +1530 -0
- package/dist/{chunk-U6ACF76H.mjs → chunk-A36JRXXH.mjs} +1075 -1845
- package/dist/chunk-A7BU3BK4.js +52 -0
- package/dist/chunk-A7MQSN2V.mjs +77 -0
- package/dist/chunk-A7V4L2IT.mjs +416 -0
- package/dist/chunk-AABEK6XU.js +226 -0
- package/dist/chunk-AGV33FWC.mjs +5005 -0
- package/dist/chunk-AHNR3BXI.js +108 -0
- package/dist/chunk-AQ5RLBU2.mjs +286 -0
- package/dist/chunk-AQOE6WCG.js +1270 -0
- package/dist/chunk-ATAWRACV.mjs +62 -0
- package/dist/chunk-ATCURNUV.js +14 -0
- package/dist/chunk-AWPV33OO.js +6 -0
- package/dist/chunk-AYJPHKYV.js +337 -0
- package/dist/chunk-AZ5BGWHB.js +162 -0
- package/dist/chunk-AZAXD44P.js +1373 -0
- package/dist/chunk-BBGKQIJJ.mjs +406 -0
- package/dist/chunk-BP4JLSUA.js +1453 -0
- package/dist/{chunk-SUCE7FWA.mjs → chunk-BTUSVHIE.mjs} +539 -978
- package/dist/chunk-BU6OK542.mjs +818 -0
- package/dist/chunk-CVSRWM6W.js +418 -0
- package/dist/chunk-CYBMFMJD.mjs +247 -0
- package/dist/chunk-DDJLDOUX.mjs +217 -0
- package/dist/{chunk-V32BCG7M.js → chunk-DFZWHNRG.js} +75 -215
- package/dist/chunk-DJ2C7AVG.js +644 -0
- package/dist/chunk-DS2VU4WW.mjs +102 -0
- package/dist/chunk-DSAG7T5P.js +7290 -0
- package/dist/chunk-E2QPPH7I.js +327 -0
- package/dist/chunk-E65WCTIG.mjs +1187 -0
- package/dist/{chunk-33VCYWVL.mjs → chunk-E6QQKDNE.mjs} +30 -42
- package/dist/chunk-ECDK6QBF.mjs +981 -0
- package/dist/chunk-EIB4OWVQ.mjs +620 -0
- package/dist/chunk-EQUZYCGO.js +250 -0
- package/dist/chunk-F3UJ6ZRM.mjs +313 -0
- package/dist/chunk-F63N2ZTQ.js +7023 -0
- package/dist/chunk-F6XRYEM3.mjs +26 -0
- package/dist/chunk-FE6VCE4K.js +5030 -0
- package/dist/chunk-FLWD6GRR.js +1372 -0
- package/dist/chunk-FQBFWJBS.mjs +110 -0
- package/dist/chunk-FXVJ2HFU.js +26 -0
- package/dist/chunk-FZMQMQBW.js +312 -0
- package/dist/chunk-G3EEC44R.js +53 -0
- package/dist/{chunk-KG3WT4PR.mjs → chunk-GCKWKLZF.mjs} +73 -104
- package/dist/chunk-GCX7TY4D.mjs +6826 -0
- package/dist/chunk-GDB6TCSD.js +450 -0
- package/dist/chunk-GDCV4IWO.mjs +21 -0
- package/dist/chunk-GDZT5LZ5.js +170 -0
- package/dist/chunk-GHPUYD4I.mjs +213 -0
- package/dist/chunk-GHS6MIL6.mjs +1432 -0
- package/dist/chunk-GPS2THCL.mjs +11 -0
- package/dist/{chunk-EV2EVOYS.js → chunk-GTJWQAGU.js} +31 -42
- package/dist/chunk-GVTI6UJQ.mjs +130 -0
- package/dist/chunk-GXKI64OT.mjs +1138 -0
- package/dist/chunk-GYDYF2WX.js +275 -0
- package/dist/chunk-GYLP6UG4.mjs +705 -0
- package/dist/chunk-H3OQKK6X.js +1158 -0
- package/dist/chunk-H5DFSCJ6.js +40 -0
- package/dist/chunk-HAGEIC2L.mjs +186 -0
- package/dist/chunk-HAJ4JRFO.js +293 -0
- package/dist/chunk-HDR72GB6.js +188 -0
- package/dist/chunk-HF5HPS4T.mjs +40 -0
- package/dist/chunk-HK6LOFDS.js +218 -0
- package/dist/chunk-HMWYTXCY.mjs +143 -0
- package/dist/chunk-HPCSRCMA.js +89 -0
- package/dist/chunk-HSEO6TPU.js +247 -0
- package/dist/chunk-I5FOHCLH.js +132 -0
- package/dist/chunk-IDLW4NWA.mjs +85 -0
- package/dist/chunk-IIDZ5WUX.js +61 -0
- package/dist/chunk-IR74FJHU.js +2332 -0
- package/dist/chunk-IRVFYAKP.mjs +100 -0
- package/dist/{chunk-XBL3TMPC.mjs → chunk-IZDWAL53.mjs} +1795 -3287
- package/dist/chunk-J2KZXIU3.js +51 -0
- package/dist/chunk-J2U6PJSO.js +91 -0
- package/dist/chunk-J5AJNY2N.js +283 -0
- package/dist/chunk-J6KQZ4FO.mjs +821 -0
- package/dist/{chunk-OWW5GUSB.js → chunk-JGBCIKJV.js} +7 -6
- package/dist/chunk-JKGTBMU7.mjs +25 -0
- package/dist/chunk-JR3TNEQC.js +422 -0
- package/dist/chunk-JURRXY2J.mjs +29 -0
- package/dist/chunk-K3HW5I2A.mjs +317 -0
- package/dist/chunk-K46SMZ66.mjs +103 -0
- package/dist/chunk-K4UDGE3Z.mjs +6 -0
- package/dist/chunk-KDQOR4QQ.mjs +350 -0
- package/dist/chunk-KDTVOLHI.mjs +288 -0
- package/dist/chunk-KGHJH5KJ.mjs +35 -0
- package/dist/chunk-KIZOA5LX.mjs +140 -0
- package/dist/chunk-KK6HYVBI.mjs +242 -0
- package/dist/chunk-KMKWGXMK.js +856 -0
- package/dist/chunk-KPA6K5IB.js +80 -0
- package/dist/chunk-KU7O4IXU.mjs +260 -0
- package/dist/chunk-KVFNRJOR.mjs +11142 -0
- package/dist/chunk-KZJRSXHK.js +2432 -0
- package/dist/chunk-LHWPRUJL.js +79 -0
- package/dist/chunk-LIV3KXJG.mjs +369 -0
- package/dist/chunk-LKV4LACG.js +21 -0
- package/dist/chunk-LUY45X3U.mjs +263 -0
- package/dist/chunk-LYEZZEEF.mjs +17 -0
- package/dist/chunk-M5EXQZYY.mjs +1519 -0
- package/dist/chunk-ME6HGG4I.mjs +1338 -0
- package/dist/chunk-MEXP6DA6.js +31 -0
- package/dist/chunk-MG52AW3H.js +902 -0
- package/dist/chunk-MIPO6F72.js +334 -0
- package/dist/{chunk-5QW7CQBA.js → chunk-MKIJQL5Q.js} +211 -321
- package/dist/chunk-MN3YETVN.mjs +17 -0
- package/dist/chunk-MOBSBXVE.mjs +2391 -0
- package/dist/chunk-MOMOZEUM.mjs +88 -0
- package/dist/chunk-MRFUNRAP.js +62 -0
- package/dist/chunk-MTIHEW2M.js +433 -0
- package/dist/chunk-N4RGGDEL.mjs +73 -0
- package/dist/chunk-NH654HAT.js +10 -0
- package/dist/chunk-NHJUGZUR.mjs +253 -0
- package/dist/chunk-NMQT4HG3.mjs +757 -0
- package/dist/chunk-NPSYB6DC.mjs +906 -0
- package/dist/chunk-NW2GPMSO.js +857 -0
- package/dist/chunk-NXKQOQ6L.js +76 -0
- package/dist/chunk-NXLAZIJZ.js +309 -0
- package/dist/chunk-NYWNA5CF.js +148 -0
- package/dist/chunk-NZTKLY2W.js +1442 -0
- package/dist/chunk-O2ICABUD.js +36 -0
- package/dist/chunk-OIVVQQ22.js +862 -0
- package/dist/chunk-OKC2B4O3.mjs +312 -0
- package/dist/chunk-OLWFPDBK.js +2220 -0
- package/dist/chunk-OMTVH334.js +3779 -0
- package/dist/chunk-OQRVEM56.mjs +362 -0
- package/dist/chunk-OXMIBOD4.js +337 -0
- package/dist/chunk-PBL6YL5L.mjs +288 -0
- package/dist/chunk-PDOELNNQ.js +97 -0
- package/dist/chunk-PDQJY2GZ.js +136 -0
- package/dist/chunk-PKOZXD2Q.js +1274 -0
- package/dist/chunk-PPF2BYFL.mjs +2191 -0
- package/dist/chunk-PQTQKNKD.js +539 -0
- package/dist/chunk-PRSR4FAV.mjs +81 -0
- package/dist/chunk-PTRNO5UD.js +95 -0
- package/dist/chunk-Q2Y3VMKH.js +2000 -0
- package/dist/chunk-QCZOE65N.js +96 -0
- package/dist/chunk-QDYFLATW.mjs +52 -0
- package/dist/chunk-QQABGCMM.js +22 -0
- package/dist/chunk-QS6TRHMR.js +345 -0
- package/dist/chunk-R56P64LB.mjs +208 -0
- package/dist/chunk-RCQ2MPBV.js +428 -0
- package/dist/chunk-RFVRPYR2.mjs +856 -0
- package/dist/chunk-RKBLPGPV.js +11521 -0
- package/dist/chunk-RM2V4IND.mjs +327 -0
- package/dist/chunk-RQXN5A34.mjs +613 -0
- package/dist/chunk-RUVGVNOF.mjs +2687 -0
- package/dist/chunk-SAFJIGYB.mjs +165 -0
- package/dist/chunk-SKQFLBDD.js +263 -0
- package/dist/chunk-SMK6JU2F.mjs +2092 -0
- package/dist/{chunk-UVRPC2P7.js → chunk-SNNEOS5Z.js} +1984 -3476
- package/dist/chunk-SPCRQ6NO.mjs +1246 -0
- package/dist/chunk-SWX4SALA.mjs +19 -0
- package/dist/{chunk-JVODCGFP.mjs → chunk-SYEO2WV4.mjs} +128 -238
- package/dist/chunk-T2QQMX2N.js +10 -0
- package/dist/chunk-T3AFF3L7.mjs +57 -0
- package/dist/chunk-T6Z2EXYL.js +712 -0
- package/dist/chunk-T7LOXGYX.js +118 -0
- package/dist/chunk-TJCAE7RC.mjs +1315 -0
- package/dist/chunk-TJI3K6RP.js +137 -0
- package/dist/chunk-TL2SVO4P.mjs +55 -0
- package/dist/chunk-TM63CYGN.mjs +399 -0
- package/dist/chunk-TU5RYTYU.mjs +13 -0
- package/dist/chunk-TVJZ4GPS.js +1553 -0
- package/dist/chunk-TWM6DLYF.js +371 -0
- package/dist/chunk-U63OC4TQ.js +30 -0
- package/dist/{chunk-L5GKVQVJ.js → chunk-U6BVSJZ6.js} +25 -57
- package/dist/chunk-U6UVWEAK.mjs +792 -0
- package/dist/chunk-UCEPNO6N.mjs +11048 -0
- package/dist/{chunk-ANT574FD.js → chunk-UCR5HRYM.js} +74 -105
- package/dist/chunk-UG5BTOTF.mjs +334 -0
- package/dist/chunk-UGH37BQW.mjs +157 -0
- package/dist/chunk-V7ZRH3PY.mjs +271 -0
- package/dist/chunk-VBGHBL3E.mjs +1394 -0
- package/dist/chunk-VRBDAS5I.js +920 -0
- package/dist/chunk-VVE3Y76O.js +230 -0
- package/dist/chunk-W65JIRI4.mjs +1182 -0
- package/dist/chunk-WHYKAT7G.js +62 -0
- package/dist/{chunk-YOIVZ6OA.mjs → chunk-WIZRUIZB.mjs} +25 -57
- package/dist/chunk-WKWTDZS7.js +385 -0
- package/dist/chunk-WLMINRC4.mjs +78 -0
- package/dist/chunk-WOF3AD3J.js +22 -0
- package/dist/chunk-WWKMOA76.js +1262 -0
- package/dist/chunk-X5A5FOWW.js +615 -0
- package/dist/chunk-X6CN6KQF.mjs +192 -0
- package/dist/chunk-XD2PMH46.mjs +517 -0
- package/dist/chunk-XJA2NGTI.mjs +88 -0
- package/dist/chunk-XJIHN3BY.mjs +8 -0
- package/dist/chunk-XK6UDWJS.js +203 -0
- package/dist/chunk-XPG3N5CF.mjs +415 -0
- package/dist/chunk-XVZ2NKSU.mjs +74 -0
- package/dist/chunk-XYP45OLE.js +117 -0
- package/dist/chunk-XZSDGZX6.mjs +301 -0
- package/dist/chunk-Y2EMGN4T.mjs +120 -0
- package/dist/chunk-Y3XWP5XW.mjs +298 -0
- package/dist/chunk-Y4K22JL6.js +228 -0
- package/dist/chunk-Y65LXQGA.mjs +3164 -0
- package/dist/chunk-Y66WVMO5.mjs +87 -0
- package/dist/chunk-Y7JWLB25.mjs +7280 -0
- package/dist/chunk-YCDXAJKU.js +175 -0
- package/dist/chunk-YRDQCCIS.js +152 -0
- package/dist/chunk-YV52DGSA.js +111 -0
- package/dist/chunk-YXGZQPUD.js +94 -0
- package/dist/chunk-Z3A3AFVU.mjs +102 -0
- package/dist/chunk-ZCY6YKKP.mjs +475 -0
- package/dist/chunk-ZEQHXVU5.js +215 -0
- package/dist/chunk-ZF7JCXCI.js +284 -0
- package/dist/chunk-ZJBRUH6V.js +29 -0
- package/dist/chunk-ZMIL4ZOA.js +365 -0
- package/dist/chunk-ZR5ULMN2.mjs +337 -0
- package/dist/chunk-ZXREOYOW.js +87 -0
- package/dist/{client-BSP9U1O1.d.mts → client-CX_WR0-J.d.mts} +2 -2
- package/dist/client-Dytx_ZTC.d.ts +230 -0
- package/dist/{client-B878xeAP.d.ts → client-dqOhP9Nc.d.ts} +2 -2
- package/dist/client-hTKbCuhG.d.mts +230 -0
- package/dist/clock-B-UAjkKa.d.mts +5 -0
- package/dist/clock-B-UAjkKa.d.ts +5 -0
- package/dist/config-BlXQluJR.d.mts +36 -0
- package/dist/config-BlXQluJR.d.ts +36 -0
- package/dist/courier-Cnn-edJ4.d.ts +95 -0
- package/dist/courier-FmGfkvIN.d.mts +95 -0
- package/dist/crowd-DdHFbqKK.d.ts +186 -0
- package/dist/crowd-hOVSAmA3.d.mts +186 -0
- package/dist/danfo-BEBapFlX.d.mts +146 -0
- package/dist/danfo-UQ_PTIIx.d.ts +146 -0
- package/dist/{elements-Bty6Qs_N.d.mts → elements-DdsRig-2.d.mts} +1548 -257
- package/dist/{elements-Bty6Qs_N.d.ts → elements-DdsRig-2.d.ts} +1548 -257
- package/dist/engines/godot.d.mts +56 -0
- package/dist/engines/godot.d.ts +56 -0
- package/dist/engines/godot.js +28 -0
- package/dist/engines/godot.mjs +3 -0
- package/dist/engines/wasm.d.mts +11 -0
- package/dist/engines/wasm.d.ts +11 -0
- package/dist/engines/wasm.js +178 -0
- package/dist/engines/wasm.mjs +176 -0
- package/dist/fallback-CrG_lTFk.d.mts +270 -0
- package/dist/fallback-CrG_lTFk.d.ts +270 -0
- package/dist/fallback-KDB4Y2CE.mjs +6 -0
- package/dist/fallback-Y26TQENE.js +19 -0
- package/dist/features-CZB4rmcD.d.mts +118 -0
- package/dist/features-CZB4rmcD.d.ts +118 -0
- package/dist/fit-BWiE7rgA.d.mts +44 -0
- package/dist/fit-DK0oT7zO.d.ts +44 -0
- package/dist/five-a-side-Bv1AOUy3.d.mts +115 -0
- package/dist/five-a-side-EC51SJY1.d.ts +115 -0
- package/dist/fluid-ARr0qUIL.d.ts +939 -0
- package/dist/fluid-DLlEj2cs.d.mts +939 -0
- package/dist/game/conformance.d.mts +84 -0
- package/dist/game/conformance.d.ts +84 -0
- package/dist/game/conformance.js +1025 -0
- package/dist/game/conformance.mjs +994 -0
- package/dist/game/heap.d.mts +40 -0
- package/dist/game/heap.d.ts +40 -0
- package/dist/game/heap.js +48 -0
- package/dist/game/heap.mjs +7 -0
- package/dist/game/kit/canvas.d.mts +240 -0
- package/dist/game/kit/canvas.d.ts +240 -0
- package/dist/game/kit/canvas.js +3566 -0
- package/dist/game/kit/canvas.mjs +1039 -0
- package/dist/game/kit/courier.d.mts +17 -0
- package/dist/game/kit/courier.d.ts +17 -0
- package/dist/game/kit/courier.js +66 -0
- package/dist/game/kit/courier.mjs +49 -0
- package/dist/game/kit/danfo.d.mts +11 -0
- package/dist/game/kit/danfo.d.ts +11 -0
- package/dist/game/kit/danfo.js +109 -0
- package/dist/game/kit/danfo.mjs +44 -0
- package/dist/game/kit/engine.d.mts +29 -0
- package/dist/game/kit/engine.d.ts +29 -0
- package/dist/game/kit/engine.js +183 -0
- package/dist/game/kit/engine.mjs +30 -0
- package/dist/game/kit/five-a-side.d.mts +11 -0
- package/dist/game/kit/five-a-side.d.ts +11 -0
- package/dist/game/kit/five-a-side.js +86 -0
- package/dist/game/kit/five-a-side.mjs +41 -0
- package/dist/game/kit/frontier.d.mts +344 -0
- package/dist/game/kit/frontier.d.ts +344 -0
- package/dist/game/kit/frontier.js +435 -0
- package/dist/game/kit/frontier.mjs +14 -0
- package/dist/game/kit/genesis.d.mts +752 -0
- package/dist/game/kit/genesis.d.ts +752 -0
- package/dist/game/kit/genesis.js +380 -0
- package/dist/game/kit/genesis.mjs +15 -0
- package/dist/game/kit/ludo.d.mts +15 -0
- package/dist/game/kit/ludo.d.ts +15 -0
- package/dist/game/kit/ludo.js +87 -0
- package/dist/game/kit/ludo.mjs +42 -0
- package/dist/game/kit/runner.d.mts +12 -0
- package/dist/game/kit/runner.d.ts +12 -0
- package/dist/game/kit/runner.js +83 -0
- package/dist/game/kit/runner.mjs +46 -0
- package/dist/game/kit/shootout.d.mts +13 -0
- package/dist/game/kit/shootout.d.ts +13 -0
- package/dist/game/kit/shootout.js +122 -0
- package/dist/game/kit/shootout.mjs +57 -0
- package/dist/game/kit/slots.d.mts +392 -0
- package/dist/game/kit/slots.d.ts +392 -0
- package/dist/game/kit/slots.js +215 -0
- package/dist/game/kit/slots.mjs +6 -0
- package/dist/game/kit/tycoon.d.mts +16 -0
- package/dist/game/kit/tycoon.d.ts +16 -0
- package/dist/game/kit/tycoon.js +145 -0
- package/dist/game/kit/tycoon.mjs +44 -0
- package/dist/game/kit/word.d.mts +11 -0
- package/dist/game/kit/word.d.ts +11 -0
- package/dist/game/kit/word.js +78 -0
- package/dist/game/kit/word.mjs +41 -0
- package/dist/game/kit/worlds.d.mts +18 -0
- package/dist/game/kit/worlds.d.ts +18 -0
- package/dist/game/kit/worlds.js +74 -0
- package/dist/game/kit/worlds.mjs +49 -0
- package/dist/game/kit.d.mts +53 -0
- package/dist/game/kit.d.ts +53 -0
- package/dist/game/kit.js +2610 -0
- package/dist/game/kit.mjs +101 -0
- package/dist/game/prepared.d.mts +14 -0
- package/dist/game/prepared.d.ts +14 -0
- package/dist/game/prepared.js +81 -0
- package/dist/game/prepared.mjs +32 -0
- package/dist/game-Bx8onkhX.d.mts +1451 -0
- package/dist/game-fgQy2YIm.d.ts +1451 -0
- package/dist/game-theme-CBTw1b_d.d.mts +35 -0
- package/dist/game-theme-Dg-ict5A.d.ts +35 -0
- package/dist/game.d.mts +3546 -0
- package/dist/game.d.ts +3546 -0
- package/dist/game.js +4455 -0
- package/dist/game.mjs +50 -0
- package/dist/graphics-C6YjWYvP.d.ts +5 -0
- package/dist/graphics-Dk2yQnYN.d.mts +5 -0
- package/dist/guest-DrsA00XD.d.mts +732 -0
- package/dist/guest-wIdfoT05.d.ts +732 -0
- package/dist/hit-stop-BKkVwTq7.d.mts +43 -0
- package/dist/hit-stop-D-8pPYnM.d.ts +43 -0
- package/dist/hot-Crn9XpHJ.d.ts +29 -0
- package/dist/hot-DH3nOhQD.d.mts +29 -0
- package/dist/{index-CQStGb3B.d.mts → index-6gkHMGAq.d.mts} +2 -2
- package/dist/index-B8ybCKJI.d.ts +41 -0
- package/dist/{index-DJwXmoaP.d.ts → index-B98Xac8e.d.ts} +2 -2
- package/dist/{index-B7oA_1XI.d.ts → index-B_ByTtIT.d.ts} +2 -2
- package/dist/index-DHjNHb1c.d.mts +41 -0
- package/dist/{index-DhUSTAhT.d.mts → index-DbAN_VQE.d.mts} +2 -2
- package/dist/index.d.mts +134 -24
- package/dist/index.d.ts +134 -24
- package/dist/index.js +407 -248
- package/dist/index.mjs +184 -58
- package/dist/interactives-authoring.d.mts +231 -0
- package/dist/interactives-authoring.d.ts +231 -0
- package/dist/interactives-authoring.js +1743 -0
- package/dist/interactives-authoring.mjs +1704 -0
- package/dist/interactives-canvas.global.js +148 -0
- package/dist/interactives-guest.d.mts +20 -0
- package/dist/interactives-guest.d.ts +20 -0
- package/dist/interactives-guest.js +63 -0
- package/dist/interactives-guest.json +1 -0
- package/dist/interactives-guest.mjs +61 -0
- package/dist/interactives-jsc.global.js +9357 -0
- package/dist/interactives-meters.d.mts +93 -0
- package/dist/interactives-meters.d.ts +93 -0
- package/dist/interactives-meters.js +252 -0
- package/dist/interactives-meters.mjs +68 -0
- package/dist/interactives-production.d.mts +430 -0
- package/dist/interactives-production.d.ts +430 -0
- package/dist/interactives-production.js +1231 -0
- package/dist/interactives-production.mjs +1170 -0
- package/dist/interactives-record.d.mts +112 -0
- package/dist/interactives-record.d.ts +112 -0
- package/dist/interactives-record.js +302 -0
- package/dist/interactives-record.mjs +295 -0
- package/dist/interactives-runtime.d.mts +61 -0
- package/dist/interactives-runtime.d.ts +61 -0
- package/dist/interactives-runtime.js +442 -0
- package/dist/interactives-runtime.mjs +25 -0
- package/dist/interactives-studio-kernel.global.js +1 -0
- package/dist/interactives-studio.d.mts +806 -0
- package/dist/interactives-studio.d.ts +806 -0
- package/dist/interactives-studio.js +5741 -0
- package/dist/interactives-studio.mjs +5651 -0
- package/dist/interactives-tick.d.mts +90 -0
- package/dist/interactives-tick.d.ts +90 -0
- package/dist/interactives-tick.js +203 -0
- package/dist/interactives-tick.mjs +6 -0
- package/dist/interactives-web.d.mts +762 -0
- package/dist/interactives-web.d.ts +762 -0
- package/dist/interactives-web.js +5000 -0
- package/dist/interactives-web.mjs +4628 -0
- package/dist/interactives.d.mts +2430 -0
- package/dist/interactives.d.ts +2430 -0
- package/dist/interactives.js +5723 -0
- package/dist/interactives.mjs +4333 -0
- package/dist/juice-CoHxlpKA.d.ts +42 -0
- package/dist/juice-DQztFS43.d.mts +42 -0
- package/dist/launch-T2f4_Di4.d.mts +151 -0
- package/dist/launch-d6oreMzR.d.ts +151 -0
- package/dist/library-DXYaMFhi.d.mts +69 -0
- package/dist/library-DXYaMFhi.d.ts +69 -0
- package/dist/link-BUTqGmyi.d.mts +38 -0
- package/dist/link-BUTqGmyi.d.ts +38 -0
- package/dist/lint.js +104 -204
- package/dist/lint.mjs +103 -203
- package/dist/local-D8_I6UeL.d.mts +6967 -0
- package/dist/local-VZkqsCzR.d.ts +6967 -0
- package/dist/lockstep-BLf6dglI.d.mts +321 -0
- package/dist/lockstep-D50Ia0JW.d.ts +321 -0
- package/dist/ludo-B8ClkDqr.d.ts +205 -0
- package/dist/ludo-BOuohQ-M.d.mts +205 -0
- package/dist/mock/cli.mjs +200 -56
- package/dist/mock/library.js +200 -56
- package/dist/mock/library.mjs +200 -56
- package/dist/mock/msw.js +200 -56
- package/dist/mock/msw.mjs +200 -56
- package/dist/native-BodxSh03.d.mts +16 -0
- package/dist/native-DUHMT8gA.d.ts +16 -0
- package/dist/network-ZXLD7l1b.d.mts +19 -0
- package/dist/network-ZXLD7l1b.d.ts +19 -0
- package/dist/online-XeymeM9s.d.ts +381 -0
- package/dist/online-d7W_Al9a.d.mts +381 -0
- package/dist/params-DxFb5G_U.d.mts +155 -0
- package/dist/params-DxFb5G_U.d.ts +155 -0
- package/dist/play-BRRlfLhX.d.ts +940 -0
- package/dist/play-ClrMd_e8.d.mts +940 -0
- package/dist/policy-CCw8tXLm.d.mts +3078 -0
- package/dist/policy-CMqOSQIu.d.ts +3078 -0
- package/dist/ports-B_0v_P3A.d.mts +13 -0
- package/dist/ports-CGU_3e_0.d.ts +13 -0
- package/dist/prefetch-BHnicOQj.d.ts +117 -0
- package/dist/prefetch-CBXgYacv.d.mts +117 -0
- package/dist/{price-CSztR02F.d.mts → price-BOzexBww.d.mts} +1 -1
- package/dist/{price-C_vasx9A.d.ts → price-C1h9sPxE.d.ts} +1 -1
- package/dist/protocol-C8qbpUbT.d.mts +242 -0
- package/dist/protocol-C8qbpUbT.d.ts +242 -0
- package/dist/rapier-AZHT4YI7.js +7886 -0
- package/dist/rapier-ODEPCQA6.mjs +7792 -0
- package/dist/react.d.mts +157 -15
- package/dist/react.d.ts +157 -15
- package/dist/react.js +5564 -5904
- package/dist/react.mjs +5451 -5808
- package/dist/runner-CQcLL7By.d.ts +189 -0
- package/dist/runner-D46Yj-wE.d.mts +189 -0
- package/dist/runtime-BRWfkf_q.d.mts +51 -0
- package/dist/runtime-DyuBMkKM.d.ts +51 -0
- package/dist/scheduling-D2ajXpMC.d.ts +224 -0
- package/dist/scheduling-DSRbbaZb.d.mts +224 -0
- package/dist/schema-BrWxzKp6.d.mts +63 -0
- package/dist/schema-BrWxzKp6.d.ts +63 -0
- package/dist/server/evict.js +34 -37
- package/dist/server/evict.mjs +34 -37
- package/dist/server/tanstack.d.mts +49 -3
- package/dist/server/tanstack.d.ts +49 -3
- package/dist/server/tanstack.js +169 -117
- package/dist/server/tanstack.mjs +166 -118
- package/dist/{server-Dckg4Vdr.d.ts → server-D29IIuDV.d.ts} +136 -130
- package/dist/{server-B6dW7-Lj.d.mts → server-DQMWPnc8.d.mts} +136 -130
- package/dist/server.d.mts +45 -5
- package/dist/server.d.ts +45 -5
- package/dist/server.js +171 -227
- package/dist/server.mjs +165 -225
- package/dist/session-grant-CJ27DwrT.d.mts +19 -0
- package/dist/session-grant-CJ27DwrT.d.ts +19 -0
- package/dist/shootout-BJZeX6FG.d.ts +140 -0
- package/dist/shootout-tcZd1Rxt.d.mts +140 -0
- package/dist/state-replica-stMtdkVD.d.mts +42 -0
- package/dist/state-replica-stMtdkVD.d.ts +42 -0
- package/dist/studio-CowqWqez.d.mts +14 -0
- package/dist/studio-CowqWqez.d.ts +14 -0
- package/dist/styles.css +1 -1
- package/dist/template-AhCdB1kW.d.mts +190 -0
- package/dist/template-BkEGVTQj.d.ts +190 -0
- package/dist/terrain-BMxEc6Oc.d.ts +429 -0
- package/dist/terrain-C-XC1Oui.d.mts +429 -0
- package/dist/testing/msw.d.mts +28 -4
- package/dist/testing/msw.d.ts +28 -4
- package/dist/testing/msw.js +15 -21
- package/dist/testing/msw.mjs +15 -21
- package/dist/testing/suite.d.mts +6 -5
- package/dist/testing/suite.d.ts +6 -5
- package/dist/testing/suite.js +89 -124
- package/dist/testing/suite.mjs +81 -116
- package/dist/testing.d.mts +27 -1227
- package/dist/testing.d.ts +27 -1227
- package/dist/testing.js +127 -131
- package/dist/testing.mjs +19 -23
- package/dist/tick-transport-C8QEh8Uw.d.mts +50 -0
- package/dist/tick-transport-UjHY3xK1.d.ts +50 -0
- package/dist/timeline-protocol-hp6e8zFB.d.mts +47 -0
- package/dist/timeline-protocol-hp6e8zFB.d.ts +47 -0
- package/dist/tokens-DhanQRQS.d.mts +21 -0
- package/dist/tokens-K8yxwd6G.d.ts +21 -0
- package/dist/tree-C-Io2Hbx.d.mts +35 -0
- package/dist/tree-CP_qSW4H.d.ts +35 -0
- package/dist/tycoon-B5KHk2Xx.d.mts +255 -0
- package/dist/tycoon-hmHo-3HX.d.ts +255 -0
- package/dist/types-BQkxPwZP.d.mts +219 -0
- package/dist/types-D_f6UUxM.d.ts +219 -0
- package/dist/ui-DwHicuFv.d.mts +563 -0
- package/dist/ui-hi7S2YcH.d.ts +563 -0
- package/dist/{sign-in-DQlIdqsi.d.mts → url-52ndUruG.d.mts} +15 -1
- package/dist/{sign-in-DQlIdqsi.d.ts → url-52ndUruG.d.ts} +15 -1
- package/dist/utils.d.mts +3 -3
- package/dist/utils.d.ts +3 -3
- package/dist/utils.js +37 -37
- package/dist/utils.mjs +4 -4
- package/dist/vars-Dc_PrhBK.d.mts +511 -0
- package/dist/vars-Dc_PrhBK.d.ts +511 -0
- package/dist/vm-IUARFFAI.mjs +63 -0
- package/dist/vm-N7L6MGGH.js +65 -0
- package/dist/weave-delivery-CW-Kstut.d.mts +360 -0
- package/dist/weave-delivery-CW-Kstut.d.ts +360 -0
- package/dist/web-Dss74a7v.d.ts +883 -0
- package/dist/web-f9ZQPoyw.d.mts +883 -0
- package/dist/web-transport-C7MkBL0a.d.ts +19 -0
- package/dist/web-transport-aYEqXMd9.d.mts +19 -0
- package/dist/weight-CPGjsgjV.d.ts +92 -0
- package/dist/weight-tF1ODR1p.d.mts +92 -0
- package/dist/word-BcX9Jcmv.d.mts +70 -0
- package/dist/word-C7sVPLHm.d.ts +70 -0
- package/dist/world-PvILHDR1.d.ts +2285 -0
- package/dist/world-qekkXjJv.d.mts +2285 -0
- package/dist/worlds-Br2Pb0Cs.d.ts +109 -0
- package/dist/worlds-D5ydYr7d.d.mts +109 -0
- package/engines/c/cimplify.h +108 -0
- package/engines/c/cimplify.lib.js +11 -0
- package/engines/godot/addons/cimplify/cimplify.gd +97 -0
- package/engines/rust/interactives-ctx/Cargo.toml +9 -0
- package/engines/rust/interactives-ctx/src/lib.rs +189 -0
- package/package.json +189 -3
- package/vendor/rapier3d-compat/LICENSE +201 -0
- package/vendor/rapier3d-compat/PATCHES.md +61 -0
- package/dist/chunk-2P4KXFB6.js +0 -274
- package/dist/chunk-3G6RQLXK.mjs +0 -21
- package/dist/chunk-3V4DVXV3.mjs +0 -254
- package/dist/chunk-EDK3LNM6.js +0 -2436
- package/dist/chunk-F7J3HK27.js +0 -4549
- package/dist/chunk-U4MW6PYU.mjs +0 -23
- package/dist/chunk-XREIZ56K.js +0 -26
|
@@ -0,0 +1,2285 @@
|
|
|
1
|
+
import { aL as NavPort, aM as NavDesc, aN as OffMeshLinkDesc, f as Vec3Like, aO as AgentDesc, aP as RoadGraphDesc, aQ as DriverDesc, F as FrameTime, aR as RayQuery, aS as RayHit, aT as SoaEngine, a9 as PickHit, aU as SoaBulkExports, aV as ShapeCastQuery, aW as RollbackState, aX as Scalar, aY as ArrayFor, aZ as ComponentMemory, a_ as TransformColumns, a$ as TransformPort, aw as Quat, V as Vec3, b0 as CurveTable, b1 as SoftBodyPort, i as GeometryId, b2 as SoftBodyInfo, b3 as CraftPort, b4 as WaterDesc, b5 as SeaState, b6 as OceanDesc, b7 as OceanCascades, b8 as PuddleOptions, b9 as RippleOptions, ba as WaterSample, bb as ColliderDesc, bc as PhysicsPort, bd as WorldRollbackDesc, be as SolverSettings, bf as SleepThresholds, bg as WorldSnapshots, bh as BodyDesc, bi as JointPort, bj as RagdollDesc, bk as Ragdoll, bl as JointDesc, bm as ContactRuleDesc, bn as CharacterControllerDesc, bo as CharacterMove, au as VehicleDesc, av as Vehicle, bp as WorldStreamingPort, j as MaterialId, D as DeviceTier, bq as KernelEngine } from './backend-gUCzs5Kg.mjs';
|
|
2
|
+
import { K as KernelMeta } from './library-DXYaMFhi.mjs';
|
|
3
|
+
|
|
4
|
+
type ColumnArray = Float32Array | Int32Array | Uint32Array | Uint8Array;
|
|
5
|
+
interface SoaViews {
|
|
6
|
+
readonly header: Uint32Array;
|
|
7
|
+
readonly params: Float32Array;
|
|
8
|
+
readonly result: Float64Array;
|
|
9
|
+
readonly capacity: number;
|
|
10
|
+
readonly stride: number;
|
|
11
|
+
readonly kinds: readonly number[];
|
|
12
|
+
readonly columns: readonly ColumnArray[];
|
|
13
|
+
readonly bits: readonly (Uint32Array | null)[];
|
|
14
|
+
readonly lists: readonly Uint32Array[];
|
|
15
|
+
readonly cell: number;
|
|
16
|
+
readonly gridTable: number;
|
|
17
|
+
}
|
|
18
|
+
declare class SoaFallback {
|
|
19
|
+
private readonly v;
|
|
20
|
+
private keys;
|
|
21
|
+
private spareKeys;
|
|
22
|
+
private rows;
|
|
23
|
+
private spareRows;
|
|
24
|
+
private counts;
|
|
25
|
+
private readonly accumulators;
|
|
26
|
+
private points;
|
|
27
|
+
private gridRows;
|
|
28
|
+
private starts;
|
|
29
|
+
private cells;
|
|
30
|
+
private items;
|
|
31
|
+
private gridLen;
|
|
32
|
+
private slotItems;
|
|
33
|
+
private slotCounts;
|
|
34
|
+
private readonly inv;
|
|
35
|
+
private gathered;
|
|
36
|
+
private marks;
|
|
37
|
+
private mark;
|
|
38
|
+
private readonly center;
|
|
39
|
+
private readonly inverseCell;
|
|
40
|
+
private readonly mask;
|
|
41
|
+
constructor(views: SoaViews);
|
|
42
|
+
private count;
|
|
43
|
+
private listLen;
|
|
44
|
+
private guest;
|
|
45
|
+
private validList;
|
|
46
|
+
private f32;
|
|
47
|
+
turn(turn: number): number;
|
|
48
|
+
remove(row: number): number;
|
|
49
|
+
map(op: number, dst: number, a: number, b: number, list: number): number;
|
|
50
|
+
vector(op: number, dst: number, xc: number, yc: number, zc: number, list: number): number;
|
|
51
|
+
select(column: number, cmp: number, input: number, output: number): number;
|
|
52
|
+
reduce(op: number, column: number, list: number): number;
|
|
53
|
+
private blockedSum;
|
|
54
|
+
private blockedExtreme;
|
|
55
|
+
sort(key: number, input: number, output: number, descending: boolean): number;
|
|
56
|
+
private cellOf;
|
|
57
|
+
private hash;
|
|
58
|
+
grid(xc: number, yc: number, zc: number, list: number): number;
|
|
59
|
+
private query;
|
|
60
|
+
near(output: number): number;
|
|
61
|
+
nearest(exclude: number, output: number): number;
|
|
62
|
+
get gridPoints(): number;
|
|
63
|
+
get views(): SoaViews;
|
|
64
|
+
private ints;
|
|
65
|
+
private rowAt;
|
|
66
|
+
private rowsLen;
|
|
67
|
+
inventory(op: number, layout: number, a: number, b: number, out: number): number;
|
|
68
|
+
private optionalInts;
|
|
69
|
+
private optionalF32;
|
|
70
|
+
private collect;
|
|
71
|
+
effect(source: SoaFallback | null, sources: number, health: number, hits: number): number;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
declare class NavPath {
|
|
75
|
+
readonly points: Float32Array;
|
|
76
|
+
count: number;
|
|
77
|
+
complete: boolean;
|
|
78
|
+
constructor(maxPoints?: number);
|
|
79
|
+
}
|
|
80
|
+
declare class Nav {
|
|
81
|
+
private readonly port;
|
|
82
|
+
private initialised;
|
|
83
|
+
private agentCount;
|
|
84
|
+
private roads;
|
|
85
|
+
private roadsOnly;
|
|
86
|
+
private readonly driver;
|
|
87
|
+
private readonly nearestOut;
|
|
88
|
+
constructor(port: NavPort);
|
|
89
|
+
get backend(): string;
|
|
90
|
+
get ready(): boolean;
|
|
91
|
+
init(desc: NavDesc): void;
|
|
92
|
+
addTile(bytes: Uint8Array): number;
|
|
93
|
+
removeTile(x: number, z: number): void;
|
|
94
|
+
addLink(desc: OffMeshLinkDesc): number;
|
|
95
|
+
removeLink(link: number): void;
|
|
96
|
+
agentLink(agent: number): number;
|
|
97
|
+
agentLinkProgress(agent: number): number;
|
|
98
|
+
setAreaCost(area: number, cost: number): void;
|
|
99
|
+
setIncludedAreas(low: number, high: number): void;
|
|
100
|
+
nearest(point: Vec3Like, out: Vec3Like): boolean;
|
|
101
|
+
batchHandle(): number;
|
|
102
|
+
findPath(from: Vec3Like, to: Vec3Like, out: NavPath): boolean;
|
|
103
|
+
addAgent(position: Vec3Like, desc?: AgentDesc): number;
|
|
104
|
+
removeAgent(agent: number): void;
|
|
105
|
+
setAgentTarget(agent: number, target: Vec3Like): void;
|
|
106
|
+
stopAgent(agent: number): void;
|
|
107
|
+
get agents(): Float32Array;
|
|
108
|
+
agentPosition(agent: number, out: Vec3Like): Vec3Like;
|
|
109
|
+
agentState(agent: number): number;
|
|
110
|
+
loadRoads(desc: RoadGraphDesc): void;
|
|
111
|
+
addVehicle(lane: number, position: number, speed?: number, driver?: DriverDesc): number;
|
|
112
|
+
removeVehicle(vehicle: number): void;
|
|
113
|
+
setExternalVehicle(vehicle: number, lane: number, position: number, speed: number): void;
|
|
114
|
+
get vehicles(): Float32Array;
|
|
115
|
+
vehicleOffset(vehicle: number): number;
|
|
116
|
+
signal(lane: number): number;
|
|
117
|
+
step(dt: number): void;
|
|
118
|
+
stepFixed(time: FrameTime): void;
|
|
119
|
+
dispose(): void;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
declare const FALLOFFS: {
|
|
123
|
+
readonly constant: 0;
|
|
124
|
+
readonly linear: 1;
|
|
125
|
+
readonly quadratic: 2;
|
|
126
|
+
readonly smooth: 3;
|
|
127
|
+
};
|
|
128
|
+
type Falloff = keyof typeof FALLOFFS;
|
|
129
|
+
interface BulkTable {
|
|
130
|
+
readonly id: number;
|
|
131
|
+
readonly native: boolean;
|
|
132
|
+
readonly header: Uint32Array;
|
|
133
|
+
readonly params: Float32Array;
|
|
134
|
+
readonly columns: readonly ColumnArray[];
|
|
135
|
+
readonly count: number;
|
|
136
|
+
readonly $bulk: Readonly<Record<string, ((...args: number[]) => number) | undefined>> | null;
|
|
137
|
+
readonly $fallback: SoaFallback;
|
|
138
|
+
$indices(field: string): readonly number[];
|
|
139
|
+
$kind(column: number): number;
|
|
140
|
+
$ready(): void;
|
|
141
|
+
$status(code: number): number;
|
|
142
|
+
}
|
|
143
|
+
interface BatchPhysics {
|
|
144
|
+
raycast(ray: RayQuery, hit: RayHit): boolean;
|
|
145
|
+
entityOfCollider(collider: number): number;
|
|
146
|
+
batchHandle?(): number;
|
|
147
|
+
}
|
|
148
|
+
interface BatchNav {
|
|
149
|
+
findPath(from: Vec3Like, to: Vec3Like, out: NavPath): boolean;
|
|
150
|
+
batchHandle?(): number;
|
|
151
|
+
}
|
|
152
|
+
declare class Inventory {
|
|
153
|
+
private readonly table;
|
|
154
|
+
private readonly layout;
|
|
155
|
+
private readonly limit;
|
|
156
|
+
constructor(table: BulkTable, items: string, counts: string, stackLimit: number);
|
|
157
|
+
private run;
|
|
158
|
+
give(item: number | string, amount: number | string, rows?: Selection | null, overflow?: Selection | null): number;
|
|
159
|
+
take(item: number | string, amount: number | string, rows?: Selection | null, short?: Selection | null): number;
|
|
160
|
+
transfer(from: Selection, to: Selection, item: number | string, amount: number | string, failed?: Selection | null): number;
|
|
161
|
+
move(fromSlot: number, toSlot: number, rows?: Selection | null, toRows?: Selection | null, failed?: Selection | null): number;
|
|
162
|
+
split(slot: number, amount: number | string, rows?: Selection | null, toRows?: Selection | null, failed?: Selection | null): number;
|
|
163
|
+
count(item: number | string, into?: string | null, atLeast?: number | string, rows?: Selection | null, has?: Selection | null): number;
|
|
164
|
+
}
|
|
165
|
+
interface AreaEffectDesc {
|
|
166
|
+
readonly position: string;
|
|
167
|
+
readonly radius: number | string;
|
|
168
|
+
readonly amount: number | string;
|
|
169
|
+
readonly falloff?: Falloff;
|
|
170
|
+
readonly multiplier?: string;
|
|
171
|
+
readonly min?: number;
|
|
172
|
+
readonly max?: number;
|
|
173
|
+
readonly skipSelf?: boolean;
|
|
174
|
+
readonly from?: BulkTable;
|
|
175
|
+
}
|
|
176
|
+
declare class AreaEffect {
|
|
177
|
+
private readonly table;
|
|
178
|
+
private readonly source;
|
|
179
|
+
private readonly health;
|
|
180
|
+
private readonly x;
|
|
181
|
+
private readonly y;
|
|
182
|
+
private readonly z;
|
|
183
|
+
private readonly radiusColumn;
|
|
184
|
+
private readonly radius;
|
|
185
|
+
private readonly amountColumn;
|
|
186
|
+
private readonly amount;
|
|
187
|
+
private readonly falloff;
|
|
188
|
+
private readonly multiplier;
|
|
189
|
+
private readonly low;
|
|
190
|
+
private readonly high;
|
|
191
|
+
private readonly flags;
|
|
192
|
+
constructor(table: BulkTable, health: string, desc: AreaEffectDesc);
|
|
193
|
+
apply(sources?: Selection | null, hits?: Selection | null): number;
|
|
194
|
+
}
|
|
195
|
+
interface RayBatchDesc {
|
|
196
|
+
readonly origin: string;
|
|
197
|
+
readonly direction?: string;
|
|
198
|
+
readonly target?: string;
|
|
199
|
+
readonly maxDistance?: number | string;
|
|
200
|
+
readonly solid?: boolean;
|
|
201
|
+
readonly sensors?: boolean;
|
|
202
|
+
readonly distance?: string;
|
|
203
|
+
readonly normal?: string;
|
|
204
|
+
readonly entity?: string;
|
|
205
|
+
readonly collider?: string;
|
|
206
|
+
readonly exclude?: string;
|
|
207
|
+
readonly hit?: string;
|
|
208
|
+
}
|
|
209
|
+
declare class RayBatch {
|
|
210
|
+
private readonly table;
|
|
211
|
+
private readonly physics;
|
|
212
|
+
private readonly sight;
|
|
213
|
+
private readonly origin;
|
|
214
|
+
private readonly toward;
|
|
215
|
+
private readonly maxColumn;
|
|
216
|
+
private readonly maxDistance;
|
|
217
|
+
private readonly flags;
|
|
218
|
+
private readonly distance;
|
|
219
|
+
private readonly normal;
|
|
220
|
+
private readonly entity;
|
|
221
|
+
private readonly collider;
|
|
222
|
+
private readonly exclude;
|
|
223
|
+
private readonly mask;
|
|
224
|
+
private readonly query;
|
|
225
|
+
private readonly result;
|
|
226
|
+
constructor(table: BulkTable, physics: BatchPhysics, desc: RayBatchDesc, sight: boolean);
|
|
227
|
+
cast(rows?: Selection | null, out?: Selection | null): number;
|
|
228
|
+
private fallback;
|
|
229
|
+
}
|
|
230
|
+
interface PathBatchDesc {
|
|
231
|
+
readonly start: string;
|
|
232
|
+
readonly goal: string;
|
|
233
|
+
readonly direction?: string;
|
|
234
|
+
readonly corner?: string;
|
|
235
|
+
readonly status?: string;
|
|
236
|
+
readonly length?: string;
|
|
237
|
+
readonly corners?: string;
|
|
238
|
+
readonly maxCorners?: number;
|
|
239
|
+
readonly budget?: number;
|
|
240
|
+
}
|
|
241
|
+
declare class PathBatch {
|
|
242
|
+
private readonly table;
|
|
243
|
+
private readonly nav;
|
|
244
|
+
private readonly start;
|
|
245
|
+
private readonly goal;
|
|
246
|
+
private readonly direction;
|
|
247
|
+
private readonly corner;
|
|
248
|
+
private readonly status;
|
|
249
|
+
private readonly length;
|
|
250
|
+
private readonly corners;
|
|
251
|
+
private readonly maxCorners;
|
|
252
|
+
private readonly budget;
|
|
253
|
+
private readonly path;
|
|
254
|
+
private readonly from;
|
|
255
|
+
private readonly to;
|
|
256
|
+
constructor(table: BulkTable, nav: BatchNav, desc: PathBatchDesc);
|
|
257
|
+
get pending(): boolean;
|
|
258
|
+
restart(): void;
|
|
259
|
+
run(rows?: Selection | null, budget?: number): number;
|
|
260
|
+
private fallback;
|
|
261
|
+
private write;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
declare const FLOW_COST_BLOCKED = 0;
|
|
265
|
+
declare const FLOW_COST_ONE = 16;
|
|
266
|
+
interface FlowFieldDesc {
|
|
267
|
+
readonly origin?: readonly [number, number];
|
|
268
|
+
readonly cell: number;
|
|
269
|
+
readonly width: number;
|
|
270
|
+
readonly height: number;
|
|
271
|
+
}
|
|
272
|
+
interface FlowSteerDesc {
|
|
273
|
+
readonly position: string;
|
|
274
|
+
readonly direction: string;
|
|
275
|
+
readonly distance?: string;
|
|
276
|
+
readonly status?: string;
|
|
277
|
+
readonly smooth?: boolean;
|
|
278
|
+
}
|
|
279
|
+
interface FlowNav {
|
|
280
|
+
nearest(point: Vec3Like, out: Vec3Like): boolean;
|
|
281
|
+
batchHandle?(): number;
|
|
282
|
+
}
|
|
283
|
+
declare class FlowSample {
|
|
284
|
+
status: number;
|
|
285
|
+
x: number;
|
|
286
|
+
z: number;
|
|
287
|
+
distance: number;
|
|
288
|
+
}
|
|
289
|
+
declare function flowCost(multiplier: number): number;
|
|
290
|
+
declare class JsFlow {
|
|
291
|
+
readonly width: number;
|
|
292
|
+
readonly height: number;
|
|
293
|
+
readonly cell: number;
|
|
294
|
+
readonly originX: number;
|
|
295
|
+
readonly originZ: number;
|
|
296
|
+
readonly costs: Uint8Array;
|
|
297
|
+
readonly integration: Uint32Array;
|
|
298
|
+
readonly dirs: Uint8Array;
|
|
299
|
+
private readonly next;
|
|
300
|
+
private readonly prev;
|
|
301
|
+
private readonly heads;
|
|
302
|
+
private readonly inverse;
|
|
303
|
+
private readonly metres;
|
|
304
|
+
private goalX;
|
|
305
|
+
private goalZ;
|
|
306
|
+
goalCell: number;
|
|
307
|
+
built: boolean;
|
|
308
|
+
constructor(originX: number, originZ: number, cell: number, width: number, height: number);
|
|
309
|
+
private walkable;
|
|
310
|
+
private step;
|
|
311
|
+
private snap;
|
|
312
|
+
private push;
|
|
313
|
+
private unlink;
|
|
314
|
+
build(x: number, y: number, z: number): number;
|
|
315
|
+
private vector;
|
|
316
|
+
private readonly scratch;
|
|
317
|
+
sample(x: number, z: number, smooth: boolean, out: FlowSample): boolean;
|
|
318
|
+
}
|
|
319
|
+
declare class FlowField {
|
|
320
|
+
readonly width: number;
|
|
321
|
+
readonly height: number;
|
|
322
|
+
readonly cell: number;
|
|
323
|
+
readonly originX: number;
|
|
324
|
+
readonly originZ: number;
|
|
325
|
+
private readonly engine;
|
|
326
|
+
private readonly exports;
|
|
327
|
+
private readonly js;
|
|
328
|
+
private handle;
|
|
329
|
+
private registers;
|
|
330
|
+
private costPointer;
|
|
331
|
+
private costView;
|
|
332
|
+
private readonly probe;
|
|
333
|
+
private readonly hit;
|
|
334
|
+
constructor(desc: FlowFieldDesc, engine?: SoaEngine | null);
|
|
335
|
+
get native(): boolean;
|
|
336
|
+
get $handle(): number;
|
|
337
|
+
get $js(): JsFlow | null;
|
|
338
|
+
get costs(): Uint8Array<ArrayBufferLike>;
|
|
339
|
+
fill(multiplier: number): void;
|
|
340
|
+
setCost(x: number, z: number, multiplier: number): void;
|
|
341
|
+
rasterize(nav: FlowNav, band?: readonly [number, number]): number;
|
|
342
|
+
build(goal: Vec3Like): number;
|
|
343
|
+
batchHandle(): number;
|
|
344
|
+
sample(x: number, z: number, smooth: boolean, out: FlowSample): boolean;
|
|
345
|
+
private check;
|
|
346
|
+
dispose(): void;
|
|
347
|
+
}
|
|
348
|
+
declare class FlowSteer {
|
|
349
|
+
private readonly table;
|
|
350
|
+
private readonly field;
|
|
351
|
+
private readonly position;
|
|
352
|
+
private readonly direction;
|
|
353
|
+
private readonly distance;
|
|
354
|
+
private readonly status;
|
|
355
|
+
private readonly flags;
|
|
356
|
+
private readonly sampled;
|
|
357
|
+
constructor(table: BulkTable, field: FlowField, desc: FlowSteerDesc);
|
|
358
|
+
run(rows?: Selection | null): number;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
interface BatchGraphics {
|
|
362
|
+
raycast(origin: ArrayLike<number>, direction: ArrayLike<number>, out: PickHit, far?: number, layers?: number): boolean;
|
|
363
|
+
batchHandle?(): number;
|
|
364
|
+
}
|
|
365
|
+
interface PickBatchDesc {
|
|
366
|
+
readonly origin: string;
|
|
367
|
+
readonly direction?: string;
|
|
368
|
+
readonly target?: string;
|
|
369
|
+
readonly maxDistance?: number | string;
|
|
370
|
+
readonly layers?: number;
|
|
371
|
+
readonly distance?: string;
|
|
372
|
+
readonly point?: string;
|
|
373
|
+
readonly node?: string;
|
|
374
|
+
readonly instance?: string;
|
|
375
|
+
readonly triangle?: string;
|
|
376
|
+
readonly uv?: string;
|
|
377
|
+
readonly hit?: string;
|
|
378
|
+
}
|
|
379
|
+
declare class PickBatch {
|
|
380
|
+
private readonly table;
|
|
381
|
+
private readonly graphics;
|
|
382
|
+
private readonly sight;
|
|
383
|
+
private readonly origin;
|
|
384
|
+
private readonly toward;
|
|
385
|
+
private readonly maxColumn;
|
|
386
|
+
private readonly maxDistance;
|
|
387
|
+
private readonly layers;
|
|
388
|
+
private readonly distance;
|
|
389
|
+
private readonly point;
|
|
390
|
+
private readonly node;
|
|
391
|
+
private readonly instance;
|
|
392
|
+
private readonly triangle;
|
|
393
|
+
private readonly uv;
|
|
394
|
+
private readonly mask;
|
|
395
|
+
private readonly found;
|
|
396
|
+
private readonly from;
|
|
397
|
+
private readonly along;
|
|
398
|
+
constructor(table: BulkTable, graphics: BatchGraphics, desc: PickBatchDesc);
|
|
399
|
+
cast(rows?: Selection | null, out?: Selection | null): number;
|
|
400
|
+
private fallback;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
type ScalarField = "f32" | "i32" | "u32" | "u8";
|
|
404
|
+
type VectorField = "vec2" | "vec3" | "vec4";
|
|
405
|
+
type ArrayField = `${ScalarField}[${number}]`;
|
|
406
|
+
type WideField = "f64" | "u64";
|
|
407
|
+
type TableField = ScalarField | VectorField | ArrayField | WideField;
|
|
408
|
+
type TableSchema = Readonly<Record<string, TableField>>;
|
|
409
|
+
interface SlotsView {
|
|
410
|
+
readonly length: number;
|
|
411
|
+
get(slot: number): number;
|
|
412
|
+
set(slot: number, value: number): void;
|
|
413
|
+
}
|
|
414
|
+
interface Vec2View {
|
|
415
|
+
x: number;
|
|
416
|
+
y: number;
|
|
417
|
+
}
|
|
418
|
+
interface Vec3View extends Vec2View {
|
|
419
|
+
z: number;
|
|
420
|
+
}
|
|
421
|
+
interface Vec4View extends Vec3View {
|
|
422
|
+
w: number;
|
|
423
|
+
}
|
|
424
|
+
type FieldView<F> = F extends "f64" ? number : F extends "u64" ? bigint : F extends "vec2" ? Vec2View : F extends "vec3" ? Vec3View : F extends "vec4" ? Vec4View : F extends ArrayField ? SlotsView : number;
|
|
425
|
+
type EntityCursor<S extends TableSchema> = {
|
|
426
|
+
-readonly [K in keyof S]: FieldView<S[K]>;
|
|
427
|
+
} & {
|
|
428
|
+
readonly row: number;
|
|
429
|
+
};
|
|
430
|
+
interface Vec2Columns {
|
|
431
|
+
readonly x: Float32Array;
|
|
432
|
+
readonly y: Float32Array;
|
|
433
|
+
}
|
|
434
|
+
interface Vec3Columns extends Vec2Columns {
|
|
435
|
+
readonly z: Float32Array;
|
|
436
|
+
}
|
|
437
|
+
interface Vec4Columns extends Vec3Columns {
|
|
438
|
+
readonly w: Float32Array;
|
|
439
|
+
}
|
|
440
|
+
type ScalarColumn<F> = F extends "i32" ? Int32Array : F extends "u32" ? Uint32Array : F extends "u8" ? Uint8Array : Float32Array;
|
|
441
|
+
type FieldColumns<F> = F extends WideField ? readonly Uint32Array[] : F extends "vec2" ? Vec2Columns : F extends "vec3" ? Vec3Columns : F extends "vec4" ? Vec4Columns : F extends `${infer E}[${number}]` ? readonly ScalarColumn<E>[] : ScalarColumn<F>;
|
|
442
|
+
type TableColumns<S extends TableSchema> = {
|
|
443
|
+
readonly [K in keyof S]: FieldColumns<S[K]>;
|
|
444
|
+
};
|
|
445
|
+
type FieldName<S extends TableSchema> = Extract<keyof S, string>;
|
|
446
|
+
type ScalarName<S extends TableSchema> = {
|
|
447
|
+
[K in FieldName<S>]: S[K] extends ScalarField ? K : never;
|
|
448
|
+
}[FieldName<S>];
|
|
449
|
+
type Comparison = "<" | "<=" | ">" | ">=" | "==" | "!=" | "range" | "bits";
|
|
450
|
+
interface EntityTableOptions {
|
|
451
|
+
readonly capacity: number;
|
|
452
|
+
readonly selections?: number;
|
|
453
|
+
readonly cell?: number;
|
|
454
|
+
readonly gridTable?: number;
|
|
455
|
+
}
|
|
456
|
+
declare class Selection {
|
|
457
|
+
readonly index: number;
|
|
458
|
+
readonly rows: Uint32Array;
|
|
459
|
+
private readonly header;
|
|
460
|
+
constructor(index: number, rows: Uint32Array, header: Uint32Array);
|
|
461
|
+
get length(): number;
|
|
462
|
+
set length(value: number);
|
|
463
|
+
at(k: number): number;
|
|
464
|
+
}
|
|
465
|
+
declare class EntityTable<S extends TableSchema> {
|
|
466
|
+
readonly schema: S;
|
|
467
|
+
readonly capacity: number;
|
|
468
|
+
readonly header: Uint32Array;
|
|
469
|
+
readonly params: Float32Array;
|
|
470
|
+
readonly columns: readonly ColumnArray[];
|
|
471
|
+
readonly selections: readonly Selection[];
|
|
472
|
+
readonly id: number;
|
|
473
|
+
readonly native: boolean;
|
|
474
|
+
private readonly fields;
|
|
475
|
+
private readonly first;
|
|
476
|
+
private readonly result;
|
|
477
|
+
private readonly generations;
|
|
478
|
+
private readonly slot;
|
|
479
|
+
private readonly generation;
|
|
480
|
+
private readonly engine;
|
|
481
|
+
private readonly fallback;
|
|
482
|
+
private readonly state;
|
|
483
|
+
private readonly accumulator;
|
|
484
|
+
private readonly scalarSlots;
|
|
485
|
+
private readonly vectorCursors;
|
|
486
|
+
private readonly slotCursors;
|
|
487
|
+
private readonly wideCursors;
|
|
488
|
+
private readonly cursorObject;
|
|
489
|
+
readonly cols: TableColumns<S>;
|
|
490
|
+
private disposed;
|
|
491
|
+
constructor(engine: SoaEngine | null, schema: S, options: EntityTableOptions);
|
|
492
|
+
private buildColumns;
|
|
493
|
+
private detachColumns;
|
|
494
|
+
private buildCursor;
|
|
495
|
+
get valid(): boolean;
|
|
496
|
+
get version(): number;
|
|
497
|
+
get frame(): number;
|
|
498
|
+
get count(): number;
|
|
499
|
+
set count(value: number);
|
|
500
|
+
private check;
|
|
501
|
+
column(field: FieldName<S>, component?: number): number;
|
|
502
|
+
f32(field: FieldName<S>, component?: number): Float32Array;
|
|
503
|
+
values(field: FieldName<S>, component?: number): ColumnArray;
|
|
504
|
+
at(row: number): EntityCursor<S>;
|
|
505
|
+
get cursor(): EntityCursor<S>;
|
|
506
|
+
spawn(): number;
|
|
507
|
+
remove(row: number): number;
|
|
508
|
+
handTo(turn: "guest" | "engine"): number;
|
|
509
|
+
private status;
|
|
510
|
+
$indices(field: string): readonly number[];
|
|
511
|
+
$kind(column: number): number;
|
|
512
|
+
$ready(): void;
|
|
513
|
+
$status(code: number): number;
|
|
514
|
+
get $bulk(): SoaBulkExports | null;
|
|
515
|
+
get $fallback(): SoaFallback;
|
|
516
|
+
inventory(items: FieldName<S>, counts: FieldName<S>, stackLimit?: number): Inventory;
|
|
517
|
+
areaEffect(health: FieldName<S>, desc: AreaEffectDesc): AreaEffect;
|
|
518
|
+
rays(physics: BatchPhysics, desc: RayBatchDesc): RayBatch;
|
|
519
|
+
lineOfSight(physics: BatchPhysics, desc: RayBatchDesc): RayBatch;
|
|
520
|
+
paths(nav: BatchNav, desc: PathBatchDesc): PathBatch;
|
|
521
|
+
picks(graphics: BatchGraphics, desc: PickBatchDesc): PickBatch;
|
|
522
|
+
flowField(desc: FlowFieldDesc): FlowField;
|
|
523
|
+
flow(field: FlowField, desc: FlowSteerDesc): FlowSteer;
|
|
524
|
+
private list;
|
|
525
|
+
private mapColumns;
|
|
526
|
+
fill(field: FieldName<S>, value: number, selection?: Selection | null): number;
|
|
527
|
+
copy(dst: FieldName<S>, src: FieldName<S>, selection?: Selection | null): number;
|
|
528
|
+
add(dst: FieldName<S>, a: FieldName<S>, b: FieldName<S>, selection?: Selection | null): number;
|
|
529
|
+
sub(dst: FieldName<S>, a: FieldName<S>, b: FieldName<S>, selection?: Selection | null): number;
|
|
530
|
+
mul(dst: FieldName<S>, a: FieldName<S>, b: FieldName<S>, selection?: Selection | null): number;
|
|
531
|
+
min(dst: FieldName<S>, a: FieldName<S>, b: FieldName<S>, selection?: Selection | null): number;
|
|
532
|
+
max(dst: FieldName<S>, a: FieldName<S>, b: FieldName<S>, selection?: Selection | null): number;
|
|
533
|
+
scale(dst: FieldName<S>, a: FieldName<S>, factor: number, selection?: Selection | null): number;
|
|
534
|
+
offset(dst: FieldName<S>, a: FieldName<S>, amount: number, selection?: Selection | null): number;
|
|
535
|
+
axpy(dst: FieldName<S>, a: FieldName<S>, b: FieldName<S>, factor: number, selection?: Selection | null): number;
|
|
536
|
+
integrate(position: FieldName<S>, velocity: FieldName<S>, dt: number, selection?: Selection | null): number;
|
|
537
|
+
clamp(dst: FieldName<S>, a: FieldName<S>, low: number, high: number, selection?: Selection | null): number;
|
|
538
|
+
abs(dst: FieldName<S>, a: FieldName<S>, selection?: Selection | null): number;
|
|
539
|
+
neg(dst: FieldName<S>, a: FieldName<S>, selection?: Selection | null): number;
|
|
540
|
+
lerp(dst: FieldName<S>, a: FieldName<S>, b: FieldName<S>, t: number, selection?: Selection | null): number;
|
|
541
|
+
private vectorOp;
|
|
542
|
+
length(dst: FieldName<S>, vector: FieldName<S>, selection?: Selection | null): number;
|
|
543
|
+
distance(dst: FieldName<S>, vector: FieldName<S>, x: number, y: number, z: number, selection?: Selection | null): number;
|
|
544
|
+
distanceSquared(dst: FieldName<S>, vector: FieldName<S>, x: number, y: number, z: number, selection?: Selection | null): number;
|
|
545
|
+
select(out: Selection, field: ScalarName<S>, comparison: Comparison, value: number, high?: number, from?: Selection | null): number;
|
|
546
|
+
private reduceOp;
|
|
547
|
+
sum(field: ScalarName<S>, selection?: Selection | null): number;
|
|
548
|
+
mean(field: ScalarName<S>, selection?: Selection | null): number;
|
|
549
|
+
minimum(field: ScalarName<S>, selection?: Selection | null): number;
|
|
550
|
+
maximum(field: ScalarName<S>, selection?: Selection | null): number;
|
|
551
|
+
argmin(field: ScalarName<S>, selection?: Selection | null): number;
|
|
552
|
+
argmax(field: ScalarName<S>, selection?: Selection | null): number;
|
|
553
|
+
countNonZero(field: ScalarName<S>, selection?: Selection | null): number;
|
|
554
|
+
sort(out: Selection, key: ScalarName<S>, descending?: boolean, from?: Selection | null): number;
|
|
555
|
+
buildGrid(position: FieldName<S>, selection?: Selection | null): number;
|
|
556
|
+
private center;
|
|
557
|
+
near(out: Selection, x: number, y: number, z: number, radius: number): number;
|
|
558
|
+
nearest(out: Selection, x: number, y: number, z: number, radius: number, exclude?: number): number;
|
|
559
|
+
each(visit: (row: number, cols: TableColumns<S>) => void, selection?: Selection | null): void;
|
|
560
|
+
forEach(visit: (entity: EntityCursor<S>, row: number) => void, selection?: Selection | null): void;
|
|
561
|
+
map(field: ScalarName<S>, compute: (entity: EntityCursor<S>, out: Float64Array, row: number) => void, selection?: Selection | null): void;
|
|
562
|
+
reduce(step: (total: Float64Array, entity: EntityCursor<S>, row: number) => void, initial?: number, selection?: Selection | null): number;
|
|
563
|
+
private reduceRows;
|
|
564
|
+
dispose(): void;
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
declare const ENGINE_COMPUTE_EXPORT_NAMES: readonly ["engine_compute_frame", "engine_compute_priority", "engine_compute_registers", "engine_compute_clear"];
|
|
568
|
+
type KernelPriority = "simulation" | "presentation" | "optional";
|
|
569
|
+
type ComputeCode = "frame_over" | "kernel_heavy" | "kernel_deferred" | "kernel_stopped" | "gpu_deferred" | "gpu_stall";
|
|
570
|
+
type ComputeRoute = "interpreter" | "jit" | "prebuilt" | "native" | "gpu";
|
|
571
|
+
interface ComputeDiagnostic {
|
|
572
|
+
readonly code: ComputeCode;
|
|
573
|
+
readonly kernel: string | null;
|
|
574
|
+
readonly route: ComputeRoute;
|
|
575
|
+
readonly ms: number;
|
|
576
|
+
readonly rows: number;
|
|
577
|
+
readonly frame: number;
|
|
578
|
+
readonly message: string;
|
|
579
|
+
}
|
|
580
|
+
interface ComputeFrame {
|
|
581
|
+
readonly budgetMs: number;
|
|
582
|
+
readonly spentMs: number;
|
|
583
|
+
readonly deferred: number;
|
|
584
|
+
readonly stopped: number;
|
|
585
|
+
}
|
|
586
|
+
declare function computeLogLine(d: ComputeDiagnostic): string;
|
|
587
|
+
|
|
588
|
+
type EventFieldKind = "f32" | "i32" | "u32" | "bool";
|
|
589
|
+
type EventFields = Readonly<Record<string, EventFieldKind>>;
|
|
590
|
+
type EventPayload<F extends EventFields> = {
|
|
591
|
+
readonly [K in keyof F]: F[K] extends "bool" ? boolean : number;
|
|
592
|
+
};
|
|
593
|
+
type DrainedEvent<F extends EventFields> = EventPayload<F> & {
|
|
594
|
+
readonly row: number;
|
|
595
|
+
};
|
|
596
|
+
declare class EventChannel<F extends EventFields> {
|
|
597
|
+
readonly name: string;
|
|
598
|
+
readonly fields: F;
|
|
599
|
+
readonly capacity: number;
|
|
600
|
+
readonly names: readonly string[];
|
|
601
|
+
readonly kinds: readonly EventFieldKind[];
|
|
602
|
+
private readonly ring;
|
|
603
|
+
private readonly floats;
|
|
604
|
+
private readonly ints;
|
|
605
|
+
private count;
|
|
606
|
+
private lost;
|
|
607
|
+
private at;
|
|
608
|
+
private readonly event;
|
|
609
|
+
constructor(name: string, fields: F, capacity: number);
|
|
610
|
+
get pending(): number;
|
|
611
|
+
get dropped(): number;
|
|
612
|
+
emit(payload: EventPayload<F>): void;
|
|
613
|
+
accept(source: Uint32Array, entry: number): void;
|
|
614
|
+
addLost(count: number): void;
|
|
615
|
+
drain(visit: (event: DrainedEvent<F>) => void): number;
|
|
616
|
+
}
|
|
617
|
+
declare function events<const F extends EventFields>(name: string, fields: F, capacity?: number): EventChannel<F>;
|
|
618
|
+
|
|
619
|
+
type f32 = number;
|
|
620
|
+
type i32 = number;
|
|
621
|
+
type u32 = number;
|
|
622
|
+
interface FixedArray<T, N extends number> {
|
|
623
|
+
[index: number]: T;
|
|
624
|
+
readonly length: N;
|
|
625
|
+
}
|
|
626
|
+
interface Neighbours<E> {
|
|
627
|
+
[Symbol.iterator](): Iterator<E>;
|
|
628
|
+
}
|
|
629
|
+
interface QueryWhere {
|
|
630
|
+
readonly field: string;
|
|
631
|
+
readonly equals?: u32;
|
|
632
|
+
readonly any?: u32;
|
|
633
|
+
readonly none?: u32;
|
|
634
|
+
readonly mask?: u32;
|
|
635
|
+
}
|
|
636
|
+
interface QueryOptions {
|
|
637
|
+
readonly limit?: u32;
|
|
638
|
+
readonly cell?: f32;
|
|
639
|
+
readonly field?: string;
|
|
640
|
+
readonly where?: QueryWhere;
|
|
641
|
+
}
|
|
642
|
+
interface NearestFeatureOptions extends QueryOptions {
|
|
643
|
+
readonly velocity?: string;
|
|
644
|
+
}
|
|
645
|
+
interface KernelEntity<E> {
|
|
646
|
+
readonly row: i32;
|
|
647
|
+
readonly rank: u32;
|
|
648
|
+
nearestFeatures(k: u32, reach?: f32, options?: NearestFeatureOptions): FixedArray<f32, number>;
|
|
649
|
+
neighbours(radius: f32, field?: string): Neighbours<Each<E>>;
|
|
650
|
+
nearest(k: u32, reach?: f32, options?: QueryOptions): Neighbours<Each<E>>;
|
|
651
|
+
within(reach: f32, options?: QueryOptions): Neighbours<Each<E>>;
|
|
652
|
+
inCone(axis: vec2 | vec3, cosHalfAngle: f32, reach: f32, options?: QueryOptions): Neighbours<Each<E>>;
|
|
653
|
+
inBox(forward: vec2 | vec3, half: vec3, options?: QueryOptions): Neighbours<Each<E>>;
|
|
654
|
+
alongRay(dir: vec2 | vec3, length: f32, radius: f32, options?: QueryOptions): Neighbours<Each<E>>;
|
|
655
|
+
}
|
|
656
|
+
type Each<T> = T & KernelEntity<T>;
|
|
657
|
+
type AnyVec = vec2 | vec3 | vec4;
|
|
658
|
+
interface vec2 {
|
|
659
|
+
x: f32;
|
|
660
|
+
y: f32;
|
|
661
|
+
}
|
|
662
|
+
declare function vec2(x: f32, y: f32): vec2;
|
|
663
|
+
interface vec3 {
|
|
664
|
+
x: f32;
|
|
665
|
+
y: f32;
|
|
666
|
+
z: f32;
|
|
667
|
+
}
|
|
668
|
+
declare function vec3(x: f32, y: f32, z: f32): vec3;
|
|
669
|
+
interface vec4 {
|
|
670
|
+
x: f32;
|
|
671
|
+
y: f32;
|
|
672
|
+
z: f32;
|
|
673
|
+
w: f32;
|
|
674
|
+
}
|
|
675
|
+
declare function vec4(x: f32, y: f32, z: f32, w: f32): vec4;
|
|
676
|
+
interface quat {
|
|
677
|
+
x: f32;
|
|
678
|
+
y: f32;
|
|
679
|
+
z: f32;
|
|
680
|
+
w: f32;
|
|
681
|
+
}
|
|
682
|
+
declare function quat(x: f32, y: f32, z: f32, w: f32): quat;
|
|
683
|
+
declare function add(a: vec4, b: vec4): vec4;
|
|
684
|
+
declare function add(a: vec3, b: vec3): vec3;
|
|
685
|
+
declare function add(a: vec2, b: vec2): vec2;
|
|
686
|
+
declare function sub(a: vec4, b: vec4): vec4;
|
|
687
|
+
declare function sub(a: vec3, b: vec3): vec3;
|
|
688
|
+
declare function sub(a: vec2, b: vec2): vec2;
|
|
689
|
+
declare function mul(a: vec4, b: vec4): vec4;
|
|
690
|
+
declare function mul(a: vec3, b: vec3): vec3;
|
|
691
|
+
declare function mul(a: vec2, b: vec2): vec2;
|
|
692
|
+
declare function div(a: vec4, b: vec4): vec4;
|
|
693
|
+
declare function div(a: vec3, b: vec3): vec3;
|
|
694
|
+
declare function div(a: vec2, b: vec2): vec2;
|
|
695
|
+
declare function scale(a: vec4, s: f32): vec4;
|
|
696
|
+
declare function scale(a: vec3, s: f32): vec3;
|
|
697
|
+
declare function scale(a: vec2, s: f32): vec2;
|
|
698
|
+
declare function negate(a: vec4): vec4;
|
|
699
|
+
declare function negate(a: vec3): vec3;
|
|
700
|
+
declare function negate(a: vec2): vec2;
|
|
701
|
+
declare function dot(a: AnyVec, b: AnyVec): f32;
|
|
702
|
+
declare function lenSq(a: AnyVec): f32;
|
|
703
|
+
declare function len(a: AnyVec): f32;
|
|
704
|
+
declare function dist(a: vec4, b: vec4): f32;
|
|
705
|
+
declare function dist(a: vec3, b: vec3): f32;
|
|
706
|
+
declare function dist(a: vec2, b: vec2): f32;
|
|
707
|
+
declare function distSq(a: vec4, b: vec4): f32;
|
|
708
|
+
declare function distSq(a: vec3, b: vec3): f32;
|
|
709
|
+
declare function distSq(a: vec2, b: vec2): f32;
|
|
710
|
+
declare function normalize(a: vec4): vec4;
|
|
711
|
+
declare function normalize(a: vec3): vec3;
|
|
712
|
+
declare function normalize(a: vec2): vec2;
|
|
713
|
+
declare function cross(a: vec3, b: vec3): vec3;
|
|
714
|
+
declare function lerp(a: f32, b: f32, t: f32): f32;
|
|
715
|
+
declare function lerp(a: vec4, b: vec4, t: f32): vec4;
|
|
716
|
+
declare function lerp(a: vec3, b: vec3, t: f32): vec3;
|
|
717
|
+
declare function lerp(a: vec2, b: vec2, t: f32): vec2;
|
|
718
|
+
declare function clamp(x: f32, low: f32, high: f32): f32;
|
|
719
|
+
declare function clamp(x: vec4, low: f32, high: f32): vec4;
|
|
720
|
+
declare function clamp(x: vec3, low: f32, high: f32): vec3;
|
|
721
|
+
declare function clamp(x: vec2, low: f32, high: f32): vec2;
|
|
722
|
+
declare function smoothstep(edge0: f32, edge1: f32, x: f32): f32;
|
|
723
|
+
declare function qmul(a: quat, b: quat): quat;
|
|
724
|
+
declare function qconj(q: quat): quat;
|
|
725
|
+
declare function qaxis(axis: vec3, angle: f32): quat;
|
|
726
|
+
declare function qrotate(q: quat, v: vec3): vec3;
|
|
727
|
+
declare function hash32(a: u32, b: u32): u32;
|
|
728
|
+
declare function rand01(seed: u32, stream: u32): f32;
|
|
729
|
+
declare function noise2(x: f32, y: f32): f32;
|
|
730
|
+
declare function noise3(x: f32, y: f32, z: f32): f32;
|
|
731
|
+
declare const Status: {
|
|
732
|
+
readonly failure: 0;
|
|
733
|
+
readonly success: 1;
|
|
734
|
+
readonly running: 2;
|
|
735
|
+
};
|
|
736
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
737
|
+
interface RayHitInfo {
|
|
738
|
+
readonly dist: f32;
|
|
739
|
+
readonly normal: vec3;
|
|
740
|
+
readonly entity: u32;
|
|
741
|
+
readonly hit: boolean;
|
|
742
|
+
}
|
|
743
|
+
interface NavStep {
|
|
744
|
+
readonly dir: vec3;
|
|
745
|
+
readonly status: u32;
|
|
746
|
+
}
|
|
747
|
+
interface FlowStep {
|
|
748
|
+
readonly dir: vec3;
|
|
749
|
+
readonly distance: f32;
|
|
750
|
+
readonly status: u32;
|
|
751
|
+
}
|
|
752
|
+
declare function raycast(origin: vec3, dir: vec3, maxDist: f32): RayHitInfo;
|
|
753
|
+
declare function lineOfSight(from: vec3, to: vec3): boolean;
|
|
754
|
+
declare function groundHeight(x: f32, z: f32): f32;
|
|
755
|
+
declare function navNext(from: vec3, goal: vec3): NavStep;
|
|
756
|
+
declare function flow(position: vec3): FlowStep;
|
|
757
|
+
interface OverlapInfo {
|
|
758
|
+
readonly count: u32;
|
|
759
|
+
readonly entity: u32;
|
|
760
|
+
}
|
|
761
|
+
interface SweepHitInfo {
|
|
762
|
+
readonly dist: f32;
|
|
763
|
+
readonly normal: vec3;
|
|
764
|
+
readonly entity: u32;
|
|
765
|
+
readonly hit: boolean;
|
|
766
|
+
}
|
|
767
|
+
interface PickInfo {
|
|
768
|
+
readonly dist: f32;
|
|
769
|
+
readonly node: u32;
|
|
770
|
+
readonly instance: u32;
|
|
771
|
+
readonly hit: boolean;
|
|
772
|
+
}
|
|
773
|
+
interface VoxelInfo {
|
|
774
|
+
readonly material: u32;
|
|
775
|
+
readonly solid: boolean;
|
|
776
|
+
}
|
|
777
|
+
interface CellInfo {
|
|
778
|
+
readonly species: u32;
|
|
779
|
+
readonly kelvin: f32;
|
|
780
|
+
readonly amount: u32;
|
|
781
|
+
}
|
|
782
|
+
declare function applyForce(body: u32, force: vec3): void;
|
|
783
|
+
declare function applyImpulse(body: u32, impulse: vec3): void;
|
|
784
|
+
declare function setVelocity(body: u32, velocity: vec3): void;
|
|
785
|
+
declare function overlap(center: vec3, radius: f32): OverlapInfo;
|
|
786
|
+
declare function sweep(origin: vec3, dir: vec3, radius: f32, maxDist: f32, exclude?: u32): SweepHitInfo;
|
|
787
|
+
declare function setClipWeight(action: u32, weight: f32): void;
|
|
788
|
+
declare function playClip(root: u32, clip: u32, loop?: boolean, fadeSeconds?: f32, speed?: f32): u32;
|
|
789
|
+
declare function setIkTarget(chain: u32, target: vec3, weight?: f32): void;
|
|
790
|
+
declare function setInstance(node: u32, index: u32, position: vec3, rotation?: quat, size?: f32 | vec3): void;
|
|
791
|
+
declare function setInstanceColour(node: u32, index: u32, colour: vec4): void;
|
|
792
|
+
declare function setAnchor(node: u32, position: vec3): void;
|
|
793
|
+
declare function playSound(sound: u32, bus: u32, position: vec3, gain?: f32): void;
|
|
794
|
+
declare function pick(origin: vec3, dir: vec3, maxDist: f32): PickInfo;
|
|
795
|
+
declare function voxelAt(position: vec3): VoxelInfo;
|
|
796
|
+
declare function setVoxel(position: vec3, material: u32): void;
|
|
797
|
+
declare function chemistryAt(x: u32, y: u32, z: u32): CellInfo;
|
|
798
|
+
declare function spawn<T extends object>(values: T): void;
|
|
799
|
+
declare function despawn(): void;
|
|
800
|
+
|
|
801
|
+
interface KernelWorldPort {
|
|
802
|
+
call(service: number, args: Float64Array, out: Float64Array): boolean;
|
|
803
|
+
begin?(service: number): void;
|
|
804
|
+
end?(service: number): void;
|
|
805
|
+
}
|
|
806
|
+
interface KernelOverlap {
|
|
807
|
+
count: number;
|
|
808
|
+
entity: number;
|
|
809
|
+
}
|
|
810
|
+
interface KernelServicePhysics {
|
|
811
|
+
raycast(ray: RayQuery, hit: RayHit): boolean;
|
|
812
|
+
entityOfCollider(collider: number): number;
|
|
813
|
+
batchHandle?(): number;
|
|
814
|
+
writeBody?(op: number, body: number, x: number, y: number, z: number): void;
|
|
815
|
+
castShape?(query: ShapeCastQuery, hit: RayHit): boolean;
|
|
816
|
+
overlap?(x: number, y: number, z: number, radius: number, out: KernelOverlap): boolean;
|
|
817
|
+
}
|
|
818
|
+
interface KernelServiceGraphics {
|
|
819
|
+
batchHandle?(): number;
|
|
820
|
+
setClipWeight?(action: number, weight: number): void;
|
|
821
|
+
playClipIndex?(root: number, clip: number, loop: boolean, fadeSeconds: number, speed: number): number;
|
|
822
|
+
setIkTarget?(chain: number, x: number, y: number, z: number, weight: number): void;
|
|
823
|
+
instanceBuffer?(node: number, colours: boolean): Float32Array | null;
|
|
824
|
+
markInstances?(node: number): void;
|
|
825
|
+
raycast?(origin: ArrayLike<number>, direction: ArrayLike<number>, out: PickHit, far?: number, layers?: number): boolean;
|
|
826
|
+
}
|
|
827
|
+
interface KernelServiceUi {
|
|
828
|
+
setAnchor(node: number, x: number, y: number, z: number): void;
|
|
829
|
+
batchHandle?(): number;
|
|
830
|
+
}
|
|
831
|
+
interface KernelServiceAudio {
|
|
832
|
+
play(sound: number, bus: number, gain: number, rate: number, loop: boolean, spatial: boolean): number;
|
|
833
|
+
setVoicePosition(voice: number, matrix: Float32Array, offset: number): void;
|
|
834
|
+
batchHandle?(): number;
|
|
835
|
+
}
|
|
836
|
+
interface KernelVoxel {
|
|
837
|
+
material: number;
|
|
838
|
+
solid: boolean;
|
|
839
|
+
}
|
|
840
|
+
interface KernelServiceVoxels {
|
|
841
|
+
voxelAt(x: number, y: number, z: number, out: KernelVoxel): void;
|
|
842
|
+
setVoxel(x: number, y: number, z: number, material: number): void;
|
|
843
|
+
batchHandle?(): number;
|
|
844
|
+
}
|
|
845
|
+
interface KernelCell {
|
|
846
|
+
species: number;
|
|
847
|
+
kelvin: number;
|
|
848
|
+
amount: number;
|
|
849
|
+
}
|
|
850
|
+
interface KernelServiceChemistry {
|
|
851
|
+
cell(x: number, y: number, z: number, out: KernelCell): void;
|
|
852
|
+
batchHandle?(): number;
|
|
853
|
+
}
|
|
854
|
+
interface KernelServiceNav {
|
|
855
|
+
findPath(from: {
|
|
856
|
+
x: number;
|
|
857
|
+
y: number;
|
|
858
|
+
z: number;
|
|
859
|
+
}, to: {
|
|
860
|
+
x: number;
|
|
861
|
+
y: number;
|
|
862
|
+
z: number;
|
|
863
|
+
}, out: NavPath): boolean;
|
|
864
|
+
batchHandle?(): number;
|
|
865
|
+
}
|
|
866
|
+
interface KernelServiceFlow {
|
|
867
|
+
sample?(x: number, z: number, smooth: boolean, out: FlowSample): boolean;
|
|
868
|
+
batchHandle?(): number;
|
|
869
|
+
}
|
|
870
|
+
interface KernelServiceSources {
|
|
871
|
+
readonly physics?: KernelServicePhysics;
|
|
872
|
+
readonly nav?: KernelServiceNav;
|
|
873
|
+
readonly flow?: KernelServiceFlow;
|
|
874
|
+
readonly terrain?: {
|
|
875
|
+
heightAt(x: number, z: number): number;
|
|
876
|
+
};
|
|
877
|
+
readonly graphics?: KernelServiceGraphics;
|
|
878
|
+
readonly ui?: KernelServiceUi;
|
|
879
|
+
readonly audio?: KernelServiceAudio;
|
|
880
|
+
readonly voxels?: KernelServiceVoxels;
|
|
881
|
+
readonly chemistry?: KernelServiceChemistry;
|
|
882
|
+
}
|
|
883
|
+
interface KernelHandles {
|
|
884
|
+
physics: number;
|
|
885
|
+
nav: number;
|
|
886
|
+
flow: number;
|
|
887
|
+
render: number;
|
|
888
|
+
ui: number;
|
|
889
|
+
audio: number;
|
|
890
|
+
voxels: number;
|
|
891
|
+
chemistry: number;
|
|
892
|
+
}
|
|
893
|
+
declare class KernelWorld implements KernelWorldPort {
|
|
894
|
+
readonly sources: KernelServiceSources;
|
|
895
|
+
private readonly query;
|
|
896
|
+
private readonly hit;
|
|
897
|
+
private readonly path;
|
|
898
|
+
private readonly from;
|
|
899
|
+
private readonly to;
|
|
900
|
+
private readonly flowSample;
|
|
901
|
+
constructor(sources: KernelServiceSources);
|
|
902
|
+
private readonly ids;
|
|
903
|
+
private readonly cast;
|
|
904
|
+
private readonly overlapOut;
|
|
905
|
+
private readonly voxel;
|
|
906
|
+
private readonly cellOut;
|
|
907
|
+
private readonly pickHit;
|
|
908
|
+
private readonly pickFrom;
|
|
909
|
+
private readonly pickDir;
|
|
910
|
+
private readonly matrix;
|
|
911
|
+
private marked;
|
|
912
|
+
handles(): KernelHandles;
|
|
913
|
+
begin(service: number): void;
|
|
914
|
+
end(service: number): void;
|
|
915
|
+
call(service: number, args: Float64Array, out: Float64Array): boolean;
|
|
916
|
+
private sweep;
|
|
917
|
+
private pick;
|
|
918
|
+
private instance;
|
|
919
|
+
private ray;
|
|
920
|
+
private route;
|
|
921
|
+
}
|
|
922
|
+
declare function setKernelWorld(world: KernelWorldPort | null): KernelWorldPort | null;
|
|
923
|
+
|
|
924
|
+
declare const spawnOverflow: EventChannel<{
|
|
925
|
+
readonly dropped: "u32";
|
|
926
|
+
readonly capacity: "u32";
|
|
927
|
+
readonly table: "u32";
|
|
928
|
+
}>;
|
|
929
|
+
interface KernelSpawnReport {
|
|
930
|
+
spawned: number;
|
|
931
|
+
dropped: number;
|
|
932
|
+
killed: number;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
type Ref<T = unknown> = T extends never ? never : u32;
|
|
936
|
+
declare const NO_REF = 4294967295;
|
|
937
|
+
type Joined<T> = {
|
|
938
|
+
-readonly [K in keyof T]: T[K];
|
|
939
|
+
} & {
|
|
940
|
+
readonly exists: boolean;
|
|
941
|
+
};
|
|
942
|
+
interface Rows<T> {
|
|
943
|
+
get(ref: u32): Joined<T>;
|
|
944
|
+
at(index: number): Joined<T>;
|
|
945
|
+
lookup(key: u32): Joined<T>;
|
|
946
|
+
readonly count: number;
|
|
947
|
+
}
|
|
948
|
+
interface List<T, K extends number = number> extends Iterable<T> {
|
|
949
|
+
readonly length: number;
|
|
950
|
+
readonly capacity?: K;
|
|
951
|
+
[index: number]: T;
|
|
952
|
+
push(value: T): boolean;
|
|
953
|
+
pop(): T;
|
|
954
|
+
get(index: number): T;
|
|
955
|
+
set(index: number, value: T): void;
|
|
956
|
+
indexOf(value: T): number;
|
|
957
|
+
includes(value: T): boolean;
|
|
958
|
+
removeAt(index: number): void;
|
|
959
|
+
swapRemove(index: number): void;
|
|
960
|
+
clear(): void;
|
|
961
|
+
}
|
|
962
|
+
declare function symbol(name: string): u32;
|
|
963
|
+
declare function pickRows(n: number, when: boolean, seed: u32, tick: u32, weight?: number): void;
|
|
964
|
+
declare function list(kind: "f32" | "i32" | "u32", capacity: number): {
|
|
965
|
+
readonly at: "u32";
|
|
966
|
+
readonly len: "u32";
|
|
967
|
+
};
|
|
968
|
+
type PoolArray = Float32Array | Int32Array | Uint32Array;
|
|
969
|
+
declare function listPool(table: EntityTable<TableSchema>, field: string, capacity: number, kind?: "f32" | "i32" | "u32" | "bool", component?: number): PoolArray;
|
|
970
|
+
declare function readList(table: EntityTable<TableSchema>, field: string, capacity: number, row: number, kind?: "f32" | "i32" | "u32"): number[];
|
|
971
|
+
interface KernelDataReport {
|
|
972
|
+
readonly picks: readonly Uint32Array[];
|
|
973
|
+
readonly tallies: Readonly<Record<string, number>>;
|
|
974
|
+
readonly commands: {
|
|
975
|
+
readonly sent: number;
|
|
976
|
+
readonly applied: number;
|
|
977
|
+
readonly dropped: number;
|
|
978
|
+
readonly overflow: number;
|
|
979
|
+
};
|
|
980
|
+
readonly unplaced: number;
|
|
981
|
+
}
|
|
982
|
+
declare class Queue<F extends EventFields> extends EventChannel<F> {
|
|
983
|
+
readonly table: EntityTable<TableSchema>;
|
|
984
|
+
private overflow;
|
|
985
|
+
constructor(name: string, fields: F, table: EntityTable<TableSchema>);
|
|
986
|
+
accept(source: Uint32Array, entry: number): void;
|
|
987
|
+
emit(payload: EventPayload<F>): void;
|
|
988
|
+
push(payload: EventPayload<F>): void;
|
|
989
|
+
get dropped(): number;
|
|
990
|
+
clear(): void;
|
|
991
|
+
}
|
|
992
|
+
declare function queue<const F extends EventFields>(name: string, fields: F, table: EntityTable<TableSchema>): Queue<F>;
|
|
993
|
+
|
|
994
|
+
declare const entityBrand: unique symbol;
|
|
995
|
+
type Entity = number & {
|
|
996
|
+
readonly [entityBrand]: true;
|
|
997
|
+
};
|
|
998
|
+
declare const NO_ENTITY: Entity;
|
|
999
|
+
declare function entityIndex(entity: Entity): number;
|
|
1000
|
+
declare function entityGeneration(entity: Entity): number;
|
|
1001
|
+
declare class EntityRegistry implements RollbackState {
|
|
1002
|
+
readonly capacity: number;
|
|
1003
|
+
private readonly generations;
|
|
1004
|
+
private readonly live;
|
|
1005
|
+
private readonly freeList;
|
|
1006
|
+
private readonly counters;
|
|
1007
|
+
private readonly views;
|
|
1008
|
+
constructor(capacity: number);
|
|
1009
|
+
get count(): number;
|
|
1010
|
+
rollbackViews(): readonly ArrayBufferView[];
|
|
1011
|
+
create(): Entity;
|
|
1012
|
+
destroy(entity: Entity): boolean;
|
|
1013
|
+
isAlive(entity: Entity): boolean;
|
|
1014
|
+
assertAlive(entity: Entity): void;
|
|
1015
|
+
}
|
|
1016
|
+
|
|
1017
|
+
type FieldSpec$1 = Scalar | readonly [Scalar, number];
|
|
1018
|
+
type ComponentSchema = Readonly<Record<string, FieldSpec$1>>;
|
|
1019
|
+
type FieldArray<F> = F extends readonly [infer S extends Scalar, number] ? ArrayFor<S> : F extends Scalar ? ArrayFor<F> : never;
|
|
1020
|
+
type ComponentFields<S extends ComponentSchema> = {
|
|
1021
|
+
readonly [K in keyof S]: FieldArray<S[K]>;
|
|
1022
|
+
};
|
|
1023
|
+
interface ComponentType<S extends ComponentSchema = ComponentSchema> {
|
|
1024
|
+
readonly id: number;
|
|
1025
|
+
readonly name: string;
|
|
1026
|
+
readonly schema: S;
|
|
1027
|
+
}
|
|
1028
|
+
declare function defineComponent<const S extends ComponentSchema>(name: string, schema: S): ComponentType<S>;
|
|
1029
|
+
declare class ComponentStore<S extends ComponentSchema = ComponentSchema> {
|
|
1030
|
+
readonly type: ComponentType<S>;
|
|
1031
|
+
readonly capacity: number;
|
|
1032
|
+
readonly entities: Uint32Array;
|
|
1033
|
+
readonly sparse: Int32Array;
|
|
1034
|
+
readonly fields: ComponentFields<S>;
|
|
1035
|
+
private readonly arrays;
|
|
1036
|
+
private readonly arities;
|
|
1037
|
+
private readonly counters;
|
|
1038
|
+
private readonly views;
|
|
1039
|
+
constructor(type: ComponentType<S>, capacity: number, entityCapacity: number, memory?: ComponentMemory);
|
|
1040
|
+
get count(): number;
|
|
1041
|
+
get version(): number;
|
|
1042
|
+
rollbackViews(): readonly ArrayBufferView[];
|
|
1043
|
+
row(entity: Entity): number;
|
|
1044
|
+
has(entity: Entity): boolean;
|
|
1045
|
+
require(entity: Entity): number;
|
|
1046
|
+
add(entity: Entity): number;
|
|
1047
|
+
remove(entity: Entity): boolean;
|
|
1048
|
+
entityAt(row: number): Entity;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
declare const Transform: ComponentType<{
|
|
1052
|
+
readonly position: readonly ["f32", 3];
|
|
1053
|
+
readonly rotation: readonly ["f32", 4];
|
|
1054
|
+
readonly scale: readonly ["f32", 3];
|
|
1055
|
+
readonly previousPosition: readonly ["f32", 3];
|
|
1056
|
+
readonly previousRotation: readonly ["f32", 4];
|
|
1057
|
+
readonly previousScale: readonly ["f32", 3];
|
|
1058
|
+
readonly parent: "u32";
|
|
1059
|
+
readonly render: readonly ["f32", 16];
|
|
1060
|
+
}>;
|
|
1061
|
+
type TransformSchema = (typeof Transform)["schema"];
|
|
1062
|
+
declare class Transforms implements DespawnListener {
|
|
1063
|
+
readonly store: ComponentStore<TransformSchema>;
|
|
1064
|
+
readonly columns: TransformColumns;
|
|
1065
|
+
private readonly world;
|
|
1066
|
+
private readonly port;
|
|
1067
|
+
private hierarchyVersion;
|
|
1068
|
+
constructor(world: World, port: TransformPort);
|
|
1069
|
+
add(entity: Entity, x?: number, y?: number, z?: number): number;
|
|
1070
|
+
onDespawn(entity: Entity): void;
|
|
1071
|
+
row(entity: Entity): number;
|
|
1072
|
+
setPosition(entity: Entity, x: number, y: number, z: number): void;
|
|
1073
|
+
setRotation(entity: Entity, x: number, y: number, z: number, w: number): void;
|
|
1074
|
+
setRotationQuat(entity: Entity, q: Quat): void;
|
|
1075
|
+
setScale(entity: Entity, x: number, y: number, z: number): void;
|
|
1076
|
+
translate(entity: Entity, delta: Vec3Like): void;
|
|
1077
|
+
position(entity: Entity, out: Vec3): Vec3;
|
|
1078
|
+
rotation(entity: Entity, out: Quat): Quat;
|
|
1079
|
+
renderPosition(entity: Entity, out: Vec3): Vec3;
|
|
1080
|
+
setParent(child: Entity, parent: Entity): void;
|
|
1081
|
+
parentOf(entity: Entity): Entity;
|
|
1082
|
+
teleport(entity: Entity): void;
|
|
1083
|
+
snapshot(): void;
|
|
1084
|
+
computeRender(time: FrameTime): void;
|
|
1085
|
+
private teleportRow;
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
type Vec3Tuple = readonly [number, number, number];
|
|
1089
|
+
declare const CRAFT_CHANNELS = 16;
|
|
1090
|
+
declare const CRAFT_TELEMETRY_WORDS = 16;
|
|
1091
|
+
declare const NO_CHANNEL = 255;
|
|
1092
|
+
declare const MAX_FOILS = 16;
|
|
1093
|
+
declare const MAX_THRUSTERS = 8;
|
|
1094
|
+
declare const MAX_ROTORS = 8;
|
|
1095
|
+
declare const MAX_CRAFT_WHEELS = 8;
|
|
1096
|
+
declare const MAX_HULL_POINTS = 512;
|
|
1097
|
+
declare const MAX_HULL_RESOLUTION = 16;
|
|
1098
|
+
declare const MAX_AERO_TABLE = 64;
|
|
1099
|
+
declare const TELEMETRY_SPEED = 0;
|
|
1100
|
+
declare const TELEMETRY_SUBMERGED = 1;
|
|
1101
|
+
declare const TELEMETRY_PLANING = 2;
|
|
1102
|
+
declare const TELEMETRY_BANK = 3;
|
|
1103
|
+
declare const TELEMETRY_AIRSPEED = 4;
|
|
1104
|
+
declare const TELEMETRY_ALPHA = 5;
|
|
1105
|
+
declare const TELEMETRY_STALLED = 6;
|
|
1106
|
+
declare const TELEMETRY_GROUND_EFFECT = 7;
|
|
1107
|
+
declare const TELEMETRY_CONTACTS = 8;
|
|
1108
|
+
declare const TELEMETRY_GEAR = 9;
|
|
1109
|
+
declare const TELEMETRY_SPOOL = 10;
|
|
1110
|
+
declare const TELEMETRY_ROTOR = 11;
|
|
1111
|
+
declare const TELEMETRY_THRUST = 12;
|
|
1112
|
+
declare const TELEMETRY_CLIMB = 13;
|
|
1113
|
+
declare const TELEMETRY_APPARENT_WIND = 14;
|
|
1114
|
+
declare const TELEMETRY_PITCH = 15;
|
|
1115
|
+
declare const BOAT_THROTTLE = 0;
|
|
1116
|
+
declare const BOAT_STEER = 1;
|
|
1117
|
+
declare const BOAT_SHEET = 2;
|
|
1118
|
+
declare const FLIGHT_PITCH = 0;
|
|
1119
|
+
declare const FLIGHT_ROLL = 1;
|
|
1120
|
+
declare const FLIGHT_YAW = 2;
|
|
1121
|
+
declare const FLIGHT_THROTTLE = 3;
|
|
1122
|
+
declare const FLIGHT_FLAPS = 4;
|
|
1123
|
+
declare const FLIGHT_BRAKE = 5;
|
|
1124
|
+
declare const FLIGHT_GEAR = 6;
|
|
1125
|
+
declare const FLIGHT_TILT = 7;
|
|
1126
|
+
declare const ROTOR_COLLECTIVE = 0;
|
|
1127
|
+
declare const ROTOR_CYCLIC_PITCH = 1;
|
|
1128
|
+
declare const ROTOR_CYCLIC_ROLL = 2;
|
|
1129
|
+
declare const ROTOR_PEDAL = 3;
|
|
1130
|
+
declare const ROTOR_ENGINE = 4;
|
|
1131
|
+
type CraftPresetName = "canoe" | "speedboat" | "ferry" | "cargo_ship" | "sailboat" | "light_plane" | "jet" | "glider" | "helicopter" | "quadcopter" | "tiltrotor" | "blimp";
|
|
1132
|
+
declare const CRAFT_PRESETS: readonly CraftPresetName[];
|
|
1133
|
+
type BoatPresetName = "canoe" | "speedboat" | "ferry" | "cargo_ship" | "sailboat";
|
|
1134
|
+
type AircraftPresetName = "light_plane" | "jet" | "glider" | "tiltrotor";
|
|
1135
|
+
type HelicopterPresetName = "helicopter" | "quadcopter" | "blimp";
|
|
1136
|
+
type FlightMode = "arcade" | "sim";
|
|
1137
|
+
type Medium = "any" | "water" | "air";
|
|
1138
|
+
interface MixDesc {
|
|
1139
|
+
readonly bias?: number;
|
|
1140
|
+
readonly gains?: readonly number[];
|
|
1141
|
+
}
|
|
1142
|
+
type HullSource = {
|
|
1143
|
+
readonly kind: "box";
|
|
1144
|
+
readonly halfExtents: Vec3Tuple;
|
|
1145
|
+
readonly resolution: Vec3Tuple;
|
|
1146
|
+
} | {
|
|
1147
|
+
readonly kind: "boat";
|
|
1148
|
+
readonly length: number;
|
|
1149
|
+
readonly beam: number;
|
|
1150
|
+
readonly depth: number;
|
|
1151
|
+
readonly bow: number;
|
|
1152
|
+
readonly resolution: Vec3Tuple;
|
|
1153
|
+
} | {
|
|
1154
|
+
readonly kind: "ball";
|
|
1155
|
+
readonly radius: number;
|
|
1156
|
+
readonly resolution: Vec3Tuple;
|
|
1157
|
+
} | {
|
|
1158
|
+
readonly kind: "mesh";
|
|
1159
|
+
readonly vertices: Float32Array;
|
|
1160
|
+
readonly indices: Uint32Array;
|
|
1161
|
+
readonly resolution: Vec3Tuple;
|
|
1162
|
+
} | {
|
|
1163
|
+
readonly kind: "points";
|
|
1164
|
+
readonly samples: Float32Array;
|
|
1165
|
+
};
|
|
1166
|
+
type AeroCurveDesc = {
|
|
1167
|
+
readonly kind: "wing";
|
|
1168
|
+
readonly aspect: number;
|
|
1169
|
+
readonly zeroLift?: number;
|
|
1170
|
+
readonly stall: number;
|
|
1171
|
+
readonly cd0: number;
|
|
1172
|
+
} | {
|
|
1173
|
+
readonly kind: "analytic";
|
|
1174
|
+
readonly slope: number;
|
|
1175
|
+
readonly zeroLift?: number;
|
|
1176
|
+
readonly stall: number;
|
|
1177
|
+
readonly cd0: number;
|
|
1178
|
+
readonly induced: number;
|
|
1179
|
+
} | {
|
|
1180
|
+
readonly kind: "table";
|
|
1181
|
+
readonly lift: CurveTable;
|
|
1182
|
+
readonly drag: CurveTable;
|
|
1183
|
+
};
|
|
1184
|
+
interface HingeDesc {
|
|
1185
|
+
readonly axis: Vec3Tuple;
|
|
1186
|
+
readonly angle: MixDesc;
|
|
1187
|
+
readonly maxAngle: number;
|
|
1188
|
+
readonly rate?: number;
|
|
1189
|
+
}
|
|
1190
|
+
interface FoilDesc {
|
|
1191
|
+
readonly position: Vec3Tuple;
|
|
1192
|
+
readonly chord?: Vec3Tuple;
|
|
1193
|
+
readonly normal?: Vec3Tuple;
|
|
1194
|
+
readonly area: number;
|
|
1195
|
+
readonly curve: AeroCurveDesc;
|
|
1196
|
+
readonly deflection?: MixDesc;
|
|
1197
|
+
readonly maxDeflection?: number;
|
|
1198
|
+
readonly effectiveness?: number;
|
|
1199
|
+
readonly rate?: number;
|
|
1200
|
+
readonly deflectionDrag?: number;
|
|
1201
|
+
readonly groundEffect?: boolean;
|
|
1202
|
+
readonly leeward?: boolean;
|
|
1203
|
+
}
|
|
1204
|
+
interface ThrusterDesc {
|
|
1205
|
+
readonly position: Vec3Tuple;
|
|
1206
|
+
readonly axis?: Vec3Tuple;
|
|
1207
|
+
readonly maxThrust: number;
|
|
1208
|
+
readonly throttle: MixDesc;
|
|
1209
|
+
readonly reverse?: number;
|
|
1210
|
+
readonly spoolRate?: number;
|
|
1211
|
+
readonly medium?: Medium;
|
|
1212
|
+
readonly maxSpeed?: number;
|
|
1213
|
+
readonly torque?: number;
|
|
1214
|
+
readonly vector?: HingeDesc;
|
|
1215
|
+
}
|
|
1216
|
+
interface RotorDesc {
|
|
1217
|
+
readonly position: Vec3Tuple;
|
|
1218
|
+
readonly axis?: Vec3Tuple;
|
|
1219
|
+
readonly radius: number;
|
|
1220
|
+
readonly maxThrust: number;
|
|
1221
|
+
readonly collective: MixDesc;
|
|
1222
|
+
readonly cyclicPitch?: MixDesc;
|
|
1223
|
+
readonly cyclicRoll?: MixDesc;
|
|
1224
|
+
readonly cyclicTilt?: number;
|
|
1225
|
+
readonly hubStiffness?: number;
|
|
1226
|
+
readonly torqueReaction?: number;
|
|
1227
|
+
readonly power?: MixDesc;
|
|
1228
|
+
readonly governorRate?: number;
|
|
1229
|
+
readonly rotorDrag?: number;
|
|
1230
|
+
readonly autorotation?: number;
|
|
1231
|
+
readonly inflow?: number;
|
|
1232
|
+
readonly groundEffect?: number;
|
|
1233
|
+
readonly tilt?: HingeDesc;
|
|
1234
|
+
}
|
|
1235
|
+
interface SpringDesc {
|
|
1236
|
+
readonly stiffness: number;
|
|
1237
|
+
readonly dampingCompression: number;
|
|
1238
|
+
readonly dampingRelaxation: number;
|
|
1239
|
+
readonly maxForce: number;
|
|
1240
|
+
}
|
|
1241
|
+
interface CraftWheelDesc {
|
|
1242
|
+
readonly position: Vec3Tuple;
|
|
1243
|
+
readonly restLength: number;
|
|
1244
|
+
readonly radius: number;
|
|
1245
|
+
readonly spring: SpringDesc;
|
|
1246
|
+
readonly steer?: number;
|
|
1247
|
+
readonly brake?: number;
|
|
1248
|
+
readonly grip?: number;
|
|
1249
|
+
readonly rolling?: number;
|
|
1250
|
+
}
|
|
1251
|
+
interface AssistDesc {
|
|
1252
|
+
readonly level: number;
|
|
1253
|
+
readonly rateDamping?: Vec3Tuple;
|
|
1254
|
+
readonly autoLevel?: number;
|
|
1255
|
+
readonly stallGuard?: number;
|
|
1256
|
+
readonly coordination?: number;
|
|
1257
|
+
readonly hoverHold?: number;
|
|
1258
|
+
readonly pitch?: number;
|
|
1259
|
+
readonly roll?: number;
|
|
1260
|
+
readonly yaw?: number;
|
|
1261
|
+
readonly lift?: number;
|
|
1262
|
+
}
|
|
1263
|
+
interface CraftDesc {
|
|
1264
|
+
readonly hull?: HullSource;
|
|
1265
|
+
readonly hydro?: {
|
|
1266
|
+
readonly drag?: Vec3Tuple;
|
|
1267
|
+
readonly linearDrag?: Vec3Tuple;
|
|
1268
|
+
readonly angularDrag?: number;
|
|
1269
|
+
readonly righting?: number;
|
|
1270
|
+
};
|
|
1271
|
+
readonly planing?: {
|
|
1272
|
+
readonly speed: number;
|
|
1273
|
+
readonly lift: number;
|
|
1274
|
+
readonly dragFactor: number;
|
|
1275
|
+
readonly position: Vec3Tuple;
|
|
1276
|
+
};
|
|
1277
|
+
readonly airDrag?: Vec3Tuple;
|
|
1278
|
+
readonly gas?: {
|
|
1279
|
+
readonly volume: number;
|
|
1280
|
+
readonly netDensity: number;
|
|
1281
|
+
readonly center?: Vec3Tuple;
|
|
1282
|
+
};
|
|
1283
|
+
readonly foils?: readonly FoilDesc[];
|
|
1284
|
+
readonly thrusters?: readonly ThrusterDesc[];
|
|
1285
|
+
readonly rotors?: readonly RotorDesc[];
|
|
1286
|
+
readonly wheels?: readonly CraftWheelDesc[];
|
|
1287
|
+
readonly gear?: {
|
|
1288
|
+
readonly steer?: MixDesc;
|
|
1289
|
+
readonly brake?: MixDesc;
|
|
1290
|
+
readonly deploy?: MixDesc;
|
|
1291
|
+
readonly retractRate?: number;
|
|
1292
|
+
};
|
|
1293
|
+
readonly assist?: AssistDesc;
|
|
1294
|
+
readonly stall?: number;
|
|
1295
|
+
readonly span?: number;
|
|
1296
|
+
readonly groundEffect?: number;
|
|
1297
|
+
readonly probeOffset?: number;
|
|
1298
|
+
}
|
|
1299
|
+
interface CraftBodyShape {
|
|
1300
|
+
readonly halfExtents: Vec3Tuple;
|
|
1301
|
+
readonly mass: number;
|
|
1302
|
+
readonly wing?: Vec3Tuple;
|
|
1303
|
+
readonly wingMass?: number;
|
|
1304
|
+
}
|
|
1305
|
+
interface CraftTuning {
|
|
1306
|
+
readonly thrust?: number;
|
|
1307
|
+
readonly drag?: number;
|
|
1308
|
+
readonly response?: number;
|
|
1309
|
+
readonly lift?: number;
|
|
1310
|
+
}
|
|
1311
|
+
interface CraftOptions {
|
|
1312
|
+
readonly collider?: number;
|
|
1313
|
+
readonly body?: CraftBodyShape;
|
|
1314
|
+
readonly running?: boolean;
|
|
1315
|
+
}
|
|
1316
|
+
interface PresetOptions extends CraftTuning, CraftOptions {
|
|
1317
|
+
readonly mode?: FlightMode;
|
|
1318
|
+
}
|
|
1319
|
+
interface BoatOptions extends PresetOptions {
|
|
1320
|
+
readonly preset: BoatPresetName;
|
|
1321
|
+
}
|
|
1322
|
+
interface AircraftOptions extends PresetOptions {
|
|
1323
|
+
readonly preset: AircraftPresetName;
|
|
1324
|
+
}
|
|
1325
|
+
interface HelicopterOptions extends PresetOptions {
|
|
1326
|
+
readonly preset?: HelicopterPresetName;
|
|
1327
|
+
}
|
|
1328
|
+
declare function mix(channel: number, gain: number, bias?: number): MixDesc;
|
|
1329
|
+
declare function mixWith(base: MixDesc, channel: number, gain: number): MixDesc;
|
|
1330
|
+
declare function constant(bias: number): MixDesc;
|
|
1331
|
+
|
|
1332
|
+
interface SoftPlastic {
|
|
1333
|
+
readonly yieldStrain: number;
|
|
1334
|
+
readonly creep?: number;
|
|
1335
|
+
readonly limit?: number;
|
|
1336
|
+
}
|
|
1337
|
+
interface SoftBodyOptions {
|
|
1338
|
+
readonly stretch?: number;
|
|
1339
|
+
readonly bend?: number;
|
|
1340
|
+
readonly volume?: number;
|
|
1341
|
+
readonly damping?: number;
|
|
1342
|
+
readonly gravity?: Vec3Like;
|
|
1343
|
+
readonly substeps?: number;
|
|
1344
|
+
readonly radius?: number;
|
|
1345
|
+
readonly friction?: number;
|
|
1346
|
+
readonly contraction?: number;
|
|
1347
|
+
readonly fibre?: Vec3Like;
|
|
1348
|
+
readonly plastic?: SoftPlastic;
|
|
1349
|
+
readonly geometry?: GeometryId;
|
|
1350
|
+
}
|
|
1351
|
+
type SoftBodyShape = {
|
|
1352
|
+
readonly lattice: {
|
|
1353
|
+
readonly cells: readonly [number, number, number];
|
|
1354
|
+
readonly size: Vec3Like;
|
|
1355
|
+
readonly origin: Vec3Like;
|
|
1356
|
+
readonly density?: number;
|
|
1357
|
+
};
|
|
1358
|
+
readonly surface?: Float32Array;
|
|
1359
|
+
} | {
|
|
1360
|
+
readonly rope: {
|
|
1361
|
+
readonly points: Float32Array;
|
|
1362
|
+
readonly mass?: number;
|
|
1363
|
+
readonly pinFirst?: boolean;
|
|
1364
|
+
};
|
|
1365
|
+
} | {
|
|
1366
|
+
readonly asset: Uint8Array;
|
|
1367
|
+
};
|
|
1368
|
+
type SoftCollider = {
|
|
1369
|
+
readonly plane: {
|
|
1370
|
+
readonly normal: Vec3Like;
|
|
1371
|
+
readonly offset: number;
|
|
1372
|
+
};
|
|
1373
|
+
} | {
|
|
1374
|
+
readonly sphere: {
|
|
1375
|
+
readonly center: Vec3Like;
|
|
1376
|
+
readonly radius: number;
|
|
1377
|
+
};
|
|
1378
|
+
} | {
|
|
1379
|
+
readonly capsule: {
|
|
1380
|
+
readonly a: Vec3Like;
|
|
1381
|
+
readonly b: Vec3Like;
|
|
1382
|
+
readonly radius: number;
|
|
1383
|
+
};
|
|
1384
|
+
} | {
|
|
1385
|
+
readonly box: {
|
|
1386
|
+
readonly center: Vec3Like;
|
|
1387
|
+
readonly half: Vec3Like;
|
|
1388
|
+
readonly rotation?: {
|
|
1389
|
+
readonly x: number;
|
|
1390
|
+
readonly y: number;
|
|
1391
|
+
readonly z: number;
|
|
1392
|
+
readonly w: number;
|
|
1393
|
+
};
|
|
1394
|
+
};
|
|
1395
|
+
};
|
|
1396
|
+
interface CrumpleOptions {
|
|
1397
|
+
readonly cells?: readonly [number, number, number];
|
|
1398
|
+
readonly threshold?: number;
|
|
1399
|
+
readonly crush?: number;
|
|
1400
|
+
readonly maxDepth?: number;
|
|
1401
|
+
readonly radius?: number;
|
|
1402
|
+
readonly stiffness?: number;
|
|
1403
|
+
}
|
|
1404
|
+
declare class SoftBody {
|
|
1405
|
+
private readonly port;
|
|
1406
|
+
private readonly info;
|
|
1407
|
+
readonly particles: number;
|
|
1408
|
+
readonly skinned: number;
|
|
1409
|
+
readonly tets: number;
|
|
1410
|
+
private geometry;
|
|
1411
|
+
private disposed;
|
|
1412
|
+
constructor(port: SoftBodyPort, info: SoftBodyInfo, geometry: GeometryId | null);
|
|
1413
|
+
get id(): number;
|
|
1414
|
+
positions(): Float32Array;
|
|
1415
|
+
attach(geometry: GeometryId | null): void;
|
|
1416
|
+
setOptions(options: SoftBodyOptions): void;
|
|
1417
|
+
setActivation(activation: number): void;
|
|
1418
|
+
setAnchors(anchors: Float32Array): void;
|
|
1419
|
+
push(offset: Vec3Like, velocity: Vec3Like): void;
|
|
1420
|
+
present(): number;
|
|
1421
|
+
dispose(): void;
|
|
1422
|
+
}
|
|
1423
|
+
declare class SoftBodies {
|
|
1424
|
+
readonly port: SoftBodyPort;
|
|
1425
|
+
private readonly bodies;
|
|
1426
|
+
private readonly block;
|
|
1427
|
+
constructor(port: SoftBodyPort);
|
|
1428
|
+
create(shape: SoftBodyShape, options?: SoftBodyOptions): SoftBody;
|
|
1429
|
+
remove(body: SoftBody): void;
|
|
1430
|
+
setColliders(colliders: readonly SoftCollider[]): void;
|
|
1431
|
+
couple(collider: number): number;
|
|
1432
|
+
uncouple(slot: number): void;
|
|
1433
|
+
get count(): number;
|
|
1434
|
+
step(seconds: number): void;
|
|
1435
|
+
present(): void;
|
|
1436
|
+
digest(): bigint;
|
|
1437
|
+
dispose(): void;
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
interface CraftBodyHost {
|
|
1441
|
+
hasBody(entity: Entity): boolean;
|
|
1442
|
+
bodyOf(entity: Entity): number;
|
|
1443
|
+
addBody(entity: Entity, desc: {
|
|
1444
|
+
readonly kind: "dynamic";
|
|
1445
|
+
readonly canSleep: boolean;
|
|
1446
|
+
}): number;
|
|
1447
|
+
addCollider(entity: Entity, desc: ColliderDesc): number;
|
|
1448
|
+
}
|
|
1449
|
+
declare class Craft {
|
|
1450
|
+
readonly id: number;
|
|
1451
|
+
readonly entity: Entity;
|
|
1452
|
+
protected readonly system: CraftSystem;
|
|
1453
|
+
constructor(system: CraftSystem, id: number, entity: Entity);
|
|
1454
|
+
setChannel(channel: number, value: number): void;
|
|
1455
|
+
channel(channel: number): number;
|
|
1456
|
+
telemetry(word: number): number;
|
|
1457
|
+
get speed(): number;
|
|
1458
|
+
get submerged(): number;
|
|
1459
|
+
get planing(): number;
|
|
1460
|
+
get bank(): number;
|
|
1461
|
+
get pitchAttitude(): number;
|
|
1462
|
+
get airspeed(): number;
|
|
1463
|
+
get angleOfAttack(): number;
|
|
1464
|
+
get stalled(): boolean;
|
|
1465
|
+
get groundEffect(): number;
|
|
1466
|
+
get onGround(): boolean;
|
|
1467
|
+
get spool(): number;
|
|
1468
|
+
get rotorSpeed(): number;
|
|
1469
|
+
get thrust(): number;
|
|
1470
|
+
get climb(): number;
|
|
1471
|
+
get apparentWind(): number;
|
|
1472
|
+
crumple(geometry: number, vertices: Float32Array, options?: CrumpleOptions): void;
|
|
1473
|
+
impact(point: Vec3Like, severity: Vec3Like): boolean;
|
|
1474
|
+
get damage(): number;
|
|
1475
|
+
remove(): void;
|
|
1476
|
+
}
|
|
1477
|
+
declare class Boat extends Craft {
|
|
1478
|
+
get throttle(): number;
|
|
1479
|
+
set throttle(value: number);
|
|
1480
|
+
get steer(): number;
|
|
1481
|
+
set steer(value: number);
|
|
1482
|
+
get sheet(): number;
|
|
1483
|
+
set sheet(value: number);
|
|
1484
|
+
}
|
|
1485
|
+
declare class Aircraft extends Craft {
|
|
1486
|
+
get pitch(): number;
|
|
1487
|
+
set pitch(value: number);
|
|
1488
|
+
get roll(): number;
|
|
1489
|
+
set roll(value: number);
|
|
1490
|
+
get yaw(): number;
|
|
1491
|
+
set yaw(value: number);
|
|
1492
|
+
get throttle(): number;
|
|
1493
|
+
set throttle(value: number);
|
|
1494
|
+
get flaps(): number;
|
|
1495
|
+
set flaps(value: number);
|
|
1496
|
+
get brake(): number;
|
|
1497
|
+
set brake(value: number);
|
|
1498
|
+
get gearDown(): boolean;
|
|
1499
|
+
set gearDown(value: boolean);
|
|
1500
|
+
get tilt(): number;
|
|
1501
|
+
set tilt(value: number);
|
|
1502
|
+
}
|
|
1503
|
+
declare class Helicopter extends Craft {
|
|
1504
|
+
get collective(): number;
|
|
1505
|
+
set collective(value: number);
|
|
1506
|
+
get cyclicPitch(): number;
|
|
1507
|
+
set cyclicPitch(value: number);
|
|
1508
|
+
get cyclicRoll(): number;
|
|
1509
|
+
set cyclicRoll(value: number);
|
|
1510
|
+
get pedal(): number;
|
|
1511
|
+
set pedal(value: number);
|
|
1512
|
+
get engine(): boolean;
|
|
1513
|
+
set engine(value: boolean);
|
|
1514
|
+
}
|
|
1515
|
+
interface SeaOptions {
|
|
1516
|
+
readonly windDirection?: number;
|
|
1517
|
+
readonly seed?: number;
|
|
1518
|
+
}
|
|
1519
|
+
declare class WaterControls {
|
|
1520
|
+
private readonly port;
|
|
1521
|
+
private readonly one;
|
|
1522
|
+
private readonly oneOut;
|
|
1523
|
+
private level;
|
|
1524
|
+
private currentX;
|
|
1525
|
+
private currentZ;
|
|
1526
|
+
private windX;
|
|
1527
|
+
private windZ;
|
|
1528
|
+
private gust;
|
|
1529
|
+
private gustPeriod;
|
|
1530
|
+
constructor(port: CraftPort);
|
|
1531
|
+
configure(desc: WaterDesc): void;
|
|
1532
|
+
sea(state: SeaState, options?: SeaOptions): WaterDesc;
|
|
1533
|
+
ocean(desc: OceanDesc | null): void;
|
|
1534
|
+
/** The FFT ocean, one desc for the eye and the hull: the water draws its cascades and every
|
|
1535
|
+
* craft floats on the same waves (a CPU instance at `physicsSize`). `null` takes it away. */
|
|
1536
|
+
cascades(desc: OceanCascades | null): void;
|
|
1537
|
+
/** Puddles and streams over a bed: they flow downhill, pool and drain, and the water draws
|
|
1538
|
+
* them. `null` takes them away. */
|
|
1539
|
+
puddles(desc: PuddleOptions | null): void;
|
|
1540
|
+
/** The ground under the puddles: one height per cell, row by row along x. */
|
|
1541
|
+
setPuddleBed(heights: Float32Array): void;
|
|
1542
|
+
/** Pours `volume` cubic metres at world x, z. */
|
|
1543
|
+
pour(x: number, z: number, volume: number): void;
|
|
1544
|
+
/** Rain and evaporation over the puddles, in metres per second. */
|
|
1545
|
+
puddleWeather(rain: number, evaporation: number): void;
|
|
1546
|
+
/** Ripples and wakes: every craft then floats on them and leaves its wake in them, and the
|
|
1547
|
+
* water draws them. `null` takes them away. */
|
|
1548
|
+
ripples(desc: RippleOptions | null): void;
|
|
1549
|
+
/** Centres the ripple window on world x, z: call it with the camera or the player's boat. */
|
|
1550
|
+
followRipples(x: number, z: number): void;
|
|
1551
|
+
/** Pushes `amount` metres of water aside at world x, z: a splash, a stone, a paddle stroke. */
|
|
1552
|
+
splash(x: number, z: number, amount: number): void;
|
|
1553
|
+
setLevel(level: number): void;
|
|
1554
|
+
setCurrent(x: number, z: number): void;
|
|
1555
|
+
setWind(x: number, z: number, gust?: number, gustPeriod?: number): void;
|
|
1556
|
+
height(x: number, z: number): number;
|
|
1557
|
+
sample(x: number, z: number, out?: WaterSample): WaterSample;
|
|
1558
|
+
sampleBatch(points: Float32Array, count: number, out: Float32Array): void;
|
|
1559
|
+
private remember;
|
|
1560
|
+
private flow;
|
|
1561
|
+
}
|
|
1562
|
+
declare class CraftSystem {
|
|
1563
|
+
readonly water: WaterControls;
|
|
1564
|
+
private readonly port;
|
|
1565
|
+
private readonly handles;
|
|
1566
|
+
private readonly crumpled;
|
|
1567
|
+
private active;
|
|
1568
|
+
constructor(port: CraftPort);
|
|
1569
|
+
get backend(): string;
|
|
1570
|
+
get count(): number;
|
|
1571
|
+
controls(): Float32Array;
|
|
1572
|
+
telemetry(): Float32Array;
|
|
1573
|
+
create(host: CraftBodyHost, entity: Entity, desc: CraftDesc, options?: CraftOptions): Craft;
|
|
1574
|
+
preset(host: CraftBodyHost, entity: Entity, name: CraftPresetName, options?: PresetOptions): Craft;
|
|
1575
|
+
boat(host: CraftBodyHost, entity: Entity, options: BoatOptions): Boat;
|
|
1576
|
+
aircraft(host: CraftBodyHost, entity: Entity, options: AircraftOptions): Aircraft;
|
|
1577
|
+
helicopter(host: CraftBodyHost, entity: Entity, options?: HelicopterOptions): Helicopter;
|
|
1578
|
+
remove(handle: Craft): void;
|
|
1579
|
+
forget(entity: Entity): void;
|
|
1580
|
+
step(): void;
|
|
1581
|
+
crumple(handle: Craft, geometry: number, vertices: Float32Array, options?: CrumpleOptions): void;
|
|
1582
|
+
impact(handle: Craft, point: Vec3Like, severity: Vec3Like): boolean;
|
|
1583
|
+
damage(handle: Craft): number;
|
|
1584
|
+
dispose(): void;
|
|
1585
|
+
private fromPreset;
|
|
1586
|
+
private build;
|
|
1587
|
+
private attach;
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
declare const RigidBody: ComponentType<{
|
|
1591
|
+
readonly body: "u32";
|
|
1592
|
+
readonly kind: "u8";
|
|
1593
|
+
}>;
|
|
1594
|
+
interface PhysicsOptions {
|
|
1595
|
+
readonly gravity?: readonly [number, number, number];
|
|
1596
|
+
readonly maxBodies?: number;
|
|
1597
|
+
readonly maxColliders?: number;
|
|
1598
|
+
readonly maxJoints?: number;
|
|
1599
|
+
readonly maxContactEvents?: number;
|
|
1600
|
+
readonly maxCharacterControllers?: number;
|
|
1601
|
+
readonly rollback?: WorldRollbackDesc;
|
|
1602
|
+
readonly solver?: SolverSettings;
|
|
1603
|
+
}
|
|
1604
|
+
declare class Physics implements DespawnListener, RollbackState {
|
|
1605
|
+
private readonly port;
|
|
1606
|
+
private readonly world;
|
|
1607
|
+
private readonly transforms;
|
|
1608
|
+
private readonly bodies;
|
|
1609
|
+
private readonly colliderEntity;
|
|
1610
|
+
private readonly zero;
|
|
1611
|
+
private readonly desc;
|
|
1612
|
+
private readonly vehicleDesc;
|
|
1613
|
+
private readonly vehicles;
|
|
1614
|
+
readonly craft: CraftSystem;
|
|
1615
|
+
private readonly craftHost;
|
|
1616
|
+
private readonly rollbackStates;
|
|
1617
|
+
private readonly views;
|
|
1618
|
+
private enrolledIn;
|
|
1619
|
+
private readonly solver;
|
|
1620
|
+
constructor(port: PhysicsPort, world: World, transforms: Transforms, stepSeconds: number, options?: PhysicsOptions);
|
|
1621
|
+
get backend(): string;
|
|
1622
|
+
init(): Promise<void>;
|
|
1623
|
+
setSolver(settings: SolverSettings): void;
|
|
1624
|
+
setSoftCcd(entity: Entity, distance: number): void;
|
|
1625
|
+
setSleepThresholds(entity: Entity, thresholds: SleepThresholds): void;
|
|
1626
|
+
get rollback(): WorldSnapshots | null;
|
|
1627
|
+
enrolRollback(...states: RollbackState[]): void;
|
|
1628
|
+
rollbackViews(): readonly ArrayBufferView[];
|
|
1629
|
+
setGravity(gravity: Vec3Like): void;
|
|
1630
|
+
addBody(entity: Entity, desc: BodyDesc): number;
|
|
1631
|
+
addCollider(entity: Entity, desc: ColliderDesc): number;
|
|
1632
|
+
removeCollider(collider: number): void;
|
|
1633
|
+
setColliderEnabled(collider: number, enabled: boolean): void;
|
|
1634
|
+
overlap(x: number, y: number, z: number, radius: number, out: {
|
|
1635
|
+
count: number;
|
|
1636
|
+
entity: number;
|
|
1637
|
+
}): boolean;
|
|
1638
|
+
private readonly sphereOverlap;
|
|
1639
|
+
entityOfCollider(collider: number): Entity;
|
|
1640
|
+
hasBody(entity: Entity): boolean;
|
|
1641
|
+
get joints(): JointPort;
|
|
1642
|
+
ragdoll(desc: RagdollDesc): Ragdoll;
|
|
1643
|
+
joint(a: Entity, b: Entity, desc: JointDesc): number;
|
|
1644
|
+
setJointMotor(joint: number, targetVelocity: number, maxForce: number): void;
|
|
1645
|
+
removeJoint(joint: number): void;
|
|
1646
|
+
applyImpulse(entity: Entity, impulse: Vec3Like): void;
|
|
1647
|
+
applyTorqueImpulse(entity: Entity, impulse: Vec3Like): void;
|
|
1648
|
+
addForce(entity: Entity, force: Vec3Like): void;
|
|
1649
|
+
applyImpulseAtPoint(entity: Entity, impulse: Vec3Like, point: Vec3Like): void;
|
|
1650
|
+
addForceAtPoint(entity: Entity, force: Vec3Like, point: Vec3Like): void;
|
|
1651
|
+
addTorque(entity: Entity, torque: Vec3Like): void;
|
|
1652
|
+
velocityAtPoint(entity: Entity, point: Vec3Like, out: Vec3): Vec3;
|
|
1653
|
+
setJointMotorPosition(joint: number, target: number, stiffness: number, damping: number): void;
|
|
1654
|
+
castShape(query: ShapeCastQuery, hit: RayHit): boolean;
|
|
1655
|
+
setColliderClass(collider: number, colliderClass: number): void;
|
|
1656
|
+
setContactRule(platformClass: number, otherClass: number, rule: ContactRuleDesc): void;
|
|
1657
|
+
setCollisionGroups(collider: number, membership: number, filter: number): void;
|
|
1658
|
+
removeContactRule(platformClass: number, otherClass: number): void;
|
|
1659
|
+
ignoreContacts(classA: number, classB: number): void;
|
|
1660
|
+
oneWayPlatform(platformClass: number, otherClass: number, normal?: readonly [number, number, number]): void;
|
|
1661
|
+
bodyId(entity: Entity): number;
|
|
1662
|
+
resetForces(entity: Entity): void;
|
|
1663
|
+
setLinearVelocity(entity: Entity, velocity: Vec3Like): void;
|
|
1664
|
+
setAngularVelocity(entity: Entity, velocity: Vec3Like): void;
|
|
1665
|
+
linearVelocity(entity: Entity, out: Vec3): Vec3;
|
|
1666
|
+
angularVelocity(entity: Entity, out: Vec3): Vec3;
|
|
1667
|
+
isSleeping(entity: Entity): boolean;
|
|
1668
|
+
wake(entity: Entity): void;
|
|
1669
|
+
teleport(entity: Entity, position: Vec3Like): void;
|
|
1670
|
+
batchHandle(): number;
|
|
1671
|
+
writeBody(op: number, body: number, x: number, y: number, z: number): void;
|
|
1672
|
+
private readonly bodyWrite;
|
|
1673
|
+
raycast(ray: RayQuery, hit: RayHit): boolean;
|
|
1674
|
+
contactCount(): number;
|
|
1675
|
+
contactEntityA(index: number): Entity;
|
|
1676
|
+
contactEntityB(index: number): Entity;
|
|
1677
|
+
contactColliderA(index: number): number;
|
|
1678
|
+
contactColliderB(index: number): number;
|
|
1679
|
+
contactStarted(index: number): boolean;
|
|
1680
|
+
createCharacterController(desc?: CharacterControllerDesc): number;
|
|
1681
|
+
moveCharacter(controller: number, collider: number, desired: Vec3Like, out: CharacterMove): CharacterMove;
|
|
1682
|
+
get water(): WaterControls;
|
|
1683
|
+
createCraft(entity: Entity, desc: CraftDesc, options?: CraftOptions): Craft;
|
|
1684
|
+
createCraftPreset(entity: Entity, preset: CraftPresetName, options?: PresetOptions): Craft;
|
|
1685
|
+
createBoat(entity: Entity, options: BoatOptions): Boat;
|
|
1686
|
+
createAircraft(entity: Entity, options: AircraftOptions): Aircraft;
|
|
1687
|
+
createHelicopter(entity: Entity, options?: HelicopterOptions): Helicopter;
|
|
1688
|
+
createVehicle(entity: Entity, desc: VehicleDesc): Vehicle;
|
|
1689
|
+
destroyVehicle(vehicle: Vehicle): void;
|
|
1690
|
+
onDespawn(entity: Entity): void;
|
|
1691
|
+
step(): void;
|
|
1692
|
+
private bodyOf;
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1695
|
+
interface PrefetchLevelDesc {
|
|
1696
|
+
readonly path: string;
|
|
1697
|
+
readonly within?: number;
|
|
1698
|
+
readonly bytes?: number;
|
|
1699
|
+
}
|
|
1700
|
+
interface PrefetchItemDesc {
|
|
1701
|
+
readonly center: readonly [number, number, number];
|
|
1702
|
+
readonly radius?: number;
|
|
1703
|
+
readonly bytes?: number;
|
|
1704
|
+
readonly levels: readonly PrefetchLevelDesc[];
|
|
1705
|
+
}
|
|
1706
|
+
type PrefetchDistance = number | (() => number);
|
|
1707
|
+
interface PrefetchLayerDesc {
|
|
1708
|
+
readonly name?: string;
|
|
1709
|
+
readonly items: readonly PrefetchItemDesc[];
|
|
1710
|
+
readonly radius: PrefetchDistance;
|
|
1711
|
+
readonly need?: PrefetchDistance;
|
|
1712
|
+
readonly cellSize?: number;
|
|
1713
|
+
readonly held?: (entry: number) => boolean;
|
|
1714
|
+
readonly busy?: () => boolean;
|
|
1715
|
+
readonly flow?: Float64Array;
|
|
1716
|
+
}
|
|
1717
|
+
declare const DEFAULT_PREFETCH_CELL = 32;
|
|
1718
|
+
declare const MAX_PREFETCH_LEVELS = 16;
|
|
1719
|
+
declare class PrefetchLayer {
|
|
1720
|
+
readonly name: string;
|
|
1721
|
+
readonly count: number;
|
|
1722
|
+
readonly entries: number;
|
|
1723
|
+
readonly x: Float64Array;
|
|
1724
|
+
readonly y: Float64Array;
|
|
1725
|
+
readonly z: Float64Array;
|
|
1726
|
+
readonly radius: Float64Array;
|
|
1727
|
+
readonly entryStart: Int32Array;
|
|
1728
|
+
readonly entryItem: Int32Array;
|
|
1729
|
+
readonly entryLevel: Uint8Array;
|
|
1730
|
+
readonly entryWithin: Float64Array;
|
|
1731
|
+
readonly entryBytes: Int32Array;
|
|
1732
|
+
readonly paths: readonly string[];
|
|
1733
|
+
readonly cellSize: number;
|
|
1734
|
+
readonly originX: number;
|
|
1735
|
+
readonly originZ: number;
|
|
1736
|
+
readonly cols: number;
|
|
1737
|
+
readonly rows: number;
|
|
1738
|
+
readonly cellStart: Int32Array;
|
|
1739
|
+
readonly cellItems: Int32Array;
|
|
1740
|
+
readonly maxRadius: number;
|
|
1741
|
+
readonly loadRadius: () => number;
|
|
1742
|
+
readonly needRadius: () => number;
|
|
1743
|
+
readonly held: ((entry: number) => boolean) | null;
|
|
1744
|
+
readonly busy: (() => boolean) | null;
|
|
1745
|
+
readonly flow: Float64Array | null;
|
|
1746
|
+
readonly place: Float64Array<ArrayBuffer>;
|
|
1747
|
+
private placed;
|
|
1748
|
+
constructor(desc: PrefetchLayerDesc);
|
|
1749
|
+
cellIndex(x: number, z: number): number;
|
|
1750
|
+
get scale(): number;
|
|
1751
|
+
setPlacement(transform: ArrayLike<number> | null): void;
|
|
1752
|
+
toLocal(position: ArrayLike<number>, out: Float64Array, offset: number, point: boolean): void;
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
interface WorldColliderOptions {
|
|
1756
|
+
readonly budget?: number;
|
|
1757
|
+
readonly actors?: number;
|
|
1758
|
+
readonly stepSeconds?: number;
|
|
1759
|
+
}
|
|
1760
|
+
/**
|
|
1761
|
+
* Reads world packs as package assets, as `ctx.assets` does inside an Interactive.
|
|
1762
|
+
* Hosts that deliver lazy chunks on request also expose `requests`, `lazy` and `release`.
|
|
1763
|
+
*/
|
|
1764
|
+
interface WorldPackReader {
|
|
1765
|
+
take(path: string, priority?: number): Promise<Uint8Array>;
|
|
1766
|
+
requests?(): boolean;
|
|
1767
|
+
lazy?(path: string): boolean;
|
|
1768
|
+
release?(path: string): void;
|
|
1769
|
+
progressive?(path: string, listener: (output: Uint8Array) => void, priority?: number): {
|
|
1770
|
+
readonly done: Promise<Uint8Array>;
|
|
1771
|
+
};
|
|
1772
|
+
isProgressive?(path: string): boolean;
|
|
1773
|
+
}
|
|
1774
|
+
interface WorldStreamOptions {
|
|
1775
|
+
readonly world: Uint8Array;
|
|
1776
|
+
/** Every pack, handed over up front (eager). Use `packPaths` with `assets` to stream packs on demand instead. */
|
|
1777
|
+
readonly packs?: readonly (Uint8Array | Promise<Uint8Array>)[];
|
|
1778
|
+
/** Package asset path of each pack, in pack index order (`street-00.cells`, `street-01.cells`, ...). */
|
|
1779
|
+
readonly packPaths?: readonly string[];
|
|
1780
|
+
/** Reads `packPaths`; with a host that takes requests, packs are fetched as the camera needs them and released when it leaves. */
|
|
1781
|
+
readonly assets?: WorldPackReader;
|
|
1782
|
+
readonly materials: readonly MaterialId[];
|
|
1783
|
+
readonly tier?: DeviceTier;
|
|
1784
|
+
readonly colliders?: WorldColliderOptions | false;
|
|
1785
|
+
}
|
|
1786
|
+
interface WorldStreamStats {
|
|
1787
|
+
readonly live: number;
|
|
1788
|
+
readonly loading: number;
|
|
1789
|
+
readonly waiting: number;
|
|
1790
|
+
readonly failed: number;
|
|
1791
|
+
readonly inflight: number;
|
|
1792
|
+
readonly installed: number;
|
|
1793
|
+
readonly installedBytes: number;
|
|
1794
|
+
readonly evicted: number;
|
|
1795
|
+
readonly residentBytes: number;
|
|
1796
|
+
readonly poolBytes: number;
|
|
1797
|
+
readonly proxyBytes: number;
|
|
1798
|
+
readonly sourceBytes: number;
|
|
1799
|
+
readonly totalInstalls: number;
|
|
1800
|
+
}
|
|
1801
|
+
type WorldNavOptions = Omit<NavDesc, "tileWorld" | "origin">;
|
|
1802
|
+
interface WorldPrefetchOptions {
|
|
1803
|
+
/** Package asset path of every pack: the mesh packs in index order, then the nav packs. */
|
|
1804
|
+
readonly paths: readonly string[];
|
|
1805
|
+
/** Bytes of each path, when the package index knows them; the predictor budgets by them. */
|
|
1806
|
+
readonly bytes?: (path: string) => number | undefined;
|
|
1807
|
+
readonly name?: string;
|
|
1808
|
+
}
|
|
1809
|
+
/**
|
|
1810
|
+
* Describes a world's packs as a prefetch layer: one item per mesh pack centred on its cells, level 0 its meshes and
|
|
1811
|
+
* level 1 its nav tiles, fetched only within the nav reach of the ground so fly-overs spend the link on meshes.
|
|
1812
|
+
*/
|
|
1813
|
+
declare function worldPrefetchLayer(world: Uint8Array, options: WorldPrefetchOptions): PrefetchLayerDesc;
|
|
1814
|
+
declare class WorldStream {
|
|
1815
|
+
private readonly port;
|
|
1816
|
+
private readonly handle;
|
|
1817
|
+
private readonly physics;
|
|
1818
|
+
private readonly world;
|
|
1819
|
+
private readonly transforms;
|
|
1820
|
+
private readonly lazy;
|
|
1821
|
+
readonly ready: Promise<void>;
|
|
1822
|
+
readonly stats: WorldStreamStats;
|
|
1823
|
+
private readonly eye;
|
|
1824
|
+
private readonly actorBuffer;
|
|
1825
|
+
private readonly ops;
|
|
1826
|
+
private readonly physicsOf;
|
|
1827
|
+
private readonly collider;
|
|
1828
|
+
private readonly extents;
|
|
1829
|
+
private readonly offset;
|
|
1830
|
+
private readonly rotation;
|
|
1831
|
+
private readonly desc;
|
|
1832
|
+
private actorCount;
|
|
1833
|
+
private readonly waitingEager;
|
|
1834
|
+
private collidersWaiting;
|
|
1835
|
+
private closed;
|
|
1836
|
+
private registers;
|
|
1837
|
+
private anchor;
|
|
1838
|
+
private readonly paths;
|
|
1839
|
+
private readonly reader;
|
|
1840
|
+
private readonly kept;
|
|
1841
|
+
private readonly contended;
|
|
1842
|
+
private readonly fetching;
|
|
1843
|
+
private readonly dropped;
|
|
1844
|
+
private readonly retryAt;
|
|
1845
|
+
private readonly retryPriority;
|
|
1846
|
+
private readonly backoff;
|
|
1847
|
+
private frames;
|
|
1848
|
+
private readonly shape;
|
|
1849
|
+
private readonly worldBytes;
|
|
1850
|
+
private readonly navHeld;
|
|
1851
|
+
private readonly navLoaded;
|
|
1852
|
+
private navTarget;
|
|
1853
|
+
private navTileCount;
|
|
1854
|
+
constructor(port: WorldStreamingPort, handle: number, options: WorldStreamOptions, physics: Physics | null, world: World, transforms: Transforms, colliders: number, lazy?: boolean);
|
|
1855
|
+
private servePacks;
|
|
1856
|
+
private request;
|
|
1857
|
+
private providePack;
|
|
1858
|
+
private holdNav;
|
|
1859
|
+
private loadNavPack;
|
|
1860
|
+
private dropNav;
|
|
1861
|
+
private feed;
|
|
1862
|
+
private provide;
|
|
1863
|
+
private view;
|
|
1864
|
+
update(eye: Vec3Like, velocity: Vec3Like): void;
|
|
1865
|
+
/** True when packs stream on request from the host instead of being handed over up front. */
|
|
1866
|
+
get streamsOnRequest(): boolean;
|
|
1867
|
+
setActor(index: number, position: Vec3Like): void;
|
|
1868
|
+
setActorCount(count: number): void;
|
|
1869
|
+
/**
|
|
1870
|
+
* Streams the world's baked nav tiles into `nav`: tiles arrive with their nav packs as the camera nears the ground
|
|
1871
|
+
* and leave when the packs are released. Returns the tiles loaded so far; `navTiles` reads the count later.
|
|
1872
|
+
*/
|
|
1873
|
+
loadNav(nav: Nav, options?: WorldNavOptions): number;
|
|
1874
|
+
/** Nav tiles currently loaded into the nav given to `loadNav`. */
|
|
1875
|
+
get navTiles(): number;
|
|
1876
|
+
/**
|
|
1877
|
+
* The world's packs as a prefetch layer over `packPaths`, for `game.prefetch.stream(layer, { stalled })`: the
|
|
1878
|
+
* predictor fetches ahead of the camera by speed and heading, meshes before nav, and cancels what it leaves behind.
|
|
1879
|
+
*/
|
|
1880
|
+
prefetchLayer(bytes?: (path: string) => number | undefined): PrefetchLayerDesc;
|
|
1881
|
+
/** Mesh packs come first in `packPaths`, then nav packs; this is the index of nav pack 0. */
|
|
1882
|
+
get navPackBase(): number;
|
|
1883
|
+
/** True when the last collider step waited for a district of the world that has not arrived; that step changed nothing. */
|
|
1884
|
+
get waitingForDistricts(): boolean;
|
|
1885
|
+
stepColliders(): number;
|
|
1886
|
+
private body;
|
|
1887
|
+
private insert;
|
|
1888
|
+
private remove;
|
|
1889
|
+
dispose(): void;
|
|
1890
|
+
}
|
|
1891
|
+
declare class WorldStreamer {
|
|
1892
|
+
private readonly port;
|
|
1893
|
+
private readonly world;
|
|
1894
|
+
private readonly transforms;
|
|
1895
|
+
private readonly physics;
|
|
1896
|
+
constructor(port: WorldStreamingPort | null, world: World, transforms: Transforms, physics: Physics | null);
|
|
1897
|
+
get supported(): boolean;
|
|
1898
|
+
stream(options: WorldStreamOptions): WorldStream;
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
type Leaf<E> = (entity: E, ...args: never[]) => boolean | number | void;
|
|
1902
|
+
type BehaviourNode<E> = {
|
|
1903
|
+
readonly kind: "sequence";
|
|
1904
|
+
readonly children: readonly BehaviourNode<E>[];
|
|
1905
|
+
} | {
|
|
1906
|
+
readonly kind: "selector";
|
|
1907
|
+
readonly children: readonly BehaviourNode<E>[];
|
|
1908
|
+
} | {
|
|
1909
|
+
readonly kind: "invert";
|
|
1910
|
+
readonly children: readonly BehaviourNode<E>[];
|
|
1911
|
+
} | {
|
|
1912
|
+
readonly kind: "condition";
|
|
1913
|
+
readonly leaf: Leaf<E>;
|
|
1914
|
+
} | {
|
|
1915
|
+
readonly kind: "action";
|
|
1916
|
+
readonly leaf: Leaf<E>;
|
|
1917
|
+
};
|
|
1918
|
+
declare function sequence<E>(...children: BehaviourNode<E>[]): BehaviourNode<E>;
|
|
1919
|
+
declare function selector<E>(...children: BehaviourNode<E>[]): BehaviourNode<E>;
|
|
1920
|
+
declare function invert<E>(child: BehaviourNode<E>): BehaviourNode<E>;
|
|
1921
|
+
declare function condition<E>(leaf: (entity: E, ...args: never[]) => boolean): BehaviourNode<E>;
|
|
1922
|
+
declare function action<E>(leaf: (entity: E, ...args: never[]) => boolean | number | void): BehaviourNode<E>;
|
|
1923
|
+
|
|
1924
|
+
interface InspectorPool {
|
|
1925
|
+
readonly live: number;
|
|
1926
|
+
readonly highWater: number;
|
|
1927
|
+
readonly capacity: number;
|
|
1928
|
+
}
|
|
1929
|
+
interface InspectorReadout {
|
|
1930
|
+
readonly shown: boolean;
|
|
1931
|
+
readonly refreshes: number;
|
|
1932
|
+
readonly error: number;
|
|
1933
|
+
readonly arena: {
|
|
1934
|
+
readonly highWaterBytes: number;
|
|
1935
|
+
readonly committedBytes: number;
|
|
1936
|
+
readonly ceilingBytes: number;
|
|
1937
|
+
};
|
|
1938
|
+
readonly stream: {
|
|
1939
|
+
readonly missing: number;
|
|
1940
|
+
readonly urgent: number;
|
|
1941
|
+
readonly starvedFrames: number;
|
|
1942
|
+
};
|
|
1943
|
+
readonly bodies: InspectorPool;
|
|
1944
|
+
readonly colliders: InspectorPool;
|
|
1945
|
+
readonly kernels: {
|
|
1946
|
+
readonly budgetMs: number;
|
|
1947
|
+
readonly spentMs: number;
|
|
1948
|
+
};
|
|
1949
|
+
readonly frameMs: number;
|
|
1950
|
+
}
|
|
1951
|
+
interface Dev {
|
|
1952
|
+
inspector(on?: boolean): boolean;
|
|
1953
|
+
}
|
|
1954
|
+
declare const dev: Dev;
|
|
1955
|
+
|
|
1956
|
+
type GpuDeviceClass = "unknown" | "mobile" | "desktop" | "discrete";
|
|
1957
|
+
type CpuBackend = "interpreter" | "cranelift" | "wasm";
|
|
1958
|
+
type RouteDevice = "cpu" | "gpu";
|
|
1959
|
+
interface KernelWork {
|
|
1960
|
+
readonly rows: number;
|
|
1961
|
+
readonly instructions: number;
|
|
1962
|
+
readonly pairs: boolean;
|
|
1963
|
+
readonly stages: number;
|
|
1964
|
+
readonly columns: number;
|
|
1965
|
+
readonly resident: boolean;
|
|
1966
|
+
readonly readback: boolean;
|
|
1967
|
+
readonly lanes: number;
|
|
1968
|
+
readonly transcendentals: number;
|
|
1969
|
+
readonly batched: boolean;
|
|
1970
|
+
}
|
|
1971
|
+
interface KernelMachine {
|
|
1972
|
+
readonly class: GpuDeviceClass;
|
|
1973
|
+
readonly backend: CpuBackend;
|
|
1974
|
+
readonly budgetNs: number;
|
|
1975
|
+
readonly pressure: number;
|
|
1976
|
+
}
|
|
1977
|
+
interface RouteEstimate {
|
|
1978
|
+
cpuLaunch: number;
|
|
1979
|
+
cpuRow: number;
|
|
1980
|
+
cpuSerialRow: number;
|
|
1981
|
+
lanes: number;
|
|
1982
|
+
gpuFixed: number;
|
|
1983
|
+
gpuRow: number;
|
|
1984
|
+
}
|
|
1985
|
+
interface RoutePin {
|
|
1986
|
+
readonly cpu: number;
|
|
1987
|
+
readonly gpu: number;
|
|
1988
|
+
}
|
|
1989
|
+
declare function kernelMachine(device: GpuDeviceClass, backend?: CpuBackend, budgetNs?: number, pressure?: number): KernelMachine;
|
|
1990
|
+
interface KernelSetShape {
|
|
1991
|
+
readonly parts: number;
|
|
1992
|
+
readonly instructions: number;
|
|
1993
|
+
readonly gathers: number;
|
|
1994
|
+
readonly transcendentals: number;
|
|
1995
|
+
readonly stages: number;
|
|
1996
|
+
readonly upload: number;
|
|
1997
|
+
readonly readback: number;
|
|
1998
|
+
readonly steps: number;
|
|
1999
|
+
}
|
|
2000
|
+
type SetCpuForm = "wasm" | "script";
|
|
2001
|
+
declare function chooseDevice(work: KernelWork, machine: KernelMachine): RouteDevice;
|
|
2002
|
+
declare function crossoverRows(work: KernelWork, machine: KernelMachine): number | null;
|
|
2003
|
+
declare function leaveBelowRows(work: KernelWork, machine: KernelMachine): number | null;
|
|
2004
|
+
declare class KernelRouter {
|
|
2005
|
+
private machineState;
|
|
2006
|
+
private readonly preset;
|
|
2007
|
+
private current;
|
|
2008
|
+
private decided;
|
|
2009
|
+
private streak;
|
|
2010
|
+
private switched;
|
|
2011
|
+
private taken;
|
|
2012
|
+
private pending;
|
|
2013
|
+
private readonly cpuSamples;
|
|
2014
|
+
private readonly gpuSamples;
|
|
2015
|
+
private cpuLength;
|
|
2016
|
+
private gpuLength;
|
|
2017
|
+
private pinned;
|
|
2018
|
+
private readonly scratch;
|
|
2019
|
+
private readonly base;
|
|
2020
|
+
private readonly runs;
|
|
2021
|
+
private constructor();
|
|
2022
|
+
static model(machine: KernelMachine): KernelRouter;
|
|
2023
|
+
static calibrating(machine: KernelMachine, runs: number): KernelRouter;
|
|
2024
|
+
static pinned(machine: KernelMachine, pin: RoutePin): KernelRouter;
|
|
2025
|
+
static replaying(machine: KernelMachine, runs: number, pin: RoutePin): KernelRouter;
|
|
2026
|
+
get machine(): KernelMachine;
|
|
2027
|
+
set machine(next: KernelMachine);
|
|
2028
|
+
get device(): RouteDevice;
|
|
2029
|
+
get pin(): RoutePin | null;
|
|
2030
|
+
get switches(): number;
|
|
2031
|
+
get calibrating(): boolean;
|
|
2032
|
+
get calibrationRuns(): number;
|
|
2033
|
+
get sampling(): boolean;
|
|
2034
|
+
route(work: KernelWork): RouteDevice;
|
|
2035
|
+
routeEstimate(e: RouteEstimate, rows: number, rowBound?: number): RouteDevice;
|
|
2036
|
+
record(device: RouteDevice, work: KernelWork, ns: number): void;
|
|
2037
|
+
recordEstimate(device: RouteDevice, e: RouteEstimate, rows: number, ns: number): void;
|
|
2038
|
+
}
|
|
2039
|
+
|
|
2040
|
+
declare const GPU_KERNEL_EXPORT_NAMES: readonly ["engine_kernel_gpu_ready", "engine_kernel_gpu_bind", "engine_kernel_gpu_unbind", "engine_kernel_gpu_run", "engine_kernel_gpu_frame", "engine_kernel_gpu_sync", "engine_kernel_gpu_touch", "engine_kernel_gpu_events", "engine_kernel_gpu_clear_events"];
|
|
2041
|
+
type KernelTarget = "auto" | "cpu" | "gpu";
|
|
2042
|
+
|
|
2043
|
+
interface RunPlan {
|
|
2044
|
+
readonly fn: ((entity: never, ...args: never[]) => unknown) | null;
|
|
2045
|
+
readonly tree: BehaviourNode<never> | null;
|
|
2046
|
+
readonly neighbours: boolean;
|
|
2047
|
+
}
|
|
2048
|
+
|
|
2049
|
+
declare const KERNEL_INFO: unique symbol;
|
|
2050
|
+
declare function programDigest(program: Uint8Array): bigint;
|
|
2051
|
+
declare function nativeTwinOf(k: Kernel<unknown, unknown[]>): string | null;
|
|
2052
|
+
interface KernelInfo {
|
|
2053
|
+
readonly name: string;
|
|
2054
|
+
readonly plan: RunPlan;
|
|
2055
|
+
readonly payload: string | null;
|
|
2056
|
+
readonly device?: KernelTarget;
|
|
2057
|
+
readonly feeds?: KernelFeed;
|
|
2058
|
+
readonly priority?: KernelPriority;
|
|
2059
|
+
compiled: {
|
|
2060
|
+
readonly meta: KernelMeta;
|
|
2061
|
+
readonly program: Uint8Array;
|
|
2062
|
+
} | null | undefined;
|
|
2063
|
+
runs: number;
|
|
2064
|
+
}
|
|
2065
|
+
type KernelFeed = "host" | "render" | "auto";
|
|
2066
|
+
interface KernelOptions {
|
|
2067
|
+
readonly device?: KernelTarget;
|
|
2068
|
+
readonly feeds?: KernelFeed;
|
|
2069
|
+
readonly priority?: KernelPriority;
|
|
2070
|
+
}
|
|
2071
|
+
type Kernel<E, A extends unknown[] = []> = ((entity: E, ...args: A) => void) & {
|
|
2072
|
+
readonly [KERNEL_INFO]: KernelInfo;
|
|
2073
|
+
};
|
|
2074
|
+
type KernelMode = "auto" | "native" | "vm" | "js" | "dev";
|
|
2075
|
+
interface KernelMismatch {
|
|
2076
|
+
readonly kernel: string;
|
|
2077
|
+
readonly field: string;
|
|
2078
|
+
readonly component: number;
|
|
2079
|
+
readonly row: number;
|
|
2080
|
+
readonly js: number;
|
|
2081
|
+
readonly native: number;
|
|
2082
|
+
readonly source: string | null;
|
|
2083
|
+
}
|
|
2084
|
+
interface KernelSettings {
|
|
2085
|
+
readonly mode: KernelMode;
|
|
2086
|
+
readonly checkEvery: number;
|
|
2087
|
+
readonly tolerance: number;
|
|
2088
|
+
readonly report: (mismatch: KernelMismatch) => void;
|
|
2089
|
+
readonly gpu: "auto" | "off";
|
|
2090
|
+
readonly gpuRows: number;
|
|
2091
|
+
readonly gpuClass: GpuDeviceClass;
|
|
2092
|
+
readonly cpuLanes: number;
|
|
2093
|
+
readonly cpuBackend: "auto" | CpuBackend;
|
|
2094
|
+
readonly frameBudgetMs: number;
|
|
2095
|
+
readonly gpuCalibrate: number;
|
|
2096
|
+
readonly gpuPins: Readonly<Record<string, RoutePin>>;
|
|
2097
|
+
readonly onRoute: ((report: KernelRouteReport) => void) | null;
|
|
2098
|
+
readonly onCompute: ((diagnostic: ComputeDiagnostic) => void) | null;
|
|
2099
|
+
}
|
|
2100
|
+
interface KernelRouteReport {
|
|
2101
|
+
readonly kernel: string;
|
|
2102
|
+
readonly rows: number;
|
|
2103
|
+
readonly machine: KernelMachine;
|
|
2104
|
+
readonly pin: RoutePin;
|
|
2105
|
+
readonly runs: number;
|
|
2106
|
+
}
|
|
2107
|
+
interface KernelPart {
|
|
2108
|
+
readonly meta: KernelMeta;
|
|
2109
|
+
readonly program: Uint8Array;
|
|
2110
|
+
}
|
|
2111
|
+
interface KernelPartSet {
|
|
2112
|
+
readonly name: string;
|
|
2113
|
+
readonly gpu: readonly KernelPart[];
|
|
2114
|
+
readonly cpu: KernelSetShape;
|
|
2115
|
+
readonly gpuShape: KernelSetShape;
|
|
2116
|
+
}
|
|
2117
|
+
interface KernelSetCpu {
|
|
2118
|
+
readonly cpuForm: SetCpuForm;
|
|
2119
|
+
runCpu(): void;
|
|
2120
|
+
}
|
|
2121
|
+
interface KernelSet<S extends TableSchema = TableSchema> {
|
|
2122
|
+
readonly table: EntityTable<S>;
|
|
2123
|
+
readonly selection: Selection | null;
|
|
2124
|
+
readonly target?: KernelTarget;
|
|
2125
|
+
readonly mirror?: readonly string[];
|
|
2126
|
+
readonly spawns?: EntityTable<TableSchema>;
|
|
2127
|
+
}
|
|
2128
|
+
declare function spawnInto<S extends TableSchema>(table: EntityTable<S>, into: EntityTable<TableSchema>, selection?: Selection | null): KernelSet<S>;
|
|
2129
|
+
declare function configureKernels(next: Partial<KernelSettings>): KernelSettings;
|
|
2130
|
+
declare function kernel<E, A extends unknown[]>(fn: (entity: E, ...args: A) => void, options?: KernelOptions | string, payload?: string): Kernel<E, A>;
|
|
2131
|
+
declare function behaviour<E, A extends unknown[] = []>(root: BehaviourNode<E>, compiled?: string): Kernel<E, A>;
|
|
2132
|
+
declare function isKernel(value: unknown): value is Kernel<unknown, unknown[]>;
|
|
2133
|
+
declare function within<S extends TableSchema>(table: EntityTable<S>, selection: Selection | null, target?: KernelTarget): KernelSet<S>;
|
|
2134
|
+
declare function onGpu<S extends TableSchema>(table: EntityTable<S>, selection?: Selection | null, mirror?: readonly (keyof S & string)[]): KernelSet<S>;
|
|
2135
|
+
declare function compiledKernel(k: Kernel<unknown, unknown[]>): {
|
|
2136
|
+
readonly meta: KernelMeta;
|
|
2137
|
+
readonly program: Uint8Array;
|
|
2138
|
+
} | null;
|
|
2139
|
+
declare class KernelRunner {
|
|
2140
|
+
private readonly js;
|
|
2141
|
+
private readonly vm;
|
|
2142
|
+
private readonly native;
|
|
2143
|
+
private readonly args;
|
|
2144
|
+
private readonly numericArgs;
|
|
2145
|
+
private readonly gpu;
|
|
2146
|
+
private readonly engine;
|
|
2147
|
+
constructor(engine: KernelEngine | null);
|
|
2148
|
+
private readonly compute;
|
|
2149
|
+
private readonly inspector;
|
|
2150
|
+
get inspectorReadout(): InspectorReadout | null;
|
|
2151
|
+
get hasGpu(): boolean;
|
|
2152
|
+
get computeFrame(): ComputeFrame | null;
|
|
2153
|
+
frame(): void;
|
|
2154
|
+
private gpuInFrame;
|
|
2155
|
+
private pressure;
|
|
2156
|
+
private readonly presented;
|
|
2157
|
+
private readonly readers;
|
|
2158
|
+
setGpuPressure(level: number): void;
|
|
2159
|
+
get gpuPressure(): number;
|
|
2160
|
+
present(table: EntityTable<TableSchema>, on?: boolean): void;
|
|
2161
|
+
presents(table: EntityTable<TableSchema>): boolean;
|
|
2162
|
+
readsOnHost(table: EntityTable<TableSchema>, fields: readonly string[]): void;
|
|
2163
|
+
feedOf(info: KernelInfo, compiled: {
|
|
2164
|
+
readonly meta: KernelMeta;
|
|
2165
|
+
readonly program: Uint8Array;
|
|
2166
|
+
} | null, table: EntityTable<TableSchema>): "host" | "render";
|
|
2167
|
+
private noteCpuReads;
|
|
2168
|
+
syncGpu(): void;
|
|
2169
|
+
touchGpu(table: EntityTable<TableSchema>, field?: string, component?: number): void;
|
|
2170
|
+
private onGpu;
|
|
2171
|
+
private readonly routers;
|
|
2172
|
+
private machineFor;
|
|
2173
|
+
private machineValue;
|
|
2174
|
+
private sampleRouter;
|
|
2175
|
+
private sampleWork;
|
|
2176
|
+
private sampleName;
|
|
2177
|
+
private machine;
|
|
2178
|
+
private routerFor;
|
|
2179
|
+
private recordSample;
|
|
2180
|
+
private readonly setRouters;
|
|
2181
|
+
private readonly setMachines;
|
|
2182
|
+
private setMachineBase;
|
|
2183
|
+
private readonly setScratch;
|
|
2184
|
+
partsTable<S extends TableSchema>(schema: S, capacity: number): EntityTable<S> | null;
|
|
2185
|
+
gpuReady(): boolean;
|
|
2186
|
+
gpuClass(): GpuDeviceClass;
|
|
2187
|
+
runSet(set: KernelPartSet, table: EntityTable<TableSchema>, rows: number, target: KernelTarget, cpu: KernelSetCpu): RouteDevice;
|
|
2188
|
+
private setOnGpu;
|
|
2189
|
+
private setMachine;
|
|
2190
|
+
private setRouterFor;
|
|
2191
|
+
get hasEngine(): boolean;
|
|
2192
|
+
compiled(): Promise<void>;
|
|
2193
|
+
private world;
|
|
2194
|
+
kernelServices(sources: KernelServiceSources | null): void;
|
|
2195
|
+
private readonly sink;
|
|
2196
|
+
private into;
|
|
2197
|
+
get spawns(): Readonly<KernelSpawnReport>;
|
|
2198
|
+
dataReport(k: Kernel<unknown, unknown[]>): KernelDataReport | null;
|
|
2199
|
+
private plain;
|
|
2200
|
+
run<E, A extends unknown[]>(k: Kernel<E, A>, set: EntityTable<TableSchema> | KernelSet, ...args: A): number;
|
|
2201
|
+
runWith(k: Kernel<unknown, unknown[]>, set: EntityTable<TableSchema> | KernelSet, scratch: unknown[]): number;
|
|
2202
|
+
private onCpu;
|
|
2203
|
+
private check;
|
|
2204
|
+
dispose(): void;
|
|
2205
|
+
}
|
|
2206
|
+
declare function setDefaultKernelEngine(engine: KernelEngine | null): void;
|
|
2207
|
+
declare function autoKernel(fn: (entity: never, ...args: never[]) => void, payload: string, table: EntityTable<TableSchema>, selection: Selection | null, a0?: unknown, a1?: unknown, a2?: unknown, a3?: unknown, a4?: unknown, a5?: unknown, a6?: unknown, a7?: unknown): number;
|
|
2208
|
+
type FieldSpec = TableField | {
|
|
2209
|
+
readonly [name: string]: FieldSpec;
|
|
2210
|
+
} | readonly [FieldSpec, number];
|
|
2211
|
+
declare function fields<const T extends Readonly<Record<string, FieldSpec>>>(spec: T): TableSchema;
|
|
2212
|
+
|
|
2213
|
+
interface KernelSystemSpec {
|
|
2214
|
+
readonly name: string;
|
|
2215
|
+
readonly kernel: Kernel<never, never[]>;
|
|
2216
|
+
readonly set: EntityTable<TableSchema> | KernelSet;
|
|
2217
|
+
readonly reads: readonly string[];
|
|
2218
|
+
readonly writes: readonly string[];
|
|
2219
|
+
readonly args?: unknown[];
|
|
2220
|
+
}
|
|
2221
|
+
declare class KernelSystems {
|
|
2222
|
+
private readonly runner;
|
|
2223
|
+
private readonly systems;
|
|
2224
|
+
private stageOf;
|
|
2225
|
+
private order;
|
|
2226
|
+
constructor(runner: KernelRunner);
|
|
2227
|
+
add(spec: KernelSystemSpec): this;
|
|
2228
|
+
private build;
|
|
2229
|
+
stages(): string[][];
|
|
2230
|
+
run(): number;
|
|
2231
|
+
}
|
|
2232
|
+
|
|
2233
|
+
interface DespawnListener {
|
|
2234
|
+
onDespawn(entity: Entity): void;
|
|
2235
|
+
}
|
|
2236
|
+
declare class Query {
|
|
2237
|
+
readonly entities: Uint32Array;
|
|
2238
|
+
readonly rows: readonly Int32Array[];
|
|
2239
|
+
private readonly stores;
|
|
2240
|
+
private size;
|
|
2241
|
+
constructor(stores: readonly ComponentStore[], capacity: number);
|
|
2242
|
+
get count(): number;
|
|
2243
|
+
entityAt(i: number): Entity;
|
|
2244
|
+
update(): number;
|
|
2245
|
+
}
|
|
2246
|
+
declare class World implements RollbackState {
|
|
2247
|
+
readonly entities: EntityRegistry;
|
|
2248
|
+
readonly memory: ComponentMemory;
|
|
2249
|
+
private readonly stores;
|
|
2250
|
+
private readonly storeList;
|
|
2251
|
+
private readonly listeners;
|
|
2252
|
+
private streamer;
|
|
2253
|
+
private kernels;
|
|
2254
|
+
private readonly views;
|
|
2255
|
+
constructor(capacity: number, memory?: ComponentMemory);
|
|
2256
|
+
rollbackViews(): readonly ArrayBufferView[];
|
|
2257
|
+
get capacity(): number;
|
|
2258
|
+
attachKernels(runner: KernelRunner): void;
|
|
2259
|
+
private services;
|
|
2260
|
+
kernelServices(sources: KernelServiceSources | null): void;
|
|
2261
|
+
kernelFrame(): void;
|
|
2262
|
+
kernelGpuPressure(level: number): void;
|
|
2263
|
+
presentKernels(table: EntityTable<TableSchema>, on?: boolean): void;
|
|
2264
|
+
presentsKernels(table: EntityTable<TableSchema>): boolean;
|
|
2265
|
+
hostReads(table: EntityTable<TableSchema>, fields: readonly string[]): void;
|
|
2266
|
+
get kernelSpawns(): Readonly<KernelSpawnReport> | null;
|
|
2267
|
+
kernelData<E, A extends unknown[]>(k: Kernel<E, A>): KernelDataReport | null;
|
|
2268
|
+
kernelSystems(): KernelSystems;
|
|
2269
|
+
run<E, A extends unknown[]>(k: Kernel<E, A>, set: EntityTable<TableSchema> | KernelSet, ...args: A): number;
|
|
2270
|
+
attachStreamer(streamer: WorldStreamer): void;
|
|
2271
|
+
stream(options: WorldStreamOptions): WorldStream;
|
|
2272
|
+
register<S extends ComponentSchema>(type: ComponentType<S>, capacity?: number): ComponentStore<S>;
|
|
2273
|
+
store<S extends ComponentSchema>(type: ComponentType<S>): ComponentStore<S>;
|
|
2274
|
+
spawn(): Entity;
|
|
2275
|
+
despawn(entity: Entity): boolean;
|
|
2276
|
+
isAlive(entity: Entity): boolean;
|
|
2277
|
+
add<S extends ComponentSchema>(entity: Entity, type: ComponentType<S>): number;
|
|
2278
|
+
remove<S extends ComponentSchema>(entity: Entity, type: ComponentType<S>): boolean;
|
|
2279
|
+
has<S extends ComponentSchema>(entity: Entity, type: ComponentType<S>): boolean;
|
|
2280
|
+
query(...types: ComponentType[]): Query;
|
|
2281
|
+
onDespawn(listener: DespawnListener): void;
|
|
2282
|
+
indexOf(entity: Entity): number;
|
|
2283
|
+
}
|
|
2284
|
+
|
|
2285
|
+
export { type BatchNav as $, Aircraft as A, Boat as B, type ComponentType as C, type DespawnListener as D, type Entity as E, type FixedArray as F, type GpuDeviceClass as G, type HullSource as H, type InspectorReadout as I, type AeroCurveDesc as J, KernelRunner as K, type AircraftOptions as L, type AircraftPresetName as M, Nav as N, AreaEffect as O, PrefetchLayer as P, type AreaEffectDesc as Q, type RouteDevice as R, SoftBodies as S, Transforms as T, type ArrayField as U, type AssistDesc as V, World as W, BOAT_SHEET as X, BOAT_STEER as Y, BOAT_THROTTLE as Z, type BatchGraphics as _, EntityTable as a, type KernelFeed as a$, type BatchPhysics as a0, type BehaviourNode as a1, type BoatOptions as a2, type BoatPresetName as a3, CRAFT_CHANNELS as a4, CRAFT_PRESETS as a5, CRAFT_TELEMETRY_WORDS as a6, type CellInfo as a7, type Comparison as a8, type ComponentFields as a9, FLIGHT_THROTTLE as aA, FLIGHT_TILT as aB, FLIGHT_YAW as aC, FLOW_COST_BLOCKED as aD, FLOW_COST_ONE as aE, type Falloff as aF, type FieldName as aG, type FieldSpec$1 as aH, type FlightMode as aI, FlowField as aJ, type FlowFieldDesc as aK, type FlowNav as aL, FlowSample as aM, FlowSteer as aN, type FlowSteerDesc as aO, type FlowStep as aP, type FoilDesc as aQ, GPU_KERNEL_EXPORT_NAMES as aR, type HelicopterOptions as aS, type HelicopterPresetName as aT, type HingeDesc as aU, type InspectorPool as aV, Inventory as aW, type Joined as aX, type KernelCell as aY, type KernelDataReport as aZ, type KernelEntity as a_, type ComponentSchema as aa, ComponentStore as ab, type ComputeCode as ac, type ComputeDiagnostic as ad, type ComputeFrame as ae, type ComputeRoute as af, type CpuBackend as ag, Craft as ah, type CraftOptions as ai, CraftSystem as aj, type CraftWheelDesc as ak, type CrumpleOptions as al, DEFAULT_PREFETCH_CELL as am, type Dev as an, type DrainedEvent as ao, ENGINE_COMPUTE_EXPORT_NAMES as ap, type EntityCursor as aq, EventChannel as ar, type EventFieldKind as as, type EventFields as at, type EventPayload as au, FLIGHT_BRAKE as av, FLIGHT_FLAPS as aw, FLIGHT_GEAR as ax, FLIGHT_PITCH as ay, FLIGHT_ROLL as az, type TableSchema as b, RigidBody as b$, type KernelHandles as b0, type KernelMachine as b1, type KernelMismatch as b2, type KernelMode as b3, type KernelOptions as b4, type KernelOverlap as b5, type KernelPriority as b6, type KernelRouteReport as b7, KernelRouter as b8, type KernelServiceAudio as b9, NO_ENTITY as bA, NO_REF as bB, type NavStep as bC, type NearestFeatureOptions as bD, type Neighbours as bE, type OverlapInfo as bF, PathBatch as bG, type PathBatchDesc as bH, PickBatch as bI, type PickBatchDesc as bJ, type PickInfo as bK, type PrefetchDistance as bL, type PrefetchLevelDesc as bM, type PresetOptions as bN, Query as bO, type QueryOptions as bP, type QueryWhere as bQ, Queue as bR, ROTOR_COLLECTIVE as bS, ROTOR_CYCLIC_PITCH as bT, ROTOR_CYCLIC_ROLL as bU, ROTOR_ENGINE as bV, ROTOR_PEDAL as bW, RayBatch as bX, type RayBatchDesc as bY, type RayHitInfo as bZ, type Ref as b_, type KernelServiceChemistry as ba, type KernelServiceGraphics as bb, type KernelServiceSources as bc, type KernelServiceUi as bd, type KernelServiceVoxels as be, type KernelSet as bf, type KernelSettings as bg, type KernelSpawnReport as bh, type KernelSystemSpec as bi, KernelSystems as bj, type KernelTarget as bk, type KernelVoxel as bl, type KernelWork as bm, KernelWorld as bn, type KernelWorldPort as bo, type List as bp, MAX_AERO_TABLE as bq, MAX_CRAFT_WHEELS as br, MAX_FOILS as bs, MAX_HULL_POINTS as bt, MAX_HULL_RESOLUTION as bu, MAX_PREFETCH_LEVELS as bv, MAX_ROTORS as bw, MAX_THRUSTERS as bx, type MixDesc as by, NO_CHANNEL as bz, type PrefetchLayerDesc as c, cross as c$, type RotorDesc as c0, type RoutePin as c1, type Rows as c2, type ScalarField as c3, type ScalarName as c4, type SeaOptions as c5, type SlotsView as c6, type SoftCollider as c7, type SoftPlastic as c8, Status as c9, type Vec4View as cA, type VectorField as cB, type VoxelInfo as cC, WaterControls as cD, type WorldColliderOptions as cE, type WorldPackReader as cF, type WorldPrefetchOptions as cG, WorldStream as cH, type WorldStreamOptions as cI, type WorldStreamStats as cJ, WorldStreamer as cK, action as cL, add as cM, applyForce as cN, applyImpulse as cO, autoKernel as cP, behaviour as cQ, chemistryAt as cR, chooseDevice as cS, clamp as cT, compiledKernel as cU, computeLogLine as cV, condition as cW, configureKernels as cX, constant as cY, mix as cZ, mixWith as c_, type SweepHitInfo as ca, TELEMETRY_AIRSPEED as cb, TELEMETRY_ALPHA as cc, TELEMETRY_APPARENT_WIND as cd, TELEMETRY_BANK as ce, TELEMETRY_CLIMB as cf, TELEMETRY_CONTACTS as cg, TELEMETRY_GEAR as ch, TELEMETRY_GROUND_EFFECT as ci, TELEMETRY_PITCH as cj, TELEMETRY_PLANING as ck, TELEMETRY_ROTOR as cl, TELEMETRY_SPEED as cm, TELEMETRY_SPOOL as cn, TELEMETRY_STALLED as co, TELEMETRY_SUBMERGED as cp, TELEMETRY_THRUST as cq, type TableColumns as cr, type TableField as cs, type ThrusterDesc as ct, Transform as cu, type Vec2Columns as cv, type Vec2View as cw, type Vec3Columns as cx, type Vec3View as cy, type Vec4Columns as cz, type PrefetchItemDesc as d, spawn as d$, crossoverRows as d0, defineComponent as d1, despawn as d2, dev as d3, dist as d4, distSq as d5, div as d6, dot as d7, entityGeneration as d8, entityIndex as d9, overlap as dA, pick as dB, pickRows as dC, playClip as dD, playSound as dE, programDigest as dF, qaxis as dG, qconj as dH, qmul as dI, qrotate as dJ, queue as dK, rand01 as dL, raycast as dM, readList as dN, scale as dO, selector as dP, sequence as dQ, setAnchor as dR, setClipWeight as dS, setDefaultKernelEngine as dT, setIkTarget as dU, setInstance as dV, setInstanceColour as dW, setKernelWorld as dX, setVelocity as dY, setVoxel as dZ, smoothstep as d_, events as da, fields as db, flow as dc, flowCost as dd, groundHeight as de, hash32 as df, invert as dg, isKernel as dh, kernel as di, kernelMachine as dj, leaveBelowRows as dk, len as dl, lenSq as dm, lerp as dn, lineOfSight as dp, list as dq, listPool as dr, mul as ds, nativeTwinOf as dt, navNext as du, negate as dv, noise2 as dw, noise3 as dx, normalize as dy, onGpu as dz, Physics as e, spawnInto as e0, spawnOverflow as e1, sub as e2, sweep as e3, symbol as e4, voxelAt as e5, within as e6, worldPrefetchLayer as e7, type PhysicsOptions as f, type SoftBodyShape as g, type SoftBodyOptions as h, SoftBody as i, type EntityTableOptions as j, type f32 as k, vec3 as l, type Each as m, vec2 as n, type i32 as o, type Kernel as p, Selection as q, quat as r, NavPath as s, type CraftPresetName as t, type u32 as u, vec4 as v, type CraftBodyShape as w, type CraftDesc as x, type CraftTuning as y, Helicopter as z };
|