{"id":434,"date":"2015-03-23T23:44:54","date_gmt":"2015-03-23T22:44:54","guid":{"rendered":"http:\/\/www.vd4y.de\/?page_id=434"},"modified":"2018-06-11T11:48:40","modified_gmt":"2018-06-11T09:48:40","slug":"gyrotest3","status":"publish","type":"page","link":"http:\/\/www.vd4y.de\/index.php\/meintest\/gyrotest3\/","title":{"rendered":"GyroTest3"},"content":{"rendered":"<p><script type=\"text\/javascript\" src=\"https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/1.4.4\/jquery.min.js\"><\/script><br \/>\nFunktioniert auf iPad und iPhone.<\/p>\n<div id=\"feld\" style=\"position:relative; width:200px; height:300px; background:green\">\n<div id=\"pendel\" style=\"position:absolute; width:20px; height:20px; background:red; border-radius:100%\">\n<\/div>\n<\/div>\n<p><script type=\"text\/javascript\">\/\/ < ![CDATA[\nvar feld = document.getElementById(\"feld\");\nvar pendel = document.getElementById(\"pendel\");\nvar maxW = feld.clientWidth - pendel.clientWidth;\nvar maxH = feld.clientHeight - pendel.clientHeight;\n$(document).ready(function() {\nwindow.ondeviceorientation = function(event) {\nvar alpha = Math.round(event.alpha);\nvar beta = Math.round(event.beta);\nvar gamma = Math.round(event.gamma);\nvar x = event.beta%90;\nvar y = event.gamma;\nx += 90;\ny += 90;\npendel.style.left = (maxW*y\/180 - pendel.clientWidth\/2) + \"px\";\npendel.style.top  = (maxH*x\/180 - pendel.clientHeight\/2) + \"px\";\n}\n});\n\/\/ ]]><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Funktioniert auf iPad und iPhone.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":388,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"http:\/\/www.vd4y.de\/index.php\/wp-json\/wp\/v2\/pages\/434"}],"collection":[{"href":"http:\/\/www.vd4y.de\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.vd4y.de\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.vd4y.de\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.vd4y.de\/index.php\/wp-json\/wp\/v2\/comments?post=434"}],"version-history":[{"count":34,"href":"http:\/\/www.vd4y.de\/index.php\/wp-json\/wp\/v2\/pages\/434\/revisions"}],"predecessor-version":[{"id":469,"href":"http:\/\/www.vd4y.de\/index.php\/wp-json\/wp\/v2\/pages\/434\/revisions\/469"}],"up":[{"embeddable":true,"href":"http:\/\/www.vd4y.de\/index.php\/wp-json\/wp\/v2\/pages\/388"}],"wp:attachment":[{"href":"http:\/\/www.vd4y.de\/index.php\/wp-json\/wp\/v2\/media?parent=434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}