mirror of
https://github.com/photonstorm/phaser
synced 2024-12-22 02:53:27 +00:00
38 lines
856 B
JavaScript
38 lines
856 B
JavaScript
Phaser.Renderer.WebGL.GameObjects.Container = {
|
|
|
|
TYPES: [
|
|
Phaser.GameObject.Container.prototype
|
|
],
|
|
|
|
render: function (renderer, src)
|
|
{
|
|
var alpha = src.color.worldAlpha * 255 << 24;
|
|
|
|
// Skip rendering?
|
|
if (src.skipRender || !src.visible || alpha === 0 || src.children.list.length === 0)
|
|
{
|
|
return;
|
|
}
|
|
|
|
// if (src._cacheAsBitmap)
|
|
// {
|
|
// return Phaser.Renderer.WebGL.GameObjects.Container.renderCachedSprite(renderer, src);
|
|
// }
|
|
|
|
// Render children
|
|
for (var i = 0; i < src.children.list.length; i++)
|
|
{
|
|
var child = src.children.list[i];
|
|
|
|
child.render(renderer, child);
|
|
}
|
|
|
|
},
|
|
|
|
renderCachedSprite: function (renderer, src)
|
|
{
|
|
// TODO
|
|
return renderer;
|
|
}
|
|
|
|
};
|