2016-10-08 02:05:42 +00:00
|
|
|
Phaser.Renderer.WebGL.GameObjects.Image = {
|
|
|
|
|
|
|
|
TYPES: [
|
2016-10-09 21:27:58 +00:00
|
|
|
Phaser.GameObject.Image.prototype
|
2016-10-08 02:05:42 +00:00
|
|
|
],
|
|
|
|
|
2016-11-08 01:50:57 +00:00
|
|
|
render: function (renderer, src, interpolationPercentage)
|
2016-10-08 02:05:42 +00:00
|
|
|
{
|
2016-10-18 16:03:25 +00:00
|
|
|
var frame = src.frame;
|
2016-10-24 16:14:10 +00:00
|
|
|
var alpha = src.color.worldAlpha * 255 << 24;
|
2016-10-18 16:03:25 +00:00
|
|
|
|
|
|
|
// Skip rendering?
|
|
|
|
|
2016-10-24 16:14:10 +00:00
|
|
|
if (src.skipRender || !src.visible || alpha === 0 || !frame.cutWidth || !frame.cutHeight)
|
2016-10-08 02:05:42 +00:00
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2016-11-09 12:25:26 +00:00
|
|
|
var verts = src.transform.getVertexData(interpolationPercentage);
|
2016-10-24 23:41:45 +00:00
|
|
|
var index = src.frame.source.glTextureIndex;
|
2016-10-23 10:25:44 +00:00
|
|
|
var tint = src.color._glTint;
|
|
|
|
var bg = src.color._glBg;
|
|
|
|
|
2016-10-31 00:03:57 +00:00
|
|
|
renderer.batch.add(frame.source, src.blendMode, verts, frame.uvs, index, alpha, tint, bg);
|
2016-10-08 02:05:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
};
|