Home

function: getResolutionOfUrl


getResolutionOfUrl(url: string, defaultValue: number): number

get the resolution / device pixel ratio of an asset by looking for the prefix
used by spritesheets and image urls

Params:

Name Type Attribute Description
url

the image path

defaultValue

the defaultValue if no filename prefix is set.

Returns:

number

  {
    "comment": "/**\n * get the resolution / device pixel ratio of an asset by looking for the prefix\n * used by spritesheets and image urls\n *\n * @memberof PIXI.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 * @return {number} resolution / device pixel ratio of an asset\n */",
    "meta": {
        "range": [
            2175,
            2550
        ],
        "filename": "index.js",
        "lineno": 101,
        "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\pixi.js\\pixi.js-repo\\src\\core\\utils",
        "code": {}
    },
    "description": "

get the resolution / device pixel ratio of an asset by looking for the prefix
used by spritesheets and image urls

", "memberof": "PIXI.utils", "kind": "function", "name": "getResolutionOfUrl", "params": [ { "type": { "names": [ "string" ] }, "description": "

the image path

", "name": "url" }, { "type": { "names": [ "number" ] }, "optional": true, "defaultvalue": 1, "description": "

the defaultValue if no filename prefix is set.

", "name": "defaultValue" } ], "returns": [ { "type": { "names": [ "number" ] }, "description": "

resolution / device pixel ratio of an asset

" } ], "scope": "static", "longname": "PIXI.utils.getResolutionOfUrl", "___id": "T000002R004363", "___s": true, "filepath": "core\\utils\\index.js" }