davidfig / pixi-viewport

A highly configurable viewport/2D camera designed to work with pixi.js
https://davidfig.github.io/pixi-viewport/
MIT License
1.04k stars 174 forks source link

Is there any way to distinguish touchpad wheelEvent from mouse wheelEvent? #460

Open RhapsodY-69 opened 1 year ago

RhapsodY-69 commented 1 year ago

I have 'wheel' event handler on pixi-viewport, but I need to know exactly what is user scrolling with, mouse wheel or touchpad. I tried many different solutions from stackoverflow and etc. But none of them worked for me. I will be very grateful if you could help somehow!

davidfig commented 1 year ago

There's not a great way to do this. I have had luck with this one: https://stackoverflow.com/a/62415754

RhapsodY-69 commented 1 year ago

Thank you. I have one more question: wheelDeltaY is undefined in event object in wheel event handler. What can I do with it?