phaser/v3/src/gameobjects/mesh/MeshWebGLRenderer.js
2017-07-04 12:36:27 +01:00

18 lines
373 B
JavaScript

var MeshWebGLRenderer = function (renderer, src, interpolationPercentage, camera)
{
if (this.renderMask !== this.renderFlags)
{
return;
}
if (src.indices.length > 0)
{
renderer.spriteBatch.addMeshIndexed(src, camera);
}
else
{
renderer.spriteBatch.addMesh(src, camera);
}
};
module.exports = MeshWebGLRenderer;