aboutsummaryrefslogtreecommitdiffstats
path: root/dirty.html
diff options
context:
space:
mode:
authorSaivan <savian@me.com>2018-09-10 19:40:50 +1000
committerSaivan <savian@me.com>2018-09-10 19:40:50 +1000
commita4c502febf836f02c13a8c1550632eeed09476da (patch)
tree49060a7b7c50c1e56cd980d3427aa3b7f3362cdb /dirty.html
parentee38cefead9c2803db3a4076a505b8b9eb3947e8 (diff)
downloadsvg.js-a4c502febf836f02c13a8c1550632eeed09476da.tar.gz
svg.js-a4c502febf836f02c13a8c1550632eeed09476da.zip
Found and started fixing an error with the Timeline.schedule function
This commit finds an error in the scheduling duration that we need to fix.
Diffstat (limited to 'dirty.html')
-rw-r--r--dirty.html20
1 files changed, 10 insertions, 10 deletions
diff --git a/dirty.html b/dirty.html
index db16942..ab9e3c8 100644
--- a/dirty.html
+++ b/dirty.html
@@ -300,25 +300,25 @@ let r = canvas.rect(200, 400).move(100, 100)
.transform({ tx: 300, ty: 500, origin: 'top-left' })
// Normal usage
-let wait = 500
-let rAnim = r.clone().attr('fill', 'red').animate(wait)
+let wait = 1000
+let rAnim = r.clone().attr('fill', '#f00').animate(wait).attr('fill', '#0f0')
let rDecl = r.clone().attr('fill', 'blue').animate(new SVG.Spring(wait, 15))
// Move once
setTimeout(() => {
let trans = {tx: 500, ty: 300}
r.transform(trans, true)
- rAnim.animate(wait).transform(trans, true)
- rDecl.transform(trans, true)
+ rAnim.animate(wait, 0, 'start').transform(trans, true)
+ //rDecl.transform(trans, true)
}, wait)
// Move again
-setTimeout(() => {
- let trans = {rotate: 300}
- r.transform(trans, true)
- rAnim.animate(wait).transform(trans, true)
- rDecl.transform(trans, true)
-}, wait)
+// setTimeout(() => {
+// let trans = {rotate: 300}
+// r.transform(trans, true)
+// rAnim.animate(wait).transform(trans, true)
+// //rDecl.transform(trans, true)
+// }, 1.5 * wait )