Kinesim/vendor/threex/examples/THREEx.DeviceOrientationState.html
Amit Kumar Nandi c51788eb87 Forgejo Up
2024-10-03 06:46:07 +05:30

19 lines
No EOL
643 B
HTML

<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>