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

Revert pointer events change for OrbitControls and TrackballControls. #20194

Closed
wants to merge 2 commits into from

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Aug 26, 2020

Fixed #20191.
Fixed #20193.
Fixed #20205.

@arodic
Copy link
Sponsor Contributor

arodic commented Aug 29, 2020

I just want to note that this pointerEvents upgrade also broke all controls when using stylus (event.pointerType === 'pen')

switch ( event.pointerType ) {
   case 'mouse':
       onMouseMove( event );
       break;
}

I completely and overwhelmingly support transition to pointerEvents. It is an amazing API that will solve most of the unnecessary conditionals when dealing with different input devices and it will make the controls much simpler. It enables developers to write code that works with any pointer device, including the future ones.

In my experience, switch ( event.pointerType ) is unnecessary for most use cases - it defeats the purpose of using pointerEvents. You can treat pointer events as input-device-agnostic API. The only special case in my experience is pointer "hover" that cannot be achieved on traditional touch device. If you need a special hover behavior, this too can be achieved without dealing with pointerType.

In other words, switching to pointerEvents is great, but it should be done without dealing with pointerType unless really necessary - which is almost never.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Aug 30, 2020

@mrdoob Since you want to keep the Pointer Events change, I'll close this PR.

@Mugen87 Mugen87 closed this Aug 30, 2020
@WestLangley
Copy link
Collaborator

webgl_multiple_scenes_comparison.html slider is broken.

I think a hot patch to r.120 is appropriate.

@WestLangley
Copy link
Collaborator

It does not appear the hot patch fixed the slider example...

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Aug 30, 2020

Still working on a solution: #20223

@WestLangley
Copy link
Collaborator

Oh, I see. You didn't revert the recent changes to the controls. That would have made it a trivial hot patch...

@mrdoob
Copy link
Owner

mrdoob commented Aug 31, 2020

webgl_multiple_scenes_comparison.html slider is broken.

Should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants