emscripten Humble Cloud interface
Edward Rudd
2014-09-15 1d23b09d3c9169f5bf2ab874d4af19838b0d3889

fix setting HUMBLE_API configuration and document he various keys

1 files modified
10 ■■■■ changed files
client/library/library_humble.js 10 ●●●● patch | view | raw | blame | history
client/library/library_humble.js
@@ -2,12 +2,16 @@
    $HUMBLE_API: {
        file_cache: {},
        options: {
            locateAsset: null,
            buildCacheKey: null
            // allows altering the incoming URL before it is fetched from the network
            locateAsset: null, // function(path) { return path; }
            // takes a string key and returns a modified key. return null to NOT cache the specific resource
            buildCacheKey: null, // function(path) { return path; }
        },
        configure: function(options) {
            mergeInto(HUMBLE_API.options, options);
            for (var i in options) {
                HUMBLE_API.options[i] = options[i];
            }
        },
        locateAsset: function(path) {