Append vs Load vs Import Mesh

I’m trying to better understand the various SceneLoader methods available. Looking through the docs it gives a very brief description of these but I’m wondering why and when you would use these three different methods. Typically I use ImportMesh and leave the first argument blank to import everything. I’m wondering why not use this all the time?

From what I understand, using the Load method would create a new scene and I would assume that would act similar to building out an entire level within a game and importing that. Whereas importing a mesh(es) would add model(s) to the current scene created in BabylonJS. So if I wanted to create everything in Blender, cameras, lights and models I could then Load that scene in Babylon. Is this correct?

I’m not sure how Append is any different than importing the mesh. It seems to do the exact same thing except it seems to explicity be used to import everything from that file, where the ImportMesh would allow you to import all or some meshes.

Am I correct about how these work?

  • load loads a full scene
  • append does the same but instead appends the content to an existing scene
  • importMesh imports targeted mesh from a file only (like a subset of append)

There is also loadAsssetContainer that maybe useful for various situations.

1 Like