GLTFExporter changes how textures were loaded

Hi,

I’m trying to export the model via gltf exporter but when I preview the model with https://gltf-viewer.donmccurdy.com/ or https://sandbox.babylonjs.com/ the textures are messed up. When applying textures on my model I used THREE.RepeatWrapping. And on the exported model that doesn’t apply.

let txt = new THREE.TextureLoader().load(color.texture);

txt.repeat.set(color.size[0], color.size[1], color.size[2]);
txt.wrapS = THREE.RepeatWrapping;
txt.wrapT = THREE.RepeatWrapping;

new_mtl = new THREE.MeshPhongMaterial({
    map: txt,
    shininess: color.shininess ? color.shininess : 10
});

Here is how it looks in my editor

And when it is exported and loaded via other editors

Here is also the code for updating material on the model

parent.traverse((o) => {
    if (o.isMesh && o.nameID != null) {
        if (o.nameID == type) {
            o.material = new_mtl;
            materials[o.uuid] = new_mtl;
        }
    }
});