[ts] Fix applying flipping for noScale/noScaleOrReflection transform mode. See #951

This commit is contained in:
badlogic 2017-07-19 13:59:32 +02:00
parent 1013e31268
commit d8874cbad6
13 changed files with 34 additions and 34 deletions

View File

@ -2200,14 +2200,14 @@ var spine;
var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
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.b = za * lb + zb * ld;
this.c = zc * la + zd * lc;
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;
}
}

File diff suppressed because one or more lines are too long

View File

@ -2200,14 +2200,14 @@ var spine;
var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
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.b = za * lb + zb * ld;
this.c = zc * la + zd * lc;
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;
}
}

File diff suppressed because one or more lines are too long

View File

@ -2200,14 +2200,14 @@ var spine;
var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
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.b = za * lb + zb * ld;
this.c = zc * la + zd * lc;
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;
}
}

File diff suppressed because one or more lines are too long

View File

@ -2200,14 +2200,14 @@ var spine;
var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
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.b = za * lb + zb * ld;
this.c = zc * la + zd * lc;
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;
}
}

File diff suppressed because one or more lines are too long

View File

@ -2200,14 +2200,14 @@ var spine;
var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
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.b = za * lb + zb * ld;
this.c = zc * la + zd * lc;
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;
}
}

File diff suppressed because one or more lines are too long

View File

@ -2200,14 +2200,14 @@ var spine;
var lb = spine.MathUtils.cosDeg(90 + shearY) * scaleY;
var lc = spine.MathUtils.sinDeg(shearX) * scaleX;
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.b = za * lb + zb * ld;
this.c = zc * la + zd * lc;
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;
}
}

File diff suppressed because one or more lines are too long

View File

@ -169,14 +169,14 @@ module spine {
let lb = MathUtils.cosDeg(90 + shearY) * scaleY;
let lc = MathUtils.sinDeg(shearX) * scaleX;
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.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;
}
return;
}
}