universal-tilt-js / universal-tilt.js

🎆 Parallax tilt effect library
https://universal-tilt-js.github.io/universal-tilt.js/
MIT License
134 stars 14 forks source link

Allow interaction in gyroscope mode on touch devices. #154

Open Smashr opened 1 year ago

Smashr commented 1 year ago

It would be awesome if the tilt would also respond to touchstart and touchmove events by tilting when moving the finger over the element or tapping it and then restore back to the gyro position once the finger is lifted.

Basically allow an override of the position if the element is being touched while in gyro mode.

Smashr commented 1 year ago

While being touched the object should ideally behave in the same way as it does while hovering with a mouse.

Smashr commented 1 year ago

Also, add an option to prevent page scroll on 'touchmove' on the object.