Skip to content

Commit

Permalink
[libgdx] Don't use DIP_MIX across tracks.
Browse files Browse the repository at this point in the history
`DIP_MIX` finds the next entry which does NOT key the timeline property and mixes out the "dip fix" (which is where a timeline is fully applied because a subsequent timeline keys the same property). This handles the case of A->B->C->D where A, B, and C key the same property but D doesn't. A uses the dip fix, then when D mixes in, `DIP_MIX` causes A to mix out, affecting B and C. If D is in another track, it is applied concurrently with A, B, and C so should not cause A to mix out.
  • Loading branch information
NathanSweet committed Jun 24, 2017
1 parent 114447b commit 61e54a5
Showing 1 changed file with 1 addition and 5 deletions.
Expand Up @@ -610,13 +610,9 @@ private void animationsChanged () {
propertyIDs.clear();
Array<TrackEntry> mixingTo = this.mixingTo;

TrackEntry lastEntry = null;
for (int i = 0, n = tracks.size; i < n; i++) {
TrackEntry entry = tracks.get(i);
if (entry != null) {
entry.setTimelineData(lastEntry, mixingTo, propertyIDs);
lastEntry = entry;
}
if (entry != null) entry.setTimelineData(null, mixingTo, propertyIDs);
}
}

Expand Down

1 comment on commit 61e54a5

@NathanSweet
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.