This is a plugin that makes it possible to use Spriter animation data to defined animations with ImpactJS. It's based on Flyover Games LLC, Jason Andersen and Isaac Burns work on Spriter.js that's located on github here: https://github.com/flyover/spriter.js
- ImpactJS. It was developed using 1.22, but I'm sure it will work with most versions.
Demo is now updated with new spriter animation implementation.
How to use it
- Put all files inside "plugins" folder to
- Create a new entity and add
- Add a property to the entity:
spriterAnimSheet: new ig.SpriterAnimationSheet('media/your_spriter_folder/your_spriter_anim.scml', 64, 64, false),
- Play animation using:
- Have fun...
For more information, just check the source code of demo. I write lots of comments, hope you will not feel sickness :P
Known Issues / Future improvements
- Preloading of images doesn't work yet, the game starts without downloading images first. TODO.
- Automatically find culling hitbox for the animations.
Fix "duration" parameter to something that works as intended.
- Draw images using Impacts image class. Now it's only used for loading and storing data.
Incorporating spiter.js and xml2json.js as impact modules, so you don't have to load them in your index.html.
- Animations that do not loop doesn't work yet.
- Add more features of spriter.js.