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