frp-tick

will return an Event. The event will fire when requestAnimationFrame evaluates. The event will return the difference in milliseconds since the last call.

Showing:

Popularity

Downloads/wk

6

GitHub Stars

2

Maintenance

Last Commit

7yrs ago

Contributors

0

Package

Dependencies

4

Size (min+gzip)

1.4KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

frp-tick

experimental

A function which will return an Event. The event will fire when requestAnimationFrame evaluates. The event will return the difference in milliseconds since the last call.

Usage

NPM

Example

var tick = require( 'frp-tick' );

var event = tick(); // created a new requestAnimation loop

event.watch( function( elapsed ) {
    
    console.log( elapsed );
});

tick.stop( event ); // this will stop the Event from firing
tick.start( event ); // this will start it up again 
tick.kill( event ); // this will stop the raf loop and clear all memory associated

License

MIT, see LICENSE.md for details.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100