mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-22 10:16:01 +08:00
[as3] Fix applying flipping for noScale/noScaleOrReflection transform mode. See #951
This commit is contained in:
parent
d8874cbad6
commit
d2f6758e42
Binary file not shown.
@ -188,14 +188,14 @@ package spine {
|
|||||||
lb = MathUtils.cosDeg(90 + shearY) * scaleY;
|
lb = MathUtils.cosDeg(90 + shearY) * scaleY;
|
||||||
lc = MathUtils.sinDeg(shearX) * scaleX;
|
lc = MathUtils.sinDeg(shearX) * scaleX;
|
||||||
ld = MathUtils.sinDeg(90 + shearY) * scaleY;
|
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.a = za * la + zb * lc;
|
||||||
this.b = za * lb + zb * ld;
|
this.b = za * lb + zb * ld;
|
||||||
this.c = zc * la + zd * lc;
|
this.c = zc * la + zd * lc;
|
||||||
this.d = zc * lb + zd * ld;
|
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;
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user