Skip to content

Instantly share code, notes, and snippets.

@scooooooooby
Created April 1, 2015 01:05
Show Gist options
  • Save scooooooooby/2f1bf10b1f86632b2232 to your computer and use it in GitHub Desktop.
Save scooooooooby/2f1bf10b1f86632b2232 to your computer and use it in GitHub Desktop.
Repeating Animation, FramerJS
# 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