Don't render if there's no texture

This commit is contained in:
Richard Davey 2019-10-04 13:14:06 +01:00
parent d72e86cc2a
commit 3d31e27926
2 changed files with 8 additions and 2 deletions

View file

@ -21,7 +21,10 @@
*/
var VideoCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)
{
renderer.batchSprite(src, src.frame, camera, parentMatrix);
if (src.videoTexture)
{
renderer.batchSprite(src, src.frame, camera, parentMatrix);
}
};
module.exports = VideoCanvasRenderer;

View file

@ -21,7 +21,10 @@
*/
var VideoWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)
{
this.pipeline.batchSprite(src, camera, parentMatrix);
if (src.videoTexture)
{
this.pipeline.batchSprite(src, camera, parentMatrix);
}
};
module.exports = VideoWebGLRenderer;