Now parses Texture Packer 7.1.0 scale9 data and stores it on the Frames

This commit is contained in:
Richard Davey 2023-11-09 18:23:44 +00:00
parent 921ff93ba0
commit dada2ad181
2 changed files with 20 additions and 0 deletions

View file

@ -82,6 +82,16 @@ var JSONArray = function (texture, sourceIndex, json)
newFrame.pivotY = pivot.y;
}
if (src.scale9Borders)
{
newFrame.setScale9(
src.scale9Borders.x,
src.scale9Borders.y,
src.scale9Borders.w,
src.scale9Borders.h
);
}
// Copy over any extra data
newFrame.customData = Clone(src);
}

View file

@ -86,6 +86,16 @@ var JSONHash = function (texture, sourceIndex, json)
newFrame.pivotY = pivot.y;
}
if (src.scale9Borders)
{
newFrame.setScale9(
src.scale9Borders.x,
src.scale9Borders.y,
src.scale9Borders.w,
src.scale9Borders.h
);
}
// Copy over any extra data
newFrame.customData = Clone(src);
}