Minor linter fixes
This commit is contained in:
parent
0e292b817c
commit
cf910de0f6
3 changed files with 13 additions and 9 deletions
|
@ -59,16 +59,20 @@ class webgl extends make {
|
||||||
|
|
||||||
static match (shader, regex, group = 1) {
|
static match (shader, regex, group = 1) {
|
||||||
let matches = []
|
let matches = []
|
||||||
let match
|
while (true) {
|
||||||
while (match = regex.exec(shader)) {
|
let match = regex.exec(shader)
|
||||||
|
if (match) {
|
||||||
matches.push(match[group])
|
matches.push(match[group])
|
||||||
|
} else {
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return matches
|
return matches
|
||||||
}
|
}
|
||||||
|
|
||||||
static parseUniforms (shader, group = 1) {
|
static parseUniforms (shader, group = 1) {
|
||||||
/* Todo: Parse their individual data types into categories. */
|
/* Todo: Parse their individual data types into categories. */
|
||||||
return webgl.match(shader, /uniform .+? (\w+)(?=[\[;])/gm, group)
|
return webgl.match(shader, /uniform .+? (\w+)(?=[\[;])/gm, group) /* eslint-disable-line no-useless-escape */
|
||||||
}
|
}
|
||||||
|
|
||||||
static parseAttributes (shader, group = 1) {
|
static parseAttributes (shader, group = 1) {
|
||||||
|
@ -86,7 +90,7 @@ class webgl extends make {
|
||||||
|
|
||||||
static parseFragDatav3 (shader, group = 1) {
|
static parseFragDatav3 (shader, group = 1) {
|
||||||
// #version 300
|
// #version 300
|
||||||
return webgl.match(shader, /out .+? (\w+)(?=[\[;])/gm, group)
|
return webgl.match(shader, /out .+? (\w+)(?=[\[;])/gm, group) /* eslint-disable-line no-useless-escape */
|
||||||
}
|
}
|
||||||
|
|
||||||
static parseFrag (shader, group = 1) {
|
static parseFrag (shader, group = 1) {
|
||||||
|
|
Loading…
Reference in a new issue