Battery animation uses a png sequence to show animations.

The names must be formatted like this.

anim0000.png

I recommend 46 images for a smooth animation but there is no limit. 

There is an options.json to help position the animation and provide options such as duration.

{
    "width": "150", //float value for width
    "height": "150", //float value for height
    "x": "center", //can be float, center, or right
    "y": "bottom", //can be float, center, or bottom
    "yOffsetFromBottom": "20", //if y is set to bottom this will offset it from the bottom
    "xOffsetFromRight": "0", //if x is set to right, this will offset it from the right
    "animationDuration": "2" //total duration of animation
}