Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix touchpad camera controls #274

Merged
merged 2 commits into from
Nov 8, 2024
Merged

Conversation

slimbuck
Copy link
Member

@slimbuck slimbuck commented Nov 8, 2024

This PR updates the trackpad camera controls to finally be usable:

  • two finger swipe to orbit
  • shift to pan
  • ctrl to zoom

Also fix various little issues:

  • handle the case when user drops not-files into the application
  • test for presence of serviceWorker before attempting to use it
  • use alt and cmd key for brush resize to keep consistent camera controls (cc @simonbethke)

Notes:

  • unfortunately windows trackpad often limits swipes to one of the two axes, making it less useful than mac for camera control. this can't be fixed according to https://issues.chromium.org/issues/41468861
  • tested on:
    • macos: chrome, safari, firefox
    • windows: chrome, firefox
  • firefox wheel mouse detection doesn't work properly. use middle mouse click to zoom instead.

@slimbuck slimbuck merged commit 797568e into playcanvas:main Nov 8, 2024
2 checks passed
@slimbuck slimbuck deleted the trackpad-updates branch November 8, 2024 15:51
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.

2 participants