phaser/src/gameobjects/container/ContainerWebGLRenderer.js

39 lines
856 B
JavaScript
Raw Normal View History

Phaser.Renderer.WebGL.GameObjects.Container = {
2016-10-05 00:25:06 +00:00
TYPES: [
Phaser.GameObject.Container.prototype
2016-10-05 00:25:06 +00:00
],
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);
}
},
2016-10-05 00:25:06 +00:00
renderCachedSprite: function (renderer, src)
{
// TODO
return renderer;
}
};