[libgdx] Fixed clipping ending and starting on the same slot.

This commit is contained in:
Nathan Sweet 2025-04-17 18:16:10 -04:00
parent d115ca83dd
commit 6c1d2f625e
2 changed files with 3 additions and 0 deletions

View File

@ -498,6 +498,7 @@ public class Skeleton {
mesh.computeWorldVertices(this, slot, 0, verticesLength, vertices, 0, 2);
triangles = mesh.getTriangles();
} else if (attachment instanceof ClippingAttachment clip && clipper != null) {
clipper.clipEnd(slot);
clipper.clipStart(this, slot, clip);
continue;
}

View File

@ -170,6 +170,7 @@ public class SkeletonRenderer {
color = mesh.getColor();
} else if (attachment instanceof ClippingAttachment clip) {
clipper.clipEnd(slot);
clipper.clipStart(skeleton, slot, clip);
continue;
@ -264,6 +265,7 @@ public class SkeletonRenderer {
color = mesh.getColor();
} else if (attachment instanceof ClippingAttachment clip) {
clipper.clipEnd(slot);
clipper.clipStart(skeleton, slot, clip);
continue;