meron Posted March 16, 2018 Share Posted March 16, 2018 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 Quote Link to comment Share on other sites More sharing options...
meron Posted March 19, 2018 Author Share Posted March 19, 2018 No answer yet. :-( If anyone needs more information, I'm happy to give it. Quote Link to comment Share on other sites More sharing options...
Guest Posted March 19, 2018 Share Posted March 19, 2018 Unfortunately I'm not an Angular user. (not sure if this could help but just in case: https://doc.babylonjs.com/resources/babylonjs_and_ionic_angular) Also pinging @brianzinn as I think he is an angular poweruser Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.