Skip to content

Commit 780e1d9

Browse files
committed
Texture parsed files no longer store their data in the data caches as well.
You can now use `TextureManager.remove` to remove a texture and not have to worry about clearing the corresponding JSON or XML cache entry as well in order to reload a new texture using the same key. Fix phaserjs#5323
1 parent 90096a6 commit 780e1d9

4 files changed

Lines changed: 0 additions & 7 deletions

File tree

src/loader/filetypes/AtlasJSONFile.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ var AtlasJSONFile = new Class({
100100

101101
this.loader.textureManager.addAtlas(image.key, image.data, json.data, normalMap);
102102

103-
json.addToCache();
104-
105103
this.complete = true;
106104
}
107105
}

src/loader/filetypes/AtlasXMLFile.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ var AtlasXMLFile = new Class({
9898

9999
this.loader.textureManager.addAtlasXML(image.key, image.data, xml.data, normalMap);
100100

101-
xml.addToCache();
102-
103101
this.complete = true;
104102
}
105103
}

src/loader/filetypes/BitmapFontFile.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ var BitmapFontFile = new Class({
9797
var xml = this.files[1];
9898

9999
image.addToCache();
100-
xml.addToCache();
101100

102101
var texture = image.cache.get(image.key);
103102

src/loader/filetypes/UnityAtlasFile.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,6 @@ var UnityAtlasFile = new Class({
9898

9999
this.loader.textureManager.addUnityAtlas(image.key, image.data, text.data, normalMap);
100100

101-
text.addToCache();
102-
103101
this.complete = true;
104102
}
105103
}

0 commit comments

Comments
 (0)