Jump to content

Failed to execute 'createPattern' on 'CanvasRenderingContext2D'


weratius
 Share

Recommended Posts

Hello, guys!

 

I get an error in my console " Uncaught TypeError: Failed to execute 'createPattern' on 'CanvasRenderingContext2D': The provided value is not of type '(HTMLImageElement or HTMLVideoElement or HTMLCanvasElement or ImageBitmap)' "

 

I have a sprite (Planet), there is a callback function on it's clicking. This callback function create a tileSprite and some sprites with images and adds in a group all of them. When I use destroy() for this group everything is alright BUT when I'm trying to click on that Planet sprite again I get this error

 

I think that there is a rendering problem and also I know that in standart canvas methods I need to create image via new Image() for the rendering

 

So, what should I do?

 

Thank you in advance

 

A screenshot is attached

post-14308-0-33162600-1432317962_thumb.p

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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