[ts] Fix translation for transform constraint relative world mode

This commit is contained in:
badlogic 2020-12-03 14:37:19 +01:00
parent 31752e9d5b
commit 1ca4f915ee
13 changed files with 48 additions and 8 deletions

View File

@ -8068,6 +8068,12 @@ var spine;
bone.c = sin * a + cos * c;
bone.d = sin * b + cos * d;
}
if (translate) {
var temp = this.temp;
target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));
bone.worldX += temp.x * mixX;
bone.worldY += temp.y * mixY;
}
if (mixScaleX != 0) {
var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * mixScaleX + 1;
bone.a *= s;

File diff suppressed because one or more lines are too long

View File

@ -8068,6 +8068,12 @@ var spine;
bone.c = sin * a + cos * c;
bone.d = sin * b + cos * d;
}
if (translate) {
var temp = this.temp;
target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));
bone.worldX += temp.x * mixX;
bone.worldY += temp.y * mixY;
}
if (mixScaleX != 0) {
var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * mixScaleX + 1;
bone.a *= s;

File diff suppressed because one or more lines are too long

View File

@ -8068,6 +8068,12 @@ var spine;
bone.c = sin * a + cos * c;
bone.d = sin * b + cos * d;
}
if (translate) {
var temp = this.temp;
target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));
bone.worldX += temp.x * mixX;
bone.worldY += temp.y * mixY;
}
if (mixScaleX != 0) {
var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * mixScaleX + 1;
bone.a *= s;

File diff suppressed because one or more lines are too long

View File

@ -8068,6 +8068,12 @@ var spine;
bone.c = sin * a + cos * c;
bone.d = sin * b + cos * d;
}
if (translate) {
var temp = this.temp;
target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));
bone.worldX += temp.x * mixX;
bone.worldY += temp.y * mixY;
}
if (mixScaleX != 0) {
var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * mixScaleX + 1;
bone.a *= s;

File diff suppressed because one or more lines are too long

View File

@ -8068,6 +8068,12 @@ var spine;
bone.c = sin * a + cos * c;
bone.d = sin * b + cos * d;
}
if (translate) {
var temp = this.temp;
target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));
bone.worldX += temp.x * mixX;
bone.worldY += temp.y * mixY;
}
if (mixScaleX != 0) {
var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * mixScaleX + 1;
bone.a *= s;

File diff suppressed because one or more lines are too long

View File

@ -8068,6 +8068,12 @@ var spine;
bone.c = sin * a + cos * c;
bone.d = sin * b + cos * d;
}
if (translate) {
var temp = this.temp;
target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));
bone.worldX += temp.x * mixX;
bone.worldY += temp.y * mixY;
}
if (mixScaleX != 0) {
var s = (Math.sqrt(ta * ta + tc * tc) - 1 + this.data.offsetScaleX) * mixScaleX + 1;
bone.a *= s;

File diff suppressed because one or more lines are too long

View File

@ -182,7 +182,13 @@ module spine {
bone.b = cos * b - sin * d;
bone.c = sin * a + cos * c;
bone.d = sin * b + cos * d;
}
if (translate) {
let temp = this.temp;
target.localToWorld(temp.set(this.data.offsetX, this.data.offsetY));
bone.worldX += temp.x * mixX;
bone.worldY += temp.y * mixY;
}
if (mixScaleX != 0) {
@ -194,7 +200,6 @@ module spine {
let s = (Math.sqrt(tb * tb + td * td) - 1 + this.data.offsetScaleY) * mixScaleY + 1;
bone.b *= s;
bone.d *= s;
}
if (mixShearY > 0) {
@ -208,7 +213,6 @@ module spine {
let s = Math.sqrt(b * b + d * d);
bone.b = Math.cos(r) * s;
bone.d = Math.sin(r) * s;
}
bone.appliedValid = false;