mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 20:53:39 +00:00
Pixi 1.6 patches for RenderTextures and IE9 Float32 calls.
This commit is contained in:
parent
0f5c07e4a0
commit
0632e87ebc
2 changed files with 14 additions and 8 deletions
|
@ -50,8 +50,16 @@ PIXI.scaleModes = {
|
|||
// used to create uids for various pixi objects..
|
||||
PIXI._UID = 0;
|
||||
|
||||
PIXI.Float32Array = Float32Array || Array;
|
||||
PIXI.Uint16Array = Uint16Array || Array;
|
||||
if(typeof(Float32Array) != 'undefined')
|
||||
{
|
||||
PIXI.Float32Array = Float32Array;
|
||||
PIXI.Uint16Array = Uint16Array;
|
||||
}
|
||||
else
|
||||
{
|
||||
PIXI.Float32Array = Array;
|
||||
PIXI.Uint16Array = Array;
|
||||
}
|
||||
|
||||
// interaction frequency
|
||||
PIXI.INTERACTION_FREQUENCY = 30;
|
||||
|
|
|
@ -65,7 +65,7 @@ PIXI.RenderTexture = function(width, height, renderer, scaleMode)
|
|||
* @property crop
|
||||
* @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
|
||||
|
@ -102,6 +102,7 @@ PIXI.RenderTexture = function(width, height, renderer, scaleMode)
|
|||
this.baseTexture.source = this.textureBuffer.canvas;
|
||||
}
|
||||
|
||||
this.valid = true;
|
||||
PIXI.Texture.frameUpdates.push(this);
|
||||
|
||||
|
||||
|
@ -125,11 +126,8 @@ PIXI.RenderTexture.prototype.resize = function(width, height, updateBase)
|
|||
return;
|
||||
}
|
||||
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
|
||||
this.frame.width = this.width;
|
||||
this.frame.height = this.height;
|
||||
this.width = this.frame.width = this.crop.width = width;
|
||||
this.height = this.frame.height = this.crop.height = height;
|
||||
|
||||
if (updateBase)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue