Skip to content

Instantly share code, notes, and snippets.

@nicebarbarian
Last active August 29, 2015 14:07
Show Gist options
  • Save nicebarbarian/ac4dc4458c31e9e420b9 to your computer and use it in GitHub Desktop.
Save nicebarbarian/ac4dc4458c31e9e420b9 to your computer and use it in GitHub Desktop.
framer.js: layer with states
myLayer = new Layer
x: 0
y: 100
width: 50
height: 50
myLayer.states.add
one: {x: 100}
two: {x: 200}
# Set the animation options
myLayer.states.animationOptions =
curve: "spring(600,30,0)"
myLayer.on Events.Click, ->
myLayer.states.next("one", "two", "default")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment