Since there are no basis skyboxes on the playground I have to place the code here anyway checking it is pretty straightforward:
var texture = new BABYLON.CubeTexture(
url,
scene,
null,
true,
null,
function () {
resolve(texture);
console.log("OK", url)
},
function (message) {
console.log("MSG:", message);
reject(message);
console.log("FAIL", url)
}
);
it triggers
MSG: Textures type does not support cascades.
(index):91 FAIL ./textures/cubeb.basis
The error seems to be that even sending null as “files parameter” it seems that it considers that we are trying to use several images to create the cubemap (that is not supported in basis format), and set that parameter is required to setup the loading callbacks.
Btw I’ve tried with square brackets without nothing inside it (I cannot write them here since the forum parses it to a checkbox) instead of null without luck.
It actually works if you only set the two first parameters! the problem is that setting the “Textures” parameter to null triggers an error so you cannot use the callbacks.
//THIS METHOD WORKS: unfortunately it cannot trigger any callback
var cubetexture2 = new BABYLON.CubeTexture(
mUrl,
scene
);
console.log("cubetexture2", cubetexture2);
I’m not sure what you mean by it works. Yes, there is a texture object, but the texture object has no content as far as I can tell.