amir mola
amir mola

Reputation: 405

How to refresh BabylonJs canvas?

How can I refresh the scene or canvas after I changed canvas size in BabylonJs? all I want is to re render the scene because the aspect ratio changes when the browser size is changed by the user.

Upvotes: 2

Views: 2406

Answers (1)

Łukasz Borchmann
Łukasz Borchmann

Reputation: 143

It can be done using engine.resize() method. See: https://doc.babylonjs.com/classes/3.1/engine#resize-rarr-void

Upvotes: 5

Related Questions