cjgammon / SnapSVG-Animator

Plugin to publish animated SVG content from Animate CC with the Snap.svg javascript library
http://cjgammon.github.io/SnapSVG-Animator/
Apache License 2.0
214 stars 44 forks source link

Please, add the option to export the animation in standard SMIL format #56

Closed Emasoft closed 8 years ago

Emasoft commented 8 years ago

Please, add the option to export the animation in standard SMIL format. SMIL is the universal interchange format for animations. If you save an animation using such snap.svg based plugin, you cannot use it in a greensock based app, for example. Only SMIL can be exchanged, because is a description file format, not a programming language. I can read the SMIL animation data from the SVG file and import it in any javascript web application. The javascript code to load and playback SMIL on ANY browser is available in many libs and polyfills, like this one: https://github.com/ericwilligers/svg-animation Please KEEP DATA SEPARATED FROM CODE. Mixing data and code will only produce an inefficient, non standard, non future proof, non portable animation, and doomed to stop working correctly at the smallest change in the javascript libraries api it depends on. This is why standard file formats like SMIL were created in the first place. If you know the history of the graphic industry, you know that not using a standard exchange format for graphics or animations is a sure recipe for failure.

cjgammon commented 8 years ago

looks like SMIL is being deprecated in Blink, using it currently fires a warning about deprecation in the console (https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/5o0yiO440LM). Does not seem valuable enough to invest in at this time.

Javascript has a number of advantages like the potential for dynamic (script based) interactive animation at a per object level as well as integrating directly within larger javascript application ecosystems. For portability we already have a task to package stand alone SVG files with necessary embedded code to run, see #53 . Libraries will change, yes, but you don't always need to update them and no technology is infinitely future proof (as evidenced by the consideration of deprecating SMIL), any developer is expected to make reasonable considerations when choosing a toolset for their given task.

Emasoft commented 8 years ago

You don't need native SMIL in a browser, you can use a SMIL polyfill interpreter like this:

https://github.com/ericwilligers/svg-animation

No more deprecation warnings. And with SMIL you have the advantage of a self contained animation data file. Just an .svg file, that will reproduce everywhere (and forever) in the exact same way, independently from the applications. There are already apps that convert flash to SMIL animations. For example "Flash2Svg" outputs only an svg animation file defined with SMIL, no need for javascript:

https://github.com/TomByrne/Flash2Svg

Here is an example output file of a cartoon episode converted with Flash2Svg (warning: the embedded audio track makes the download sizing 1.4 megabyte):

http://www.tbyrne.org/portfolio/smil/LoveDota.svg

cjgammon commented 8 years ago

It sounds like you already have your SMIL animation tool.