mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-08 03:36:52 +08:00
[ts] Fix applying flipping for noScale/noScaleOrReflection transform mode. See #951
This commit is contained in:
parent
1013e31268
commit
d8874cbad6
@ -2200,14 +2200,14 @@ var spine;
|
|||||||
var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
|
var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
|
||||||
var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
|
var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
|
||||||
var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;
|
var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;
|
||||||
|
if (this.data.transformMode != spine.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 != spine.TransformMode.NoScaleOrReflection ? pa * pd - pb * pc < 0 : this.skeleton.flipX != this.skeleton.flipY) {
|
|
||||||
this.b = -this.b;
|
|
||||||
this.d = -this.d;
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -2200,14 +2200,14 @@ var spine;
|
|||||||
var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
|
var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
|
||||||
var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
|
var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
|
||||||
var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;
|
var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;
|
||||||
|
if (this.data.transformMode != spine.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 != spine.TransformMode.NoScaleOrReflection ? pa * pd - pb * pc < 0 : this.skeleton.flipX != this.skeleton.flipY) {
|
|
||||||
this.b = -this.b;
|
|
||||||
this.d = -this.d;
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -2200,14 +2200,14 @@ var spine;
|
|||||||
var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
|
var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
|
||||||
var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
|
var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
|
||||||
var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;
|
var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;
|
||||||
|
if (this.data.transformMode != spine.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 != spine.TransformMode.NoScaleOrReflection ? pa * pd - pb * pc < 0 : this.skeleton.flipX != this.skeleton.flipY) {
|
|
||||||
this.b = -this.b;
|
|
||||||
this.d = -this.d;
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -2200,14 +2200,14 @@ var spine;
|
|||||||
var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
|
var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
|
||||||
var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
|
var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
|
||||||
var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;
|
var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;
|
||||||
|
if (this.data.transformMode != spine.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 != spine.TransformMode.NoScaleOrReflection ? pa * pd - pb * pc < 0 : this.skeleton.flipX != this.skeleton.flipY) {
|
|
||||||
this.b = -this.b;
|
|
||||||
this.d = -this.d;
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -2200,14 +2200,14 @@ var spine;
|
|||||||
var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
|
var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
|
||||||
var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
|
var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
|
||||||
var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;
|
var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;
|
||||||
|
if (this.data.transformMode != spine.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 != spine.TransformMode.NoScaleOrReflection ? pa * pd - pb * pc < 0 : this.skeleton.flipX != this.skeleton.flipY) {
|
|
||||||
this.b = -this.b;
|
|
||||||
this.d = -this.d;
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -2200,14 +2200,14 @@ var spine;
|
|||||||
var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
|
var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
|
||||||
var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
|
var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
|
||||||
var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;
|
var ld = spine.MathUtils.sinDeg(90 + shearY) * scaleY;
|
||||||
|
if (this.data.transformMode != spine.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 != spine.TransformMode.NoScaleOrReflection ? pa * pd - pb * pc < 0 : this.skeleton.flipX != this.skeleton.flipY) {
|
|
||||||
this.b = -this.b;
|
|
||||||
this.d = -this.d;
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -169,14 +169,14 @@ module spine {
|
|||||||
let lb = MathUtils.cosDeg(90 + shearY) * scaleY;
|
let lb = MathUtils.cosDeg(90 + shearY) * scaleY;
|
||||||
let lc = MathUtils.sinDeg(shearX) * scaleX;
|
let lc = MathUtils.sinDeg(shearX) * scaleX;
|
||||||
let ld = MathUtils.sinDeg(90 + shearY) * scaleY;
|
let 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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user