Flump converts Flash keyframe animations into texture atlases and JSON that can easily be used with the StageXL library. The advantage over sprite sheet animations is the much smaller download size and memory consumption. The demo below shows the texture atlas generated by Flump and four different character animations built with Flash Professional.
Visit the Flump homepage for more information: Flump Homepagelibrary demo; import 'dart:math'; import 'dart:html' as html; import 'package:stagexl/stagexl.dart'; import 'package:stagexl_flump/stagexl_flump.dart'; part 'flump_demo.dart'; Stage stage = new Stage(html.querySelector('#stage'), webGL: true); RenderLoop renderLoop = new RenderLoop(); ResourceManager resourceManager = new ResourceManager(); void main() { renderLoop.addStage(stage); resourceManager ..addCustomObject('flump', FlumpLibrary.load('images/flumpLibrary.json')) resourceManager.load() .then((_) => stage.addChild(new FlumpDemo())) .catchError((e) => print(e)); }
part of demo; class FlumpDemo extends DisplayObjectContainer { FlumpDemo() { var flumpLibrary = resourceManager.getCustomObject('flump') as FlumpLibrary; var juggler = stage.juggler; var idle = new FlumpMovie(flumpLibrary, 'idle'); idle.x = 450; idle.y = 150; addChild(idle); juggler.add(idle); var walk = new FlumpMovie(flumpLibrary, 'walk'); walk.x = 150; walk.y = 200; addChild(walk); juggler.add(walk); var attack = new FlumpMovie(flumpLibrary, 'attack'); attack.x = 750; attack.y = 300; addChild(attack); juggler.add(attack); var defeat = new FlumpMovie(flumpLibrary, 'defeat'); defeat.x = 350; defeat.y = 400; addChild(defeat); juggler.add(defeat); } }