mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
Fixed parsing animations with no bone timelines.
This commit is contained in:
parent
b947ac02b6
commit
4ea3a8a632
@ -195,6 +195,7 @@ public class SkeletonJson {
|
||||
float duration = 0;
|
||||
|
||||
OrderedMap<String, ?> bonesMap = (OrderedMap)map.get("bones");
|
||||
if (bonesMap != null) {
|
||||
for (Entry<String, ?> entry : bonesMap.entries()) {
|
||||
String boneName = entry.key;
|
||||
int boneIndex = skeletonData.findBoneIndex(boneName);
|
||||
@ -233,8 +234,8 @@ public class SkeletonJson {
|
||||
for (OrderedMap valueMap : values) {
|
||||
float time = (Float)valueMap.get("time");
|
||||
Float x = (Float)valueMap.get("x"), y = (Float)valueMap.get("y");
|
||||
timeline
|
||||
.setFrame(keyframeIndex, time, x == null ? 0 : (x * timelineScale), y == null ? 0 : (y * timelineScale));
|
||||
timeline.setFrame(keyframeIndex, time, x == null ? 0 : (x * timelineScale), y == null ? 0
|
||||
: (y * timelineScale));
|
||||
readCurve(timeline, keyframeIndex, valueMap);
|
||||
keyframeIndex++;
|
||||
}
|
||||
@ -245,6 +246,7 @@ public class SkeletonJson {
|
||||
throw new RuntimeException("Invalid timeline type for a bone: " + timelineName + " (" + boneName + ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
OrderedMap<String, ?> slotsMap = (OrderedMap)map.get("slots");
|
||||
if (slotsMap != null) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user