DeviceOrientationEvent
DeviceOrientationEvent is a browser event used to report the physical orientation of a device relative to the Earth's coordinate frame. It is part of the Device Orientation API and is typically delivered to a page via event listeners on the window object. Applications include motion-based controls, augmented reality, navigation, and games that respond to how the device is tilted or rotated.
The event exposes several properties. Alpha represents rotation around the z-axis and ranges from 0 to 360
Usage typically involves adding a listener, such as window.addEventListener('deviceorientation', handler), where the handler receives an event
Support and considerations vary by platform and permissions. The API is more commonly available on mobile devices