diff --git a/lib/make/webgl.js b/lib/make/webgl.js index e005723..1ff2fe2 100644 --- a/lib/make/webgl.js +++ b/lib/make/webgl.js @@ -2,7 +2,7 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - make.webgl = { +make.webgl = { internalFormat: { 'RGB': {format: 'RGB', type: ['UNSIGNED_BYTE', 'UNSIGNED_SHORT_5_6_5']}, 'RGBA': {format: 'RGBA', type: ['UNSIGNED_BYTE', 'UNSIGNED_SHORT_4_4_4_4', 'UNSIGNED_SHORT_5_5_5_1']}, @@ -55,7 +55,7 @@ return 'RENDERBUFFER' }, textureSources: () => { - sources = [ + let sources = [ 'HTMLCanvasElement', 'HTMLImageElement', 'HTMLVideoElement', @@ -66,19 +66,21 @@ return random.item(sources) }, parseUniforms: (shader) => { - let names = [], result = shader.match(/uniform .* (\w+)(?=;)/gm) + let names = [] + let result = shader.match(/uniform .* (\w+)(?=;)/gm) if (result) { result.forEach(function (v) { - names.push(v.split(" ").pop()) + names.push(v.split(' ').pop()) }) } return names }, parseAttributes: (shader) => { - let names = [], result = shader.match(/attribute .* (\w+)(?=;)/gm) + let names = [] + let result = shader.match(/attribute .* (\w+)(?=;)/gm) if (result) { result.forEach(function (v) { - names.push(v.split(" ").pop()) + names.push(v.split(' ').pop()) }) } return names