Serious Animation (an introduction to Web Animations)

6,189 views

Published on

English translation of Web Animations presentation given at html5j in Tokyo November 30 2013.

Introduces the importance of animation, problems with existing technology, the Web Animations API and core concepts and a new Animation Elements specification.

An HTML version of the slides (without comments) is available here: http://people.mozilla.org/~bbirtles/pres/html5j-2013/index-en.html

Published in: Technology, Business
0 Comments
13 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
6,189
On SlideShare
0
From Embeds
0
Number of Embeds
1,908
Actions
Shares
0
Downloads
86
Comments
0
Likes
13
Embeds 0
No embeds

No notes for slide

Serious Animation (an introduction to Web Animations)

  1. 1. When you think of animation you probably imagine things like this…
  2. 2. Or perhaps this… But actually there are other ways of using animation!
  3. 3. OSX’s genie effect make it easy to understand what has happened to your window and how to get it back
  4. 4. Firefox’s interface uses animation in a similar way to tell you where your download has gone.
  5. 5. Changes big and small can often be grasped more easily using animation.
  6. 6. Long stories can also be made easy to comprehend using animation. Animation is essentially using time to convey information.
  7. 7. If we apply both these classes to the same element…
  8. 8. One wins since CSS Animation can’t do addition
  9. 9. If we make up a single animation combining both effects the timing won’t match and we have to prepare all possible combinations in advance
  10. 10. We can’t animate Foxkeh’s eyes like this
  11. 11. SVG Animation actually has more features…
  12. 12. But CSS has much more content.
  13. 13. In most browsers the implementation of CSS Animation and SVG Animation is completely separate.
  14. 14. As a result CSS is more optimised and correctly and widely implemented
  15. 15. (in so far as making changes to CSS properties is concerned)
  16. 16. Some people suggested we shouldn’t have two animation models for the Web.
  17. 17. At the same time developers pointed out missing features in both.
  18. 18. So we did this.
  19. 19. Features we already had in both CSS and SVG.
  20. 20. From CSS we imported animation direction.
  21. 21. CSS Transitions’ automatic reversing is not part of the Web Animations model but can be realized using other features of the model.
  22. 22. We imported a number of features from SVG such as additive animation, motion path animation and seek control.
  23. 23. The most complex features from SVG, however, are not part of the model but are included in the SVG bindings (“Animation Elements”).
  24. 24. We also added four new features. Timing groups and custom effects are particularly powerful.
  25. 25. Web Animations is fundamentally an abstract model.
  26. 26. CSS syntax and mapping to the model will be defined in a separate spec.
  27. 27. Likewise, SVG syntax and mapping will be defined in the Animation Elements spec.
  28. 28. There is also an API onto the model.
  29. 29. Currently the API and model are defined in one spec but that is simply for ease of maintenance.
  30. 30. http://brian.sol1.net/svg/2013/07/25/players-wanted-the-pause-and-seek-game/ Players are used to control playback of animations and timing groups.
  31. 31. There are two types of timing groups: timing groups and timing chains (although these names may change). Timing groups play their children simultaneously.
  32. 32. Timing chains play their children in turn.
  33. 33. You can use them together.
  34. 34. The arrangement from the previous demo is as follows.
  35. 35. dev.w3.org/fxtf/web-animations git.io/webanim Native implementation status.
  36. 36. By way of introduction to SVG animation, this is a very simple app for creating SVG animations. You can try it at http://parapara-editor.mozlabs.jp/sandbox.
  37. 37. The completed animations get sent to a shared canvas where they are animated. This is also created with SVG animation. You can find out more at http://parapara.mozlabs.jp.
  38. 38. The SVG file for a character looks like this.
  39. 39. But with Animation Elements we can simplify it to this.
  40. 40. The select attribute lets us re-use the animation definition.
  41. 41. Timing chains make sequencing easy.
  42. 42. Our door close demo could be written like this. Element syntax is convenient for expressing hierarchies and can be used together with CSS by using <set> elements to set CSS classes that trigger animations.
  43. 43. This kind of approach lends itself to collecting timing information in one place, perhaps even a separate timesheet file.
  44. 44. git.io/webanim public-fx@w3.org birtles@mozilla-japan.org

×