Skip to content

matgorka/fl60.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fl60.js

Very tiny library to make a 60 framelimit.

How to use

fl60(frameFn) -> undefined

Executed once per program - next executions don't have any effect. Sets frameFn as a callback function that will be executed for each frame - 60 times per second. Starts the loop.

getFPS() -> number

Returns current FPS: a value between 0 and 60. If fl60 was never called returns NaN instead.

Implementation

fl60 uses setTimeout under the hood.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published