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) 🤔
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