mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[starling] Fixed two color tint.
This commit is contained in:
parent
966ed65465
commit
647d124361
Binary file not shown.
@ -29,6 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
package spine.starling {
|
package spine.starling {
|
||||||
|
import starling.styles.MeshStyle;
|
||||||
import spine.attachments.ClippingAttachment;
|
import spine.attachments.ClippingAttachment;
|
||||||
import spine.SkeletonClipping;
|
import spine.SkeletonClipping;
|
||||||
import spine.Bone;
|
import spine.Bone;
|
||||||
@ -172,7 +173,7 @@ package spine.starling {
|
|||||||
|
|
||||||
// Need to create a new mesh here, see https://github.com/EsotericSoftware/spine-runtimes/issues/1125
|
// Need to create a new mesh here, see https://github.com/EsotericSoftware/spine-runtimes/issues/1125
|
||||||
mesh = new SkeletonMesh(mesh.texture);
|
mesh = new SkeletonMesh(mesh.texture);
|
||||||
if (_twoColorTint) mesh.setStyle(mesh.style);
|
if (_twoColorTint) mesh.setStyle(new TwoColorMeshStyle());
|
||||||
indexData = mesh.getIndexData();
|
indexData = mesh.getIndexData();
|
||||||
|
|
||||||
verticesCount = clipper.clippedVertices.length >> 1;
|
verticesCount = clipper.clippedVertices.length >> 1;
|
||||||
@ -223,7 +224,6 @@ package spine.starling {
|
|||||||
if (indexData.numIndices > 0 && vertexData.numVertices > 0) {
|
if (indexData.numIndices > 0 && vertexData.numVertices > 0) {
|
||||||
painter.state.blendMode = blendModes[slot.data.blendMode.ordinal];
|
painter.state.blendMode = blendModes[slot.data.blendMode.ordinal];
|
||||||
painter.batchMesh(mesh);
|
painter.batchMesh(mesh);
|
||||||
painter.finishMeshBatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
clipper.clipEndWithSlot(slot);
|
clipper.clipEndWithSlot(slot);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user