Skip to content

Commit

Permalink
allow to remove an image from the texture cache
Browse files Browse the repository at this point in the history
  • Loading branch information
obiot committed Nov 18, 2021
1 parent e0ae564 commit be94119
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/video/texture_cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ class TextureCache {
return this.cache.get(image);
}

/**
* @ignore
*/
remove(image) {
if (!this.cache.has(image)) {
if (this.cache.remove(image) === true) {
this.length--;
}
}
}

/**
* @ignore
*/
Expand Down

0 comments on commit be94119

Please sign in to comment.