@pixi/utils
Version:
Collection of utilities used by PixiJS
18 lines (13 loc) • 451 B
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
require('../settings.js');
var settings = require('@pixi/settings');
function getResolutionOfUrl(url, defaultValue = 1) {
const resolution = settings.settings.RETINA_PREFIX?.exec(url);
if (resolution) {
return parseFloat(resolution[1]);
}
return defaultValue;
}
exports.getResolutionOfUrl = getResolutionOfUrl;
//# sourceMappingURL=getResolutionOfUrl.js.map