Encode an animation.
@override List<int>? encodeAnimation(Animation anim) { for (var f in anim) { addFrame(f, duration: f.duration); } return finish(); }