aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-01-09 18:24:50 +0100
committerwout <wout@impinc.co.uk>2013-01-09 18:24:50 +0100
commit64fadd1e184b104959d6681e61da031f7bd1b832 (patch)
tree75fdec71d7fcf3fc776e338e866b888429a6e67f
parente15dc666f53607a38ed59b51fb5a4571d8102fbb (diff)
downloadsvg.js-64fadd1e184b104959d6681e61da031f7bd1b832.tar.gz
svg.js-64fadd1e184b104959d6681e61da031f7bd1b832.zip
Updated README
-rw-r--r--README.md4
-rw-r--r--src/fx.js2
2 files changed, 5 insertions, 1 deletions
diff --git a/README.md b/README.md
index 4795012..b11a5a5 100644
--- a/README.md
+++ b/README.md
@@ -298,6 +298,8 @@ For the latter, here is an example of the default `<>` function:
function(pos) { return (-Math.cos(pos * Math.PI) / 2) + 0.5; };
```
+For more easing equations, have a look at the [svg.easing.js](https://github.com/wout/svg.easing.js) plugin.
+
Note that the `animate()` method will not return the targeted element but an instance of SVG.FX which will take the following methods:
Of course `attr()`:
@@ -344,6 +346,8 @@ rect.animate(3000).move(100, 100).after(function() {
});
```
+_This functionality requires the fx.js module which is included in the default distribution._
+
## Syntax sugar
diff --git a/src/fx.js b/src/fx.js
index 6e6fc00..7eb939a 100644
--- a/src/fx.js
+++ b/src/fx.js
@@ -19,6 +19,7 @@ SVG.extend(SVG.FX, {
/* start animation */
this.interval = setInterval(function(){
+ // This code was borrowed from the emile.js micro framework by Thomas Fuchs, aka MadRobby.
var index,
time = (new Date).getTime(),
pos = time > finish ? 1 : (time - start) / duration;
@@ -236,4 +237,3 @@ SVG.extend(SVG.Element, {
// rect.animate(1500, '>').move(200, 300).after(function() {
// this.fill({ color: '#f06' });
// });
-