Jump to content

I got an error use tileSprite renderTexture param


davidv8
 Share

Recommended Posts

pls help

-------------------------

var renderTexture = this.game.make.renderTexture(200,200);

var image = this.game.make.image('preloader');

renderTexture.renderXY(image, 0, 0);

this.game.add.tileSprite(0,0,200,200,renderTexture);

 

-----------------------

Uncaught TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': No function was found that matched the signature provided.

Link to comment
Share on other sites

You can't do this.

 

it seems to be fine with sprite object, but not with tilesprite  :(

---------------------

  var renderTexture = this.game.make.renderTexture(400,400);
  var image = this.game.add.image(0, 0, 'preloader');
  renderTexture.renderXY(image, 220, 19, false);
  this.game.add.sprite(0,0,renderTexture);
----------------------
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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