|
@@ -150,7 +150,7 @@ namespace Spine {
|
|
|
|
|
|
Bone parent = this.parent;
|
|
Bone parent = this.parent;
|
|
if (parent == null) { // Root bone.
|
|
if (parent == null) { // Root bone.
|
|
- float rotationY = rotation + 90 + shearY, sx = skeleton.scaleX, sy = skeleton.scaleY;
|
|
|
|
|
|
+ float rotationY = rotation + 90 + shearY, sx = skeleton.ScaleX, sy = skeleton.ScaleY;
|
|
a = MathUtils.CosDeg(rotation + shearX) * scaleX * sx;
|
|
a = MathUtils.CosDeg(rotation + shearX) * scaleX * sx;
|
|
b = MathUtils.CosDeg(rotationY) * scaleY * sx;
|
|
b = MathUtils.CosDeg(rotationY) * scaleY * sx;
|
|
c = MathUtils.SinDeg(rotation + shearX) * scaleX * sy;
|
|
c = MathUtils.SinDeg(rotation + shearX) * scaleX * sy;
|
|
@@ -212,15 +212,15 @@ namespace Spine {
|
|
case TransformMode.NoScale:
|
|
case TransformMode.NoScale:
|
|
case TransformMode.NoScaleOrReflection: {
|
|
case TransformMode.NoScaleOrReflection: {
|
|
float cos = MathUtils.CosDeg(rotation), sin = MathUtils.SinDeg(rotation);
|
|
float cos = MathUtils.CosDeg(rotation), sin = MathUtils.SinDeg(rotation);
|
|
- float za = (pa * cos + pb * sin) / skeleton.scaleX;
|
|
|
|
- float zc = (pc * cos + pd * sin) / skeleton.scaleY;
|
|
|
|
|
|
+ float za = (pa * cos + pb * sin) / skeleton.ScaleX;
|
|
|
|
+ float zc = (pc * cos + pd * sin) / skeleton.ScaleY;
|
|
float s = (float)Math.Sqrt(za * za + zc * zc);
|
|
float s = (float)Math.Sqrt(za * za + zc * zc);
|
|
if (s > 0.00001f) s = 1 / s;
|
|
if (s > 0.00001f) s = 1 / s;
|
|
za *= s;
|
|
za *= s;
|
|
zc *= s;
|
|
zc *= s;
|
|
s = (float)Math.Sqrt(za * za + zc * zc);
|
|
s = (float)Math.Sqrt(za * za + zc * zc);
|
|
if (data.transformMode == TransformMode.NoScale
|
|
if (data.transformMode == TransformMode.NoScale
|
|
- && (pa * pd - pb * pc < 0) != (skeleton.scaleX < 0 != skeleton.scaleY < 0)) s = -s;
|
|
|
|
|
|
+ && (pa * pd - pb * pc < 0) != (skeleton.ScaleX < 0 != skeleton.ScaleY < 0)) s = -s;
|
|
|
|
|
|
float r = MathUtils.PI / 2 + MathUtils.Atan2(zc, za);
|
|
float r = MathUtils.PI / 2 + MathUtils.Atan2(zc, za);
|
|
float zb = MathUtils.Cos(r) * s;
|
|
float zb = MathUtils.Cos(r) * s;
|
|
@@ -237,10 +237,10 @@ namespace Spine {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- a *= skeleton.scaleX;
|
|
|
|
- b *= skeleton.scaleX;
|
|
|
|
- c *= skeleton.scaleY;
|
|
|
|
- d *= skeleton.scaleY;
|
|
|
|
|
|
+ a *= skeleton.ScaleX;
|
|
|
|
+ b *= skeleton.ScaleX;
|
|
|
|
+ c *= skeleton.ScaleY;
|
|
|
|
+ d *= skeleton.ScaleY;
|
|
}
|
|
}
|
|
|
|
|
|
public void SetToSetupPose () {
|
|
public void SetToSetupPose () {
|