HTML5 canvas advanced framework

ChRapO picture ChRapO · Oct 10, 2010 · Viewed 8k times · Source

I need HTML5 canvas framework to do:

  • draw object (e.g. rectangle)
  • on onmouseover event of the object change color/border style
  • on click do some js action

thx

EDIT: I have finally decided to use raphaeljs (alternative would be dojo). This framework is awesome. (It doesn't need HTML5 canvas and uses SVG)

Answer

bobince picture bobince · Oct 10, 2010

It sounds like what you really want is a retained mode graphics interface, where you can create an object, get mouse events on it, change properties on it, move it etc and have the browser cope with redrawing the screen as necessary. In this case you would be better off with SVG instead of <canvas>, which as an immediate mode graphics surface really is just a box full of pixels.