From 8c04297b58a863e05da5dd8a3175c0a6c55ffab2 Mon Sep 17 00:00:00 2001 From: janezcarski Date: Tue, 19 Aug 2014 15:13:55 +0200 Subject: [PATCH] Fix: SkeletonJson now sets mesh color if present in json. --- .../src/com/esotericsoftware/spine/SkeletonJson.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spine-libgdx/src/com/esotericsoftware/spine/SkeletonJson.java b/spine-libgdx/src/com/esotericsoftware/spine/SkeletonJson.java index 0c50cc950..03d727913 100644 --- a/spine-libgdx/src/com/esotericsoftware/spine/SkeletonJson.java +++ b/spine-libgdx/src/com/esotericsoftware/spine/SkeletonJson.java @@ -215,6 +215,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);