Re: Use Cases for The <canvas> Element

Le 31 juil. 2007 à 12:16, Philip Taylor a écrit :
> Karl Dubost wrote:
>> I think for example about 3D games software, which are a high  
>> mixture  of Vector (geometry of the space) and bitmap graphics  
>> (tiles, patterns)
> I've not used SVG much so I'm uncertain about any details, but I  
> wouldn't expect 3D-ish games to work well with SVG,

That was *just* an example of an application mixing bitmap and vector :)

> I don't believe I've seen comparable examples in SVG, particularly  
> in having dynamic scenes that can change completely from frame to  
> frame;

I didn't say that SVG had to be used for 3D games.

VRML is the first candidate that people usually think about, but it  
is not a game engine as well. But some people have tried with very  
simple things

>> * CanvasAPI doesn't give an easy way to author for many people.  
>> For  example, a simple things like circle would be very hard to  
>> author  with canvas. It means that people need to rely on  
>> authoring tools.
> That could be handled with a JS extension library, doing something  
> like:
> = function (x, y, r) {
>     this.beginPath();
>     this.arc(x, y, r, 0, 2*Math.PI, true);
>     this.closePath();
>   }
> and then users can simply write ", 100, 50);  
>, 100, 50); ctx.fill();". That's more awkward for the  
> users than having it built-in, since they have to find and include  
> that library, but it's also more flexible and more likely to work  
> interoperably (since the browser developers have fewer functions to  
> put bugs in). I'm not aware of any existing efforts to provide a  
> library like that, though.

Yes that was my point. Thanks for providing the code, it is helpful  
for comparing. I much prefer the svg solution from an author point of  
view. I find it easier to write (but that might be a question of  
personal preferences).

<svg width="200px" height="200px">
    <circle cx="100" cy="100" r="50" style="stroke: black;fill:none"/>

Karl Dubost -
W3C Conformance Manager, QA Activity Lead
   QA Weblog -
      *** Be Strict To Be Cool ***

Received on Tuesday, 31 July 2007 04:15:27 UTC