-
Notifications
You must be signed in to change notification settings - Fork 93
Fix zooming too fast with trackpad #132
base: master
Are you sure you want to change the base?
Conversation
Hi! Thanks for the pull request. Is the We've been working on extracting all the reusable logic around Three.js from |
Interesting. To give you an order of magnitude, in one scroll on a mouse the orthographic scale is changed 4 times, with the trackpad it changes 30-40 times. Tweaking the What's the best way for me to try the new common plugin architecture? From what I see, it's not using the |
I'd rather we find a clean way to disable / ignore that inertia that do a somewhat arbitrary throttle.
Hmm I'm not sure we currently have any released plugin that use it? cc @bilou84. We've been toying with a pure THREE.js system that will use it but nothing ready yet (and probably won't be for a while). It probably has the same issue with inertia though. |
You're correct, the OSX trackpad has inertia (generates a few more 0 delta events at the end of the scroll) but also generates more events from a single gesture. I appreciate the throttle is not exactly the "cleanest" way to achieve this, but it seems quite common (along with debouncing): jquery/jquery-mousewheel#36 There are a few more workarounds in that thread talking about normalising the delta (which Input already does) and limiting the total "sum" of deltas. It all seems fairly clunky to be fair but if any of these solutions appeal more to you, I'm happy to take a look and implement another. Let me know! |
Ok finally got around to test this. On Windows it makes scrolling very slow sadly. I wish I could test on Mac correctly but I don't have a trackpad or magic mouse so it works fine with my regular mouse IIRC. |
Throttle the changeOrthograpghicScale call so it executes less often. Handle the 0 case for detail and scroll delta on the trackpad.