You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updated the remaining tables in README.md—non-functional requirements, front-end stack, algorithms, error-handling, testing plan, and build/deployment—into narrative bullet lists that keep every original detail intact
-**Service-worker:** Hand-written `sw.js` using the Cache API to precache `index.html`, `main.js`, `styles.css`, and icons; runtime is network-first with cache fallback for CDN modules.
| Hit-testing |`session.requestReferenceSpace('viewer')` → `requestHitTestSource`. Use first result each frame; reticle shows `visible = result.length > 0`. |
| Triangulation | Build normalized view rays from tap NDC + inverse PV per pose. Solve closest segment between `o₁+t₁d₁` and `o₂+t₂d₂`; midpoint = anchor, miss = `\|p₁−p₂\|`. Require ≥0.30 m baseline. Quality buckets: Green (θ ≥ 8°, miss ≤ 1.5 cm), Yellow (θ ≥ 4° or miss ≤ 3 cm), Red otherwise. Error bar = combined miss of both endpoints. |
98
+
-**Hit-testing:** Call `session.requestReferenceSpace('viewer')` then `requestHitTestSource`; consume the first result each frame and toggle the reticle via `visible = result.length > 0`.
99
+
-**Distance calculation:** Compute `distance = p1.distanceTo(p2)` in metres. Metric display uses metres with two decimals when ≥ 1 m, otherwise centimetres rounded to integers. Imperial display converts to inches (`metres × 39.3701`), splits into feet (`Math.floor(totalInches / 12)`) and decimal inches (`(totalInches % 12).toFixed(2)`).
100
+
-**Colour generator:** Fix HSL saturation at 80% and lightness at 55%, advancing hue with `nextHue = (prevHue + 137) % 360` to guarantee contrast.
101
+
-**Triangulation:** Normalize view rays from tap NDC using the inverse projection-view matrices per pose. Solve the closest segment between `o₁ + t₁d₁` and `o₂ + t₂d₂`; take the midpoint as the anchor and miss distance `‖p₁ − p₂‖`. Enforce a ≥ 0.30 m baseline and classify quality as Green (θ ≥ 8° and miss ≤ 1.5 cm), Yellow (θ ≥ 4° or miss ≤ 3 cm), or Red otherwise. The error bar reflects the combined miss of both endpoints.
-**Unit tests:** Run **Jest** (Node) against distance calculations, metric↔imperial conversion, colour generator non-collision, and the random-hue cycle.
117
+
-**Manual exploratory:** Follow a checklist covering placement (hit-test and triangulation), baseline guidance ring, quality chip colours, redo/undo actions, list copy/delete, unit toggle, haptic feedback, loss-tracking banner, and PWA install/open offline. Exercise on Pixel 8 (Android 15 Chrome), iPhone 14 (iOS 17 Safari), Galaxy S22 (Samsung Internet), and the Vision Pro simulator.
118
+
-**CI:** Execute GitHub Actions workflow `npm ci` then `npm test`; treat failures as merge blockers.
|**License**|**GPL v3**. Include `LICENSE` file. |
124
+
-**Build:** No build step; load scripts with `<script type="module">` and styles from the Tailwind CDN. Generate icons once (512 × 512 source exported to smaller sizes via real-favicongenerator).
125
+
-**Deployment:** Push the `main` branch manually and let GitHub Pages serve from `/pocket-tape-ar/`.
126
+
-**Versioning:** Tag releases as `vMAJOR.MINOR.PATCH`.
127
+
-**License:** Ship under **GPL v3** with the `LICENSE` file included.
0 commit comments