StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
StackGenVis/frontend/node_modules/regl/lib/extension.js

37 lines
1.0 KiB

var check = require('./util/check')
module.exports = function createExtensionCache (gl, config) {
var extensions = {}
function tryLoadExtension (name_) {
check.type(name_, 'string', 'extension name must be string')
var name = name_.toLowerCase()
var ext
try {
ext = extensions[name] = gl.getExtension(name)
} catch (e) {}
return !!ext
}
for (var i = 0; i < config.extensions.length; ++i) {
var name = config.extensions[i]
if (!tryLoadExtension(name)) {
config.onDestroy()
config.onDone('"' + name + '" extension is not supported by the current WebGL context, try upgrading your system or a different browser')
return null
}
}
config.optionalExtensions.forEach(tryLoadExtension)
return {
extensions: extensions,
restore: function () {
Object.keys(extensions).forEach(function (name) {
if (extensions[name] && !tryLoadExtension(name)) {
throw new Error('(regl): error restoring extension ' + name)
}
})
}
}
}