Kaynağa Gözat

[as3] Ensure clipper.clipEnd() is called appropriately. See #1694

Mario Zechner 4 yıl önce
ebeveyn
işleme
4be695bf28

+ 1 - 1
spine-as3/README.md

@@ -16,7 +16,7 @@ For the official legal terms governing the Spine Runtimes, please read the [Spin
 
 spine-as3 works with data exported from Spine 3.9.xx.
 
-spine-as3 supports all Spine features, including meshes. If using the `spine.flash` classes for rendering, meshes and two color tinting are not supported.
+spine-as3 supports all Spine features, including meshes. If using the `spine.flash` classes for rendering, meshes, clipping, and two color tinting are not supported.
 
 ## Usage
 1. Create a new Flex or Adobe AIR project in your preferred IDE.

+ 5 - 1
spine-starling/spine-starling/src/spine/starling/SkeletonSprite.as

@@ -98,7 +98,10 @@ package spine.starling {
 			for (var i : int = 0, n : int = drawOrder.length; i < n; ++i) {
 				var worldVertices : Vector.<Number> = _tempVertices;
 				var slot : Slot = drawOrder[i];
-				if (!slot.bone.active) continue;
+				if (!slot.bone.active) {
+					clipper.clipEndWithSlot(slot);
+					continue;
+				}
 
 				if (slot.attachment is RegionAttachment) {
 					var region : RegionAttachment = slot.attachment as RegionAttachment;
@@ -156,6 +159,7 @@ package spine.starling {
 					clipper.clipStart(slot, clip);
 					continue;
 				} else {
+					clipper.clipEndWithSlot(slot);
 					continue;
 				}