diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index bfa6f4a..395b1fa 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -365,7 +365,7 @@ }; /** - * Updates and Creates a WebGL texture for the renderers context. + * Updates and/or Creates a WebGL texture for the renderer's context. * * @param texture {BaseTexture|Texture} the texture to update */ @@ -399,7 +399,6 @@ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, texture.scaleMode === CONST.scaleModes.LINEAR ? gl.LINEAR : gl.NEAREST); } - // reguler... if (!texture._powerOf2) { gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index bfa6f4a..395b1fa 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -365,7 +365,7 @@ }; /** - * Updates and Creates a WebGL texture for the renderers context. + * Updates and/or Creates a WebGL texture for the renderer's context. * * @param texture {BaseTexture|Texture} the texture to update */ @@ -399,7 +399,6 @@ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, texture.scaleMode === CONST.scaleModes.LINEAR ? gl.LINEAR : gl.NEAREST); } - // reguler... if (!texture._powerOf2) { gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); diff --git a/src/core/renderers/webgl/utils/WebGLGraphicsData.js b/src/core/renderers/webgl/utils/WebGLGraphicsData.js index 41be102..c56d05e 100644 --- a/src/core/renderers/webgl/utils/WebGLGraphicsData.js +++ b/src/core/renderers/webgl/utils/WebGLGraphicsData.js @@ -6,7 +6,7 @@ this.gl = gl; //TODO does this need to be split before uploding?? - this.color = [0,0,0]; // color split! + this.color = [0, 0, 0]; // color split! this.points = []; this.indices = []; this.buffer = gl.createBuffer(); @@ -23,8 +23,8 @@ * */ WebGLGraphicsData.prototype.reset = function () { - this.points = []; - this.indices = []; + this.points.length = 0; + this.indices.length = 0; }; /** diff --git a/src/core/renderers/webgl/WebGLRenderer.js b/src/core/renderers/webgl/WebGLRenderer.js index bfa6f4a..395b1fa 100644 --- a/src/core/renderers/webgl/WebGLRenderer.js +++ b/src/core/renderers/webgl/WebGLRenderer.js @@ -365,7 +365,7 @@ }; /** - * Updates and Creates a WebGL texture for the renderers context. + * Updates and/or Creates a WebGL texture for the renderer's context. * * @param texture {BaseTexture|Texture} the texture to update */ @@ -399,7 +399,6 @@ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, texture.scaleMode === CONST.scaleModes.LINEAR ? gl.LINEAR : gl.NEAREST); } - // reguler... if (!texture._powerOf2) { gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); diff --git a/src/core/renderers/webgl/utils/WebGLGraphicsData.js b/src/core/renderers/webgl/utils/WebGLGraphicsData.js index 41be102..c56d05e 100644 --- a/src/core/renderers/webgl/utils/WebGLGraphicsData.js +++ b/src/core/renderers/webgl/utils/WebGLGraphicsData.js @@ -6,7 +6,7 @@ this.gl = gl; //TODO does this need to be split before uploding?? - this.color = [0,0,0]; // color split! + this.color = [0, 0, 0]; // color split! this.points = []; this.indices = []; this.buffer = gl.createBuffer(); @@ -23,8 +23,8 @@ * */ WebGLGraphicsData.prototype.reset = function () { - this.points = []; - this.indices = []; + this.points.length = 0; + this.indices.length = 0; }; /** diff --git a/src/core/textures/Texture.js b/src/core/textures/Texture.js index 16ed51c..d461ece 100644 --- a/src/core/textures/Texture.js +++ b/src/core/textures/Texture.js @@ -27,7 +27,7 @@ if (!frame) { this.noFrame = true; - frame = new math.Rectangle(0,0,1,1); + frame = new math.Rectangle(0, 0, 1, 1); } if (baseTexture instanceof Texture) {