phaser/v3/src/gameobjects/blitter/BlitterWebGLRenderer.js

24 lines
511 B
JavaScript
Raw Normal View History

var BlitterWebGLRenderer = function (renderer, src, interpolationPercentage)
{
2017-01-24 13:15:25 +00:00
var worldAlpha = src.color.worldAlpha;
var list = src.getRenderList();
// Skip rendering?
if (src.skipRender || !src.visible || worldAlpha === 0 || list.length === 0)
{
return;
}
// Render bobs
for (var i = 0; i < list.length; i++)
{
var bob = list[i];
renderer.blitterBatch.add(bob.x, bob.y, bob.frame, bob.alpha);
}
};
module.exports = BlitterWebGLRenderer;