Skip to content

Commit

Permalink
Fixed TilingSprite rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
ekelokorpi committed Mar 2, 2019
1 parent b9f782c commit 7a33375
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/engine/renderer/tilingsprite.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ game.createClass('TilingSprite', 'Container', {
}
}

var texture = game.Texture.fromCanvas(canvas);
var texture = game.Texture.fromImage(canvas.toDataURL());
texture.width = canvas.width;
texture.height = canvas.height;
this.tw = texture.width;
this.th = texture.height;
game.TilingSprite.cache[this.texture.baseTexture._id] = texture;
Expand Down

0 comments on commit 7a33375

Please sign in to comment.