asyncjs / Fishcotheque

Welcome to the Async Fishcotheque!
https://fishcotheque.asyncjs.com/
6 stars 12 forks source link

Swap Raphael with Snap.svg.js ? #14

Open ian-workcircle opened 8 years ago

ian-workcircle commented 8 years ago

Just wondering, is there a specific reason for using Raphael as an included svg library (I know its good for backwards compatibility). I was wondering if one of the other libs that allow SVG imports could be better, as you could load in a whole SVG and then animate it for example, whereas I think Raphael has to build things from scratch (Snap.svg.js has the same syntax as it was written by same author).

Not sure if there is any code already included thats dependant on Raphael, so maybe ignore if so!

premasagar commented 8 years ago

Cough, or Pablo. Non-attached, mind.

ibrierley commented 8 years ago

Ah why not :), I was actually thinking of Pablo, but couldn't remember if it has SVG import in it or whether there was a reason for Raphael, like some Raphael specific code already in there.

premasagar commented 8 years ago

It looks like Raphael was provided for creatures to make use of, but is not part of the system. Some of the jungle creatures do use it - the grass, elephant and stars, but it could be replaced safely here.

Pablo has Pablo.load() to import an SVG into a detached DOM collection and Pablo(element).load() to import and append it to an element.