2016-10-04 14:39:54 +00:00
|
|
|
Phaser.Renderer.WebGL.GameObjects.Container = {
|
|
|
|
|
2016-10-05 00:25:06 +00:00
|
|
|
TYPES: [
|
2016-11-01 00:31:45 +00:00
|
|
|
Phaser.GameObject.Container.prototype
|
2016-10-05 00:25:06 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
render: function (renderer, src)
|
2016-10-04 14:39:54 +00:00
|
|
|
{
|
2016-11-01 00:31:45 +00:00
|
|
|
var alpha = src.color.worldAlpha * 255 << 24;
|
|
|
|
|
|
|
|
// Skip rendering?
|
|
|
|
if (src.skipRender || !src.visible || alpha === 0 || src.children.list.length === 0)
|
2016-10-04 14:39:54 +00:00
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2016-11-01 00:31:45 +00:00
|
|
|
// if (src._cacheAsBitmap)
|
|
|
|
// {
|
|
|
|
// return Phaser.Renderer.WebGL.GameObjects.Container.renderCachedSprite(renderer, src);
|
|
|
|
// }
|
2016-10-04 14:39:54 +00:00
|
|
|
|
2016-11-01 00:31:45 +00:00
|
|
|
// Render children
|
|
|
|
for (var i = 0; i < src.children.list.length; i++)
|
2016-10-04 14:39:54 +00:00
|
|
|
{
|
2016-11-01 00:31:45 +00:00
|
|
|
var child = src.children.list[i];
|
2016-10-04 14:39:54 +00:00
|
|
|
|
2016-11-01 00:31:45 +00:00
|
|
|
child.render(renderer, child);
|
2016-10-04 14:39:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
2016-10-05 00:25:06 +00:00
|
|
|
renderCachedSprite: function (renderer, src)
|
2016-10-04 14:39:54 +00:00
|
|
|
{
|
|
|
|
// TODO
|
|
|
|
return renderer;
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|