Add WebGL extensions names
This commit is contained in:
parent
e11c0eca0a
commit
e245d40e38
1 changed files with 9 additions and 3 deletions
|
@ -786,8 +786,8 @@ class webgl extends make {
|
|||
return random.item(pname)
|
||||
}
|
||||
|
||||
static randomExtension () {
|
||||
let extension = [
|
||||
static randomExtension (pattern) {
|
||||
let extensions = [
|
||||
'ANGLE_instanced_arrays',
|
||||
'EXT_blend_minmax',
|
||||
'EXT_color_buffer_half_float',
|
||||
|
@ -813,7 +813,13 @@ class webgl extends make {
|
|||
'WEBGL_lose_context'
|
||||
]
|
||||
|
||||
return random.item(extension)
|
||||
if (pattern) {
|
||||
let candidates = []
|
||||
extensions.forEach((ext) => ext.includes(pattern) ? candidates.push(ext) : '')
|
||||
return random.item(candidates)
|
||||
}
|
||||
|
||||
return random.item(extensions)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue