sdfsdfs
This commit is contained in:
10
node_modules/pixi.js/lib/utils/network/getResolutionOfUrl.d.ts
generated
vendored
Normal file
10
node_modules/pixi.js/lib/utils/network/getResolutionOfUrl.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* get the resolution / device pixel ratio of an asset by looking for the prefix
|
||||
* used by spritesheets and image urls
|
||||
* @memberof utils
|
||||
* @function getResolutionOfUrl
|
||||
* @param {string} url - the image path
|
||||
* @param {number} [defaultValue=1] - the defaultValue if no filename prefix is set.
|
||||
* @returns {number} resolution / device pixel ratio of an asset
|
||||
*/
|
||||
export declare function getResolutionOfUrl(url: string, defaultValue?: number): number;
|
15
node_modules/pixi.js/lib/utils/network/getResolutionOfUrl.js
generated
vendored
Normal file
15
node_modules/pixi.js/lib/utils/network/getResolutionOfUrl.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
'use strict';
|
||||
|
||||
var Resolver = require('../../assets/resolver/Resolver.js');
|
||||
|
||||
"use strict";
|
||||
function getResolutionOfUrl(url, defaultValue = 1) {
|
||||
const resolution = Resolver.Resolver.RETINA_PREFIX?.exec(url);
|
||||
if (resolution) {
|
||||
return parseFloat(resolution[1]);
|
||||
}
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
exports.getResolutionOfUrl = getResolutionOfUrl;
|
||||
//# sourceMappingURL=getResolutionOfUrl.js.map
|
1
node_modules/pixi.js/lib/utils/network/getResolutionOfUrl.js.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/utils/network/getResolutionOfUrl.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"getResolutionOfUrl.js","sources":["../../../src/utils/network/getResolutionOfUrl.ts"],"sourcesContent":["import { Resolver } from '../../assets/resolver/Resolver';\n\n/**\n * get the resolution / device pixel ratio of an asset by looking for the prefix\n * used by spritesheets and image urls\n * @memberof utils\n * @function getResolutionOfUrl\n * @param {string} url - the image path\n * @param {number} [defaultValue=1] - the defaultValue if no filename prefix is set.\n * @returns {number} resolution / device pixel ratio of an asset\n */\nexport function getResolutionOfUrl(url: string, defaultValue = 1): number\n{\n const resolution = Resolver.RETINA_PREFIX?.exec(url);\n\n if (resolution)\n {\n return parseFloat(resolution[1]);\n }\n\n return defaultValue;\n}\n"],"names":["Resolver"],"mappings":";;;;;AAWgB,SAAA,kBAAA,CAAmB,GAAa,EAAA,YAAA,GAAe,CAC/D,EAAA;AACI,EAAA,MAAM,UAAa,GAAAA,iBAAA,CAAS,aAAe,EAAA,IAAA,CAAK,GAAG,CAAA,CAAA;AAEnD,EAAA,IAAI,UACJ,EAAA;AACI,IAAO,OAAA,UAAA,CAAW,UAAW,CAAA,CAAC,CAAC,CAAA,CAAA;AAAA,GACnC;AAEA,EAAO,OAAA,YAAA,CAAA;AACX;;;;"}
|
13
node_modules/pixi.js/lib/utils/network/getResolutionOfUrl.mjs
generated
vendored
Normal file
13
node_modules/pixi.js/lib/utils/network/getResolutionOfUrl.mjs
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Resolver } from '../../assets/resolver/Resolver.mjs';
|
||||
|
||||
"use strict";
|
||||
function getResolutionOfUrl(url, defaultValue = 1) {
|
||||
const resolution = Resolver.RETINA_PREFIX?.exec(url);
|
||||
if (resolution) {
|
||||
return parseFloat(resolution[1]);
|
||||
}
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
export { getResolutionOfUrl };
|
||||
//# sourceMappingURL=getResolutionOfUrl.mjs.map
|
1
node_modules/pixi.js/lib/utils/network/getResolutionOfUrl.mjs.map
generated
vendored
Normal file
1
node_modules/pixi.js/lib/utils/network/getResolutionOfUrl.mjs.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"getResolutionOfUrl.mjs","sources":["../../../src/utils/network/getResolutionOfUrl.ts"],"sourcesContent":["import { Resolver } from '../../assets/resolver/Resolver';\n\n/**\n * get the resolution / device pixel ratio of an asset by looking for the prefix\n * used by spritesheets and image urls\n * @memberof utils\n * @function getResolutionOfUrl\n * @param {string} url - the image path\n * @param {number} [defaultValue=1] - the defaultValue if no filename prefix is set.\n * @returns {number} resolution / device pixel ratio of an asset\n */\nexport function getResolutionOfUrl(url: string, defaultValue = 1): number\n{\n const resolution = Resolver.RETINA_PREFIX?.exec(url);\n\n if (resolution)\n {\n return parseFloat(resolution[1]);\n }\n\n return defaultValue;\n}\n"],"names":[],"mappings":";;;AAWgB,SAAA,kBAAA,CAAmB,GAAa,EAAA,YAAA,GAAe,CAC/D,EAAA;AACI,EAAA,MAAM,UAAa,GAAA,QAAA,CAAS,aAAe,EAAA,IAAA,CAAK,GAAG,CAAA,CAAA;AAEnD,EAAA,IAAI,UACJ,EAAA;AACI,IAAO,OAAA,UAAA,CAAW,UAAW,CAAA,CAAC,CAAC,CAAA,CAAA;AAAA,GACnC;AAEA,EAAO,OAAA,YAAA,CAAA;AACX;;;;"}
|
Reference in New Issue
Block a user