Device Orientation API
Overview
Device Orientation API allows web apps to access the gyroscope and compass data in order to determine the static orientation of the user's device in all the three dimensions.
Demo
https://nectar.website/demo/web-apis/device-orientation/
Usage
You can refer to the code present in /partials/web-apis/device-orientation.html
file and use it accordingly.
Reference
https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent
Last updated