Keisha Posted October 4, 2018 Share Posted October 4, 2018 I am stuck with this problem. Following code is working very nicely in desktop browsers. But in iPhone won`t display the image. Anyone please guide me to correct this code ? my code is like this: let graphic = this.add.graphics(); graphic.fillStyle(0xffffff, 1); graphic.fillRoundedRect(200, 300, 400, 400, 4); let rt = this.add.renderTexture(400, 300, 400, 400).setOrigin(0); rt.draw(graphic); rt.saveTexture('roundedRect') cell.destroy(); rt.destroy(); // iPhone won`t show this image let img = this.add.sprite(100, 100, 'roundedRect'; Link to comment Share on other sites More sharing options...
blackhawx Posted October 4, 2018 Share Posted October 4, 2018 Try this... let graphic = this.add.graphics(); graphic.fillStyle(0xffffff, 1); graphic.fillRoundedRect(200, 300, 400, 400, 4); let rt = this.add.renderTexture(400, 300, 400, 400).setOrigin(0); rt.draw(graphic); rt.saveTexture('roundedRect') cell.destroy(); rt.destroy(); // iPhone won`t show this image let img = this.add.sprite(100, 100, 'roundedRect'); You have some broken syntax and a bad character encode, all towards the bottom. Link to comment Share on other sites More sharing options...
Keisha Posted October 5, 2018 Author Share Posted October 5, 2018 15 hours ago, blackhawx said: Try this... let graphic = this.add.graphics(); graphic.fillStyle(0xffffff, 1); graphic.fillRoundedRect(200, 300, 400, 400, 4); let rt = this.add.renderTexture(400, 300, 400, 400).setOrigin(0); rt.draw(graphic); rt.saveTexture('roundedRect') cell.destroy(); rt.destroy(); // iPhone won`t show this image let img = this.add.sprite(100, 100, 'roundedRect'); You have some broken syntax and a bad character encode, all towards the bottom. Thanks for notifying Link to comment Share on other sites More sharing options...
Recommended Posts