@holoscript/core 8.0.6 → 8.0.8
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 +34 -34
- package/bin/holoscript.cjs +1 -1
- package/dist/GLTFPipeline-3EJLL3TS.cjs +38 -0
- package/dist/GLTFPipeline-3OWJV2VK.js +17 -0
- package/dist/{HoloScriptPlusParser-A2W7OCN2.cjs → HoloScriptPlusParser-ADWRY5OS.cjs} +15 -15
- package/dist/{HoloScriptPlusParser-7FBIFUFC.js → HoloScriptPlusParser-JLJDXHSC.js} +4 -4
- package/dist/HoloScriptPlusParser-QCGFPWIL.cjs +27 -0
- package/dist/{HoloScriptPlusParser-F2Z56FJR.js → HoloScriptPlusParser-WENAFEFV.js} +5 -5
- package/dist/HoloScriptRuntime-GGRVEU4T.cjs +19 -0
- package/dist/HoloScriptRuntime-GJK6VJPH.js +10 -0
- package/dist/{USDZExporter-3FWJ25JI.cjs → USDZExporter-AUHZODOF.cjs} +15 -4
- package/dist/{USDZExporter-D2HQLQYK.js → USDZExporter-GXB4AUSG.js} +15 -4
- package/dist/{chunk-2GQHTXOK.js → chunk-22Q5A6RV.js} +3 -3
- package/dist/{chunk-XHZCF3AS.cjs → chunk-2BZHWUSR.cjs} +27 -15
- package/dist/{chunk-XJAN7CZG.cjs → chunk-2GCNOI2U.cjs} +2 -2
- package/dist/{chunk-DBPGNHFS.js → chunk-2OWDB4FB.js} +13 -25
- package/dist/{chunk-N75IH2HY.js → chunk-2Y3V22SG.js} +5 -14
- package/dist/{chunk-MXFUTKCO.js → chunk-33YHE7HX.js} +3 -7
- package/dist/{chunk-RCZHLCX2.js → chunk-3GWWJT7L.js} +4 -4
- package/dist/{chunk-EK7L4DW7.js → chunk-3NGDZZR4.js} +4 -4
- package/dist/{chunk-WRLUBRKS.cjs → chunk-3SKLAUDD.cjs} +2 -2
- package/dist/{chunk-KKFZ3B6J.cjs → chunk-3VBO3IYQ.cjs} +2 -2
- package/dist/{chunk-YF2I3MV3.js → chunk-47RUFYKR.js} +2 -2
- package/dist/{chunk-VHAONJBY.js → chunk-4JGRWHZJ.js} +7 -5
- package/dist/{chunk-2J5WZLF5.cjs → chunk-4W5G5QVL.cjs} +26 -26
- package/dist/{chunk-GQHQOPXZ.cjs → chunk-4YNYPHH3.cjs} +186 -17
- package/dist/{chunk-H5PUZHJV.cjs → chunk-56VOWURB.cjs} +61 -40
- package/dist/{chunk-DQRQZB33.cjs → chunk-5A4TCHOC.cjs} +3 -3
- package/dist/{chunk-M56JSP4A.js → chunk-5EDVCNRT.js} +2 -2
- package/dist/{chunk-YU5RJQPE.js → chunk-5ET6L4NS.js} +3 -3
- package/dist/{chunk-A3GFOZAF.cjs → chunk-63ZGNR2T.cjs} +43 -39
- package/dist/{chunk-NG77ATEW.cjs → chunk-6PRZIHGL.cjs} +6 -6
- package/dist/{chunk-OXGPGQXN.cjs → chunk-7DMMMBCY.cjs} +7 -7
- package/dist/{chunk-FHP6LXJS.js → chunk-7E7GCQCK.js} +2 -2
- package/dist/{chunk-P4AIF7OQ.js → chunk-7VMGP2FW.js} +44 -28
- package/dist/{chunk-7MVLEZB2.js → chunk-7X5PNIQJ.js} +3 -3
- package/dist/{chunk-X7QB5PL5.cjs → chunk-7ZHYEITD.cjs} +11 -11
- package/dist/{chunk-KPJL34Y7.cjs → chunk-ACVWFGBI.cjs} +2 -2
- package/dist/{chunk-QWSB553J.cjs → chunk-AWB7QYY6.cjs} +6 -6
- package/dist/{chunk-VATGR4EM.js → chunk-B4EKV6HQ.js} +61 -40
- package/dist/{chunk-HBEN5TQR.js → chunk-BRNUPDHJ.js} +5 -5
- package/dist/{chunk-F63LYRVE.js → chunk-BTKZGHAV.js} +23 -11
- package/dist/{chunk-YTR32ZEB.cjs → chunk-C4GSLCHE.cjs} +300 -125
- package/dist/{chunk-CXS3DUKD.js → chunk-C7ZBSV2Q.js} +3 -3
- package/dist/{chunk-WOH6LKYT.cjs → chunk-CCPSNT6B.cjs} +12 -7
- package/dist/{chunk-NW5G5FBQ.js → chunk-DD2JQ7TS.js} +4 -3
- package/dist/{chunk-JD7CIZ33.js → chunk-DUCB6LGL.js} +8 -10
- package/dist/{chunk-D63CGNJU.js → chunk-DY72BMU5.js} +3 -3
- package/dist/{chunk-AIA52I7T.cjs → chunk-EBS32AJI.cjs} +6 -4
- package/dist/{chunk-DCE3LDO3.cjs → chunk-EDPYCLRC.cjs} +52 -62
- package/dist/{chunk-NDUX553L.js → chunk-F2G6CWFT.js} +240 -65
- package/dist/{chunk-X7LYK5TX.cjs → chunk-F5LKJ6F5.cjs} +43 -31
- package/dist/{chunk-LAUFLPB6.js → chunk-FGMDMJM7.js} +10 -5
- package/dist/{chunk-P52PPB5R.js → chunk-FHQFPYV4.js} +4 -4
- package/dist/{chunk-YIMN575O.js → chunk-FNHJRI32.js} +8 -5
- package/dist/{chunk-EXUP2BUM.cjs → chunk-FT6TDR2O.cjs} +27 -27
- package/dist/{chunk-BRQJKJGT.cjs → chunk-FWVYAMNW.cjs} +4 -4
- package/dist/{chunk-PGANYCAG.cjs → chunk-G25QVBA5.cjs} +4 -3
- package/dist/{chunk-5BLWXOIP.cjs → chunk-G6PNEASF.cjs} +13 -13
- package/dist/{chunk-2BSMSUCE.js → chunk-GASCWJK5.js} +2 -2
- package/dist/{chunk-2VL6SJ33.cjs → chunk-GH6C2QGW.cjs} +12 -21
- package/dist/{chunk-JEB5UU3E.js → chunk-GSOUNWEL.js} +35 -27
- package/dist/{chunk-QPOQ7VPI.js → chunk-GTA4Q3A3.js} +2 -2
- package/dist/{chunk-JIYN45TV.cjs → chunk-GVFJ6T4S.cjs} +3 -7
- package/dist/{chunk-IVY74O6C.js → chunk-GVOKJNUN.js} +50 -11
- package/dist/{chunk-GZG4KA4E.js → chunk-GW3LKD5C.js} +6 -4
- package/dist/{chunk-IBXT6UP3.cjs → chunk-HFSVMKM3.cjs} +14 -14
- package/dist/{chunk-E767PVC6.cjs → chunk-HLFDZ35S.cjs} +5 -5
- package/dist/{chunk-ZXZ2AL2J.cjs → chunk-I76GIKN7.cjs} +20 -16
- package/dist/{chunk-4FDL7JLJ.cjs → chunk-KAIVDEIG.cjs} +145 -60
- package/dist/{chunk-X4EBCG4K.js → chunk-KCPHASCO.js} +18 -6
- package/dist/{chunk-T5J7ZKP3.cjs → chunk-KOUAQL2B.cjs} +16 -13
- package/dist/{chunk-GMP623FG.cjs → chunk-KQU64CIX.cjs} +2 -2
- package/dist/{chunk-4DO425P5.js → chunk-L5U4W6JC.js} +4 -4
- package/dist/{chunk-HBLKLLG5.cjs → chunk-LMJ5EBV7.cjs} +10 -10
- package/dist/{chunk-QWAR3GY6.cjs → chunk-LODTHGST.cjs} +8 -8
- package/dist/{chunk-TFUMBR7G.cjs → chunk-LPS5AMQD.cjs} +8 -8
- package/dist/{chunk-ISG3TQ2O.js → chunk-LWUOUCYL.js} +9 -5
- package/dist/{chunk-6CTRH7HT.cjs → chunk-LYJJI7ZK.cjs} +12 -14
- package/dist/{chunk-GTU2Z2WW.cjs → chunk-M7K4LE66.cjs} +5 -14
- package/dist/{chunk-URG2SJLK.js → chunk-MDR235RZ.js} +3 -7
- package/dist/{chunk-ULXWSPCK.js → chunk-MSYSQ2AJ.js} +101 -16
- package/dist/{chunk-TCBJMNXS.cjs → chunk-NGBXXZLL.cjs} +50 -62
- package/dist/{chunk-RXU4PQKA.js → chunk-NHJLP37F.js} +6 -6
- package/dist/{chunk-NTGBEMYL.cjs → chunk-NHYRRAGI.cjs} +5 -5
- package/dist/{chunk-YG3OAHJZ.cjs → chunk-O3MGZDCT.cjs} +89 -52
- package/dist/{chunk-GIOYPNTH.js → chunk-OABEO6HH.js} +185 -16
- package/dist/{chunk-N5YOAFNA.cjs → chunk-OS533P33.cjs} +37 -29
- package/dist/{chunk-IIUFMUTV.js → chunk-PABONWKI.js} +24 -11
- package/dist/{chunk-5BQIJG3O.js → chunk-PXNZ6TME.js} +47 -57
- package/dist/{chunk-KDZRD6EI.js → chunk-Q2Q34NF3.js} +63 -26
- package/dist/{chunk-IS4AEGLU.js → chunk-QBWNJXNR.js} +10 -6
- package/dist/{chunk-5IHG2LGT.js → chunk-QFU53KRH.js} +4 -4
- package/dist/{chunk-NTJZJ5IP.cjs → chunk-QGMUTVVH.cjs} +17 -17
- package/dist/{chunk-MYY4PMWX.cjs → chunk-RUVBFAF7.cjs} +50 -11
- package/dist/{chunk-E64LOLJU.js → chunk-S762UEV5.js} +5 -5
- package/dist/{chunk-3SBVODUP.cjs → chunk-SH5PPVK7.cjs} +61 -45
- package/dist/{chunk-LY4DMQOW.cjs → chunk-SKZPC5AG.cjs} +5 -5
- package/dist/{chunk-TJHVSBP2.js → chunk-SLHLXUMO.js} +10 -4
- package/dist/{chunk-S6OVFUXD.js → chunk-SSSN7VAM.js} +3 -3
- package/dist/{chunk-K5UGRXKR.js → chunk-SXOSDZD6.js} +6 -6
- package/dist/{chunk-J32ZJZJH.js → chunk-SYTRBGDS.js} +2 -2
- package/dist/{chunk-CIWWXYHZ.cjs → chunk-T6W3Z3SH.cjs} +2 -2
- package/dist/{chunk-U36W76U7.js → chunk-TEVX443G.js} +44 -51
- package/dist/{chunk-6DOKCECB.cjs → chunk-TQ377OLB.cjs} +23 -21
- package/dist/{chunk-YAPPQYJH.cjs → chunk-TRCGG42I.cjs} +195 -152
- package/dist/{chunk-H652NHX5.js → chunk-TVANHNJ7.js} +30 -23
- package/dist/{chunk-EKBKLK7P.js → chunk-UDE4OZMR.js} +3 -3
- package/dist/{chunk-3OIZJNVT.cjs → chunk-UGXHYIWT.cjs} +5 -5
- package/dist/{chunk-44GM3P4G.cjs → chunk-ULMSSHCJ.cjs} +21 -21
- package/dist/{chunk-3B5NVDHJ.cjs → chunk-UOL6Y5TD.cjs} +18 -18
- package/dist/{chunk-5S7RKFGR.cjs → chunk-UVFI7XIR.cjs} +10 -4
- package/dist/{chunk-5TIZXMED.cjs → chunk-V7AKE5VT.cjs} +10 -10
- package/dist/{chunk-3B7AY37W.js → chunk-VEPGBETF.js} +6 -6
- package/dist/{chunk-BKCK3IU6.js → chunk-VF257YKO.js} +4 -4
- package/dist/{chunk-4N4SXXWF.js → chunk-VSACG2AR.js} +3 -3
- package/dist/{chunk-ZDSYWBIE.cjs → chunk-VW5CRJBE.cjs} +3 -7
- package/dist/{chunk-PVWNU4QT.cjs → chunk-WFKVS2K4.cjs} +64 -26
- package/dist/{chunk-TDCJ7YPA.js → chunk-WXQ57LAO.js} +3 -3
- package/dist/{chunk-NE5CZ2NC.cjs → chunk-X27QRG4C.cjs} +38 -38
- package/dist/{chunk-TVHSPJ4N.cjs → chunk-X2AVEAZM.cjs} +30 -23
- package/dist/{chunk-C34AJIJO.js → chunk-XQ5MWMP2.js} +4 -4
- package/dist/{chunk-TFWYKOOB.cjs → chunk-XW6IXEQH.cjs} +26 -13
- package/dist/{chunk-YIVFJNYV.js → chunk-Y3ZFVUUU.js} +2 -2
- package/dist/{chunk-TJIMBJ6L.cjs → chunk-Y57W2CT5.cjs} +2 -2
- package/dist/{chunk-BFROVZOF.cjs → chunk-YCM6QQRT.cjs} +46 -53
- package/dist/{chunk-MBOOR7X4.js → chunk-YFVQWSNJ.js} +3 -3
- package/dist/{chunk-ISM4NX6N.js → chunk-YFWRJW4B.js} +2 -2
- package/dist/{chunk-6OTFG3EB.js → chunk-YN6IETRZ.js} +179 -136
- package/dist/{chunk-NPDNFPTU.js → chunk-YRRAUB35.js} +4 -4
- package/dist/{chunk-GCYR3D2K.js → chunk-Z6PMDS4G.js} +61 -23
- package/dist/{chunk-DPZXVDGM.js → chunk-ZA34AN3R.js} +8 -17
- package/dist/{chunk-EKYL4PE3.cjs → chunk-ZLF4YF3U.cjs} +2 -2
- package/dist/{chunk-VFKXK4GR.cjs → chunk-ZPZAVHXL.cjs} +20 -20
- package/dist/cli/holoscript-runner.cjs +39 -22
- package/dist/cli/holoscript-runner.js +32 -15
- package/dist/compiler/GasOptimizationAnalyzer.d.ts +73 -0
- package/dist/compiler/NFTMarketplaceCompiler.d.ts +23 -0
- package/dist/compiler/agent-inference.cjs +7 -7
- package/dist/compiler/agent-inference.js +3 -3
- package/dist/compiler/android-xr.cjs +8 -8
- package/dist/compiler/android-xr.js +6 -6
- package/dist/compiler/android.cjs +6 -6
- package/dist/compiler/android.js +4 -4
- package/dist/compiler/ar.cjs +6 -6
- package/dist/compiler/ar.js +4 -4
- package/dist/compiler/babylon.cjs +8 -8
- package/dist/compiler/babylon.js +7 -7
- package/dist/compiler/business-quest.cjs +9 -9
- package/dist/compiler/business-quest.js +1 -1
- package/dist/compiler/context.cjs +6 -6
- package/dist/compiler/context.js +3 -3
- package/dist/compiler/domain-block-utils.cjs +153 -153
- package/dist/compiler/domain-block-utils.js +4 -4
- package/dist/compiler/dtdl.cjs +7 -7
- package/dist/compiler/dtdl.js +4 -4
- package/dist/compiler/gltf-pipeline.cjs +8 -8
- package/dist/compiler/gltf-pipeline.js +1 -1
- package/dist/compiler/godot.cjs +6 -6
- package/dist/compiler/godot.js +5 -5
- package/dist/compiler/incremental.cjs +8 -8
- package/dist/compiler/incremental.js +3 -3
- package/dist/compiler/index.cjs +347 -362
- package/dist/compiler/index.d.ts +20 -0
- package/dist/compiler/index.js +200 -215
- package/dist/compiler/ios.cjs +6 -6
- package/dist/compiler/ios.js +4 -4
- package/dist/compiler/llm-provider-capabilities.cjs +6 -6
- package/dist/compiler/llm-provider-capabilities.js +3 -3
- package/dist/compiler/multi-layer.cjs +10 -10
- package/dist/compiler/multi-layer.js +9 -9
- package/dist/compiler/openxr.cjs +7 -7
- package/dist/compiler/openxr.js +6 -6
- package/dist/compiler/playcanvas.cjs +6 -6
- package/dist/compiler/playcanvas.js +5 -5
- package/dist/compiler/r3f.cjs +13 -13
- package/dist/compiler/r3f.js +8 -8
- package/dist/compiler/sdf.cjs +7 -7
- package/dist/compiler/sdf.js +5 -5
- package/dist/compiler/state.cjs +6 -6
- package/dist/compiler/state.js +4 -4
- package/dist/compiler/trait-composition.cjs +8 -8
- package/dist/compiler/trait-composition.js +4 -4
- package/dist/compiler/unity.cjs +7 -7
- package/dist/compiler/unity.js +6 -6
- package/dist/compiler/unreal.cjs +8 -8
- package/dist/compiler/unreal.js +6 -6
- package/dist/compiler/urdf.cjs +14 -14
- package/dist/compiler/urdf.js +5 -5
- package/dist/compiler/usd-physics.cjs +7 -7
- package/dist/compiler/usd-physics.js +4 -4
- package/dist/compiler/visionos.cjs +7 -7
- package/dist/compiler/visionos.js +6 -6
- package/dist/compiler/vrchat.cjs +7 -7
- package/dist/compiler/vrchat.js +5 -5
- package/dist/compiler/vrr.cjs +7 -7
- package/dist/compiler/vrr.js +5 -5
- package/dist/compiler/wasm.cjs +10 -10
- package/dist/compiler/wasm.js +5 -5
- package/dist/compiler/webgpu.cjs +6 -6
- package/dist/compiler/webgpu.js +5 -5
- package/dist/coordinators/index.cjs +27 -10
- package/dist/coordinators/index.js +27 -10
- package/dist/debugger.cjs +6 -6
- package/dist/debugger.js +4 -4
- package/dist/entries/scripting.cjs +6 -6
- package/dist/entries/scripting.js +2 -2
- package/dist/hololand/index.cjs +36 -36
- package/dist/hololand/index.js +2 -2
- package/dist/index.cjs +1056 -796
- package/dist/index.js +440 -180
- package/dist/math/tropical-spmv.cjs +10 -10
- package/dist/math/tropical-spmv.js +1 -1
- package/dist/math/vec3.cjs +13 -13
- package/dist/math/vec3.js +1 -1
- package/dist/parser/NFTMarketplaceTypes.d.ts +191 -0
- package/dist/parser.cjs +16 -16
- package/dist/parser.js +5 -5
- package/dist/reconstruction/index.cjs +37 -37
- package/dist/reconstruction/index.js +4 -4
- package/dist/runtime.cjs +274 -76
- package/dist/runtime.d.ts +10 -1
- package/dist/runtime.js +268 -70
- package/dist/self-improvement/index.cjs +12 -4
- package/dist/self-improvement/index.js +12 -4
- package/dist/{src-HCCCSYP7.js → src-J6CM4AUR.js} +91 -33
- package/dist/{src-4ROC227P.cjs → src-PT2FERDV.cjs} +93 -35
- package/dist/testing.cjs +5 -5
- package/dist/testing.js +1 -1
- package/dist/traits/botanical-lotus.cjs +49 -49
- package/dist/traits/botanical-lotus.js +2 -2
- package/dist/traits/engines/index.cjs +39 -39
- package/dist/traits/engines/index.d.ts +279 -0
- package/dist/traits/engines/index.js +4 -4
- package/dist/traits/index.cjs +881 -773
- package/dist/traits/index.js +366 -258
- package/dist/world/index.cjs +21 -18
- package/dist/world/index.js +21 -18
- package/dist/world-model/index.cjs +11 -5
- package/dist/world-model/index.d.ts +8 -0
- package/dist/world-model/index.js +11 -5
- package/package.json +74 -68
- package/LICENSE +0 -21
- package/dist/GLTFPipeline-PVLTKDBD.cjs +0 -38
- package/dist/GLTFPipeline-QPI4I7DL.js +0 -17
- package/dist/HoloScriptPlusParser-WKHRIH6T.cjs +0 -27
- package/dist/HoloScriptRuntime-6ZGLUCFS.js +0 -10
- package/dist/HoloScriptRuntime-ALUASIL2.cjs +0 -19
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkLODTHGST_cjs = require('./chunk-LODTHGST.cjs');
|
|
4
4
|
var chunkYKGPCZEE_cjs = require('./chunk-YKGPCZEE.cjs');
|
|
5
5
|
var chunk6EX3I5P4_cjs = require('./chunk-6EX3I5P4.cjs');
|
|
6
6
|
var chunkHCCQLAA4_cjs = require('./chunk-HCCQLAA4.cjs');
|
|
@@ -12,7 +12,7 @@ function generateViewFile(compiler, composition) {
|
|
|
12
12
|
compiler.indentLevel = 0;
|
|
13
13
|
compiler.emit("// Auto-generated by HoloScript IOSCompiler");
|
|
14
14
|
compiler.emit(
|
|
15
|
-
`// Source: composition "${
|
|
15
|
+
`// Source: composition "${chunkLODTHGST_cjs.escapeStringValue(composition.name, "Swift")}"`
|
|
16
16
|
);
|
|
17
17
|
compiler.emit(`// iOS: ${compiler.options.iosVersion}`);
|
|
18
18
|
compiler.emit("// Do not edit manually \u2014 regenerate from .holo source");
|
|
@@ -232,7 +232,7 @@ function generateSceneFile(compiler, composition) {
|
|
|
232
232
|
compiler.lines = [];
|
|
233
233
|
compiler.indentLevel = 0;
|
|
234
234
|
compiler.emit("// Auto-generated by HoloScript IOSCompiler");
|
|
235
|
-
compiler.emit(`// Scene: ${
|
|
235
|
+
compiler.emit(`// Scene: ${chunkLODTHGST_cjs.escapeStringValue(composition.name, "Swift")}`);
|
|
236
236
|
compiler.emit("");
|
|
237
237
|
compiler.emit("import Foundation");
|
|
238
238
|
compiler.emit("import SceneKit");
|
|
@@ -250,9 +250,7 @@ function generateSceneFile(compiler, composition) {
|
|
|
250
250
|
compiler.emit("var nodes: [String: SCNNode] = [:]");
|
|
251
251
|
for (const obj of composition.objects || []) {
|
|
252
252
|
const varName = compiler.sanitizeName(obj.name);
|
|
253
|
-
compiler.emit(
|
|
254
|
-
`nodes["${chunkQWAR3GY6_cjs.escapeStringValue(obj.name, "Swift")}"] = make${varName}()`
|
|
255
|
-
);
|
|
253
|
+
compiler.emit(`nodes["${chunkLODTHGST_cjs.escapeStringValue(obj.name, "Swift")}"] = make${varName}()`);
|
|
256
254
|
}
|
|
257
255
|
compiler.emit("return nodes");
|
|
258
256
|
compiler.indentLevel--;
|
|
@@ -285,7 +283,7 @@ function generateStateFile(compiler, composition) {
|
|
|
285
283
|
compiler.lines = [];
|
|
286
284
|
compiler.indentLevel = 0;
|
|
287
285
|
compiler.emit("// Auto-generated by HoloScript IOSCompiler");
|
|
288
|
-
compiler.emit(`// State: ${
|
|
286
|
+
compiler.emit(`// State: ${chunkLODTHGST_cjs.escapeStringValue(composition.name, "Swift")}`);
|
|
289
287
|
compiler.emit("");
|
|
290
288
|
compiler.emit("import Foundation");
|
|
291
289
|
compiler.emit("import SceneKit");
|
|
@@ -302,7 +300,7 @@ function generateStateFile(compiler, composition) {
|
|
|
302
300
|
const swiftType = compiler.toSwiftType(prop.value);
|
|
303
301
|
const swiftValue = compiler.toSwiftValue(prop.value);
|
|
304
302
|
compiler.emit(
|
|
305
|
-
`@Published var ${
|
|
303
|
+
`@Published var ${chunkLODTHGST_cjs.escapeStringValue(prop.key, "Swift")}: ${swiftType} = ${swiftValue}`
|
|
306
304
|
);
|
|
307
305
|
}
|
|
308
306
|
compiler.emit("");
|
|
@@ -456,7 +454,7 @@ function generateInfoPlist(compiler, composition) {
|
|
|
456
454
|
<true/>
|
|
457
455
|
</dict>
|
|
458
456
|
<key>CFBundleDisplayName</key>
|
|
459
|
-
<string>${
|
|
457
|
+
<string>${chunkLODTHGST_cjs.escapeStringValue(composition.name, "XML")}</string>
|
|
460
458
|
<key>MinimumOSVersion</key>
|
|
461
459
|
<string>${compiler.options.iosVersion}</string>
|
|
462
460
|
</dict>
|
|
@@ -490,7 +488,7 @@ function compileObjectFactory(compiler, obj) {
|
|
|
490
488
|
compiler.emit("geometry.materials = [material]");
|
|
491
489
|
compiler.emit("");
|
|
492
490
|
compiler.emit("let node = SCNNode(geometry: geometry)");
|
|
493
|
-
compiler.emit(`node.name = "${
|
|
491
|
+
compiler.emit(`node.name = "${chunkLODTHGST_cjs.escapeStringValue(obj.name, "Swift")}"`);
|
|
494
492
|
const pos = compiler.findObjProp(obj, "position");
|
|
495
493
|
if (pos && Array.isArray(pos)) {
|
|
496
494
|
compiler.emit(`node.position = SCNVector3(${pos[0]}, ${pos[1]}, ${pos[2]})`);
|
|
@@ -549,7 +547,7 @@ function compileLightFactory(compiler, light) {
|
|
|
549
547
|
}
|
|
550
548
|
compiler.emit("");
|
|
551
549
|
compiler.emit("let node = SCNNode()");
|
|
552
|
-
compiler.emit(`node.name = "${
|
|
550
|
+
compiler.emit(`node.name = "${chunkLODTHGST_cjs.escapeStringValue(light.name, "Swift")}"`);
|
|
553
551
|
compiler.emit("node.light = light");
|
|
554
552
|
const posProp = light.properties.find((p) => p.key === "position");
|
|
555
553
|
if (posProp && Array.isArray(posProp.value)) {
|
|
@@ -596,7 +594,7 @@ function compileAction(compiler, action) {
|
|
|
596
594
|
const name = compiler.sanitizeName(action.name);
|
|
597
595
|
compiler.emit(`func ${name}() {`);
|
|
598
596
|
compiler.indentLevel++;
|
|
599
|
-
compiler.emit(`print("[HoloScript] Action: ${
|
|
597
|
+
compiler.emit(`print("[HoloScript] Action: ${chunkLODTHGST_cjs.escapeStringValue(action.name, "Swift")}")`);
|
|
600
598
|
compiler.emit("// Action implementation");
|
|
601
599
|
compiler.indentLevel--;
|
|
602
600
|
compiler.emit("}");
|
|
@@ -682,14 +680,14 @@ function emitGeoAnchorMethods(compiler, composition) {
|
|
|
682
680
|
});
|
|
683
681
|
const headingConfig = typeof headingTrait === "string" ? {} : headingTrait?.config || {};
|
|
684
682
|
const heading = headingConfig.degrees ?? 0;
|
|
685
|
-
compiler.emit(`// Geo-anchor: ${
|
|
683
|
+
compiler.emit(`// Geo-anchor: ${chunkLODTHGST_cjs.escapeStringValue(obj.name, "Swift")}`);
|
|
686
684
|
if (usesARGeoAnchor) {
|
|
687
685
|
compiler.emit(
|
|
688
|
-
`createGeoAnchor(name: "${
|
|
686
|
+
`createGeoAnchor(name: "${chunkLODTHGST_cjs.escapeStringValue(obj.name, "Swift")}", latitude: ${lat}, longitude: ${lng}, altitude: ${alt}, heading: ${heading})`
|
|
689
687
|
);
|
|
690
688
|
} else {
|
|
691
689
|
compiler.emit(
|
|
692
|
-
`createLocationAnchor(name: "${
|
|
690
|
+
`createLocationAnchor(name: "${chunkLODTHGST_cjs.escapeStringValue(obj.name, "Swift")}", latitude: ${lat}, longitude: ${lng}, altitude: ${alt})`
|
|
693
691
|
);
|
|
694
692
|
}
|
|
695
693
|
}
|
|
@@ -737,7 +735,9 @@ function emitGeoAnchorMethods(compiler, composition) {
|
|
|
737
735
|
compiler.emit("let anchor = ARAnchor(name: name, transform: transform)");
|
|
738
736
|
compiler.emit("arView.session.add(anchor: anchor)");
|
|
739
737
|
compiler.emit("geoAnchors[name] = anchor");
|
|
740
|
-
compiler.emit(
|
|
738
|
+
compiler.emit(
|
|
739
|
+
'print("[HoloScript] Location-anchored: \\(name) at (\\(latitude), \\(longitude))")'
|
|
740
|
+
);
|
|
741
741
|
compiler.indentLevel--;
|
|
742
742
|
compiler.emit("}");
|
|
743
743
|
compiler.emit("");
|
|
@@ -795,7 +795,9 @@ function emitGeoAnchorMethods(compiler, composition) {
|
|
|
795
795
|
compiler.emit(
|
|
796
796
|
"arView.session.run(configuration, options: [.resetTracking, .removeExistingAnchors])"
|
|
797
797
|
);
|
|
798
|
-
compiler.emit(
|
|
798
|
+
compiler.emit(
|
|
799
|
+
'print("[HoloScript] World map restored with \\(worldMap.anchors.count) anchors")'
|
|
800
|
+
);
|
|
799
801
|
compiler.indentLevel--;
|
|
800
802
|
compiler.emit("}");
|
|
801
803
|
compiler.emit("");
|
|
@@ -812,7 +814,7 @@ function emitGeoAnchorMethods(compiler, composition) {
|
|
|
812
814
|
}
|
|
813
815
|
var init_IOSARGenerators = chunkHCCQLAA4_cjs.__esm({
|
|
814
816
|
"src/compiler/IOSARGenerators.ts"() {
|
|
815
|
-
|
|
817
|
+
chunkLODTHGST_cjs.init_CompilerBase();
|
|
816
818
|
}
|
|
817
819
|
});
|
|
818
820
|
|
|
@@ -832,7 +834,7 @@ function generateRoomPlanFile(compiler, composition) {
|
|
|
832
834
|
const cls = compiler.options.className;
|
|
833
835
|
compiler.emit("// Auto-generated by HoloScript IOSCompiler \u2014 RoomPlan integration");
|
|
834
836
|
compiler.emit(
|
|
835
|
-
`// Source: composition "${
|
|
837
|
+
`// Source: composition "${chunkLODTHGST_cjs.escapeStringValue(composition.name, "Swift")}"`
|
|
836
838
|
);
|
|
837
839
|
compiler.emit("// Requires iOS 16.0+, RoomPlan framework");
|
|
838
840
|
compiler.emit("// Do not edit manually \u2014 regenerate from .holo source");
|
|
@@ -1085,7 +1087,9 @@ function generateRoomPlanFile(compiler, composition) {
|
|
|
1085
1087
|
compiler.emit("");
|
|
1086
1088
|
compiler.emit(`extension ${cls}RoomPlanManager: RoomCaptureSessionDelegate {`);
|
|
1087
1089
|
compiler.indentLevel++;
|
|
1088
|
-
compiler.emit(
|
|
1090
|
+
compiler.emit(
|
|
1091
|
+
"func captureSession(_ session: RoomCaptureSession, didUpdate room: CapturedRoom) {"
|
|
1092
|
+
);
|
|
1089
1093
|
compiler.indentLevel++;
|
|
1090
1094
|
compiler.emit("DispatchQueue.main.async { [weak self] in");
|
|
1091
1095
|
compiler.indentLevel++;
|
|
@@ -1188,7 +1192,7 @@ function generateLiDARScannerFile(compiler, composition) {
|
|
|
1188
1192
|
const traits = collectLiDARTraits(composition);
|
|
1189
1193
|
compiler.emit("// Auto-generated by HoloScript IOSCompiler \u2014 LiDAR Scanner integration");
|
|
1190
1194
|
compiler.emit(
|
|
1191
|
-
`// Source: composition "${
|
|
1195
|
+
`// Source: composition "${chunkLODTHGST_cjs.escapeStringValue(composition.name, "Swift")}"`
|
|
1192
1196
|
);
|
|
1193
1197
|
compiler.emit("// Requires iOS 15.0+, device with LiDAR sensor");
|
|
1194
1198
|
compiler.emit("// Do not edit manually \u2014 regenerate from .holo source");
|
|
@@ -1243,7 +1247,8 @@ function generateLiDARScannerFile(compiler, composition) {
|
|
|
1243
1247
|
compiler.emit("@Published var isScanning: Bool = false");
|
|
1244
1248
|
compiler.emit("@Published var entities: [LiDARHoloEntity] = []");
|
|
1245
1249
|
compiler.emit("@Published var meshAnchors: [ARMeshAnchor] = []");
|
|
1246
|
-
if (traits.has("lidar_point_cloud"))
|
|
1250
|
+
if (traits.has("lidar_point_cloud"))
|
|
1251
|
+
compiler.emit("@Published var pointCloud: [simd_float3] = []");
|
|
1247
1252
|
if (traits.has("lidar_depth_map")) compiler.emit("@Published var depthMap: CVPixelBuffer?");
|
|
1248
1253
|
if (traits.has("lidar_depth_confidence"))
|
|
1249
1254
|
compiler.emit("@Published var confidenceMap: CVPixelBuffer?");
|
|
@@ -1351,7 +1356,9 @@ function generateLiDARScannerFile(compiler, composition) {
|
|
|
1351
1356
|
compiler.emit("// MARK: - Classification extraction");
|
|
1352
1357
|
compiler.emit("");
|
|
1353
1358
|
compiler.emit("/// Extract per-face classification from an ARMeshAnchor.");
|
|
1354
|
-
compiler.emit(
|
|
1359
|
+
compiler.emit(
|
|
1360
|
+
"func extractClassifications(_ anchor: ARMeshAnchor) -> [ARMeshClassification] {"
|
|
1361
|
+
);
|
|
1355
1362
|
compiler.indentLevel++;
|
|
1356
1363
|
compiler.emit("guard let classBuffer = anchor.geometry.classification else { return [] }");
|
|
1357
1364
|
compiler.emit("var classifications: [ARMeshClassification] = []");
|
|
@@ -1519,7 +1526,9 @@ function generateLiDARScannerFile(compiler, composition) {
|
|
|
1519
1526
|
compiler.emit(
|
|
1520
1527
|
"let simplified = MDLMesh(meshBySubdividing: mdlMesh, submeshIndex: 0, subdivisionLevels: 0, allocator: allocator)"
|
|
1521
1528
|
);
|
|
1522
|
-
compiler.emit(
|
|
1529
|
+
compiler.emit(
|
|
1530
|
+
'print("[HoloScript] Mesh simplified to target face count: \\(targetFaceCount)")'
|
|
1531
|
+
);
|
|
1523
1532
|
compiler.emit("return simplified");
|
|
1524
1533
|
compiler.indentLevel--;
|
|
1525
1534
|
compiler.emit("}");
|
|
@@ -1665,7 +1674,7 @@ function generateNPUSceneFile(compiler, composition) {
|
|
|
1665
1674
|
const defaults = chunk6EX3I5P4_cjs.NPU_SCENE_DEFAULTS;
|
|
1666
1675
|
compiler.emit("// Auto-generated by HoloScript IOSCompiler \u2014 NPU Scene Understanding");
|
|
1667
1676
|
compiler.emit(
|
|
1668
|
-
`// Source: composition "${
|
|
1677
|
+
`// Source: composition "${chunkLODTHGST_cjs.escapeStringValue(composition.name, "Swift")}"`
|
|
1669
1678
|
);
|
|
1670
1679
|
compiler.emit("// Requires iOS 15.0+, Vision + CoreML frameworks");
|
|
1671
1680
|
compiler.emit("// Do not edit manually \u2014 regenerate from .holo source");
|
|
@@ -2071,7 +2080,7 @@ function generatePortalARFile(compiler, composition) {
|
|
|
2071
2080
|
const cls = compiler.options.className;
|
|
2072
2081
|
compiler.emit("// Auto-generated by HoloScript IOSCompiler \u2014 Portal AR integration");
|
|
2073
2082
|
compiler.emit(
|
|
2074
|
-
`// Source: composition "${
|
|
2083
|
+
`// Source: composition "${chunkLODTHGST_cjs.escapeStringValue(composition.name, "Swift")}"`
|
|
2075
2084
|
);
|
|
2076
2085
|
compiler.emit("// Requires iOS 15.0+, ARKit with scene reconstruction");
|
|
2077
2086
|
compiler.emit("// Do not edit manually \u2014 regenerate from .holo source");
|
|
@@ -2405,7 +2414,7 @@ function generatePortalARFile(compiler, composition) {
|
|
|
2405
2414
|
}
|
|
2406
2415
|
var init_IOSSpatialGenerators = chunkHCCQLAA4_cjs.__esm({
|
|
2407
2416
|
"src/compiler/IOSSpatialGenerators.ts"() {
|
|
2408
|
-
|
|
2417
|
+
chunkLODTHGST_cjs.init_CompilerBase();
|
|
2409
2418
|
chunkYKGPCZEE_cjs.init_roomplan();
|
|
2410
2419
|
chunkYKGPCZEE_cjs.init_lidar_scanner();
|
|
2411
2420
|
chunk6EX3I5P4_cjs.init_npu_scene();
|
|
@@ -2439,7 +2448,7 @@ function generateHandTrackingFile(compiler, composition) {
|
|
|
2439
2448
|
const hasToSpatial = compiler.compositionHasTrait(composition, "camera_hand_to_spatial");
|
|
2440
2449
|
compiler.emit("// Auto-generated by HoloScript IOSCompiler \u2014 Hand Tracking integration");
|
|
2441
2450
|
compiler.emit(
|
|
2442
|
-
`// Source: composition "${
|
|
2451
|
+
`// Source: composition "${chunkLODTHGST_cjs.escapeStringValue(composition.name, "Swift")}"`
|
|
2443
2452
|
);
|
|
2444
2453
|
compiler.emit("// Requires iOS 14.0+, Vision framework");
|
|
2445
2454
|
compiler.emit("// Do not edit manually \u2014 regenerate from .holo source");
|
|
@@ -2504,7 +2513,9 @@ function generateHandTrackingFile(compiler, composition) {
|
|
|
2504
2513
|
compiler.emit("session.addInput(input)");
|
|
2505
2514
|
compiler.emit("");
|
|
2506
2515
|
compiler.emit("let output = AVCaptureVideoDataOutput()");
|
|
2507
|
-
compiler.emit(
|
|
2516
|
+
compiler.emit(
|
|
2517
|
+
'output.setSampleBufferDelegate(self, queue: DispatchQueue(label: "handTracking"))'
|
|
2518
|
+
);
|
|
2508
2519
|
compiler.emit("session.addOutput(output)");
|
|
2509
2520
|
compiler.emit("");
|
|
2510
2521
|
compiler.emit("captureSession = session");
|
|
@@ -2666,7 +2677,9 @@ function generateHandTrackingFile(compiler, composition) {
|
|
|
2666
2677
|
"func captureOutput(_ output: AVCaptureOutput, didOutput sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection) {"
|
|
2667
2678
|
);
|
|
2668
2679
|
compiler.indentLevel++;
|
|
2669
|
-
compiler.emit(
|
|
2680
|
+
compiler.emit(
|
|
2681
|
+
"guard let pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer) else { return }"
|
|
2682
|
+
);
|
|
2670
2683
|
compiler.emit("");
|
|
2671
2684
|
compiler.emit(
|
|
2672
2685
|
"let handler = VNImageRequestHandler(cvPixelBuffer: pixelBuffer, orientation: .up, options: [:])"
|
|
@@ -2735,7 +2748,7 @@ function generateObjectCaptureFile(compiler, composition) {
|
|
|
2735
2748
|
const traits = collectObjectCaptureTraits(composition);
|
|
2736
2749
|
compiler.emit("// Auto-generated by HoloScript IOSCompiler \u2014 Object Capture integration");
|
|
2737
2750
|
compiler.emit(
|
|
2738
|
-
`// Source: composition "${
|
|
2751
|
+
`// Source: composition "${chunkLODTHGST_cjs.escapeStringValue(composition.name, "Swift")}"`
|
|
2739
2752
|
);
|
|
2740
2753
|
compiler.emit("// Requires iOS 17.0+, RealityKit Object Capture API");
|
|
2741
2754
|
compiler.emit("// Do not edit manually \u2014 regenerate from .holo source");
|
|
@@ -2997,7 +3010,9 @@ function generateObjectCaptureFile(compiler, composition) {
|
|
|
2997
3010
|
compiler.emit("case .full: detail = .full");
|
|
2998
3011
|
compiler.emit("case .raw: detail = .raw");
|
|
2999
3012
|
compiler.emit("}");
|
|
3000
|
-
compiler.emit(
|
|
3013
|
+
compiler.emit(
|
|
3014
|
+
"let request = PhotogrammetrySession.Request.modelFile(url: url, detail: detail)"
|
|
3015
|
+
);
|
|
3001
3016
|
compiler.emit("try session.process(requests: [request])");
|
|
3002
3017
|
compiler.emit("for try await output in session.outputs {");
|
|
3003
3018
|
compiler.indentLevel++;
|
|
@@ -3042,7 +3057,9 @@ function generateObjectCaptureFile(compiler, composition) {
|
|
|
3042
3057
|
compiler.emit("}");
|
|
3043
3058
|
compiler.emit("");
|
|
3044
3059
|
}
|
|
3045
|
-
compiler.emit(
|
|
3060
|
+
compiler.emit(
|
|
3061
|
+
"private func handlePhotogrammetryResult(_ result: PhotogrammetrySession.Result) {"
|
|
3062
|
+
);
|
|
3046
3063
|
compiler.indentLevel++;
|
|
3047
3064
|
compiler.emit("switch result {");
|
|
3048
3065
|
compiler.emit("case .modelFile(let url):");
|
|
@@ -3084,7 +3101,9 @@ function generateObjectCaptureFile(compiler, composition) {
|
|
|
3084
3101
|
compiler.indentLevel--;
|
|
3085
3102
|
compiler.emit("} catch {");
|
|
3086
3103
|
compiler.indentLevel++;
|
|
3087
|
-
compiler.emit(
|
|
3104
|
+
compiler.emit(
|
|
3105
|
+
'logger.error("[HoloScript] USDZ export failed: \\(error.localizedDescription)")'
|
|
3106
|
+
);
|
|
3088
3107
|
compiler.emit("return nil");
|
|
3089
3108
|
compiler.indentLevel--;
|
|
3090
3109
|
compiler.emit("}");
|
|
@@ -3260,7 +3279,7 @@ function generateSharePlayFile(compiler, composition) {
|
|
|
3260
3279
|
const cls = compiler.options.className;
|
|
3261
3280
|
compiler.emit("// Auto-generated by HoloScript IOSCompiler \u2014 SharePlay Multi-User AR");
|
|
3262
3281
|
compiler.emit(
|
|
3263
|
-
`// Source: composition "${
|
|
3282
|
+
`// Source: composition "${chunkLODTHGST_cjs.escapeStringValue(composition.name, "Swift")}"`
|
|
3264
3283
|
);
|
|
3265
3284
|
compiler.emit("// Requires iOS 15.4+, GroupActivities framework");
|
|
3266
3285
|
compiler.emit("// Do not edit manually \u2014 regenerate from .holo source");
|
|
@@ -3698,7 +3717,9 @@ function generateSharePlayFile(compiler, composition) {
|
|
|
3698
3717
|
if (compiler.compositionHasTrait(composition, "shareplay_anchor_local")) {
|
|
3699
3718
|
compiler.emit("// MARK: - Local Anchor Mapping");
|
|
3700
3719
|
compiler.emit("");
|
|
3701
|
-
compiler.emit(
|
|
3720
|
+
compiler.emit(
|
|
3721
|
+
"func calibrateLocalAnchor(arFrame: ARFrame, sharedReferencePoint: simd_float3) {"
|
|
3722
|
+
);
|
|
3702
3723
|
compiler.indentLevel++;
|
|
3703
3724
|
compiler.emit("// Each participant creates a local ARKit anchor and maps shared positions");
|
|
3704
3725
|
compiler.emit("let cameraPos = arFrame.camera.transform.columns.3");
|
|
@@ -3737,7 +3758,9 @@ function generateSharePlayFile(compiler, composition) {
|
|
|
3737
3758
|
if (compiler.compositionHasTrait(composition, "shareplay_mute_zone")) {
|
|
3738
3759
|
compiler.emit("// MARK: - Mute Zones");
|
|
3739
3760
|
compiler.emit("");
|
|
3740
|
-
compiler.emit(
|
|
3761
|
+
compiler.emit(
|
|
3762
|
+
"func addMuteZone(center: simd_float3, radius: Float, attenuation: Float = 0.0) {"
|
|
3763
|
+
);
|
|
3741
3764
|
compiler.indentLevel++;
|
|
3742
3765
|
compiler.emit(
|
|
3743
3766
|
"muteZones.append(MuteZone(center: center, radius: radius, attenuation: attenuation))"
|
|
@@ -3862,7 +3885,7 @@ function generateFaceTrackingFile(compiler, composition) {
|
|
|
3862
3885
|
const hasTongue = compiler.compositionHasTrait(composition, "face_tongue_detect");
|
|
3863
3886
|
compiler.emit("// Auto-generated by HoloScript IOSCompiler \u2014 TrueDepth Face Tracking");
|
|
3864
3887
|
compiler.emit(
|
|
3865
|
-
`// Source: composition "${
|
|
3888
|
+
`// Source: composition "${chunkLODTHGST_cjs.escapeStringValue(composition.name, "Swift")}"`
|
|
3866
3889
|
);
|
|
3867
3890
|
compiler.emit("// Requires iOS 11.0+, ARKit, TrueDepth camera");
|
|
3868
3891
|
compiler.emit("// Do not edit manually \u2014 regenerate from .holo source");
|
|
@@ -4256,7 +4279,7 @@ function generateUWBPositioningFile(compiler, composition) {
|
|
|
4256
4279
|
const cls = compiler.options.className;
|
|
4257
4280
|
compiler.emit("// Auto-generated by HoloScript IOSCompiler \u2014 UWB Positioning");
|
|
4258
4281
|
compiler.emit(
|
|
4259
|
-
`// Source: composition "${
|
|
4282
|
+
`// Source: composition "${chunkLODTHGST_cjs.escapeStringValue(composition.name, "Swift")}"`
|
|
4260
4283
|
);
|
|
4261
4284
|
compiler.emit("// Requires iOS 16+, U1/U2 chip (iPhone 11+), Nearby Interaction framework");
|
|
4262
4285
|
compiler.emit("// Do not edit manually \u2014 regenerate from .holo source");
|
|
@@ -4358,7 +4381,9 @@ function generateUWBPositioningFile(compiler, composition) {
|
|
|
4358
4381
|
compiler.emit("mcAdvertiser?.delegate = self");
|
|
4359
4382
|
compiler.emit("mcAdvertiser?.startAdvertisingPeer()");
|
|
4360
4383
|
compiler.emit("");
|
|
4361
|
-
compiler.emit(
|
|
4384
|
+
compiler.emit(
|
|
4385
|
+
"mcBrowser = MCNearbyServiceBrowser(peer: localPeerId, serviceType: serviceType)"
|
|
4386
|
+
);
|
|
4362
4387
|
compiler.emit("mcBrowser?.delegate = self");
|
|
4363
4388
|
compiler.emit("mcBrowser?.startBrowsingForPeers()");
|
|
4364
4389
|
compiler.emit("");
|
|
@@ -4784,7 +4809,7 @@ function generateSpatialAudioFile(compiler, composition) {
|
|
|
4784
4809
|
const traits = collectSpatialAudioTraits(composition);
|
|
4785
4810
|
compiler.emit("// Auto-generated by HoloScript IOSCompiler \u2014 AirPods Spatial Audio");
|
|
4786
4811
|
compiler.emit(
|
|
4787
|
-
`// Source: composition "${
|
|
4812
|
+
`// Source: composition "${chunkLODTHGST_cjs.escapeStringValue(composition.name, "Swift")}"`
|
|
4788
4813
|
);
|
|
4789
4814
|
compiler.emit("// Requires iOS 15+, AirPods Pro/Max with head tracking");
|
|
4790
4815
|
compiler.emit("// Do not edit manually \u2014 regenerate from .holo source");
|
|
@@ -4974,11 +4999,15 @@ function generateSpatialAudioFile(compiler, composition) {
|
|
|
4974
4999
|
}
|
|
4975
5000
|
compiler.emit("// MARK: - Audio Pipeline");
|
|
4976
5001
|
compiler.emit("");
|
|
4977
|
-
compiler.emit(
|
|
5002
|
+
compiler.emit(
|
|
5003
|
+
"private func loadAndPlayAudio(sourceId: String, audioFile: String, gain: Float) {"
|
|
5004
|
+
);
|
|
4978
5005
|
compiler.indentLevel++;
|
|
4979
5006
|
compiler.emit("guard let engine = phaseEngine, let source = sources[sourceId] else { return }");
|
|
4980
5007
|
compiler.emit("");
|
|
4981
|
-
compiler.emit(
|
|
5008
|
+
compiler.emit(
|
|
5009
|
+
"guard let url = Bundle.main.url(forResource: audioFile, withExtension: nil) else {"
|
|
5010
|
+
);
|
|
4982
5011
|
compiler.indentLevel++;
|
|
4983
5012
|
compiler.emit('print("[SpatialAudio] Audio file not found: \\(audioFile)")');
|
|
4984
5013
|
compiler.emit("return");
|
|
@@ -4997,7 +5026,9 @@ function generateSpatialAudioFile(compiler, composition) {
|
|
|
4997
5026
|
compiler.indentLevel--;
|
|
4998
5027
|
compiler.emit(")");
|
|
4999
5028
|
compiler.emit("");
|
|
5000
|
-
compiler.emit(
|
|
5029
|
+
compiler.emit(
|
|
5030
|
+
"let channelLayout = AVAudioChannelLayout(layoutTag: kAudioChannelLayoutTag_Mono)!"
|
|
5031
|
+
);
|
|
5001
5032
|
compiler.emit("let samplerNodeDef = PHASESamplerNodeDefinition(");
|
|
5002
5033
|
compiler.indentLevel++;
|
|
5003
5034
|
compiler.emit("soundAssetIdentifier: sourceId,");
|
|
@@ -5012,14 +5043,18 @@ function generateSpatialAudioFile(compiler, composition) {
|
|
|
5012
5043
|
if (traits.has("audio_falloff")) {
|
|
5013
5044
|
compiler.emit("// Distance-based falloff (audio_falloff)");
|
|
5014
5045
|
compiler.emit("let distanceModelParameters = PHASEGeometricSpreadingDistanceModelParameters()");
|
|
5015
|
-
compiler.emit(
|
|
5046
|
+
compiler.emit(
|
|
5047
|
+
"distanceModelParameters.fadeOutParameters = PHASEDistanceModelFadeOutParameters("
|
|
5048
|
+
);
|
|
5016
5049
|
compiler.indentLevel++;
|
|
5017
5050
|
compiler.emit("cullDistance: 20.0");
|
|
5018
5051
|
compiler.indentLevel--;
|
|
5019
5052
|
compiler.emit(")");
|
|
5020
5053
|
compiler.emit("distanceModelParameters.rolloffFactor = 1.0");
|
|
5021
5054
|
compiler.emit("");
|
|
5022
|
-
compiler.emit(
|
|
5055
|
+
compiler.emit(
|
|
5056
|
+
"let spatialPipelineDef = PHASESpatialPipeline(flags: [.directPathTransmission])!"
|
|
5057
|
+
);
|
|
5023
5058
|
compiler.emit(
|
|
5024
5059
|
"spatialPipelineDef.entries[PHASESpatialCategory.directPath]!.sendLevel = Double(gain)"
|
|
5025
5060
|
);
|
|
@@ -5031,7 +5066,9 @@ function generateSpatialAudioFile(compiler, composition) {
|
|
|
5031
5066
|
compiler.emit(")");
|
|
5032
5067
|
compiler.emit("spatialMixerDef.distanceModelParameters = distanceModelParameters");
|
|
5033
5068
|
} else {
|
|
5034
|
-
compiler.emit(
|
|
5069
|
+
compiler.emit(
|
|
5070
|
+
"let spatialPipelineDef = PHASESpatialPipeline(flags: [.directPathTransmission])!"
|
|
5071
|
+
);
|
|
5035
5072
|
compiler.emit(
|
|
5036
5073
|
"spatialPipelineDef.entries[PHASESpatialCategory.directPath]!.sendLevel = Double(gain)"
|
|
5037
5074
|
);
|
|
@@ -5208,7 +5245,7 @@ function generateSpatialAudioFile(compiler, composition) {
|
|
|
5208
5245
|
}
|
|
5209
5246
|
var init_IOSPeripheralGenerators = chunkHCCQLAA4_cjs.__esm({
|
|
5210
5247
|
"src/compiler/IOSPeripheralGenerators.ts"() {
|
|
5211
|
-
|
|
5248
|
+
chunkLODTHGST_cjs.init_CompilerBase();
|
|
5212
5249
|
chunk6EX3I5P4_cjs.init_camera_hand_tracking();
|
|
5213
5250
|
chunkYKGPCZEE_cjs.init_face_tracking();
|
|
5214
5251
|
chunkYKGPCZEE_cjs.init_ios_object_capture();
|
|
@@ -5231,11 +5268,11 @@ function compileToIOS(composition, options) {
|
|
|
5231
5268
|
exports.IOSCompiler = void 0;
|
|
5232
5269
|
var init_IOSCompiler = chunkHCCQLAA4_cjs.__esm({
|
|
5233
5270
|
"src/compiler/IOSCompiler.ts"() {
|
|
5234
|
-
|
|
5271
|
+
chunkLODTHGST_cjs.init_CompilerBase();
|
|
5235
5272
|
init_IOSARGenerators();
|
|
5236
5273
|
init_IOSSpatialGenerators();
|
|
5237
5274
|
init_IOSPeripheralGenerators();
|
|
5238
|
-
exports.IOSCompiler = class extends
|
|
5275
|
+
exports.IOSCompiler = class extends chunkLODTHGST_cjs.CompilerBase {
|
|
5239
5276
|
constructor(options = {}) {
|
|
5240
5277
|
super();
|
|
5241
5278
|
this.compilerName = "IOSCompiler";
|
|
@@ -5386,5 +5423,5 @@ var init_IOSCompiler = chunkHCCQLAA4_cjs.__esm({
|
|
|
5386
5423
|
exports.IOSCompiler_exports = IOSCompiler_exports;
|
|
5387
5424
|
exports.compileToIOS = compileToIOS;
|
|
5388
5425
|
exports.init_IOSCompiler = init_IOSCompiler;
|
|
5389
|
-
//# sourceMappingURL=chunk-
|
|
5390
|
-
//# sourceMappingURL=chunk-
|
|
5426
|
+
//# sourceMappingURL=chunk-O3MGZDCT.cjs.map
|
|
5427
|
+
//# sourceMappingURL=chunk-O3MGZDCT.cjs.map
|