@holoscript/core 6.0.2 → 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.
Files changed (229) hide show
  1. package/README.md +38 -38
  2. package/dist/GLTFPipeline-DEN36VNK.js +12 -0
  3. package/dist/GLTFPipeline-YPCAK236.cjs +33 -0
  4. package/dist/{HoloScriptPlusParser-BZR5DELQ.js → HoloScriptPlusParser-BN6KVRCM.js} +5 -5
  5. package/dist/{HoloScriptPlusParser-SBMYDNXO.cjs → HoloScriptPlusParser-NC5FE6AL.cjs} +16 -16
  6. package/dist/{USDZExporter-YA55ZS35.js → USDZExporter-NTMBNTDB.js} +3 -3
  7. package/dist/{USDZExporter-MHEHXZB4.cjs → USDZExporter-UWGWNMMD.cjs} +3 -3
  8. package/dist/{chunk-32TWR3HE.js → chunk-2CWOLHTE.js} +3 -4
  9. package/dist/{chunk-2UX5LRAP.cjs → chunk-33LSUQDD.cjs} +33 -31
  10. package/dist/{chunk-LBPEZQAF.js → chunk-3FJCK5XA.js} +7 -7
  11. package/dist/{chunk-EGIZHYJP.cjs → chunk-3SAK5KFL.cjs} +2 -4
  12. package/dist/{chunk-PJMOXFPR.cjs → chunk-4XSNJCLC.cjs} +25 -27
  13. package/dist/{chunk-HKCVM6OK.cjs → chunk-5BGSECRJ.cjs} +21 -21
  14. package/dist/{chunk-EMO7HAKJ.cjs → chunk-5O6TQC6M.cjs} +26 -30
  15. package/dist/{chunk-XSUZMPVQ.cjs → chunk-5OEOHAAW.cjs} +26 -26
  16. package/dist/{chunk-EJA7G2C4.cjs → chunk-5WUNN6ZN.cjs} +2 -2
  17. package/dist/{chunk-CQDOF3G7.cjs → chunk-6TZPZCOJ.cjs} +18 -18
  18. package/dist/{chunk-NRUB55IT.cjs → chunk-6UEHYZ7V.cjs} +18 -16
  19. package/dist/{chunk-V42NTCFH.js → chunk-6XSERL6L.js} +4230 -2197
  20. package/dist/{chunk-X4YVN7H3.cjs → chunk-72EQECGT.cjs} +37 -17
  21. package/dist/{chunk-4KJ2R7VP.cjs → chunk-7AGYRWKW.cjs} +19 -19
  22. package/dist/{chunk-UQW6SLM5.js → chunk-A7PIMZGU.js} +110 -19
  23. package/dist/{chunk-RT7LJRSF.cjs → chunk-ATSKSYVE.cjs} +1013 -6708
  24. package/dist/{chunk-WN3YF33G.cjs → chunk-B5TCIAPQ.cjs} +9 -10
  25. package/dist/{chunk-AIUXRS74.cjs → chunk-BF2235SI.cjs} +4275 -2242
  26. package/dist/{chunk-DIEDKX5B.cjs → chunk-BND3ST2K.cjs} +18 -16
  27. package/dist/{chunk-EPWRXL6S.js → chunk-BU7VWW2K.js} +29 -29
  28. package/dist/{chunk-6OQBLABR.js → chunk-BWFJEM5A.js} +368 -189
  29. package/dist/{chunk-ARNKA274.cjs → chunk-CAUCGUEA.cjs} +6 -6
  30. package/dist/{chunk-YCMQQQ5U.cjs → chunk-CBJSLA2E.cjs} +398 -219
  31. package/dist/{chunk-BU5ZAFMC.js → chunk-CDPGV4DN.js} +6 -7
  32. package/dist/{chunk-CO2VM2DK.js → chunk-CS2EMTGF.js} +10 -9
  33. package/dist/{chunk-AW7WAELW.js → chunk-DMG7C4H2.js} +4 -4
  34. package/dist/{chunk-XSF76QRU.js → chunk-DXJQDCFL.js} +3 -3
  35. package/dist/{chunk-4FCZDTD5.js → chunk-E3FWRT3Z.js} +7 -9
  36. package/dist/{chunk-KYM4XRFG.js → chunk-E3UALNFA.js} +4 -4
  37. package/dist/{chunk-GC3YU46J.js → chunk-EONILVMF.js} +2 -2
  38. package/dist/{chunk-VJVCD5T5.cjs → chunk-EQV4R3EV.cjs} +22 -22
  39. package/dist/{chunk-FEFHPUEM.cjs → chunk-F3HH56EB.cjs} +74 -658
  40. package/dist/{chunk-WYH4GVZ5.js → chunk-F4IULT7N.js} +2 -2
  41. package/dist/{chunk-XDXZM3ZP.cjs → chunk-FFKU7BTK.cjs} +19 -19
  42. package/dist/{chunk-NKRKT6V2.js → chunk-FHQVYCH2.js} +11 -10
  43. package/dist/{chunk-7H5UNJZD.cjs → chunk-FSF7EQVA.cjs} +11 -10
  44. package/dist/{chunk-KUJRR4FJ.js → chunk-G4VZTCIB.js} +9 -7
  45. package/dist/{chunk-A6GO3DPZ.cjs → chunk-G7CT3EMP.cjs} +4 -4
  46. package/dist/{chunk-EUFLX2PI.js → chunk-GGHSW2NN.js} +989 -6611
  47. package/dist/chunk-GVUR45UF.cjs +777 -0
  48. package/dist/{chunk-ODGMVILH.js → chunk-H5Z7NASB.js} +3 -3
  49. package/dist/{chunk-7KPI4EKH.cjs → chunk-HE7ULERA.cjs} +45 -49
  50. package/dist/{chunk-26TLYBFD.js → chunk-HPS76H7Q.js} +3 -3
  51. package/dist/{chunk-RE3OKSYF.cjs → chunk-HQUEA5R6.cjs} +6 -6
  52. package/dist/{chunk-ZGTGVSTZ.js → chunk-HYNTS5CP.js} +2 -2
  53. package/dist/{chunk-PBA6NXCT.cjs → chunk-IBDG74G2.cjs} +6 -3
  54. package/dist/chunk-IFNQFCTM.js +3098 -0
  55. package/dist/{chunk-ZL6VJ6SN.js → chunk-IWI6J7FX.js} +5 -5
  56. package/dist/{chunk-3KEU5QYY.cjs → chunk-K3JDKWGI.cjs} +118 -23
  57. package/dist/{chunk-NLPSZT4C.js → chunk-K6EKD26I.js} +6 -6
  58. package/dist/chunk-KCQ5NDYC.cjs +3172 -0
  59. package/dist/{chunk-ELLQPFAF.js → chunk-KED34ILP.js} +11 -9
  60. package/dist/{chunk-BY3B7ZYV.cjs → chunk-KSGXLT74.cjs} +3 -3
  61. package/dist/{chunk-65RFOWZI.js → chunk-L4G4RLXX.js} +9 -7
  62. package/dist/{chunk-4SMUJFHL.js → chunk-LDP5OK6G.js} +6 -3
  63. package/dist/{chunk-VZNKJZTT.cjs → chunk-LGGRPKTV.cjs} +82 -96
  64. package/dist/{chunk-C2QHVHZF.js → chunk-LSW7P7ML.js} +23 -414
  65. package/dist/{chunk-HHS6FMOU.cjs → chunk-LXJ4667L.cjs} +83 -22
  66. package/dist/{chunk-H6WMMLQK.cjs → chunk-LZ266PCM.cjs} +20 -13
  67. package/dist/{chunk-V2ILLPHK.cjs → chunk-MD6KDHVE.cjs} +10 -10
  68. package/dist/{chunk-6WNCRE6F.js → chunk-MEASWI2Y.js} +5 -5
  69. package/dist/chunk-MPXBVFHQ.js +768 -0
  70. package/dist/{chunk-WUXIRGZP.cjs → chunk-NCUKG4SK.cjs} +304 -144
  71. package/dist/chunk-NDQNIJEH.js +1715 -0
  72. package/dist/{chunk-Y5MUAYTO.js → chunk-NOZZ46QU.js} +9 -8
  73. package/dist/{chunk-F5LVGHNT.js → chunk-OFKWH2IP.js} +3 -3
  74. package/dist/{chunk-SPDELRRV.cjs → chunk-PMGODDJA.cjs} +12 -12
  75. package/dist/{chunk-I3XGTIHM.cjs → chunk-Q4QX3AET.cjs} +2 -2
  76. package/dist/{chunk-Y7VK5TH3.cjs → chunk-Q5JT3YML.cjs} +10 -10
  77. package/dist/{chunk-TSWTWZ42.cjs → chunk-Q5SJOGHQ.cjs} +247 -205
  78. package/dist/{chunk-M6FU6S22.js → chunk-QGKNANZ3.js} +251 -91
  79. package/dist/{chunk-WFJIDI2N.cjs → chunk-QLEAOI3Q.cjs} +10 -10
  80. package/dist/{chunk-VK5AXKO3.js → chunk-R7MA7QWV.js} +70 -84
  81. package/dist/{chunk-W76ETJTI.js → chunk-RVYPEYPX.js} +6 -6
  82. package/dist/{chunk-MWEFR6YQ.js → chunk-S2N5TNMA.js} +7 -9
  83. package/dist/{chunk-NCUHGRTZ.js → chunk-S565K7NK.js} +7 -7
  84. package/dist/{chunk-AC4BSHFV.js → chunk-SDAMZIRE.js} +5 -5
  85. package/dist/{chunk-HBZYCASG.js → chunk-T36DDXSF.js} +75 -33
  86. package/dist/{chunk-BO2OKHIY.js → chunk-T4NKMBDL.js} +30 -611
  87. package/dist/{chunk-7X2IEJIE.cjs → chunk-T7LEXZUZ.cjs} +29 -29
  88. package/dist/{chunk-HUFNKFA6.js → chunk-TEWCN33Y.js} +8 -12
  89. package/dist/{chunk-L3Z2HIWJ.cjs → chunk-TQSZUOW5.cjs} +2 -2
  90. package/dist/chunk-TSH3MSQU.cjs +129 -0
  91. package/dist/{chunk-PLMYCCA4.js → chunk-UERJ3YJV.js} +6 -6
  92. package/dist/{chunk-7N3JIJMT.js → chunk-UPJBDCVF.js} +6 -6
  93. package/dist/{chunk-CMYAWUX3.js → chunk-V3NN3HPP.js} +12 -5
  94. package/dist/{chunk-SUCBB66F.js → chunk-WB4Z63GG.js} +3 -3
  95. package/dist/{chunk-PPULB4GG.cjs → chunk-WDW67DZB.cjs} +68 -68
  96. package/dist/chunk-WGMEAYBG.js +126 -0
  97. package/dist/{chunk-VSXOIUCF.cjs → chunk-X4ZF6CNE.cjs} +7 -7
  98. package/dist/{chunk-HF4OFY25.cjs → chunk-X6SEAXAX.cjs} +29 -445
  99. package/dist/{chunk-C7BNX4XJ.js → chunk-XCWFGZAA.js} +6 -6
  100. package/dist/{chunk-CNVM7J3M.js → chunk-XD6IYDUX.js} +34 -14
  101. package/dist/chunk-XG23EUQX.cjs +1717 -0
  102. package/dist/{chunk-DN7UFU63.cjs → chunk-XRKWN5PL.cjs} +12 -11
  103. package/dist/{chunk-XNMEH2BI.js → chunk-XUTX5CBW.js} +3 -3
  104. package/dist/{chunk-PQLGZKMC.cjs → chunk-XWPNTWDN.cjs} +26 -26
  105. package/dist/{chunk-NTMZSDXM.cjs → chunk-XXINBTZK.cjs} +43 -43
  106. package/dist/{chunk-74YCHHTE.js → chunk-YCXFCXDS.js} +8 -12
  107. package/dist/{chunk-KDB6BUMB.js → chunk-YQK5JNFK.js} +77 -18
  108. package/dist/{chunk-DH5G2JUA.cjs → chunk-Z34RLXRA.cjs} +44 -46
  109. package/dist/{chunk-XH7SE4HH.cjs → chunk-ZP4D3CSX.cjs} +19 -19
  110. package/dist/cli/holoscript-runner.cjs +33 -32
  111. package/dist/cli/holoscript-runner.js +13 -12
  112. package/dist/codebase/index.cjs +1 -1
  113. package/dist/codebase/index.d.ts +25 -0
  114. package/dist/codebase/index.js +1 -1
  115. package/dist/compiler/agent-inference.cjs +7 -8
  116. package/dist/compiler/agent-inference.js +3 -4
  117. package/dist/compiler/android-xr.cjs +7 -8
  118. package/dist/compiler/android-xr.js +5 -6
  119. package/dist/compiler/android.cjs +8 -9
  120. package/dist/compiler/android.js +6 -7
  121. package/dist/compiler/ar.cjs +6 -7
  122. package/dist/compiler/ar.js +4 -5
  123. package/dist/compiler/babylon.cjs +8 -9
  124. package/dist/compiler/babylon.js +7 -8
  125. package/dist/compiler/coco.cjs +1 -1
  126. package/dist/compiler/coco.js +1 -1
  127. package/dist/compiler/domain-block-utils.cjs +158 -151
  128. package/dist/compiler/domain-block-utils.js +4 -5
  129. package/dist/compiler/dtdl.cjs +7 -8
  130. package/dist/compiler/dtdl.js +4 -5
  131. package/dist/compiler/gltf-pipeline.cjs +9 -9
  132. package/dist/compiler/gltf-pipeline.js +2 -2
  133. package/dist/compiler/godot.cjs +6 -7
  134. package/dist/compiler/godot.js +5 -6
  135. package/dist/compiler/incremental.cjs +7 -8
  136. package/dist/compiler/incremental.js +2 -3
  137. package/dist/compiler/index.cjs +1934 -878
  138. package/dist/compiler/index.js +1904 -842
  139. package/dist/compiler/ios.cjs +8 -9
  140. package/dist/compiler/ios.js +6 -7
  141. package/dist/compiler/multi-layer.cjs +10 -17
  142. package/dist/compiler/multi-layer.js +9 -10
  143. package/dist/compiler/nodetoy.cjs +1 -1
  144. package/dist/compiler/nodetoy.js +1 -1
  145. package/dist/compiler/openxr.cjs +6 -7
  146. package/dist/compiler/openxr.js +5 -6
  147. package/dist/compiler/playcanvas.cjs +7 -8
  148. package/dist/compiler/playcanvas.js +6 -7
  149. package/dist/compiler/r3f.cjs +13 -14
  150. package/dist/compiler/r3f.js +8 -9
  151. package/dist/compiler/remotion.cjs +1 -1
  152. package/dist/compiler/remotion.js +1 -1
  153. package/dist/compiler/reproducibility.cjs +1 -1
  154. package/dist/compiler/reproducibility.js +1 -1
  155. package/dist/compiler/sdf.cjs +7 -8
  156. package/dist/compiler/sdf.js +5 -6
  157. package/dist/compiler/semantic-scene.cjs +7 -7
  158. package/dist/compiler/semantic-scene.js +2 -2
  159. package/dist/compiler/state.cjs +5 -6
  160. package/dist/compiler/state.js +3 -4
  161. package/dist/compiler/trait-composition.cjs +7 -8
  162. package/dist/compiler/trait-composition.js +3 -4
  163. package/dist/compiler/unity.cjs +6 -7
  164. package/dist/compiler/unity.js +5 -6
  165. package/dist/compiler/unreal.cjs +7 -8
  166. package/dist/compiler/unreal.js +5 -6
  167. package/dist/compiler/urdf.cjs +13 -14
  168. package/dist/compiler/urdf.js +5 -6
  169. package/dist/compiler/usd-physics.cjs +7 -8
  170. package/dist/compiler/usd-physics.js +4 -5
  171. package/dist/compiler/visionos.cjs +6 -7
  172. package/dist/compiler/visionos.js +5 -6
  173. package/dist/compiler/vrchat.cjs +7 -8
  174. package/dist/compiler/vrchat.js +5 -6
  175. package/dist/compiler/vrr.cjs +7 -8
  176. package/dist/compiler/vrr.js +5 -6
  177. package/dist/compiler/wasm.cjs +10 -11
  178. package/dist/compiler/wasm.js +5 -6
  179. package/dist/compiler/webgpu.cjs +6 -7
  180. package/dist/compiler/webgpu.js +5 -6
  181. package/dist/constants.d.ts +3 -0
  182. package/dist/debugger.cjs +7 -7
  183. package/dist/debugger.js +5 -5
  184. package/dist/entries/interop.cjs +1 -1
  185. package/dist/entries/interop.d.ts +9 -0
  186. package/dist/entries/interop.js +1 -1
  187. package/dist/entries/scripting.cjs +18 -17
  188. package/dist/entries/scripting.d.ts +7 -0
  189. package/dist/entries/scripting.js +8 -7
  190. package/dist/index.cjs +6773 -27555
  191. package/dist/index.d.ts +19 -0
  192. package/dist/index.js +5212 -26101
  193. package/dist/math/vec3.cjs +1 -1
  194. package/dist/math/vec3.js +1 -1
  195. package/dist/ml-dsa-PHCWUBPX.cjs +1178 -0
  196. package/dist/ml-dsa-WYLJHJO6.js +1178 -0
  197. package/dist/parser.cjs +11 -10
  198. package/dist/parser.js +8 -7
  199. package/dist/{playwright-BIZXMLD2.js → playwright-5OSAPTNH.js} +3 -3
  200. package/dist/{playwright-7DTEQCBD.cjs → playwright-RL6GY4F7.cjs} +1985 -1985
  201. package/dist/runtime.cjs +5 -5
  202. package/dist/runtime.js +4 -4
  203. package/dist/self-improvement/index.d.ts +0 -48
  204. package/dist/storage/index.cjs +1 -1
  205. package/dist/storage/index.d.ts +24 -0
  206. package/dist/storage/index.js +1 -1
  207. package/dist/tools/index.d.ts +12 -0
  208. package/dist/traits/index.cjs +925 -607
  209. package/dist/traits/index.js +137 -20
  210. package/dist/type-checker.cjs +4 -4
  211. package/dist/type-checker.js +2 -2
  212. package/package.json +54 -19
  213. package/LICENSE +0 -21
  214. package/dist/GLTFPipeline-3KLWWUQO.cjs +0 -34
  215. package/dist/GLTFPipeline-LYII2ZVQ.js +0 -13
  216. package/dist/chunk-CN4NOESF.cjs +0 -416
  217. package/dist/chunk-DXVCEFZB.js +0 -2027
  218. package/dist/chunk-ENV7K6XA.js +0 -282
  219. package/dist/chunk-H7XMORZI.js +0 -2731
  220. package/dist/chunk-HAN4V3PF.cjs +0 -2037
  221. package/dist/chunk-LER4WXW5.cjs +0 -286
  222. package/dist/chunk-QHVVVN47.cjs +0 -2033
  223. package/dist/chunk-QWKUKVRE.js +0 -2026
  224. package/dist/chunk-UITWA6DV.cjs +0 -2829
  225. package/dist/chunk-X67XRI2T.js +0 -410
  226. package/dist/post-quantum-JTTAAGO3.cjs +0 -6
  227. package/dist/post-quantum-RVPVDEPI.js +0 -4
  228. package/dist/wot/index.cjs +0 -29
  229. package/dist/wot/index.js +0 -4
@@ -1,7 +1,8 @@
1
- import { init_CompilerBase, init_ANSNamespace, CompilerBase, ANSCapabilityPath } from './chunk-QWKUKVRE.js';
2
- import { init_geospatial, init_depth_scanner, init_spatial_authoring, init_haptic_feedback, init_nearby_connections, init_foldable_display, init_samsung_dex, init_google_lens, init_webxr, GEOSPATIAL_DEFAULTS, DEPTH_SCANNER_TRAITS, DEPTH_SCANNER_DEFAULTS, SPATIAL_AUTHORING_TRAITS, SPATIAL_AUTHORING_DEFAULTS, HAPTIC_FEEDBACK_TRAITS, NEARBY_CONNECTIONS_TRAITS, FOLDABLE_DISPLAY_TRAITS, SAMSUNG_DEX_TRAITS, GOOGLE_LENS_TRAITS, WEBXR_TRAITS } from './chunk-26TLYBFD.js';
3
- import { init_portal_ar, init_camera_hand_tracking, init_npu_scene, NPU_SCENE_TRAITS, NPU_SCENE_DEFAULTS, PORTAL_AR_TRAITS, CAMERA_HAND_TRACKING_TRAITS } from './chunk-XNMEH2BI.js';
4
- import { __export, __esm } from './chunk-32TWR3HE.js';
1
+ import { init_geospatial, init_depth_scanner, init_spatial_authoring, init_haptic_feedback, init_nearby_connections, init_foldable_display, init_samsung_dex, init_google_lens, init_webxr, GEOSPATIAL_DEFAULTS, DEPTH_SCANNER_TRAITS, DEPTH_SCANNER_DEFAULTS, SPATIAL_AUTHORING_TRAITS, SPATIAL_AUTHORING_DEFAULTS, HAPTIC_FEEDBACK_TRAITS, NEARBY_CONNECTIONS_TRAITS, FOLDABLE_DISPLAY_TRAITS, SAMSUNG_DEX_TRAITS, GOOGLE_LENS_TRAITS, WEBXR_TRAITS } from './chunk-HPS76H7Q.js';
2
+ import { init_portal_ar, init_camera_hand_tracking, init_npu_scene, NPU_SCENE_TRAITS, NPU_SCENE_DEFAULTS, PORTAL_AR_TRAITS, CAMERA_HAND_TRACKING_TRAITS } from './chunk-XUTX5CBW.js';
3
+ import { init_CompilerBase, CompilerBase } from './chunk-6XSERL6L.js';
4
+ import { __export, __esm } from './chunk-2CWOLHTE.js';
5
+ import { ANSCapabilityPath } from '@holoscript/platform';
5
6
 
6
7
  // src/compiler/AndroidCompiler.ts
7
8
  var AndroidCompiler_exports = {};
@@ -17,7 +18,6 @@ var AndroidCompiler;
17
18
  var init_AndroidCompiler = __esm({
18
19
  "src/compiler/AndroidCompiler.ts"() {
19
20
  init_CompilerBase();
20
- init_ANSNamespace();
21
21
  init_geospatial();
22
22
  init_depth_scanner();
23
23
  init_portal_ar();
@@ -401,9 +401,7 @@ var init_AndroidCompiler = __esm({
401
401
  this.indentLevel = 0;
402
402
  const pkg = this.options.packageName;
403
403
  this.emit("// Auto-generated by HoloScript AndroidCompiler");
404
- this.emit(
405
- `// Node Factory: ${this.escapeStringValue(composition.name, "Kotlin")}`
406
- );
404
+ this.emit(`// Node Factory: ${this.escapeStringValue(composition.name, "Kotlin")}`);
407
405
  this.emit("");
408
406
  this.emit(`package ${pkg}`);
409
407
  this.emit("");
@@ -678,12 +676,16 @@ dependencies {
678
676
  emitGeoAnchorSetup(composition) {
679
677
  this.emit("");
680
678
  this.emit("// === Geo-Anchor: GPS-pinned persistent holograms ===");
681
- this.emit("private var fusedLocationClient: com.google.android.gms.location.FusedLocationProviderClient? = null");
679
+ this.emit(
680
+ "private var fusedLocationClient: com.google.android.gms.location.FusedLocationProviderClient? = null"
681
+ );
682
682
  this.emit("private val geoAnchors = mutableMapOf<String, Anchor>()");
683
683
  this.emit("");
684
684
  this.emit("private fun setupGeoAnchors() {");
685
685
  this.indentLevel++;
686
- this.emit("fusedLocationClient = com.google.android.gms.location.LocationServices.getFusedLocationProviderClient(this)");
686
+ this.emit(
687
+ "fusedLocationClient = com.google.android.gms.location.LocationServices.getFusedLocationProviderClient(this)"
688
+ );
687
689
  this.emit("");
688
690
  const usesGeospatial = this.compositionHasTrait(composition, "geo_arcore_geospatial");
689
691
  if (usesGeospatial) {
@@ -721,7 +723,9 @@ dependencies {
721
723
  const headingConfig = typeof headingTrait === "string" ? {} : headingTrait?.config || {};
722
724
  const heading = headingConfig.degrees ?? 0;
723
725
  this.emit(`// Geo-anchor: ${this.escapeStringValue(obj.name, "Kotlin")}`);
724
- this.emit(`createGeoAnchor("${this.escapeStringValue(obj.name, "Kotlin")}", ${lat}, ${lng}, ${alt}, ${heading}f)`);
726
+ this.emit(
727
+ `createGeoAnchor("${this.escapeStringValue(obj.name, "Kotlin")}", ${lat}, ${lng}, ${alt}, ${heading}f)`
728
+ );
725
729
  }
726
730
  const usesPersist = this.compositionHasTrait(composition, "geo_persist");
727
731
  const usesCloud = this.compositionHasTrait(composition, "geo_cloud_anchor");
@@ -733,13 +737,17 @@ dependencies {
733
737
  this.indentLevel--;
734
738
  this.emit("}");
735
739
  this.emit("");
736
- this.emit("private fun createGeoAnchor(name: String, lat: Double, lng: Double, alt: Double, heading: Float) {");
740
+ this.emit(
741
+ "private fun createGeoAnchor(name: String, lat: Double, lng: Double, alt: Double, heading: Float) {"
742
+ );
737
743
  this.indentLevel++;
738
744
  this.emit("val session = arFragment.arSceneView.session ?: return");
739
745
  this.emit("val earth = session.earth ?: return");
740
746
  this.emit("if (earth.trackingState != TrackingState.TRACKING) return");
741
747
  this.emit("");
742
- this.emit("val anchor = earth.createAnchor(lat, lng, alt, 0f, 0f, Math.sin(Math.toRadians(heading.toDouble() / 2)).toFloat(), Math.cos(Math.toRadians(heading.toDouble() / 2)).toFloat())");
748
+ this.emit(
749
+ "val anchor = earth.createAnchor(lat, lng, alt, 0f, 0f, Math.sin(Math.toRadians(heading.toDouble() / 2)).toFloat(), Math.cos(Math.toRadians(heading.toDouble() / 2)).toFloat())"
750
+ );
743
751
  this.emit("geoAnchors[name] = anchor");
744
752
  this.emit("");
745
753
  this.emit("val anchorNode = AnchorNode(anchor)");
@@ -843,14 +851,18 @@ dependencies {
843
851
  this.emit(`val horizontalAccuracy = geospatialState.horizontalAccuracy`);
844
852
  this.emit(`val headingAccuracy = geospatialState.headingAccuracy`);
845
853
  this.emit("");
846
- this.emit(`if (horizontalAccuracy > ${GEOSPATIAL_DEFAULTS.vps.accuracyThreshold} || headingAccuracy > ${GEOSPATIAL_DEFAULTS.vps.headingAccuracyThreshold}) {`);
854
+ this.emit(
855
+ `if (horizontalAccuracy > ${GEOSPATIAL_DEFAULTS.vps.accuracyThreshold} || headingAccuracy > ${GEOSPATIAL_DEFAULTS.vps.headingAccuracyThreshold}) {`
856
+ );
847
857
  this.indentLevel++;
848
858
  this.emit("// Accuracy not yet sufficient for anchoring");
849
859
  this.emit("return@addOnUpdateListener");
850
860
  this.indentLevel--;
851
861
  this.emit("}");
852
862
  this.emit("");
853
- this.emit('android.util.Log.d("HoloScript", "Geospatial tracking: accuracy=$horizontalAccuracy m, heading=$headingAccuracy deg")');
863
+ this.emit(
864
+ 'android.util.Log.d("HoloScript", "Geospatial tracking: accuracy=$horizontalAccuracy m, heading=$headingAccuracy deg")'
865
+ );
854
866
  if (usesStreetscape) {
855
867
  this.emit("");
856
868
  this.emit("// Process Streetscape Geometry meshes");
@@ -869,33 +881,43 @@ dependencies {
869
881
  const lng = tConfig.longitude ?? GEOSPATIAL_DEFAULTS.anchor.longitude;
870
882
  const alt = tConfig.altitude ?? GEOSPATIAL_DEFAULTS.anchor.altitude;
871
883
  const heading = tConfig.heading ?? GEOSPATIAL_DEFAULTS.anchor.heading;
872
- this.emit(`createGeospatialAnchor("${this.escapeStringValue(obj.name, "Kotlin")}", ${lat}, ${lng}, ${alt}, ${heading}f)`);
884
+ this.emit(
885
+ `createGeospatialAnchor("${this.escapeStringValue(obj.name, "Kotlin")}", ${lat}, ${lng}, ${alt}, ${heading}f)`
886
+ );
873
887
  }
874
888
  if (tName === "geospatial_terrain_anchor") {
875
889
  const lat = tConfig.latitude ?? GEOSPATIAL_DEFAULTS.terrainAnchor.latitude;
876
890
  const lng = tConfig.longitude ?? GEOSPATIAL_DEFAULTS.terrainAnchor.longitude;
877
891
  const altOffset = tConfig.altitudeOffset ?? GEOSPATIAL_DEFAULTS.terrainAnchor.altitudeOffset;
878
892
  const heading = tConfig.heading ?? GEOSPATIAL_DEFAULTS.terrainAnchor.heading;
879
- this.emit(`resolveTerrainAnchor("${this.escapeStringValue(obj.name, "Kotlin")}", ${lat}, ${lng}, ${altOffset}, ${heading}f)`);
893
+ this.emit(
894
+ `resolveTerrainAnchor("${this.escapeStringValue(obj.name, "Kotlin")}", ${lat}, ${lng}, ${altOffset}, ${heading}f)`
895
+ );
880
896
  }
881
897
  if (tName === "geospatial_rooftop_anchor") {
882
898
  const lat = tConfig.latitude ?? GEOSPATIAL_DEFAULTS.rooftopAnchor.latitude;
883
899
  const lng = tConfig.longitude ?? GEOSPATIAL_DEFAULTS.rooftopAnchor.longitude;
884
900
  const altOffset = tConfig.altitudeOffset ?? GEOSPATIAL_DEFAULTS.rooftopAnchor.altitudeOffset;
885
901
  const heading = tConfig.heading ?? GEOSPATIAL_DEFAULTS.rooftopAnchor.heading;
886
- this.emit(`resolveRooftopAnchor("${this.escapeStringValue(obj.name, "Kotlin")}", ${lat}, ${lng}, ${altOffset}, ${heading}f)`);
902
+ this.emit(
903
+ `resolveRooftopAnchor("${this.escapeStringValue(obj.name, "Kotlin")}", ${lat}, ${lng}, ${altOffset}, ${heading}f)`
904
+ );
887
905
  }
888
906
  }
889
907
  }
890
908
  this.indentLevel--;
891
909
  this.emit("}");
892
910
  this.emit("");
893
- this.emit("private fun createGeospatialAnchor(name: String, lat: Double, lng: Double, alt: Double, heading: Float) {");
911
+ this.emit(
912
+ "private fun createGeospatialAnchor(name: String, lat: Double, lng: Double, alt: Double, heading: Float) {"
913
+ );
894
914
  this.indentLevel++;
895
915
  this.emit("val earthRef = earth ?: return");
896
916
  this.emit("if (earthRef.trackingState != TrackingState.TRACKING) return");
897
917
  this.emit("");
898
- this.emit("val anchor = earthRef.createAnchor(lat, lng, alt, 0f, 0f, Math.sin(Math.toRadians(heading.toDouble() / 2)).toFloat(), Math.cos(Math.toRadians(heading.toDouble() / 2)).toFloat())");
918
+ this.emit(
919
+ "val anchor = earthRef.createAnchor(lat, lng, alt, 0f, 0f, Math.sin(Math.toRadians(heading.toDouble() / 2)).toFloat(), Math.cos(Math.toRadians(heading.toDouble() / 2)).toFloat())"
920
+ );
899
921
  this.emit("geospatialAnchors[name] = anchor");
900
922
  this.emit("");
901
923
  this.emit("val anchorNode = AnchorNode(anchor)");
@@ -914,7 +936,9 @@ dependencies {
914
936
  this.emit("}");
915
937
  this.emit("");
916
938
  if (this.compositionHasTrait(composition, "geospatial_terrain_anchor")) {
917
- this.emit("private fun resolveTerrainAnchor(name: String, lat: Double, lng: Double, altOffset: Double, heading: Float) {");
939
+ this.emit(
940
+ "private fun resolveTerrainAnchor(name: String, lat: Double, lng: Double, altOffset: Double, heading: Float) {"
941
+ );
918
942
  this.indentLevel++;
919
943
  this.emit("val earthRef = earth ?: return");
920
944
  this.emit("if (earthRef.trackingState != TrackingState.TRACKING) return");
@@ -924,7 +948,9 @@ dependencies {
924
948
  this.emit("val qz = 0f");
925
949
  this.emit("val qw = Math.cos(Math.toRadians(heading.toDouble() / 2)).toFloat()");
926
950
  this.emit("");
927
- this.emit("earthRef.resolveAnchorOnTerrainAsync(lat, lng, altOffset, qx, qy, qz, qw) { anchor, state ->");
951
+ this.emit(
952
+ "earthRef.resolveAnchorOnTerrainAsync(lat, lng, altOffset, qx, qy, qz, qw) { anchor, state ->"
953
+ );
928
954
  this.indentLevel++;
929
955
  this.emit("if (state == Anchor.TerrainAnchorState.SUCCESS && anchor != null) {");
930
956
  this.indentLevel++;
@@ -932,7 +958,9 @@ dependencies {
932
958
  this.emit("val anchorNode = AnchorNode(anchor)");
933
959
  this.emit("anchorNode.setParent(arFragment.arSceneView.scene)");
934
960
  this.emit("");
935
- this.emit("NodeFactory.createDefaultNode(this@" + this.options.className + "Activity) { renderable ->");
961
+ this.emit(
962
+ "NodeFactory.createDefaultNode(this@" + this.options.className + "Activity) { renderable ->"
963
+ );
936
964
  this.indentLevel++;
937
965
  this.emit("val node = TransformableNode(arFragment.transformationSystem)");
938
966
  this.emit("node.setParent(anchorNode)");
@@ -950,7 +978,9 @@ dependencies {
950
978
  this.emit("");
951
979
  }
952
980
  if (this.compositionHasTrait(composition, "geospatial_rooftop_anchor")) {
953
- this.emit("private fun resolveRooftopAnchor(name: String, lat: Double, lng: Double, altOffset: Double, heading: Float) {");
981
+ this.emit(
982
+ "private fun resolveRooftopAnchor(name: String, lat: Double, lng: Double, altOffset: Double, heading: Float) {"
983
+ );
954
984
  this.indentLevel++;
955
985
  this.emit("val earthRef = earth ?: return");
956
986
  this.emit("if (earthRef.trackingState != TrackingState.TRACKING) return");
@@ -960,7 +990,9 @@ dependencies {
960
990
  this.emit("val qz = 0f");
961
991
  this.emit("val qw = Math.cos(Math.toRadians(heading.toDouble() / 2)).toFloat()");
962
992
  this.emit("");
963
- this.emit("earthRef.resolveAnchorOnRooftopAsync(lat, lng, altOffset, qx, qy, qz, qw) { anchor, state ->");
993
+ this.emit(
994
+ "earthRef.resolveAnchorOnRooftopAsync(lat, lng, altOffset, qx, qy, qz, qw) { anchor, state ->"
995
+ );
964
996
  this.indentLevel++;
965
997
  this.emit("if (state == Anchor.RooftopAnchorState.SUCCESS && anchor != null) {");
966
998
  this.indentLevel++;
@@ -968,7 +1000,9 @@ dependencies {
968
1000
  this.emit("val anchorNode = AnchorNode(anchor)");
969
1001
  this.emit("anchorNode.setParent(arFragment.arSceneView.scene)");
970
1002
  this.emit("");
971
- this.emit("NodeFactory.createDefaultNode(this@" + this.options.className + "Activity) { renderable ->");
1003
+ this.emit(
1004
+ "NodeFactory.createDefaultNode(this@" + this.options.className + "Activity) { renderable ->"
1005
+ );
972
1006
  this.indentLevel++;
973
1007
  this.emit("val node = TransformableNode(arFragment.transformationSystem)");
974
1008
  this.emit("node.setParent(anchorNode)");
@@ -988,14 +1022,18 @@ dependencies {
988
1022
  if (usesStreetscape) {
989
1023
  this.emit("private fun processStreetscapeGeometry(session: Session) {");
990
1024
  this.indentLevel++;
991
- this.emit("val streetscapeGeometries = session.getAllTrackables(StreetscapeGeometry::class.java)");
1025
+ this.emit(
1026
+ "val streetscapeGeometries = session.getAllTrackables(StreetscapeGeometry::class.java)"
1027
+ );
992
1028
  this.emit("for (geometry in streetscapeGeometries) {");
993
1029
  this.indentLevel++;
994
1030
  this.emit("if (geometry.trackingState != TrackingState.TRACKING) continue");
995
1031
  this.emit("");
996
1032
  this.emit("val mesh = geometry.meshes.firstOrNull() ?: continue");
997
1033
  this.emit("val type = geometry.type");
998
- this.emit('android.util.Log.d("HoloScript", "Streetscape geometry: type=$type, vertices=${mesh.vertexList.size}")');
1034
+ this.emit(
1035
+ 'android.util.Log.d("HoloScript", "Streetscape geometry: type=$type, vertices=${mesh.vertexList.size}")'
1036
+ );
999
1037
  this.emit("");
1000
1038
  this.emit("// Streetscape mesh available for occlusion, raycasting, or rendering");
1001
1039
  this.emit("// Type is TERRAIN or BUILDING");
@@ -1033,7 +1071,9 @@ dependencies {
1033
1071
  const hasExport = this.compositionHasTrait(composition, "depth_export");
1034
1072
  this.emit("");
1035
1073
  this.emit("// === Depth Scanner: ARCore depth, ToF, stereo (M.010.02b) ===");
1036
- this.emit(`private val depthConfidenceThreshold = ${DEPTH_SCANNER_DEFAULTS.scan.confidenceThreshold}`);
1074
+ this.emit(
1075
+ `private val depthConfidenceThreshold = ${DEPTH_SCANNER_DEFAULTS.scan.confidenceThreshold}`
1076
+ );
1037
1077
  this.emit(`private val depthMaxMeters = ${DEPTH_SCANNER_DEFAULTS.scan.maxDepthMeters}f`);
1038
1078
  this.emit(`private val depthMeshDecimation = ${DEPTH_SCANNER_DEFAULTS.scan.meshDecimation}f`);
1039
1079
  this.emit("private var depthImage: android.media.Image? = null");
@@ -1104,13 +1144,17 @@ dependencies {
1104
1144
  this.emit("val session = arFragment.arSceneView.session ?: return");
1105
1145
  this.emit("");
1106
1146
  this.emit("// Check ToF sensor availability");
1107
- this.emit('val hasToF = packageManager.hasSystemFeature("android.hardware.sensor.proximity")');
1147
+ this.emit(
1148
+ 'val hasToF = packageManager.hasSystemFeature("android.hardware.sensor.proximity")'
1149
+ );
1108
1150
  this.emit("");
1109
1151
  this.emit("// Check ARCore depth support");
1110
1152
  this.emit("val hasARCoreDepth = session.isDepthModeSupported(Config.DepthMode.AUTOMATIC)");
1111
1153
  this.emit("");
1112
1154
  this.emit("// Check dual camera for stereo depth");
1113
- this.emit("val cameraManager = getSystemService(android.hardware.camera2.CameraManager::class.java)");
1155
+ this.emit(
1156
+ "val cameraManager = getSystemService(android.hardware.camera2.CameraManager::class.java)"
1157
+ );
1114
1158
  this.emit("val hasStereo = (cameraManager?.cameraIdList?.size ?: 0) >= 2");
1115
1159
  this.emit("");
1116
1160
  this.emit("// Priority: ToF > ARCore ML > Stereo");
@@ -1122,7 +1166,9 @@ dependencies {
1122
1166
  this.emit('else -> "None"');
1123
1167
  this.indentLevel--;
1124
1168
  this.emit("}");
1125
- this.emit('android.util.Log.d("HoloScript", "Depth source selected: $depthSource (ToF=$hasToF, ARCore=$hasARCoreDepth, Stereo=$hasStereo)")');
1169
+ this.emit(
1170
+ 'android.util.Log.d("HoloScript", "Depth source selected: $depthSource (ToF=$hasToF, ARCore=$hasARCoreDepth, Stereo=$hasStereo)")'
1171
+ );
1126
1172
  this.indentLevel--;
1127
1173
  this.emit("}");
1128
1174
  this.emit("");
@@ -1177,7 +1223,9 @@ dependencies {
1177
1223
  this.indentLevel--;
1178
1224
  this.emit("}");
1179
1225
  this.emit("");
1180
- this.emit('android.util.Log.d("HoloScript", "Depth mesh: ${vertices.size} vertices, ${indices.size / 3} triangles")');
1226
+ this.emit(
1227
+ 'android.util.Log.d("HoloScript", "Depth mesh: ${vertices.size} vertices, ${indices.size / 3} triangles")'
1228
+ );
1181
1229
  if (hasMeshToHolo) {
1182
1230
  this.emit("convertMeshToHolo(vertices, indices)");
1183
1231
  }
@@ -1202,7 +1250,9 @@ dependencies {
1202
1250
  this.emit("))");
1203
1251
  this.indentLevel--;
1204
1252
  this.emit("}");
1205
- this.emit('android.util.Log.d("HoloScript", "Converted ${holoEntities.size} depth points to .holo entities")');
1253
+ this.emit(
1254
+ 'android.util.Log.d("HoloScript", "Converted ${holoEntities.size} depth points to .holo entities")'
1255
+ );
1206
1256
  this.indentLevel--;
1207
1257
  this.emit("}");
1208
1258
  this.emit("");
@@ -1278,7 +1328,9 @@ dependencies {
1278
1328
  }
1279
1329
  }
1280
1330
  this.emit("// Auto-generated by HoloScript AndroidCompiler \u2014 NPU Scene Understanding");
1281
- this.emit(`// Source: composition "${this.escapeStringValue(composition.name, "Kotlin")}"`);
1331
+ this.emit(
1332
+ `// Source: composition "${this.escapeStringValue(composition.name, "Kotlin")}"`
1333
+ );
1282
1334
  this.emit("// Requires ML Kit, CameraX, NNAPI delegate");
1283
1335
  this.emit("// Do not edit manually \u2014 regenerate from .holo source");
1284
1336
  this.emit("");
@@ -1367,7 +1419,9 @@ dependencies {
1367
1419
  this.emit(" .addOnSuccessListener { objects ->");
1368
1420
  this.indentLevel++;
1369
1421
  this.emit("val results = objects");
1370
- this.emit(" .filter { it.labels.isNotEmpty() && (it.labels.firstOrNull()?.confidence ?: 0f) >= confidenceThreshold }");
1422
+ this.emit(
1423
+ " .filter { it.labels.isNotEmpty() && (it.labels.firstOrNull()?.confidence ?: 0f) >= confidenceThreshold }"
1424
+ );
1371
1425
  this.emit(" .take(maxDetections)");
1372
1426
  this.emit(" .map { obj ->");
1373
1427
  this.indentLevel++;
@@ -1471,7 +1525,9 @@ dependencies {
1471
1525
  if (usedTraits.has("npu_entity_pipe")) {
1472
1526
  this.emit("// MARK: Entity Pipeline (npu_entity_pipe)");
1473
1527
  this.emit("");
1474
- this.emit("fun mapDetectionsToEntities(detections: List<NPUDetection>, arFragment: com.google.ar.sceneform.ux.ArFragment) {");
1528
+ this.emit(
1529
+ "fun mapDetectionsToEntities(detections: List<NPUDetection>, arFragment: com.google.ar.sceneform.ux.ArFragment) {"
1530
+ );
1475
1531
  this.indentLevel++;
1476
1532
  this.emit("val scene = arFragment.arSceneView.scene");
1477
1533
  this.emit("for (detection in detections) {");
@@ -1490,8 +1546,12 @@ dependencies {
1490
1546
  this.emit(" com.google.ar.sceneform.rendering.Color(0.2f, 0.6f, 1.0f, 0.6f))");
1491
1547
  this.emit(" .thenAccept { material ->");
1492
1548
  this.indentLevel++;
1493
- this.emit(`val renderable = com.google.ar.sceneform.rendering.ShapeFactory.makeSphere(${defaults.entityScale}f, com.google.ar.sceneform.math.Vector3.zero(), material)`);
1494
- this.emit("val node = com.google.ar.sceneform.ux.TransformableNode(arFragment.transformationSystem)");
1549
+ this.emit(
1550
+ `val renderable = com.google.ar.sceneform.rendering.ShapeFactory.makeSphere(${defaults.entityScale}f, com.google.ar.sceneform.math.Vector3.zero(), material)`
1551
+ );
1552
+ this.emit(
1553
+ "val node = com.google.ar.sceneform.ux.TransformableNode(arFragment.transformationSystem)"
1554
+ );
1495
1555
  this.emit("node.setParent(anchorNode)");
1496
1556
  this.emit("node.renderable = renderable");
1497
1557
  this.emit("node.name = detection.label");
@@ -1527,7 +1587,9 @@ dependencies {
1527
1587
  this.emit("val mediaImage = imageProxy.image");
1528
1588
  this.emit("if (mediaImage != null) {");
1529
1589
  this.indentLevel++;
1530
- this.emit("val image = InputImage.fromMediaImage(mediaImage, imageProxy.imageInfo.rotationDegrees)");
1590
+ this.emit(
1591
+ "val image = InputImage.fromMediaImage(mediaImage, imageProxy.imageInfo.rotationDegrees)"
1592
+ );
1531
1593
  if (usedTraits.has("npu_classify")) {
1532
1594
  this.emit("classifyImage(image)");
1533
1595
  }
@@ -1582,7 +1644,9 @@ dependencies {
1582
1644
  this.emit(") {");
1583
1645
  this.indentLevel++;
1584
1646
  this.emit("com.google.ar.sceneform.rendering.ViewRenderable.builder()");
1585
- this.emit(" .setView(arFragment.requireContext(), android.widget.TextView(arFragment.requireContext()).apply {");
1647
+ this.emit(
1648
+ " .setView(arFragment.requireContext(), android.widget.TextView(arFragment.requireContext()).apply {"
1649
+ );
1586
1650
  this.indentLevel++;
1587
1651
  this.emit('text = "${detection.label} (${(detection.confidence * 100).toInt()}%)"');
1588
1652
  this.emit("setTextColor(android.graphics.Color.WHITE)");
@@ -1596,7 +1660,9 @@ dependencies {
1596
1660
  this.indentLevel++;
1597
1661
  this.emit("val labelNode = com.google.ar.sceneform.Node()");
1598
1662
  this.emit("labelNode.setParent(anchorNode)");
1599
- this.emit(`labelNode.localPosition = com.google.ar.sceneform.math.Vector3(0f, ${defaults.labelOffsetY}f, 0f)`);
1663
+ this.emit(
1664
+ `labelNode.localPosition = com.google.ar.sceneform.math.Vector3(0f, ${defaults.labelOffsetY}f, 0f)`
1665
+ );
1600
1666
  this.emit("labelNode.renderable = renderable");
1601
1667
  this.emit('Log.d("HoloScript", "Label overlay: ${detection.label}")');
1602
1668
  this.indentLevel--;
@@ -1788,7 +1854,9 @@ dependencies {
1788
1854
  this.indentLevel++;
1789
1855
  this.emit("override fun onSensorChanged(event: SensorEvent) {");
1790
1856
  this.indentLevel++;
1791
- this.emit("val tiltAngle = Math.toDegrees(Math.atan2(event.values[1].toDouble(), event.values[2].toDouble())).toFloat()");
1857
+ this.emit(
1858
+ "val tiltAngle = Math.toDegrees(Math.atan2(event.values[1].toDouble(), event.values[2].toDouble())).toFloat()"
1859
+ );
1792
1860
  this.emit("portalRenderer?.setPortalVisibility(Math.abs(tiltAngle) > portalTiltThreshold)");
1793
1861
  this.indentLevel--;
1794
1862
  this.emit("}");
@@ -1857,7 +1925,9 @@ dependencies {
1857
1925
  this.emit("val options = com.google.mediapipe.solutions.hands.HandsOptions.builder()");
1858
1926
  this.emit(` .setMaxNumHands(${maxHands})`);
1859
1927
  this.emit(" .setStaticImageMode(false)");
1860
- this.emit(" .setRunningMode(com.google.mediapipe.solutions.hands.Hands.RUNNING_MODE_LIVE_STREAM)");
1928
+ this.emit(
1929
+ " .setRunningMode(com.google.mediapipe.solutions.hands.Hands.RUNNING_MODE_LIVE_STREAM)"
1930
+ );
1861
1931
  if (hasConfidence) {
1862
1932
  this.emit(" .setMinHandDetectionConfidence(0.7f)");
1863
1933
  } else {
@@ -1880,15 +1950,21 @@ dependencies {
1880
1950
  this.emit("");
1881
1951
  this.emit("private fun startCameraForHandTracking() {");
1882
1952
  this.indentLevel++;
1883
- this.emit("val cameraProviderFuture = androidx.camera.lifecycle.ProcessCameraProvider.getInstance(this)");
1953
+ this.emit(
1954
+ "val cameraProviderFuture = androidx.camera.lifecycle.ProcessCameraProvider.getInstance(this)"
1955
+ );
1884
1956
  this.emit("cameraProviderFuture.addListener({");
1885
1957
  this.indentLevel++;
1886
1958
  this.emit("val cameraProvider = cameraProviderFuture.get()");
1887
1959
  this.emit("val preview = androidx.camera.core.Preview.Builder().build()");
1888
1960
  this.emit("val imageAnalysis = androidx.camera.core.ImageAnalysis.Builder()");
1889
- this.emit(" .setBackpressureStrategy(androidx.camera.core.ImageAnalysis.STRATEGY_KEEP_ONLY_LATEST)");
1961
+ this.emit(
1962
+ " .setBackpressureStrategy(androidx.camera.core.ImageAnalysis.STRATEGY_KEEP_ONLY_LATEST)"
1963
+ );
1890
1964
  this.emit(" .build()");
1891
- this.emit("imageAnalysis.setAnalyzer(java.util.concurrent.Executors.newSingleThreadExecutor()) { imageProxy ->");
1965
+ this.emit(
1966
+ "imageAnalysis.setAnalyzer(java.util.concurrent.Executors.newSingleThreadExecutor()) { imageProxy ->"
1967
+ );
1892
1968
  this.indentLevel++;
1893
1969
  this.emit("handsolution?.send(imageProxy)");
1894
1970
  this.indentLevel--;
@@ -1901,7 +1977,9 @@ dependencies {
1901
1977
  this.indentLevel--;
1902
1978
  this.emit("}");
1903
1979
  this.emit("");
1904
- this.emit("private fun processHandResults(result: com.google.mediapipe.solutions.hands.HandsResult) {");
1980
+ this.emit(
1981
+ "private fun processHandResults(result: com.google.mediapipe.solutions.hands.HandsResult) {"
1982
+ );
1905
1983
  this.indentLevel++;
1906
1984
  this.emit("if (result.multiHandLandmarks().isEmpty()) return");
1907
1985
  this.emit("");
@@ -1951,7 +2029,9 @@ dependencies {
1951
2029
  if (hasConfidence) {
1952
2030
  this.emit("// Filter low-confidence landmarks");
1953
2031
  this.emit("val minConfidence = 0.7f");
1954
- this.emit("if (thumbTip.visibility < minConfidence || indexTip.visibility < minConfidence) {");
2032
+ this.emit(
2033
+ "if (thumbTip.visibility < minConfidence || indexTip.visibility < minConfidence) {"
2034
+ );
1955
2035
  this.indentLevel++;
1956
2036
  this.emit("continue");
1957
2037
  this.indentLevel--;
@@ -2024,7 +2104,9 @@ dependencies {
2024
2104
  this.emit("}");
2025
2105
  if (hasToSpatial) {
2026
2106
  this.emit("");
2027
- this.emit("private fun onSpatialInput(gesture: String, handIndex: Int, x: Float, y: Float, z: Float) {");
2107
+ this.emit(
2108
+ "private fun onSpatialInput(gesture: String, handIndex: Int, x: Float, y: Float, z: Float) {"
2109
+ );
2028
2110
  this.indentLevel++;
2029
2111
  this.emit("// Bridge to HoloScript spatial_input event system");
2030
2112
  this.emit("val event = mapOf(");
@@ -2091,15 +2173,21 @@ dependencies {
2091
2173
  if (this.compositionHasTrait(composition, "author_gyro_place")) {
2092
2174
  this.emit("private fun setupGyroPlacement() {");
2093
2175
  this.indentLevel++;
2094
- this.emit("sensorManager = getSystemService(SENSOR_SERVICE) as android.hardware.SensorManager");
2095
- this.emit("rotationSensor = sensorManager?.getDefaultSensor(android.hardware.Sensor.TYPE_ROTATION_VECTOR)");
2176
+ this.emit(
2177
+ "sensorManager = getSystemService(SENSOR_SERVICE) as android.hardware.SensorManager"
2178
+ );
2179
+ this.emit(
2180
+ "rotationSensor = sensorManager?.getDefaultSensor(android.hardware.Sensor.TYPE_ROTATION_VECTOR)"
2181
+ );
2096
2182
  this.indentLevel--;
2097
2183
  this.emit("}");
2098
2184
  }
2099
2185
  if (this.compositionHasTrait(composition, "author_pinch_scale")) {
2100
2186
  this.emit("private fun setupPinchScale() {");
2101
2187
  this.indentLevel++;
2102
- this.emit("scaleGestureDetector = android.view.ScaleGestureDetector(this, object : android.view.ScaleGestureDetector.SimpleOnScaleGestureListener() {");
2188
+ this.emit(
2189
+ "scaleGestureDetector = android.view.ScaleGestureDetector(this, object : android.view.ScaleGestureDetector.SimpleOnScaleGestureListener() {"
2190
+ );
2103
2191
  this.indentLevel++;
2104
2192
  this.emit("override fun onScale(detector: android.view.ScaleGestureDetector): Boolean {");
2105
2193
  this.indentLevel++;
@@ -2116,7 +2204,9 @@ dependencies {
2116
2204
  if (this.compositionHasTrait(composition, "author_shake_undo")) {
2117
2205
  this.emit("private fun setupShakeUndo() {");
2118
2206
  this.indentLevel++;
2119
- this.emit("val accelerometer = sensorManager?.getDefaultSensor(android.hardware.Sensor.TYPE_ACCELEROMETER)");
2207
+ this.emit(
2208
+ "val accelerometer = sensorManager?.getDefaultSensor(android.hardware.Sensor.TYPE_ACCELEROMETER)"
2209
+ );
2120
2210
  this.emit("// Shake detection triggers undoStack.removeLastOrNull()?.invoke()");
2121
2211
  this.indentLevel--;
2122
2212
  this.emit("}");
@@ -2139,7 +2229,9 @@ dependencies {
2139
2229
  const pkg = this.options.packageName;
2140
2230
  const cls = this.options.className;
2141
2231
  this.emit("// Auto-generated by HoloScript AndroidCompiler \u2014 Haptic Feedback");
2142
- this.emit(`// Source: composition "${this.escapeStringValue(composition.name, "Kotlin")}"`);
2232
+ this.emit(
2233
+ `// Source: composition "${this.escapeStringValue(composition.name, "Kotlin")}"`
2234
+ );
2143
2235
  this.emit("// Requires Android API 26+ (VibrationEffect)");
2144
2236
  this.emit("");
2145
2237
  this.emit(`package ${pkg}`);
@@ -2156,11 +2248,15 @@ dependencies {
2156
2248
  this.emit("");
2157
2249
  this.emit("private val vibrator: Vibrator = if (Build.VERSION.SDK_INT >= 31) {");
2158
2250
  this.indentLevel++;
2159
- this.emit("(context.getSystemService(Context.VIBRATOR_MANAGER_SERVICE) as VibratorManager).defaultVibrator");
2251
+ this.emit(
2252
+ "(context.getSystemService(Context.VIBRATOR_MANAGER_SERVICE) as VibratorManager).defaultVibrator"
2253
+ );
2160
2254
  this.indentLevel--;
2161
2255
  this.emit("} else {");
2162
2256
  this.indentLevel++;
2163
- this.emit('@Suppress("DEPRECATION") context.getSystemService(Context.VIBRATOR_SERVICE) as Vibrator');
2257
+ this.emit(
2258
+ '@Suppress("DEPRECATION") context.getSystemService(Context.VIBRATOR_SERVICE) as Vibrator'
2259
+ );
2164
2260
  this.indentLevel--;
2165
2261
  this.emit("}");
2166
2262
  this.emit("");
@@ -2185,7 +2281,9 @@ dependencies {
2185
2281
  this.emit("fun onProximity(distance: Float) {");
2186
2282
  this.indentLevel++;
2187
2283
  this.emit("if (!enabled) return");
2188
- this.emit("val amplitude = ((1.0f - distance.coerceIn(0f, 1f)) * 255 * intensityMultiplier).toInt()");
2284
+ this.emit(
2285
+ "val amplitude = ((1.0f - distance.coerceIn(0f, 1f)) * 255 * intensityMultiplier).toInt()"
2286
+ );
2189
2287
  this.emit("vibrator.vibrate(VibrationEffect.createOneShot(50, amplitude.coerceIn(1, 255)))");
2190
2288
  this.indentLevel--;
2191
2289
  this.emit("}");
@@ -2227,7 +2325,9 @@ dependencies {
2227
2325
  const pkg = this.options.packageName;
2228
2326
  const cls = this.options.className;
2229
2327
  this.emit("// Auto-generated by HoloScript AndroidCompiler \u2014 Nearby Connections");
2230
- this.emit(`// Source: composition "${this.escapeStringValue(composition.name, "Kotlin")}"`);
2328
+ this.emit(
2329
+ `// Source: composition "${this.escapeStringValue(composition.name, "Kotlin")}"`
2330
+ );
2231
2331
  this.emit("// Requires Google Play Services Nearby");
2232
2332
  this.emit("");
2233
2333
  this.emit(`package ${pkg}`);
@@ -2251,12 +2351,16 @@ dependencies {
2251
2351
  this.emit("Nearby.getConnectionsClient(context).acceptConnection(endpointId, payloadCallback)");
2252
2352
  this.indentLevel--;
2253
2353
  this.emit("}");
2254
- this.emit("override fun onConnectionResult(endpointId: String, result: ConnectionResolution) {");
2354
+ this.emit(
2355
+ "override fun onConnectionResult(endpointId: String, result: ConnectionResolution) {"
2356
+ );
2255
2357
  this.indentLevel++;
2256
2358
  this.emit("if (result.status.isSuccess) { connectedEndpoints.add(endpointId) }");
2257
2359
  this.indentLevel--;
2258
2360
  this.emit("}");
2259
- this.emit("override fun onDisconnected(endpointId: String) { connectedEndpoints.remove(endpointId) }");
2361
+ this.emit(
2362
+ "override fun onDisconnected(endpointId: String) { connectedEndpoints.remove(endpointId) }"
2363
+ );
2260
2364
  this.indentLevel--;
2261
2365
  this.emit("}");
2262
2366
  this.emit("");
@@ -2267,15 +2371,21 @@ dependencies {
2267
2371
  this.emit('Log.d(TAG, "Payload received from $endpointId")');
2268
2372
  this.indentLevel--;
2269
2373
  this.emit("}");
2270
- this.emit("override fun onPayloadTransferUpdate(endpointId: String, update: PayloadTransferUpdate) {}");
2374
+ this.emit(
2375
+ "override fun onPayloadTransferUpdate(endpointId: String, update: PayloadTransferUpdate) {}"
2376
+ );
2271
2377
  this.indentLevel--;
2272
2378
  this.emit("}");
2273
2379
  this.emit("");
2274
2380
  if (this.compositionHasTrait(composition, "nearby_advertise")) {
2275
2381
  this.emit("fun startAdvertising() {");
2276
2382
  this.indentLevel++;
2277
- this.emit("val options = AdvertisingOptions.Builder().setStrategy(Strategy.P2P_CLUSTER).build()");
2278
- this.emit('Nearby.getConnectionsClient(context).startAdvertising("HoloDevice", SERVICE_ID, connectionCallback, options)');
2383
+ this.emit(
2384
+ "val options = AdvertisingOptions.Builder().setStrategy(Strategy.P2P_CLUSTER).build()"
2385
+ );
2386
+ this.emit(
2387
+ 'Nearby.getConnectionsClient(context).startAdvertising("HoloDevice", SERVICE_ID, connectionCallback, options)'
2388
+ );
2279
2389
  this.indentLevel--;
2280
2390
  this.emit("}");
2281
2391
  this.emit("");
@@ -2283,15 +2393,23 @@ dependencies {
2283
2393
  if (this.compositionHasTrait(composition, "nearby_discover")) {
2284
2394
  this.emit("fun startDiscovery() {");
2285
2395
  this.indentLevel++;
2286
- this.emit("val options = DiscoveryOptions.Builder().setStrategy(Strategy.P2P_CLUSTER).build()");
2287
- this.emit("Nearby.getConnectionsClient(context).startDiscovery(SERVICE_ID, object : EndpointDiscoveryCallback() {");
2396
+ this.emit(
2397
+ "val options = DiscoveryOptions.Builder().setStrategy(Strategy.P2P_CLUSTER).build()"
2398
+ );
2399
+ this.emit(
2400
+ "Nearby.getConnectionsClient(context).startDiscovery(SERVICE_ID, object : EndpointDiscoveryCallback() {"
2401
+ );
2288
2402
  this.indentLevel++;
2289
2403
  this.emit("override fun onEndpointFound(endpointId: String, info: DiscoveredEndpointInfo) {");
2290
2404
  this.indentLevel++;
2291
- this.emit('Nearby.getConnectionsClient(context).requestConnection("HoloDevice", endpointId, connectionCallback)');
2405
+ this.emit(
2406
+ 'Nearby.getConnectionsClient(context).requestConnection("HoloDevice", endpointId, connectionCallback)'
2407
+ );
2292
2408
  this.indentLevel--;
2293
2409
  this.emit("}");
2294
- this.emit('override fun onEndpointLost(endpointId: String) { Log.d(TAG, "Lost $endpointId") }');
2410
+ this.emit(
2411
+ 'override fun onEndpointLost(endpointId: String) { Log.d(TAG, "Lost $endpointId") }'
2412
+ );
2295
2413
  this.indentLevel--;
2296
2414
  this.emit("}, options)");
2297
2415
  this.indentLevel--;
@@ -2302,7 +2420,9 @@ dependencies {
2302
2420
  this.emit("fun broadcast(data: ByteArray) {");
2303
2421
  this.indentLevel++;
2304
2422
  this.emit("val payload = Payload.fromBytes(data)");
2305
- this.emit("connectedEndpoints.forEach { Nearby.getConnectionsClient(context).sendPayload(it, payload) }");
2423
+ this.emit(
2424
+ "connectedEndpoints.forEach { Nearby.getConnectionsClient(context).sendPayload(it, payload) }"
2425
+ );
2306
2426
  this.indentLevel--;
2307
2427
  this.emit("}");
2308
2428
  this.emit("");
@@ -2334,7 +2454,9 @@ dependencies {
2334
2454
  const pkg = this.options.packageName;
2335
2455
  const cls = this.options.className;
2336
2456
  this.emit("// Auto-generated by HoloScript AndroidCompiler \u2014 Foldable Display");
2337
- this.emit(`// Source: composition "${this.escapeStringValue(composition.name, "Kotlin")}"`);
2457
+ this.emit(
2458
+ `// Source: composition "${this.escapeStringValue(composition.name, "Kotlin")}"`
2459
+ );
2338
2460
  this.emit("// Requires Jetpack WindowManager");
2339
2461
  this.emit("");
2340
2462
  this.emit(`package ${pkg}`);
@@ -2364,9 +2486,13 @@ dependencies {
2364
2486
  this.indentLevel++;
2365
2487
  this.emit("viewModelScope.launch {");
2366
2488
  this.indentLevel++;
2367
- this.emit("WindowInfoTracker.getOrCreate(activity).windowLayoutInfo(activity).collect { layoutInfo ->");
2489
+ this.emit(
2490
+ "WindowInfoTracker.getOrCreate(activity).windowLayoutInfo(activity).collect { layoutInfo ->"
2491
+ );
2368
2492
  this.indentLevel++;
2369
- this.emit("val foldingFeature = layoutInfo.displayFeatures.filterIsInstance<FoldingFeature>().firstOrNull()");
2493
+ this.emit(
2494
+ "val foldingFeature = layoutInfo.displayFeatures.filterIsInstance<FoldingFeature>().firstOrNull()"
2495
+ );
2370
2496
  this.emit("if (foldingFeature != null) {");
2371
2497
  this.indentLevel++;
2372
2498
  this.emit("_foldState.value = when (foldingFeature.state) {");
@@ -2378,7 +2504,9 @@ dependencies {
2378
2504
  this.emit("}");
2379
2505
  if (this.compositionHasTrait(composition, "foldable_hinge_angle")) {
2380
2506
  this.emit("// Hinge angle exposed via foldingFeature orientation");
2381
- this.emit('Log.d("HoloFoldable", "Fold state: ${foldingFeature.state}, orientation: ${foldingFeature.orientation}")');
2507
+ this.emit(
2508
+ 'Log.d("HoloFoldable", "Fold state: ${foldingFeature.state}, orientation: ${foldingFeature.orientation}")'
2509
+ );
2382
2510
  }
2383
2511
  this.indentLevel--;
2384
2512
  this.emit("}");
@@ -2390,7 +2518,9 @@ dependencies {
2390
2518
  this.emit("}");
2391
2519
  this.emit("");
2392
2520
  if (this.compositionHasTrait(composition, "foldable_split_view")) {
2393
- this.emit("fun isSplitViewRecommended(): Boolean = _foldState.value == FoldState.HALF_OPENED");
2521
+ this.emit(
2522
+ "fun isSplitViewRecommended(): Boolean = _foldState.value == FoldState.HALF_OPENED"
2523
+ );
2394
2524
  this.emit("");
2395
2525
  }
2396
2526
  if (this.compositionHasTrait(composition, "foldable_tabletop")) {
@@ -2418,7 +2548,9 @@ dependencies {
2418
2548
  const pkg = this.options.packageName;
2419
2549
  const cls = this.options.className;
2420
2550
  this.emit("// Auto-generated by HoloScript AndroidCompiler \u2014 Samsung DeX");
2421
- this.emit(`// Source: composition "${this.escapeStringValue(composition.name, "Kotlin")}"`);
2551
+ this.emit(
2552
+ `// Source: composition "${this.escapeStringValue(composition.name, "Kotlin")}"`
2553
+ );
2422
2554
  this.emit("// Samsung DeX mode detection and desktop UI transition");
2423
2555
  this.emit("");
2424
2556
  this.emit(`package ${pkg}`);
@@ -2438,7 +2570,9 @@ dependencies {
2438
2570
  this.emit("return try {");
2439
2571
  this.indentLevel++;
2440
2572
  this.emit("val configClass = config.javaClass");
2441
- this.emit('val semDesktopModeEnabled = configClass.getField("SEM_DESKTOP_MODE_ENABLED").getInt(configClass)');
2573
+ this.emit(
2574
+ 'val semDesktopModeEnabled = configClass.getField("SEM_DESKTOP_MODE_ENABLED").getInt(configClass)'
2575
+ );
2442
2576
  this.emit('val enabledField = configClass.getField("semDesktopModeEnabled").getInt(config)');
2443
2577
  this.emit("enabledField == semDesktopModeEnabled");
2444
2578
  this.indentLevel--;
@@ -2519,7 +2653,9 @@ dependencies {
2519
2653
  }
2520
2654
  }
2521
2655
  this.emit("// Auto-generated by HoloScript AndroidCompiler \u2014 Google Lens Integration");
2522
- this.emit(`// Source: composition "${this.escapeStringValue(composition.name, "Kotlin")}"`);
2656
+ this.emit(
2657
+ `// Source: composition "${this.escapeStringValue(composition.name, "Kotlin")}"`
2658
+ );
2523
2659
  this.emit("// Requires ML Kit (vision, text, translate)");
2524
2660
  this.emit("");
2525
2661
  this.emit(`package ${pkg}`);
@@ -2548,7 +2684,9 @@ dependencies {
2548
2684
  this.emit("import com.google.mlkit.nl.translate.TranslatorOptions");
2549
2685
  }
2550
2686
  this.emit("");
2551
- this.emit("data class LensDetection(val label: String, val confidence: Float, val text: String? = null)");
2687
+ this.emit(
2688
+ "data class LensDetection(val label: String, val confidence: Float, val text: String? = null)"
2689
+ );
2552
2690
  this.emit("");
2553
2691
  this.emit(`class ${cls}LensManager : ViewModel() {`);
2554
2692
  this.indentLevel++;
@@ -2570,7 +2708,9 @@ dependencies {
2570
2708
  this.indentLevel++;
2571
2709
  this.emit("objectDetector.process(image).addOnSuccessListener { objects ->");
2572
2710
  this.indentLevel++;
2573
- this.emit("_detections.value = objects.flatMap { it.labels }.map { LensDetection(it.text, it.confidence) }");
2711
+ this.emit(
2712
+ "_detections.value = objects.flatMap { it.labels }.map { LensDetection(it.text, it.confidence) }"
2713
+ );
2574
2714
  this.indentLevel--;
2575
2715
  this.emit("}");
2576
2716
  this.indentLevel--;
@@ -2578,7 +2718,9 @@ dependencies {
2578
2718
  this.emit("");
2579
2719
  }
2580
2720
  if (usedTraits.has("lens_text_overlay")) {
2581
- this.emit("private val textRecognizer by lazy { TextRecognition.getClient(TextRecognizerOptions.Builder().build()) }");
2721
+ this.emit(
2722
+ "private val textRecognizer by lazy { TextRecognition.getClient(TextRecognizerOptions.Builder().build()) }"
2723
+ );
2582
2724
  this.emit("");
2583
2725
  this.emit("fun recognizeText(image: InputImage) {");
2584
2726
  this.indentLevel++;
@@ -2592,7 +2734,9 @@ dependencies {
2592
2734
  this.emit("");
2593
2735
  }
2594
2736
  if (usedTraits.has("lens_translate")) {
2595
- this.emit('fun translateText(text: String, targetLang: String = "es", callback: (String) -> Unit) {');
2737
+ this.emit(
2738
+ 'fun translateText(text: String, targetLang: String = "es", callback: (String) -> Unit) {'
2739
+ );
2596
2740
  this.indentLevel++;
2597
2741
  this.emit("val options = TranslatorOptions.Builder()");
2598
2742
  this.emit(" .setSourceLanguage(TranslateLanguage.ENGLISH)");
@@ -2664,14 +2808,22 @@ dependencies {
2664
2808
  this.emit("body { margin: 0; overflow: hidden; }");
2665
2809
  this.emit("canvas { display: block; }");
2666
2810
  if (usedTraits.has("webxr_dom_overlay")) {
2667
- this.emit("#overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }");
2668
- this.emit("#overlay .ui-panel { pointer-events: auto; background: rgba(0,0,0,0.6); color: #fff; padding: 12px; border-radius: 8px; margin: 16px; font-family: sans-serif; }");
2811
+ this.emit(
2812
+ "#overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }"
2813
+ );
2814
+ this.emit(
2815
+ "#overlay .ui-panel { pointer-events: auto; background: rgba(0,0,0,0.6); color: #fff; padding: 12px; border-radius: 8px; margin: 16px; font-family: sans-serif; }"
2816
+ );
2669
2817
  }
2670
- this.emit("#no-xr { display: none; padding: 20px; text-align: center; font-family: sans-serif; }");
2818
+ this.emit(
2819
+ "#no-xr { display: none; padding: 20px; text-align: center; font-family: sans-serif; }"
2820
+ );
2671
2821
  this.indentLevel--;
2672
2822
  this.emit("</style>");
2673
2823
  this.emit('<script type="importmap">');
2674
- this.emit('{ "imports": { "three": "https://unpkg.com/three@0.160.0/build/three.module.js", "three/addons/": "https://unpkg.com/three@0.160.0/examples/jsm/" } }');
2824
+ this.emit(
2825
+ '{ "imports": { "three": "https://unpkg.com/three@0.160.0/build/three.module.js", "three/addons/": "https://unpkg.com/three@0.160.0/examples/jsm/" } }'
2826
+ );
2675
2827
  this.emit("</script>");
2676
2828
  this.indentLevel--;
2677
2829
  this.emit("</head>");
@@ -2703,7 +2855,9 @@ dependencies {
2703
2855
  this.emit("document.body.appendChild(renderer.domElement);");
2704
2856
  this.emit("");
2705
2857
  this.emit("const scene = new THREE.Scene();");
2706
- this.emit("const camera = new THREE.PerspectiveCamera(70, window.innerWidth / window.innerHeight, 0.01, 100);");
2858
+ this.emit(
2859
+ "const camera = new THREE.PerspectiveCamera(70, window.innerWidth / window.innerHeight, 0.01, 100);"
2860
+ );
2707
2861
  this.emit("");
2708
2862
  this.emit("scene.add(new THREE.AmbientLight(0xffffff, 0.6));");
2709
2863
  if (usedTraits.has("webxr_light_estimation")) {
@@ -2797,12 +2951,16 @@ dependencies {
2797
2951
  this.emit("domOverlay: { root: document.getElementById('overlay') },");
2798
2952
  }
2799
2953
  if (usedTraits.has("webxr_depth_sensing")) {
2800
- this.emit('depthSensing: { usagePreference: ["cpu-optimized"], dataFormatPreference: ["luminance-alpha"] },');
2954
+ this.emit(
2955
+ 'depthSensing: { usagePreference: ["cpu-optimized"], dataFormatPreference: ["luminance-alpha"] },'
2956
+ );
2801
2957
  }
2802
2958
  this.indentLevel--;
2803
2959
  this.emit("};");
2804
2960
  this.emit("");
2805
- this.emit(`navigator.xr.requestSession('${sessionType}', sessionOptions).then(async (session) => {`);
2961
+ this.emit(
2962
+ `navigator.xr.requestSession('${sessionType}', sessionOptions).then(async (session) => {`
2963
+ );
2806
2964
  this.indentLevel++;
2807
2965
  this.emit(`const refSpace = await session.requestReferenceSpace('${refSpace}');`);
2808
2966
  this.emit("renderer.xr.setReferenceSpace(refSpace);");
@@ -2894,7 +3052,9 @@ dependencies {
2894
3052
  this.indentLevel--;
2895
3053
  this.emit("});");
2896
3054
  this.indentLevel--;
2897
- this.emit("}).catch(err => { console.error('WebXR session failed:', err); document.getElementById('no-xr').style.display = 'block'; });");
3055
+ this.emit(
3056
+ "}).catch(err => { console.error('WebXR session failed:', err); document.getElementById('no-xr').style.display = 'block'; });"
3057
+ );
2898
3058
  this.indentLevel--;
2899
3059
  this.emit("</script>");
2900
3060
  this.indentLevel--;
@@ -2907,5 +3067,5 @@ dependencies {
2907
3067
  });
2908
3068
 
2909
3069
  export { AndroidCompiler, AndroidCompiler_exports, compileToAndroid, init_AndroidCompiler };
2910
- //# sourceMappingURL=chunk-M6FU6S22.js.map
2911
- //# sourceMappingURL=chunk-M6FU6S22.js.map
3070
+ //# sourceMappingURL=chunk-QGKNANZ3.js.map
3071
+ //# sourceMappingURL=chunk-QGKNANZ3.js.map