vanilla-tilt.js icon indicating copy to clipboard operation
vanilla-tilt.js copied to clipboard

Animation jitter with mouse and element continues to update even when mouse is not over element.

Open mattpr opened this issue 5 years ago • 1 comments

See video demo of Vanilla-tilt.js vs Tilt.js: https://www.youtube.com/watch?v=qAQvQzDM9xc

The animation of the tilt is really not smooth and "stutters" in certain mouseover positions. The original Tilt.js doesn't seem to have this issue.

Also it appears that Vanilla-tilt.js is updating the tilt element styles even when the mouse is no longer over the tilt element which obviously leads to weird continuous animations and performance penalty when the user isn't interacting with the tilt element. You can see this in the browser dev tools (style property on tilt element updating even when mouse is away from element).

Macbook pro (Mojave) running chrome 85.

Perhaps this is related to the other ticket about gyroscope issues? I am on a laptop so I wouldn't expect gyroscope to come into play.

image

mattpr avatar Sep 08 '20 11:09 mattpr

Disabling the gyroscope appears to have solved both issues. So I suspect there is a bug where Vanilla-tilt.js is updating based on an event firing related to getting the latest gyroscope measurement even though there is no gyroscope.

mattpr avatar Sep 08 '20 11:09 mattpr