Skip to content

Commit 79c5544

Browse files
committed
Pixi 1.6 patches for RenderTextures and IE9 Float32 calls.
1 parent 0353ee1 commit 79c5544

2 files changed

Lines changed: 14 additions & 8 deletions

File tree

src/pixi/Pixi.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,16 @@ PIXI.scaleModes = {
5050
// used to create uids for various pixi objects..
5151
PIXI._UID = 0;
5252

53-
PIXI.Float32Array = Float32Array || Array;
54-
PIXI.Uint16Array = Uint16Array || Array;
53+
if(typeof(Float32Array) != 'undefined')
54+
{
55+
PIXI.Float32Array = Float32Array;
56+
PIXI.Uint16Array = Uint16Array;
57+
}
58+
else
59+
{
60+
PIXI.Float32Array = Array;
61+
PIXI.Uint16Array = Array;
62+
}
5563

5664
// interaction frequency
5765
PIXI.INTERACTION_FREQUENCY = 30;

src/pixi/textures/RenderTexture.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ PIXI.RenderTexture = function(width, height, renderer, scaleMode)
6565
* @property crop
6666
* @type Rectangle
6767
*/
68-
this.crop = new PIXI.Rectangle(0, 0, 1, 1);
68+
this.crop = new PIXI.Rectangle(0, 0, this.width, this.height);
6969

7070
/**
7171
* The base texture object that this texture uses
@@ -102,6 +102,7 @@ PIXI.RenderTexture = function(width, height, renderer, scaleMode)
102102
this.baseTexture.source = this.textureBuffer.canvas;
103103
}
104104

105+
this.valid = true;
105106
PIXI.Texture.frameUpdates.push(this);
106107

107108

@@ -125,11 +126,8 @@ PIXI.RenderTexture.prototype.resize = function(width, height, updateBase)
125126
return;
126127
}
127128

128-
this.width = width;
129-
this.height = height;
130-
131-
this.frame.width = this.width;
132-
this.frame.height = this.height;
129+
this.width = this.frame.width = this.crop.width = width;
130+
this.height = this.frame.height = this.crop.height = height;
133131

134132
if (updateBase)
135133
{

0 commit comments

Comments
 (0)