2017-01-12 17:11:58 +00:00
|
|
|
|
2017-02-21 20:05:18 +00:00
|
|
|
var ImageCanvasRenderer = function (renderer, src, interpolationPercentage, camera)
|
2017-01-12 17:11:58 +00:00
|
|
|
{
|
|
|
|
var frame = src.frame;
|
2017-01-31 14:55:15 +00:00
|
|
|
|
|
|
|
// Calculate this in the Color component
|
2017-02-22 22:15:50 +00:00
|
|
|
var alpha = 1; //src.color.worldAlpha * 255 << 24;
|
2017-01-12 17:11:58 +00:00
|
|
|
|
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-02-22 22:15:50 +00:00
|
|
|
var tint = null; //src.color._glTint;
|
|
|
|
var bg = null; //src.color._glBg;
|
2017-01-12 17:11:58 +00:00
|
|
|
|
2017-02-22 22:15:50 +00:00
|
|
|
renderer.drawImage(frame, src, /* blendMode */null, alpha, tint, bg, camera);
|
2017-01-12 17:11:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = ImageCanvasRenderer;
|