The FlexBook demo is awesome!
HN user
bp74
Author of the StageXL for Dart library. https://github.com/bp74/StageXL
To be clear, those added functionality is not a plugin in the sense of that you need to install it. They are just libraries that are compiled to JavaScript. In the end you just need a browser that supports HTML5.
wow that is strange, thanks for telling me. The file should load without a problem!
Indeed it is fast :) And yes, many AS3 developers are missing the capabilities of Flash. Therefore we built StageXL on top of Dart to have a similar developer experience.
Yes absolutely! We started with a port of the AS3 runtime for DragonBones but were not happy with the code quality and the performance. Therefore we started the StageXL runtime for DrageonBones from scratch. The downside is that the new runtime does not support one or two of the features of the official runtimes. But animations like the one you showed in your example are completely covered. If you need something that is missing, just talk to us here: https://github.com/bp74/StageXL_DragonBones
Edit: Animation run at 60fps and look smooth because those animations are using bones and key frames. The runtime interpolates the motion of those bones between the keyframes.
Awesome, thanks for the feedback!
Yes it is. Google uses it internally with Angular Dart (a version of Angular made especially for Dart). And the Flutter project looks very interesting to built native mobile apps with Dart (instead of Java for example).
Sorry i missed your second question. I would choose StageXL over PixiJS because auf the Dart language. I also use TypeScript for other project but i prefer Dart. The Dart-to-JavaScript compiler does an awesome job. It not only transpiles Dart code to JavaScript (like the TypeScript compiler does for TypeScript) but it's a real compiler with great optimization and minification. The optimizations include inlining, dead code removal, hoisting, etc. The resulting JavaScript code is not pretty to look at, but pretty damned fast at runtime.
Unfortunately no, but i'm not aware of any major feature that is not supported in comparision to Pixi.js. If you find something missing in StageXL i'm happy to receive a feature request :)
StageXL does also use WebGL with a fallback to Canvas. Fortunately, most browsers supports WebGL nowadays.
Yes, CreateJS was one of the first libraries providing a Flash display list in HTML5. But CreateJS uses the Canvas2D api and a very limited WebGL implementation. StageXL provides much more features with full WebGL support.
You can try more examples here:
http://www.stagexl.org/samples/
And you can look at some source code examples here:
https://github.com/bp74/StageXL_Samples
And StageXL also supports runtimes for Spine, Dragenbones, Flump, ...:
https://github.com/bp74/StageXL_Spine
https://github.com/bp74/StageXL_DragonBones
There is also an updated version of this benchmark: http://www.stagexl.org/example/benchmark/bunny_mark/
hahaha, i totally agree - if it is 50x larger i would use a different tool too :) But as i said, if your source is 100KB it's not 50x larger, maybe it's 20% larger than hand written JS. Currently the footprint of the js-code is around 150KB. While dart2js is evolving this number is declining constantly. In the end when you add js-minification you will have a footprint of maybe 20-30KB i guess.
You are right that small programs compile to pretty big JS-files, but noone should really care. I can do my "hello world" apps in javascript without a problem, the point of Dart is to write big apps! For those apps the footprint of the compiled JS-code doesn't matter at all. And you can work with nice structured source code.
Well, you should see it from another point of view. You write and debug(!) your application in Dart, later you compile it to JavaScript. The dart2js team tries very hard to generate code that runs just like the Dart code does in the VM. Look at the JS-code like the binary code you get from a c++ compiler. There are hardly any people debuging the generated machine code in c++ right?
I have allready written tons of Dart code, and i have to admit there were a few issues with the JS-code regarding cross browser compatibilty (btw. it is easy to read the generated js-code). Those issues were problems in the dart2js compiler because it's a alpha-version right now. The dart2js team fixed all those bugs. As soon as the compiler will finally ship we will rely on the generated output - no need to debug "assembly language".
Thanks for sharing the link! I'm the author of the library and the demos. It's great to see some positive feedback. You can also check out some samples (i like the mask sample most):
Samples: http://www.dartflash.com
Source: https://github.com/bp74/dartflash/tree/master/samples
Some words about the Dart language. It's great to work with this new langauge and much more fun compared to javascript which is a pain when you come from the ActionScript/Java/C# world. In Dart you feel at home right from the start. Google is very much committed to the project and we will see pretty amazing things in the future. Of course the Chrome browser (Desktop and Android) will support the Dart VM in the future. The dart2js compiler allready works great and has improved a lot over the last weeks.