function registerCompressedTextures(url, resources, metadata) {
    var result = {
        textures: {},
        texture: null,
    };
    if (!resources) {
        return result;
    }
    var textures = resources.map(function (resource) {
        return (new _pixi_core__WEBPACK_IMPORTED_MODULE_0__.Texture(new _pixi_core__WEBPACK_IMPORTED_MODULE_0__.BaseTexture(resource, Object.assign({
            mipmap: _pixi_constants__WEBPACK_IMPORTED_MODULE_4__.MIPMAP_MODES.OFF,
            alphaMode: _pixi_constants__WEBPACK_IMPORTED_MODULE_4__.ALPHA_MODES.NO_PREMULTIPLIED_ALPHA
        }, metadata))));
    });
    textures.forEach(function (texture, i) {
        var baseTexture = texture.baseTexture;
        var cacheID = url + "-" + (i + 1);
        _pixi_core__WEBPACK_IMPORTED_MODULE_0__.BaseTexture.addToCache(baseTexture, cacheID);
        _pixi_core__WEBPACK_IMPORTED_MODULE_0__.Texture.addToCache(texture, cacheID);
        if (i === 0) {
            _pixi_core__WEBPACK_IMPORTED_MODULE_0__.BaseTexture.addToCache(baseTexture, url);
            _pixi_core__WEBPACK_IMPORTED_MODULE_0__.Texture.addToCache(texture, url);
            result.texture = texture;
        }
        result.textures[cacheID] = texture;
    });
    return result;
}
Creates base-textures and textures for each compressed-texture resource and adds them into the global
texture cache. The first texture has two IDs - `${url}`, `${url}-1`; while the rest have an ID of the
form `${url}-i`.
@param url - the original address of the resources
@param resources - the resources backing texture data
@ignore