Kinesim/vendor/threex/examples/THREEx.DeviceOrientationState.html

19 lines
643 B
HTML
Raw Normal View History

2024-10-03 06:42:49 +05:30
<html>
<body>
angleX: <span id="angleX"></span><br/>
angleY: <span id="angleY"></span><br/>
angleZ: <span id="angleZ"></span><br/>
<script src="../THREEx.DeviceOrientationState.js"></script>
<script>
var deviceOrientation = new THREEx.DeviceOrientationState();
var elementX = document.getElementById('angleX');
var elementY = document.getElementById('angleY');
var elementZ = document.getElementById('angleZ');
setInterval(function(){
elementX.innerHTML = deviceOrientation.angleX();
elementY.innerHTML = deviceOrientation.angleY();
elementZ.innerHTML = deviceOrientation.angleZ();
}, 100);
</script>
</body>
</html>