mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
[ts] Fix translation for transform constraint relative world mode
This commit is contained in:
parent
31752e9d5b
commit
1ca4f915ee
@ -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
@ -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
@ -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
@ -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
@ -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
@ -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
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user