pixi.js
Version:
<p align="center"> <a href="https://pixijs.com" target="_blank" rel="noopener noreferrer"> <img height="150" src="https://files.pixijs.download/branding/pixijs-logo-transparent-dark.svg?v=1" alt="PixiJS logo"> </a> </p> <br/> <p align="center">
11 lines (10 loc) • 438 B
TypeScript
/**
* get the resolution / device pixel ratio of an asset by looking for the prefix
* used by spritesheets and image urls
* @category utils
* @internal
* @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;