Jump to content

progressCallBack ground


Recommended Posts



How to do a progresscallback on a ground:



I see that it can be done on a scene to load or a template to load, but I do not find for the terrains. My ground with my water and the sky puts some seconds to load and i would like to show a progression of loading.


Thank You

Link to comment
Share on other sites

For info, if its can help another person:


I load an image in the canvas when I selected a terrain to load with:

function openTerrain(TerrainName){     document.getElementById("chargement").innerHTML = "<img src='Data/patienter.gif' />";             $.ajax({ url:'Fonctions/Open_terrain.fonction.php', type:'post', data: "terrainName=" + TerrainName,                success:function(data){                                    data = data.split(";"); var savedPosition = data[0]; var savedNormal = data[1]; subdivision = data[2]; dimX = data[3]; dimY = data[4];                                            LoadTerrain(savedPosition, savedNormal, false, false, dimX, dimY, subdivision, null);                                }            });}

I then put ca in the function that loads the terrain which disables the image load in progress:

function LoadTerrain(...) {....$(canvas).ready(function(){        if(ground.isReady() && grid.isReady() && water.isReady() && skybox.isReady())        {            document.getElementById("chargement").innerHTML = "";            $("#chargement").hide();        }        });}

My image appears some moment and disappears when the ground, the water, the sky is loaded. I do not know if there are other ways to do this, but this solution works well.

Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...