An easy-to-use AngularJS directive for creating simple sprite animations.
- Install angular-simple-sprite with Bower
- Include the required libraries in your
- Inject the
simple-spritemodule into your app:
- Implement the
simple-spritedirective in your HTML:
Be sure to check the example folder if you'd like to see
simple-sprite in action.
src- The path to your sprite image.
frame-width- The width of a single frame in your sprite.
frame-height- The height of a single frame in your sprite.
frames- The total number of frames in your sprite.
frames-per-row- Optional The number of frames on each row in your sprite, for example if your frames are arranged
4. A fully vertical sprite would have a
1, and a fully horizonal sprite would have a
0. Defaults to
repeat- Optional Determines whether or not the sprite animation should repeat. Defaults to
speed- Optional The speed between each frame in milliseconds. Defaults to