forked from phaserjs/phaser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRenderTexture.js
More file actions
32 lines (22 loc) · 757 Bytes
/
Copy pathRenderTexture.js
File metadata and controls
32 lines (22 loc) · 757 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
Phaser.RenderTexture = function (game, key, width, height) {
this.game = game;
this.name = key;
PIXI.EventTarget.call( this );
this.width = width || 100;
this.height = height || 100;
// I know this has a typo in it, but it's because the PIXI.RenderTexture does and we need to pair-up with it
// once they update pixi to fix the typo, we'll fix it here too :)
this.indetityMatrix = PIXI.mat3.create();
this.frame = new PIXI.Rectangle(0, 0, this.width, this.height);
this.type = Phaser.RENDERTEXTURE;
if (PIXI.gl)
{
this.initWebGL();
}
else
{
this.initCanvas();
}
};
Phaser.RenderTexture.prototype = Phaser.Utils.extend(true, PIXI.RenderTexture.prototype);
Phaser.RenderTexture.prototype.constructor = Phaser.RenderTexture;