If you ever wanted to use svg as a level editor for your HTML5 games.. here is the basic code you can use. Obviously you have to make sure that your svg file is using only rects instead of any other type if you want to use this code as is.. But its' a good basic start for getting you started. I've used the color of the rects in svg to determine how it behaves in game.. you could offload it to the editor (i.e inkscape in my case) to add properties to the rects which can be read and used to determine properties. $.get("drawing.svg", function(res){ //loading the data from an svg file. blocks = []; user = null; ball = null; var $layer = $(res).find('g').first(); ...
Some Random Stuff i work on.. apart from my job.