Skip to content

Commit 110c2ca

Browse files
committed
Fixed a bug about the spine draw the not supported mode
1 parent f6a6e46 commit 110c2ca

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

extensions/spine/CCSkeletonWebGLRenderCmd.js

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,20 @@
5757
if (!slot.attachment)
5858
continue;
5959
attachment = slot.attachment;
60+
61+
switch(slot.attachment.type) {
62+
case sp.ATTACHMENT_TYPE.REGION:
63+
sp._regionAttachment_updateQuad(attachment, slot, quad, node._premultipliedAlpha);
64+
break;
65+
case sp.ATTACHMENT_TYPE.MESH:
66+
sp._meshAttachment_updateQuad(attachment, slot, quad, node._premultipliedAlpha);
67+
break;
68+
case sp.ATTACHMENT_TYPE.SKINNED_MESH:
69+
break;
70+
default:
71+
continue;
72+
}
73+
6074
var regionTextureAtlas = node.getTextureAtlas(attachment);
6175

6276
if (slot.data.additiveBlending != additive) {
@@ -80,17 +94,6 @@
8094
return;
8195
}
8296

83-
switch(slot.attachment.type) {
84-
case sp.ATTACHMENT_TYPE.REGION:
85-
sp._regionAttachment_updateQuad(attachment, slot, quad, node._premultipliedAlpha);
86-
break;
87-
case sp.ATTACHMENT_TYPE.MESH:
88-
sp._meshAttachment_updateQuad(attachment, slot, quad, node._premultipliedAlpha);
89-
break;
90-
case sp.ATTACHMENT_TYPE.SKINNED_MESH:
91-
break;
92-
}
93-
9497
textureAtlas.updateQuad(quad, quadCount);
9598
}
9699

0 commit comments

Comments
 (0)