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