Last active
September 2, 2015 22:37
-
-
Save positlabs/7ac2ea02ead7daf1da4d to your computer and use it in GitHub Desktop.
Filmstrip sprite example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$frame.css({ | |
backgroundImage: 'url("' + imgPath + '")', | |
backgroundSize: numFrames*100 + '% ' + '100%' | |
}); | |
var tl = new TimelineMax.to($frame, numFrames/frameRate, { | |
backgroundPosition: -(numFrames-1)*100+ '% 0', | |
ease: SteppedEase.config(numFrames-1), | |
delay: startDelay, | |
}); | |
// various timeline max methods | |
tl.repeat(0); // infinite repeat | |
tl.play(); | |
tl.reset(); | |
tl.pause(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment