azerion / phaser-nineslice

NineSlice plugin for Phaser!
MIT License
53 stars 20 forks source link

Non-transparent texture on Android 5.1.1 #4

Closed brunoimbrizi closed 7 years ago

brunoimbrizi commented 7 years ago

The screenshot below was taken on a Galaxy S6 running Android 5.1.1 and Google Chrome 56.0 screenshot_2017-03-28-12-05-27

I managed to fix it, but it is not an elegant fix. The texture needs to be cleared before renderXY() is called. I solved the issue by setting the flag clear to true only in the first iteration of the for loops:

https://github.com/orange-games/phaser-nineslice/blob/master/ts/NineSlice.ts#L91

(<Phaser.RenderTexture>this.texture).renderXY(s, finalXs[xi], finalYs[yi], (!yi && !xi));
AleBles commented 7 years ago

I added a clear() call to the texture before the for loop, should to the same as what you did (but nicer?:P).

But I can't reproduce this on my phone (Android 6 Chrom 57), would you mind checking out the current dev build?