-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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: Implement Pointer Events. #20161
Conversation
/cc @WestLangley |
Related issue: #4015 The difference is really noticeable 😳.
Agreed! It should be |
I've noticed right now that the event data |
At least it the Resizer code doesn't seem to work. |
Yeah, I see it now too. |
Nice! I like this improvement.
For Pointer Events the pattern is different, you'd have to keep track yourself of how many Read more about it here: https://stackoverflow.com/questions/50955861/detect-two-finger-touch-with-pointerevents-on-the-same-target |
When using
mousedown
,mousemove
andmouseup
,event.clientX
andevent.clientY
are integers. In HiDPI (Retina) displays sometimes the cursor moves but the camera doesn't.When using
pointerdown
,pointermove
andpointerup
(supported even in IE11) these properties are floats and manipulating the scene is snappier.You can try the change by dragging the scene very slowly:
http://raw.githack.com/mrdoob/three.js/r119/examples/webgl_animation_cloth.html
http://raw.githack.com/mrdoob/three.js/dev/examples/webgl_animation_cloth.html
@Mugen87 We should definitely implement this in all relevant controls.
We could also use Pointer Events for touch too but we currently rely in
event.touches
which Pointer Events don't have.