Skip to content

jaz303/raf-q

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

raf-q

Enqueue operations for later processing in a requestAnimationFrame() callback.

Installation

npm/browserify

Get it:

npm install --save raf-q

Require it:

var rafq = require('raf-q');

UMD

Copy and paste either build/dom-q.js or build/dom-q.min.js into your project.

API

var q = rafq(exec)

Create a queue with given executor function exec.

q.push(op)

Enqueue operation op for processing. Each time the queue is drained the executor function passed to the constructor will be invoked sequentially, receiving each queued operation as parameter.

q.after(cb)

Enqueue callback function cb to be called during the next processing batch, once all other operations in the queue have been applied.

Copyright & License

© 2014 Jason Frame [ @jaz303 / jason@onehackoranother.com ]

Released under the ISC license.

About

Enqueue operations for later processing in a requestAnimationFrame() callback

Resources

Stars

Watchers

Forks

Packages

No packages published