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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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