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-01 01:40:11 +00:00
|
|
|
var len = src.children.list.length - 1;
|
2017-01-22 22:54:06 +00:00
|
|
|
|
|
|
|
// Skip rendering?
|
|
|
|
|
2017-02-01 00:43:38 +00:00
|
|
|
if (src.skipRender || !src.visible || worldAlpha === 0 || len === 0)
|
|
|
|
{
|
|
|
|
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-03 16:11:31 +00:00
|
|
|
for (var i = 0; i <= len; ++i)
|
2017-01-22 22:54:06 +00:00
|
|
|
{
|
|
|
|
var bob = src.children.list[i];
|
|
|
|
var frame = bob.frame;
|
|
|
|
|
2017-01-24 13:15:25 +00:00
|
|
|
renderer.blitterBatch.add(bob.x, bob.y, frame, worldAlpha);
|
2017-01-22 22:54:06 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = BlitterWebGLRenderer;
|