We have user interface where we show shirt and trouser textures and based on selection of textures we need to update the avatar(glb) dynamically.
if user clicks on Shirt design we need to update the texture in the glb file
let myTop = scene.getMeshByName(“Wolf3D_Outfit_Top.001”);
myTop.material.albedoTexture = myTexture;
If user clicks on trouser design we need to update the texture in the glb file
let mybottom = scene.getMeshByName(“Wolf3D_Outfit_Bottom.001”);
mybottom.material.albedoTexture = myTexture1;
The following is the code snippet, Can somebody suggest how to apply this feature ?
Thanks sebavan…
In our case, we are displaying all shirt and trouser designs outside the babylon.js framework
Initially the user selects the design( example shirt ) and should apply the shirt texture.to the model. can we pass some parameter as part of Request object and identify the type of texture chosen and .apply the texture dynamically.