开发者

If I draw something, is there a tool that can translate that into javascript/canvas instructions?

I want to try creating shapes in javascript+canvas.. Is there a开发者_高级运维 tool to transform drawings into js code ?


Have a look at Processing.js.


If you happen to have Flash you can draw in Vector format and convert to javascript and canvas using the newly released Swiffy tool from Google : http://swiffy.googlelabs.com/

Of course if you don't have Flash then that doesn't help much..

Another option could be to use DeviantART's muro web app : http://muro.deviantart.com/ . It's a drawing app made using only javascript and canvas and it looks pretty badass for a web app. I don't know if you can get the source of your drawing though, you'd have to experiment with this a bit.


Yes, there is such online tool!

It's called HTML Canvas Studio. It allows you to draw whatever you want, the same way you do in other Paint programs. When you finish, just export it to HTML+JS.

You can find it here: http://www.htmlcanvasstudio.com/


I found a way (sort of):

  1. draw something using Inkscape, save as svg
  2. open the svg file, find the definition of the shape (something like M10 10L90 90)
  3. use that in the js framework Raphaël : paper.path("M10 10L90 90");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜