web: device-compass navigation #3

Merged
hugooconnor merged 0 commits from refs/pull/3/head into main 2026-06-19 05:07:57 +00:00
hugooconnor commented 2026-06-19 05:07:54 +00:00 (Migrated from codeberg.org)

While Directions is active, the direction arrow now points relative to where the phone is facing (using the device compass), not just relative to north — a real "walk this way" arrow. Falls back to north-relative when there's no compass or permission.

  • iOS permission requested from the Directions tap (DeviceOrientationEvent.requestPermission).
  • Uses webkitCompassHeading on iOS, absolute deviceorientation alpha elsewhere; arrow rotation = bearing − heading.
  • Listener removed when Directions stops.
  • The readout still shows the absolute bearing (e.g. "1.4 km · N · 2°"); only the arrow is heading-relative.

🤖 Generated with Claude Code

While **Directions** is active, the direction arrow now points relative to where the phone is **facing** (using the device compass), not just relative to north — a real "walk this way" arrow. Falls back to north-relative when there's no compass or permission. - iOS permission requested from the Directions tap (`DeviceOrientationEvent.requestPermission`). - Uses `webkitCompassHeading` on iOS, absolute `deviceorientation` alpha elsewhere; arrow rotation = `bearing − heading`. - Listener removed when Directions stops. - The readout still shows the absolute bearing (e.g. "1.4 km · N · 2°"); only the arrow is heading-relative. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
anuna-research/saywhere!3
No description provided.