I have this strange issue. I’m replicating the sandbox environment i.e. loading a GLB then assigning an environment texture the the default skybox. It works fine locally but not remotely. Using the following code on a remote server, the GLB loads but the scene is totally dark and the only console error is “BJS - [09:53:36]: Unable to load from ./path/to/model.glb: Error in onSuccess callback
”
SceneLoader.Append("", "./path/to/model.glb", this._scene, () => {
const envTexture = CubeTexture.CreateFromPrefilteredData("./path/to/environmentSpecular.env", this._scene);
this._scene.environmentTexture = envTexture;
//@ts-ignore
this._scene.createDefaultSkybox(envTexture, true, (this._scene.activeCamera!.maxZ - this._scene.activeCamera!.minZ) / 2, 0.3, false);
});
In Chrome dev tools there are no resource load errors in the network tab.
Note also: If I don’t add the //@ts-ignore
then the TS compiler complains "Property 'createDefaultSkybox' does not exist on type 'Scene'.ts(2339)"