Unable to import external 360 file


I am trying to upload an external 360 image file from my current folder. I am also hosting a server but due to unknown reasons the file is never loaded. What am I doing wrong?

            var skybox = BABYLON.MeshBuilder.CreateBox("skyBox", { size: 1000.0 }, scene);
            var skyboxMaterial = new BABYLON.StandardMaterial("skyBox", scene);
            skyboxMaterial.backFaceCulling = false;
            skyboxMaterial.reflectionTexture = new BABYLON.CubeTexture("./360.jpg", scene);
            skyboxMaterial.reflectionTexture.coordinatesMode = BABYLON.Texture.SKYBOX_MODE;
            skyboxMaterial.diffuseColor = new BABYLON.Color3(0, 0, 0);
            skyboxMaterial.specularColor = new BABYLON.Color3(0, 0, 0);
            skybox.material = skyboxMaterial;

What error do you see in the chrome console ?

Hey I found the error. For some reason BABYLON.CubeTexture("./360.jpg", scene); was causing the issue. I changed it to BABYLON.CubeTexture(“360.jpg”, scene); and it was able to load it.

1 Like