Skip to content

Commit 7a155f6

Browse files
committed
Added Tilemap back in and tested with Blitter object, and it works really fast.
1 parent 346fbc2 commit 7a155f6

4 files changed

Lines changed: 9 additions & 6 deletions

File tree

build/phaser3-config.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
'sound' => true,
1717
'particles' => true,
1818
'debug' => true,
19-
'tilemap' => false,
19+
'tilemap' => true,
2020
'arcade' => true,
2121
'p2' => true,
2222
'ninja' => false,
@@ -414,11 +414,12 @@
414414

415415
if ($modules['tilemap'])
416416
{
417+
// <script src="$path/src/tilemap/TilemapLayer.js"></script>
418+
417419
echo <<<EOL
418420
<script src="$path/src/tilemap/ImageCollection.js"></script>
419421
<script src="$path/src/tilemap/Tile.js"></script>
420422
<script src="$path/src/tilemap/Tilemap.js"></script>
421-
<script src="$path/src/tilemap/TilemapLayer.js"></script>
422423
<script src="$path/src/tilemap/TilemapParser.js"></script>
423424
<script src="$path/src/tilemap/Tileset.js"></script>
424425

src/gameobjects/blitter/Blitter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Phaser.GameObject.Blitter.prototype.createFromCallback = function (callback, qua
5454
{
5555
var bob = bobs[i];
5656

57-
callback.call(this, bob);
57+
callback.call(this, bob, i);
5858
}
5959

6060
return bobs;

src/renderer/webgl/WebGLRenderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ Phaser.Renderer.WebGL = function (game)
145145
* @property batch
146146
* @type WebGLSpriteBatch
147147
*/
148-
this.batch = new Phaser.Renderer.WebGL.BatchManager(this, 2000);
148+
this.batch = new Phaser.Renderer.WebGL.BatchManager(this, 4000);
149149

150150
/**
151151
* Manages the filters

src/textures/TextureSource.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,15 @@ Phaser.TextureSource = function (texture, source)
4646
this.height = source.naturalHeight || source.height || 0;
4747

4848
/**
49-
* The scale mode to apply when scaling this texture
49+
* The scale mode to apply when scaling this texture.
50+
* NEAREST or DEFAULT
5051
*
5152
* @property scaleMode
5253
* @type {Number}
5354
* @default Phaser.scaleModes.DEFAULT;
5455
*/
55-
this.scaleMode = Phaser.scaleModes.DEFAULT;
56+
// this.scaleMode = Phaser.scaleModes.DEFAULT;
57+
this.scaleMode = Phaser.scaleModes.NEAREST;
5658

5759
/**
5860
* Controls if RGB channels should be pre-multiplied by Alpha (WebGL only)

0 commit comments

Comments
 (0)