Skip to content

Commit

Permalink
Add the possibility to pass forcedExtension for an environment texture (
Browse files Browse the repository at this point in the history
#12401)

Co-authored-by: Guzhban Mambetov <[email protected]>
  • Loading branch information
ton-solutions and Guzhban Mambetov authored Apr 14, 2022
1 parent 7e37a0c commit 69a92f0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/dev/core/src/Loading/Plugins/babylonFileLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,11 @@ const loadAssetContainer = (scene: Scene, data: string, rootUrl: string, onError
scene.environmentTexture = hdrTexture;
} else {
if (EndsWith(parsedData.environmentTexture, ".env")) {
const compressedTexture = new CubeTexture((parsedData.environmentTexture.match(/https?:\/\//g) ? "" : rootUrl) + parsedData.environmentTexture, scene);
const compressedTexture = new CubeTexture(
(parsedData.environmentTexture.match(/https?:\/\//g) ? "" : rootUrl) + parsedData.environmentTexture,
scene,
parsedData.environmentTextureForcedExtension
);
if (parsedData.environmentTextureRotationY) {
compressedTexture.rotationY = parsedData.environmentTextureRotationY;
}
Expand Down

0 comments on commit 69a92f0

Please sign in to comment.