mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-05 06:44:56 +08:00
[libgdx] Fixed binary path constraints and JSON skin constraints.
This commit is contained in:
parent
2af3f89cc6
commit
061e9d7ec5
@ -369,7 +369,7 @@ public class SkeletonBinary extends SkeletonLoader {
|
||||
data.slot = slots[input.readInt(true)];
|
||||
int flags = input.read();
|
||||
data.skinRequired = (flags & 1) != 0;
|
||||
data.positionMode = PositionMode.values[flags & 2];
|
||||
data.positionMode = PositionMode.values[(flags >> 1) & 2];
|
||||
data.spacingMode = SpacingMode.values[(flags >> 2) & 3];
|
||||
data.rotateMode = RotateMode.values[(flags >> 4) & 3];
|
||||
if ((flags & 128) != 0) data.offsetRotation = input.readFloat();
|
||||
|
||||
@ -443,6 +443,11 @@ public class SkeletonJson extends SkeletonLoader {
|
||||
if (constraint == null) throw new SerializationException("Skin physics constraint not found: " + entry);
|
||||
skin.constraints.add(constraint);
|
||||
}
|
||||
for (JsonValue entry = skinMap.getChild("slider"); entry != null; entry = entry.next) {
|
||||
SliderData constraint = skeletonData.findConstraint(entry.asString(), SliderData.class);
|
||||
if (constraint == null) throw new SerializationException("Skin slider not found: " + entry);
|
||||
skin.constraints.add(constraint);
|
||||
}
|
||||
skin.constraints.shrink();
|
||||
for (JsonValue slotEntry = skinMap.getChild("attachments"); slotEntry != null; slotEntry = slotEntry.next) {
|
||||
SlotData slot = skeletonData.findSlot(slotEntry.name);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user