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.
https://nectar.website/demo/web-apis/device-orientation/arrow-up-right
You can refer to the code present in /partials/web-apis/device-orientation.html file and use it accordingly.
/partials/web-apis/device-orientation.html
https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEventarrow-up-right
Last updated 3 years ago