0

I'm a big doubt. Would loading the model in the scene and after this object is fully

charged, then I would begin to load another model means That reason is behind the panos.O

That I am loading multiple models and my project is taking much to open the load. an example

of what I mean:

renderer.add (bones);

renderer.add (skin);

The shown in the line of code to initialize the project by the browser, bones and skin are

rendered so start the project. But I would with the q bones were rendered after the skin had

Already Been rendered ie, while the skin is being shown bones are rendering.

I hope you have Given to express my doubt.

2 Answers2

0

you can load one model first and use the onShowtime callback to start loading the other one once the first is done:

var r = new X.renderer3D();
r.init();

var bones = new X.mesh();
bones.file = 'bones.vtk';

r.add(bones);

r.render();

r.onShowtime = function() {

 // reset the onShowtime function, since it will be called again after loading the skin
 r.onShowtime = function() {};

 // bones were loaded, now load the skin
 var skin = new X.mesh();
 skin.file = 'skin.vtk';

 r.add(skin);

}
haehn
  • 967
  • 1
  • 6
  • 19
0

I came across an error. When using the function onShowtime the documentation says that

everything will be erased and redrawn on the screen. And that's what happened in my project,

for example after I render the skin, the screen was wiped renderisar bones. The idea is to get

me to render the skin and it is shown on the display, then behind the scenes, behind the

curtain esteje being rendered bones. This is to make it not take so long to load my model.

Thank You!!!