Add image atlas and nine-slice support

This commit is contained in:
gem
2026-06-09 12:30:44 +08:00
parent 409942b4af
commit e2a584d4dc
12 changed files with 453 additions and 24 deletions

View File

@@ -86,6 +86,14 @@
---@field type RuntimeNodeType
---@field parent? string
---@field asset? string Normal image/sprite/spine asset key. For button nodes this is the normal-state image.
---@field sourceX? number Source atlas region x in image pixels.
---@field sourceY? number Source atlas region y in image pixels.
---@field sourceWidth? number Source atlas region width in image pixels.
---@field sourceHeight? number Source atlas region height in image pixels.
---@field sliceLeft? number Left nine-slice inset in source pixels.
---@field sliceTop? number Top nine-slice inset in source pixels.
---@field sliceRight? number Right nine-slice inset in source pixels.
---@field sliceBottom? number Bottom nine-slice inset in source pixels.
---@field pressedAsset? string Button pressed-state image asset key.
---@field disabledAsset? string Button disabled-state image asset key.
---@field animation? string
@@ -147,6 +155,14 @@
---@field type? RuntimeNodeType
---@field parent? string
---@field asset? string Normal image/sprite/spine asset key. For button nodes this is the normal-state image.
---@field sourceX? number Source atlas region x in image pixels.
---@field sourceY? number Source atlas region y in image pixels.
---@field sourceWidth? number Source atlas region width in image pixels.
---@field sourceHeight? number Source atlas region height in image pixels.
---@field sliceLeft? number Left nine-slice inset in source pixels.
---@field sliceTop? number Top nine-slice inset in source pixels.
---@field sliceRight? number Right nine-slice inset in source pixels.
---@field sliceBottom? number Bottom nine-slice inset in source pixels.
---@field pressedAsset? string Button pressed-state image asset key.
---@field disabledAsset? string Button disabled-state image asset key.
---@field animation? string