mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Formatting.
This commit is contained in:
parent
6d87c3bddb
commit
5bc5c6511e
@ -86,7 +86,6 @@ public class TransformConstraint implements Constraint {
|
|||||||
applyRelativeLocal();
|
applyRelativeLocal();
|
||||||
else
|
else
|
||||||
applyAbsoluteLocal();
|
applyAbsoluteLocal();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (data.relative)
|
if (data.relative)
|
||||||
applyRelativeWorld();
|
applyRelativeWorld();
|
||||||
@ -131,11 +130,11 @@ public class TransformConstraint implements Constraint {
|
|||||||
|
|
||||||
if (scaleMix > 0) {
|
if (scaleMix > 0) {
|
||||||
float s = (float)Math.sqrt(bone.a * bone.a + bone.c * bone.c);
|
float s = (float)Math.sqrt(bone.a * bone.a + bone.c * bone.c);
|
||||||
if (s > 0.00001f) s = (s + ((float)Math.sqrt(ta * ta + tc * tc) - s + data.offsetScaleX) * scaleMix) / s;
|
if (s != 0) s = (s + ((float)Math.sqrt(ta * ta + tc * tc) - s + data.offsetScaleX) * scaleMix) / s;
|
||||||
bone.a *= s;
|
bone.a *= s;
|
||||||
bone.c *= s;
|
bone.c *= s;
|
||||||
s = (float)Math.sqrt(bone.b * bone.b + bone.d * bone.d);
|
s = (float)Math.sqrt(bone.b * bone.b + bone.d * bone.d);
|
||||||
if (s > 0.00001f) s = (s + ((float)Math.sqrt(tb * tb + td * td) - s + data.offsetScaleY) * scaleMix) / s;
|
if (s != 0) s = (s + ((float)Math.sqrt(tb * tb + td * td) - s + data.offsetScaleY) * scaleMix) / s;
|
||||||
bone.b *= s;
|
bone.b *= s;
|
||||||
bone.d *= s;
|
bone.d *= s;
|
||||||
modified = true;
|
modified = true;
|
||||||
@ -244,8 +243,8 @@ public class TransformConstraint implements Constraint {
|
|||||||
|
|
||||||
float scaleX = bone.ascaleX, scaleY = bone.ascaleY;
|
float scaleX = bone.ascaleX, scaleY = bone.ascaleY;
|
||||||
if (scaleMix > 0) {
|
if (scaleMix > 0) {
|
||||||
if (scaleX > 0.00001f) scaleX = (scaleX + (target.ascaleX - scaleX + data.offsetScaleX) * scaleMix) / scaleX;
|
if (scaleX != 0) scaleX = (scaleX + (target.ascaleX - scaleX + data.offsetScaleX) * scaleMix) / scaleX;
|
||||||
if (scaleY > 0.00001f) scaleY = (scaleY + (target.ascaleY - scaleY + data.offsetScaleY) * scaleMix) / scaleY;
|
if (scaleY != 0) scaleY = (scaleY + (target.ascaleY - scaleY + data.offsetScaleY) * scaleMix) / scaleY;
|
||||||
}
|
}
|
||||||
|
|
||||||
float shearY = bone.ashearY;
|
float shearY = bone.ashearY;
|
||||||
@ -279,8 +278,8 @@ public class TransformConstraint implements Constraint {
|
|||||||
|
|
||||||
float scaleX = bone.ascaleX, scaleY = bone.ascaleY;
|
float scaleX = bone.ascaleX, scaleY = bone.ascaleY;
|
||||||
if (scaleMix > 0) {
|
if (scaleMix > 0) {
|
||||||
if (scaleX > 0.00001f) scaleX *= ((target.ascaleX - 1 + data.offsetScaleX) * scaleMix) + 1;
|
scaleX *= ((target.ascaleX - 1 + data.offsetScaleX) * scaleMix) + 1;
|
||||||
if (scaleY > 0.00001f) scaleY *= ((target.ascaleY - 1 + data.offsetScaleY) * scaleMix) + 1;
|
scaleY *= ((target.ascaleY - 1 + data.offsetScaleY) * scaleMix) + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
float shearY = bone.ashearY;
|
float shearY = bone.ashearY;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user