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 clone
of 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 original object (true) or a reference to it? (false)

Returns
object -

The JSON object, or an Array if the key points to an Array property. If the property wasn't found, it returns null.

Source code: loader/Cache.js (Line 1317)
doc_phaser
2017-02-14 10:40:17
Comments
Leave a Comment

Please login to continue.