summaryrefslogtreecommitdiffstats
path: root/dirty.html
diff options
context:
space:
mode:
authorSaivan <savian@me.com>2018-05-30 01:48:35 +1000
committerSaivan <savian@me.com>2018-05-30 01:48:35 +1000
commitb3317d7150ce875e7ad772e40ad700d37839da2f (patch)
tree68570d076e397741604152210933bcece8bd1eee /dirty.html
parentfe0360187801b6a71281fe682e1f3cea49eda35b (diff)
downloadsvg.js-b3317d7150ce875e7ad772e40ad700d37839da2f.tar.gz
svg.js-b3317d7150ce875e7ad772e40ad700d37839da2f.zip
Got looping working with only a single wait
Diffstat (limited to 'dirty.html')
-rw-r--r--dirty.html21
1 files changed, 18 insertions, 3 deletions
diff --git a/dirty.html b/dirty.html
index 35b4189..26648a8 100644
--- a/dirty.html
+++ b/dirty.html
@@ -123,10 +123,25 @@ function getColor(t) {
//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)
+// var circle = SVG('<circle>').addTo('svg').size(100, 100).center(200, 200)
+// var runner = circle.animate(2000)
+// .loop(Infinity, true, 2000)
+// .ease('<>')
+// .center(500, 200)
+
+var r = new SVG.Runner(1000).loop(10, false, 100)
+r.queue(null, console.log)
+
+r.step(1200) // should be 0.1s
+r.step(-300) // should be 0.9s
+
+
+// r.step(300) // should be 0.1
+// r.step(2 * 1100) // should be 0
+// r.step(-50) // 0.05
+// r.step(-100)
+// r.step(-100) // 0.95
</script>