类似下面的代码中,触发 devicemotion, 系统触发的频次是怎样的? 最低多少毫秒触发一次呢?
if(window.DeviceMotionEvent) {
var speed = 20;
var x = y = z = lastX = lastY = lastZ = 0;
window.addEventListener('devicemotion', function(){
var acceleration =event.accelerationIncludingGravity;
1
xiaoyanbot OP |
2
xiaoyanbot OP |