diff options
author | wout <wout@impinc.co.uk> | 2013-01-09 18:24:50 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2013-01-09 18:24:50 +0100 |
commit | 64fadd1e184b104959d6681e61da031f7bd1b832 (patch) | |
tree | 75fdec71d7fcf3fc776e338e866b888429a6e67f | |
parent | e15dc666f53607a38ed59b51fb5a4571d8102fbb (diff) | |
download | svg.js-64fadd1e184b104959d6681e61da031f7bd1b832.tar.gz svg.js-64fadd1e184b104959d6681e61da031f7bd1b832.zip |
Updated README
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | src/fx.js | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -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 @@ -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' }); // }); - |