[ts] Fixes #1064, delay was calculated incorrectly for non-loop previous track entries.

This commit is contained in:
badlogic 2018-01-12 11:06:22 +01:00
parent 4f4a4e8dce
commit ce124e381e
13 changed files with 55 additions and 21 deletions

View File

@ -1521,8 +1521,13 @@ var spine;
last.next = entry;
if (delay <= 0) {
var duration = last.animationEnd - last.animationStart;
if (duration != 0)
delay += duration * (1 + ((last.trackTime / duration) | 0)) - this.data.getMix(last.animation, animation);
if (duration != 0) {
if (last.loop)
delay += duration * (1 + ((last.trackTime / duration) | 0));
else
delay += duration;
delay -= this.data.getMix(last.animation, animation);
}
else
delay = 0;
}

File diff suppressed because one or more lines are too long

View File

@ -1521,8 +1521,13 @@ var spine;
last.next = entry;
if (delay <= 0) {
var duration = last.animationEnd - last.animationStart;
if (duration != 0)
delay += duration * (1 + ((last.trackTime / duration) | 0)) - this.data.getMix(last.animation, animation);
if (duration != 0) {
if (last.loop)
delay += duration * (1 + ((last.trackTime / duration) | 0));
else
delay += duration;
delay -= this.data.getMix(last.animation, animation);
}
else
delay = 0;
}

File diff suppressed because one or more lines are too long

View File

@ -1521,8 +1521,13 @@ var spine;
last.next = entry;
if (delay <= 0) {
var duration = last.animationEnd - last.animationStart;
if (duration != 0)
delay += duration * (1 + ((last.trackTime / duration) | 0)) - this.data.getMix(last.animation, animation);
if (duration != 0) {
if (last.loop)
delay += duration * (1 + ((last.trackTime / duration) | 0));
else
delay += duration;
delay -= this.data.getMix(last.animation, animation);
}
else
delay = 0;
}

File diff suppressed because one or more lines are too long

View File

@ -1521,8 +1521,13 @@ var spine;
last.next = entry;
if (delay <= 0) {
var duration = last.animationEnd - last.animationStart;
if (duration != 0)
delay += duration * (1 + ((last.trackTime / duration) | 0)) - this.data.getMix(last.animation, animation);
if (duration != 0) {
if (last.loop)
delay += duration * (1 + ((last.trackTime / duration) | 0));
else
delay += duration;
delay -= this.data.getMix(last.animation, animation);
}
else
delay = 0;
}

File diff suppressed because one or more lines are too long

View File

@ -1521,8 +1521,13 @@ var spine;
last.next = entry;
if (delay <= 0) {
var duration = last.animationEnd - last.animationStart;
if (duration != 0)
delay += duration * (1 + ((last.trackTime / duration) | 0)) - this.data.getMix(last.animation, animation);
if (duration != 0) {
if (last.loop)
delay += duration * (1 + ((last.trackTime / duration) | 0));
else
delay += duration;
delay -= this.data.getMix(last.animation, animation);
}
else
delay = 0;
}

File diff suppressed because one or more lines are too long

View File

@ -1521,8 +1521,13 @@ var spine;
last.next = entry;
if (delay <= 0) {
var duration = last.animationEnd - last.animationStart;
if (duration != 0)
delay += duration * (1 + ((last.trackTime / duration) | 0)) - this.data.getMix(last.animation, animation);
if (duration != 0) {
if (last.loop)
delay += duration * (1 + ((last.trackTime / duration) | 0));
else
delay += duration;
delay -= this.data.getMix(last.animation, animation);
}
else
delay = 0;
}

File diff suppressed because one or more lines are too long

View File

@ -453,9 +453,13 @@ module spine {
last.next = entry;
if (delay <= 0) {
let duration = last.animationEnd - last.animationStart;
if (duration != 0)
delay += duration * (1 + ((last.trackTime / duration) | 0)) - this.data.getMix(last.animation, animation);
else
if (duration != 0) {
if (last.loop)
delay += duration * (1 + ((last.trackTime / duration) | 0));
else
delay += duration;
delay -= this.data.getMix(last.animation, animation);
} else
delay = 0;
}
}