Skip to content

stefanw/Canvas-Timemachine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Timemachine Effect with Canvas

Original by Kristian Thornley (thornleyk@cpit.ac.nz) as seen here and featured on Ajaxian. Original was licensed under Creative Commons Attribution 3.0 New Zealand License.

This is a major rewrite of the original with Canvas instead of divs. It's now modularized and also contains image preloading. Licensed under Creative Commons Attribution 3.0 Germany License

Use it like this:

var timemachine = TimeMachine.create(images, ctx, settings, imagesDoneLoadingCallback);
/* images is an array, elements can be URLs of images or image objects
 * ctx is the 2D graphics context
 * optional custom settings, see example
 * optional callback function when image loading is done
 */
timemachine.backward();
timemachine.forward();
timemachine.moveTo(3);

index.html provides a short example (online version here).

About

Timemachine Effect with Canvas

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published