mirror of
https://github.com/photonstorm/phaser
synced 2024-11-16 09:48:18 +00:00
Fixed UV updates for WebGL textures.
This commit is contained in:
parent
3fb5df95e6
commit
86cfc7111e
3 changed files with 11 additions and 9 deletions
|
@ -294,6 +294,8 @@ Phaser.Image.prototype.loadTexture = function (key, frame) {
|
|||
}
|
||||
}
|
||||
|
||||
this.texture.baseTexture.dirty();
|
||||
|
||||
if (setFrame)
|
||||
{
|
||||
this._frame = Phaser.Rectangle.clone(this.texture.frame);
|
||||
|
@ -356,10 +358,8 @@ Phaser.Image.prototype.setFrame = function(frame) {
|
|||
{
|
||||
this.updateCrop();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.texture.baseTexture.dirty();
|
||||
}
|
||||
|
||||
this.texture._updateUvs();
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -410,6 +410,8 @@ Phaser.Sprite.prototype.loadTexture = function (key, frame, stopAnimation) {
|
|||
}
|
||||
}
|
||||
|
||||
this.texture.baseTexture.dirty();
|
||||
|
||||
if (setFrame)
|
||||
{
|
||||
this._frame = Phaser.Rectangle.clone(this.texture.frame);
|
||||
|
@ -472,10 +474,8 @@ Phaser.Sprite.prototype.setFrame = function(frame) {
|
|||
{
|
||||
this.updateCrop();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.texture.baseTexture.dirty();
|
||||
}
|
||||
|
||||
this.texture._updateUvs();
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -378,6 +378,8 @@ Phaser.TileSprite.prototype.loadTexture = function (key, frame) {
|
|||
}
|
||||
}
|
||||
|
||||
this.texture.baseTexture.dirty();
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -424,7 +426,7 @@ Phaser.TileSprite.prototype.setFrame = function(frame) {
|
|||
this.texture.trim = null;
|
||||
}
|
||||
|
||||
this.texture.baseTexture.dirty();
|
||||
this.texture._updateUvs();
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue