Skip to content

Commit 872048e

Browse files
committed
Commented-out all EventListener related code for testing.
1 parent 7b9ae51 commit 872048e

3 files changed

Lines changed: 11 additions & 13 deletions

File tree

src/pixi/textures/BaseTexture.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ PIXI.BaseTexture = function(source, scaleMode)
119119
}
120120
else
121121
{
122+
/*
122123
var scope = this;
123124
124125
this.source.onload = function() {
@@ -136,6 +137,7 @@ PIXI.BaseTexture = function(source, scaleMode)
136137
this.source.onerror = function() {
137138
scope.dispatchEvent( { type: 'error', content: scope } );
138139
};
140+
*/
139141
}
140142

141143
/**
@@ -155,7 +157,7 @@ PIXI.BaseTexture = function(source, scaleMode)
155157

156158
PIXI.BaseTexture.prototype.constructor = PIXI.BaseTexture;
157159

158-
PIXI.EventTarget.mixin(PIXI.BaseTexture.prototype);
160+
// PIXI.EventTarget.mixin(PIXI.BaseTexture.prototype);
159161

160162
/**
161163
* Destroys this base texture
@@ -256,6 +258,7 @@ PIXI.BaseTexture.fromImage = function(imageUrl, crossorigin, scaleMode)
256258
// new Image() breaks tex loading in some versions of Chrome.
257259
// See https://code.google.com/p/chromium/issues/detail?id=238071
258260
var image = new Image();//document.createElement('img');
261+
259262
if (crossorigin)
260263
{
261264
image.crossOrigin = '';

src/pixi/textures/RenderTexture.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,5 +332,3 @@ PIXI.RenderTexture.prototype.getCanvas = function()
332332
return this.textureBuffer.canvas;
333333
}
334334
};
335-
336-
PIXI.RenderTexture.tempMatrix = new PIXI.Matrix();

src/pixi/textures/Texture.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,14 @@ PIXI.Texture = function(baseTexture, frame, crop, trim)
128128
if (this.noFrame) frame = new PIXI.Rectangle(0, 0, baseTexture.width, baseTexture.height);
129129
this.setFrame(frame);
130130
}
131-
else
132-
{
133-
baseTexture.addEventListener('loaded', this.onBaseTextureLoaded.bind(this));
134-
}
131+
// else
132+
// {
133+
// baseTexture.addEventListener('loaded', this.onBaseTextureLoaded.bind(this));
134+
// }
135135
};
136136

137137
PIXI.Texture.prototype.constructor = PIXI.Texture;
138-
PIXI.EventTarget.mixin(PIXI.Texture.prototype);
138+
// PIXI.EventTarget.mixin(PIXI.Texture.prototype);
139139

140140
/**
141141
* Called when the base texture is loaded
@@ -146,13 +146,13 @@ PIXI.EventTarget.mixin(PIXI.Texture.prototype);
146146
PIXI.Texture.prototype.onBaseTextureLoaded = function()
147147
{
148148
var baseTexture = this.baseTexture;
149-
baseTexture.removeEventListener('loaded', this.onLoaded);
149+
// baseTexture.removeEventListener('loaded', this.onLoaded);
150150

151151
if (this.noFrame) this.frame = new PIXI.Rectangle(0, 0, baseTexture.width, baseTexture.height);
152152

153153
this.setFrame(this.frame);
154154

155-
this.dispatchEvent( { type: 'update', content: this } );
155+
// this.dispatchEvent( { type: 'update', content: this } );
156156
};
157157

158158
/**
@@ -339,6 +339,3 @@ PIXI.TextureUvs = function()
339339
this.x3 = 0;
340340
this.y3 = 0;
341341
};
342-
343-
PIXI.Texture.emptyTexture = new PIXI.Texture(new PIXI.BaseTexture());
344-

0 commit comments

Comments
 (0)