Jump to content

Search the Community

Showing results for tags 'data uri'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. This isn't to ask for help, but more of a suggestion for a fix in future Phaser versions, and maybe also a help to other Phaser Developers. In my game I save a screenshot of the canvas and save it to the users local JSON sessionstorage to call upon later. Now with that Image data URI saved I wanted to paste the image onto the screen, bearing in mind you need to cache the image first: create: function () { /* Caching START */ this.gameScreenshot01 = gameData.playerSettings[0].savedGames[0].screenshot; this.gameScreenshot01Image = new Image(); this.gameScreenshot01Image.src = this.gameScreenshot01; this.game.cache.addImage('image01', null, this.gameScreenshot01Image); /* Caching END */ /* Now actually paste the image to the canvas START */ this.gameScreenShotInput = this.game.add.sprite(100, 100, 'image01'); /* Now actually paste the image to the canvas END */ }, Now this works great for desktop, but not mobile. A fix for it I have found is that mobiles seem to have a problem caching it the first time. The fix? Cache it twice! BUT you have to do it among 2 different functions throughout the project and then paste the image to the canvas. Hope that's helps anyone out there. My mobile is on IOS9, so maybe there were a few bugs out there at the beginning of this release. Thanks
×
×
  • Create New...