Skip to content

Commit

Permalink
[libgdx] Fixed additive scaling mixing.
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanSweet committed Jan 26, 2022
1 parent 93ff066 commit a5b6762
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -739,8 +739,8 @@ public void apply (Skeleton skeleton, float lastTime, float time, @Null Array<Ev
bone.scaleY = by + (Math.abs(y) * Math.signum(by) - by) * alpha;
break;
case add:
bone.scaleX = (x - bone.data.scaleX) * alpha;
bone.scaleY = (y - bone.data.scaleY) * alpha;
bone.scaleX += (x - bone.data.scaleX) * alpha;
bone.scaleY += (y - bone.data.scaleY) * alpha;
}
} else {
switch (blend) {
Expand Down Expand Up @@ -818,7 +818,7 @@ public void apply (Skeleton skeleton, float lastTime, float time, @Null Array<Ev
bone.scaleX = bx + (Math.abs(x) * Math.signum(bx) - bx) * alpha;
break;
case add:
bone.scaleX = (x - bone.data.scaleX) * alpha;
bone.scaleX += (x - bone.data.scaleX) * alpha;
}
} else {
switch (blend) {
Expand Down Expand Up @@ -891,7 +891,7 @@ public void apply (Skeleton skeleton, float lastTime, float time, @Null Array<Ev
bone.scaleY = by + (Math.abs(y) * Math.signum(by) - by) * alpha;
break;
case add:
bone.scaleY = (y - bone.data.scaleY) * alpha;
bone.scaleY += (y - bone.data.scaleY) * alpha;
}
} else {
switch (blend) {
Expand Down

0 comments on commit a5b6762

Please sign in to comment.