node-x11/examples/asteroids/orientation.html
Andrey Sidorov de9e1538ff new examples
2011-12-15 18:05:59 +11:00

30 lines
996 B
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1.0; maximum-scale=1.0; user-scalable=no" />
<script type="text/javascript">
window.addEventListener('deviceorientation', function(event){
//console.log(angles);
xmlhttp=new XMLHttpRequest();
xmlhttp.open("GET","orientation_" + event.alpha + "_" + event.gamma + "_" + event.beta, true);
//xmlhttp.open("GET","orientation_", true);
xmlhttp.send();
}, true);
</script>
</head>
<body>
<div class="head">
<a href="index.html">« Back</a>
<b>Mobile Power! by @cpojer.</b> <a href="http://github.com/cpojer">GitHub</a> <a href="http://twitter.com/cpojer">Twitter</a>
</div>
<div class="container">
<div id="box1" class="box">
Orientation!
</div>
</div>
</body>
</html>