Skip to content

Commit

Permalink
[as3] Fix applying flipping for noScale/noScaleOrReflection transform…
Browse files Browse the repository at this point in the history
… mode. See #951
  • Loading branch information
badlogic committed Jul 19, 2017
1 parent d8874cb commit d2f6758
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Binary file modified spine-as3/spine-as3-example/lib/spine-as3.swc
Binary file not shown.
10 changes: 5 additions & 5 deletions spine-as3/spine-as3/src/spine/Bone.as
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,14 @@ package spine {
lb = MathUtils.cosDeg(90 + shearY) * scaleY;
lc = MathUtils.sinDeg(shearX) * scaleX;
ld = MathUtils.sinDeg(90 + shearY) * scaleY;
if (this.data.transformMode != TransformMode.noScaleOrReflection ? pa * pd - pb * pc < 0 : this.skeleton.flipX != this.skeleton.flipY) {
zb = -zb;
zd = -zd;
}
this.a = za * la + zb * lc;
this.b = za * lb + zb * ld;
this.c = zc * la + zd * lc;
this.d = zc * lb + zd * ld;
if (this.data.transformMode != TransformMode.noScaleOrReflection ? pa * pd - pb * pc < 0 : this.skeleton.flipX != this.skeleton.flipY) {
this.b = -this.b;
this.d = -this.d;
}
this.d = zc * lb + zd * ld;
return;
}
}
Expand Down
Binary file modified spine-starling/spine-starling-example/lib/spine-as3.swc
Binary file not shown.
Binary file modified spine-starling/spine-starling/lib/spine-as3.swc
Binary file not shown.

0 comments on commit d2f6758

Please sign in to comment.