diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index 312a772..02a3423 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -394,7 +394,7 @@ utils.BaseTextureCache[imageUrl] = baseTexture; // if there is an @2x at the end of the url we are going to assume its a highres image - this.resolution = utils.getResolutionOfUrl(imageUrl); + baseTexture.resolution = utils.getResolutionOfUrl(imageUrl); } return baseTexture; diff --git a/src/core/textures/BaseTexture.js b/src/core/textures/BaseTexture.js index 312a772..02a3423 100644 --- a/src/core/textures/BaseTexture.js +++ b/src/core/textures/BaseTexture.js @@ -394,7 +394,7 @@ utils.BaseTextureCache[imageUrl] = baseTexture; // if there is an @2x at the end of the url we are going to assume its a highres image - this.resolution = utils.getResolutionOfUrl(imageUrl); + baseTexture.resolution = utils.getResolutionOfUrl(imageUrl); } return baseTexture; diff --git a/src/core/utils/index.js b/src/core/utils/index.js index bf0ded9..9b38581 100644 --- a/src/core/utils/index.js +++ b/src/core/utils/index.js @@ -136,7 +136,6 @@ /** * get the resolution of an asset by looking for the prefix * used by spritesheets and image urls - * TODO make this smarter! * * @param url {string} the image path * @return {boolean}