Importing many unique meshes without dropping FPS

Hi all,

Hoping to get some advice or a strategy for importing GLTF/GLB meshes without tanking FPS.
I regularly need to import many unique meshes (like cesium tiles) based on an event or camera frustum etc. Doing this using SceneLoader.ImportMeshAsync tends to drop the frame rate while the meshes are imported, it is fine again when they stop.

Is there some way I can leverage workers to do some of the heavy lifting? I have not been able to find an example.

Appreciate any tips.

Sam

Hello and welcome!

Here is the small example with worker - https://playground.babylonjs.com/#0U9GQJ#2 which you may tune according to your needs.

3 Likes

That was quick! Thanks @labris I will experiment and let you know how it goes.

1 Like