Skip to content

Commit

Permalink
Merge pull request #13038 from HoferMarkus/master
Browse files Browse the repository at this point in the history
Fix creation of cube textures from URL

Former-commit-id: 08181bf238c3e5504a7398c2dd3156c2c35ca808
  • Loading branch information
sebavan committed Sep 28, 2022
2 parents cf75b1d + 4a80bc1 commit a21cae6
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -357,8 +357,9 @@ ThinEngine.prototype.createCubeTextureBase = function (
rootUrl = this._transformTextureUrl(rootUrl);
}

const lastDot = rootUrl.lastIndexOf(".");
const extension = forcedExtension ? forcedExtension : lastDot > -1 ? rootUrl.substring(lastDot).toLowerCase() : "";
const rootUrlWithoutUriParams = rootUrl.split("?")[0];
const lastDot = rootUrlWithoutUriParams.lastIndexOf(".");
const extension = forcedExtension ? forcedExtension : lastDot > -1 ? rootUrlWithoutUriParams.substring(lastDot).toLowerCase() : "";

let loader: Nullable<IInternalTextureLoader> = null;
for (const availableLoader of ThinEngine._TextureLoaders) {
Expand Down

0 comments on commit a21cae6

Please sign in to comment.