-
Notifications
You must be signed in to change notification settings - Fork 22
0. Including Grafar.
I'm a great fan of pluralism, so I offer you three ways to get hold of the library:
- Classic: head to github.com/thoughtspile/Grafar and download the library in your preferred way.
- Lazy: download grafar-master.zip.
- CDN-ish: paste
<script src="http://cdn.rawgit.com/thoughtspile/Grafar/master/loader.js"></script>
into the HTML file where you intend to use Grafar.
If you choose not to use the CDN, you would have to cope with the cosequences of my concatenation fear, at least for now (I know it's a pain). Throw the library files into your project directory, like this:
projectDirectory/
libs/
grafar/
grafaryaz/
loader.js
<your files here>
Since I never took the time to build the library, it is somewhat tricky to
include into your html. I would recommend referencing the loader.js
file.
It uses LABjs library to download all the project files in the right order
and run your code (passed in a callback function) once the files are loaded.
So, you'd probably want something like this:
<script type="text/javascript" src="js/loader.js"></script>
<script type="text/javascript">
runGrafar(function() { ... some code here ... });
</script>
Of course, you are very welcome to mess it all up! Just remember, the order
matters. By the way, take a look at the demos in the examples
folder --
they do cover the basic usage quite well. Please refer to the example grafar_basic_usage.html
.