UI Animation principles and practice with GSAP

50
Animate this! Principles and practice in UI animation Tuesday, March 21, 17

Transcript of UI Animation principles and practice with GSAP

Page 1: UI Animation principles and practice with GSAP

Animate this! Principles and practice in UI animation

Tuesday, March 21, 17

Page 2: UI Animation principles and practice with GSAP

Who the heck are you? I’m Mario Noble

• Your friendly neighborhood SCWDD Organizer

• Web Designer / Front end developer

• UX Designer

• Jack of all digital trades

• SoCal cliche

Tuesday, March 21, 17

Page 3: UI Animation principles and practice with GSAP

Why Animation in UI?

Tuesday, March 21, 17

Page 4: UI Animation principles and practice with GSAP

Movement compels attention.

Tuesday, March 21, 17

Page 5: UI Animation principles and practice with GSAP

Too much movement distracts.

Tuesday, March 21, 17

Page 6: UI Animation principles and practice with GSAP

UI animation is a means to an endnot a means unto itself.

Tuesday, March 21, 17

Page 7: UI Animation principles and practice with GSAP

Focus

Tuesday, March 21, 17

Page 8: UI Animation principles and practice with GSAP

Focus

Tuesday, March 21, 17

Page 9: UI Animation principles and practice with GSAP

Orientation

Tuesday, March 21, 17

Page 10: UI Animation principles and practice with GSAP

Orientation

Tuesday, March 21, 17

Page 11: UI Animation principles and practice with GSAP

Orientation

Tuesday, March 21, 17

Page 12: UI Animation principles and practice with GSAP

Feedback

Tuesday, March 21, 17

Page 13: UI Animation principles and practice with GSAP

Feedback

Tuesday, March 21, 17

Page 14: UI Animation principles and practice with GSAP

Branding

Tuesday, March 21, 17

Page 15: UI Animation principles and practice with GSAP

Branding

Tuesday, March 21, 17

Page 16: UI Animation principles and practice with GSAP

Animation is the depiction of change over time.

Tuesday, March 21, 17

Page 17: UI Animation principles and practice with GSAP

Animation is the depiction of change over time.

Tuesday, March 21, 17

Page 18: UI Animation principles and practice with GSAP

12 Basic Principles of Animation

https://vimeo.com/93206523

Tuesday, March 21, 17

Page 19: UI Animation principles and practice with GSAP

A few key points...

Tuesday, March 21, 17

Page 20: UI Animation principles and practice with GSAP

Tuesday, March 21, 17

Page 21: UI Animation principles and practice with GSAP

Attention is a resource.

Tuesday, March 21, 17

Page 22: UI Animation principles and practice with GSAP

A rule of thumb is to keep animations between 200-500ms.

Tuesday, March 21, 17

Page 23: UI Animation principles and practice with GSAP

Animations can occur not only in transition on screen...

Tuesday, March 21, 17

Page 24: UI Animation principles and practice with GSAP

...and off screen...

Tuesday, March 21, 17

Page 25: UI Animation principles and practice with GSAP

...but also in place.

Tuesday, March 21, 17

Page 26: UI Animation principles and practice with GSAP

Eye flow...

Tuesday, March 21, 17

Page 27: UI Animation principles and practice with GSAP

Eye flow...and sequencing are key.

Tuesday, March 21, 17

Page 28: UI Animation principles and practice with GSAP

Keep things consistent.

Tuesday, March 21, 17

Page 29: UI Animation principles and practice with GSAP

Keep things consistent.

except where it makes sense to not be...

Tuesday, March 21, 17

Page 30: UI Animation principles and practice with GSAP

Remember to integrate animation into your design process just as you would the use of color.

★ Business and user priorities

★ IA

★ Storyboarding

★ Prototypes

★ Styleguides

★ User research

Tuesday, March 21, 17

Page 31: UI Animation principles and practice with GSAP

Keep Accessibility in mind.

Tuesday, March 21, 17

Page 32: UI Animation principles and practice with GSAP

Execution - The nitty gritty of making it happen.

★CSS transitions and animation

★ jQuery

★Velocity.js

★Greensock (aka GSAP)

★Javascript Animation API

★Framework specific libraries (Angular, Polymer, React, native iOS/Android, etc.)

★DIY custom code

★ I wish I could say Flash...

Tuesday, March 21, 17

Page 33: UI Animation principles and practice with GSAP

There is no one right way.Use whatever works for you best.

Tuesday, March 21, 17

Page 34: UI Animation principles and practice with GSAP

We’re choosing GSAP to demo because it’s:

★Mature

★Platform agnostic

★Browser stable

★Plays nice

★Consistent handling of transforms and SVGs

★Full featured

Tuesday, March 21, 17

Page 35: UI Animation principles and practice with GSAP

GSAP “Ecosystem”

★TweenLite

★TweenMax *

★TimelineLite

★TimelineMax

* TweenMax is the one you want to use starting out since it all the others built in.

Optimize as needed.

Plus various Plugins and Extensions

Tuesday, March 21, 17

Page 36: UI Animation principles and practice with GSAP

A word about their licensing structure.

It’s free if you do not sell products or services made with it to multiple end users. A single client is fine. By the way, I’m not affiliated with the company in any way...

Tuesday, March 21, 17

Page 37: UI Animation principles and practice with GSAP

GSAP Basics (first we’ll tell, then we’ll show)

Tuesday, March 21, 17

Page 38: UI Animation principles and practice with GSAP

TweenMax.method(target, duration, {vars}, position);

Example: TweenMax.to(box, 0.5, {x: 50, y:100});Position is used in methods like staggerFrom

Tuesday, March 21, 17

Page 39: UI Animation principles and practice with GSAP

Targeting

★ Can use any class or html tag (i.e. .my-class - uses queryselectorall)

★ getElementbyID

★ jQuery ($)

★ a var or array of references

Tuesday, March 21, 17

Page 40: UI Animation principles and practice with GSAP

Duration

★ Usually in seconds

★ Can be frames

Tuesday, March 21, 17

Page 41: UI Animation principles and practice with GSAP

Vars

★ Can be single and multiple css properties - properties should be converted from

using hyphens to camel case (e.g. border-radius is borderRadius)

★ Also uses special properties like easing, repeat, delay, timeline controls

★ GSAP callbacks and custom callbacks

Tuesday, March 21, 17

Page 42: UI Animation principles and practice with GSAP

Position

★ Sets when the tween occurs in the timeline in terms of seconds or frames.

Tuesday, March 21, 17

Page 43: UI Animation principles and practice with GSAP

also...

Tuesday, March 21, 17

Page 44: UI Animation principles and practice with GSAP

Easing

★ Default

★ Out of the box

★ Custom

★ Let’s check out the visualizer

Tuesday, March 21, 17

Page 45: UI Animation principles and practice with GSAP

Timeline fun

★ Reversing

★ From versus To

★ Staggers (aka offsets)

★ Yoyo

★ Timescale

Tuesday, March 21, 17

Page 46: UI Animation principles and practice with GSAP

Multiple Animations

★ using new

★ standalone animations

★ added / chained animations

★ modifying multiple animations at once

Tuesday, March 21, 17

Page 47: UI Animation principles and practice with GSAP

OK, let’s try this.

Tuesday, March 21, 17

Page 48: UI Animation principles and practice with GSAP

Summary

★ Form follows function

★ Focus, Orientation, Feedback, Branding

★ Integrate Animation into the overall business, design and dev process

★ Animation frameworks will target change in target properties and their sequence

over time

★ Realistic animation often uses some form of easing

Tuesday, March 21, 17

Page 50: UI Animation principles and practice with GSAP

Q&A / Sharing

Tuesday, March 21, 17