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

Provide scroll as alternative to gyro

Open andreasvirkus opened this issue 5 years ago • 1 comments
trafficstars

Because browser vendors now expose the device's orientation only when the user has granted permission (and I'm not sure but I think - like with other APIs - you can only ask permissions based on a user-initiated action, like a click listener?) then could we maybe have the option to tilt based on a scroll position?

I'd imagine this to be useful for marketing/landing pages, where you'd want a tilt effect on mobile devices, but can't presume a user to click anything before (so we'd have access to the rotation events) 🤔

Related: https://github.com/w3c/deviceorientation/issues/57

andreasvirkus avatar Dec 07 '19 12:12 andreasvirkus

I've just refresh this on my Android in Chrome and it worked ok. I didn't have time to document on the subject lately.

micku7zu avatar Apr 30 '20 23:04 micku7zu