mirror of
https://github.com/photonstorm/phaser
synced 2024-12-26 04:53:38 +00:00
27 lines
739 B
JavaScript
27 lines
739 B
JavaScript
Phaser.Renderer.WebGL.GameObjects.Image = {
|
|
|
|
TYPES: [
|
|
Phaser.GameObject.Image.prototype
|
|
],
|
|
|
|
render: function (renderer, src, interpolationPercentage)
|
|
{
|
|
var frame = src.frame;
|
|
var alpha = src.color.worldAlpha * 255 << 24;
|
|
|
|
// Skip rendering?
|
|
|
|
if (src.skipRender || !src.visible || alpha === 0 || !frame.cutWidth || !frame.cutHeight)
|
|
{
|
|
return;
|
|
}
|
|
|
|
var verts = src.transform.getVertexData(interpolationPercentage);
|
|
var index = src.frame.source.glTextureIndex;
|
|
var tint = src.color._glTint;
|
|
var bg = src.color._glBg;
|
|
|
|
renderer.batch.add(frame.source, src.blendMode, verts, frame.uvs, index, alpha, tint, bg);
|
|
}
|
|
|
|
};
|