

OCanvas – an object-based canvas drawing library - hakim
http://ocanvas.org/

======
woogley
Interesting, but it feels like a re-implementation of SVG. What is the
advantage of this over something like RaphaelJS[1], where the SVG/VML objects
are actual DOM objects already?

[1]: <http://raphaeljs.com/>

------
nekoZonbi
Recently, I have been examining various 2D html APIs. I find the oCanvas API
to be excellent.

In comparison with Raphael, I find that both libraries are good and useful.

In computer graphics, there are two main approaches for 2D: vector and bitmap.
Each one has their situations where it is the most convenient. Raphael is SVG
based, vector graphics. oCanvas is html canvas based, bitmap graphics. So each
one will have situations where it is the most convenient.

For example, scalable graphics, made of solid lines and shapes, are better
suited with the vector approach. While diffuse images and image processing is
better suited with the bitmap approach.

oCanvas employs object literals to accede to the various graphic operations. I
find that makes the code more readable and thus easier to maintain, than the
Raphael API, which makes use of plain function parameters for that.

Some differences that I found: Raphael have support for paths, vector fonts,
and premade charts, which oCanvas doesn’t have.

On the other hand, oCanvas have support for animated sprites, scenes and
timeline/game loop.

------
DanielRibeiro
EaselJS is much easier to write it. <http://easeljs.com/>

And with real classes, and real methods. O canvas seems like the graphics
class alone: <http://easeljs.com/docs/Graphics.html>

------
zyang
Similar to EaselJS, <http://easeljs.com/>

------
fomojola
Looks nice, but as the first comment says: seems to recreate what RaphaelJS
does.

And, the demo site fails utterly on IE7: the documentation website says
nothing about browser compatibility.

~~~
nxn
Well, Internet Explorer's canvas implementation only begins with IE9. I would
not expect a lib that is based on canvas to work in any previous version of
that browser.

EDIT: And even then, you only get the 2d context, can't do any WebGL
fancystuff with any IE. (Though I don't think oCanvas does any of that
anyway?).

~~~
patrickaljord
WebGL is not really canvas, it used to be called canvas 3d at first but now I
think people just refer to it as webgl because it's completely different, I
may be wrong though.

------
noduerme
Actually it's very similar to StrikeDisplay (posted a while back, but I don't
think anyone saw it): <http://news.ycombinator.com/item?id=1816482>
<http://strikedisplay.blogspot.com>

SD tries to handle things like child objects dispatching events up the display
chain and implementing an AS3-style pseudolanguage...

