Does EPUB 3 support animations?

9 posts / 0 new
Last post

EPUB 3 does not support animations, at least as far as SVGs. The spec does support JavaScript which is quite powerful as it allows you to manipulate the DOM, compute, and send/fetch remote data.

By supporting interactivity, content can change based on user interaction but there doesn't seem to be any support for animations, or is there?

It depends on your definition (or implementation) of animation.  There is "programmatic" (imperative) animation, e.g. that powered by a programmatic language such as JS where the language specifies how the page contents should change with time, or there is "declarative" animation where there is (XML-bsed) markup that specifies how the engine interpreting the markup should change the page over time.

SVG 1.2 (which never reached recommendation status AFAIK) had extensive DECLARATIVE markup for animation (as a member of the WG and the one who implemented it in the Adobe tools, I bled a lot for that spec...).  AFAIK, although elegant, it was very hard to implement (in the RS and the authoring tools) and the WG had many less-than-harmonious discussions about it which was part of the reason 1.2 never saw the light of day.

However, programmatic animation is of course fully supported by the EPUB 3.x specification since one can animate pretty much any part of the DOM using JS (or any other language supported by your particular RS' runtime).


Interesting. In what Adobe tools did you implemement SVG 1.2 animations? I find that even though JavaScript seems to be the recommended path in EPUB 3, declarative animations are actually, in my opinion, a better overall fit for the EPUB spec which is declarative in nature (I.e. XML, HTML, SVG, CSS are all declarative).

rkwright - SVG 1.0 and 1.1 contain alteady declarative animation. SVG tiny 1.2 is a recommendation for years now (I'm a coauthor of it ;o) - ,there are only minor clarifications compared to SVG 1.1 - and declatative animation works more or less in many viewers - not complete and without errors, but already pretty useful and simple.

Scripting is only a decotrative changes of the DOM, not the document itselft. Of course, for any scripting issue EPUB 3 requires a non scripted, accessible alternative.
Even more, EPUB 3 excludes declarative animation in SVG and interactivity as well - maybe one can change something with scripting, but no interactive access allowed within EPUB 3.

Te CSS draft for animation is not included in EPUB 3 and it uses no events for interactivity, therefore not pretty useful for interactive, decorative animations as well - but the transitions may become interesting in the future.

Yeah, certainly there will need to be clarifications in future revisions of EPUB 3 about support for animation. I imagine the IDPF is keeping an open mind about it until implementations surface that confirm feasibility of these untested specifications.

@odemyi:  I implemented support for it in a never-released version of LiveMotion (codenamed Blackhawk).  Unfortunately, it never saw the light of day since Adobe decided to terminate LM before it was released.  In any case, it was before the advent of widespread GPUs and in consequence the performance was less than satisfactory.

@O.H. You are correct.  It was so long ago, my mind was playing tricks.  I was thinking of the shadow-DOM and all that which we (Adobe) supported in ASVG 6.  Are there authoring tools that emit declarative animation? (Clearly, I'm not tracking SVG much anymore, though I still have a soft spot in my heart for it...).  From the WebKit status page (and some very limited experiments it appears that the support (in WebKit at least) for declarative animation is still pretty limited.

Animated SVGs I created either by hand or with PHP or similar things, no specific tools,
I have some own tools/scripts for specific purposes, some of the available in my (german) tutorial area about visualisation of motion and data of physics and mathematics, but not more.
Due to my systematic tests of declarative animation, still Opera/Presto version about 10 is the best to use for the audience, still the adobe plugin is not worse than some popular others, but of course, over the years, there are a few better viewers and some of comparable quality.

@O.H.  Thanks for the info. It's unfortunate that declarative never really took off.  I really liked it, but it required some re-adjustment of one's thinking to use it.  Sadly, the state of tooling for SVG is still weak (though there are a couple of open-source tools that aren't bad).  I wrote most of the import/export support for Illustrator, but was always frustrated by it since Illustrator (amazingly enough) has no concept of a transform - everything gets flattened in the model.  I used to rail about this at Adobe.  Even wrote a tool for SVG (based on the ASSV6 engine and Spider Monkey called Humboldt) that was like MS Expressions with a WYSIWYG view, a DOM view and a text view - all editable and included a debugger.  But I couldn't convince Adobe to make it into a product.  I used to bug the VPs, including Shantanu (now CEO) and John W. about it, but never succeeded.  Got to the point that Shatanu would run if he saw me in the corridors. :-)

Looks like a good research project (SVG 1.2 implementation).

Secondary menu