@holoscript/core 6.0.3 → 6.0.4
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 +38 -38
- package/dist/GLTFPipeline-DEN36VNK.js +12 -0
- package/dist/GLTFPipeline-YPCAK236.cjs +33 -0
- package/dist/{HoloScriptPlusParser-BZR5DELQ.js → HoloScriptPlusParser-BN6KVRCM.js} +5 -5
- package/dist/{HoloScriptPlusParser-SBMYDNXO.cjs → HoloScriptPlusParser-NC5FE6AL.cjs} +16 -16
- package/dist/{USDZExporter-YA55ZS35.js → USDZExporter-NTMBNTDB.js} +3 -3
- package/dist/{USDZExporter-MHEHXZB4.cjs → USDZExporter-UWGWNMMD.cjs} +3 -3
- package/dist/{chunk-32TWR3HE.js → chunk-2CWOLHTE.js} +3 -4
- package/dist/{chunk-2UX5LRAP.cjs → chunk-33LSUQDD.cjs} +33 -31
- package/dist/{chunk-LBPEZQAF.js → chunk-3FJCK5XA.js} +7 -7
- package/dist/{chunk-EGIZHYJP.cjs → chunk-3SAK5KFL.cjs} +2 -4
- package/dist/{chunk-PJMOXFPR.cjs → chunk-4XSNJCLC.cjs} +25 -27
- package/dist/{chunk-HKCVM6OK.cjs → chunk-5BGSECRJ.cjs} +21 -21
- package/dist/{chunk-EMO7HAKJ.cjs → chunk-5O6TQC6M.cjs} +26 -30
- package/dist/{chunk-XSUZMPVQ.cjs → chunk-5OEOHAAW.cjs} +26 -26
- package/dist/{chunk-EJA7G2C4.cjs → chunk-5WUNN6ZN.cjs} +2 -2
- package/dist/{chunk-CQDOF3G7.cjs → chunk-6TZPZCOJ.cjs} +18 -18
- package/dist/{chunk-NRUB55IT.cjs → chunk-6UEHYZ7V.cjs} +18 -16
- package/dist/{chunk-V42NTCFH.js → chunk-6XSERL6L.js} +4230 -2197
- package/dist/{chunk-X4YVN7H3.cjs → chunk-72EQECGT.cjs} +37 -17
- package/dist/{chunk-4KJ2R7VP.cjs → chunk-7AGYRWKW.cjs} +19 -19
- package/dist/{chunk-UQW6SLM5.js → chunk-A7PIMZGU.js} +110 -19
- package/dist/{chunk-RT7LJRSF.cjs → chunk-ATSKSYVE.cjs} +1013 -6708
- package/dist/{chunk-WN3YF33G.cjs → chunk-B5TCIAPQ.cjs} +9 -10
- package/dist/{chunk-AIUXRS74.cjs → chunk-BF2235SI.cjs} +4275 -2242
- package/dist/{chunk-DIEDKX5B.cjs → chunk-BND3ST2K.cjs} +18 -16
- package/dist/{chunk-EPWRXL6S.js → chunk-BU7VWW2K.js} +29 -29
- package/dist/{chunk-6OQBLABR.js → chunk-BWFJEM5A.js} +368 -189
- package/dist/{chunk-ARNKA274.cjs → chunk-CAUCGUEA.cjs} +6 -6
- package/dist/{chunk-YCMQQQ5U.cjs → chunk-CBJSLA2E.cjs} +398 -219
- package/dist/{chunk-BU5ZAFMC.js → chunk-CDPGV4DN.js} +6 -7
- package/dist/{chunk-CO2VM2DK.js → chunk-CS2EMTGF.js} +10 -9
- package/dist/{chunk-AW7WAELW.js → chunk-DMG7C4H2.js} +4 -4
- package/dist/{chunk-XSF76QRU.js → chunk-DXJQDCFL.js} +3 -3
- package/dist/{chunk-4FCZDTD5.js → chunk-E3FWRT3Z.js} +7 -9
- package/dist/{chunk-KYM4XRFG.js → chunk-E3UALNFA.js} +4 -4
- package/dist/{chunk-GC3YU46J.js → chunk-EONILVMF.js} +2 -2
- package/dist/{chunk-VJVCD5T5.cjs → chunk-EQV4R3EV.cjs} +22 -22
- package/dist/{chunk-FEFHPUEM.cjs → chunk-F3HH56EB.cjs} +74 -658
- package/dist/{chunk-WYH4GVZ5.js → chunk-F4IULT7N.js} +2 -2
- package/dist/{chunk-XDXZM3ZP.cjs → chunk-FFKU7BTK.cjs} +19 -19
- package/dist/{chunk-NKRKT6V2.js → chunk-FHQVYCH2.js} +11 -10
- package/dist/{chunk-7H5UNJZD.cjs → chunk-FSF7EQVA.cjs} +11 -10
- package/dist/{chunk-KUJRR4FJ.js → chunk-G4VZTCIB.js} +9 -7
- package/dist/{chunk-A6GO3DPZ.cjs → chunk-G7CT3EMP.cjs} +4 -4
- package/dist/{chunk-EUFLX2PI.js → chunk-GGHSW2NN.js} +989 -6611
- package/dist/chunk-GVUR45UF.cjs +777 -0
- package/dist/{chunk-ODGMVILH.js → chunk-H5Z7NASB.js} +3 -3
- package/dist/{chunk-7KPI4EKH.cjs → chunk-HE7ULERA.cjs} +45 -49
- package/dist/{chunk-26TLYBFD.js → chunk-HPS76H7Q.js} +3 -3
- package/dist/{chunk-RE3OKSYF.cjs → chunk-HQUEA5R6.cjs} +6 -6
- package/dist/{chunk-ZGTGVSTZ.js → chunk-HYNTS5CP.js} +2 -2
- package/dist/{chunk-PBA6NXCT.cjs → chunk-IBDG74G2.cjs} +6 -3
- package/dist/chunk-IFNQFCTM.js +3098 -0
- package/dist/{chunk-ZL6VJ6SN.js → chunk-IWI6J7FX.js} +5 -5
- package/dist/{chunk-3KEU5QYY.cjs → chunk-K3JDKWGI.cjs} +118 -23
- package/dist/{chunk-NLPSZT4C.js → chunk-K6EKD26I.js} +6 -6
- package/dist/chunk-KCQ5NDYC.cjs +3172 -0
- package/dist/{chunk-ELLQPFAF.js → chunk-KED34ILP.js} +11 -9
- package/dist/{chunk-BY3B7ZYV.cjs → chunk-KSGXLT74.cjs} +3 -3
- package/dist/{chunk-65RFOWZI.js → chunk-L4G4RLXX.js} +9 -7
- package/dist/{chunk-4SMUJFHL.js → chunk-LDP5OK6G.js} +6 -3
- package/dist/{chunk-VZNKJZTT.cjs → chunk-LGGRPKTV.cjs} +82 -96
- package/dist/{chunk-C2QHVHZF.js → chunk-LSW7P7ML.js} +23 -414
- package/dist/{chunk-HHS6FMOU.cjs → chunk-LXJ4667L.cjs} +83 -22
- package/dist/{chunk-H6WMMLQK.cjs → chunk-LZ266PCM.cjs} +20 -13
- package/dist/{chunk-V2ILLPHK.cjs → chunk-MD6KDHVE.cjs} +10 -10
- package/dist/{chunk-6WNCRE6F.js → chunk-MEASWI2Y.js} +5 -5
- package/dist/chunk-MPXBVFHQ.js +768 -0
- package/dist/{chunk-WUXIRGZP.cjs → chunk-NCUKG4SK.cjs} +304 -144
- package/dist/chunk-NDQNIJEH.js +1715 -0
- package/dist/{chunk-Y5MUAYTO.js → chunk-NOZZ46QU.js} +9 -8
- package/dist/{chunk-F5LVGHNT.js → chunk-OFKWH2IP.js} +3 -3
- package/dist/{chunk-SPDELRRV.cjs → chunk-PMGODDJA.cjs} +12 -12
- package/dist/{chunk-I3XGTIHM.cjs → chunk-Q4QX3AET.cjs} +2 -2
- package/dist/{chunk-Y7VK5TH3.cjs → chunk-Q5JT3YML.cjs} +10 -10
- package/dist/{chunk-TSWTWZ42.cjs → chunk-Q5SJOGHQ.cjs} +247 -205
- package/dist/{chunk-M6FU6S22.js → chunk-QGKNANZ3.js} +251 -91
- package/dist/{chunk-WFJIDI2N.cjs → chunk-QLEAOI3Q.cjs} +10 -10
- package/dist/{chunk-VK5AXKO3.js → chunk-R7MA7QWV.js} +70 -84
- package/dist/{chunk-W76ETJTI.js → chunk-RVYPEYPX.js} +6 -6
- package/dist/{chunk-MWEFR6YQ.js → chunk-S2N5TNMA.js} +7 -9
- package/dist/{chunk-NCUHGRTZ.js → chunk-S565K7NK.js} +7 -7
- package/dist/{chunk-AC4BSHFV.js → chunk-SDAMZIRE.js} +5 -5
- package/dist/{chunk-HBZYCASG.js → chunk-T36DDXSF.js} +75 -33
- package/dist/{chunk-BO2OKHIY.js → chunk-T4NKMBDL.js} +30 -611
- package/dist/{chunk-7X2IEJIE.cjs → chunk-T7LEXZUZ.cjs} +29 -29
- package/dist/{chunk-HUFNKFA6.js → chunk-TEWCN33Y.js} +8 -12
- package/dist/{chunk-L3Z2HIWJ.cjs → chunk-TQSZUOW5.cjs} +2 -2
- package/dist/chunk-TSH3MSQU.cjs +129 -0
- package/dist/{chunk-PLMYCCA4.js → chunk-UERJ3YJV.js} +6 -6
- package/dist/{chunk-7N3JIJMT.js → chunk-UPJBDCVF.js} +6 -6
- package/dist/{chunk-CMYAWUX3.js → chunk-V3NN3HPP.js} +12 -5
- package/dist/{chunk-SUCBB66F.js → chunk-WB4Z63GG.js} +3 -3
- package/dist/{chunk-PPULB4GG.cjs → chunk-WDW67DZB.cjs} +68 -68
- package/dist/chunk-WGMEAYBG.js +126 -0
- package/dist/{chunk-VSXOIUCF.cjs → chunk-X4ZF6CNE.cjs} +7 -7
- package/dist/{chunk-HF4OFY25.cjs → chunk-X6SEAXAX.cjs} +29 -445
- package/dist/{chunk-C7BNX4XJ.js → chunk-XCWFGZAA.js} +6 -6
- package/dist/{chunk-CNVM7J3M.js → chunk-XD6IYDUX.js} +34 -14
- package/dist/chunk-XG23EUQX.cjs +1717 -0
- package/dist/{chunk-DN7UFU63.cjs → chunk-XRKWN5PL.cjs} +12 -11
- package/dist/{chunk-XNMEH2BI.js → chunk-XUTX5CBW.js} +3 -3
- package/dist/{chunk-PQLGZKMC.cjs → chunk-XWPNTWDN.cjs} +26 -26
- package/dist/{chunk-NTMZSDXM.cjs → chunk-XXINBTZK.cjs} +43 -43
- package/dist/{chunk-74YCHHTE.js → chunk-YCXFCXDS.js} +8 -12
- package/dist/{chunk-KDB6BUMB.js → chunk-YQK5JNFK.js} +77 -18
- package/dist/{chunk-DH5G2JUA.cjs → chunk-Z34RLXRA.cjs} +44 -46
- package/dist/{chunk-XH7SE4HH.cjs → chunk-ZP4D3CSX.cjs} +19 -19
- package/dist/cli/holoscript-runner.cjs +33 -32
- package/dist/cli/holoscript-runner.js +13 -12
- 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 +7 -8
- package/dist/compiler/agent-inference.js +3 -4
- package/dist/compiler/android-xr.cjs +7 -8
- package/dist/compiler/android-xr.js +5 -6
- package/dist/compiler/android.cjs +8 -9
- package/dist/compiler/android.js +6 -7
- package/dist/compiler/ar.cjs +6 -7
- package/dist/compiler/ar.js +4 -5
- package/dist/compiler/babylon.cjs +8 -9
- package/dist/compiler/babylon.js +7 -8
- package/dist/compiler/coco.cjs +1 -1
- package/dist/compiler/coco.js +1 -1
- package/dist/compiler/domain-block-utils.cjs +158 -151
- package/dist/compiler/domain-block-utils.js +4 -5
- package/dist/compiler/dtdl.cjs +7 -8
- package/dist/compiler/dtdl.js +4 -5
- package/dist/compiler/gltf-pipeline.cjs +9 -9
- package/dist/compiler/gltf-pipeline.js +2 -2
- package/dist/compiler/godot.cjs +6 -7
- package/dist/compiler/godot.js +5 -6
- package/dist/compiler/incremental.cjs +7 -8
- package/dist/compiler/incremental.js +2 -3
- package/dist/compiler/index.cjs +1934 -878
- package/dist/compiler/index.js +1904 -842
- package/dist/compiler/ios.cjs +8 -9
- package/dist/compiler/ios.js +6 -7
- package/dist/compiler/multi-layer.cjs +10 -17
- package/dist/compiler/multi-layer.js +9 -10
- package/dist/compiler/nodetoy.cjs +1 -1
- package/dist/compiler/nodetoy.js +1 -1
- package/dist/compiler/openxr.cjs +6 -7
- package/dist/compiler/openxr.js +5 -6
- package/dist/compiler/playcanvas.cjs +7 -8
- package/dist/compiler/playcanvas.js +6 -7
- package/dist/compiler/r3f.cjs +13 -14
- package/dist/compiler/r3f.js +8 -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 +7 -8
- package/dist/compiler/sdf.js +5 -6
- package/dist/compiler/semantic-scene.cjs +7 -7
- package/dist/compiler/semantic-scene.js +2 -2
- package/dist/compiler/state.cjs +5 -6
- package/dist/compiler/state.js +3 -4
- package/dist/compiler/trait-composition.cjs +7 -8
- package/dist/compiler/trait-composition.js +3 -4
- package/dist/compiler/unity.cjs +6 -7
- package/dist/compiler/unity.js +5 -6
- package/dist/compiler/unreal.cjs +7 -8
- package/dist/compiler/unreal.js +5 -6
- package/dist/compiler/urdf.cjs +13 -14
- package/dist/compiler/urdf.js +5 -6
- package/dist/compiler/usd-physics.cjs +7 -8
- package/dist/compiler/usd-physics.js +4 -5
- package/dist/compiler/visionos.cjs +6 -7
- package/dist/compiler/visionos.js +5 -6
- package/dist/compiler/vrchat.cjs +7 -8
- package/dist/compiler/vrchat.js +5 -6
- package/dist/compiler/vrr.cjs +7 -8
- package/dist/compiler/vrr.js +5 -6
- package/dist/compiler/wasm.cjs +10 -11
- package/dist/compiler/wasm.js +5 -6
- package/dist/compiler/webgpu.cjs +6 -7
- package/dist/compiler/webgpu.js +5 -6
- package/dist/constants.d.ts +3 -0
- package/dist/debugger.cjs +7 -7
- package/dist/debugger.js +5 -5
- package/dist/entries/interop.cjs +1 -1
- package/dist/entries/interop.d.ts +9 -0
- package/dist/entries/interop.js +1 -1
- package/dist/entries/scripting.cjs +18 -17
- package/dist/entries/scripting.d.ts +7 -0
- package/dist/entries/scripting.js +8 -7
- package/dist/index.cjs +6773 -27555
- package/dist/index.d.ts +19 -0
- package/dist/index.js +5212 -26101
- package/dist/math/vec3.cjs +1 -1
- package/dist/math/vec3.js +1 -1
- package/dist/ml-dsa-PHCWUBPX.cjs +1178 -0
- package/dist/ml-dsa-WYLJHJO6.js +1178 -0
- package/dist/parser.cjs +11 -10
- package/dist/parser.js +8 -7
- package/dist/{playwright-BIZXMLD2.js → playwright-5OSAPTNH.js} +3 -3
- package/dist/{playwright-7DTEQCBD.cjs → playwright-RL6GY4F7.cjs} +1985 -1985
- package/dist/runtime.cjs +5 -5
- package/dist/runtime.js +4 -4
- package/dist/self-improvement/index.d.ts +0 -48
- package/dist/storage/index.cjs +1 -1
- package/dist/storage/index.d.ts +24 -0
- package/dist/storage/index.js +1 -1
- package/dist/tools/index.d.ts +12 -0
- package/dist/traits/index.cjs +925 -607
- package/dist/traits/index.js +137 -20
- package/dist/type-checker.cjs +4 -4
- package/dist/type-checker.js +2 -2
- package/package.json +56 -21
- package/LICENSE +0 -21
- package/dist/GLTFPipeline-3KLWWUQO.cjs +0 -34
- package/dist/GLTFPipeline-LYII2ZVQ.js +0 -13
- 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-LER4WXW5.cjs +0 -286
- package/dist/chunk-QHVVVN47.cjs +0 -2033
- package/dist/chunk-QWKUKVRE.js +0 -2026
- package/dist/chunk-UITWA6DV.cjs +0 -2829
- package/dist/chunk-X67XRI2T.js +0 -410
- package/dist/post-quantum-JTTAAGO3.cjs +0 -6
- package/dist/post-quantum-RVPVDEPI.js +0 -4
- package/dist/wot/index.cjs +0 -29
- package/dist/wot/index.js +0 -4
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkK3JDKWGI_cjs = require('./chunk-K3JDKWGI.cjs');
|
|
4
|
+
var platform = require('@holoscript/platform');
|
|
5
5
|
|
|
6
6
|
// src/compiler/TraitCompositionCompiler.ts
|
|
7
|
-
|
|
8
|
-
chunk3KEU5QYY_cjs.init_ProvenanceSemiring();
|
|
7
|
+
chunkK3JDKWGI_cjs.init_ProvenanceSemiring();
|
|
9
8
|
var CompositionConflictError = class extends Error {
|
|
10
9
|
constructor(traitA, traitB, conflictKey) {
|
|
11
10
|
super(
|
|
@@ -62,12 +61,12 @@ var TraitCompositionCompiler = class {
|
|
|
62
61
|
*/
|
|
63
62
|
validateAccess(agentToken) {
|
|
64
63
|
if (!agentToken) return;
|
|
65
|
-
const rbac =
|
|
64
|
+
const rbac = platform.getRBAC();
|
|
66
65
|
const decision = rbac.checkAccess({
|
|
67
66
|
token: agentToken,
|
|
68
|
-
resourceType:
|
|
67
|
+
resourceType: platform.ResourceType.AST,
|
|
69
68
|
operation: "read",
|
|
70
|
-
expectedWorkflowStep:
|
|
69
|
+
expectedWorkflowStep: platform.WorkflowStep.GENERATE_ASSEMBLY
|
|
71
70
|
});
|
|
72
71
|
if (!decision.allowed) {
|
|
73
72
|
throw new UnauthorizedTraitCompositionAccessError(decision, "TraitCompositionCompiler");
|
|
@@ -82,10 +81,12 @@ var TraitCompositionCompiler = class {
|
|
|
82
81
|
if (!handler) throw new MissingComponentError(decl.name, name);
|
|
83
82
|
return { name, handler };
|
|
84
83
|
});
|
|
85
|
-
if (
|
|
84
|
+
if (chunkK3JDKWGI_cjs.authorityWeight(
|
|
85
|
+
decl.provenance?.context?.authorityLevel ?? 0
|
|
86
|
+
) < 100) {
|
|
86
87
|
this.detectConflicts(handlers);
|
|
87
88
|
}
|
|
88
|
-
const semiring = new
|
|
89
|
+
const semiring = new chunkK3JDKWGI_cjs.ProvenanceSemiring();
|
|
89
90
|
const applications = [];
|
|
90
91
|
for (const { name, handler } of handlers) {
|
|
91
92
|
let configAccumulator = {};
|
|
@@ -168,5 +169,5 @@ exports.CompositionConflictError = CompositionConflictError;
|
|
|
168
169
|
exports.MissingComponentError = MissingComponentError;
|
|
169
170
|
exports.TraitCompositionCompiler = TraitCompositionCompiler;
|
|
170
171
|
exports.UnauthorizedTraitCompositionAccessError = UnauthorizedTraitCompositionAccessError;
|
|
171
|
-
//# sourceMappingURL=chunk-
|
|
172
|
-
//# sourceMappingURL=chunk-
|
|
172
|
+
//# sourceMappingURL=chunk-XRKWN5PL.cjs.map
|
|
173
|
+
//# sourceMappingURL=chunk-XRKWN5PL.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __esm } from './chunk-
|
|
1
|
+
import { __esm } from './chunk-2CWOLHTE.js';
|
|
2
2
|
|
|
3
3
|
// src/traits/constants/mobile/npu-scene.ts
|
|
4
4
|
var NPU_SCENE_TRAITS, NPU_SCENE_DEFAULTS;
|
|
@@ -122,5 +122,5 @@ var init_portal_ar = __esm({
|
|
|
122
122
|
});
|
|
123
123
|
|
|
124
124
|
export { CAMERA_HAND_TRACKING_TRAITS, NPU_SCENE_DEFAULTS, NPU_SCENE_TRAITS, PORTAL_AR_TRAITS, init_camera_hand_tracking, init_npu_scene, init_portal_ar };
|
|
125
|
-
//# sourceMappingURL=chunk-
|
|
126
|
-
//# sourceMappingURL=chunk-
|
|
125
|
+
//# sourceMappingURL=chunk-XUTX5CBW.js.map
|
|
126
|
+
//# sourceMappingURL=chunk-XUTX5CBW.js.map
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
3
|
+
var chunkX4ZF6CNE_cjs = require('./chunk-X4ZF6CNE.cjs');
|
|
4
|
+
var chunkLXJ4667L_cjs = require('./chunk-LXJ4667L.cjs');
|
|
5
|
+
var chunkBF2235SI_cjs = require('./chunk-BF2235SI.cjs');
|
|
6
|
+
var chunk3SAK5KFL_cjs = require('./chunk-3SAK5KFL.cjs');
|
|
7
|
+
var platform = require('@holoscript/platform');
|
|
7
8
|
|
|
8
9
|
// src/compiler/PlayCanvasCompiler.ts
|
|
9
10
|
var PlayCanvasCompiler_exports = {};
|
|
10
|
-
|
|
11
|
+
chunk3SAK5KFL_cjs.__export(PlayCanvasCompiler_exports, {
|
|
11
12
|
PlayCanvasCompiler: () => exports.PlayCanvasCompiler
|
|
12
13
|
});
|
|
13
14
|
var SHAPE_TO_PRIMITIVE; exports.PlayCanvasCompiler = void 0;
|
|
14
|
-
var init_PlayCanvasCompiler =
|
|
15
|
+
var init_PlayCanvasCompiler = chunk3SAK5KFL_cjs.__esm({
|
|
15
16
|
"src/compiler/PlayCanvasCompiler.ts"() {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
chunkHHS6FMOU_cjs.init_DomainBlockCompilerMixin();
|
|
17
|
+
chunkX4ZF6CNE_cjs.init_TraitCompositor();
|
|
18
|
+
chunkBF2235SI_cjs.init_CompilerBase();
|
|
19
|
+
chunkLXJ4667L_cjs.init_DomainBlockCompilerMixin();
|
|
20
20
|
SHAPE_TO_PRIMITIVE = {
|
|
21
21
|
sphere: "sphere",
|
|
22
22
|
orb: "sphere",
|
|
@@ -32,7 +32,7 @@ var init_PlayCanvasCompiler = chunkEGIZHYJP_cjs.__esm({
|
|
|
32
32
|
capsule: "capsule",
|
|
33
33
|
disc: "plane"
|
|
34
34
|
};
|
|
35
|
-
exports.PlayCanvasCompiler = class extends
|
|
35
|
+
exports.PlayCanvasCompiler = class extends chunkBF2235SI_cjs.CompilerBase {
|
|
36
36
|
constructor(options = {}) {
|
|
37
37
|
super();
|
|
38
38
|
this.compilerName = "PlayCanvasCompiler";
|
|
@@ -46,7 +46,7 @@ var init_PlayCanvasCompiler = chunkEGIZHYJP_cjs.__esm({
|
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
getRequiredCapability() {
|
|
49
|
-
return
|
|
49
|
+
return platform.ANSCapabilityPath.PLAYCANVAS;
|
|
50
50
|
}
|
|
51
51
|
compile(composition, agentToken, outputPath) {
|
|
52
52
|
this.validateCompilerAccess(agentToken, outputPath);
|
|
@@ -142,33 +142,33 @@ var init_PlayCanvasCompiler = chunkEGIZHYJP_cjs.__esm({
|
|
|
142
142
|
this.emit("");
|
|
143
143
|
this.emit("// === v4.2 Domain Blocks ===");
|
|
144
144
|
let blockIdx = 0;
|
|
145
|
-
const compiled =
|
|
145
|
+
const compiled = chunkLXJ4667L_cjs.compileDomainBlocks(
|
|
146
146
|
// @ts-expect-error During migration
|
|
147
147
|
domainBlocks,
|
|
148
148
|
{
|
|
149
149
|
material: (block) => {
|
|
150
|
-
const mat =
|
|
151
|
-
return
|
|
150
|
+
const mat = chunkLXJ4667L_cjs.compileMaterialBlock(block);
|
|
151
|
+
return chunkLXJ4667L_cjs.materialToPlayCanvas(mat, `db${blockIdx++}`);
|
|
152
152
|
},
|
|
153
153
|
physics: (block) => {
|
|
154
|
-
const phys =
|
|
155
|
-
return
|
|
154
|
+
const phys = chunkLXJ4667L_cjs.compilePhysicsBlock(block);
|
|
155
|
+
return chunkLXJ4667L_cjs.physicsToPlayCanvas(phys, `db${blockIdx++}`);
|
|
156
156
|
},
|
|
157
157
|
vfx: (block) => {
|
|
158
|
-
const ps =
|
|
159
|
-
return
|
|
158
|
+
const ps = chunkLXJ4667L_cjs.compileParticleBlock(block);
|
|
159
|
+
return chunkLXJ4667L_cjs.particlesToPlayCanvas(ps, `db${blockIdx++}`);
|
|
160
160
|
},
|
|
161
161
|
postfx: (block) => {
|
|
162
|
-
const pp =
|
|
162
|
+
const pp = chunkLXJ4667L_cjs.compilePostProcessingBlock(block);
|
|
163
163
|
return `// Post-Processing: ${pp.keyword} \u2014 configure via PlayCanvas PostEffects
|
|
164
164
|
` + pp.effects.map((e) => `// Effect: ${e.type} \u2014 ${JSON.stringify(e.properties)}`).join("\n");
|
|
165
165
|
},
|
|
166
166
|
audio: (block) => {
|
|
167
|
-
const audio =
|
|
168
|
-
return
|
|
167
|
+
const audio = chunkLXJ4667L_cjs.compileAudioSourceBlock(block);
|
|
168
|
+
return chunkLXJ4667L_cjs.audioSourceToPlayCanvas(audio, `db${blockIdx++}`);
|
|
169
169
|
},
|
|
170
170
|
weather: (block) => {
|
|
171
|
-
const weather =
|
|
171
|
+
const weather = chunkLXJ4667L_cjs.compileWeatherBlock(block);
|
|
172
172
|
return `// Weather: ${weather.keyword} "${weather.name || ""}" \u2014 implement via PlayCanvas particle system
|
|
173
173
|
` + weather.layers.map((l) => `// Layer: ${l.type} \u2014 ${JSON.stringify(l.properties)}`).join("\n");
|
|
174
174
|
}
|
|
@@ -369,7 +369,7 @@ var init_PlayCanvasCompiler = chunkEGIZHYJP_cjs.__esm({
|
|
|
369
369
|
}
|
|
370
370
|
if (obj.traits && Array.isArray(obj.traits) && obj.traits.length > 0) {
|
|
371
371
|
const traitNames = obj.traits.map((t) => t.name);
|
|
372
|
-
const compositor = new
|
|
372
|
+
const compositor = new chunkX4ZF6CNE_cjs.TraitCompositor();
|
|
373
373
|
const composed = compositor.compose(traitNames);
|
|
374
374
|
if (Object.keys(composed).length > 0) {
|
|
375
375
|
const matVar = `${v}ComposedMat`;
|
|
@@ -751,5 +751,5 @@ var init_PlayCanvasCompiler = chunkEGIZHYJP_cjs.__esm({
|
|
|
751
751
|
|
|
752
752
|
exports.PlayCanvasCompiler_exports = PlayCanvasCompiler_exports;
|
|
753
753
|
exports.init_PlayCanvasCompiler = init_PlayCanvasCompiler;
|
|
754
|
-
//# sourceMappingURL=chunk-
|
|
755
|
-
//# sourceMappingURL=chunk-
|
|
754
|
+
//# sourceMappingURL=chunk-XWPNTWDN.cjs.map
|
|
755
|
+
//# sourceMappingURL=chunk-XWPNTWDN.cjs.map
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunkLXJ4667L_cjs = require('./chunk-LXJ4667L.cjs');
|
|
4
|
+
var chunkBF2235SI_cjs = require('./chunk-BF2235SI.cjs');
|
|
5
|
+
var chunk3SAK5KFL_cjs = require('./chunk-3SAK5KFL.cjs');
|
|
6
|
+
var platform = require('@holoscript/platform');
|
|
6
7
|
|
|
7
8
|
// src/compiler/GodotCompiler.ts
|
|
8
9
|
var GodotCompiler_exports = {};
|
|
9
|
-
|
|
10
|
+
chunk3SAK5KFL_cjs.__export(GodotCompiler_exports, {
|
|
10
11
|
GodotCompiler: () => exports.GodotCompiler
|
|
11
12
|
});
|
|
12
13
|
exports.GodotCompiler = void 0;
|
|
13
|
-
var init_GodotCompiler =
|
|
14
|
+
var init_GodotCompiler = chunk3SAK5KFL_cjs.__esm({
|
|
14
15
|
"src/compiler/GodotCompiler.ts"() {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
exports.GodotCompiler = class extends chunkQHVVVN47_cjs.CompilerBase {
|
|
16
|
+
chunkBF2235SI_cjs.init_CompilerBase();
|
|
17
|
+
chunkLXJ4667L_cjs.init_DomainBlockCompilerMixin();
|
|
18
|
+
exports.GodotCompiler = class extends chunkBF2235SI_cjs.CompilerBase {
|
|
19
19
|
constructor(options = {}) {
|
|
20
20
|
super();
|
|
21
21
|
this.compilerName = "GodotCompiler";
|
|
@@ -28,7 +28,7 @@ var init_GodotCompiler = chunkEGIZHYJP_cjs.__esm({
|
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
getRequiredCapability() {
|
|
31
|
-
return
|
|
31
|
+
return platform.ANSCapabilityPath.GODOT;
|
|
32
32
|
}
|
|
33
33
|
compile(composition, agentToken, outputPath) {
|
|
34
34
|
this.validateCompilerAccess(agentToken, outputPath);
|
|
@@ -119,59 +119,59 @@ var init_GodotCompiler = chunkEGIZHYJP_cjs.__esm({
|
|
|
119
119
|
this.emit("");
|
|
120
120
|
this.emit("# === v4.2 Domain Blocks ===");
|
|
121
121
|
let blockIdx = 0;
|
|
122
|
-
const compiled =
|
|
122
|
+
const compiled = chunkLXJ4667L_cjs.compileDomainBlocks(
|
|
123
123
|
domainBlocks,
|
|
124
124
|
{
|
|
125
125
|
material: (block) => {
|
|
126
|
-
const mat =
|
|
127
|
-
return
|
|
126
|
+
const mat = chunkLXJ4667L_cjs.compileMaterialBlock(block);
|
|
127
|
+
return chunkLXJ4667L_cjs.materialToGodot(mat, `db${blockIdx++}`);
|
|
128
128
|
},
|
|
129
129
|
physics: (block) => {
|
|
130
|
-
const phys =
|
|
131
|
-
return
|
|
130
|
+
const phys = chunkLXJ4667L_cjs.compilePhysicsBlock(block);
|
|
131
|
+
return chunkLXJ4667L_cjs.physicsToGodot(phys, `db${blockIdx++}`);
|
|
132
132
|
},
|
|
133
133
|
vfx: (block) => {
|
|
134
|
-
const ps =
|
|
135
|
-
return
|
|
134
|
+
const ps = chunkLXJ4667L_cjs.compileParticleBlock(block);
|
|
135
|
+
return chunkLXJ4667L_cjs.particlesToGodot(ps, `db${blockIdx++}`);
|
|
136
136
|
},
|
|
137
137
|
postfx: (block) => {
|
|
138
|
-
const pp =
|
|
139
|
-
return
|
|
138
|
+
const pp = chunkLXJ4667L_cjs.compilePostProcessingBlock(block);
|
|
139
|
+
return chunkLXJ4667L_cjs.postProcessingToGodot(pp);
|
|
140
140
|
},
|
|
141
141
|
audio: (block) => {
|
|
142
|
-
const audio =
|
|
143
|
-
return
|
|
142
|
+
const audio = chunkLXJ4667L_cjs.compileAudioSourceBlock(block);
|
|
143
|
+
return chunkLXJ4667L_cjs.audioSourceToGodot(audio, `db${blockIdx++}`);
|
|
144
144
|
},
|
|
145
145
|
weather: (block) => {
|
|
146
|
-
const weather =
|
|
147
|
-
return
|
|
146
|
+
const weather = chunkLXJ4667L_cjs.compileWeatherBlock(block);
|
|
147
|
+
return chunkLXJ4667L_cjs.weatherToGodot(weather);
|
|
148
148
|
},
|
|
149
149
|
narrative: (block) => {
|
|
150
|
-
const narr =
|
|
151
|
-
return
|
|
150
|
+
const narr = chunkLXJ4667L_cjs.compileNarrativeBlock(block);
|
|
151
|
+
return chunkLXJ4667L_cjs.narrativeToGodot(narr);
|
|
152
152
|
},
|
|
153
153
|
payment: (block) => {
|
|
154
|
-
const pay =
|
|
155
|
-
return
|
|
154
|
+
const pay = chunkLXJ4667L_cjs.compilePaymentBlock(block);
|
|
155
|
+
return chunkLXJ4667L_cjs.paymentToGodot(pay);
|
|
156
156
|
},
|
|
157
157
|
healthcare: (block) => {
|
|
158
|
-
const h =
|
|
159
|
-
return
|
|
158
|
+
const h = chunkLXJ4667L_cjs.compileHealthcareBlock(block);
|
|
159
|
+
return chunkLXJ4667L_cjs.healthcareToGodot(h);
|
|
160
160
|
},
|
|
161
161
|
robotics: (block) => {
|
|
162
|
-
const r =
|
|
163
|
-
return
|
|
162
|
+
const r = chunkLXJ4667L_cjs.compileRoboticsBlock(block);
|
|
163
|
+
return chunkLXJ4667L_cjs.roboticsToGodot(r);
|
|
164
164
|
},
|
|
165
|
-
iot: (block) =>
|
|
166
|
-
dataviz: (block) =>
|
|
167
|
-
education: (block) =>
|
|
168
|
-
music: (block) =>
|
|
169
|
-
architecture: (block) =>
|
|
170
|
-
web3: (block) =>
|
|
171
|
-
procedural: (block) =>
|
|
172
|
-
rendering: (block) =>
|
|
173
|
-
navigation: (block) =>
|
|
174
|
-
input: (block) =>
|
|
165
|
+
iot: (block) => chunkLXJ4667L_cjs.iotToGodot(chunkLXJ4667L_cjs.compileIoTBlock(block)),
|
|
166
|
+
dataviz: (block) => chunkLXJ4667L_cjs.datavizToGodot(chunkLXJ4667L_cjs.compileDataVizBlock(block)),
|
|
167
|
+
education: (block) => chunkLXJ4667L_cjs.educationToGodot(chunkLXJ4667L_cjs.compileEducationBlock(block)),
|
|
168
|
+
music: (block) => chunkLXJ4667L_cjs.musicToGodot(chunkLXJ4667L_cjs.compileMusicBlock(block)),
|
|
169
|
+
architecture: (block) => chunkLXJ4667L_cjs.architectureToGodot(chunkLXJ4667L_cjs.compileArchitectureBlock(block)),
|
|
170
|
+
web3: (block) => chunkLXJ4667L_cjs.web3ToGodot(chunkLXJ4667L_cjs.compileWeb3Block(block)),
|
|
171
|
+
procedural: (block) => chunkLXJ4667L_cjs.proceduralToGodot(chunkLXJ4667L_cjs.compileProceduralBlock(block)),
|
|
172
|
+
rendering: (block) => chunkLXJ4667L_cjs.renderingToGodot(chunkLXJ4667L_cjs.compileRenderingBlock(block)),
|
|
173
|
+
navigation: (block) => chunkLXJ4667L_cjs.navigationToGodot(chunkLXJ4667L_cjs.compileNavigationBlock(block)),
|
|
174
|
+
input: (block) => chunkLXJ4667L_cjs.inputToGodot(chunkLXJ4667L_cjs.compileInputBlock(block))
|
|
175
175
|
},
|
|
176
176
|
(block) => `# Domain block: ${block.domain}/${block.keyword} "${this.escapeStringValue(block.name, "GDScript")}"`
|
|
177
177
|
);
|
|
@@ -629,5 +629,5 @@ var init_GodotCompiler = chunkEGIZHYJP_cjs.__esm({
|
|
|
629
629
|
|
|
630
630
|
exports.GodotCompiler_exports = GodotCompiler_exports;
|
|
631
631
|
exports.init_GodotCompiler = init_GodotCompiler;
|
|
632
|
-
//# sourceMappingURL=chunk-
|
|
633
|
-
//# sourceMappingURL=chunk-
|
|
632
|
+
//# sourceMappingURL=chunk-XXINBTZK.cjs.map
|
|
633
|
+
//# sourceMappingURL=chunk-XXINBTZK.cjs.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { init_DomainBlockCompilerMixin, compileDomainBlocks, compileWeatherBlock, compileAudioSourceBlock, audioSourceToVisionOS, compilePostProcessingBlock, compileParticleBlock, particlesToVisionOS, compilePhysicsBlock, physicsToVisionOS, compileMaterialBlock, materialToVisionOS } from './chunk-
|
|
2
|
-
import { init_CompilerBase,
|
|
3
|
-
import { __esm, __export } from './chunk-
|
|
1
|
+
import { init_DomainBlockCompilerMixin, compileDomainBlocks, compileWeatherBlock, compileAudioSourceBlock, audioSourceToVisionOS, compilePostProcessingBlock, compileParticleBlock, particlesToVisionOS, compilePhysicsBlock, physicsToVisionOS, compileMaterialBlock, materialToVisionOS } from './chunk-YQK5JNFK.js';
|
|
2
|
+
import { init_CompilerBase, CompilerBase } from './chunk-6XSERL6L.js';
|
|
3
|
+
import { __esm, __export } from './chunk-2CWOLHTE.js';
|
|
4
|
+
import { ANSCapabilityPath } from '@holoscript/platform';
|
|
4
5
|
|
|
5
6
|
// src/compiler/VisionOSTraitMap.ts
|
|
6
7
|
function getTraitMapping(traitName) {
|
|
@@ -1152,7 +1153,6 @@ var init_VisionOSCompiler = __esm({
|
|
|
1152
1153
|
"src/compiler/VisionOSCompiler.ts"() {
|
|
1153
1154
|
init_VisionOSTraitMap();
|
|
1154
1155
|
init_CompilerBase();
|
|
1155
|
-
init_ANSNamespace();
|
|
1156
1156
|
init_DomainBlockCompilerMixin();
|
|
1157
1157
|
VisionOSCompiler = class extends CompilerBase {
|
|
1158
1158
|
constructor(options = {}) {
|
|
@@ -1364,9 +1364,7 @@ ${layers}`;
|
|
|
1364
1364
|
const rkType = typeMap[light.lightType];
|
|
1365
1365
|
if (rkType) {
|
|
1366
1366
|
this.emit(`let ${varName} = Entity()`);
|
|
1367
|
-
this.emit(
|
|
1368
|
-
`${varName}.name = "${this.escapeStringValue(light.name, "Swift")}"`
|
|
1369
|
-
);
|
|
1367
|
+
this.emit(`${varName}.name = "${this.escapeStringValue(light.name, "Swift")}"`);
|
|
1370
1368
|
const colorProp = light.properties.find((p) => p.key === "color");
|
|
1371
1369
|
const intensityProp = light.properties.find((p) => p.key === "intensity");
|
|
1372
1370
|
const posProp = light.properties.find((p) => p.key === "position");
|
|
@@ -1693,9 +1691,7 @@ ${layers}`;
|
|
|
1693
1691
|
this.emit(`// VStack {`);
|
|
1694
1692
|
if (obj.children) {
|
|
1695
1693
|
for (const child of obj.children) {
|
|
1696
|
-
this.emit(
|
|
1697
|
-
`// // Child: ${this.escapeStringValue(child.name, "Swift")}`
|
|
1698
|
-
);
|
|
1694
|
+
this.emit(`// // Child: ${this.escapeStringValue(child.name, "Swift")}`);
|
|
1699
1695
|
}
|
|
1700
1696
|
}
|
|
1701
1697
|
this.emit(`// }`);
|
|
@@ -1868,5 +1864,5 @@ ${layers}`;
|
|
|
1868
1864
|
});
|
|
1869
1865
|
|
|
1870
1866
|
export { VisionOSCompiler, VisionOSCompiler_exports, init_VisionOSCompiler };
|
|
1871
|
-
//# sourceMappingURL=chunk-
|
|
1872
|
-
//# sourceMappingURL=chunk-
|
|
1867
|
+
//# sourceMappingURL=chunk-YCXFCXDS.js.map
|
|
1868
|
+
//# sourceMappingURL=chunk-YCXFCXDS.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_CompilerBase, init_ANSNamespace, ANSCapabilityPath, escapeStringValue } from './chunk-
|
|
2
|
-
import { __esm } from './chunk-
|
|
1
|
+
import { init_CompilerBase, init_ANSNamespace, ANSCapabilityPath, escapeStringValue } from './chunk-6XSERL6L.js';
|
|
2
|
+
import { __esm } from './chunk-2CWOLHTE.js';
|
|
3
3
|
|
|
4
4
|
// src/compiler/DomainBlockCompilerMixin.ts
|
|
5
5
|
function esc(value, target) {
|
|
@@ -2151,7 +2151,9 @@ function paymentToR3F(paywall) {
|
|
|
2151
2151
|
lines.push(` description: "${paywall.description}",`);
|
|
2152
2152
|
}
|
|
2153
2153
|
if (paywall.gatedContent && paywall.gatedContent.length > 0) {
|
|
2154
|
-
lines.push(
|
|
2154
|
+
lines.push(
|
|
2155
|
+
` gatedContent: [${paywall.gatedContent.map((g) => `"${esc(g, "TypeScript")}"`).join(", ")}],`
|
|
2156
|
+
);
|
|
2155
2157
|
}
|
|
2156
2158
|
if (paywall.revenueSplit) {
|
|
2157
2159
|
lines.push(
|
|
@@ -2254,13 +2256,17 @@ function healthcareToR3F(healthcare) {
|
|
|
2254
2256
|
);
|
|
2255
2257
|
}
|
|
2256
2258
|
if (healthcare.vitalSigns) {
|
|
2257
|
-
lines.push(
|
|
2259
|
+
lines.push(
|
|
2260
|
+
` vitalSigns: [${healthcare.vitalSigns.map((v) => `"${esc(v, "TypeScript")}"`).join(", ")}],`
|
|
2261
|
+
);
|
|
2258
2262
|
}
|
|
2259
2263
|
if (healthcare.alertThresholds) {
|
|
2260
2264
|
lines.push(` alertThresholds: ${JSON.stringify(healthcare.alertThresholds)},`);
|
|
2261
2265
|
}
|
|
2262
2266
|
if (healthcare.procedureSteps) {
|
|
2263
|
-
lines.push(
|
|
2267
|
+
lines.push(
|
|
2268
|
+
` steps: [${healthcare.procedureSteps.map((s) => `"${esc(s, "TypeScript")}"`).join(", ")}],`
|
|
2269
|
+
);
|
|
2264
2270
|
}
|
|
2265
2271
|
lines.push("};");
|
|
2266
2272
|
return lines.join("\n");
|
|
@@ -2618,7 +2624,9 @@ function iotToR3F(iot) {
|
|
|
2618
2624
|
if (iot.deviceType) lines.push(` deviceType: "${iot.deviceType}",`);
|
|
2619
2625
|
if (iot.protocol) lines.push(` protocol: "${esc(iot.protocol, "TypeScript")}",`);
|
|
2620
2626
|
if (iot.telemetryFields)
|
|
2621
|
-
lines.push(
|
|
2627
|
+
lines.push(
|
|
2628
|
+
` telemetryFields: [${iot.telemetryFields.map((f) => `"${esc(f, "TypeScript")}"`).join(", ")}],`
|
|
2629
|
+
);
|
|
2622
2630
|
if (iot.updateInterval) lines.push(` updateInterval: ${iot.updateInterval},`);
|
|
2623
2631
|
if (iot.twinModel) lines.push(` twinModel: "${esc(iot.twinModel, "TypeScript")}",`);
|
|
2624
2632
|
lines.push("};");
|
|
@@ -2654,7 +2662,8 @@ function iotToGodot(iot) {
|
|
|
2654
2662
|
lines.push(
|
|
2655
2663
|
`@export var telemetry_fields: PackedStringArray = [${iot.telemetryFields.map((f) => `"${esc(f, "GDScript")}"`).join(", ")}]`
|
|
2656
2664
|
);
|
|
2657
|
-
if (iot.twinModel)
|
|
2665
|
+
if (iot.twinModel)
|
|
2666
|
+
lines.push(`@export var twin_model: String = "${esc(iot.twinModel, "GDScript")}"`);
|
|
2658
2667
|
lines.push("");
|
|
2659
2668
|
lines.push("signal telemetry_received(field: String, value: float)");
|
|
2660
2669
|
lines.push("signal connection_changed(connected: bool)");
|
|
@@ -2834,11 +2843,15 @@ function educationToR3F(edu) {
|
|
|
2834
2843
|
lines.push(` type: "${edu.keyword}",`);
|
|
2835
2844
|
if (edu.difficulty) lines.push(` difficulty: "${esc(edu.difficulty, "TypeScript")}",`);
|
|
2836
2845
|
if (edu.objectives)
|
|
2837
|
-
lines.push(
|
|
2846
|
+
lines.push(
|
|
2847
|
+
` objectives: [${edu.objectives.map((o) => `"${esc(o, "TypeScript")}"`).join(", ")}],`
|
|
2848
|
+
);
|
|
2838
2849
|
if (edu.duration) lines.push(` duration: ${edu.duration},`);
|
|
2839
2850
|
if (edu.questions) lines.push(` questions: ${JSON.stringify(edu.questions)},`);
|
|
2840
2851
|
if (edu.prerequisites)
|
|
2841
|
-
lines.push(
|
|
2852
|
+
lines.push(
|
|
2853
|
+
` prerequisites: [${edu.prerequisites.map((p) => `"${esc(p, "TypeScript")}"`).join(", ")}],`
|
|
2854
|
+
);
|
|
2842
2855
|
lines.push("};");
|
|
2843
2856
|
return lines.join("\n");
|
|
2844
2857
|
}
|
|
@@ -2848,7 +2861,8 @@ function educationToUnity(edu) {
|
|
|
2848
2861
|
lines.push(`// Education: ${edu.name}`);
|
|
2849
2862
|
lines.push(`public class ${safeName}Education : MonoBehaviour {`);
|
|
2850
2863
|
lines.push(` public string contentType = "${esc(edu.keyword, "CSharp")}";`);
|
|
2851
|
-
if (edu.difficulty)
|
|
2864
|
+
if (edu.difficulty)
|
|
2865
|
+
lines.push(` public string difficulty = "${esc(edu.difficulty, "CSharp")}";`);
|
|
2852
2866
|
if (edu.duration) lines.push(` public int durationMinutes = ${edu.duration};`);
|
|
2853
2867
|
if (edu.objectives)
|
|
2854
2868
|
lines.push(
|
|
@@ -2864,7 +2878,8 @@ function educationToGodot(edu) {
|
|
|
2864
2878
|
lines.push("extends Node");
|
|
2865
2879
|
lines.push("");
|
|
2866
2880
|
lines.push(`@export var content_type: String = "${esc(edu.keyword, "GDScript")}"`);
|
|
2867
|
-
if (edu.difficulty)
|
|
2881
|
+
if (edu.difficulty)
|
|
2882
|
+
lines.push(`@export var difficulty: String = "${esc(edu.difficulty, "GDScript")}"`);
|
|
2868
2883
|
if (edu.duration) lines.push(`@export var duration_minutes: int = ${edu.duration}`);
|
|
2869
2884
|
if (edu.objectives)
|
|
2870
2885
|
lines.push(
|
|
@@ -2937,7 +2952,8 @@ function musicToR3F(music) {
|
|
|
2937
2952
|
if (music.bpm) lines.push(` bpm: ${music.bpm},`);
|
|
2938
2953
|
if (music.timeSignature) lines.push(` timeSignature: [${music.timeSignature.join(", ")}],`);
|
|
2939
2954
|
if (music.key) lines.push(` key: "${esc(music.key, "TypeScript")}",`);
|
|
2940
|
-
if (music.effects)
|
|
2955
|
+
if (music.effects)
|
|
2956
|
+
lines.push(` effects: [${music.effects.map((e) => `"${esc(e, "TypeScript")}"`).join(", ")}],`);
|
|
2941
2957
|
if (music.pattern) lines.push(` pattern: "${esc(music.pattern, "TypeScript")}",`);
|
|
2942
2958
|
if (music.bars) lines.push(` bars: ${music.bars},`);
|
|
2943
2959
|
lines.push("};");
|
|
@@ -3128,9 +3144,12 @@ function web3ToR3F(web3) {
|
|
|
3128
3144
|
lines.push(` type: "${web3.keyword}",`);
|
|
3129
3145
|
if (web3.standard) lines.push(` standard: "${web3.standard}",`);
|
|
3130
3146
|
if (web3.network) lines.push(` network: "${web3.network}",`);
|
|
3131
|
-
if (web3.contractAddress)
|
|
3147
|
+
if (web3.contractAddress)
|
|
3148
|
+
lines.push(` contractAddress: "${esc(web3.contractAddress, "TypeScript")}",`);
|
|
3132
3149
|
if (web3.functions)
|
|
3133
|
-
lines.push(
|
|
3150
|
+
lines.push(
|
|
3151
|
+
` functions: [${web3.functions.map((f) => `"${esc(f, "TypeScript")}"`).join(", ")}],`
|
|
3152
|
+
);
|
|
3134
3153
|
if (web3.supply) lines.push(` supply: ${web3.supply},`);
|
|
3135
3154
|
if (web3.votingThreshold) lines.push(` votingThreshold: ${web3.votingThreshold},`);
|
|
3136
3155
|
lines.push("};");
|
|
@@ -3625,6 +3644,46 @@ function inputToUSDA(input) {
|
|
|
3625
3644
|
lines.push("}");
|
|
3626
3645
|
return lines.join("\n");
|
|
3627
3646
|
}
|
|
3647
|
+
function compileSimulationBlock(block) {
|
|
3648
|
+
const traits = block.traits || [];
|
|
3649
|
+
let simulationType = "unknown";
|
|
3650
|
+
if (traits.includes("thermal_simulation")) simulationType = "thermal";
|
|
3651
|
+
else if (traits.includes("structural_fem")) simulationType = "structural";
|
|
3652
|
+
else if (traits.includes("hydraulic_pipe")) simulationType = "hydraulic";
|
|
3653
|
+
const overlays = [];
|
|
3654
|
+
for (const child of block.children || []) {
|
|
3655
|
+
const c = child;
|
|
3656
|
+
if (c.traits?.includes("scalar_field_overlay") || c.keyword === "scalar_field_overlay") {
|
|
3657
|
+
const p = c.properties || {};
|
|
3658
|
+
overlays.push({
|
|
3659
|
+
source: p.source ?? "",
|
|
3660
|
+
colormap: p.colormap ?? "turbo",
|
|
3661
|
+
range: p.range ?? [0, 1],
|
|
3662
|
+
opacity: p.opacity ?? 0.7,
|
|
3663
|
+
visible: p.visible ?? true,
|
|
3664
|
+
label: p.label ?? ""
|
|
3665
|
+
});
|
|
3666
|
+
}
|
|
3667
|
+
}
|
|
3668
|
+
return {
|
|
3669
|
+
keyword: block.keyword,
|
|
3670
|
+
name: block.name,
|
|
3671
|
+
simulationType,
|
|
3672
|
+
traits,
|
|
3673
|
+
config: block.properties || {},
|
|
3674
|
+
overlays
|
|
3675
|
+
};
|
|
3676
|
+
}
|
|
3677
|
+
function simulationToR3F(sim) {
|
|
3678
|
+
const configJSON = JSON.stringify(sim.config).replace(/"/g, "'").replace(/'/g, '"');
|
|
3679
|
+
const overlayJSX = sim.overlays.map(
|
|
3680
|
+
(o) => `<ScalarFieldOverlay colormap="${o.colormap}" range={[${o.range.join(", ")}]} opacity={${o.opacity}} visible={${o.visible}} label="${o.label}" />`
|
|
3681
|
+
).join("\n ");
|
|
3682
|
+
return `{/* Simulation: ${sim.name} (${sim.simulationType}) */}
|
|
3683
|
+
<SimulationProvider type="${sim.simulationType}" config={${configJSON}}>
|
|
3684
|
+
${overlayJSX}
|
|
3685
|
+
</SimulationProvider>`;
|
|
3686
|
+
}
|
|
3628
3687
|
function compileDomainBlocks(blocks, handlers, fallback) {
|
|
3629
3688
|
return blocks.map((block) => {
|
|
3630
3689
|
const handler = handlers[block.domain];
|
|
@@ -3657,10 +3716,10 @@ var init_DomainBlockCompilerMixin = __esm({
|
|
|
3657
3716
|
"src/compiler/DomainBlockCompilerMixin.ts"() {
|
|
3658
3717
|
init_CompilerBase();
|
|
3659
3718
|
init_ANSNamespace();
|
|
3660
|
-
DOMAIN_BLOCK_COMPILER_MIXIN_CAPABILITY =
|
|
3719
|
+
DOMAIN_BLOCK_COMPILER_MIXIN_CAPABILITY = "/compile/mixin/domain-block";
|
|
3661
3720
|
}
|
|
3662
3721
|
});
|
|
3663
3722
|
|
|
3664
|
-
export { DOMAIN_BLOCK_COMPILER_MIXIN_CAPABILITY, architectureToGodot, architectureToR3F, architectureToUSDA, architectureToUnity, architectureToVRChat, audioSourceToAndroidXR, audioSourceToBabylon, audioSourceToGodot, audioSourceToPlayCanvas, audioSourceToR3F, audioSourceToUSD, audioSourceToUnity, audioSourceToUnreal, audioSourceToVisionOS, compileArchitectureBlock, compileAudioSourceBlock, compileDataVizBlock, compileDomainBlocks, compileEducationBlock, compileHealthcareBlock, compileInputBlock, compileIoTBlock, compileMaterialBlock, compileMusicBlock, compileNarrativeBlock, compileNavigationBlock, compileParticleBlock, compilePaymentBlock, compilePhysicsBlock, compilePostProcessingBlock, compileProceduralBlock, compileRenderingBlock, compileRoboticsBlock, compileWeatherBlock, compileWeb3Block, datavizToGodot, datavizToR3F, datavizToUSDA, datavizToUnity, datavizToVRChat, educationToGodot, educationToR3F, educationToUSDA, educationToUnity, educationToVRChat, getRequiredCapability, healthcareToGodot, healthcareToR3F, healthcareToUSDA, healthcareToUnity, healthcareToVRChat, init_DomainBlockCompilerMixin, inputToGodot, inputToR3F, inputToUSDA, inputToUnity, inputToVRChat, iotToGodot, iotToR3F, iotToUSDA, iotToUnity, iotToVRChat, materialToAndroidXR, materialToBabylon, materialToGLTF, materialToGodot, materialToPlayCanvas, materialToR3F, materialToSDF, materialToUSD, materialToUnity, materialToUnreal, materialToVRChat, materialToVisionOS, materialToWebGPU, musicToGodot, musicToR3F, musicToUSDA, musicToUnity, musicToVRChat, narrativeToGodot, narrativeToR3F, narrativeToUSDA, narrativeToUnity, narrativeToVRChat, navigationToGodot, navigationToR3F, navigationToUSDA, navigationToUnity, navigationToVRChat, particlesToAndroidXR, particlesToBabylon, particlesToGodot, particlesToPlayCanvas, particlesToR3F, particlesToUSD, particlesToUnity, particlesToUnreal, particlesToVisionOS, paymentToGodot, paymentToR3F, paymentToUSDA, paymentToUnity, paymentToVRChat, physicsToAndroidXR, physicsToBabylon, physicsToGodot, physicsToPlayCanvas, physicsToR3F, physicsToSDF, physicsToURDF, physicsToUnity, physicsToUnreal, physicsToVisionOS, postProcessingToBabylon, postProcessingToGodot, postProcessingToR3F, postProcessingToUSD, postProcessingToUnity, postProcessingToUnreal, proceduralToGodot, proceduralToR3F, proceduralToUSDA, proceduralToUnity, proceduralToVRChat, renderingToGodot, renderingToR3F, renderingToUSDA, renderingToUnity, renderingToVRChat, roboticsToGodot, roboticsToR3F, roboticsToUSDA, roboticsToUnity, roboticsToVRChat, weatherToAndroidXR, weatherToGodot, weatherToR3F, weatherToUSD, weatherToUnity, weatherToUnreal, web3ToGodot, web3ToR3F, web3ToUSDA, web3ToUnity, web3ToVRChat };
|
|
3665
|
-
//# sourceMappingURL=chunk-
|
|
3666
|
-
//# sourceMappingURL=chunk-
|
|
3723
|
+
export { DOMAIN_BLOCK_COMPILER_MIXIN_CAPABILITY, architectureToGodot, architectureToR3F, architectureToUSDA, architectureToUnity, architectureToVRChat, audioSourceToAndroidXR, audioSourceToBabylon, audioSourceToGodot, audioSourceToPlayCanvas, audioSourceToR3F, audioSourceToUSD, audioSourceToUnity, audioSourceToUnreal, audioSourceToVisionOS, compileArchitectureBlock, compileAudioSourceBlock, compileDataVizBlock, compileDomainBlocks, compileEducationBlock, compileHealthcareBlock, compileInputBlock, compileIoTBlock, compileMaterialBlock, compileMusicBlock, compileNarrativeBlock, compileNavigationBlock, compileParticleBlock, compilePaymentBlock, compilePhysicsBlock, compilePostProcessingBlock, compileProceduralBlock, compileRenderingBlock, compileRoboticsBlock, compileSimulationBlock, compileWeatherBlock, compileWeb3Block, datavizToGodot, datavizToR3F, datavizToUSDA, datavizToUnity, datavizToVRChat, educationToGodot, educationToR3F, educationToUSDA, educationToUnity, educationToVRChat, getRequiredCapability, healthcareToGodot, healthcareToR3F, healthcareToUSDA, healthcareToUnity, healthcareToVRChat, init_DomainBlockCompilerMixin, inputToGodot, inputToR3F, inputToUSDA, inputToUnity, inputToVRChat, iotToGodot, iotToR3F, iotToUSDA, iotToUnity, iotToVRChat, materialToAndroidXR, materialToBabylon, materialToGLTF, materialToGodot, materialToPlayCanvas, materialToR3F, materialToSDF, materialToUSD, materialToUnity, materialToUnreal, materialToVRChat, materialToVisionOS, materialToWebGPU, musicToGodot, musicToR3F, musicToUSDA, musicToUnity, musicToVRChat, narrativeToGodot, narrativeToR3F, narrativeToUSDA, narrativeToUnity, narrativeToVRChat, navigationToGodot, navigationToR3F, navigationToUSDA, navigationToUnity, navigationToVRChat, particlesToAndroidXR, particlesToBabylon, particlesToGodot, particlesToPlayCanvas, particlesToR3F, particlesToUSD, particlesToUnity, particlesToUnreal, particlesToVisionOS, paymentToGodot, paymentToR3F, paymentToUSDA, paymentToUnity, paymentToVRChat, physicsToAndroidXR, physicsToBabylon, physicsToGodot, physicsToPlayCanvas, physicsToR3F, physicsToSDF, physicsToURDF, physicsToUnity, physicsToUnreal, physicsToVisionOS, postProcessingToBabylon, postProcessingToGodot, postProcessingToR3F, postProcessingToUSD, postProcessingToUnity, postProcessingToUnreal, proceduralToGodot, proceduralToR3F, proceduralToUSDA, proceduralToUnity, proceduralToVRChat, renderingToGodot, renderingToR3F, renderingToUSDA, renderingToUnity, renderingToVRChat, roboticsToGodot, roboticsToR3F, roboticsToUSDA, roboticsToUnity, roboticsToVRChat, simulationToR3F, weatherToAndroidXR, weatherToGodot, weatherToR3F, weatherToUSD, weatherToUnity, weatherToUnreal, web3ToGodot, web3ToR3F, web3ToUSDA, web3ToUnity, web3ToVRChat };
|
|
3724
|
+
//# sourceMappingURL=chunk-YQK5JNFK.js.map
|
|
3725
|
+
//# sourceMappingURL=chunk-YQK5JNFK.js.map
|