Pixi 1.6 patches for RenderTextures and IE9 Float32 calls.

This commit is contained in:
photonstorm 2014-07-11 18:02:24 +01:00 committed by Clark Stevenson
parent 0f5c07e4a0
commit 0632e87ebc
2 changed files with 14 additions and 8 deletions

View file

@ -50,8 +50,16 @@ PIXI.scaleModes = {
// used to create uids for various pixi objects.. // used to create uids for various pixi objects..
PIXI._UID = 0; PIXI._UID = 0;
PIXI.Float32Array = Float32Array || Array; if(typeof(Float32Array) != 'undefined')
PIXI.Uint16Array = Uint16Array || Array; {
PIXI.Float32Array = Float32Array;
PIXI.Uint16Array = Uint16Array;
}
else
{
PIXI.Float32Array = Array;
PIXI.Uint16Array = Array;
}
// interaction frequency // interaction frequency
PIXI.INTERACTION_FREQUENCY = 30; PIXI.INTERACTION_FREQUENCY = 30;

View file

@ -65,7 +65,7 @@ PIXI.RenderTexture = function(width, height, renderer, scaleMode)
* @property crop * @property crop
* @type Rectangle * @type Rectangle
*/ */
this.crop = new PIXI.Rectangle(0, 0, 1, 1); this.crop = new PIXI.Rectangle(0, 0, this.width, this.height);
/** /**
* The base texture object that this texture uses * The base texture object that this texture uses
@ -102,6 +102,7 @@ PIXI.RenderTexture = function(width, height, renderer, scaleMode)
this.baseTexture.source = this.textureBuffer.canvas; this.baseTexture.source = this.textureBuffer.canvas;
} }
this.valid = true;
PIXI.Texture.frameUpdates.push(this); PIXI.Texture.frameUpdates.push(this);
@ -125,11 +126,8 @@ PIXI.RenderTexture.prototype.resize = function(width, height, updateBase)
return; return;
} }
this.width = width; this.width = this.frame.width = this.crop.width = width;
this.height = height; this.height = this.frame.height = this.crop.height = height;
this.frame.width = this.width;
this.frame.height = this.height;
if (updateBase) if (updateBase)
{ {