phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js

16 lines
531 B
JavaScript
Raw Normal View History

var GameObject = require('../../GameObject');
2018-01-24 22:29:57 +00:00
var Utils = require('../../../renderer/webgl/Utils');
2018-01-24 22:29:57 +00:00
var DynamicTilemapLayerWebGLRenderer = function (renderer, tilemapLayer, interpolationPercentage, camera)
2017-06-09 04:00:12 +00:00
{
2018-01-24 22:29:57 +00:00
if (GameObject.RENDER_MASK !== tilemapLayer.renderFlags || (tilemapLayer.cameraFilter > 0 && (tilemapLayer.cameraFilter & camera._id)))
2017-06-09 04:00:12 +00:00
{
return;
}
2018-01-24 22:29:57 +00:00
tilemapLayer.cull(camera);
2018-01-30 03:38:31 +00:00
this.pipeline.batchDynamicTilemapLayer(tilemapLayer, camera);
2017-06-09 04:00:12 +00:00
};
module.exports = DynamicTilemapLayerWebGLRenderer;