[runtimes] Port of fix for TransformMode.noRotationOrReflection applying skeleton scale twice. See #1668.

This commit is contained in:
badlogic 2020-05-06 19:47:08 +02:00
parent c73f8c1f42
commit 6a317a1e3f
19 changed files with 23 additions and 22 deletions

View File

@ -161,7 +161,7 @@ package spine {
this.b = pa * lb - pb * ld;
this.c = pc * la + pd * lc;
this.d = pc * lb + pd * ld;
break;
return;
}
case TransformMode.noScale:
case TransformMode.noScaleOrReflection: {

View File

@ -139,7 +139,7 @@ void spBone_updateWorldTransformWith (spBone* self, float x, float y, float rota
CONST_CAST(float, self->b) = pa * lb - pb * ld;
CONST_CAST(float, self->c) = pc * la + pd * lc;
CONST_CAST(float, self->d) = pc * lb + pd * ld;
break;
return;
}
case SP_TRANSFORMMODE_NOSCALE:
case SP_TRANSFORMMODE_NOSCALEORREFLECTION: {

View File

@ -168,7 +168,7 @@ void Bone::updateWorldTransform(float x, float y, float rotation, float scaleX,
_b = pa * lb - pb * ld;
_c = pc * la + pd * lc;
_d = pc * lb + pd * ld;
break;
return;
}
case TransformMode_NoScale:
case TransformMode_NoScaleOrReflection: {

View File

@ -162,6 +162,7 @@ function Bone:updateWorldTransformWith (x, y, rotation, scaleX, scaleY, shearX,
self.b = pa * lb - pb * ld
self.c = pc * la + pd * lc
self.d = pc * lb + pd * ld
return
elseif transformMode == TransformMode.noScale or transformMode == TransformMode.noScaleOrReflection then
local cos = math_cos(math_rad(rotation))
local sin = math_sin(math_rad(rotation))

View File

@ -2583,7 +2583,7 @@ var spine;
this.b = pa * lb - pb * ld;
this.c = pc * la + pd * lc;
this.d = pc * lb + pd * ld;
break;
return;
}
case spine.TransformMode.NoScale:
case spine.TransformMode.NoScaleOrReflection: {

File diff suppressed because one or more lines are too long

View File

@ -2583,7 +2583,7 @@ var spine;
this.b = pa * lb - pb * ld;
this.c = pc * la + pd * lc;
this.d = pc * lb + pd * ld;
break;
return;
}
case spine.TransformMode.NoScale:
case spine.TransformMode.NoScaleOrReflection: {

File diff suppressed because one or more lines are too long

View File

@ -2583,7 +2583,7 @@ var spine;
this.b = pa * lb - pb * ld;
this.c = pc * la + pd * lc;
this.d = pc * lb + pd * ld;
break;
return;
}
case spine.TransformMode.NoScale:
case spine.TransformMode.NoScaleOrReflection: {

File diff suppressed because one or more lines are too long

View File

@ -2583,7 +2583,7 @@ var spine;
this.b = pa * lb - pb * ld;
this.c = pc * la + pd * lc;
this.d = pc * lb + pd * ld;
break;
return;
}
case spine.TransformMode.NoScale:
case spine.TransformMode.NoScaleOrReflection: {

File diff suppressed because one or more lines are too long

View File

@ -2583,7 +2583,7 @@ var spine;
this.b = pa * lb - pb * ld;
this.c = pc * la + pd * lc;
this.d = pc * lb + pd * ld;
break;
return;
}
case spine.TransformMode.NoScale:
case spine.TransformMode.NoScaleOrReflection: {

File diff suppressed because one or more lines are too long

View File

@ -2583,7 +2583,7 @@ var spine;
this.b = pa * lb - pb * ld;
this.c = pc * la + pd * lc;
this.d = pc * lb + pd * ld;
break;
return;
}
case spine.TransformMode.NoScale:
case spine.TransformMode.NoScaleOrReflection: {

File diff suppressed because one or more lines are too long

View File

@ -219,7 +219,7 @@ module spine {
this.b = pa * lb - pb * ld;
this.c = pc * la + pd * lc;
this.d = pc * lb + pd * ld;
break;
return;
}
case TransformMode.NoScale:
case TransformMode.NoScaleOrReflection: {