summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/README.md b/README.md
index 32e8208..4209a71 100644
--- a/README.md
+++ b/README.md
@@ -1121,6 +1121,19 @@ rect.animate(3000).move(100, 100).during(function(pos, morph) {
})
```
+### loop()
+By default the `loop()` method creates and eternal loop:
+
+```javascript
+rect.animate(3000).move(100, 100).loop()
+```
+
+But the loop can also be apredefined number of times:
+
+```javascript
+rect.animate(3000).move(100, 100).loop(5)
+```
+
### after()
Finally, you can add callback methods using `after()`:
@@ -1130,6 +1143,8 @@ rect.animate(3000).move(100, 100).after(function() {
})
```
+Note that the `after()` method will never be called if the animation is looping eternally.
+
### to()
Say you want to control the position of an animation with an external event, then the `to()` method will proove very useful: