2017-01-12 17:11:58 +00:00
|
|
|
|
|
|
|
var ImageCanvasRenderer = function (renderer, src, interpolationPercentage)
|
|
|
|
{
|
|
|
|
var frame = src.frame;
|
|
|
|
var alpha = src.color.worldAlpha * 255 << 24;
|
|
|
|
|
2017-01-31 00:56:13 +00:00
|
|
|
// Move all of these to accessors that automatically remove this GO from the display list anyway
|
2017-01-12 17:11:58 +00:00
|
|
|
if (src.skipRender || !src.visible || alpha === 0 || !frame.cutWidth || !frame.cutHeight)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2017-01-31 00:56:13 +00:00
|
|
|
// var data = src.transform.worldMatrix;
|
2017-01-12 17:11:58 +00:00
|
|
|
var tint = src.color._glTint;
|
|
|
|
var bg = src.color._glBg;
|
|
|
|
|
2017-01-31 00:56:13 +00:00
|
|
|
renderer.drawImage(frame, src.blendMode, src.transform, alpha, tint, bg);
|
2017-01-12 17:11:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = ImageCanvasRenderer;
|