Skip to content

Commit 63158a1

Browse files
committed
Argument swapped for destroyBaseTexture.
1 parent 1b4d033 commit 63158a1

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,8 @@ You can read all about the philosophy behind Lazer [here](http://phaser.io/news/
344344
* Phaser.Cache.addImage will now check the key given, and if `__default` or `__missing` it will update the new consts `Phaser.Cache.DEFAULT` and `Phaser.Cache.MISSING` accordingly, allowing you to replace the default or missing image textures used by Phaser.
345345
* Phaser.Cache.getPixiTexture has now been removed, as the Pixi Cache isn't used internally anywhere any longer.
346346
* Phaser.Cache.getPixiBaseTexture has now been removed, as the Pixi Cache isn't used internally anywhere any longer.
347+
* The second argument to Phaser.Cache.removeImage has been renamed from `removeFromPixi` to `destroyBaseTexture`, as that is fundamentally what the argument always did.
348+
* AnimationManager.refreshFrame has been removed as it never actually did anything internally.
347349

348350
### Bug Fixes
349351

src/loader/Cache.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,20 +1656,20 @@ Phaser.Cache.prototype = {
16561656
*
16571657
* You can optionally elect to destroy it as well. This calls BaseTexture.destroy on it.
16581658
*
1659-
* Note that this only removes it from the Phaser and PIXI Caches. If you still have references to the data elsewhere
1659+
* Note that this only removes it from the Phaser Cache. If you still have references to the data elsewhere
16601660
* then it will persist in memory.
16611661
*
16621662
* @method Phaser.Cache#removeImage
16631663
* @param {string} key - Key of the asset you want to remove.
1664-
* @param {boolean} [removeFromPixi=true] - Should this image also be destroyed? Removing it from the PIXI.BaseTextureCache?
1664+
* @param {boolean} [destroyBaseTexture=true] - Should the BaseTexture behind this image also be destroyed?
16651665
*/
1666-
removeImage: function (key, removeFromPixi) {
1666+
removeImage: function (key, destroyBaseTexture) {
16671667

1668-
if (removeFromPixi === undefined) { removeFromPixi = true; }
1668+
if (destroyBaseTexture === undefined) { destroyBaseTexture = true; }
16691669

16701670
var img = this.getImage(key, true);
16711671

1672-
if (removeFromPixi && img.base)
1672+
if (destroyBaseTexture && img.base)
16731673
{
16741674
img.base.destroy();
16751675
}

typescript/phaser.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ declare module Phaser {
159159
next(quantity?: number): void;
160160
play(name: string, frameRate?: number, loop?: boolean, killOnComplete?: boolean): Phaser.Animation;
161161
previous(quantity?: number): void;
162-
refreshFrame(): void;
163162
stop(name?: string, resetFrame?: boolean): void;
164163
update(): boolean;
165164
validateFrames(frames: Phaser.Frame[], useNumericIndex?: boolean): boolean;

0 commit comments

Comments
 (0)