fix raf
This commit is contained in:
parent
da91f5991c
commit
b9b7be2aa4
|
|
@ -77,6 +77,7 @@ rotation: from.x"
|
|||
* 270 -> 3000, 0
|
||||
*/
|
||||
function tick() {
|
||||
requestAnimationFrame(tick);
|
||||
if (orientationEvent === undefined) return;
|
||||
|
||||
window.alpha.textContent = orientationEvent.alpha.toFixed(2);
|
||||
|
|
@ -86,7 +87,6 @@ rotation: from.x"
|
|||
// if (event.alpha) {
|
||||
// // ropes.forEach(rope => { rope.gravity = { x: 0, y: 0} })
|
||||
// }
|
||||
requestAnimationFrame(tick);
|
||||
}
|
||||
|
||||
tick();
|
||||
|
|
|
|||
Loading…
Reference in New Issue