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
|
@ -293,6 +293,8 @@ Phaser.Image.prototype.loadTexture = function (key, frame) {
|
|||
setFrame = !this.animations.loadFrameData(this.game.cache.getFrameData(key), frame);
|
||||
}
|
||||
}
|
||||
|
||||
this.texture.baseTexture.dirty();
|
||||
|
||||
if (setFrame)
|
||||
{
|
||||
|
@ -356,10 +358,8 @@ Phaser.Image.prototype.setFrame = function(frame) {
|
|||
{
|
||||
this.updateCrop();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.texture.baseTexture.dirty();
|
||||
}
|
||||
|
||||
this.texture._updateUvs();
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -409,6 +409,8 @@ Phaser.Sprite.prototype.loadTexture = function (key, frame, stopAnimation) {
|
|||
setFrame = !this.animations.loadFrameData(this.game.cache.getFrameData(key), frame);
|
||||
}
|
||||
}
|
||||
|
||||
this.texture.baseTexture.dirty();
|
||||
|
||||
if (setFrame)
|
||||
{
|
||||
|
@ -472,10 +474,8 @@ Phaser.Sprite.prototype.setFrame = function(frame) {
|
|||
{
|
||||
this.updateCrop();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.texture.baseTexture.dirty();
|
||||
}
|
||||
|
||||
this.texture._updateUvs();
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -377,6 +377,8 @@ Phaser.TileSprite.prototype.loadTexture = function (key, frame) {
|
|||
this.animations.loadFrameData(this.game.cache.getFrameData(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