Skip to content

Request Animation Frame throttle with leading and trailing edge option.

Notifications You must be signed in to change notification settings

AbhilashSrivastava/raf-throttle-edge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

raf-throttle (with edge selection option)

Use throttle with requestAnimationFrame with the options of frame selection (either leading edge or trailing edge.)

Lets you create a throttled function, which only invokes the passed function at most once per animation frame on a browser or per 1000/60 ms on Node. Additionally, the arguments to the function call can be controlled (Leading or Trailing by passing as argument to the throttle function along with the callback function)

Demo Work in progress.

Usage

Contributing

  • ⇄ Pull requests and ★ Stars are always welcome.
  • For bugs and feature requests, please create an issue.
  • Pull requests must be accompanied by passing automated tests ($ npm test).

About

Request Animation Frame throttle with leading and trailing edge option.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published