A JavaScript library for creating frame-based animations
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
compiler
example
third-party
.gitignore
README.md
jsFrames.js
jsFrames.min.js

README.md

jsFrames

A JavaScript library for creating frame-based animations.

Example usage:

Register any functions to be called on each frame. The functions accept a single parameter for the timestamp of the current frame.

jsFrames.registerAnimation(function (thisFrameTimestamp) {
    // Get the position of your animated items based on thisFrameTimestamp
    // Draw the frame...
});

(Optionally), subscribe to get frames per second updates.

jsFrames.onFpsUpdate(function (fps) {
    // Display frames per second
});

Start the animation.

jsFrames.start();

See the project pages for more details.