Created
April 5, 2017 07:33
-
-
Save etoxin/85fad56af1670d1dad6a21d68a3d189b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.addEventListener("deviceorientation", function (e) { | |
var all = document.querySelectorAll('*'); | |
for(var i = 0;i < all.length;i++) { | |
all[i].style.transform = 'rotateX('+e.alpha+'deg) rotateY('+e.gamma+'deg) rotateX('+e.beta+'deg)'; | |
} | |
}, true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment