mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-25 03:01:26 +08:00
Merge pull request #270 from dejvid/fix-libgdx-json-loader
spine-libgdx: Fix: SkeletonJson now sets mesh color if present in json.
This commit is contained in:
commit
905777898d
@ -245,6 +245,12 @@ public class SkeletonJson {
|
||||
mesh.setRegionUVs(map.require("uvs").asFloatArray());
|
||||
mesh.updateUVs();
|
||||
|
||||
//Check if color exists
|
||||
JsonValue meshColor = map.get("color");
|
||||
if(meshColor != null) {
|
||||
mesh.getColor().set(Color.valueOf(meshColor.asString()));
|
||||
}
|
||||
|
||||
if (map.has("hull")) mesh.setHullLength(map.require("hull").asInt() * 2);
|
||||
if (map.has("edges")) mesh.setEdges(map.require("edges").asIntArray());
|
||||
mesh.setWidth(map.getFloat("width", 0) * scale);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user