mirror of
https://github.com/photonstorm/phaser
synced 2024-11-25 14:10:42 +00:00
Now parses Texture Packer 7.1.0 scale9 data and stores it on the Frames
This commit is contained in:
parent
921ff93ba0
commit
dada2ad181
2 changed files with 20 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue