diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index 7fa2218..eee00ae 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -165,7 +165,7 @@ } else { - value.once('update', this._onTextureUpdate.bind(this)); + value.once('update', this._onTextureUpdate, this); } } } diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index 7fa2218..eee00ae 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -165,7 +165,7 @@ } else { - value.once('update', this._onTextureUpdate.bind(this)); + value.once('update', this._onTextureUpdate, this); } } } diff --git a/src/filters/normal/NormalMapFilter.js b/src/filters/normal/NormalMapFilter.js index 6da653d..5c572ff 100644 --- a/src/filters/normal/NormalMapFilter.js +++ b/src/filters/normal/NormalMapFilter.js @@ -38,7 +38,7 @@ } else { - texture.baseTexture.once('loaded', this.onTextureLoaded.bind(this)); + texture.baseTexture.once('loaded', this.onTextureLoaded, this); } } diff --git a/src/core/sprites/Sprite.js b/src/core/sprites/Sprite.js index 7fa2218..eee00ae 100644 --- a/src/core/sprites/Sprite.js +++ b/src/core/sprites/Sprite.js @@ -165,7 +165,7 @@ } else { - value.once('update', this._onTextureUpdate.bind(this)); + value.once('update', this._onTextureUpdate, this); } } } diff --git a/src/filters/normal/NormalMapFilter.js b/src/filters/normal/NormalMapFilter.js index 6da653d..5c572ff 100644 --- a/src/filters/normal/NormalMapFilter.js +++ b/src/filters/normal/NormalMapFilter.js @@ -38,7 +38,7 @@ } else { - texture.baseTexture.once('loaded', this.onTextureLoaded.bind(this)); + texture.baseTexture.once('loaded', this.onTextureLoaded, this); } } diff --git a/src/interaction/InteractionManager.js b/src/interaction/InteractionManager.js index 8bb7477..3ff4b95 100644 --- a/src/interaction/InteractionManager.js +++ b/src/interaction/InteractionManager.js @@ -152,6 +152,14 @@ */ this.resolution = 1; + /** + * The update method bound to our context. + * + * @member {function} + * @private + */ + this.updateBound = this.update.bind(this); + this.setTargetElement(this.renderer.view, this.renderer.resolution); this.update(); @@ -249,7 +257,7 @@ */ InteractionManager.prototype.update = function () { - requestAnimationFrame(this.update.bind(this)); + requestAnimationFrame(this.updateBound); if( this.throttleUpdate() || !this.interactionDOMElement) {