Created
April 1, 2015 01:05
-
-
Save helenvholmes/2f1bf10b1f86632b2232 to your computer and use it in GitHub Desktop.
Repeating Animation, FramerJS
This file contains hidden or 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
# Repeating Animations. | |
layerA = new BackgroundLayer({ backgroundColor:"#2DD7AA" }) | |
whiteSquare = new Layer | |
x: 100, | |
width: 250, | |
height: 250, | |
backgroundColor: "white", | |
scale: 1, | |
rotation: 45 | |
whiteSquare.center() | |
whiteSquareShrink = new Animation({ | |
layer: whiteSquare, | |
properties: | |
scale: 0.5, | |
rotation: 135, | |
curve: "spring(600, 20, 0)" | |
time: 0.65 | |
}) | |
whiteSquareEnlarge = new Animation({ | |
layer: whiteSquare, | |
properties: | |
scale: 1, | |
rotation: 45, | |
curve: "spring(600, 20, 0)" | |
}) | |
whiteSquareShrink.start() | |
whiteSquareShrink.on Events.AnimationEnd, -> | |
whiteSquareEnlarge.start() | |
whiteSquareEnlarge.on Events.AnimationEnd, -> | |
whiteSquareShrink.start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment