Permalink
Browse files

Syntax highlighting

  • Loading branch information...
Benjamin den Boer
Benjamin den Boer committed Sep 18, 2014
1 parent bf11c56 commit d7c40ceb7f25bbc2cb5227d27ee3432ef90e2f3d
Showing with 4 additions and 4 deletions.
  1. +4 −4 readme.md
@@ -15,24 +15,24 @@ Framer.js allows you to define animations and interactions, complete with filter
## Example
###### Define a layer and center it
```
```javascript
imageLayer = new Layer({width:128, height:128, image:"images/icon.png"})
imageLayer.center()
```
###### Add states
```
```javascript
imageLayer.states.add({
second: {y:100, scale:0.6, rotationZ:100},
third: {y:300, scale:1.3},
fourth: {y:200, scale:0.9, rotationZ:200},
})
```
```javascript
###### Set default animation options
```
imageLayer.states.animationOptions = {
curve: "spring(500,12,0)"
}
```
```javascript
###### Toggle states on click
```
imageLayer.on(Events.Click, function() {

0 comments on commit d7c40ce

Please sign in to comment.