mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 09:16:01 +08:00
[ts] Port of 81baef0b5bb181376d15b0208697db8dabce095e
This commit is contained in:
parent
ca75d3605e
commit
838b9dd4c3
@ -2222,7 +2222,7 @@ export class SequenceTimeline extends Timeline implements SlotTimeline {
|
||||
break;
|
||||
case SequenceMode.pingpong: {
|
||||
let n = (count << 1) - 2;
|
||||
index %= n;
|
||||
index = n == 0 ? 0 : index % n;
|
||||
if (index >= count) index = n - index;
|
||||
break;
|
||||
}
|
||||
@ -2234,7 +2234,7 @@ export class SequenceTimeline extends Timeline implements SlotTimeline {
|
||||
break;
|
||||
case SequenceMode.pingpongReverse: {
|
||||
let n = (count << 1) - 2;
|
||||
index = (index + count - 1) % n;
|
||||
index = n == 0 ? 0 : (index + count - 1) % n;
|
||||
if (index >= count) index = n - index;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user