When trying to change the texture on the go i see there is a delay

When trying to change the texture on the go i see there is a delay in material change and the mesh disappears for a second and reappears in node Materials. is there a where we can reduce the disappearance of mesh while changing the mesh on run time…

Do you create the new BABYLON.Texture on the fly, when assigning? If so, you have to first create the texture, and use its onLoadObservable to know when the switch is made possible.

https://playground.babylonjs.com/#ZN0LCW

Maybe the assetManager is easier to use for these tasks: Asset Manager | Babylon.js Documentation

1 Like