diff options
author | wout <wout@impinc.co.uk> | 2013-08-01 13:32:56 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2013-08-01 13:32:56 +0100 |
commit | eecebe3cdfdae38f4e0613807e7fd64359cb84fd (patch) | |
tree | 64ecf24398abedbf4ba657fd6b5905652b83129e /README.md | |
parent | 21d6c0b30a530ce7746f789921c7135079f43338 (diff) | |
download | svg.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.md | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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: |