Linked by David Adams on Tue 23rd Sep 2008 00:57 UTC
Thread beginning with comment 331142
To view parent comment, click here.
To read all comments associated with this story, please click here.
To view parent comment, click here.
To read all comments associated with this story, please click here.
I kid of get the performance argument for canvas, although in this case I don't get the point of JS, java being superior from my point of view. It should be used where it needs to be used, but not where SVG can replace it. SVG can do pretty animations too and objects are identifiable and usable from javascript. You also have events like click events and stuff in SVG. You can use the optimizeSpeed attribute and get per-pixel precision. You can also use bitmaps in SVG. It can do much more than static scalable pictures.
The browser IS my canvas!
by chaosvoyager on Wed 24th Sep 2008 17:31
in reply to "RE[3]: HTML 5 canvas?"
Because Canvas gives you per-pixel control and fast animation that isn't possible with SVG.
SVG is an event scriptable 2D scene graph, and it can be parsed and rendered (with pixel precision if need be) as quickly as any other 2D scene graph, and faster than a 3D scene graph because 2D doesn't have to consider as many values. The problem so far has been that implementations suck.
Canvas display is also limited to the canvas tag it's within whereas SVG can be placed anywhere.
In no way, shape, or form is this an advantage.
Not only that, but an SVG element can be made to model the Canvas behavior you described simply by setting overflow:hidden, which is even the DEFAULT if I'm not mistaken. On the other hand, it is not possible to get Canvas to model the behavior an SVG element has when set to overflow: visible|auto.
For the life of me, I cannot understand why the browser hasn't evolved into a generic scene graph renderer at this point.





Member since:
2005-11-10
Because Canvas gives you per-pixel control and fast animation that isn't possible with SVG. Canvas display is also limited to the canvas tag it's within whereas SVG can be placed anywhere.
Emulators have been written in Canvas/JS. You can't do that in SVG at all.
Canvas is for using for non-accessibility related issues. If I'm making a game in Canvas/JS instead of Flash; why should I care about accessibility when a blind person is not going to be able to see it anyway - regardless if it was Flash or Canvas.
A 3D rendering of a product is no more or less accessible as a Canvas / PNG, Flash or Java object as long as they have relevant ALT attributes &c.
SVG is for preserving document fidelity in the future as screen resolutions increase. Canvas is for making pretty, animated things.