MichaelD Posted April 27, 2015 Share Posted April 27, 2015 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 More sharing options...
rich Posted April 27, 2015 Share Posted April 27, 2015 Hmm having a width and height of zero is interesting, I wouldn't expect that to even work the first time. Link to comment Share on other sites More sharing options...
MichaelD Posted April 27, 2015 Author Share Posted April 27, 2015 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 More sharing options...
Recommended Posts