diff --git a/website/canvas/event-propagators-with-device-gravity.html b/website/canvas/event-propagators-with-device-gravity.html index e7dc5f7..03386a2 100644 --- a/website/canvas/event-propagators-with-device-gravity.html +++ b/website/canvas/event-propagators-with-device-gravity.html @@ -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();