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

Touch Support #42

Merged
merged 23 commits into from
Feb 2, 2024
Merged

Touch Support #42

merged 23 commits into from
Feb 2, 2024

Conversation

Plonq
Copy link
Owner

@Plonq Plonq commented Feb 2, 2024

Closes #40

Adds beta touch controls. Beta because I have only tested on iOS so I can't be sure they work everywhere. That said, I can't imagine there'd be issues with other devices.

For now touch controls are not customisable. I'm not sure whether there's any point in making them customisable, as there aren't really many alternatives anyway. E.g. I can't imagine wanting pinch to do anything other than zoom. If I do add customisation, it'll likely be a set of predefined schemes (maybe incorporating 3 fingers?)

Changes:

  • Add TouchTracker resource and associated system that keeps track of touch data for current and previous frames (0-2 fingers only)
  • Add touch movement to orbit/pan/zoom
  • Allow simultaneous orbit/pan/zoom (pan and zoom at the same time is possible with touch)
  • Add mobile example to demo

Controls:

Pinch: zoom
One finger: orbit
Two fingers: pan

Screen.Recording.2024-02-02.at.6.44.51.pm.mov

@Plonq Plonq merged commit c96675d into master Feb 2, 2024
4 checks passed
@Plonq Plonq deleted the touch branch February 2, 2024 08:01
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.

feat: touchscreen controls
1 participant