I'm using the plugin Vanilla-tilt.js and on desktop it works great. On mobile the tilt effect responds to the device orientation which is great, but when the user taps somewhere on their device it makes the tilt areas jerk towards where the tap was then return to their original position. I'm using Chrome on Android, feel free to try it yourself with the link above.
I'd like to keep the gyroscope effect on mobile but disable user taps from affecting the tile position. I'm using the inline configuration, here's an example:
<div data-tilt data-tilt-full-page-listening data-tilt-reset="false">Tilt object goes here</div>
My first thought is to download the vanilla-tilt.js source code and modify it so it only looks for mouse events if the screen is a certain width. I don't mind switching to the jQuery version, Tilt.js if that makes this easier.
from Disable mouse movement for Vanilla-tilt.js but keep gyroscope effect
No comments:
Post a Comment