diff options
-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' }); // }); - |