Jump to content

Getting the Results of SceneLoader.Append()


SpaceToast
 Share

Recommended Posts

What is the best way to get the results--the appended bits--from BABYLON.SceneLoader.Append() ? The function for a single model, BABYLON.SceneLoader.ImportMesh(), and the function to load a new scene BABYLON.SceneLoader.Load(), both return their result, but Append() seems to only return the existing scene.

I believe I understand the concept in this thread--mark everything that's already loaded before calling BABYLON.SceneLoader.Append(), at which point everything that's not marked can be assumed to come from the file load. The trouble is, if multiple files are being loaded, there's no guarantee that all of the new meshes, lights and cameras in the scene come from the same file when onSuccess fires. (This is assuming file loading happens async.)

I suppose it would be possible to use BABYLON.SceneLoader.Load() to instead put the results into a new (hidden) scene, loot that scene for parts to the main scene, then delete it. That feels like a lot of overhead though. Any better ideas?

[Peeling this out into its own topic, as Q&A threads don't "bump" anyway!]

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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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