SVG Canvas rendering

9th January 2014

There will come a point where you want to convert your SVG into renderable components in the canvas for use in games or to animate. You can export vector images to SVG from Illustrator and then once they are in that format, load them up via Ajax, parse the XML and convert them to Javascript objects. Once they are in Javascript objects you can do what you like with them.

Live Demo

The demonstration below shows the loading of an SVG image I created in Illustrator and exported to SVG. The path points are highlighted and you can drag them around:

Make a comment

Contribute to this article and have your say.