Use blocked scoped variables

In addition to using const and let, this also upgrades our linter config and removes lint (mostly whitespace).
This commit is contained in:
Tim Schaub
2018-01-11 23:32:36 -07:00
parent 0bf2b04dee
commit ad62739a6e
684 changed files with 18120 additions and 18184 deletions

View File

@@ -10,67 +10,67 @@ import {DEBUG_WEBGL} from '../../../../index.js';
* @param {WebGLProgram} program Program.
* @struct
*/
var _ol_render_webgl_texturereplay_defaultshader_Locations_ = function(gl, program) {
const _ol_render_webgl_texturereplay_defaultshader_Locations_ = function(gl, program) {
/**
* @type {WebGLUniformLocation}
*/
this.u_projectionMatrix = gl.getUniformLocation(
program, DEBUG_WEBGL ? 'u_projectionMatrix' : 'h');
program, DEBUG_WEBGL ? 'u_projectionMatrix' : 'h');
/**
* @type {WebGLUniformLocation}
*/
this.u_offsetScaleMatrix = gl.getUniformLocation(
program, DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'i');
program, DEBUG_WEBGL ? 'u_offsetScaleMatrix' : 'i');
/**
* @type {WebGLUniformLocation}
*/
this.u_offsetRotateMatrix = gl.getUniformLocation(
program, DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'j');
program, DEBUG_WEBGL ? 'u_offsetRotateMatrix' : 'j');
/**
* @type {WebGLUniformLocation}
*/
this.u_opacity = gl.getUniformLocation(
program, DEBUG_WEBGL ? 'u_opacity' : 'k');
program, DEBUG_WEBGL ? 'u_opacity' : 'k');
/**
* @type {WebGLUniformLocation}
*/
this.u_image = gl.getUniformLocation(
program, DEBUG_WEBGL ? 'u_image' : 'l');
program, DEBUG_WEBGL ? 'u_image' : 'l');
/**
* @type {number}
*/
this.a_position = gl.getAttribLocation(
program, DEBUG_WEBGL ? 'a_position' : 'c');
program, DEBUG_WEBGL ? 'a_position' : 'c');
/**
* @type {number}
*/
this.a_texCoord = gl.getAttribLocation(
program, DEBUG_WEBGL ? 'a_texCoord' : 'd');
program, DEBUG_WEBGL ? 'a_texCoord' : 'd');
/**
* @type {number}
*/
this.a_offsets = gl.getAttribLocation(
program, DEBUG_WEBGL ? 'a_offsets' : 'e');
program, DEBUG_WEBGL ? 'a_offsets' : 'e');
/**
* @type {number}
*/
this.a_opacity = gl.getAttribLocation(
program, DEBUG_WEBGL ? 'a_opacity' : 'f');
program, DEBUG_WEBGL ? 'a_opacity' : 'f');
/**
* @type {number}
*/
this.a_rotateWithView = gl.getAttribLocation(
program, DEBUG_WEBGL ? 'a_rotateWithView' : 'g');
program, DEBUG_WEBGL ? 'a_rotateWithView' : 'g');
};
export default _ol_render_webgl_texturereplay_defaultshader_Locations_;