Video:
1 2 3 4 5 6 7 8 | <script language="javascript"> function onOrientation(event) { var rotate = 'rotate(' + event.gamma + 'deg)'; var scale = 'scale(' + ((event.beta/180)*2 + 1) + ')'; document.getElementById('testlogo').style.webkitTransform = rotate + ' ' + scale; } window.addEventListener('deviceorientation', onOrientation); </script> |
The post Chrome deviceorientation event in javascript appeared first on Notes of a Developer.