From b3317d7150ce875e7ad772e40ad700d37839da2f Mon Sep 17 00:00:00 2001 From: Saivan Date: Wed, 30 May 2018 01:48:35 +1000 Subject: Got looping working with only a single wait --- dirty.html | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'dirty.html') 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('').addTo('svg').size(100, 100).center(200, 200) -circle.loop(500, 6, true, [500, 1000, 1500]) - .move(500, 500) +// var circle = SVG('').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 -- cgit v1.2.3