Jump to content

Problem with Rendered Texture in iPhone


Keisha
 Share

Recommended Posts

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

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

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

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...