SpriterMC is a Starling implementation for importing skeletal (and non-skeletal) animations generated with Spriter, complete with a familiar API mimicking Starling MovieClip. It currently supports all features of the Spriter file format (version a4.1), with future support planned for any subsequent changes to SCML.
Features
- Friendly and familiar API mimicking the Starling MovieClip
- Generates a SpriterMC from a provided SCML filepath (all loading is handled for you)
- Effortlessly create multiple instances of existing SpriterMCs with little to no additional memory or processing
- Accepts a preloaded TextureAtlas or creates one for you from individual assets referenced in the SCML file
- New: Display underlying bone structure (for debugging)
- New: Add sounds and callbacks to specific frames
- Framerate-irrelevant playback features ability to play and adjust your SpriterMC's playbackSpeed in real time, even reversing play direction altogether
- Switch between Animations in the SpriterMC effortlessly
- Switch out TexturePacks at runtime to completely change the graphics used
Simple Example
The simplest usage is as follows: it loads your SpriterMC's individual assets, convert them into a TextureAtlas,
and plays the SpriterMC as soon as it is fully loaded. Any calls made on a SpriterMC before it is fully loaded
will be queued and processed once it is ready:
However, the best solution is to pass a preloaded TextureAtlas. This example also shows how you can add a callback to wait until the SpriterMC is fully loaded:
From there, it becomes incredibly easy and efficient to create multiple instances of your SpriterMC: