sprite.js

0.0.1 • Public • Published

sprite.js

sprite.js is a small JavaScript library for simple but powerful sprite based animations. It takes an element, and changes the background position to create an animation effect.

build status dependencies status devDependency status

Performance

sprite.js is chained to the requestAnimationFrame (with a polyfill for older browsers) and optimized for speed and garbage collection. What sprite.js does, cannot be done faster. That being said, animating the element background is not the fastest possible way how to do this kind of animations (canvas solutions are faster), but it is sure as hell the most simple one, and compatible with everything from IE6 and up.

Dependencies

sprite.js has no dependencies.

Compatibility

Works everywhere.

Documentation

Documentation is centralized in the gh-page, which makes it way easier to maintain and keep always up to date. Only available in Portuguese yet, but there is an of examples collection available here.

How to install sprite.js in your project

bower install --save-dev sprite=adriancmiranda/sprite.js

How to build your own sprite.js

Clone a copy of the main sprite.js git repo by running:

git clone git@github.com:adriancmiranda/sprite.js.git && cd sprite.js

Run the build script:

npm run build

The built version of sprite.js will be put in the dist/ subdirectory, along with the minified copy and associated map file.

License

MIT

Package Sidebar

Install

npm i sprite.js

Weekly Downloads

4

Version

0.0.1

License

MIT

Last publish

Collaborators

  • adriancmiranda