mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-09 12:16:53 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
f8fe6c3246
@ -399,7 +399,7 @@ spine.IkConstraint.apply2 = function (parent, child, targetX, targetY, bendDir,
|
|||||||
if (cos < -1) cos = -1;
|
if (cos < -1) cos = -1;
|
||||||
else if (cos > 1) cos = 1;
|
else if (cos > 1) cos = 1;
|
||||||
a2 = Math.acos(cos) * bendDir;
|
a2 = Math.acos(cos) * bendDir;
|
||||||
var a = l1 + l2 * cos, o = l2 * sin(a2);
|
var a = l1 + l2 * cos, o = l2 * Math.sin(a2);
|
||||||
a1 = Math.atan2(ty * a - tx * o, tx * a + ty * o);
|
a1 = Math.atan2(ty * a - tx * o, tx * a + ty * o);
|
||||||
} else {
|
} else {
|
||||||
var a = psx * l2, b = psy * l2, ta = Math.atan2(ty, tx);
|
var a = psx * l2, b = psy * l2, ta = Math.atan2(ty, tx);
|
||||||
@ -459,8 +459,8 @@ spine.IkConstraint.apply2 = function (parent, child, targetX, targetY, bendDir,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
var os = Math.atan2(cy, cx) * s2;
|
var os = Math.atan2(cy, cx) * s2;
|
||||||
a1 = (a1 - os) * radDeg + os1;
|
a1 = (a1 - os) * spine.radDeg + os1;
|
||||||
a2 = (a2 + os) * radDeg * s2 + os2;
|
a2 = (a2 + os) * spine.radDeg * s2 + os2;
|
||||||
if (a1 > 180) a1 -= 360;
|
if (a1 > 180) a1 -= 360;
|
||||||
else if (a1 < -180) a1 += 360;
|
else if (a1 < -180) a1 += 360;
|
||||||
if (a2 > 180) a2 -= 360;
|
if (a2 > 180) a2 -= 360;
|
||||||
@ -2856,4 +2856,4 @@ spine.SkeletonBounds.prototype = {
|
|||||||
getHeight: function () {
|
getHeight: function () {
|
||||||
return this.maxY - this.minY;
|
return this.maxY - this.minY;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -344,18 +344,20 @@ namespace Spine.Unity {
|
|||||||
submeshVertexCount += attachmentVertexCount;
|
submeshVertexCount += attachmentVertexCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
workingSubmeshInstructions.Add(
|
if (submeshVertexCount != 0) {
|
||||||
new Spine.Unity.MeshGeneration.SubmeshInstruction {
|
workingSubmeshInstructions.Add(
|
||||||
skeleton = this.skeleton,
|
new Spine.Unity.MeshGeneration.SubmeshInstruction {
|
||||||
material = lastMaterial,
|
skeleton = this.skeleton,
|
||||||
startSlot = submeshStartSlotIndex,
|
material = lastMaterial,
|
||||||
endSlot = drawOrderCount,
|
startSlot = submeshStartSlotIndex,
|
||||||
triangleCount = submeshTriangleCount,
|
endSlot = drawOrderCount,
|
||||||
firstVertexIndex = submeshFirstVertex,
|
triangleCount = submeshTriangleCount,
|
||||||
vertexCount = submeshVertexCount,
|
firstVertexIndex = submeshFirstVertex,
|
||||||
forceSeparate = false
|
vertexCount = submeshVertexCount,
|
||||||
}
|
forceSeparate = false
|
||||||
);
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
workingInstruction.vertexCount = vertexCount;
|
workingInstruction.vertexCount = vertexCount;
|
||||||
workingInstruction.immutableTriangles = this.immutableTriangles;
|
workingInstruction.immutableTriangles = this.immutableTriangles;
|
||||||
@ -1009,4 +1011,4 @@ namespace Spine.Unity {
|
|||||||
public int firstVertex = -1;
|
public int firstVertex = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user