@@ -70,21 +70,23 @@ Phaser.TilemapLayer = function (game, tilemap, index, width, height) {
7070 * @property {PIXI.BaseTexture } baseTexture
7171 * @protected
7272 */
73- this . baseTexture = new PIXI . BaseTexture ( this . canvas ) ;
73+ // this.baseTexture = new PIXI.BaseTexture(this.canvas);
7474
7575 /**
7676 * Required Pixi var.
7777 * @property {PIXI.Texture } texture
7878 * @protected
7979 */
80- this . texture = new PIXI . Texture ( this . baseTexture ) ;
80+ // this.texture = new PIXI.Texture(this.baseTexture);
8181
8282 /**
8383 * Dimensions of the renderable area.
8484 * @property {Phaser.Frame } textureFrame
8585 * @protected
8686 */
87- this . textureFrame = new Phaser . Frame ( 0 , 0 , 0 , width , height , 'tilemapLayer' ) ;
87+ // this.textureFrame = new Phaser.Frame(0, 0, 0, width, height, 'tilemapLayer');
88+
89+ this . setTexture ( new PIXI . Texture ( new PIXI . BaseTexture ( this . canvas ) ) ) ;
8890
8991 /**
9092 * The const type of this object.
@@ -104,7 +106,7 @@ Phaser.TilemapLayer = function (game, tilemap, index, width, height) {
104106 /**
105107 * Settings that control standard (non-diagnostic) rendering.
106108 *
107- * @property {boolean } [enableScrollDelta=true] - Delta scroll rendering only draws tiles/edges as them come into view.
109+ * @property {boolean } [enableScrollDelta=true] - Delta scroll rendering only draws tiles/edges as they come into view.
108110 * This can greatly improve scrolling rendering performance, especially when there are many small tiles.
109111 * It should only be disabled in rare cases.
110112 *
@@ -331,13 +333,12 @@ Phaser.TilemapLayer.prototype.postUpdate = function () {
331333*/
332334Phaser . TilemapLayer . resize = function ( width , height ) {
333335
334- this . baseTexture . width = width ;
335- this . baseTexture . height = height ;
336+ // this.baseTexture.width = width;
337+ // this.baseTexture.height = height;
336338
337339 this . resizeFrame ( width , height ) ;
338340
339- this . textureFrame . resize ( width , height ) ;
340-
341+ // this.textureFrame.resize(width, height);
341342
342343} ;
343344
@@ -1064,7 +1065,7 @@ Phaser.TilemapLayer.prototype.render = function () {
10641065 this . renderDebug ( ) ;
10651066 }
10661067
1067- this . baseTexture . dirty ( ) ;
1068+ this . texture . baseTexture . dirty ( ) ;
10681069
10691070 this . dirty = false ;
10701071
0 commit comments