Merge pull request #3025 from alexrford/lgtm-fixes

Lgtm fixes
This commit is contained in:
Richard Davey 2017-06-26 20:51:03 +01:00 committed by GitHub
commit 35eca0694f
9 changed files with 8 additions and 12 deletions

View file

@ -40,12 +40,12 @@ var Mesh = new Class({
throw new Error('Phaser: Vertex count must match UV count');
}
if (colors.length > 0 && colors.length < (vertices.length / 2)|0)
if (colors.length > 0 && colors.length < ((vertices.length / 2)|0))
{
throw new Error('Phaser: Color count must match Vertex count');
}
if (alphas.length > 0 && alphas.length < (vertices.length / 2)|0)
if (alphas.length > 0 && alphas.length < ((vertices.length / 2)|0))
{
throw new Error('Phaser: Alpha count must match Vertex count');
}

View file

@ -51,6 +51,7 @@ HTMLFile.prototype.onProcess = function (callback)
data.push('</svg>');
var svg = [ data.join('\n') ];
var _this = this;
try
{
@ -69,8 +70,6 @@ HTMLFile.prototype.onProcess = function (callback)
this.data.crossOrigin = this.crossOrigin;
var _this = this;
this.data.onload = function ()
{
URL.revokeObjectURL(_this.data.src);

View file

@ -31,6 +31,7 @@ SVGFile.prototype.onProcess = function (callback)
this.state = CONST.FILE_PROCESSING;
var svg = [ this.xhrLoader.responseText ];
var _this = this;
try
{
@ -49,7 +50,6 @@ SVGFile.prototype.onProcess = function (callback)
this.data.crossOrigin = this.crossOrigin;
var _this = this;
var retry = false;
this.data.onload = function ()

View file

@ -234,7 +234,7 @@ RandomDataGenerator.prototype = {
var a = '';
var b = '';
for (b = a = ''; a++ < 36; b +=~a % 5 | a * 3&4 ? (a^15 ? 8^this.frac() * (a^20 ? 16 : 4) : 4).toString(16) : '-')
for (b = a = ''; a++ < 36; b +=~a % 5 | a*3 & 4 ? (a^15 ? 8 ^ this.frac()*(a^20 ? 16 : 4) : 4).toString(16) : '-')
{
}

View file

@ -167,7 +167,6 @@ EffectRenderer.prototype = {
renderEffect: function (gameObject, camera, texture, textureWidth, textureHeight)
{
var tempMatrix = this.tempMatrix;
var alpha = 16777216;
var vertexDataBuffer = this.vertexDataBuffer;
var vertexBufferObjectF32 = vertexDataBuffer.floatView;
var vertexBufferObjectU32 = vertexDataBuffer.uintView;

View file

@ -435,7 +435,6 @@ SpriteBatch.prototype = {
addSpriteTexture: function (gameObject, camera, texture, textureWidth, textureHeight)
{
var tempMatrix = this.tempMatrix;
var alpha = 16777216;
var vertexDataBuffer = this.vertexDataBuffer;
var vertexBufferObjectF32 = vertexDataBuffer.floatView;
var vertexBufferObjectU32 = vertexDataBuffer.uintView;
@ -528,7 +527,6 @@ SpriteBatch.prototype = {
{
var tempMatrix = this.tempMatrix;
var frame = gameObject.frame;
var alpha = 16777216;
var forceFlipY = (frame.texture.source[frame.sourceIndex].glTexture.isRenderTexture ? true : false);
var flipX = gameObject.flipX;
var flipY = gameObject.flipY ^ forceFlipY;

View file

@ -1,4 +1,4 @@
var RotateMatrix = require('./RotateMatrix)';
var RotateMatrix = require('./RotateMatrix');
var Rotate180 = function (matrix)
{

View file

@ -1,4 +1,4 @@
var RotateMatrix = require('./RotateMatrix)';
var RotateMatrix = require('./RotateMatrix');
var RotateLeft = function (matrix)
{

View file

@ -1,4 +1,4 @@
var RotateMatrix = require('./RotateMatrix)';
var RotateMatrix = require('./RotateMatrix');
var RotateRight = function (matrix)
{