Hacker News new | past | comments | ask | show | jobs | submit login

How does this compare to raphael (http://raphaeljs.com/) ?



From my understanding Raphael is specific to the SVG context. Two.js is renderer agnostic, you can choose whether it draws in SVG, canvas, or webgl. This is one of many differences between the two.


On the contrary, Raphael is an abstraction on top of SVG and VML (Microsoft's vector format). It's quite useful when you have to support IE.


>Raphael is an abstraction on top of SVG and VML

Still specific to vector graphics rendering.

So not "on the contrary", but "to be exact".


"Well, actually..."


I did a whole diagram editor in Raphael. In the end we had the client installing ChromeFrame because there are still some different behaviors in IE.


Rapahel does SVG but most importantly it also renders VML when SVG is not supported by the browser, as a result it supports IE6+ unlike two. (don't get me wrong I still think two is great)


Raphael is SVG or VML (for IE <9)


Thanks for the clarification!


Raphael has no support to work with groups of elements.


Raphael supports sets of elements:

http://raphaeljs.com/reference.html#Paper.set


Not the same - e.g. rotating a set of elements causes each individual element to rotate around their individual centers, rather than causing the group to rotate around a central pivot.


Pseudo-Grouping can be made in Raphael. However each elements gets transformed one by one. At 100+ elements, things get very laggy.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: