Skip to content

Commit d26ddb2

Browse files
committed
remove unused struct
1 parent 4b19b78 commit d26ddb2

File tree

1 file changed

+5
-37
lines changed

1 file changed

+5
-37
lines changed

Diff for: extensions/spine/CCSkeleton.js

+5-37
Original file line numberDiff line numberDiff line change
@@ -31,37 +31,6 @@
3131
*/
3232
var sp = sp || {};
3333

34-
/**
35-
* The vertex index of spine.
36-
* @constant
37-
* @type {{X1: number, Y1: number, X2: number, Y2: number, X3: number, Y3: number, X4: number, Y4: number}}
38-
*/
39-
sp.VERTEX_INDEX = {
40-
X1: 0,
41-
Y1: 1,
42-
X2: 2,
43-
Y2: 3,
44-
X3: 4,
45-
Y3: 5,
46-
X4: 6,
47-
Y4: 7
48-
};
49-
50-
/**
51-
* The attachment type of spine. It contains three type: REGION(0), BOUNDING_BOX(1), MESH(2) and SKINNED_MESH.
52-
* @constant
53-
* @type {{REGION: number, BOUNDING_BOX: number, REGION_SEQUENCE: number, MESH: number}}
54-
*/
55-
sp.ATTACHMENT_TYPE = {
56-
REGION: 0,
57-
BOUNDING_BOX: 1,
58-
MESH: 2,
59-
SKINNED_MESH:3,
60-
PATH:4,
61-
POINT:5,
62-
CLIPPING:6
63-
};
64-
6534
var spine = sp.spine;
6635

6736
/**
@@ -231,13 +200,12 @@ sp.Skeleton = cc.Node.extend(/** @lends sp.Skeleton# */{
231200
var attachment = slot.attachment;
232201
if (!attachment || !(attachment instanceof spine.RegionAttachment))
233202
continue;
234-
// 3.5 vertices = attachment.updateWorldVertices(slot, false);
235203
vertices = spine.Utils.setArraySize(new Array(), 8, 0);
236-
attachment.computeWorldVertices(slot.bone, vertices, 0, 8);
237-
minX = Math.min(minX, vertices[VERTEX.X1] * scaleX, vertices[VERTEX.X4] * scaleX, vertices[VERTEX.X2] * scaleX, vertices[VERTEX.X3] * scaleX);
238-
minY = Math.min(minY, vertices[VERTEX.Y1] * scaleY, vertices[VERTEX.Y4] * scaleY, vertices[VERTEX.Y2] * scaleY, vertices[VERTEX.Y3] * scaleY);
239-
maxX = Math.max(maxX, vertices[VERTEX.X1] * scaleX, vertices[VERTEX.X4] * scaleX, vertices[VERTEX.X2] * scaleX, vertices[VERTEX.X3] * scaleX);
240-
maxY = Math.max(maxY, vertices[VERTEX.Y1] * scaleY, vertices[VERTEX.Y4] * scaleY, vertices[VERTEX.Y2] * scaleY, vertices[VERTEX.Y3] * scaleY);
204+
attachment.computeWorldVertices(slot.bone, vertices, 0, 2);
205+
minX = Math.min(minX, vertices[VERTEX.OX1] * scaleX, vertices[VERTEX.OX4] * scaleX, vertices[VERTEX.OX2] * scaleX, vertices[VERTEX.OX3] * scaleX);
206+
minY = Math.min(minY, vertices[VERTEX.OY1] * scaleY, vertices[VERTEX.OY4] * scaleY, vertices[VERTEX.OY2] * scaleY, vertices[VERTEX.OY3] * scaleY);
207+
maxX = Math.max(maxX, vertices[VERTEX.OX1] * scaleX, vertices[VERTEX.OX4] * scaleX, vertices[VERTEX.OX2] * scaleX, vertices[VERTEX.OX3] * scaleX);
208+
maxY = Math.max(maxY, vertices[VERTEX.OY1] * scaleY, vertices[VERTEX.OY4] * scaleY, vertices[VERTEX.OY2] * scaleY, vertices[VERTEX.OY3] * scaleY);
241209
}
242210
var position = this.getPosition();
243211
return cc.rect(position.x + minX, position.y + minY, maxX - minX, maxY - minY);

0 commit comments

Comments
 (0)