@holoscript/core 6.0.4 → 6.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +3 -3
- package/bin/holoscript.cjs +3 -0
- package/dist/GLTFPipeline-SFIORFJU.js +16 -0
- package/dist/GLTFPipeline-VNNDPONV.cjs +37 -0
- package/dist/{HoloScriptPlusParser-BN6KVRCM.js → HoloScriptPlusParser-7FBIFUFC.js} +6 -5
- package/dist/{HoloScriptPlusParser-NC5FE6AL.cjs → HoloScriptPlusParser-A2W7OCN2.cjs} +17 -16
- package/dist/HoloScriptPlusParser-F2Z56FJR.js +10 -0
- package/dist/HoloScriptPlusParser-WKHRIH6T.cjs +27 -0
- package/dist/{USDZExporter-UWGWNMMD.cjs → USDZExporter-3FWJ25JI.cjs} +344 -16
- package/dist/{USDZExporter-NTMBNTDB.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-5OEOHAAW.cjs → chunk-27MPVJVZ.cjs} +64 -28
- package/dist/{chunk-RVYPEYPX.js → chunk-2A7FURVO.js} +44 -8
- package/dist/{chunk-XCWFGZAA.js → chunk-2B7WVIDZ.js} +11 -8
- package/dist/{chunk-NDQNIJEH.js → chunk-2BSMSUCE.js} +250 -24
- package/dist/chunk-2HLIGOKU.cjs +5546 -0
- package/dist/{chunk-EONILVMF.js → chunk-2M2DPHKB.js} +4 -4
- package/dist/{chunk-G7CT3EMP.cjs → chunk-2YSNA2F2.cjs} +319 -47
- package/dist/{chunk-IWI6J7FX.js → chunk-33XCOVE3.js} +5 -5
- package/dist/chunk-3FOKASKO.cjs +348 -0
- package/dist/{chunk-DXJQDCFL.js → chunk-4C57PR42.js} +3 -3
- package/dist/{chunk-MPXBVFHQ.js → chunk-4N4SXXWF.js} +4 -3
- package/dist/chunk-4PDEPEQW.cjs +41 -0
- package/dist/chunk-4R6HPSHJ.js +2176 -0
- package/dist/chunk-4R6SBXDB.js +45 -0
- package/dist/chunk-4SY77NA4.cjs +413 -0
- package/dist/{chunk-YCXFCXDS.js → chunk-4UUKPCY4.js} +668 -110
- package/dist/{chunk-LGGRPKTV.cjs → chunk-52ULD552.cjs} +114 -35
- package/dist/{chunk-L4G4RLXX.js → chunk-5CKA5SXU.js} +438 -22
- 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-KED34ILP.js → chunk-6ASWLXXN.js} +21 -9
- package/dist/chunk-6CTRH7HT.cjs +1985 -0
- package/dist/{chunk-CAUCGUEA.cjs → chunk-6EX3I5P4.cjs} +6 -6
- package/dist/chunk-6FGQNDR4.js +5731 -0
- package/dist/{chunk-72EQECGT.cjs → chunk-6KMK2UXT.cjs} +122 -46
- package/dist/{chunk-G4VZTCIB.js → chunk-6L4VE27M.js} +33 -23
- package/dist/{chunk-ATSKSYVE.cjs → chunk-6S6TKNEA.cjs} +6478 -1738
- package/dist/chunk-77V4GTCA.js +596 -0
- package/dist/{chunk-ZP4D3CSX.cjs → chunk-7AD52FRS.cjs} +16 -16
- package/dist/chunk-A6KINLZJ.js +236 -0
- package/dist/chunk-AIA52I7T.cjs +543 -0
- package/dist/chunk-AIX25INK.cjs +602 -0
- package/dist/{chunk-B5TCIAPQ.cjs → chunk-AO4I2Z7M.cjs} +17 -18
- package/dist/{chunk-Q5SJOGHQ.cjs → chunk-BPICAGBV.cjs} +324 -199
- package/dist/chunk-BRQJKJGT.cjs +20 -0
- package/dist/{chunk-3FXV5S25.cjs → chunk-C37BHB7N.cjs} +6 -3
- package/dist/{chunk-XUTX5CBW.js → chunk-CBJY23VL.js} +3 -3
- package/dist/chunk-CIWWXYHZ.cjs +50 -0
- package/dist/{chunk-XXINBTZK.cjs → chunk-DIL6DDDN.cjs} +101 -45
- package/dist/chunk-DMXC24WV.js +404 -0
- package/dist/{chunk-PMGODDJA.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-UPJBDCVF.js → chunk-EMMC5CSQ.js} +12 -8
- package/dist/{chunk-GGHSW2NN.js → chunk-EOBB6A4B.js} +6389 -1718
- package/dist/chunk-EOFNVCM6.js +325 -0
- package/dist/{chunk-FHQVYCH2.js → chunk-ER4GATIU.js} +7 -7
- 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-T36DDXSF.js → chunk-FXKTYFYA.js} +150 -25
- package/dist/chunk-G2LS3RFO.js +623 -0
- package/dist/chunk-GCMWDSBZ.cjs +729 -0
- package/dist/chunk-GJNCFRJU.cjs +125 -0
- package/dist/{chunk-Q4QX3AET.cjs → chunk-GMP623FG.cjs} +16 -13
- package/dist/{chunk-XD6IYDUX.js → chunk-GN3KDX4W.js} +119 -43
- package/dist/{chunk-QLEAOI3Q.cjs → chunk-GQYKQSTC.cjs} +10 -10
- package/dist/chunk-GTU2Z2WW.cjs +262 -0
- package/dist/chunk-GZG4KA4E.js +529 -0
- package/dist/{chunk-BND3ST2K.cjs → chunk-H3MGK7TX.cjs} +42 -32
- package/dist/{chunk-XRKWN5PL.cjs → chunk-H5DZIHJP.cjs} +14 -18
- package/dist/{chunk-Z34RLXRA.cjs → chunk-HANL7K2Q.cjs} +65 -50
- package/dist/{chunk-3SAK5KFL.cjs → chunk-HCCQLAA4.cjs} +2 -11
- package/dist/{chunk-LXJ4667L.cjs → chunk-HGVXZDSK.cjs} +108 -20
- package/dist/{chunk-3FJCK5XA.js → chunk-HRODTEEO.js} +30 -10
- package/dist/{chunk-HQUEA5R6.cjs → chunk-HZCQO4JM.cjs} +6 -6
- package/dist/{chunk-S565K7NK.js → chunk-I2O7TW6B.js} +12 -8
- package/dist/chunk-IHESJZSW.js +4490 -0
- package/dist/{chunk-FSF7EQVA.cjs → chunk-IRWWS72C.cjs} +63 -22
- package/dist/{chunk-5O6TQC6M.cjs → chunk-IVIA7K75.cjs} +689 -127
- package/dist/chunk-IVY74O6C.js +247 -0
- package/dist/chunk-J32ZJZJH.js +554 -0
- package/dist/chunk-J56PTA46.cjs +639 -0
- package/dist/chunk-JD7CIZ33.js +1949 -0
- package/dist/{chunk-T7LEXZUZ.cjs → chunk-JIYN45TV.cjs} +14 -15
- package/dist/{chunk-FFKU7BTK.cjs → chunk-KHPCJRI3.cjs} +24 -21
- package/dist/chunk-KKFZ3B6J.cjs +557 -0
- package/dist/chunk-KPJL34Y7.cjs +186 -0
- package/dist/{chunk-HE7ULERA.cjs → chunk-KQTPCYTG.cjs} +128 -44
- package/dist/{chunk-OFKWH2IP.js → chunk-KX76JUQY.js} +3 -3
- package/dist/{chunk-33LSUQDD.cjs → chunk-L63H3SQ4.cjs} +43 -31
- package/dist/{chunk-K6EKD26I.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-XWPNTWDN.cjs → chunk-MJVIRCUV.cjs} +31 -27
- package/dist/{chunk-SDAMZIRE.js → chunk-MSMIFMBL.js} +135 -18
- package/dist/{chunk-56IF4NTA.js → chunk-MXFUTKCO.js} +18 -18
- package/dist/{chunk-6UEHYZ7V.cjs → chunk-MXJ5SS53.cjs} +447 -31
- package/dist/chunk-MYY4PMWX.cjs +264 -0
- package/dist/chunk-N75IH2HY.js +258 -0
- package/dist/{chunk-GVUR45UF.cjs → chunk-NG77ATEW.cjs} +7 -6
- package/dist/chunk-NW5G5FBQ.js +215 -0
- package/dist/{chunk-E3FWRT3Z.js → chunk-OEFY723R.js} +28 -13
- package/dist/chunk-OEV5RMZO.cjs +3042 -0
- package/dist/{chunk-X4ZF6CNE.cjs → chunk-OIQYIIO3.cjs} +7 -7
- package/dist/{chunk-2CWOLHTE.js → chunk-OL46QLBJ.js} +3 -11
- package/dist/chunk-OPZ7XDDI.js +487 -0
- package/dist/chunk-OSYNRVOV.cjs +243 -0
- package/dist/{chunk-TEWCN33Y.js → chunk-P7YIA5LN.js} +91 -7
- package/dist/chunk-PGANYCAG.cjs +220 -0
- package/dist/{chunk-CS2EMTGF.js → chunk-QAVXL2IH.js} +62 -21
- package/dist/{chunk-T4NKMBDL.js → chunk-QCCBXSCE.js} +1666 -756
- package/dist/{chunk-F4IULT7N.js → chunk-QPOQ7VPI.js} +16 -13
- package/dist/{chunk-6XSERL6L.js → chunk-QTPMJRGS.js} +3108 -2827
- package/dist/{chunk-F3HH56EB.cjs → chunk-QWNQ523V.cjs} +1730 -823
- package/dist/{chunk-R7MA7QWV.js → chunk-R3IVNY6P.js} +102 -23
- package/dist/chunk-R75BSDH7.cjs +50 -0
- package/dist/chunk-RAXUF5DF.cjs +2196 -0
- package/dist/{chunk-BF2235SI.cjs → chunk-RMHC2VG7.cjs} +2876 -2592
- package/dist/chunk-RUXGBKPS.cjs +4517 -0
- package/dist/{chunk-UERJ3YJV.js → chunk-S5IFXW6E.js} +113 -9
- package/dist/{chunk-27LWW5FU.cjs → chunk-S6YWHCKV.cjs} +5 -5
- package/dist/{chunk-WB4Z63GG.js → chunk-SIEXCILW.js} +3 -3
- package/dist/{chunk-CLYEIWA5.cjs → chunk-SLU6UPJI.cjs} +5 -3
- package/dist/{chunk-LZ266PCM.cjs → chunk-T5J7ZKP3.cjs} +446 -60
- 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-CDPGV4DN.js → chunk-U4NBQJBY.js} +14 -15
- package/dist/{chunk-NOZZ46QU.js → chunk-UD3DSHZM.js} +10 -14
- package/dist/chunk-UDMYRFDZ.js +3038 -0
- package/dist/{chunk-WDW67DZB.cjs → chunk-UOIGFQXC.cjs} +90 -68
- package/dist/{chunk-BU7VWW2K.js → chunk-URG2SJLK.js} +14 -15
- package/dist/{chunk-EQV4R3EV.cjs → chunk-V73NPPTM.cjs} +152 -35
- package/dist/chunk-VECQYRXL.js +474 -0
- package/dist/chunk-VEXPG4WN.js +1989 -0
- package/dist/{chunk-LDP5OK6G.js → chunk-VMLKSV26.js} +5 -5
- package/dist/{chunk-5BGSECRJ.cjs → chunk-VSK7W3O5.cjs} +47 -27
- package/dist/chunk-VVKVQZI6.js +55 -0
- package/dist/{chunk-YQK5JNFK.js → chunk-W55Z7QIX.js} +103 -15
- package/dist/{chunk-KSGXLT74.cjs → chunk-W6P2GBHH.cjs} +3 -3
- package/dist/{chunk-IBDG74G2.cjs → chunk-W6RW64BB.cjs} +7 -7
- package/dist/chunk-WDT3JTGM.cjs +483 -0
- package/dist/{chunk-HPS76H7Q.js → chunk-WKX5AMOY.js} +3 -3
- package/dist/chunk-WNNE3PO3.js +34 -0
- package/dist/{chunk-XG23EUQX.cjs → chunk-WRLUBRKS.cjs} +538 -312
- package/dist/{chunk-IFNQFCTM.js → chunk-WRNEH5MO.js} +79 -8
- package/dist/{chunk-54FHG2MX.js → chunk-WRWEX5ZF.js} +7 -4
- package/dist/{chunk-KCQ5NDYC.cjs → chunk-X3GJPRVK.cjs} +154 -80
- package/dist/{chunk-7AGYRWKW.cjs → chunk-XFXGA5IW.cjs} +126 -22
- package/dist/{chunk-TQSZUOW5.cjs → chunk-XHIV6326.cjs} +4 -4
- package/dist/chunk-XJAN7CZG.cjs +432 -0
- package/dist/chunk-XL6INWKT.js +121 -0
- package/dist/{chunk-E3UALNFA.js → chunk-XMWZG36H.js} +4 -4
- package/dist/{chunk-BKIGPPVM.js → chunk-XSFNHP2E.js} +6 -3
- package/dist/{chunk-H5Z7NASB.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-V3NN3HPP.js → chunk-YIMN575O.js} +437 -52
- package/dist/chunk-YIVFJNYV.js +176 -0
- package/dist/{chunk-MD6KDHVE.cjs → chunk-YKGPCZEE.cjs} +10 -10
- package/dist/chunk-YQELFNJV.js +39 -0
- package/dist/chunk-Z5XMPRNC.cjs +5390 -0
- package/dist/{chunk-3FYZOR7S.cjs → chunk-ZDSYWBIE.cjs} +18 -18
- package/dist/{chunk-6TZPZCOJ.cjs → chunk-ZKSS47EV.cjs} +24 -19
- package/dist/chunk-ZUL5AVTX.cjs +1993 -0
- package/dist/chunk-ZXBZVXDW.js +5386 -0
- package/dist/{chunk-DMG7C4H2.js → chunk-ZZ7RO2UQ.js} +312 -44
- package/dist/cli/holoscript-runner.cjs +200 -204
- package/dist/cli/holoscript-runner.js +144 -148
- package/dist/codebase/index.cjs +1 -1
- package/dist/codebase/index.js +1 -1
- package/dist/compiler/agent-inference.cjs +10 -7
- package/dist/compiler/agent-inference.js +6 -3
- package/dist/compiler/android-xr.cjs +12 -7
- package/dist/compiler/android-xr.js +10 -5
- package/dist/compiler/android.cjs +12 -8
- package/dist/compiler/android.js +10 -6
- package/dist/compiler/ar.cjs +9 -6
- package/dist/compiler/ar.js +7 -4
- package/dist/compiler/babylon.cjs +12 -8
- package/dist/compiler/babylon.js +11 -7
- 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 +155 -152
- package/dist/compiler/domain-block-utils.js +7 -4
- package/dist/compiler/dtdl.cjs +10 -7
- package/dist/compiler/dtdl.js +7 -4
- package/dist/compiler/gltf-pipeline.cjs +9 -9
- package/dist/compiler/gltf-pipeline.js +2 -2
- package/dist/compiler/godot.cjs +9 -6
- package/dist/compiler/godot.js +8 -5
- package/dist/compiler/incremental.cjs +12 -7
- package/dist/compiler/incremental.js +7 -2
- package/dist/compiler/index.cjs +3550 -268
- package/dist/compiler/index.d.ts +404 -21
- package/dist/compiler/index.js +3280 -138
- package/dist/compiler/ios.cjs +11 -8
- package/dist/compiler/ios.js +9 -6
- 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 -10
- package/dist/compiler/multi-layer.js +13 -9
- package/dist/compiler/nodetoy.cjs +5 -5
- package/dist/compiler/nodetoy.js +2 -2
- package/dist/compiler/openxr.cjs +10 -6
- package/dist/compiler/openxr.js +9 -5
- package/dist/compiler/playcanvas.cjs +10 -7
- package/dist/compiler/playcanvas.js +9 -6
- package/dist/compiler/r3f.cjs +17 -13
- package/dist/compiler/r3f.d.ts +22 -0
- package/dist/compiler/r3f.js +12 -8
- 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 -7
- package/dist/compiler/sdf.js +8 -5
- package/dist/compiler/semantic-scene.cjs +1 -1
- package/dist/compiler/semantic-scene.js +1 -1
- package/dist/compiler/state.cjs +9 -5
- package/dist/compiler/state.js +7 -3
- package/dist/compiler/trait-composition.cjs +11 -7
- package/dist/compiler/trait-composition.js +7 -3
- package/dist/compiler/unity.cjs +10 -6
- package/dist/compiler/unity.js +9 -5
- package/dist/compiler/unreal.cjs +11 -7
- package/dist/compiler/unreal.js +9 -5
- package/dist/compiler/urdf.cjs +20 -13
- package/dist/compiler/urdf.js +8 -5
- package/dist/compiler/usd-physics.cjs +10 -7
- package/dist/compiler/usd-physics.js +7 -4
- package/dist/compiler/visionos.cjs +10 -6
- package/dist/compiler/visionos.js +9 -5
- package/dist/compiler/vrchat.cjs +10 -7
- package/dist/compiler/vrchat.js +8 -5
- package/dist/compiler/vrr.cjs +10 -7
- package/dist/compiler/vrr.js +8 -5
- package/dist/compiler/wasm.cjs +13 -10
- package/dist/compiler/wasm.js +8 -5
- package/dist/compiler/webgpu.cjs +9 -6
- package/dist/compiler/webgpu.js +8 -5
- package/dist/constants.d.ts +3 -2
- 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.js +5 -3
- package/dist/entries/scripting.cjs +18 -18
- package/dist/entries/scripting.js +8 -8
- 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 +20332 -18121
- package/dist/index.d.ts +1477 -40
- package/dist/index.js +19451 -17638
- 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-PHCWUBPX.cjs → ml-dsa-FSKBTE3W.cjs} +177 -90
- package/dist/{ml-dsa-WYLJHJO6.js → ml-dsa-Z7JDKW4L.js} +158 -71
- 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 -11
- package/dist/parser.d.ts +11 -0
- package/dist/parser.js +10 -8
- package/dist/{playwright-RL6GY4F7.cjs → playwright-3AT3AKTV.cjs} +1985 -1985
- package/dist/{playwright-5OSAPTNH.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.js +545 -0
- package/dist/storage/index.cjs +10 -9
- 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 +22 -1
- 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.js +380 -0
- package/dist/traits/index.cjs +17630 -7881
- package/dist/traits/index.d.ts +197 -0
- package/dist/traits/index.js +16573 -7193
- 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 +29 -0
- package/dist/wot/index.js +4 -0
- package/package.json +153 -61
- package/dist/GLTFPipeline-DEN36VNK.js +0 -12
- package/dist/GLTFPipeline-YPCAK236.cjs +0 -33
- package/dist/chunk-4XSNJCLC.cjs +0 -1859
- package/dist/chunk-A7PIMZGU.js +0 -263
- package/dist/chunk-BWFJEM5A.js +0 -5419
- package/dist/chunk-CBJSLA2E.cjs +0 -5423
- package/dist/chunk-K3JDKWGI.cjs +0 -270
- package/dist/chunk-LSW7P7ML.js +0 -3675
- package/dist/chunk-MEASWI2Y.js +0 -126
- package/dist/chunk-NCUKG4SK.cjs +0 -3075
- package/dist/chunk-Q5JT3YML.cjs +0 -129
- package/dist/chunk-QGKNANZ3.js +0 -3071
- package/dist/chunk-S2N5TNMA.js +0 -1855
- package/dist/chunk-TSH3MSQU.cjs +0 -129
- package/dist/chunk-WGMEAYBG.js +0 -126
- package/dist/chunk-X6SEAXAX.cjs +0 -3681
|
@@ -1,7 +1,53 @@
|
|
|
1
|
-
import { init_DomainBlockCompilerMixin, compileDomainBlocks, inputToGodot, compileInputBlock, navigationToGodot, compileNavigationBlock, renderingToGodot, compileRenderingBlock, proceduralToGodot, compileProceduralBlock, web3ToGodot, compileWeb3Block, architectureToGodot, compileArchitectureBlock, musicToGodot, compileMusicBlock, educationToGodot, compileEducationBlock, datavizToGodot, compileDataVizBlock, iotToGodot, compileIoTBlock, compileRoboticsBlock, roboticsToGodot, compileHealthcareBlock, healthcareToGodot, compilePaymentBlock, paymentToGodot, compileNarrativeBlock, narrativeToGodot, compileWeatherBlock, weatherToGodot, compileAudioSourceBlock, audioSourceToGodot, compilePostProcessingBlock, postProcessingToGodot, compileParticleBlock, particlesToGodot, compilePhysicsBlock, physicsToGodot, compileMaterialBlock, materialToGodot } from './chunk-
|
|
2
|
-
import { init_CompilerBase, CompilerBase } from './chunk-
|
|
3
|
-
import {
|
|
4
|
-
import { ANSCapabilityPath } from '@holoscript/
|
|
1
|
+
import { init_DomainBlockCompilerMixin, compileDomainBlocks, inputToGodot, compileInputBlock, navigationToGodot, compileNavigationBlock, renderingToGodot, compileRenderingBlock, proceduralToGodot, compileProceduralBlock, web3ToGodot, compileWeb3Block, architectureToGodot, compileArchitectureBlock, musicToGodot, compileMusicBlock, educationToGodot, compileEducationBlock, datavizToGodot, compileDataVizBlock, iotToGodot, compileIoTBlock, compileRoboticsBlock, roboticsToGodot, compileHealthcareBlock, healthcareToGodot, compilePaymentBlock, paymentToGodot, compileNarrativeBlock, narrativeToGodot, compileWeatherBlock, weatherToGodot, compileAudioSourceBlock, audioSourceToGodot, compilePostProcessingBlock, postProcessingToGodot, compileParticleBlock, particlesToGodot, compilePhysicsBlock, physicsToGodot, compileMaterialBlock, materialToGodot } from './chunk-W55Z7QIX.js';
|
|
2
|
+
import { init_CompilerBase, CompilerBase } from './chunk-QTPMJRGS.js';
|
|
3
|
+
import { __esm, __export } from './chunk-OL46QLBJ.js';
|
|
4
|
+
import { ANSCapabilityPath } from '@holoscript/core-types/ans';
|
|
5
|
+
|
|
6
|
+
// src/compiler/godot-acoustic-bus.ts
|
|
7
|
+
function compileAcousticTrait(traitName, config, varName) {
|
|
8
|
+
const bus = `${varName}_acoustic_bus`;
|
|
9
|
+
const effects = [];
|
|
10
|
+
const body = [];
|
|
11
|
+
if (traitName === "audio_material") {
|
|
12
|
+
const preset = String(config.preset || "default");
|
|
13
|
+
const room = preset === "metal" ? 0.85 : preset === "glass" ? 0.35 : 0.6;
|
|
14
|
+
const damping = preset === "metal" ? 0.1 : preset === "glass" ? 0.55 : 0.3;
|
|
15
|
+
body.push(`var ${varName}_reverb = AudioEffectReverb.new()`);
|
|
16
|
+
body.push(`${varName}_reverb.room_size = ${room}`);
|
|
17
|
+
body.push(`${varName}_reverb.damping = ${damping}`);
|
|
18
|
+
body.push(`AudioServer.add_bus_effect(${bus}_idx, ${varName}_reverb)`);
|
|
19
|
+
effects.push("AudioEffectReverb");
|
|
20
|
+
} else if (traitName === "audio_occlusion") {
|
|
21
|
+
const attenuation = Math.min(1, Math.max(0, num(config.attenuation, 0.3)));
|
|
22
|
+
const cutoff = Math.round(2e3 - attenuation * 1500);
|
|
23
|
+
body.push(`var ${varName}_lowpass = AudioEffectLowPassFilter.new()`);
|
|
24
|
+
body.push(`${varName}_lowpass.cutoff_hz = ${cutoff}`);
|
|
25
|
+
body.push(`AudioServer.add_bus_effect(${bus}_idx, ${varName}_lowpass)`);
|
|
26
|
+
effects.push("AudioEffectLowPassFilter");
|
|
27
|
+
} else if (traitName === "audio_portal") {
|
|
28
|
+
const wet = Math.min(1, Math.max(0, num(config.wet, 0.5)));
|
|
29
|
+
body.push(`var ${varName}_portal = AudioEffectReverb.new()`);
|
|
30
|
+
body.push(`${varName}_portal.wet = ${wet}`);
|
|
31
|
+
body.push(`AudioServer.add_bus_effect(${bus}_idx, ${varName}_portal)`);
|
|
32
|
+
effects.push("AudioEffectReverb");
|
|
33
|
+
} else {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
const lines = [
|
|
37
|
+
`# @${traitName} \u2014 real Godot acoustic bus (E-G16)`,
|
|
38
|
+
`AudioServer.add_bus()`,
|
|
39
|
+
`var ${bus}_idx = AudioServer.bus_count - 1`,
|
|
40
|
+
`AudioServer.set_bus_name(${bus}_idx, "${bus}")`,
|
|
41
|
+
...body
|
|
42
|
+
];
|
|
43
|
+
return { lines, effects, busName: bus };
|
|
44
|
+
}
|
|
45
|
+
var num;
|
|
46
|
+
var init_godot_acoustic_bus = __esm({
|
|
47
|
+
"src/compiler/godot-acoustic-bus.ts"() {
|
|
48
|
+
num = (v, fallback) => typeof v === "number" && Number.isFinite(v) ? v : fallback;
|
|
49
|
+
}
|
|
50
|
+
});
|
|
5
51
|
|
|
6
52
|
// src/compiler/GodotCompiler.ts
|
|
7
53
|
var GodotCompiler_exports = {};
|
|
@@ -12,6 +58,7 @@ var GodotCompiler;
|
|
|
12
58
|
var init_GodotCompiler = __esm({
|
|
13
59
|
"src/compiler/GodotCompiler.ts"() {
|
|
14
60
|
init_CompilerBase();
|
|
61
|
+
init_godot_acoustic_bus();
|
|
15
62
|
init_DomainBlockCompilerMixin();
|
|
16
63
|
GodotCompiler = class extends CompilerBase {
|
|
17
64
|
constructor(options = {}) {
|
|
@@ -22,7 +69,8 @@ var init_GodotCompiler = __esm({
|
|
|
22
69
|
this.options = {
|
|
23
70
|
className: options.className || "GeneratedScene",
|
|
24
71
|
indent: options.indent || " ",
|
|
25
|
-
godotVersion: options.godotVersion || "4.3"
|
|
72
|
+
godotVersion: options.godotVersion || "4.3",
|
|
73
|
+
provenanceHash: options.provenanceHash ?? ""
|
|
26
74
|
};
|
|
27
75
|
}
|
|
28
76
|
getRequiredCapability() {
|
|
@@ -38,6 +86,9 @@ var init_GodotCompiler = __esm({
|
|
|
38
86
|
);
|
|
39
87
|
this.emit(`# Target: Godot ${this.options.godotVersion}`);
|
|
40
88
|
this.emit(`# Do not edit manually \u2014 regenerate from .holo source`);
|
|
89
|
+
if (this.options.provenanceHash) {
|
|
90
|
+
this.emit(`# Provenance Hash: ${this.options.provenanceHash}`);
|
|
91
|
+
}
|
|
41
92
|
this.emit("");
|
|
42
93
|
this.emit("extends Node3D");
|
|
43
94
|
this.emit(`class_name ${this.options.className}`);
|
|
@@ -379,7 +430,12 @@ var init_GodotCompiler = __esm({
|
|
|
379
430
|
} else if (tn === "reverb_zone") {
|
|
380
431
|
this.emit(`var ${varName}_reverb = AudioEffectReverb.new()`);
|
|
381
432
|
this.emit(`# @reverb_zone \u2014 add to AudioBus`);
|
|
382
|
-
} else if (tn === "
|
|
433
|
+
} else if (tn === "audio_material" || tn === "audio_occlusion" || tn === "audio_portal") {
|
|
434
|
+
const acoustic = compileAcousticTrait(tn, trait.config || {}, varName);
|
|
435
|
+
if (acoustic) {
|
|
436
|
+
for (const line of acoustic.lines) this.emit(line);
|
|
437
|
+
}
|
|
438
|
+
} else if (tn === "ambisonics" || tn === "hrtf" || tn === "head_tracked_audio") {
|
|
383
439
|
this.emit(`# @${tn} \u2014 spatial audio: ${JSON.stringify(trait.config || {})}`);
|
|
384
440
|
} else if (tn === "gaussian_splat" || tn === "nerf" || tn === "volumetric_video" || tn === "point_cloud" || tn === "photogrammetry") {
|
|
385
441
|
this.emit(`# @${tn} \u2014 volumetric renderer: ${JSON.stringify(trait.config || {})}`);
|
|
@@ -626,5 +682,5 @@ var init_GodotCompiler = __esm({
|
|
|
626
682
|
});
|
|
627
683
|
|
|
628
684
|
export { GodotCompiler, GodotCompiler_exports, init_GodotCompiler };
|
|
629
|
-
//# sourceMappingURL=chunk-
|
|
630
|
-
//# sourceMappingURL=chunk-
|
|
685
|
+
//# sourceMappingURL=chunk-LAOCQJ2M.js.map
|
|
686
|
+
//# sourceMappingURL=chunk-LAOCQJ2M.js.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/reconstruction/replayFingerprint.ts
|
|
4
|
+
function fnv1a32Hex(input) {
|
|
5
|
+
let hash = 2166136261;
|
|
6
|
+
for (let i = 0; i < input.length; i += 1) {
|
|
7
|
+
hash ^= input.charCodeAt(i);
|
|
8
|
+
hash = hash * 16777619 >>> 0;
|
|
9
|
+
}
|
|
10
|
+
const primary = hash.toString(16).padStart(8, "0");
|
|
11
|
+
let hash2 = 2166136261;
|
|
12
|
+
for (let i = input.length - 1; i >= 0; i -= 1) {
|
|
13
|
+
hash2 ^= input.charCodeAt(i);
|
|
14
|
+
hash2 = hash2 * 16777619 >>> 0;
|
|
15
|
+
}
|
|
16
|
+
const secondary = hash2.toString(16).padStart(8, "0");
|
|
17
|
+
return `${primary}${secondary}`;
|
|
18
|
+
}
|
|
19
|
+
function computeHoloMapReplayFingerprint(parts) {
|
|
20
|
+
const video = parts.videoHash ?? "no-video";
|
|
21
|
+
const base = `${parts.modelHash}|${parts.seed}|${parts.weightStrategy}|${video}`;
|
|
22
|
+
let payload = parts.weightCid ? `${base}|cid:${parts.weightCid}` : base;
|
|
23
|
+
const tileGrid = parts.tileGrid;
|
|
24
|
+
if (tileGrid !== void 0 && Number.isFinite(tileGrid) && Math.floor(tileGrid) !== 4) {
|
|
25
|
+
payload += `|grid:${Math.floor(tileGrid)}`;
|
|
26
|
+
}
|
|
27
|
+
const vert = parts.verticalProfile;
|
|
28
|
+
if (vert && vert !== "generalist") {
|
|
29
|
+
payload += `|vert:${vert}`;
|
|
30
|
+
}
|
|
31
|
+
return fnv1a32Hex(payload);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
exports.computeHoloMapReplayFingerprint = computeHoloMapReplayFingerprint;
|
|
35
|
+
exports.fnv1a32Hex = fnv1a32Hex;
|
|
36
|
+
//# sourceMappingURL=chunk-LM2VU56C.cjs.map
|
|
37
|
+
//# sourceMappingURL=chunk-LM2VU56C.cjs.map
|
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
// src/traits/SkeletonTrait.ts
|
|
2
|
+
var SkeletonTrait = class {
|
|
3
|
+
constructor(config = {}) {
|
|
4
|
+
this.bones = /* @__PURE__ */ new Map();
|
|
5
|
+
this.boneTransforms = /* @__PURE__ */ new Map();
|
|
6
|
+
this.clips = /* @__PURE__ */ new Map();
|
|
7
|
+
this.parameters = /* @__PURE__ */ new Map();
|
|
8
|
+
this.eventListeners = /* @__PURE__ */ new Map();
|
|
9
|
+
this.enabled = true;
|
|
10
|
+
this.config = {
|
|
11
|
+
rigType: config.rigType ?? "custom",
|
|
12
|
+
bones: config.bones,
|
|
13
|
+
humanoidMap: config.humanoidMap,
|
|
14
|
+
clips: config.clips,
|
|
15
|
+
blendTrees: config.blendTrees ?? /* @__PURE__ */ new Map(),
|
|
16
|
+
layers: config.layers ?? [{ name: "base", weight: 1, blendMode: "override" }],
|
|
17
|
+
parameters: config.parameters ?? /* @__PURE__ */ new Map(),
|
|
18
|
+
defaultClip: config.defaultClip,
|
|
19
|
+
speed: config.speed ?? 1,
|
|
20
|
+
rootMotion: config.rootMotion ?? false,
|
|
21
|
+
cullingMode: config.cullingMode ?? "always"
|
|
22
|
+
};
|
|
23
|
+
this.state = {
|
|
24
|
+
currentTime: 0,
|
|
25
|
+
normalizedTime: 0,
|
|
26
|
+
isPlaying: false,
|
|
27
|
+
layerWeights: this.config.layers?.map((l) => l.weight) ?? [1]
|
|
28
|
+
};
|
|
29
|
+
if (config.bones) {
|
|
30
|
+
for (const bone of config.bones) {
|
|
31
|
+
this.bones.set(bone.name, bone);
|
|
32
|
+
this.boneTransforms.set(bone.name, { ...bone.bindPose });
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
if (config.clips) {
|
|
36
|
+
for (const clip of config.clips) {
|
|
37
|
+
this.clips.set(clip.name, clip);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
if (config.parameters) {
|
|
41
|
+
this.parameters = new Map(config.parameters);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
// ============================================================================
|
|
45
|
+
// Configuration
|
|
46
|
+
// ============================================================================
|
|
47
|
+
/**
|
|
48
|
+
* Get configuration
|
|
49
|
+
*/
|
|
50
|
+
getConfig() {
|
|
51
|
+
return { ...this.config };
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Get animation state
|
|
55
|
+
*/
|
|
56
|
+
getState() {
|
|
57
|
+
return { ...this.state };
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Get bone count
|
|
61
|
+
*/
|
|
62
|
+
getBoneCount() {
|
|
63
|
+
return this.bones.size;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Get bone names
|
|
67
|
+
*/
|
|
68
|
+
getBoneNames() {
|
|
69
|
+
return Array.from(this.bones.keys());
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Get bone transform
|
|
73
|
+
*/
|
|
74
|
+
getBoneTransform(boneName) {
|
|
75
|
+
return this.boneTransforms.get(boneName);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Set bone transform (for IK or procedural animation)
|
|
79
|
+
*/
|
|
80
|
+
setBoneTransform(boneName, transform) {
|
|
81
|
+
const current = this.boneTransforms.get(boneName);
|
|
82
|
+
if (current) {
|
|
83
|
+
this.boneTransforms.set(boneName, {
|
|
84
|
+
position: transform.position ?? current.position,
|
|
85
|
+
rotation: transform.rotation ?? current.rotation,
|
|
86
|
+
scale: transform.scale ?? current.scale
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
// ============================================================================
|
|
91
|
+
// Animation Playback
|
|
92
|
+
// ============================================================================
|
|
93
|
+
/**
|
|
94
|
+
* Play animation clip
|
|
95
|
+
*/
|
|
96
|
+
play(clipName, options) {
|
|
97
|
+
const clip = this.clips.get(clipName);
|
|
98
|
+
if (!clip) {
|
|
99
|
+
console.warn(`Animation clip not found: ${clipName}`);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
const crossfade = options?.crossfade ?? 0;
|
|
103
|
+
if (crossfade > 0 && this.state.currentClip) {
|
|
104
|
+
this.state.crossfadeTarget = clipName;
|
|
105
|
+
this.state.crossfadeProgress = 0;
|
|
106
|
+
} else {
|
|
107
|
+
this.state.currentClip = clipName;
|
|
108
|
+
this.state.currentTime = 0;
|
|
109
|
+
this.state.normalizedTime = 0;
|
|
110
|
+
}
|
|
111
|
+
this.state.isPlaying = true;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Stop animation
|
|
115
|
+
*/
|
|
116
|
+
stop() {
|
|
117
|
+
this.state.isPlaying = false;
|
|
118
|
+
this.state.currentTime = 0;
|
|
119
|
+
this.state.normalizedTime = 0;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Pause animation
|
|
123
|
+
*/
|
|
124
|
+
pause() {
|
|
125
|
+
this.state.isPlaying = false;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Resume animation
|
|
129
|
+
*/
|
|
130
|
+
resume() {
|
|
131
|
+
this.state.isPlaying = true;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Is playing
|
|
135
|
+
*/
|
|
136
|
+
isPlaying() {
|
|
137
|
+
return this.state.isPlaying;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Get current clip name
|
|
141
|
+
*/
|
|
142
|
+
getCurrentClip() {
|
|
143
|
+
return this.state.currentClip;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Set playback speed
|
|
147
|
+
*/
|
|
148
|
+
setSpeed(speed) {
|
|
149
|
+
this.config.speed = speed;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Get playback speed
|
|
153
|
+
*/
|
|
154
|
+
getSpeed() {
|
|
155
|
+
return this.config.speed ?? 1;
|
|
156
|
+
}
|
|
157
|
+
// ============================================================================
|
|
158
|
+
// Parameters (for blend trees and state machines)
|
|
159
|
+
// ============================================================================
|
|
160
|
+
/**
|
|
161
|
+
* Set parameter
|
|
162
|
+
*/
|
|
163
|
+
setParameter(name, value) {
|
|
164
|
+
this.parameters.set(name, value);
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Get parameter
|
|
168
|
+
*/
|
|
169
|
+
getParameter(name) {
|
|
170
|
+
return this.parameters.get(name);
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Set float parameter
|
|
174
|
+
*/
|
|
175
|
+
setFloat(name, value) {
|
|
176
|
+
this.parameters.set(name, value);
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Set bool parameter
|
|
180
|
+
*/
|
|
181
|
+
setBool(name, value) {
|
|
182
|
+
this.parameters.set(name, value);
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Set trigger (auto-resets)
|
|
186
|
+
*/
|
|
187
|
+
setTrigger(name) {
|
|
188
|
+
this.parameters.set(name, true);
|
|
189
|
+
}
|
|
190
|
+
// ============================================================================
|
|
191
|
+
// Blend Trees
|
|
192
|
+
// ============================================================================
|
|
193
|
+
/**
|
|
194
|
+
* Add blend tree
|
|
195
|
+
*/
|
|
196
|
+
addBlendTree(name, tree) {
|
|
197
|
+
if (!this.config.blendTrees) {
|
|
198
|
+
this.config.blendTrees = /* @__PURE__ */ new Map();
|
|
199
|
+
}
|
|
200
|
+
this.config.blendTrees.set(name, tree);
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Activate blend tree
|
|
204
|
+
*/
|
|
205
|
+
activateBlendTree(name) {
|
|
206
|
+
if (this.config.blendTrees?.has(name)) {
|
|
207
|
+
this.state.activeBlendTree = name;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
// ============================================================================
|
|
211
|
+
// Layers
|
|
212
|
+
// ============================================================================
|
|
213
|
+
/**
|
|
214
|
+
* Set layer weight
|
|
215
|
+
*/
|
|
216
|
+
setLayerWeight(layerIndex, weight) {
|
|
217
|
+
if (this.state.layerWeights[layerIndex] !== void 0) {
|
|
218
|
+
this.state.layerWeights[layerIndex] = Math.max(0, Math.min(1, weight));
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Get layer weight
|
|
223
|
+
*/
|
|
224
|
+
getLayerWeight(layerIndex) {
|
|
225
|
+
return this.state.layerWeights[layerIndex] ?? 0;
|
|
226
|
+
}
|
|
227
|
+
// ============================================================================
|
|
228
|
+
// Clips
|
|
229
|
+
// ============================================================================
|
|
230
|
+
/**
|
|
231
|
+
* Add animation clip
|
|
232
|
+
*/
|
|
233
|
+
addClip(clip) {
|
|
234
|
+
this.clips.set(clip.name, clip);
|
|
235
|
+
if (!this.config.clips) {
|
|
236
|
+
this.config.clips = [];
|
|
237
|
+
}
|
|
238
|
+
this.config.clips.push(clip);
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Get clip
|
|
242
|
+
*/
|
|
243
|
+
getClip(name) {
|
|
244
|
+
return this.clips.get(name);
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Get clip duration
|
|
248
|
+
*/
|
|
249
|
+
getClipDuration(name) {
|
|
250
|
+
return this.clips.get(name)?.duration ?? 0;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Get all clip names
|
|
254
|
+
*/
|
|
255
|
+
getClipNames() {
|
|
256
|
+
return Array.from(this.clips.keys());
|
|
257
|
+
}
|
|
258
|
+
// ============================================================================
|
|
259
|
+
// Update (called each frame)
|
|
260
|
+
// ============================================================================
|
|
261
|
+
/**
|
|
262
|
+
* Update animation (called by animation system each frame)
|
|
263
|
+
*/
|
|
264
|
+
update(deltaTime) {
|
|
265
|
+
if (!this.enabled || !this.state.isPlaying) return;
|
|
266
|
+
const clip = this.state.currentClip ? this.clips.get(this.state.currentClip) : void 0;
|
|
267
|
+
if (!clip) return;
|
|
268
|
+
const speed = this.config.speed ?? 1;
|
|
269
|
+
this.state.currentTime += deltaTime * speed;
|
|
270
|
+
if (clip.loop) {
|
|
271
|
+
this.state.currentTime = this.state.currentTime % clip.duration;
|
|
272
|
+
} else if (this.state.currentTime >= clip.duration) {
|
|
273
|
+
this.state.currentTime = clip.duration;
|
|
274
|
+
this.state.isPlaying = false;
|
|
275
|
+
}
|
|
276
|
+
this.state.normalizedTime = clip.duration > 0 ? this.state.currentTime / clip.duration : 0;
|
|
277
|
+
if (clip.events) {
|
|
278
|
+
for (const event of clip.events) {
|
|
279
|
+
if (Math.abs(this.state.currentTime - event.time) < deltaTime) {
|
|
280
|
+
this.emitEvent(event);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
if (this.state.crossfadeTarget && this.state.crossfadeProgress !== void 0) {
|
|
285
|
+
this.state.crossfadeProgress += deltaTime;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
// ============================================================================
|
|
289
|
+
// Events
|
|
290
|
+
// ============================================================================
|
|
291
|
+
/**
|
|
292
|
+
* Add event listener
|
|
293
|
+
*/
|
|
294
|
+
on(event, callback) {
|
|
295
|
+
if (!this.eventListeners.has(event)) {
|
|
296
|
+
this.eventListeners.set(event, []);
|
|
297
|
+
}
|
|
298
|
+
this.eventListeners.get(event).push(callback);
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Remove event listener
|
|
302
|
+
*/
|
|
303
|
+
off(event, callback) {
|
|
304
|
+
const listeners = this.eventListeners.get(event);
|
|
305
|
+
if (listeners) {
|
|
306
|
+
const index = listeners.indexOf(callback);
|
|
307
|
+
if (index !== -1) {
|
|
308
|
+
listeners.splice(index, 1);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Emit animation event
|
|
314
|
+
*/
|
|
315
|
+
emitEvent(event) {
|
|
316
|
+
const listeners = this.eventListeners.get(event.name);
|
|
317
|
+
if (listeners) {
|
|
318
|
+
for (const callback of listeners) {
|
|
319
|
+
callback(event);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
// ============================================================================
|
|
324
|
+
// Enable/Disable
|
|
325
|
+
// ============================================================================
|
|
326
|
+
/**
|
|
327
|
+
* Enable/disable skeleton
|
|
328
|
+
*/
|
|
329
|
+
setEnabled(enabled) {
|
|
330
|
+
this.enabled = enabled;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Is enabled
|
|
334
|
+
*/
|
|
335
|
+
isEnabled() {
|
|
336
|
+
return this.enabled;
|
|
337
|
+
}
|
|
338
|
+
// ============================================================================
|
|
339
|
+
// Serialization
|
|
340
|
+
// ============================================================================
|
|
341
|
+
/**
|
|
342
|
+
* Serialize for animation system
|
|
343
|
+
*/
|
|
344
|
+
serialize() {
|
|
345
|
+
return {
|
|
346
|
+
rigType: this.config.rigType,
|
|
347
|
+
boneCount: this.bones.size,
|
|
348
|
+
clipCount: this.clips.size,
|
|
349
|
+
layerCount: this.config.layers?.length ?? 0,
|
|
350
|
+
currentClip: this.state.currentClip,
|
|
351
|
+
currentTime: this.state.currentTime,
|
|
352
|
+
normalizedTime: this.state.normalizedTime,
|
|
353
|
+
isPlaying: this.state.isPlaying,
|
|
354
|
+
speed: this.config.speed,
|
|
355
|
+
rootMotion: this.config.rootMotion,
|
|
356
|
+
enabled: this.enabled
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
};
|
|
360
|
+
function createSkeletonTrait(config = {}) {
|
|
361
|
+
return new SkeletonTrait(config);
|
|
362
|
+
}
|
|
363
|
+
var skeletonHandler = {
|
|
364
|
+
name: "skeleton",
|
|
365
|
+
defaultConfig: {},
|
|
366
|
+
onAttach(node, config, ctx) {
|
|
367
|
+
const instance = new SkeletonTrait(config);
|
|
368
|
+
node.__skeleton_instance = instance;
|
|
369
|
+
ctx.emit("skeleton_attached", { node, config });
|
|
370
|
+
},
|
|
371
|
+
onDetach(node, _config, ctx) {
|
|
372
|
+
const instance = node.__skeleton_instance;
|
|
373
|
+
if (instance) {
|
|
374
|
+
if (typeof instance.onDetach === "function") instance.onDetach(node, ctx);
|
|
375
|
+
else if (typeof instance.dispose === "function") instance.dispose();
|
|
376
|
+
else if (typeof instance.cleanup === "function") instance.cleanup();
|
|
377
|
+
}
|
|
378
|
+
ctx.emit("skeleton_detached", { node });
|
|
379
|
+
delete node.__skeleton_instance;
|
|
380
|
+
},
|
|
381
|
+
onEvent(node, _config, ctx, event) {
|
|
382
|
+
const instance = node.__skeleton_instance;
|
|
383
|
+
if (!instance) return;
|
|
384
|
+
if (typeof instance.onEvent === "function") instance.onEvent(event);
|
|
385
|
+
else if (typeof instance.emit === "function" && event.type) instance.emit(event);
|
|
386
|
+
if (event.type === "skeleton_configure" && event.payload) {
|
|
387
|
+
Object.assign(instance, event.payload);
|
|
388
|
+
ctx.emit("skeleton_configured", { node });
|
|
389
|
+
}
|
|
390
|
+
},
|
|
391
|
+
onUpdate(node, _config, ctx, dt) {
|
|
392
|
+
const instance = node.__skeleton_instance;
|
|
393
|
+
if (!instance) return;
|
|
394
|
+
if (typeof instance.onUpdate === "function") instance.onUpdate(node, ctx, dt);
|
|
395
|
+
}
|
|
396
|
+
};
|
|
397
|
+
|
|
398
|
+
export { SkeletonTrait, createSkeletonTrait, skeletonHandler };
|
|
399
|
+
//# sourceMappingURL=chunk-M56JSP4A.js.map
|
|
400
|
+
//# sourceMappingURL=chunk-M56JSP4A.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { HOLOMAP_SIMULATION_CONTRACT_KIND } from './chunk-YF2I3MV3.js';
|
|
2
|
+
|
|
3
|
+
// src/reconstruction/simulationContractBinding.ts
|
|
4
|
+
function assertHoloMapManifestContract(m) {
|
|
5
|
+
if (m.version !== "1.0.0") {
|
|
6
|
+
throw new Error(`HoloMap manifest version ${m.version} is not v1.0 contract`);
|
|
7
|
+
}
|
|
8
|
+
if (m.simulationContract.kind !== HOLOMAP_SIMULATION_CONTRACT_KIND) {
|
|
9
|
+
throw new Error(`Unexpected SimulationContract kind: ${m.simulationContract.kind}`);
|
|
10
|
+
}
|
|
11
|
+
if (!m.simulationContract.replayFingerprint || m.simulationContract.replayFingerprint.length < 8) {
|
|
12
|
+
throw new Error("HoloMap manifest missing replayFingerprint");
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { assertHoloMapManifestContract };
|
|
17
|
+
//# sourceMappingURL=chunk-MBOOR7X4.js.map
|
|
18
|
+
//# sourceMappingURL=chunk-MBOOR7X4.js.map
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
3
|
+
var chunkOIQYIIO3_cjs = require('./chunk-OIQYIIO3.cjs');
|
|
4
|
+
var chunkHGVXZDSK_cjs = require('./chunk-HGVXZDSK.cjs');
|
|
5
|
+
var chunkRMHC2VG7_cjs = require('./chunk-RMHC2VG7.cjs');
|
|
6
|
+
var chunkHCCQLAA4_cjs = require('./chunk-HCCQLAA4.cjs');
|
|
7
|
+
var ans = require('@holoscript/core-types/ans');
|
|
8
8
|
|
|
9
9
|
// src/compiler/PlayCanvasCompiler.ts
|
|
10
10
|
var PlayCanvasCompiler_exports = {};
|
|
11
|
-
|
|
11
|
+
chunkHCCQLAA4_cjs.__export(PlayCanvasCompiler_exports, {
|
|
12
12
|
PlayCanvasCompiler: () => exports.PlayCanvasCompiler
|
|
13
13
|
});
|
|
14
14
|
var SHAPE_TO_PRIMITIVE; exports.PlayCanvasCompiler = void 0;
|
|
15
|
-
var init_PlayCanvasCompiler =
|
|
15
|
+
var init_PlayCanvasCompiler = chunkHCCQLAA4_cjs.__esm({
|
|
16
16
|
"src/compiler/PlayCanvasCompiler.ts"() {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
chunkOIQYIIO3_cjs.init_TraitCompositor();
|
|
18
|
+
chunkRMHC2VG7_cjs.init_CompilerBase();
|
|
19
|
+
chunkHGVXZDSK_cjs.init_DomainBlockCompilerMixin();
|
|
20
20
|
SHAPE_TO_PRIMITIVE = {
|
|
21
21
|
sphere: "sphere",
|
|
22
22
|
orb: "sphere",
|
|
@@ -32,7 +32,7 @@ var init_PlayCanvasCompiler = chunk3SAK5KFL_cjs.__esm({
|
|
|
32
32
|
capsule: "capsule",
|
|
33
33
|
disc: "plane"
|
|
34
34
|
};
|
|
35
|
-
exports.PlayCanvasCompiler = class extends
|
|
35
|
+
exports.PlayCanvasCompiler = class extends chunkRMHC2VG7_cjs.CompilerBase {
|
|
36
36
|
constructor(options = {}) {
|
|
37
37
|
super();
|
|
38
38
|
this.compilerName = "PlayCanvasCompiler";
|
|
@@ -42,11 +42,12 @@ var init_PlayCanvasCompiler = chunk3SAK5KFL_cjs.__esm({
|
|
|
42
42
|
className: options.className || "GeneratedScene",
|
|
43
43
|
enablePhysics: options.enablePhysics ?? true,
|
|
44
44
|
enableXR: options.enableXR ?? false,
|
|
45
|
-
indent: options.indent || " "
|
|
45
|
+
indent: options.indent || " ",
|
|
46
|
+
provenanceHash: options.provenanceHash ?? ""
|
|
46
47
|
};
|
|
47
48
|
}
|
|
48
49
|
getRequiredCapability() {
|
|
49
|
-
return
|
|
50
|
+
return ans.ANSCapabilityPath.PLAYCANVAS;
|
|
50
51
|
}
|
|
51
52
|
compile(composition, agentToken, outputPath) {
|
|
52
53
|
this.validateCompilerAccess(agentToken, outputPath);
|
|
@@ -56,6 +57,9 @@ var init_PlayCanvasCompiler = chunk3SAK5KFL_cjs.__esm({
|
|
|
56
57
|
this.emit(
|
|
57
58
|
`// Source: composition "${this.escapeStringValue(composition.name, "TypeScript")}"`
|
|
58
59
|
);
|
|
60
|
+
if (this.options.provenanceHash) {
|
|
61
|
+
this.emit(`// Provenance Hash: ${this.options.provenanceHash}`);
|
|
62
|
+
}
|
|
59
63
|
this.emit("");
|
|
60
64
|
this.emitImports(composition);
|
|
61
65
|
this.emit("");
|
|
@@ -142,33 +146,33 @@ var init_PlayCanvasCompiler = chunk3SAK5KFL_cjs.__esm({
|
|
|
142
146
|
this.emit("");
|
|
143
147
|
this.emit("// === v4.2 Domain Blocks ===");
|
|
144
148
|
let blockIdx = 0;
|
|
145
|
-
const compiled =
|
|
149
|
+
const compiled = chunkHGVXZDSK_cjs.compileDomainBlocks(
|
|
146
150
|
// @ts-expect-error During migration
|
|
147
151
|
domainBlocks,
|
|
148
152
|
{
|
|
149
153
|
material: (block) => {
|
|
150
|
-
const mat =
|
|
151
|
-
return
|
|
154
|
+
const mat = chunkHGVXZDSK_cjs.compileMaterialBlock(block);
|
|
155
|
+
return chunkHGVXZDSK_cjs.materialToPlayCanvas(mat, `db${blockIdx++}`);
|
|
152
156
|
},
|
|
153
157
|
physics: (block) => {
|
|
154
|
-
const phys =
|
|
155
|
-
return
|
|
158
|
+
const phys = chunkHGVXZDSK_cjs.compilePhysicsBlock(block);
|
|
159
|
+
return chunkHGVXZDSK_cjs.physicsToPlayCanvas(phys, `db${blockIdx++}`);
|
|
156
160
|
},
|
|
157
161
|
vfx: (block) => {
|
|
158
|
-
const ps =
|
|
159
|
-
return
|
|
162
|
+
const ps = chunkHGVXZDSK_cjs.compileParticleBlock(block);
|
|
163
|
+
return chunkHGVXZDSK_cjs.particlesToPlayCanvas(ps, `db${blockIdx++}`);
|
|
160
164
|
},
|
|
161
165
|
postfx: (block) => {
|
|
162
|
-
const pp =
|
|
166
|
+
const pp = chunkHGVXZDSK_cjs.compilePostProcessingBlock(block);
|
|
163
167
|
return `// Post-Processing: ${pp.keyword} \u2014 configure via PlayCanvas PostEffects
|
|
164
168
|
` + pp.effects.map((e) => `// Effect: ${e.type} \u2014 ${JSON.stringify(e.properties)}`).join("\n");
|
|
165
169
|
},
|
|
166
170
|
audio: (block) => {
|
|
167
|
-
const audio =
|
|
168
|
-
return
|
|
171
|
+
const audio = chunkHGVXZDSK_cjs.compileAudioSourceBlock(block);
|
|
172
|
+
return chunkHGVXZDSK_cjs.audioSourceToPlayCanvas(audio, `db${blockIdx++}`);
|
|
169
173
|
},
|
|
170
174
|
weather: (block) => {
|
|
171
|
-
const weather =
|
|
175
|
+
const weather = chunkHGVXZDSK_cjs.compileWeatherBlock(block);
|
|
172
176
|
return `// Weather: ${weather.keyword} "${weather.name || ""}" \u2014 implement via PlayCanvas particle system
|
|
173
177
|
` + weather.layers.map((l) => `// Layer: ${l.type} \u2014 ${JSON.stringify(l.properties)}`).join("\n");
|
|
174
178
|
}
|
|
@@ -369,7 +373,7 @@ var init_PlayCanvasCompiler = chunk3SAK5KFL_cjs.__esm({
|
|
|
369
373
|
}
|
|
370
374
|
if (obj.traits && Array.isArray(obj.traits) && obj.traits.length > 0) {
|
|
371
375
|
const traitNames = obj.traits.map((t) => t.name);
|
|
372
|
-
const compositor = new
|
|
376
|
+
const compositor = new chunkOIQYIIO3_cjs.TraitCompositor();
|
|
373
377
|
const composed = compositor.compose(traitNames);
|
|
374
378
|
if (Object.keys(composed).length > 0) {
|
|
375
379
|
const matVar = `${v}ComposedMat`;
|
|
@@ -751,5 +755,5 @@ var init_PlayCanvasCompiler = chunk3SAK5KFL_cjs.__esm({
|
|
|
751
755
|
|
|
752
756
|
exports.PlayCanvasCompiler_exports = PlayCanvasCompiler_exports;
|
|
753
757
|
exports.init_PlayCanvasCompiler = init_PlayCanvasCompiler;
|
|
754
|
-
//# sourceMappingURL=chunk-
|
|
755
|
-
//# sourceMappingURL=chunk-
|
|
758
|
+
//# sourceMappingURL=chunk-MJVIRCUV.cjs.map
|
|
759
|
+
//# sourceMappingURL=chunk-MJVIRCUV.cjs.map
|