summaryrefslogtreecommitdiffstats
path: root/dirty.html
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-07-04 11:57:00 +0200
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-07-04 11:57:00 +0200
commitac854317c3ef89ca2c25b6293530babf1cd9b28c (patch)
tree98ef16766c3ced950a0349210490fdc96611da3a /dirty.html
parent4688ab0d651547cb018c8f00590ddb18de40c6a1 (diff)
downloadsvg.js-ac854317c3ef89ca2c25b6293530babf1cd9b28c.tar.gz
svg.js-ac854317c3ef89ca2c25b6293530babf1cd9b28c.zip
fix origin transformation
Diffstat (limited to 'dirty.html')
-rw-r--r--dirty.html21
1 files changed, 11 insertions, 10 deletions
diff --git a/dirty.html b/dirty.html
index 1670e9c..896449b 100644
--- a/dirty.html
+++ b/dirty.html
@@ -271,21 +271,22 @@ a.timeline().source(() => {
return timer
})
-
-let el = canvas.ellipse(20, 20)
-window.moveit = function (x, y) {
- el.move(x, y)
-}
-
-
let obj = { rotate: 180, origin: 'center', translate: [300, 0] }
-let obj2 = { rotate: -180, origin: 'center' }
+let obj2 = { rotate: 360, origin: 'center' }
a.clone() // startPosition
a.clone().transform(obj, true).transform(obj2, true) // endPosition
-//a.animate(new SVG.Spring(50, 30)).transform(obj) // animation
-a.animate(300).transform(obj, true).transform(obj2, true) // animation
+// that works
+a.animate(new SVG.Spring(50, 30)).transform(obj) // animation
+// that breaks (why??)
+// a.clone().animate(new SVG.Spring(50, 30)).transform(obj) // animation
+//a.animate(300).transform(obj, true).transform(obj2, true) // animation
+
+
+
+
+//setTimeout(()=>console.log(a.transform()), 6000)
//
// // Put an ellipse where we expect the object to be
// canvas.ellipse(30, 30).center(100, 500)