Permalink
Browse files

Merge pull request #427 from spaceghoul/update-default-sample

Update readme and demo to use new animation api
  • Loading branch information...
eelco committed Sep 26, 2016
2 parents 4b9442d + 515ae36 commit ec784c9666614e3533d5b8adeedf86d4dc03cba6
Showing with 4 additions and 4 deletions.
  1. +2 −2 extras/templates/Project/app.js
  2. +2 −2 readme.md
@@ -13,11 +13,11 @@ imageLayer.states = {
}
// Set the default animation options
imageLayer.options = {
imageLayer.animationOptions = {
curve: "spring(500,12,0)"
}
// On a click, go to the next state
imageLayer.on(Events.Click, function() {
imageLayer.animateToNext()
imageLayer.stateCycle()
})
View
@@ -33,14 +33,14 @@ imageLayer.states = {
```
###### Set default animation options
```javascript
imageLayer.options = {
imageLayer.animationOptions = {
curve: "spring(500,12,0)"
}
```
###### Toggle states on click
```javascript
imageLayer.onClick(function(event) {
imageLayer.animateToNext()
imageLayer.stateCycle()
})
```
#### Features

0 comments on commit ec784c9

Please sign in to comment.