* adjusts to directly check the gl.constructor.name instead of instanceof * spacing
@@ -52,7 +52,7 @@ function WebGLCapabilities( gl, extensions, parameters ) {
}
- const isWebGL2 = typeof WebGL2RenderingContext !== 'undefined' && gl instanceof WebGL2RenderingContext;
+ const isWebGL2 = typeof WebGL2RenderingContext !== 'undefined' && gl.constructor.name === 'WebGL2RenderingContext';
let precision = parameters.precision !== undefined ? parameters.precision : 'highp';
const maxPrecision = getMaxPrecision( precision );