Skip to content

Commit 41ad087

Browse files
committed
Fixing the Sprite Batch.
1 parent 2d84ea8 commit 41ad087

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

src/gameobjects/SpriteBatch.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ Phaser.SpriteBatch = function (game, parent, name, addToStage) {
2424

2525
if (parent === undefined || parent === null) { parent = game.world; }
2626

27-
PIXI.SpriteBatch.call(this);
28-
2927
Phaser.Group.call(this, game, parent, name, addToStage);
3028

3129
/**
@@ -34,8 +32,11 @@ Phaser.SpriteBatch = function (game, parent, name, addToStage) {
3432
*/
3533
this.type = Phaser.SPRITEBATCH;
3634

35+
this.ready = false;
36+
3737
};
3838

39-
Phaser.SpriteBatch.prototype = Phaser.Utils.extend(true, Phaser.SpriteBatch.prototype, PIXI.SpriteBatch.prototype, Phaser.Group.prototype);
39+
Phaser.SpriteBatch.prototype = Phaser.Utils.extend(true, Phaser.SpriteBatch.prototype, Phaser.Group.prototype);
4040

4141
Phaser.SpriteBatch.prototype.constructor = Phaser.SpriteBatch;
42+

src/pixi/display/SpriteBatch.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,17 @@
2222
*/
2323
PIXI.SpriteBatch = function(texture)
2424
{
25-
PIXI.DisplayObjectContainer.call( this);
25+
// PIXI.DisplayObjectContainer.call( this);
2626

2727
this.textureThing = texture;
2828

2929
this.ready = false;
3030
};
3131

32-
PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
32+
// PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
33+
34+
PIXI.SpriteBatch.prototype = {};
35+
3336
PIXI.SpriteBatch.prototype.constructor = PIXI.SpriteBatch;
3437

3538
/*
@@ -40,6 +43,8 @@ PIXI.SpriteBatch.prototype.constructor = PIXI.SpriteBatch;
4043
*/
4144
PIXI.SpriteBatch.prototype.initWebGL = function(gl)
4245
{
46+
console.log('initWebGL');
47+
4348
// TODO only one needed for the whole engine really?
4449
this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
4550

@@ -52,7 +57,7 @@ PIXI.SpriteBatch.prototype.initWebGL = function(gl)
5257
* @method updateTransform
5358
* @private
5459
*/
55-
PIXI.SpriteBatch.prototype.updateTransform = function()
60+
PIXI.SpriteBatch.prototype.XupdateTransform = function()
5661
{
5762
// TODO don't need to!
5863
this.displayObjectUpdateTransform();

0 commit comments

Comments
 (0)