mirror of
https://github.com/photonstorm/phaser
synced 2024-11-30 16:39:34 +00:00
Update DynamicTilemapLayerWebGLRenderer.js
This commit is contained in:
parent
7712d0459d
commit
f89d53ca0d
1 changed files with 6 additions and 2 deletions
|
@ -49,12 +49,15 @@ var DynamicTilemapLayerWebGLRenderer = function (renderer, src, interpolationPer
|
|||
|
||||
var tilesets = src.tileset;
|
||||
|
||||
renderer.setPipeline(pipeline);
|
||||
|
||||
// Loop through each tileset in this layer, drawing just the tiles that are in that set each time
|
||||
// Doing it this way around allows us to batch tiles using the same tileset
|
||||
for (var c = 0; c < tilesets.length; c++)
|
||||
{
|
||||
var currentSet = tilesets[c];
|
||||
var texture = currentSet.glTexture;
|
||||
var textureUnit = pipeline.setTexture2D(texture, src);
|
||||
|
||||
for (var i = 0; i < tileCount; i++)
|
||||
{
|
||||
|
@ -102,7 +105,8 @@ var DynamicTilemapLayerWebGLRenderer = function (renderer, src, interpolationPer
|
|||
0, 0,
|
||||
camera,
|
||||
null,
|
||||
true
|
||||
true,
|
||||
textureUnit
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue