开发者

using <canvas> element from javascript

开发者 https://www.devze.com 2023-01-07 03:42 出处:网络
Is there any JS library designed for working with canvas elements? I don\'t really care about IE compatibility.

Is there any JS library designed for working with canvas elements?

I don't really care about IE compatibility. I need to create objects(complex drawings with text) , draw lines between them, linear, bezier with different strokes, and attach event handlers to them(开发者_运维知识库i need mouseOver and click).

Anyone has any experience with a library that has built-in support for this?


EDIT: http://raphaeljs.com/ seems to have these features


Canvas doesnt support javascript, but SVG does. You could use jQuery to attach events etc to elements, just like other Dom elements.


CAKE fulfills some of your requirements:

http://glimr.rubyforge.org/cake/canvas.html#KeyboardTest

It's been abandoned by its author, though, so it's doubtful that the areas its lacking in will be improved any time soon.


Well the Mozilla's API is quite good for working with canvas https://developer.mozilla.org/en/drawing_graphics_with_canvas

What's lacking? What would you like to see in a canvas library? - it might be a good project to be done on sourceforge or perhaps YUI or jquery can include it if you write to them about it.


Maybe Processing.js is what you look for...

0

精彩评论

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

关注公众号