Add gyroscope controls for camera panning on handheld devices#386
Add gyroscope controls for camera panning on handheld devices#386
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| } else { | ||
| setPermission("denied") | ||
| localStorage.removeItem(STORAGE_KEY) | ||
| return false |
There was a problem hiding this comment.
Permission "default" treated as "denied" prevents retry
Low Severity
The requestPermission function handles a "default" result (when the user dismisses the permission dialog without choosing) the same as "denied", setting permission state to "denied". Since the toggle button is disabled when permission is "denied", users who dismiss the dialog cannot retry requesting permission without reloading the page. The type explicitly includes "default" as a possible return value, suggesting this case was anticipated but handled incorrectly.
Note
Introduces gyroscope-driven camera panning on handheld devices, with permission handling, state management, and a user-facing toggle.
camera-hooksto drive pan (replacing pointer when enabled), adds vertical pan, and applies gyroscope-specific smoothinguseGyroscopeStoreto track permission, enabled state, and orientation valuesuseDeviceOrientationhook to request permissions, normalize/smooth orientation, persist preference, and reset calibrationGyroscopeTogglecomponent and wires it intofooter-content(mobile) alongside social links for enabling/disabling the featureWritten by Cursor Bugbot for commit 4aba2bd. This will update automatically on new commits. Configure here.