Skip to content

Commit f9482ef

Browse files
committed
BaseCache.getKeys is a new method that will return all keys in use in the current cache, i.e. this.cache.shader.getKeys().
1 parent abccac2 commit f9482ef

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ Notes:
9898
* `Scene.Systems.renderer` is a new property that is a reference to the current renderer the game is using.
9999
* `Utils.Objects.SetValue` is a new function that allows you to set a value in an object by specifying a property key. The function can set a value to any depth by using dot-notation for the key, i.e. `SetValue(data, 'world.position.x', 100)`.
100100
* `WebGLRenderer.glFuncMap` is a new object, populated during the `init` method, that contains uniform mappings from key to the corresponding gl function, i.e. `mat2` to `gl.uniformMatrix2fv`.
101+
* `BaseCache.getKeys` is a new method that will return all keys in use in the current cache, i.e. `this.cache.shader.getKeys()`.
101102

102103
### Updates
103104

src/cache/BaseCache.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,21 @@ var BaseCache = new Class({
147147
return this;
148148
},
149149

150+
/**
151+
* Returns all keys in use in this cache.
152+
*
153+
* @method Phaser.Cache.BaseCache#getKeys
154+
* @since 3.17.0
155+
*
156+
* @genericUse {K[]} - [$return]
157+
*
158+
* @return {string[]} Array containing all the keys.
159+
*/
160+
getKeys: function ()
161+
{
162+
return this.entries.keys();
163+
},
164+
150165
/**
151166
* Destroys this cache and all items within it.
152167
*

0 commit comments

Comments
 (0)