summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-08-01 13:32:56 +0100
committerwout <wout@impinc.co.uk>2013-08-01 13:32:56 +0100
commiteecebe3cdfdae38f4e0613807e7fd64359cb84fd (patch)
tree64ecf24398abedbf4ba657fd6b5905652b83129e /README.md
parent21d6c0b30a530ce7746f789921c7135079f43338 (diff)
downloadsvg.js-eecebe3cdfdae38f4e0613807e7fd64359cb84fd.tar.gz
svg.js-eecebe3cdfdae38f4e0613807e7fd64359cb84fd.zip
Added animatible poly's, bumped to v0.31
Diffstat (limited to 'README.md')
-rw-r--r--README.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/README.md b/README.md
index f01ed8a..db009d8 100644
--- a/README.md
+++ b/README.md
@@ -161,6 +161,18 @@ As an alternative an array of points will work as well:
var polyline = draw.polyline([[0,0], [100,50], [50,100]]).fill('none').stroke({ width: 1 })
```
+Polylines can be updated using the `plot()` method:
+
+```javascript
+polyline.plot([[0,0], [100,50], [50,100], [150,50], [200,50]])
+```
+
+The `plot()` method can also be animated:
+
+```javascript
+polyline.animate(3000).plot([[0,0], [100,50], [50,100], [150,50], [200,50], [250,100], [300,50], [350,50]])
+```
+
### Polygon
The polygon element, unlike the polyline element, defines a closed shape consisting of a set of connected straight line segments: