Skip to content

Commit 35c42e3

Browse files
committed
Tilemaps in WebGL wouldn't update after the first frame due to a subtle change in how Pixi uploads new textures to the GPU.
1 parent d01a969 commit 35c42e3

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ Version 2.2.0 - "Tarabon" - in development
8181

8282
### Bug Fixes
8383

84+
* Tilemaps in WebGL wouldn't update after the first frame due to a subtle change in how Pixi uploads new textures to the GPU.
8485

8586

8687
For details about changes made in previous versions of Phaser see the full Change Log at https://github.com/photonstorm/phaser/blob/master/CHANGELOG.md

src/tilemap/TilemapLayer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* A Tilemap Layer is a set of map data combined with a Tileset in order to render that data to the game.
99
*
1010
* @class Phaser.TilemapLayer
11+
* @extends {Phaser.Image}
1112
* @constructor
1213
* @param {Phaser.Game} game - Game reference to the currently running game.
1314
* @param {Phaser.Tilemap} tilemap - The tilemap to which this layer belongs.
@@ -613,7 +614,7 @@ Phaser.TilemapLayer.prototype.render = function () {
613614
this.renderDebug();
614615
}
615616

616-
this.texture._updateUvs();
617+
this.baseTexture.dirty();
617618

618619
this.dirty = false;
619620
this.layer.dirty = false;

0 commit comments

Comments
 (0)