2016-12-07 02:28:22 +00:00
|
|
|
|
|
|
|
var ImageWebGLRenderer = function (renderer, src, interpolationPercentage)
|
|
|
|
{
|
|
|
|
var frame = src.frame;
|
2017-01-31 17:04:31 +00:00
|
|
|
// var alpha = src.color.worldAlpha * 255 << 24;
|
|
|
|
|
|
|
|
var alpha = 16777216;
|
2016-12-07 02:28:22 +00:00
|
|
|
|
|
|
|
// Skip rendering?
|
|
|
|
|
2017-01-31 17:04:31 +00:00
|
|
|
// if (src.skipRender || !src.visible || alpha === 0 || !frame.cutWidth || !frame.cutHeight)
|
|
|
|
// {
|
|
|
|
// return;
|
|
|
|
// }
|
2016-12-07 02:28:22 +00:00
|
|
|
|
2017-01-19 23:20:36 +00:00
|
|
|
// var verts = src.transform.getVertexData(interpolationPercentage, renderer);
|
|
|
|
// 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);
|
2016-12-07 02:28:22 +00:00
|
|
|
|
2017-01-19 23:20:36 +00:00
|
|
|
var transform = src.transform;
|
2017-01-23 21:42:47 +00:00
|
|
|
renderer.setBlendMode(src.color._blendMode);
|
2017-01-19 23:20:36 +00:00
|
|
|
renderer.spriteBatch.add(
|
2017-01-20 17:58:41 +00:00
|
|
|
frame,
|
2017-01-31 16:27:07 +00:00
|
|
|
src.anchorX, src.anchorY,
|
|
|
|
transform.worldMatrix.matrix,
|
2017-01-23 14:58:58 +00:00
|
|
|
src.color._glTint
|
2017-01-19 23:20:36 +00:00
|
|
|
);
|
2016-12-07 02:28:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = ImageWebGLRenderer;
|