-
-
Notifications
You must be signed in to change notification settings - Fork 35.2k
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
OrbitControls: support 2-finger zoom/pan #13706
Conversation
Please try it and let me know if touch is jittery. /ping @wuweiweiwu, @ranbuch, @huj2, @moroine, @XanderLuciano Apologies to @MauricioVives and @smcllns for the delay. |
LGTM 👍! |
Looks good also on my side 👍 I'll see later to add a PR to be able to customize the touch behavior like we have with the option
|
Great, thanks for getting this in! |
Initial review looks good on my end 👍 (tested on an LG V30 with Chrome). Works well with the perspective camera, no jitter like I've seen previously. Will do some more testing and report back though. I do have a few nit-picky general comments though.
Nit picking aside though, I'm not seeing any real issues or stopship problems currently, and the above complaints can be addressed in a future Issue / PR. I'll see about creating a few example files tonight, but if anyone wants to help here's a few different options I'd like to test.
Also, if someone can test this PR with an iOS device and/or Touchscreen laptop that'd be helpful. |
@XanderLuciano Settings on one device are likely to yield different behavior than the identical settings on a different device. I would prefer to keep the defaults at 1, and instead focus on code that help achieve more consistent behavior across devices -- to the extent that is even possible.
|
I was thinking about this a bit the other day. I think we may want to divide the speed by |
LGTM! Thanks! |
@WestLangley First of all, thank you very much for your work! I just implemented the new version from r92 in my project and found a problem. |
@WestLangley That's the line. Removed it and now it works again. |
A little bit late, but as mentioned in #13706 (comment) new PR for adding a new touch behavior. If you can test/review this could be awesome |
New event.preventDefault() in touchStart() broke some stuff here, where I use both OrbitControls and ClickEvents. Whats the best approach (currently using now older version of OrbitControls) ? |
@Pl4n3 Did you try removing the |
@XanderLuciano Now using an older version (from 81) without event.preventDefault(), also liked the old touch behavior better for my projects. I guess the threejs-examples-files are generally more subject to change then the threejs-core and shouldnt be directly referenced in a project. |
Three-finger panning has been removed with this PR, and replaced with the more-familiar 2-finger zoom/pan.