mirror of
https://github.com/photonstorm/phaser
synced 2024-11-16 01:38:23 +00:00
in canvas mode, don't draw stuff with no size, it will throws error, and actually unnecessary.
This commit is contained in:
parent
271ce6932a
commit
7da6f4d747
1 changed files with 4 additions and 1 deletions
|
@ -818,7 +818,10 @@ var CanvasRenderer = new Class({
|
|||
sprite.mask.preRenderCanvas(this, sprite, camera);
|
||||
}
|
||||
|
||||
ctx.drawImage(frame.source.image, frameX, frameY, frameWidth, frameHeight, x, y, frameWidth / res, frameHeight / res);
|
||||
if (frameWidth > 0 && frameHeight > 0)
|
||||
{
|
||||
ctx.drawImage(frame.source.image, frameX, frameY, frameWidth, frameHeight, x, y, frameWidth / res, frameHeight / res);
|
||||
}
|
||||
|
||||
if (sprite.mask)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue