@holoscript/core 6.0.3 → 6.1.1
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/README.md +40 -40
- package/bin/holoscript.cjs +3 -0
- package/dist/GLTFPipeline-SFIORFJU.js +16 -0
- package/dist/GLTFPipeline-VNNDPONV.cjs +37 -0
- package/dist/{HoloScriptPlusParser-BZR5DELQ.js → HoloScriptPlusParser-7FBIFUFC.js} +6 -5
- package/dist/{HoloScriptPlusParser-SBMYDNXO.cjs → HoloScriptPlusParser-A2W7OCN2.cjs} +17 -16
- package/dist/HoloScriptPlusParser-F2Z56FJR.js +10 -0
- package/dist/HoloScriptPlusParser-WKHRIH6T.cjs +27 -0
- package/dist/{USDZExporter-MHEHXZB4.cjs → USDZExporter-3FWJ25JI.cjs} +344 -16
- package/dist/{USDZExporter-YA55ZS35.js → USDZExporter-D2HQLQYK.js} +344 -16
- package/dist/agents/index.cjs +19 -0
- package/dist/agents/index.d.ts +100 -0
- package/dist/agents/index.js +17 -0
- package/dist/chunk-22W6NGYN.js +725 -0
- package/dist/{chunk-XSUZMPVQ.cjs → chunk-27MPVJVZ.cjs} +64 -28
- package/dist/{chunk-W76ETJTI.js → chunk-2A7FURVO.js} +44 -8
- package/dist/{chunk-C7BNX4XJ.js → chunk-2B7WVIDZ.js} +11 -8
- package/dist/chunk-2BSMSUCE.js +1941 -0
- package/dist/chunk-2HLIGOKU.cjs +5546 -0
- package/dist/{chunk-GC3YU46J.js → chunk-2M2DPHKB.js} +4 -4
- package/dist/{chunk-A6GO3DPZ.cjs → chunk-2YSNA2F2.cjs} +321 -49
- package/dist/{chunk-ZL6VJ6SN.js → chunk-33XCOVE3.js} +5 -5
- package/dist/chunk-3FOKASKO.cjs +348 -0
- package/dist/{chunk-XSF76QRU.js → chunk-4C57PR42.js} +3 -3
- package/dist/chunk-4N4SXXWF.js +769 -0
- package/dist/chunk-4PDEPEQW.cjs +41 -0
- package/dist/chunk-4R6SBXDB.js +45 -0
- package/dist/chunk-4SY77NA4.cjs +413 -0
- package/dist/{chunk-74YCHHTE.js → chunk-4UUKPCY4.js} +670 -116
- package/dist/{chunk-VZNKJZTT.cjs → chunk-52ULD552.cjs} +178 -113
- package/dist/{chunk-65RFOWZI.js → chunk-5CKA5SXU.js} +441 -23
- package/dist/chunk-5FSKKMR7.cjs +2092 -0
- package/dist/{chunk-FF3Q7ADR.js → chunk-5JEU52DW.js} +5 -3
- package/dist/chunk-5N54COB6.cjs +327 -0
- package/dist/chunk-5S7RKFGR.cjs +446 -0
- package/dist/{chunk-EJA7G2C4.cjs → chunk-5WUNN6ZN.cjs} +2 -2
- package/dist/{chunk-ELLQPFAF.js → chunk-6ASWLXXN.js} +24 -10
- package/dist/chunk-6CTRH7HT.cjs +1985 -0
- package/dist/{chunk-ARNKA274.cjs → chunk-6EX3I5P4.cjs} +6 -6
- package/dist/chunk-6FGQNDR4.js +5731 -0
- package/dist/{chunk-X4YVN7H3.cjs → chunk-6KMK2UXT.cjs} +152 -56
- package/dist/{chunk-KUJRR4FJ.js → chunk-6L4VE27M.js} +36 -24
- package/dist/{chunk-RT7LJRSF.cjs → chunk-6S6TKNEA.cjs} +7357 -8312
- package/dist/chunk-77V4GTCA.js +596 -0
- package/dist/{chunk-XH7SE4HH.cjs → chunk-7AD52FRS.cjs} +19 -19
- package/dist/chunk-7OPW2KO7.cjs +639 -0
- package/dist/chunk-A6KINLZJ.js +236 -0
- package/dist/chunk-AIA52I7T.cjs +543 -0
- package/dist/chunk-AIX25INK.cjs +602 -0
- package/dist/{chunk-WN3YF33G.cjs → chunk-AO4I2Z7M.cjs} +15 -17
- package/dist/{chunk-TSWTWZ42.cjs → chunk-BPICAGBV.cjs} +376 -209
- package/dist/chunk-BRQJKJGT.cjs +20 -0
- package/dist/{chunk-3FXV5S25.cjs → chunk-C37BHB7N.cjs} +6 -3
- package/dist/{chunk-XNMEH2BI.js → chunk-CBJY23VL.js} +3 -3
- package/dist/chunk-CIWWXYHZ.cjs +50 -0
- package/dist/{chunk-NTMZSDXM.cjs → chunk-DIL6DDDN.cjs} +101 -45
- package/dist/chunk-DMXC24WV.js +404 -0
- package/dist/{chunk-SPDELRRV.cjs → chunk-DTGBOSEM.cjs} +12 -12
- package/dist/chunk-E7JP3BS3.cjs +61 -0
- package/dist/{chunk-HJJLD366.js → chunk-EKBKLK7P.js} +3 -3
- package/dist/chunk-EKYL4PE3.cjs +404 -0
- package/dist/{chunk-7N3JIJMT.js → chunk-EMMC5CSQ.js} +12 -8
- package/dist/{chunk-EUFLX2PI.js → chunk-EOBB6A4B.js} +7263 -8214
- package/dist/chunk-EOFNVCM6.js +325 -0
- package/dist/{chunk-NKRKT6V2.js → chunk-ER4GATIU.js} +11 -10
- package/dist/{chunk-N5FTS757.cjs → chunk-EXKSFGSX.cjs} +7 -148
- package/dist/{chunk-LK5IAVH6.cjs → chunk-EXUP2BUM.cjs} +27 -27
- package/dist/chunk-FDSGHPAK.js +130 -0
- package/dist/chunk-FEWUHQNM.cjs +144 -0
- package/dist/{chunk-5TOFIR6L.js → chunk-FGGJQRLZ.js} +5 -142
- package/dist/chunk-FHP6LXJS.js +415 -0
- package/dist/{chunk-7LCYLPW2.cjs → chunk-FJPADH77.cjs} +7 -4
- package/dist/{chunk-HBZYCASG.js → chunk-FXKTYFYA.js} +203 -36
- package/dist/chunk-GCMWDSBZ.cjs +729 -0
- package/dist/chunk-GJNCFRJU.cjs +125 -0
- package/dist/{chunk-I3XGTIHM.cjs → chunk-GMP623FG.cjs} +16 -13
- package/dist/{chunk-CNVM7J3M.js → chunk-GN3KDX4W.js} +149 -53
- package/dist/{chunk-WFJIDI2N.cjs → chunk-GQYKQSTC.cjs} +10 -10
- package/dist/chunk-GTU2Z2WW.cjs +262 -0
- package/dist/chunk-GZG4KA4E.js +529 -0
- package/dist/{chunk-DIEDKX5B.cjs → chunk-H3MGK7TX.cjs} +45 -33
- package/dist/{chunk-DN7UFU63.cjs → chunk-H5DZIHJP.cjs} +14 -17
- package/dist/{chunk-DH5G2JUA.cjs → chunk-HANL7K2Q.cjs} +66 -53
- package/dist/{chunk-EGIZHYJP.cjs → chunk-HCCQLAA4.cjs} +2 -13
- package/dist/{chunk-HHS6FMOU.cjs → chunk-HGVXZDSK.cjs} +178 -29
- package/dist/{chunk-LBPEZQAF.js → chunk-HRODTEEO.js} +30 -10
- package/dist/{chunk-ZGTGVSTZ.js → chunk-HYNTS5CP.js} +2 -2
- package/dist/{chunk-RE3OKSYF.cjs → chunk-HZCQO4JM.cjs} +6 -6
- package/dist/{chunk-NCUHGRTZ.js → chunk-I2O7TW6B.js} +12 -8
- package/dist/chunk-IHESJZSW.js +4490 -0
- package/dist/{chunk-7H5UNJZD.cjs → chunk-IRWWS72C.cjs} +64 -22
- package/dist/{chunk-EMO7HAKJ.cjs → chunk-IVIA7K75.cjs} +691 -133
- package/dist/chunk-IVY74O6C.js +247 -0
- package/dist/chunk-J32ZJZJH.js +554 -0
- package/dist/chunk-JD7CIZ33.js +1949 -0
- package/dist/{chunk-7X2IEJIE.cjs → chunk-JIYN45TV.cjs} +41 -42
- package/dist/{chunk-XDXZM3ZP.cjs → chunk-KHPCJRI3.cjs} +24 -21
- package/dist/chunk-KKFZ3B6J.cjs +557 -0
- package/dist/chunk-KPJL34Y7.cjs +186 -0
- package/dist/{chunk-7KPI4EKH.cjs → chunk-KQTPCYTG.cjs} +130 -50
- package/dist/{chunk-F5LVGHNT.js → chunk-KX76JUQY.js} +3 -3
- package/dist/chunk-L4LFINPO.js +623 -0
- package/dist/{chunk-2UX5LRAP.cjs → chunk-L63H3SQ4.cjs} +46 -32
- package/dist/{chunk-NLPSZT4C.js → chunk-LAOCQJ2M.js} +64 -8
- package/dist/chunk-LM2VU56C.cjs +37 -0
- package/dist/chunk-M56JSP4A.js +400 -0
- package/dist/chunk-MBOOR7X4.js +18 -0
- package/dist/{chunk-PQLGZKMC.cjs → chunk-MJVIRCUV.cjs} +31 -27
- package/dist/{chunk-AC4BSHFV.js → chunk-MSMIFMBL.js} +135 -18
- package/dist/{chunk-56IF4NTA.js → chunk-MXFUTKCO.js} +18 -18
- package/dist/{chunk-NRUB55IT.cjs → chunk-MXJ5SS53.cjs} +450 -32
- package/dist/chunk-MXWNGCRS.js +2176 -0
- package/dist/chunk-MYY4PMWX.cjs +264 -0
- package/dist/chunk-N75IH2HY.js +258 -0
- package/dist/chunk-NG77ATEW.cjs +778 -0
- package/dist/chunk-NW5G5FBQ.js +215 -0
- package/dist/{chunk-4FCZDTD5.js → chunk-OEFY723R.js} +29 -16
- package/dist/chunk-OEV5RMZO.cjs +3042 -0
- package/dist/{chunk-VSXOIUCF.cjs → chunk-OIQYIIO3.cjs} +7 -7
- package/dist/{chunk-32TWR3HE.js → chunk-OL46QLBJ.js} +3 -12
- package/dist/chunk-OPZ7XDDI.js +487 -0
- package/dist/chunk-OSYNRVOV.cjs +243 -0
- package/dist/{chunk-HUFNKFA6.js → chunk-P7YIA5LN.js} +93 -13
- package/dist/chunk-PGANYCAG.cjs +220 -0
- package/dist/{chunk-CO2VM2DK.js → chunk-QAVXL2IH.js} +62 -20
- package/dist/{chunk-BO2OKHIY.js → chunk-QCCBXSCE.js} +1640 -1311
- package/dist/{chunk-WYH4GVZ5.js → chunk-QPOQ7VPI.js} +16 -13
- package/dist/{chunk-V42NTCFH.js → chunk-QTPMJRGS.js} +2331 -17
- package/dist/{chunk-FEFHPUEM.cjs → chunk-QWNQ523V.cjs} +1705 -1382
- package/dist/{chunk-VK5AXKO3.js → chunk-R3IVNY6P.js} +166 -101
- package/dist/chunk-R75BSDH7.cjs +50 -0
- package/dist/{chunk-AIUXRS74.cjs → chunk-RMHC2VG7.cjs} +2358 -41
- package/dist/chunk-RUXGBKPS.cjs +4517 -0
- package/dist/{chunk-PLMYCCA4.js → chunk-S5IFXW6E.js} +113 -9
- package/dist/{chunk-27LWW5FU.cjs → chunk-S6YWHCKV.cjs} +5 -5
- package/dist/{chunk-SUCBB66F.js → chunk-SIEXCILW.js} +3 -3
- package/dist/{chunk-CLYEIWA5.cjs → chunk-SLU6UPJI.cjs} +5 -3
- package/dist/{chunk-H6WMMLQK.cjs → chunk-T5J7ZKP3.cjs} +454 -61
- package/dist/chunk-TDCNJHWO.js +341 -0
- package/dist/{chunk-IHOUYQIA.js → chunk-TG7O4WBC.js} +5 -5
- package/dist/chunk-THCK6ECW.js +2085 -0
- package/dist/chunk-TJHVSBP2.js +439 -0
- package/dist/chunk-TK74TR4H.js +5541 -0
- package/dist/{chunk-BU5ZAFMC.js → chunk-U4NBQJBY.js} +11 -13
- package/dist/{chunk-Y5MUAYTO.js → chunk-UD3DSHZM.js} +10 -13
- package/dist/chunk-UDMYRFDZ.js +3038 -0
- package/dist/{chunk-PPULB4GG.cjs → chunk-UOIGFQXC.cjs} +90 -68
- package/dist/{chunk-EPWRXL6S.js → chunk-URG2SJLK.js} +41 -42
- package/dist/{chunk-VJVCD5T5.cjs → chunk-V73NPPTM.cjs} +152 -35
- package/dist/chunk-VECQYRXL.js +474 -0
- package/dist/chunk-VEXPG4WN.js +1989 -0
- package/dist/{chunk-4SMUJFHL.js → chunk-VMLKSV26.js} +9 -6
- package/dist/{chunk-HKCVM6OK.cjs → chunk-VSK7W3O5.cjs} +47 -27
- package/dist/chunk-VVKVQZI6.js +55 -0
- package/dist/{chunk-KDB6BUMB.js → chunk-W55Z7QIX.js} +172 -25
- package/dist/{chunk-BY3B7ZYV.cjs → chunk-W6P2GBHH.cjs} +3 -3
- package/dist/{chunk-PBA6NXCT.cjs → chunk-W6RW64BB.cjs} +11 -8
- package/dist/chunk-WDT3JTGM.cjs +483 -0
- package/dist/{chunk-26TLYBFD.js → chunk-WKX5AMOY.js} +3 -3
- package/dist/chunk-WNNE3PO3.js +34 -0
- package/dist/chunk-WRLUBRKS.cjs +1943 -0
- package/dist/chunk-WRNEH5MO.js +3169 -0
- package/dist/{chunk-54FHG2MX.js → chunk-WRWEX5ZF.js} +7 -4
- package/dist/chunk-X3GJPRVK.cjs +3246 -0
- package/dist/{chunk-4KJ2R7VP.cjs → chunk-XFXGA5IW.cjs} +126 -22
- package/dist/{chunk-L3Z2HIWJ.cjs → chunk-XHIV6326.cjs} +4 -4
- package/dist/chunk-XJAN7CZG.cjs +432 -0
- package/dist/chunk-XL6INWKT.js +121 -0
- package/dist/{chunk-KYM4XRFG.js → chunk-XMWZG36H.js} +4 -4
- package/dist/{chunk-BKIGPPVM.js → chunk-XSFNHP2E.js} +6 -3
- package/dist/{chunk-ODGMVILH.js → chunk-XT6JY5W5.js} +25 -3
- package/dist/chunk-XXZJEFKW.cjs +490 -0
- package/dist/chunk-Y3MWXQSB.cjs +5737 -0
- package/dist/chunk-YF2I3MV3.js +46 -0
- package/dist/{chunk-CMYAWUX3.js → chunk-YIMN575O.js} +445 -53
- package/dist/chunk-YIVFJNYV.js +176 -0
- package/dist/{chunk-V2ILLPHK.cjs → chunk-YKGPCZEE.cjs} +10 -10
- package/dist/chunk-YQELFNJV.js +39 -0
- package/dist/chunk-YSCKYJOB.cjs +2196 -0
- package/dist/chunk-Z5XMPRNC.cjs +5390 -0
- package/dist/{chunk-3FYZOR7S.cjs → chunk-ZDSYWBIE.cjs} +18 -18
- package/dist/{chunk-CQDOF3G7.cjs → chunk-ZKSS47EV.cjs} +24 -19
- package/dist/chunk-ZUL5AVTX.cjs +1993 -0
- package/dist/chunk-ZXBZVXDW.js +5386 -0
- package/dist/{chunk-AW7WAELW.js → chunk-ZZ7RO2UQ.js} +314 -46
- package/dist/cli/holoscript-runner.cjs +203 -206
- package/dist/cli/holoscript-runner.js +147 -150
- package/dist/codebase/index.cjs +1 -1
- package/dist/codebase/index.d.ts +25 -0
- package/dist/codebase/index.js +1 -1
- package/dist/compiler/agent-inference.cjs +10 -8
- package/dist/compiler/agent-inference.js +6 -4
- package/dist/compiler/android-xr.cjs +12 -8
- package/dist/compiler/android-xr.js +10 -6
- package/dist/compiler/android.cjs +12 -9
- package/dist/compiler/android.js +10 -7
- package/dist/compiler/ar.cjs +9 -7
- package/dist/compiler/ar.js +7 -5
- package/dist/compiler/babylon.cjs +12 -9
- package/dist/compiler/babylon.js +11 -8
- package/dist/compiler/business-quest.cjs +43 -0
- package/dist/compiler/business-quest.js +4 -0
- package/dist/compiler/coco.cjs +1 -1
- package/dist/compiler/coco.js +1 -1
- package/dist/compiler/context.cjs +25 -0
- package/dist/compiler/context.d.ts +28 -0
- package/dist/compiler/context.js +8 -0
- package/dist/compiler/domain-block-utils.cjs +161 -151
- package/dist/compiler/domain-block-utils.js +7 -5
- package/dist/compiler/dtdl.cjs +10 -8
- package/dist/compiler/dtdl.js +7 -5
- package/dist/compiler/gltf-pipeline.cjs +9 -9
- package/dist/compiler/gltf-pipeline.js +2 -2
- package/dist/compiler/godot.cjs +9 -7
- package/dist/compiler/godot.js +8 -6
- package/dist/compiler/incremental.cjs +12 -8
- package/dist/compiler/incremental.js +7 -3
- package/dist/compiler/index.cjs +5152 -814
- package/dist/compiler/index.d.ts +404 -21
- package/dist/compiler/index.js +5063 -859
- package/dist/compiler/ios.cjs +11 -9
- package/dist/compiler/ios.js +9 -7
- package/dist/compiler/llm-provider-capabilities.cjs +25 -0
- package/dist/compiler/llm-provider-capabilities.d.ts +43 -0
- package/dist/compiler/llm-provider-capabilities.js +8 -0
- package/dist/compiler/multi-layer.cjs +14 -17
- package/dist/compiler/multi-layer.js +13 -10
- package/dist/compiler/nodetoy.cjs +5 -5
- package/dist/compiler/nodetoy.js +2 -2
- package/dist/compiler/openxr.cjs +10 -7
- package/dist/compiler/openxr.js +9 -6
- package/dist/compiler/playcanvas.cjs +10 -8
- package/dist/compiler/playcanvas.js +9 -7
- package/dist/compiler/r3f.cjs +17 -14
- package/dist/compiler/r3f.d.ts +22 -0
- package/dist/compiler/r3f.js +12 -9
- package/dist/compiler/remotion.cjs +1 -1
- package/dist/compiler/remotion.js +1 -1
- package/dist/compiler/reproducibility.cjs +1 -1
- package/dist/compiler/reproducibility.js +1 -1
- package/dist/compiler/sdf.cjs +10 -8
- package/dist/compiler/sdf.js +8 -6
- package/dist/compiler/semantic-scene.cjs +7 -7
- package/dist/compiler/semantic-scene.js +2 -2
- package/dist/compiler/state.cjs +9 -6
- package/dist/compiler/state.js +7 -4
- package/dist/compiler/trait-composition.cjs +11 -8
- package/dist/compiler/trait-composition.js +7 -4
- package/dist/compiler/unity.cjs +10 -7
- package/dist/compiler/unity.js +9 -6
- package/dist/compiler/unreal.cjs +11 -8
- package/dist/compiler/unreal.js +9 -6
- package/dist/compiler/urdf.cjs +20 -14
- package/dist/compiler/urdf.js +8 -6
- package/dist/compiler/usd-physics.cjs +10 -8
- package/dist/compiler/usd-physics.js +7 -5
- package/dist/compiler/visionos.cjs +10 -7
- package/dist/compiler/visionos.js +9 -6
- package/dist/compiler/vrchat.cjs +10 -8
- package/dist/compiler/vrchat.js +8 -6
- package/dist/compiler/vrr.cjs +10 -8
- package/dist/compiler/vrr.js +8 -6
- package/dist/compiler/wasm.cjs +13 -11
- package/dist/compiler/wasm.js +8 -6
- package/dist/compiler/webgpu.cjs +9 -7
- package/dist/compiler/webgpu.js +8 -6
- package/dist/constants.d.ts +4 -0
- package/dist/coordinators/index.cjs +1266 -0
- package/dist/coordinators/index.d.ts +260 -0
- package/dist/coordinators/index.js +1259 -0
- package/dist/debugger.cjs +9 -7
- package/dist/debugger.js +7 -5
- package/dist/entries/interop.cjs +23 -21
- package/dist/entries/interop.d.ts +9 -0
- package/dist/entries/interop.js +5 -3
- package/dist/entries/scripting.cjs +18 -17
- package/dist/entries/scripting.d.ts +7 -0
- package/dist/entries/scripting.js +8 -7
- package/dist/hololand/index.cjs +146 -0
- package/dist/hololand/index.d.ts +70 -0
- package/dist/hololand/index.js +5 -0
- package/dist/index.cjs +21396 -39967
- package/dist/index.d.ts +1496 -40
- package/dist/index.js +21066 -40142
- package/dist/math/tropical-spmv.cjs +45 -0
- package/dist/math/tropical-spmv.js +4 -0
- package/dist/math/vec3.cjs +14 -14
- package/dist/math/vec3.js +2 -2
- package/dist/ml-dsa-FSKBTE3W.cjs +1265 -0
- package/dist/ml-dsa-Z7JDKW4L.js +1265 -0
- package/dist/paper-0c-spike/index.cjs +150 -0
- package/dist/paper-0c-spike/index.d.ts +29 -0
- package/dist/paper-0c-spike/index.js +141 -0
- package/dist/parser.cjs +45 -10
- package/dist/parser.d.ts +11 -0
- package/dist/parser.js +10 -7
- package/dist/{playwright-7DTEQCBD.cjs → playwright-3AT3AKTV.cjs} +1985 -1985
- package/dist/{playwright-BIZXMLD2.js → playwright-VZPDVUEQ.js} +3 -3
- package/dist/reconstruction/index.cjs +153 -0
- package/dist/reconstruction/index.d.ts +105 -0
- package/dist/reconstruction/index.js +8 -0
- package/dist/runtime.cjs +7 -5
- package/dist/runtime.js +6 -4
- package/dist/self-improvement/index.cjs +563 -0
- package/dist/self-improvement/index.d.ts +0 -48
- package/dist/self-improvement/index.js +545 -0
- package/dist/storage/index.cjs +10 -9
- package/dist/storage/index.d.ts +24 -0
- package/dist/storage/index.js +3 -2
- package/dist/testing.cjs +25 -0
- package/dist/testing.d.ts +70 -0
- package/dist/testing.js +4 -0
- package/dist/tools/index.d.ts +33 -0
- package/dist/traitDocs/traitDocs.cjs +33 -0
- package/dist/traitDocs/traitDocs.d.ts +69 -0
- package/dist/traitDocs/traitDocs.js +7 -0
- package/dist/traits/botanical-lotus.cjs +41 -0
- package/dist/traits/botanical-lotus.d.ts +172 -0
- package/dist/traits/botanical-lotus.js +4 -0
- package/dist/traits/engines/index.cjs +520 -0
- package/dist/traits/engines/index.d.ts +111 -0
- package/dist/traits/engines/index.js +380 -0
- package/dist/traits/index.cjs +14387 -4320
- package/dist/traits/index.d.ts +197 -0
- package/dist/traits/index.js +16455 -6958
- package/dist/traits/simulation-solver-factory.cjs +13 -0
- package/dist/traits/simulation-solver-factory.d.ts +23 -0
- package/dist/traits/simulation-solver-factory.js +4 -0
- package/dist/traits/webcam-gaze.cjs +35 -0
- package/dist/traits/webcam-gaze.d.ts +17 -0
- package/dist/traits/webcam-gaze.js +4 -0
- package/dist/type-checker.cjs +6 -5
- package/dist/type-checker.js +4 -3
- package/dist/world/index.cjs +947 -0
- package/dist/world/index.d.ts +147 -0
- package/dist/world/index.js +939 -0
- package/dist/world-model/index.cjs +1446 -0
- package/dist/world-model/index.d.ts +119 -0
- package/dist/world-model/index.js +1414 -0
- package/dist/wot/index.cjs +7 -7
- package/dist/wot/index.js +2 -2
- package/package.json +150 -23
- package/dist/GLTFPipeline-3KLWWUQO.cjs +0 -34
- package/dist/GLTFPipeline-LYII2ZVQ.js +0 -13
- package/dist/chunk-3KEU5QYY.cjs +0 -175
- package/dist/chunk-6OQBLABR.js +0 -5240
- package/dist/chunk-6WNCRE6F.js +0 -126
- package/dist/chunk-C2QHVHZF.js +0 -4066
- package/dist/chunk-CN4NOESF.cjs +0 -416
- package/dist/chunk-DXVCEFZB.js +0 -2027
- package/dist/chunk-ENV7K6XA.js +0 -282
- package/dist/chunk-H7XMORZI.js +0 -2731
- package/dist/chunk-HAN4V3PF.cjs +0 -2037
- package/dist/chunk-HF4OFY25.cjs +0 -4097
- package/dist/chunk-LER4WXW5.cjs +0 -286
- package/dist/chunk-M6FU6S22.js +0 -2911
- package/dist/chunk-MWEFR6YQ.js +0 -1857
- package/dist/chunk-PJMOXFPR.cjs +0 -1861
- package/dist/chunk-QHVVVN47.cjs +0 -2033
- package/dist/chunk-QWKUKVRE.js +0 -2026
- package/dist/chunk-UITWA6DV.cjs +0 -2829
- package/dist/chunk-UQW6SLM5.js +0 -172
- package/dist/chunk-WUXIRGZP.cjs +0 -2915
- package/dist/chunk-X67XRI2T.js +0 -410
- package/dist/chunk-Y7VK5TH3.cjs +0 -129
- package/dist/chunk-YCMQQQ5U.cjs +0 -5244
- package/dist/post-quantum-JTTAAGO3.cjs +0 -6
- package/dist/post-quantum-RVPVDEPI.js +0 -4
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
// src/traits/SkeletonTrait.ts
|
|
2
|
+
var SkeletonTrait = class {
|
|
3
|
+
constructor(config = {}) {
|
|
4
|
+
this.bones = /* @__PURE__ */ new Map();
|
|
5
|
+
this.boneTransforms = /* @__PURE__ */ new Map();
|
|
6
|
+
this.clips = /* @__PURE__ */ new Map();
|
|
7
|
+
this.parameters = /* @__PURE__ */ new Map();
|
|
8
|
+
this.eventListeners = /* @__PURE__ */ new Map();
|
|
9
|
+
this.enabled = true;
|
|
10
|
+
this.config = {
|
|
11
|
+
rigType: config.rigType ?? "custom",
|
|
12
|
+
bones: config.bones,
|
|
13
|
+
humanoidMap: config.humanoidMap,
|
|
14
|
+
clips: config.clips,
|
|
15
|
+
blendTrees: config.blendTrees ?? /* @__PURE__ */ new Map(),
|
|
16
|
+
layers: config.layers ?? [{ name: "base", weight: 1, blendMode: "override" }],
|
|
17
|
+
parameters: config.parameters ?? /* @__PURE__ */ new Map(),
|
|
18
|
+
defaultClip: config.defaultClip,
|
|
19
|
+
speed: config.speed ?? 1,
|
|
20
|
+
rootMotion: config.rootMotion ?? false,
|
|
21
|
+
cullingMode: config.cullingMode ?? "always"
|
|
22
|
+
};
|
|
23
|
+
this.state = {
|
|
24
|
+
currentTime: 0,
|
|
25
|
+
normalizedTime: 0,
|
|
26
|
+
isPlaying: false,
|
|
27
|
+
layerWeights: this.config.layers?.map((l) => l.weight) ?? [1]
|
|
28
|
+
};
|
|
29
|
+
if (config.bones) {
|
|
30
|
+
for (const bone of config.bones) {
|
|
31
|
+
this.bones.set(bone.name, bone);
|
|
32
|
+
this.boneTransforms.set(bone.name, { ...bone.bindPose });
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
if (config.clips) {
|
|
36
|
+
for (const clip of config.clips) {
|
|
37
|
+
this.clips.set(clip.name, clip);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
if (config.parameters) {
|
|
41
|
+
this.parameters = new Map(config.parameters);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
// ============================================================================
|
|
45
|
+
// Configuration
|
|
46
|
+
// ============================================================================
|
|
47
|
+
/**
|
|
48
|
+
* Get configuration
|
|
49
|
+
*/
|
|
50
|
+
getConfig() {
|
|
51
|
+
return { ...this.config };
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Get animation state
|
|
55
|
+
*/
|
|
56
|
+
getState() {
|
|
57
|
+
return { ...this.state };
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Get bone count
|
|
61
|
+
*/
|
|
62
|
+
getBoneCount() {
|
|
63
|
+
return this.bones.size;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Get bone names
|
|
67
|
+
*/
|
|
68
|
+
getBoneNames() {
|
|
69
|
+
return Array.from(this.bones.keys());
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Get bone transform
|
|
73
|
+
*/
|
|
74
|
+
getBoneTransform(boneName) {
|
|
75
|
+
return this.boneTransforms.get(boneName);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Set bone transform (for IK or procedural animation)
|
|
79
|
+
*/
|
|
80
|
+
setBoneTransform(boneName, transform) {
|
|
81
|
+
const current = this.boneTransforms.get(boneName);
|
|
82
|
+
if (current) {
|
|
83
|
+
this.boneTransforms.set(boneName, {
|
|
84
|
+
position: transform.position ?? current.position,
|
|
85
|
+
rotation: transform.rotation ?? current.rotation,
|
|
86
|
+
scale: transform.scale ?? current.scale
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
// ============================================================================
|
|
91
|
+
// Animation Playback
|
|
92
|
+
// ============================================================================
|
|
93
|
+
/**
|
|
94
|
+
* Play animation clip
|
|
95
|
+
*/
|
|
96
|
+
play(clipName, options) {
|
|
97
|
+
const clip = this.clips.get(clipName);
|
|
98
|
+
if (!clip) {
|
|
99
|
+
console.warn(`Animation clip not found: ${clipName}`);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
const crossfade = options?.crossfade ?? 0;
|
|
103
|
+
if (crossfade > 0 && this.state.currentClip) {
|
|
104
|
+
this.state.crossfadeTarget = clipName;
|
|
105
|
+
this.state.crossfadeProgress = 0;
|
|
106
|
+
} else {
|
|
107
|
+
this.state.currentClip = clipName;
|
|
108
|
+
this.state.currentTime = 0;
|
|
109
|
+
this.state.normalizedTime = 0;
|
|
110
|
+
}
|
|
111
|
+
this.state.isPlaying = true;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Stop animation
|
|
115
|
+
*/
|
|
116
|
+
stop() {
|
|
117
|
+
this.state.isPlaying = false;
|
|
118
|
+
this.state.currentTime = 0;
|
|
119
|
+
this.state.normalizedTime = 0;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Pause animation
|
|
123
|
+
*/
|
|
124
|
+
pause() {
|
|
125
|
+
this.state.isPlaying = false;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Resume animation
|
|
129
|
+
*/
|
|
130
|
+
resume() {
|
|
131
|
+
this.state.isPlaying = true;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Is playing
|
|
135
|
+
*/
|
|
136
|
+
isPlaying() {
|
|
137
|
+
return this.state.isPlaying;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Get current clip name
|
|
141
|
+
*/
|
|
142
|
+
getCurrentClip() {
|
|
143
|
+
return this.state.currentClip;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Set playback speed
|
|
147
|
+
*/
|
|
148
|
+
setSpeed(speed) {
|
|
149
|
+
this.config.speed = speed;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Get playback speed
|
|
153
|
+
*/
|
|
154
|
+
getSpeed() {
|
|
155
|
+
return this.config.speed ?? 1;
|
|
156
|
+
}
|
|
157
|
+
// ============================================================================
|
|
158
|
+
// Parameters (for blend trees and state machines)
|
|
159
|
+
// ============================================================================
|
|
160
|
+
/**
|
|
161
|
+
* Set parameter
|
|
162
|
+
*/
|
|
163
|
+
setParameter(name, value) {
|
|
164
|
+
this.parameters.set(name, value);
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Get parameter
|
|
168
|
+
*/
|
|
169
|
+
getParameter(name) {
|
|
170
|
+
return this.parameters.get(name);
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Set float parameter
|
|
174
|
+
*/
|
|
175
|
+
setFloat(name, value) {
|
|
176
|
+
this.parameters.set(name, value);
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Set bool parameter
|
|
180
|
+
*/
|
|
181
|
+
setBool(name, value) {
|
|
182
|
+
this.parameters.set(name, value);
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Set trigger (auto-resets)
|
|
186
|
+
*/
|
|
187
|
+
setTrigger(name) {
|
|
188
|
+
this.parameters.set(name, true);
|
|
189
|
+
}
|
|
190
|
+
// ============================================================================
|
|
191
|
+
// Blend Trees
|
|
192
|
+
// ============================================================================
|
|
193
|
+
/**
|
|
194
|
+
* Add blend tree
|
|
195
|
+
*/
|
|
196
|
+
addBlendTree(name, tree) {
|
|
197
|
+
if (!this.config.blendTrees) {
|
|
198
|
+
this.config.blendTrees = /* @__PURE__ */ new Map();
|
|
199
|
+
}
|
|
200
|
+
this.config.blendTrees.set(name, tree);
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Activate blend tree
|
|
204
|
+
*/
|
|
205
|
+
activateBlendTree(name) {
|
|
206
|
+
if (this.config.blendTrees?.has(name)) {
|
|
207
|
+
this.state.activeBlendTree = name;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
// ============================================================================
|
|
211
|
+
// Layers
|
|
212
|
+
// ============================================================================
|
|
213
|
+
/**
|
|
214
|
+
* Set layer weight
|
|
215
|
+
*/
|
|
216
|
+
setLayerWeight(layerIndex, weight) {
|
|
217
|
+
if (this.state.layerWeights[layerIndex] !== void 0) {
|
|
218
|
+
this.state.layerWeights[layerIndex] = Math.max(0, Math.min(1, weight));
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Get layer weight
|
|
223
|
+
*/
|
|
224
|
+
getLayerWeight(layerIndex) {
|
|
225
|
+
return this.state.layerWeights[layerIndex] ?? 0;
|
|
226
|
+
}
|
|
227
|
+
// ============================================================================
|
|
228
|
+
// Clips
|
|
229
|
+
// ============================================================================
|
|
230
|
+
/**
|
|
231
|
+
* Add animation clip
|
|
232
|
+
*/
|
|
233
|
+
addClip(clip) {
|
|
234
|
+
this.clips.set(clip.name, clip);
|
|
235
|
+
if (!this.config.clips) {
|
|
236
|
+
this.config.clips = [];
|
|
237
|
+
}
|
|
238
|
+
this.config.clips.push(clip);
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Get clip
|
|
242
|
+
*/
|
|
243
|
+
getClip(name) {
|
|
244
|
+
return this.clips.get(name);
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Get clip duration
|
|
248
|
+
*/
|
|
249
|
+
getClipDuration(name) {
|
|
250
|
+
return this.clips.get(name)?.duration ?? 0;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Get all clip names
|
|
254
|
+
*/
|
|
255
|
+
getClipNames() {
|
|
256
|
+
return Array.from(this.clips.keys());
|
|
257
|
+
}
|
|
258
|
+
// ============================================================================
|
|
259
|
+
// Update (called each frame)
|
|
260
|
+
// ============================================================================
|
|
261
|
+
/**
|
|
262
|
+
* Update animation (called by animation system each frame)
|
|
263
|
+
*/
|
|
264
|
+
update(deltaTime) {
|
|
265
|
+
if (!this.enabled || !this.state.isPlaying) return;
|
|
266
|
+
const clip = this.state.currentClip ? this.clips.get(this.state.currentClip) : void 0;
|
|
267
|
+
if (!clip) return;
|
|
268
|
+
const speed = this.config.speed ?? 1;
|
|
269
|
+
this.state.currentTime += deltaTime * speed;
|
|
270
|
+
if (clip.loop) {
|
|
271
|
+
this.state.currentTime = this.state.currentTime % clip.duration;
|
|
272
|
+
} else if (this.state.currentTime >= clip.duration) {
|
|
273
|
+
this.state.currentTime = clip.duration;
|
|
274
|
+
this.state.isPlaying = false;
|
|
275
|
+
}
|
|
276
|
+
this.state.normalizedTime = clip.duration > 0 ? this.state.currentTime / clip.duration : 0;
|
|
277
|
+
if (clip.events) {
|
|
278
|
+
for (const event of clip.events) {
|
|
279
|
+
if (Math.abs(this.state.currentTime - event.time) < deltaTime) {
|
|
280
|
+
this.emitEvent(event);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
if (this.state.crossfadeTarget && this.state.crossfadeProgress !== void 0) {
|
|
285
|
+
this.state.crossfadeProgress += deltaTime;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
// ============================================================================
|
|
289
|
+
// Events
|
|
290
|
+
// ============================================================================
|
|
291
|
+
/**
|
|
292
|
+
* Add event listener
|
|
293
|
+
*/
|
|
294
|
+
on(event, callback) {
|
|
295
|
+
if (!this.eventListeners.has(event)) {
|
|
296
|
+
this.eventListeners.set(event, []);
|
|
297
|
+
}
|
|
298
|
+
this.eventListeners.get(event).push(callback);
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Remove event listener
|
|
302
|
+
*/
|
|
303
|
+
off(event, callback) {
|
|
304
|
+
const listeners = this.eventListeners.get(event);
|
|
305
|
+
if (listeners) {
|
|
306
|
+
const index = listeners.indexOf(callback);
|
|
307
|
+
if (index !== -1) {
|
|
308
|
+
listeners.splice(index, 1);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Emit animation event
|
|
314
|
+
*/
|
|
315
|
+
emitEvent(event) {
|
|
316
|
+
const listeners = this.eventListeners.get(event.name);
|
|
317
|
+
if (listeners) {
|
|
318
|
+
for (const callback of listeners) {
|
|
319
|
+
callback(event);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
// ============================================================================
|
|
324
|
+
// Enable/Disable
|
|
325
|
+
// ============================================================================
|
|
326
|
+
/**
|
|
327
|
+
* Enable/disable skeleton
|
|
328
|
+
*/
|
|
329
|
+
setEnabled(enabled) {
|
|
330
|
+
this.enabled = enabled;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Is enabled
|
|
334
|
+
*/
|
|
335
|
+
isEnabled() {
|
|
336
|
+
return this.enabled;
|
|
337
|
+
}
|
|
338
|
+
// ============================================================================
|
|
339
|
+
// Serialization
|
|
340
|
+
// ============================================================================
|
|
341
|
+
/**
|
|
342
|
+
* Serialize for animation system
|
|
343
|
+
*/
|
|
344
|
+
serialize() {
|
|
345
|
+
return {
|
|
346
|
+
rigType: this.config.rigType,
|
|
347
|
+
boneCount: this.bones.size,
|
|
348
|
+
clipCount: this.clips.size,
|
|
349
|
+
layerCount: this.config.layers?.length ?? 0,
|
|
350
|
+
currentClip: this.state.currentClip,
|
|
351
|
+
currentTime: this.state.currentTime,
|
|
352
|
+
normalizedTime: this.state.normalizedTime,
|
|
353
|
+
isPlaying: this.state.isPlaying,
|
|
354
|
+
speed: this.config.speed,
|
|
355
|
+
rootMotion: this.config.rootMotion,
|
|
356
|
+
enabled: this.enabled
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
};
|
|
360
|
+
function createSkeletonTrait(config = {}) {
|
|
361
|
+
return new SkeletonTrait(config);
|
|
362
|
+
}
|
|
363
|
+
var skeletonHandler = {
|
|
364
|
+
name: "skeleton",
|
|
365
|
+
defaultConfig: {},
|
|
366
|
+
onAttach(node, config, ctx) {
|
|
367
|
+
const instance = new SkeletonTrait(config);
|
|
368
|
+
node.__skeleton_instance = instance;
|
|
369
|
+
ctx.emit("skeleton_attached", { node, config });
|
|
370
|
+
},
|
|
371
|
+
onDetach(node, _config, ctx) {
|
|
372
|
+
const instance = node.__skeleton_instance;
|
|
373
|
+
if (instance) {
|
|
374
|
+
if (typeof instance.onDetach === "function") instance.onDetach(node, ctx);
|
|
375
|
+
else if (typeof instance.dispose === "function") instance.dispose();
|
|
376
|
+
else if (typeof instance.cleanup === "function") instance.cleanup();
|
|
377
|
+
}
|
|
378
|
+
ctx.emit("skeleton_detached", { node });
|
|
379
|
+
delete node.__skeleton_instance;
|
|
380
|
+
},
|
|
381
|
+
onEvent(node, _config, ctx, event) {
|
|
382
|
+
const instance = node.__skeleton_instance;
|
|
383
|
+
if (!instance) return;
|
|
384
|
+
if (typeof instance.onEvent === "function") instance.onEvent(event);
|
|
385
|
+
else if (typeof instance.emit === "function" && event.type) instance.emit(event);
|
|
386
|
+
if (event.type === "skeleton_configure" && event.payload) {
|
|
387
|
+
Object.assign(instance, event.payload);
|
|
388
|
+
ctx.emit("skeleton_configured", { node });
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
onUpdate(node, _config, ctx, dt) {
|
|
392
|
+
const instance = node.__skeleton_instance;
|
|
393
|
+
if (!instance) return;
|
|
394
|
+
if (typeof instance.onUpdate === "function") instance.onUpdate(node, ctx, dt);
|
|
395
|
+
}
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
export { SkeletonTrait, createSkeletonTrait, skeletonHandler };
|
|
399
|
+
//# sourceMappingURL=chunk-M56JSP4A.js.map
|
|
400
|
+
//# sourceMappingURL=chunk-M56JSP4A.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { HOLOMAP_SIMULATION_CONTRACT_KIND } from './chunk-YF2I3MV3.js';
|
|
2
|
+
|
|
3
|
+
// src/reconstruction/simulationContractBinding.ts
|
|
4
|
+
function assertHoloMapManifestContract(m) {
|
|
5
|
+
if (m.version !== "1.0.0") {
|
|
6
|
+
throw new Error(`HoloMap manifest version ${m.version} is not v1.0 contract`);
|
|
7
|
+
}
|
|
8
|
+
if (m.simulationContract.kind !== HOLOMAP_SIMULATION_CONTRACT_KIND) {
|
|
9
|
+
throw new Error(`Unexpected SimulationContract kind: ${m.simulationContract.kind}`);
|
|
10
|
+
}
|
|
11
|
+
if (!m.simulationContract.replayFingerprint || m.simulationContract.replayFingerprint.length < 8) {
|
|
12
|
+
throw new Error("HoloMap manifest missing replayFingerprint");
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { assertHoloMapManifestContract };
|
|
17
|
+
//# sourceMappingURL=chunk-MBOOR7X4.js.map
|
|
18
|
+
//# sourceMappingURL=chunk-MBOOR7X4.js.map
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
3
|
+
var chunkOIQYIIO3_cjs = require('./chunk-OIQYIIO3.cjs');
|
|
4
|
+
var chunkHGVXZDSK_cjs = require('./chunk-HGVXZDSK.cjs');
|
|
5
|
+
var chunkRMHC2VG7_cjs = require('./chunk-RMHC2VG7.cjs');
|
|
6
|
+
var chunkHCCQLAA4_cjs = require('./chunk-HCCQLAA4.cjs');
|
|
7
|
+
var ans = require('@holoscript/core-types/ans');
|
|
7
8
|
|
|
8
9
|
// src/compiler/PlayCanvasCompiler.ts
|
|
9
10
|
var PlayCanvasCompiler_exports = {};
|
|
10
|
-
|
|
11
|
+
chunkHCCQLAA4_cjs.__export(PlayCanvasCompiler_exports, {
|
|
11
12
|
PlayCanvasCompiler: () => exports.PlayCanvasCompiler
|
|
12
13
|
});
|
|
13
14
|
var SHAPE_TO_PRIMITIVE; exports.PlayCanvasCompiler = void 0;
|
|
14
|
-
var init_PlayCanvasCompiler =
|
|
15
|
+
var init_PlayCanvasCompiler = chunkHCCQLAA4_cjs.__esm({
|
|
15
16
|
"src/compiler/PlayCanvasCompiler.ts"() {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
chunkHHS6FMOU_cjs.init_DomainBlockCompilerMixin();
|
|
17
|
+
chunkOIQYIIO3_cjs.init_TraitCompositor();
|
|
18
|
+
chunkRMHC2VG7_cjs.init_CompilerBase();
|
|
19
|
+
chunkHGVXZDSK_cjs.init_DomainBlockCompilerMixin();
|
|
20
20
|
SHAPE_TO_PRIMITIVE = {
|
|
21
21
|
sphere: "sphere",
|
|
22
22
|
orb: "sphere",
|
|
@@ -32,7 +32,7 @@ var init_PlayCanvasCompiler = chunkEGIZHYJP_cjs.__esm({
|
|
|
32
32
|
capsule: "capsule",
|
|
33
33
|
disc: "plane"
|
|
34
34
|
};
|
|
35
|
-
exports.PlayCanvasCompiler = class extends
|
|
35
|
+
exports.PlayCanvasCompiler = class extends chunkRMHC2VG7_cjs.CompilerBase {
|
|
36
36
|
constructor(options = {}) {
|
|
37
37
|
super();
|
|
38
38
|
this.compilerName = "PlayCanvasCompiler";
|
|
@@ -42,11 +42,12 @@ var init_PlayCanvasCompiler = chunkEGIZHYJP_cjs.__esm({
|
|
|
42
42
|
className: options.className || "GeneratedScene",
|
|
43
43
|
enablePhysics: options.enablePhysics ?? true,
|
|
44
44
|
enableXR: options.enableXR ?? false,
|
|
45
|
-
indent: options.indent || " "
|
|
45
|
+
indent: options.indent || " ",
|
|
46
|
+
provenanceHash: options.provenanceHash ?? ""
|
|
46
47
|
};
|
|
47
48
|
}
|
|
48
49
|
getRequiredCapability() {
|
|
49
|
-
return
|
|
50
|
+
return ans.ANSCapabilityPath.PLAYCANVAS;
|
|
50
51
|
}
|
|
51
52
|
compile(composition, agentToken, outputPath) {
|
|
52
53
|
this.validateCompilerAccess(agentToken, outputPath);
|
|
@@ -56,6 +57,9 @@ var init_PlayCanvasCompiler = chunkEGIZHYJP_cjs.__esm({
|
|
|
56
57
|
this.emit(
|
|
57
58
|
`// Source: composition "${this.escapeStringValue(composition.name, "TypeScript")}"`
|
|
58
59
|
);
|
|
60
|
+
if (this.options.provenanceHash) {
|
|
61
|
+
this.emit(`// Provenance Hash: ${this.options.provenanceHash}`);
|
|
62
|
+
}
|
|
59
63
|
this.emit("");
|
|
60
64
|
this.emitImports(composition);
|
|
61
65
|
this.emit("");
|
|
@@ -142,33 +146,33 @@ var init_PlayCanvasCompiler = chunkEGIZHYJP_cjs.__esm({
|
|
|
142
146
|
this.emit("");
|
|
143
147
|
this.emit("// === v4.2 Domain Blocks ===");
|
|
144
148
|
let blockIdx = 0;
|
|
145
|
-
const compiled =
|
|
149
|
+
const compiled = chunkHGVXZDSK_cjs.compileDomainBlocks(
|
|
146
150
|
// @ts-expect-error During migration
|
|
147
151
|
domainBlocks,
|
|
148
152
|
{
|
|
149
153
|
material: (block) => {
|
|
150
|
-
const mat =
|
|
151
|
-
return
|
|
154
|
+
const mat = chunkHGVXZDSK_cjs.compileMaterialBlock(block);
|
|
155
|
+
return chunkHGVXZDSK_cjs.materialToPlayCanvas(mat, `db${blockIdx++}`);
|
|
152
156
|
},
|
|
153
157
|
physics: (block) => {
|
|
154
|
-
const phys =
|
|
155
|
-
return
|
|
158
|
+
const phys = chunkHGVXZDSK_cjs.compilePhysicsBlock(block);
|
|
159
|
+
return chunkHGVXZDSK_cjs.physicsToPlayCanvas(phys, `db${blockIdx++}`);
|
|
156
160
|
},
|
|
157
161
|
vfx: (block) => {
|
|
158
|
-
const ps =
|
|
159
|
-
return
|
|
162
|
+
const ps = chunkHGVXZDSK_cjs.compileParticleBlock(block);
|
|
163
|
+
return chunkHGVXZDSK_cjs.particlesToPlayCanvas(ps, `db${blockIdx++}`);
|
|
160
164
|
},
|
|
161
165
|
postfx: (block) => {
|
|
162
|
-
const pp =
|
|
166
|
+
const pp = chunkHGVXZDSK_cjs.compilePostProcessingBlock(block);
|
|
163
167
|
return `// Post-Processing: ${pp.keyword} \u2014 configure via PlayCanvas PostEffects
|
|
164
168
|
` + pp.effects.map((e) => `// Effect: ${e.type} \u2014 ${JSON.stringify(e.properties)}`).join("\n");
|
|
165
169
|
},
|
|
166
170
|
audio: (block) => {
|
|
167
|
-
const audio =
|
|
168
|
-
return
|
|
171
|
+
const audio = chunkHGVXZDSK_cjs.compileAudioSourceBlock(block);
|
|
172
|
+
return chunkHGVXZDSK_cjs.audioSourceToPlayCanvas(audio, `db${blockIdx++}`);
|
|
169
173
|
},
|
|
170
174
|
weather: (block) => {
|
|
171
|
-
const weather =
|
|
175
|
+
const weather = chunkHGVXZDSK_cjs.compileWeatherBlock(block);
|
|
172
176
|
return `// Weather: ${weather.keyword} "${weather.name || ""}" \u2014 implement via PlayCanvas particle system
|
|
173
177
|
` + weather.layers.map((l) => `// Layer: ${l.type} \u2014 ${JSON.stringify(l.properties)}`).join("\n");
|
|
174
178
|
}
|
|
@@ -369,7 +373,7 @@ var init_PlayCanvasCompiler = chunkEGIZHYJP_cjs.__esm({
|
|
|
369
373
|
}
|
|
370
374
|
if (obj.traits && Array.isArray(obj.traits) && obj.traits.length > 0) {
|
|
371
375
|
const traitNames = obj.traits.map((t) => t.name);
|
|
372
|
-
const compositor = new
|
|
376
|
+
const compositor = new chunkOIQYIIO3_cjs.TraitCompositor();
|
|
373
377
|
const composed = compositor.compose(traitNames);
|
|
374
378
|
if (Object.keys(composed).length > 0) {
|
|
375
379
|
const matVar = `${v}ComposedMat`;
|
|
@@ -751,5 +755,5 @@ var init_PlayCanvasCompiler = chunkEGIZHYJP_cjs.__esm({
|
|
|
751
755
|
|
|
752
756
|
exports.PlayCanvasCompiler_exports = PlayCanvasCompiler_exports;
|
|
753
757
|
exports.init_PlayCanvasCompiler = init_PlayCanvasCompiler;
|
|
754
|
-
//# sourceMappingURL=chunk-
|
|
755
|
-
//# sourceMappingURL=chunk-
|
|
758
|
+
//# sourceMappingURL=chunk-MJVIRCUV.cjs.map
|
|
759
|
+
//# sourceMappingURL=chunk-MJVIRCUV.cjs.map
|