Web Animations

45
Web Animations Puppet Icon Designed by Juan Pablo Bravo , The Noun project

Transcript of Web Animations

Page 1: Web Animations

Web Animations

Puppet Icon Designed by Juan Pablo Bravo, The Noun project

Page 2: Web Animations

Hola!

Suresh (@bsuresh2)

Front-end Developer

Mobile And Application Development team @CtiDigital

Page 3: Web Animations

vsDeclarative

http://cats-paradise.net/

Imperative

Page 4: Web Animations

Before we begin...

http://www.visualphotos.com/image/2x2714849/boxer_taping_hands_before_fight

Page 5: Web Animations

a: A motion picture made by photographing successive

positions of inanimate objects (as puppets or

mechanical parts).

b: A motion picture made from a series of drawings

simulating motion by means of slight progressive

changes.

“Animation”

From webster definition of animation

Page 6: Web Animations

There is more to it...

http://i.telegraph.co.uk/multimedia/archive/01958/Boxing_1958661b.jpg

Rule

s Principle

s

Tricks

Techniqu

es

Page 7: Web Animations

Twelve

Commandments

Revelation Icon Designed by Cédric Villain, The Noun project

Page 8: Web Animations

Gifted to this world

by...

The God

Ollie Johnston

&

Frank ThomasFrom Disney Inc.

Page 9: Web Animations

● Squash and stretch

● Anticipation

● Staging

● Action and Pose to Pose

● Follow Through and Overlap

● Slow in Slow out

● Arc

● Secondary Motion

● Timing

● Exaggeration

● Solid drawing

● Appeal

Page 10: Web Animations

Animation by Definition

Object moves from A to B aka

simulating motion by progressive

changes over time.

Page 11: Web Animations

Squash and stretch

Page 12: Web Animations

Squash and Stretch

- This gives a sense of weight and flexibility to

drawn objects.

- It can be applied to simple objects, like a

bouncing ball.

- Or more complex constructions, like the

musculature of a human face.

Page 13: Web Animations

Anticipation

Page 14: Web Animations

Anticipation

- Prepare the audience for an action,

- Example

- a golfer making a swing has to swing the club back

first.

- This technique can also be used for less

physical actions

Page 15: Web Animations

Staging

Page 16: Web Animations

Action and Pose to Pose

Page 17: Web Animations

Action - CSS Transitions

- Drawing out a scene frame by frame from

beginning to end.

- Creates a more fluid, dynamic illusion of

movement

- Better for producing realistic action

sequences.

Page 18: Web Animations

Pose to Pose - CSS Keyframes

- This involves starting with drawing a few key

frames, and then filling in the intervals later

- Works better for dramatic or emotional

scenes.

- Hybrid combination can be used as well!

Page 19: Web Animations

Follow Through and Overlap

● To give the impression that characters follow the laws of

physics, including the principle of inertia.

● Exaggerated use of the technique can produce a

comical effect

● While more realistic animation must time the actions

exactly, to produce a convincing result.

Page 20: Web Animations

Slow in Slow out aka. Easing

Page 21: Web Animations

Arc

● Most natural action tends to follow an arched

trajectory.

● Animation should adhere to this principle by

predefined/generated "arcs" for greater

realism.

Page 22: Web Animations

Secondary Motion

● Emphasize, rather than take attention away

from, the main action.

● If the latter is the case, those actions are

better left out.

Page 23: Web Animations

Timing

● On a purely physical level, correct timing

makes objects appear to obey the laws of

physics.

● For example, an object's weight determines

how it reacts to an force, like a push based

on reaction.

Page 24: Web Animations

Exaggeration

● Exaggeration is an effect

especially useful for animation,

IMITATION!

● Imitation of reality depends on

whether one seeks realism or a

particular style.

Page 25: Web Animations

Appeal

● There are several tricks for making

a animation connect better with

the audience;

● Symmetry, golden ratios! even a

hint of naturalistic fractal

distributions.

Page 26: Web Animations

All combined together!

A little Demo time!

Page 27: Web Animations

Wooooah...cool!

Page 28: Web Animations

Some real life examples

Page 29: Web Animations
Page 30: Web Animations

vsDeclarative

http://cats-paradise.net/

Imperative

Page 31: Web Animations

Declarative Animations

● Performance

● Ease of wrapping

● Motion Principles?!

Extracts from ngeurope famo.us talk by Zack brown, http://codepen.io/redouglas/pen/vCgwc

Page 32: Web Animations

Declarative Animations - The Hard

part

● Interactions?!

● Complex Orchestrated Animations

● Timing & knowing when things are done

● Design changes

● Authoring, Refactor?!

● Maths/computed physics

Extracts from ngeurope famo.us talk by Zack brown

Page 33: Web Animations

Imperative animations

● Animations can be orchestrated

● Halted and reversed at any given point

● User interactions

● Computational physics

● External forces like spring, elastic, damping, oscillation!

Page 34: Web Animations

Imperative animations - The Hard

part

● Performance

● Load times

● Devices

● GPU Layer Access

Page 35: Web Animations

What Now?!

Page 36: Web Animations

Browser Challenges

Browser Repaint

Page 37: Web Animations

Repaints can be tricky!

Spanish fresco restoration - http://www.bbc.co.uk/news/world-europe-19349921

Page 38: Web Animations

The Browser Repaint!

Page 39: Web Animations

The Browser Repaint - Inspectors

● Chrome dev tools Timeline

● Mozilla MozAfterPaint

● IE Visual Round Trip Analyser

(VRTA)

Page 40: Web Animations

The Common Struggle

● Complex DOM

● Web standards

● Accessibility

● Jank Busting

● GPU layer access

Page 41: Web Animations
Page 42: Web Animations

Light at end of tunnel

● Various frameworks like Famo.us, KineticJS

GSAP, ionic framework, Material design

● WebGL

● SVG Animations, Bonsai, Snap.svg, RaphealJS, D3

● Web Standards/Browsers RAF (Req Animation frame),

Prefix free, ‘will-change’ property, WebGL support etc.,

Page 43: Web Animations

Light at end of tunnel

● Tools to help you traverse the Animation universeBookmarklet for Browser independent paint inspection by Lindsey Simon at Google

https://developers.google.com/speed/articles/reflow

CSS Triggers

http://csstriggers.com/

Page 44: Web Animations

Light at end of tunnel

● Abstractions can be good

● Can also be hinderance?!

Page 45: Web Animations

Thanks!

&

Any Questions?!

@bsuresh2