Dispose the scene freezes the scene and does not dispose

Hello,

It seems that Dispose Scene no longer works.
I found a PG that reproduces it.

I specify that it does the same in WebGL and WebGPU

Hello,

Sorry but I don’t get exactly where is the problem here :thinking:
I have no error in console, and after dispose call, scene.isDisposed is true, as well as scene.meshes being empty, etc…

To me the canvas being freezed is due to your scene being disposed.
The engine render loop should now be replaced by the rendering of another scene…


Or am I missing something ? :slight_smile:

I completed the PG. When the scene is dispose. You cannot recreate a scene.
The scene should disappear and we should be able to recreate one or I may have missed something too. :slight_smile:

I think you are missing something.
Your call : createScene(); does nothing I would say, since the scene is not even used.

The Playground offers us an abstraction where the user only have to define the createScene function, and then it would use its output to launch the engine render loop automatically.

But I think that if you want to dispose this scene, and run another, you should as well override the engine render loop :

2 Likes

Effectively. I missed that with the PG.
Thanks