@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,44 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/interactives/game-ui/inspect.ts
|
|
4
|
+
var UI_INSPECT_HOOK = "__cimplify_inspect", UI_CHECKS = ["text_overflow", "tap_target", "contrast", "safe_area", "text_size"], UI_EXEMPT_REASONS = {
|
|
5
|
+
text_overflow: ["intentional_clip", "marquee", "decorative"],
|
|
6
|
+
tap_target: ["expanded_hit_area", "dense_grid", "secondary_control", "decorative"],
|
|
7
|
+
contrast: ["decorative", "disabled", "logo", "inside_image"],
|
|
8
|
+
safe_area: ["full_bleed_background", "dismissible_overlay", "decorative"],
|
|
9
|
+
text_size: ["badge_counter", "legal_fine_print", "decorative"]
|
|
10
|
+
};
|
|
11
|
+
function hook() {
|
|
12
|
+
let found = globalThis[UI_INSPECT_HOOK];
|
|
13
|
+
return typeof found == "object" && found !== null ? found : null;
|
|
14
|
+
}
|
|
15
|
+
function uiSite(element, where, name) {
|
|
16
|
+
return hook()?.site(element.id, where, name ?? null), element;
|
|
17
|
+
}
|
|
18
|
+
function exemptUi(element, check, reason) {
|
|
19
|
+
if (!UI_EXEMPT_REASONS[check].includes(reason))
|
|
20
|
+
throw new RangeError(`${reason} is not a reason to exempt a node from ${check}; use one of ${UI_EXEMPT_REASONS[check].join(", ")}`);
|
|
21
|
+
return hook()?.exempt(element.id, check, reason), element;
|
|
22
|
+
}
|
|
23
|
+
var scenesApplied = /* @__PURE__ */ new WeakSet();
|
|
24
|
+
function inspectScene(registered) {
|
|
25
|
+
let found = hook();
|
|
26
|
+
if (found === null || scenesApplied.has(found)) return null;
|
|
27
|
+
let requested = found.scene();
|
|
28
|
+
return requested === null || !registered(requested) ? null : (scenesApplied.add(found), found.sceneApplied(requested), requested);
|
|
29
|
+
}
|
|
30
|
+
function inspectSceneSwitch(target, registered) {
|
|
31
|
+
return inspectScene(registered) ?? target;
|
|
32
|
+
}
|
|
33
|
+
function inspectSceneEntered(name) {
|
|
34
|
+
hook()?.sceneEntered?.(name);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
exports.UI_CHECKS = UI_CHECKS;
|
|
38
|
+
exports.UI_EXEMPT_REASONS = UI_EXEMPT_REASONS;
|
|
39
|
+
exports.UI_INSPECT_HOOK = UI_INSPECT_HOOK;
|
|
40
|
+
exports.exemptUi = exemptUi;
|
|
41
|
+
exports.inspectScene = inspectScene;
|
|
42
|
+
exports.inspectSceneEntered = inspectSceneEntered;
|
|
43
|
+
exports.inspectSceneSwitch = inspectSceneSwitch;
|
|
44
|
+
exports.uiSite = uiSite;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkVRBDAS5I_js = require('./chunk-VRBDAS5I.js');
|
|
4
|
+
|
|
5
|
+
// src/interactives/game-ui/styling/vars.ts
|
|
6
|
+
var FNV_OFFSET = 2166136261, FNV_PRIME = 16777619, VAR_ID_MASK = 1073741823;
|
|
7
|
+
function varId(namespace, key) {
|
|
8
|
+
let text = `${namespace}.${key}`, hash = (2166136261);
|
|
9
|
+
for (let i = 0; i < text.length; i++)
|
|
10
|
+
hash ^= text.charCodeAt(i), hash = Math.imul(hash, (16777619));
|
|
11
|
+
return hash >>> 0 & (1073741823);
|
|
12
|
+
}
|
|
13
|
+
var UiVar = class {
|
|
14
|
+
constructor(id, name, fallback) {
|
|
15
|
+
this.id = id;
|
|
16
|
+
this.name = name;
|
|
17
|
+
this.fallback = fallback;
|
|
18
|
+
}
|
|
19
|
+
}, UiSlot = class {
|
|
20
|
+
constructor(index, percent = false) {
|
|
21
|
+
this.index = index;
|
|
22
|
+
this.percent = percent;
|
|
23
|
+
}
|
|
24
|
+
}, defaults = /* @__PURE__ */ new Map(), names = /* @__PURE__ */ new Map();
|
|
25
|
+
function varDefault(id) {
|
|
26
|
+
return defaults.get(id);
|
|
27
|
+
}
|
|
28
|
+
function defineVars(namespace, values) {
|
|
29
|
+
let group = {};
|
|
30
|
+
for (let key of Object.keys(values)) {
|
|
31
|
+
let name = `${namespace}.${key}`, id = varId(namespace, key), known = names.get(id);
|
|
32
|
+
if (known !== void 0 && known !== name) throw new chunkVRBDAS5I_js.UiStyleError(`style variable ${name} collides with ${known}; rename one of them`);
|
|
33
|
+
names.set(id, name), defaults.set(id, values[key]), group[key] = new UiVar(id, name, values[key]);
|
|
34
|
+
}
|
|
35
|
+
return Object.freeze(group);
|
|
36
|
+
}
|
|
37
|
+
var UiTheme = class {
|
|
38
|
+
constructor(values) {
|
|
39
|
+
this.values = values;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
function createTheme(group, overrides) {
|
|
43
|
+
let values = /* @__PURE__ */ new Map();
|
|
44
|
+
for (let key of Object.keys(overrides)) {
|
|
45
|
+
let variable = group[key];
|
|
46
|
+
if (variable === void 0) throw new chunkVRBDAS5I_js.UiStyleError(`theme sets ${key}, which the variable group does not define`);
|
|
47
|
+
let value = overrides[key];
|
|
48
|
+
value !== void 0 && values.set(variable.id, value);
|
|
49
|
+
}
|
|
50
|
+
return new UiTheme(values);
|
|
51
|
+
}
|
|
52
|
+
function mergeThemes(themes) {
|
|
53
|
+
let values = /* @__PURE__ */ new Map();
|
|
54
|
+
for (let theme of themes) for (let [id, value] of theme.values) values.set(id, value);
|
|
55
|
+
return new UiTheme(values);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// src/interactives/game-ui/styling/tokens.ts
|
|
59
|
+
var TOKEN_NAMESPACE = "ui";
|
|
60
|
+
function palette(theme) {
|
|
61
|
+
return {
|
|
62
|
+
surface: theme.surface,
|
|
63
|
+
raised: theme.raised,
|
|
64
|
+
border: theme.border,
|
|
65
|
+
accent: theme.accent,
|
|
66
|
+
onAccent: theme.on_accent,
|
|
67
|
+
text: theme.text,
|
|
68
|
+
muted: theme.muted,
|
|
69
|
+
track: theme.track,
|
|
70
|
+
danger: theme.danger,
|
|
71
|
+
success: theme.success,
|
|
72
|
+
gold: theme.gold
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
var tokens = defineVars(TOKEN_NAMESPACE, palette(chunkVRBDAS5I_js.DEFAULT_THEME));
|
|
76
|
+
function themeTokens(theme) {
|
|
77
|
+
return createTheme(tokens, palette(theme));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
exports.TOKEN_NAMESPACE = TOKEN_NAMESPACE;
|
|
81
|
+
exports.UiSlot = UiSlot;
|
|
82
|
+
exports.UiTheme = UiTheme;
|
|
83
|
+
exports.UiVar = UiVar;
|
|
84
|
+
exports.createTheme = createTheme;
|
|
85
|
+
exports.defineVars = defineVars;
|
|
86
|
+
exports.mergeThemes = mergeThemes;
|
|
87
|
+
exports.themeTokens = themeTokens;
|
|
88
|
+
exports.tokens = tokens;
|
|
89
|
+
exports.varDefault = varDefault;
|
|
90
|
+
exports.varId = varId;
|
|
@@ -0,0 +1,502 @@
|
|
|
1
|
+
import { COLUMN_ALIGN } from './chunk-A33OORT7.mjs';
|
|
2
|
+
import { GameError } from './chunk-XJIHN3BY.mjs';
|
|
3
|
+
|
|
4
|
+
// src/game/cloth/engine.ts
|
|
5
|
+
var CLOTH_FEATURE = "cloth_1", CLOTH_REGISTER_WORDS = 64, CLOTH_MASS = 0, CLOTH_STRETCH = 1, CLOTH_BEND = 2, CLOTH_TETHER_SLACK = 3, CLOTH_DAMPING = 4, CLOTH_GRAVITY = 5, CLOTH_SUBSTEPS = 8, CLOTH_THICKNESS = 9, CLOTH_FRICTION = 10, CLOTH_COLUMNS = 16, CLOTH_ROWS = 17, CLOTH_SPACING = 18, CLOTH_ORIGIN = 19, CLOTH_ACROSS = 22, CLOTH_DOWN = 25, CLOTH_PIN = 28, CLOTH_COUNT = 32, CLOTH_TRIANGLES = 33, CLOTH_COLOURS = 34;
|
|
6
|
+
var CLOTH_PINS = 36;
|
|
7
|
+
var CLOTH_DIGEST_LOW = 40, CLOTH_DIGEST_HIGH = 41, CLOTH_PIN_NONE = 0, CLOTH_PIN_TOP_ROW = 1, CLOTH_PIN_TOP_CORNERS = 2, CLOTH_COLLIDER_FLOATS = 8, CLOTH_COLLIDER_SPHERE = 0, CLOTH_COLLIDER_CAPSULE = 1, CLOTH_MAX_COLLIDERS = 32, CLOTH_ROW_FLOATS = 4, DEFAULT_CLOTHS = 32, DEFAULT_CLOTH_PARTICLES = 65536, ENGINE_CLOTH_EXPORT_NAMES = [
|
|
8
|
+
"engine_cloth_create",
|
|
9
|
+
"engine_cloth_create_in",
|
|
10
|
+
"engine_cloth_destroy",
|
|
11
|
+
"engine_cloth_registers",
|
|
12
|
+
"engine_cloth_add_grid",
|
|
13
|
+
"engine_cloth_add_mesh",
|
|
14
|
+
"engine_cloth_remove",
|
|
15
|
+
"engine_cloth_params",
|
|
16
|
+
"engine_cloth_colliders",
|
|
17
|
+
"engine_cloth_anchors",
|
|
18
|
+
"engine_cloth_step",
|
|
19
|
+
"engine_cloth_positions",
|
|
20
|
+
"engine_cloth_digest",
|
|
21
|
+
"engine_cloth_present"
|
|
22
|
+
], ENGINE_RIGID_COUPLING_EXPORT_NAMES = [
|
|
23
|
+
"engine_cloth_couple",
|
|
24
|
+
"engine_cloth_rigid_mesh",
|
|
25
|
+
"engine_cloth_rigid_pose",
|
|
26
|
+
"engine_cloth_uncouple",
|
|
27
|
+
"engine_cloth_step_coupled",
|
|
28
|
+
"engine_soft_couple",
|
|
29
|
+
"engine_soft_rigid_mesh",
|
|
30
|
+
"engine_soft_rigid_pose",
|
|
31
|
+
"engine_soft_uncouple",
|
|
32
|
+
"engine_soft_step_coupled"
|
|
33
|
+
];
|
|
34
|
+
function engineCall(runtime, name) {
|
|
35
|
+
let fn = runtime.symbols[name];
|
|
36
|
+
if (typeof fn != "function") throw new GameError("unsupported_feature", `${name} needs an engine with feature rigid_coupling_1`);
|
|
37
|
+
return fn;
|
|
38
|
+
}
|
|
39
|
+
var NULL = 0, F32_BYTES = 4, MICROS = 1e6, HIGH_BITS = 32n, AXES = 3, TRIANGLE_INDICES = 3, SCRATCH_FLOATS = (8) * (32);
|
|
40
|
+
function engineClothExports(runtime) {
|
|
41
|
+
let symbols = runtime.symbols;
|
|
42
|
+
return ENGINE_CLOTH_EXPORT_NAMES.every((name) => typeof symbols[name] == "function") ? symbols : null;
|
|
43
|
+
}
|
|
44
|
+
var EngineCloths = class {
|
|
45
|
+
constructor(runtime, exports, render, world = () => (0), maxCloths = (32), maxParticles = (65536)) {
|
|
46
|
+
this.runtime = runtime;
|
|
47
|
+
this.exports = exports;
|
|
48
|
+
this.render = render;
|
|
49
|
+
this.world = world;
|
|
50
|
+
this.maxCloths = maxCloths;
|
|
51
|
+
this.maxParticles = maxParticles;
|
|
52
|
+
this.handle = (0);
|
|
53
|
+
this.scratch = (0);
|
|
54
|
+
this.buffer = null;
|
|
55
|
+
this.bytes = new Uint8Array(0);
|
|
56
|
+
this.words = new Uint32Array(0);
|
|
57
|
+
this.views = new Float32Array(0);
|
|
58
|
+
this.registers = new Uint32Array(0);
|
|
59
|
+
this.floats = new Float32Array(0);
|
|
60
|
+
this.rows = /* @__PURE__ */ new Map();
|
|
61
|
+
this.coupled = 0;
|
|
62
|
+
}
|
|
63
|
+
memory() {
|
|
64
|
+
let buffer = this.runtime.memory.buffer;
|
|
65
|
+
buffer !== this.buffer && (this.buffer = buffer, this.bytes = new Uint8Array(buffer), this.words = new Uint32Array(buffer), this.views = new Float32Array(buffer));
|
|
66
|
+
}
|
|
67
|
+
get engineHost() {
|
|
68
|
+
return this.open();
|
|
69
|
+
}
|
|
70
|
+
open() {
|
|
71
|
+
if (this.handle === (0)) {
|
|
72
|
+
let world = this.world();
|
|
73
|
+
if (this.handle = world === (0) ? this.exports.engine_cloth_create(this.maxCloths, this.maxParticles) : this.exports.engine_cloth_create_in(world, this.maxCloths, this.maxParticles), this.handle === (0)) throw new GameError("invalid_argument", "the engine refused the cloth world");
|
|
74
|
+
if (this.scratch = this.runtime.exports.engine_alloc(SCRATCH_FLOATS * (4), COLUMN_ALIGN), this.scratch === (0)) throw new GameError("capacity_exceeded", "engine memory cannot hold cloth colliders");
|
|
75
|
+
}
|
|
76
|
+
return this.view(), this.handle;
|
|
77
|
+
}
|
|
78
|
+
view() {
|
|
79
|
+
this.memory();
|
|
80
|
+
let at = this.exports.engine_cloth_registers(this.handle);
|
|
81
|
+
(this.registers.buffer !== this.words.buffer || this.registers.byteOffset !== at) && (this.registers = new Uint32Array(this.words.buffer, at, (64)), this.floats = new Float32Array(this.words.buffer, at, (64)));
|
|
82
|
+
}
|
|
83
|
+
check(code, what) {
|
|
84
|
+
if (code === -1) throw new GameError("capacity_exceeded", `the cloth world has no room for the ${what}`);
|
|
85
|
+
if (code === -3) throw new GameError("unknown_resource", `the cloth ${what} names a missing cloth`);
|
|
86
|
+
if (!(code >= 0)) throw new GameError("invalid_argument", `the engine refused the cloth ${what} (${code})`);
|
|
87
|
+
return code;
|
|
88
|
+
}
|
|
89
|
+
stage(bytes, what) {
|
|
90
|
+
let pointer = this.runtime.exports.engine_alloc(Math.max(bytes, (4)), COLUMN_ALIGN);
|
|
91
|
+
if (pointer === (0)) throw new GameError("capacity_exceeded", `engine memory cannot hold the cloth ${what}`);
|
|
92
|
+
return this.memory(), pointer;
|
|
93
|
+
}
|
|
94
|
+
release(pointer, bytes) {
|
|
95
|
+
pointer !== (0) && this.runtime.exports.engine_free(pointer, Math.max(bytes, (4)), COLUMN_ALIGN);
|
|
96
|
+
}
|
|
97
|
+
staged(values, what) {
|
|
98
|
+
if (values === null || values.length === 0) return (0);
|
|
99
|
+
let pointer = this.stage(values.byteLength, what);
|
|
100
|
+
return this.bytes.set(new Uint8Array(values.buffer, values.byteOffset, values.byteLength), pointer), pointer;
|
|
101
|
+
}
|
|
102
|
+
info(id) {
|
|
103
|
+
this.view();
|
|
104
|
+
let r = this.registers;
|
|
105
|
+
return { id, particles: r[(32)], triangles: r[(33)], pins: r[(36)], colours: r[(34)] };
|
|
106
|
+
}
|
|
107
|
+
prepare() {
|
|
108
|
+
return this.open(), this.floats;
|
|
109
|
+
}
|
|
110
|
+
grid(pins) {
|
|
111
|
+
let handle = this.open(), pointer = this.staged(pins, "pins"), id = this.exports.engine_cloth_add_grid(handle, pointer, pins?.length ?? 0);
|
|
112
|
+
return this.release(pointer, pins?.byteLength ?? 0), this.info(this.check(id, "grid"));
|
|
113
|
+
}
|
|
114
|
+
mesh(positions, triangles, pins) {
|
|
115
|
+
let handle = this.open(), vertices = this.staged(positions, "vertices"), indices = this.staged(triangles, "triangles"), pinned = this.staged(pins, "pins"), id = this.exports.engine_cloth_add_mesh(handle, vertices, positions.length / (3), indices, triangles.length / (3), pinned, pins?.length ?? 0);
|
|
116
|
+
return this.release(vertices, positions.byteLength), this.release(indices, triangles.byteLength), this.release(pinned, pins?.byteLength ?? 0), this.info(this.check(id, "mesh"));
|
|
117
|
+
}
|
|
118
|
+
remove(id) {
|
|
119
|
+
this.rows.delete(id), this.handle !== (0) && this.exports.engine_cloth_remove(this.handle, id);
|
|
120
|
+
}
|
|
121
|
+
params(id) {
|
|
122
|
+
this.check(this.exports.engine_cloth_params(this.open(), id), "parameters");
|
|
123
|
+
}
|
|
124
|
+
colliders(words, count) {
|
|
125
|
+
let handle = this.open();
|
|
126
|
+
if (count > (32)) throw new GameError("capacity_exceeded", `cloth collides with at most ${(32)} shapes`);
|
|
127
|
+
this.memory(), this.views.set(words.subarray(0, count * (8)), this.scratch >>> 2), this.check(this.exports.engine_cloth_colliders(handle, this.scratch, count), "colliders");
|
|
128
|
+
}
|
|
129
|
+
anchors(id, anchors) {
|
|
130
|
+
let handle = this.open(), pointer = this.staged(anchors, "anchors"), code = this.exports.engine_cloth_anchors(handle, id, pointer, anchors.length / (3));
|
|
131
|
+
this.release(pointer, anchors.byteLength), this.check(code, "anchors");
|
|
132
|
+
}
|
|
133
|
+
step(seconds) {
|
|
134
|
+
if (this.handle === (0)) return;
|
|
135
|
+
let micros = Math.max(0, Math.round(seconds * (1e6))), world = this.world();
|
|
136
|
+
if (this.coupled > 0 && world !== (0)) {
|
|
137
|
+
this.check(engineCall(this.runtime, "engine_cloth_step_coupled")(this.handle, world, micros), "coupled step");
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
this.exports.engine_cloth_step(this.handle, micros);
|
|
141
|
+
}
|
|
142
|
+
couple(collider) {
|
|
143
|
+
let handle = this.open(), world = this.world();
|
|
144
|
+
if (world === (0)) throw new GameError("not_initialized", "cloth couples to rigid bodies only inside a physics world");
|
|
145
|
+
let slot = this.check(engineCall(this.runtime, "engine_cloth_couple")(handle, world, collider), "coupling");
|
|
146
|
+
return this.coupled++, slot;
|
|
147
|
+
}
|
|
148
|
+
uncouple(slot) {
|
|
149
|
+
this.check(engineCall(this.runtime, "engine_cloth_uncouple")(this.open(), slot), "uncoupling"), this.coupled = Math.max(0, this.coupled - 1);
|
|
150
|
+
}
|
|
151
|
+
positions(id, count) {
|
|
152
|
+
let at = this.exports.engine_cloth_positions(this.open(), id);
|
|
153
|
+
if (at === (0)) throw new GameError("unknown_resource", `cloth ${id} is gone`);
|
|
154
|
+
this.memory();
|
|
155
|
+
let held = this.rows.get(id);
|
|
156
|
+
if (held !== void 0 && held.buffer === this.views.buffer && held.byteOffset === at) return held;
|
|
157
|
+
let view = new Float32Array(this.views.buffer, at, count * (4));
|
|
158
|
+
return this.rows.set(id, view), view;
|
|
159
|
+
}
|
|
160
|
+
digest() {
|
|
161
|
+
let handle = this.open();
|
|
162
|
+
return this.exports.engine_cloth_digest(handle), this.view(), BigInt(this.registers[(41)]) << HIGH_BITS | BigInt(this.registers[(40)]);
|
|
163
|
+
}
|
|
164
|
+
present(id, geometry) {
|
|
165
|
+
let render = this.render();
|
|
166
|
+
return this.handle === (0) || render === (0) ? 0 : this.check(this.exports.engine_cloth_present(this.handle, id, render, geometry), "presentation");
|
|
167
|
+
}
|
|
168
|
+
dispose() {
|
|
169
|
+
this.handle !== (0) && (this.release(this.scratch, SCRATCH_FLOATS * (4)), this.exports.engine_cloth_destroy(this.handle), this.handle = (0), this.scratch = (0), this.rows.clear());
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
// src/game/softbody/engine.ts
|
|
174
|
+
var SOFT_BODY_FEATURE = "soft_body_1", SOFT_REGISTER_WORDS = 64, SOFT_STRETCH = 0, SOFT_BEND = 1, SOFT_VOLUME = 2, SOFT_DAMPING = 3, SOFT_GRAVITY = 4, SOFT_SUBSTEPS = 7, SOFT_RADIUS = 8, SOFT_FRICTION = 9, SOFT_CONTRACTION = 10, SOFT_YIELD = 11, SOFT_CREEP = 12, SOFT_LIMIT = 13, SOFT_CELLS = 16, SOFT_SIZE = 19, SOFT_ORIGIN = 22, SOFT_DENSITY = 25, SOFT_MASS = 26, SOFT_PIN_FIRST = 27, SOFT_FIBRE = 28, SOFT_COUNT = 32, SOFT_SKIN = 33;
|
|
175
|
+
var SOFT_DIGEST_LOW = 40, SOFT_DIGEST_HIGH = 41, SOFT_TETS = 42, SOFT_COLOURS = 43, SOFT_COLLIDER_FLOATS = 12, SOFT_MAX_COLLIDERS = 32, SOFT_ROW_FLOATS = 4, SOFT_COLLIDER_PLANE = 0, SOFT_COLLIDER_SPHERE = 1, SOFT_COLLIDER_CAPSULE = 2, SOFT_COLLIDER_BOX = 3, CRUMPLE_DESC_FLOATS = 14, CRUMPLE_IMPACT_FLOATS = 6, DEFAULT_SOFT_BODIES = 64, DEFAULT_SOFT_PARTICLES = 65536, ENGINE_SOFT_BODY_EXPORT_NAMES = [
|
|
176
|
+
"engine_soft_create",
|
|
177
|
+
"engine_soft_destroy",
|
|
178
|
+
"engine_soft_registers",
|
|
179
|
+
"engine_soft_add",
|
|
180
|
+
"engine_soft_add_lattice",
|
|
181
|
+
"engine_soft_add_rope",
|
|
182
|
+
"engine_soft_remove",
|
|
183
|
+
"engine_soft_params",
|
|
184
|
+
"engine_soft_colliders",
|
|
185
|
+
"engine_soft_anchors",
|
|
186
|
+
"engine_soft_activate",
|
|
187
|
+
"engine_soft_move",
|
|
188
|
+
"engine_soft_step",
|
|
189
|
+
"engine_soft_positions",
|
|
190
|
+
"engine_soft_digest",
|
|
191
|
+
"engine_soft_present",
|
|
192
|
+
"engine_soft_create_in"
|
|
193
|
+
], ENGINE_CRUMPLE_EXPORT_NAMES = ["engine_craft_crumple", "engine_craft_impact", "engine_craft_damage", "engine_craft_crumple_present"], NULL2 = 0, F32_BYTES2 = 4, MICROS2 = 1e6, SCRATCH_FLOATS2 = (12) * (32);
|
|
194
|
+
function engineSoftBodyExports(runtime) {
|
|
195
|
+
let symbols = runtime.symbols;
|
|
196
|
+
return ENGINE_SOFT_BODY_EXPORT_NAMES.every((name) => typeof symbols[name] == "function") ? symbols : null;
|
|
197
|
+
}
|
|
198
|
+
var Memory = class {
|
|
199
|
+
constructor(runtime) {
|
|
200
|
+
this.runtime = runtime;
|
|
201
|
+
this.buffer = null;
|
|
202
|
+
this.bytes = new Uint8Array(0);
|
|
203
|
+
this.floats = new Float32Array(0);
|
|
204
|
+
this.words = new Uint32Array(0);
|
|
205
|
+
}
|
|
206
|
+
views() {
|
|
207
|
+
let buffer = this.runtime.memory.buffer;
|
|
208
|
+
buffer !== this.buffer && (this.buffer = buffer, this.bytes = new Uint8Array(buffer), this.floats = new Float32Array(buffer), this.words = new Uint32Array(buffer));
|
|
209
|
+
}
|
|
210
|
+
allocate(bytes, what) {
|
|
211
|
+
let pointer = this.runtime.exports.engine_alloc(Math.max(bytes, (4)), COLUMN_ALIGN);
|
|
212
|
+
if (pointer === (0)) throw new GameError("capacity_exceeded", `engine memory cannot hold the ${what}`);
|
|
213
|
+
return this.views(), pointer;
|
|
214
|
+
}
|
|
215
|
+
release(pointer, bytes) {
|
|
216
|
+
this.runtime.exports.engine_free(pointer, Math.max(bytes, (4)), COLUMN_ALIGN);
|
|
217
|
+
}
|
|
218
|
+
floatsAt(values, what) {
|
|
219
|
+
let pointer = this.allocate(values.byteLength, what);
|
|
220
|
+
return this.floats.set(values, pointer >>> 2), pointer;
|
|
221
|
+
}
|
|
222
|
+
}, EngineSoftBodies = class {
|
|
223
|
+
constructor(runtime, exports, render, world = () => (0), maxBodies = (64), maxParticles = (65536)) {
|
|
224
|
+
this.runtime = runtime;
|
|
225
|
+
this.exports = exports;
|
|
226
|
+
this.render = render;
|
|
227
|
+
this.world = world;
|
|
228
|
+
this.maxBodies = maxBodies;
|
|
229
|
+
this.maxParticles = maxParticles;
|
|
230
|
+
this.handle = (0);
|
|
231
|
+
this.scratch = (0);
|
|
232
|
+
this.registers = new Uint32Array(0);
|
|
233
|
+
this.floats = new Float32Array(0);
|
|
234
|
+
this.coupled = 0;
|
|
235
|
+
this.memory = new Memory(runtime);
|
|
236
|
+
}
|
|
237
|
+
open() {
|
|
238
|
+
if (this.handle === (0)) {
|
|
239
|
+
let world = this.world();
|
|
240
|
+
if (this.handle = world === (0) ? this.exports.engine_soft_create(this.maxBodies, this.maxParticles) : this.exports.engine_soft_create_in(world, this.maxBodies, this.maxParticles), this.handle === (0)) throw new GameError("invalid_argument", "the engine refused the soft body world");
|
|
241
|
+
this.scratch = this.memory.allocate(SCRATCH_FLOATS2 * (4), "soft body colliders");
|
|
242
|
+
}
|
|
243
|
+
return this.view(), this.handle;
|
|
244
|
+
}
|
|
245
|
+
view() {
|
|
246
|
+
this.memory.views();
|
|
247
|
+
let at = this.exports.engine_soft_registers(this.handle);
|
|
248
|
+
(this.registers.buffer !== this.memory.words.buffer || this.registers.byteOffset !== at) && (this.registers = new Uint32Array(this.memory.words.buffer, at, (64)), this.floats = new Float32Array(this.memory.words.buffer, at, (64)));
|
|
249
|
+
}
|
|
250
|
+
check(code, what) {
|
|
251
|
+
if (!(code >= 0)) throw new GameError("invalid_argument", `the engine refused the soft body ${what} (${code})`);
|
|
252
|
+
return code;
|
|
253
|
+
}
|
|
254
|
+
info(id) {
|
|
255
|
+
this.view();
|
|
256
|
+
let r = this.registers;
|
|
257
|
+
return { id, particles: r[(32)], skinned: r[(33)], tets: r[(42)], colours: r[(43)] };
|
|
258
|
+
}
|
|
259
|
+
prepare() {
|
|
260
|
+
return this.open(), this.floats;
|
|
261
|
+
}
|
|
262
|
+
lattice(lattice, vertices) {
|
|
263
|
+
let handle = this.open(), r = this.registers, f = this.floats;
|
|
264
|
+
for (let k = 0; k < 3; k++)
|
|
265
|
+
r[(16) + k] = lattice.cells[k], f[(19) + k] = lattice.size[k], f[(22) + k] = lattice.origin[k];
|
|
266
|
+
f[(25)] = lattice.density;
|
|
267
|
+
let count = vertices === null ? 0 : vertices.length / 3, pointer = vertices === null ? (0) : this.memory.floatsAt(vertices, "soft body surface"), id = this.exports.engine_soft_add_lattice(handle, pointer, count);
|
|
268
|
+
return pointer !== (0) && vertices !== null && this.memory.release(pointer, vertices.byteLength), this.info(this.check(id, "lattice"));
|
|
269
|
+
}
|
|
270
|
+
rope(points, mass, pinFirst) {
|
|
271
|
+
let handle = this.open();
|
|
272
|
+
this.floats[(26)] = mass, this.registers[(27)] = pinFirst ? 1 : 0;
|
|
273
|
+
let pointer = this.memory.floatsAt(points, "rope points"), id = this.exports.engine_soft_add_rope(handle, pointer, points.length / 3);
|
|
274
|
+
return this.memory.release(pointer, points.byteLength), this.info(this.check(id, "rope"));
|
|
275
|
+
}
|
|
276
|
+
asset(bytes) {
|
|
277
|
+
let handle = this.open(), pointer = this.memory.allocate(bytes.byteLength, "soft body asset");
|
|
278
|
+
this.memory.bytes.set(bytes, pointer);
|
|
279
|
+
let id = this.exports.engine_soft_add(handle, pointer, bytes.byteLength);
|
|
280
|
+
return this.memory.release(pointer, bytes.byteLength), this.info(this.check(id, "asset (CSBT)"));
|
|
281
|
+
}
|
|
282
|
+
remove(id) {
|
|
283
|
+
this.handle !== (0) && this.exports.engine_soft_remove(this.handle, id);
|
|
284
|
+
}
|
|
285
|
+
params(id) {
|
|
286
|
+
this.check(this.exports.engine_soft_params(this.open(), id), "parameters");
|
|
287
|
+
}
|
|
288
|
+
colliders(words, count) {
|
|
289
|
+
let handle = this.open();
|
|
290
|
+
if (count > (32)) throw new GameError("capacity_exceeded", `soft bodies collide with at most ${(32)} shapes`);
|
|
291
|
+
this.memory.views(), this.memory.floats.set(words.subarray(0, count * (12)), this.scratch >>> 2), this.check(this.exports.engine_soft_colliders(handle, this.scratch, count), "colliders");
|
|
292
|
+
}
|
|
293
|
+
anchors(id, anchors) {
|
|
294
|
+
let handle = this.open(), pointer = this.memory.floatsAt(anchors, "anchors"), code = this.exports.engine_soft_anchors(handle, id, pointer, anchors.length / 3);
|
|
295
|
+
this.memory.release(pointer, anchors.byteLength), this.check(code, "anchors");
|
|
296
|
+
}
|
|
297
|
+
activate(id, activation) {
|
|
298
|
+
this.check(this.exports.engine_soft_activate(this.open(), id, activation), "activation");
|
|
299
|
+
}
|
|
300
|
+
move(id, offset, velocity) {
|
|
301
|
+
let handle = this.open();
|
|
302
|
+
for (let k = 0; k < 3; k++)
|
|
303
|
+
this.floats[(22) + k] = offset[k], this.floats[(19) + k] = velocity[k];
|
|
304
|
+
this.check(this.exports.engine_soft_move(handle, id), "move");
|
|
305
|
+
}
|
|
306
|
+
step(seconds) {
|
|
307
|
+
if (this.handle === (0)) return;
|
|
308
|
+
let micros = Math.max(0, Math.round(seconds * (1e6))), world = this.world();
|
|
309
|
+
if (this.coupled > 0 && world !== (0)) {
|
|
310
|
+
this.check(engineCall(this.runtime, "engine_soft_step_coupled")(this.handle, world, micros), "coupled step");
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
this.exports.engine_soft_step(this.handle, micros);
|
|
314
|
+
}
|
|
315
|
+
couple(collider) {
|
|
316
|
+
let handle = this.open(), world = this.world();
|
|
317
|
+
if (world === (0)) throw new GameError("not_initialized", "soft bodies couple to rigid bodies only inside a physics world");
|
|
318
|
+
let slot = this.check(engineCall(this.runtime, "engine_soft_couple")(handle, world, collider), "coupling");
|
|
319
|
+
return this.coupled++, slot;
|
|
320
|
+
}
|
|
321
|
+
uncouple(slot) {
|
|
322
|
+
this.check(engineCall(this.runtime, "engine_soft_uncouple")(this.open(), slot), "uncoupling"), this.coupled = Math.max(0, this.coupled - 1);
|
|
323
|
+
}
|
|
324
|
+
positions(id, count) {
|
|
325
|
+
let at = this.exports.engine_soft_positions(this.open(), id);
|
|
326
|
+
if (at === (0)) throw new GameError("unknown_resource", `soft body ${id} is gone`);
|
|
327
|
+
return this.memory.views(), new Float32Array(this.memory.floats.buffer, at, count * (4));
|
|
328
|
+
}
|
|
329
|
+
digest() {
|
|
330
|
+
let handle = this.open();
|
|
331
|
+
return this.exports.engine_soft_digest(handle), this.view(), BigInt(this.registers[(41)]) << 32n | BigInt(this.registers[(40)]);
|
|
332
|
+
}
|
|
333
|
+
present(id, geometry) {
|
|
334
|
+
let render = this.render();
|
|
335
|
+
return this.handle === (0) || render === (0) ? 0 : this.check(this.exports.engine_soft_present(this.handle, id, render, geometry), "presentation");
|
|
336
|
+
}
|
|
337
|
+
dispose() {
|
|
338
|
+
this.handle !== (0) && (this.memory.release(this.scratch, SCRATCH_FLOATS2 * (4)), this.exports.engine_soft_destroy(this.handle), this.handle = (0));
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
// src/game/audio/types.ts
|
|
343
|
+
var DEFAULT_OCCLUSION = { radius: 0.5, occludedGain: 0.35, occludedCutoff: 900, smoothingSeconds: 0.08 }, OCCLUSION_WORDS = 4, QUANTIZE_NOW = 0, QUANTIZE_BEAT = 1, QUANTIZE_BAR = 2, MAX_STEMS = 8, PHRASE_QUANTIZE_SHIFT = 16, MUSIC_POSITION_WORDS = 3, DEFAULT_LIMITER_CEILING_DB = -1, DEFAULT_LIMITER_RELEASE_SECONDS = 0.1, MIN_PRIORITY = -128, MAX_PRIORITY = 127, DEFAULT_PRIORITY = 0, PLAY_PRIORITY_SHIFT = 8, PRIORITY_MASK = 255, UNLIMITED_VOICES = -1, STEAL_POLICIES = ["oldest", "quietest", "refuse"], AUDIO_PREVIEW_SUFFIX = ".preview.m4a", EMITTER_COLUMNS = 8, EMITTER_X = 0, EMITTER_VX = 3, EMITTER_GAIN = 6, EMITTER_PITCH = 7, NO_EMITTER_COLUMN = 4294967295, DEFAULT_EMITTER_CAPACITY = 1024, NO_AUDIO_CAPABILITIES = {
|
|
344
|
+
spatial: false,
|
|
345
|
+
filters: false,
|
|
346
|
+
meters: false,
|
|
347
|
+
analyser: false,
|
|
348
|
+
reverb: false,
|
|
349
|
+
sends: false,
|
|
350
|
+
loopPoints: false,
|
|
351
|
+
streaming: false,
|
|
352
|
+
detune: false,
|
|
353
|
+
procedural: false
|
|
354
|
+
}, FULL_AUDIO_CAPABILITIES = {
|
|
355
|
+
spatial: true,
|
|
356
|
+
filters: true,
|
|
357
|
+
meters: true,
|
|
358
|
+
analyser: true,
|
|
359
|
+
reverb: true,
|
|
360
|
+
sends: true,
|
|
361
|
+
loopPoints: true,
|
|
362
|
+
streaming: true,
|
|
363
|
+
detune: true,
|
|
364
|
+
procedural: true
|
|
365
|
+
}, FILTER_KINDS = ["lowpass", "highpass", "bandpass", "notch", "allpass", "peaking", "lowshelf", "highshelf"], FILTER_OFF = -1, DISTANCE_MODELS = ["linear", "inverse", "exponential"], SPATIAL_WORDS = 8, SPATIAL_MODEL = 0, SPATIAL_REF_DISTANCE = 1, SPATIAL_MAX_DISTANCE = 2, SPATIAL_ROLLOFF = 3, SPATIAL_CONE_INNER = 4, SPATIAL_CONE_OUTER = 5, SPATIAL_CONE_OUTER_GAIN = 6, SPATIAL_DOPPLER = 7, DEFAULT_PANNER = {
|
|
366
|
+
distanceModel: "inverse",
|
|
367
|
+
refDistance: 1,
|
|
368
|
+
maxDistance: 1e4,
|
|
369
|
+
rolloff: 1,
|
|
370
|
+
coneInnerAngle: 360,
|
|
371
|
+
coneOuterAngle: 360,
|
|
372
|
+
coneOuterGain: 0,
|
|
373
|
+
doppler: 0
|
|
374
|
+
}, METER_PEAK = 0, METER_RMS = 1;
|
|
375
|
+
var ANALYSER_FREQUENCY = 0, ANALYSER_TIME = 1, DEFAULT_FFT_SIZE = 2048, MIN_FFT_SIZE = 32, MAX_FFT_SIZE = 32768, DEFAULT_SMOOTHING = 0.8, DEFAULT_MIN_DECIBELS = -100, DEFAULT_MAX_DECIBELS = -30, STREAM_STOPPED = 0, STREAM_PLAYING = 1, STREAM_PAUSED = 2, CENTS_PER_OCTAVE = 1200;
|
|
376
|
+
function detuneRate(rate, cents) {
|
|
377
|
+
return cents === 0 ? rate : rate * 2 ** (cents / (1200));
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
// src/game/destruction/fracture.ts
|
|
381
|
+
var FRACTURE_VERTEX_FLOATS = 8, FRACTURE_OPTION_FLOATS = 9, FRACTURE_HEADER_FLOATS = 5, MAX_FRACTURE_PIECES = 4096, ENGINE_FRACTURE_EXPORT_NAMES = [
|
|
382
|
+
"engine_fracturer_open",
|
|
383
|
+
"engine_fracturer_close",
|
|
384
|
+
"engine_fracturer_run",
|
|
385
|
+
"engine_fracturer_asset",
|
|
386
|
+
"engine_fracturer_model",
|
|
387
|
+
"engine_fracturer_fragment"
|
|
388
|
+
], NULL3 = 0, F32_BYTES3 = 4, U32_BYTES = 4, AXES2 = 3, UV = 2, TRI = 3, DEFAULT_ANCHOR_HEIGHT = 0.02, NORMAL_AT = 3, UV_AT = 6;
|
|
389
|
+
function engineFractureExports(runtime) {
|
|
390
|
+
let symbols = runtime.symbols;
|
|
391
|
+
return ENGINE_FRACTURE_EXPORT_NAMES.every((name) => typeof symbols[name] == "function") ? symbols : null;
|
|
392
|
+
}
|
|
393
|
+
var EngineFracturer = class {
|
|
394
|
+
constructor(runtime, exports) {
|
|
395
|
+
this.runtime = runtime;
|
|
396
|
+
this.exports = exports;
|
|
397
|
+
this.handle = (0);
|
|
398
|
+
}
|
|
399
|
+
allocate(bytes) {
|
|
400
|
+
let pointer = this.runtime.exports.engine_alloc(Math.max(bytes, (4)), COLUMN_ALIGN);
|
|
401
|
+
if (pointer === (0))
|
|
402
|
+
throw new GameError("capacity_exceeded", "engine memory cannot hold the mesh to break");
|
|
403
|
+
return pointer;
|
|
404
|
+
}
|
|
405
|
+
free(pointer, bytes) {
|
|
406
|
+
this.runtime.exports.engine_free(pointer, Math.max(bytes, (4)), COLUMN_ALIGN);
|
|
407
|
+
}
|
|
408
|
+
fracture(mesh, options) {
|
|
409
|
+
let vertices = mesh.positions.length / (3);
|
|
410
|
+
if (!Number.isInteger(vertices) || mesh.indices.length % (3) !== 0)
|
|
411
|
+
throw new GameError("invalid_argument", "fracture needs whole vertices and triangles");
|
|
412
|
+
if (!(options.pieces >= 1 && options.pieces <= (4096)))
|
|
413
|
+
throw new GameError(
|
|
414
|
+
"invalid_argument",
|
|
415
|
+
`pieces must be between 1 and ${(4096)}`
|
|
416
|
+
);
|
|
417
|
+
if (this.handle === (0) && (this.handle = this.exports.engine_fracturer_open(), this.handle === (0)))
|
|
418
|
+
throw new GameError("not_initialized", "the engine could not open a fracturer");
|
|
419
|
+
let interleaved = new Float32Array(vertices * (8));
|
|
420
|
+
for (let v = 0; v < vertices; v++) {
|
|
421
|
+
let at = v * (8);
|
|
422
|
+
for (let a = 0; a < (3); a++)
|
|
423
|
+
interleaved[at + a] = mesh.positions[v * (3) + a], interleaved[at + (3) + a] = mesh.normals?.[v * (3) + a] ?? 0;
|
|
424
|
+
interleaved[at + (6)] = mesh.uvs?.[v * (2)] ?? 0, interleaved[at + (6) + 1] = mesh.uvs?.[v * (2) + 1] ?? 0;
|
|
425
|
+
}
|
|
426
|
+
let option = new Float32Array((9));
|
|
427
|
+
option.set([
|
|
428
|
+
options.pieces,
|
|
429
|
+
options.seed ?? 1,
|
|
430
|
+
options.impact ? 1 : 0,
|
|
431
|
+
options.impact?.[0] ?? 0,
|
|
432
|
+
options.impact?.[1] ?? 0,
|
|
433
|
+
options.impact?.[2] ?? 0,
|
|
434
|
+
options.focus ?? 0,
|
|
435
|
+
options.interiorUvScale ?? 1,
|
|
436
|
+
options.anchorHeight ?? (0.02)
|
|
437
|
+
]);
|
|
438
|
+
let meshBytes = interleaved.byteLength, indexBytes = mesh.indices.byteLength, optionBytes = option.byteLength, meshAt = this.allocate(meshBytes), indexAt = this.allocate(indexBytes), optionAt = this.allocate(optionBytes);
|
|
439
|
+
try {
|
|
440
|
+
new Float32Array(this.runtime.memory.buffer).set(interleaved, meshAt >>> 2), new Uint32Array(this.runtime.memory.buffer).set(mesh.indices, indexAt >>> 2), new Float32Array(this.runtime.memory.buffer).set(option, optionAt >>> 2);
|
|
441
|
+
let count = this.exports.engine_fracturer_run(
|
|
442
|
+
this.handle,
|
|
443
|
+
meshAt,
|
|
444
|
+
vertices,
|
|
445
|
+
indexAt,
|
|
446
|
+
mesh.indices.length,
|
|
447
|
+
optionAt
|
|
448
|
+
);
|
|
449
|
+
if (!(count >= 0))
|
|
450
|
+
throw new GameError(
|
|
451
|
+
"invalid_argument",
|
|
452
|
+
`the engine refused to break the mesh (${count}); it must be closed and finite`
|
|
453
|
+
);
|
|
454
|
+
return {
|
|
455
|
+
asset: this.bytes(this.exports.engine_fracturer_asset, "fracture asset"),
|
|
456
|
+
model: this.bytes(this.exports.engine_fracturer_model, "fracture model"),
|
|
457
|
+
pieces: Array.from({ length: count }, (_, i) => this.piece(i))
|
|
458
|
+
};
|
|
459
|
+
} finally {
|
|
460
|
+
this.free(meshAt, meshBytes), this.free(indexAt, indexBytes), this.free(optionAt, optionBytes);
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
bytes(read, what) {
|
|
464
|
+
let length = read(this.handle, (0), 0);
|
|
465
|
+
if (!(length >= 0)) throw new GameError("invalid_argument", `${what} refused (${length})`);
|
|
466
|
+
let at = this.allocate(length);
|
|
467
|
+
try {
|
|
468
|
+
return read(this.handle, at, length), new Uint8Array(this.runtime.memory.buffer, at, length).slice();
|
|
469
|
+
} finally {
|
|
470
|
+
this.free(at, length);
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
piece(index) {
|
|
474
|
+
let floats = this.exports.engine_fracturer_fragment(this.handle, index, (0), 0);
|
|
475
|
+
if (!(floats >= (5)))
|
|
476
|
+
throw new GameError("invalid_argument", `fracture piece refused (${floats})`);
|
|
477
|
+
let bytes = floats * (4), at = this.allocate(bytes);
|
|
478
|
+
try {
|
|
479
|
+
this.exports.engine_fracturer_fragment(this.handle, index, at, floats);
|
|
480
|
+
let data = new Float32Array(this.runtime.memory.buffer, at, floats).slice(), outer = data[0], corners = (floats - (5)) / (8), positions = new Float32Array(corners * (3)), normals = new Float32Array(corners * (3)), uvs = new Float32Array(corners * (2)), indices = new Uint32Array(corners);
|
|
481
|
+
for (let c = 0; c < corners; c++) {
|
|
482
|
+
let from = (5) + c * (8);
|
|
483
|
+
positions.set(data.subarray(from, from + (3)), c * (3)), normals.set(data.subarray(from + (3), from + (3) + (3)), c * (3)), uvs.set(data.subarray(from + (6), from + (6) + (2)), c * (2)), indices[c] = c;
|
|
484
|
+
}
|
|
485
|
+
return {
|
|
486
|
+
centroid: [data[2], data[3], data[4]],
|
|
487
|
+
positions,
|
|
488
|
+
normals,
|
|
489
|
+
uvs,
|
|
490
|
+
indices,
|
|
491
|
+
interiorStart: outer * (3)
|
|
492
|
+
};
|
|
493
|
+
} finally {
|
|
494
|
+
this.free(at, bytes);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
dispose() {
|
|
498
|
+
this.handle !== (0) && (this.exports.engine_fracturer_close(this.handle), this.handle = (0));
|
|
499
|
+
}
|
|
500
|
+
};
|
|
501
|
+
|
|
502
|
+
export { ANALYSER_FREQUENCY, ANALYSER_TIME, AUDIO_PREVIEW_SUFFIX, CLOTH_ACROSS, CLOTH_BEND, CLOTH_COLLIDER_CAPSULE, CLOTH_COLLIDER_FLOATS, CLOTH_COLLIDER_SPHERE, CLOTH_COLUMNS, CLOTH_DAMPING, CLOTH_DOWN, CLOTH_FEATURE, CLOTH_FRICTION, CLOTH_GRAVITY, CLOTH_MASS, CLOTH_MAX_COLLIDERS, CLOTH_ORIGIN, CLOTH_PIN, CLOTH_PIN_NONE, CLOTH_PIN_TOP_CORNERS, CLOTH_PIN_TOP_ROW, CLOTH_ROWS, CLOTH_SPACING, CLOTH_STRETCH, CLOTH_SUBSTEPS, CLOTH_TETHER_SLACK, CLOTH_THICKNESS, CRUMPLE_DESC_FLOATS, CRUMPLE_IMPACT_FLOATS, DEFAULT_ANCHOR_HEIGHT, DEFAULT_EMITTER_CAPACITY, DEFAULT_FFT_SIZE, DEFAULT_LIMITER_CEILING_DB, DEFAULT_LIMITER_RELEASE_SECONDS, DEFAULT_MAX_DECIBELS, DEFAULT_MIN_DECIBELS, DEFAULT_OCCLUSION, DEFAULT_PANNER, DEFAULT_PRIORITY, DEFAULT_SMOOTHING, DISTANCE_MODELS, EMITTER_COLUMNS, EMITTER_GAIN, EMITTER_PITCH, EMITTER_VX, EMITTER_X, ENGINE_CLOTH_EXPORT_NAMES, ENGINE_CRUMPLE_EXPORT_NAMES, ENGINE_RIGID_COUPLING_EXPORT_NAMES, ENGINE_SOFT_BODY_EXPORT_NAMES, EngineCloths, EngineFracturer, EngineSoftBodies, FILTER_KINDS, FILTER_OFF, FULL_AUDIO_CAPABILITIES, MAX_FFT_SIZE, MAX_FRACTURE_PIECES, MAX_PRIORITY, MAX_STEMS, METER_PEAK, METER_RMS, MIN_FFT_SIZE, MIN_PRIORITY, MUSIC_POSITION_WORDS, NO_AUDIO_CAPABILITIES, NO_EMITTER_COLUMN, OCCLUSION_WORDS, PHRASE_QUANTIZE_SHIFT, PLAY_PRIORITY_SHIFT, PRIORITY_MASK, QUANTIZE_BAR, QUANTIZE_BEAT, QUANTIZE_NOW, SOFT_BEND, SOFT_BODY_FEATURE, SOFT_COLLIDER_BOX, SOFT_COLLIDER_CAPSULE, SOFT_COLLIDER_FLOATS, SOFT_COLLIDER_PLANE, SOFT_COLLIDER_SPHERE, SOFT_CONTRACTION, SOFT_CREEP, SOFT_DAMPING, SOFT_FIBRE, SOFT_FRICTION, SOFT_GRAVITY, SOFT_LIMIT, SOFT_MAX_COLLIDERS, SOFT_RADIUS, SOFT_STRETCH, SOFT_SUBSTEPS, SOFT_VOLUME, SOFT_YIELD, SPATIAL_CONE_INNER, SPATIAL_CONE_OUTER, SPATIAL_CONE_OUTER_GAIN, SPATIAL_DOPPLER, SPATIAL_MAX_DISTANCE, SPATIAL_MODEL, SPATIAL_REF_DISTANCE, SPATIAL_ROLLOFF, SPATIAL_WORDS, STEAL_POLICIES, STREAM_PAUSED, STREAM_PLAYING, STREAM_STOPPED, UNLIMITED_VOICES, detuneRate, engineClothExports, engineFractureExports, engineSoftBodyExports };
|