Skip to content
This repository has been archived by the owner on May 25, 2021. It is now read-only.
/ raf-queue Public archive
forked from anthonyshort/raf-queue

Batch jobs to fire in the next frame using requestAnimationFrame.

Notifications You must be signed in to change notification settings

pilotcreative/raf-queue

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

raf-queue

Batch jobs to fire in the next frame using requestAnimationFrame.

Installation

with component:

component install pilotcreative/raf-queue

with browserify and friends:

npm install raf-queue

Usage

var frame = require('raf-queue');

// Add jobs to the job, returns an id
var job = frame.add(increment);

// Remove jobs from the queue
frame.remove(job);

// Fires after the jobs from the next frame are done
frame.defer(function(){
  console.log('job done!');
});

About

Batch jobs to fire in the next frame using requestAnimationFrame.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 96.3%
  • CSS 3.2%
  • Other 0.5%