Skip to content

Sprite.js is a small JavaScript library for simple but powerful sprite based animations.

License

Notifications You must be signed in to change notification settings

adriancmiranda/sprite.js

Repository files navigation

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 [email protected]: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.

CDN

Use this URL for dev/testing

<script src="https://rawgit.com/adriancmiranda/sprite.js/master/dist/sprite.min.js"></script>

Use this URL in production

<script src="https://cdn.rawgit.com/adriancmiranda/sprite.js/master/dist/sprite.min.js"></script>

Helpfull

License

MIT

About

Sprite.js is a small JavaScript library for simple but powerful sprite based animations.

Resources

License

Stars

Watchers

Forks

Packages

No packages published