2017-09-12 23:58:25 +00:00
|
|
|
var GameObject = require('../../GameObject');
|
2018-01-24 22:29:57 +00:00
|
|
|
var Utils = require('../../../renderer/webgl/Utils');
|
2017-09-12 23:58:25 +00:00
|
|
|
|
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
|
|
|
};
|
|
|
|
|
2017-11-09 18:18:23 +00:00
|
|
|
module.exports = DynamicTilemapLayerWebGLRenderer;
|