#1006 Use requestAnimationFrame instead of setInterval.