Skip to content

Commit 5e734a6

Browse files
committed
Pixi v2 UV update fixes.
1 parent 52f1663 commit 5e734a6

4 files changed

Lines changed: 4 additions & 17 deletions

File tree

src/gameobjects/Image.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -455,10 +455,7 @@ Phaser.Image.prototype.updateCrop = function() {
455455
this.texture.width = this.texture.frame.width;
456456
this.texture.height = this.texture.frame.height;
457457

458-
if (this.game.renderType === Phaser.WEBGL)
459-
{
460-
PIXI.WebGLRenderer.updateTextureFrame(this.texture);
461-
}
458+
this.texture._updateUvs();
462459

463460
};
464461

src/gameobjects/Rope.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,10 +393,7 @@ Phaser.Rope.prototype.setFrame = function(frame) {
393393
this.texture.trim = null;
394394
}
395395

396-
if (this.game.renderType === Phaser.WEBGL)
397-
{
398-
PIXI.WebGLRenderer.updateTextureFrame(this.texture);
399-
}
396+
this.texture._updateUvs();
400397

401398
};
402399

src/gameobjects/Sprite.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -574,10 +574,7 @@ Phaser.Sprite.prototype.updateCrop = function() {
574574
this.texture.width = this.texture.frame.width;
575575
this.texture.height = this.texture.frame.height;
576576

577-
if (this.game.renderType === Phaser.WEBGL)
578-
{
579-
PIXI.WebGLRenderer.updateTextureFrame(this.texture);
580-
}
577+
this.texture._updateUvs();
581578

582579
};
583580

src/tilemap/TilemapLayer.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -613,11 +613,7 @@ Phaser.TilemapLayer.prototype.render = function () {
613613
this.renderDebug();
614614
}
615615

616-
if (this.game.renderType === Phaser.WEBGL)
617-
{
618-
// PIXI.updateWebGLTexture(this.baseTexture, renderSession.gl);
619-
PIXI.updateWebGLTexture(this.baseTexture, this.game.renderer.gl);
620-
}
616+
this.texture._updateUvs();
621617

622618
this.dirty = false;
623619
this.layer.dirty = false;

0 commit comments

Comments
 (0)