Trying to add two instances with a texture from the same atlas causes a WebGL error:
[.Offscreen-For-WebGL-07472F00]GL ERROR :GL_INVALID_OPERATION : glDrawElements: Source and destination textures of the draw are the same.
The result is that the second instance doesn't show up.
this.nineSlice = new PhaserNineSlice.NineSlice(
this.game as PhaserNineSlice.NineSliceGame,
400,
100,
AssetsKeys.ATLAS_GAME_VIEW,
AssetsKeys.ATLAS_GAME_VIEW_KEYS.MY_CARDS_VIEW.BOOKS_REVIEWER_BACK_BTN_UP,
500,
200,
{
top: 20,
bottom: 20,
left: 50,
right: 50
}
);
this.game.add.existing(this.nineSlice);
this.nineSlice2 = new PhaserNineSlice.NineSlice(
this.game as PhaserNineSlice.NineSliceGame,
0,
0,
AssetsKeys.ATLAS_GAME_VIEW,
AssetsKeys.ATLAS_GAME_VIEW_KEYS.MY_CARDS_VIEW.BOOKS_REVIEWER_BACK_BTN_UP,
200,
500,
{
top: 20,
bottom: 20,
left: 50,
right: 50
}
);
this.game.add.existing(this.nineSlice2);