mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[lua][ts] Ported some post 3.5 changes
This commit is contained in:
parent
d20bcbb0bb
commit
bb7e474f7a
@ -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 ()
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 () {
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user