Scene's auto clear not working


It seems the Scene’s autoClear works well with Babylon Playground as shared in the below demo.

Here I set scene.autoClear=false

However, it does not behave correctly when I create a simple typescript application, here is a link for my repo.

It seems the background is affected but not the rendering meshes sphere and ground.
I am missing something here?

Try to set the preserveDrawingBuffer option when creating the engine (that’s what the Playground does).


It works like a charm. Thank you.