Web Animation
Dustin Tauer
dustin@easelsolutions.com
@dtauer
https://github.com/dtauer/wc2015
Topics
- A little history
 - CodePen.com
 - CSS Transitions
 - CSS Animations
 - JavaScript Animations
 - Greensock JS Library
 
Lots and lots of resources
History
- The Animated GIF
 - Flash
 - JavaScript
 - jQuery
 - Other JS Libraries
 - CSS3/JavaScript
 
Design Tools
The Best Way?
CSS & JavaScript
CodePen
https://codepen.io
CSS Transitions
#some-button{
    width: 100px;
    height: 80px;
    transition: width 1s;
}
#some-button:hover{
    width: 120px;
}CSS Animations
h1 {
  animation-duration: 3s;
  animation-name: slidein;
}
@keyframes slidein {
  from {
    margin-left: 100%;
    width: 300%; 
  }
  to {
    margin-left: 0%;
    width: 100%;
  }
}h1 {
  animation-duration: 3s;
  animation-name: slidein;
}
@keyframes slidein {
  0% {
    margin-left: 100%;
    width: 300%; 
  }
  100% {
    margin-left: 0%;
    width: 100%;
  }
}JavaScript Animations
setTimeout() - NO!
function animate() {
    
    // Animation code goes e
    if(keepAnimating){
        setTimeout(animate, 100); //100 ms
    }
    else{
        //You're done!
    }
}
animate();requestAnimationFrame
function animate() {
    
    // Animation code goes e
    if(keepAnimating){
        requestAnimationFrame(animate);
    }
    else{
        //You're done!
    }
}
animate();Greensock
https://greensock.com
The Cheat Sheet
https://ihatetomatoes.net/greensock-cheat-sheet/

Working Connections 2015: Web Animation
By Dustin Tauer
Working Connections 2015: Web Animation
- 1,573