Using Html5 / Javascript Graphics in a Graphics Editor

I got a graphic design that was created using JavaScript / Html5 Canvas.

Take a look here: http://yeda.us/js/logos.js

now, I have to provide the graphic element to the graphic designer in some format that he can work with: in photoshop format or in Illustrator format.

Now, of course, I can take a screenshot and start working from there, but I need this graphics in vector format, which I could use later more reliably.

Is there a way to convert the above code into graphics? maybe somehow convert it to SVG?

+4
source share
2 answers

Check the SVGCanvas , which defines an API compatible with the HTML5 canvas, which creates the SVG output from drawing commands. It probably can't handle everything, but your simple example will hopefully work fine.

Just paste the appropriate bits of your code into one of the left text areas and click β€œdo it”, and then copy the svg output from textarea to the right.

+5
source

Like other comments, there is no tool to help you do Canvas β†’ SVG conversion. However, the code is not too different. Since the sample you gave is pretty small, you can use Raphael.js to generate SVG and convert the code you sent to Raphael.js:

http://raphaeljs.com/

UPDATE

A bit more

+2
source

Source: https://habr.com/ru/post/1389494/


All Articles