Ich versuche, ein Bild basierend auf HTML5 DeviceOrientation Ereignis zu neigen. Ich sehe jedoch, dass das Ereignis kontinuierlich ausgelöst wird, selbst wenn das Gerät stabil ist, d. H. Nicht rotierend/nicht bewegend. Im folgenden Codefragment wird das Konsolenprotokoll fortlaufend gedruckt. Was ist der mögliche Grund, wie kann ich es stoppen?So vermeiden Sie das kontinuierliche Auslösen von HTML5 DeviceOrientationEvent
habe ich versucht, sowohl die Erfassung und sprudelnde,
if (window.DeviceOrientationEvent) {
window.addEventListener('deviceorientation', function(eventData) {
var tiltLR = eventData.gamma;
console.log("tiltLR..........",tiltLR);
}, false);
}