Jump to content

scene has frozen after dispose()


Dad72
 Share

Recommended Posts

There is still a problem after disposing the scene. We can see in the console: Uncaught Error: No camera defined

Why ? because then I can not recreate a new scene without refreshing the page with F5.

Even if I use engine.stopRenderLoop(), this product always.
Link to comment
Share on other sites

It has always be the case: if you dispose the only scene, then rendering has nothing to render (you can check with stable version on the PG) so the canvas is not updated and remains unchanged.

The PG assumes that there is an active scene.

 

Furthermore even outside of the PG, if there is no scene, there is no rendering and canvas remains unchanged (Meaning: it will keep the last generated image)

Link to comment
Share on other sites

The problem is that I can not reload a new scene because of the fact that there is no defini camera.

On my project if I reload a new scene to recreate a new camera I can not. I have to refresh my page for that.

How to fix this? Must I disposed the engine too and recreate it?

[edit] Yes I must have disposed the engine and recreate it, it works like that.

So if we have disposed the scene, we must also have dispose the engine to be able to recreate a scene, is it what you should do or it is not normal?

Link to comment
Share on other sites

As I mentioned earlier, with engine.stopRenderLoop ()  it produces the same thing, the scene then blocks because there is no camera.

Solution 1 will not work for my project because the user can create a scene either empty or from made scene. I can not recreate a scene without knowing what the user wants to do.

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