mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-01 21:29:07 +08:00
[unity] Minor: refactoring, variable renamed.
This commit is contained in:
parent
7d0833f881
commit
92728548b7
@ -813,8 +813,8 @@ namespace Spine.Unity {
|
|||||||
b2.x *= alpha;
|
b2.x *= alpha;
|
||||||
b2.y = slot.Data.BlendMode == BlendMode.Additive ? 0 : alpha;
|
b2.y = slot.Data.BlendMode == BlendMode.Additive ? 0 : alpha;
|
||||||
}
|
}
|
||||||
int meshVertexCount = meshAttachment.WorldVerticesLength;
|
int verticesArrayLength = meshAttachment.WorldVerticesLength;
|
||||||
for (int iii = 0; iii < meshVertexCount; iii += 2) {
|
for (int iii = 0; iii < verticesArrayLength; iii += 2) {
|
||||||
uv2i[vi] = rg;
|
uv2i[vi] = rg;
|
||||||
uv3i[vi] = b2;
|
uv3i[vi] = b2;
|
||||||
vi++;
|
vi++;
|
||||||
@ -886,8 +886,8 @@ namespace Spine.Unity {
|
|||||||
} else { //if (settings.renderMeshes) {
|
} else { //if (settings.renderMeshes) {
|
||||||
MeshAttachment meshAttachment = attachment as MeshAttachment;
|
MeshAttachment meshAttachment = attachment as MeshAttachment;
|
||||||
if (meshAttachment != null) {
|
if (meshAttachment != null) {
|
||||||
int meshVertexCount = meshAttachment.WorldVerticesLength;
|
int verticesArrayLength = meshAttachment.WorldVerticesLength;
|
||||||
if (tempVerts.Length < meshVertexCount) this.tempVerts = tempVerts = new float[meshVertexCount];
|
if (tempVerts.Length < verticesArrayLength) this.tempVerts = tempVerts = new float[verticesArrayLength];
|
||||||
meshAttachment.ComputeWorldVertices(slot, tempVerts);
|
meshAttachment.ComputeWorldVertices(slot, tempVerts);
|
||||||
|
|
||||||
if (settings.pmaVertexColors) {
|
if (settings.pmaVertexColors) {
|
||||||
@ -917,7 +917,7 @@ namespace Spine.Unity {
|
|||||||
if (fy > bmax.y) bmax.y = fy;
|
if (fy > bmax.y) bmax.y = fy;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int iii = 0; iii < meshVertexCount; iii += 2) {
|
for (int iii = 0; iii < verticesArrayLength; iii += 2) {
|
||||||
float x = tempVerts[iii], y = tempVerts[iii + 1];
|
float x = tempVerts[iii], y = tempVerts[iii + 1];
|
||||||
vbi[vertexIndex].x = x; vbi[vertexIndex].y = y; vbi[vertexIndex].z = z;
|
vbi[vertexIndex].x = x; vbi[vertexIndex].y = y; vbi[vertexIndex].z = z;
|
||||||
cbi[vertexIndex] = color; ubi[vertexIndex].x = attachmentUVs[iii]; ubi[vertexIndex].y = attachmentUVs[iii + 1];
|
cbi[vertexIndex] = color; ubi[vertexIndex].x = attachmentUVs[iii]; ubi[vertexIndex].y = attachmentUVs[iii + 1];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user