Skip to content

Experience-Monks/frp-tick

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published