Jump to content

Problems with reloading a scene


meron
 Share

Recommended Posts

I'm using BabylonJS within an Angular application. It is used in a Dialog and shows three dice that are falling. The first time I open the dialog everything looks fine. However, if I close the dialog and reopen it, the 3D scene is empty.

I suspect it has something to do with the engine/scene not being cleared, but I have to little experience with WebGL and BabylonJS to make a good guess on how to solve it.

On Close, I do call

public cleanup(): void {
  this._engine.stopRenderLoop();
  this._scene.dispose();
  this._engine.dispose();
}

Sadly, this does not solve the problem. If anyone can help me out, I'll be much obliged.:-)

The project can be viewed on github:

https://github.com/gurpsdomain/GurpsyMcGurpsFace

The BabylonJS code can be found in

src/app/presentation/dialoges/generic/dice-dialog/scene

And a running example is available on 

https://gurpsdomain.github.io/GurpsyMcGurpsFace/

Click on the menu icon (top right) and select "Throw Dice".

 

Thanks!

Meron

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