I find that I in order to serialize textures (or scenes with textures) it is necessary to wait until textures are loaded and ready:
This is using the WhenAllReady callback. Is it possible to avoid using callbacks ?
SceneSerializer.SerializeAsync() seemed like an option as it returns a promise but I cannot get it to work (also see BABYLON.SceneSerializer.SerializeAsync usage).
I found scene.whenReadyAsync:
That seems promising as the promise resolves when all textures are loaded.
Any other hints or feedback very welcome.