@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
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { init_DomainBlockCompilerMixin, compileDomainBlocks, compileWeatherBlock, compileAudioSourceBlock, compileParticleBlock, compilePhysicsBlock, compileMaterialBlock } from './chunk-
|
|
2
|
-
import { init_CompilerBase,
|
|
3
|
-
import {
|
|
1
|
+
import { init_DomainBlockCompilerMixin, compileDomainBlocks, compileWeatherBlock, compileAudioSourceBlock, compileParticleBlock, compilePhysicsBlock, compileMaterialBlock } from './chunk-W55Z7QIX.js';
|
|
2
|
+
import { init_CompilerBase, CompilerBase } from './chunk-QTPMJRGS.js';
|
|
3
|
+
import { init_safeJsonParse, jsonClone } from './chunk-VVKVQZI6.js';
|
|
4
|
+
import { __export, __esm } from './chunk-OL46QLBJ.js';
|
|
5
|
+
import { ANSCapabilityPath } from '@holoscript/core-types/ans';
|
|
4
6
|
|
|
5
7
|
// src/compiler/VRRCompiler.ts
|
|
6
8
|
var VRRCompiler_exports = {};
|
|
@@ -12,7 +14,7 @@ var VRRTraitDefs, VRRCompiler, VRRCompiler_default;
|
|
|
12
14
|
var init_VRRCompiler = __esm({
|
|
13
15
|
"src/compiler/VRRCompiler.ts"() {
|
|
14
16
|
init_CompilerBase();
|
|
15
|
-
|
|
17
|
+
init_safeJsonParse();
|
|
16
18
|
init_DomainBlockCompilerMixin();
|
|
17
19
|
VRRTraitDefs = {
|
|
18
20
|
vrr_twin: { validator: (p) => !!p.mirror },
|
|
@@ -20,9 +22,13 @@ var init_VRRCompiler = __esm({
|
|
|
20
22
|
geo_anchor: {
|
|
21
23
|
validator: (p) => typeof p.lat === "number" && typeof p.lng === "number" && p.lat >= -90 && p.lat <= 90 && p.lng >= -180 && p.lng <= 180
|
|
22
24
|
},
|
|
23
|
-
weather_sync: {
|
|
25
|
+
weather_sync: {
|
|
26
|
+
validator: (p) => ["weather.gov", "openweathermap"].includes(String(p.provider))
|
|
27
|
+
},
|
|
24
28
|
event_sync: { validator: (p) => ["eventbrite", "ticketmaster"].includes(String(p.provider)) },
|
|
25
|
-
inventory_sync: {
|
|
29
|
+
inventory_sync: {
|
|
30
|
+
validator: (p) => ["square_pos", "shopify", "woocommerce"].includes(String(p.provider))
|
|
31
|
+
},
|
|
26
32
|
quest_hub: { validator: (p) => Array.isArray(p.quests) && p.quests.length > 0 },
|
|
27
33
|
layer_shift: {
|
|
28
34
|
validator: (p) => {
|
|
@@ -82,9 +88,7 @@ var init_VRRCompiler = __esm({
|
|
|
82
88
|
if (field) {
|
|
83
89
|
const traitDef = VRRTraitDefs[trait.name];
|
|
84
90
|
if (traitDef?.validator && !traitDef.validator(trait.params)) {
|
|
85
|
-
this.warnings.push(
|
|
86
|
-
`@${trait.name} on "${n.name || "unnamed"}" has invalid params`
|
|
87
|
-
);
|
|
91
|
+
this.warnings.push(`@${trait.name} on "${n.name || "unnamed"}" has invalid params`);
|
|
88
92
|
}
|
|
89
93
|
data[field].push(n);
|
|
90
94
|
}
|
|
@@ -111,27 +115,21 @@ var init_VRRCompiler = __esm({
|
|
|
111
115
|
* Generate a complete Three.js scene from VRR composition data.
|
|
112
116
|
* Places objects using geo_anchor coordinates, sets up materials/lighting/camera.
|
|
113
117
|
*/
|
|
114
|
-
compileToThreeJS(compositionData) {
|
|
118
|
+
compileToThreeJS(compositionData, twinGroupName) {
|
|
115
119
|
this.generatedCode.push(`
|
|
116
120
|
// === Three.js Scene Generation ===`);
|
|
117
121
|
this.generatedCode.push(`const ambientLight = new THREE.AmbientLight(0x404040, 0.6);`);
|
|
118
122
|
this.generatedCode.push(`scene.add(ambientLight);`);
|
|
119
|
-
this.generatedCode.push(
|
|
120
|
-
`const directionalLight = new THREE.DirectionalLight(0xffffff, 0.8);`
|
|
121
|
-
);
|
|
123
|
+
this.generatedCode.push(`const directionalLight = new THREE.DirectionalLight(0xffffff, 0.8);`);
|
|
122
124
|
this.generatedCode.push(`directionalLight.position.set(50, 200, 100);`);
|
|
123
125
|
this.generatedCode.push(`directionalLight.castShadow = true;`);
|
|
124
126
|
this.generatedCode.push(`scene.add(directionalLight);`);
|
|
125
|
-
this.generatedCode.push(
|
|
126
|
-
`const groundGeo = new THREE.PlaneGeometry(10000, 10000);`
|
|
127
|
-
);
|
|
127
|
+
this.generatedCode.push(`const groundGeo = new THREE.PlaneGeometry(10000, 10000);`);
|
|
128
128
|
this.generatedCode.push(
|
|
129
129
|
`const groundMat = new THREE.MeshStandardMaterial({ color: 0x3a7d3a, roughness: 0.9 });`
|
|
130
130
|
);
|
|
131
|
-
this.generatedCode.push(
|
|
132
|
-
|
|
133
|
-
);
|
|
134
|
-
this.generatedCode.push(`ground.rotation.x = -Math.PI / 2;`);
|
|
131
|
+
this.generatedCode.push(`const ground = new THREE.Mesh(groundGeo, groundMat);`);
|
|
132
|
+
this.generatedCode.push(`ground.rotation[0] = -Math.PI / 2;`);
|
|
135
133
|
this.generatedCode.push(`ground.receiveShadow = true;`);
|
|
136
134
|
this.generatedCode.push(`scene.add(ground);`);
|
|
137
135
|
this.generatedCode.push(`camera.position.set(0, 50, 100);`);
|
|
@@ -144,28 +142,20 @@ var init_VRRCompiler = __esm({
|
|
|
144
142
|
const safeName = this.escapeStringValue(String(node.name || "geo_object"), "TypeScript");
|
|
145
143
|
this.generatedCode.push(`
|
|
146
144
|
// Geo-anchored: ${safeName} (${lat}, ${lng})`);
|
|
147
|
-
this.generatedCode.push(
|
|
148
|
-
`const marker_${safeName} = new THREE.Group();`
|
|
149
|
-
);
|
|
145
|
+
this.generatedCode.push(`const marker_${safeName} = new THREE.Group();`);
|
|
150
146
|
this.generatedCode.push(
|
|
151
147
|
`marker_${safeName}.position.copy(vrr.geoToSceneCoords(${lat}, ${lng}));`
|
|
152
148
|
);
|
|
153
|
-
this.generatedCode.push(
|
|
154
|
-
|
|
155
|
-
);
|
|
156
|
-
this.generatedCode.push(`phoenix_downtown.add(marker_${safeName});`);
|
|
149
|
+
this.generatedCode.push(`marker_${safeName}.userData.geo = { lat: ${lat}, lng: ${lng} };`);
|
|
150
|
+
this.generatedCode.push(`${twinGroupName}.add(marker_${safeName});`);
|
|
157
151
|
}
|
|
158
152
|
this.generatedCode.push(`
|
|
159
153
|
// Skybox`);
|
|
160
|
-
this.generatedCode.push(
|
|
161
|
-
`scene.background = new THREE.Color(0x87ceeb);`
|
|
162
|
-
);
|
|
154
|
+
this.generatedCode.push(`scene.background = new THREE.Color(0x87ceeb);`);
|
|
163
155
|
this.generatedCode.push(`
|
|
164
156
|
// Render loop`);
|
|
165
157
|
this.generatedCode.push(`renderer.shadowMap.enabled = true;`);
|
|
166
|
-
this.generatedCode.push(
|
|
167
|
-
`renderer.shadowMap.type = THREE.PCFSoftShadowMap;`
|
|
168
|
-
);
|
|
158
|
+
this.generatedCode.push(`renderer.shadowMap.type = THREE.PCFSoftShadowMap;`);
|
|
169
159
|
this.generatedCode.push(`function animate() {`);
|
|
170
160
|
this.generatedCode.push(` requestAnimationFrame(animate);`);
|
|
171
161
|
this.generatedCode.push(` vrr.tick();`);
|
|
@@ -195,19 +185,11 @@ var init_VRRCompiler = __esm({
|
|
|
195
185
|
this.generatedCode.push(` location: vrr.getGeoCenter(),`);
|
|
196
186
|
this.generatedCode.push(`});`);
|
|
197
187
|
this.generatedCode.push(`const rainGeometry = new THREE.BufferGeometry();`);
|
|
198
|
-
this.generatedCode.push(
|
|
199
|
-
`const rainPositions = new Float32Array(3000 * 3);`
|
|
200
|
-
);
|
|
188
|
+
this.generatedCode.push(`const rainPositions = new Float32Array(3000 * 3);`);
|
|
201
189
|
this.generatedCode.push(`for (let i = 0; i < 3000; i++) {`);
|
|
202
|
-
this.generatedCode.push(
|
|
203
|
-
|
|
204
|
-
);
|
|
205
|
-
this.generatedCode.push(
|
|
206
|
-
` rainPositions[i * 3 + 1] = Math.random() * 200;`
|
|
207
|
-
);
|
|
208
|
-
this.generatedCode.push(
|
|
209
|
-
` rainPositions[i * 3 + 2] = (Math.random() - 0.5) * 500;`
|
|
210
|
-
);
|
|
190
|
+
this.generatedCode.push(` rainPositions[i * 3] = (Math.random() - 0.5) * 500;`);
|
|
191
|
+
this.generatedCode.push(` rainPositions[i * 3 + 1] = Math.random() * 200;`);
|
|
192
|
+
this.generatedCode.push(` rainPositions[i * 3 + 2] = (Math.random() - 0.5) * 500;`);
|
|
211
193
|
this.generatedCode.push(`}`);
|
|
212
194
|
this.generatedCode.push(
|
|
213
195
|
`rainGeometry.setAttribute('position', new THREE.BufferAttribute(rainPositions, 3));`
|
|
@@ -215,40 +197,28 @@ var init_VRRCompiler = __esm({
|
|
|
215
197
|
this.generatedCode.push(
|
|
216
198
|
`const rainMaterial = new THREE.PointsMaterial({ color: 0xaaaaaa, size: 0.1, transparent: true });`
|
|
217
199
|
);
|
|
218
|
-
this.generatedCode.push(
|
|
219
|
-
`const rainSystem = new THREE.Points(rainGeometry, rainMaterial);`
|
|
220
|
-
);
|
|
200
|
+
this.generatedCode.push(`const rainSystem = new THREE.Points(rainGeometry, rainMaterial);`);
|
|
221
201
|
this.generatedCode.push(`rainSystem.visible = false;`);
|
|
222
202
|
this.generatedCode.push(`scene.add(rainSystem);`);
|
|
223
203
|
this.generatedCode.push(`weatherSync_${safeName}.onUpdate((weather) => {`);
|
|
224
|
-
this.generatedCode.push(
|
|
225
|
-
` // Update fog based on visibility`
|
|
226
|
-
);
|
|
204
|
+
this.generatedCode.push(` // Update fog based on visibility`);
|
|
227
205
|
this.generatedCode.push(
|
|
228
206
|
` scene.fog = new THREE.Fog(0xcccccc, 10, Math.max(weather.visibility, 50));`
|
|
229
207
|
);
|
|
230
208
|
this.generatedCode.push(` // Toggle rain particles`);
|
|
231
|
-
this.generatedCode.push(
|
|
232
|
-
` rainSystem.visible = weather.precipitation > 0;`
|
|
233
|
-
);
|
|
209
|
+
this.generatedCode.push(` rainSystem.visible = weather.precipitation > 0;`);
|
|
234
210
|
this.generatedCode.push(` // Adjust sun intensity based on cloud cover`);
|
|
235
211
|
this.generatedCode.push(
|
|
236
212
|
` directionalLight.intensity = Math.max(0.2, 1.0 - (weather.cloud_cover || 0) / 100);`
|
|
237
213
|
);
|
|
238
214
|
this.generatedCode.push(` // Update skybox color`);
|
|
239
|
-
this.generatedCode.push(
|
|
240
|
-
|
|
241
|
-
);
|
|
242
|
-
this.generatedCode.push(
|
|
243
|
-
` scene.background = new THREE.Color(skyHue);`
|
|
244
|
-
);
|
|
215
|
+
this.generatedCode.push(` const skyHue = weather.precipitation > 50 ? 0x666680 : 0x87ceeb;`);
|
|
216
|
+
this.generatedCode.push(` scene.background = new THREE.Color(skyHue);`);
|
|
245
217
|
this.generatedCode.push(` // Temperature-based ambient tint`);
|
|
246
218
|
this.generatedCode.push(
|
|
247
219
|
` const tempNorm = Math.max(0, Math.min(1, (weather.temperature_f || 70) / 120));`
|
|
248
220
|
);
|
|
249
|
-
this.generatedCode.push(
|
|
250
|
-
` ambientLight.color.setHSL(0.6 - tempNorm * 0.4, 0.3, 0.4);`
|
|
251
|
-
);
|
|
221
|
+
this.generatedCode.push(` ambientLight.color.setHSL(0.6 - tempNorm * 0.4, 0.3, 0.4);`);
|
|
252
222
|
this.generatedCode.push(`});`);
|
|
253
223
|
}
|
|
254
224
|
}
|
|
@@ -278,7 +248,9 @@ var init_VRRCompiler = __esm({
|
|
|
278
248
|
this.generatedCode.push(`eventSync_${safeName}.onUpdate((events) => {`);
|
|
279
249
|
this.generatedCode.push(` // Clear previous markers`);
|
|
280
250
|
this.generatedCode.push(` while (eventMarkers_${safeName}.children.length > 0) {`);
|
|
281
|
-
this.generatedCode.push(
|
|
251
|
+
this.generatedCode.push(
|
|
252
|
+
` eventMarkers_${safeName}.remove(eventMarkers_${safeName}.children[0]);`
|
|
253
|
+
);
|
|
282
254
|
this.generatedCode.push(` }`);
|
|
283
255
|
this.generatedCode.push(` for (const evt of events) {`);
|
|
284
256
|
this.generatedCode.push(` // Create event marker billboard`);
|
|
@@ -288,13 +260,19 @@ var init_VRRCompiler = __esm({
|
|
|
288
260
|
);
|
|
289
261
|
this.generatedCode.push(` const marker = new THREE.Mesh(markerGeo, markerMat);`);
|
|
290
262
|
this.generatedCode.push(` if (evt.geo) {`);
|
|
291
|
-
this.generatedCode.push(
|
|
263
|
+
this.generatedCode.push(
|
|
264
|
+
` marker.position.copy(vrr.geoToSceneCoords(evt.geo.lat, evt.geo.lng));`
|
|
265
|
+
);
|
|
292
266
|
this.generatedCode.push(` }`);
|
|
293
|
-
this.generatedCode.push(
|
|
267
|
+
this.generatedCode.push(
|
|
268
|
+
` marker.userData.event = { name: evt.name, date: evt.date, url: evt.url };`
|
|
269
|
+
);
|
|
294
270
|
this.generatedCode.push(` eventMarkers_${safeName}.add(marker);`);
|
|
295
271
|
this.generatedCode.push(` // Spawn NPC crowds for active events`);
|
|
296
272
|
this.generatedCode.push(` if (evt.status === 'active') {`);
|
|
297
|
-
this.generatedCode.push(
|
|
273
|
+
this.generatedCode.push(
|
|
274
|
+
` vrr.spawnNPCCrowd(marker.position, evt.expected_attendance || 20);`
|
|
275
|
+
);
|
|
298
276
|
this.generatedCode.push(` }`);
|
|
299
277
|
this.generatedCode.push(` }`);
|
|
300
278
|
this.generatedCode.push(`});`);
|
|
@@ -305,7 +283,7 @@ var init_VRRCompiler = __esm({
|
|
|
305
283
|
* Generate code for real-time inventory display:
|
|
306
284
|
* product counts, availability badges, stock-level indicators.
|
|
307
285
|
*/
|
|
308
|
-
generateInventorySync(nodes) {
|
|
286
|
+
generateInventorySync(nodes, twinGroupName) {
|
|
309
287
|
if (nodes.length === 0) return;
|
|
310
288
|
this.generatedCode.push(`
|
|
311
289
|
// === @inventory_sync \u2014 Real-Time Inventory Display ===`);
|
|
@@ -324,19 +302,29 @@ var init_VRRCompiler = __esm({
|
|
|
324
302
|
this.generatedCode.push(` business_id: '${safeName}',`);
|
|
325
303
|
this.generatedCode.push(`});`);
|
|
326
304
|
this.generatedCode.push(`const inventoryUI_${safeName} = new THREE.Group();`);
|
|
327
|
-
this.generatedCode.push(
|
|
305
|
+
this.generatedCode.push(`${twinGroupName}.add(inventoryUI_${safeName});`);
|
|
328
306
|
this.generatedCode.push(`inventorySync_${safeName}.onUpdate((inventory) => {`);
|
|
329
307
|
this.generatedCode.push(` // Clear previous inventory display`);
|
|
330
308
|
this.generatedCode.push(` while (inventoryUI_${safeName}.children.length > 0) {`);
|
|
331
|
-
this.generatedCode.push(
|
|
309
|
+
this.generatedCode.push(
|
|
310
|
+
` inventoryUI_${safeName}.remove(inventoryUI_${safeName}.children[0]);`
|
|
311
|
+
);
|
|
332
312
|
this.generatedCode.push(` }`);
|
|
333
313
|
this.generatedCode.push(` for (const item of inventory.items) {`);
|
|
334
|
-
this.generatedCode.push(
|
|
335
|
-
|
|
314
|
+
this.generatedCode.push(
|
|
315
|
+
` // Availability badge color: green=in-stock, yellow=low, red=out`
|
|
316
|
+
);
|
|
317
|
+
this.generatedCode.push(
|
|
318
|
+
` const badgeColor = item.quantity > 10 ? 0x00ff00 : item.quantity > 0 ? 0xffaa00 : 0xff0000;`
|
|
319
|
+
);
|
|
336
320
|
this.generatedCode.push(` const badgeGeo = new THREE.SphereGeometry(0.3, 8, 8);`);
|
|
337
|
-
this.generatedCode.push(
|
|
321
|
+
this.generatedCode.push(
|
|
322
|
+
` const badgeMat = new THREE.MeshStandardMaterial({ color: badgeColor, emissive: badgeColor, emissiveIntensity: 0.5 });`
|
|
323
|
+
);
|
|
338
324
|
this.generatedCode.push(` const badge = new THREE.Mesh(badgeGeo, badgeMat);`);
|
|
339
|
-
this.generatedCode.push(
|
|
325
|
+
this.generatedCode.push(
|
|
326
|
+
` badge.userData.product = { name: item.name, quantity: item.quantity, price: item.price };`
|
|
327
|
+
);
|
|
340
328
|
this.generatedCode.push(` inventoryUI_${safeName}.add(badge);`);
|
|
341
329
|
this.generatedCode.push(` }`);
|
|
342
330
|
this.generatedCode.push(`});`);
|
|
@@ -365,9 +353,7 @@ var init_VRRCompiler = __esm({
|
|
|
365
353
|
this.generatedCode.push(
|
|
366
354
|
`const questBeacon_${safeName} = new THREE.PointLight(0xffdd00, 2, 30);`
|
|
367
355
|
);
|
|
368
|
-
this.generatedCode.push(
|
|
369
|
-
`questBeacon_${safeName}.position.set(0, 5, 0);`
|
|
370
|
-
);
|
|
356
|
+
this.generatedCode.push(`questBeacon_${safeName}.position.set(0, 5, 0);`);
|
|
371
357
|
this.generatedCode.push(
|
|
372
358
|
`if (marker_${safeName}) marker_${safeName}.add(questBeacon_${safeName});`
|
|
373
359
|
);
|
|
@@ -394,9 +380,7 @@ var init_VRRCompiler = __esm({
|
|
|
394
380
|
this.generatedCode.push(` // Grant reward (coupon, NFT, etc.)`);
|
|
395
381
|
this.generatedCode.push(` vrr.grantReward(quest.id, reward);`);
|
|
396
382
|
this.generatedCode.push(` // Visual celebration`);
|
|
397
|
-
this.generatedCode.push(
|
|
398
|
-
` questBeacon_${safeName}.color.setHex(0x00ff00);`
|
|
399
|
-
);
|
|
383
|
+
this.generatedCode.push(` questBeacon_${safeName}.color.setHex(0x00ff00);`);
|
|
400
384
|
this.generatedCode.push(`});`);
|
|
401
385
|
}
|
|
402
386
|
}
|
|
@@ -506,9 +490,7 @@ var init_VRRCompiler = __esm({
|
|
|
506
490
|
this.generatedCode.push(` 'X-Payment-Amount': '${price}',`);
|
|
507
491
|
this.generatedCode.push(` 'X-Payment-Asset': '${asset}',`);
|
|
508
492
|
this.generatedCode.push(` 'X-Payment-Network': '${network}',`);
|
|
509
|
-
this.generatedCode.push(
|
|
510
|
-
` 'X-Payment-Address': vrr.getPaymentAddress('${safeName}'),`
|
|
511
|
-
);
|
|
493
|
+
this.generatedCode.push(` 'X-Payment-Address': vrr.getPaymentAddress('${safeName}'),`);
|
|
512
494
|
this.generatedCode.push(` },`);
|
|
513
495
|
this.generatedCode.push(` };`);
|
|
514
496
|
this.generatedCode.push(` },`);
|
|
@@ -522,8 +504,12 @@ var init_VRRCompiler = __esm({
|
|
|
522
504
|
this.generatedCode.push(` vrr.unlockContent('${safeName}');`);
|
|
523
505
|
this.generatedCode.push(` },`);
|
|
524
506
|
this.generatedCode.push(` onPaymentFailed: (error) => {`);
|
|
525
|
-
this.generatedCode.push(
|
|
526
|
-
|
|
507
|
+
this.generatedCode.push(
|
|
508
|
+
` console.warn('Payment failed for ${safeName}:', error.message);`
|
|
509
|
+
);
|
|
510
|
+
this.generatedCode.push(
|
|
511
|
+
` vrr.showPaywallUI('${safeName}', { price: ${price}, asset: '${asset}', network: '${network}' });`
|
|
512
|
+
);
|
|
527
513
|
this.generatedCode.push(` },`);
|
|
528
514
|
this.generatedCode.push(`});`);
|
|
529
515
|
}
|
|
@@ -534,33 +520,100 @@ var init_VRRCompiler = __esm({
|
|
|
534
520
|
return node.traits.find((t) => t.name === traitName);
|
|
535
521
|
}
|
|
536
522
|
// ─── Main compile() ──────────────────────────────────────────────────
|
|
523
|
+
normalizeToCompositionTree(input) {
|
|
524
|
+
if (!input || typeof input !== "object") return null;
|
|
525
|
+
const node = input;
|
|
526
|
+
const nodeType = String(node.type || "").toLowerCase();
|
|
527
|
+
if (nodeType === "composition") {
|
|
528
|
+
return input;
|
|
529
|
+
}
|
|
530
|
+
if (nodeType === "world") {
|
|
531
|
+
return {
|
|
532
|
+
type: "Composition",
|
|
533
|
+
name: String(node.name || "WorldRoot"),
|
|
534
|
+
templates: [],
|
|
535
|
+
objects: [],
|
|
536
|
+
spatialGroups: [],
|
|
537
|
+
lights: [],
|
|
538
|
+
imports: [],
|
|
539
|
+
timelines: [],
|
|
540
|
+
audio: [],
|
|
541
|
+
zones: [],
|
|
542
|
+
transitions: [],
|
|
543
|
+
conditionals: [],
|
|
544
|
+
iterators: [],
|
|
545
|
+
npcs: [],
|
|
546
|
+
quests: [],
|
|
547
|
+
abilities: [],
|
|
548
|
+
dialogues: [],
|
|
549
|
+
stateMachines: [],
|
|
550
|
+
achievements: [],
|
|
551
|
+
talentTrees: [],
|
|
552
|
+
shapes: [],
|
|
553
|
+
children: [node],
|
|
554
|
+
worlds: [node]
|
|
555
|
+
};
|
|
556
|
+
}
|
|
557
|
+
return null;
|
|
558
|
+
}
|
|
559
|
+
extractGlobalSimulationStateFromWorlds(comp) {
|
|
560
|
+
const worlds = Array.isArray(comp.worlds) ? comp.worlds : [];
|
|
561
|
+
if (worlds.length > 0 && worlds[0]) {
|
|
562
|
+
const w = worlds[0];
|
|
563
|
+
if (w.simulation_state && typeof w.simulation_state === "object") {
|
|
564
|
+
return w.simulation_state;
|
|
565
|
+
}
|
|
566
|
+
if (w.simulationState && typeof w.simulationState === "object") {
|
|
567
|
+
return w.simulationState;
|
|
568
|
+
}
|
|
569
|
+
if (w.state && typeof w.state === "object") {
|
|
570
|
+
return w.state;
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
const children = Array.isArray(comp.children) ? comp.children : [];
|
|
574
|
+
const worldChild = children.find((c) => String(c?.type || "").toLowerCase() === "world");
|
|
575
|
+
if (worldChild) {
|
|
576
|
+
if (worldChild.simulation_state && typeof worldChild.simulation_state === "object") {
|
|
577
|
+
return worldChild.simulation_state;
|
|
578
|
+
}
|
|
579
|
+
if (worldChild.simulationState && typeof worldChild.simulationState === "object") {
|
|
580
|
+
return worldChild.simulationState;
|
|
581
|
+
}
|
|
582
|
+
if (worldChild.state && typeof worldChild.state === "object") {
|
|
583
|
+
return worldChild.state;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
return {};
|
|
587
|
+
}
|
|
537
588
|
compile(composition, agentToken, outputPath) {
|
|
538
589
|
this.validateCompilerAccess(agentToken, outputPath);
|
|
539
590
|
this.errors = [];
|
|
540
591
|
this.warnings = [];
|
|
541
592
|
this.generatedCode = [];
|
|
542
|
-
|
|
593
|
+
const normalizedComposition = this.normalizeToCompositionTree(composition);
|
|
594
|
+
if (!normalizedComposition) {
|
|
543
595
|
this.errors.push("Invalid composition tree");
|
|
544
596
|
return this.buildResult();
|
|
545
597
|
}
|
|
546
|
-
const compositionData = this.parseVRRComposition(
|
|
598
|
+
const compositionData = this.parseVRRComposition(normalizedComposition);
|
|
547
599
|
const twinNodes = compositionData.twinNodes;
|
|
548
600
|
if (twinNodes.length === 0) {
|
|
549
601
|
this.warnings.push(
|
|
550
602
|
"No @vrr_twin traits found. Compiling as standard 3D instead of reality mirror."
|
|
551
603
|
);
|
|
552
604
|
}
|
|
605
|
+
const comp = normalizedComposition;
|
|
606
|
+
const globalSimulationState = this.extractGlobalSimulationStateFromWorlds(comp);
|
|
553
607
|
this.generateImports();
|
|
554
608
|
this.generateSceneSetup();
|
|
555
|
-
this.generateAPIHooks(twinNodes);
|
|
556
|
-
this.compileToThreeJS(compositionData);
|
|
609
|
+
const twinGroupName = this.generateAPIHooks(twinNodes, globalSimulationState);
|
|
610
|
+
this.compileToThreeJS(compositionData, twinGroupName);
|
|
557
611
|
this.generateWeatherSync(compositionData.weatherNodes);
|
|
558
612
|
this.generateEventSync(compositionData.eventNodes);
|
|
559
|
-
this.generateInventorySync(compositionData.inventoryNodes);
|
|
613
|
+
this.generateInventorySync(compositionData.inventoryNodes, twinGroupName);
|
|
560
614
|
this.generateQuestLogic(compositionData.questNodes);
|
|
561
615
|
this.generateLayerShift(compositionData.layerShiftNodes);
|
|
562
616
|
this.generateX402Paywall(compositionData.paywallNodes);
|
|
563
|
-
const comp = composition;
|
|
564
617
|
const domainBlocks = Array.isArray(comp.domainBlocks) ? comp.domainBlocks : [];
|
|
565
618
|
if (domainBlocks.length > 0) {
|
|
566
619
|
this.generatedCode.push("\n// === v4.2 Domain Blocks ===");
|
|
@@ -598,7 +651,7 @@ var init_VRRCompiler = __esm({
|
|
|
598
651
|
this.generatedCode.push(`
|
|
599
652
|
// --- End of VRR Bindings --- //
|
|
600
653
|
`);
|
|
601
|
-
this.generatedCode.push(`scene.add(
|
|
654
|
+
this.generatedCode.push(`scene.add(${twinGroupName});`);
|
|
602
655
|
return this.buildResult();
|
|
603
656
|
}
|
|
604
657
|
extractNodesWithTrait(astNode, traitName) {
|
|
@@ -621,6 +674,9 @@ var init_VRRCompiler = __esm({
|
|
|
621
674
|
return matched;
|
|
622
675
|
}
|
|
623
676
|
generateImports() {
|
|
677
|
+
if (this.options.provenanceHash) {
|
|
678
|
+
this.generatedCode.push(`// Provenance Hash: ${this.options.provenanceHash}`);
|
|
679
|
+
}
|
|
624
680
|
this.generatedCode.push(`import * as THREE from 'three';`);
|
|
625
681
|
this.generatedCode.push(`import { VRRRuntime } from '@holoscript/runtime';`);
|
|
626
682
|
}
|
|
@@ -635,28 +691,34 @@ var init_VRRCompiler = __esm({
|
|
|
635
691
|
this.generatedCode.push(`renderer.setSize(window.innerWidth, window.innerHeight);`);
|
|
636
692
|
this.generatedCode.push(`document.body.appendChild(renderer.domElement);`);
|
|
637
693
|
}
|
|
638
|
-
generateAPIHooks(twinNodes) {
|
|
694
|
+
generateAPIHooks(twinNodes, globalSimulationState = {}) {
|
|
639
695
|
this.generatedCode.push(`
|
|
640
696
|
// Engine Initialization via @vrr_twin`);
|
|
641
697
|
let geoCenter = { lat: 0, lng: 0 };
|
|
642
698
|
let twinId = `auto_gen_twin`;
|
|
699
|
+
let twinName = "globalWorldContext";
|
|
643
700
|
let weatherProvider = "";
|
|
644
701
|
let eventProvider = "";
|
|
645
702
|
let inventoryProvider = "";
|
|
646
703
|
for (const rawNode of twinNodes) {
|
|
647
704
|
const node = rawNode;
|
|
705
|
+
if (node.name) {
|
|
706
|
+
twinName = this.escapeStringValue(String(node.name), "TypeScript");
|
|
707
|
+
}
|
|
648
708
|
if (node.traits) {
|
|
649
709
|
for (const trait of node.traits) {
|
|
650
710
|
if (trait.name === "geo_anchor")
|
|
651
711
|
geoCenter = { lat: Number(trait.params.lat), lng: Number(trait.params.lng) };
|
|
652
|
-
else if (trait.name === "vrr_twin" && trait.params.mirror)
|
|
712
|
+
else if (trait.name === "vrr_twin" && trait.params.mirror)
|
|
713
|
+
twinId = String(trait.params.mirror);
|
|
653
714
|
else if (trait.name === "weather_sync") weatherProvider = String(trait.params.provider);
|
|
654
715
|
else if (trait.name === "event_sync") eventProvider = String(trait.params.provider);
|
|
655
|
-
else if (trait.name === "inventory_sync")
|
|
716
|
+
else if (trait.name === "inventory_sync")
|
|
717
|
+
inventoryProvider = String(trait.params.provider);
|
|
656
718
|
}
|
|
657
719
|
}
|
|
658
720
|
}
|
|
659
|
-
const apiConfig =
|
|
721
|
+
const apiConfig = jsonClone(this.options.api_integrations || {});
|
|
660
722
|
if (weatherProvider && !apiConfig.weather) apiConfig.weather = { provider: weatherProvider };
|
|
661
723
|
if (eventProvider && !apiConfig.events) apiConfig.events = { provider: eventProvider };
|
|
662
724
|
if (inventoryProvider && !apiConfig.inventory)
|
|
@@ -666,12 +728,13 @@ var init_VRRCompiler = __esm({
|
|
|
666
728
|
this.generatedCode.push(` geo_center: { lat: ${geoCenter.lat}, lng: ${geoCenter.lng} },`);
|
|
667
729
|
this.generatedCode.push(` apis: ${JSON.stringify(apiConfig, null, 2)},`);
|
|
668
730
|
this.generatedCode.push(` multiplayer: { enabled: true, max_players: 1000, tick_rate: 20 },`);
|
|
731
|
+
this.generatedCode.push(` simulation_state: ${JSON.stringify(globalSimulationState)},`);
|
|
669
732
|
this.generatedCode.push(
|
|
670
733
|
` state_persistence: { client: 'indexeddb', server: 'https://supabase.hololand.io' }`
|
|
671
734
|
);
|
|
672
735
|
this.generatedCode.push(`});`);
|
|
673
736
|
this.generatedCode.push(`
|
|
674
|
-
const
|
|
737
|
+
const ${twinName} = new THREE.Group();`);
|
|
675
738
|
if (weatherProvider) {
|
|
676
739
|
this.generatedCode.push(`
|
|
677
740
|
// Extracted @weather_sync hook`);
|
|
@@ -692,12 +755,13 @@ const phoenix_downtown = new THREE.Group();`);
|
|
|
692
755
|
this.generatedCode.push(`});`);
|
|
693
756
|
}
|
|
694
757
|
const questHubs = this.extractNodesWithTrait(twinNodes[0] || {}, "@quest_hub");
|
|
695
|
-
for (
|
|
758
|
+
for (let i = 0; i < questHubs.length; i++) {
|
|
759
|
+
const hub = questHubs[i];
|
|
696
760
|
const questTrait = hub.traits?.find((t) => t.name === "quest_hub");
|
|
697
761
|
const quests = questTrait ? Array.isArray(questTrait.params.quests) ? questTrait.params.quests : [] : [];
|
|
698
762
|
this.generatedCode.push(`
|
|
699
763
|
// Configured @quest_hub for ${hub.name || "Business"}`);
|
|
700
|
-
this.generatedCode.push(`const hub_${
|
|
764
|
+
this.generatedCode.push(`const hub_${i} = {`);
|
|
701
765
|
this.generatedCode.push(` quests: ${JSON.stringify(quests)}`);
|
|
702
766
|
this.generatedCode.push(`};`);
|
|
703
767
|
const inventory = hub.traits?.find((t) => t.name === "inventory_sync");
|
|
@@ -724,6 +788,7 @@ const phoenix_downtown = new THREE.Group();`);
|
|
|
724
788
|
this.generatedCode.push(`vrr.syncPlayers((players) => {`);
|
|
725
789
|
this.generatedCode.push(` // Render avatars in scene mapped to players.position`);
|
|
726
790
|
this.generatedCode.push(`});`);
|
|
791
|
+
return twinName;
|
|
727
792
|
}
|
|
728
793
|
buildResult() {
|
|
729
794
|
return {
|
|
@@ -742,5 +807,5 @@ const phoenix_downtown = new THREE.Group();`);
|
|
|
742
807
|
});
|
|
743
808
|
|
|
744
809
|
export { VRRCompiler, VRRCompiler_default, VRRCompiler_exports, init_VRRCompiler };
|
|
745
|
-
//# sourceMappingURL=chunk-
|
|
746
|
-
//# sourceMappingURL=chunk-
|
|
810
|
+
//# sourceMappingURL=chunk-R3IVNY6P.js.map
|
|
811
|
+
//# sourceMappingURL=chunk-R3IVNY6P.js.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var crypto = require('crypto');
|
|
4
|
+
|
|
5
|
+
// src/deploy/provenance.ts
|
|
6
|
+
function computeContentHash(source) {
|
|
7
|
+
const normalized = source.replace(/\r\n/g, "\n");
|
|
8
|
+
return crypto.createHash("sha256").update(normalized, "utf8").digest("hex");
|
|
9
|
+
}
|
|
10
|
+
function classifyPublishMode(ast) {
|
|
11
|
+
const imports = ast?.imports ?? ast?.ast?.imports ?? [];
|
|
12
|
+
const hasImports = Array.isArray(imports) && imports.length > 0;
|
|
13
|
+
if (!hasImports) return "original";
|
|
14
|
+
const body = ast?.body ?? ast?.ast?.body ?? [];
|
|
15
|
+
const hasOwnContent = Array.isArray(body) && body.some(
|
|
16
|
+
(node) => node.type === "composition" || node.type === "ObjectDeclaration" || node.type === "scene" || node.type === "object" || node.type === "character" || node.type === "environment"
|
|
17
|
+
);
|
|
18
|
+
if (hasOwnContent) return "remix";
|
|
19
|
+
return "curated";
|
|
20
|
+
}
|
|
21
|
+
function extractImports(ast) {
|
|
22
|
+
const imports = ast?.imports ?? ast?.ast?.imports ?? [];
|
|
23
|
+
if (!Array.isArray(imports)) return [];
|
|
24
|
+
return imports.map((imp) => ({
|
|
25
|
+
// @ts-expect-error
|
|
26
|
+
path: imp.path ?? imp.source ?? "",
|
|
27
|
+
// @ts-expect-error
|
|
28
|
+
hash: imp.hash,
|
|
29
|
+
// @ts-expect-error
|
|
30
|
+
author: imp.author
|
|
31
|
+
})).filter((imp) => imp.path.length > 0);
|
|
32
|
+
}
|
|
33
|
+
function generateProvenance(source, ast, options) {
|
|
34
|
+
return {
|
|
35
|
+
author: options.author,
|
|
36
|
+
created: options.createdAt ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
37
|
+
hash: computeContentHash(source),
|
|
38
|
+
license: options.license,
|
|
39
|
+
version: 1,
|
|
40
|
+
publishMode: classifyPublishMode(ast),
|
|
41
|
+
imports: extractImports(ast)
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
exports.classifyPublishMode = classifyPublishMode;
|
|
46
|
+
exports.computeContentHash = computeContentHash;
|
|
47
|
+
exports.extractImports = extractImports;
|
|
48
|
+
exports.generateProvenance = generateProvenance;
|
|
49
|
+
//# sourceMappingURL=chunk-R75BSDH7.cjs.map
|
|
50
|
+
//# sourceMappingURL=chunk-R75BSDH7.cjs.map
|