of nodes and edges

Experimenting Jangaroo with SiGMa

I just tried Jangaroo to obtain quickly a Flash-less version of SiGMa.

How to compile SiGMa-core with Jangaroo

  1. Install JDK
  2. Install Maven 3
  3. Follow the Jangaroo tutorial to become familiar with it (eventually get more familiar with Jangaroo)
  4. Clone SiGMa-core repository and copy SiGMa-core/src/com/ into src/main/joo/
  5. Create a file Main.as inside src/main/joo/ and write your code
  6. Create a file index.html inside src/main/webapp/ and write your HTML file

My use example

I started back from the most basic example at SiGMa-core README page, modified the code to create a random graph of N nodes and M edges, and then started the ForceAtlas 2 algorithm.

Here is the src/main/joo/Main.as file:

Result

And here is the result:

I did not go further than this simple example. Jangaroo is still missing some classes and features (especially about the TextFields management, Vectors, etc…), but there is a lot of interesting things about it:

  • Most classes from the AS3 ‘flash’ package are already implemented
  • The transformation seems pretty smart (the TextFields are transformed into span tags, the Graphics are transformed into canvas tags)
  • The generated JavaScript sources look pretty readable
  • The whole project is open-source (Apache license), and seems to be actively maintained

So, since the strong/weak spots are not the same with Flash compilation and Jangaroo compilation, and since the TextFields are not supported as well with both technologies, I do not think that Jangaroo is the best solution to port AS3 sources to JS without trouble.

But still, it looks pretty great, the examples work really well, and Jangaroo might be a really good and promising answer to develop Flash-less Web applications without having to throw your whole AS3 sources away.


blog comments powered by Disqus
GitHub | Twitter | RSS | Atom