BABYLON.Utils WASM Module w/ Async API

A BABYLON.Utils WASM module running in a WebWorker can provide async APIs for computationally intensive operations. A flag in the engine constructor can enable/disable this feature, rather than requiring an additional import. Such an implementation will more cleanly enable the internals of BJS to benefit. Many existing internal operations implemented in Javascript can be pointed to the WASM API if it is enabled.

What would you put in the lib exactly ?

We already supports some for Draco, KTX and large slow processes but doing it real time every frame for smaller part do sometime not make sense with the extra latency it might add for data transfer.

This would not be for per frame operations but instead operations such as costly mesh deforming, optimized materials creation, and graph algorithms.

Yup it is already happening but each of those are their own separate files. Basically, ammo for physics, ktx, draco, webgpu shader compilations.

WebAssembly is in active usage within Babylon? Does that mean that it comes inline? And therefore one can contribute WebAssembly code to Babylon?

This is relying on external packages who are already built. We do not have any c/c++/rust sources in the repo