gps-plus-slam-app-framework 1.4.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-CrOucL00.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 +1 -1
- 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 +1 -1
- package/dist/ar/depth-sampler.d.ts +2 -2
- 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 +1 -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 -30
- package/dist/ar/index.js +6 -5
- package/dist/ar/occupancy-grid.d.ts +1 -1
- package/dist/ar/planar-pnp.d.ts +1 -1
- package/dist/ar/qr-debug-view.d.ts +1 -1
- package/dist/ar/qr-derived-pose.d.ts +1 -1
- package/dist/ar/qr-detection-controller.d.ts +1 -1
- package/dist/ar/qr-frontend.d.ts +1 -1
- package/dist/ar/qr-pose.d.ts +1 -1
- package/dist/ar/qr-size-depth-context.d.ts +2 -2
- package/dist/ar/qr-size-measurer.d.ts +1 -1
- 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-Dc72Ksiu.js → ar-MFpFlV7j.js} +3 -3
- package/dist/{ar-world-group-alignment-DDLkgNf_.d.ts → ar-world-group-alignment-69fgnB39.d.ts} +1 -1
- package/dist/capture-motion-gate-0Yl2NpQG.d.ts +24 -0
- package/dist/capture-motion-gate-4EscNZCw.js +94 -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-Ce2FMKCp.d.ts → create-slam-app-store-n_VF63D5.d.ts} +50 -40
- package/dist/{depth-grid-lookup-vMDrGTk_.d.ts → depth-grid-lookup-DQ-IYhO3.d.ts} +1 -1
- package/dist/{depth-sampler-DwfPYzS7.d.ts → depth-sampler-asc8exHt.d.ts} +1 -1
- package/dist/{depth-unprojection-CK3b9htH.d.ts → depth-unprojection-DjsbJW9L.d.ts} +1 -1
- package/dist/{enable-gps-ar-CjZ1nEdu.d.ts → enable-gps-ar-DkNhFv4Y.d.ts} +4 -4
- package/dist/{frame-conversions-D_Af8Dt3.d.ts → frame-conversions-DObhj8Wf.d.ts} +1 -1
- package/dist/{fused-path-C0FHe67t.d.ts → fused-path-v6eOmLl3.d.ts} +1 -1
- package/dist/geo/h3-proximity.d.ts +1 -1
- package/dist/geo/index.d.ts +1 -1
- package/dist/geodesic-angle-BTldfFgs.js +39 -0
- package/dist/{gps-anchor-C6I9NDHA.d.ts → gps-anchor-BeFO2RYa.d.ts} +1 -1
- package/dist/{gps-ar-pose-sampler-DaHg2aPZ.d.ts → gps-ar-pose-sampler-DHMZmYAc.d.ts} +1 -1
- package/dist/{gps-event-coordinator-C7hwHyLA.d.ts → gps-event-coordinator-CjWW636x.d.ts} +21 -11
- package/dist/image-capture-B2-b6tKK.js +374 -0
- package/dist/{image-capture-C2Feywet.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-m_LneUSi.d.ts → index-BODDUTvD.d.ts} +1 -1
- package/dist/{index-BvLo2poy.d.ts → index-BneSj4_5.d.ts} +3 -3
- package/dist/index-_Rhgoqkh.d.ts +2 -0
- package/dist/index.d.ts +80 -77
- package/dist/index.js +11 -8
- package/dist/{leaflet-map-overlay-bnb2U1NQ.d.ts → leaflet-map-overlay-CmIyiE8n.d.ts} +1 -1
- package/dist/{map-data-DdjPiSav.d.ts → map-data-B4oEehUh.d.ts} +1 -1
- package/dist/{map-overlay-draw-CPVdAsFq.d.ts → map-overlay-draw-ymz1s7fG.d.ts} +1 -1
- package/dist/{null-storage-backend-CuSdYFsM.d.ts → null-storage-backend-B9rtyDfG.d.ts} +2 -2
- package/dist/{occupancy-grid-Bvi2Gw1U.d.ts → occupancy-grid-DnOc-6PU.d.ts} +2 -2
- package/dist/{opfs-storage-backend-CeQAb0SD.d.ts → opfs-storage-backend-JJiUJo-3.d.ts} +2 -2
- package/dist/{persistence-middleware-5eearhSV.d.ts → persistence-middleware-DAPTTwB2.d.ts} +1 -1
- package/dist/{planar-pnp-cjthe7Be.d.ts → planar-pnp-my9bqULS.d.ts} +1 -1
- package/dist/{qr-debug-view-B8gTzjMm.d.ts → qr-debug-view-Brl73HGO.d.ts} +1 -1
- package/dist/{qr-derived-pose-DinKE600.d.ts → qr-derived-pose-CmxTP2m4.d.ts} +2 -2
- package/dist/{qr-detected-slice-Cpv-dg82.d.ts → qr-detected-slice-VQssZmQJ.d.ts} +4 -4
- package/dist/{qr-detection-controller-Cd2Ih4cC.d.ts → qr-detection-controller-CDurHv8E.d.ts} +3 -3
- package/dist/{qr-frontend-DufZp2xS.d.ts → qr-frontend--fFX25mV.d.ts} +1 -1
- package/dist/{qr-pose-aggregation-CFlmLm6w.d.ts → qr-pose-aggregation-B7tWJq7j.d.ts} +1 -1
- package/dist/{qr-pose-aggregation-DXR9STHs.js → qr-pose-aggregation-DBiaLW0O.js} +1 -10
- package/dist/{qr-size-depth-context-onu36E9s.d.ts → qr-size-depth-context-CeAG53fy.d.ts} +2 -2
- package/dist/{qr-size-measurer-D7739ZpB.d.ts → qr-size-measurer-DQdAsid1.d.ts} +3 -3
- package/dist/{recording-options-D93kksJU.d.ts → recording-options-BPCpMHLK.d.ts} +154 -9
- package/dist/{recording-replayer-CUEK82tM.d.ts → recording-replayer-DQKpAGyQ.d.ts} +2 -2
- package/dist/{recording-slice-B-uCgGoh.d.ts → recording-slice-DaxHZvNu.d.ts} +2 -2
- package/dist/{replay-engine-BSVd7Zzb.d.ts → replay-engine-CmKh_4wf.d.ts} +1 -1
- package/dist/{replay-scene-CPt56pps.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/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 -20
- package/dist/state/index.js +4 -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 +3 -3
- package/dist/state/qr-detected-slice.js +1 -1
- package/dist/state/recording-options.d.ts +2 -2
- package/dist/state/recording-options.js +155 -13
- 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/replay-engine.d.ts +1 -1
- 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-IEw0ZsBu.js → state-E51QT_-j.js} +1 -1
- package/dist/storage/file-system-utils.d.ts +1 -1
- package/dist/storage/index.d.ts +8 -8
- 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.d.ts +1 -1
- package/dist/storage/storage-backend.d.ts +1 -1
- package/dist/storage/zip-coverage-embed.d.ts +1 -1
- package/dist/storage/zip-export.d.ts +1 -1
- package/dist/storage/zip-reader.d.ts +1 -1
- package/dist/{storage-backend-CTJHNdMp.d.ts → storage-backend-BdVLD0dU.d.ts} +1 -1
- package/dist/{store-subscribers-BZP81hjh.d.ts → store-subscribers-CA6AJH_8.d.ts} +2 -2
- package/dist/{subscribe-to-selector-Bp3sLx8L.d.ts → subscribe-to-selector-B6EUmQ3I.d.ts} +1 -1
- package/dist/test-utils/browser-mocks.d.ts +1 -1
- package/dist/test-utils/zip-round-trip-helpers.d.ts +1 -1
- package/dist/{tracking-slice-DJZ9qeGg.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 +1 -1
- 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 +1 -1
- package/dist/visualization/hit-test-reticle.d.ts +1 -1
- package/dist/visualization/index.d.ts +18 -18
- package/dist/visualization/leaflet-map-overlay.d.ts +1 -1
- 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-CJF9Nijp.js → webxr-session-DG-eNfny.js} +25 -4
- package/dist/{webxr-session-COsOjJwn.d.ts → webxr-session-Do5L6G3B.d.ts} +19 -9
- package/package.json +2 -2
- package/dist/index-eaI1Z1KR.d.ts +0 -2
- /package/dist/{accuracy-circles-Pi2YeCrM.d.ts → accuracy-circles-BtqOP_v1.d.ts} +0 -0
- /package/dist/{alignment-lerper-BUTsQ2yu.d.ts → alignment-lerper-Bil6vbVw.d.ts} +0 -0
- /package/dist/{ar-types-BckI1E-O.d.ts → ar-types-BFX2r1wk.d.ts} +0 -0
- /package/dist/{bresenham3d-ByjcmEgM.d.ts → bresenham3d-CU1Gv2W4.d.ts} +0 -0
- /package/dist/{camera-blit-capture-CqWe1G7s.d.ts → camera-blit-capture-NKT9H5-e.d.ts} +0 -0
- /package/dist/{camera-follower-BTb2Yp12.d.ts → camera-follower-CqJJ7zRj.d.ts} +0 -0
- /package/dist/{capability-checker-CXqoJYtb.d.ts → capability-checker-DUQLg6gq.d.ts} +0 -0
- /package/dist/{capture-failure-tracker-BL5SoG2a.d.ts → capture-failure-tracker-gsm8q7yi.d.ts} +0 -0
- /package/dist/{chromium-camera-access-workaround-BNK189P0.d.ts → chromium-camera-access-workaround-D4K2uwwQ.d.ts} +0 -0
- /package/dist/{concurrency-DqAlKX4j.d.ts → concurrency-By0oOTZt.d.ts} +0 -0
- /package/dist/{css3d-renderer-manager-m-ab19vp.d.ts → css3d-renderer-manager-B3kGNtcn.d.ts} +0 -0
- /package/dist/{failure-tracker-Cnc_xWUw.d.ts → failure-tracker-BO7M7jF_.d.ts} +0 -0
- /package/dist/{file-system-utils-Bs7lpeVP.d.ts → file-system-utils-DOajnMm-.d.ts} +0 -0
- /package/dist/{format-file-size-BFUWvir1.d.ts → format-file-size-Dc98ulzB.d.ts} +0 -0
- /package/dist/{frame-loop-BEO9_q3k.d.ts → frame-loop-CpVjQ1dH.d.ts} +0 -0
- /package/dist/{frustum-visibility-D_RGmH98.d.ts → frustum-visibility-CeoCZchO.d.ts} +0 -0
- /package/dist/{geo-types-DqiBzPO9.d.ts → geo-types-3Ip1NzVR.d.ts} +0 -0
- /package/dist/{gps-C5inWeNV.d.ts → gps-BBO3hKfT.d.ts} +0 -0
- /package/dist/{gps-compass-cubes-BExxrWJ-.d.ts → gps-compass-cubes-DSN87L8p.d.ts} +0 -0
- /package/dist/{gps-error-handler-C2bS69oJ.d.ts → gps-error-handler-BbPsfw-_.d.ts} +0 -0
- /package/dist/{gps-event-markers-Dd0G2bD0.d.ts → gps-event-markers-Cz9RMA2k.d.ts} +0 -0
- /package/dist/{h3-proximity-B57C6rYL.d.ts → h3-proximity-C-j0pw1j.d.ts} +0 -0
- /package/dist/{hit-test-reticle-Dqak9hiR.d.ts → hit-test-reticle-DV-2TpB9.d.ts} +0 -0
- /package/dist/{lerp-utils-kLxMJ2Xj.d.ts → lerp-utils-BLmHhkVe.d.ts} +0 -0
- /package/dist/{list-formatter-ct8txwvR.d.ts → list-formatter-KNMS0ay2.d.ts} +0 -0
- /package/dist/{logger-CzQrCe6C.d.ts → logger-CLnPrHiD.d.ts} +0 -0
- /package/dist/{map-overlay-Dci4yvm3.d.ts → map-overlay-Dh2B97MP.d.ts} +0 -0
- /package/dist/{opfs-storage-DMtlt57S.d.ts → opfs-storage-3VZh-qH6.d.ts} +0 -0
- /package/dist/{permission-checker-CtPtPQRq.d.ts → permission-checker-CDuI8BwC.d.ts} +0 -0
- /package/dist/{qr-pose-Bt2reSw7.d.ts → qr-pose-D2rfu5DA.d.ts} +0 -0
- /package/dist/{scene-node-names-CdNeQjOE.d.ts → scene-node-names-BiShOQDB.d.ts} +0 -0
- /package/dist/{session-disposers-D8wnO-uW.js → session-disposers-zv9OGXPB.js} +0 -0
- /package/dist/{three-dispose-BCZkSJp2.d.ts → three-dispose-Bt1k7WKh.d.ts} +0 -0
- /package/dist/{vis-colors-BZsSLI4i.d.ts → vis-colors-Obw2pLqT.d.ts} +0 -0
- /package/dist/{webxr-nue-basis-CW1wsbm6.d.ts → webxr-nue-basis-3nfjDJJp.d.ts} +0 -0
- /package/dist/{xr-camera-texture-BmrP7iNZ.d.ts → xr-camera-texture-Cva1q3Qj.d.ts} +0 -0
- /package/dist/{xr-error-handler-BEjRgZjt.d.ts → xr-error-handler-CtvHpjfm.d.ts} +0 -0
- /package/dist/{xr-frame-loop-K8ebdjLw.d.ts → xr-frame-loop-DIYtRcUa.d.ts} +0 -0
- /package/dist/{zip-coverage-embed-tFohI2J4.d.ts → zip-coverage-embed-DCAREVmw.d.ts} +0 -0
- /package/dist/{zip-export-DDWXInTR.d.ts → zip-export-ol0S_Ofd.d.ts} +0 -0
- /package/dist/{zip-reader-Q2ue6zlC.d.ts → zip-reader-D9iPQwdQ.d.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as GridCell } from "./bresenham3d-
|
|
2
|
-
import { a as RgbTuple, i as DepthSample } from "./ar-types-
|
|
1
|
+
import { t as GridCell } from "./bresenham3d-CU1Gv2W4.js";
|
|
2
|
+
import { a as RgbTuple, i as DepthSample } from "./ar-types-BFX2r1wk.js";
|
|
3
3
|
import { Vector3 } from "gps-plus-slam-js";
|
|
4
4
|
|
|
5
5
|
//#region ../src/ar/occupancy-grid.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as SessionMetadata } from "./opfs-storage-
|
|
2
|
-
import { n as StorageBackend, t as CreateSessionResult } from "./storage-backend-
|
|
1
|
+
import { n as SessionMetadata } from "./opfs-storage-3VZh-qH6.js";
|
|
2
|
+
import { n as StorageBackend, t as CreateSessionResult } from "./storage-backend-BdVLD0dU.js";
|
|
3
3
|
|
|
4
4
|
//#region ../src/storage/opfs-storage-backend.d.ts
|
|
5
5
|
declare class OpfsStorageBackend implements StorageBackend {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as OpenCvPnpResult, r as Point2, s as SolvePnpSquare, t as CameraIntrinsics } from "./qr-pose-
|
|
1
|
+
import { n as OpenCvPnpResult, r as Point2, s as SolvePnpSquare, t as CameraIntrinsics } from "./qr-pose-D2rfu5DA.js";
|
|
2
2
|
import { Vector3 } from "gps-plus-slam-js";
|
|
3
3
|
|
|
4
4
|
//#region ../src/ar/planar-pnp.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as Pose, r as Point2, s as SolvePnpSquare } from "./qr-pose-
|
|
2
|
-
import { a as QrSizeMeasurerOptions, n as QrSizeDepthContext } from "./qr-size-measurer-
|
|
1
|
+
import { i as Pose, r as Point2, s as SolvePnpSquare } from "./qr-pose-D2rfu5DA.js";
|
|
2
|
+
import { a as QrSizeMeasurerOptions, n as QrSizeDepthContext } from "./qr-size-measurer-DQdAsid1.js";
|
|
3
3
|
import { Matrix4 } from "gps-plus-slam-js";
|
|
4
4
|
|
|
5
5
|
//#region ../src/ar/qr-derived-pose.d.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { i as Pose, r as Point2 } from "./qr-pose-
|
|
2
|
-
import { l as QrSizeEstimate } from "./qr-size-measurer-
|
|
3
|
-
import { i as RawQrObservation, n as DerivedQrPlacement, t as DeriveQrPoseDeps } from "./qr-derived-pose-
|
|
4
|
-
import { a as QrPoseStability, o as QrPoseStabilityOptions } from "./qr-pose-aggregation-
|
|
1
|
+
import { i as Pose, r as Point2 } from "./qr-pose-D2rfu5DA.js";
|
|
2
|
+
import { l as QrSizeEstimate } from "./qr-size-measurer-DQdAsid1.js";
|
|
3
|
+
import { i as RawQrObservation, n as DerivedQrPlacement, t as DeriveQrPoseDeps } from "./qr-derived-pose-CmxTP2m4.js";
|
|
4
|
+
import { a as QrPoseStability, o as QrPoseStabilityOptions } from "./qr-pose-aggregation-B7tWJq7j.js";
|
|
5
5
|
import { Matrix4, Vector3 } from "gps-plus-slam-js";
|
|
6
6
|
import * as _$_reduxjs_toolkit0 from "@reduxjs/toolkit";
|
|
7
7
|
|
package/dist/{qr-detection-controller-Cd2Ih4cC.d.ts → qr-detection-controller-CDurHv8E.d.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as Pose } from "./qr-pose-
|
|
2
|
-
import { i as QrDetection, o as RgbaImage } from "./qr-frontend
|
|
3
|
-
import { i as RawQrObservation } from "./qr-derived-pose-
|
|
1
|
+
import { i as Pose } from "./qr-pose-D2rfu5DA.js";
|
|
2
|
+
import { i as QrDetection, o as RgbaImage } from "./qr-frontend--fFX25mV.js";
|
|
3
|
+
import { i as RawQrObservation } from "./qr-derived-pose-CmxTP2m4.js";
|
|
4
4
|
import { Matrix4 } from "gps-plus-slam-js";
|
|
5
5
|
|
|
6
6
|
//#region ../src/ar/qr-detection-controller.d.ts
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as geodesicAngleRad } from "./geodesic-angle-BTldfFgs.js";
|
|
1
2
|
import { quat } from "gl-matrix";
|
|
2
3
|
//#region ../src/ar/qr-pose-aggregation.ts
|
|
3
4
|
/**
|
|
@@ -45,16 +46,6 @@ function toGl(q) {
|
|
|
45
46
|
return quat.normalize(g, g);
|
|
46
47
|
}
|
|
47
48
|
/**
|
|
48
|
-
* Geodesic (shortest-arc) angle in radians between two unit quaternions.
|
|
49
|
-
* Double-cover safe: uses `2·dot² − 1 = cos θ`, which is invariant to the sign
|
|
50
|
-
* of either quaternion (`q` ≡ `−q`), and clamps for float error before `acos`.
|
|
51
|
-
*/
|
|
52
|
-
function geodesicAngleRad(a, b) {
|
|
53
|
-
const d = quat.dot(a, b);
|
|
54
|
-
const c = Math.min(1, Math.max(-1, 2 * d * d - 1));
|
|
55
|
-
return Math.acos(c);
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
49
|
* Average the samples within `thresholdRad` of `ref`. Each inlier is flipped
|
|
59
50
|
* into `ref`'s hemisphere (sign of the dot) BEFORE the linear average so the
|
|
60
51
|
* double cover cannot cancel the sum; the normalized linear average equals the
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as DepthSample } from "./ar-types-
|
|
2
|
-
import { n as QrSizeDepthContext } from "./qr-size-measurer-
|
|
1
|
+
import { i as DepthSample } from "./ar-types-BFX2r1wk.js";
|
|
2
|
+
import { n as QrSizeDepthContext } from "./qr-size-measurer-DQdAsid1.js";
|
|
3
3
|
|
|
4
4
|
//#region ../src/ar/qr-size-depth-context.d.ts
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as DepthPoint } from "./ar-types-
|
|
2
|
-
import { t as DepthUnprojector } from "./depth-unprojection-
|
|
3
|
-
import { r as Point2 } from "./qr-pose-
|
|
1
|
+
import { r as DepthPoint } from "./ar-types-BFX2r1wk.js";
|
|
2
|
+
import { t as DepthUnprojector } from "./depth-unprojection-DjsbJW9L.js";
|
|
3
|
+
import { r as Point2 } from "./qr-pose-D2rfu5DA.js";
|
|
4
4
|
import { Vector3 } from "gps-plus-slam-js";
|
|
5
5
|
|
|
6
6
|
//#region ../src/ar/qr-size-from-depth.d.ts
|
|
@@ -1,12 +1,7 @@
|
|
|
1
|
+
import { t as MotionFilterConfig } from "./capture-motion-gate-0Yl2NpQG.js";
|
|
2
|
+
import { a as QualityFilterConfig } from "./image-quality-smCBoFj1.js";
|
|
3
|
+
|
|
1
4
|
//#region ../src/state/recording-options.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* Recording Options - User-configurable settings for data capture.
|
|
4
|
-
*
|
|
5
|
-
* Allows users to disable/configure high-frequency data streams
|
|
6
|
-
* (depth sampling, image capture) to improve performance on lower-end devices.
|
|
7
|
-
*
|
|
8
|
-
* Options persist in localStorage across sessions.
|
|
9
|
-
*/
|
|
10
5
|
/**
|
|
11
6
|
* Input type for validateRecordingOptions allowing partial nested objects.
|
|
12
7
|
* This allows passing incomplete objects that will be merged with defaults.
|
|
@@ -19,6 +14,27 @@ interface RecordingOptionsInput {
|
|
|
19
14
|
frameTileDisplay?: Partial<FrameTileDisplayOptions>;
|
|
20
15
|
visualization?: Partial<VisualizationOptions>;
|
|
21
16
|
qr?: Partial<QrCaptureOptions>;
|
|
17
|
+
compassDebug?: Partial<CompassDebugOptions>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Toggles for the library's Phase-4 compass alignment features (closed/internal
|
|
21
|
+
* `AlignmentConfig` flags exposed via narrow boolean actions). They change how
|
|
22
|
+
* the LIVE alignment is computed, so they sit with the other capture groups.
|
|
23
|
+
* **Stage 0 (`coldStartOverride`) defaults ON** (a field-validated production
|
|
24
|
+
* feature); Stage C + the WebXR-consistency gate stay experimental (default
|
|
25
|
+
* OFF) until the §6a field-data matrix is in.
|
|
26
|
+
*
|
|
27
|
+
* On-device caveat: the resulting `gpsData` actions persist into the recording,
|
|
28
|
+
* so a replay re-enables them. Record §6a field-calibration sets with
|
|
29
|
+
* `coldStartOverride` OFF so the captured compass behaviour is unmodified.
|
|
30
|
+
*/
|
|
31
|
+
interface CompassDebugOptions {
|
|
32
|
+
/** Stage 0 — cold-start compass yaw override (`setColdStartOverrideEnabled`). Default ON. */
|
|
33
|
+
coldStartOverride: boolean;
|
|
34
|
+
/** Stage C — trust-gated compass rotation prior (`setCompassRotationPriorEnabled`). */
|
|
35
|
+
rotationPrior: boolean;
|
|
36
|
+
/** GPS-free compass↔WebXR consistency gate (`setCompassWebXRConsistencyEnabled`). */
|
|
37
|
+
webXRConsistency: boolean;
|
|
22
38
|
}
|
|
23
39
|
/**
|
|
24
40
|
* Diagnostic flags for isolating pre-recording AR startup crashes.
|
|
@@ -82,6 +98,25 @@ interface ImageCaptureOptions {
|
|
|
82
98
|
quality: number;
|
|
83
99
|
/** Resolution divisor: 1 = full native resolution, 2 = half, 4 = quarter. Default: 1 */
|
|
84
100
|
resolutionDivisor: number;
|
|
101
|
+
/**
|
|
102
|
+
* Motion gate — skip motion-blurred frames by deferring a due capture until
|
|
103
|
+
* device motion settles. Mirrors `ImageCaptureConfig.motionFilter` (the type
|
|
104
|
+
* the capture manager consumes); the recorder destructures `images` and flows
|
|
105
|
+
* the rest, including this group, through the capture seam. Default: enabled.
|
|
106
|
+
* See `ar/capture-motion-gate.ts` and
|
|
107
|
+
* `GpsPlusSlamJs_Docs/docs/2026-06-23-blurry-frame-motion-gating-plan.md`.
|
|
108
|
+
*/
|
|
109
|
+
motionFilter: MotionFilterConfig;
|
|
110
|
+
/**
|
|
111
|
+
* Image-quality gate — drop a blurry/black frame (judged off-thread) and retry
|
|
112
|
+
* the next acceptable frame. Mirrors `ImageCaptureConfig.qualityFilter`; flows
|
|
113
|
+
* through the same capture seam as `motionFilter`. **Default: disabled**
|
|
114
|
+
* pending field tuning of the relative blur threshold (a mis-tuned gate
|
|
115
|
+
* silently dropping good frames is worse than the motion gate's default-on).
|
|
116
|
+
* See `ar/image-quality.ts` and
|
|
117
|
+
* `GpsPlusSlamJs_Docs/docs/2026-06-24-image-quality-gate-plan.md`.
|
|
118
|
+
*/
|
|
119
|
+
qualityFilter: QualityFilterConfig;
|
|
85
120
|
}
|
|
86
121
|
/**
|
|
87
122
|
* Configuration for the derived AR-space occupancy grid (the voxelization of
|
|
@@ -100,6 +135,20 @@ interface OccupancyOptions {
|
|
|
100
135
|
* on the next session rather than mid-session.
|
|
101
136
|
*/
|
|
102
137
|
cellSizeM: number;
|
|
138
|
+
/**
|
|
139
|
+
* Minimum observation count for a voxel to be trusted as occupied (the
|
|
140
|
+
* grid's `getOccupiedCells(minObservations)` floor, promoted to a user
|
|
141
|
+
* setting). A cell is marked occupied the instant one noisy depth point
|
|
142
|
+
* lands in it; raising this filters single-frame depth noise — in
|
|
143
|
+
* particular the **behind-surface** phantoms (e.g. below the floor) that
|
|
144
|
+
* free-space carving can never clear because no ray passes through occluded
|
|
145
|
+
* space. Default 3 (1 = unfiltered/legacy). Higher = less noise but
|
|
146
|
+
* briefly-glimpsed real surfaces may be dropped, so it is exposed for
|
|
147
|
+
* on-device tuning. Read once when the visualizer is constructed (Enter-AR
|
|
148
|
+
* / replay load). See
|
|
149
|
+
* `GpsPlusSlamJs_Docs/docs/2026-06-22-occupancy-grid-behind-surface-noise-plan.md`.
|
|
150
|
+
*/
|
|
151
|
+
minConfidence: number;
|
|
103
152
|
}
|
|
104
153
|
/**
|
|
105
154
|
* Configuration for how captured frame tiles are DISPLAYED in AR (D7-resolution,
|
|
@@ -191,6 +240,8 @@ interface RecordingOptions {
|
|
|
191
240
|
visualization: VisualizationOptions;
|
|
192
241
|
/** Live QR detection + RAW recording configuration (opt-in) */
|
|
193
242
|
qr: QrCaptureOptions;
|
|
243
|
+
/** Compass alignment debug toggles (Stage 0 / Stage C / consistency gate) */
|
|
244
|
+
compassDebug: CompassDebugOptions;
|
|
194
245
|
}
|
|
195
246
|
/**
|
|
196
247
|
* localStorage key for persisted options.
|
|
@@ -235,6 +286,65 @@ declare const IMAGE_CONSTRAINTS: {
|
|
|
235
286
|
readonly step: 1;
|
|
236
287
|
};
|
|
237
288
|
};
|
|
289
|
+
/**
|
|
290
|
+
* Validation constraints for the motion-filter (blurry-frame gate) thresholds.
|
|
291
|
+
*
|
|
292
|
+
* The velocity ranges (0.05–5) bracket the plausible scanning regime: below
|
|
293
|
+
* ~0.05 the gate would reject almost everything; above ~5 rad/s ≈ 286°/s (or
|
|
294
|
+
* 5 m/s) it would never reject, so the gate would be inert. `maxWaitMs` is
|
|
295
|
+
* clamped to 0.5–20 s — the never-calm fallback must always be able to fire.
|
|
296
|
+
* All three back a (currently advanced/hidden) settings slider, so a corrupt
|
|
297
|
+
* stored value can never disable capture. The default thresholds themselves are
|
|
298
|
+
* placeholders pending on-device field tuning (plan §7).
|
|
299
|
+
*/
|
|
300
|
+
declare const MOTION_FILTER_CONSTRAINTS: {
|
|
301
|
+
readonly maxAngularVelocity: {
|
|
302
|
+
readonly min: 0.05;
|
|
303
|
+
readonly max: 5;
|
|
304
|
+
readonly step: 0.05;
|
|
305
|
+
};
|
|
306
|
+
readonly maxLinearVelocity: {
|
|
307
|
+
readonly min: 0.05;
|
|
308
|
+
readonly max: 5;
|
|
309
|
+
readonly step: 0.05;
|
|
310
|
+
};
|
|
311
|
+
readonly maxWaitMs: {
|
|
312
|
+
readonly min: 500;
|
|
313
|
+
readonly max: 20000;
|
|
314
|
+
readonly step: 500;
|
|
315
|
+
};
|
|
316
|
+
};
|
|
317
|
+
/**
|
|
318
|
+
* Validation constraints for the image-quality (blur/blackness) gate thresholds.
|
|
319
|
+
*
|
|
320
|
+
* `blurRelativeThreshold` (`k` in `sharpness < k·median`) is clamped to
|
|
321
|
+
* 0.05–0.95: it is a fraction of the recent sharpness median, so values must sit
|
|
322
|
+
* strictly inside (0, 1) — at ~0 the blur check never rejects, near 1 it rejects
|
|
323
|
+
* almost everything. `minMeanLuminance` (the absolute black cutoff on a 0–255
|
|
324
|
+
* luma scale) is clamped to 0–128: 0 disables the black check, and a cutoff
|
|
325
|
+
* above mid-grey would reject normally-lit frames. `maxWaitMs` mirrors the motion
|
|
326
|
+
* gate's range (0.5–20 s) so the never-good fallback can always fire. All back a
|
|
327
|
+
* (currently advanced/hidden) settings slider, so a corrupt stored value can
|
|
328
|
+
* never disable capture. The default thresholds are placeholders pending
|
|
329
|
+
* on-device field tuning (plan §5, §10).
|
|
330
|
+
*/
|
|
331
|
+
declare const QUALITY_FILTER_CONSTRAINTS: {
|
|
332
|
+
readonly blurRelativeThreshold: {
|
|
333
|
+
readonly min: 0.05;
|
|
334
|
+
readonly max: 0.95;
|
|
335
|
+
readonly step: 0.05;
|
|
336
|
+
};
|
|
337
|
+
readonly minMeanLuminance: {
|
|
338
|
+
readonly min: 0;
|
|
339
|
+
readonly max: 128;
|
|
340
|
+
readonly step: 1;
|
|
341
|
+
};
|
|
342
|
+
readonly maxWaitMs: {
|
|
343
|
+
readonly min: 500;
|
|
344
|
+
readonly max: 20000;
|
|
345
|
+
readonly step: 500;
|
|
346
|
+
};
|
|
347
|
+
};
|
|
238
348
|
/**
|
|
239
349
|
* Validation constraints for occupancy options.
|
|
240
350
|
*
|
|
@@ -243,6 +353,11 @@ declare const IMAGE_CONSTRAINTS: {
|
|
|
243
353
|
* `points3D` row count) scales as 1/cellSize³ — sub-centimetre voxels are both
|
|
244
354
|
* a memory/perf cliff on a phone and below the depth sensor's noise floor.
|
|
245
355
|
* Step is 1 cm (the settings slider operates in cm).
|
|
356
|
+
*
|
|
357
|
+
* `minConfidence` is clamped to 1–10 (integer). 1 disables the filter (legacy
|
|
358
|
+
* behaviour: a single observation counts as occupied); the ceiling exists
|
|
359
|
+
* because real surfaces accumulate only a handful of observations per second
|
|
360
|
+
* of dwell, so a floor above ~10 would start hiding genuine geometry.
|
|
246
361
|
*/
|
|
247
362
|
declare const OCCUPANCY_CONSTRAINTS: {
|
|
248
363
|
readonly cellSizeM: {
|
|
@@ -250,6 +365,11 @@ declare const OCCUPANCY_CONSTRAINTS: {
|
|
|
250
365
|
readonly max: 0.2;
|
|
251
366
|
readonly step: 0.01;
|
|
252
367
|
};
|
|
368
|
+
readonly minConfidence: {
|
|
369
|
+
readonly min: 1;
|
|
370
|
+
readonly max: 10;
|
|
371
|
+
readonly step: 1;
|
|
372
|
+
};
|
|
253
373
|
};
|
|
254
374
|
/**
|
|
255
375
|
* Validation constraints for the frame-tile display-resolution divisor.
|
|
@@ -292,6 +412,12 @@ declare const QR_CONSTRAINTS: {
|
|
|
292
412
|
* Missing or invalid values fall back to defaults.
|
|
293
413
|
*/
|
|
294
414
|
declare function validateArCrashIsolationOptions(options: Partial<ArCrashIsolationOptions>): ArCrashIsolationOptions;
|
|
415
|
+
/**
|
|
416
|
+
* Validate and normalize the compass alignment debug toggles. Boolean-or-default
|
|
417
|
+
* per field; a missing/corrupted/pre-feature value falls back to the OFF default
|
|
418
|
+
* so a bad persisted value can never silently turn an alignment override ON.
|
|
419
|
+
*/
|
|
420
|
+
declare function validateCompassDebugOptions(options: Partial<CompassDebugOptions>): CompassDebugOptions;
|
|
295
421
|
/**
|
|
296
422
|
* Validate and normalize the live debug-overlay visibility toggles.
|
|
297
423
|
* Each field is boolean-or-default (same policy as the AR-crash-isolation
|
|
@@ -313,6 +439,25 @@ declare function validateQrOptions(options: Partial<QrCaptureOptions>): QrCaptur
|
|
|
313
439
|
* Invalid values are clamped to valid ranges.
|
|
314
440
|
*/
|
|
315
441
|
declare function validateDepthOptions(options: Partial<DepthCaptureOptions>): DepthCaptureOptions;
|
|
442
|
+
/**
|
|
443
|
+
* Validate and normalize the motion-filter (blurry-frame gate) options.
|
|
444
|
+
* `enabled` is boolean-or-default; the three numeric thresholds are clamped to
|
|
445
|
+
* {@link MOTION_FILTER_CONSTRAINTS} with a `Number.isFinite` guard (a stored
|
|
446
|
+
* `NaN` is `typeof 'number'` and would survive `clamp`). A missing group
|
|
447
|
+
* default-fills entirely — a pre-feature persisted options object that lacks
|
|
448
|
+
* `motionFilter` therefore loads with the gate enabled rather than crashing.
|
|
449
|
+
*/
|
|
450
|
+
declare function validateMotionFilterOptions(options: Partial<MotionFilterConfig>): MotionFilterConfig;
|
|
451
|
+
/**
|
|
452
|
+
* Validate and normalize the image-quality (blur/blackness gate) options. Same
|
|
453
|
+
* policy as {@link validateMotionFilterOptions}: `enabled` is boolean-or-default;
|
|
454
|
+
* the three numeric thresholds are clamped to {@link QUALITY_FILTER_CONSTRAINTS}
|
|
455
|
+
* with a `Number.isFinite` guard (a stored `NaN` is `typeof 'number'` and would
|
|
456
|
+
* survive `clamp`). A missing group default-fills entirely — a pre-feature
|
|
457
|
+
* persisted options object that lacks `qualityFilter` loads with the gate
|
|
458
|
+
* disabled (the safe default) rather than crashing.
|
|
459
|
+
*/
|
|
460
|
+
declare function validateQualityFilterOptions(options: Partial<QualityFilterConfig>): QualityFilterConfig;
|
|
316
461
|
/**
|
|
317
462
|
* Validate and normalize image options.
|
|
318
463
|
* Invalid values are clamped to valid ranges.
|
|
@@ -366,4 +511,4 @@ declare function resetRecordingOptions(storageKey?: string): RecordingOptions;
|
|
|
366
511
|
*/
|
|
367
512
|
declare function cloneRecordingOptions(options: RecordingOptions): RecordingOptions;
|
|
368
513
|
//#endregion
|
|
369
|
-
export {
|
|
514
|
+
export { validateOccupancyOptions as A, saveRecordingOptions as C, validateFrameTileDisplayOptions as D, validateDepthOptions as E, validateQualityFilterOptions as M, validateRecordingOptions as N, validateImageOptions as O, validateVisualizationOptions as P, resetRecordingOptions as S, validateCompassDebugOptions as T, RecordingOptionsInput as _, DepthCaptureOptions as a, cloneRecordingOptions as b, IMAGE_CONSTRAINTS as c, OCCUPANCY_CONSTRAINTS as d, OccupancyOptions as f, RecordingOptions as g, QrCaptureOptions as h, DEPTH_CONSTRAINTS as i, validateQrOptions as j, validateMotionFilterOptions as k, ImageCaptureOptions as l, QUALITY_FILTER_CONSTRAINTS as m, CompassDebugOptions as n, FRAME_TILE_DISPLAY_CONSTRAINTS as o, QR_CONSTRAINTS as p, DEFAULT_RECORDING_OPTIONS as r, FrameTileDisplayOptions as s, ArCrashIsolationOptions as t, MOTION_FILTER_CONSTRAINTS as u, STORAGE_KEY as v, validateArCrashIsolationOptions as w, loadRecordingOptions as x, VisualizationOptions as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as RecordedAction } from "./zip-reader-
|
|
1
|
+
import { N as CombinedRootState } from "./create-slam-app-store-n_VF63D5.js";
|
|
2
|
+
import { i as RecordedAction } from "./zip-reader-D9iPQwdQ.js";
|
|
3
3
|
|
|
4
4
|
//#region ../src/state/recording-replayer.d.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as DepthSample } from "./ar-types-
|
|
2
|
-
import {
|
|
1
|
+
import { i as DepthSample } from "./ar-types-BFX2r1wk.js";
|
|
2
|
+
import { g as RecordingOptions } from "./recording-options-BPCpMHLK.js";
|
|
3
3
|
import * as _$_reduxjs_toolkit0 from "@reduxjs/toolkit";
|
|
4
4
|
|
|
5
5
|
//#region ../src/state/recording-slice.d.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as Css3dRendererManager } from "./css3d-renderer-manager-
|
|
2
|
-
import { t as CameraFollower } from "./camera-follower-
|
|
3
|
-
import { t as AlignmentLerper } from "./alignment-lerper-
|
|
1
|
+
import { t as Css3dRendererManager } from "./css3d-renderer-manager-B3kGNtcn.js";
|
|
2
|
+
import { t as CameraFollower } from "./camera-follower-CqJJ7zRj.js";
|
|
3
|
+
import { t as AlignmentLerper } from "./alignment-lerper-Bil6vbVw.js";
|
|
4
4
|
import * as THREE from "three";
|
|
5
5
|
import { OrbitControls } from "three/addons/controls/OrbitControls.js";
|
|
6
6
|
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as startAbsoluteOrientationWatch, i as isAbsoluteOrientationAvailable, n as AbsoluteOrientationStatus, o as stopAbsoluteOrientationWatch, r as getLatestAbsoluteOrientation, t as AbsoluteOrientationReading } from "../absolute-orientation-CAEh840t.js";
|
|
2
|
+
export { AbsoluteOrientationReading, AbsoluteOrientationStatus, getLatestAbsoluteOrientation, isAbsoluteOrientationAvailable, startAbsoluteOrientationWatch, stopAbsoluteOrientationWatch };
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { createLogger } from "../utils/logger.js";
|
|
2
|
+
//#region ../src/sensors/absolute-orientation.ts
|
|
3
|
+
/**
|
|
4
|
+
* AbsoluteOrientationSensor capture (Generic Sensor API).
|
|
5
|
+
*
|
|
6
|
+
* Phase 1 of the AbsoluteOrientationSensor plan
|
|
7
|
+
* (GpsPlusSlamJs_Docs/docs/2026-06-25-absolute-orientation-sensor-plan.md §5.1):
|
|
8
|
+
* passive instrumentation that fuses accelerometer + gyroscope + magnetometer
|
|
9
|
+
* into an Earth-referenced (ENU) quaternion, captured per GPS event as an
|
|
10
|
+
* independent north reference. No production behaviour change.
|
|
11
|
+
*
|
|
12
|
+
* Platform: Chrome Android only. Safari / Firefox / desktop / iOS lack the
|
|
13
|
+
* sensor → this module degrades to a clean, reported no-op.
|
|
14
|
+
*
|
|
15
|
+
* The raw `'device'` reference frame is recorded together with the screen angle
|
|
16
|
+
* so either the device- or screen-compensated form can be reconstructed offline
|
|
17
|
+
* (plan §8 Q1).
|
|
18
|
+
*/
|
|
19
|
+
const log = createLogger("AbsCompass");
|
|
20
|
+
/** Sensor frequency (Hz). We only snapshot at GPS rate, so low is fine (plan §8 Q4). */
|
|
21
|
+
const SENSOR_FREQUENCY_HZ = 20;
|
|
22
|
+
let sensor = null;
|
|
23
|
+
let latest = null;
|
|
24
|
+
let watchGeneration = 0;
|
|
25
|
+
function getSensorCtor() {
|
|
26
|
+
if (typeof window === "undefined") return null;
|
|
27
|
+
const ctor = window.AbsoluteOrientationSensor;
|
|
28
|
+
return typeof ctor === "function" ? ctor : null;
|
|
29
|
+
}
|
|
30
|
+
/** True when the sensor can plausibly run here (secure context + API present). */
|
|
31
|
+
function isAbsoluteOrientationAvailable() {
|
|
32
|
+
return typeof window !== "undefined" && window.isSecureContext === true && getSensorCtor() !== null;
|
|
33
|
+
}
|
|
34
|
+
function currentScreenAngleDeg() {
|
|
35
|
+
if (typeof screen === "undefined") return 0;
|
|
36
|
+
const angle = screen.orientation?.angle;
|
|
37
|
+
return typeof angle === "number" ? angle : 0;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Whether all three underlying sensors are granted-or-promptable (plan §5.1).
|
|
41
|
+
* Returns `true` when the Permissions API is absent (best-effort — let the
|
|
42
|
+
* sensor constructor surface any real denial), and treats a failed individual
|
|
43
|
+
* query as `'granted'` for the same reason.
|
|
44
|
+
*/
|
|
45
|
+
async function sensorPermissionsUsable() {
|
|
46
|
+
const permissions = navigator.permissions;
|
|
47
|
+
if (!permissions || typeof permissions.query !== "function") return true;
|
|
48
|
+
return (await Promise.all([
|
|
49
|
+
"accelerometer",
|
|
50
|
+
"gyroscope",
|
|
51
|
+
"magnetometer"
|
|
52
|
+
].map((name) => permissions.query({ name }).then((p) => p.state).catch(() => "granted")))).every((s) => s === "granted" || s === "prompt");
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Start capturing absolute orientation. Idempotent (stops any prior watch first).
|
|
56
|
+
*
|
|
57
|
+
* On platforms without the sensor — or when permissions are denied — it reports
|
|
58
|
+
* `unavailable`/`error` via `onStatus` and stays a no-op; the recorder keeps
|
|
59
|
+
* working unchanged. Never throws.
|
|
60
|
+
*/
|
|
61
|
+
async function startAbsoluteOrientationWatch(onStatus = () => {}) {
|
|
62
|
+
stopAbsoluteOrientationWatch();
|
|
63
|
+
const myGeneration = watchGeneration;
|
|
64
|
+
const Ctor = getSensorCtor();
|
|
65
|
+
if (!isAbsoluteOrientationAvailable() || Ctor === null) {
|
|
66
|
+
onStatus({
|
|
67
|
+
state: "unavailable",
|
|
68
|
+
reason: "no AbsoluteOrientationSensor / insecure context"
|
|
69
|
+
});
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
try {
|
|
73
|
+
if (!await sensorPermissionsUsable()) {
|
|
74
|
+
onStatus({
|
|
75
|
+
state: "unavailable",
|
|
76
|
+
reason: "sensor permission denied"
|
|
77
|
+
});
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (myGeneration !== watchGeneration) return;
|
|
81
|
+
const created = new Ctor({
|
|
82
|
+
frequency: SENSOR_FREQUENCY_HZ,
|
|
83
|
+
referenceFrame: "device"
|
|
84
|
+
});
|
|
85
|
+
sensor = created;
|
|
86
|
+
created.addEventListener("reading", () => {
|
|
87
|
+
const q = created.quaternion;
|
|
88
|
+
if (!q || q.length < 4) return;
|
|
89
|
+
const x = q[0];
|
|
90
|
+
const y = q[1];
|
|
91
|
+
const z = q[2];
|
|
92
|
+
const w = q[3];
|
|
93
|
+
if (x === void 0 || y === void 0 || z === void 0 || w === void 0) return;
|
|
94
|
+
latest = {
|
|
95
|
+
quaternion: [
|
|
96
|
+
x,
|
|
97
|
+
y,
|
|
98
|
+
z,
|
|
99
|
+
w
|
|
100
|
+
],
|
|
101
|
+
referenceFrame: "device",
|
|
102
|
+
screenAngleDeg: currentScreenAngleDeg(),
|
|
103
|
+
timestamp: Date.now()
|
|
104
|
+
};
|
|
105
|
+
});
|
|
106
|
+
created.addEventListener("activate", () => {
|
|
107
|
+
log.info("active");
|
|
108
|
+
onStatus({ state: "active" });
|
|
109
|
+
});
|
|
110
|
+
created.addEventListener("error", (event) => {
|
|
111
|
+
latest = null;
|
|
112
|
+
const reason = event?.error?.name ?? "SensorError";
|
|
113
|
+
log.error("sensor error:", reason);
|
|
114
|
+
onStatus({
|
|
115
|
+
state: "error",
|
|
116
|
+
reason
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
created.start();
|
|
120
|
+
} catch (err) {
|
|
121
|
+
sensor = null;
|
|
122
|
+
latest = null;
|
|
123
|
+
onStatus({
|
|
124
|
+
state: "error",
|
|
125
|
+
reason: err?.name ?? String(err)
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/** Latest reading, or null when unavailable/not-yet-warmed-up. Mirrors getLastDeviceOrientation. */
|
|
130
|
+
function getLatestAbsoluteOrientation() {
|
|
131
|
+
return latest;
|
|
132
|
+
}
|
|
133
|
+
/** Stop the watch and clear cached state. Idempotent. */
|
|
134
|
+
function stopAbsoluteOrientationWatch() {
|
|
135
|
+
watchGeneration++;
|
|
136
|
+
if (sensor) {
|
|
137
|
+
try {
|
|
138
|
+
sensor.stop();
|
|
139
|
+
} catch {}
|
|
140
|
+
sensor = null;
|
|
141
|
+
}
|
|
142
|
+
latest = null;
|
|
143
|
+
}
|
|
144
|
+
//#endregion
|
|
145
|
+
export { getLatestAbsoluteOrientation, isAbsoluteOrientationAvailable, startAbsoluteOrientationWatch, stopAbsoluteOrientationWatch };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as getGpsErrorMessage, i as createGpsErrorHandler, n as GPS_ERROR_MESSAGES, r as GPS_ERROR_MESSAGE_UNKNOWN, t as GPS_ERROR_CODES } from "../gps-error-handler-
|
|
1
|
+
import { a as getGpsErrorMessage, i as createGpsErrorHandler, n as GPS_ERROR_MESSAGES, r as GPS_ERROR_MESSAGE_UNKNOWN, t as GPS_ERROR_CODES } from "../gps-error-handler-BbPsfw-_.js";
|
|
2
2
|
export { GPS_ERROR_CODES, GPS_ERROR_MESSAGES, GPS_ERROR_MESSAGE_UNKNOWN, createGpsErrorHandler, getGpsErrorMessage };
|
package/dist/sensors/gps.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as startOrientationWatch, i as startGpsWatch, n as RawDeviceOrientation, o as stopGpsWatch, r as requestOrientationPermission, s as stopOrientationWatch, t as GpsPosition } from "../gps-
|
|
1
|
+
import { a as startOrientationWatch, i as startGpsWatch, n as RawDeviceOrientation, o as stopGpsWatch, r as requestOrientationPermission, s as stopOrientationWatch, t as GpsPosition } from "../gps-BBO3hKfT.js";
|
|
2
2
|
export { GpsPosition, RawDeviceOrientation, requestOrientationPermission, startGpsWatch, startOrientationWatch, stopGpsWatch, stopOrientationWatch };
|
package/dist/sensors/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { a as startOrientationWatch, i as startGpsWatch, n as RawDeviceOrientation, o as stopGpsWatch, r as requestOrientationPermission, s as stopOrientationWatch, t as GpsPosition } from "../gps-
|
|
2
|
-
import { a as checkCameraPermission, c as checkOrientationPermission, d as requestCameraPermission, f as requestGeolocationPermission, g as setFileSystemState, h as resetFileSystemState, i as checkAllPermissions, l as checkWebXRSupport, m as requestWebXRWithDepthPermission, n as PermissionStatus, o as checkFileSystemPermission, p as requestOrientationPermission$1, s as checkGeolocationPermission, t as PermissionCheckResult, u as requestAllPermissions } from "../permission-checker-
|
|
3
|
-
import { a as
|
|
4
|
-
|
|
1
|
+
import { a as startOrientationWatch, i as startGpsWatch, n as RawDeviceOrientation, o as stopGpsWatch, r as requestOrientationPermission, s as stopOrientationWatch, t as GpsPosition } from "../gps-BBO3hKfT.js";
|
|
2
|
+
import { a as checkCameraPermission, c as checkOrientationPermission, d as requestCameraPermission, f as requestGeolocationPermission, g as setFileSystemState, h as resetFileSystemState, i as checkAllPermissions, l as checkWebXRSupport, m as requestWebXRWithDepthPermission, n as PermissionStatus, o as checkFileSystemPermission, p as requestOrientationPermission$1, s as checkGeolocationPermission, t as PermissionCheckResult, u as requestAllPermissions } from "../permission-checker-CDuI8BwC.js";
|
|
3
|
+
import { a as startAbsoluteOrientationWatch, i as isAbsoluteOrientationAvailable, n as AbsoluteOrientationStatus, o as stopAbsoluteOrientationWatch, r as getLatestAbsoluteOrientation, t as AbsoluteOrientationReading } from "../absolute-orientation-CAEh840t.js";
|
|
4
|
+
import { a as getGpsErrorMessage, i as createGpsErrorHandler, n as GPS_ERROR_MESSAGES, r as GPS_ERROR_MESSAGE_UNKNOWN, t as GPS_ERROR_CODES } from "../gps-error-handler-BbPsfw-_.js";
|
|
5
|
+
export { type AbsoluteOrientationReading, type AbsoluteOrientationStatus, GPS_ERROR_CODES, GPS_ERROR_MESSAGES, GPS_ERROR_MESSAGE_UNKNOWN, type GpsPosition, type PermissionCheckResult, type PermissionStatus, type RawDeviceOrientation, checkAllPermissions, checkCameraPermission, checkFileSystemPermission, checkGeolocationPermission, checkOrientationPermission, checkWebXRSupport, createGpsErrorHandler, getGpsErrorMessage, getLatestAbsoluteOrientation, isAbsoluteOrientationAvailable, requestAllPermissions, requestCameraPermission, requestOrientationPermission as requestDeviceOrientationPermission, requestGeolocationPermission, requestOrientationPermission$1 as requestOrientationPermission, requestWebXRWithDepthPermission, resetFileSystemState, setFileSystemState, startAbsoluteOrientationWatch, startGpsWatch, startOrientationWatch, stopAbsoluteOrientationWatch, stopGpsWatch, stopOrientationWatch };
|
package/dist/sensors/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { getLatestAbsoluteOrientation, isAbsoluteOrientationAvailable, startAbsoluteOrientationWatch, stopAbsoluteOrientationWatch } from "./absolute-orientation.js";
|
|
1
2
|
import { checkAllPermissions, checkCameraPermission, checkFileSystemPermission, checkGeolocationPermission, checkOrientationPermission, checkWebXRSupport, requestAllPermissions, requestCameraPermission, requestGeolocationPermission, requestOrientationPermission as requestOrientationPermission$1, requestWebXRWithDepthPermission, resetFileSystemState, setFileSystemState } from "./permission-checker.js";
|
|
2
3
|
import { requestOrientationPermission, startGpsWatch, startOrientationWatch, stopGpsWatch, stopOrientationWatch } from "./gps.js";
|
|
3
4
|
import { GPS_ERROR_CODES, GPS_ERROR_MESSAGES, GPS_ERROR_MESSAGE_UNKNOWN, createGpsErrorHandler, getGpsErrorMessage } from "./gps-error-handler.js";
|
|
4
|
-
export { GPS_ERROR_CODES, GPS_ERROR_MESSAGES, GPS_ERROR_MESSAGE_UNKNOWN, checkAllPermissions, checkCameraPermission, checkFileSystemPermission, checkGeolocationPermission, checkOrientationPermission, checkWebXRSupport, createGpsErrorHandler, getGpsErrorMessage, requestAllPermissions, requestCameraPermission, requestOrientationPermission as requestDeviceOrientationPermission, requestGeolocationPermission, requestOrientationPermission$1 as requestOrientationPermission, requestWebXRWithDepthPermission, resetFileSystemState, setFileSystemState, startGpsWatch, startOrientationWatch, stopGpsWatch, stopOrientationWatch };
|
|
5
|
+
export { GPS_ERROR_CODES, GPS_ERROR_MESSAGES, GPS_ERROR_MESSAGE_UNKNOWN, checkAllPermissions, checkCameraPermission, checkFileSystemPermission, checkGeolocationPermission, checkOrientationPermission, checkWebXRSupport, createGpsErrorHandler, getGpsErrorMessage, getLatestAbsoluteOrientation, isAbsoluteOrientationAvailable, requestAllPermissions, requestCameraPermission, requestOrientationPermission as requestDeviceOrientationPermission, requestGeolocationPermission, requestOrientationPermission$1 as requestOrientationPermission, requestWebXRWithDepthPermission, resetFileSystemState, setFileSystemState, startAbsoluteOrientationWatch, startGpsWatch, startOrientationWatch, stopAbsoluteOrientationWatch, stopGpsWatch, stopOrientationWatch };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as subscribePermissionChanges, a as checkCameraPermission, c as checkOrientationPermission, d as requestCameraPermission, f as requestGeolocationPermission, g as setFileSystemState, h as resetFileSystemState, i as checkAllPermissions, l as checkWebXRSupport, m as requestWebXRWithDepthPermission, n as PermissionStatus, o as checkFileSystemPermission, p as requestOrientationPermission, r as PermissionSubscription, s as checkGeolocationPermission, t as PermissionCheckResult, u as requestAllPermissions } from "../permission-checker-
|
|
1
|
+
import { _ as subscribePermissionChanges, a as checkCameraPermission, c as checkOrientationPermission, d as requestCameraPermission, f as requestGeolocationPermission, g as setFileSystemState, h as resetFileSystemState, i as checkAllPermissions, l as checkWebXRSupport, m as requestWebXRWithDepthPermission, n as PermissionStatus, o as checkFileSystemPermission, p as requestOrientationPermission, r as PermissionSubscription, s as checkGeolocationPermission, t as PermissionCheckResult, u as requestAllPermissions } from "../permission-checker-CDuI8BwC.js";
|
|
2
2
|
export { PermissionCheckResult, PermissionStatus, PermissionSubscription, checkAllPermissions, checkCameraPermission, checkFileSystemPermission, checkGeolocationPermission, checkOrientationPermission, checkWebXRSupport, requestAllPermissions, requestCameraPermission, requestGeolocationPermission, requestOrientationPermission, requestWebXRWithDepthPermission, resetFileSystemState, setFileSystemState, subscribePermissionChanges };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as selectOdometryRotations, i as selectOdometryPositions, n as selectFrameTilesInWebXR, o as selectZeroReference, r as selectGpsPositions, t as selectAlignmentMatrix } from "../app-selectors-
|
|
1
|
+
import { a as selectOdometryRotations, i as selectOdometryPositions, n as selectFrameTilesInWebXR, o as selectZeroReference, r as selectGpsPositions, t as selectAlignmentMatrix } from "../app-selectors-ikTUQZpe.js";
|
|
2
2
|
export { selectAlignmentMatrix, selectFrameTilesInWebXR, selectGpsPositions, selectOdometryPositions, selectOdometryRotations, selectZeroReference };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { N as CombinedRootState } from "../create-slam-app-store-n_VF63D5.js";
|
|
2
2
|
export { CombinedRootState };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as SlamAppStoreOptions, i as SlamAppStore, n as SlamAppMiddleware, o as createSlamAppStore, r as SlamAppRootState, t as SlamAppCombinedState } from "../create-slam-app-store-
|
|
1
|
+
import { a as SlamAppStoreOptions, i as SlamAppStore, n as SlamAppMiddleware, o as createSlamAppStore, r as SlamAppRootState, t as SlamAppCombinedState } from "../create-slam-app-store-n_VF63D5.js";
|
|
2
2
|
export { SlamAppCombinedState, SlamAppMiddleware, SlamAppRootState, SlamAppStore, SlamAppStoreOptions, createSlamAppStore };
|