gps-plus-slam-app-framework 1.1.0 → 1.2.0

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 (172) hide show
  1. package/dist/{app-selectors-CR9OWodf.d.ts → app-selectors-CcZ5UV-8.d.ts} +1 -1
  2. package/dist/ar/bresenham3d.d.ts +2 -0
  3. package/dist/ar/bresenham3d.js +81 -0
  4. package/dist/ar/camera-blit-capture.d.ts +1 -1
  5. package/dist/ar/camera-blit-capture.js +30 -2
  6. package/dist/ar/capability-checker.d.ts +1 -1
  7. package/dist/ar/capture-failure-tracker.d.ts +1 -1
  8. package/dist/ar/chromium-camera-access-workaround.d.ts +1 -1
  9. package/dist/ar/depth-sampler.d.ts +3 -3
  10. package/dist/ar/depth-sampler.js +63 -8
  11. package/dist/ar/depth-unprojection.d.ts +2 -0
  12. package/dist/ar/depth-unprojection.js +94 -0
  13. package/dist/ar/enable-gps-ar.d.ts +1 -1
  14. package/dist/ar/enable-gps-ar.js +1 -1
  15. package/dist/ar/frame-loop.d.ts +1 -1
  16. package/dist/ar/image-capture.d.ts +1 -1
  17. package/dist/ar/image-capture.js +2 -1
  18. package/dist/ar/index.d.ts +19 -16
  19. package/dist/ar/index.js +7 -4
  20. package/dist/ar/occupancy-grid.d.ts +2 -0
  21. package/dist/ar/occupancy-grid.js +164 -0
  22. package/dist/ar/replay-scene.d.ts +1 -1
  23. package/dist/ar/replay-scene.js +1 -1
  24. package/dist/ar/scene-node-names.d.ts +1 -1
  25. package/dist/ar/webxr-nue-basis.d.ts +2 -0
  26. package/dist/{webxr-nue-basis-BbdqhqY6.js → ar/webxr-nue-basis.js} +1 -1
  27. package/dist/ar/webxr-session.d.ts +3 -3
  28. package/dist/ar/webxr-session.js +1 -969
  29. package/dist/ar/xr-camera-texture.d.ts +1 -1
  30. package/dist/ar/xr-error-handler.d.ts +1 -1
  31. package/dist/ar/xr-frame-loop.d.ts +1 -1
  32. package/dist/{ar-types-isPsQptb.d.ts → ar-types-Dan1MVTi.d.ts} +28 -5
  33. package/dist/{ar-world-group-alignment-Dn4rQk_c.d.ts → ar-world-group-alignment-ColHB_5A.d.ts} +1 -1
  34. package/dist/bresenham3d-CFfd7n6B.d.ts +59 -0
  35. package/dist/{camera-blit-capture-75WWa9Xb.d.ts → camera-blit-capture-D5_mNhla.d.ts} +20 -0
  36. package/dist/core/index.d.ts +1 -1
  37. package/dist/{create-slam-app-store-B76AGaI0.d.ts → create-slam-app-store-qNXQ-tq5.d.ts} +5 -5
  38. package/dist/depth-sampler-Bhanfwla.d.ts +169 -0
  39. package/dist/depth-unprojection-Y6i_mJuT.d.ts +52 -0
  40. package/dist/{enable-gps-ar-DNbO0zbg.d.ts → enable-gps-ar-CapmADVN.d.ts} +4 -4
  41. package/dist/{file-system-TIsDfamK.d.ts → file-system-C_eqiEA8.d.ts} +1 -1
  42. package/dist/{frame-conversions-D2EYjeNa.d.ts → frame-conversions-BfsafGWR.d.ts} +1 -1
  43. package/dist/{fused-path-BdVHmDW9.d.ts → fused-path-DJoVu98b.d.ts} +1 -1
  44. package/dist/geo/h3-proximity.d.ts +1 -1
  45. package/dist/geo/index.d.ts +1 -1
  46. package/dist/{gps-anchor-CISLPQIb.d.ts → gps-anchor-dYeCvvp5.d.ts} +1 -1
  47. package/dist/{gps-ar-pose-sampler-BypXZUqC.d.ts → gps-ar-pose-sampler-DVb96iOy.d.ts} +1 -1
  48. package/dist/{gps-event-coordinator-BKVZbS1M.d.ts → gps-event-coordinator-BDIQde2x.d.ts} +3 -3
  49. package/dist/{image-capture-BXZUmj7j.d.ts → image-capture-DZ4HFRgS.d.ts} +15 -2
  50. package/dist/{index-BB2KEWbN2.d.ts → index-KJq2amHF.d.ts} +1 -1
  51. package/dist/index.d.ts +67 -64
  52. package/dist/index.js +7 -4
  53. package/dist/{leaflet-map-overlay-jNt-kcUr.d.ts → leaflet-map-overlay-6CJC-E1l.d.ts} +1 -1
  54. package/dist/{map-data-BGIBM5rv.d.ts → map-data-CkloBxIl.d.ts} +1 -1
  55. package/dist/{map-overlay-draw-DcGs9UV3.d.ts → map-overlay-draw-krOKwDAq.d.ts} +1 -1
  56. package/dist/{null-storage-backend-BPQJSaMw.d.ts → null-storage-backend-CxEjZHRW.d.ts} +2 -2
  57. package/dist/occupancy-grid-BRNRaPyT.d.ts +72 -0
  58. package/dist/{opfs-storage-backend-u4QKvgvP.d.ts → opfs-storage-backend-CjSAuqg_.d.ts} +2 -2
  59. package/dist/{persistence-middleware-xB5sTllJ.d.ts → persistence-middleware-DwyzgfWr.d.ts} +1 -1
  60. package/dist/{recording-options-BSFpBSZH.d.ts → recording-options-DJBXuMxV.d.ts} +12 -2
  61. package/dist/{recording-replayer-CTL2cUE0.d.ts → recording-replayer-BL-x-7k0.d.ts} +2 -2
  62. package/dist/{recording-slice-Cb888P6d.d.ts → recording-slice-89O07ebs.d.ts} +10 -2
  63. package/dist/{replay-engine-B-5GIZtc.d.ts → replay-engine-BRqszuQ9.d.ts} +1 -1
  64. package/dist/{replay-scene-DkNfldPh.d.ts → replay-scene-Bw58VL6p.d.ts} +3 -3
  65. package/dist/sensors/gps-error-handler.d.ts +1 -1
  66. package/dist/sensors/gps.d.ts +1 -1
  67. package/dist/sensors/index.d.ts +3 -3
  68. package/dist/sensors/permission-checker.d.ts +1 -1
  69. package/dist/state/app-selectors.d.ts +1 -1
  70. package/dist/state/combined-root-state.d.ts +1 -1
  71. package/dist/state/create-slam-app-store.d.ts +1 -1
  72. package/dist/state/gps-ar-pose-sampler.d.ts +3 -3
  73. package/dist/state/gps-event-coordinator.d.ts +1 -1
  74. package/dist/state/index.d.ts +16 -16
  75. package/dist/state/persistence-middleware.d.ts +1 -1
  76. package/dist/state/recording-options.d.ts +1 -1
  77. package/dist/state/recording-options.js +5 -3
  78. package/dist/state/recording-replayer.d.ts +2 -2
  79. package/dist/state/recording-slice.d.ts +1 -1
  80. package/dist/state/recording-slice.js +11 -2
  81. package/dist/state/replay-engine.d.ts +1 -1
  82. package/dist/state/store-subscribers.d.ts +2 -2
  83. package/dist/state/subscribe-to-selector.d.ts +1 -1
  84. package/dist/state/tracking-quality.d.ts +1 -1
  85. package/dist/state/tracking-quality.js +1 -1
  86. package/dist/state/tracking-slice.d.ts +1 -1
  87. package/dist/storage/file-system-utils.d.ts +1 -1
  88. package/dist/storage/file-system.d.ts +1 -1
  89. package/dist/storage/index.d.ts +8 -8
  90. package/dist/storage/null-storage-backend.d.ts +1 -1
  91. package/dist/storage/opfs-storage-backend.d.ts +1 -1
  92. package/dist/storage/opfs-storage.d.ts +1 -1
  93. package/dist/storage/storage-backend.d.ts +1 -1
  94. package/dist/storage/zip-export.d.ts +1 -1
  95. package/dist/storage/zip-reader.d.ts +1 -1
  96. package/dist/{storage-backend-yDSKafAQ.d.ts → storage-backend-C9HLFtgz.d.ts} +1 -1
  97. package/dist/{store-subscribers-swlbtg_z.d.ts → store-subscribers-rrkLkFTt.d.ts} +2 -2
  98. package/dist/{subscribe-to-selector--KQpgLXG.d.ts → subscribe-to-selector-CP3BKSbF.d.ts} +1 -1
  99. package/dist/test-utils/browser-mocks.d.ts +1 -1
  100. package/dist/test-utils/zip-round-trip-helpers.d.ts +1 -1
  101. package/dist/{tracking-slice-CDREeoZ_.d.ts → tracking-slice-CdK8c-8P.d.ts} +1 -1
  102. package/dist/types/ar-types.d.ts +2 -2
  103. package/dist/types/geo-types.d.ts +1 -1
  104. package/dist/types/index.d.ts +3 -3
  105. package/dist/utils/concurrency.d.ts +1 -1
  106. package/dist/utils/failure-tracker.d.ts +1 -1
  107. package/dist/utils/format-file-size.d.ts +1 -1
  108. package/dist/utils/fused-path.d.ts +1 -1
  109. package/dist/utils/index.d.ts +6 -6
  110. package/dist/utils/list-formatter.d.ts +1 -1
  111. package/dist/utils/logger.d.ts +1 -1
  112. package/dist/visualization/accuracy-circles.d.ts +1 -1
  113. package/dist/visualization/alignment-lerper.d.ts +1 -1
  114. package/dist/visualization/ar-world-group-alignment.d.ts +1 -1
  115. package/dist/visualization/camera-follower.d.ts +1 -1
  116. package/dist/visualization/css3d-renderer-manager.d.ts +1 -1
  117. package/dist/visualization/frame-conversions.d.ts +1 -1
  118. package/dist/visualization/frustum-visibility.d.ts +1 -1
  119. package/dist/visualization/gps-anchor.d.ts +1 -1
  120. package/dist/visualization/gps-compass-cubes.d.ts +1 -1
  121. package/dist/visualization/gps-event-markers.d.ts +1 -1
  122. package/dist/visualization/gps-event-markers.js +1 -1
  123. package/dist/visualization/hit-test-reticle.d.ts +1 -1
  124. package/dist/visualization/hit-test-reticle.js +1 -1
  125. package/dist/visualization/index.d.ts +18 -18
  126. package/dist/visualization/leaflet-map-overlay.d.ts +1 -1
  127. package/dist/visualization/lerp-utils.d.ts +1 -1
  128. package/dist/visualization/map-data.d.ts +1 -1
  129. package/dist/visualization/map-overlay-draw.d.ts +1 -1
  130. package/dist/visualization/map-overlay.d.ts +1 -1
  131. package/dist/visualization/three-dispose.d.ts +1 -1
  132. package/dist/visualization/vis-colors.d.ts +1 -1
  133. package/dist/{webxr-session-BnArFCew.d.ts → webxr-session-DtAG9srK.d.ts} +21 -10
  134. package/dist/webxr-session-QhcSSub5.js +1041 -0
  135. package/package.json +1 -1
  136. package/dist/depth-sampler-CqrkRr2N.d.ts +0 -108
  137. /package/dist/{accuracy-circles-DEKr0Hoh.d.ts → accuracy-circles-BpwWAs8G.d.ts} +0 -0
  138. /package/dist/{alignment-lerper-CCZJf-Xb.d.ts → alignment-lerper-Dm9G7JJO.d.ts} +0 -0
  139. /package/dist/{camera-follower-B-nS1sr6.d.ts → camera-follower-C2mwEn7c.d.ts} +0 -0
  140. /package/dist/{capability-checker-BTCmZRL4.d.ts → capability-checker-CQXJHxXg.d.ts} +0 -0
  141. /package/dist/{capture-failure-tracker-D4HYJNOj.d.ts → capture-failure-tracker-CUeU3L_M.d.ts} +0 -0
  142. /package/dist/{chromium-camera-access-workaround-MifIwK9x.d.ts → chromium-camera-access-workaround-Jqbn0apH.d.ts} +0 -0
  143. /package/dist/{concurrency-Bsmv53qw.d.ts → concurrency-CO1FQvs3.d.ts} +0 -0
  144. /package/dist/{css3d-renderer-manager-EDED3nvg.d.ts → css3d-renderer-manager-ptu_t3B3.d.ts} +0 -0
  145. /package/dist/{failure-tracker-D7ELffm0.d.ts → failure-tracker-Cn8Fo9D4.d.ts} +0 -0
  146. /package/dist/{file-system-utils-BH6uIs2i.d.ts → file-system-utils-DyAmcuvX.d.ts} +0 -0
  147. /package/dist/{format-file-size-B7gJb3Md.d.ts → format-file-size-CLCZz3lC.d.ts} +0 -0
  148. /package/dist/{frame-loop-BTeRpDm4.d.ts → frame-loop-CMewS8cY.d.ts} +0 -0
  149. /package/dist/{frustum-visibility-DGnJqls0.d.ts → frustum-visibility-CmI96ESS.d.ts} +0 -0
  150. /package/dist/{geo-types-clgzl8b5.d.ts → geo-types-SaPnIEUM.d.ts} +0 -0
  151. /package/dist/{gps-B7AlMPz5.d.ts → gps-VuezJWK3.d.ts} +0 -0
  152. /package/dist/{gps-compass-cubes-Ys6Hf1nc.d.ts → gps-compass-cubes-BM1uGiYV.d.ts} +0 -0
  153. /package/dist/{gps-error-handler-BLDhUlw5.d.ts → gps-error-handler-CJl_2MVm.d.ts} +0 -0
  154. /package/dist/{gps-event-markers-BlHq3jYV.d.ts → gps-event-markers-Dc9FT-q1.d.ts} +0 -0
  155. /package/dist/{h3-proximity-DJnghtir.d.ts → h3-proximity-I1msGPgE.d.ts} +0 -0
  156. /package/dist/{hit-test-reticle-BGXOxrUh.d.ts → hit-test-reticle-BEzEybxZ.d.ts} +0 -0
  157. /package/dist/{index--ldLph4V.d.ts → index-CF05QV2m.d.ts} +0 -0
  158. /package/dist/{lerp-utils-DNcSmKVX.d.ts → lerp-utils-BpV-0Dtk.d.ts} +0 -0
  159. /package/dist/{list-formatter-CsqcU4v5.d.ts → list-formatter-RRcBe8Vg.d.ts} +0 -0
  160. /package/dist/{logger-BZ44Dhd3.d.ts → logger-BEHXsnnq.d.ts} +0 -0
  161. /package/dist/{map-overlay-yrFsUtGv.d.ts → map-overlay-bcogY5fK.d.ts} +0 -0
  162. /package/dist/{opfs-storage-LsLY6VZV.d.ts → opfs-storage-DYm8WHq7.d.ts} +0 -0
  163. /package/dist/{permission-checker-CfV7INCa.d.ts → permission-checker-GpAiSCwd.d.ts} +0 -0
  164. /package/dist/{scene-node-names-IHW7HR4S.d.ts → scene-node-names-Bu0S66H1.d.ts} +0 -0
  165. /package/dist/{three-dispose-WTBAfaWU.d.ts → three-dispose-D950t71B.d.ts} +0 -0
  166. /package/dist/{vis-colors-Djnyg_UH.d.ts → vis-colors-D6omC64K.d.ts} +0 -0
  167. /package/dist/{index-22v8MXJX.d.ts → webxr-nue-basis-CqKQmZzT.d.ts} +0 -0
  168. /package/dist/{xr-camera-texture-BU5YvKAM.d.ts → xr-camera-texture-DBwCaKTd.d.ts} +0 -0
  169. /package/dist/{xr-error-handler-DcUFshNF.d.ts → xr-error-handler-C0AQRmxs.d.ts} +0 -0
  170. /package/dist/{xr-frame-loop-BKckC7xC.d.ts → xr-frame-loop-BtYytZJg.d.ts} +0 -0
  171. /package/dist/{zip-export-C0_ErAqT.d.ts → zip-export-D_5HAvFz.d.ts} +0 -0
  172. /package/dist/{zip-reader-B2lzN8F5.d.ts → zip-reader-DSEXt7K6.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- import { L as CombinedRootState, r as SlamAppRootState } from "./create-slam-app-store-B76AGaI0.js";
1
+ import { L as CombinedRootState, r as SlamAppRootState } from "./create-slam-app-store-qNXQ-tq5.js";
2
2
  import * as _$gps_plus_slam_js0 from "gps-plus-slam-js";
3
3
  import { ArImageCapture, GpsPoint, LatLong, Matrix4, Quaternion, Vector3 } from "gps-plus-slam-js";
4
4
  import * as _$_reduxjs_toolkit0 from "@reduxjs/toolkit";
@@ -0,0 +1,2 @@
1
+ import { n as MAX_TRACE_STEPS, r as bresenham3d, t as GridCell } from "../bresenham3d-CFfd7n6B.js";
2
+ export { GridCell, MAX_TRACE_STEPS, bresenham3d };
@@ -0,0 +1,81 @@
1
+ //#region ../src/ar/bresenham3d.ts
2
+ /**
3
+ * Main-thread safety cap: the maximum dominant-axis (Chebyshev) span a single
4
+ * trace may cover. The trace runs synchronously, one iteration per
5
+ * dominant-axis step, so an unbounded span freezes the UI. Finite-but-absurd
6
+ * coordinates (a tracking glitch, a corrupt projectionMatrix unprojecting to a
7
+ * huge world point) quantize to safe integers and pass the integer check, so
8
+ * this is the only thing standing between such input and a multi-second
9
+ * (potentially multi-billion-iteration) freeze.
10
+ *
11
+ * Chosen generously — at the grid's 0.15 m cells this is ~150 km, far beyond
12
+ * any real AR scene, so it never trips on legitimate carving or raycasting.
13
+ * It is a circuit breaker against programmer/data error, not a ray-length
14
+ * policy: exceeding it throws (loud — surfaces the upstream bug) rather than
15
+ * silently truncating the trace.
16
+ */
17
+ const MAX_TRACE_STEPS = 1e6;
18
+ /**
19
+ * Trace the line from `start` to `end`, calling `visitCell` per cell.
20
+ *
21
+ * @param visitCell - return `false` to stop the trace early.
22
+ * @param stopDistance - dominant-axis steps before `end` at which to stop
23
+ * (default 0 = trace all the way to `end`).
24
+ * @throws TypeError when a coordinate is not a safe integer (cells must be
25
+ * quantized before tracing — programmer error, not a data error).
26
+ * @throws RangeError when `stopDistance` is not a non-negative safe integer.
27
+ * The loop terminates on a counter (`i--`) that decrements unconditionally,
28
+ * so a negative or fractional value still terminates (it merely traces past
29
+ * `end`); but `NaN`/`-Infinity` never satisfy `i <= stopDistance` and would
30
+ * spin forever. Rejecting up front both prevents that freeze and enforces
31
+ * the "dominant-axis steps before end" contract.
32
+ * @throws RangeError when the dominant-axis span exceeds {@link MAX_TRACE_STEPS}
33
+ * (circuit breaker against a synchronous main-thread freeze from
34
+ * finite-but-absurd coordinates).
35
+ */
36
+ function bresenham3d(start, end, visitCell, stopDistance = 0) {
37
+ assertIntegerCell(start);
38
+ assertIntegerCell(end);
39
+ if (!Number.isSafeInteger(stopDistance) || stopDistance < 0) throw new RangeError(`bresenham3d stopDistance must be a non-negative safe integer, got ${stopDistance}`);
40
+ let [x, y, z] = start;
41
+ const dx = Math.abs(end[0] - x);
42
+ const sx = x < end[0] ? 1 : -1;
43
+ const dy = Math.abs(end[1] - y);
44
+ const sy = y < end[1] ? 1 : -1;
45
+ const dz = Math.abs(end[2] - z);
46
+ const sz = z < end[2] ? 1 : -1;
47
+ const dm = Math.max(dx, dy, dz);
48
+ if (dm > 1e6) throw new RangeError(`bresenham3d dominant-axis span ${dm} exceeds MAX_TRACE_STEPS ${MAX_TRACE_STEPS}; cells [${start.join(", ")}]→[${end.join(", ")}] are too far apart to trace synchronously`);
49
+ let i = dm;
50
+ let errX = Math.floor(dm / 2);
51
+ let errY = errX;
52
+ let errZ = errX;
53
+ for (;;) {
54
+ if (!visitCell([
55
+ x,
56
+ y,
57
+ z
58
+ ])) return;
59
+ if (i-- <= stopDistance) return;
60
+ errX -= dx;
61
+ if (errX < 0) {
62
+ errX += dm;
63
+ x += sx;
64
+ }
65
+ errY -= dy;
66
+ if (errY < 0) {
67
+ errY += dm;
68
+ y += sy;
69
+ }
70
+ errZ -= dz;
71
+ if (errZ < 0) {
72
+ errZ += dm;
73
+ z += sz;
74
+ }
75
+ }
76
+ }
77
+ function assertIntegerCell(cell) {
78
+ if (!cell.every((v) => Number.isSafeInteger(v))) throw new TypeError(`bresenham3d requires integer cell coordinates, got [${cell.join(", ")}]`);
79
+ }
80
+ //#endregion
81
+ export { MAX_TRACE_STEPS, bresenham3d };
@@ -1,2 +1,2 @@
1
- import { i as computeCaptureSize, n as CameraBlitCaptureConfig, r as DEFAULT_BLIT_CONFIG, t as CameraBlitCapture } from "../camera-blit-capture-75WWa9Xb.js";
1
+ import { i as computeCaptureSize, n as CameraBlitCaptureConfig, r as DEFAULT_BLIT_CONFIG, t as CameraBlitCapture } from "../camera-blit-capture-D5_mNhla.js";
2
2
  export { CameraBlitCapture, CameraBlitCaptureConfig, DEFAULT_BLIT_CONFIG, computeCaptureSize };
@@ -118,8 +118,32 @@ var CameraBlitCapture = class {
118
118
  * @returns JPEG Blob, or null if capture fails
119
119
  */
120
120
  async captureToBlob(renderer, cameraTexture, quality) {
121
+ if (!this.captureToPixels(renderer, cameraTexture)) return null;
122
+ try {
123
+ return await this.pixelsToJpegBlob(quality);
124
+ } catch (error) {
125
+ log.error("Blit capture failed:", error);
126
+ return null;
127
+ }
128
+ }
129
+ /**
130
+ * Run the blit + readback (steps A+B of {@link captureToBlob}) and return
131
+ * the raw RGBA pixel buffer without JPEG encoding — the cheap path for
132
+ * per-point color sampling (occupancy-grid port plan Iter 8).
133
+ *
134
+ * IMPORTANT: Must be called within the XR animation frame callback, while
135
+ * the camera texture is valid. The returned `pixels` is the INTERNAL
136
+ * buffer — valid only until the next capture or `resizeIfNeeded`; consume
137
+ * it synchronously (e.g. via `createRgbLookup`) or copy it.
138
+ *
139
+ * Note: the buffer is in WebGL readback order (bottom-row-first / RGBA);
140
+ * `createRgbLookup` handles the y-flip.
141
+ *
142
+ * @returns the buffer with its dimensions, or null on failure/dispose.
143
+ */
144
+ captureToPixels(renderer, cameraTexture) {
121
145
  if (this.disposed) {
122
- log.warn("captureToBlob called after dispose");
146
+ log.warn("captureToPixels called after dispose");
123
147
  return null;
124
148
  }
125
149
  try {
@@ -133,7 +157,11 @@ var CameraBlitCapture = class {
133
157
  renderer.setRenderTarget(currentRenderTarget);
134
158
  renderer.xr.enabled = currentXrEnabled;
135
159
  this.blitMaterial.uniforms.tDiffuse.value = null;
136
- return await this.pixelsToJpegBlob(quality);
160
+ return {
161
+ pixels: this.pixelBuffer,
162
+ width: this.width,
163
+ height: this.height
164
+ };
137
165
  } catch (error) {
138
166
  log.error("Blit capture failed:", error);
139
167
  return null;
@@ -1,2 +1,2 @@
1
- import { i as isFullySupported, n as CapabilitySupport, r as capabilityMessage, t as CapabilityMessageOptions } from "../capability-checker-BTCmZRL4.js";
1
+ import { i as isFullySupported, n as CapabilitySupport, r as capabilityMessage, t as CapabilityMessageOptions } from "../capability-checker-CQXJHxXg.js";
2
2
  export { CapabilityMessageOptions, CapabilitySupport, capabilityMessage, isFullySupported };
@@ -1,2 +1,2 @@
1
- import { a as createCaptureFailureTracker, i as DEFAULT_CAPTURE_TRACKER_CONFIG, n as CaptureFailureTracker, r as CaptureFailureTrackerConfig, t as CAPTURE_FAILURE_WARNING } from "../capture-failure-tracker-D4HYJNOj.js";
1
+ import { a as createCaptureFailureTracker, i as DEFAULT_CAPTURE_TRACKER_CONFIG, n as CaptureFailureTracker, r as CaptureFailureTrackerConfig, t as CAPTURE_FAILURE_WARNING } from "../capture-failure-tracker-CUeU3L_M.js";
2
2
  export { CAPTURE_FAILURE_WARNING, CaptureFailureTracker, CaptureFailureTrackerConfig, DEFAULT_CAPTURE_TRACKER_CONFIG, createCaptureFailureTracker };
@@ -1,2 +1,2 @@
1
- import { a as applyChromiumProjectionLayerWorkaround, i as ChromiumProjectionLayerWorkaroundResult, n as BASELAYER_WINDOW_MIN, o as needsBaseLayerPersistence, r as ChromeVersion, s as parseChromeVersion, t as BASELAYER_WINDOW_MAX } from "../chromium-camera-access-workaround-MifIwK9x.js";
1
+ import { a as applyChromiumProjectionLayerWorkaround, i as ChromiumProjectionLayerWorkaroundResult, n as BASELAYER_WINDOW_MIN, o as needsBaseLayerPersistence, r as ChromeVersion, s as parseChromeVersion, t as BASELAYER_WINDOW_MAX } from "../chromium-camera-access-workaround-Jqbn0apH.js";
2
2
  export { BASELAYER_WINDOW_MAX, BASELAYER_WINDOW_MIN, ChromeVersion, ChromiumProjectionLayerWorkaroundResult, applyChromiumProjectionLayerWorkaround, needsBaseLayerPersistence, parseChromeVersion };
@@ -1,3 +1,3 @@
1
- import { i as DepthSample } from "../ar-types-isPsQptb.js";
2
- import { i as DepthSamplerConfig, n as DepthSampler, r as DepthSamplerCallbacks, t as DepthInfo } from "../depth-sampler-CqrkRr2N.js";
3
- export { DepthInfo, DepthSample, DepthSampler, DepthSamplerCallbacks, DepthSamplerConfig };
1
+ import { i as DepthSample } from "../ar-types-Dan1MVTi.js";
2
+ import { a as wrapXRDepthInfo, i as DepthSamplerConfig, n as DepthSampler, r as DepthSamplerCallbacks, t as DepthInfo } from "../depth-sampler-Bhanfwla.js";
3
+ export { DepthInfo, DepthSample, DepthSampler, DepthSamplerCallbacks, DepthSamplerConfig, wrapXRDepthInfo };
@@ -1,9 +1,32 @@
1
1
  import { extractOdomPosition } from "../state/gps-event-coordinator.js";
2
2
  //#region ../src/ar/depth-sampler.ts
3
+ /**
4
+ * Wrap a raw browser XRDepthInformation object into a {@link DepthInfo}.
5
+ *
6
+ * - `getDepthInMeters` is bound to the source object (browser
7
+ * implementations are this-sensitive).
8
+ * - `projectionMatrix` (typically `XRView.projectionMatrix`, a Float32Array
9
+ * the UA may reuse across frames) is defensively validated and copied into
10
+ * a plain serializable 16-tuple; invalid input (wrong length, non-finite
11
+ * entries) yields a DepthInfo without a matrix rather than an error.
12
+ */
13
+ function wrapXRDepthInfo(raw, projectionMatrix) {
14
+ const wrapped = {
15
+ width: raw.width,
16
+ height: raw.height,
17
+ getDepthInMeters: raw.getDepthInMeters.bind(raw)
18
+ };
19
+ if (projectionMatrix && projectionMatrix.length === 16) {
20
+ const copy = Array.from(projectionMatrix);
21
+ if (copy.every((v) => Number.isFinite(v))) wrapped.projectionMatrix = copy;
22
+ }
23
+ return wrapped;
24
+ }
3
25
  const DEFAULT_CONFIG = {
4
26
  intervalMs: 1e3,
5
- gridSize: 3,
6
- unavailabilityThresholdMs: 5e3
27
+ gridSize: 16,
28
+ unavailabilityThresholdMs: 5e3,
29
+ rgb: true
7
30
  };
8
31
  /**
9
32
  * Samples sparse depth points from WebXR depth sensing.
@@ -74,6 +97,18 @@ var DepthSampler = class {
74
97
  return { ...this.config };
75
98
  }
76
99
  /**
100
+ * Apply partial configuration overrides (e.g. the user's recording
101
+ * options, plumbed in by `startDepthCapture` just before sampling
102
+ * starts). Invalid values are ignored defensively: every key requires a
103
+ * finite positive number, and `gridSize` additionally an integer.
104
+ */
105
+ updateConfig(config) {
106
+ if (isFinitePositive(config.intervalMs)) this.config.intervalMs = config.intervalMs;
107
+ if (isFinitePositive(config.gridSize) && Number.isInteger(config.gridSize)) this.config.gridSize = config.gridSize;
108
+ if (isFinitePositive(config.unavailabilityThresholdMs)) this.config.unavailabilityThresholdMs = config.unavailabilityThresholdMs;
109
+ if (typeof config.rgb === "boolean") this.config.rgb = config.rgb;
110
+ }
111
+ /**
77
112
  * Called each frame with depth information.
78
113
  *
79
114
  * @param timestamp - Current frame timestamp in milliseconds
@@ -89,7 +124,7 @@ var DepthSampler = class {
89
124
  if (timestamp - this.lastSampleTime < this.config.intervalMs) return;
90
125
  const pose = this.callbacks.getCurrentPose();
91
126
  if (!pose) return;
92
- const points = this.sampleGrid(depthInfo);
127
+ const points = this.sampleGrid(depthInfo, this.acquireRgbLookupSafely());
93
128
  const sample = {
94
129
  timestamp: performance.timeOrigin + timestamp,
95
130
  cameraPos: extractOdomPosition(pose),
@@ -99,26 +134,43 @@ var DepthSampler = class {
99
134
  pose.orientation.z,
100
135
  pose.orientation.w
101
136
  ],
102
- points
137
+ points,
138
+ ...depthInfo.projectionMatrix ? { projectionMatrix: depthInfo.projectionMatrix } : {}
103
139
  };
104
140
  this.lastSampleTime = timestamp;
105
141
  this.sampleCount++;
106
142
  this.callbacks.onSampleCaptured(sample);
107
143
  }
108
144
  /**
109
- * Sample a grid of depth points from the depth buffer.
145
+ * Acquire the per-sample RGB lookup, gated by `config.rgb` and guarded so
146
+ * a failing acquisition (e.g. GL context loss during the blit) can never
147
+ * break the sample emission in the XR frame loop.
148
+ */
149
+ acquireRgbLookupSafely() {
150
+ if (!this.config.rgb || !this.callbacks.acquireRgbLookup) return null;
151
+ try {
152
+ return this.callbacks.acquireRgbLookup();
153
+ } catch {
154
+ return null;
155
+ }
156
+ }
157
+ /**
158
+ * Sample a grid of depth points from the depth buffer, attaching the
159
+ * camera color per point when a lookup is available.
110
160
  */
111
- sampleGrid(depthInfo) {
161
+ sampleGrid(depthInfo, rgbLookup) {
112
162
  const points = [];
113
163
  const gridSize = this.config.gridSize;
114
164
  for (let row = 0; row < gridSize; row++) for (let col = 0; col < gridSize; col++) {
115
165
  const screenX = (col + 1) / (gridSize + 1);
116
166
  const screenY = (row + 1) / (gridSize + 1);
117
167
  const depthM = depthInfo.getDepthInMeters(screenX, screenY);
168
+ const rgb = rgbLookup?.(screenX, screenY);
118
169
  points.push({
119
170
  screenX,
120
171
  screenY,
121
- depthM
172
+ depthM,
173
+ ...rgb ? { rgb } : {}
122
174
  });
123
175
  }
124
176
  return points;
@@ -143,5 +195,8 @@ var DepthSampler = class {
143
195
  return this.depthReceived;
144
196
  }
145
197
  };
198
+ function isFinitePositive(value) {
199
+ return typeof value === "number" && Number.isFinite(value) && value > 0;
200
+ }
146
201
  //#endregion
147
- export { DepthSampler };
202
+ export { DepthSampler, wrapXRDepthInfo };
@@ -0,0 +1,2 @@
1
+ import { n as createDepthUnprojector, r as unprojectDepthPoint, t as DepthUnprojector } from "../depth-unprojection-Y6i_mJuT.js";
2
+ export { DepthUnprojector, createDepthUnprojector, unprojectDepthPoint };
@@ -0,0 +1,94 @@
1
+ import { mat4, quat, vec3, vec4 } from "gl-matrix";
2
+ //#region ../src/ar/depth-unprojection.ts
3
+ /**
4
+ * Depth Unprojection
5
+ *
6
+ * Pure math: turn a persisted depth read (normalized view coordinates +
7
+ * depth in meters) back into a 3D point in raw WebXR (local-floor) space
8
+ * using the capturing view's projection matrix.
9
+ *
10
+ * Convention (single source of truth for NDC flips, see the 2026-06-11
11
+ * occupancy-grid port plan §6):
12
+ * - screenX/screenY are normalized view coordinates with a TOP-LEFT origin
13
+ * (screenY grows downward), exactly as fed to `getDepthInMeters`.
14
+ * - NDC: x = 2·sx − 1, y = 1 − 2·sy (flip Y to bottom-up).
15
+ * - View space is the WebXR camera frame: +x right, +y up, −z forward;
16
+ * `depthM` is the z-depth (distance along −z), not euclidean distance.
17
+ *
18
+ * @see depth-unprojection.ts.md for detailed documentation
19
+ */
20
+ /**
21
+ * Build a {@link DepthUnprojector} for one depth sample. The projection
22
+ * inverse and camera quaternion/position are sample-invariant, so they are
23
+ * computed once here instead of per point (the per-point hot path then only
24
+ * does the cheap NDC→view→world transform). Callers that fold many points
25
+ * from the same sample — e.g. `OccupancyGrid.addSample` — should build the
26
+ * unprojector once and reuse it for all points.
27
+ *
28
+ * @param cameraPos - camera position, raw WebXR (`DepthSample.cameraPos`)
29
+ * @param cameraRot - camera quaternion [x,y,z,w], raw WebXR (`DepthSample.cameraRot`)
30
+ * @param projectionMatrix - column-major projection matrix of the capturing
31
+ * view (`DepthSample.projectionMatrix`). `undefined` for recordings made
32
+ * before intrinsics capture — those points cannot be unprojected.
33
+ * @returns an unprojector, or `null` when the sample cannot be unprojected at
34
+ * all (missing or singular projection matrix).
35
+ */
36
+ function createDepthUnprojector(cameraPos, cameraRot, projectionMatrix) {
37
+ if (!projectionMatrix || projectionMatrix.length !== 16) return null;
38
+ const invProj = mat4.invert(mat4.create(), projectionMatrix);
39
+ if (!invProj) return null;
40
+ const cameraQuat = quat.fromValues(cameraRot[0], cameraRot[1], cameraRot[2], cameraRot[3]);
41
+ const cameraPosVec = vec3.fromValues(cameraPos[0], cameraPos[1], cameraPos[2]);
42
+ const ndc = vec4.create();
43
+ const view = vec4.create();
44
+ const viewPoint = vec3.create();
45
+ const world = vec3.create();
46
+ return { unproject(point) {
47
+ if (!isUsablePoint(point)) return null;
48
+ const { screenX, screenY, depthM } = point;
49
+ vec4.set(ndc, 2 * screenX - 1, 1 - 2 * screenY, -1, 1);
50
+ vec4.transformMat4(view, ndc, invProj);
51
+ if (view[3] === 0) return null;
52
+ const rayX = view[0] / view[3];
53
+ const rayY = view[1] / view[3];
54
+ const rayZ = view[2] / view[3];
55
+ if (rayZ >= 0) return null;
56
+ const scale = -depthM / rayZ;
57
+ vec3.set(viewPoint, rayX * scale, rayY * scale, -depthM);
58
+ vec3.transformQuat(world, viewPoint, cameraQuat);
59
+ vec3.add(world, world, cameraPosVec);
60
+ const result = [
61
+ world[0],
62
+ world[1],
63
+ world[2]
64
+ ];
65
+ return result.every((v) => Number.isFinite(v)) ? result : null;
66
+ } };
67
+ }
68
+ /**
69
+ * Unproject a single depth point into raw WebXR space. Convenience wrapper
70
+ * over {@link createDepthUnprojector} for one-off callers; when unprojecting
71
+ * many points from the same sample, build the unprojector once instead.
72
+ *
73
+ * @param point - normalized view coordinates + depth in meters
74
+ * @param cameraPos - camera position, raw WebXR (`DepthSample.cameraPos`)
75
+ * @param cameraRot - camera quaternion [x,y,z,w], raw WebXR (`DepthSample.cameraRot`)
76
+ * @param projectionMatrix - column-major projection matrix of the capturing
77
+ * view (`DepthSample.projectionMatrix`). `undefined` for recordings made
78
+ * before intrinsics capture — those points cannot be unprojected.
79
+ * @returns the 3D point in raw WebXR space, or `null` when the input is not
80
+ * usable (missing/singular matrix, non-positive or non-finite depth,
81
+ * out-of-range screen coordinates).
82
+ */
83
+ function unprojectDepthPoint(point, cameraPos, cameraRot, projectionMatrix) {
84
+ const unprojector = createDepthUnprojector(cameraPos, cameraRot, projectionMatrix);
85
+ return unprojector ? unprojector.unproject(point) : null;
86
+ }
87
+ function isUsablePoint(point) {
88
+ return Number.isFinite(point.depthM) && point.depthM > 0 && isInUnitRange(point.screenX) && isInUnitRange(point.screenY);
89
+ }
90
+ function isInUnitRange(v) {
91
+ return Number.isFinite(v) && v >= 0 && v <= 1;
92
+ }
93
+ //#endregion
94
+ export { createDepthUnprojector, unprojectDepthPoint };
@@ -1,2 +1,2 @@
1
- import { a as EnableGpsArState, i as EnableGpsArResult, n as EnableGpsArController, o as EnableGpsArStatus, r as EnableGpsArDeps, s as createEnableGpsArController, t as EnableGpsArConfig } from "../enable-gps-ar-DNbO0zbg.js";
1
+ import { a as EnableGpsArState, i as EnableGpsArResult, n as EnableGpsArController, o as EnableGpsArStatus, r as EnableGpsArDeps, s as createEnableGpsArController, t as EnableGpsArConfig } from "../enable-gps-ar-CapmADVN.js";
2
2
  export { EnableGpsArConfig, EnableGpsArController, EnableGpsArDeps, EnableGpsArResult, EnableGpsArState, EnableGpsArStatus, createEnableGpsArController };
@@ -1,7 +1,7 @@
1
1
  import { createLogger } from "../utils/logger.js";
2
2
  import { requestGeolocationPermission, requestOrientationPermission, requestWebXRWithDepthPermission } from "../sensors/permission-checker.js";
3
3
  import { startGpsWatch, startOrientationWatch, stopGpsWatch, stopOrientationWatch } from "../sensors/gps.js";
4
- import { endARSession, initAR, isWebXRSupported } from "./webxr-session.js";
4
+ import { _ as isWebXRSupported, g as initAR, i as endARSession } from "../webxr-session-QhcSSub5.js";
5
5
  //#region ../src/ar/enable-gps-ar.ts
6
6
  const log = createLogger("EnableGpsAr");
7
7
  const defaultDeps = {
@@ -1,2 +1,2 @@
1
- import { i as runFrameUpdates, n as clearFrameUpdates, r as registerFrameUpdate, t as FrameUpdate } from "../frame-loop-BTeRpDm4.js";
1
+ import { i as runFrameUpdates, n as clearFrameUpdates, r as registerFrameUpdate, t as FrameUpdate } from "../frame-loop-CMewS8cY.js";
2
2
  export { FrameUpdate, clearFrameUpdates, registerFrameUpdate, runFrameUpdates };
@@ -1,2 +1,2 @@
1
- import { a as ImageCaptureManager, i as ImageCaptureConfig, n as DEFAULT_CAPTURE_CONFIG, o as MIN_VALID_IMAGE_BYTES, r as ImageCaptureCallbacks, t as CapturedImage } from "../image-capture-BXZUmj7j.js";
1
+ import { a as ImageCaptureManager, i as ImageCaptureConfig, n as DEFAULT_CAPTURE_CONFIG, o as MIN_VALID_IMAGE_BYTES, r as ImageCaptureCallbacks, t as CapturedImage } from "../image-capture-DZ4HFRgS.js";
2
2
  export { CapturedImage, DEFAULT_CAPTURE_CONFIG, ImageCaptureCallbacks, ImageCaptureConfig, ImageCaptureManager, MIN_VALID_IMAGE_BYTES };
@@ -23,7 +23,8 @@ const MIN_VALID_IMAGE_BYTES = 5e3;
23
23
  const DEFAULT_CAPTURE_CONFIG = {
24
24
  intervalMs: 2e3,
25
25
  quality: .7,
26
- captureTimeoutMs: 5e3
26
+ captureTimeoutMs: 5e3,
27
+ resolutionDivisor: 1
27
28
  };
28
29
  /**
29
30
  * Manages periodic image capture from a canvas.
@@ -1,16 +1,19 @@
1
- import { i as computeCaptureSize, n as CameraBlitCaptureConfig, r as DEFAULT_BLIT_CONFIG, t as CameraBlitCapture } from "../camera-blit-capture-75WWa9Xb.js";
2
- import { i as isFullySupported, n as CapabilitySupport, r as capabilityMessage, t as CapabilityMessageOptions } from "../capability-checker-BTCmZRL4.js";
3
- import { a as createCaptureFailureTracker, i as DEFAULT_CAPTURE_TRACKER_CONFIG, n as CaptureFailureTracker, r as CaptureFailureTrackerConfig, t as CAPTURE_FAILURE_WARNING } from "../capture-failure-tracker-D4HYJNOj.js";
4
- import { a as applyChromiumProjectionLayerWorkaround, i as ChromiumProjectionLayerWorkaroundResult, n as BASELAYER_WINDOW_MIN, o as needsBaseLayerPersistence, r as ChromeVersion, s as parseChromeVersion, t as BASELAYER_WINDOW_MAX } from "../chromium-camera-access-workaround-MifIwK9x.js";
5
- import { i as DepthSamplerConfig, n as DepthSampler, r as DepthSamplerCallbacks, t as DepthInfo } from "../depth-sampler-CqrkRr2N.js";
6
- import { a as ImageCaptureManager, i as ImageCaptureConfig, n as DEFAULT_CAPTURE_CONFIG, o as MIN_VALID_IMAGE_BYTES, r as ImageCaptureCallbacks, t as CapturedImage } from "../image-capture-BXZUmj7j.js";
7
- import { i as acquireCameraTexture, n as RendererLike, r as XRCameraLike, t as CameraTextureResult } from "../xr-camera-texture-BU5YvKAM.js";
8
- import { D as setDepthCaptureCallback, I as startDepthCapture, L as startImageCapture, M as setTrackingLostCallback, O as setFrameCallback, P as setTrackingStore, R as stopDepthCapture, d as getCamera, f as getCurrentArPose, g as getScene, h as getLiveCss3dManager, j as setTrackingCallbacks, k as setImageCaptureCallback, m as getImageCaptureFrameCount, o as endARSession, p as getDepthSampleCount, t as SessionFeatureOptions, u as getArWorldGroup, v as initAR, z as stopImageCapture } from "../webxr-session-BnArFCew.js";
9
- import { a as EnableGpsArState, i as EnableGpsArResult, n as EnableGpsArController, o as EnableGpsArStatus, r as EnableGpsArDeps, s as createEnableGpsArController, t as EnableGpsArConfig } from "../enable-gps-ar-DNbO0zbg.js";
10
- import { r as registerFrameUpdate, t as FrameUpdate } from "../frame-loop-BTeRpDm4.js";
11
- import { i as registerXrFrameUpdate, n as XrFrameUpdate, t as XrFrameContext } from "../xr-frame-loop-BKckC7xC.js";
12
- import { a as getCameraFollower, c as getReplayState, d as updateOrbitTarget, i as getAlignmentLerper, l as initReplayScene, n as ReplaySceneState, o as getCameraMode, r as disposeReplayScene, t as CameraMode, u as toggleCameraMode } from "../replay-scene-DkNfldPh.js";
13
- import { t as SCENE_NODE } from "../scene-node-names-IHW7HR4S.js";
14
- import { t as WEBXR_TO_NUE } from "../index-22v8MXJX.js";
15
- import { n as XR_ERROR_MESSAGE_UNKNOWN, r as getXrErrorMessage, t as XR_ERROR_MESSAGES } from "../xr-error-handler-DcUFshNF.js";
16
- export { BASELAYER_WINDOW_MAX, BASELAYER_WINDOW_MIN, CAPTURE_FAILURE_WARNING, CameraBlitCapture, CameraBlitCaptureConfig, CameraMode, CameraTextureResult, CapabilityMessageOptions, CapabilitySupport, CaptureFailureTracker, CaptureFailureTrackerConfig, CapturedImage, ChromeVersion, ChromiumProjectionLayerWorkaroundResult, DEFAULT_BLIT_CONFIG, DEFAULT_CAPTURE_CONFIG, DEFAULT_CAPTURE_TRACKER_CONFIG, DepthInfo, DepthSampler, DepthSamplerCallbacks, DepthSamplerConfig, EnableGpsArConfig, EnableGpsArController, EnableGpsArDeps, EnableGpsArResult, EnableGpsArState, EnableGpsArStatus, FrameUpdate, ImageCaptureCallbacks, ImageCaptureConfig, ImageCaptureManager, MIN_VALID_IMAGE_BYTES, RendererLike, ReplaySceneState, SCENE_NODE, SessionFeatureOptions, WEBXR_TO_NUE, XRCameraLike, XR_ERROR_MESSAGES, XR_ERROR_MESSAGE_UNKNOWN, XrFrameContext, XrFrameUpdate, acquireCameraTexture, applyChromiumProjectionLayerWorkaround, capabilityMessage, computeCaptureSize, createCaptureFailureTracker, createEnableGpsArController, disposeReplayScene, endARSession, getAlignmentLerper, getArWorldGroup, getCamera, getCameraFollower, getCameraMode, getCurrentArPose, getDepthSampleCount, getImageCaptureFrameCount, getLiveCss3dManager, getReplayState, getScene, getXrErrorMessage, initAR, initReplayScene, isFullySupported, needsBaseLayerPersistence, parseChromeVersion, registerFrameUpdate, registerXrFrameUpdate, setDepthCaptureCallback, setFrameCallback, setImageCaptureCallback, setTrackingCallbacks, setTrackingLostCallback, setTrackingStore, startDepthCapture, startImageCapture, stopDepthCapture, stopImageCapture, toggleCameraMode, updateOrbitTarget };
1
+ import { r as bresenham3d, t as GridCell } from "../bresenham3d-CFfd7n6B.js";
2
+ import { i as computeCaptureSize, n as CameraBlitCaptureConfig, r as DEFAULT_BLIT_CONFIG, t as CameraBlitCapture } from "../camera-blit-capture-D5_mNhla.js";
3
+ import { i as isFullySupported, n as CapabilitySupport, r as capabilityMessage, t as CapabilityMessageOptions } from "../capability-checker-CQXJHxXg.js";
4
+ import { a as createCaptureFailureTracker, i as DEFAULT_CAPTURE_TRACKER_CONFIG, n as CaptureFailureTracker, r as CaptureFailureTrackerConfig, t as CAPTURE_FAILURE_WARNING } from "../capture-failure-tracker-CUeU3L_M.js";
5
+ import { a as applyChromiumProjectionLayerWorkaround, i as ChromiumProjectionLayerWorkaroundResult, n as BASELAYER_WINDOW_MIN, o as needsBaseLayerPersistence, r as ChromeVersion, s as parseChromeVersion, t as BASELAYER_WINDOW_MAX } from "../chromium-camera-access-workaround-Jqbn0apH.js";
6
+ import { a as wrapXRDepthInfo, i as DepthSamplerConfig, n as DepthSampler, r as DepthSamplerCallbacks, t as DepthInfo } from "../depth-sampler-Bhanfwla.js";
7
+ import { n as createDepthUnprojector, r as unprojectDepthPoint, t as DepthUnprojector } from "../depth-unprojection-Y6i_mJuT.js";
8
+ import { a as ImageCaptureManager, i as ImageCaptureConfig, n as DEFAULT_CAPTURE_CONFIG, o as MIN_VALID_IMAGE_BYTES, r as ImageCaptureCallbacks, t as CapturedImage } from "../image-capture-DZ4HFRgS.js";
9
+ import { i as acquireCameraTexture, n as RendererLike, r as XRCameraLike, t as CameraTextureResult } from "../xr-camera-texture-DBwCaKTd.js";
10
+ import { D as setDepthCaptureCallback, I as startDepthCapture, L as startImageCapture, M as setTrackingLostCallback, O as setFrameCallback, P as setTrackingStore, R as stopDepthCapture, d as getCamera, f as getCurrentArPose, g as getScene, h as getLiveCss3dManager, j as setTrackingCallbacks, k as setImageCaptureCallback, m as getImageCaptureFrameCount, o as endARSession, p as getDepthSampleCount, t as SessionFeatureOptions, u as getArWorldGroup, v as initAR, z as stopImageCapture } from "../webxr-session-DtAG9srK.js";
11
+ import { a as EnableGpsArState, i as EnableGpsArResult, n as EnableGpsArController, o as EnableGpsArStatus, r as EnableGpsArDeps, s as createEnableGpsArController, t as EnableGpsArConfig } from "../enable-gps-ar-CapmADVN.js";
12
+ import { r as registerFrameUpdate, t as FrameUpdate } from "../frame-loop-CMewS8cY.js";
13
+ import { n as OccupancyGridOptions, t as OccupancyGrid } from "../occupancy-grid-BRNRaPyT.js";
14
+ import { i as registerXrFrameUpdate, n as XrFrameUpdate, t as XrFrameContext } from "../xr-frame-loop-BtYytZJg.js";
15
+ import { a as getCameraFollower, c as getReplayState, d as updateOrbitTarget, i as getAlignmentLerper, l as initReplayScene, n as ReplaySceneState, o as getCameraMode, r as disposeReplayScene, t as CameraMode, u as toggleCameraMode } from "../replay-scene-Bw58VL6p.js";
16
+ import { t as SCENE_NODE } from "../scene-node-names-Bu0S66H1.js";
17
+ import { t as WEBXR_TO_NUE } from "../webxr-nue-basis-CqKQmZzT.js";
18
+ import { n as XR_ERROR_MESSAGE_UNKNOWN, r as getXrErrorMessage, t as XR_ERROR_MESSAGES } from "../xr-error-handler-C0AQRmxs.js";
19
+ export { BASELAYER_WINDOW_MAX, BASELAYER_WINDOW_MIN, CAPTURE_FAILURE_WARNING, CameraBlitCapture, type CameraBlitCaptureConfig, type CameraMode, type CameraTextureResult, type CapabilityMessageOptions, type CapabilitySupport, type CaptureFailureTracker, type CaptureFailureTrackerConfig, type CapturedImage, type ChromeVersion, type ChromiumProjectionLayerWorkaroundResult, DEFAULT_BLIT_CONFIG, DEFAULT_CAPTURE_CONFIG, DEFAULT_CAPTURE_TRACKER_CONFIG, type DepthInfo, DepthSampler, type DepthSamplerCallbacks, type DepthSamplerConfig, type DepthUnprojector, type EnableGpsArConfig, type EnableGpsArController, type EnableGpsArDeps, type EnableGpsArResult, type EnableGpsArState, type EnableGpsArStatus, type FrameUpdate, type GridCell, type ImageCaptureCallbacks, type ImageCaptureConfig, ImageCaptureManager, MIN_VALID_IMAGE_BYTES, OccupancyGrid, type OccupancyGridOptions, type RendererLike, type ReplaySceneState, SCENE_NODE, type SessionFeatureOptions, WEBXR_TO_NUE, type XRCameraLike, XR_ERROR_MESSAGES, XR_ERROR_MESSAGE_UNKNOWN, type XrFrameContext, type XrFrameUpdate, acquireCameraTexture, applyChromiumProjectionLayerWorkaround, bresenham3d, capabilityMessage, computeCaptureSize, createCaptureFailureTracker, createDepthUnprojector, createEnableGpsArController, disposeReplayScene, endARSession, getAlignmentLerper, getArWorldGroup, getCamera, getCameraFollower, getCameraMode, getCurrentArPose, getDepthSampleCount, getImageCaptureFrameCount, getLiveCss3dManager, getReplayState, getScene, getXrErrorMessage, initAR, initReplayScene, isFullySupported, needsBaseLayerPersistence, parseChromeVersion, registerFrameUpdate, registerXrFrameUpdate, setDepthCaptureCallback, setFrameCallback, setImageCaptureCallback, setTrackingCallbacks, setTrackingLostCallback, setTrackingStore, startDepthCapture, startImageCapture, stopDepthCapture, stopImageCapture, toggleCameraMode, unprojectDepthPoint, updateOrbitTarget, wrapXRDepthInfo };
package/dist/ar/index.js CHANGED
@@ -2,15 +2,18 @@ import { CameraBlitCapture, DEFAULT_BLIT_CONFIG, computeCaptureSize } from "./ca
2
2
  import { capabilityMessage, isFullySupported } from "./capability-checker.js";
3
3
  import { BASELAYER_WINDOW_MAX, BASELAYER_WINDOW_MIN, applyChromiumProjectionLayerWorkaround, needsBaseLayerPersistence, parseChromeVersion } from "./chromium-camera-access-workaround.js";
4
4
  import { CAPTURE_FAILURE_WARNING, DEFAULT_CAPTURE_TRACKER_CONFIG, createCaptureFailureTracker } from "./capture-failure-tracker.js";
5
- import { DepthSampler } from "./depth-sampler.js";
5
+ import { DepthSampler, wrapXRDepthInfo } from "./depth-sampler.js";
6
+ import { createDepthUnprojector, unprojectDepthPoint } from "./depth-unprojection.js";
7
+ import { bresenham3d } from "./bresenham3d.js";
8
+ import { OccupancyGrid } from "./occupancy-grid.js";
6
9
  import { registerFrameUpdate } from "./frame-loop.js";
7
10
  import { registerXrFrameUpdate } from "./xr-frame-loop.js";
8
- import { t as WEBXR_TO_NUE } from "../webxr-nue-basis-BbdqhqY6.js";
11
+ import { WEBXR_TO_NUE } from "./webxr-nue-basis.js";
9
12
  import { DEFAULT_CAPTURE_CONFIG, ImageCaptureManager, MIN_VALID_IMAGE_BYTES } from "./image-capture.js";
13
+ import { A as setTrackingLostCallback, D as setImageCaptureCallback, E as setFrameCallback, F as startImageCapture, I as stopDepthCapture, L as stopImageCapture, M as setTrackingStore, P as startDepthCapture, T as setDepthCaptureCallback, c as getArWorldGroup, d as getDepthSampleCount, f as getImageCaptureFrameCount, g as initAR, i as endARSession, k as setTrackingCallbacks, l as getCamera, m as getScene, p as getLiveCss3dManager, u as getCurrentArPose } from "../webxr-session-QhcSSub5.js";
10
14
  import { acquireCameraTexture } from "./xr-camera-texture.js";
11
15
  import { SCENE_NODE } from "./scene-node-names.js";
12
- import { endARSession, getArWorldGroup, getCamera, getCurrentArPose, getDepthSampleCount, getImageCaptureFrameCount, getLiveCss3dManager, getScene, initAR, setDepthCaptureCallback, setFrameCallback, setImageCaptureCallback, setTrackingCallbacks, setTrackingLostCallback, setTrackingStore, startDepthCapture, startImageCapture, stopDepthCapture, stopImageCapture } from "./webxr-session.js";
13
16
  import { createEnableGpsArController } from "./enable-gps-ar.js";
14
17
  import { disposeReplayScene, getAlignmentLerper, getCameraFollower, getCameraMode, getReplayState, initReplayScene, toggleCameraMode, updateOrbitTarget } from "./replay-scene.js";
15
18
  import { XR_ERROR_MESSAGES, XR_ERROR_MESSAGE_UNKNOWN, getXrErrorMessage } from "./xr-error-handler.js";
16
- export { BASELAYER_WINDOW_MAX, BASELAYER_WINDOW_MIN, CAPTURE_FAILURE_WARNING, CameraBlitCapture, DEFAULT_BLIT_CONFIG, DEFAULT_CAPTURE_CONFIG, DEFAULT_CAPTURE_TRACKER_CONFIG, DepthSampler, ImageCaptureManager, MIN_VALID_IMAGE_BYTES, SCENE_NODE, WEBXR_TO_NUE, XR_ERROR_MESSAGES, XR_ERROR_MESSAGE_UNKNOWN, acquireCameraTexture, applyChromiumProjectionLayerWorkaround, capabilityMessage, computeCaptureSize, createCaptureFailureTracker, createEnableGpsArController, disposeReplayScene, endARSession, getAlignmentLerper, getArWorldGroup, getCamera, getCameraFollower, getCameraMode, getCurrentArPose, getDepthSampleCount, getImageCaptureFrameCount, getLiveCss3dManager, getReplayState, getScene, getXrErrorMessage, initAR, initReplayScene, isFullySupported, needsBaseLayerPersistence, parseChromeVersion, registerFrameUpdate, registerXrFrameUpdate, setDepthCaptureCallback, setFrameCallback, setImageCaptureCallback, setTrackingCallbacks, setTrackingLostCallback, setTrackingStore, startDepthCapture, startImageCapture, stopDepthCapture, stopImageCapture, toggleCameraMode, updateOrbitTarget };
19
+ export { BASELAYER_WINDOW_MAX, BASELAYER_WINDOW_MIN, CAPTURE_FAILURE_WARNING, CameraBlitCapture, DEFAULT_BLIT_CONFIG, DEFAULT_CAPTURE_CONFIG, DEFAULT_CAPTURE_TRACKER_CONFIG, DepthSampler, ImageCaptureManager, MIN_VALID_IMAGE_BYTES, OccupancyGrid, SCENE_NODE, WEBXR_TO_NUE, XR_ERROR_MESSAGES, XR_ERROR_MESSAGE_UNKNOWN, acquireCameraTexture, applyChromiumProjectionLayerWorkaround, bresenham3d, capabilityMessage, computeCaptureSize, createCaptureFailureTracker, createDepthUnprojector, createEnableGpsArController, disposeReplayScene, endARSession, getAlignmentLerper, getArWorldGroup, getCamera, getCameraFollower, getCameraMode, getCurrentArPose, getDepthSampleCount, getImageCaptureFrameCount, getLiveCss3dManager, getReplayState, getScene, getXrErrorMessage, initAR, initReplayScene, isFullySupported, needsBaseLayerPersistence, parseChromeVersion, registerFrameUpdate, registerXrFrameUpdate, setDepthCaptureCallback, setFrameCallback, setImageCaptureCallback, setTrackingCallbacks, setTrackingLostCallback, setTrackingStore, startDepthCapture, startImageCapture, stopDepthCapture, stopImageCapture, toggleCameraMode, unprojectDepthPoint, updateOrbitTarget, wrapXRDepthInfo };
@@ -0,0 +1,2 @@
1
+ import { n as OccupancyGridOptions, t as OccupancyGrid } from "../occupancy-grid-BRNRaPyT.js";
2
+ export { OccupancyGrid, OccupancyGridOptions };