Fix global access to requestAnimationFrame.
Add speed control (fps).