aframe-orbit-controls-component
aframe-orbit-controls-component copied to clipboard
pointerevents for touch devices
@tizzle - I've been using a touchscreen laptop recently and touch events on the screen need to be handled differently. I think the correct way is to set the CSS attribute touchAction=none on the Aframe canvas (so that the canvas el doesn't use the OS-defined touch gestures) then change the listeners from mousedown, mouseup to pointerdown, pointerup.
This can all be wrapped in if (window.PointerEvent)
for backwards compatibility, though basically all current browsers support pointer events.
I have this as a lower-priority item to do. Just wanted to flag it here.
@morandd,
can you give me some background what machine, what OS and browser you are using? On top: What where the problems you are experiencing with the current implementation? I'm on a MacBook Pro and i never ran into any issues...
Edit: Ignore that last bit, didn't see you wrote touchscreen :)
Cheers,
Till
Yeah I think this only covers the use case of touch interaction on touch laptops. And maybe some tablets. I'm using a surface.
Ok, i hope i can somehow get hands on one of those.
I tested on iPhone and iPad where the current touch implementation works well. But it might be different on touch "laptops" or other tablets.
Cheers
for ref: https://www.davrous.com/2015/08/10/unifying-touch-and-mouse-how-pointer-events-will-make-cross-browsers-touch-support-easy/ https://patrickhlauke.github.io/touch/tests/event-listener.html