-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Atlas/Sprite sheet creation tools like TexturePacker offer the ability to set anchor/pivot points on images. NinePatch currently doesn't take these into account.
In this screenshot I have loaded an image from my atlas, once using this.add.image
and once using this.add.ninePatch
, both defining the same x and y position:
In TexturePacker, the pivot point is set to 0, 0
(top left) which the default phaser image add is respecting but not in NinePatch.
This is the relevant json from the atlas:
{
"filename": "controls/beige-panel.png",
"rotated": false,
"trimmed": false,
"sourceSize": {
"w": 100,
"h": 100
},
"spriteSourceSize": {
"x": 0,
"y": 0,
"w": 100,
"h": 100
},
"frame": {
"x": 4,
"y": 1,
"w": 100,
"h": 100
},
"anchor": {
"x": 0,
"y": 0
}
}
Would be great to have support for this if at all possible 🙏
Metadata
Metadata
Assignees
Labels
No labels