Tweaked tiling texture and jshinted code

This commit is contained in:
Mat Groves 2014-01-31 00:47:08 +00:00
parent 9c1e235a92
commit 001c2b13d7
5 changed files with 57 additions and 57 deletions

View file

@ -3154,7 +3154,7 @@ PIXI.InteractionManager = function(stage)
this.onTouchMove = this.onTouchMove.bind(this);
this.last = 0;
this.currentCursorStyle = "inherit";
this.currentCursorStyle = 'inherit';
};
// constructor
@ -3331,7 +3331,7 @@ PIXI.InteractionManager.prototype.update = function()
var cursor = 'inherit'
var cursor = 'inherit';
var over = false;
for (i = 0; i < length; i++)
@ -3383,7 +3383,7 @@ PIXI.InteractionManager.prototype.update = function()
// --->
}
if( this.currentCursorStyle != cursor )
if( this.currentCursorStyle !== cursor )
{
this.currentCursorStyle = cursor;
this.interactionDOMElement.style.cursor = cursor;
@ -6834,17 +6834,17 @@ PIXI.WebGLSpriteBatch.prototype.renderTilingSprite = function(tilingSprite)
var scaleX = (tilingSprite.width / texture.baseTexture.width) / (tilingSprite.tileScale.x * tilingSprite.tileScaleOffset.x);
var scaleY = (tilingSprite.height / texture.baseTexture.height) / (tilingSprite.tileScale.y * tilingSprite.tileScaleOffset.y);
uvs[0] = 0 - offsetX;
uvs[1] = 0 - offsetY;
uvs.x0 = 0 - offsetX;
uvs.y0 = 0 - offsetY;
uvs[2] = (1 * scaleX) - offsetX;
uvs[3] = 0 - offsetY;
uvs.x1 = (1 * scaleX) - offsetX;
uvs.y1 = 0 - offsetY;
uvs[4] = (1 * scaleX) - offsetX;
uvs[5] = (1 * scaleY) - offsetY;
uvs.x2 = (1 * scaleX) - offsetX;
uvs.y2 = (1 * scaleY) - offsetY;
uvs[6] = 0 - offsetX;
uvs[7] = (1 *scaleY) - offsetY;
uvs.x3 = 0 - offsetX;
uvs.y3 = (1 *scaleY) - offsetY;
// get the tilingSprites current alpha
@ -6869,19 +6869,19 @@ PIXI.WebGLSpriteBatch.prototype.renderTilingSprite = function(tilingSprite)
var worldTransform = tilingSprite.worldTransform;
var a = worldTransform[0];
var b = worldTransform[3];
var c = worldTransform[1];
var d = worldTransform[4];
var tx = worldTransform[2];
var ty = worldTransform[5];
var a = worldTransform.a;//[0];
var b = worldTransform.c;//[3];
var c = worldTransform.b;//[1];
var d = worldTransform.d;//[4];
var tx = worldTransform.tx;//[2];
var ty = worldTransform.ty;///[5];
// xy
verticies[index++] = a * w1 + c * h1 + tx;
verticies[index++] = d * h1 + b * w1 + ty;
// uv
verticies[index++] = uvs[0];
verticies[index++] = uvs[1];
verticies[index++] = uvs.x0;
verticies[index++] = uvs.y0;
// color
verticies[index++] = alpha;
verticies[index++] = tint;
@ -6890,8 +6890,8 @@ PIXI.WebGLSpriteBatch.prototype.renderTilingSprite = function(tilingSprite)
verticies[index++] = a * w0 + c * h1 + tx;
verticies[index++] = d * h1 + b * w0 + ty;
// uv
verticies[index++] = uvs[2];
verticies[index++] = uvs[3];
verticies[index++] = uvs.x1;
verticies[index++] = uvs.y1;
// color
verticies[index++] = alpha;
verticies[index++] = tint;
@ -6900,8 +6900,8 @@ PIXI.WebGLSpriteBatch.prototype.renderTilingSprite = function(tilingSprite)
verticies[index++] = a * w0 + c * h0 + tx;
verticies[index++] = d * h0 + b * w0 + ty;
// uv
verticies[index++] = uvs[4];
verticies[index++] = uvs[5];
verticies[index++] = uvs.x2;
verticies[index++] = uvs.y2;
// color
verticies[index++] = alpha;
verticies[index++] = tint;
@ -6910,8 +6910,8 @@ PIXI.WebGLSpriteBatch.prototype.renderTilingSprite = function(tilingSprite)
verticies[index++] = a * w1 + c * h0 + tx;
verticies[index++] = d * h0 + b * w1 + ty;
// uv
verticies[index++] = uvs[6];
verticies[index++] = uvs[7];
verticies[index++] = uvs.x3;
verticies[index++] = uvs.y3;
// color
verticies[index++] = alpha;
verticies[index++] = tint;