Jump to content

Problem calling scene render when model imports.


JonVarner
 Share

Recommended Posts

Hey all,

I am working on a scene where, for optimization purposes only render when the camera is moving, or when an object is imported into the scene. However, for some reason the scene is rendering before the model is actually ready, which leads to a partially rendered object. What is the correct way to trigger a render once the model is actually imported and ready to go?

My code:

BABYLON.SceneLoader.ImportMesh('', 'assets/components/', path + '.babylon', scene, (newMeshes) => {
    self.__forceRender = true
})

 

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