72
with @RachelNabors State of the Animation 2014

State of the Animation 2014

Embed Size (px)

DESCRIPTION

The post-Flash era is hardly free of animation. CSS animation is quickly becoming a cornerstone of user-friendly UI frameworks, and JavaScript libraries already exist to handle complex, interactive animations. And now there’s a new API coming to town specifically for web animations! In the wake of so much “CSS vs. JavaScript animation” infighting, you'll be introduced to the Web Animations API via the development styles and insights of four distinct groups of people: UI designers, interaction developers, library authors, and the browser teams implementing it.

Citation preview

Page 1: State of the Animation 2014

with  @RachelNabors

State of the Animation

2014

Page 2: State of the Animation 2014

TinMagpie.com

Page 3: State of the Animation 2014
Page 4: State of the Animation 2014
Page 5: State of the Animation 2014

All characters appearing in this work are fictitious. Any resemblance to real

persons, living or dead, is purely coincidental.

Page 6: State of the Animation 2014
Page 7: State of the Animation 2014

WEB ANIMATION HAS JUST BEGUN

Flash  may  be  gone,  but  the  era  of

Page 8: State of the Animation 2014

Animation is a visual representation of a rate of change over time

and space.

-me

loca-o

n

Page 9: State of the Animation 2014

User  Interface  Designers

Page 10: State of the Animation 2014

Relationships Structure Cause & Effect

Anima-on  guides  users  through  interac-ons  using…

Page 11: State of the Animation 2014

Sco$  E.  Hudson  and  John  T.  Stasko  (1993)

“By offloading interpretation of changes to the perceptual system, animation allows the user to

continue thinking about the task domain, with no need to shift contexts to the interface domain. By

eliminating sudden visual changes, animation lessens the chance that the user is surprised.”

Page 12: State of the Animation 2014

Interac/on  Developers

Page 13: State of the Animation 2014
Page 14: State of the Animation 2014
Page 15: State of the Animation 2014

Animation is coming.

Page 16: State of the Animation 2014

Kinds of Animation

Page 17: State of the Animation 2014

Sta-c  Anima-ons

Page 18: State of the Animation 2014
Page 19: State of the Animation 2014

Stateful  Anima-ons

Page 20: State of the Animation 2014

UI  credit:  codrops.com

Page 21: State of the Animation 2014
Page 22: State of the Animation 2014

Dynamic  Anima-ons

Page 23: State of the Animation 2014

UI  credit:  CrowdStrike:  Alex  Graul,  Senior  UI  Developer

Page 24: State of the Animation 2014

Multiple States vs.

Dynamic Animation

Page 25: State of the Animation 2014

Mul--­‐state  Anima-on

Page 26: State of the Animation 2014

True  Dynamic  Anima-on

Page 27: State of the Animation 2014

.loaded-001 .loading-bar { width: 1%; }

.loaded-002 .loading-bar { width: 2%; }

.loaded-003 .loading-bar { width: 3%; }

Ad  nauseum.

Page 28: State of the Animation 2014
Page 29: State of the Animation 2014

Declarative vs.

Reactive

Page 30: State of the Animation 2014

.spinner {

transition: opacity 1s;

opacity: 1;

}

.loaded .spinner { opacity: 0; }

Declara-ve  CSS…  

Page 31: State of the Animation 2014

window.addEventListener("load", function load(event){

window.removeEventListener("load", load, false);

body.classList.add(“loaded”);

},false);

spinner.addEventListener("transitionend", removeSpinner, true);

+  Reac-ve  JavaScript

Page 32: State of the Animation 2014
Page 33: State of the Animation 2014
Page 34: State of the Animation 2014

I can’t make a physics engine with that.

This totally works!

Page 35: State of the Animation 2014
Page 36: State of the Animation 2014

Anima/on  Library  Developers

Page 37: State of the Animation 2014

greensock.com/gsap

Page 38: State of the Animation 2014

VelocityJS.org

Page 39: State of the Animation 2014

And then we can release it to the public?

Sure, right after we catch up on

client work!

Page 40: State of the Animation 2014

Animation History The Fall of

Flash

Page 41: State of the Animation 2014
Page 42: State of the Animation 2014
Page 43: State of the Animation 2014

?

Page 44: State of the Animation 2014
Page 45: State of the Animation 2014

THE WEB ANIMATION API

The  Greatest  API  You’ve  Never  Heard  ofan

Page 46: State of the Animation 2014

Anima/on  Spec  Authors  &  Implementors

Page 47: State of the Animation 2014

But does it have…

• Performant  anima6ons  

• Mo6on  Paths  

• Callbacks  

• Nes6ng  &  sequencing    

• Pause,  play,  reverse,  seek

Page 48: State of the Animation 2014

• Performant  anima6ons  

• Mo6on  Paths  

• Callbacks  

• Nes6ng  &  sequencing    

• Pause,  play,  reverse,  seek

Well, actually, it does!

Page 49: State of the Animation 2014

I think I looked at it once. It was kinda long,

wasn’t it?Web Animation API?

What’s that?Meh. It’s been a few years.

Page 50: State of the Animation 2014

Support

Page 51: State of the Animation 2014

It’s “under consideration.”

Page 52: State of the Animation 2014

Will no one think of the tablets?

Page 53: State of the Animation 2014

github.com/web-­‐anima1ons

Page 54: State of the Animation 2014
Page 55: State of the Animation 2014

Performance

Page 56: State of the Animation 2014

• Web  Anima6on  API  anima6ons  get  their  own  thread!*  

• *So  long  as  the  anima6on  doesn’t  6e  into  any  things  happening  on  the  main  thread  like:  

• JavaScript  (sorry  dynamic  anima6on)  

• Layout  

• It  varies  by  vendor.

An  end  to  jank  (some  condi1ons  apply)!

Page 57: State of the Animation 2014

• Reflows  are  a  rendering  engine  problem.

• opacity  &  transform  remain  safe  

• Coming  soon!  Color,  mo6on  paths,  absolute  posi6oning

Ge?ng  around  layout

Page 58: State of the Animation 2014

• The  CSS  property  will-change  is  a  start  

• Promotes  things  to  their  own  layer  

• The  end  of  translateZ(0)

Shortcut  through  the  GPU

Page 59: State of the Animation 2014

FORWARDPushing  the  web  (animaAons)

Page 60: State of the Animation 2014

Browser support and performance!Tools!

We need a timeline!

The standardistas need to come down

from their ivory towers!Show them how well it performs!

Page 61: State of the Animation 2014
Page 62: State of the Animation 2014

What would you know about our

problems?

Why won’t you give us a chance?

Page 63: State of the Animation 2014

Animation is coming, whether we’re ready

or not.

Page 64: State of the Animation 2014

Here’s the plan.

Page 65: State of the Animation 2014

User  Interface  Designers• Don’t  be  afraid  of  JavaScript  

• Take  6me  to  play  with  the  libraries

Page 66: State of the Animation 2014

Interac/on  Developers• Check  out  the  polyfill’s  page  

• Give  feedback

Page 67: State of the Animation 2014

Anima/on  Library  Developers• Go  read  the  spec  

• Give  feedback

Page 68: State of the Animation 2014

Anima/on  Spec  Authors  &  Implementors• Find  beVer  ways  of  taking  feedback  

• Meet  us  in  the  field

Page 69: State of the Animation 2014

Everyone.

Page 70: State of the Animation 2014

–John  Lasseter,  CCO  Pixar

“The art challenges the technology, and the technology inspires the art.”

Page 71: State of the Animation 2014

We are not our tools. We build tools…

…together.

Page 72: State of the Animation 2014

(  rachelnabors.com/training  )      

@RachelNabors  |  RachelNabors.com

rachelnabors.com/waapi #waapi