mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-24 18:51:25 +08:00
[ts] Fix bugs in ported code for #2027
This commit is contained in:
parent
ffb9e75b09
commit
28dc5dd2e8
@ -279,6 +279,7 @@ export class AnimationState {
|
|||||||
|
|
||||||
let shortestRotation = from.shortestRotation;
|
let shortestRotation = from.shortestRotation;
|
||||||
let firstFrame = !shortestRotation && from.timelinesRotation.length != timelineCount << 1;
|
let firstFrame = !shortestRotation && from.timelinesRotation.length != timelineCount << 1;
|
||||||
|
if (firstFrame) from.timelinesRotation.length = timelineCount << 1;
|
||||||
|
|
||||||
from.totalAlpha = 0;
|
from.totalAlpha = 0;
|
||||||
for (let i = 0; i < timelineCount; i++) {
|
for (let i = 0; i < timelineCount; i++) {
|
||||||
@ -312,7 +313,7 @@ export class AnimationState {
|
|||||||
}
|
}
|
||||||
from.totalAlpha += alpha;
|
from.totalAlpha += alpha;
|
||||||
|
|
||||||
if (shortestRotation && timeline instanceof RotateTimeline)
|
if (!shortestRotation && timeline instanceof RotateTimeline)
|
||||||
this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, from.timelinesRotation, i << 1, firstFrame);
|
this.applyRotateTimeline(timeline, skeleton, applyTime, alpha, timelineBlend, from.timelinesRotation, i << 1, firstFrame);
|
||||||
else if (timeline instanceof AttachmentTimeline)
|
else if (timeline instanceof AttachmentTimeline)
|
||||||
this.applyAttachmentTimeline(timeline, skeleton, applyTime, timelineBlend, attachments);
|
this.applyAttachmentTimeline(timeline, skeleton, applyTime, timelineBlend, attachments);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user