diff --git a/src/core/graphics/webgl/GraphicsRenderer.js b/src/core/graphics/webgl/GraphicsRenderer.js index 6ce7466..ca59dd1 100644 --- a/src/core/graphics/webgl/GraphicsRenderer.js +++ b/src/core/graphics/webgl/GraphicsRenderer.js @@ -77,7 +77,7 @@ if (graphics.dirty) { - this.updateGraphics(graphics, gl); + this.updateGraphics(graphics); } var webGL = graphics._webGL[gl.id]; @@ -90,24 +90,24 @@ // var matrix = renderer.currentRenderTarget.projectionMatrix.clone(); // matrix.append(graphics.worldTransform); - for (var i = 0; i < webGL.data.length; i++) + for (var i = 0, n = webGL.data.length; i < n; i++) { + webGLData = webGL.data[i]; + if (webGL.data[i].mode === 1) { - webGLData = webGL.data[i]; - renderer.stencilManager.pushStencil(graphics, webGLData, renderer); + renderer.stencilManager.pushStencil(graphics, webGLData); gl.uniform1f(renderer.shaderManager.complexPrimitiveShader.uniforms.alpha._location, graphics.worldAlpha * webGLData.alpha); // render quad.. gl.drawElements(gl.TRIANGLE_FAN, 4, gl.UNSIGNED_SHORT, ( webGLData.indices.length - 4 ) * 2 ); - renderer.stencilManager.popStencil(graphics, webGLData, renderer); + renderer.stencilManager.popStencil(graphics, webGLData); } else { - webGLData = webGL.data[i]; shader = renderer.shaderManager.primitiveShader; diff --git a/src/core/graphics/webgl/GraphicsRenderer.js b/src/core/graphics/webgl/GraphicsRenderer.js index 6ce7466..ca59dd1 100644 --- a/src/core/graphics/webgl/GraphicsRenderer.js +++ b/src/core/graphics/webgl/GraphicsRenderer.js @@ -77,7 +77,7 @@ if (graphics.dirty) { - this.updateGraphics(graphics, gl); + this.updateGraphics(graphics); } var webGL = graphics._webGL[gl.id]; @@ -90,24 +90,24 @@ // var matrix = renderer.currentRenderTarget.projectionMatrix.clone(); // matrix.append(graphics.worldTransform); - for (var i = 0; i < webGL.data.length; i++) + for (var i = 0, n = webGL.data.length; i < n; i++) { + webGLData = webGL.data[i]; + if (webGL.data[i].mode === 1) { - webGLData = webGL.data[i]; - renderer.stencilManager.pushStencil(graphics, webGLData, renderer); + renderer.stencilManager.pushStencil(graphics, webGLData); gl.uniform1f(renderer.shaderManager.complexPrimitiveShader.uniforms.alpha._location, graphics.worldAlpha * webGLData.alpha); // render quad.. gl.drawElements(gl.TRIANGLE_FAN, 4, gl.UNSIGNED_SHORT, ( webGLData.indices.length - 4 ) * 2 ); - renderer.stencilManager.popStencil(graphics, webGLData, renderer); + renderer.stencilManager.popStencil(graphics, webGLData); } else { - webGLData = webGL.data[i]; shader = renderer.shaderManager.primitiveShader; diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 282e1f0..30b7685 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -197,6 +197,12 @@ this.context = tempContext; }; +/** + * @extends PIXI.SystemRenderer#resize + * + * @param {number} w + * @param {number} h + */ CanvasRenderer.prototype.resize = function (w, h) { SystemRenderer.prototype.resize.call(this, w, h); diff --git a/src/core/graphics/webgl/GraphicsRenderer.js b/src/core/graphics/webgl/GraphicsRenderer.js index 6ce7466..ca59dd1 100644 --- a/src/core/graphics/webgl/GraphicsRenderer.js +++ b/src/core/graphics/webgl/GraphicsRenderer.js @@ -77,7 +77,7 @@ if (graphics.dirty) { - this.updateGraphics(graphics, gl); + this.updateGraphics(graphics); } var webGL = graphics._webGL[gl.id]; @@ -90,24 +90,24 @@ // var matrix = renderer.currentRenderTarget.projectionMatrix.clone(); // matrix.append(graphics.worldTransform); - for (var i = 0; i < webGL.data.length; i++) + for (var i = 0, n = webGL.data.length; i < n; i++) { + webGLData = webGL.data[i]; + if (webGL.data[i].mode === 1) { - webGLData = webGL.data[i]; - renderer.stencilManager.pushStencil(graphics, webGLData, renderer); + renderer.stencilManager.pushStencil(graphics, webGLData); gl.uniform1f(renderer.shaderManager.complexPrimitiveShader.uniforms.alpha._location, graphics.worldAlpha * webGLData.alpha); // render quad.. gl.drawElements(gl.TRIANGLE_FAN, 4, gl.UNSIGNED_SHORT, ( webGLData.indices.length - 4 ) * 2 ); - renderer.stencilManager.popStencil(graphics, webGLData, renderer); + renderer.stencilManager.popStencil(graphics, webGLData); } else { - webGLData = webGL.data[i]; shader = renderer.shaderManager.primitiveShader; diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 282e1f0..30b7685 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -197,6 +197,12 @@ this.context = tempContext; }; +/** + * @extends PIXI.SystemRenderer#resize + * + * @param {number} w + * @param {number} h + */ CanvasRenderer.prototype.resize = function (w, h) { SystemRenderer.prototype.resize.call(this, w, h); diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 8ee11fa..e58804e 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -50,7 +50,7 @@ var gl = this.renderer.gl, sms = this.stencilMaskStack; - this.bindGraphics(graphics, webGLData, this.renderer); + this.bindGraphics(graphics, webGLData); if (sms.stencilStack.length === 0) { @@ -140,8 +140,6 @@ WebGLMaskManager.prototype.bindGraphics = function (graphics, webGLData) { //if (this._currentGraphics === graphics)return; - this._currentGraphics = graphics; - var gl = this.renderer.gl; // bind the graphics object.. @@ -177,7 +175,7 @@ //this.renderer.shaderManager.activatePrimitiveShader(); shader = this.renderer.shaderManager.primitiveShader; - this.renderer.shaderManager.setShader( shader ); + this.renderer.shaderManager.setShader(shader); gl.uniformMatrix3fv(shader.uniforms.translationMatrix._location, false, graphics.worldTransform.toArray(true)); @@ -222,7 +220,7 @@ var level = sms.count; - this.bindGraphics(graphics, webGLData, this.renderer); + this.bindGraphics(graphics, webGLData); gl.colorMask(false, false, false, false); @@ -329,7 +327,7 @@ return; } - this.pushStencil(maskData, maskData._webGL[this.renderer.gl.id].data[0], this.renderer); + this.pushStencil(maskData, maskData._webGL[this.renderer.gl.id].data[0]); }; /** @@ -341,6 +339,6 @@ { this.renderer.setObjectRenderer(this.renderer.plugins.graphics); - this.popStencil(maskData, maskData._webGL[this.renderer.gl.id].data[0], this.renderer); + this.popStencil(maskData, maskData._webGL[this.renderer.gl.id].data[0]); }; diff --git a/src/core/graphics/webgl/GraphicsRenderer.js b/src/core/graphics/webgl/GraphicsRenderer.js index 6ce7466..ca59dd1 100644 --- a/src/core/graphics/webgl/GraphicsRenderer.js +++ b/src/core/graphics/webgl/GraphicsRenderer.js @@ -77,7 +77,7 @@ if (graphics.dirty) { - this.updateGraphics(graphics, gl); + this.updateGraphics(graphics); } var webGL = graphics._webGL[gl.id]; @@ -90,24 +90,24 @@ // var matrix = renderer.currentRenderTarget.projectionMatrix.clone(); // matrix.append(graphics.worldTransform); - for (var i = 0; i < webGL.data.length; i++) + for (var i = 0, n = webGL.data.length; i < n; i++) { + webGLData = webGL.data[i]; + if (webGL.data[i].mode === 1) { - webGLData = webGL.data[i]; - renderer.stencilManager.pushStencil(graphics, webGLData, renderer); + renderer.stencilManager.pushStencil(graphics, webGLData); gl.uniform1f(renderer.shaderManager.complexPrimitiveShader.uniforms.alpha._location, graphics.worldAlpha * webGLData.alpha); // render quad.. gl.drawElements(gl.TRIANGLE_FAN, 4, gl.UNSIGNED_SHORT, ( webGLData.indices.length - 4 ) * 2 ); - renderer.stencilManager.popStencil(graphics, webGLData, renderer); + renderer.stencilManager.popStencil(graphics, webGLData); } else { - webGLData = webGL.data[i]; shader = renderer.shaderManager.primitiveShader; diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 282e1f0..30b7685 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -197,6 +197,12 @@ this.context = tempContext; }; +/** + * @extends PIXI.SystemRenderer#resize + * + * @param {number} w + * @param {number} h + */ CanvasRenderer.prototype.resize = function (w, h) { SystemRenderer.prototype.resize.call(this, w, h); diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 8ee11fa..e58804e 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -50,7 +50,7 @@ var gl = this.renderer.gl, sms = this.stencilMaskStack; - this.bindGraphics(graphics, webGLData, this.renderer); + this.bindGraphics(graphics, webGLData); if (sms.stencilStack.length === 0) { @@ -140,8 +140,6 @@ WebGLMaskManager.prototype.bindGraphics = function (graphics, webGLData) { //if (this._currentGraphics === graphics)return; - this._currentGraphics = graphics; - var gl = this.renderer.gl; // bind the graphics object.. @@ -177,7 +175,7 @@ //this.renderer.shaderManager.activatePrimitiveShader(); shader = this.renderer.shaderManager.primitiveShader; - this.renderer.shaderManager.setShader( shader ); + this.renderer.shaderManager.setShader(shader); gl.uniformMatrix3fv(shader.uniforms.translationMatrix._location, false, graphics.worldTransform.toArray(true)); @@ -222,7 +220,7 @@ var level = sms.count; - this.bindGraphics(graphics, webGLData, this.renderer); + this.bindGraphics(graphics, webGLData); gl.colorMask(false, false, false, false); @@ -329,7 +327,7 @@ return; } - this.pushStencil(maskData, maskData._webGL[this.renderer.gl.id].data[0], this.renderer); + this.pushStencil(maskData, maskData._webGL[this.renderer.gl.id].data[0]); }; /** @@ -341,6 +339,6 @@ { this.renderer.setObjectRenderer(this.renderer.plugins.graphics); - this.popStencil(maskData, maskData._webGL[this.renderer.gl.id].data[0], this.renderer); + this.popStencil(maskData, maskData._webGL[this.renderer.gl.id].data[0]); }; diff --git a/src/core/renderers/webgl/shaders/Shader.js b/src/core/renderers/webgl/shaders/Shader.js index 6566bdd..b82d2d2 100644 --- a/src/core/renderers/webgl/shaders/Shader.js +++ b/src/core/renderers/webgl/shaders/Shader.js @@ -85,7 +85,7 @@ Shader.prototype.constructor = Shader; module.exports = Shader; -/* +/** * Creates the shader and uses it * */ @@ -99,9 +99,9 @@ this.cacheAttributeLocations(Object.keys(this.attributes)); }; -/* +/** * Caches the locations of the uniform for reuse. - + * * @param keys {string} the uniforms to cache */ Shader.prototype.cacheUniformLocations = function (keys) @@ -112,9 +112,9 @@ } }; -/* +/** * Caches the locations of the attribute for reuse. - + * * @param keys {string} the attributes to cache */ Shader.prototype.cacheAttributeLocations = function (keys) @@ -139,9 +139,9 @@ // End worst hack eva // }; -/* +/** * Attaches the shaders and creates the program. - + * * @return {WebGLProgram} */ Shader.prototype.compile = function () diff --git a/src/core/graphics/webgl/GraphicsRenderer.js b/src/core/graphics/webgl/GraphicsRenderer.js index 6ce7466..ca59dd1 100644 --- a/src/core/graphics/webgl/GraphicsRenderer.js +++ b/src/core/graphics/webgl/GraphicsRenderer.js @@ -77,7 +77,7 @@ if (graphics.dirty) { - this.updateGraphics(graphics, gl); + this.updateGraphics(graphics); } var webGL = graphics._webGL[gl.id]; @@ -90,24 +90,24 @@ // var matrix = renderer.currentRenderTarget.projectionMatrix.clone(); // matrix.append(graphics.worldTransform); - for (var i = 0; i < webGL.data.length; i++) + for (var i = 0, n = webGL.data.length; i < n; i++) { + webGLData = webGL.data[i]; + if (webGL.data[i].mode === 1) { - webGLData = webGL.data[i]; - renderer.stencilManager.pushStencil(graphics, webGLData, renderer); + renderer.stencilManager.pushStencil(graphics, webGLData); gl.uniform1f(renderer.shaderManager.complexPrimitiveShader.uniforms.alpha._location, graphics.worldAlpha * webGLData.alpha); // render quad.. gl.drawElements(gl.TRIANGLE_FAN, 4, gl.UNSIGNED_SHORT, ( webGLData.indices.length - 4 ) * 2 ); - renderer.stencilManager.popStencil(graphics, webGLData, renderer); + renderer.stencilManager.popStencil(graphics, webGLData); } else { - webGLData = webGL.data[i]; shader = renderer.shaderManager.primitiveShader; diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 282e1f0..30b7685 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -197,6 +197,12 @@ this.context = tempContext; }; +/** + * @extends PIXI.SystemRenderer#resize + * + * @param {number} w + * @param {number} h + */ CanvasRenderer.prototype.resize = function (w, h) { SystemRenderer.prototype.resize.call(this, w, h); diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 8ee11fa..e58804e 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -50,7 +50,7 @@ var gl = this.renderer.gl, sms = this.stencilMaskStack; - this.bindGraphics(graphics, webGLData, this.renderer); + this.bindGraphics(graphics, webGLData); if (sms.stencilStack.length === 0) { @@ -140,8 +140,6 @@ WebGLMaskManager.prototype.bindGraphics = function (graphics, webGLData) { //if (this._currentGraphics === graphics)return; - this._currentGraphics = graphics; - var gl = this.renderer.gl; // bind the graphics object.. @@ -177,7 +175,7 @@ //this.renderer.shaderManager.activatePrimitiveShader(); shader = this.renderer.shaderManager.primitiveShader; - this.renderer.shaderManager.setShader( shader ); + this.renderer.shaderManager.setShader(shader); gl.uniformMatrix3fv(shader.uniforms.translationMatrix._location, false, graphics.worldTransform.toArray(true)); @@ -222,7 +220,7 @@ var level = sms.count; - this.bindGraphics(graphics, webGLData, this.renderer); + this.bindGraphics(graphics, webGLData); gl.colorMask(false, false, false, false); @@ -329,7 +327,7 @@ return; } - this.pushStencil(maskData, maskData._webGL[this.renderer.gl.id].data[0], this.renderer); + this.pushStencil(maskData, maskData._webGL[this.renderer.gl.id].data[0]); }; /** @@ -341,6 +339,6 @@ { this.renderer.setObjectRenderer(this.renderer.plugins.graphics); - this.popStencil(maskData, maskData._webGL[this.renderer.gl.id].data[0], this.renderer); + this.popStencil(maskData, maskData._webGL[this.renderer.gl.id].data[0]); }; diff --git a/src/core/renderers/webgl/shaders/Shader.js b/src/core/renderers/webgl/shaders/Shader.js index 6566bdd..b82d2d2 100644 --- a/src/core/renderers/webgl/shaders/Shader.js +++ b/src/core/renderers/webgl/shaders/Shader.js @@ -85,7 +85,7 @@ Shader.prototype.constructor = Shader; module.exports = Shader; -/* +/** * Creates the shader and uses it * */ @@ -99,9 +99,9 @@ this.cacheAttributeLocations(Object.keys(this.attributes)); }; -/* +/** * Caches the locations of the uniform for reuse. - + * * @param keys {string} the uniforms to cache */ Shader.prototype.cacheUniformLocations = function (keys) @@ -112,9 +112,9 @@ } }; -/* +/** * Caches the locations of the attribute for reuse. - + * * @param keys {string} the attributes to cache */ Shader.prototype.cacheAttributeLocations = function (keys) @@ -139,9 +139,9 @@ // End worst hack eva // }; -/* +/** * Attaches the shaders and creates the program. - + * * @return {WebGLProgram} */ Shader.prototype.compile = function () diff --git a/src/core/renderers/webgl/utils/StencilMaskStack.js b/src/core/renderers/webgl/utils/StencilMaskStack.js index 3bb8737..bde2e86 100644 --- a/src/core/renderers/webgl/utils/StencilMaskStack.js +++ b/src/core/renderers/webgl/utils/StencilMaskStack.js @@ -2,7 +2,6 @@ * Generic Mask Stack data structure * @class * @memberof PIXI - * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function StencilMaskStack() { diff --git a/src/core/graphics/webgl/GraphicsRenderer.js b/src/core/graphics/webgl/GraphicsRenderer.js index 6ce7466..ca59dd1 100644 --- a/src/core/graphics/webgl/GraphicsRenderer.js +++ b/src/core/graphics/webgl/GraphicsRenderer.js @@ -77,7 +77,7 @@ if (graphics.dirty) { - this.updateGraphics(graphics, gl); + this.updateGraphics(graphics); } var webGL = graphics._webGL[gl.id]; @@ -90,24 +90,24 @@ // var matrix = renderer.currentRenderTarget.projectionMatrix.clone(); // matrix.append(graphics.worldTransform); - for (var i = 0; i < webGL.data.length; i++) + for (var i = 0, n = webGL.data.length; i < n; i++) { + webGLData = webGL.data[i]; + if (webGL.data[i].mode === 1) { - webGLData = webGL.data[i]; - renderer.stencilManager.pushStencil(graphics, webGLData, renderer); + renderer.stencilManager.pushStencil(graphics, webGLData); gl.uniform1f(renderer.shaderManager.complexPrimitiveShader.uniforms.alpha._location, graphics.worldAlpha * webGLData.alpha); // render quad.. gl.drawElements(gl.TRIANGLE_FAN, 4, gl.UNSIGNED_SHORT, ( webGLData.indices.length - 4 ) * 2 ); - renderer.stencilManager.popStencil(graphics, webGLData, renderer); + renderer.stencilManager.popStencil(graphics, webGLData); } else { - webGLData = webGL.data[i]; shader = renderer.shaderManager.primitiveShader; diff --git a/src/core/renderers/canvas/CanvasRenderer.js b/src/core/renderers/canvas/CanvasRenderer.js index 282e1f0..30b7685 100644 --- a/src/core/renderers/canvas/CanvasRenderer.js +++ b/src/core/renderers/canvas/CanvasRenderer.js @@ -197,6 +197,12 @@ this.context = tempContext; }; +/** + * @extends PIXI.SystemRenderer#resize + * + * @param {number} w + * @param {number} h + */ CanvasRenderer.prototype.resize = function (w, h) { SystemRenderer.prototype.resize.call(this, w, h); diff --git a/src/core/renderers/webgl/managers/StencilManager.js b/src/core/renderers/webgl/managers/StencilManager.js index 8ee11fa..e58804e 100644 --- a/src/core/renderers/webgl/managers/StencilManager.js +++ b/src/core/renderers/webgl/managers/StencilManager.js @@ -50,7 +50,7 @@ var gl = this.renderer.gl, sms = this.stencilMaskStack; - this.bindGraphics(graphics, webGLData, this.renderer); + this.bindGraphics(graphics, webGLData); if (sms.stencilStack.length === 0) { @@ -140,8 +140,6 @@ WebGLMaskManager.prototype.bindGraphics = function (graphics, webGLData) { //if (this._currentGraphics === graphics)return; - this._currentGraphics = graphics; - var gl = this.renderer.gl; // bind the graphics object.. @@ -177,7 +175,7 @@ //this.renderer.shaderManager.activatePrimitiveShader(); shader = this.renderer.shaderManager.primitiveShader; - this.renderer.shaderManager.setShader( shader ); + this.renderer.shaderManager.setShader(shader); gl.uniformMatrix3fv(shader.uniforms.translationMatrix._location, false, graphics.worldTransform.toArray(true)); @@ -222,7 +220,7 @@ var level = sms.count; - this.bindGraphics(graphics, webGLData, this.renderer); + this.bindGraphics(graphics, webGLData); gl.colorMask(false, false, false, false); @@ -329,7 +327,7 @@ return; } - this.pushStencil(maskData, maskData._webGL[this.renderer.gl.id].data[0], this.renderer); + this.pushStencil(maskData, maskData._webGL[this.renderer.gl.id].data[0]); }; /** @@ -341,6 +339,6 @@ { this.renderer.setObjectRenderer(this.renderer.plugins.graphics); - this.popStencil(maskData, maskData._webGL[this.renderer.gl.id].data[0], this.renderer); + this.popStencil(maskData, maskData._webGL[this.renderer.gl.id].data[0]); }; diff --git a/src/core/renderers/webgl/shaders/Shader.js b/src/core/renderers/webgl/shaders/Shader.js index 6566bdd..b82d2d2 100644 --- a/src/core/renderers/webgl/shaders/Shader.js +++ b/src/core/renderers/webgl/shaders/Shader.js @@ -85,7 +85,7 @@ Shader.prototype.constructor = Shader; module.exports = Shader; -/* +/** * Creates the shader and uses it * */ @@ -99,9 +99,9 @@ this.cacheAttributeLocations(Object.keys(this.attributes)); }; -/* +/** * Caches the locations of the uniform for reuse. - + * * @param keys {string} the uniforms to cache */ Shader.prototype.cacheUniformLocations = function (keys) @@ -112,9 +112,9 @@ } }; -/* +/** * Caches the locations of the attribute for reuse. - + * * @param keys {string} the attributes to cache */ Shader.prototype.cacheAttributeLocations = function (keys) @@ -139,9 +139,9 @@ // End worst hack eva // }; -/* +/** * Attaches the shaders and creates the program. - + * * @return {WebGLProgram} */ Shader.prototype.compile = function () diff --git a/src/core/renderers/webgl/utils/StencilMaskStack.js b/src/core/renderers/webgl/utils/StencilMaskStack.js index 3bb8737..bde2e86 100644 --- a/src/core/renderers/webgl/utils/StencilMaskStack.js +++ b/src/core/renderers/webgl/utils/StencilMaskStack.js @@ -2,7 +2,6 @@ * Generic Mask Stack data structure * @class * @memberof PIXI - * @param renderer {PIXI.WebGLRenderer} The renderer this manager works for. */ function StencilMaskStack() { diff --git a/src/core/utils/index.js b/src/core/utils/index.js index e6853d8..49ecd64 100644 --- a/src/core/utils/index.js +++ b/src/core/utils/index.js @@ -25,6 +25,7 @@ * Converts a hex color number to an [R, G, B] array * * @param hex {number} + * @param {number[]} [out=[]] * @return {number[]} An array representing the [R, G, B] of the color. */ hex2rgb: function (hex, out) @@ -142,7 +143,7 @@ * used by spritesheets and image urls * * @param url {string} the image path - * @return {boolean} + * @return {number} */ getResolutionOfUrl: function (url) { @@ -185,7 +186,7 @@ 'background: #ff66a5; padding:5px 0;', 'color: #ff2424; background: #fff; padding:5px 0;', 'color: #ff2424; background: #fff; padding:5px 0;', - 'color: #ff2424; background: #fff; padding:5px 0;', + 'color: #ff2424; background: #fff; padding:5px 0;' ]; window.console.log.apply(console, args); //jshint ignore:line @@ -225,7 +226,7 @@ }, /** - * Retunrs sign of number + * Returns sign of number * * @param n {number} * @returns {number} 0 if n is 0, -1 if n is negative, 1 if n i positive