aboutsummaryrefslogtreecommitdiffstats
path: root/dirty.html
diff options
context:
space:
mode:
authorSaivan <savian@me.com>2018-05-29 21:45:16 +1000
committerSaivan <savian@me.com>2018-05-29 21:45:16 +1000
commitfe0360187801b6a71281fe682e1f3cea49eda35b (patch)
treed67870820e85c4f2dda8d2b5431d1d8e3fea91f3 /dirty.html
parent366038d4a52a4f9b434e86b31dc31525b885855b (diff)
downloadsvg.js-fe0360187801b6a71281fe682e1f3cea49eda35b.tar.gz
svg.js-fe0360187801b6a71281fe682e1f3cea49eda35b.zip
Looping is now working and code is generally cleaner
Diffstat (limited to 'dirty.html')
-rw-r--r--dirty.html20
1 files changed, 13 insertions, 7 deletions
diff --git a/dirty.html b/dirty.html
index bb91400..35b4189 100644
--- a/dirty.html
+++ b/dirty.html
@@ -101,13 +101,13 @@ function getColor(t) {
// ])
// })
-var mover = SVG('<ellipse>').size(50, 50).center(100, 100).addTo('svg')
-var anim = mover.animate(new SVG.Spring(500, 10)).move(500, 500)
-
-SVG.on(document, 'mousemove', function (e) {
- var p = mover.point(e.pageX, e.pageY)
- anim.center(p.x, p.y)
-})
+// var mover = SVG('<ellipse>').size(50, 50).center(100, 100).addTo('svg')
+// var anim = mover.animate(new SVG.Spring(500, 10)).move(500, 500)
+//
+// SVG.on(document, 'mousemove', function (e) {
+// var p = mover.point(e.pageX, e.pageY)
+// anim.center(p.x, p.y)
+// })
// var timeline = new SVG.Timeline().pause()
// var runner = new SVG.Runner(100000)
@@ -122,6 +122,12 @@ SVG.on(document, 'mousemove', function (e) {
//timeline.play()
//timeline.finish()
+
+var circle = SVG('<circle>').addTo('svg').size(100, 100).center(200, 200)
+circle.loop(500, 6, true, [500, 1000, 1500])
+ .move(500, 500)
+
+
</script>
</body>