Skip to content

Commit

Permalink
[as3] Port of commit 8290353. Fix for hold previous on 3+ animations …
Browse files Browse the repository at this point in the history
…causing dipping. See EsotericSoftware#1738.
  • Loading branch information
badlogic committed Aug 13, 2020
1 parent 0f8ffd6 commit bde827e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
Binary file modified spine-as3/spine-as3/lib/spine-as3.swc
Binary file not shown.
20 changes: 15 additions & 5 deletions spine-as3/spine-as3/src/spine/animation/AnimationState.as
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ package spine.animation {
public class AnimationState {
public static var SUBSEQUENT : int = 0;
public static var FIRST : int = 1;
public static var HOLD : int = 2;
public static var HOLD_MIX : int = 3;
public static var HOLD_SUBSEQUENT : int = 2;
public static var HOLD_FIRST : int = 3;
public static var HOLD_MIX : int = 4;
public static var SETUP : int = 1;
public static var CURRENT : int = 2;

Expand Down Expand Up @@ -281,7 +282,11 @@ package spine.animation {
timelineBlend = MixBlend.setup;
alpha = alphaMix;
break;
case HOLD:
case HOLD_SUBSEQUENT:
timelineBlend = blend;
alpha = alphaHold;
break;
case HOLD_FIRST:
timelineBlend = MixBlend.setup;
alpha = alphaHold;
break;
Expand Down Expand Up @@ -664,8 +669,13 @@ package spine.animation {
var i : int = 0;
if (to != null && to.holdPrevious) {
for (i = 0; i < timelinesCount; i++) {
if (!propertyIDs[timelines[i].getPropertyId().toString()]) {
timelineMode[i] = HOLD_FIRST;
} else {
timelineMode[i] = HOLD_SUBSEQUENT;
}
propertyIDs[timelines[i].getPropertyId().toString()] = true;
timelineMode[i] = HOLD;

}
return;
}
Expand All @@ -692,7 +702,7 @@ package spine.animation {
}
break;
}
timelineMode[i] = AnimationState.HOLD;
timelineMode[i] = AnimationState.HOLD_FIRST;
}
}
}
Expand Down
Binary file modified spine-starling/spine-starling/lib/spine-starling.swc
Binary file not shown.

0 comments on commit bde827e

Please sign in to comment.