A JavaScript implementation of requestAnimationFrame
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This is a requestAnimationFrame implementation in JavaScript.

What is requestAnimationFrame?

If you don't know what requestAnimationFrame is, you can see the latest draft of the spec. It's a browser API for script-based animation. It allows the browser to control the frame rate in order to make the animation smooth while saving computation power so you don't have to worry about that.

How to use it?

var animationHandle;

function startAnimation() {

function stopAnimation() {

function drawAnimationFrame() {
    /* draw your animation frame here */
    animationHandle = window.requestAnimationFrame(drawAnimationFrame);