@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,1531 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkX5A5FOWW_js = require('./chunk-X5A5FOWW.js');
|
|
4
|
+
var chunkIR74FJHU_js = require('./chunk-IR74FJHU.js');
|
|
5
|
+
var chunk2O2CG465_js = require('./chunk-2O2CG465.js');
|
|
6
|
+
var chunk2V7IL4HC_js = require('./chunk-2V7IL4HC.js');
|
|
7
|
+
|
|
8
|
+
// src/game/kernel/compute.ts
|
|
9
|
+
var ENGINE_COMPUTE_EXPORT_NAMES = ["engine_compute_frame", "engine_compute_priority", "engine_compute_registers", "engine_compute_clear"], KERNEL_PRIORITIES = ["simulation", "presentation", "optional"], PRIORITY_LEVEL = { simulation: 0, presentation: 1, optional: 2 };
|
|
10
|
+
function priorityLevel(priority) {
|
|
11
|
+
return priority === void 0 ? 0 : PRIORITY_LEVEL[priority];
|
|
12
|
+
}
|
|
13
|
+
var COMPUTE_SPACE_CPU = 0, COMPUTE_SPACE_GPU = 1, COMPUTE_DEFERRED = -7, COMPUTE_STOPPED = -8, COMPUTE_HEADER_WORDS = 16, COMPUTE_DIAGNOSTIC_WORDS = 8, COMPUTE_DIAGNOSTIC_CAPACITY = 32, COMPUTE_REGISTER_WORDS = (16) + (32) * (8), REG_CPU_BUDGET_NS = 1, REG_CPU_SPENT_NS = 2, REG_DEFERRED = 5, REG_STOPPED = 6, REG_COUNT = 8, DIAG_CODE = 0, DIAG_SPACE = 1, DIAG_BINDING = 2, DIAG_ROUTE = 4, DIAG_NS = 5, DIAG_ROWS = 6, DIAG_FRAME = 7, NANOS_PER_MS = 1e6, MAX_TIER = 2, SPACE_SHIFT = 2 ** 32, CPU_SLOT_MASK = 1023;
|
|
14
|
+
function keyOf(space, binding) {
|
|
15
|
+
return space * SPACE_SHIFT + (space === (0) ? binding & (1023) : binding);
|
|
16
|
+
}
|
|
17
|
+
var CODES = [null, "frame_over", "kernel_heavy", "kernel_deferred", "kernel_stopped", "gpu_deferred", "gpu_stall"], ROUTES = ["interpreter", "jit", "prebuilt", "native", "gpu"], MESSAGES = {
|
|
18
|
+
frame_over: "Kernels used more time this frame than some phones can spare.",
|
|
19
|
+
kernel_heavy: "This kernel is too heavy for some phones.",
|
|
20
|
+
kernel_deferred: "This kernel waited for the next frame so the game stays smooth.",
|
|
21
|
+
kernel_stopped: "This kernel ran too long and was stopped so the game stays responsive.",
|
|
22
|
+
gpu_deferred: "This GPU kernel waited for the next frame so the game stays smooth.",
|
|
23
|
+
gpu_stall: "GPU work took longer than a frame."
|
|
24
|
+
};
|
|
25
|
+
function computeLogLine(d) {
|
|
26
|
+
let who = d.kernel === null ? "" : ` kernel ${d.kernel}`, rows = d.rows > 0 ? ` on ${d.rows} rows` : "";
|
|
27
|
+
return `[compute ${d.code}]${who} ${d.ms.toFixed(2)} ms${rows} via ${d.route}: ${d.message}`;
|
|
28
|
+
}
|
|
29
|
+
function decodeComputeDiagnostics(registers, names) {
|
|
30
|
+
let out = [], count = Math.min(registers[(8)], (32));
|
|
31
|
+
for (let k = 0; k < count; k++) {
|
|
32
|
+
let at = (16) + k * (8), code = CODES[registers[at + (0)]] ?? null;
|
|
33
|
+
code !== null && out.push({
|
|
34
|
+
code,
|
|
35
|
+
kernel: names(registers[at + (1)], registers[at + (2)]),
|
|
36
|
+
route: ROUTES[registers[at + (4)]] ?? "interpreter",
|
|
37
|
+
ms: registers[at + (5)] / (1e6),
|
|
38
|
+
rows: registers[at + (6)],
|
|
39
|
+
frame: registers[at + (7)],
|
|
40
|
+
message: MESSAGES[code]
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
return out;
|
|
44
|
+
}
|
|
45
|
+
var ComputeMonitor = class _ComputeMonitor {
|
|
46
|
+
constructor(exports, memory) {
|
|
47
|
+
this.exports = exports;
|
|
48
|
+
this.memory = memory;
|
|
49
|
+
this.names = /* @__PURE__ */ new Map();
|
|
50
|
+
this.kernels = /* @__PURE__ */ new Map();
|
|
51
|
+
this.levels = /* @__PURE__ */ new Map();
|
|
52
|
+
this.view = new Uint32Array(0);
|
|
53
|
+
this.readout = { budgetMs: 0, spentMs: 0, deferred: 0, stopped: 0 };
|
|
54
|
+
this.nameOf = (space, binding) => this.names.get(keyOf(space, binding)) ?? null;
|
|
55
|
+
this.onBound = null;
|
|
56
|
+
}
|
|
57
|
+
get last() {
|
|
58
|
+
return this.readout;
|
|
59
|
+
}
|
|
60
|
+
static bind(symbols, memory) {
|
|
61
|
+
for (let name of ENGINE_COMPUTE_EXPORT_NAMES) if (typeof symbols[name] != "function") return null;
|
|
62
|
+
return new _ComputeMonitor(symbols, memory);
|
|
63
|
+
}
|
|
64
|
+
bound(space, binding, kernel, priority) {
|
|
65
|
+
let key = keyOf(space, binding);
|
|
66
|
+
this.names.set(key, kernel), this.kernels.set(key, [space, binding, kernel]), this.levels.set(key, 0), this.prioritise(space, binding, priority), this.onBound?.(space, binding, kernel);
|
|
67
|
+
}
|
|
68
|
+
unbound(space, binding) {
|
|
69
|
+
let key = keyOf(space, binding);
|
|
70
|
+
this.names.delete(key), this.kernels.delete(key), this.levels.delete(key);
|
|
71
|
+
}
|
|
72
|
+
boundKernels() {
|
|
73
|
+
return this.kernels.values();
|
|
74
|
+
}
|
|
75
|
+
prioritise(space, binding, priority) {
|
|
76
|
+
let key = keyOf(space, binding);
|
|
77
|
+
(this.levels.get(key) ?? 0) !== priority && this.exports.engine_compute_priority(space, binding, priority) >= 0 && this.levels.set(key, priority);
|
|
78
|
+
}
|
|
79
|
+
frame(tier, frameMicros, sink) {
|
|
80
|
+
this.exports.engine_compute_frame(Math.min(Math.max(Math.trunc(tier), 0), (2)), Math.max(Math.trunc(frameMicros), 0));
|
|
81
|
+
let at = this.exports.engine_compute_registers();
|
|
82
|
+
if (at === 0) return;
|
|
83
|
+
let buffer = this.memory.buffer;
|
|
84
|
+
(this.view.buffer !== buffer || this.view.byteOffset !== at) && (this.view = new Uint32Array(buffer, at, COMPUTE_REGISTER_WORDS));
|
|
85
|
+
let registers = this.view, readout = this.readout;
|
|
86
|
+
if (readout.budgetMs = registers[(1)] / (1e6), readout.spentMs = registers[(2)] / (1e6), readout.deferred = registers[(5)], readout.stopped = registers[(6)], registers[(8)] === 0) return;
|
|
87
|
+
let found = decodeComputeDiagnostics(registers, this.nameOf);
|
|
88
|
+
this.exports.engine_compute_clear();
|
|
89
|
+
for (let diagnostic of found) sink(diagnostic);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
// src/game/kernel/events.ts
|
|
94
|
+
var TRUE_BITS = 4294967295, channels = /* @__PURE__ */ new Map(), currentRow = -1;
|
|
95
|
+
function setEmitRow(row) {
|
|
96
|
+
currentRow = row;
|
|
97
|
+
}
|
|
98
|
+
function emitRow() {
|
|
99
|
+
return currentRow;
|
|
100
|
+
}
|
|
101
|
+
var EventChannel = class {
|
|
102
|
+
constructor(name, fields, capacity) {
|
|
103
|
+
this.name = name;
|
|
104
|
+
this.fields = fields;
|
|
105
|
+
this.capacity = capacity;
|
|
106
|
+
this.count = 0;
|
|
107
|
+
this.lost = 0;
|
|
108
|
+
this.at = 0;
|
|
109
|
+
if (this.names = Object.keys(fields), this.kinds = this.names.map((n) => fields[n]), this.names.length > 8) throw new chunk2V7IL4HC_js.GameError("invalid_argument", `events carry at most ${8} fields`);
|
|
110
|
+
this.ring = new Uint32Array(capacity * 10), this.floats = new Float32Array(this.ring.buffer), this.ints = new Int32Array(this.ring.buffer);
|
|
111
|
+
let event = {}, channel = this;
|
|
112
|
+
Object.defineProperty(event, "row", { get: () => channel.ring[channel.at + 1], enumerable: true }), this.names.forEach((name2, k) => {
|
|
113
|
+
let word = 2 + k, kind = this.kinds[k];
|
|
114
|
+
Object.defineProperty(event, name2, {
|
|
115
|
+
get: () => kind === "f32" ? channel.floats[channel.at + word] : kind === "i32" ? channel.ints[channel.at + word] : kind === "bool" ? channel.ring[channel.at + word] !== 0 : channel.ring[channel.at + word],
|
|
116
|
+
enumerable: true
|
|
117
|
+
});
|
|
118
|
+
}), this.event = Object.freeze(event);
|
|
119
|
+
}
|
|
120
|
+
get pending() {
|
|
121
|
+
return this.count;
|
|
122
|
+
}
|
|
123
|
+
get dropped() {
|
|
124
|
+
return this.lost;
|
|
125
|
+
}
|
|
126
|
+
emit(payload) {
|
|
127
|
+
let values = payload;
|
|
128
|
+
if (this.count >= this.capacity) {
|
|
129
|
+
this.lost++;
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
let at = this.count * 10;
|
|
133
|
+
this.ring[at + 1] = currentRow >>> 0;
|
|
134
|
+
for (let k = 0; k < this.names.length; k++) {
|
|
135
|
+
let value = values[this.names[k]], word = at + 2 + k, kind = this.kinds[k];
|
|
136
|
+
kind === "f32" ? this.floats[word] = value : kind === "bool" ? this.ring[word] = value ? (4294967295) : 0 : this.ring[word] = value >>> 0;
|
|
137
|
+
}
|
|
138
|
+
this.count++;
|
|
139
|
+
}
|
|
140
|
+
accept(source, entry) {
|
|
141
|
+
if (this.count >= this.capacity) {
|
|
142
|
+
this.lost++;
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
this.ring.set(source.subarray(entry, entry + 10), this.count * 10), this.count++;
|
|
146
|
+
}
|
|
147
|
+
addLost(count) {
|
|
148
|
+
this.lost += count;
|
|
149
|
+
}
|
|
150
|
+
drain(visit) {
|
|
151
|
+
let total = this.count;
|
|
152
|
+
for (let k = 0; k < total; k++)
|
|
153
|
+
this.at = k * 10, visit(this.event);
|
|
154
|
+
return this.count = 0, this.lost = 0, total;
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
function events(name, fields, capacity = chunkIR74FJHU_js.DEFAULT_EVENT_CAPACITY) {
|
|
158
|
+
if (channels.has(name)) throw new chunk2V7IL4HC_js.GameError("invalid_argument", `an event channel named ${name} already exists`);
|
|
159
|
+
let channel = new EventChannel(name, fields, capacity);
|
|
160
|
+
return channels.set(name, channel), channel;
|
|
161
|
+
}
|
|
162
|
+
function registerChannel(channel) {
|
|
163
|
+
if (channels.has(channel.name)) throw new chunk2V7IL4HC_js.GameError("invalid_argument", `an event channel named ${channel.name} already exists`);
|
|
164
|
+
channels.set(channel.name, channel);
|
|
165
|
+
}
|
|
166
|
+
function routeEvents(ring, metas) {
|
|
167
|
+
let count = ring[chunkIR74FJHU_js.RING_COUNT], dropped = ring[chunkIR74FJHU_js.RING_DROPPED];
|
|
168
|
+
if (!(metas === void 0 || count === 0 && dropped === 0)) {
|
|
169
|
+
for (let k = 0; k < count; k++) {
|
|
170
|
+
let entry = chunkIR74FJHU_js.RING_HEADER_WORDS + k * 10, meta = metas[ring[entry]];
|
|
171
|
+
(meta === void 0 ? void 0 : channels.get(meta.name))?.accept(ring, entry);
|
|
172
|
+
}
|
|
173
|
+
if (dropped > 0) for (let meta of metas) channels.get(meta.name)?.addLost(dropped);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
// src/game/kernel/joins.ts
|
|
178
|
+
var NO_REF = 4294967295;
|
|
179
|
+
function symbol2(name) {
|
|
180
|
+
return chunkIR74FJHU_js.symbol(name);
|
|
181
|
+
}
|
|
182
|
+
function pickRows(n, when, seed, tick, weight) {
|
|
183
|
+
throw new chunk2V7IL4HC_js.GameError("unsupported_feature", "pickRows() runs inside compiled kernels; build the game (cimplify build or cimplify dev) so the kernel has bytecode");
|
|
184
|
+
}
|
|
185
|
+
function list(kind, capacity) {
|
|
186
|
+
if (!Number.isInteger(capacity) || capacity < 1 || capacity > chunkIR74FJHU_js.DATA_LIST_MAX) throw new chunk2V7IL4HC_js.GameError("invalid_argument", `lists hold 1..${chunkIR74FJHU_js.DATA_LIST_MAX} elements per row`);
|
|
187
|
+
return Object.freeze({ at: "u32", len: "u32" });
|
|
188
|
+
}
|
|
189
|
+
var pools = /* @__PURE__ */ new WeakMap(), poolEngine = null, WORD_BYTES = 4;
|
|
190
|
+
function setPoolEngine(engine) {
|
|
191
|
+
poolEngine = engine;
|
|
192
|
+
}
|
|
193
|
+
function poolEntry(table, field, capacity, kind, component) {
|
|
194
|
+
let byField = pools.get(table);
|
|
195
|
+
byField === void 0 && (byField = /* @__PURE__ */ new Map(), pools.set(table, byField));
|
|
196
|
+
let key = `${field}#${component}`, words = table.capacity * capacity, entry = byField.get(key);
|
|
197
|
+
if (entry === void 0 || entry.words !== words || entry.kind !== kind) {
|
|
198
|
+
let engine = table.native ? poolEngine : null, at = engine === null ? 0 : engine.alloc(words * (4));
|
|
199
|
+
if (engine !== null && at === 0) throw new chunk2V7IL4HC_js.GameError("capacity_exceeded", `engine memory cannot hold the ${field} list pool`);
|
|
200
|
+
at !== 0 && engine !== null && new Uint32Array(engine.memory.buffer, at, words).fill(0), entry = { at, words, kind, array: null }, byField.set(key, entry);
|
|
201
|
+
}
|
|
202
|
+
return entry;
|
|
203
|
+
}
|
|
204
|
+
function view(entry) {
|
|
205
|
+
if (entry.at === 0)
|
|
206
|
+
return entry.array ?? (entry.array = entry.kind === "f32" ? new Float32Array(entry.words) : entry.kind === "i32" ? new Int32Array(entry.words) : new Uint32Array(entry.words)), entry.array;
|
|
207
|
+
let buffer = poolEngine.memory.buffer;
|
|
208
|
+
return (entry.array === null || entry.array.buffer !== buffer) && (entry.array = entry.kind === "f32" ? new Float32Array(buffer, entry.at, entry.words) : entry.kind === "i32" ? new Int32Array(buffer, entry.at, entry.words) : new Uint32Array(buffer, entry.at, entry.words)), entry.array;
|
|
209
|
+
}
|
|
210
|
+
function listPool(table, field, capacity, kind = "u32", component = 0) {
|
|
211
|
+
return view(poolEntry(table, field, capacity, kind === "bool" ? "u32" : kind, component));
|
|
212
|
+
}
|
|
213
|
+
function listPoolAddress(table, field, capacity, kind = "u32", component = 0) {
|
|
214
|
+
let entry = poolEntry(table, field, capacity, kind === "bool" ? "u32" : kind, component);
|
|
215
|
+
return { at: entry.at, words: entry.words };
|
|
216
|
+
}
|
|
217
|
+
function readDataReport(meta, words) {
|
|
218
|
+
let tallies = {};
|
|
219
|
+
(meta.data?.tallies ?? []).forEach((name, k) => {
|
|
220
|
+
tallies[name] = words[k];
|
|
221
|
+
});
|
|
222
|
+
let sites = words[chunkIR74FJHU_js.DATA_TALLIES + 5], picks = [], at = chunkIR74FJHU_js.DATA_TALLIES + 6 + sites;
|
|
223
|
+
for (let site = 0; site < sites; site++) {
|
|
224
|
+
let n = words[chunkIR74FJHU_js.DATA_TALLIES + 6 + site];
|
|
225
|
+
picks.push(words.slice(at, at + n)), at += n;
|
|
226
|
+
}
|
|
227
|
+
let t = chunkIR74FJHU_js.DATA_TALLIES;
|
|
228
|
+
return { picks, tallies, commands: { sent: words[t], applied: words[t + 1], dropped: words[t + 2], overflow: words[t + 3] }, unplaced: words[t + 4] };
|
|
229
|
+
}
|
|
230
|
+
var STORAGE = { f32: 0, i32: 1, u32: 2, u8: 3, vec2: 0, vec3: 0, vec4: 0 };
|
|
231
|
+
function column(table, field, component, kernel) {
|
|
232
|
+
if (!(field in table.schema)) throw new chunk2V7IL4HC_js.GameError("invalid_argument", `kernel ${kernel} reads ${field}, which its table does not have`);
|
|
233
|
+
return { values: table.values(field, component), storage: STORAGE[table.schema[field]] };
|
|
234
|
+
}
|
|
235
|
+
function readList(table, field, capacity, row, kind = "u32") {
|
|
236
|
+
let at = column(table, `${field}.at`, 0, "readList"), len = column(table, `${field}.len`, 0, "readList"), pool = listPool(table, field, capacity, kind), sweep = new chunkIR74FJHU_js.ListSweep(0, 0, 0, capacity);
|
|
237
|
+
sweep.bind(table.capacity), sweep.run(at, len, 2, table.count);
|
|
238
|
+
let base = chunkIR74FJHU_js.readAs(2, at.storage, at.values[row]), n = chunkIR74FJHU_js.readAs(2, len.storage, len.values[row]);
|
|
239
|
+
return base === 0 ? [] : Array.from(pool.subarray(base - 1, base - 1 + n));
|
|
240
|
+
}
|
|
241
|
+
function isTable(value) {
|
|
242
|
+
return typeof value == "object" && value !== null && "schema" in value && "capacity" in value && "values" in value;
|
|
243
|
+
}
|
|
244
|
+
function hasData(meta) {
|
|
245
|
+
if (meta.data !== void 0) return true;
|
|
246
|
+
let slots = meta.slots;
|
|
247
|
+
for (let k = 0; k < slots.length; k++) if (slots[k].table !== void 0) return true;
|
|
248
|
+
return false;
|
|
249
|
+
}
|
|
250
|
+
function dataTables(meta, own, args) {
|
|
251
|
+
let tables = [own];
|
|
252
|
+
for (let t of meta.data?.tables ?? []) {
|
|
253
|
+
let value = args[t.position];
|
|
254
|
+
if (!isTable(value)) throw new chunk2V7IL4HC_js.GameError("invalid_argument", `kernel ${meta.name} takes the table for ${t.name} as argument ${t.position + 1}; pass an entity table`);
|
|
255
|
+
tables[t.table] = value;
|
|
256
|
+
}
|
|
257
|
+
return tables;
|
|
258
|
+
}
|
|
259
|
+
function scalarArgs(meta, args) {
|
|
260
|
+
let skip = new Set((meta.data?.tables ?? []).map((t) => t.position));
|
|
261
|
+
return args.filter((_, k) => !skip.has(k));
|
|
262
|
+
}
|
|
263
|
+
function dataColumn(meta, tables, slot) {
|
|
264
|
+
if (slot.table === void 0) return null;
|
|
265
|
+
let table = tables[slot.table];
|
|
266
|
+
return slot.pool !== void 0 ? { values: listPool(table, slot.field, slot.pool, slot.kind, slot.component), storage: slot.kind === "f32" ? 0 : slot.kind === "i32" ? 1 : 2 } : column(table, slot.field, slot.component, meta.name);
|
|
267
|
+
}
|
|
268
|
+
function bindData(machine, meta, tables, columns, bound) {
|
|
269
|
+
for (let t of meta.data?.tables ?? []) {
|
|
270
|
+
let table = tables[t.table];
|
|
271
|
+
bound.get(t.table) !== table.capacity && (machine.bindTable(t.table, table.capacity), bound.set(t.table, table.capacity)), machine.setCount(t.table, table.count);
|
|
272
|
+
}
|
|
273
|
+
meta.slots.forEach((slot, k) => {
|
|
274
|
+
slot.pool !== void 0 && bound.get(-1 - k) !== columns[k].values.length && (machine.bindPool(k, columns[k].values.length), bound.set(-1 - k, columns[k].values.length));
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
function reportData(machine, meta) {
|
|
278
|
+
let tallies = {};
|
|
279
|
+
return (meta.data?.tallies ?? []).forEach((name, k) => {
|
|
280
|
+
tallies[name] = machine.tallies[k];
|
|
281
|
+
}), {
|
|
282
|
+
picks: Array.from({ length: meta.data?.picks ?? 0 }, (_, k) => machine.pickRows(k).slice()),
|
|
283
|
+
tallies,
|
|
284
|
+
commands: { ...machine.stats },
|
|
285
|
+
unplaced: machine.unplaced
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
var bits = new Uint32Array(1), floats = new Float32Array(bits.buffer), Queue = class extends EventChannel {
|
|
289
|
+
constructor(name, fields, table) {
|
|
290
|
+
super(name, fields, table.capacity);
|
|
291
|
+
this.table = table;
|
|
292
|
+
this.overflow = 0;
|
|
293
|
+
for (let field of Object.keys(fields))
|
|
294
|
+
if (!(field in table.schema)) throw new chunk2V7IL4HC_js.GameError("invalid_argument", `queue ${name} needs a ${field} column in its table`);
|
|
295
|
+
}
|
|
296
|
+
accept(source, entry) {
|
|
297
|
+
let table = this.table;
|
|
298
|
+
if (table.count >= table.capacity) {
|
|
299
|
+
this.overflow++;
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
302
|
+
let row = table.spawn();
|
|
303
|
+
this.names.forEach((name, k) => {
|
|
304
|
+
let raw = source[entry + 2 + k], values = table.values(name), kind = this.kinds[k];
|
|
305
|
+
kind === "f32" ? (bits[0] = raw, values[row] = floats[0]) : kind === "i32" ? values[row] = raw | 0 : kind === "bool" ? values[row] = raw !== 0 ? 1 : 0 : values[row] = raw >>> 0;
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
emit(payload) {
|
|
309
|
+
let table = this.table;
|
|
310
|
+
if (table.count >= table.capacity) {
|
|
311
|
+
this.overflow++;
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
let row = table.spawn(), values = payload;
|
|
315
|
+
for (let name of this.names) {
|
|
316
|
+
let value = values[name];
|
|
317
|
+
table.values(name)[row] = typeof value == "boolean" ? value ? 1 : 0 : value;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
push(payload) {
|
|
321
|
+
this.emit(payload);
|
|
322
|
+
}
|
|
323
|
+
get dropped() {
|
|
324
|
+
return super.dropped + this.overflow;
|
|
325
|
+
}
|
|
326
|
+
clear() {
|
|
327
|
+
this.table.count = 0, this.overflow = 0;
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
function queue(name, fields, table) {
|
|
331
|
+
let q = new Queue(name, fields, table);
|
|
332
|
+
return registerChannel(q), q;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
// src/game/kernel/wide.ts
|
|
336
|
+
var MASK64 = (1n << 64n) - 1n, MASK32 = 0xffffffffn;
|
|
337
|
+
function f64(x) {
|
|
338
|
+
return typeof x == "bigint" ? Number(BigInt.asUintN(64, x)) : typeof x == "boolean" ? x ? 1 : 0 : x;
|
|
339
|
+
}
|
|
340
|
+
function u64(x) {
|
|
341
|
+
return typeof x == "bigint" ? BigInt.asUintN(64, x) : typeof x == "boolean" ? x ? 1n : 0n : chunkIR74FJHU_js.toUint64(x);
|
|
342
|
+
}
|
|
343
|
+
function toU32(x) {
|
|
344
|
+
return typeof x == "bigint" ? Number(BigInt.asUintN(64, x) & MASK32) : typeof x == "boolean" ? x ? 1 : 0 : chunkIR74FJHU_js.toUint32(x);
|
|
345
|
+
}
|
|
346
|
+
function f64Bits(lo, hi) {
|
|
347
|
+
return chunkIR74FJHU_js.joinF64(lo, hi);
|
|
348
|
+
}
|
|
349
|
+
function u64Words(lo, hi) {
|
|
350
|
+
return chunkIR74FJHU_js.joinU64(lo, hi);
|
|
351
|
+
}
|
|
352
|
+
var argView = new Float64Array(1), argHalves = new Uint32Array(argView.buffer);
|
|
353
|
+
function writeWideArg(words, at, kind, value) {
|
|
354
|
+
if (kind === "u64") {
|
|
355
|
+
let v = typeof value == "bigint" ? BigInt.asUintN(64, value) : chunkIR74FJHU_js.toUint64(Number(value));
|
|
356
|
+
return words[at] = Number(v & MASK32), words[at + 1] = Number(v >> 32n), at + 2;
|
|
357
|
+
}
|
|
358
|
+
argView[0] = typeof value == "bigint" ? Number(value) : value;
|
|
359
|
+
let nan = Number.isNaN(argView[0]);
|
|
360
|
+
return words[at] = nan ? 0 : argHalves[0], words[at + 1] = nan ? 2146959360 : argHalves[1], at + 2;
|
|
361
|
+
}
|
|
362
|
+
function width(x) {
|
|
363
|
+
return typeof x == "bigint" ? 64 : 32;
|
|
364
|
+
}
|
|
365
|
+
function big(x) {
|
|
366
|
+
return typeof x == "bigint" ? BigInt.asUintN(64, x) : BigInt(x >>> 0);
|
|
367
|
+
}
|
|
368
|
+
function back(like, v) {
|
|
369
|
+
return typeof like == "bigint" ? v & MASK64 : Number(v & MASK32);
|
|
370
|
+
}
|
|
371
|
+
function ones(n, bits2) {
|
|
372
|
+
return n >= bits2 ? (1n << BigInt(bits2)) - 1n : (1n << BigInt(Math.max(0, n))) - 1n;
|
|
373
|
+
}
|
|
374
|
+
function popcnt(x) {
|
|
375
|
+
let v = big(x), n = 0;
|
|
376
|
+
for (; v > 0n; )
|
|
377
|
+
n += Number(v & 1n), v >>= 1n;
|
|
378
|
+
return n;
|
|
379
|
+
}
|
|
380
|
+
function clz(x) {
|
|
381
|
+
let bits2 = width(x), v = big(x), n = 0;
|
|
382
|
+
for (let k = bits2 - 1; k >= 0 && (v >> BigInt(k) & 1n) === 0n; k--) n++;
|
|
383
|
+
return n;
|
|
384
|
+
}
|
|
385
|
+
function ctz(x) {
|
|
386
|
+
let bits2 = width(x), v = big(x), n = 0;
|
|
387
|
+
for (let k = 0; k < bits2 && (v >> BigInt(k) & 1n) === 0n; k++) n++;
|
|
388
|
+
return n;
|
|
389
|
+
}
|
|
390
|
+
function rotl(x, by) {
|
|
391
|
+
let bits2 = width(x), s = BigInt(by & bits2 - 1), v = big(x);
|
|
392
|
+
return back(x, (v << s | v >> BigInt(bits2) - s) & ones(bits2, bits2));
|
|
393
|
+
}
|
|
394
|
+
function rotr(x, by) {
|
|
395
|
+
let bits2 = width(x);
|
|
396
|
+
return rotl(x, bits2 - (by & bits2 - 1) & bits2 - 1);
|
|
397
|
+
}
|
|
398
|
+
function bitExtract(x, offset, count) {
|
|
399
|
+
let bits2 = width(x);
|
|
400
|
+
return back(x, big(x) >> BigInt(offset & bits2 - 1) & ones(count >>> 0, bits2));
|
|
401
|
+
}
|
|
402
|
+
function bitInsert(base, value, offset, count) {
|
|
403
|
+
let bits2 = width(base), at = BigInt(offset & bits2 - 1), field = ones(count >>> 0, bits2) << at;
|
|
404
|
+
return back(base, (big(base) & ~field | big(value) << at & field) & ones(bits2, bits2));
|
|
405
|
+
}
|
|
406
|
+
function spread(v, bits2, step) {
|
|
407
|
+
let out = 0n;
|
|
408
|
+
for (let k = 0; k < bits2; k++) out |= (v >> BigInt(k) & 1n) << BigInt(k * step);
|
|
409
|
+
return out;
|
|
410
|
+
}
|
|
411
|
+
function gather(v, bits2, step, at) {
|
|
412
|
+
let out = 0n;
|
|
413
|
+
for (let k = 0; k < bits2; k++) out |= (v >> BigInt(k * step + at) & 1n) << BigInt(k);
|
|
414
|
+
return Number(out);
|
|
415
|
+
}
|
|
416
|
+
function morton2(x, y) {
|
|
417
|
+
return Number(spread(big(x), 16, 2) | spread(big(y), 16, 2) << 1n);
|
|
418
|
+
}
|
|
419
|
+
function morton3(x, y, z) {
|
|
420
|
+
return Number(spread(big(x), 10, 3) | spread(big(y), 10, 3) << 1n | spread(big(z), 10, 3) << 2n);
|
|
421
|
+
}
|
|
422
|
+
function morton2Wide(x, y) {
|
|
423
|
+
return spread(big(x), 32, 2) | spread(big(y), 32, 2) << 1n;
|
|
424
|
+
}
|
|
425
|
+
function morton3Wide(x, y, z) {
|
|
426
|
+
return spread(big(x), 21, 3) | spread(big(y), 21, 3) << 1n | spread(big(z), 21, 3) << 2n;
|
|
427
|
+
}
|
|
428
|
+
function unmorton2(code) {
|
|
429
|
+
let bits2 = typeof code == "bigint" ? 32 : 16, v = big(code);
|
|
430
|
+
return { x: gather(v, bits2, 2, 0), y: gather(v, bits2, 2, 1) };
|
|
431
|
+
}
|
|
432
|
+
function unmorton3(code) {
|
|
433
|
+
let bits2 = typeof code == "bigint" ? 21 : 10, v = big(code);
|
|
434
|
+
return { x: gather(v, bits2, 3, 0), y: gather(v, bits2, 3, 1), z: gather(v, bits2, 3, 2) };
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
// src/game/fluid/engine.ts
|
|
438
|
+
var FLUID_DESC_FLOATS = 18, FLUID_SURFACE_FLOATS = 17, FLUID_EMITTER_FLOATS = 12, FLUID_COLLIDER_FLOATS = 19, FLUID_COLLIDER_VOLUME = 18, FLUID_MAX_COLLIDERS = 64;
|
|
439
|
+
var FLUID_MAX_EMITTERS = 8, FLUID_FORCE_WORDS = 6, FLUID_FORCE_FLOATS = (64) * (6), FLUID_CAP_SIMULATION = 1, FLUID_CAP_SURFACE = 2, ENGINE_FLUID_EXPORT_NAMES = [
|
|
440
|
+
"engine_fluid_caps",
|
|
441
|
+
"engine_fluid_create",
|
|
442
|
+
"engine_fluid_destroy",
|
|
443
|
+
"engine_fluid_parameters",
|
|
444
|
+
"engine_fluid_surface",
|
|
445
|
+
"engine_fluid_emitter",
|
|
446
|
+
"engine_fluid_colliders",
|
|
447
|
+
"engine_fluid_step",
|
|
448
|
+
"engine_fluid_pause",
|
|
449
|
+
"engine_fluid_clear",
|
|
450
|
+
"engine_fluid_count",
|
|
451
|
+
"engine_fluid_forces",
|
|
452
|
+
"engine_fluid_volume",
|
|
453
|
+
"engine_fluid_volume_info",
|
|
454
|
+
"engine_fluid_volumes_clear"
|
|
455
|
+
], NULL = 0, F32_BYTES = 4, U32_BYTES = 4, MICROS = 1e6, SCRATCH_FLOATS = (19) * (64) + FLUID_FORCE_FLOATS;
|
|
456
|
+
function engineFluidExports(runtime) {
|
|
457
|
+
let symbols = runtime.symbols;
|
|
458
|
+
return ENGINE_FLUID_EXPORT_NAMES.every((name) => typeof symbols[name] == "function") ? symbols : null;
|
|
459
|
+
}
|
|
460
|
+
var EngineFluids = class {
|
|
461
|
+
constructor(runtime, exports, render) {
|
|
462
|
+
this.runtime = runtime;
|
|
463
|
+
this.exports = exports;
|
|
464
|
+
this.render = render;
|
|
465
|
+
this.pointer = (0);
|
|
466
|
+
this.buffer = null;
|
|
467
|
+
this.floats = new Float32Array(0);
|
|
468
|
+
this.caps = exports.engine_fluid_caps();
|
|
469
|
+
}
|
|
470
|
+
scratch() {
|
|
471
|
+
if (this.pointer === (0) && (this.pointer = this.runtime.exports.engine_alloc(SCRATCH_FLOATS * (4), chunk2O2CG465_js.COLUMN_ALIGN), this.pointer === (0)))
|
|
472
|
+
throw new chunk2V7IL4HC_js.GameError("capacity_exceeded", "engine memory cannot hold fluid parameters");
|
|
473
|
+
let buffer = this.runtime.memory.buffer;
|
|
474
|
+
return buffer !== this.buffer && (this.buffer = buffer, this.floats = new Float32Array(buffer)), this.pointer;
|
|
475
|
+
}
|
|
476
|
+
put(values, count = values.length) {
|
|
477
|
+
let pointer = this.scratch();
|
|
478
|
+
return this.floats.set(values.subarray(0, count), pointer >>> 2), pointer;
|
|
479
|
+
}
|
|
480
|
+
check(code, what) {
|
|
481
|
+
if (!(code >= 0)) throw new chunk2V7IL4HC_js.GameError("invalid_argument", `the engine refused the fluid ${what} (${code})`);
|
|
482
|
+
return code;
|
|
483
|
+
}
|
|
484
|
+
create(desc, surface) {
|
|
485
|
+
let descPointer = this.put(desc), surfacePointer = descPointer + (18) * (4);
|
|
486
|
+
return this.floats.set(surface, surfacePointer >>> 2), this.check(this.exports.engine_fluid_create(this.render(), descPointer, surfacePointer), "description");
|
|
487
|
+
}
|
|
488
|
+
destroy(fluid) {
|
|
489
|
+
this.exports.engine_fluid_destroy(this.render(), fluid);
|
|
490
|
+
}
|
|
491
|
+
parameters(fluid, desc) {
|
|
492
|
+
this.check(this.exports.engine_fluid_parameters(this.render(), fluid, this.put(desc)), "parameters");
|
|
493
|
+
}
|
|
494
|
+
surface(fluid, surface) {
|
|
495
|
+
this.check(this.exports.engine_fluid_surface(this.render(), fluid, this.put(surface)), "surface");
|
|
496
|
+
}
|
|
497
|
+
emitter(fluid, index, emitter) {
|
|
498
|
+
this.check(this.exports.engine_fluid_emitter(this.render(), fluid, index, this.put(emitter)), "emitter");
|
|
499
|
+
}
|
|
500
|
+
colliders(fluid, colliders, count) {
|
|
501
|
+
this.check(this.exports.engine_fluid_colliders(this.render(), fluid, this.put(colliders, count * (19)), count), "colliders");
|
|
502
|
+
}
|
|
503
|
+
step(fluid, seconds) {
|
|
504
|
+
this.exports.engine_fluid_step(this.render(), fluid, Math.max(0, Math.round(seconds * (1e6))));
|
|
505
|
+
}
|
|
506
|
+
pause(fluid, paused) {
|
|
507
|
+
this.exports.engine_fluid_pause(this.render(), fluid, paused ? 1 : 0);
|
|
508
|
+
}
|
|
509
|
+
clear(fluid) {
|
|
510
|
+
this.exports.engine_fluid_clear(this.render(), fluid);
|
|
511
|
+
}
|
|
512
|
+
count(fluid) {
|
|
513
|
+
return Math.max(0, this.exports.engine_fluid_count(this.render(), fluid));
|
|
514
|
+
}
|
|
515
|
+
forces(fluid, out) {
|
|
516
|
+
let pointer = this.scratch() + (19) * (64) * (4);
|
|
517
|
+
if (!(this.exports.engine_fluid_forces(this.render(), fluid, pointer) >= 0)) return;
|
|
518
|
+
let at = pointer >>> 2;
|
|
519
|
+
for (let i = 0; i < FLUID_FORCE_FLOATS; i++) out[i] = this.floats[at + i];
|
|
520
|
+
}
|
|
521
|
+
volume(fluid, positions, indices, resolution, padding) {
|
|
522
|
+
let vertices = Math.floor(positions.length / 3), triangles = Math.floor(indices.length / 3), positionBytes = vertices * 3 * (4), indexBytes = triangles * 3 * (4), bytes = positionBytes + indexBytes, block = this.runtime.exports.engine_alloc(bytes, chunk2O2CG465_js.COLUMN_ALIGN);
|
|
523
|
+
if (block === (0)) throw new chunk2V7IL4HC_js.GameError("capacity_exceeded", "engine memory cannot hold the collider mesh");
|
|
524
|
+
try {
|
|
525
|
+
let memory = this.runtime.memory.buffer;
|
|
526
|
+
new Float32Array(memory, block, vertices * 3).set(positions.subarray(0, vertices * 3)), new Uint32Array(memory, block + positionBytes, triangles * 3).set(indices.subarray(0, triangles * 3));
|
|
527
|
+
let index = this.check(
|
|
528
|
+
this.exports.engine_fluid_volume(this.render(), fluid, block, vertices, block + positionBytes, triangles, resolution, padding),
|
|
529
|
+
"collider mesh"
|
|
530
|
+
), info = this.scratch();
|
|
531
|
+
this.check(this.exports.engine_fluid_volume_info(this.render(), fluid, index, info), "volume");
|
|
532
|
+
let at = info >>> 2, f = this.floats;
|
|
533
|
+
return { index, half: [f[at + 3], f[at + 4], f[at + 5]], centre: [f[at + 6], f[at + 7], f[at + 8]] };
|
|
534
|
+
} finally {
|
|
535
|
+
this.runtime.exports.engine_free(block, bytes, chunk2O2CG465_js.COLUMN_ALIGN);
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
clearVolumes(fluid) {
|
|
539
|
+
this.exports.engine_fluid_volumes_clear(this.render(), fluid);
|
|
540
|
+
}
|
|
541
|
+
};
|
|
542
|
+
|
|
543
|
+
// src/game/chemistry/engine.ts
|
|
544
|
+
var CHEMISTRY_EXPORT_NAMES = [
|
|
545
|
+
"engine_chemistry_open",
|
|
546
|
+
"engine_chemistry_close",
|
|
547
|
+
"engine_chemistry_define",
|
|
548
|
+
"engine_chemistry_find",
|
|
549
|
+
"engine_chemistry_catalog",
|
|
550
|
+
"engine_chemistry_text",
|
|
551
|
+
"engine_chemistry_counts",
|
|
552
|
+
"engine_chemistry_species_info",
|
|
553
|
+
"engine_chemistry_reaction_info",
|
|
554
|
+
"engine_chemistry_grid_open",
|
|
555
|
+
"engine_chemistry_grid_close",
|
|
556
|
+
"engine_chemistry_grid_step",
|
|
557
|
+
"engine_chemistry_grid_paint",
|
|
558
|
+
"engine_chemistry_grid_set",
|
|
559
|
+
"engine_chemistry_grid_heat",
|
|
560
|
+
"engine_chemistry_grid_power",
|
|
561
|
+
"engine_chemistry_grid_columns",
|
|
562
|
+
"engine_chemistry_grid_colours",
|
|
563
|
+
"engine_chemistry_grid_events",
|
|
564
|
+
"engine_chemistry_grid_clear_events",
|
|
565
|
+
"engine_chemistry_grid_watch",
|
|
566
|
+
"engine_chemistry_grid_threshold",
|
|
567
|
+
"engine_chemistry_grid_unthreshold",
|
|
568
|
+
"engine_chemistry_grid_fired",
|
|
569
|
+
"engine_chemistry_grid_stats",
|
|
570
|
+
"engine_chemistry_grid_probe",
|
|
571
|
+
"engine_chemistry_grid_save",
|
|
572
|
+
"engine_chemistry_grid_saved",
|
|
573
|
+
"engine_chemistry_grid_load",
|
|
574
|
+
"engine_chemistry_vessel_open",
|
|
575
|
+
"engine_chemistry_vessel_close",
|
|
576
|
+
"engine_chemistry_vessel_add",
|
|
577
|
+
"engine_chemistry_vessel_take",
|
|
578
|
+
"engine_chemistry_vessel_heat",
|
|
579
|
+
"engine_chemistry_vessel_power",
|
|
580
|
+
"engine_chemistry_vessel_step",
|
|
581
|
+
"engine_chemistry_vessel_vent",
|
|
582
|
+
"engine_chemistry_vessel_state",
|
|
583
|
+
"engine_chemistry_particles_open",
|
|
584
|
+
"engine_chemistry_particles_close",
|
|
585
|
+
"engine_chemistry_particles_spawn",
|
|
586
|
+
"engine_chemistry_particles_step",
|
|
587
|
+
"engine_chemistry_particles_columns",
|
|
588
|
+
"engine_chemistry_particles_events"
|
|
589
|
+
], CHEMISTRY_NATURE_WORDS = 8, CHEMISTRY_BOX_WORDS = 6, CHEMISTRY_SPECIES_WORDS = 16, CHEMISTRY_REACTION_WORDS = 24, CHEMISTRY_COLUMNS = 16, CHEMISTRY_STATS_WORDS = 16, CHEMISTRY_PROBE_WORDS = 16, CHEMISTRY_EVENT_HEADER = 2, CHEMISTRY_EVENT_WORDS = 4, CHEMISTRY_VESSEL_SLOTS = 16, CHEMISTRY_VESSEL_WORDS = 36, CHEMISTRY_ATMOSPHERE = 0, CHEMISTRY_VACUUM = 4294967295, CHEMISTRY_REFUSED = 65536, CHEMISTRY_SLOTS = 4, CHEMISTRY_TQ = 16, CHEMISTRY_UNSET = 4294967295;
|
|
590
|
+
function bindChemistryEngine(symbols, memory) {
|
|
591
|
+
for (let name of CHEMISTRY_EXPORT_NAMES) if (typeof symbols[name] != "function") return null;
|
|
592
|
+
return typeof symbols.engine_alloc != "function" || typeof symbols.engine_free != "function" ? null : { exports: symbols, memory };
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
// src/game/scenery/port.ts
|
|
596
|
+
var SCENERY_REQUEST_SLOTS = 8, SCENERY_REGISTER_WORDS = 20;
|
|
597
|
+
var SCENERY_REGISTER = {
|
|
598
|
+
chunks: 0,
|
|
599
|
+
resident: 1,
|
|
600
|
+
requested: 2,
|
|
601
|
+
installed: 3,
|
|
602
|
+
evicted: 4,
|
|
603
|
+
deferred: 5,
|
|
604
|
+
failed: 6,
|
|
605
|
+
installedKib: 7,
|
|
606
|
+
residentSplats: 8,
|
|
607
|
+
drawnSplats: 9,
|
|
608
|
+
listedPages: 10,
|
|
609
|
+
poolCapacity: 11,
|
|
610
|
+
poolFreePages: 12,
|
|
611
|
+
tier: 13,
|
|
612
|
+
updates: 14,
|
|
613
|
+
heroSplats: 15,
|
|
614
|
+
heroShed: 16,
|
|
615
|
+
standIn: 17,
|
|
616
|
+
deformedSplats: 18
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
// src/game/world/port.ts
|
|
620
|
+
var STREAM_REGISTER = {
|
|
621
|
+
live: 0,
|
|
622
|
+
loading: 1,
|
|
623
|
+
waiting: 2,
|
|
624
|
+
failed: 3,
|
|
625
|
+
inflight: 4,
|
|
626
|
+
installed: 5,
|
|
627
|
+
installedBytes: 6,
|
|
628
|
+
admitted: 7,
|
|
629
|
+
evicted: 8,
|
|
630
|
+
residentKib: 9,
|
|
631
|
+
poolKib: 10,
|
|
632
|
+
proxyKib: 11,
|
|
633
|
+
sourceKib: 12,
|
|
634
|
+
starved: 13,
|
|
635
|
+
frames: 14,
|
|
636
|
+
totalInstalls: 15
|
|
637
|
+
}, STREAM_PACK_REQUESTS = 16, STREAM_PACK_RELEASES = 17, STREAM_MAX_PACK_REQUESTS = 16, STREAM_MAX_PACK_RELEASES = 16, STREAM_REQUEST_LIST = 18, STREAM_RELEASE_LIST = (18) + (16), STREAM_REGISTER_BLOCK_WORDS = STREAM_RELEASE_LIST + (16), STREAM_LAZY_PACKS_FLAG = 256, STREAM_PRIORITY_SHIFT = 24, STREAM_PRIORITY_NOW = 0, STREAM_PRIORITY_SOON = 1, STREAM_START_PACK = 0, AssetPriority = { now: (0), soon: (1) }, STREAM_PACK_MASK = (1 << (24)) - 1, STREAM_EYE_FLOATS = 6, STREAM_ACTOR_FLOATS = 2, STREAM_COLLIDER_FLOATS = 8, STREAM_OP_INSERT = 1, TIER_INDEX = { low: 0, mid: 1, high: 2 }, STREAM_PACK_CONTENDED = -6;
|
|
638
|
+
|
|
639
|
+
// src/game/backends/engine/render-abi.ts
|
|
640
|
+
var RENDER_KERNEL_INSTANCES_FEATURE = "render_kernel_instances_1";
|
|
641
|
+
var MEDIA_VOLUME_FEATURE = "media_volume_1";
|
|
642
|
+
var RENDER_FEED_POSE_FEATURE = "render_feed_pose_1";
|
|
643
|
+
var COMPARE_FUNCTIONS = [
|
|
644
|
+
"never",
|
|
645
|
+
"less",
|
|
646
|
+
"equal",
|
|
647
|
+
"lessEqual",
|
|
648
|
+
"greater",
|
|
649
|
+
"notEqual",
|
|
650
|
+
"greaterEqual",
|
|
651
|
+
"always"
|
|
652
|
+
], BLEND_EQUATIONS = ["add", "subtract", "reverseSubtract", "min", "max"], BLEND_FACTORS = [
|
|
653
|
+
"zero",
|
|
654
|
+
"one",
|
|
655
|
+
"srcColor",
|
|
656
|
+
"oneMinusSrcColor",
|
|
657
|
+
"srcAlpha",
|
|
658
|
+
"oneMinusSrcAlpha",
|
|
659
|
+
"dstColor",
|
|
660
|
+
"oneMinusDstColor",
|
|
661
|
+
"dstAlpha",
|
|
662
|
+
"oneMinusDstAlpha",
|
|
663
|
+
"srcAlphaSaturate"
|
|
664
|
+
], STENCIL_OPERATIONS = [
|
|
665
|
+
"keep",
|
|
666
|
+
"zero",
|
|
667
|
+
"replace",
|
|
668
|
+
"increment",
|
|
669
|
+
"decrement",
|
|
670
|
+
"invert",
|
|
671
|
+
"incrementWrap",
|
|
672
|
+
"decrementWrap"
|
|
673
|
+
];
|
|
674
|
+
var EMITTER_SHAPES = ["point", "sphere", "cone", "box", "disc"], EMITTER_COLLISIONS = ["none", "plane", "depth"];
|
|
675
|
+
var FOG_MODES = ["linear", "exp2", "height"];
|
|
676
|
+
var BUFFER_OWNER_CAPABILITIES = {
|
|
677
|
+
12: 4194304,
|
|
678
|
+
13: 8388608,
|
|
679
|
+
14: -2147483648
|
|
680
|
+
}, STAT_GPU_LAST_NS = 17, STAT_GPU_P50_NS = 18, STAT_GPU_P95_NS = 19, STAT_GPU_BYTES_LOW = 20, STAT_GPU_BYTES_HIGH = 21;
|
|
681
|
+
var STAT_THERMAL_TIER = 23, STAT_PARTICLES_ALIVE = 24, STAT_RAW_DISPATCHES = 25, STAT_RAW_GPU_NS = 26, STAT_RAW_DISABLED = 27, STAT_TRANSPARENT_SORTED = 28, STAT_TEXT_GLYPHS = 29, STAT_DRAW_CALLS = 32;
|
|
682
|
+
var STAT_TRIANGLES = 33, OP_SET_RENDER_ORDER = 31, OP_EMIT = 32, OP_SET_EMITTER_RATE = 33, OP_MARK_EMITTER = 34, OP_DESTROY_EMITTER = 35, OP_RAW_DISPATCH = 36, OP_RAW_COPY = 37, OP_RAW_DESTROY_BUFFER = 38, OP_RAW_MARK_BUFFER = 39, OP_SET_SHADOW = 40, OP_SET_MATERIAL_WORD = 41, OP_RAW_DRAW = 42, OP_RAW_DESTROY_TEXTURE = 43, OP_RAW_MARK_TEXTURE = 44, OP_RAW_COPY_TEXTURE = 45, OP_SET_LOD = 46, OP_CLEAR_EMITTER = 50, OP_SET_WEATHER = 51, OP_SET_TIME_OF_DAY = 52, OP_MARK_TEXTURE_REGION = 54, OP_SET_EFFECT = 55, OP_SET_EFFECT_TEXTURE = 60, OP_SET_VOLUMETRICS = 61, TEXTURE_FORMAT_R8 = 3, TEXTURE_FORMAT_RG8 = 4, TEXTURE_FORMAT_R16F = 5, TEXTURE_FORMAT_RG16F = 6, TEXTURE_FORMAT_R32F = 7, TEXTURE_FORMAT_RG32F = 8, TEXTURE_FORMAT_R8UI = 9, TEXTURE_FORMAT_R16UI = 10, TEXTURE_FORMAT_R32UI = 11, TEXTURE_FORMAT_RG32UI = 12, TEXTURE_FORMAT_RGBA8UI = 13, TEXTURE_FORMAT_RGBA16UI = 14, TEXTURE_FORMAT_RGBA32UI = 15, TEXTURE_FORMAT_R32I = 16, TEXTURE_FORMAT_RGBA32I = 17, TEXTURE_KIND_2D_ARRAY = 3, TEXTURE_KIND_3D = 4, TEXTURE_KIND_EXTERNAL = 5;
|
|
683
|
+
var TEXTURE_ENCODE_AUTO = 1, TEXTURE_ENCODE_ASTC_4X4 = 2, TEXTURE_ENCODE_BC7 = 3, TARGET_COLORS = 7, TARGET_KIND = 5, TARGET_LAYERS = 6, TARGET_SAMPLED_DEPTH = 8, TARGET_TEXTURES = 16, TARGET_MAX_COLORS = 4, TARGET_KIND_2D = 0, TARGET_KIND_CUBE = 1, TARGET_KIND_ARRAY = 2, PASS_SLICE = 11, PASS_FLAGS = 12, PASS_PLANE = 13, PASS_FLAG_CUBE_FACE = 1, PASS_FLAG_REFLECT = 2, PASS_FLAG_ONCE = 4, ENV_TONE_CURVE = 29, ENV_GI = 30, ENV_GI_INTENSITY = 31, ENV_GI_SPACING = 32, ENV_GI_SUN_ANGLE = 33, GI_MODES = ["off", "field", "full"], EFFECT_LENS_FLARE = 20;
|
|
684
|
+
var MAX_CHAIN_EFFECTS = 64, POST_EFFECT_TEXTURES = 4, OP_SET_CLIP_ADDITIVE = 47, OP_SET_CLIP_MASK = 48, OP_ANIMATION = 53, ANIM_SET_TIME = 1, ANIM_SET_SPEED = 2, ANIM_SET_LOOP = 3, ANIM_SET_PAUSED = 4, ANIM_CROSSFADE = 5, ANIM_SET_SYNC = 6, ANIM_SET_RANGE = 7, ANIM_SET_EVENTS = 8, ANIM_SET_BLEND = 9, ANIM_SET_IK_TARGET = 10, ANIM_SET_IK_POLE = 11;
|
|
685
|
+
var ANIM_FADE = 13, ANIM_DESTROY = 14, ANIM_INERTIALIZE = 15, ANIM_SET_SYNC_MODE = 16, ANIM_CREATE_MASK = 32, ANIM_SET_CLIP_EVENTS = 33, ANIM_CREATE_BLEND = 34, ANIM_CREATE_IK = 35, ANIM_RETARGET = 36, ANIM_HUMANOID = 37, ANIM_CLIP_INFO = 38, ANIM_ROOT_MOTION = 39, ANIM_BAKE_RETARGET = 45, ANIM_SET_SYNC_MARKERS = 46;
|
|
686
|
+
var ANIM_SET_LOD = 47, NODE_POSE_FLOATS = 7, ROOT_MOTION_XZ = 1, ROOT_MOTION_Y = 2, ROOT_MOTION_YAW = 4, ROOT_MOTION_APPLY = 8, ANIM_KIND_MASK = 0, ANIM_KIND_BLEND = 1, ANIM_KIND_IK = 2, ANIM_KIND_RETARGET = 3, ANIM_KIND_ROOT_MOTION = 4, ANIM_EVENT_WORDS = 4, ANIM_MAX_EVENTS = 256, ANIM_ACTION_WORDS = 4, ANIM_ACTION_RUNNING = 1, ANIM_ACTION_PAUSED = 2, ANIM_ACTION_FINISHED = 4, ANIMATION_BUFFER_EVENTS = 0, ANIMATION_BUFFER_ACTIONS = 1, ANIMATION_BUFFER_ROOT_MOTION = 2, TONE_MAPPINGS = ["none", "linear", "reinhard", "aces", "agx", "neutral", "cineon", "custom"], MATERIAL_SLOTS = [
|
|
687
|
+
"map",
|
|
688
|
+
"normalMap",
|
|
689
|
+
"roughnessMap",
|
|
690
|
+
"metalnessMap",
|
|
691
|
+
"emissiveMap",
|
|
692
|
+
"aoMap",
|
|
693
|
+
"clearcoatMap",
|
|
694
|
+
"clearcoatRoughnessMap",
|
|
695
|
+
"clearcoatNormalMap",
|
|
696
|
+
"sheenColorMap",
|
|
697
|
+
"sheenRoughnessMap",
|
|
698
|
+
"specularIntensityMap",
|
|
699
|
+
"specularColorMap",
|
|
700
|
+
"transmissionMap"
|
|
701
|
+
], CORE_MATERIAL_SLOTS = 6, RENDER_CORE_EXPORTS = [
|
|
702
|
+
"engine_render_create",
|
|
703
|
+
"engine_render_destroy",
|
|
704
|
+
"engine_render_registers",
|
|
705
|
+
"engine_render_desc",
|
|
706
|
+
"engine_render_commands",
|
|
707
|
+
"engine_render_capabilities",
|
|
708
|
+
"engine_render_flush",
|
|
709
|
+
"engine_render_create_geometry",
|
|
710
|
+
"engine_render_commit_geometry",
|
|
711
|
+
"engine_render_create_texture",
|
|
712
|
+
"engine_render_decode_texture",
|
|
713
|
+
"engine_render_create_material",
|
|
714
|
+
"engine_render_create_node",
|
|
715
|
+
"engine_render_create_target",
|
|
716
|
+
"engine_render_create_chain",
|
|
717
|
+
"engine_render_create_pass",
|
|
718
|
+
"engine_render_set_environment",
|
|
719
|
+
"engine_render_load_model",
|
|
720
|
+
"engine_render_install_shaders",
|
|
721
|
+
"engine_render_instantiate",
|
|
722
|
+
"engine_render_find_node",
|
|
723
|
+
"engine_render_play_clip",
|
|
724
|
+
"engine_render_buffer",
|
|
725
|
+
"engine_render_sync",
|
|
726
|
+
"engine_render_animate",
|
|
727
|
+
"engine_render_frame",
|
|
728
|
+
"engine_render_stats",
|
|
729
|
+
"engine_render_node_matrix"
|
|
730
|
+
], RENDER_FEATURE_EXPORTS = {
|
|
731
|
+
engine_render_create_emitter: 1024,
|
|
732
|
+
engine_render_raw_buffer: 8192,
|
|
733
|
+
engine_render_raw_pipeline: 8192,
|
|
734
|
+
engine_render_raw_bindings: 8192,
|
|
735
|
+
engine_render_raw_read: 8192,
|
|
736
|
+
engine_render_raw_poll: 8192,
|
|
737
|
+
engine_render_raw_texture: 131072,
|
|
738
|
+
engine_render_raw_sampler: 131072,
|
|
739
|
+
engine_render_raw_read_texture: 131072,
|
|
740
|
+
engine_render_load_font: 1048576,
|
|
741
|
+
engine_render_set_text: 1048576,
|
|
742
|
+
engine_render_set_text_style: 1048576,
|
|
743
|
+
engine_render_text_bounds: 1048576,
|
|
744
|
+
engine_render_raycast: 2097152,
|
|
745
|
+
engine_render_set_chain_shader: 256,
|
|
746
|
+
engine_render_animation: -2147483648,
|
|
747
|
+
engine_render_load_clips: -2147483648,
|
|
748
|
+
engine_render_node_poses: -2147483648,
|
|
749
|
+
engine_render_read_target: 32,
|
|
750
|
+
engine_render_texture_object: 32,
|
|
751
|
+
engine_render_reload_model: 128,
|
|
752
|
+
engine_render_reload_texture: 1,
|
|
753
|
+
engine_render_encode_texture: 1
|
|
754
|
+
}, ENGINE_RELOAD_EXPORT_NAMES = ["engine_render_reload_model", "engine_render_reload_texture"], ENGINE_ENCODE_EXPORT_NAMES = ["engine_render_encode_texture"]; [
|
|
755
|
+
...RENDER_CORE_EXPORTS,
|
|
756
|
+
...Object.keys(RENDER_FEATURE_EXPORTS)
|
|
757
|
+
];
|
|
758
|
+
|
|
759
|
+
// src/game/render/vector-surfaces.ts
|
|
760
|
+
var VECTOR_SURFACE_TIERS = { low: 0, mid: 1, high: 2 }, VECTOR_SURFACE_CAPS = { low: 4, mid: 8, high: 16 }, VECTOR_SURFACE_EDGES = { low: 512, mid: 1024, high: 2048 };
|
|
761
|
+
function createVectorSurfaceStats() {
|
|
762
|
+
return { cap: 0, live: 0, encoded: 0, unchanged: 0, offscreen: 0, occluded: 0, overCap: 0, droppedEvents: 0 };
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
// src/game/audio/analyser.ts
|
|
766
|
+
var BLACKMAN_A0 = 0.42, BLACKMAN_A1 = 0.5, BLACKMAN_A2 = 0.08, DECIBELS_PER_LOG = 20, BYTE_MAX = 255, BYTE_CENTER = 128, SILENCE = 1e-12;
|
|
767
|
+
function analyserSettings(desc = {}) {
|
|
768
|
+
let fftSize = desc.fftSize ?? chunkX5A5FOWW_js.DEFAULT_FFT_SIZE;
|
|
769
|
+
if (!Number.isInteger(fftSize) || fftSize < chunkX5A5FOWW_js.MIN_FFT_SIZE || fftSize > chunkX5A5FOWW_js.MAX_FFT_SIZE || (fftSize & fftSize - 1) !== 0)
|
|
770
|
+
throw new chunk2V7IL4HC_js.GameError("invalid_argument", `fftSize must be a power of two from ${chunkX5A5FOWW_js.MIN_FFT_SIZE} to ${chunkX5A5FOWW_js.MAX_FFT_SIZE}`);
|
|
771
|
+
let smoothing = desc.smoothing ?? chunkX5A5FOWW_js.DEFAULT_SMOOTHING;
|
|
772
|
+
if (!(smoothing >= 0 && smoothing <= 1)) throw new chunk2V7IL4HC_js.GameError("invalid_argument", "smoothing must be between 0 and 1");
|
|
773
|
+
let minDecibels = desc.minDecibels ?? chunkX5A5FOWW_js.DEFAULT_MIN_DECIBELS, maxDecibels = desc.maxDecibels ?? chunkX5A5FOWW_js.DEFAULT_MAX_DECIBELS;
|
|
774
|
+
if (!(minDecibels < maxDecibels)) throw new chunk2V7IL4HC_js.GameError("invalid_argument", "minDecibels must be below maxDecibels");
|
|
775
|
+
return { fftSize, smoothing, minDecibels, maxDecibels };
|
|
776
|
+
}
|
|
777
|
+
var FftAnalyser = class {
|
|
778
|
+
constructor(settings) {
|
|
779
|
+
this.head = 0;
|
|
780
|
+
let n = settings.fftSize;
|
|
781
|
+
this.fftSize = n, this.binCount = n / 2, this.smoothing = settings.smoothing, this.minDecibels = settings.minDecibels, this.maxDecibels = settings.maxDecibels, this.ring = new Float32Array(n), this.real = new Float64Array(n), this.imag = new Float64Array(n), this.window = new Float64Array(n), this.smoothed = new Float64Array(n / 2), this.bitReverse = new Uint32Array(n), this.cos = new Float64Array(n / 2), this.sin = new Float64Array(n / 2);
|
|
782
|
+
for (let i = 0; i < n; i++) {
|
|
783
|
+
let phase = 2 * Math.PI * i / n;
|
|
784
|
+
this.window[i] = (0.42) - (0.5) * Math.cos(phase) + (0.08) * Math.cos(2 * phase);
|
|
785
|
+
}
|
|
786
|
+
let bits2 = Math.log2(n);
|
|
787
|
+
for (let i = 0; i < n; i++) {
|
|
788
|
+
let r = 0;
|
|
789
|
+
for (let b = 0; b < bits2; b++) r |= (i >>> b & 1) << bits2 - 1 - b;
|
|
790
|
+
this.bitReverse[i] = r;
|
|
791
|
+
}
|
|
792
|
+
for (let i = 0; i < n / 2; i++)
|
|
793
|
+
this.cos[i] = Math.cos(-2 * Math.PI * i / n), this.sin[i] = Math.sin(-2 * Math.PI * i / n);
|
|
794
|
+
}
|
|
795
|
+
push(samples, start, count) {
|
|
796
|
+
let ring = this.ring, n = this.fftSize, head = this.head;
|
|
797
|
+
for (let i = 0; i < count; i++)
|
|
798
|
+
ring[head] = samples[start + i], head = head + 1 === n ? 0 : head + 1;
|
|
799
|
+
this.head = head;
|
|
800
|
+
}
|
|
801
|
+
reset() {
|
|
802
|
+
this.ring.fill(0), this.smoothed.fill(0), this.head = 0;
|
|
803
|
+
}
|
|
804
|
+
timeDomain(out) {
|
|
805
|
+
let ring = this.ring, n = Math.min(out.length, this.fftSize), start = this.head + this.fftSize - n, bytes = out instanceof Uint8Array;
|
|
806
|
+
for (let i = 0; i < n; i++) {
|
|
807
|
+
let v = ring[(start + i) % this.fftSize];
|
|
808
|
+
bytes ? out[i] = clampByte((128) * (1 + v)) : out[i] = v;
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
frequency(out) {
|
|
812
|
+
this.transform();
|
|
813
|
+
let n = Math.min(out.length, this.binCount), smoothed = this.smoothed;
|
|
814
|
+
if (out instanceof Uint8Array) {
|
|
815
|
+
let scale = (255) / (this.maxDecibels - this.minDecibels);
|
|
816
|
+
for (let i = 0; i < n; i++) out[i] = clampByte((decibels(smoothed[i]) - this.minDecibels) * scale);
|
|
817
|
+
} else
|
|
818
|
+
for (let i = 0; i < n; i++) out[i] = decibels(smoothed[i]);
|
|
819
|
+
}
|
|
820
|
+
transform() {
|
|
821
|
+
let n = this.fftSize, real = this.real, imag = this.imag, ring = this.ring, head = this.head;
|
|
822
|
+
for (let i = 0; i < n; i++) {
|
|
823
|
+
let j = this.bitReverse[i];
|
|
824
|
+
real[j] = ring[(head + i) % n] * this.window[i], imag[j] = 0;
|
|
825
|
+
}
|
|
826
|
+
for (let size = 2; size <= n; size <<= 1) {
|
|
827
|
+
let half = size >>> 1, stride = n / size;
|
|
828
|
+
for (let block = 0; block < n; block += size)
|
|
829
|
+
for (let k = 0; k < half; k++) {
|
|
830
|
+
let wr = this.cos[k * stride], wi = this.sin[k * stride], a = block + k, b = a + half, tr = real[b] * wr - imag[b] * wi, ti = real[b] * wi + imag[b] * wr;
|
|
831
|
+
real[b] = real[a] - tr, imag[b] = imag[a] - ti, real[a] += tr, imag[a] += ti;
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
let tau = this.smoothing, inverse = 1 / n, smoothed = this.smoothed;
|
|
835
|
+
for (let i = 0; i < this.binCount; i++) {
|
|
836
|
+
let magnitude = Math.sqrt(real[i] * real[i] + imag[i] * imag[i]) * inverse;
|
|
837
|
+
smoothed[i] = tau * smoothed[i] + (1 - tau) * magnitude;
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
};
|
|
841
|
+
function decibels(magnitude) {
|
|
842
|
+
return (20) * Math.log10(magnitude > (1e-12) ? magnitude : (1e-12));
|
|
843
|
+
}
|
|
844
|
+
function clampByte(value) {
|
|
845
|
+
return value <= 0 ? 0 : value >= (255) ? (255) : Math.floor(value);
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
// src/game/reactive/engine.ts
|
|
849
|
+
var REACTIVE_FEATURE = "reactive_fluid_1", REACTIVE_DESC_WORDS = 32, REACTIVE_GRID = 0, REACTIVE_ORIGIN = 3, REACTIVE_CELL = 6, REACTIVE_LIQUID = 7, REACTIVE_LIQUID_KELVIN = 8, REACTIVE_PARCELS = 9, REACTIVE_CONTACT = 10, REACTIVE_COUPLING = 11, REACTIVE_MAX_PAIRS = 12, REACTIVE_SEED_LOW = 13, REACTIVE_SEED_HIGH = 14, REACTIVE_SMOKE = 16, REACTIVE_SMOKE_SPECIES = 4, REACTIVE_GLOW_FROM_K = 20, REACTIVE_GLOW_FULL_K = 21, REACTIVE_SMOKE_FULL = 22, REACTIVE_FLAME_EXTINCTION = 23, REACTIVE_PLUME_FROM_K = 24, HOB_DESC_WORDS = 12, HOB_FIRST = 0, HOB_LAST = 2, HOB_LAYERS = 4, HOB_METAL = 5, HOB_START_K = 6, HOB_PAN_K = 7, HOB_PAN_JOULES = 8, HOB_FLAME_K = 9, HOB_FLAME_JOULES = 10, HOB_FLAME_LAYERS = 11, REACTIVE_REGISTER_WORDS = 96, REACTIVE_TICK_LOW = 0, REACTIVE_TICK_HIGH = 1;
|
|
850
|
+
var REACTIVE_PAIRS = 3, REACTIVE_DROPPED_PAIRS = 4;
|
|
851
|
+
var REACTIVE_VENTED = 7, REACTIVE_RETIRED = 8, REACTIVE_PARTICLES = 9, REACTIVE_FIRED = 10, REACTIVE_PAN_K = 11, REACTIVE_BURNING = 12, REACTIVE_SMOKY = 13, REACTIVE_HOTTEST_K = 14, REACTIVE_PLUME_COUNT = 15, REACTIVE_DIGEST_LOW = 16, REACTIVE_DIGEST_HIGH = 17;
|
|
852
|
+
var REACTIVE_CAPACITY = 21, REACTIVE_LIT = 22, REACTIVE_SECONDS = 23, REACTIVE_PLUMES = 32, REACTIVE_PLUME_WORDS = 8, REACTIVE_MAX_PLUMES = 8, PLUME_CELL = 0, PLUME_KELVIN = 3, PLUME_SMOKE = 4, PLUME_WORLD = 5, REACTIVE_MAX_PREHEAT_TICKS = 4096, REACTIVE_MAX_STEP_SECONDS = 0.1, REACTIVE_MAX_EDGE = 64, ENGINE_REACTIVE_EXPORT_NAMES = [
|
|
853
|
+
"engine_reactive_create",
|
|
854
|
+
"engine_reactive_destroy",
|
|
855
|
+
"engine_reactive_registers",
|
|
856
|
+
"engine_reactive_hob",
|
|
857
|
+
"engine_reactive_lit",
|
|
858
|
+
"engine_reactive_emitter",
|
|
859
|
+
"engine_reactive_preheat",
|
|
860
|
+
"engine_reactive_step",
|
|
861
|
+
"engine_reactive_media",
|
|
862
|
+
"engine_reactive_texels",
|
|
863
|
+
"engine_reactive_positions",
|
|
864
|
+
"engine_reactive_digest"
|
|
865
|
+
], NULL2 = 0, WORD = 4, NO_MEDIUM = 0, POSITION_FLOATS = 3, FLOAT = new Float32Array(1), BITS = new Uint32Array(FLOAT.buffer), HIGH_BITS = 32n, SCRATCH_WORDS = (32) + (18) + (12), FLUID_AT = (32), EMITTER_AT = (32) + (18);
|
|
866
|
+
function engineReactiveExports(runtime) {
|
|
867
|
+
let symbols = runtime.symbols;
|
|
868
|
+
return ENGINE_REACTIVE_EXPORT_NAMES.every((name) => typeof symbols[name] == "function") ? symbols : null;
|
|
869
|
+
}
|
|
870
|
+
function failure(code, what) {
|
|
871
|
+
throw code === -1 ? new chunk2V7IL4HC_js.GameError("capacity_exceeded", `the engine has no room for the reactive fluid ${what}`) : code === -3 ? new chunk2V7IL4HC_js.GameError("unknown_resource", `the reactive fluid ${what} names an unknown material or a missing hob`) : new chunk2V7IL4HC_js.GameError("invalid_argument", `the engine refused the reactive fluid ${what} (${code})`);
|
|
872
|
+
}
|
|
873
|
+
function check(code, what) {
|
|
874
|
+
return code >= 0 ? code : failure(code, what);
|
|
875
|
+
}
|
|
876
|
+
var EngineReactive = class {
|
|
877
|
+
constructor(runtime, exports, render) {
|
|
878
|
+
this.runtime = runtime;
|
|
879
|
+
this.exports = exports;
|
|
880
|
+
this.render = render;
|
|
881
|
+
this.scratch = (0);
|
|
882
|
+
this.buffer = null;
|
|
883
|
+
this.words = new Uint32Array(0);
|
|
884
|
+
this.floats = new Float32Array(0);
|
|
885
|
+
this.registerViews = /* @__PURE__ */ new Map();
|
|
886
|
+
this.texelViews = /* @__PURE__ */ new Map();
|
|
887
|
+
this.positionViews = /* @__PURE__ */ new Map();
|
|
888
|
+
}
|
|
889
|
+
views() {
|
|
890
|
+
let buffer = this.runtime.memory.buffer;
|
|
891
|
+
buffer !== this.buffer && (this.buffer = buffer, this.words = new Uint32Array(buffer), this.floats = new Float32Array(buffer));
|
|
892
|
+
}
|
|
893
|
+
at() {
|
|
894
|
+
if (this.scratch === (0) && (this.scratch = this.runtime.exports.engine_alloc(SCRATCH_WORDS * (4), chunk2O2CG465_js.COLUMN_ALIGN), this.scratch === (0)))
|
|
895
|
+
throw new chunk2V7IL4HC_js.GameError("capacity_exceeded", "engine memory cannot hold reactive fluid parameters");
|
|
896
|
+
return this.views(), this.scratch >>> 2;
|
|
897
|
+
}
|
|
898
|
+
open(chemistry, fluid, desc) {
|
|
899
|
+
let at = this.at();
|
|
900
|
+
this.words.set(desc.subarray(0, (32)), at), this.floats.set(fluid.subarray(0, (18)), at + FLUID_AT);
|
|
901
|
+
let handle = this.exports.engine_reactive_create(chemistry, this.scratch + FLUID_AT * (4), this.scratch);
|
|
902
|
+
if (handle === (0)) throw new chunk2V7IL4HC_js.GameError("invalid_argument", "the engine refused this reactive fluid (check the liquid, the grids and the contact radius)");
|
|
903
|
+
return handle;
|
|
904
|
+
}
|
|
905
|
+
registers(reactive) {
|
|
906
|
+
this.views();
|
|
907
|
+
let held = this.registerViews.get(reactive);
|
|
908
|
+
if (held !== void 0 && held.buffer === this.buffer) return held;
|
|
909
|
+
let pointer = this.exports.engine_reactive_registers(reactive);
|
|
910
|
+
if (pointer === (0)) throw new chunk2V7IL4HC_js.GameError("unknown_resource", "this reactive fluid was disposed");
|
|
911
|
+
let view2 = new Uint32Array(this.words.buffer, pointer, (96));
|
|
912
|
+
return this.registerViews.set(reactive, view2), view2;
|
|
913
|
+
}
|
|
914
|
+
hob(reactive, desc) {
|
|
915
|
+
let at = this.at();
|
|
916
|
+
this.words.set(desc.subarray(0, (12)), at), check(this.exports.engine_reactive_hob(reactive, this.scratch), "hob");
|
|
917
|
+
}
|
|
918
|
+
lit(reactive, on) {
|
|
919
|
+
check(this.exports.engine_reactive_lit(reactive, on ? 1 : 0), "burner");
|
|
920
|
+
}
|
|
921
|
+
emitter(reactive, index, emitter) {
|
|
922
|
+
let at = this.at();
|
|
923
|
+
this.floats.set(emitter.subarray(0, (12)), at + EMITTER_AT), check(this.exports.engine_reactive_emitter(reactive, index, this.scratch + EMITTER_AT * (4)), "pour");
|
|
924
|
+
}
|
|
925
|
+
preheat(reactive, targetK, maxTicks) {
|
|
926
|
+
return check(this.exports.engine_reactive_preheat(reactive, targetK, maxTicks), "preheat");
|
|
927
|
+
}
|
|
928
|
+
step(reactive, seconds, tick) {
|
|
929
|
+
FLOAT[0] = seconds, this.registers(reactive)[(23)] = BITS[0], check(this.exports.engine_reactive_step(reactive, tick ? 1 : 0), "step");
|
|
930
|
+
}
|
|
931
|
+
media(reactive, medium) {
|
|
932
|
+
let render = medium === (0) ? (0) : this.render();
|
|
933
|
+
if (medium !== (0) && render === (0)) throw new chunk2V7IL4HC_js.GameError("unsupported_feature", "writing a media volume needs the engine renderer");
|
|
934
|
+
return check(this.exports.engine_reactive_media(reactive, render, medium), "media volume");
|
|
935
|
+
}
|
|
936
|
+
texels(reactive, count) {
|
|
937
|
+
this.views();
|
|
938
|
+
let held = this.texelViews.get(reactive);
|
|
939
|
+
if (held !== void 0 && held.buffer === this.buffer) return held;
|
|
940
|
+
let pointer = this.exports.engine_reactive_texels(reactive);
|
|
941
|
+
if (pointer === (0)) throw new chunk2V7IL4HC_js.GameError("unknown_resource", "this reactive fluid was disposed");
|
|
942
|
+
let view2 = new Uint32Array(this.words.buffer, pointer, count);
|
|
943
|
+
return this.texelViews.set(reactive, view2), view2;
|
|
944
|
+
}
|
|
945
|
+
positions(reactive, capacity) {
|
|
946
|
+
let pointer = this.exports.engine_reactive_positions(reactive);
|
|
947
|
+
if (pointer === (0)) throw new chunk2V7IL4HC_js.GameError("unknown_resource", "this reactive fluid was disposed");
|
|
948
|
+
this.views();
|
|
949
|
+
let held = this.positionViews.get(reactive);
|
|
950
|
+
if (held !== void 0 && held.buffer === this.buffer && held.byteOffset === pointer) return held;
|
|
951
|
+
let view2 = new Float32Array(this.floats.buffer, pointer, capacity * (3));
|
|
952
|
+
return this.positionViews.set(reactive, view2), view2;
|
|
953
|
+
}
|
|
954
|
+
digest(reactive) {
|
|
955
|
+
check(this.exports.engine_reactive_digest(reactive), "digest");
|
|
956
|
+
let r = this.registers(reactive);
|
|
957
|
+
return BigInt(r[(17)]) << HIGH_BITS | BigInt(r[(16)]);
|
|
958
|
+
}
|
|
959
|
+
close(reactive) {
|
|
960
|
+
this.registerViews.delete(reactive), this.texelViews.delete(reactive), this.positionViews.delete(reactive), this.exports.engine_reactive_destroy(reactive);
|
|
961
|
+
}
|
|
962
|
+
};
|
|
963
|
+
|
|
964
|
+
// src/game/destruction/engine.ts
|
|
965
|
+
var DESTRUCT_DESC_FLOATS = 24, DESTRUCT_DAMAGE_FLOATS = 5, DESTRUCT_EVENT_WORDS = 8, DESTRUCT_KIND_BREAK = 1, DESTRUCT_KIND_RETIRE = 2, DESTRUCT_KIND_INTACT_LOST = 3, DESTRUCT_KIND_REMOVE = 4, ENGINE_DESTRUCTION_EXPORT_NAMES = [
|
|
966
|
+
"engine_destruction_open",
|
|
967
|
+
"engine_destruction_close",
|
|
968
|
+
"engine_destructible_create",
|
|
969
|
+
"engine_destructible_destroy",
|
|
970
|
+
"engine_destructible_damage",
|
|
971
|
+
"engine_destructible_attached",
|
|
972
|
+
"engine_destruction_update",
|
|
973
|
+
"engine_destruction_events",
|
|
974
|
+
"engine_destruction_dropped"
|
|
975
|
+
], ENGINE_DESTRUCTION_STRUCTURE_EXPORT_NAMES = ["engine_destructible_configure"], DESTRUCT_STRUCTURE_FLOATS = 8, STRUCTURE_PROPAGATION = 0, STRUCTURE_BOND_STRENGTH = 1, STRUCTURE_STRESS = 2, STRUCTURE_CLUSTERS = 3, STRUCTURE_LEVELS = 4, STRUCTURE_LEVEL_STRENGTH = 5, DESTRUCT_KIND_BOND = 5;
|
|
976
|
+
var NULL3 = 0, F32_BYTES2 = 4, MICROS2 = 1e6;
|
|
977
|
+
function engineDestructionExports(runtime) {
|
|
978
|
+
let symbols = runtime.symbols;
|
|
979
|
+
return ENGINE_DESTRUCTION_EXPORT_NAMES.every((name) => typeof symbols[name] == "function") ? symbols : null;
|
|
980
|
+
}
|
|
981
|
+
var EngineDestruction = class {
|
|
982
|
+
constructor(runtime, exports, world) {
|
|
983
|
+
this.runtime = runtime;
|
|
984
|
+
this.exports = exports;
|
|
985
|
+
this.world = world;
|
|
986
|
+
this.handle = (0);
|
|
987
|
+
this.scratch = (0);
|
|
988
|
+
this.fracturer = null;
|
|
989
|
+
this.buffer = null;
|
|
990
|
+
this.words = new Uint32Array(0);
|
|
991
|
+
this.floats = new Float32Array(0);
|
|
992
|
+
this.bytes = new Uint8Array(0);
|
|
993
|
+
this.events = { words: this.words, floats: this.floats, offset: 0, count: 0 };
|
|
994
|
+
}
|
|
995
|
+
views() {
|
|
996
|
+
let buffer = this.runtime.memory.buffer;
|
|
997
|
+
buffer !== this.buffer && (this.buffer = buffer, this.words = new Uint32Array(buffer), this.floats = new Float32Array(buffer), this.bytes = new Uint8Array(buffer), this.events.words = this.words, this.events.floats = this.floats);
|
|
998
|
+
}
|
|
999
|
+
open() {
|
|
1000
|
+
if (this.handle === (0)) {
|
|
1001
|
+
if (this.handle = this.exports.engine_destruction_open(this.world()), this.handle === (0)) throw new chunk2V7IL4HC_js.GameError("not_initialized", "destruction needs an engine physics world");
|
|
1002
|
+
if (this.scratch = this.runtime.exports.engine_alloc(Math.max((24), (5)) * (4), chunk2O2CG465_js.COLUMN_ALIGN), this.scratch === (0)) throw new chunk2V7IL4HC_js.GameError("capacity_exceeded", "engine memory cannot hold destruction parameters");
|
|
1003
|
+
}
|
|
1004
|
+
return this.handle;
|
|
1005
|
+
}
|
|
1006
|
+
allocate(bytes) {
|
|
1007
|
+
let pointer = this.runtime.exports.engine_alloc(Math.max(bytes, 4), chunk2O2CG465_js.COLUMN_ALIGN);
|
|
1008
|
+
if (pointer === (0)) throw new chunk2V7IL4HC_js.GameError("capacity_exceeded", "engine memory cannot hold the fracture asset");
|
|
1009
|
+
return pointer;
|
|
1010
|
+
}
|
|
1011
|
+
create(asset, entities, intact, desc) {
|
|
1012
|
+
let handle = this.open(), assetPointer = this.allocate(asset.byteLength), entityPointer = this.allocate(entities.byteLength);
|
|
1013
|
+
this.views(), this.bytes.set(asset, assetPointer), this.words.set(entities, entityPointer >>> 2), this.floats.set(desc, this.scratch >>> 2);
|
|
1014
|
+
let id = this.exports.engine_destructible_create(
|
|
1015
|
+
handle,
|
|
1016
|
+
this.world(),
|
|
1017
|
+
assetPointer,
|
|
1018
|
+
asset.byteLength,
|
|
1019
|
+
entityPointer,
|
|
1020
|
+
entities.length,
|
|
1021
|
+
intact,
|
|
1022
|
+
this.scratch
|
|
1023
|
+
);
|
|
1024
|
+
if (this.runtime.exports.engine_free(assetPointer, Math.max(asset.byteLength, 4), chunk2O2CG465_js.COLUMN_ALIGN), this.runtime.exports.engine_free(entityPointer, Math.max(entities.byteLength, 4), chunk2O2CG465_js.COLUMN_ALIGN), !(id >= 0)) throw new chunk2V7IL4HC_js.GameError("invalid_argument", `the engine refused the destructible (${id}); check the fracture asset and that every entity has a transform`);
|
|
1025
|
+
return id;
|
|
1026
|
+
}
|
|
1027
|
+
destroy(destructible) {
|
|
1028
|
+
this.handle !== (0) && this.exports.engine_destructible_destroy(this.handle, this.world(), destructible);
|
|
1029
|
+
}
|
|
1030
|
+
configure(destructible, structure) {
|
|
1031
|
+
let handle = this.open(), call = this.runtime.symbols.engine_destructible_configure;
|
|
1032
|
+
if (typeof call != "function") throw new chunk2V7IL4HC_js.GameError("unsupported_feature", "structural destruction needs an engine with feature destruction_2");
|
|
1033
|
+
this.views();
|
|
1034
|
+
let at = this.scratch >>> 2;
|
|
1035
|
+
this.floats.fill(0, at, at + (8)), this.floats[at + (0)] = structure.propagation ?? 0, this.floats[at + (1)] = structure.bondStrength, this.floats[at + (2)] = structure.stress ? 1 : 0, this.floats[at + (3)] = structure.clusters ? 1 : 0, this.floats[at + (4)] = structure.levels ?? 0, this.floats[at + (5)] = structure.levelStrength ?? 1;
|
|
1036
|
+
let code = call(handle, this.world(), destructible, this.scratch);
|
|
1037
|
+
if (!(code >= 0)) throw new chunk2V7IL4HC_js.GameError("invalid_argument", `the engine refused the structure (${code}); configure before any damage, with bondStrength above 0 for stress or clusters`);
|
|
1038
|
+
}
|
|
1039
|
+
damage(destructible, x, y, z, radius, amount) {
|
|
1040
|
+
let handle = this.open();
|
|
1041
|
+
this.views();
|
|
1042
|
+
let at = this.scratch >>> 2;
|
|
1043
|
+
this.floats[at] = x, this.floats[at + 1] = y, this.floats[at + 2] = z, this.floats[at + 3] = radius, this.floats[at + 4] = amount;
|
|
1044
|
+
let hit = this.exports.engine_destructible_damage(handle, destructible, this.scratch);
|
|
1045
|
+
if (!(hit >= 0)) throw new chunk2V7IL4HC_js.GameError("invalid_argument", `damage refused (${hit})`);
|
|
1046
|
+
return hit;
|
|
1047
|
+
}
|
|
1048
|
+
attached(destructible) {
|
|
1049
|
+
if (this.handle === (0)) return 0;
|
|
1050
|
+
let attached = this.exports.engine_destructible_attached(this.handle, destructible);
|
|
1051
|
+
if (!(attached >= 0)) throw new chunk2V7IL4HC_js.GameError("invalid_argument", `attached refused (${attached})`);
|
|
1052
|
+
return attached;
|
|
1053
|
+
}
|
|
1054
|
+
update(seconds) {
|
|
1055
|
+
if (this.events.count = 0, this.handle === (0)) return this.events;
|
|
1056
|
+
let count = this.exports.engine_destruction_update(this.handle, this.world(), Math.max(0, Math.round(seconds * (1e6))));
|
|
1057
|
+
if (!(count >= 0)) throw new chunk2V7IL4HC_js.GameError("invalid_argument", `destruction update refused (${count})`);
|
|
1058
|
+
return count === 0 ? this.events : (this.views(), this.events.offset = this.exports.engine_destruction_events(this.handle) >>> 2, this.events.count = count, this.events);
|
|
1059
|
+
}
|
|
1060
|
+
fracture(mesh, options) {
|
|
1061
|
+
if (this.fracturer === null) {
|
|
1062
|
+
let exports = chunkX5A5FOWW_js.engineFractureExports(this.runtime);
|
|
1063
|
+
if (exports === null) throw new chunk2V7IL4HC_js.GameError("unsupported_feature", "breaking a made thing needs an engine with live fracture");
|
|
1064
|
+
this.fracturer = new chunkX5A5FOWW_js.EngineFracturer(this.runtime, exports);
|
|
1065
|
+
}
|
|
1066
|
+
return this.fracturer.fracture(mesh, options);
|
|
1067
|
+
}
|
|
1068
|
+
dispose() {
|
|
1069
|
+
this.fracturer?.dispose(), this.fracturer = null, this.handle !== (0) && (this.exports.engine_destruction_close(this.handle), this.handle = (0));
|
|
1070
|
+
}
|
|
1071
|
+
};
|
|
1072
|
+
|
|
1073
|
+
// src/game/kernel/transforms-engine.ts
|
|
1074
|
+
var TRANSFORM_EXPORT_NAMES = [
|
|
1075
|
+
"engine_transform_fft_open",
|
|
1076
|
+
"engine_transform_fft_close",
|
|
1077
|
+
"engine_transform_fft_run",
|
|
1078
|
+
"engine_transform_convolver_open",
|
|
1079
|
+
"engine_transform_convolver_close",
|
|
1080
|
+
"engine_transform_convolve",
|
|
1081
|
+
"engine_transform_sat_open",
|
|
1082
|
+
"engine_transform_sat_close",
|
|
1083
|
+
"engine_transform_sat_build",
|
|
1084
|
+
"engine_transform_distance_open",
|
|
1085
|
+
"engine_transform_distance_close",
|
|
1086
|
+
"engine_transform_distance_mask",
|
|
1087
|
+
"engine_transform_distance_signed",
|
|
1088
|
+
"engine_transform_jump_flood",
|
|
1089
|
+
"engine_transform_multigrid_open",
|
|
1090
|
+
"engine_transform_multigrid_close",
|
|
1091
|
+
"engine_transform_multigrid_solve"
|
|
1092
|
+
];
|
|
1093
|
+
function bindTransformEngine(symbols, memory) {
|
|
1094
|
+
for (let name of TRANSFORM_EXPORT_NAMES) if (typeof symbols[name] != "function") return null;
|
|
1095
|
+
return typeof symbols.engine_alloc != "function" || typeof symbols.engine_free != "function" ? null : { exports: symbols, memory };
|
|
1096
|
+
}
|
|
1097
|
+
var current = null;
|
|
1098
|
+
function useTransformEngine(engine) {
|
|
1099
|
+
current = engine;
|
|
1100
|
+
}
|
|
1101
|
+
function transformEngine() {
|
|
1102
|
+
return current;
|
|
1103
|
+
}
|
|
1104
|
+
var EngineBuffer = class {
|
|
1105
|
+
constructor(engine, bytes) {
|
|
1106
|
+
this.engine = engine;
|
|
1107
|
+
this.bytes = bytes;
|
|
1108
|
+
this.pointer = engine.exports.engine_alloc(Math.max(bytes, 4), 16);
|
|
1109
|
+
}
|
|
1110
|
+
floats(length) {
|
|
1111
|
+
return new Float32Array(this.engine.memory.buffer, this.pointer, length);
|
|
1112
|
+
}
|
|
1113
|
+
words(length) {
|
|
1114
|
+
return new Uint32Array(this.engine.memory.buffer, this.pointer, length);
|
|
1115
|
+
}
|
|
1116
|
+
bytesView(length) {
|
|
1117
|
+
return new Uint8Array(this.engine.memory.buffer, this.pointer, length);
|
|
1118
|
+
}
|
|
1119
|
+
free() {
|
|
1120
|
+
this.engine.exports.engine_free(this.pointer, Math.max(this.bytes, 4), 16);
|
|
1121
|
+
}
|
|
1122
|
+
};
|
|
1123
|
+
|
|
1124
|
+
// src/game/smoke/engine.ts
|
|
1125
|
+
var SMOKE_DESC_FLOATS = 24, SMOKE_EMITTER_FLOATS = 11, SMOKE_TINTED_EMITTER_FLOATS = 14, SMOKE_TINT_AT = 11, SMOKE_MAX_EMITTERS = 8, SMOKE_AXES = 3, ENGINE_SMOKE_TINT_EXPORT = "engine_smoke_emitters_tinted", ENGINE_SMOKE_FOLLOW_EXPORT = "engine_smoke_follow", SMOKE_MICROS_PER_SECOND = 1e6, SMOKE_MAX_STEP_MICROS = 1e5, ENGINE_SMOKE_EXPORT_NAMES = ["engine_smoke_create", "engine_smoke_destroy", "engine_smoke_emitters", "engine_smoke_step"], NULL4 = 0, WORD2 = 4, CAPACITY = -1, UNKNOWN = -3, WHITE = 1, SCRATCH_FLOATS2 = (24) + (8) * (14), EMITTERS_AT = (24);
|
|
1126
|
+
function tinted(floats2, count) {
|
|
1127
|
+
for (let e = 0; e < count; e++)
|
|
1128
|
+
for (let k = 0; k < (3); k++) if (floats2[e * (14) + (11) + k] !== (1)) return true;
|
|
1129
|
+
return false;
|
|
1130
|
+
}
|
|
1131
|
+
function engineSmokeExports(runtime) {
|
|
1132
|
+
let symbols = runtime.symbols;
|
|
1133
|
+
return ENGINE_SMOKE_EXPORT_NAMES.every((name) => typeof symbols[name] == "function") ? symbols : null;
|
|
1134
|
+
}
|
|
1135
|
+
function check2(code, what) {
|
|
1136
|
+
if (code >= 0) return code;
|
|
1137
|
+
throw code === (-1) ? new chunk2V7IL4HC_js.GameError("capacity_exceeded", `the engine has no room for the smoke ${what}`) : code === (-3) ? new chunk2V7IL4HC_js.GameError("unknown_resource", `the smoke ${what} names a disposed smoke volume or a missing medium`) : new chunk2V7IL4HC_js.GameError("invalid_argument", `the engine refused the smoke ${what} (${code})`);
|
|
1138
|
+
}
|
|
1139
|
+
var EngineSmoke = class {
|
|
1140
|
+
constructor(runtime, exports, render) {
|
|
1141
|
+
this.runtime = runtime;
|
|
1142
|
+
this.exports = exports;
|
|
1143
|
+
this.render = render;
|
|
1144
|
+
this.scratch = (0);
|
|
1145
|
+
this.buffer = null;
|
|
1146
|
+
this.floats = new Float32Array(0);
|
|
1147
|
+
}
|
|
1148
|
+
at() {
|
|
1149
|
+
if (this.scratch === (0) && (this.scratch = this.runtime.exports.engine_alloc(SCRATCH_FLOATS2 * (4), chunk2O2CG465_js.COLUMN_ALIGN), this.scratch === (0)))
|
|
1150
|
+
throw new chunk2V7IL4HC_js.GameError("capacity_exceeded", "engine memory cannot hold smoke parameters");
|
|
1151
|
+
let buffer = this.runtime.memory.buffer;
|
|
1152
|
+
return buffer !== this.buffer && (this.buffer = buffer, this.floats = new Float32Array(buffer)), this.scratch >>> 2;
|
|
1153
|
+
}
|
|
1154
|
+
renderHandle() {
|
|
1155
|
+
let render = this.render();
|
|
1156
|
+
if (render === (0)) throw new chunk2V7IL4HC_js.GameError("unsupported_feature", "smoke volumes need the engine renderer");
|
|
1157
|
+
return render;
|
|
1158
|
+
}
|
|
1159
|
+
create(desc, medium) {
|
|
1160
|
+
let at = this.at();
|
|
1161
|
+
return this.floats.set(desc.subarray(0, (24)), at), check2(this.exports.engine_smoke_create(this.renderHandle(), this.scratch, medium), "description");
|
|
1162
|
+
}
|
|
1163
|
+
emitters(smoke, floats2, count) {
|
|
1164
|
+
let at = this.at() + EMITTERS_AT, pointer = this.scratch + EMITTERS_AT * (4), tint = this.runtime.symbols[ENGINE_SMOKE_TINT_EXPORT];
|
|
1165
|
+
if (typeof tint == "function") {
|
|
1166
|
+
this.floats.set(floats2.subarray(0, count * (14)), at), check2(tint(this.renderHandle(), smoke, pointer, count), "emitters");
|
|
1167
|
+
return;
|
|
1168
|
+
}
|
|
1169
|
+
if (tinted(floats2, count)) throw new chunk2V7IL4HC_js.GameError("unsupported_feature", "tinted flames need an engine with smoke emitter tints");
|
|
1170
|
+
for (let e = 0; e < count; e++)
|
|
1171
|
+
this.floats.set(floats2.subarray(e * (14), e * (14) + (11)), at + e * (11));
|
|
1172
|
+
check2(this.exports.engine_smoke_emitters(this.renderHandle(), smoke, pointer, count), "emitters");
|
|
1173
|
+
}
|
|
1174
|
+
follow(smoke, x, y, z) {
|
|
1175
|
+
let call = this.runtime.symbols[ENGINE_SMOKE_FOLLOW_EXPORT];
|
|
1176
|
+
if (typeof call != "function") throw new chunk2V7IL4HC_js.GameError("unsupported_feature", "a smoke volume that follows a moving thing needs an engine with smoke follow");
|
|
1177
|
+
let at = this.at();
|
|
1178
|
+
this.floats[at] = x, this.floats[at + 1] = y, this.floats[at + 2] = z, check2(call(this.renderHandle(), smoke, this.scratch), "follow");
|
|
1179
|
+
}
|
|
1180
|
+
step(smoke, seconds) {
|
|
1181
|
+
let micros = Math.min(Math.max(Math.round(seconds * (1e6)), 0), (1e5));
|
|
1182
|
+
return check2(this.exports.engine_smoke_step(this.renderHandle(), smoke, micros), "step");
|
|
1183
|
+
}
|
|
1184
|
+
destroy(smoke) {
|
|
1185
|
+
this.exports.engine_smoke_destroy(this.renderHandle(), smoke);
|
|
1186
|
+
}
|
|
1187
|
+
};
|
|
1188
|
+
|
|
1189
|
+
exports.ANIMATION_BUFFER_ACTIONS = (1);
|
|
1190
|
+
exports.ANIMATION_BUFFER_EVENTS = (0);
|
|
1191
|
+
exports.ANIMATION_BUFFER_ROOT_MOTION = (2);
|
|
1192
|
+
exports.ANIM_ACTION_FINISHED = (4);
|
|
1193
|
+
exports.ANIM_ACTION_PAUSED = (2);
|
|
1194
|
+
exports.ANIM_ACTION_RUNNING = (1);
|
|
1195
|
+
exports.ANIM_ACTION_WORDS = (4);
|
|
1196
|
+
exports.ANIM_BAKE_RETARGET = (45);
|
|
1197
|
+
exports.ANIM_CLIP_INFO = (38);
|
|
1198
|
+
exports.ANIM_CREATE_BLEND = (34);
|
|
1199
|
+
exports.ANIM_CREATE_IK = (35);
|
|
1200
|
+
exports.ANIM_CREATE_MASK = (32);
|
|
1201
|
+
exports.ANIM_CROSSFADE = (5);
|
|
1202
|
+
exports.ANIM_DESTROY = (14);
|
|
1203
|
+
exports.ANIM_EVENT_WORDS = (4);
|
|
1204
|
+
exports.ANIM_FADE = (13);
|
|
1205
|
+
exports.ANIM_HUMANOID = (37);
|
|
1206
|
+
exports.ANIM_INERTIALIZE = (15);
|
|
1207
|
+
exports.ANIM_KIND_BLEND = (1);
|
|
1208
|
+
exports.ANIM_KIND_IK = (2);
|
|
1209
|
+
exports.ANIM_KIND_MASK = (0);
|
|
1210
|
+
exports.ANIM_KIND_RETARGET = (3);
|
|
1211
|
+
exports.ANIM_KIND_ROOT_MOTION = (4);
|
|
1212
|
+
exports.ANIM_MAX_EVENTS = (256);
|
|
1213
|
+
exports.ANIM_RETARGET = (36);
|
|
1214
|
+
exports.ANIM_ROOT_MOTION = (39);
|
|
1215
|
+
exports.ANIM_SET_BLEND = (9);
|
|
1216
|
+
exports.ANIM_SET_CLIP_EVENTS = (33);
|
|
1217
|
+
exports.ANIM_SET_EVENTS = (8);
|
|
1218
|
+
exports.ANIM_SET_IK_POLE = (11);
|
|
1219
|
+
exports.ANIM_SET_IK_TARGET = (10);
|
|
1220
|
+
exports.ANIM_SET_LOD = (47);
|
|
1221
|
+
exports.ANIM_SET_LOOP = (3);
|
|
1222
|
+
exports.ANIM_SET_PAUSED = (4);
|
|
1223
|
+
exports.ANIM_SET_RANGE = (7);
|
|
1224
|
+
exports.ANIM_SET_SPEED = (2);
|
|
1225
|
+
exports.ANIM_SET_SYNC = (6);
|
|
1226
|
+
exports.ANIM_SET_SYNC_MARKERS = (46);
|
|
1227
|
+
exports.ANIM_SET_SYNC_MODE = (16);
|
|
1228
|
+
exports.ANIM_SET_TIME = (1);
|
|
1229
|
+
exports.AssetPriority = AssetPriority;
|
|
1230
|
+
exports.BLEND_EQUATIONS = BLEND_EQUATIONS;
|
|
1231
|
+
exports.BLEND_FACTORS = BLEND_FACTORS;
|
|
1232
|
+
exports.BUFFER_OWNER_CAPABILITIES = BUFFER_OWNER_CAPABILITIES;
|
|
1233
|
+
exports.CHEMISTRY_ATMOSPHERE = (0);
|
|
1234
|
+
exports.CHEMISTRY_BOX_WORDS = (6);
|
|
1235
|
+
exports.CHEMISTRY_COLUMNS = (16);
|
|
1236
|
+
exports.CHEMISTRY_EVENT_HEADER = (2);
|
|
1237
|
+
exports.CHEMISTRY_EVENT_WORDS = (4);
|
|
1238
|
+
exports.CHEMISTRY_EXPORT_NAMES = CHEMISTRY_EXPORT_NAMES;
|
|
1239
|
+
exports.CHEMISTRY_NATURE_WORDS = (8);
|
|
1240
|
+
exports.CHEMISTRY_PROBE_WORDS = (16);
|
|
1241
|
+
exports.CHEMISTRY_REACTION_WORDS = (24);
|
|
1242
|
+
exports.CHEMISTRY_REFUSED = (65536);
|
|
1243
|
+
exports.CHEMISTRY_SLOTS = (4);
|
|
1244
|
+
exports.CHEMISTRY_SPECIES_WORDS = (16);
|
|
1245
|
+
exports.CHEMISTRY_STATS_WORDS = (16);
|
|
1246
|
+
exports.CHEMISTRY_TQ = (16);
|
|
1247
|
+
exports.CHEMISTRY_UNSET = (4294967295);
|
|
1248
|
+
exports.CHEMISTRY_VACUUM = (4294967295);
|
|
1249
|
+
exports.CHEMISTRY_VESSEL_SLOTS = (16);
|
|
1250
|
+
exports.CHEMISTRY_VESSEL_WORDS = (36);
|
|
1251
|
+
exports.COMPARE_FUNCTIONS = COMPARE_FUNCTIONS;
|
|
1252
|
+
exports.COMPUTE_DEFERRED = (-7);
|
|
1253
|
+
exports.COMPUTE_SPACE_CPU = (0);
|
|
1254
|
+
exports.COMPUTE_SPACE_GPU = (1);
|
|
1255
|
+
exports.COMPUTE_STOPPED = (-8);
|
|
1256
|
+
exports.CORE_MATERIAL_SLOTS = (6);
|
|
1257
|
+
exports.ComputeMonitor = ComputeMonitor;
|
|
1258
|
+
exports.DESTRUCT_DESC_FLOATS = (24);
|
|
1259
|
+
exports.DESTRUCT_EVENT_WORDS = (8);
|
|
1260
|
+
exports.DESTRUCT_KIND_BOND = (5);
|
|
1261
|
+
exports.DESTRUCT_KIND_BREAK = (1);
|
|
1262
|
+
exports.DESTRUCT_KIND_INTACT_LOST = (3);
|
|
1263
|
+
exports.DESTRUCT_KIND_REMOVE = (4);
|
|
1264
|
+
exports.DESTRUCT_KIND_RETIRE = (2);
|
|
1265
|
+
exports.EFFECT_LENS_FLARE = (20);
|
|
1266
|
+
exports.EMITTER_COLLISIONS = EMITTER_COLLISIONS;
|
|
1267
|
+
exports.EMITTER_SHAPES = EMITTER_SHAPES;
|
|
1268
|
+
exports.ENGINE_COMPUTE_EXPORT_NAMES = ENGINE_COMPUTE_EXPORT_NAMES;
|
|
1269
|
+
exports.ENGINE_DESTRUCTION_EXPORT_NAMES = ENGINE_DESTRUCTION_EXPORT_NAMES;
|
|
1270
|
+
exports.ENGINE_DESTRUCTION_STRUCTURE_EXPORT_NAMES = ENGINE_DESTRUCTION_STRUCTURE_EXPORT_NAMES;
|
|
1271
|
+
exports.ENGINE_ENCODE_EXPORT_NAMES = ENGINE_ENCODE_EXPORT_NAMES;
|
|
1272
|
+
exports.ENGINE_FLUID_EXPORT_NAMES = ENGINE_FLUID_EXPORT_NAMES;
|
|
1273
|
+
exports.ENGINE_REACTIVE_EXPORT_NAMES = ENGINE_REACTIVE_EXPORT_NAMES;
|
|
1274
|
+
exports.ENGINE_RELOAD_EXPORT_NAMES = ENGINE_RELOAD_EXPORT_NAMES;
|
|
1275
|
+
exports.ENGINE_SMOKE_EXPORT_NAMES = ENGINE_SMOKE_EXPORT_NAMES;
|
|
1276
|
+
exports.ENV_GI = (30);
|
|
1277
|
+
exports.ENV_GI_INTENSITY = (31);
|
|
1278
|
+
exports.ENV_GI_SPACING = (32);
|
|
1279
|
+
exports.ENV_GI_SUN_ANGLE = (33);
|
|
1280
|
+
exports.ENV_TONE_CURVE = (29);
|
|
1281
|
+
exports.EngineBuffer = EngineBuffer;
|
|
1282
|
+
exports.EngineDestruction = EngineDestruction;
|
|
1283
|
+
exports.EngineFluids = EngineFluids;
|
|
1284
|
+
exports.EngineReactive = EngineReactive;
|
|
1285
|
+
exports.EngineSmoke = EngineSmoke;
|
|
1286
|
+
exports.EventChannel = EventChannel;
|
|
1287
|
+
exports.FLUID_CAP_SIMULATION = (1);
|
|
1288
|
+
exports.FLUID_CAP_SURFACE = (2);
|
|
1289
|
+
exports.FLUID_COLLIDER_FLOATS = (19);
|
|
1290
|
+
exports.FLUID_COLLIDER_VOLUME = (18);
|
|
1291
|
+
exports.FLUID_DESC_FLOATS = (18);
|
|
1292
|
+
exports.FLUID_EMITTER_FLOATS = (12);
|
|
1293
|
+
exports.FLUID_FORCE_FLOATS = FLUID_FORCE_FLOATS;
|
|
1294
|
+
exports.FLUID_FORCE_WORDS = (6);
|
|
1295
|
+
exports.FLUID_MAX_COLLIDERS = (64);
|
|
1296
|
+
exports.FLUID_MAX_EMITTERS = (8);
|
|
1297
|
+
exports.FLUID_SURFACE_FLOATS = (17);
|
|
1298
|
+
exports.FOG_MODES = FOG_MODES;
|
|
1299
|
+
exports.FftAnalyser = FftAnalyser;
|
|
1300
|
+
exports.GI_MODES = GI_MODES;
|
|
1301
|
+
exports.HOB_DESC_WORDS = (12);
|
|
1302
|
+
exports.HOB_FIRST = (0);
|
|
1303
|
+
exports.HOB_FLAME_JOULES = (10);
|
|
1304
|
+
exports.HOB_FLAME_K = (9);
|
|
1305
|
+
exports.HOB_FLAME_LAYERS = (11);
|
|
1306
|
+
exports.HOB_LAST = (2);
|
|
1307
|
+
exports.HOB_LAYERS = (4);
|
|
1308
|
+
exports.HOB_METAL = (5);
|
|
1309
|
+
exports.HOB_PAN_JOULES = (8);
|
|
1310
|
+
exports.HOB_PAN_K = (7);
|
|
1311
|
+
exports.HOB_START_K = (6);
|
|
1312
|
+
exports.KERNEL_PRIORITIES = KERNEL_PRIORITIES;
|
|
1313
|
+
exports.MATERIAL_SLOTS = MATERIAL_SLOTS;
|
|
1314
|
+
exports.MAX_CHAIN_EFFECTS = (64);
|
|
1315
|
+
exports.MEDIA_VOLUME_FEATURE = MEDIA_VOLUME_FEATURE;
|
|
1316
|
+
exports.NODE_POSE_FLOATS = (7);
|
|
1317
|
+
exports.NO_REF = (4294967295);
|
|
1318
|
+
exports.OP_ANIMATION = (53);
|
|
1319
|
+
exports.OP_CLEAR_EMITTER = (50);
|
|
1320
|
+
exports.OP_DESTROY_EMITTER = (35);
|
|
1321
|
+
exports.OP_EMIT = (32);
|
|
1322
|
+
exports.OP_MARK_EMITTER = (34);
|
|
1323
|
+
exports.OP_MARK_TEXTURE_REGION = (54);
|
|
1324
|
+
exports.OP_RAW_COPY = (37);
|
|
1325
|
+
exports.OP_RAW_COPY_TEXTURE = (45);
|
|
1326
|
+
exports.OP_RAW_DESTROY_BUFFER = (38);
|
|
1327
|
+
exports.OP_RAW_DESTROY_TEXTURE = (43);
|
|
1328
|
+
exports.OP_RAW_DISPATCH = (36);
|
|
1329
|
+
exports.OP_RAW_DRAW = (42);
|
|
1330
|
+
exports.OP_RAW_MARK_BUFFER = (39);
|
|
1331
|
+
exports.OP_RAW_MARK_TEXTURE = (44);
|
|
1332
|
+
exports.OP_SET_CLIP_ADDITIVE = (47);
|
|
1333
|
+
exports.OP_SET_CLIP_MASK = (48);
|
|
1334
|
+
exports.OP_SET_EFFECT = (55);
|
|
1335
|
+
exports.OP_SET_EFFECT_TEXTURE = (60);
|
|
1336
|
+
exports.OP_SET_EMITTER_RATE = (33);
|
|
1337
|
+
exports.OP_SET_LOD = (46);
|
|
1338
|
+
exports.OP_SET_MATERIAL_WORD = (41);
|
|
1339
|
+
exports.OP_SET_RENDER_ORDER = (31);
|
|
1340
|
+
exports.OP_SET_SHADOW = (40);
|
|
1341
|
+
exports.OP_SET_TIME_OF_DAY = (52);
|
|
1342
|
+
exports.OP_SET_VOLUMETRICS = (61);
|
|
1343
|
+
exports.OP_SET_WEATHER = (51);
|
|
1344
|
+
exports.PASS_FLAGS = (12);
|
|
1345
|
+
exports.PASS_FLAG_CUBE_FACE = (1);
|
|
1346
|
+
exports.PASS_FLAG_ONCE = (4);
|
|
1347
|
+
exports.PASS_FLAG_REFLECT = (2);
|
|
1348
|
+
exports.PASS_PLANE = (13);
|
|
1349
|
+
exports.PASS_SLICE = (11);
|
|
1350
|
+
exports.PLUME_CELL = (0);
|
|
1351
|
+
exports.PLUME_KELVIN = (3);
|
|
1352
|
+
exports.PLUME_SMOKE = (4);
|
|
1353
|
+
exports.PLUME_WORLD = (5);
|
|
1354
|
+
exports.POST_EFFECT_TEXTURES = (4);
|
|
1355
|
+
exports.Queue = Queue;
|
|
1356
|
+
exports.REACTIVE_BURNING = (12);
|
|
1357
|
+
exports.REACTIVE_CAPACITY = (21);
|
|
1358
|
+
exports.REACTIVE_CELL = (6);
|
|
1359
|
+
exports.REACTIVE_CONTACT = (10);
|
|
1360
|
+
exports.REACTIVE_COUPLING = (11);
|
|
1361
|
+
exports.REACTIVE_DESC_WORDS = (32);
|
|
1362
|
+
exports.REACTIVE_DROPPED_PAIRS = (4);
|
|
1363
|
+
exports.REACTIVE_FEATURE = REACTIVE_FEATURE;
|
|
1364
|
+
exports.REACTIVE_FIRED = (10);
|
|
1365
|
+
exports.REACTIVE_FLAME_EXTINCTION = (23);
|
|
1366
|
+
exports.REACTIVE_GLOW_FROM_K = (20);
|
|
1367
|
+
exports.REACTIVE_GLOW_FULL_K = (21);
|
|
1368
|
+
exports.REACTIVE_GRID = (0);
|
|
1369
|
+
exports.REACTIVE_HOTTEST_K = (14);
|
|
1370
|
+
exports.REACTIVE_LIQUID = (7);
|
|
1371
|
+
exports.REACTIVE_LIQUID_KELVIN = (8);
|
|
1372
|
+
exports.REACTIVE_LIT = (22);
|
|
1373
|
+
exports.REACTIVE_MAX_EDGE = (64);
|
|
1374
|
+
exports.REACTIVE_MAX_PAIRS = (12);
|
|
1375
|
+
exports.REACTIVE_MAX_PLUMES = (8);
|
|
1376
|
+
exports.REACTIVE_MAX_PREHEAT_TICKS = (4096);
|
|
1377
|
+
exports.REACTIVE_MAX_STEP_SECONDS = (0.1);
|
|
1378
|
+
exports.REACTIVE_ORIGIN = (3);
|
|
1379
|
+
exports.REACTIVE_PAIRS = (3);
|
|
1380
|
+
exports.REACTIVE_PAN_K = (11);
|
|
1381
|
+
exports.REACTIVE_PARCELS = (9);
|
|
1382
|
+
exports.REACTIVE_PARTICLES = (9);
|
|
1383
|
+
exports.REACTIVE_PLUMES = (32);
|
|
1384
|
+
exports.REACTIVE_PLUME_COUNT = (15);
|
|
1385
|
+
exports.REACTIVE_PLUME_FROM_K = (24);
|
|
1386
|
+
exports.REACTIVE_PLUME_WORDS = (8);
|
|
1387
|
+
exports.REACTIVE_RETIRED = (8);
|
|
1388
|
+
exports.REACTIVE_SEED_HIGH = (14);
|
|
1389
|
+
exports.REACTIVE_SEED_LOW = (13);
|
|
1390
|
+
exports.REACTIVE_SMOKE = (16);
|
|
1391
|
+
exports.REACTIVE_SMOKE_FULL = (22);
|
|
1392
|
+
exports.REACTIVE_SMOKE_SPECIES = (4);
|
|
1393
|
+
exports.REACTIVE_SMOKY = (13);
|
|
1394
|
+
exports.REACTIVE_TICK_HIGH = (1);
|
|
1395
|
+
exports.REACTIVE_TICK_LOW = (0);
|
|
1396
|
+
exports.REACTIVE_VENTED = (7);
|
|
1397
|
+
exports.RENDER_CORE_EXPORTS = RENDER_CORE_EXPORTS;
|
|
1398
|
+
exports.RENDER_FEATURE_EXPORTS = RENDER_FEATURE_EXPORTS;
|
|
1399
|
+
exports.RENDER_FEED_POSE_FEATURE = RENDER_FEED_POSE_FEATURE;
|
|
1400
|
+
exports.RENDER_KERNEL_INSTANCES_FEATURE = RENDER_KERNEL_INSTANCES_FEATURE;
|
|
1401
|
+
exports.ROOT_MOTION_APPLY = (8);
|
|
1402
|
+
exports.ROOT_MOTION_XZ = (1);
|
|
1403
|
+
exports.ROOT_MOTION_Y = (2);
|
|
1404
|
+
exports.ROOT_MOTION_YAW = (4);
|
|
1405
|
+
exports.SCENERY_REGISTER = SCENERY_REGISTER;
|
|
1406
|
+
exports.SCENERY_REGISTER_WORDS = (20);
|
|
1407
|
+
exports.SCENERY_REQUEST_SLOTS = (8);
|
|
1408
|
+
exports.SMOKE_DESC_FLOATS = (24);
|
|
1409
|
+
exports.SMOKE_MAX_EMITTERS = (8);
|
|
1410
|
+
exports.SMOKE_TINTED_EMITTER_FLOATS = (14);
|
|
1411
|
+
exports.SMOKE_TINT_AT = (11);
|
|
1412
|
+
exports.STAT_DRAW_CALLS = (32);
|
|
1413
|
+
exports.STAT_GPU_BYTES_HIGH = (21);
|
|
1414
|
+
exports.STAT_GPU_BYTES_LOW = (20);
|
|
1415
|
+
exports.STAT_GPU_LAST_NS = (17);
|
|
1416
|
+
exports.STAT_GPU_P50_NS = (18);
|
|
1417
|
+
exports.STAT_GPU_P95_NS = (19);
|
|
1418
|
+
exports.STAT_PARTICLES_ALIVE = (24);
|
|
1419
|
+
exports.STAT_RAW_DISABLED = (27);
|
|
1420
|
+
exports.STAT_RAW_DISPATCHES = (25);
|
|
1421
|
+
exports.STAT_RAW_GPU_NS = (26);
|
|
1422
|
+
exports.STAT_TEXT_GLYPHS = (29);
|
|
1423
|
+
exports.STAT_THERMAL_TIER = (23);
|
|
1424
|
+
exports.STAT_TRANSPARENT_SORTED = (28);
|
|
1425
|
+
exports.STAT_TRIANGLES = (33);
|
|
1426
|
+
exports.STENCIL_OPERATIONS = STENCIL_OPERATIONS;
|
|
1427
|
+
exports.STREAM_ACTOR_FLOATS = (2);
|
|
1428
|
+
exports.STREAM_COLLIDER_FLOATS = (8);
|
|
1429
|
+
exports.STREAM_EYE_FLOATS = (6);
|
|
1430
|
+
exports.STREAM_LAZY_PACKS_FLAG = (256);
|
|
1431
|
+
exports.STREAM_MAX_PACK_RELEASES = (16);
|
|
1432
|
+
exports.STREAM_MAX_PACK_REQUESTS = (16);
|
|
1433
|
+
exports.STREAM_OP_INSERT = (1);
|
|
1434
|
+
exports.STREAM_PACK_CONTENDED = (-6);
|
|
1435
|
+
exports.STREAM_PACK_MASK = STREAM_PACK_MASK;
|
|
1436
|
+
exports.STREAM_PACK_RELEASES = (17);
|
|
1437
|
+
exports.STREAM_PACK_REQUESTS = (16);
|
|
1438
|
+
exports.STREAM_PRIORITY_NOW = (0);
|
|
1439
|
+
exports.STREAM_PRIORITY_SHIFT = (24);
|
|
1440
|
+
exports.STREAM_PRIORITY_SOON = (1);
|
|
1441
|
+
exports.STREAM_REGISTER = STREAM_REGISTER;
|
|
1442
|
+
exports.STREAM_REGISTER_BLOCK_WORDS = STREAM_REGISTER_BLOCK_WORDS;
|
|
1443
|
+
exports.STREAM_RELEASE_LIST = STREAM_RELEASE_LIST;
|
|
1444
|
+
exports.STREAM_REQUEST_LIST = (18);
|
|
1445
|
+
exports.STREAM_START_PACK = (0);
|
|
1446
|
+
exports.TARGET_COLORS = (7);
|
|
1447
|
+
exports.TARGET_KIND = (5);
|
|
1448
|
+
exports.TARGET_KIND_2D = (0);
|
|
1449
|
+
exports.TARGET_KIND_ARRAY = (2);
|
|
1450
|
+
exports.TARGET_KIND_CUBE = (1);
|
|
1451
|
+
exports.TARGET_LAYERS = (6);
|
|
1452
|
+
exports.TARGET_MAX_COLORS = (4);
|
|
1453
|
+
exports.TARGET_SAMPLED_DEPTH = (8);
|
|
1454
|
+
exports.TARGET_TEXTURES = (16);
|
|
1455
|
+
exports.TEXTURE_ENCODE_ASTC_4X4 = (2);
|
|
1456
|
+
exports.TEXTURE_ENCODE_AUTO = (1);
|
|
1457
|
+
exports.TEXTURE_ENCODE_BC7 = (3);
|
|
1458
|
+
exports.TEXTURE_FORMAT_R16F = (5);
|
|
1459
|
+
exports.TEXTURE_FORMAT_R16UI = (10);
|
|
1460
|
+
exports.TEXTURE_FORMAT_R32F = (7);
|
|
1461
|
+
exports.TEXTURE_FORMAT_R32I = (16);
|
|
1462
|
+
exports.TEXTURE_FORMAT_R32UI = (11);
|
|
1463
|
+
exports.TEXTURE_FORMAT_R8 = (3);
|
|
1464
|
+
exports.TEXTURE_FORMAT_R8UI = (9);
|
|
1465
|
+
exports.TEXTURE_FORMAT_RG16F = (6);
|
|
1466
|
+
exports.TEXTURE_FORMAT_RG32F = (8);
|
|
1467
|
+
exports.TEXTURE_FORMAT_RG32UI = (12);
|
|
1468
|
+
exports.TEXTURE_FORMAT_RG8 = (4);
|
|
1469
|
+
exports.TEXTURE_FORMAT_RGBA16UI = (14);
|
|
1470
|
+
exports.TEXTURE_FORMAT_RGBA32I = (17);
|
|
1471
|
+
exports.TEXTURE_FORMAT_RGBA32UI = (15);
|
|
1472
|
+
exports.TEXTURE_FORMAT_RGBA8UI = (13);
|
|
1473
|
+
exports.TEXTURE_KIND_2D_ARRAY = (3);
|
|
1474
|
+
exports.TEXTURE_KIND_3D = (4);
|
|
1475
|
+
exports.TEXTURE_KIND_EXTERNAL = (5);
|
|
1476
|
+
exports.TIER_INDEX = TIER_INDEX;
|
|
1477
|
+
exports.TONE_MAPPINGS = TONE_MAPPINGS;
|
|
1478
|
+
exports.TRANSFORM_EXPORT_NAMES = TRANSFORM_EXPORT_NAMES;
|
|
1479
|
+
exports.VECTOR_SURFACE_CAPS = VECTOR_SURFACE_CAPS;
|
|
1480
|
+
exports.VECTOR_SURFACE_EDGES = VECTOR_SURFACE_EDGES;
|
|
1481
|
+
exports.VECTOR_SURFACE_TIERS = VECTOR_SURFACE_TIERS;
|
|
1482
|
+
exports.analyserSettings = analyserSettings;
|
|
1483
|
+
exports.bindChemistryEngine = bindChemistryEngine;
|
|
1484
|
+
exports.bindData = bindData;
|
|
1485
|
+
exports.bindTransformEngine = bindTransformEngine;
|
|
1486
|
+
exports.bitExtract = bitExtract;
|
|
1487
|
+
exports.bitInsert = bitInsert;
|
|
1488
|
+
exports.clz = clz;
|
|
1489
|
+
exports.computeLogLine = computeLogLine;
|
|
1490
|
+
exports.createVectorSurfaceStats = createVectorSurfaceStats;
|
|
1491
|
+
exports.ctz = ctz;
|
|
1492
|
+
exports.dataColumn = dataColumn;
|
|
1493
|
+
exports.dataTables = dataTables;
|
|
1494
|
+
exports.emitRow = emitRow;
|
|
1495
|
+
exports.engineDestructionExports = engineDestructionExports;
|
|
1496
|
+
exports.engineFluidExports = engineFluidExports;
|
|
1497
|
+
exports.engineReactiveExports = engineReactiveExports;
|
|
1498
|
+
exports.engineSmokeExports = engineSmokeExports;
|
|
1499
|
+
exports.events = events;
|
|
1500
|
+
exports.f64 = f64;
|
|
1501
|
+
exports.f64Bits = f64Bits;
|
|
1502
|
+
exports.hasData = hasData;
|
|
1503
|
+
exports.list = list;
|
|
1504
|
+
exports.listPool = listPool;
|
|
1505
|
+
exports.listPoolAddress = listPoolAddress;
|
|
1506
|
+
exports.morton2 = morton2;
|
|
1507
|
+
exports.morton2Wide = morton2Wide;
|
|
1508
|
+
exports.morton3 = morton3;
|
|
1509
|
+
exports.morton3Wide = morton3Wide;
|
|
1510
|
+
exports.pickRows = pickRows;
|
|
1511
|
+
exports.popcnt = popcnt;
|
|
1512
|
+
exports.priorityLevel = priorityLevel;
|
|
1513
|
+
exports.queue = queue;
|
|
1514
|
+
exports.readDataReport = readDataReport;
|
|
1515
|
+
exports.readList = readList;
|
|
1516
|
+
exports.reportData = reportData;
|
|
1517
|
+
exports.rotl = rotl;
|
|
1518
|
+
exports.rotr = rotr;
|
|
1519
|
+
exports.routeEvents = routeEvents;
|
|
1520
|
+
exports.scalarArgs = scalarArgs;
|
|
1521
|
+
exports.setEmitRow = setEmitRow;
|
|
1522
|
+
exports.setPoolEngine = setPoolEngine;
|
|
1523
|
+
exports.symbol = symbol2;
|
|
1524
|
+
exports.toU32 = toU32;
|
|
1525
|
+
exports.transformEngine = transformEngine;
|
|
1526
|
+
exports.u64 = u64;
|
|
1527
|
+
exports.u64Words = u64Words;
|
|
1528
|
+
exports.unmorton2 = unmorton2;
|
|
1529
|
+
exports.unmorton3 = unmorton3;
|
|
1530
|
+
exports.useTransformEngine = useTransformEngine;
|
|
1531
|
+
exports.writeWideArg = writeWideArg;
|