Skip to content

0. Including Grafar.

Vladimir Klepov edited this page Aug 31, 2014 · 1 revision

This is all lies!

I'm a great fan of pluralism, so I offer you three ways to get hold of the library:

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.

Clone this wiki locally