Function getResolutionOfUrl

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

    Parameters

    • url: string

      the image path

    • OptionaldefaultValue: number

      the defaultValue if no filename prefix is set.

    Returns number

    resolution / device pixel ratio of an asset

    PIXI.utils

    getResolutionOfUrl