lo-th / uil

simple javascript ui
http://lo-th.github.io/uil/
MIT License
555 stars 50 forks source link

Orbit controls now use pointer events instead of mouse events #18

Closed ema2159 closed 3 years ago

ema2159 commented 3 years ago

Hi! I was implementing a 3D GUI with Three.js, but UIL's 3D interface wasn't working properly. After some debugging, I managed to spot the issue. Since some time ago, orbit controls use pointer-events instead of mouse-events, so when clicking and hovering the 3D interface didn't respond. I can submit a PR to fix this but I'd like to know which approach do you consider best. I simply changed all the mouseup mousedown and mousemove event to their respective pointer counterpart, but it would be a good idea to make it configurable, maybe with a function.

What do you think?

lo-th commented 3 years ago

Hi , you mean for mobil device or touch screen yes use pointer-events instead of mouse-event is maybe a good improvement i have some test to do for that. good idea

ema2159 commented 3 years ago

It would be because of this: https://github.com/mrdoob/three.js/issues/20294. Since I already fixed it locally, I can submit a PR as soon as today so you can review it and test it.

lo-th commented 3 years ago

now worry my three demo is old, i will update that.