phaser/src/renderer/webgl/WebGLSupportedExtensions.js
2018-01-09 21:43:56 +00:00

16 lines
364 B
JavaScript

var WebGLSupportedExtensions = (function () {
var gl = document.createElement('canvas').getContext('webgl');
var extensionList = gl ? gl.getSupportedExtensions() : [];
return {
has: function (name)
{
return extensionList.indexOf(name) >= 0;
}
};
}());
module.exports = WebGLSupportedExtensions;