diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index e66777b..3325b81 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -245,11 +245,11 @@ * @param {Matrix} matrix * @return {Matrix} This matrix. Good for chaining method calls. */ -Matrix.prototype.prepend = function(matrix) +Matrix.prototype.prepend = function(matrix) { var tx1 = this.tx; - if (matrix.a != 1 || matrix.b != 0 || matrix.c != 0 || matrix.d != 1) + if (matrix.a !== 1 || matrix.b !== 0 || matrix.c !== 0 || matrix.d !== 1) { var a1 = this.a; var c1 = this.c; @@ -258,7 +258,7 @@ this.c = c1*matrix.a+this.d*matrix.c; this.d = c1*matrix.b+this.d*matrix.d; } - + this.tx = tx1*matrix.a+this.ty*matrix.c+matrix.tx; this.ty = tx1*matrix.b+this.ty*matrix.d+matrix.ty; @@ -266,7 +266,7 @@ }; -Matrix.prototype.invert = function() +Matrix.prototype.invert = function() { var a1 = this.a; var b1 = this.b; diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index e66777b..3325b81 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -245,11 +245,11 @@ * @param {Matrix} matrix * @return {Matrix} This matrix. Good for chaining method calls. */ -Matrix.prototype.prepend = function(matrix) +Matrix.prototype.prepend = function(matrix) { var tx1 = this.tx; - if (matrix.a != 1 || matrix.b != 0 || matrix.c != 0 || matrix.d != 1) + if (matrix.a !== 1 || matrix.b !== 0 || matrix.c !== 0 || matrix.d !== 1) { var a1 = this.a; var c1 = this.c; @@ -258,7 +258,7 @@ this.c = c1*matrix.a+this.d*matrix.c; this.d = c1*matrix.b+this.d*matrix.d; } - + this.tx = tx1*matrix.a+this.ty*matrix.c+matrix.tx; this.ty = tx1*matrix.b+this.ty*matrix.d+matrix.ty; @@ -266,7 +266,7 @@ }; -Matrix.prototype.invert = function() +Matrix.prototype.invert = function() { var a1 = this.a; var b1 = this.b; diff --git a/src/core/renderers/webgl/managers/FilterManager.js b/src/core/renderers/webgl/managers/FilterManager.js index 0e495df..8dd416e 100644 --- a/src/core/renderers/webgl/managers/FilterManager.js +++ b/src/core/renderers/webgl/managers/FilterManager.js @@ -1,5 +1,4 @@ var WebGLManager = require('./WebGLManager'), - FilterTexture = require('../utils/FilterTexture'), RenderTarget = require('../utils/RenderTarget'), TextureShader = require('../shaders/TextureShader'), Quad = require('../utils/Quad'), @@ -53,7 +52,7 @@ * @param renderer {WebGLRenderer} * @param buffer {ArrayBuffer} */ -FilterManager.prototype.begin = function (buffer) +FilterManager.prototype.begin = function () { //TODO sort out bounds - no point creating a new rect each frame! //this.defaultShader = this.renderer.shaderManager.plugins.defaultShader; @@ -68,7 +67,6 @@ */ FilterManager.prototype.pushFilter = function (target, filters) { - var gl = this.renderer.gl; //console.log("push") // get the bounds of the object.. var bounds = target.filterArea || target.getBounds(); @@ -306,8 +304,6 @@ { WebGLManager.prototype.destroy.call(this); - var gl = this.renderer.gl; - this.filterStack = null; this.offsetY = 0; diff --git a/src/core/math/Matrix.js b/src/core/math/Matrix.js index e66777b..3325b81 100644 --- a/src/core/math/Matrix.js +++ b/src/core/math/Matrix.js @@ -245,11 +245,11 @@ * @param {Matrix} matrix * @return {Matrix} This matrix. Good for chaining method calls. */ -Matrix.prototype.prepend = function(matrix) +Matrix.prototype.prepend = function(matrix) { var tx1 = this.tx; - if (matrix.a != 1 || matrix.b != 0 || matrix.c != 0 || matrix.d != 1) + if (matrix.a !== 1 || matrix.b !== 0 || matrix.c !== 0 || matrix.d !== 1) { var a1 = this.a; var c1 = this.c; @@ -258,7 +258,7 @@ this.c = c1*matrix.a+this.d*matrix.c; this.d = c1*matrix.b+this.d*matrix.d; } - + this.tx = tx1*matrix.a+this.ty*matrix.c+matrix.tx; this.ty = tx1*matrix.b+this.ty*matrix.d+matrix.ty; @@ -266,7 +266,7 @@ }; -Matrix.prototype.invert = function() +Matrix.prototype.invert = function() { var a1 = this.a; var b1 = this.b; diff --git a/src/core/renderers/webgl/managers/FilterManager.js b/src/core/renderers/webgl/managers/FilterManager.js index 0e495df..8dd416e 100644 --- a/src/core/renderers/webgl/managers/FilterManager.js +++ b/src/core/renderers/webgl/managers/FilterManager.js @@ -1,5 +1,4 @@ var WebGLManager = require('./WebGLManager'), - FilterTexture = require('../utils/FilterTexture'), RenderTarget = require('../utils/RenderTarget'), TextureShader = require('../shaders/TextureShader'), Quad = require('../utils/Quad'), @@ -53,7 +52,7 @@ * @param renderer {WebGLRenderer} * @param buffer {ArrayBuffer} */ -FilterManager.prototype.begin = function (buffer) +FilterManager.prototype.begin = function () { //TODO sort out bounds - no point creating a new rect each frame! //this.defaultShader = this.renderer.shaderManager.plugins.defaultShader; @@ -68,7 +67,6 @@ */ FilterManager.prototype.pushFilter = function (target, filters) { - var gl = this.renderer.gl; //console.log("push") // get the bounds of the object.. var bounds = target.filterArea || target.getBounds(); @@ -306,8 +304,6 @@ { WebGLManager.prototype.destroy.call(this); - var gl = this.renderer.gl; - this.filterStack = null; this.offsetY = 0; diff --git a/src/core/renderers/webgl/utils/Quad.js b/src/core/renderers/webgl/utils/Quad.js index e3b4e5c..249d17b 100644 --- a/src/core/renderers/webgl/utils/Quad.js +++ b/src/core/renderers/webgl/utils/Quad.js @@ -1,10 +1,7 @@ -var WebGLManager = require('./WebGLManager'), - utils = require('../../../utils'); - /** * @class * @namespace PIXI - * @param renderer {WebGLRenderer} The renderer this manager works for. + * @param gl {WebGLRenderingContext} The gl context for this quad to use. */ function Quad(gl) { @@ -33,7 +30,7 @@ white, white, white - ]) + ]); this.indices = new Uint16Array([ 0, 1, 2, 0, 3, 2 @@ -55,8 +52,8 @@ Quad.prototype.map = function(rect, rect2) { - var x = 0//rect2.x / rect.width; - var y = 0//rect2.y / rect.height; + var x = 0; //rect2.x / rect.width; + var y = 0; //rect2.y / rect.height; this.uvs[0] = x; this.uvs[1] = y; @@ -87,7 +84,7 @@ this.vertices[7] = y + rect2.height; this.upload(); -} +}; Quad.prototype.upload = function() { @@ -100,7 +97,7 @@ gl.bufferSubData(gl.ARRAY_BUFFER, 8 * 4, this.uvs); gl.bufferSubData(gl.ARRAY_BUFFER, (8 + 8) * 4, this.colors); -} +}; module.exports = Quad;