Spine
dill pixel supports the Spine format for animations. Spine is a 2D skeletal animation tool that allows you to animate 2D characters and objects in a way that is similar to how 3D animations are done. This allows for more complex animations and more efficient use of resources.
Getting Started
To work with Spine in dill pixel you’ll need to enabled dill pixel’s Spine plugin in your game’s configuration via the useSpine
property.
Loading a Spine Animation
1. Include your spine animation in your assets:
Ensure your spine animation is included in your assets folder and you’ve configured your application’s assets for assetpack, (example below):
Directoryassets
Directoryspine{m}
- spineboy-pro.skel
- spineboy-pro.atlas
- spineboy-pro.png
2. Add the spine animation to your scene:
Playing an Animation
To play an animation on the spine object, call .setAnimation
with the animation name, and whether the animation should loop or not: