19 lines
609 B
HTML
19 lines
609 B
HTML
---
|
||
layout: example.html
|
||
title: Device Orientation
|
||
shortdesc: Listen to DeviceOrientation events.
|
||
docs: >
|
||
This example shows how to track changes in device orientation.
|
||
[gyronorm.js](https://github.com/dorukeker/gyronorm.js) library is used to access and
|
||
normalize the events from the browser.
|
||
tags: "device, orientation, gyronorm"
|
||
resources:
|
||
- https://cdn.rawgit.com/dorukeker/gyronorm.js/v2.0.6/dist/gyronorm.complete.min.js
|
||
---
|
||
<div id="map" class="map"></div>
|
||
<p>
|
||
<div>α : <code id="alpha"></code></div>
|
||
<div>β : <code id="beta"></code></div>
|
||
<div>γ : <code id="gamma"></code></div>
|
||
</p>
|