Jump to content

Problem with tileSprite re-creation


MichaelD
 Share

Recommended Posts

Hello all,

 

I have a tileSprite which looks like this:

game.add.tileSprite(0, 0, 0, 0, "wordBG");

The first time I create it, it looks fine, when the game.state is reset the following error occurs:

 

 

Failed to execute 'createPattern' on 'CanvasRenderingContext2D': The provided value is not of type '(HTMLImageElement or HTMLVideoElement or HTMLCanvasElement or ImageBitmap)'

 

Does anyone have any idea what is going on?

 

Note: I'm using Phaser 2.3.0

Link to comment
Share on other sites

The width is added later on and the height also.  I found this issue which is exactly what is going on with my code: https://github.com/photonstorm/phaser/issues/1753

 

and this forum post: http://www.html5gamedevs.com/topic/13486-multiple-wierd-rendering-issues-in-our-game-sudden-onset-cannot-find-the-cause/#entry78524

 

After building the phaser-dev (3.2.1) and using it fixed the issue. 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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