|
@@ -682,13 +682,17 @@
|
|
|
if (parsedData.environmentTexture !== undefined && parsedData.environmentTexture !== null) {
|
|
|
if (parsedData.environmentTextureType && parsedData.environmentTextureType === "BABYLON.HDRCubeTexture") {
|
|
|
var hdrSize:number = (parsedData.environmentTextureSize) ? parsedData.environmentTextureSize : 128;
|
|
|
- var hdrTexture:BABYLON.HDRCubeTexture = new BABYLON.HDRCubeTexture(rootUrl + parsedData.environmentTexture, scene, hdrSize);
|
|
|
+ var hdrTexture = new HDRCubeTexture(rootUrl + parsedData.environmentTexture, scene, hdrSize);
|
|
|
if (parsedData.environmentTextureRotationY) {
|
|
|
hdrTexture.rotationY = parsedData.environmentTextureRotationY;
|
|
|
}
|
|
|
scene.environmentTexture = hdrTexture;
|
|
|
} else {
|
|
|
- scene.environmentTexture = CubeTexture.CreateFromPrefilteredData(rootUrl + parsedData.environmentTexture, scene);
|
|
|
+ var cubeTexture = CubeTexture.CreateFromPrefilteredData(rootUrl + parsedData.environmentTexture, scene);
|
|
|
+ if (parsedData.environmentTextureRotationY) {
|
|
|
+ cubeTexture.rotationY = parsedData.environmentTextureRotationY;
|
|
|
+ }
|
|
|
+ scene.environmentTexture = cubeTexture;
|
|
|
}
|
|
|
if (parsedData.createDefaultSkybox === true) {
|
|
|
var skyboxScale = (scene.activeCamera !== undefined && scene.activeCamera !== null) ? (scene.activeCamera.maxZ - scene.activeCamera.minZ) / 2 : 1000;
|