Your browser doesn't support the features needed to view this presentation, so you are presented with a simplified version.
For the best experience please use the latest Chrome, Safari or Firefox browser.
1824 - 'The persistence of vision with regard to moving objects' -Peter Roget
Links: early animation, computer animation
What is an animation? Animals in motion photography -Muybridge
First animation hardware - Zoetrope, Phenakistoscope, Thaumatrope
Cel and paper animation - Cartoons!
Film and Video - Development of recording, displaying techniques
Early Computer Animation - 1960s Sketchpad
Advanced Computer Generated Animation
Interactive Animation - Games, our computers, the modern browser!
Use these principles to help animations look life like and/or have real world properties.
Links: 12 basic principles & relevance for the user interface, Video
Flash what? Today native browser technologies are very capable of all sorts of animations.
CSS animations are intended to be GPU accelerated by the browser so that they are smooth.
Vendor prefixes (-webkit-, -moz-, -ms-, -o-) are still needed before many of these properties.
div.transition-me {
transition-duration: 1s;
transition-property: width;
position: absolute;
width: 100px;
background: #ccc;
}
div.transition-me:hover {
width: 500px;
}
<div class="transition-me"> </div>
.animate-me {
animation-name: the-animation;
animation-duration: 3s;
animation-iteration-count: infinite;
animation-direction: alternate;
width: 100px;
background: #ccc;
}
@keyframes the-animation {
0% { width:100px; }
50% { width:200px; }
100% { width:500px; }
}
<div class="animate-me"> </div>
Transforms are useful for creating rich animations using CSS3 transitions and animations.
.transform-me {
/* sample tranforms */
transform: skew(-10deg) scale(1,1) rotate(-10deg) translate(10px, 0);
/* change origin - defaults to center */
transform-origin: bottom left;
/* transition a transform */
transition-property: transform;
}
.transform-me:hover {
transform: skew(-45deg) scale(5,5) rotate(-45deg) translate(5px, 0px);
}
<div class="transform-me"> </div>
function animate(elem) {
var width = 0;
function frame() {
width++;
elem.style.width = width + 'px';
width == 300 ? clearInterval(id) :'';
}
var id = setInterval(frame, 16);
}
$('.js-animate-me').click(function(e) {
$('.js-animate-me').animate({width:"300px"}, 1000, 'easeOutBack');
});
Don't use setTimeout or setInterval – use requestAnimationFrame!
window.requestAnimFrame = (function() {
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
function( callback ) {
window.setTimeout(callback, 1000 / 60);
};
}
)();
(function animloop(){
requestAnimFrame(animloop);
render();
})();
There is more than one way of creating dynamic animations but lets take a closer look at one.
These are learning examples. Production examples would use requestAnimationFrame, enabling GPU accelleration and other important optimizations. These concepts, and more, are the foundation for creative use.
Use a spacebar or arrow keys to navigate