Firefox developers have announced a new feature for Firefox 3.6 - support for spatial orientation in devices equipped with appropriate sensors.
You can make the whole web page rotate, or implement support for individual objects, so that they will spin independently of each other. For example, this way you can implement control in browser-based web games ( an example of such a game).
As shown in the video ( ogv , mp4 ), coordinates are recognized in three dimensions. When tilting the device forward / backward, the picture in the browser will zoom in / out. ')
Orientation support was originally designed for a mobile browser, but it was decided to include it in conventional Firefox, because some modern laptops are also equipped with such sensors.
The feature is implemented through the API, and to support it, it is enough to add such code.