gps-plus-slam-app-framework 1.3.0 → 1.7.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.
- package/dist/absolute-orientation-CAEh840t.d.ts +54 -0
- package/dist/{app-selectors-B8VQoMDY.d.ts → app-selectors-ikTUQZpe.d.ts} +1 -1
- package/dist/ar/bresenham3d.d.ts +1 -1
- package/dist/ar/camera-blit-capture.d.ts +2 -2
- package/dist/ar/camera-blit-capture.js +74 -9
- package/dist/ar/capability-checker.d.ts +1 -1
- package/dist/ar/capture-failure-tracker.d.ts +1 -1
- package/dist/ar/chromium-camera-access-workaround.d.ts +1 -1
- package/dist/ar/depth-grid-lookup.d.ts +2 -0
- package/dist/ar/depth-grid-lookup.js +43 -0
- package/dist/ar/depth-sampler.d.ts +2 -2
- package/dist/ar/depth-sampler.js +2 -4
- package/dist/ar/depth-unprojection.d.ts +1 -1
- package/dist/ar/enable-gps-ar.d.ts +1 -1
- package/dist/ar/enable-gps-ar.js +26 -1
- package/dist/ar/frame-loop.d.ts +1 -1
- package/dist/ar/image-capture.d.ts +2 -2
- package/dist/ar/image-capture.js +1 -154
- package/dist/ar/image-quality.d.ts +2 -0
- package/dist/ar/image-quality.js +168 -0
- package/dist/ar/index.d.ts +31 -19
- package/dist/ar/index.js +17 -5
- package/dist/ar/occupancy-grid.d.ts +1 -1
- package/dist/ar/occupancy-grid.js +29 -2
- package/dist/ar/planar-pnp.d.ts +2 -0
- package/dist/ar/planar-pnp.js +425 -0
- package/dist/ar/qr-debug-view.d.ts +2 -0
- package/dist/ar/qr-debug-view.js +89 -0
- package/dist/ar/qr-derived-pose.d.ts +2 -0
- package/dist/ar/qr-derived-pose.js +114 -0
- package/dist/ar/qr-detection-controller.d.ts +2 -0
- package/dist/ar/qr-detection-controller.js +2 -0
- package/dist/ar/qr-frontend.d.ts +2 -0
- package/dist/ar/qr-frontend.js +60 -0
- package/dist/ar/qr-pose.d.ts +2 -0
- package/dist/ar/qr-pose.js +267 -0
- package/dist/ar/qr-size-depth-context.d.ts +3 -0
- package/dist/ar/qr-size-depth-context.js +42 -0
- package/dist/ar/qr-size-measurer.d.ts +2 -0
- package/dist/ar/qr-size-measurer.js +2 -0
- package/dist/ar/replay-scene.d.ts +1 -1
- package/dist/ar/replay-scene.js +1 -1
- package/dist/ar/scene-node-names.d.ts +1 -1
- package/dist/ar/webxr-nue-basis.d.ts +1 -1
- package/dist/ar/webxr-session.d.ts +4 -4
- package/dist/ar/webxr-session.js +2 -2
- package/dist/ar/xr-camera-texture.d.ts +1 -1
- package/dist/ar/xr-error-handler.d.ts +1 -1
- package/dist/ar/xr-frame-loop.d.ts +1 -1
- package/dist/ar-MFpFlV7j.js +382 -0
- package/dist/{ar-world-group-alignment-C9lwwIyI.d.ts → ar-world-group-alignment-69fgnB39.d.ts} +1 -1
- package/dist/{camera-blit-capture-CnxUDbKx.d.ts → camera-blit-capture-NKT9H5-e.d.ts} +57 -4
- package/dist/capture-motion-gate-0Yl2NpQG.d.ts +24 -0
- package/dist/capture-motion-gate-4EscNZCw.js +94 -0
- package/dist/concurrency-By0oOTZt.d.ts +50 -0
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +2 -2
- package/dist/create-slam-app-store-DkCHOpvb.js +149 -0
- package/dist/{create-slam-app-store-BljusOua.d.ts → create-slam-app-store-n_VF63D5.d.ts} +50 -40
- package/dist/depth-grid-lookup-DQ-IYhO3.d.ts +21 -0
- package/dist/{depth-sampler-Bhanfwla.d.ts → depth-sampler-asc8exHt.d.ts} +1 -1
- package/dist/{depth-unprojection-Y6i_mJuT.d.ts → depth-unprojection-DjsbJW9L.d.ts} +1 -1
- package/dist/{enable-gps-ar-BfUJOgpW.d.ts → enable-gps-ar-DkNhFv4Y.d.ts} +4 -4
- package/dist/{frame-conversions-BfsafGWR.d.ts → frame-conversions-DObhj8Wf.d.ts} +1 -1
- package/dist/{fused-path-DJoVu98b.d.ts → fused-path-v6eOmLl3.d.ts} +1 -1
- package/dist/geo/h3-proximity.d.ts +2 -2
- package/dist/geo/h3-proximity.js +61 -2
- package/dist/geo/index.d.ts +2 -2
- package/dist/geo/index.js +2 -2
- package/dist/geodesic-angle-BTldfFgs.js +39 -0
- package/dist/{gps-anchor-dYeCvvp5.d.ts → gps-anchor-BeFO2RYa.d.ts} +1 -1
- package/dist/{gps-ar-pose-sampler-DVb96iOy.d.ts → gps-ar-pose-sampler-DHMZmYAc.d.ts} +1 -1
- package/dist/{gps-event-coordinator-CWIDOk4U.d.ts → gps-event-coordinator-CjWW636x.d.ts} +21 -11
- package/dist/{gps-event-markers-Dc9FT-q1.d.ts → gps-event-markers-Cz9RMA2k.d.ts} +18 -0
- package/dist/{h3-proximity-I1msGPgE.d.ts → h3-proximity-C-j0pw1j.d.ts} +39 -1
- package/dist/image-capture-B2-b6tKK.js +374 -0
- package/dist/{image-capture-qAZ5Fh5X.d.ts → image-capture-CNZDrQXG.d.ts} +103 -3
- package/dist/image-quality-smCBoFj1.d.ts +158 -0
- package/dist/index-BAPokxMb.d.ts +22 -0
- package/dist/{index-BYYUdf9v.d.ts → index-BODDUTvD.d.ts} +1 -1
- package/dist/index-BneSj4_5.d.ts +399 -0
- package/dist/index-_Rhgoqkh.d.ts +2 -0
- package/dist/index.d.ts +80 -67
- package/dist/index.js +24 -12
- package/dist/{leaflet-map-overlay-6CJC-E1l.d.ts → leaflet-map-overlay-CmIyiE8n.d.ts} +1 -1
- package/dist/{map-data-CkloBxIl.d.ts → map-data-B4oEehUh.d.ts} +1 -1
- package/dist/{map-overlay-draw-krOKwDAq.d.ts → map-overlay-draw-ymz1s7fG.d.ts} +1 -1
- package/dist/{null-storage-backend-uKQE8tl7.d.ts → null-storage-backend-B9rtyDfG.d.ts} +2 -2
- package/dist/{occupancy-grid-BRNRaPyT.d.ts → occupancy-grid-DnOc-6PU.d.ts} +12 -2
- package/dist/{opfs-storage-D5zAn_lx.d.ts → opfs-storage-3VZh-qH6.d.ts} +23 -4
- package/dist/{opfs-storage-backend-6aYMUZlJ.d.ts → opfs-storage-backend-JJiUJo-3.d.ts} +3 -3
- package/dist/{persistence-middleware-B9ei4Nhx.d.ts → persistence-middleware-DAPTTwB2.d.ts} +1 -1
- package/dist/planar-pnp-my9bqULS.d.ts +67 -0
- package/dist/qr-debug-view-Brl73HGO.d.ts +29 -0
- package/dist/qr-derived-pose-CmxTP2m4.d.ts +122 -0
- package/dist/qr-detected-slice-VQssZmQJ.d.ts +166 -0
- package/dist/qr-detection-controller-B-tLVd-S.js +119 -0
- package/dist/qr-detection-controller-CDurHv8E.d.ts +48 -0
- package/dist/qr-frontend--fFX25mV.d.ts +58 -0
- package/dist/qr-pose-D2rfu5DA.d.ts +138 -0
- package/dist/qr-pose-aggregation-B7tWJq7j.d.ts +90 -0
- package/dist/qr-pose-aggregation-DBiaLW0O.js +191 -0
- package/dist/qr-size-depth-context-CeAG53fy.d.ts +13 -0
- package/dist/qr-size-measurer-DLb33geH.js +596 -0
- package/dist/qr-size-measurer-DQdAsid1.d.ts +165 -0
- package/dist/recording-options-BPCpMHLK.d.ts +514 -0
- package/dist/{recording-replayer-r0DZ9ALp.d.ts → recording-replayer-DQKpAGyQ.d.ts} +2 -2
- package/dist/recording-slice-DaxHZvNu.d.ts +55 -0
- package/dist/{replay-engine-XpDa0dy1.d.ts → replay-engine-CmKh_4wf.d.ts} +7 -4
- package/dist/{replay-scene-Bw58VL6p.d.ts → replay-scene-DBlDrV_x.d.ts} +3 -3
- package/dist/sensors/absolute-orientation.d.ts +2 -0
- package/dist/sensors/absolute-orientation.js +145 -0
- package/dist/sensors/gps-error-handler.d.ts +1 -1
- package/dist/sensors/gps.d.ts +1 -1
- package/dist/sensors/index.d.ts +5 -4
- package/dist/sensors/index.js +2 -1
- package/dist/sensors/permission-checker.d.ts +1 -1
- package/dist/sensors/permission-checker.js +1 -1
- package/dist/state/app-selectors.d.ts +1 -1
- package/dist/state/combined-root-state.d.ts +1 -1
- package/dist/state/create-slam-app-store.d.ts +1 -1
- package/dist/state/create-slam-app-store.js +1 -74
- package/dist/state/gps-ar-pose-sampler.d.ts +3 -3
- package/dist/state/gps-event-coordinator.d.ts +2 -2
- package/dist/state/gps-event-coordinator.js +27 -17
- package/dist/state/index.d.ts +20 -17
- package/dist/state/index.js +5 -4
- package/dist/state/persistence-middleware.d.ts +1 -1
- package/dist/state/persistence-middleware.js +30 -19
- package/dist/state/qr-detected-slice.d.ts +4 -0
- package/dist/state/qr-detected-slice.js +311 -0
- package/dist/state/recording-options.d.ts +2 -2
- package/dist/state/recording-options.js +273 -7
- package/dist/state/recording-replayer.d.ts +2 -2
- package/dist/state/recording-replayer.js +1 -1
- package/dist/state/recording-slice.d.ts +1 -1
- package/dist/state/recording-slice.js +5 -1
- package/dist/state/replay-engine.d.ts +1 -1
- package/dist/state/replay-engine.js +7 -3
- package/dist/state/store-subscribers.d.ts +2 -2
- package/dist/state/subscribe-to-selector.d.ts +1 -1
- package/dist/state/tracking-quality.d.ts +2 -2
- package/dist/state/tracking-quality.js +40 -128
- package/dist/state/tracking-slice.d.ts +1 -1
- package/dist/{state-BkIfpiyA.js → state-E51QT_-j.js} +2 -1
- package/dist/storage/file-system-utils.d.ts +1 -1
- package/dist/storage/index.d.ts +9 -9
- package/dist/storage/index.js +4 -4
- package/dist/storage/null-storage-backend.d.ts +1 -1
- package/dist/storage/opfs-storage-backend.d.ts +1 -1
- package/dist/storage/opfs-storage-backend.js +3 -3
- package/dist/storage/opfs-storage.d.ts +1 -1
- package/dist/storage/opfs-storage.js +5 -4
- package/dist/storage/storage-backend.d.ts +1 -1
- package/dist/storage/zip-coverage-embed.d.ts +2 -0
- package/dist/storage/zip-coverage-embed.js +88 -0
- package/dist/storage/zip-export.d.ts +2 -2
- package/dist/storage/zip-export.js +37 -59
- package/dist/storage/zip-reader.d.ts +1 -1
- package/dist/{storage-backend-Do6YDpNo.d.ts → storage-backend-BdVLD0dU.d.ts} +1 -1
- package/dist/{store-subscribers-0YWyOLvV.d.ts → store-subscribers-CA6AJH_8.d.ts} +2 -2
- package/dist/{subscribe-to-selector-CZ6k1NFP.d.ts → subscribe-to-selector-B6EUmQ3I.d.ts} +1 -1
- package/dist/test-utils/browser-mocks.d.ts +7 -1
- package/dist/test-utils/browser-mocks.js +6 -0
- package/dist/test-utils/zip-round-trip-helpers.d.ts +9 -1
- package/dist/test-utils/zip-round-trip-helpers.js +5 -1
- package/dist/{tracking-slice-CdK8c-8P.d.ts → tracking-slice-BuAZxXZ5.d.ts} +1 -1
- package/dist/types/ar-types.d.ts +1 -1
- package/dist/types/geo-types.d.ts +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/utils/concurrency.d.ts +2 -2
- package/dist/utils/concurrency.js +66 -2
- package/dist/utils/failure-tracker.d.ts +1 -1
- package/dist/utils/format-file-size.d.ts +1 -1
- package/dist/utils/fused-path.d.ts +1 -1
- package/dist/utils/index.d.ts +8 -7
- package/dist/utils/index.js +2 -1
- package/dist/utils/list-formatter.d.ts +1 -1
- package/dist/utils/logger.d.ts +1 -1
- package/dist/visualization/accuracy-circles.d.ts +1 -1
- package/dist/visualization/alignment-lerper.d.ts +1 -1
- package/dist/visualization/ar-world-group-alignment.d.ts +1 -1
- package/dist/visualization/ar-world-group-alignment.js +1 -1
- package/dist/visualization/camera-follower.d.ts +1 -1
- package/dist/visualization/css3d-renderer-manager.d.ts +1 -1
- package/dist/visualization/frame-conversions.d.ts +1 -1
- package/dist/visualization/frustum-visibility.d.ts +1 -1
- package/dist/visualization/gps-anchor.d.ts +1 -1
- package/dist/visualization/gps-compass-cubes.d.ts +1 -1
- package/dist/visualization/gps-event-markers.d.ts +1 -1
- package/dist/visualization/gps-event-markers.js +40 -5
- package/dist/visualization/hit-test-reticle.d.ts +1 -1
- package/dist/visualization/hit-test-reticle.js +1 -0
- package/dist/visualization/index.d.ts +18 -18
- package/dist/visualization/leaflet-map-overlay.d.ts +1 -1
- package/dist/visualization/leaflet-map-overlay.js +15 -3
- package/dist/visualization/lerp-utils.d.ts +1 -1
- package/dist/visualization/map-data.d.ts +1 -1
- package/dist/visualization/map-overlay-draw.d.ts +1 -1
- package/dist/visualization/map-overlay.d.ts +1 -1
- package/dist/visualization/three-dispose.d.ts +1 -1
- package/dist/visualization/vis-colors.d.ts +1 -1
- package/dist/{webxr-session-TIaD883f.js → webxr-session-DG-eNfny.js} +244 -11
- package/dist/{webxr-session-GjZ2BIpS.d.ts → webxr-session-Do5L6G3B.d.ts} +86 -8
- package/dist/zip-coverage-embed-DCAREVmw.d.ts +41 -0
- package/dist/{zip-export-G14hkSPG.d.ts → zip-export-ol0S_Ofd.d.ts} +27 -23
- package/package.json +2 -2
- package/dist/concurrency-CO1FQvs3.d.ts +0 -24
- package/dist/file-system-CwXTNHmB.d.ts +0 -114
- package/dist/index-CF05QV2m.d.ts +0 -2
- package/dist/recording-options-DJBXuMxV.d.ts +0 -182
- package/dist/recording-slice-89O07ebs.d.ts +0 -36
- package/dist/storage/file-system.d.ts +0 -2
- package/dist/storage/file-system.js +0 -289
- /package/dist/{accuracy-circles-BpwWAs8G.d.ts → accuracy-circles-BtqOP_v1.d.ts} +0 -0
- /package/dist/{alignment-lerper-Dm9G7JJO.d.ts → alignment-lerper-Bil6vbVw.d.ts} +0 -0
- /package/dist/{ar-types-Dan1MVTi.d.ts → ar-types-BFX2r1wk.d.ts} +0 -0
- /package/dist/{bresenham3d-CFfd7n6B.d.ts → bresenham3d-CU1Gv2W4.d.ts} +0 -0
- /package/dist/{camera-follower-C2mwEn7c.d.ts → camera-follower-CqJJ7zRj.d.ts} +0 -0
- /package/dist/{capability-checker-CQXJHxXg.d.ts → capability-checker-DUQLg6gq.d.ts} +0 -0
- /package/dist/{capture-failure-tracker-CUeU3L_M.d.ts → capture-failure-tracker-gsm8q7yi.d.ts} +0 -0
- /package/dist/{chromium-camera-access-workaround-Jqbn0apH.d.ts → chromium-camera-access-workaround-D4K2uwwQ.d.ts} +0 -0
- /package/dist/{css3d-renderer-manager-ptu_t3B3.d.ts → css3d-renderer-manager-B3kGNtcn.d.ts} +0 -0
- /package/dist/{failure-tracker-Cn8Fo9D4.d.ts → failure-tracker-BO7M7jF_.d.ts} +0 -0
- /package/dist/{file-system-utils-CXIoL-DM.d.ts → file-system-utils-DOajnMm-.d.ts} +0 -0
- /package/dist/{format-file-size-CLCZz3lC.d.ts → format-file-size-Dc98ulzB.d.ts} +0 -0
- /package/dist/{frame-loop-CMewS8cY.d.ts → frame-loop-CpVjQ1dH.d.ts} +0 -0
- /package/dist/{frustum-visibility-CmI96ESS.d.ts → frustum-visibility-CeoCZchO.d.ts} +0 -0
- /package/dist/{geo-types-SaPnIEUM.d.ts → geo-types-3Ip1NzVR.d.ts} +0 -0
- /package/dist/{gps-VuezJWK3.d.ts → gps-BBO3hKfT.d.ts} +0 -0
- /package/dist/{gps-compass-cubes-BM1uGiYV.d.ts → gps-compass-cubes-DSN87L8p.d.ts} +0 -0
- /package/dist/{gps-error-handler-CJl_2MVm.d.ts → gps-error-handler-BbPsfw-_.d.ts} +0 -0
- /package/dist/{hit-test-reticle-BEzEybxZ.d.ts → hit-test-reticle-DV-2TpB9.d.ts} +0 -0
- /package/dist/{lerp-utils-BpV-0Dtk.d.ts → lerp-utils-BLmHhkVe.d.ts} +0 -0
- /package/dist/{list-formatter-RRcBe8Vg.d.ts → list-formatter-KNMS0ay2.d.ts} +0 -0
- /package/dist/{logger-BEHXsnnq.d.ts → logger-CLnPrHiD.d.ts} +0 -0
- /package/dist/{map-overlay-bcogY5fK.d.ts → map-overlay-Dh2B97MP.d.ts} +0 -0
- /package/dist/{permission-checker-GpAiSCwd.d.ts → permission-checker-CDuI8BwC.d.ts} +0 -0
- /package/dist/{scene-node-names-Bu0S66H1.d.ts → scene-node-names-BiShOQDB.d.ts} +0 -0
- /package/dist/{session-disposers-M-oashRH.js → session-disposers-zv9OGXPB.js} +0 -0
- /package/dist/{three-dispose-D950t71B.d.ts → three-dispose-Bt1k7WKh.d.ts} +0 -0
- /package/dist/{vis-colors-D6omC64K.d.ts → vis-colors-Obw2pLqT.d.ts} +0 -0
- /package/dist/{webxr-nue-basis-CqKQmZzT.d.ts → webxr-nue-basis-3nfjDJJp.d.ts} +0 -0
- /package/dist/{xr-camera-texture-DBwCaKTd.d.ts → xr-camera-texture-Cva1q3Qj.d.ts} +0 -0
- /package/dist/{xr-error-handler-C0AQRmxs.d.ts → xr-error-handler-CtvHpjfm.d.ts} +0 -0
- /package/dist/{xr-frame-loop-BtYytZJg.d.ts → xr-frame-loop-DIYtRcUa.d.ts} +0 -0
- /package/dist/{zip-reader-DSEXt7K6.d.ts → zip-reader-D9iPQwdQ.d.ts} +0 -0
|
@@ -20,14 +20,6 @@ import { BlobReader, BlobWriter, ZipWriter } from "@zip.js/zip.js";
|
|
|
20
20
|
*/
|
|
21
21
|
const log = createLogger("ZipExport");
|
|
22
22
|
/**
|
|
23
|
-
* Get the OPFS scenarios directory handle.
|
|
24
|
-
* Re-acquires from navigator.storage to avoid holding stale references.
|
|
25
|
-
* Creates on demand so it works even when initOpfsStorage only creates sessions/.
|
|
26
|
-
*/
|
|
27
|
-
async function getScenariosHandle() {
|
|
28
|
-
return (await (await navigator.storage.getDirectory()).getDirectoryHandle("gps-plus-slam")).getDirectoryHandle("scenarios", { create: true });
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
23
|
* Get the OPFS sessions directory handle (flat layout).
|
|
32
24
|
*/
|
|
33
25
|
async function getSessionsHandle() {
|
|
@@ -56,49 +48,48 @@ async function streamDirectoryToZip(dirHandle, zipWriter, basePath = "") {
|
|
|
56
48
|
return count;
|
|
57
49
|
}
|
|
58
50
|
/**
|
|
59
|
-
* Export a session from OPFS as a ZIP blob.
|
|
51
|
+
* Export a flat-layout session from OPFS as a ZIP blob.
|
|
60
52
|
*
|
|
61
53
|
* The ZIP structure mirrors the OPFS session structure:
|
|
62
54
|
* - session.json (at root)
|
|
63
55
|
* - actions/000001.json, actions/000002.json, ...
|
|
64
56
|
* - images/frame-000001.jpg, images/frame-000002.jpg, ... (legacy: frames/)
|
|
65
|
-
* - refPoints/{h3}.json (only observations from this session, scenario layout only)
|
|
66
57
|
*
|
|
67
|
-
* Uses "store" mode (compression level 0) for fast packaging.
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
* - `exportSessionAsZip(sessionName)` — flat layout (sessions/)
|
|
71
|
-
* - `exportSessionAsZip(scenarioName, sessionName)` — scenario layout (scenarios/{name}/)
|
|
58
|
+
* Uses "store" mode (compression level 0) for fast packaging. Consumers with a
|
|
59
|
+
* different on-disk layout (one that nests sessions under a named bucket)
|
|
60
|
+
* resolve their own session handle and call {@link exportSessionHandleAsZip}.
|
|
72
61
|
*
|
|
62
|
+
* @param sessionName - Name of the session folder under `sessions/`.
|
|
73
63
|
* @returns ZIP export result with blob and file count
|
|
74
|
-
* @throws Error if session not found
|
|
64
|
+
* @throws Error if the session is not found
|
|
75
65
|
*/
|
|
76
|
-
async function exportSessionAsZip(
|
|
66
|
+
async function exportSessionAsZip(sessionName, options) {
|
|
67
|
+
log.info(`Exporting session: ${sessionName}`);
|
|
68
|
+
const sessionsDir = await getSessionsHandle();
|
|
77
69
|
let sessionHandle;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
let scenarioHandle;
|
|
83
|
-
try {
|
|
84
|
-
scenarioHandle = await scenariosDir.getDirectoryHandle(scenarioName);
|
|
85
|
-
} catch {
|
|
86
|
-
throw new Error(`Scenario "${scenarioName}" not found in OPFS storage`);
|
|
87
|
-
}
|
|
88
|
-
try {
|
|
89
|
-
sessionHandle = await scenarioHandle.getDirectoryHandle(sessionName);
|
|
90
|
-
} catch {
|
|
91
|
-
throw new Error(`Session "${sessionName}" not found in scenario "${scenarioName}"`);
|
|
92
|
-
}
|
|
93
|
-
} else {
|
|
94
|
-
log.info(`Exporting session: ${scenarioNameOrSessionName}`);
|
|
95
|
-
const sessionsDir = await getSessionsHandle();
|
|
96
|
-
try {
|
|
97
|
-
sessionHandle = await sessionsDir.getDirectoryHandle(scenarioNameOrSessionName);
|
|
98
|
-
} catch {
|
|
99
|
-
throw new Error(`Session "${scenarioNameOrSessionName}" not found in OPFS storage`);
|
|
100
|
-
}
|
|
70
|
+
try {
|
|
71
|
+
sessionHandle = await sessionsDir.getDirectoryHandle(sessionName);
|
|
72
|
+
} catch {
|
|
73
|
+
throw new Error(`Session "${sessionName}" not found in OPFS storage`);
|
|
101
74
|
}
|
|
75
|
+
return exportSessionHandleAsZip(sessionHandle, options);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Stream an already-resolved session directory handle to a ZIP blob, running
|
|
79
|
+
* any caller-supplied extension {@link ZipExportContributor}s after the
|
|
80
|
+
* framework-owned files.
|
|
81
|
+
*
|
|
82
|
+
* This is the layout-agnostic core of {@link exportSessionAsZip}: consumers
|
|
83
|
+
* that resolve a session directory handle themselves (e.g. an app that nests
|
|
84
|
+
* sessions under its own grouping layer) call this directly so the framework's
|
|
85
|
+
* ZIP schema stays the single source of truth without the framework needing to
|
|
86
|
+
* know how the handle was located.
|
|
87
|
+
*
|
|
88
|
+
* @param sessionHandle - The session directory to package (must contain the
|
|
89
|
+
* framework-owned `session.json` / `actions/` / `images/` tree).
|
|
90
|
+
* @returns ZIP export result with blob and file count.
|
|
91
|
+
*/
|
|
92
|
+
async function exportSessionHandleAsZip(sessionHandle, options) {
|
|
102
93
|
const zipWriter = new ZipWriter(new BlobWriter("application/zip"), { level: 0 });
|
|
103
94
|
let fileCount = await streamDirectoryToZip(sessionHandle, zipWriter);
|
|
104
95
|
const contributors = options?.contributors ?? [];
|
|
@@ -136,14 +127,13 @@ async function exportSessionAsZip(scenarioNameOrSessionName, sessionName, option
|
|
|
136
127
|
* the last synced ZIP contains all data up to that point.
|
|
137
128
|
*
|
|
138
129
|
* @param fileHandle - File handle from showSaveFilePicker
|
|
139
|
-
* @param
|
|
140
|
-
* @param sessionName - Name of the session folder
|
|
130
|
+
* @param sessionName - Name of the session folder under `sessions/`
|
|
141
131
|
* @returns ZIP export result with blob and file count
|
|
142
|
-
* @throws Error if
|
|
132
|
+
* @throws Error if the session is not found
|
|
143
133
|
*/
|
|
144
|
-
async function syncToExternalZip(fileHandle,
|
|
145
|
-
log.info(`Syncing to external ZIP: ${
|
|
146
|
-
const result = await exportSessionAsZip(
|
|
134
|
+
async function syncToExternalZip(fileHandle, sessionName, options) {
|
|
135
|
+
log.info(`Syncing to external ZIP: ${sessionName}`);
|
|
136
|
+
const result = await exportSessionAsZip(sessionName, options);
|
|
147
137
|
const writable = await fileHandle.createWritable();
|
|
148
138
|
await writable.write(result.blob);
|
|
149
139
|
await writable.close();
|
|
@@ -191,17 +181,5 @@ async function downloadZip(blob, filename) {
|
|
|
191
181
|
setTimeout(() => URL.revokeObjectURL(url), 1e3);
|
|
192
182
|
log.info(`Download triggered via <a download>: ${filename}`);
|
|
193
183
|
}
|
|
194
|
-
/**
|
|
195
|
-
* Export and download a session in one step.
|
|
196
|
-
*
|
|
197
|
-
* Convenience function combining exportSessionAsZip and downloadZip.
|
|
198
|
-
*
|
|
199
|
-
* @param scenarioName - Name of the scenario
|
|
200
|
-
* @param sessionName - Name of the session folder
|
|
201
|
-
*/
|
|
202
|
-
async function exportAndDownloadSession(scenarioName, sessionName) {
|
|
203
|
-
const { blob } = await exportSessionAsZip(scenarioName, sessionName);
|
|
204
|
-
await downloadZip(blob, `${scenarioName}-${sessionName}.zip`);
|
|
205
|
-
}
|
|
206
184
|
//#endregion
|
|
207
|
-
export { downloadZip,
|
|
185
|
+
export { downloadZip, exportSessionAsZip, exportSessionHandleAsZip, syncToExternalZip };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as ZipActionEntry, c as loadEntriesFromSubdir, d as loadSessionMetadataFromBlob, f as readZipEntries, i as RecordedAction, l as loadGpsPathFromBlob, n as GpsPathCoord, o as ZipSubdirEntry, r as MAX_ACTION_FILE_SIZE, s as loadActionsFromZip, t as Entry, u as loadSessionMetadata } from "../zip-reader-
|
|
1
|
+
import { a as ZipActionEntry, c as loadEntriesFromSubdir, d as loadSessionMetadataFromBlob, f as readZipEntries, i as RecordedAction, l as loadGpsPathFromBlob, n as GpsPathCoord, o as ZipSubdirEntry, r as MAX_ACTION_FILE_SIZE, s as loadActionsFromZip, t as Entry, u as loadSessionMetadata } from "../zip-reader-D9iPQwdQ.js";
|
|
2
2
|
export { Entry, GpsPathCoord, MAX_ACTION_FILE_SIZE, RecordedAction, ZipActionEntry, ZipSubdirEntry, loadActionsFromZip, loadEntriesFromSubdir, loadGpsPathFromBlob, loadSessionMetadata, loadSessionMetadataFromBlob, readZipEntries };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as MapData } from "./map-data-
|
|
2
|
-
import { t as SubscribableStore } from "./subscribe-to-selector-
|
|
1
|
+
import { t as MapData } from "./map-data-B4oEehUh.js";
|
|
2
|
+
import { t as SubscribableStore } from "./subscribe-to-selector-B6EUmQ3I.js";
|
|
3
3
|
import { LatLong, Matrix4, Quaternion, Vector3 } from "gps-plus-slam-js";
|
|
4
4
|
|
|
5
5
|
//#region ../src/state/store-subscribers.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as WebXRQuaternion, s as WebXRVec3 } from "../ar-types-
|
|
1
|
+
import { o as WebXRQuaternion, s as WebXRVec3 } from "../ar-types-BFX2r1wk.js";
|
|
2
2
|
import { Mock } from "vitest";
|
|
3
3
|
|
|
4
4
|
//#region ../src/test-utils/browser-mocks.d.ts
|
|
@@ -195,6 +195,9 @@ declare class MockFSDirectoryHandle implements FileSystemDirectoryHandle {
|
|
|
195
195
|
queryPermission(_descriptor?: {
|
|
196
196
|
mode?: 'read' | 'readwrite';
|
|
197
197
|
}): Promise<PermissionState>;
|
|
198
|
+
requestPermission(_descriptor?: {
|
|
199
|
+
mode?: 'read' | 'readwrite';
|
|
200
|
+
}): Promise<PermissionState>;
|
|
198
201
|
}
|
|
199
202
|
/**
|
|
200
203
|
* Install File System Access API mocks on the global window object.
|
|
@@ -251,6 +254,9 @@ declare class MockOPFSDirectoryHandle implements FileSystemDirectoryHandle {
|
|
|
251
254
|
queryPermission(_descriptor?: {
|
|
252
255
|
mode?: 'read' | 'readwrite';
|
|
253
256
|
}): Promise<PermissionState>;
|
|
257
|
+
requestPermission(_descriptor?: {
|
|
258
|
+
mode?: 'read' | 'readwrite';
|
|
259
|
+
}): Promise<PermissionState>;
|
|
254
260
|
}
|
|
255
261
|
/**
|
|
256
262
|
* Mock OPFS file handle with writable stream support.
|
|
@@ -348,6 +348,9 @@ var MockFSDirectoryHandle = class MockFSDirectoryHandle {
|
|
|
348
348
|
queryPermission(_descriptor) {
|
|
349
349
|
return Promise.resolve("granted");
|
|
350
350
|
}
|
|
351
|
+
requestPermission(_descriptor) {
|
|
352
|
+
return Promise.resolve("granted");
|
|
353
|
+
}
|
|
351
354
|
};
|
|
352
355
|
/**
|
|
353
356
|
* Install File System Access API mocks on the global window object.
|
|
@@ -462,6 +465,9 @@ var MockOPFSDirectoryHandle = class MockOPFSDirectoryHandle {
|
|
|
462
465
|
queryPermission(_descriptor) {
|
|
463
466
|
return Promise.resolve("granted");
|
|
464
467
|
}
|
|
468
|
+
requestPermission(_descriptor) {
|
|
469
|
+
return Promise.resolve("granted");
|
|
470
|
+
}
|
|
465
471
|
};
|
|
466
472
|
/**
|
|
467
473
|
* Mock OPFS file handle with writable stream support.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as RecordedAction } from "../zip-reader-
|
|
1
|
+
import { i as RecordedAction } from "../zip-reader-D9iPQwdQ.js";
|
|
2
2
|
import { LatLong } from "gps-plus-slam-js";
|
|
3
3
|
|
|
4
4
|
//#region ../src/test-utils/zip-round-trip-helpers.d.ts
|
|
@@ -18,6 +18,14 @@ interface ProduceTestZipOptions {
|
|
|
18
18
|
* the field is left off — matching pre-accuracy recordings.
|
|
19
19
|
*/
|
|
20
20
|
gpsAccuracy?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Optional per-tour H3 coverage index written into `session.json`. When
|
|
23
|
+
* omitted, the fields are left off — matching legacy recordings that predate
|
|
24
|
+
* the coverage index (so the browser must backfill from the GPS path).
|
|
25
|
+
* When provided, `h3Resolution` defaults to 11.
|
|
26
|
+
*/
|
|
27
|
+
h3Cells?: string[];
|
|
28
|
+
h3Resolution?: number;
|
|
21
29
|
}
|
|
22
30
|
/** Result of producing a test zip, with all metadata needed for assertions. */
|
|
23
31
|
interface TestZipResult {
|
|
@@ -179,7 +179,11 @@ async function produceTestZip(opts) {
|
|
|
179
179
|
contextTag: options.scenarioName,
|
|
180
180
|
actionCount: actionIndex,
|
|
181
181
|
frameCount: options.frameCount,
|
|
182
|
-
userAgent: options.deviceInfo
|
|
182
|
+
userAgent: options.deviceInfo,
|
|
183
|
+
...options.h3Cells ? {
|
|
184
|
+
h3Cells: options.h3Cells,
|
|
185
|
+
h3Resolution: options.h3Resolution ?? 11
|
|
186
|
+
} : {}
|
|
183
187
|
});
|
|
184
188
|
const { blob } = await exportSessionAsZip(sessionName);
|
|
185
189
|
return {
|
package/dist/types/ar-types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as RgbTuple, i as DepthSample, n as ArPoseTuples, o as WebXRQuaternion, r as DepthPoint, s as WebXRVec3, t as ARPose } from "../ar-types-
|
|
1
|
+
import { a as RgbTuple, i as DepthSample, n as ArPoseTuples, o as WebXRQuaternion, r as DepthPoint, s as WebXRVec3, t as ARPose } from "../ar-types-BFX2r1wk.js";
|
|
2
2
|
export { ARPose, ArPoseTuples, DepthPoint, DepthSample, RgbTuple, WebXRQuaternion, WebXRVec3 };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as RawGpsSample, r as RefPointMarker, t as GpsCoord } from "../geo-types-
|
|
1
|
+
import { n as RawGpsSample, r as RefPointMarker, t as GpsCoord } from "../geo-types-3Ip1NzVR.js";
|
|
2
2
|
export { GpsCoord, RawGpsSample, RefPointMarker };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as RgbTuple, i as DepthSample, n as ArPoseTuples, o as WebXRQuaternion, r as DepthPoint, s as WebXRVec3, t as ARPose } from "../ar-types-
|
|
2
|
-
import { n as RawGpsSample, r as RefPointMarker, t as GpsCoord } from "../geo-types-
|
|
1
|
+
import { a as RgbTuple, i as DepthSample, n as ArPoseTuples, o as WebXRQuaternion, r as DepthPoint, s as WebXRVec3, t as ARPose } from "../ar-types-BFX2r1wk.js";
|
|
2
|
+
import { n as RawGpsSample, r as RefPointMarker, t as GpsCoord } from "../geo-types-3Ip1NzVR.js";
|
|
3
3
|
export { ARPose, ArPoseTuples, DepthPoint, DepthSample, GpsCoord, RawGpsSample, RefPointMarker, RgbTuple, WebXRQuaternion, WebXRVec3 };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { mapWithConcurrencyLimit };
|
|
1
|
+
import { n as mapWithConcurrencyLimit, t as forEachWithConcurrencyLimit } from "../concurrency-By0oOTZt.js";
|
|
2
|
+
export { forEachWithConcurrencyLimit, mapWithConcurrencyLimit };
|
|
@@ -24,17 +24,81 @@ async function mapWithConcurrencyLimit(items, limit, mapper) {
|
|
|
24
24
|
const results = new Array(items.length);
|
|
25
25
|
if (items.length === 0) return results;
|
|
26
26
|
let nextIndex = 0;
|
|
27
|
+
let failed = false;
|
|
28
|
+
let firstError;
|
|
27
29
|
const worker = async () => {
|
|
28
30
|
while (nextIndex < items.length) {
|
|
31
|
+
if (failed) return;
|
|
29
32
|
const currentIndex = nextIndex++;
|
|
30
|
-
|
|
33
|
+
try {
|
|
34
|
+
results[currentIndex] = await mapper(items[currentIndex], currentIndex);
|
|
35
|
+
} catch (err) {
|
|
36
|
+
if (!failed) {
|
|
37
|
+
failed = true;
|
|
38
|
+
firstError = err;
|
|
39
|
+
}
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
31
42
|
}
|
|
32
43
|
};
|
|
33
44
|
const workerCount = Math.min(limit, items.length);
|
|
34
45
|
const workers = [];
|
|
35
46
|
for (let i = 0; i < workerCount; i++) workers.push(worker());
|
|
36
47
|
await Promise.all(workers);
|
|
48
|
+
if (failed) throw firstError;
|
|
37
49
|
return results;
|
|
38
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Run an async worker over each item with a concurrency cap, invoking the worker
|
|
53
|
+
* per item as the pool pulls it (rather than collecting results into an array).
|
|
54
|
+
*
|
|
55
|
+
* Unlike {@link mapWithConcurrencyLimit}, this returns no values — the worker is
|
|
56
|
+
* expected to produce its side effect (e.g. emit a streaming callback) itself.
|
|
57
|
+
* This is the shape progressive consumers need: each item is handled and can be
|
|
58
|
+
* reported as soon as it settles, instead of waiting for the whole batch.
|
|
59
|
+
*
|
|
60
|
+
* Completion order is **not** guaranteed (it depends on which worker finishes
|
|
61
|
+
* first). Each item's worker is invoked exactly once unless the run is aborted.
|
|
62
|
+
*
|
|
63
|
+
* When an `AbortSignal` is supplied, workers stop pulling **new** items as soon
|
|
64
|
+
* as the signal is aborted (checked before each pull). Items already in flight
|
|
65
|
+
* run to completion — the File System Access reads underneath cannot be torn
|
|
66
|
+
* mid-read — but no further items are started, so a destroyed consumer stops
|
|
67
|
+
* accumulating work. If the signal is already aborted, no work starts at all.
|
|
68
|
+
*
|
|
69
|
+
* @param items - Items to process
|
|
70
|
+
* @param limit - Maximum number of concurrent worker invocations (`>= 1`)
|
|
71
|
+
* @param worker - Async side-effecting function applied to each item
|
|
72
|
+
* @param signal - Optional abort signal that halts pulling new items
|
|
73
|
+
* @throws RangeError if `limit < 1`
|
|
74
|
+
* @throws Re-throws the first error from any worker invocation (fail-fast)
|
|
75
|
+
*/
|
|
76
|
+
async function forEachWithConcurrencyLimit(items, limit, worker, signal) {
|
|
77
|
+
if (limit < 1) throw new RangeError(`Concurrency limit must be >= 1, got ${limit}`);
|
|
78
|
+
if (items.length === 0) return;
|
|
79
|
+
let nextIndex = 0;
|
|
80
|
+
let failed = false;
|
|
81
|
+
let firstError;
|
|
82
|
+
const pump = async () => {
|
|
83
|
+
while (nextIndex < items.length) {
|
|
84
|
+
if (signal?.aborted || failed) return;
|
|
85
|
+
const currentIndex = nextIndex++;
|
|
86
|
+
try {
|
|
87
|
+
await worker(items[currentIndex], currentIndex);
|
|
88
|
+
} catch (err) {
|
|
89
|
+
if (!failed) {
|
|
90
|
+
failed = true;
|
|
91
|
+
firstError = err;
|
|
92
|
+
}
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
const workerCount = Math.min(limit, items.length);
|
|
98
|
+
const workers = [];
|
|
99
|
+
for (let i = 0; i < workerCount; i++) workers.push(pump());
|
|
100
|
+
await Promise.all(workers);
|
|
101
|
+
if (failed) throw firstError;
|
|
102
|
+
}
|
|
39
103
|
//#endregion
|
|
40
|
-
export { mapWithConcurrencyLimit };
|
|
104
|
+
export { forEachWithConcurrencyLimit, mapWithConcurrencyLimit };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as FailureTrackerConfig, r as createFailureTracker, t as FailureTracker } from "../failure-tracker-
|
|
1
|
+
import { n as FailureTrackerConfig, r as createFailureTracker, t as FailureTracker } from "../failure-tracker-BO7M7jF_.js";
|
|
2
2
|
export { FailureTracker, FailureTrackerConfig, createFailureTracker };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as formatFileSize } from "../format-file-size-
|
|
1
|
+
import { t as formatFileSize } from "../format-file-size-Dc98ulzB.js";
|
|
2
2
|
export { formatFileSize };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as computeFusedPath, r as fusedGpsFromOdom, t as FusedPathInput } from "../fused-path-
|
|
1
|
+
import { n as computeFusedPath, r as fusedGpsFromOdom, t as FusedPathInput } from "../fused-path-v6eOmLl3.js";
|
|
2
2
|
export { FusedPathInput, computeFusedPath, fusedGpsFromOdom };
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { a as createLogger, c as setGlobalLogLevel, i as clearLogBuffer, l as subscribeToLogs, n as LogLevel, o as getGlobalLogLevel, r as Logger, s as getLogBuffer, t as LogEntry } from "../logger-
|
|
2
|
-
import { n as computeFusedPath, r as fusedGpsFromOdom, t as FusedPathInput } from "../fused-path-
|
|
3
|
-
import { n as FailureTrackerConfig, r as createFailureTracker, t as FailureTracker } from "../failure-tracker-
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
|
|
1
|
+
import { a as createLogger, c as setGlobalLogLevel, i as clearLogBuffer, l as subscribeToLogs, n as LogLevel, o as getGlobalLogLevel, r as Logger, s as getLogBuffer, t as LogEntry } from "../logger-CLnPrHiD.js";
|
|
2
|
+
import { n as computeFusedPath, r as fusedGpsFromOdom, t as FusedPathInput } from "../fused-path-v6eOmLl3.js";
|
|
3
|
+
import { n as FailureTrackerConfig, r as createFailureTracker, t as FailureTracker } from "../failure-tracker-BO7M7jF_.js";
|
|
4
|
+
import { n as mapWithConcurrencyLimit } from "../concurrency-By0oOTZt.js";
|
|
5
|
+
import { t as geodesicAngleRad } from "../index-BAPokxMb.js";
|
|
6
|
+
import { t as formatFileSize } from "../format-file-size-Dc98ulzB.js";
|
|
7
|
+
import { t as listFormatter } from "../list-formatter-KNMS0ay2.js";
|
|
8
|
+
export { FailureTracker, FailureTrackerConfig, FusedPathInput, LogEntry, LogLevel, Logger, clearLogBuffer, computeFusedPath, createFailureTracker, createLogger, formatFileSize, fusedGpsFromOdom, geodesicAngleRad, getGlobalLogLevel, getLogBuffer, listFormatter, mapWithConcurrencyLimit, setGlobalLogLevel, subscribeToLogs };
|
package/dist/utils/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { LogLevel, clearLogBuffer, createLogger, getGlobalLogLevel, getLogBuffer, setGlobalLogLevel, subscribeToLogs } from "./logger.js";
|
|
2
2
|
import { createFailureTracker } from "./failure-tracker.js";
|
|
3
|
+
import { t as geodesicAngleRad } from "../geodesic-angle-BTldfFgs.js";
|
|
3
4
|
import { computeFusedPath, fusedGpsFromOdom } from "./fused-path.js";
|
|
4
5
|
import { mapWithConcurrencyLimit } from "./concurrency.js";
|
|
5
6
|
import { formatFileSize } from "./format-file-size.js";
|
|
6
7
|
import { listFormatter } from "./list-formatter.js";
|
|
7
|
-
export { LogLevel, clearLogBuffer, computeFusedPath, createFailureTracker, createLogger, formatFileSize, fusedGpsFromOdom, getGlobalLogLevel, getLogBuffer, listFormatter, mapWithConcurrencyLimit, setGlobalLogLevel, subscribeToLogs };
|
|
8
|
+
export { LogLevel, clearLogBuffer, computeFusedPath, createFailureTracker, createLogger, formatFileSize, fusedGpsFromOdom, geodesicAngleRad, getGlobalLogLevel, getLogBuffer, listFormatter, mapWithConcurrencyLimit, setGlobalLogLevel, subscribeToLogs };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as listFormatter } from "../list-formatter-
|
|
1
|
+
import { t as listFormatter } from "../list-formatter-KNMS0ay2.js";
|
|
2
2
|
export { listFormatter };
|
package/dist/utils/logger.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as createLogger, c as setGlobalLogLevel, i as clearLogBuffer, l as subscribeToLogs, n as LogLevel, o as getGlobalLogLevel, r as Logger, s as getLogBuffer, t as LogEntry } from "../logger-
|
|
1
|
+
import { a as createLogger, c as setGlobalLogLevel, i as clearLogBuffer, l as subscribeToLogs, n as LogLevel, o as getGlobalLogLevel, r as Logger, s as getLogBuffer, t as LogEntry } from "../logger-CLnPrHiD.js";
|
|
2
2
|
export { LogEntry, LogLevel, Logger, clearLogBuffer, createLogger, getGlobalLogLevel, getLogBuffer, setGlobalLogLevel, subscribeToLogs };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as addAccuracyCircles, i as AccuracyCircleSample, n as ACCURACY_CIRCLE_STROKE_OPACITY, r as ACCURACY_CIRCLE_WEIGHT, t as ACCURACY_CIRCLE_FILL_OPACITY } from "../accuracy-circles-
|
|
1
|
+
import { a as addAccuracyCircles, i as AccuracyCircleSample, n as ACCURACY_CIRCLE_STROKE_OPACITY, r as ACCURACY_CIRCLE_WEIGHT, t as ACCURACY_CIRCLE_FILL_OPACITY } from "../accuracy-circles-BtqOP_v1.js";
|
|
2
2
|
export { ACCURACY_CIRCLE_FILL_OPACITY, ACCURACY_CIRCLE_STROKE_OPACITY, ACCURACY_CIRCLE_WEIGHT, AccuracyCircleSample, addAccuracyCircles };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createAlignmentLerper, t as AlignmentLerper } from "../alignment-lerper-
|
|
1
|
+
import { n as createAlignmentLerper, t as AlignmentLerper } from "../alignment-lerper-Bil6vbVw.js";
|
|
2
2
|
export { AlignmentLerper, createAlignmentLerper };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as ArWorldGroupAlignmentOptions, r as enableArWorldGroupAlignment, t as ArWorldGroupAlignmentHandle } from "../ar-world-group-alignment-
|
|
1
|
+
import { n as ArWorldGroupAlignmentOptions, r as enableArWorldGroupAlignment, t as ArWorldGroupAlignmentHandle } from "../ar-world-group-alignment-69fgnB39.js";
|
|
2
2
|
export { ArWorldGroupAlignmentHandle, ArWorldGroupAlignmentOptions, enableArWorldGroupAlignment };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { registerFrameUpdate } from "../ar/frame-loop.js";
|
|
2
|
-
import { t as registerSessionDisposer } from "../session-disposers-
|
|
2
|
+
import { t as registerSessionDisposer } from "../session-disposers-zv9OGXPB.js";
|
|
3
3
|
import { createAlignmentLerper } from "./alignment-lerper.js";
|
|
4
4
|
import { selectAlignmentMatrix } from "../state/app-selectors.js";
|
|
5
5
|
import { subscribeToSelector } from "../state/subscribe-to-selector.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createCameraFollower, t as CameraFollower } from "../camera-follower-
|
|
1
|
+
import { n as createCameraFollower, t as CameraFollower } from "../camera-follower-CqJJ7zRj.js";
|
|
2
2
|
export { CameraFollower, createCameraFollower };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createCss3dRendererManager, t as Css3dRendererManager } from "../css3d-renderer-manager-
|
|
1
|
+
import { n as createCss3dRendererManager, t as Css3dRendererManager } from "../css3d-renderer-manager-B3kGNtcn.js";
|
|
2
2
|
export { Css3dRendererManager, createCss3dRendererManager };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as worldNueToGps, t as nueToArLocal } from "../frame-conversions-
|
|
1
|
+
import { n as worldNueToGps, t as nueToArLocal } from "../frame-conversions-DObhj8Wf.js";
|
|
2
2
|
export { nueToArLocal, worldNueToGps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as isSphereInCameraFrustum, n as isObjectInCameraFrustum, r as isPointInCameraFrustum, t as buildCameraFrustum } from "../frustum-visibility-
|
|
1
|
+
import { i as isSphereInCameraFrustum, n as isObjectInCameraFrustum, r as isPointInCameraFrustum, t as buildCameraFrustum } from "../frustum-visibility-CeoCZchO.js";
|
|
2
2
|
export { buildCameraFrustum, isObjectInCameraFrustum, isPointInCameraFrustum, isSphereInCameraFrustum };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as GpsAnchorSamplePoint, i as GpsAnchorPhase, n as GpsAnchorMode, o as createGpsAnchor, r as GpsAnchorOptions, t as GpsAnchor } from "../gps-anchor-
|
|
1
|
+
import { a as GpsAnchorSamplePoint, i as GpsAnchorPhase, n as GpsAnchorMode, o as createGpsAnchor, r as GpsAnchorOptions, t as GpsAnchor } from "../gps-anchor-BeFO2RYa.js";
|
|
2
2
|
export { GpsAnchor, GpsAnchorMode, GpsAnchorOptions, GpsAnchorPhase, GpsAnchorSamplePoint, createGpsAnchor };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as createGpsCompassCubes, n as COMPASS_CUBE_SIZE, r as GpsCompassCubes, t as COMPASS_CUBE_DISTANCE } from "../gps-compass-cubes-
|
|
1
|
+
import { i as createGpsCompassCubes, n as COMPASS_CUBE_SIZE, r as GpsCompassCubes, t as COMPASS_CUBE_DISTANCE } from "../gps-compass-cubes-DSN87L8p.js";
|
|
2
2
|
export { COMPASS_CUBE_DISTANCE, COMPASS_CUBE_SIZE, GpsCompassCubes, createGpsCompassCubes };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as GpsEventVisualizer, r as gpsEventVisualizer, t as GpsEventAccuracy } from "../gps-event-markers-
|
|
1
|
+
import { n as GpsEventVisualizer, r as gpsEventVisualizer, t as GpsEventAccuracy } from "../gps-event-markers-Cz9RMA2k.js";
|
|
2
2
|
export { GpsEventAccuracy, GpsEventVisualizer, gpsEventVisualizer };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger.js";
|
|
2
2
|
import { disposeMeshArray } from "./three-dispose.js";
|
|
3
|
-
import {
|
|
3
|
+
import { _ as getScene, l as getArWorldGroup } from "../webxr-session-DG-eNfny.js";
|
|
4
4
|
import { VIS_COLORS } from "./vis-colors.js";
|
|
5
5
|
import * as THREE from "three";
|
|
6
6
|
//#region ../src/visualization/gps-event-markers.ts
|
|
@@ -20,10 +20,20 @@ import * as THREE from "three";
|
|
|
20
20
|
* world positions update automatically via Three.js scene-graph propagation.
|
|
21
21
|
*/
|
|
22
22
|
const log = createLogger("GpsEventVisualizer");
|
|
23
|
-
/**
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Sphere radius in meters for the raw-GPS / fused debug markers.
|
|
25
|
+
*
|
|
26
|
+
* Halved 0.08 → 0.04 (D5, 2026-06-16 user feedback): these "different colours"
|
|
27
|
+
* tracking spheres were cluttering the AR scene and hiding the ref-point
|
|
28
|
+
* markers. They now shrink while the ref-point marker spheres grow (×2), so the
|
|
29
|
+
* marker the user cares about stands out. This is a framework-level constant
|
|
30
|
+
* rendered in BOTH live recording and replay, so replays of older recordings
|
|
31
|
+
* also show the smaller debug spheres — intended and accepted (requester
|
|
32
|
+
* decision); a plain constant change is correct (no live-vs-replay flag).
|
|
33
|
+
*/
|
|
34
|
+
const GPS_MARKER_RADIUS = .04;
|
|
35
|
+
/** Slightly larger radius for alignment snapshots to stand out (halved 0.1 → 0.05 with the GPS markers, D5). */
|
|
36
|
+
const SNAPSHOT_MARKER_RADIUS = .05;
|
|
27
37
|
/**
|
|
28
38
|
* Default opacity for the yellow raw-GPS sphere when it is rendered at the
|
|
29
39
|
* legacy fixed 8 cm radius (no accuracy passed). Matches the original 30 %
|
|
@@ -67,6 +77,14 @@ var GpsEventVisualizer = class {
|
|
|
67
77
|
eventCounter = 0;
|
|
68
78
|
snapshotCounter = 0;
|
|
69
79
|
/**
|
|
80
|
+
* Whether the debug markers are drawn. Toggled by {@link setVisible} for the
|
|
81
|
+
* recorder's `visualization.gpsAlignmentMarkers` opt-out (Finding B). Applied
|
|
82
|
+
* to every marker at creation so events spawned later by the live
|
|
83
|
+
* store-subscriber inherit the current state instead of popping into view.
|
|
84
|
+
* Default `true` — the markers render exactly as before until opted out.
|
|
85
|
+
*/
|
|
86
|
+
markersVisible = true;
|
|
87
|
+
/**
|
|
70
88
|
* Set the GPS zero reference (origin for coordinate conversion).
|
|
71
89
|
* Must be called before adding GPS events.
|
|
72
90
|
*
|
|
@@ -167,9 +185,25 @@ var GpsEventVisualizer = class {
|
|
|
167
185
|
});
|
|
168
186
|
const mesh = new THREE.Mesh(geometry, material);
|
|
169
187
|
mesh.name = `${namePrefix}-${eventId}`;
|
|
188
|
+
mesh.visible = this.markersVisible;
|
|
170
189
|
return mesh;
|
|
171
190
|
}
|
|
172
191
|
/**
|
|
192
|
+
* Show or hide ALL debug markers — raw GPS (yellow), fused (cyan), and
|
|
193
|
+
* alignment-snapshot (red) — and remember the state so markers added later
|
|
194
|
+
* inherit it. Used by the recorder's `visualization.gpsAlignmentMarkers`
|
|
195
|
+
* opt-out, read once at Enter-AR (live only; replay keeps markers visible).
|
|
196
|
+
*
|
|
197
|
+
* This only changes rendering: capture, GPS-event recording, counts, and the
|
|
198
|
+
* snapshot positions read back at session end are all unaffected.
|
|
199
|
+
*/
|
|
200
|
+
setVisible(visible) {
|
|
201
|
+
this.markersVisible = visible;
|
|
202
|
+
for (const mesh of this.rawGpsMarkers) mesh.visible = visible;
|
|
203
|
+
for (const mesh of this.fusedMarkers) mesh.visible = visible;
|
|
204
|
+
for (const mesh of this.snapshotMarkers) mesh.visible = visible;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
173
207
|
* Clear all markers from the scene and reset state.
|
|
174
208
|
*/
|
|
175
209
|
clearAll() {
|
|
@@ -181,6 +215,7 @@ var GpsEventVisualizer = class {
|
|
|
181
215
|
this.zeroRef = null;
|
|
182
216
|
this.eventCounter = 0;
|
|
183
217
|
this.snapshotCounter = 0;
|
|
218
|
+
this.markersVisible = true;
|
|
184
219
|
}
|
|
185
220
|
/**
|
|
186
221
|
* Get count of visible markers.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createReticleMesh, r as updateReticle, t as HitMatrix } from "../hit-test-reticle-
|
|
1
|
+
import { n as createReticleMesh, r as updateReticle, t as HitMatrix } from "../hit-test-reticle-DV-2TpB9.js";
|
|
2
2
|
export { HitMatrix, createReticleMesh, updateReticle };
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { n as createCss3dRendererManager, t as Css3dRendererManager } from "../css3d-renderer-manager-
|
|
2
|
-
import { n as createCameraFollower, t as CameraFollower } from "../camera-follower-
|
|
3
|
-
import { n as createAlignmentLerper, t as AlignmentLerper } from "../alignment-lerper-
|
|
4
|
-
import { n as MapDataInput, r as buildMapData, t as MapData } from "../map-data-
|
|
5
|
-
import { n as ArWorldGroupAlignmentOptions, r as enableArWorldGroupAlignment, t as ArWorldGroupAlignmentHandle } from "../ar-world-group-alignment-
|
|
6
|
-
import { i as createGpsCompassCubes, n as COMPASS_CUBE_SIZE, r as GpsCompassCubes, t as COMPASS_CUBE_DISTANCE } from "../gps-compass-cubes-
|
|
7
|
-
import { i as isSphereInCameraFrustum, n as isObjectInCameraFrustum, r as isPointInCameraFrustum, t as buildCameraFrustum } from "../frustum-visibility-
|
|
8
|
-
import { n as worldNueToGps, t as nueToArLocal } from "../frame-conversions-
|
|
9
|
-
import { n as createReticleMesh, r as updateReticle, t as HitMatrix } from "../hit-test-reticle-
|
|
10
|
-
import { a as GpsAnchorSamplePoint, i as GpsAnchorPhase, n as GpsAnchorMode, o as createGpsAnchor, r as GpsAnchorOptions, t as GpsAnchor } from "../gps-anchor-
|
|
11
|
-
import { n as GpsEventVisualizer, r as gpsEventVisualizer } from "../gps-event-markers-
|
|
12
|
-
import { a as DEFAULT_Z_OFFSET, n as DEFAULT_LEAFLET_MAP_SIZE_PX, o as LeafletMapOverlay, r as DEFAULT_WORLD_SIZE, s as LeafletMapOverlayOptions } from "../leaflet-map-overlay-
|
|
13
|
-
import { n as clampedAlpha, t as DEFAULT_LERP_RATE } from "../lerp-utils-
|
|
14
|
-
import { a as addAccuracyCircles, i as AccuracyCircleSample, n as ACCURACY_CIRCLE_STROKE_OPACITY, r as ACCURACY_CIRCLE_WEIGHT, t as ACCURACY_CIRCLE_FILL_OPACITY } from "../accuracy-circles-
|
|
15
|
-
import { a as MAP_PATH_POLYLINE_OPACITY, c as USER_POSITION_COLOR, i as FUSED_PATH_COLOR, l as drawMapData, n as DrawMapDataOptions, o as MAP_PATH_POLYLINE_WEIGHT, r as DrawnMapData, s as RAW_GPS_COLOR, t as ALIGNMENT_SNAPSHOT_COLOR } from "../map-overlay-draw-
|
|
16
|
-
import { a as MapOverlayOptions, c as tileXYToLatLon, i as MapOverlay, n as DEFAULT_MAP_SIZE, o as TextureLoaderInterface, r as DEFAULT_ZOOM, s as latLonToTileXY, t as DEFAULT_HEIGHT_OFFSET } from "../map-overlay-
|
|
17
|
-
import { n as disposeMeshArray, r as disposeObject3D, t as DisposeOptions } from "../three-dispose-
|
|
18
|
-
import { t as VIS_COLORS } from "../vis-colors-
|
|
1
|
+
import { n as createCss3dRendererManager, t as Css3dRendererManager } from "../css3d-renderer-manager-B3kGNtcn.js";
|
|
2
|
+
import { n as createCameraFollower, t as CameraFollower } from "../camera-follower-CqJJ7zRj.js";
|
|
3
|
+
import { n as createAlignmentLerper, t as AlignmentLerper } from "../alignment-lerper-Bil6vbVw.js";
|
|
4
|
+
import { n as MapDataInput, r as buildMapData, t as MapData } from "../map-data-B4oEehUh.js";
|
|
5
|
+
import { n as ArWorldGroupAlignmentOptions, r as enableArWorldGroupAlignment, t as ArWorldGroupAlignmentHandle } from "../ar-world-group-alignment-69fgnB39.js";
|
|
6
|
+
import { i as createGpsCompassCubes, n as COMPASS_CUBE_SIZE, r as GpsCompassCubes, t as COMPASS_CUBE_DISTANCE } from "../gps-compass-cubes-DSN87L8p.js";
|
|
7
|
+
import { i as isSphereInCameraFrustum, n as isObjectInCameraFrustum, r as isPointInCameraFrustum, t as buildCameraFrustum } from "../frustum-visibility-CeoCZchO.js";
|
|
8
|
+
import { n as worldNueToGps, t as nueToArLocal } from "../frame-conversions-DObhj8Wf.js";
|
|
9
|
+
import { n as createReticleMesh, r as updateReticle, t as HitMatrix } from "../hit-test-reticle-DV-2TpB9.js";
|
|
10
|
+
import { a as GpsAnchorSamplePoint, i as GpsAnchorPhase, n as GpsAnchorMode, o as createGpsAnchor, r as GpsAnchorOptions, t as GpsAnchor } from "../gps-anchor-BeFO2RYa.js";
|
|
11
|
+
import { n as GpsEventVisualizer, r as gpsEventVisualizer } from "../gps-event-markers-Cz9RMA2k.js";
|
|
12
|
+
import { a as DEFAULT_Z_OFFSET, n as DEFAULT_LEAFLET_MAP_SIZE_PX, o as LeafletMapOverlay, r as DEFAULT_WORLD_SIZE, s as LeafletMapOverlayOptions } from "../leaflet-map-overlay-CmIyiE8n.js";
|
|
13
|
+
import { n as clampedAlpha, t as DEFAULT_LERP_RATE } from "../lerp-utils-BLmHhkVe.js";
|
|
14
|
+
import { a as addAccuracyCircles, i as AccuracyCircleSample, n as ACCURACY_CIRCLE_STROKE_OPACITY, r as ACCURACY_CIRCLE_WEIGHT, t as ACCURACY_CIRCLE_FILL_OPACITY } from "../accuracy-circles-BtqOP_v1.js";
|
|
15
|
+
import { a as MAP_PATH_POLYLINE_OPACITY, c as USER_POSITION_COLOR, i as FUSED_PATH_COLOR, l as drawMapData, n as DrawMapDataOptions, o as MAP_PATH_POLYLINE_WEIGHT, r as DrawnMapData, s as RAW_GPS_COLOR, t as ALIGNMENT_SNAPSHOT_COLOR } from "../map-overlay-draw-ymz1s7fG.js";
|
|
16
|
+
import { a as MapOverlayOptions, c as tileXYToLatLon, i as MapOverlay, n as DEFAULT_MAP_SIZE, o as TextureLoaderInterface, r as DEFAULT_ZOOM, s as latLonToTileXY, t as DEFAULT_HEIGHT_OFFSET } from "../map-overlay-Dh2B97MP.js";
|
|
17
|
+
import { n as disposeMeshArray, r as disposeObject3D, t as DisposeOptions } from "../three-dispose-Bt1k7WKh.js";
|
|
18
|
+
import { t as VIS_COLORS } from "../vis-colors-Obw2pLqT.js";
|
|
19
19
|
export { ACCURACY_CIRCLE_FILL_OPACITY, ACCURACY_CIRCLE_STROKE_OPACITY, ACCURACY_CIRCLE_WEIGHT, ALIGNMENT_SNAPSHOT_COLOR, type AccuracyCircleSample, type AlignmentLerper, type ArWorldGroupAlignmentHandle, type ArWorldGroupAlignmentOptions, COMPASS_CUBE_DISTANCE, COMPASS_CUBE_SIZE, type CameraFollower, type Css3dRendererManager, DEFAULT_HEIGHT_OFFSET, DEFAULT_LEAFLET_MAP_SIZE_PX, DEFAULT_LERP_RATE, DEFAULT_MAP_SIZE, DEFAULT_WORLD_SIZE, DEFAULT_ZOOM, DEFAULT_Z_OFFSET, type DisposeOptions, type DrawMapDataOptions, type DrawnMapData, FUSED_PATH_COLOR, type GpsAnchor, type GpsAnchorMode, type GpsAnchorOptions, type GpsAnchorPhase, type GpsAnchorSamplePoint, type GpsCompassCubes, GpsEventVisualizer, type HitMatrix, LeafletMapOverlay, type LeafletMapOverlayOptions, MAP_PATH_POLYLINE_OPACITY, MAP_PATH_POLYLINE_WEIGHT, type MapData, type MapDataInput, MapOverlay, type MapOverlayOptions, RAW_GPS_COLOR, type TextureLoaderInterface, USER_POSITION_COLOR, VIS_COLORS, addAccuracyCircles, buildCameraFrustum, buildMapData, clampedAlpha, createAlignmentLerper, createCameraFollower, createCss3dRendererManager, createGpsAnchor, createGpsCompassCubes, createReticleMesh, disposeMeshArray, disposeObject3D, drawMapData, enableArWorldGroupAlignment, gpsEventVisualizer, isObjectInCameraFrustum, isPointInCameraFrustum, isSphereInCameraFrustum, latLonToTileXY, nueToArLocal, tileXYToLatLon, updateReticle, worldNueToGps };
|