I want to freeze sprite on canvas so engine does not have to redraw same thing over and over again when rendering frame

I want to freeze sprite on canvas so engine does not have to redraw same thing over and over again when rendering frame. Can you help me? is this thing even possible in BabylonJS?
Best Regards,
<3

Hey @djamesg , how are you doing?

I think you can just stop calling scene.render in your engine.runRenderLoop.

I have modified this example playground to set the currentScene to undefined when the button is pressed. This will make the scene not to be rendered by the engine, so the canvas will have the last drawn frame.

Switch scenes example | Babylon.js Playground (babylonjs.com)

Hello, your response is much appreciated,
So my problem is I want to render scene but freeze some sprites in them so that those particular sprites don’t get drawn each frame loop by the engine, so I can not freeze whole render loop because I need some objects to move.

In that case, I don’t think it is possible to do it. If you have your scene been rendered to the canvas (even if it is a small subset of the scene) you will clean the canvas at the beginning of the draw, so I will have to render you sprites again even if they don’t change from frame to frame.

You could have two scenes, one for the static objects and one for the dynamic ones: Using Multiple Scenes | Babylon.js Documentation (babylonjs.com)