diff --git a/src/pixi/loaders/BitmapFontLoader.js b/src/pixi/loaders/BitmapFontLoader.js index 78488d2..f87fbdd 100644 --- a/src/pixi/loaders/BitmapFontLoader.js +++ b/src/pixi/loaders/BitmapFontLoader.js @@ -68,11 +68,7 @@ PIXI.BitmapFontLoader.prototype.load = function() { this.ajaxRequest = new PIXI.AjaxRequest(); - var scope = this; - this.ajaxRequest.onreadystatechange = function() - { - scope.onXMLLoaded(); - }; + this.ajaxRequest.onreadystatechange = this.onXMLLoaded.bind(this); this.ajaxRequest.open('GET', this.url, true); if (this.ajaxRequest.overrideMimeType) this.ajaxRequest.overrideMimeType('application/xml'); @@ -153,10 +149,7 @@ PIXI.BitmapText.fonts[data.font] = data; - var scope = this; - image.addEventListener('loaded', function() { - scope.onLoaded(); - }); + image.addEventListener('loaded', this.onLoaded.bind(this)); image.load(); } } diff --git a/src/pixi/loaders/BitmapFontLoader.js b/src/pixi/loaders/BitmapFontLoader.js index 78488d2..f87fbdd 100644 --- a/src/pixi/loaders/BitmapFontLoader.js +++ b/src/pixi/loaders/BitmapFontLoader.js @@ -68,11 +68,7 @@ PIXI.BitmapFontLoader.prototype.load = function() { this.ajaxRequest = new PIXI.AjaxRequest(); - var scope = this; - this.ajaxRequest.onreadystatechange = function() - { - scope.onXMLLoaded(); - }; + this.ajaxRequest.onreadystatechange = this.onXMLLoaded.bind(this); this.ajaxRequest.open('GET', this.url, true); if (this.ajaxRequest.overrideMimeType) this.ajaxRequest.overrideMimeType('application/xml'); @@ -153,10 +149,7 @@ PIXI.BitmapText.fonts[data.font] = data; - var scope = this; - image.addEventListener('loaded', function() { - scope.onLoaded(); - }); + image.addEventListener('loaded', this.onLoaded.bind(this)); image.load(); } } diff --git a/src/pixi/loaders/ImageLoader.js b/src/pixi/loaders/ImageLoader.js index 9e998b0..9d8c6bd 100644 --- a/src/pixi/loaders/ImageLoader.js +++ b/src/pixi/loaders/ImageLoader.js @@ -45,11 +45,7 @@ { if(!this.texture.baseTexture.hasLoaded) { - var scope = this; - this.texture.baseTexture.addEventListener('loaded', function() - { - scope.onLoaded(); - }); + this.texture.baseTexture.addEventListener('loaded', this.onLoaded.bind(this)); } else { @@ -100,15 +96,5 @@ } } - if(!this.texture.baseTexture.hasLoaded) - { - var scope = this; - this.texture.baseTexture.addEventListener('loaded', function() { - scope.onLoaded(); - }); - } - else - { - this.onLoaded(); - } + this.load(); }; diff --git a/src/pixi/loaders/BitmapFontLoader.js b/src/pixi/loaders/BitmapFontLoader.js index 78488d2..f87fbdd 100644 --- a/src/pixi/loaders/BitmapFontLoader.js +++ b/src/pixi/loaders/BitmapFontLoader.js @@ -68,11 +68,7 @@ PIXI.BitmapFontLoader.prototype.load = function() { this.ajaxRequest = new PIXI.AjaxRequest(); - var scope = this; - this.ajaxRequest.onreadystatechange = function() - { - scope.onXMLLoaded(); - }; + this.ajaxRequest.onreadystatechange = this.onXMLLoaded.bind(this); this.ajaxRequest.open('GET', this.url, true); if (this.ajaxRequest.overrideMimeType) this.ajaxRequest.overrideMimeType('application/xml'); @@ -153,10 +149,7 @@ PIXI.BitmapText.fonts[data.font] = data; - var scope = this; - image.addEventListener('loaded', function() { - scope.onLoaded(); - }); + image.addEventListener('loaded', this.onLoaded.bind(this)); image.load(); } } diff --git a/src/pixi/loaders/ImageLoader.js b/src/pixi/loaders/ImageLoader.js index 9e998b0..9d8c6bd 100644 --- a/src/pixi/loaders/ImageLoader.js +++ b/src/pixi/loaders/ImageLoader.js @@ -45,11 +45,7 @@ { if(!this.texture.baseTexture.hasLoaded) { - var scope = this; - this.texture.baseTexture.addEventListener('loaded', function() - { - scope.onLoaded(); - }); + this.texture.baseTexture.addEventListener('loaded', this.onLoaded.bind(this)); } else { @@ -100,15 +96,5 @@ } } - if(!this.texture.baseTexture.hasLoaded) - { - var scope = this; - this.texture.baseTexture.addEventListener('loaded', function() { - scope.onLoaded(); - }); - } - else - { - this.onLoaded(); - } + this.load(); }; diff --git a/src/pixi/loaders/JsonLoader.js b/src/pixi/loaders/JsonLoader.js index f69c741..bdfd6e0 100644 --- a/src/pixi/loaders/JsonLoader.js +++ b/src/pixi/loaders/JsonLoader.js @@ -62,9 +62,7 @@ */ PIXI.JsonLoader.prototype.load = function () { - var scope = this; - - if(window.XDomainRequest && scope.crossorigin) + if(window.XDomainRequest && this.crossorigin) { this.ajaxRequest = new window.XDomainRequest(); @@ -73,13 +71,9 @@ // More info here: http://stackoverflow.com/questions/15786966/xdomainrequest-aborts-post-on-ie-9 this.ajaxRequest.timeout = 3000; - this.ajaxRequest.onerror = function () { - scope.onError(); - }; - - this.ajaxRequest.ontimeout = function () { - scope.onError(); - }; + this.ajaxRequest.onerror = this.onError.bind(this); + + this.ajaxRequest.ontimeout = this.onError.bind(this); this.ajaxRequest.onprogress = function() {}; @@ -93,12 +87,9 @@ this.ajaxRequest = new window.ActiveXObject('Microsoft.XMLHTTP'); } - - this.ajaxRequest.onload = function(){ - scope.onJSONLoaded(); - }; + this.ajaxRequest.onload = this.onJSONLoaded.bind(this); this.ajaxRequest.open('GET',this.url,true); @@ -112,27 +103,24 @@ * @private */ PIXI.JsonLoader.prototype.onJSONLoaded = function () { - + if(!this.ajaxRequest.responseText ) { this.onError(); return; } - + this.json = JSON.parse(this.ajaxRequest.responseText); if(this.json.frames) { // sprite sheet - var scope = this; var textureUrl = this.baseUrl + this.json.meta.image; var image = new PIXI.ImageLoader(textureUrl, this.crossorigin); var frameData = this.json.frames; this.texture = image.texture.baseTexture; - image.addEventListener('loaded', function() { - scope.onLoaded(); - }); + image.addEventListener('loaded', this.onLoaded.bind(this)); for (var i in frameData) { diff --git a/src/pixi/loaders/BitmapFontLoader.js b/src/pixi/loaders/BitmapFontLoader.js index 78488d2..f87fbdd 100644 --- a/src/pixi/loaders/BitmapFontLoader.js +++ b/src/pixi/loaders/BitmapFontLoader.js @@ -68,11 +68,7 @@ PIXI.BitmapFontLoader.prototype.load = function() { this.ajaxRequest = new PIXI.AjaxRequest(); - var scope = this; - this.ajaxRequest.onreadystatechange = function() - { - scope.onXMLLoaded(); - }; + this.ajaxRequest.onreadystatechange = this.onXMLLoaded.bind(this); this.ajaxRequest.open('GET', this.url, true); if (this.ajaxRequest.overrideMimeType) this.ajaxRequest.overrideMimeType('application/xml'); @@ -153,10 +149,7 @@ PIXI.BitmapText.fonts[data.font] = data; - var scope = this; - image.addEventListener('loaded', function() { - scope.onLoaded(); - }); + image.addEventListener('loaded', this.onLoaded.bind(this)); image.load(); } } diff --git a/src/pixi/loaders/ImageLoader.js b/src/pixi/loaders/ImageLoader.js index 9e998b0..9d8c6bd 100644 --- a/src/pixi/loaders/ImageLoader.js +++ b/src/pixi/loaders/ImageLoader.js @@ -45,11 +45,7 @@ { if(!this.texture.baseTexture.hasLoaded) { - var scope = this; - this.texture.baseTexture.addEventListener('loaded', function() - { - scope.onLoaded(); - }); + this.texture.baseTexture.addEventListener('loaded', this.onLoaded.bind(this)); } else { @@ -100,15 +96,5 @@ } } - if(!this.texture.baseTexture.hasLoaded) - { - var scope = this; - this.texture.baseTexture.addEventListener('loaded', function() { - scope.onLoaded(); - }); - } - else - { - this.onLoaded(); - } + this.load(); }; diff --git a/src/pixi/loaders/JsonLoader.js b/src/pixi/loaders/JsonLoader.js index f69c741..bdfd6e0 100644 --- a/src/pixi/loaders/JsonLoader.js +++ b/src/pixi/loaders/JsonLoader.js @@ -62,9 +62,7 @@ */ PIXI.JsonLoader.prototype.load = function () { - var scope = this; - - if(window.XDomainRequest && scope.crossorigin) + if(window.XDomainRequest && this.crossorigin) { this.ajaxRequest = new window.XDomainRequest(); @@ -73,13 +71,9 @@ // More info here: http://stackoverflow.com/questions/15786966/xdomainrequest-aborts-post-on-ie-9 this.ajaxRequest.timeout = 3000; - this.ajaxRequest.onerror = function () { - scope.onError(); - }; - - this.ajaxRequest.ontimeout = function () { - scope.onError(); - }; + this.ajaxRequest.onerror = this.onError.bind(this); + + this.ajaxRequest.ontimeout = this.onError.bind(this); this.ajaxRequest.onprogress = function() {}; @@ -93,12 +87,9 @@ this.ajaxRequest = new window.ActiveXObject('Microsoft.XMLHTTP'); } - - this.ajaxRequest.onload = function(){ - scope.onJSONLoaded(); - }; + this.ajaxRequest.onload = this.onJSONLoaded.bind(this); this.ajaxRequest.open('GET',this.url,true); @@ -112,27 +103,24 @@ * @private */ PIXI.JsonLoader.prototype.onJSONLoaded = function () { - + if(!this.ajaxRequest.responseText ) { this.onError(); return; } - + this.json = JSON.parse(this.ajaxRequest.responseText); if(this.json.frames) { // sprite sheet - var scope = this; var textureUrl = this.baseUrl + this.json.meta.image; var image = new PIXI.ImageLoader(textureUrl, this.crossorigin); var frameData = this.json.frames; this.texture = image.texture.baseTexture; - image.addEventListener('loaded', function() { - scope.onLoaded(); - }); + image.addEventListener('loaded', this.onLoaded.bind(this)); for (var i in frameData) { diff --git a/src/pixi/textures/BaseTexture.js b/src/pixi/textures/BaseTexture.js index c3ab4ae..f0a9a5c 100644 --- a/src/pixi/textures/BaseTexture.js +++ b/src/pixi/textures/BaseTexture.js @@ -78,10 +78,10 @@ // used for webGL this._glTextures = []; - + // used for webGL teture updateing... this._dirty = []; - + if(!source)return; if((this.source.complete || this.source.getContext) && this.source.width && this.source.height) @@ -118,7 +118,7 @@ this.imageUrl = null; this._powerOf2 = false; - + }; @@ -166,14 +166,14 @@ * @static * @method fromImage * @param imageUrl {String} The image url of the texture - * @param crossorigin {Boolean} + * @param crossorigin {Boolean} * @param scaleMode {Number} Should be one of the PIXI.scaleMode consts * @return BaseTexture */ PIXI.BaseTexture.fromImage = function(imageUrl, crossorigin, scaleMode) { var baseTexture = PIXI.BaseTextureCache[imageUrl]; - + if(crossorigin === undefined && imageUrl.indexOf('data:') === -1) crossorigin = true; if(!baseTexture) diff --git a/src/pixi/loaders/BitmapFontLoader.js b/src/pixi/loaders/BitmapFontLoader.js index 78488d2..f87fbdd 100644 --- a/src/pixi/loaders/BitmapFontLoader.js +++ b/src/pixi/loaders/BitmapFontLoader.js @@ -68,11 +68,7 @@ PIXI.BitmapFontLoader.prototype.load = function() { this.ajaxRequest = new PIXI.AjaxRequest(); - var scope = this; - this.ajaxRequest.onreadystatechange = function() - { - scope.onXMLLoaded(); - }; + this.ajaxRequest.onreadystatechange = this.onXMLLoaded.bind(this); this.ajaxRequest.open('GET', this.url, true); if (this.ajaxRequest.overrideMimeType) this.ajaxRequest.overrideMimeType('application/xml'); @@ -153,10 +149,7 @@ PIXI.BitmapText.fonts[data.font] = data; - var scope = this; - image.addEventListener('loaded', function() { - scope.onLoaded(); - }); + image.addEventListener('loaded', this.onLoaded.bind(this)); image.load(); } } diff --git a/src/pixi/loaders/ImageLoader.js b/src/pixi/loaders/ImageLoader.js index 9e998b0..9d8c6bd 100644 --- a/src/pixi/loaders/ImageLoader.js +++ b/src/pixi/loaders/ImageLoader.js @@ -45,11 +45,7 @@ { if(!this.texture.baseTexture.hasLoaded) { - var scope = this; - this.texture.baseTexture.addEventListener('loaded', function() - { - scope.onLoaded(); - }); + this.texture.baseTexture.addEventListener('loaded', this.onLoaded.bind(this)); } else { @@ -100,15 +96,5 @@ } } - if(!this.texture.baseTexture.hasLoaded) - { - var scope = this; - this.texture.baseTexture.addEventListener('loaded', function() { - scope.onLoaded(); - }); - } - else - { - this.onLoaded(); - } + this.load(); }; diff --git a/src/pixi/loaders/JsonLoader.js b/src/pixi/loaders/JsonLoader.js index f69c741..bdfd6e0 100644 --- a/src/pixi/loaders/JsonLoader.js +++ b/src/pixi/loaders/JsonLoader.js @@ -62,9 +62,7 @@ */ PIXI.JsonLoader.prototype.load = function () { - var scope = this; - - if(window.XDomainRequest && scope.crossorigin) + if(window.XDomainRequest && this.crossorigin) { this.ajaxRequest = new window.XDomainRequest(); @@ -73,13 +71,9 @@ // More info here: http://stackoverflow.com/questions/15786966/xdomainrequest-aborts-post-on-ie-9 this.ajaxRequest.timeout = 3000; - this.ajaxRequest.onerror = function () { - scope.onError(); - }; - - this.ajaxRequest.ontimeout = function () { - scope.onError(); - }; + this.ajaxRequest.onerror = this.onError.bind(this); + + this.ajaxRequest.ontimeout = this.onError.bind(this); this.ajaxRequest.onprogress = function() {}; @@ -93,12 +87,9 @@ this.ajaxRequest = new window.ActiveXObject('Microsoft.XMLHTTP'); } - - this.ajaxRequest.onload = function(){ - scope.onJSONLoaded(); - }; + this.ajaxRequest.onload = this.onJSONLoaded.bind(this); this.ajaxRequest.open('GET',this.url,true); @@ -112,27 +103,24 @@ * @private */ PIXI.JsonLoader.prototype.onJSONLoaded = function () { - + if(!this.ajaxRequest.responseText ) { this.onError(); return; } - + this.json = JSON.parse(this.ajaxRequest.responseText); if(this.json.frames) { // sprite sheet - var scope = this; var textureUrl = this.baseUrl + this.json.meta.image; var image = new PIXI.ImageLoader(textureUrl, this.crossorigin); var frameData = this.json.frames; this.texture = image.texture.baseTexture; - image.addEventListener('loaded', function() { - scope.onLoaded(); - }); + image.addEventListener('loaded', this.onLoaded.bind(this)); for (var i in frameData) { diff --git a/src/pixi/textures/BaseTexture.js b/src/pixi/textures/BaseTexture.js index c3ab4ae..f0a9a5c 100644 --- a/src/pixi/textures/BaseTexture.js +++ b/src/pixi/textures/BaseTexture.js @@ -78,10 +78,10 @@ // used for webGL this._glTextures = []; - + // used for webGL teture updateing... this._dirty = []; - + if(!source)return; if((this.source.complete || this.source.getContext) && this.source.width && this.source.height) @@ -118,7 +118,7 @@ this.imageUrl = null; this._powerOf2 = false; - + }; @@ -166,14 +166,14 @@ * @static * @method fromImage * @param imageUrl {String} The image url of the texture - * @param crossorigin {Boolean} + * @param crossorigin {Boolean} * @param scaleMode {Number} Should be one of the PIXI.scaleMode consts * @return BaseTexture */ PIXI.BaseTexture.fromImage = function(imageUrl, crossorigin, scaleMode) { var baseTexture = PIXI.BaseTextureCache[imageUrl]; - + if(crossorigin === undefined && imageUrl.indexOf('data:') === -1) crossorigin = true; if(!baseTexture) diff --git a/src/pixi/textures/Texture.js b/src/pixi/textures/Texture.js index 070d14c..f2e5a0f 100644 --- a/src/pixi/textures/Texture.js +++ b/src/pixi/textures/Texture.js @@ -63,7 +63,7 @@ * @type Rectangle */ this.trim = null; - + /** * This will let the renderer know if the texture is valid. If its not then it cannot be rendered. * @@ -73,14 +73,6 @@ this.valid = false; /** - * The context scope under which events are run. - * - * @property scope - * @type Object - */ - this.scope = this; - - /** * The WebGL UV data cache. * * @private @@ -88,7 +80,7 @@ * @type Object */ this._uvs = null; - + /** * The width of the Texture in pixels. * @@ -121,8 +113,7 @@ } else { - var scope = this; - baseTexture.addEventListener('loaded', function(){ scope.onBaseTextureLoaded(); }); + baseTexture.addEventListener('loaded', this.onBaseTextureLoaded.bind(this)); } }; @@ -141,10 +132,10 @@ baseTexture.removeEventListener('loaded', this.onLoaded); if (this.noFrame) this.frame = new PIXI.Rectangle(0, 0, baseTexture.width, baseTexture.height); - + this.setFrame(this.frame); - this.scope.dispatchEvent( { type: 'update', content: this } ); + this.dispatchEvent( { type: 'update', content: this } ); }; /** diff --git a/src/pixi/loaders/BitmapFontLoader.js b/src/pixi/loaders/BitmapFontLoader.js index 78488d2..f87fbdd 100644 --- a/src/pixi/loaders/BitmapFontLoader.js +++ b/src/pixi/loaders/BitmapFontLoader.js @@ -68,11 +68,7 @@ PIXI.BitmapFontLoader.prototype.load = function() { this.ajaxRequest = new PIXI.AjaxRequest(); - var scope = this; - this.ajaxRequest.onreadystatechange = function() - { - scope.onXMLLoaded(); - }; + this.ajaxRequest.onreadystatechange = this.onXMLLoaded.bind(this); this.ajaxRequest.open('GET', this.url, true); if (this.ajaxRequest.overrideMimeType) this.ajaxRequest.overrideMimeType('application/xml'); @@ -153,10 +149,7 @@ PIXI.BitmapText.fonts[data.font] = data; - var scope = this; - image.addEventListener('loaded', function() { - scope.onLoaded(); - }); + image.addEventListener('loaded', this.onLoaded.bind(this)); image.load(); } } diff --git a/src/pixi/loaders/ImageLoader.js b/src/pixi/loaders/ImageLoader.js index 9e998b0..9d8c6bd 100644 --- a/src/pixi/loaders/ImageLoader.js +++ b/src/pixi/loaders/ImageLoader.js @@ -45,11 +45,7 @@ { if(!this.texture.baseTexture.hasLoaded) { - var scope = this; - this.texture.baseTexture.addEventListener('loaded', function() - { - scope.onLoaded(); - }); + this.texture.baseTexture.addEventListener('loaded', this.onLoaded.bind(this)); } else { @@ -100,15 +96,5 @@ } } - if(!this.texture.baseTexture.hasLoaded) - { - var scope = this; - this.texture.baseTexture.addEventListener('loaded', function() { - scope.onLoaded(); - }); - } - else - { - this.onLoaded(); - } + this.load(); }; diff --git a/src/pixi/loaders/JsonLoader.js b/src/pixi/loaders/JsonLoader.js index f69c741..bdfd6e0 100644 --- a/src/pixi/loaders/JsonLoader.js +++ b/src/pixi/loaders/JsonLoader.js @@ -62,9 +62,7 @@ */ PIXI.JsonLoader.prototype.load = function () { - var scope = this; - - if(window.XDomainRequest && scope.crossorigin) + if(window.XDomainRequest && this.crossorigin) { this.ajaxRequest = new window.XDomainRequest(); @@ -73,13 +71,9 @@ // More info here: http://stackoverflow.com/questions/15786966/xdomainrequest-aborts-post-on-ie-9 this.ajaxRequest.timeout = 3000; - this.ajaxRequest.onerror = function () { - scope.onError(); - }; - - this.ajaxRequest.ontimeout = function () { - scope.onError(); - }; + this.ajaxRequest.onerror = this.onError.bind(this); + + this.ajaxRequest.ontimeout = this.onError.bind(this); this.ajaxRequest.onprogress = function() {}; @@ -93,12 +87,9 @@ this.ajaxRequest = new window.ActiveXObject('Microsoft.XMLHTTP'); } - - this.ajaxRequest.onload = function(){ - scope.onJSONLoaded(); - }; + this.ajaxRequest.onload = this.onJSONLoaded.bind(this); this.ajaxRequest.open('GET',this.url,true); @@ -112,27 +103,24 @@ * @private */ PIXI.JsonLoader.prototype.onJSONLoaded = function () { - + if(!this.ajaxRequest.responseText ) { this.onError(); return; } - + this.json = JSON.parse(this.ajaxRequest.responseText); if(this.json.frames) { // sprite sheet - var scope = this; var textureUrl = this.baseUrl + this.json.meta.image; var image = new PIXI.ImageLoader(textureUrl, this.crossorigin); var frameData = this.json.frames; this.texture = image.texture.baseTexture; - image.addEventListener('loaded', function() { - scope.onLoaded(); - }); + image.addEventListener('loaded', this.onLoaded.bind(this)); for (var i in frameData) { diff --git a/src/pixi/textures/BaseTexture.js b/src/pixi/textures/BaseTexture.js index c3ab4ae..f0a9a5c 100644 --- a/src/pixi/textures/BaseTexture.js +++ b/src/pixi/textures/BaseTexture.js @@ -78,10 +78,10 @@ // used for webGL this._glTextures = []; - + // used for webGL teture updateing... this._dirty = []; - + if(!source)return; if((this.source.complete || this.source.getContext) && this.source.width && this.source.height) @@ -118,7 +118,7 @@ this.imageUrl = null; this._powerOf2 = false; - + }; @@ -166,14 +166,14 @@ * @static * @method fromImage * @param imageUrl {String} The image url of the texture - * @param crossorigin {Boolean} + * @param crossorigin {Boolean} * @param scaleMode {Number} Should be one of the PIXI.scaleMode consts * @return BaseTexture */ PIXI.BaseTexture.fromImage = function(imageUrl, crossorigin, scaleMode) { var baseTexture = PIXI.BaseTextureCache[imageUrl]; - + if(crossorigin === undefined && imageUrl.indexOf('data:') === -1) crossorigin = true; if(!baseTexture) diff --git a/src/pixi/textures/Texture.js b/src/pixi/textures/Texture.js index 070d14c..f2e5a0f 100644 --- a/src/pixi/textures/Texture.js +++ b/src/pixi/textures/Texture.js @@ -63,7 +63,7 @@ * @type Rectangle */ this.trim = null; - + /** * This will let the renderer know if the texture is valid. If its not then it cannot be rendered. * @@ -73,14 +73,6 @@ this.valid = false; /** - * The context scope under which events are run. - * - * @property scope - * @type Object - */ - this.scope = this; - - /** * The WebGL UV data cache. * * @private @@ -88,7 +80,7 @@ * @type Object */ this._uvs = null; - + /** * The width of the Texture in pixels. * @@ -121,8 +113,7 @@ } else { - var scope = this; - baseTexture.addEventListener('loaded', function(){ scope.onBaseTextureLoaded(); }); + baseTexture.addEventListener('loaded', this.onBaseTextureLoaded.bind(this)); } }; @@ -141,10 +132,10 @@ baseTexture.removeEventListener('loaded', this.onLoaded); if (this.noFrame) this.frame = new PIXI.Rectangle(0, 0, baseTexture.width, baseTexture.height); - + this.setFrame(this.frame); - this.scope.dispatchEvent( { type: 'update', content: this } ); + this.dispatchEvent( { type: 'update', content: this } ); }; /** diff --git a/test/lib/pixi/textures/Texture.js b/test/lib/pixi/textures/Texture.js index 4396dd2..d8eeeb3 100644 --- a/test/lib/pixi/textures/Texture.js +++ b/test/lib/pixi/textures/Texture.js @@ -16,8 +16,6 @@ expect(obj).to.have.property('baseTexture') .and.to.be.an.instanceof(PIXI.BaseTexture); - expect(obj).to.have.property('scope', obj); - expect(obj).to.have.property('frame'); if (obj.baseTexture.hasLoaded) { confirmFrameDone();