From 64fadd1e184b104959d6681e61da031f7bd1b832 Mon Sep 17 00:00:00 2001 From: wout Date: Wed, 9 Jan 2013 18:24:50 +0100 Subject: Updated README --- README.md | 4 ++++ src/fx.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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' }); // }); - -- cgit v1.2.3