Buzul Posted November 5, 2018 Share Posted November 5, 2018 hi guys.. I'm here with fresh problem... I'm doing a loading screen i already read document and examine samples and also i did something but it's not enought for me i have a video first; i want to loading and streaming items while video is playing. Video is loading and playing and showing %100 loaded but i waiting so long for opening scene. here my pg link: https://playground.babylonjs.com/#X4UZJP#1 who can somebody show me the way about this? thanks in advance Quote Link to comment Share on other sites More sharing options...
Guest Posted November 5, 2018 Share Posted November 5, 2018 Well the PG is not functional. That does not help to help Quote Link to comment Share on other sites More sharing options...
Guest Posted November 5, 2018 Share Posted November 5, 2018 But let me try still: You have two events in the ImportMesh (onProgress and onSuccess). You should just display your video and your progress report in the onProgress and use the onSuccess to run something like: scene.executeWhenReady(function() { // hide my video }) Buzul 1 Quote Link to comment Share on other sites More sharing options...
Buzul Posted November 6, 2018 Author Share Posted November 6, 2018 @Deltakosh thanks for your quick answer. I'm already using the function you suggest to hide the installation screen. But my main problem is in loading screen downloading and streaming progresss. I'm using importmesh method for this action and also i'm using second parameter for importmesh (for onProgress event) My code is below, with this code i can see size counting (MB) but when size counting finished percentage counting directly showing %100 I want to do this screen like sponza's loading screen.. I'm trying to solve this issue since ten days.. I need your suggestions.. var totalDataForLoading; var loadedData; BABYLON.SceneLoader.ImportMesh("", "folder/", "file.babylon", scene, function (newMeshes2) { //onSuccess function // bla bla bla // bla bla bla // bla bla bla var asd = (loadedData * 100) / totalDataForLoading; loadingText.innerHTML = "Loading pls Wait..." + asd.toFixed() + "%"; },function (evt) { totalDataForLoading = evt.total; loadedData = evt.loaded; if (evt.lengthComputable) { var cnt = evt.loaded / (1024 * 1024); loadingText.innerHTML = "Loading pls Wait..." + Math.floor(cnt * 100.0) /100.0 + " MB Loaded"; } else { } }); Quote Link to comment Share on other sites More sharing options...
Buzul Posted November 6, 2018 Author Share Posted November 6, 2018 @Deltakosh thanks for your support, i did it. It's working fine.. I have little js problem now, but i will solve it.. thanks... GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.