Change texture gltf onclick

Can a button be made to change the texture gltf using three.js or javascript?

examles

webgl_loader_gltf_variants

It’s possible.
You can log the object and identify the meshes you want to modify material of, then change the value of material maps.

Thank you so much
I do not understand
Example here
what should I do

Please answer me

It should be something like this. You load the texture via the Texture Loader and apply it to a child mesh.

An example code:

wardrobeLoader2 = new THREE.TextureLoader().load('./textures/table42/textures/wardrobeorig.png');
			gltfLoader.load('./textures/table42/scene.gltf', (gltf) => {
                wardrobe = gltf.scene;
             
                wardrobe.traverse(function(node) {

                    if (node instanceof THREE.Mesh) {
						
						node.material.map = wardrobeLoader2;
                    }
                
                });
                scene.add(wardrobe);
            });

Thank you so much