Shift attachment IDs to reduce effort needed to compute DeformTimeline ID.

This commit is contained in:
NathanSweet 2017-06-10 18:28:16 +02:00
parent c4268d4bfe
commit a8577b78a7
2 changed files with 2 additions and 2 deletions

View File

@ -814,7 +814,7 @@ public class Animation {
} }
public int getPropertyId () { public int getPropertyId () {
return (TimelineType.deform.ordinal() << 27) + ((slotIndex & 2047) << 16) + attachment.getId(); return (TimelineType.deform.ordinal() << 27) + attachment.getId() + slotIndex;
} }
public void setSlotIndex (int index) { public void setSlotIndex (int index) {

View File

@ -40,7 +40,7 @@ import com.esotericsoftware.spine.Slot;
public class VertexAttachment extends Attachment { public class VertexAttachment extends Attachment {
static private int nextID; static private int nextID;
private int id = nextID++ & 65535; private int id = (nextID++ & 65535) << 11;
int[] bones; int[] bones;
float[] vertices; float[] vertices;
int worldVerticesLength; int worldVerticesLength;