From 6a91e40ef5891aa16b044e52150eb177f928175c Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Thu, 30 Apr 2020 22:31:59 +0800 Subject: [PATCH] check for GL #29 --- glTransitions.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/glTransitions.js b/glTransitions.js index 26b3fe7..a026ad2 100644 --- a/glTransitions.js +++ b/glTransitions.js @@ -8,6 +8,10 @@ const createTexture = require('gl-texture2d'); module.exports = ({ width, height, channels }) => { const gl = GL(width, height); + if (!gl) { + throw new Error('gl returned null, this probably means that some dependencies are not installed. See README.'); + } + function runTransitionOnFrame({ fromFrame, toFrame, progress, transitionName, transitionParams = {} }) { function convertFrame(buf) { // @see https://github.com/stackgl/gl-texture2d/issues/16