Cache#getSoundData()

getSoundData(key) → {object} Gets a raw Sound data object from the cache. The object is looked-up based on the key given. Note: If the object cannot be found a console.warn message is displayed. Parameters Name Type Description key string The key of the asset to retrieve from the cache. Returns object - The sound data. Source code: loader/Cache.js (Line 1153)

Cache#getSound()

getSound(key) → {Phaser.Sound} Gets a Phaser.Sound object from the cache. The object is looked-up based on the key given. Note: If the object cannot be found a console.warn message is displayed. Parameters Name Type Description key string The key of the asset to retrieve from the cache. Returns Phaser.Sound - The sound object. Source code: loader/Cache.js (Line 1136)

Cache#getShader()

getShader(key) → {string} Gets a fragment shader object from the cache. The object is looked-up based on the key given. Note: If the object cannot be found a console.warn message is displayed. Parameters Name Type Description key string The key of the asset to retrieve from the cache. Returns string - The shader object. Source code: loader/Cache.js (Line 1388)

Cache#getRenderTexture()

getRenderTexture(key) → {Object} Gets a RenderTexture object from the cache. The object is looked-up based on the key given. Note: If the object cannot be found a console.warn message is displayed. Parameters Name Type Description key string The key of the asset to retrieve from the cache. Returns Object - The object with Phaser.RenderTexture and Phaser.Frame. Source code: loader/Cache.js (Line 1405)

Cache#getPhysicsData()

getPhysicsData(key, object, fixtureKey) → {object} Gets a Physics Data object from the cache. The object is looked-up based on the key given. Note: If the object cannot be found a console.warn message is displayed. You can get either the entire data set, a single object or a single fixture of an object from it. Parameters Name Type Argument Default Description key string The key of the asset to retrieve from the cache. object string <optional> null If specified it will retur

Cache#getKeys()

getKeys(cache) → {Array} Gets all keys used in the requested Cache. Parameters Name Type Argument Default Description cache integer <optional> Phaser.Cache.IMAGE The Cache you wish to get the keys from. Can be any of the Cache consts such as Phaser.Cache.IMAGE, Phaser.Cache.SOUND etc. Returns Array - The array of keys in the requested cache. Source code: loader/Cache.js (Line 1609)

Cache#getJSON()

getJSON(key, clone) → {object} Gets a JSON object from the cache. The object is looked-up based on the key given. Note: If the object cannot be found a console.warn message is displayed. You can either return the object by reference (the default), or return a cloneof it by setting the clone argument to true. Parameters Name Type Argument Default Description key string The key of the asset to retrieve from the cache. clone boolean <optional> false Return a clone of the origin

Cache#getItem()

getItem(key, cache, method, property) → {object} Get an item from a cache based on the given key and property. This method is mostly used internally by other Cache methods such as getImage but is exposedpublicly for your own use as well. Parameters Name Type Argument Description key string The key of the asset within the cache. cache integer The cache to search. One of the Cache consts such as Phaser.Cache.IMAGE or Phaser.Cache.SOUND. method string <optional> The string name

Cache#getImage()

getImage(key, full) → {Image} Gets a Image object from the cache. This returns a DOM Image object, not a Phaser.Image object. The object is looked-up based on the key given. Note: If the object cannot be found a console.warn message is displayed. Only the Image cache is searched, which covers images loaded via Loader.image, Sprite Sheets and Texture Atlases. If you need the image used by a bitmap font or similar then please use those respective 'get' methods. Parameters Name Type Argument De

Cache#getFrameData()

getFrameData(key, cache) → {Phaser.FrameData} Gets a Phaser.FrameData object from the Image Cache. The object is looked-up based on the key given. Note: If the object cannot be found a console.warn message is displayed. Parameters Name Type Argument Default Description key string Asset key of the frame data to retrieve from the Cache. cache integer <optional> Phaser.Cache.IMAGE The cache to search for the item in. Returns Phaser.FrameData - The frame data. Source cod