Change the standard loading screen

Hi @moxierichard, welcome to the forum. My demo/comments for THIS topic… are very old.

Have you read… https://doc.babylonjs.com/how_to/creating_a_custom_loading_screen ?

There is a section called " Getting File Loading Rate "

Could that assist you? If not, perhaps you should start a new question/thread… asking about… “Custom Loading Screen with Accurate Progress Percentage”.

I am not up-to-date on best/latest methods to do that. Sorry.

Try the method from the docs above. If it does not work… perhaps ask new question. We need help from more people. :slight_smile:

thanks very much for so quick reply, any word of your reply is valuable.

the customized loading screen really helps, inspiring.
and i implement it into my 2D fullscreenUI by following steps:

1.write a func to make a loading screen that looks like a class
function fc_lscust( text) { //loading screen custmized
this.loadingUIText = text;
this.displayLoadingUI = function() { };
this.hideLoadingUI = function() { );
};

2.before loading ,create an instance of my loading screen
var myls=new fc_lscust(‘to load…’); //myloading screen to replace the default one
engine.loadingScreen = myls;

3.in the Babylon loading callback , show my loading screen with percentage number.
engine.displayLoadingUI();
BABYLON.SceneLoader.ImportMesh("", “imgs/”, “zz.gltf”, scene,
function (meshes,ptcls,skels,animgrps) {
engine.hideLoadingUI();
},
function (evt) {displbl(
{txt:‘role loading…’+r(evt.loaded/evt.total)*100+’%’}
);
} ,
function (scene,msg,exceptions) { engine.hideLoadingUI();
}

*displbl() is a my self-defined function I made to re-write text on my fullscreenUI
function displbl(opt){ my2DFullscreenUI.getChildByName(‘toplabel’).text= opt.txt; }

code above solves the problem how and where to show loading percentage.
but it seems two shortcomings yet:

  1. it does not show an graphic image duiring loading,like a swirl.
    2.it depends on Babylonjs’s Sceneloader.importMesh()'s onProgress callback function which offers the value of loading number(I don’t know how Babylon works out these numbers but that really does not matter,it’s better than doing a wheel by myself ).
    but when I try to use BABYLON.SceneLoader.Append(), which I try to load a 3D map incrementally, I found there is no any loading values(total,current…) offered.
    so I am now trying to see more docs
    thanks very much!