Getting Started
Getting started is relatively simple. First, create an AnimalScript file using
Animal. Once you have a .asu
file,
create a new HTML file with the following structure.
<!doctype html> <html> <head> <title>ASU Import</title> <link rel="stylesheet" href="lib/JSAV.css" /> </head> <body> <div id="asucontainer"> <-- Here the animation will be added --> <div class="jsavcounter"></div> <div class="jsavcontrols"></div> </div> <script src="lib/jquery.min.js"></script> <script src="lib/jquery-ui.min.js"></script> <script src="lib/jquery.transform.light.js"></script> <script src="lib/raphael.js"></script> <script src="lib/JSAV-min.js"></script> <script src="jsav-asu-import.js"></script> <script> var av = new JSAV("asucontainer"); av.importAsu("your-asu-file.asu"); </script> </body> </html>
Just make sure you replace your-asu-file.asu
with the location of
your .asu
file. Also, ensure that the referenced JavaScript and CSS filepaths
are correct.
Warning
This thing is still very much beta, so it doesn't support all AnimalScript features.
AnimalScript turned out to be more complex than expected :) Furthermore, it most
probably won't even parse all .asu
files. If you encounter things that don't work,
please create an
issue.
Also, it's been a while since I took my compilers course, so if you look at the parser code and something seems stupid, it very likely is due to my limited parser writing experience.
Online Examples
To get a quick look at what the result looks like, you can take a look at these examples: