diff --git a/spine-lua/SkeletonBounds.lua b/spine-lua/SkeletonBounds.lua index 9178a98bb..78b7142bc 100644 --- a/spine-lua/SkeletonBounds.lua +++ b/spine-lua/SkeletonBounds.lua @@ -72,7 +72,13 @@ function SkeletonBounds:update (skeleton, updateAabb) end end - if updateAabb then self:aabbCompute() end + if updateAabb then + self:aabbCompute() + else + self.minX = 9999999 + self.minY = 9999999 + self.maxX = -9999999 + self.maxY = -9999999 end function SkeletonBounds:aabbCompute () diff --git a/spine-lua/SkeletonJson.lua b/spine-lua/SkeletonJson.lua index e8ace46af..5aa6f43d4 100644 --- a/spine-lua/SkeletonJson.lua +++ b/spine-lua/SkeletonJson.lua @@ -261,7 +261,7 @@ function SkeletonJson.new (attachmentLoader) local data = EventData.new(eventName) data.intValue = getValue(eventMap, "int", 0) data.floatValue = getValue(eventMap, "float", 0) - data.stringValue = getValue(eventMap, "string", nil) + data.stringValue = getValue(eventMap, "string", "") table_insert(skeletonData.events, data) end end diff --git a/spine-ts/core/src/SkeletonBounds.ts b/spine-ts/core/src/SkeletonBounds.ts index 3e2340be8..4e27bfdfd 100644 --- a/spine-ts/core/src/SkeletonBounds.ts +++ b/spine-ts/core/src/SkeletonBounds.ts @@ -65,7 +65,14 @@ module spine { } } - if (updateAabb) this.aabbCompute(); + if (updateAabb) { + this.aabbCompute(); + } else { + this.minX = Number.POSITIVE_INFINITY; + this.minY = Number.POSITIVE_INFINITY; + this.maxX = Number.NEGATIVE_INFINITY; + this.maxY = Number.NEGATIVE_INFINITY; + } } aabbCompute () { diff --git a/spine-ts/core/src/SkeletonJson.ts b/spine-ts/core/src/SkeletonJson.ts index 79b42b47f..03718824a 100644 --- a/spine-ts/core/src/SkeletonJson.ts +++ b/spine-ts/core/src/SkeletonJson.ts @@ -229,7 +229,7 @@ module spine { let data = new EventData(eventName); data.intValue = this.getValue(eventMap, "int", 0); data.floatValue = this.getValue(eventMap, "float", 0); - data.stringValue = this.getValue(eventMap, "string", null); + data.stringValue = this.getValue(eventMap, "string", ""); skeletonData.events.push(data); } }