diff --git a/src/deprecation.js b/src/deprecation.js index 40ef4f5..6b82c4d 100644 --- a/src/deprecation.js +++ b/src/deprecation.js @@ -348,14 +348,14 @@ }, }); -core.DisplayObject.prototype.generateTexture = (renderer, scaleMode, resolution) => +core.DisplayObject.prototype.generateTexture = function generateTexture(renderer, scaleMode, resolution) { warn('generateTexture has moved to the renderer, please use renderer.generateTexture(displayObject)'); return renderer.generateTexture(this, scaleMode, resolution); }; -core.Graphics.prototype.generateTexture = (scaleMode, resolution) => +core.Graphics.prototype.generateTexture = function generateTexture(scaleMode, resolution) { warn('graphics generate texture has moved to the renderer. ' + 'Or to render a graphics to a texture using canvas please use generateCanvasTexture'); @@ -363,34 +363,34 @@ return this.generateCanvasTexture(scaleMode, resolution); }; -core.RenderTexture.prototype.render = (displayObject, matrix, clear, updateTransform) => +core.RenderTexture.prototype.render = function render(displayObject, matrix, clear, updateTransform) { this.legacyRenderer.render(displayObject, this, clear, matrix, !updateTransform); warn('RenderTexture.render is now deprecated, please use renderer.render(displayObject, renderTexture)'); }; -core.RenderTexture.prototype.getImage = (target) => +core.RenderTexture.prototype.getImage = function getImage(target) { warn('RenderTexture.getImage is now deprecated, please use renderer.extract.image(target)'); return this.legacyRenderer.extract.image(target); }; -core.RenderTexture.prototype.getBase64 = (target) => +core.RenderTexture.prototype.getBase64 = function getBase64(target) { warn('RenderTexture.getBase64 is now deprecated, please use renderer.extract.base64(target)'); return this.legacyRenderer.extract.base64(target); }; -core.RenderTexture.prototype.getCanvas = (target) => +core.RenderTexture.prototype.getCanvas = function getCanvas(target) { warn('RenderTexture.getCanvas is now deprecated, please use renderer.extract.canvas(target)'); return this.legacyRenderer.extract.canvas(target); }; -core.RenderTexture.prototype.getPixels = (target) => +core.RenderTexture.prototype.getPixels = function getPixels(target) { warn('RenderTexture.getPixels is now deprecated, please use renderer.extract.pixels(target)'); @@ -405,7 +405,7 @@ * @deprecated since version 3.0.0 * @param {PIXI.Texture} texture - The texture to set to. */ -core.Sprite.prototype.setTexture = (texture) => +core.Sprite.prototype.setTexture = function setTexture(texture) { this.texture = texture; warn('setTexture is now deprecated, please use the texture property, e.g : sprite.texture = texture;'); @@ -418,7 +418,7 @@ * @deprecated since version 3.0.0 * @param {string} text - The text to set to. */ -extras.BitmapText.prototype.setText = (text) => +extras.BitmapText.prototype.setText = function setText(text) { this.text = text; warn(`setText is now deprecated, please use the text property, e.g : myBitmapText.text = 'my text';`); @@ -431,7 +431,7 @@ * @deprecated since version 3.0.0 * @param {string} text - The text to set to. */ -core.Text.prototype.setText = (text) => +core.Text.prototype.setText = function setText(text) { this.text = text; warn(`setText is now deprecated, please use the text property, e.g : myText.text = 'my text';`); @@ -444,7 +444,7 @@ * @deprecated since version 3.0.0 * @param {*} style - The style to set to. */ -core.Text.prototype.setStyle = (style) => +core.Text.prototype.setStyle = function setStyle(style) { this.style = style; warn('setStyle is now deprecated, please use the style property, e.g : myText.style = style;'); @@ -550,7 +550,7 @@ * @deprecated since version 3.0.0 * @param {PIXI.Rectangle} frame - The frame to set. */ -core.Texture.prototype.setFrame = (frame) => +core.Texture.prototype.setFrame = function setFrame(frame) { this.frame = frame; warn('setFrame is now deprecated, please use the frame property, e.g: myTexture.frame = frame;');