Remove unnecessary closure and fix uniform type

This commit is contained in:
Tim Schaub
2019-04-19 14:33:43 -07:00
parent 440ae897a5
commit 58c4c9ebb8
+9 -7
View File
@@ -90,7 +90,7 @@ export const DefaultAttrib = {
/** /**
* @typedef {Object} UniformInternalDescription * @typedef {Object} UniformInternalDescription
* @property {string} name Name * @property {string} name Name
* @property {UniformLiteralValue=} value Value * @property {UniformValue=} value Value
* @property {WebGLTexture} [texture] Texture * @property {WebGLTexture} [texture] Texture
* @private * @private
*/ */
@@ -316,12 +316,14 @@ class WebGLHelper extends Disposable {
* @private * @private
*/ */
this.uniforms_ = []; this.uniforms_ = [];
options.uniforms && Object.keys(options.uniforms).forEach(function(name) { if (options.uniforms) {
this.uniforms_.push({ for (const name in options.uniforms) {
name: name, this.uniforms_.push({
value: options.uniforms[name] name: name,
}); value: options.uniforms[name]
}.bind(this)); });
}
}
/** /**
* An array of PostProcessingPass objects is kept in this variable, built from the steps provided in the * An array of PostProcessingPass objects is kept in this variable, built from the steps provided in the