|
@@ -37,6 +37,7 @@ const dou = ref(0);
|
|
|
window.addEventListener(
|
|
|
"devicemotion",
|
|
|
event => {
|
|
|
+ if (dou.value < 1) return;
|
|
|
var acceleration = event.accelerationIncludingGravity;
|
|
|
let px = Math.pow(acceleration.x, 2) >= 100;
|
|
|
let py = Math.pow(acceleration.y, 2) >= 100;
|