mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 17:56:04 +08:00
Allow latest JSON format to be loaded.
This commit is contained in:
parent
b132231034
commit
c867a1f29e
@ -35,7 +35,8 @@ local RegionAttachment = require "spine-lua.RegionAttachment"
|
|||||||
|
|
||||||
local AttachmentLoader = {
|
local AttachmentLoader = {
|
||||||
failed = {},
|
failed = {},
|
||||||
ATTACHMENT_REGION = "region"
|
ATTACHMENT_REGION = "region",
|
||||||
|
ATTACHMENT_BOUNDINGBOX = "boundingbox",
|
||||||
}
|
}
|
||||||
function AttachmentLoader.new ()
|
function AttachmentLoader.new ()
|
||||||
local self = {}
|
local self = {}
|
||||||
@ -44,7 +45,10 @@ function AttachmentLoader.new ()
|
|||||||
if type == AttachmentLoader.ATTACHMENT_REGION then
|
if type == AttachmentLoader.ATTACHMENT_REGION then
|
||||||
return RegionAttachment.new(name)
|
return RegionAttachment.new(name)
|
||||||
end
|
end
|
||||||
error("Unknown attachment type: " .. type .. " (" + name + ")")
|
if type == AttachmentLoader.ATTACHMENT_BOUNDINGBOX then
|
||||||
|
return nil -- BOZO - Implement bounding boxes.
|
||||||
|
end
|
||||||
|
error("Unknown attachment type: " .. type .. " (" .. name .. ")")
|
||||||
end
|
end
|
||||||
|
|
||||||
return self
|
return self
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user