mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-02 13:49:07 +08:00
Added vertex attachment IDs for DeformTimeline.
This commit is contained in:
parent
464e9b3362
commit
45870ef028
@ -814,7 +814,7 @@ public class Animation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getPropertyId () {
|
public int getPropertyId () {
|
||||||
return (TimelineType.deform.ordinal() << 24) + slotIndex;
|
return (TimelineType.deform.ordinal() << 27) + ((slotIndex & 2047) << 16) + attachment.getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setSlotIndex (int index) {
|
public void setSlotIndex (int index) {
|
||||||
|
|||||||
@ -38,6 +38,9 @@ import com.esotericsoftware.spine.Slot;
|
|||||||
/** Base class for an attachment with vertices that are transformed by one or more bones and can be deformed by a slot's
|
/** Base class for an attachment with vertices that are transformed by one or more bones and can be deformed by a slot's
|
||||||
* {@link Slot#getAttachmentVertices()}. */
|
* {@link Slot#getAttachmentVertices()}. */
|
||||||
public class VertexAttachment extends Attachment {
|
public class VertexAttachment extends Attachment {
|
||||||
|
static private int nextID;
|
||||||
|
|
||||||
|
private int id = nextID++ & 65535;
|
||||||
int[] bones;
|
int[] bones;
|
||||||
float[] vertices;
|
float[] vertices;
|
||||||
int worldVerticesLength;
|
int worldVerticesLength;
|
||||||
@ -152,4 +155,9 @@ public class VertexAttachment extends Attachment {
|
|||||||
public void setWorldVerticesLength (int worldVerticesLength) {
|
public void setWorldVerticesLength (int worldVerticesLength) {
|
||||||
this.worldVerticesLength = worldVerticesLength;
|
this.worldVerticesLength = worldVerticesLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Returns a unique ID for this attachment. */
|
||||||
|
public int getId () {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user