Skip to content

Add gyroscope controls for camera panning on handheld devices#386

Open
git-chad wants to merge 3 commits intomainfrom
tobi/poc-gyroscope-controls
Open

Add gyroscope controls for camera panning on handheld devices#386
git-chad wants to merge 3 commits intomainfrom
tobi/poc-gyroscope-controls

Conversation

@git-chad
Copy link
Contributor

@git-chad git-chad commented Jan 7, 2026

Note

Introduces gyroscope-driven camera panning on handheld devices, with permission handling, state management, and a user-facing toggle.

  • Integrates gyroscope input into camera-hooks to drive pan (replacing pointer when enabled), adds vertical pan, and applies gyroscope-specific smoothing
  • Adds Zustand store useGyroscopeStore to track permission, enabled state, and orientation values
  • Implements useDeviceOrientation hook to request permissions, normalize/smooth orientation, persist preference, and reset calibration
  • Adds GyroscopeToggle component and wires it into footer-content (mobile) alongside social links for enabling/disabling the feature

Written by Cursor Bugbot for commit 4aba2bd. This will update automatically on new commits. Configure here.

@vercel
Copy link

vercel bot commented Jan 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
website-2k25 Ready Ready Preview, Comment Jan 7, 2026 10:26pm

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant