2017-05-16 23:07:52 +00:00
|
|
|
var MeshWebGLRenderer = function (renderer, src, interpolationPercentage, camera)
|
|
|
|
{
|
2017-08-15 19:42:04 +00:00
|
|
|
if (this.renderMask !== this.renderFlags || (src.cameraFilter > 0 && (src.cameraFilter & camera._id)))
|
2017-05-16 23:07:52 +00:00
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
2017-07-04 11:36:27 +00:00
|
|
|
|
2017-05-18 19:57:05 +00:00
|
|
|
if (src.indices.length > 0)
|
2017-07-04 11:36:27 +00:00
|
|
|
{
|
2017-05-18 19:57:05 +00:00
|
|
|
renderer.spriteBatch.addMeshIndexed(src, camera);
|
2017-07-04 11:36:27 +00:00
|
|
|
}
|
2017-05-18 19:57:05 +00:00
|
|
|
else
|
2017-07-04 11:36:27 +00:00
|
|
|
{
|
2017-05-18 19:57:05 +00:00
|
|
|
renderer.spriteBatch.addMesh(src, camera);
|
2017-07-04 11:36:27 +00:00
|
|
|
}
|
2017-05-16 23:07:52 +00:00
|
|
|
};
|
|
|
|
|
2017-07-04 11:36:27 +00:00
|
|
|
module.exports = MeshWebGLRenderer;
|